Compare commits

...
Author SHA1 Message Date
rmmayo 1925c31934 upgrade spring-boot to 4.1.2 2026-10-23 14:13:44 +00:00
Ryan Mayo 48ff8e052c Merge pull request #291 from NationalSecurityAgency/tests_fix
Tests fix
2026-10-08 08:14:07 -04:00
Dima May 037009f8a8 Fixed OAuth Cypress login by probing session instead of project token 2026-10-08 10:29:31 +00:00
Dima May dca695d685 Increased maximum log requests during a one-minute window 2026-10-07 18:28:00 +00:00
Dima May 24905e9a42 Fix cypress tests client CSRF handling and backed user creation process 2026-10-05 10:28:14 +00:00
Dima May 5a98e7fd2c creating_release_version_3.6.5 2026-10-02 11:43:21 +00:00
Ryan Mayo 897d1b9b1c Merge pull request #290 from NationalSecurityAgency/int_client_session
Fix integration client session and CSRF handling for login
2026-09-29 09:04:35 -04:00
Dima May 3a5bcc1f04 Fix integration client session and CSRF handling for login 2026-09-29 11:12:02 +00:00
Ryan Mayo 030a8bd24a Merge pull request #289 from NationalSecurityAgency/xhr_withCredentials
Xhr with credentials
2026-09-23 15:19:21 -04:00
Dima May 532f33a8a7 fixed tests 2026-09-23 15:45:29 +00:00
Dima May b070e4058e only set xhr.withCredentials to true in PKI mode 2026-09-23 14:39:08 +00:00
Dima May 6b1ba358d8 Merge pull request #288 from NationalSecurityAgency/remove_scheuduled_ci_actions
updated skills-client CI actions to no longer run on a schedule
2026-09-15 11:46:54 -04:00
rmmayo e845fb7788 updated skills-client CI actions to no longer run on a schedule 2026-09-15 15:28:24 +00:00
rmmayo 599e838086 updated skills-client-js to add the current window.location.pathname as the default parentPath option 2026-09-15 15:11:02 +00:00
rmmayo ad5ab89439 creating_release_version_3.6.4 2026-09-14 19:38:41 +00:00
rmmayo 3c408f555f updated the dependencies 2026-09-14 19:11:24 +00:00
rmmayo ea523e9381 updated the versions for testing 2026-09-14 13:59:38 +00:00
rmmayo cea08a3dd5 set parentPath to window.location.pathname so that it is available to the skills-display iframe 2026-09-09 21:56:16 +00:00
rmmayo 731853a8a6 globalEventResult can be empty string or empty JSON object (after spring-boot 4 upgrade) 2026-08-26 16:46:03 +00:00
rmmayo 78c338fd36 updated spring-boot 2026-08-26 16:45:12 +00:00
rmmayo 80052f77ac remove unnecessary spring.autoconfigure.exclude props from tests since it's the default in the main application.yml 2026-08-26 16:45:00 +00:00
rmmayo b4e7718741 Updated the regex to match the completed array when it contains an object with:
- `"type": "Overall"`
- `"level": 1`

regardless of property order.
2026-08-26 14:59:35 +00:00
rmmayo 42c40ce92f Updated the regex to match the completed array when it contains an object with:
- `"type": "Overall"`
- `"level": 1`

regardless of property order.
2026-08-26 12:03:02 +00:00
Ryan Mayo 18ad1af38e Merge pull request #287 from NationalSecurityAgency/spring_4_upgrade
upgraded to spring boot 4.1.0
2026-08-12 16:11:07 -04:00
Dima May 58f6265836 upgraded to spring boot 4.1.0 2026-08-12 19:35:43 +00:00
Ryan Mayo e3f299376c Merge pull request #285 from arpitjain099/fix/encode-oauth-redirect-uri
Encode the redirect target before interpolating it into the authenticator URL
2026-07-31 10:09:11 -04:00
Arpit Jain 2b66377a30 Encode the redirect target before interpolating it into the authenticator URL
getAuthenticationToken built the OAuth redirect by interpolating
window.location straight into the query string, so any reserved
character already present in the current URL was carried through as
structure rather than data. A page reached with an ampersand in its
query string could therefore append parameters to the authenticator
URL, including a second skillsRedirectUri.

Use encodeURIComponent(window.location.href) so the value is passed as
a single opaque parameter. Closes #284.

