@descope/angular-sdk 0.0.0-next-a6b67f6a-20231228 → 0.0.0-next-cc7eda17-20231228
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +16 -0
- package/.eslintrc.json +40 -0
- package/.github/workflows/ci.yml +98 -0
- package/.github/workflows/publish-next.yml +43 -0
- package/.github/workflows/publish.yml +31 -0
- package/.github/workflows/release.yml +41 -0
- package/.husky/pre-commit +4 -0
- package/.prettierrc +8 -0
- package/.vscode/extensions.json +4 -0
- package/.vscode/launch.json +20 -0
- package/.vscode/settings.json +3 -0
- package/.vscode/tasks.json +42 -0
- package/angular.json +154 -0
- package/jest.config.js +17 -0
- package/package.json +1 -4
- package/projects/angular-sdk/.eslintrc.json +32 -0
- package/projects/angular-sdk/ng-package.json +8 -0
- package/projects/angular-sdk/src/environment.ts +3 -0
- package/projects/angular-sdk/src/lib/components/descope/descope.component.spec.ts +104 -0
- package/projects/angular-sdk/src/lib/components/descope/descope.component.ts +114 -0
- package/projects/angular-sdk/src/lib/components/sign-in-flow/sign-in-flow.component.html +15 -0
- package/projects/angular-sdk/src/lib/components/sign-in-flow/sign-in-flow.component.spec.ts +53 -0
- package/projects/angular-sdk/src/lib/components/sign-in-flow/sign-in-flow.component.ts +32 -0
- package/projects/angular-sdk/src/lib/components/sign-up-flow/sign-up-flow.component.html +15 -0
- package/projects/angular-sdk/src/lib/components/sign-up-flow/sign-up-flow.component.spec.ts +51 -0
- package/projects/angular-sdk/src/lib/components/sign-up-flow/sign-up-flow.component.ts +32 -0
- package/projects/angular-sdk/src/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.html +15 -0
- package/projects/angular-sdk/src/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.spec.ts +53 -0
- package/projects/angular-sdk/src/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.ts +32 -0
- package/projects/angular-sdk/src/lib/descope-auth.module.ts +46 -0
- package/projects/angular-sdk/src/lib/services/descope-auth.guard.spec.ts +76 -0
- package/projects/angular-sdk/src/lib/services/descope-auth.guard.ts +16 -0
- package/projects/angular-sdk/src/lib/services/descope-auth.service.spec.ts +264 -0
- package/projects/angular-sdk/src/lib/services/descope-auth.service.ts +176 -0
- package/projects/angular-sdk/src/lib/services/descope.interceptor.spec.ts +102 -0
- package/projects/angular-sdk/src/lib/services/descope.interceptor.ts +76 -0
- package/projects/angular-sdk/src/lib/types/types.ts +10 -0
- package/projects/angular-sdk/src/lib/utils/constants.ts +8 -0
- package/projects/angular-sdk/src/lib/utils/helpers.spec.ts +103 -0
- package/projects/angular-sdk/src/lib/utils/helpers.ts +36 -0
- package/{dist/public-api.d.ts → projects/angular-sdk/src/public-api.ts} +4 -0
- package/projects/angular-sdk/tsconfig.lib.json +12 -0
- package/projects/angular-sdk/tsconfig.lib.prod.json +10 -0
- package/projects/angular-sdk/tsconfig.spec.json +11 -0
- package/projects/demo-app/.eslintrc.json +31 -0
- package/projects/demo-app/src/app/app-routing.module.ts +23 -0
- package/projects/demo-app/src/app/app.component.html +3 -0
- package/projects/demo-app/src/app/app.component.scss +16 -0
- package/projects/demo-app/src/app/app.component.spec.ts +37 -0
- package/projects/demo-app/src/app/app.component.ts +8 -0
- package/projects/demo-app/src/app/app.module.ts +52 -0
- package/projects/demo-app/src/app/home/home.component.html +23 -0
- package/projects/demo-app/src/app/home/home.component.scss +15 -0
- package/projects/demo-app/src/app/home/home.component.spec.ts +44 -0
- package/projects/demo-app/src/app/home/home.component.ts +61 -0
- package/projects/demo-app/src/app/interceptor/auth.interceptor.ts +20 -0
- package/projects/demo-app/src/app/login/login.component.html +12 -0
- package/projects/demo-app/src/app/login/login.component.spec.ts +42 -0
- package/projects/demo-app/src/app/login/login.component.ts +35 -0
- package/projects/demo-app/src/app/protected/protected.component.html +18 -0
- package/projects/demo-app/src/app/protected/protected.component.scss +8 -0
- package/projects/demo-app/src/app/protected/protected.component.spec.ts +42 -0
- package/projects/demo-app/src/app/protected/protected.component.ts +40 -0
- package/projects/demo-app/src/assets/.gitkeep +0 -0
- package/projects/demo-app/src/environments/conifg.ts +13 -0
- package/projects/demo-app/src/environments/environment.ts +19 -0
- package/projects/demo-app/src/favicon.ico +0 -0
- package/projects/demo-app/src/index.html +17 -0
- package/projects/demo-app/src/main.ts +7 -0
- package/projects/demo-app/src/styles.scss +21 -0
- package/projects/demo-app/tsconfig.app.json +10 -0
- package/projects/demo-app/tsconfig.spec.json +10 -0
- package/renovate.json +4 -0
- package/scripts/gitleaks/.gitleaks.toml +653 -0
- package/scripts/gitleaks/gitleaks.sh +34 -0
- package/scripts/setversion/setversion.js +20 -0
- package/setup-jest.ts +1 -0
- package/thirdPartyLicenseCollector_linux_amd64 +0 -0
- package/tsconfig.json +35 -0
- package/dist/environment.d.ts +0 -3
- package/dist/esm2022/descope-angular-sdk.mjs +0 -5
- package/dist/esm2022/environment.mjs +0 -4
- package/dist/esm2022/lib/components/descope/descope.component.mjs +0 -106
- package/dist/esm2022/lib/components/sign-in-flow/sign-in-flow.component.mjs +0 -40
- package/dist/esm2022/lib/components/sign-up-flow/sign-up-flow.component.mjs +0 -40
- package/dist/esm2022/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.mjs +0 -40
- package/dist/esm2022/lib/descope-auth.module.mjs +0 -52
- package/dist/esm2022/lib/services/descope-auth.guard.mjs +0 -15
- package/dist/esm2022/lib/services/descope-auth.service.mjs +0 -139
- package/dist/esm2022/lib/services/descope.interceptor.mjs +0 -51
- package/dist/esm2022/lib/types/types.mjs +0 -6
- package/dist/esm2022/lib/utils/constants.mjs +0 -7
- package/dist/esm2022/lib/utils/helpers.mjs +0 -27
- package/dist/esm2022/public-api.mjs +0 -13
- package/dist/fesm2022/descope-angular-sdk.mjs +0 -500
- package/dist/fesm2022/descope-angular-sdk.mjs.map +0 -1
- package/dist/index.d.ts +0 -5
- package/dist/lib/components/descope/descope.component.d.ts +0 -32
- package/dist/lib/components/sign-in-flow/sign-in-flow.component.d.ts +0 -24
- package/dist/lib/components/sign-up-flow/sign-up-flow.component.d.ts +0 -24
- package/dist/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.d.ts +0 -24
- package/dist/lib/descope-auth.module.d.ts +0 -14
- package/dist/lib/services/descope-auth.guard.d.ts +0 -2
- package/dist/lib/services/descope-auth.service.d.ts +0 -38
- package/dist/lib/services/descope.interceptor.d.ts +0 -2
- package/dist/lib/types/types.d.ts +0 -8
- package/dist/lib/utils/constants.d.ts +0 -5
- package/dist/lib/utils/helpers.d.ts +0 -5
- package/dist/package.json +0 -42
- /package/{dist → projects/angular-sdk}/README.md +0 -0
package/.editorconfig
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Editor configuration, see https://editorconfig.org
|
|
2
|
+
root = true
|
|
3
|
+
|
|
4
|
+
[*]
|
|
5
|
+
charset = utf-8
|
|
6
|
+
indent_style = space
|
|
7
|
+
indent_size = 2
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
|
|
11
|
+
[*.ts]
|
|
12
|
+
quote_type = single
|
|
13
|
+
|
|
14
|
+
[*.md]
|
|
15
|
+
max_line_length = off
|
|
16
|
+
trim_trailing_whitespace = false
|
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"ignorePatterns": ["projects/**/*"],
|
|
4
|
+
"overrides": [
|
|
5
|
+
{
|
|
6
|
+
"files": ["*.ts"],
|
|
7
|
+
"extends": [
|
|
8
|
+
"eslint:recommended",
|
|
9
|
+
"plugin:@typescript-eslint/recommended",
|
|
10
|
+
"plugin:@angular-eslint/recommended",
|
|
11
|
+
"plugin:@angular-eslint/template/process-inline-templates"
|
|
12
|
+
],
|
|
13
|
+
"rules": {
|
|
14
|
+
"@angular-eslint/directive-selector": [
|
|
15
|
+
"error",
|
|
16
|
+
{
|
|
17
|
+
"type": "attribute",
|
|
18
|
+
"prefix": "lib",
|
|
19
|
+
"style": "camelCase"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"@angular-eslint/component-selector": [
|
|
23
|
+
"error",
|
|
24
|
+
{
|
|
25
|
+
"type": "element",
|
|
26
|
+
"style": "kebab-case"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"files": ["*.html"],
|
|
33
|
+
"extends": [
|
|
34
|
+
"plugin:@angular-eslint/template/recommended",
|
|
35
|
+
"plugin:@angular-eslint/template/accessibility"
|
|
36
|
+
],
|
|
37
|
+
"rules": {}
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
name: 🎛️ CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
NODE_VERSION: 20
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
name: 👷 Build
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout code
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
- uses: actions/setup-node@v4
|
|
20
|
+
with:
|
|
21
|
+
node-version: ${{ env.NODE_VERSION }}
|
|
22
|
+
registry-url: https://npm.pkg.github.com/
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: npm ci
|
|
25
|
+
- name: Building Lib
|
|
26
|
+
run: npm run build:lib
|
|
27
|
+
- name: Building Demo App
|
|
28
|
+
run: npm run build:app
|
|
29
|
+
|
|
30
|
+
lint:
|
|
31
|
+
name: 🪥 Lint
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
steps:
|
|
34
|
+
- name: Checkout code
|
|
35
|
+
uses: actions/checkout@v4
|
|
36
|
+
- uses: actions/setup-node@v4
|
|
37
|
+
with:
|
|
38
|
+
node-version: ${{ env.NODE_VERSION }}
|
|
39
|
+
registry-url: https://npm.pkg.github.com/
|
|
40
|
+
- name: Install dependencies
|
|
41
|
+
run: npm ci
|
|
42
|
+
- name: Linting
|
|
43
|
+
run: npm run lint
|
|
44
|
+
- name: Format check
|
|
45
|
+
run: npm run format-check
|
|
46
|
+
|
|
47
|
+
gitleaks:
|
|
48
|
+
name: 🔒 Run Git leaks
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
steps:
|
|
51
|
+
- name: Checkout code
|
|
52
|
+
uses: actions/checkout@v4
|
|
53
|
+
- uses: actions/setup-node@v4
|
|
54
|
+
with:
|
|
55
|
+
node-version: ${{ env.NODE_VERSION }}
|
|
56
|
+
- name: Install dependencies
|
|
57
|
+
run: npm ci
|
|
58
|
+
- name: Gitleaks
|
|
59
|
+
run: npm run leaks
|
|
60
|
+
shell: bash
|
|
61
|
+
|
|
62
|
+
testing:
|
|
63
|
+
name: 👔 Test
|
|
64
|
+
runs-on: ubuntu-latest
|
|
65
|
+
steps:
|
|
66
|
+
- name: Checkout code
|
|
67
|
+
uses: actions/checkout@v4
|
|
68
|
+
- uses: actions/setup-node@v4
|
|
69
|
+
with:
|
|
70
|
+
node-version: ${{ env.NODE_VERSION }}
|
|
71
|
+
registry-url: https://npm.pkg.github.com/
|
|
72
|
+
- name: Install dependencies
|
|
73
|
+
run: npm ci
|
|
74
|
+
- name: Testing
|
|
75
|
+
run: npm run test
|
|
76
|
+
- name: Coverage check
|
|
77
|
+
uses: devmasx/coverage-check-action@v1.2.0
|
|
78
|
+
with:
|
|
79
|
+
type: lcov
|
|
80
|
+
min_coverage: 72.19
|
|
81
|
+
result_path: coverage/lcov.info
|
|
82
|
+
token: ${{ github.token }}
|
|
83
|
+
|
|
84
|
+
license-validation:
|
|
85
|
+
name: 🪪 License Validation
|
|
86
|
+
runs-on: ubuntu-latest
|
|
87
|
+
steps:
|
|
88
|
+
- name: Checkout code
|
|
89
|
+
uses: actions/checkout@v4
|
|
90
|
+
- uses: actions/setup-node@v4
|
|
91
|
+
with:
|
|
92
|
+
node-version: ${{ env.NODE_VERSION }}
|
|
93
|
+
registry-url: https://npm.pkg.github.com/
|
|
94
|
+
- name: Install dependencies
|
|
95
|
+
run: npm ci
|
|
96
|
+
- name: License validation
|
|
97
|
+
shell: bash
|
|
98
|
+
run: ./thirdPartyLicenseCollector_linux_amd64 -npm-project .
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: 📢 Publish Next
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- init # TODO remove this
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
NODE_VERSION: 20
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
name: 📢 Publish Next
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- uses: actions/setup-node@v4
|
|
20
|
+
with:
|
|
21
|
+
node-version: ${{ env.NODE_VERSION }}
|
|
22
|
+
registry-url: https://registry.npmjs.org/
|
|
23
|
+
- name: Get Short SHA
|
|
24
|
+
run: echo "SHORT_SHA=`echo ${{ github.sha }} | cut -c1-8`" >> $GITHUB_ENV
|
|
25
|
+
- name: Get Next Version
|
|
26
|
+
run: |
|
|
27
|
+
current_date=$(date +'%Y%m%d')
|
|
28
|
+
echo "NEW_VERSION=0.0.0-next-${SHORT_SHA}-${current_date}" >> $GITHUB_ENV
|
|
29
|
+
- name: Use Next Version
|
|
30
|
+
run: |
|
|
31
|
+
git config --global user.email "info@descope.com"
|
|
32
|
+
git config --global user.name "Descope"
|
|
33
|
+
yarn version --new-version ${NEW_VERSION}
|
|
34
|
+
cat package.json
|
|
35
|
+
- name: Install dependencies
|
|
36
|
+
run: npm ci
|
|
37
|
+
- name: Build Library
|
|
38
|
+
run: npm run build:ci
|
|
39
|
+
- name: Publish to NPM Package Registry
|
|
40
|
+
run: |
|
|
41
|
+
npm publish --access=public --tag next
|
|
42
|
+
env:
|
|
43
|
+
NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_REGISTRY }}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: 📢 publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'release/**'
|
|
7
|
+
|
|
8
|
+
env:
|
|
9
|
+
NODE_VERSION: 20
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
publish:
|
|
13
|
+
name: 📢 Publish
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- uses: actions/setup-node@v4
|
|
19
|
+
with:
|
|
20
|
+
node-version: ${{ env.NODE_VERSION }}
|
|
21
|
+
registry-url: https://registry.npmjs.org/
|
|
22
|
+
- name: Install dependencies
|
|
23
|
+
run: npm ci
|
|
24
|
+
- name: Build Library
|
|
25
|
+
run: npm run build:ci
|
|
26
|
+
- name: Publish to NPM Package Registry
|
|
27
|
+
run: |
|
|
28
|
+
npm publish --access=public
|
|
29
|
+
env:
|
|
30
|
+
CI: true
|
|
31
|
+
NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_REGISTRY }}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: 👊 Bump Version & Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
bump-version:
|
|
10
|
+
name: 👊 Bump Version & Release
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
# this workflow will run only if commit message ends with "RELEASE"
|
|
13
|
+
if: "contains(github.event.head_commit.message, 'RELEASE')"
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout source code
|
|
16
|
+
uses: actions/checkout@v4
|
|
17
|
+
with:
|
|
18
|
+
persist-credentials: false
|
|
19
|
+
ref: ${{ github.ref }}
|
|
20
|
+
- name: Get token
|
|
21
|
+
id: get_token
|
|
22
|
+
uses: tibdex/github-app-token@v1
|
|
23
|
+
with:
|
|
24
|
+
private_key: ${{ secrets.RELEASE_APP_PEM }}
|
|
25
|
+
app_id: ${{ secrets.RELEASE_APP_ID }}
|
|
26
|
+
|
|
27
|
+
- name: Automated Version Bump
|
|
28
|
+
id: version-bump
|
|
29
|
+
uses: phips28/gh-action-bump-version@master
|
|
30
|
+
with:
|
|
31
|
+
tag-prefix: release/v
|
|
32
|
+
major-wording: 'MAJOR'
|
|
33
|
+
minor-wording: 'MINOR'
|
|
34
|
+
env:
|
|
35
|
+
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
|
|
36
|
+
- name: cat angular-sdk package.json
|
|
37
|
+
run: cat ./package.json
|
|
38
|
+
- name: Output Step
|
|
39
|
+
env:
|
|
40
|
+
NEW_TAG: ${{ steps.version-bump.outputs.newTag }}
|
|
41
|
+
run: echo "new tag $NEW_TAG"
|
package/.prettierrc
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"configurations": [
|
|
5
|
+
{
|
|
6
|
+
"name": "ng serve",
|
|
7
|
+
"type": "chrome",
|
|
8
|
+
"request": "launch",
|
|
9
|
+
"preLaunchTask": "npm: start",
|
|
10
|
+
"url": "http://localhost:4200/"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "ng test",
|
|
14
|
+
"type": "chrome",
|
|
15
|
+
"request": "launch",
|
|
16
|
+
"preLaunchTask": "npm: test",
|
|
17
|
+
"url": "http://localhost:9876/debug.html"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"tasks": [
|
|
5
|
+
{
|
|
6
|
+
"type": "npm",
|
|
7
|
+
"script": "start",
|
|
8
|
+
"isBackground": true,
|
|
9
|
+
"problemMatcher": {
|
|
10
|
+
"owner": "typescript",
|
|
11
|
+
"pattern": "$tsc",
|
|
12
|
+
"background": {
|
|
13
|
+
"activeOnStart": true,
|
|
14
|
+
"beginsPattern": {
|
|
15
|
+
"regexp": "(.*?)"
|
|
16
|
+
},
|
|
17
|
+
"endsPattern": {
|
|
18
|
+
"regexp": "bundle generation complete"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "npm",
|
|
25
|
+
"script": "test",
|
|
26
|
+
"isBackground": true,
|
|
27
|
+
"problemMatcher": {
|
|
28
|
+
"owner": "typescript",
|
|
29
|
+
"pattern": "$tsc",
|
|
30
|
+
"background": {
|
|
31
|
+
"activeOnStart": true,
|
|
32
|
+
"beginsPattern": {
|
|
33
|
+
"regexp": "(.*?)"
|
|
34
|
+
},
|
|
35
|
+
"endsPattern": {
|
|
36
|
+
"regexp": "bundle generation complete"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
package/angular.json
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"newProjectRoot": "projects",
|
|
5
|
+
"projects": {
|
|
6
|
+
"angular-sdk": {
|
|
7
|
+
"projectType": "library",
|
|
8
|
+
"root": "projects/angular-sdk",
|
|
9
|
+
"sourceRoot": "projects/angular-sdk/src",
|
|
10
|
+
"prefix": "lib",
|
|
11
|
+
"architect": {
|
|
12
|
+
"build": {
|
|
13
|
+
"builder": "@angular-devkit/build-angular:ng-packagr",
|
|
14
|
+
"options": {
|
|
15
|
+
"project": "projects/angular-sdk/ng-package.json"
|
|
16
|
+
},
|
|
17
|
+
"configurations": {
|
|
18
|
+
"production": {
|
|
19
|
+
"tsConfig": "projects/angular-sdk/tsconfig.lib.prod.json"
|
|
20
|
+
},
|
|
21
|
+
"development": {
|
|
22
|
+
"tsConfig": "projects/angular-sdk/tsconfig.lib.json"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"defaultConfiguration": "production"
|
|
26
|
+
},
|
|
27
|
+
"test": {
|
|
28
|
+
"builder": "@angular-devkit/build-angular:karma",
|
|
29
|
+
"options": {
|
|
30
|
+
"tsConfig": "projects/angular-sdk/tsconfig.spec.json",
|
|
31
|
+
"polyfills": ["zone.js", "zone.js/testing"]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"lint": {
|
|
35
|
+
"builder": "@angular-eslint/builder:lint",
|
|
36
|
+
"options": {
|
|
37
|
+
"lintFilePatterns": [
|
|
38
|
+
"projects/angular-sdk/**/*.ts",
|
|
39
|
+
"projects/angular-sdk/**/*.html"
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"demo-app": {
|
|
46
|
+
"projectType": "application",
|
|
47
|
+
"schematics": {
|
|
48
|
+
"@schematics/angular:component": {
|
|
49
|
+
"style": "scss"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"root": "projects/demo-app",
|
|
53
|
+
"sourceRoot": "projects/demo-app/src",
|
|
54
|
+
"prefix": "app",
|
|
55
|
+
"architect": {
|
|
56
|
+
"build": {
|
|
57
|
+
"builder": "@angular-devkit/build-angular:browser",
|
|
58
|
+
"options": {
|
|
59
|
+
"allowedCommonJsDependencies": ["lodash.get"],
|
|
60
|
+
"outputPath": "dist/demo-app",
|
|
61
|
+
"index": "projects/demo-app/src/index.html",
|
|
62
|
+
"main": "projects/demo-app/src/main.ts",
|
|
63
|
+
"polyfills": ["zone.js"],
|
|
64
|
+
"tsConfig": "projects/demo-app/tsconfig.app.json",
|
|
65
|
+
"inlineStyleLanguage": "scss",
|
|
66
|
+
"assets": [
|
|
67
|
+
"projects/demo-app/src/favicon.ico",
|
|
68
|
+
"projects/demo-app/src/assets"
|
|
69
|
+
],
|
|
70
|
+
"styles": ["projects/demo-app/src/styles.scss"],
|
|
71
|
+
"scripts": []
|
|
72
|
+
},
|
|
73
|
+
"configurations": {
|
|
74
|
+
"production": {
|
|
75
|
+
"budgets": [
|
|
76
|
+
{
|
|
77
|
+
"type": "initial",
|
|
78
|
+
"maximumWarning": "500kb",
|
|
79
|
+
"maximumError": "1mb"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"type": "anyComponentStyle",
|
|
83
|
+
"maximumWarning": "2kb",
|
|
84
|
+
"maximumError": "4kb"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"outputHashing": "all"
|
|
88
|
+
},
|
|
89
|
+
"development": {
|
|
90
|
+
"buildOptimizer": false,
|
|
91
|
+
"optimization": false,
|
|
92
|
+
"vendorChunk": true,
|
|
93
|
+
"extractLicenses": false,
|
|
94
|
+
"sourceMap": true,
|
|
95
|
+
"namedChunks": true,
|
|
96
|
+
"fileReplacements": [
|
|
97
|
+
{
|
|
98
|
+
"replace": "projects/demo-app/src/environments/environment.ts",
|
|
99
|
+
"with": "projects/demo-app/src/environments/environment.development.ts"
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"defaultConfiguration": "production"
|
|
105
|
+
},
|
|
106
|
+
"serve": {
|
|
107
|
+
"builder": "@angular-devkit/build-angular:dev-server",
|
|
108
|
+
"configurations": {
|
|
109
|
+
"production": {
|
|
110
|
+
"browserTarget": "demo-app:build:production"
|
|
111
|
+
},
|
|
112
|
+
"development": {
|
|
113
|
+
"browserTarget": "demo-app:build:development"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"defaultConfiguration": "development"
|
|
117
|
+
},
|
|
118
|
+
"extract-i18n": {
|
|
119
|
+
"builder": "@angular-devkit/build-angular:extract-i18n",
|
|
120
|
+
"options": {
|
|
121
|
+
"browserTarget": "demo-app:build"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"test": {
|
|
125
|
+
"builder": "@angular-devkit/build-angular:karma",
|
|
126
|
+
"options": {
|
|
127
|
+
"polyfills": ["zone.js", "zone.js/testing"],
|
|
128
|
+
"tsConfig": "projects/demo-app/tsconfig.spec.json",
|
|
129
|
+
"inlineStyleLanguage": "scss",
|
|
130
|
+
"assets": [
|
|
131
|
+
"projects/demo-app/src/favicon.ico",
|
|
132
|
+
"projects/demo-app/src/assets"
|
|
133
|
+
],
|
|
134
|
+
"styles": ["projects/demo-app/src/styles.scss"],
|
|
135
|
+
"scripts": []
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"lint": {
|
|
139
|
+
"builder": "@angular-eslint/builder:lint",
|
|
140
|
+
"options": {
|
|
141
|
+
"lintFilePatterns": [
|
|
142
|
+
"projects/demo-app/**/*.ts",
|
|
143
|
+
"projects/demo-app/**/*.html"
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"cli": {
|
|
151
|
+
"schematicCollections": ["@angular-eslint/schematics"],
|
|
152
|
+
"analytics": false
|
|
153
|
+
}
|
|
154
|
+
}
|
package/jest.config.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
preset: 'jest-preset-angular',
|
|
3
|
+
setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
|
|
4
|
+
roots: ['<rootDir>/projects/angular-sdk', '<rootDir>/projects/demo-app'],
|
|
5
|
+
collectCoverage: true,
|
|
6
|
+
coverageDirectory: 'coverage',
|
|
7
|
+
collectCoverageFrom: ['projects/**/*.{js,ts}'],
|
|
8
|
+
transform: {
|
|
9
|
+
'^.+\\.(ts|js|html)$': [
|
|
10
|
+
'jest-preset-angular',
|
|
11
|
+
{
|
|
12
|
+
tsconfig: './projects/angular-sdk/tsconfig.spec.json',
|
|
13
|
+
stringifyContentPathRegex: '\\.(html|svg)$'
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
};
|
package/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@descope/angular-sdk",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-cc7eda17-20231228",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=16.0.0",
|
|
6
6
|
"@angular/core": ">=16.0.0"
|
|
7
7
|
},
|
|
8
|
-
"files": [
|
|
9
|
-
"dist"
|
|
10
|
-
],
|
|
11
8
|
"license": "MIT",
|
|
12
9
|
"engines": {
|
|
13
10
|
"node": "^16.14.0 || >=18.10.0",
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../.eslintrc.json",
|
|
3
|
+
"ignorePatterns": ["!**/*"],
|
|
4
|
+
"overrides": [
|
|
5
|
+
{
|
|
6
|
+
"files": ["*.ts"],
|
|
7
|
+
"rules": {
|
|
8
|
+
"@angular-eslint/directive-selector": [
|
|
9
|
+
"error",
|
|
10
|
+
{
|
|
11
|
+
"type": "attribute",
|
|
12
|
+
"prefix": "lib",
|
|
13
|
+
"style": "camelCase"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"@angular-eslint/component-selector": [
|
|
17
|
+
"error",
|
|
18
|
+
{
|
|
19
|
+
"type": "element",
|
|
20
|
+
"prefix": "",
|
|
21
|
+
"style": "kebab-case"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"@angular-eslint/no-output-native": "off"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"files": ["*.html"],
|
|
29
|
+
"rules": {}
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|