@descope/angular-sdk 0.0.0-next-a4c70ed4-20231227 → 0.0.0-next-a14bbb42-20231227
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/README.md +13 -448
- package/environment.d.ts +3 -0
- package/esm2022/descope-angular-sdk.mjs +5 -0
- package/esm2022/environment.mjs +4 -0
- package/esm2022/lib/components/descope/descope.component.mjs +106 -0
- package/esm2022/lib/components/sign-in-flow/sign-in-flow.component.mjs +40 -0
- package/esm2022/lib/components/sign-up-flow/sign-up-flow.component.mjs +40 -0
- package/esm2022/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.mjs +40 -0
- package/esm2022/lib/descope-auth.module.mjs +52 -0
- package/esm2022/lib/services/descope-auth.guard.mjs +15 -0
- package/esm2022/lib/services/descope-auth.service.mjs +139 -0
- package/esm2022/lib/services/descope.interceptor.mjs +51 -0
- package/esm2022/lib/types/types.mjs +6 -0
- package/esm2022/lib/utils/constants.mjs +7 -0
- package/esm2022/lib/utils/helpers.mjs +27 -0
- package/esm2022/public-api.mjs +13 -0
- package/fesm2022/descope-angular-sdk.mjs +500 -0
- package/fesm2022/descope-angular-sdk.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/descope/descope.component.d.ts +32 -0
- package/lib/components/sign-in-flow/sign-in-flow.component.d.ts +24 -0
- package/lib/components/sign-up-flow/sign-up-flow.component.d.ts +24 -0
- package/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.d.ts +24 -0
- package/lib/descope-auth.module.d.ts +14 -0
- package/lib/services/descope-auth.guard.d.ts +2 -0
- package/lib/services/descope-auth.service.d.ts +38 -0
- package/lib/services/descope.interceptor.d.ts +2 -0
- package/lib/types/types.d.ts +8 -0
- package/lib/utils/constants.d.ts +5 -0
- package/lib/utils/helpers.d.ts +5 -0
- package/package.json +32 -66
- package/{projects/angular-sdk/src/public-api.ts → public-api.d.ts} +0 -4
- package/.editorconfig +0 -16
- package/.eslintrc.json +0 -40
- package/.github/workflows/ci.yml +0 -98
- package/.github/workflows/publish-next.yml +0 -40
- package/.github/workflows/publish.yml +0 -28
- package/.github/workflows/release.yml +0 -45
- package/.husky/pre-commit +0 -4
- package/.prettierrc +0 -8
- package/.vscode/extensions.json +0 -4
- package/.vscode/launch.json +0 -20
- package/.vscode/settings.json +0 -3
- package/.vscode/tasks.json +0 -42
- package/LICENSE +0 -21
- package/angular.json +0 -154
- package/jest.config.js +0 -17
- package/projects/angular-sdk/.eslintrc.json +0 -32
- package/projects/angular-sdk/README.md +0 -25
- package/projects/angular-sdk/ng-package.json +0 -8
- package/projects/angular-sdk/package.json +0 -20
- package/projects/angular-sdk/src/environment.ts +0 -3
- package/projects/angular-sdk/src/lib/components/descope/descope.component.spec.ts +0 -104
- package/projects/angular-sdk/src/lib/components/descope/descope.component.ts +0 -114
- package/projects/angular-sdk/src/lib/components/sign-in-flow/sign-in-flow.component.html +0 -15
- package/projects/angular-sdk/src/lib/components/sign-in-flow/sign-in-flow.component.spec.ts +0 -53
- package/projects/angular-sdk/src/lib/components/sign-in-flow/sign-in-flow.component.ts +0 -32
- package/projects/angular-sdk/src/lib/components/sign-up-flow/sign-up-flow.component.html +0 -15
- package/projects/angular-sdk/src/lib/components/sign-up-flow/sign-up-flow.component.spec.ts +0 -51
- package/projects/angular-sdk/src/lib/components/sign-up-flow/sign-up-flow.component.ts +0 -32
- package/projects/angular-sdk/src/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.html +0 -15
- package/projects/angular-sdk/src/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.spec.ts +0 -53
- package/projects/angular-sdk/src/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.ts +0 -32
- package/projects/angular-sdk/src/lib/descope-auth.module.ts +0 -46
- package/projects/angular-sdk/src/lib/services/descope-auth.guard.spec.ts +0 -76
- package/projects/angular-sdk/src/lib/services/descope-auth.guard.ts +0 -16
- package/projects/angular-sdk/src/lib/services/descope-auth.service.spec.ts +0 -264
- package/projects/angular-sdk/src/lib/services/descope-auth.service.ts +0 -176
- package/projects/angular-sdk/src/lib/services/descope.interceptor.spec.ts +0 -102
- package/projects/angular-sdk/src/lib/services/descope.interceptor.ts +0 -76
- package/projects/angular-sdk/src/lib/types/types.ts +0 -10
- package/projects/angular-sdk/src/lib/utils/constants.ts +0 -8
- package/projects/angular-sdk/src/lib/utils/helpers.spec.ts +0 -103
- package/projects/angular-sdk/src/lib/utils/helpers.ts +0 -36
- package/projects/angular-sdk/tsconfig.lib.json +0 -12
- package/projects/angular-sdk/tsconfig.lib.prod.json +0 -10
- package/projects/angular-sdk/tsconfig.spec.json +0 -11
- package/projects/demo-app/.eslintrc.json +0 -31
- package/projects/demo-app/src/app/app-routing.module.ts +0 -23
- package/projects/demo-app/src/app/app.component.html +0 -3
- package/projects/demo-app/src/app/app.component.scss +0 -16
- package/projects/demo-app/src/app/app.component.spec.ts +0 -37
- package/projects/demo-app/src/app/app.component.ts +0 -8
- package/projects/demo-app/src/app/app.module.ts +0 -52
- package/projects/demo-app/src/app/home/home.component.html +0 -23
- package/projects/demo-app/src/app/home/home.component.scss +0 -15
- package/projects/demo-app/src/app/home/home.component.spec.ts +0 -44
- package/projects/demo-app/src/app/home/home.component.ts +0 -61
- package/projects/demo-app/src/app/interceptor/auth.interceptor.ts +0 -20
- package/projects/demo-app/src/app/login/login.component.html +0 -12
- package/projects/demo-app/src/app/login/login.component.spec.ts +0 -42
- package/projects/demo-app/src/app/login/login.component.ts +0 -35
- package/projects/demo-app/src/app/protected/protected.component.html +0 -18
- package/projects/demo-app/src/app/protected/protected.component.scss +0 -8
- package/projects/demo-app/src/app/protected/protected.component.spec.ts +0 -42
- package/projects/demo-app/src/app/protected/protected.component.ts +0 -40
- package/projects/demo-app/src/assets/.gitkeep +0 -0
- package/projects/demo-app/src/environments/conifg.ts +0 -13
- package/projects/demo-app/src/environments/environment.ts +0 -19
- package/projects/demo-app/src/favicon.ico +0 -0
- package/projects/demo-app/src/index.html +0 -17
- package/projects/demo-app/src/main.ts +0 -7
- package/projects/demo-app/src/styles.scss +0 -21
- package/projects/demo-app/tsconfig.app.json +0 -10
- package/projects/demo-app/tsconfig.spec.json +0 -10
- package/renovate.json +0 -4
- package/scripts/gitleaks/.gitleaks.toml +0 -653
- package/scripts/gitleaks/gitleaks.sh +0 -34
- package/scripts/setversion/setversion.js +0 -20
- package/setup-jest.ts +0 -1
- package/thirdPartyLicenseCollector_linux_amd64 +0 -0
- package/tsconfig.json +0 -35
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { ILogger } from '@descope/web-component';
|
|
3
|
+
import { DescopeAuthConfig } from '../../types/types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class SignUpFlowComponent {
|
|
6
|
+
projectId: string;
|
|
7
|
+
locale: string;
|
|
8
|
+
theme: 'light' | 'dark' | 'os';
|
|
9
|
+
tenant: string;
|
|
10
|
+
telemetryKey: string;
|
|
11
|
+
redirectUrl: string;
|
|
12
|
+
autoFocus: true | false | 'skipFirstScreen';
|
|
13
|
+
debug: boolean;
|
|
14
|
+
errorTransformer: (error: {
|
|
15
|
+
text: string;
|
|
16
|
+
type: string;
|
|
17
|
+
}) => string;
|
|
18
|
+
logger: ILogger;
|
|
19
|
+
success: EventEmitter<void>;
|
|
20
|
+
error: EventEmitter<void>;
|
|
21
|
+
constructor(descopeConfig: DescopeAuthConfig);
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SignUpFlowComponent, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SignUpFlowComponent, "descope-sign-up-flow", never, { "locale": { "alias": "locale"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "tenant": { "alias": "tenant"; "required": false; }; "telemetryKey": { "alias": "telemetryKey"; "required": false; }; "redirectUrl": { "alias": "redirectUrl"; "required": false; }; "autoFocus": { "alias": "autoFocus"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "errorTransformer": { "alias": "errorTransformer"; "required": false; }; "logger": { "alias": "logger"; "required": false; }; }, { "success": "success"; "error": "error"; }, never, never, true, never>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { ILogger } from '@descope/web-component';
|
|
3
|
+
import { DescopeAuthConfig } from '../../types/types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class SignUpOrInFlowComponent {
|
|
6
|
+
projectId: string;
|
|
7
|
+
locale: string;
|
|
8
|
+
theme: 'light' | 'dark' | 'os';
|
|
9
|
+
tenant: string;
|
|
10
|
+
telemetryKey: string;
|
|
11
|
+
redirectUrl: string;
|
|
12
|
+
autoFocus: true | false | 'skipFirstScreen';
|
|
13
|
+
debug: boolean;
|
|
14
|
+
errorTransformer: (error: {
|
|
15
|
+
text: string;
|
|
16
|
+
type: string;
|
|
17
|
+
}) => string;
|
|
18
|
+
logger: ILogger;
|
|
19
|
+
success: EventEmitter<void>;
|
|
20
|
+
error: EventEmitter<void>;
|
|
21
|
+
constructor(descopeConfig: DescopeAuthConfig);
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SignUpOrInFlowComponent, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SignUpOrInFlowComponent, "descope-sign-up-or-in-flow", never, { "locale": { "alias": "locale"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "tenant": { "alias": "tenant"; "required": false; }; "telemetryKey": { "alias": "telemetryKey"; "required": false; }; "redirectUrl": { "alias": "redirectUrl"; "required": false; }; "autoFocus": { "alias": "autoFocus"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "errorTransformer": { "alias": "errorTransformer"; "required": false; }; "logger": { "alias": "logger"; "required": false; }; }, { "success": "success"; "error": "error"; }, never, never, true, never>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import { DescopeAuthConfig } from './types/types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "./components/descope/descope.component";
|
|
5
|
+
import * as i2 from "./components/sign-in-flow/sign-in-flow.component";
|
|
6
|
+
import * as i3 from "./components/sign-up-flow/sign-up-flow.component";
|
|
7
|
+
import * as i4 from "./components/sign-up-or-in-flow/sign-up-or-in-flow.component";
|
|
8
|
+
export declare class DescopeAuthModule {
|
|
9
|
+
constructor(parentModule?: DescopeAuthModule);
|
|
10
|
+
static forRoot(config?: DescopeAuthConfig): ModuleWithProviders<DescopeAuthModule>;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DescopeAuthModule, [{ optional: true; skipSelf: true; }]>;
|
|
12
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DescopeAuthModule, never, [typeof i1.DescopeComponent, typeof i2.SignInFlowComponent, typeof i3.SignUpFlowComponent, typeof i4.SignUpOrInFlowComponent], [typeof i1.DescopeComponent, typeof i2.SignInFlowComponent, typeof i3.SignUpFlowComponent, typeof i4.SignUpOrInFlowComponent]>;
|
|
13
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DescopeAuthModule>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/// <reference types="core-js-sdk" />
|
|
2
|
+
import type { UserResponse } from '@descope/web-js-sdk';
|
|
3
|
+
import createSdk from '@descope/web-js-sdk';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import { Observablefied } from '../utils/helpers';
|
|
6
|
+
import { DescopeAuthConfig } from '../types/types';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
type DescopeSDK = ReturnType<typeof createSdk>;
|
|
9
|
+
type AngularDescopeSDK = Observablefied<DescopeSDK>;
|
|
10
|
+
export interface DescopeSession {
|
|
11
|
+
isAuthenticated: boolean;
|
|
12
|
+
isSessionLoading: boolean;
|
|
13
|
+
sessionToken: string | null;
|
|
14
|
+
}
|
|
15
|
+
export type DescopeUser = {
|
|
16
|
+
user?: UserResponse;
|
|
17
|
+
isUserLoading: boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare class DescopeAuthService {
|
|
20
|
+
descopeSdk: AngularDescopeSDK;
|
|
21
|
+
private readonly sessionSubject;
|
|
22
|
+
private readonly userSubject;
|
|
23
|
+
readonly session$: Observable<DescopeSession>;
|
|
24
|
+
readonly user$: Observable<DescopeUser>;
|
|
25
|
+
constructor(config: DescopeAuthConfig);
|
|
26
|
+
refreshSession(): Observable<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
|
|
27
|
+
refreshUser(): Observable<import("@descope/core-js-sdk").SdkResponse<UserResponse>>;
|
|
28
|
+
getSessionToken(): string | null;
|
|
29
|
+
getRefreshToken(): string | null;
|
|
30
|
+
getJwtPermissions(token?: string | null, tenant?: string): string[];
|
|
31
|
+
getJwtRoles(token?: string | null, tenant?: string): string[];
|
|
32
|
+
isAuthenticated(): boolean;
|
|
33
|
+
private setSession;
|
|
34
|
+
private setUser;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DescopeAuthService, never>;
|
|
36
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DescopeAuthService>;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
export type Observablefied<T> = {
|
|
3
|
+
[K in keyof T]: T[K] extends (...args: infer Args) => Promise<infer R> ? (...args: Args) => Observable<R> : T[K] extends (...args: infer Args) => infer R ? (...args: Args) => R : T[K] extends object ? Observablefied<T[K]> : T[K];
|
|
4
|
+
};
|
|
5
|
+
export declare function observabilify<T>(value: T): Observablefied<T>;
|
package/package.json
CHANGED
|
@@ -1,67 +1,33 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"@angular-eslint/eslint-plugin": "16.3.1",
|
|
35
|
-
"@angular-eslint/eslint-plugin-template": "16.3.1",
|
|
36
|
-
"@angular-eslint/schematics": "16.3.1",
|
|
37
|
-
"@angular-eslint/template-parser": "16.3.1",
|
|
38
|
-
"@angular/animations": "^16.2.9",
|
|
39
|
-
"@angular/cli": "^16.2.6",
|
|
40
|
-
"@angular/common": "^16.2.9",
|
|
41
|
-
"@angular/compiler": "^16.2.9",
|
|
42
|
-
"@angular/compiler-cli": "^16.2.9",
|
|
43
|
-
"@angular/core": "^16.2.9",
|
|
44
|
-
"@angular/forms": "^16.2.9",
|
|
45
|
-
"@angular/platform-browser": "^16.2.9",
|
|
46
|
-
"@angular/platform-browser-dynamic": "^16.2.9",
|
|
47
|
-
"@angular/router": "^16.2.9",
|
|
48
|
-
"@descope/web-component": "3.0.0",
|
|
49
|
-
"@types/jest": "^29.5.5",
|
|
50
|
-
"@typescript-eslint/eslint-plugin": "6.11.0",
|
|
51
|
-
"@typescript-eslint/parser": "6.11.0",
|
|
52
|
-
"eslint": "^8.51.0",
|
|
53
|
-
"eslint-plugin-prettier": "^4.2.1",
|
|
54
|
-
"husky": "^8.0.3",
|
|
55
|
-
"jest": "^29.7.0",
|
|
56
|
-
"jest-preset-angular": "^13.1.2",
|
|
57
|
-
"lint-staged": "^15.2.0",
|
|
58
|
-
"ng-mocks": "^14.11.0",
|
|
59
|
-
"ng-packagr": "^16.2.3",
|
|
60
|
-
"prettier": "2.8.8",
|
|
61
|
-
"pretty-quick": "^3.1.3",
|
|
62
|
-
"rxjs": "~7.8.1",
|
|
63
|
-
"tslib": "^2.6.2",
|
|
64
|
-
"typescript": "~5.1.6",
|
|
65
|
-
"zone.js": "~0.13.0"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
2
|
+
"name": "@descope/angular-sdk",
|
|
3
|
+
"version": "0.0.0-next-a14bbb42-20231227",
|
|
4
|
+
"engines": {
|
|
5
|
+
"node": "^16.14.0 || ^18.10.0",
|
|
6
|
+
"npm": ">= 8.1.0"
|
|
7
|
+
},
|
|
8
|
+
"peerDependencies": {
|
|
9
|
+
"@angular/common": ">=16.0.0",
|
|
10
|
+
"@angular/core": ">=16.0.0"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@descope/web-component": "3.0.0",
|
|
14
|
+
"tslib": "^2.3.0"
|
|
15
|
+
},
|
|
16
|
+
"optionalDependencies": {
|
|
17
|
+
"@descope/web-js-sdk": ">=1"
|
|
18
|
+
},
|
|
19
|
+
"sideEffects": false,
|
|
20
|
+
"module": "fesm2022/descope-angular-sdk.mjs",
|
|
21
|
+
"typings": "index.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
"./package.json": {
|
|
24
|
+
"default": "./package.json"
|
|
25
|
+
},
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./index.d.ts",
|
|
28
|
+
"esm2022": "./esm2022/descope-angular-sdk.mjs",
|
|
29
|
+
"esm": "./esm2022/descope-angular-sdk.mjs",
|
|
30
|
+
"default": "./fesm2022/descope-angular-sdk.mjs"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
package/.editorconfig
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
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
|
-
}
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
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 ./projects/angular-sdk -npm-node-modules .
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
name: 📢 Publish Next
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
- init # TODO: Remove this branch
|
|
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: Publish to NPM Package Registry
|
|
38
|
-
run: npm publish --access=public --tag next
|
|
39
|
-
env:
|
|
40
|
-
NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_REGISTRY }}
|
|
@@ -1,28 +0,0 @@
|
|
|
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: Publish to NPM Package Registry
|
|
25
|
-
run: npm publish --access=public
|
|
26
|
-
env:
|
|
27
|
-
CI: true
|
|
28
|
-
NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_REGISTRY }}
|
|
@@ -1,45 +0,0 @@
|
|
|
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
|
-
|
|
21
|
-
- name: cat package.json
|
|
22
|
-
run: cat ./package.json
|
|
23
|
-
|
|
24
|
-
- name: Get token
|
|
25
|
-
id: get_token
|
|
26
|
-
uses: tibdex/github-app-token@v1
|
|
27
|
-
with:
|
|
28
|
-
private_key: ${{ secrets.RELEASE_APP_PEM }}
|
|
29
|
-
app_id: ${{ secrets.RELEASE_APP_ID }}
|
|
30
|
-
|
|
31
|
-
- name: Automated Version Bump
|
|
32
|
-
id: version-bump
|
|
33
|
-
uses: phips28/gh-action-bump-version@master
|
|
34
|
-
with:
|
|
35
|
-
tag-prefix: release/v
|
|
36
|
-
major-wording: 'MAJOR'
|
|
37
|
-
minor-wording: 'MINOR'
|
|
38
|
-
env:
|
|
39
|
-
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
|
|
40
|
-
- name: cat package.json
|
|
41
|
-
run: cat ./package.json
|
|
42
|
-
- name: Output Step
|
|
43
|
-
env:
|
|
44
|
-
NEW_TAG: ${{ steps.version-bump.outputs.newTag }}
|
|
45
|
-
run: echo "new tag $NEW_TAG"
|
package/.husky/pre-commit
DELETED
package/.prettierrc
DELETED
package/.vscode/extensions.json
DELETED
package/.vscode/launch.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
}
|
package/.vscode/settings.json
DELETED
package/.vscode/tasks.json
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
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/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2023 Descope <help@descope.com>
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|