Signed-off-by: Arpit Jain <[email protected]>
2026-07-31 00:06:02 +09:00
Dima May b88c19d0c7 Merge pull request #283 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-integration/skills-int-client-js/axios-1.18.0
Bump axios from 1.17.0 to 1.18.0 in /skills-client-integration/skills-int-client-js
2026-07-21 07:21:08 -04:00
dependabot[bot] 558cecacdd Bump axios in /skills-client-integration/skills-int-client-js
Bumps [axios](https://github.com/axios/axios) from 1.17.0 to 1.18.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.17.0...v1.18.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.18.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-07-21 10:55:51 +00:00
Dima May dbcc95f951 Merge pull request #282 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-js/axios-1.18.0
Bump axios from 1.17.0 to 1.18.0 in /skills-client-js
2026-07-21 06:54:48 -04:00
dependabot[bot] 50ac5c413f Bump axios from 1.17.0 to 1.18.0 in /skills-client-js
Bumps [axios](https://github.com/axios/axios) from 1.17.0 to 1.18.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.17.0...v1.18.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.18.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-07-20 20:13:33 +00:00
Don Walizer cf0961c435 Merge pull request #280 from NationalSecurityAgency/upgrades_gh-actions_node_java
upgrade gh actions, node and java
2026-07-06 09:38:03 -04:00
Dima May 56cb884fdb Merge pull request #279 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-js/babel/core-7.29.6
Bump @babel/core from 7.29.0 to 7.29.6 in /skills-client-js
2026-07-06 08:02:34 -04:00
Dima May 6af2944841 upgrade gh actions, node and java 2026-07-06 11:49:49 +00:00
dependabot[bot] a301650700 Bump @babel/core from 7.29.0 to 7.29.6 in /skills-client-js
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.29.0 to 7.29.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.29.6/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-version: 7.29.6
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-06-25 14:51:08 +00:00
rmmayo d19947c814 upgraded spring boot to v3.5.16 2026-06-25 14:49:46 +00:00
Dima May 361bae4289 spring boot upgrade; set license-maven-plugin to use the latest version 2026-06-11 14:50:16 +00:00
Dima May aae9cc7ee9 Merge pull request #278 from NationalSecurityAgency/t#277/upgrade_axios
#277 - upgrade axios
2026-06-08 15:24:47 -04:00
rmmayo 60c3d5edb1 #277 - upgrade axios 2026-06-08 14:48:22 +00:00
Dima May bb12395d80 creating_release_version_3.6.3 2026-05-12 17:39:20 +00:00
Ryan Mayo dea819670b Merge pull request #276 from NationalSecurityAgency/t#247/readme
T#247/readme
2026-05-12 13:24:29 -04:00
Dima May 7553782dcc #247: added badges 2026-05-12 17:04:39 +00:00
Dima May daf5b1fca8 #247: updated readme 2026-05-12 17:02:15 +00:00
Ryan Mayo 83878d8c3a Merge pull request #275 from NationalSecurityAgency/t#274/upgrade_libs
T#274/upgrade libs
2026-05-12 11:01:53 -04:00
Dima May 83178bf58b #247: upgraded JS libraries used in end-to-end tests 2026-05-12 14:33:26 +00:00
Dima May 03cf175e26 #247: upgraded JS libraries, rewrote tests due to jdom upgrade; new tests to improve test coverage 2026-05-12 14:14:33 +00:00
Dima May 04c9f2e950 Merge pull request #272 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-integration/skills-int-client-js/axios-1.15.2
Bump axios from 1.15.0 to 1.15.2 in /skills-client-integration/skills-int-client-js
2026-05-08 14:07:55 +00:00
Dima May 3f952ba966 Merge pull request #273 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-js/axios-1.15.2
Bump axios from 1.15.0 to 1.15.2 in /skills-client-js
2026-05-08 14:07:35 +00:00
dependabot[bot] b7ad03fb64 Bump axios from 1.15.0 to 1.15.2 in /skills-client-js
Bumps [axios](https://github.com/axios/axios) from 1.15.0 to 1.15.2.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.15.0...v1.15.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.15.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-05-08 06:29:38 +00:00
dependabot[bot] 39c7abc757 Bump axios in /skills-client-integration/skills-int-client-js
Bumps [axios](https://github.com/axios/axios) from 1.15.0 to 1.15.2.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.15.0...v1.15.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.15.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-05-08 06:15:00 +00:00
rmmayo aa0af7e776 upgraded spring-boot to v3.5.14 2026-04-23 18:05:13 +00:00
Dima May 33cfff5ebb Merge pull request #270 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-integration/skills-int-client-js/axios-1.15.0
Bump axios from 1.13.5 to 1.15.0 in /skills-client-integration/skills-int-client-js
2026-04-16 08:33:58 -04:00
Dima May 7efe886ef4 Merge pull request #271 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-js/axios-1.15.0
Bump axios from 1.13.5 to 1.15.0 in /skills-client-js
2026-04-16 08:33:32 -04:00
dependabot[bot] caa236dff1 Bump axios from 1.13.5 to 1.15.0 in /skills-client-js
Bumps [axios](https://github.com/axios/axios) from 1.13.5 to 1.15.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.13.5...v1.15.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.15.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-04-13 07:48:39 +00:00
dependabot[bot] 2b5b28c8dc Bump axios in /skills-client-integration/skills-int-client-js
Bumps [axios](https://github.com/axios/axios) from 1.13.5 to 1.15.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.13.5...v1.15.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.15.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-04-12 10:27:26 +00:00
Dima May 481a6d0505 Merge pull request #269 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-integration/skills-int-client-js/axios-1.13.5
Bump axios from 1.12.0 to 1.13.5 in /skills-client-integration/skills-int-client-js
2026-04-06 14:03:15 -04:00
dependabot[bot] 5103989eef Bump axios in /skills-client-integration/skills-int-client-js
Bumps [axios](https://github.com/axios/axios) from 1.12.0 to 1.13.5.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.12.0...v1.13.5)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.13.5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-04-06 17:38:15 +00:00
rmmayo 266bf9911d updated included licenses 2026-03-26 11:54:49 +00:00
rmmayo 8ab6ab5a3a upgraded spring boot 2026-03-26 11:37:00 +00:00
rmmayo d747c2b96f upgraded spring boot 2026-03-24 12:07:28 +00:00
Dima May 002ab3f783 Merge pull request #267 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-js/axios-1.13.5
Bump axios from 1.12.0 to 1.13.5 in /skills-client-js
2026-03-17 13:44:58 -04:00
Dima May a5f3848c16 Merge pull request #268 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-js/rollup-4.59.0
Bump rollup from 4.45.1 to 4.59.0 in /skills-client-js
2026-03-17 13:43:31 -04:00
rmmayo 601c7a2a96 upgraded spring boot 2026-03-02 18:26:52 +00:00
dependabot[bot] 8fcc10d52f Bump rollup from 4.45.1 to 4.59.0 in /skills-client-js
Bumps [rollup](https://github.com/rollup/rollup) from 4.45.1 to 4.59.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.45.1...v4.59.0)

---
updated-dependencies:
- dependency-name: rollup
  dependency-version: 4.59.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-02-28 09:07:40 +00:00
dependabot[bot] 65881829c5 Bump axios from 1.12.0 to 1.13.5 in /skills-client-js
Bumps [axios](https://github.com/axios/axios) from 1.12.0 to 1.13.5.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.12.0...v1.13.5)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.13.5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-02-11 17:50:46 +00:00
rmmayo 99f946f33a upgraded spring boot to v3.5.10 2026-01-28 13:25:19 +00:00
Dima May 8051bf7a63 Merge pull request #266 from NationalSecurityAgency/t#3596/upgrade-spring-boot
Update spring boot
2025-11-25 14:14:36 -05:00
Don Walizer 9863d82e97 Update spring boot 2025-11-25 13:38:23 -05:00
Dima May a56fef71fb removed override for tomcat 2025-11-03 14:40:37 +00:00
Dima May db24520d75 upgraded spring and commons-lang 2025-10-24 10:06:13 +00:00
Dima May ca23b4e4d4 Merge pull request #264 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-integration/skills-int-client-js/axios-1.12.0
Bump axios from 1.10.0 to 1.12.0 in /skills-client-integration/skills-int-client-js
2025-09-23 20:11:29 +00:00
Dima May 9e9952eb53 Merge pull request #265 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-js/axios-1.12.0
Bump axios from 1.11.0 to 1.12.0 in /skills-client-js
2025-09-23 20:11:22 +00:00
dependabot[bot] 90d63e19dd Bump axios from 1.11.0 to 1.12.0 in /skills-client-js
Bumps [axios](https://github.com/axios/axios) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.11.0...v1.12.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.12.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-09-23 12:52:25 +00:00
rmmayo fe91a737d5 upgraded spring-boot to 3.5.6 2025-09-23 12:51:25 +00:00
dependabot[bot] 419f5c9968 Bump axios in /skills-client-integration/skills-int-client-js
Bumps [axios](https://github.com/axios/axios) from 1.10.0 to 1.12.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.10.0...v1.12.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.12.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-09-13 15:59:43 +00:00
Dima May 809e361760 Merge pull request #263 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-js/axios-1.11.0
Bump axios from 1.10.0 to 1.11.0 in /skills-client-js
2025-08-22 14:27:39 +00:00
rmmayo f5cc10c7df upgraded spring-boot to 3.5.5 2025-08-21 14:35:11 +00:00
rmmayo c225388951 #3457 - updated tomcat 2025-08-18 15:45:24 +00:00
rmmayo 6d50e32d27 upgraded spring to v3.5.4 2025-07-24 14:34:22 +00:00
dependabot[bot] 6711223ad1 Bump axios from 1.10.0 to 1.11.0 in /skills-client-js
Bumps [axios](https://github.com/axios/axios) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.10.0...v1.11.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.11.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-07-23 16:54:11 +00:00
Dima May 4e04972a09 creating_release_version_3.6.2 2025-07-17 15:37:53 +00:00
Dima May a22b53a356 #261: removed commented out script 2025-07-17 13:59:40 +00:00
Ryan Mayo 5e5aefd745 Merge pull request #262 from NationalSecurityAgency/t#261/ci_failures
T#261/ci failures
2025-07-17 13:54:27 +00:00
Dima May 54eca19513 #261: updated year 2025-07-17 13:33:59 +00:00
Dima May 41bfbcc9d9 #261: upgraded spring boot and JS libs 2025-07-17 12:13:51 +00:00
Dima May be1e821973 #261: upgraded spring boot and JS libs 2025-07-17 11:28:09 +00:00
Dima May e38c70d39a #261: added running unit tests back 2025-07-17 11:04:21 +00:00
Dima May 796f97342b #261: added running unit tests back 2025-07-17 10:59:17 +00:00
Dima May 02fe5e1c77 #261: added a missing build steps 2025-07-16 19:06:15 +00:00
Dima May c9bfb0ca1f #261: upgraded libs; enabled videos 2025-07-16 18:12:22 +00:00
rmmayo ad321f0169 upgraded spring boot 2025-07-14 16:25:55 +00:00
rmmayo be81478d02 upgraded spring boot 2025-07-14 16:20:06 +00:00
Dima May 03372a9e92 fixing CI 2025-06-20 18:21:35 +00:00
Dima May 7ec6092d6f upgraded node and java 2025-06-20 15:07:27 +00:00
Dima May 354500f018 upgraded spring and tomcat 2025-06-20 11:02:49 +00:00
Dima May 7458284c30 upgraded spring 2025-05-22 19:34:00 +00:00
Dima May f8156f45ab upgraded spring 2025-04-25 17:45:45 +00:00
rmmayo ce13000dcb upgraded springboot to 3.4.4 2025-04-01 19:29:36 +00:00
rmmayo 1664fa7ac7 upgraded springboot to 3.4.3 2025-03-19 20:32:48 +00:00
Dima May 1806136418 Merge pull request #260 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-integration/skills-int-client-js/axios-1.8.2
Bump axios from 1.7.7 to 1.8.2 in /skills-client-integration/skills-int-client-js
2025-03-11 08:06:05 -04:00
dependabot[bot] 281140c19f Bump axios in /skills-client-integration/skills-int-client-js
Bumps [axios](https://github.com/axios/axios) from 1.7.7 to 1.8.2.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.7.7...v1.8.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-03-11 10:53:17 +00:00
Ryan Mayo 0763dfbaa3 Merge pull request #259 from NationalSecurityAgency/t#258/upgrade_libs
258: upgraded libs
2025-03-11 06:52:23 -04:00
Dima May b4a59fdb7e 258: upgraded libs 2025-03-10 19:48:01 +00:00
rmmayo 7759001feb #3058 - upgrading spring boot 2024-12-31 20:42:01 +00:00
rmmayo 1b3ac0ff11 upgraded spring boot 2024-11-26 15:32:38 +00:00
Dima May d43f21a4cc creating_release_version_3.6.1 2024-11-20 17:00:39 +00:00
Don Walizer 2d946cb9d9 Merge pull request #257 from NationalSecurityAgency/update_readme
updated README and project home page link
2024-11-20 11:57:14 -05:00
Dima May 8da314393b updated README and project home page link 2024-11-20 16:49:05 +00:00
Dima May e9a11fbbca updated README and project home page link 2024-11-20 16:36:28 +00:00
Dima May 0af837321c creating_release_version_3.6.0 2024-11-20 15:20:15 +00:00
Dima May 0b92440cbc Merge pull request #256 from NationalSecurityAgency/t#255/upgrade_spring_boot
#255 - upgrading spring boot
2024-11-19 06:49:58 -05:00
rmmayo 24e6aca4f8 #255 - upgrading spring boot 2024-11-18 17:58:24 +00:00
Ryan Mayo 5cb0d9f455 Merge pull request #254 from NationalSecurityAgency/t#209/disable_skills_client
T#209/disable skills client
2024-10-09 13:15:44 +00:00
Dima May f6fddedeae #251: improved readme 2024-10-09 12:38:07 +00:00
Dima May 6851ef187b #251: only run disabled test for 3.6.0 and above 2024-10-09 12:02:27 +00:00
Dima May 133019e4e5 #251: to avoid a race condition fixed index.html page to add success handle after configure method completed 2024-10-09 10:50:08 +00:00
Dima May 59c4ce4c70 #209: fix unit tests 2024-10-08 21:11:26 +00:00
Dima May 727a2b6cf6 #209: added an option to disable skills-client 2024-10-08 20:55:37 +00:00
Ryan Mayo 1d36f49586 Merge pull request #253 from NationalSecurityAgency/t#213/iframe_aria_label
#213: added aria-label to iframe
2024-10-08 20:20:55 +00:00
Dima May 7480f6ab2a #213: added aria-label to iframe 2024-10-08 19:23:22 +00:00
Dima May 2207dcc248 Update README.md 2024-10-08 15:13:46 +00:00
Dima May 139db488cc Merge pull request #250 from NationalSecurityAgency/dependabot/maven/skills-client-integration/skills-int-e2e-test/commons-io-commons-io-2.14.0
Bump commons-io:commons-io from 2.8.0 to 2.14.0 in /skills-client-integration/skills-int-e2e-test
2024-10-08 14:57:05 +00:00
Ryan Mayo 059e208b53 Merge pull request #252 from NationalSecurityAgency/t#251/compat_ci
T#251/compat ci
2024-10-08 14:26:53 +00:00
Dima May 7d8e8f5b53 #251: do not run unsupported test for lib prior 3.2.0 2024-10-08 13:50:19 +00:00
Dima May 0a15a7651f #251: upgraded all js libs for skills-client-js; reverted removal of clientDisplayDefaultOptions.html 2024-10-08 13:36:24 +00:00
Dima May d03a5b3fec #251: upgraded all js libs for skills-int-client-js; fixed tests to run with 3.2.0 version of skills-client-js 2024-10-08 13:21:25 +00:00
Dima May a9d0a674f4 #251: cleaning up 2024-10-07 20:40:07 +00:00
Dima May 2152366635 #251: fixed tests against sills-service 2.12.6 2024-10-07 16:12:15 +00:00
Dima May ad31359fdd #251: filter skills-service tags from testing 2024-10-07 14:45:37 +00:00
Dima May 610e844f8e #251: filter skills-service tags from testing 2024-10-07 14:44:38 +00:00
Dima May bfd93347a4 #251: filter skills-service tags from testing 2024-10-07 14:04:04 +00:00
Dima May eb6395844b #251: filter skills-service tags from testing 2024-10-07 14:02:07 +00:00
Dima May 0286c9e705 #251: filter skills-service tags from testing 2024-10-07 13:59:28 +00:00
Dima May e7a6ba07ce #251: filter skills-service tags from testing 2024-10-07 13:54:10 +00:00
Dima May 3144e84bd3 #251: filter skills-service tags from testing 2024-10-07 13:52:37 +00:00
Dima May 5f9d1daf0f #251: filter skills-service tags from testing 2024-10-07 13:49:07 +00:00
Dima May 9d844f8e67 #251: run skills-service backward compat tests 2024-10-04 17:44:16 +00:00
Dima May 303748a980 #251: run skills-service backward compat tests 2024-10-04 17:38:15 +00:00
Dima May 89b55047e9 #251: run skills-service backward compat tests 2024-10-04 17:34:38 +00:00
Dima May 0bc3f485a9 #251: run skills-service backward compat tests 2024-10-04 17:24:21 +00:00
Dima May 514c9555e0 #251: run skills-service backward compat tests 2024-10-04 17:23:13 +00:00
Dima May 94ed933a4b #251: run skills-service backward compat tests 2024-10-04 17:21:53 +00:00
Dima May 2cd9ed554d #251: run skills-service backward compat tests 2024-10-04 17:17:35 +00:00
Dima May a881f59e9c #251: run skills-service backward compat tests 2024-10-04 17:14:36 +00:00
Dima May c700ecd5f7 #251: run skills-service backward compat tests 2024-10-04 17:12:08 +00:00
Dima May 7bd9939acd #251: run skills-service backward compat tests 2024-10-04 17:07:19 +00:00
Dima May 884463917b #251: run skills-service backward compat tests 2024-10-04 17:04:40 +00:00
Dima May 55cc382f4b #251: run skills-service backward compat tests 2024-10-04 17:01:22 +00:00
Dima May da3a3cbf7f #251: run skills-service backward compat tests 2024-10-04 16:59:42 +00:00
Dima May fb02712eaf #251: run skills-service backward compat tests 2024-10-04 16:56:36 +00:00
Dima May 5fd7b97802 #251: run skills-service backward compat tests 2024-10-04 16:55:52 +00:00
Dima May d529670ebf #251: run skills-service backward compat tests 2024-10-04 16:36:11 +00:00
Dima May 9cf2f879b2 #251: run skills-service backward compat tests 2024-10-04 16:27:27 +00:00
Dima May e372fe335f #251: run skills-service backward compat tests 2024-10-04 16:18:33 +00:00
Dima May bf0a5c2b40 #251: run skills-service backward compat tests 2024-10-04 16:12:51 +00:00
Dima May db3b51fbb0 #251: run skills-service backward compat tests 2024-10-04 15:38:05 +00:00
dependabot[bot] 7fca01690c Bump commons-io:commons-io
Bumps commons-io:commons-io from 2.8.0 to 2.14.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-10-03 18:51:34 +00:00
Dima May 6ebb19bcd0 Merge pull request #248 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-js/rollup-4.22.4
Bump rollup from 4.22.2 to 4.22.4 in /skills-client-js
2024-10-01 09:28:26 -04:00
dependabot[bot] 47eb39b7a5 Bump rollup from 4.22.2 to 4.22.4 in /skills-client-js
Bumps [rollup](https://github.com/rollup/rollup) from 4.22.2 to 4.22.4.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.22.2...v4.22.4)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-10-01 11:03:36 +00:00
Ryan Mayo 66b9070fb2 Merge pull request #247 from NationalSecurityAgency/t#242/ci_and_upgrades
T#242/ci and upgrades
2024-10-01 07:03:09 -04:00
Dima May ee2f3acb04 #242: fixing oauth CI 2024-10-01 10:46:55 +00:00
Dima May 5aeba4fbdf #242: tests improvements 2024-10-01 10:20:26 +00:00
rmmayo c9d5e52b26 #245 - upgraded spring boot to 3.3.4 2024-10-01 00:52:43 +00:00
Dima May 1cc3cf90fb #242: fixing tests for oauth 2024-10-01 00:33:46 +00:00
Dima May efbcbd4691 #242: CI updates and fixes 2024-09-30 20:35:54 +00:00
Dima May 4015922833 #242: disable oauth tests on check-in for now 2024-09-30 12:49:03 +00:00
Dima May b74e94e4f8 #242: fixing tests 2024-09-30 12:38:46 +00:00
Dima May 0097090d64 #242: fixing CI 2024-09-30 12:06:27 +00:00
Dima May c8ebf124b5 #242: debug ci 2024-09-30 11:04:54 +00:00
Dima May 905fab93bd #242: add more transcript export tests; refactored cypress tests into multiple suites 2024-09-27 14:23:11 +00:00
Dima May 868eaefbec #242: kickoff tests 2024-09-27 12:46:08 +00:00
Dima May a15853c374 #242: inserted header 2024-09-27 12:10:24 +00:00
Dima May 17d1a7af4c #242: additional cypress test for back and forward navigation, breadcrumb navigation and a transcript download test 2024-09-26 20:36:26 +00:00
Dima May f1caf21a48 #242: fixing tests 2024-09-26 18:05:17 +00:00
Dima May 15d9d98e98 #242: fixing tests 2024-09-24 15:05:25 +00:00
Dima May af16c671cc #242: copy skills-service.jar in the proper location 2024-09-23 20:56:01 +00:00
Dima May d0f8995829 #242: skip tests 2024-09-23 20:42:35 +00:00
Dima May cd3fd7ba4b #242: checking out specific branch and building skills-service 2024-09-23 20:36:03 +00:00
Dima May 3d274eb8a2 #242: started fixing cypress specs; changed build to use native node 2024-09-23 20:30:56 +00:00
Dima May dd582da97d #242: started fixing cypress specs; changed build to use native node 2024-09-23 20:30:01 +00:00
Dima May 11ace4d8b6 #242: started fixing cypress specs; changed build to use native node 2024-09-23 20:20:20 +00:00
Dima May dc21097da1 upgrade github actions 2024-09-20 15:52:31 +00:00
Dima May 8bdeda36d3 upgraded skills-client-js libs 2024-09-20 15:45:28 +00:00
Dima May 323f2455b2 Merge pull request #241 from NationalSecurityAgency/upgrade-spring-3-3
Upgrade Spring Boot to 3.3.3
2024-09-05 13:17:35 -04:00
Don Walizer a0b16eca7b Upgrade Spring Boot to 3.3.3 2024-09-05 12:59:15 -04:00
Ryan Mayo 2f4d4e4008 Merge pull request #240 from NationalSecurityAgency/cleanup-libraries-update-axios
Remove old libraries, upgrade axios
2024-08-20 14:34:45 -04:00
Don Walizer ee44e6f990 Fix version in package.json 2024-08-20 14:33:58 -04:00
Don Walizer 09d2b01029 Remove old libraries, upgrade axios 2024-08-20 12:58:04 -04:00
Dima May abf3812439 update docker-compose to docker compose 2024-07-31 19:24:49 +00:00
Don Walizer 67df81d4fd Merge pull request #239 from NationalSecurityAgency/update-spring-3-2-4
Upgrade Spring to 3.2.4
2024-04-04 15:49:49 -04:00
330 changed files with 2656 additions and 11553 deletions

No files matched your search

@@ -2,9 +2,16 @@
name: Continuous Integration expired token tests
env:
NODE_VERSION: 26
JAVA_VERSION: 25
on:
schedule:
- cron: '0 8 * * *'
push:
paths-ignore:
- 'README.md'
- .github/workflows/skills-service-backward-compat.yml
- .github/workflows/client-libs-backward-compat.yml
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
@@ -34,16 +41,16 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- uses: actions/setup-node@v3
- uses: actions/setup-node@v6
with:
node-version: '14'
node-version: ${{ env.NODE_VERSION }}
- uses: actions/setup-java@v3
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '19' # The JDK version to make available on the path.
java-version: ${{ env.JAVA_VERSION }}
- name: Print Versions
run: |
@@ -53,7 +60,7 @@ jobs:
node --version
- name: Cache local Maven repository
uses: actions/cache@v3
uses: actions/cache@v6
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -61,7 +68,7 @@ jobs:
${{ runner.os }}-maven-
- name: Cache npm
uses: actions/cache@v3
uses: actions/cache@v6
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -70,11 +77,25 @@ jobs:
# - name: build skill-service
# run: ./.github/workflows/scripts/getSkillsService.sh
- name: download skill-service
# - name: download skill-service
# run: |
# mkdir skills-service
# cd skills-service
# curl -s https://api.github.com/repos/NationalSecurityAgency/skills-service/releases/latest | grep browser_download_url | cut -d '"' -f 4 | wget -qi -
# ls ./
# cd ..
- name: Checkout specific branch fo skills-service
uses: actions/checkout@v6
with:
repository: NationalSecurityAgency/skills-service
path: skills-service
- name: build skill-service
run: |
mkdir skills-service
cd skills-service
curl -s https://api.github.com/repos/NationalSecurityAgency/skills-service/releases/latest | grep browser_download_url | cut -d '"' -f 4 | wget -qi -
mvn --batch-mode clean install -DskipTests
cp ./service/target/skills-service-*.jar ./
ls ./
cd ..
@@ -120,7 +141,7 @@ jobs:
- name: upload result artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v7
with:
name: result artifacts
path: |
+36 -25
View File
@@ -2,21 +2,17 @@
name: Continuous Integration with OAuth
env:
NODE_VERSION: 26
JAVA_VERSION: 25
on:
schedule:
- cron: '0 7 * * *'
push:
paths-ignore:
- 'README.md'
- .github/workflows/skills-service-backward-compat.yml
- .github/workflows/client-libs-backward-compat.yml
workflow_dispatch:
#on:
# push:
# paths-ignore:
# - 'README.md'
# - .github/workflows/skills-service-backward-compat.yml
# - .github/workflows/client-libs-backward-compat.yml
# pull_request:
# paths-ignore:
# - 'README.md'
# - .github/workflows/skills-service-backward-compat.yml
# - .github/workflows/client-libs-backward-compat.yml
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
@@ -46,15 +42,16 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- uses: actions/setup-node@v2-beta
- uses: actions/setup-node@v6
with:
node-version: '14'
node-version: ${{ env.NODE_VERSION }}
- uses: actions/setup-java@v1
- uses: actions/setup-java@v5
with:
java-version: '19' # The JDK version to make available on the path.
distribution: 'temurin'
java-version: ${{ env.JAVA_VERSION }}
- name: Print Versions
run: |
@@ -64,7 +61,7 @@ jobs:
node --version
- name: Cache local Maven repository
uses: actions/cache@v2
uses: actions/cache@v6
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -72,18 +69,32 @@ jobs:
${{ runner.os }}-maven-
- name: Cache npm
uses: actions/cache@v2
uses: actions/cache@v6
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: download skill-service
# - name: download skill-service
# run: |
# mkdir skills-service
# cd skills-service
# curl -s https://api.github.com/repos/NationalSecurityAgency/skills-service/releases/latest | grep browser_download_url | cut -d '"' -f 4 | wget -qi -
# ls ./
# cd ..
- name: Checkout specific branch fo skills-service
uses: actions/checkout@v6
with:
repository: NationalSecurityAgency/skills-service
path: skills-service
- name: build skill-service
run: |
mkdir skills-service
cd skills-service
curl -s https://api.github.com/repos/NationalSecurityAgency/skills-service/releases/latest | grep browser_download_url | cut -d '"' -f 4 | wget -qi -
mvn --batch-mode clean install -DskipTests
cp ./service/target/skills-service-*.jar ./
ls ./
cd ..
@@ -112,7 +123,7 @@ jobs:
- name: Register hydra client
run: |
cd skills-client-integration/skills-int-e2e-test/hydra
docker-compose -f quickstart.yml exec -T hydra \
docker compose -f quickstart.yml exec -T hydra \
hydra clients create \
--endpoint http://localhost:4445/ \
--id skilltree-test \
@@ -153,7 +164,7 @@ jobs:
- name: upload result artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v7
with:
name: result artifacts
path: |
+21 -22
View File
@@ -2,17 +2,16 @@
name: Continuous Integration
env:
NODE_VERSION: 26
JAVA_VERSION: 25
on:
push:
paths-ignore:
- 'README.md'
- .github/workflows/skills-service-backward-compat.yml
- .github/workflows/client-libs-backward-compat.yml
pull_request:
paths-ignore:
- 'README.md'
- .github/workflows/skills-service-backward-compat.yml
- .github/workflows/client-libs-backward-compat.yml
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
@@ -43,15 +42,16 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- uses: actions/setup-node@v2-beta
- uses: actions/setup-node@v6
with:
node-version: '14'
node-version: ${{ env.NODE_VERSION }}
- uses: actions/setup-java@v1
- uses: actions/setup-java@v5
with:
java-version: '19' # The JDK version to make available on the path.
distribution: 'temurin'
java-version: ${{ env.JAVA_VERSION }}
- name: Print Versions
run: |
@@ -61,26 +61,25 @@ jobs:
node --version
- name: Cache local Maven repository
uses: actions/cache@v2
uses: actions/cache@v6
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache npm
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: download skill-service
- name: Checkout specific branch fo skills-service
uses: actions/checkout@v6
with:
repository: NationalSecurityAgency/skills-service
path: skills-service
- name: build skill-service
run: |
mkdir skills-service
cd skills-service
curl -s https://api.github.com/repos/NationalSecurityAgency/skills-service/releases/latest | grep browser_download_url | cut -d '"' -f 4 | wget -qi -
mvn --batch-mode clean install -DskipTests
cp ./service/target/skills-service-*.jar ./
ls ./
cd ..
@@ -112,7 +111,7 @@ jobs:
- name: upload result artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v7
with:
name: result artifacts
path: |
@@ -1,114 +0,0 @@
# This is a basic workflow to help you get started with Actions
name: Client Libs Backward Compatibility
#on:
# push:
# paths-ignore:
# - 'README.md'
# pull_request:
# paths-ignore:
# - 'README.md'
on:
schedule:
- cron: '0 5 * * *'
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
test-client-libs-backward-compat:
# The type of runner that the job will run on
runs-on: ubuntu-latest
services:
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: skillsPassword
POSTGRES_DB: skills
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: '14'
- uses: actions/setup-java@v1
with:
java-version: '19' # The JDK version to make available on the path.
- name: Print Versions
run: |
mvn --version
java -version
npm -version
node --version
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache npm
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Download Releases to Test
run: |
mkdir -p skills-service-versions
cd skills-service-versions
curl -s https://api.github.com/repos/NationalSecurityAgency/skills-service/releases | grep browser_download_url | cut -d '"' -f 4 | wget -qi -
ls ./
cd ../
- name: setup npm links
run: ./.github/workflows/scripts/setupNpmLinks.sh
- name: build integration test apps
run: |
cd ./skills-client-integration
mvn --batch-mode clean install
cd ../
- name: run backwards compat tests
run: |
cd skills-client-integration/skills-int-e2e-test
mvn --batch-mode clean package
export NO_COLOR=1
export CYPRESS_RECORD_KEY=${{ secrets.CYPRESS_RECORD_KEY }}
java -cp target/skills-int-e2e-test-*.jar -Dloader.main=skills.TestClientLibsBackwardsCompat org.springframework.boot.loader.launch.PropertiesLauncher -record -tag "${{ github.workflow }}" --minVersion "1.9.0"
cd ../../
- name: upload result artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: result artifacts
path: |
./skills-client-integration/skills-int-e2e-test/target/logs/*
./skills-client-integration/skills-int-e2e-test/target/skills-client/skills-client-integration/skills-int-e2e-test/cypress/videos/*.mp4
./skills-client-integration/skills-int-e2e-test/target/skills-client/skills-client-integration/skills-int-e2e-test/cypress/screenshots/**/*.png
./skills-client-integration/skills-int-e2e-test/cypress/videos/*.mp4
./skills-client-integration/skills-int-e2e-test/cypress/screenshots/**/*.png
@@ -0,0 +1,197 @@
name: Client Libs Backward Compatibility
env:
NODE_VERSION: 26
JAVA_VERSION: 25
on:
push:
paths-ignore:
- 'README.md'
- .github/workflows/skills-service-backward-compat.yml
- .github/workflows/client-libs-backward-compat.yml
workflow_dispatch:
jobs:
get_skills_service_versions:
runs-on: ubuntu-latest
outputs:
services: ${{ steps.generate-matrix.outputs.services }}
versions: ${{ steps.generate-matrix.outputs.versions }}
steps:
- name: Generate Matrix
id: generate-matrix
run: |
TO_EXCLUDE='["3.1.0","3.0.3","3.0.2","3.0.1","3.0.0"]'
RESPONSE=$(curl -s -X GET 'https://api.github.com/repos/NationalSecurityAgency/skills-service/releases')
ALL_TAG_NAMES=$(echo "$RESPONSE" | jq -c '[.[] | .tag_name]')
echo "ALL_TAG_NAMES=$ALL_TAG_NAMES"
FILTERED_TAG_NAMES=$(jq --argjson to_exclude "$TO_EXCLUDE" '. - $to_exclude' <<< "$ALL_TAG_NAMES")
echo "FILTERED_TAG_NAMES=$FILTERED_TAG_NAMES"
TOP_TAGS=$(jq -c '.[0:5]' <<< "$FILTERED_TAG_NAMES")
echo "TOP_TAGS=$TOP_TAGS"
echo ::set-output name=versions::${TOP_TAGS}
build_skills_client_int:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: ${{ env.JAVA_VERSION }}
- name: Print Versions
run: |
mvn --version
java -version
npm -version
node --version
- name: Cache local Maven repository
uses: actions/cache@v6
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache npm
uses: actions/cache@v6
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: setup npm links
run: ./.github/workflows/scripts/setupNpmLinks.sh
- name: build integration test apps
env:
MAVEN_OPTS: -Xmx2048m
run: |
cd ./skills-client-integration
mvn --batch-mode clean install
cd ../
- name: upload service jar
uses: actions/upload-artifact@v7
with:
name: service jar
path: ./skills-client-integration/skills-int-service/target/skills-int-service-*.jar
run_backward_compatibility_tests:
runs-on: ubuntu-latest
services:
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: skillsPassword
POSTGRES_DB: skills
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
needs:
- get_skills_service_versions
- build_skills_client_int
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.get_skills_service_versions.outputs.versions) }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: ${{ env.JAVA_VERSION }}
- name: Print Versions
run: |
mvn --version
java -version
npm -version
node --version
- name: Cache local Maven repository
uses: actions/cache@v6
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache npm
uses: actions/cache@v6
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: download skill-service:${{ matrix.version }}
run: |
mkdir skills-service
cd skills-service
wget https://github.com/NationalSecurityAgency/skills-service/releases/download/${{ matrix.version }}/skills-service-${{ matrix.version }}.jar
ls ./
cd ..
- name: download integration test apps
uses: actions/download-artifact@v8
with:
name: service jar
path: ./skills-client-integration/skills-int-service/target/
- name: start services for cypress tests
run: |
cd skills-client-integration/skills-int-e2e-test
npm install
npm run cyServices:start:skills-service:ci
npm run cyServices:start:integration-apps
cd ../../
- name: Run Cypress tests
run: |
cd skills-client-integration/skills-int-e2e-test
npx cypress run --env skills-service.minVersion=${{ matrix.version }}
cd ../../
- name: upload result artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v7
with:
name: result artifacts for ${{ matrix.version }}
path: |
./skills-service/*.jar
./skills-client-integration/skills-int-service/target/*.jar
./skills-client-integration/skills-int-e2e-test/target/logs/*.out
./skills-client-integration/skills-int-e2e-test/cypress/videos/*.mp4
./skills-client-integration/skills-int-e2e-test/cypress/screenshots/**/*.png
./skills-client-integration/skills-int-e2e-test/logs
./skills-client-integration/skills-int-e2e-test/cypress/videos
./skills-client-integration/skills-int-e2e-test/cypress/screenshots
./skills-client-integration/skills-int-e2e-test/cypress/snapshots/**/**/__diff_output__/*.png
./skills-client-integration/skills-int-e2e-test/cypress/snapshots/**/__diff_output__/*.png
@@ -1,4 +1,4 @@
# Copyright 2020 SkillTree
# Copyright 2025 SkillTree
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2020 SkillTree
# Copyright 2025 SkillTree
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
+1 -1
View File
@@ -9,7 +9,7 @@ PROMETHEUS=${PROMETHEUS:-false}
echo "PWD: "
echo $(pwd)
cd ./skills-client-integration/skills-int-e2e-test/hydra
DC="docker-compose -f quickstart.yml"
DC="docker compose -f quickstart.yml"
if [[ $DB == "mysql" ]]; then
DC+=" -f quickstart-mysql.yml"
fi
+28 -8
View File
@@ -1,4 +1,4 @@
# Copyright 2020 SkillTree
# Copyright 2025 SkillTree
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -17,11 +17,31 @@ set -e
set -o pipefail
echo "------- START: Setup npm links -------"
cd skills-client-integration/skills-int-e2e-test
mvn --batch-mode clean package -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
ls -la target/skills-int-e2e-test-*.jar
du -sh target/*
java --version
java -cp target/skills-int-e2e-test-*.jar -Dloader.main=skills.SetupNpmLinks org.springframework.boot.loader.launch.PropertiesLauncher
cd ../../
cd skills-client-js
echo "------- skills-client-js: npm link -------"
npm link
cd ../skills-client-integration/skills-int-client-js/
echo "------- skills-int-client-js: npm link @skilltree/skills-client-js -------"
npm link @skilltree/skills-client-js
cd ../../skills-client-js
echo "------- skills-client-js: npm install -------"
npm install
npm run build
echo "------- skills-int-client-js: npm install -------"
cd ../skills-client-integration/skills-int-client-js/
npm install
echo "------- validate npm links -------"
if ! npm ls --link --global | grep "skills-client-js"; then
echo "Error: skills-client-js is not properly linked"
exit 1
else
echo "Verified: skills-client-js is properly linked"
fi
echo "------- skills-int-client-js: npm run build -------"
npm run build
echo "------- DONE: Setup npm links -------"
@@ -2,25 +2,89 @@
name: Skills-service Backward Compatibility
#on:
# push:
# paths-ignore:
# - 'README.md'
# pull_request:
# paths-ignore:
# - 'README.md'
env:
NODE_VERSION: 26
JAVA_VERSION: 25
on:
schedule:
- cron: '0 6 * * *'
push:
paths-ignore:
- 'README.md'
pull_request:
paths-ignore:
- 'README.md'
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
test-skill-service-backward-compat:
# The type of runner that the job will run on
build-skills-service:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: |
11
${{ env.JAVA_VERSION }}
- name: Print Versions
run: |
mvn --version
java -version
npm -version
node --version
- name: Cache local Maven repository
uses: actions/cache@v6
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache npm
uses: actions/cache@v6
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Checkout specific branch fo skills-service
uses: actions/checkout@v6
with:
repository: NationalSecurityAgency/skills-service
path: skills-service
- name: build skill-service
run: |
cd skills-service
mvn --batch-mode clean install -DskipTests
cd ..
- name: upload service jar
uses: actions/upload-artifact@v7
with:
name: service jar
path: ./skills-service/service/target/skills-service-*.jar
test-skill-service-backward-compat:
runs-on: ubuntu-latest
needs: [build-skills-service]
strategy:
fail-fast: false
matrix:
skillsJsVersion: [ '3.5.0', '3.6.0', '3.6.1', '3.6.2', '3.6.3']
services:
postgres:
# Docker Hub image
@@ -42,18 +106,18 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- uses: actions/setup-node@v2-beta
- uses: actions/setup-node@v6
with:
node-version: '14'
node-version: ${{ env.NODE_VERSION }}
- uses: actions/setup-java@v3
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: |
11
19
${{ env.JAVA_VERSION }}
- name: Print Versions
run: |
@@ -63,7 +127,7 @@ jobs:
node --version
- name: Cache local Maven repository
uses: actions/cache@v2
uses: actions/cache@v6
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -71,7 +135,7 @@ jobs:
${{ runner.os }}-maven-
- name: Cache npm
uses: actions/cache@v2
uses: actions/cache@v6
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -80,31 +144,99 @@ jobs:
# - name: build skill-service
# run: ./.github/workflows/scripts/getSkillsService.sh
- name: download skill-service
run: |
mkdir skills-service
cd skills-service
curl -s https://api.github.com/repos/NationalSecurityAgency/skills-service/releases/latest | grep browser_download_url | cut -d '"' -f 4 | wget -qi -
ls ./
cd ..
# - name: download skill-service
# run: |
# mkdir skills-service
# cd skills-service
# curl -s https://api.github.com/repos/NationalSecurityAgency/skills-service/releases/latest | grep browser_download_url | cut -d '"' -f 4 | wget -qi -
# ls ./
# cd ..
- name: run backwards compat tests
# - name: Checkout specific branch fo skills-service
# uses: actions/checkout@v6
# with:
# repository: NationalSecurityAgency/skills-service
# path: skills-service
#
# - name: build skill-service
# run: |
# cd skills-service
# mvn --batch-mode clean install -DskipTests
# cp ./service/target/skills-service-*.jar ./
# ls ./
# cd ..
- uses: actions/download-artifact@v8
with:
name: service jar
path: ./skills-service/
- name: build integration test apps
env:
MAVEN_OPTS: -Xmx2048m
run: |
cd ./skills-client-integration/skills-int-client-js
npm install @skilltree/skills-client-js@${{ matrix.skillsJsVersion }} --save-exact
cd ..
mvn --batch-mode clean install
cd ../
- name: start services for cypress tests
run: |
cd skills-client-integration/skills-int-e2e-test
mvn --batch-mode clean package
export NO_COLOR=1
java -jar target/skills-int-e2e-test-*.jar
npm install
ls ../
echo "------"
ls ../../
echo "------"
ls ../../skills-service/
echo "------"
npm run cyServices:start:skills-service:ci
npm run cyServices:start:integration-apps
cd ../../
- name: Run Cypress tests
run: |
cd skills-client-integration/skills-int-e2e-test
npm run cy:run
cd ../../
- name: upload result artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v7
with:
name: result artifacts
name: result artifacts for [${{ matrix.skillsJsVersion }}] version
path: |
./skills-client-integration/skills-int-e2e-test/target/logs/*
./skills-client-integration/skills-int-e2e-test/target/skills-client/skills-client-integration/skills-int-e2e-test/cypress/videos/*.mp4
./skills-client-integration/skills-int-e2e-test/target/skills-client/skills-client-integration/skills-int-e2e-test/cypress/screenshots/**/*.png
./skills-service/*.jar
./skills-client-integration/skills-int-service/target/*.jar
./skills-client-integration/skills-int-e2e-test/target/logs/*.out
./skills-client-integration/skills-int-e2e-test/cypress/videos/*.mp4
./skills-client-integration/skills-int-e2e-test/cypress/screenshots/**/*.png
/home/runner/.npm/_logs/*
./skills-client-integration/skills-int-e2e-test/logs
./skills-client-integration/skills-int-e2e-test/cypress/videos
./skills-client-integration/skills-int-e2e-test/cypress/screenshots
./skills-client-integration/skills-int-e2e-test/cypress/snapshots/**/**/__diff_output__/*.png
./skills-client-integration/skills-int-e2e-test/cypress/snapshots/**/__diff_output__/*.png
# - name: run backwards compat tests
# run: |
# cd skills-client-integration/skills-int-e2e-test
# mvn --batch-mode clean package
# export NO_COLOR=1
# java -jar target/skills-int-e2e-test-*.jar
# cd ../../
#
# - name: upload result artifacts
# if: ${{ always() }}
# uses: actions/upload-artifact@v7
# with:
# name: result artifacts
# path: |
# ./skills-client-integration/skills-int-e2e-test/target/logs/*
# ./skills-client-integration/skills-int-e2e-test/target/skills-client/skills-client-integration/skills-int-e2e-test/cypress/videos/*.mp4
# ./skills-client-integration/skills-int-e2e-test/target/skills-client/skills-client-integration/skills-int-e2e-test/cypress/screenshots/**/*.png
# ./skills-client-integration/skills-int-e2e-test/cypress/videos/*.mp4
# ./skills-client-integration/skills-int-e2e-test/cypress/screenshots/**/*.png
# /home/runner/.npm/_logs/*
+3
View File
@@ -15,3 +15,6 @@
/skills-client-ng/package-lock.json
/skills-client-ng/dist/
/skills-client-ng/projects/skilltree/skills-client-ng/src/version.js
/skills-client-integration/skills-int-e2e-test/cypress/downloads/*
AGENTS.md
+11 -5
View File
@@ -1,10 +1,16 @@
# SkillTree Client Libraries
<p>
<img src="https://img.shields.io/npm/d18m/%40skilltree%2Fskills-client-js" alt="npm downloads">
<img src="https://img.shields.io/npm/dw/%40skilltree%2Fskills-client-js" alt="npm weekly downloads">
<img src="https://img.shields.io/npm/l/%40skilltree%2Fskills-client-js" alt="License">
<img src="https://img.shields.io/npm/v/%40skilltree%2Fskills-client-js" alt="Latest Version">
<img alt="npm bundle size" src="https://img.shields.io/bundlephobia/minzip/%40skilltree%2Fskills-client-js">
</p>
SkillTree is an innovative approach to implementing application training. SkillTree skills-client project is an assembly of
client libraries that facilitate rapid integration with the SkillTree service.
SkillTree is an innovative approach to implementing application training. SkillTree's ``skills-client-js`` project facilitates rapid integration with the SkillTree service.
To learn about the SkillTree platform please visit our [Official Documentation](https://code.nsa.gov/skills-docs/).
These pages provide in-depth guidance on the installation, usage and contribution.
To learn about the SkillTree platform please visit our [Official Documentation](https://skilltreeplatform.dev/).
These pages provide in-depth guidance on the installation, usage and contribution.
## Workflow Status
@@ -16,7 +22,7 @@ These pages provide in-depth guidance on the installation, usage and contributio
[![Skills-service Backward Compatibility](https://github.com/NationalSecurityAgency/skills-client/actions/workflows/skills-service-backward-compat.yml/badge.svg)](https://github.com/NationalSecurityAgency/skills-client/actions/workflows/skills-service-backward-compat.yml)
[![Client Libs Backward Compatibility](https://github.com/NationalSecurityAgency/skills-client/actions/workflows/client-libs-backward-compat.yml/badge.svg)](https://github.com/NationalSecurityAgency/skills-client/actions/workflows/client-libs-backward-compat.yml)
[![Client Libs Backward Compatibility](https://github.com/NationalSecurityAgency/skills-client/actions/workflows/client-libs-backwards-compat.yml/badge.svg)](https://github.com/NationalSecurityAgency/skills-client/actions/workflows/client-libs-backwards-compat.yml)
@@ -1,4 +1,4 @@
Copyright 2020 SkillTree
Copyright 2025 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
+2 -5
View File
@@ -7,13 +7,13 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.4</version>
<version>4.1.2</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>skills</groupId>
<artifactId>skills-client-integration</artifactId>
<packaging>pom</packaging>
<version>3.5.0-SNAPSHOT</version>
<version>3.6.5-SNAPSHOT</version>
<licenses>
<license>
@@ -31,9 +31,6 @@
<properties>
<!--suppress UnresolvedMavenProperty -->
<nexusServer>${nexus.url}</nexusServer>
<frontend-maven-plugin.version>1.10.3</frontend-maven-plugin.version>
<node.version>v14.15.0</node.version>
<java.version>19</java.version>
</properties>
</project>
@@ -1,5 +1,5 @@
<!--
Copyright 2020 SkillTree
Copyright 2025 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -17,14 +17,14 @@ limitations under the License.
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Skills Examples - Native Javascript</title>
<title>Skill Client Test</title>
<link rel="icon" type="image/x-icon" href="./skilltree.ico">
<link rel="stylesheet" type="text/css" href="./assets/app.css"/>
<link rel="stylesheet" type="text/css" href="./assets/js/bootstrap/dist/css/bootstrap.css">
<script type="text/javascript" src="./assets/js/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="./assets/js/axios/dist/axios.min.js"></script>
<script type="text/javascript" src="./assets/js/js-beautify/js/lib/beautify.js"></script>
<script type="text/javascript" src="./assets/js/bootstrap/dist/js/bootstrap.bundle.js"></script>
<script type="text/javascript" src="assets/js/@skilltree/skills-client-js/dist/skills-client-js.umd.min.js"></script>
@@ -32,15 +32,19 @@ limitations under the License.
<script type="text/javascript">
const params = new URLSearchParams(window.location.search);
const isSummaryOnly = params.get('isSummaryOnly') ? JSON.parse(params.get('isSummaryOnly')) : false;
const internalBackButton = params.get('internalBackButton') ? JSON.parse(params.get('internalBackButton')) : false;
let clientDisplay = null;
const options = {
autoScrollStrategy: 'top-of-page',
isSummaryOnly,
internalBackButton,
};
const internalBackButtonParam = 'internalBackButton'
if (params.get(internalBackButtonParam)) {
options.internalBackButton = JSON.parse(params.get(internalBackButtonParam))
}
const themes = {
default: {
name: 'Bright (default)',
@@ -155,32 +159,38 @@ limitations under the License.
<div id="app">
<div>
<div>
<nav class="navbar navbar-dark bg-info">
<a href="#" class="navbar-brand">Native Javascript Integration Examples</a>
<ul class="navbar-nav flex-row mr-auto">
<li class="nav-item pr-3">
<a class="nav-link" href="index.html" data-cy="reportSkillsLink">Report Skill Events</a>
</li>
<li class="nav-item active pr-3">
<a class="nav-link" href="javascript:void(0)" data-cy="userDisplayLink">User Display</a>
</li>
</ul>
</nav>
</div>
<nav class="navbar navbar-expand-lg navbar-light" style="background-color: #e3f2fd;">
<div class="container-fluid">
<a href="#" class="navbar-brand">Client Test</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" aria-current="page" href="index.html" data-cy="reportSkillsLink">Report Skill Events</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="javascript:void(0)" data-cy="userDisplayLink">User Display</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container-fluid mt-3">
<div class="container">
<div class="">
<div class="form-row align-items-center">
<div class="d-inline dropdown">
<button class="btn btn-outline-primary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Change Theme
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="javascript:void(0)" id="default-theme-dropdown-item" onclick="applyTheme(themes.default)">Bright (Default)</a>
<a class="dropdown-item" href="javascript:void(0)" id="darkblue-theme-dropdown-item" onclick="applyTheme(themes.darkBlue)">Dark Blue</a>
</div>
</ul>
</div>
<div class="d-inline custom-control custom-checkbox mx-2">
@@ -192,26 +202,19 @@ limitations under the License.
<label class="custom-control-label" for="internalBackButtonControl">Internal Back Button</label>
</div>
<button class="btn btn-outline-primary" type="button" data-cy="navigateButton" onclick="navigate()">
<button class="btn btn-primary" type="button" data-cy="navigateButton" onclick="navigate()">
Navigate
</button>
</div>
<div>
<div class="my-3">
<span id="skillsDisplayPath" data-cy="skillsDisplayPath"></span>
</div>
<div
style="min-height: 860px">
<div id="skills-client-display" />
<div id="skills-client-display"></div>
</div>
</div>
</div>
<footer class="text-muted bg-light py-5">
<div class="container">
<p>Native Javascript Examples Guide</p>
<p></p>
</div>
</footer>
</div>
</div>
@@ -220,5 +223,5 @@ limitations under the License.
<script type="text/javascript">
document.getElementById("displayTypeControl").checked = isSummaryOnly;
document.getElementById("internalBackButtonControl").checked = internalBackButton;
document.getElementById("internalBackButtonControl").checked = params.get(internalBackButtonParam) ? JSON.parse(params.get(internalBackButtonParam)) : false
</script>
@@ -1,5 +1,5 @@
<!--
Copyright 2020 SkillTree
Copyright 2025 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -17,14 +17,14 @@ limitations under the License.
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Skills Examples - Native Javascript</title>
<title>Skill Client Test</title>
<link rel="icon" type="image/x-icon" href="./skilltree.ico">
<link rel="stylesheet" type="text/css" href="./assets/app.css"/>
<link rel="stylesheet" type="text/css" href="./assets/js/bootstrap/dist/css/bootstrap.css">
<script type="text/javascript" src="./assets/js/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="./assets/js/axios/dist/axios.min.js"></script>
<script type="text/javascript" src="./assets/js/js-beautify/js/lib/beautify.js"></script>
<script type="text/javascript" src="./assets/js/bootstrap/dist/js/bootstrap.bundle.js"></script>
<script type="text/javascript" src="assets/js/@skilltree/skills-client-js/dist/skills-client-js.umd.min.js"></script>
@@ -53,37 +53,12 @@ limitations under the License.
<body>
<div id="app">
<div>
<div>
<nav class="navbar navbar-dark bg-info">
<a href="#" class="navbar-brand">Native Javascript Integration Examples</a>
<ul class="navbar-nav flex-row mr-auto">
<li class="nav-item pr-3">
<a class="nav-link" href="index.html" data-cy="reportSkillsLink">Report Skill Events</a>
</li>
<li class="nav-item active pr-3">
<a class="nav-link" href="javascript:void(0)" data-cy="userDisplayLink">User Display</a>
</li>
</ul>
</nav>
</div>
<div class="container-fluid mt-3">
<div class="container">
<div
style="min-height: 860px">
<div id="skills-client-display" />
</div>
<div class="container-fluid mt-3">
<div class="container">
<div style="min-height: 860px">
<div id="skills-client-display"></div>
</div>
</div>
<footer class="text-muted bg-light py-5">
<div class="container">
<p>Native Javascript Examples Guide</p>
<p></p>
</div>
</footer>
</div>
</div>
@@ -0,0 +1,73 @@
<!--
Copyright 2025 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Skill Client Test</title>
<link rel="icon" type="image/x-icon" href="./skilltree.ico">
<link rel="stylesheet" type="text/css" href="./assets/app.css"/>
<link rel="stylesheet" type="text/css" href="./assets/js/bootstrap/dist/css/bootstrap.css">
<script type="text/javascript" src="./assets/js/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="./assets/js/axios/dist/axios.min.js"></script>
<script type="text/javascript" src="./assets/js/bootstrap/dist/js/bootstrap.bundle.js"></script>
<script type="module">
import { SkillsReporter, SkillsConfiguration, SkillsLevelJS, SkillsDisplayJS, Logger } from './assets/js/@skilltree/skills-client-js/dist/skills-client-js.esm.min.js'
axios.get("/api/config")
.then((result) => {
SkillsConfiguration.configure({...result.data, enabled: false});
});
document.querySelector('#reportSkillBtn').addEventListener('click', () => {
SkillsReporter.reportSkill('someId')
});
SkillsConfiguration.afterConfigure().then(() => {
const initializeSkillsDisplay = () => {
const clientDisplay = new SkillsDisplayJS();
clientDisplay.attachTo(document.querySelector('#skills-client-display'));
};
if (document.readyState === "complete"
|| document.readyState === "loaded"
|| document.readyState === "interactive") {
initializeSkillsDisplay();
} else {
document.addEventListener("DOMContentLoaded", initializeSkillsDisplay);
}
});
</script>
</head>
<body>
<div id="app">
<button
id="reportSkillBtn"
data-cy="reportSkillButton"
class="btn btn-outline-primary">
Report Skill
</button>
<div data-cy="levelComponentRes">Level: [<span id="skillLevel"/>]</div>
<div data-cy="skillsDisplayRes">Skills Display: [<div id="skills-client-display"></div>]</div>
</div>
</body>
</html>
@@ -1,5 +1,5 @@
<!--
Copyright 2020 SkillTree
Copyright 2025 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -17,13 +17,15 @@ limitations under the License.
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Skills Examples - Native Javascript</title>
<title>Skill Client Test</title>
<link rel="icon" type="image/x-icon" href="./skilltree.ico">
<link rel="stylesheet" type="text/css" href="./assets/app.css"/>
<link rel="stylesheet" type="text/css" href="./assets/js/bootstrap/dist/css/bootstrap.css">
<script type="text/javascript" src="./assets/js/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="./assets/js/axios/dist/axios.min.js"></script>
<script type="text/javascript" src="./assets/js/js-beautify/js/lib/beautify.js"></script>
<script type="text/javascript" src="./assets/js/bootstrap/dist/js/bootstrap.bundle.js"></script>
<script type="module">
import { SkillsReporter, SkillsConfiguration, SkillsLevelJS, Logger } from './assets/js/@skilltree/skills-client-js/dist/skills-client-js.esm.min.js'
@@ -32,43 +34,43 @@ limitations under the License.
.then((result) => {
SkillsConfiguration.configure(result.data);
});
SkillsReporter.addSuccessHandler((result) => {
document.querySelector('#global-event-result-container-js').innerHTML = JSON.stringify(result, null, 2);
});
SkillsReporter.addErrorHandler((result) => {
document.querySelector('#global-event-result-container-js').innerHTML = JSON.stringify(result, null, 2);
});
const reportSkill = (skillId) => {
SkillsReporter.reportSkill(skillId)
.then((response) => {
document.querySelector('#report-result-container').innerHTML = JSON.stringify(response, null, 2);
}).catch((err) => {
document.querySelector('#report-result-container').innerHTML = JSON.stringify(err, null, 2);
});
};
document.querySelector('#exampleDirectiveClickEvent').addEventListener('click', () => {
var skillId = document.getElementById('skillId').value;
reportSkill(skillId);
});
const toggleAllEvents = () => {
const notifyIfSkillNotApplied = document.querySelector('#all-events-check').checked
SkillsReporter.configure( { notifyIfSkillNotApplied });
}
document.querySelector('#all-events-check').addEventListener('click', toggleAllEvents);
toggleAllEvents();
SkillsConfiguration.afterConfigure()
.then(() => {
if (window.Cypress) {
window.skillsLogger = Logger;
}
const skillLevel = new SkillsLevelJS();
skillLevel.attachTo('#skillLevel')
});
.then(() => {
SkillsReporter.addSuccessHandler((result) => {
document.querySelector('#global-event-result-container-js').innerHTML = JSON.stringify(result, null, 2);
});
SkillsReporter.addErrorHandler((result) => {
document.querySelector('#global-event-result-container-js').innerHTML = JSON.stringify(result, null, 2);
});
const reportSkill = (skillId) => {
SkillsReporter.reportSkill(skillId)
.then((response) => {
document.querySelector('#report-result-container').innerHTML = JSON.stringify(response, null, 2);
}).catch((err) => {
document.querySelector('#report-result-container').innerHTML = JSON.stringify(err, null, 2);
});
};
document.querySelector('#exampleDirectiveClickEvent').addEventListener('click', () => {
var skillId = document.getElementById('skillId').value;
reportSkill(skillId);
});
const toggleAllEvents = () => {
const notifyIfSkillNotApplied = document.querySelector('#all-events-check').checked
SkillsReporter.configure({notifyIfSkillNotApplied});
}
document.querySelector('#all-events-check').addEventListener('click', toggleAllEvents);
toggleAllEvents();
if (window.Cypress) {
window.skillsLogger = Logger;
}
const skillLevel = new SkillsLevelJS();
skillLevel.attachTo('#skillLevel')
});
</script>
</head>
@@ -77,20 +79,26 @@ limitations under the License.
<div id="app">
<div>
<div>
<nav class="navbar navbar-dark bg-info">
<a href="#" class="navbar-brand">Native Javascript Integration Examples</a>
<ul class="navbar-nav flex-row mr-auto">
<li class="nav-item active pr-3">
<a class="nav-link" href="javascript:void(0)" data-cy="reportSkillsLink">Report Skill Events</a>
</li>
<li class="nav-item pr-3">
<a class="nav-link" href="clientDisplay.html" data-cy="userDisplayLink">User Display</a>
</li>
</ul>
<button type="button" class="btn btn-primary">
<span id="skillLevel"/>
</button>
<nav class="navbar navbar-expand-lg navbar-light" style="background-color: #e3f2fd;">
<div class="container-fluid">
<a href="#" class="navbar-brand">Client Test</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="javascript:void(0)" data-cy="reportSkillsLink">Report Skill Events</a>
</li>
<li class="nav-item">
<a class="nav-link" href="clientDisplay.html" data-cy="userDisplayLink">User Display</a>
</li>
</ul>
<button type="button" class="btn btn-primary">
<span id="skillLevel"/>
</button>
</div>
</div>
</nav>
</div>
@@ -140,13 +148,6 @@ limitations under the License.
</div>
</div>
<footer class="text-muted bg-light py-5">
<div class="container">
<p>Native Javascript Examples Guide</p>
<p></p>
</div>
</footer>
</div>
</div>
Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

@@ -1,5 +1,5 @@
/*
* Copyright 2020 SkillTree
* Copyright 2025 SkillTree
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
{
"name": "skills-int-client-js",
"version": "3.5.0",
"version": "3.6.5",
"license": "Apache-2.0",
"description": "SkillTree Client Lib Integration Tests - Native JS",
"main": "index.js",
@@ -12,20 +12,19 @@
"licenseHeaderCheck": "license-check-and-add check -f '../license-add/license-add-config.json'",
"licenseHeaderAdd": "license-check-and-add add -f ../license-add/license-add-config.json",
"licenseCheck": "npm run licenseHeaderCheck && npm run licenseDepCheck",
"build": "npm run licenseCheck && echo nothingelsetodo"
"build": "npm install && npm run licenseCheck && echo nothingelsetodo"
},
"author": "SkillTree Team",
"dependencies": {
"@skilltree/skills-client-js": "3.5.0",
"axios": "1.6.0",
"bootstrap": "4.5.2",
"jquery": "3.5.1",
"js-beautify": "1.13.0"
"@skilltree/skills-client-js": "3.6.5",
"axios": "1.20.0",
"bootstrap": "5.3.8",
"jquery": "4.0.0"
},
"devDependencies": {
"fs-extra": "8.1.0",
"license-check-and-add": "3.0.4",
"fs-extra": "11.4.0",
"license-check-and-add": "4.0.5",
"license-checker": "25.0.1",
"live-server": "1.2.1"
"live-server": "1.2.2"
}
}
}
@@ -7,7 +7,7 @@
<parent>
<groupId>skills</groupId>
<artifactId>skills-client-integration</artifactId>
<version>3.5.0-SNAPSHOT</version>
<version>3.6.5-SNAPSHOT</version>
</parent>
<artifactId>skills-int-client-js</artifactId>
@@ -19,55 +19,26 @@
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>${frontend-maven-plugin.version}</version>
<configuration>
<installDirectory>target</installDirectory>
</configuration>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.5.1</version>
<executions>
<execution>
<id>install node and npm</id>
<id>exec-npm-install</id>
<phase>install</phase>
<goals>
<goal>install-node-and-npm</goal>
<goal>exec</goal>
</goals>
<configuration>
<nodeVersion>${node.version}</nodeVersion>
<executable>npm</executable>
<arguments>
<argument>run</argument>
<argument>build</argument>
</arguments>
<workingDirectory>${basedir}</workingDirectory>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>--unsafe-perm install</arguments>
</configuration>
</execution>
<execution>
<id>npm run build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
<!--TODO: uncomment when we have at least 1 unit test-->
<!--<execution>-->
<!--<id>npm run test</id>-->
<!--<goals>-->
<!--<goal>npm</goal>-->
<!--</goals>-->
<!--<phase>test</phase>-->
<!--<configuration>-->
<!--<arguments>run unit</arguments>-->
<!--</configuration>-->
<!--</execution>-->
</executions>
</plugin>
</plugins>
</build>
@@ -1,18 +0,0 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support
# You can see what browsers were selected by your queries by running:
# npx browserslist
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 9-10 # Angular support for IE 9-10 has been deprecated and will be removed as of Angular v11. To opt-in, remove the 'not' prefix on this line.
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
@@ -1,16 +0,0 @@
# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.ts]
quote_type = single
[*.md]
max_line_length = off
trim_trailing_whitespace = false
@@ -1,49 +0,0 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out
# dependencies
/node_modules
# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db
package-lock.json
projects/skilltree/skills-client-ng/src/version.js
@@ -1 +0,0 @@
package-lock=false
@@ -1,42 +0,0 @@
<!---
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
# SkillsIntClientNg
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.0.2.
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
@@ -1,129 +0,0 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"skills-int-client-ng": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"allowedCommonJsDependencies": [
"axios",
"highlight.js",
"lodash/debounce",
"js-beautify"
],
"preserveSymlinks": true,
"outputPath": "dist/skills-int-client-ng",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css",
"./node_modules/bootstrap/dist/css/bootstrap.css",
"./node_modules/highlight.js/styles/github.css"
],
"scripts": [
"./node_modules/jquery/dist/jquery.min.js",
"./node_modules/bootstrap/dist/js/bootstrap.min.js"
]
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "skills-int-client-ng:build"
},
"configurations": {
"production": {
"browserTarget": "skills-int-client-ng:build:production"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "skills-int-client-ng:serve"
},
"configurations": {
"production": {
"devServerTarget": "skills-int-client-ng:serve:production"
}
}
}
}
}},
"defaultProject": "skills-int-client-ng"
}
@@ -1,51 +0,0 @@
/*
* Copyright 2020 SkillTree
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// @ts-check
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter');
/**
* @type { import("protractor").Config }
*/
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
capabilities: {
browserName: 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.json')
});
jasmine.getEnv().addReporter(new SpecReporter({
spec: {
displayStacktrace: StacktraceOption.PRETTY
}
}));
}
};
@@ -1,38 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('skills-int-client-ng app is running!');
});
afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
});
@@ -1,26 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo(): Promise<unknown> {
return browser.get(browser.baseUrl) as Promise<unknown>;
}
getTitleText(): Promise<string> {
return element(by.css('app-root .content span')).getText() as Promise<string>;
}
}
@@ -1,14 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"module": "commonjs",
"target": "es2018",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}
@@ -1,47 +0,0 @@
/*
* Copyright 2020 SkillTree
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/skills-int-client-ng'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};
@@ -1,13 +0,0 @@
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@@ -1,23 +0,0 @@
{
"ignore": [ ".git", "coverage", ".*/**", ".*", "*.iml", "tsconfig.*", "skills.d.ts", "angular.json", "pom.xml"],
"license": "license-add/LICENSE-HEADER.txt",
"licenseFormats": {
"js": {
"prepend": "/*",
"append": " */",
"eachLine": {
"prepend": " * "
}
},
"dotfile": {
"eachLine": {
"prepend": "# "
}
},
"md": {
"prepend": "<!---",
"append": " -->"
}
},
"trailingWhitespace": "TRIM"
}
@@ -1,29 +0,0 @@
/*
* Copyright 2020 SkillTree
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
module.exports = {
packages: {
'@skilltree/skills-client-ng': {
ignorableDeepImportMatchers: [
/lodash\//
]
},
'ngx-highlightjs': {
ignorableDeepImportMatchers: [
/highlight/
]
},
}
};
@@ -1,67 +0,0 @@
{
"name": "skills-int-client-ng",
"version": "3.6.0",
"license": "Apache-2.0",
"description": "SkillTree Client Lib - Angular",
"author": "SkillTree Team",
"scripts": {
"licenseDepCheck2": "license-checker --production --onlyAllow='MIT;ISC;Apache-2.0;0BSD' --summary",
"licenseDepCheck": "license-checker --production --onlyAllow='MIT;ISC;BSD-3-Clause;Apache-2.0;0BSD;CC-BY-4.0' --summary",
"licenseHeaderCheck": "license-check-and-add check -f '../license-add/license-add-config.json'",
"licenseHeaderAdd": "license-check-and-add add -f ../license-add/license-add-config.json",
"licenseCheck": "npm run licenseHeaderCheck && npm run licenseDepCheck ",
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json",
"serve": "npm run start",
"build": "npm run licenseCheck && ng build --configuration production --deploy-url=/angular/",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"dependencies": {
"@angular/animations": "14.3.0",
"@angular/common": "14.3.0",
"@angular/compiler": "14.3.0",
"@angular/core": "14.3.0",
"@angular/forms": "14.3.0",
"@angular/platform-browser": "14.3.0",
"@angular/platform-browser-dynamic": "14.3.0",
"@angular/router": "14.3.0",
"@ng-bootstrap/ng-bootstrap": "13.0.0",
"@popperjs/core": "2.11.8",
"@skilltree/skills-client-ng": "3.6.0",
"@types/js-beautify": "1.11.0",
"axios": "1.6.0",
"bootstrap": "4.5.3",
"highlight.js": "11.3.1",
"jquery": "3.5.1",
"js-beautify": "1.13.0",
"ngx-highlightjs": "4.1.2",
"popper.js": "^1.16.1",
"rxjs": "6.6.3",
"tslib": "2.0.3",
"zone.js": "0.12.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "14.2.11",
"@angular/cli": "14.2.11",
"@angular/compiler-cli": "14.3.0",
"@types/jasmine": "3.6.0",
"@types/jasminewd2": "2.0.8",
"@types/node": "14.11.8",
"codelyzer": "6.0.1",
"jasmine-core": "3.6.0",
"jasmine-spec-reporter": "6.0.0",
"karma": "6.4.1",
"karma-chrome-launcher": "3.1.0",
"karma-coverage-istanbul-reporter": "3.0.3",
"karma-jasmine": "4.0.1",
"karma-jasmine-html-reporter": "1.5.4",
"license-check-and-add": "3.0.4",
"license-checker": "25.0.1",
"protractor": "7.0.0",
"ts-node": "9.0.0",
"tslint": "6.1.3",
"typescript": "4.6.2"
}
}
@@ -1,75 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>skills</groupId>
<artifactId>skills-client-integration</artifactId>
<version>3.5.0-SNAPSHOT</version>
</parent>
<artifactId>skills-int-client-ng</artifactId>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>${frontend-maven-plugin.version}</version>
<configuration>
<installDirectory>target</installDirectory>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>${node.version}</nodeVersion>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>npm run build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
<!--TODO: uncomment when we have at least 1 unit test-->
<!--<execution>-->
<!--<id>npm run test</id>-->
<!--<goals>-->
<!--<goal>npm</goal>-->
<!--</goals>-->
<!--<phase>test</phase>-->
<!--<configuration>-->
<!--<arguments>run unit</arguments>-->
<!--</configuration>-->
<!--</execution>-->
</executions>
</plugin>
</plugins>
</build>
</project>
@@ -1,7 +0,0 @@
{
"/api":
{
"target": "http://localhost:8090",
"secure": false
}
}
@@ -1,39 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ReportSkillsComponent } from './components/report-skills/report-skills.component';
import { SkillsDisplayComponent } from './components/skills-display/skills-display.component';
const routes: Routes = [{
path: '',
redirectTo: 'reportSkills',
pathMatch: 'full'
}, {
path: 'angular/reportSkills',
component: ReportSkillsComponent
}, {
path: 'angular/showSkills',
component: SkillsDisplayComponent
}
];
@NgModule({
imports: [RouterModule.forRoot(routes, { anchorScrolling: 'enabled'})],
exports: [RouterModule]
})
export class AppRoutingModule { }
@@ -1,15 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@@ -1,21 +0,0 @@
<!--
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div>
<app-navigation></app-navigation>
<div class="container-fluid mt-3">
<router-outlet></router-outlet>
</div>
</div>
@@ -1,50 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { TestBed, async } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule
],
declarations: [
AppComponent
],
}).compileComponents();
}));
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});
it(`should have as title 'skills-int-client-ng'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('skills-int-client-ng');
});
it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement;
expect(compiled.querySelector('.content span').textContent).toContain('skills-int-client-ng app is running!');
});
});
@@ -1,25 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'skills-int-client-ng';
}
@@ -1,72 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { FormsModule } from '@angular/forms';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { HighlightModule, HIGHLIGHT_OPTIONS } from 'ngx-highlightjs';
import { SkillsLevelModule, SkillsDisplayModule, SkilltreeModule } from '@skilltree/skills-client-ng'
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { NavigationComponent } from './components/navigation/navigation.component';
import { CodeExampleLayoutComponent } from './components/report-skills/code-example/code-example-layout.component';
import { ButtonCodeExampleComponent } from './components/report-skills/code-example/button-code-example.component';
import { InputCodeExampleComponent } from './components/report-skills/code-example/input-code-example.component';
import { AnySkillCodeExampleComponent } from './components/report-skills/code-example/anyskill-code-example.component';
import { ExampleService } from './components/report-skills/code-example/example.service';
import { ReportSkillsComponent } from './components/report-skills/report-skills.component';
import { SkillsDisplayComponent } from './components/skills-display/skills-display.component';
import { PlaceholderDirective } from './directives/placeholder.directive';
@NgModule({
declarations: [
AppComponent,
ReportSkillsComponent,
NavigationComponent,
SkillsDisplayComponent,
CodeExampleLayoutComponent,
ButtonCodeExampleComponent,
AnySkillCodeExampleComponent,
InputCodeExampleComponent,
PlaceholderDirective
],
imports: [
BrowserModule,
AppRoutingModule,
NgbModule,
FormsModule,
HighlightModule,
SkillsLevelModule,
SkilltreeModule,
SkillsDisplayModule,
RouterModule.forRoot([
{ path: '', component: ReportSkillsComponent },
])
],
providers: [
ExampleService,
{
provide: HIGHLIGHT_OPTIONS,
useValue: {
fullLibraryLoader: () => import('highlight.js'),
}
}
],
bootstrap: [AppComponent]
})
export class AppModule { }
@@ -1,15 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@@ -1,35 +0,0 @@
<!--
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div>
<div>
<nav class="navbar navbar-dark bg-info">
<a href="/angular/reportSkills" class="navbar-brand">Angular Integration Examples</a>
<ul class="navbar-nav flex-row mr-auto">
<li [routerLinkActive]="['active']" class="nav-item active pr-3">
<a class="nav-link" routerLink="/angular/reportSkills">Report Skill Events</a>
</li>
<li [routerLinkActive]="['active']" class="nav-item pr-3">
<a class="nav-link" routerLink="/angular/showSkills">User Display</a>
</li>
</ul>
<button type="button" class="btn btn-primary">
<span id="skillLevel"></span>
<skills-level></skills-level>
</button>
</nav>
</div>
</div>
@@ -1,40 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { NavigationComponent } from './navigation.component';
describe('NavigationComponent', () => {
let component: NavigationComponent;
let fixture: ComponentFixture<NavigationComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ NavigationComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(NavigationComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -1,32 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
@Component({
selector: 'app-navigation',
templateUrl: './navigation.component.html',
styleUrls: ['./navigation.component.css']
})
export class NavigationComponent implements OnInit {
constructor(public route: ActivatedRoute) {
}
ngOnInit(): void {
}
}
@@ -1,15 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@@ -1,22 +0,0 @@
<!--
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div data-cy="anySkillDropDown" ngbDropdown class="d-inline-block mx-2">
<button data-cy="anySkillDropDownButton" class="btn btn-outline-primary" id="dropdownBasic1" ngbDropdownToggle>{{skillId}}</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<button data-cy="anySkillDropDownItemButton" ngbDropdownItem *ngFor="let selectedSkill of available" (click)="setSelectedSkill(selectedSkill)">{{selectedSkill}}</button>
</div>
</div>
<button class="btn btn-outline-primary" [disabled]="!hasSelectedSkill()" (click)="reportSkill()">Report Skill</button>
@@ -1,73 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import axios from 'axios';
import { Example } from './example';
import { SkillsReporter } from '@skilltree/skills-client-ng';
@Component({
selector: 'app-anyskill-code-example',
templateUrl: './anyskill-code-example.component.html',
styleUrls: ['./anyskill-code-example.component.css']
})
export class AnySkillCodeExampleComponent implements OnInit {
@Input() example: Example
placeholder: string = 'Select a skill id';
skillId: string;
available: string[] = [''];
@Output() skillReportSuccess = new EventEmitter<string>();
constructor() {
}
ngOnInit(): void {
this.skillId = this.placeholder;
axios.get("/api/skills")
.then((result) => {
this.available = result.data as string[];
});
}
hasSelectedSkill() {
return this.skillId && this.skillId !== this.placeholder;
}
setSelectedSkill(selectedSkill: string) {
this.skillId = selectedSkill;
}
reportSkill() {
SkillsReporter.reportSkill(this.skillId)
.then((res) => {
this.skillReportSuccess.emit(res);
})
.catch((res) => {
this.skillReportSuccess.emit(res);
});
}
getSampleCode() {
let sampleCode = `SkillsReporter.reportSkill(this.skill)
.then((res) => {
this.reportResult = res;
});`;
sampleCode = 'SkillsReporter.reportSkill(this.skill)\n .then((res) => {\n this.reportResult = res;\n \});';
return sampleCode;
}
}
@@ -1,15 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@@ -1,16 +0,0 @@
<!--
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<button class="btn btn-outline-primary" [skilltree]="skillId" (skills-report-success)="onReporterResponse($event)" (skills-report-error)="onReporterResponse($event)" >Report Skill</button>
@@ -1,50 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { Example } from './example';
@Component({
selector: 'app-button-code-example',
templateUrl: './button-code-example.component.html',
styleUrls: ['./button-code-example.component.css']
})
export class ButtonCodeExampleComponent implements OnInit {
@Input() example: Example
skillId: string
@Output() skillReportSuccess = new EventEmitter<string>();
constructor() {
}
ngOnInit(): void {
this.skillId = this.example.skillId;
}
onReporterResponse(event) {
this.skillReportSuccess.emit(event.detail)
}
getSampleCode() {
let sampleCode = `<button \n [skilltree]="\'${this.example.skillId}\'" \n (skills-report-success)="onReporterResponse($event)"`;
if (this.example.handleError) {
sampleCode += '\n (skills-report-error)="onReporterError($event)"';
}
sampleCode += '>\n Report Skill\n</button>'
return sampleCode
}
}
@@ -1,15 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@@ -1,33 +0,0 @@
<!--
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div>
<h5 class="text-info"><strong>{{ title }}</strong></h5>
<div class="card card-body bg-light">
<pre><code [highlight]="sampleCode" [languages]="['html', 'javascript']"></code></pre>
</div>
<div class="card card-body mt-3" [id]="formatId(title)">
<div id="exampleDirectiveClickEvent">
<div class="code-example">
<ng-template appPlaceholder></ng-template>
</div>
</div>
<hr>
<div class="text-primary">Result:</div>
<div class="border rounded p-3 bg-light">
<pre>{{ reportResult }}</pre>
</div>
</div>
</div>
@@ -1,63 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { Component, OnInit, AfterViewInit, Input, ViewChild, ComponentFactoryResolver } from '@angular/core';
import { PlaceholderDirective } from 'src/app/directives/placeholder.directive';
import { Example } from './example';
@Component({
selector: 'app-code-example-layout',
templateUrl: './code-example-layout.component.html',
styleUrls: ['./code-example-layout.component.css']
})
export class CodeExampleLayoutComponent implements OnInit, AfterViewInit {
@ViewChild(PlaceholderDirective) codeExampleHost: PlaceholderDirective;
@Input() example: Example;
skillId: string;
title: string;
sampleCode: string;
reportResult: string = "";
constructor(private componentFactoryResolver: ComponentFactoryResolver) {
}
formatId(title: string) {
return title.replace(/ /gi,'').replace(/-/g,'');
}
ngOnInit(): void {
this.skillId = this.example.skillId;
this.title = this.example.title;
}
ngAfterViewInit(): void {
setTimeout(() => {
this.viewLoaded();
});
}
viewLoaded() {
const componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.example.component);
const viewContainerRef = this.codeExampleHost.viewContainerRef;
viewContainerRef.clear();
const componentRef = viewContainerRef.createComponent(componentFactory);
componentRef.instance.example = this.example;
this.sampleCode = componentRef.instance.getSampleCode();
componentRef.instance.skillReportSuccess.subscribe(val => this.reportResult = JSON.stringify(val, null, ' '));
}
}
@@ -1,57 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { Injectable } from '@angular/core';
import { Example } from './example'
import { ButtonCodeExampleComponent } from './button-code-example.component';
import { InputCodeExampleComponent } from './input-code-example.component';
import { AnySkillCodeExampleComponent } from './anyskill-code-example.component';
@Injectable()
export class ExampleService {
getExamples() {
return [
new Example(
ButtonCodeExampleComponent,
'Skills Directive - Click Event',
'IronMan',
),
new Example(
InputCodeExampleComponent,
'Skills Directive - Input Event',
'Thor',
),
new Example(
ButtonCodeExampleComponent,
'Skills Directive - Error with Button',
'DoesNotExist',
true
),
new Example(
InputCodeExampleComponent,
'Skills Directive - Error with Input',
'DoesNotExist',
true
),
new Example(
AnySkillCodeExampleComponent,
'Pure JS - Report Any Skill',
'',
true
)
];
}
}
@@ -1,25 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { Type } from "@angular/core";
export class Example {
constructor(
public component: Type<any>,
public title: string,
public skillId: string,
// public sampleCode: string,
public handleError: boolean = false) { }
}
@@ -1,15 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@@ -1,16 +0,0 @@
<!--
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<input class="form-control" type="text" [skilltree]="skillId" (skills-report-success)="onReporterResponse($event)" (skills-report-error)="onReporterResponse($event)"/>
@@ -1,50 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { Example } from './example';
@Component({
selector: 'app-input-code-example',
templateUrl: './input-code-example.component.html',
styleUrls: ['./input-code-example.component.css']
})
export class InputCodeExampleComponent implements OnInit {
@Input() example: Example
skillId: string
@Output() skillReportSuccess = new EventEmitter<string>();
constructor() {
}
ngOnInit(): void {
this.skillId = this.example.skillId;
}
onReporterResponse(event) {
this.skillReportSuccess.emit(event.detail)
}
getSampleCode() {
let sampleCode = `<input \n type="text" \n [skilltree]="\'${this.example.skillId}\'" \n (skills-report-success)="onReporterResponse($event)"`;
if (this.example.handleError) {
sampleCode += '\n (skills-report-error)="onReporterError($event)"';
}
sampleCode += ' />'
return sampleCode;
}
}
@@ -1,15 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@@ -1,35 +0,0 @@
<!--
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div class="container">
<h2>Report Skills Examples</h2>
<div class="text-primary">Global Event Result:</div>
<div id="globalEventResultDiv" class="border rounded p-3 bg-light">
<pre data-cy="globalEventResult">{{ globalEventResult }}</pre>
</div>
<div class="mt-5 mb-5" *ngFor="let example of examples">
<ng-template #examplesTarget></ng-template>
</div>
</div>
<footer class="text-muted bg-light py-5">
<div class="container">
<p class="float-right">
<a href="angular/reportSkills#">Back to top</a>
</p>
<p>Angular Examples Guide</p>
</div>
</footer>
@@ -1,40 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ReportSkillsComponent } from './report-skills.component';
describe('ReportSkillsComponent', () => {
let component: ReportSkillsComponent;
let fixture: ComponentFixture<ReportSkillsComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ReportSkillsComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ReportSkillsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -1,87 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import {
Component,
OnInit,
AfterViewInit,
OnDestroy,
ComponentFactoryResolver,
ViewChildren,
ViewContainerRef,
QueryList,
ChangeDetectorRef
} from '@angular/core';
import { Example } from './code-example/example'
import { ExampleService } from './code-example/example.service';
import { CodeExampleLayoutComponent } from './code-example/code-example-layout.component'
import { SkillsReporter } from '@skilltree/skills-client-ng';
@Component({
selector: 'app-report-skills',
templateUrl: './report-skills.component.html',
styleUrls: ['./report-skills.component.css']
})
export class ReportSkillsComponent implements OnInit, AfterViewInit, OnDestroy {
globalEventResult: string = ''
examples: Example[]
private loadedComponents = [];
@ViewChildren('examplesTarget', { read: ViewContainerRef }) exampleTargets: QueryList<ViewContainerRef>;
constructor(private exampleService: ExampleService, private componentFactoryResolver: ComponentFactoryResolver, private ref: ChangeDetectorRef) { }
ngOnInit() {
SkillsReporter.addSuccessHandler(result => {
this.globalEventResult = JSON.stringify(result, null, ' ')
// force change detection
this.ref.detectChanges();
});
}
ngAfterViewInit(): void {
setTimeout(() => {
this.viewLoaded();
});
}
ngOnDestroy(): void {
this.loadedComponents.forEach(component => component.destroy());
}
async viewLoaded() {
this.exampleTargets.changes.subscribe(() => {
this.loadExampleComponents();
});
await this.loadExamples();
}
async loadExamples() {
this.examples = this.exampleService.getExamples();
}
private loadExampleComponents() {
this.exampleTargets.toArray().forEach((viewContainerRef, i) => {
let example = this.examples[i];
let componentFactory = this.componentFactoryResolver.resolveComponentFactory(CodeExampleLayoutComponent);
let componentRef = viewContainerRef.createComponent(componentFactory);
componentRef.instance.example = example;
componentRef.changeDetectorRef.detectChanges();
this.loadedComponents.push(componentRef);
});
}
}
@@ -1,15 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@@ -1,65 +0,0 @@
<!--
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div class="container">
<div class="d-flex align-items-center mb-3">
<div ngbDropdown class="d-inline-block">
<button class="btn btn-outline-primary" id="dropdownBasic1" ngbDropdownToggle>Change Theme</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<button ngbDropdownItem *ngFor="let themeItem of themes"
(click)="setIsThemeUrlParam(themeItem)">{{themeItem.name}}</button>
</div>
</div>
<div class="custom-control custom-switch d-inline-block ml-3 border-right pr-2">
<input type="checkbox" class="custom-control-input" id="customSwitch1" (click)="setIsSummaryOnlyUrlParam()"
[checked]="displayOptions.isSummaryOnly">
<label class="custom-control-label" for="customSwitch1">Summary Only</label>
</div>
<div class="custom-control custom-switch d-inline-block ml-3 border-right pr-2">
<input type="checkbox" class="custom-control-input" id="customSwitch2" (click)="setInternalBackButtonUrlParam()"
[checked]="displayOptions.internalBackButton">
<label class="custom-control-label" for="customSwitch2">Internal Back Button</label>
</div>
<button class="btn btn-outline-primary" id="navButton" data-cy="navigateButton" (click)="navigate()">Navigate</button>
<a href="javascript:void(0)" class="ml-2" (click)="scrollTo('sample-code')">Show Source</a>
</div>
<div>
<span id="skillsDisplayPath" data-cy="skillsDisplayPath">Skills Display Path: [{{ skillsDisplayRoutePath }}]</span>
</div>
<div class="border rounded">
<skills-display #skillsDisplay *ngIf="selectedTheme" [options]="displayOptions" [version]="version" [theme]="selectedTheme.theme" [handleRouteChanged]="skillsDisplayRouteChanged">
</skills-display>
</div>
<div [hidden]="!showSampleCode" id="sample-code" class="row">
<div class="col-12">
<div class="mb-5 mt-5 card bg-light">
<h5 class=" card-header text-info">
<strong>Sample Code</strong>
</h5>
<div class="card-body py-0">
<pre><code [highlight]="getSampleCode()" [languages]="['html', 'javascript']"></code></pre>
</div>
</div>
</div>
</div>
</div>
@@ -1,40 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SkillsDisplayComponent } from './skills-display.component';
describe('SkillsDisplayComponent', () => {
let component: SkillsDisplayComponent;
let fixture: ComponentFixture<SkillsDisplayComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SkillsDisplayComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SkillsDisplayComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -1,120 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { themes } from './themes'
import { ViewportScroller } from '@angular/common';
import { js_beautify } from 'js-beautify'
@Component({
selector: 'app-skills-display',
templateUrl: './skills-display.component.html',
styleUrls: ['./skills-display.component.css']
})
export class SkillsDisplayComponent implements OnInit {
@ViewChild('skillsDisplay')
skillsDisplay: any;
displayOptions: any;
version: number;
selectedTheme: any;
themes: Array<any> = themes;
showSampleCode: boolean = false;
skillsDisplayRoutePath: string = '/';
constructor(private route: ActivatedRoute, private router: Router, private viewportScroller: ViewportScroller) { }
ngOnInit(): void {
this.route.queryParams.subscribe(params => {
this.version = params['skillsVersion'] ? JSON.parse(params['skillsVersion']) : 1000;
this.displayOptions = {
autoScrollStrategy: 'top-of-page',
isSummaryOnly: params['isSummaryOnly'] ? JSON.parse(params['isSummaryOnly']) : false,
internalBackButton: params['internalBackButton'] ? JSON.parse(params['internalBackButton']) : false,
};
this.selectedTheme = params['themeName'] ? this.findTheme(params['themeName']) : this.themes[0];
});
}
navigate() {
this.skillsDisplay.navigate('/subjects/subj0')
}
findTheme(name: string) {
return this.themes.find((item) => item.name === name);
}
skillsDisplayRouteChanged = (newPath: string) => {
this.skillsDisplayRoutePath = newPath;
}
refreshPage() {
setTimeout(() => {
document.location.reload();
}, 250);
}
setIsThemeUrlParam(theme) {
this.router.navigate(['angular/showSkills'], { queryParams: { themeName: theme.name }, queryParamsHandling: 'merge' });
this.refreshPage();
}
setIsSummaryOnlyUrlParam() {
this.displayOptions.isSummaryOnly = !this.displayOptions.isSummaryOnly;
this.router.navigate(['angular/showSkills'], { queryParams: { isSummaryOnly: this.displayOptions.isSummaryOnly }, queryParamsHandling: 'merge' });
this.refreshPage();
}
setInternalBackButtonUrlParam() {
this.displayOptions.internalBackButton = !this.displayOptions.internalBackButton;
this.router.navigate(['angular/showSkills'], { queryParams: { internalBackButton: this.displayOptions.internalBackButton }, queryParamsHandling: 'merge' });
this.refreshPage();
}
scrollTo(elementId: string) {
this.showSampleCode = true;
setTimeout(() => {
this.viewportScroller.scrollToAnchor(elementId);
}, 250);
}
getSampleCode() {
let sampleCode = `
<template>
<skills-level /> <!-- You can display the user's current Level using the SkillsLevel component -->
<skills-display :theme="selectedTheme" ${(this.displayOptions.isSummaryOnly || this.displayOptions.internalBackButton) ? ':options="displayOptions"' : ''}/>
</template>
<script>
${js_beautify(`
import { SkillsDisplay, SkillsLevel } from '@skilltree/skills-client-vue';
export default {
components: {
SkillsDisplay,
},
data() {
return {${this.displayOptions.isSummaryOnly ? '\ndisplayOptions: { isSummaryOnly: true, },' : ''}
selectedTheme: ${JSON.stringify(this.selectedTheme, null, ' ')}
};
},
};
`)}
</script>
`;
return sampleCode;
}
}
@@ -1,65 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/*
* Copyright 2020 SkillTree
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const themes : Array<any> = [
{
name: 'Bright (default)',
theme: {
backgroundColor: '#f7f7f7',
},
},
{
name: 'Dark Blue',
theme: {
backgroundColor: '#626d7d',
pageTitleTextColor: 'white',
textSecondaryColor: 'white',
textPrimaryColor: 'white',
stars: {
unearnedColor: '#787886',
earnedColor: 'gold',
},
progressIndicators: {
beforeTodayColor: '#3e4d44',
earnedTodayColor: '#667da4',
completeColor: '#59ad52',
incompleteColor: '#cdcdcd',
},
charts: {
axisLabelColor: 'white',
},
tiles: {
backgroundColor:'#152E4d',
watermarkIconColor: '#a6c5f7',
},
graphLegendBorderColor: '1px solid grey',
},
}
];
@@ -1,23 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { PlaceholderDirective } from './placeholder.directive';
describe('PlaceholderDirective', () => {
it('should create an instance', () => {
const directive = new PlaceholderDirective();
expect(directive).toBeTruthy();
});
});
@@ -1,25 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { Directive, ViewContainerRef } from '@angular/core';
@Directive({
selector: '[appPlaceholder]'
})
export class PlaceholderDirective {
constructor(public viewContainerRef: ViewContainerRef) { }
}
@@ -1,15 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@@ -1,18 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
export const environment = {
production: true
};
@@ -1,31 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
export const environment = {
production: false
};
/*
* For easier debugging in development mode, you can import the following file
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
*
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 948 B

@@ -1,28 +0,0 @@
<!--
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>SkillsIntClientNg</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
</body>
</html>
@@ -1,37 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import axios from 'axios';
import { SkillsConfiguration, Logger } from '@skilltree/skills-client-ng'
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
axios.get("/api/config")
.then((result) => {
SkillsConfiguration.configure(result.data);
})
.then(() => {
if ((<any> window).Cypress) {
(<any> window).skillsLogger = Logger;
}
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
})
@@ -1,82 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/***************************************************************************************************
* Load `$localize` onto the global scope - used if i18n tags appear in Angular templates.
*/
// import '@angular/localize/init';
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/guide/browser-support
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
* because those flags need to be set before `zone.js` being loaded, and webpack
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags';
*
* The flags allowed in zone-flags.ts are listed here.
*
* The following flags will work for all browsers.
*
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*
* (window as any).__Zone_enable_cross_context_check = true;
*
*/
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/
@@ -1,16 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/* You can add global styles to this file, and also import other style files */
@@ -1,40 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
@@ -1,15 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": [ "node"]
},
"files": [
"src/main.ts",
"src/polyfills.ts"
],
"include": [
"src/**/*.d.ts"
]
}
@@ -1,20 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"module": "es2020",
"lib": [
"es2018",
"dom"
]
}
}
@@ -1,20 +0,0 @@
/*
This is a "Solution Style" tsconfig.json file, and is used by editors and TypeScript’s language server to improve development experience.
It is not intended to be used to perform a compilation.
To learn more about this file see: https://angular.io/config/solution-tsconfig.
*/
{
"files": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.spec.json"
},
{
"path": "./e2e/tsconfig.json"
}
]
}
@@ -1,18 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"types": [
"jasmine"
]
},
"files": [
"src/test.ts",
"src/polyfills.ts"
],
"include": [
"src/**/*.spec.ts",
"src/**/*.d.ts"
]
}
@@ -1,152 +0,0 @@
{
"extends": "tslint:recommended",
"rules": {
"align": {
"options": [
"parameters",
"statements"
]
},
"array-type": false,
"arrow-return-shorthand": true,
"curly": true,
"deprecation": {
"severity": "warning"
},
"component-class-suffix": true,
"contextual-lifecycle": true,
"directive-class-suffix": true,
"directive-selector": [
true,
"attribute",
"app",
"camelCase"
],
"component-selector": [
true,
"element",
"app",
"kebab-case"
],
"eofline": true,
"import-blacklist": [
true,
"rxjs/Rx"
],
"import-spacing": true,
"indent": {
"options": [
"spaces"
]
},
"max-classes-per-file": false,
"max-line-length": [
true,
140
],
"member-ordering": [
true,
{
"order": [
"static-field",
"instance-field",
"static-method",
"instance-method"
]
}
],
"no-console": [
true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-empty": false,
"no-inferrable-types": [
true,
"ignore-params"
],
"no-non-null-assertion": true,
"no-redundant-jsdoc": true,
"no-switch-case-fall-through": true,
"no-var-requires": false,
"object-literal-key-quotes": [
true,
"as-needed"
],
"quotemark": [
true,
"single"
],
"semicolon": {
"options": [
"always"
]
},
"space-before-function-paren": {
"options": {
"anonymous": "never",
"asyncArrow": "always",
"constructor": "never",
"method": "never",
"named": "never"
}
},
"typedef": [
true,
"call-signature"
],
"typedef-whitespace": {
"options": [
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
},
{
"call-signature": "onespace",
"index-signature": "onespace",
"parameter": "onespace",
"property-declaration": "onespace",
"variable-declaration": "onespace"
}
]
},
"variable-name": {
"options": [
"ban-keywords",
"check-format",
"allow-pascal-case"
]
},
"whitespace": {
"options": [
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type",
"check-typecast"
]
},
"no-conflicting-lifecycle": true,
"no-host-metadata-property": true,
"no-input-rename": true,
"no-inputs-metadata-property": true,
"no-output-native": true,
"no-output-on-prefix": true,
"no-output-rename": true,
"no-outputs-metadata-property": true,
"template-banana-in-box": true,
"template-no-negated-async": true,
"use-lifecycle-interface": true,
"use-pipe-transform-interface": true
},
"rulesDirectory": [
"codelyzer"
]
}
@@ -1 +0,0 @@
BROWSER=none
@@ -1,23 +0,0 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# production
/build
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
@@ -1 +0,0 @@
package-lock=false
@@ -1,83 +0,0 @@
<!---
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.<br />
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The page will reload if you make edits.<br />
You will also see any lint errors in the console.
### `npm test`
Launches the test runner in the interactive watch mode.<br />
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `npm run build`
Builds the app for production to the `build` folder.<br />
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.<br />
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `npm run eject`
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
### Analyzing the Bundle Size
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
### Making a Progressive Web App
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
### Advanced Configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
### Deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
### `npm run build` fails to minify
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
@@ -1,56 +0,0 @@
{
"name": "skills-int-client-react",
"version": "3.5.0",
"license": "Apache-2.0",
"description": "SkillTree Client Lib Integration Tests - React",
"homepage": "/react/",
"dependencies": {
"@skilltree/skills-client-react": "3.5.0",
"axios": "1.6.0",
"bootstrap": "4.5.3",
"core-js": "3.6.5",
"highlightjs": "9.16.2",
"js-beautify": "1.13.0",
"prop-types": "15.7.2",
"react": "16.13.1",
"react-bootstrap": "1.3.0",
"react-dom": "16.13.1",
"react-highlight": "0.12.0",
"react-router": "5.2.0",
"react-router-dom": "5.2.0"
},
"scripts": {
"serve": "PORT=8083 craco start",
"buildDepsAndServe": "cd ../../skills-client-js/ && npm run build && cd ../skills-client-react/ && npm run build && cd ../skills-client-integration/skills-int-client-react/ && npm run serve",
"licenseDepCheck": "license-checker --production --onlyAllow='MIT;ISC;BSD-3;BSD-2-Clause;Apache-2.0' --summary",
"licenseHeaderCheck": "license-check-and-add check -f '../license-add/license-add-config.json'",
"licenseHeaderAdd": "license-check-and-add add -f ../license-add/license-add-config.json",
"licenseCheck": "npm run licenseHeaderCheck && npm run licenseDepCheck ",
"clean": "find node_modules/ -maxdepth 1 ! -name \"@skilltree\" ! -name node_modules -exec rm -rf {} \\;",
"reinstall": "npm run clean && npm install",
"build": "npm run licenseCheck && craco build",
"test": "craco test",
"eject": "craco eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"license-check-and-add": "3.0.4",
"license-checker": "25.0.1",
"react-scripts": "4.0.3",
"@craco/craco": "6.4.0"
}
}
@@ -1,75 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>skills</groupId>
<artifactId>skills-client-integration</artifactId>
<version>3.5.0-SNAPSHOT</version>
</parent>
<artifactId>skills-int-client-react</artifactId>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>${frontend-maven-plugin.version}</version>
<configuration>
<installDirectory>target</installDirectory>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>v12.6.0</nodeVersion>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>npm run build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
<!--TODO: uncomment when we have at least 1 unit test-->
<!--<execution>-->
<!--<id>npm run test</id>-->
<!--<goals>-->
<!--<goal>npm</goal>-->
<!--</goals>-->
<!--<phase>test</phase>-->
<!--<configuration>-->
<!--<arguments>run unit</arguments>-->
<!--</configuration>-->
<!--</execution>-->
</executions>
</plugin>
</plugins>
</build>
</project>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

@@ -1,60 +0,0 @@
<!--
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="stylesheet" href="~highlight.js/styles/darcula.css">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

@@ -1,25 +0,0 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
@@ -1,2 +0,0 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Loaded 100 of 330 files, more files were not shown because too many files have changed in this diff. Show more