@descope/angular-sdk 0.0.0-next-cc7eda17-20231228 → 0.0.0-next-7122eda6-20231231

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.
Files changed (111) hide show
  1. package/README.md +11 -450
  2. package/environment.d.ts +3 -0
  3. package/esm2022/descope-angular-sdk.mjs +5 -0
  4. package/esm2022/environment.mjs +4 -0
  5. package/esm2022/lib/components/descope/descope.component.mjs +106 -0
  6. package/esm2022/lib/components/sign-in-flow/sign-in-flow.component.mjs +40 -0
  7. package/esm2022/lib/components/sign-up-flow/sign-up-flow.component.mjs +40 -0
  8. package/esm2022/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.mjs +40 -0
  9. package/esm2022/lib/descope-auth.module.mjs +52 -0
  10. package/esm2022/lib/services/descope-auth.guard.mjs +15 -0
  11. package/esm2022/lib/services/descope-auth.service.mjs +139 -0
  12. package/esm2022/lib/services/descope.interceptor.mjs +51 -0
  13. package/esm2022/lib/types/types.mjs +6 -0
  14. package/esm2022/lib/utils/constants.mjs +7 -0
  15. package/esm2022/lib/utils/helpers.mjs +27 -0
  16. package/esm2022/public-api.mjs +13 -0
  17. package/fesm2022/descope-angular-sdk.mjs +500 -0
  18. package/fesm2022/descope-angular-sdk.mjs.map +1 -0
  19. package/index.d.ts +5 -0
  20. package/lib/components/descope/descope.component.d.ts +32 -0
  21. package/lib/components/sign-in-flow/sign-in-flow.component.d.ts +24 -0
  22. package/lib/components/sign-up-flow/sign-up-flow.component.d.ts +24 -0
  23. package/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.d.ts +24 -0
  24. package/lib/descope-auth.module.d.ts +14 -0
  25. package/lib/services/descope-auth.guard.d.ts +2 -0
  26. package/lib/services/descope-auth.service.d.ts +38 -0
  27. package/lib/services/descope.interceptor.d.ts +2 -0
  28. package/lib/types/types.d.ts +8 -0
  29. package/lib/utils/constants.d.ts +5 -0
  30. package/lib/utils/helpers.d.ts +5 -0
  31. package/package.json +38 -77
  32. package/{projects/angular-sdk/src/public-api.ts → public-api.d.ts} +0 -4
  33. package/.editorconfig +0 -16
  34. package/.eslintrc.json +0 -40
  35. package/.github/workflows/ci.yml +0 -98
  36. package/.github/workflows/publish-next.yml +0 -43
  37. package/.github/workflows/publish.yml +0 -31
  38. package/.github/workflows/release.yml +0 -41
  39. package/.husky/pre-commit +0 -4
  40. package/.prettierrc +0 -8
  41. package/.vscode/extensions.json +0 -4
  42. package/.vscode/launch.json +0 -20
  43. package/.vscode/settings.json +0 -3
  44. package/.vscode/tasks.json +0 -42
  45. package/LICENSE +0 -21
  46. package/angular.json +0 -154
  47. package/jest.config.js +0 -17
  48. package/projects/angular-sdk/.eslintrc.json +0 -32
  49. package/projects/angular-sdk/README.md +0 -21
  50. package/projects/angular-sdk/ng-package.json +0 -8
  51. package/projects/angular-sdk/src/environment.ts +0 -3
  52. package/projects/angular-sdk/src/lib/components/descope/descope.component.spec.ts +0 -104
  53. package/projects/angular-sdk/src/lib/components/descope/descope.component.ts +0 -114
  54. package/projects/angular-sdk/src/lib/components/sign-in-flow/sign-in-flow.component.html +0 -15
  55. package/projects/angular-sdk/src/lib/components/sign-in-flow/sign-in-flow.component.spec.ts +0 -53
  56. package/projects/angular-sdk/src/lib/components/sign-in-flow/sign-in-flow.component.ts +0 -32
  57. package/projects/angular-sdk/src/lib/components/sign-up-flow/sign-up-flow.component.html +0 -15
  58. package/projects/angular-sdk/src/lib/components/sign-up-flow/sign-up-flow.component.spec.ts +0 -51
  59. package/projects/angular-sdk/src/lib/components/sign-up-flow/sign-up-flow.component.ts +0 -32
  60. package/projects/angular-sdk/src/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.html +0 -15
  61. package/projects/angular-sdk/src/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.spec.ts +0 -53
  62. package/projects/angular-sdk/src/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.ts +0 -32
  63. package/projects/angular-sdk/src/lib/descope-auth.module.ts +0 -46
  64. package/projects/angular-sdk/src/lib/services/descope-auth.guard.spec.ts +0 -76
  65. package/projects/angular-sdk/src/lib/services/descope-auth.guard.ts +0 -16
  66. package/projects/angular-sdk/src/lib/services/descope-auth.service.spec.ts +0 -264
  67. package/projects/angular-sdk/src/lib/services/descope-auth.service.ts +0 -176
  68. package/projects/angular-sdk/src/lib/services/descope.interceptor.spec.ts +0 -102
  69. package/projects/angular-sdk/src/lib/services/descope.interceptor.ts +0 -76
  70. package/projects/angular-sdk/src/lib/types/types.ts +0 -10
  71. package/projects/angular-sdk/src/lib/utils/constants.ts +0 -8
  72. package/projects/angular-sdk/src/lib/utils/helpers.spec.ts +0 -103
  73. package/projects/angular-sdk/src/lib/utils/helpers.ts +0 -36
  74. package/projects/angular-sdk/tsconfig.lib.json +0 -12
  75. package/projects/angular-sdk/tsconfig.lib.prod.json +0 -10
  76. package/projects/angular-sdk/tsconfig.spec.json +0 -11
  77. package/projects/demo-app/.eslintrc.json +0 -31
  78. package/projects/demo-app/src/app/app-routing.module.ts +0 -23
  79. package/projects/demo-app/src/app/app.component.html +0 -3
  80. package/projects/demo-app/src/app/app.component.scss +0 -16
  81. package/projects/demo-app/src/app/app.component.spec.ts +0 -37
  82. package/projects/demo-app/src/app/app.component.ts +0 -8
  83. package/projects/demo-app/src/app/app.module.ts +0 -52
  84. package/projects/demo-app/src/app/home/home.component.html +0 -23
  85. package/projects/demo-app/src/app/home/home.component.scss +0 -15
  86. package/projects/demo-app/src/app/home/home.component.spec.ts +0 -44
  87. package/projects/demo-app/src/app/home/home.component.ts +0 -61
  88. package/projects/demo-app/src/app/interceptor/auth.interceptor.ts +0 -20
  89. package/projects/demo-app/src/app/login/login.component.html +0 -12
  90. package/projects/demo-app/src/app/login/login.component.spec.ts +0 -42
  91. package/projects/demo-app/src/app/login/login.component.ts +0 -35
  92. package/projects/demo-app/src/app/protected/protected.component.html +0 -18
  93. package/projects/demo-app/src/app/protected/protected.component.scss +0 -8
  94. package/projects/demo-app/src/app/protected/protected.component.spec.ts +0 -42
  95. package/projects/demo-app/src/app/protected/protected.component.ts +0 -40
  96. package/projects/demo-app/src/assets/.gitkeep +0 -0
  97. package/projects/demo-app/src/environments/conifg.ts +0 -13
  98. package/projects/demo-app/src/environments/environment.ts +0 -19
  99. package/projects/demo-app/src/favicon.ico +0 -0
  100. package/projects/demo-app/src/index.html +0 -17
  101. package/projects/demo-app/src/main.ts +0 -7
  102. package/projects/demo-app/src/styles.scss +0 -21
  103. package/projects/demo-app/tsconfig.app.json +0 -10
  104. package/projects/demo-app/tsconfig.spec.json +0 -10
  105. package/renovate.json +0 -4
  106. package/scripts/gitleaks/.gitleaks.toml +0 -653
  107. package/scripts/gitleaks/gitleaks.sh +0 -34
  108. package/scripts/setversion/setversion.js +0 -20
  109. package/setup-jest.ts +0 -1
  110. package/thirdPartyLicenseCollector_linux_amd64 +0 -0
  111. 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,2 @@
1
+ import { ActivatedRouteSnapshot } from '@angular/router';
2
+ export declare const descopeAuthGuard: (route: ActivatedRouteSnapshot) => import("rxjs").Observable<boolean>;
@@ -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,2 @@
1
+ import { HttpInterceptorFn } from '@angular/common/http';
2
+ export declare const descopeInterceptor: HttpInterceptorFn;
@@ -0,0 +1,8 @@
1
+ import { ILogger } from '@descope/web-component';
2
+ export declare class DescopeAuthConfig {
3
+ projectId: string;
4
+ baseUrl?: string;
5
+ sessionTokenViaCookie?: boolean;
6
+ pathsToIntercept?: string[];
7
+ }
8
+ export type { ILogger };
@@ -0,0 +1,5 @@
1
+ export declare const baseHeaders: {
2
+ 'x-descope-sdk-name': string;
3
+ 'x-descope-sdk-version': string;
4
+ };
5
+ export declare const isBrowser: () => boolean;
@@ -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,78 +1,39 @@
1
1
  {
2
- "name": "@descope/angular-sdk",
3
- "version": "0.0.0-next-cc7eda17-20231228",
4
- "peerDependencies": {
5
- "@angular/common": ">=16.0.0",
6
- "@angular/core": ">=16.0.0"
7
- },
8
- "license": "MIT",
9
- "engines": {
10
- "node": "^16.14.0 || >=18.10.0",
11
- "npm": ">= 8.1.0"
12
- },
13
- "scripts": {
14
- "ng": "ng",
15
- "start": "ng serve",
16
- "prepare": "husky install",
17
- "format-lint": "pretty-quick --staged --ignore-path .gitignore && lint-staged",
18
- "prebuild:ci": "node scripts/setversion/setversion.js",
19
- "build:ci": "npm run build:lib",
20
- "build:lib": "cp package.json ./projects/angular-sdk && ng build angular-sdk",
21
- "build:app": "ng build demo-app",
22
- "watch": "ng build --watch --configuration development",
23
- "test": "jest --config jest.config.js",
24
- "lint": "ng lint",
25
- "format": "prettier . -w --ignore-path .gitignore",
26
- "format-check": "prettier . --check --ignore-path .gitignore",
27
- "prepublishOnly": "npm run build:ci",
28
- "leaks": "bash ./scripts/gitleaks/gitleaks.sh"
29
- },
30
- "lint-staged": {
31
- "+(src|test|examples)/**/*.{js,ts,html}": [
32
- "npm run lint"
33
- ]
34
- },
35
- "dependencies": {
36
- "@descope/web-component": "3.0.0",
37
- "tslib": "^2.3.0"
38
- },
39
- "optionalDependencies": {
40
- "@descope/web-js-sdk": ">=1"
41
- },
42
- "devDependencies": {
43
- "@angular-devkit/build-angular": "^16.2.6",
44
- "@angular-eslint/builder": "16.3.1",
45
- "@angular-eslint/eslint-plugin": "16.3.1",
46
- "@angular-eslint/eslint-plugin-template": "16.3.1",
47
- "@angular-eslint/schematics": "16.3.1",
48
- "@angular-eslint/template-parser": "16.3.1",
49
- "@angular/animations": "^16.2.9",
50
- "@angular/cli": "^16.2.6",
51
- "@angular/common": "^16.2.9",
52
- "@angular/compiler": "^16.2.9",
53
- "@angular/compiler-cli": "^16.2.9",
54
- "@angular/core": "^16.2.9",
55
- "@angular/forms": "^16.2.9",
56
- "@angular/platform-browser": "^16.2.9",
57
- "@angular/platform-browser-dynamic": "^16.2.9",
58
- "@angular/router": "^16.2.9",
59
- "@descope/web-component": "3.0.0",
60
- "@types/jest": "^29.5.5",
61
- "@typescript-eslint/eslint-plugin": "6.11.0",
62
- "@typescript-eslint/parser": "6.11.0",
63
- "eslint": "^8.51.0",
64
- "eslint-plugin-prettier": "^4.2.1",
65
- "husky": "^8.0.3",
66
- "jest": "^29.7.0",
67
- "jest-preset-angular": "^13.1.2",
68
- "lint-staged": "^15.2.0",
69
- "ng-mocks": "^14.11.0",
70
- "ng-packagr": "^16.2.3",
71
- "prettier": "2.8.8",
72
- "pretty-quick": "^3.1.3",
73
- "rxjs": "~7.8.1",
74
- "tslib": "^2.6.2",
75
- "typescript": "~5.1.6",
76
- "zone.js": "~0.13.0"
77
- }
78
- }
2
+ "name": "@descope/angular-sdk",
3
+ "version": "0.0.0-next-7122eda6-20231231",
4
+ "peerDependencies": {
5
+ "@angular/common": ">=16.0.0",
6
+ "@angular/core": ">=16.0.0"
7
+ },
8
+ "license": "MIT",
9
+ "engines": {
10
+ "node": "^16.14.0 || >=18.10.0",
11
+ "npm": ">= 8.1.0"
12
+ },
13
+ "lint-staged": {
14
+ "+(src|test|examples)/**/*.{js,ts,html}": [
15
+ "npm run lint"
16
+ ]
17
+ },
18
+ "dependencies": {
19
+ "@descope/web-component": "3.0.0",
20
+ "tslib": "^2.3.0"
21
+ },
22
+ "optionalDependencies": {
23
+ "@descope/web-js-sdk": ">=1"
24
+ },
25
+ "module": "fesm2022/descope-angular-sdk.mjs",
26
+ "typings": "index.d.ts",
27
+ "exports": {
28
+ "./package.json": {
29
+ "default": "./package.json"
30
+ },
31
+ ".": {
32
+ "types": "./index.d.ts",
33
+ "esm2022": "./esm2022/descope-angular-sdk.mjs",
34
+ "esm": "./esm2022/descope-angular-sdk.mjs",
35
+ "default": "./fesm2022/descope-angular-sdk.mjs"
36
+ }
37
+ },
38
+ "sideEffects": false
39
+ }
@@ -1,7 +1,3 @@
1
- /*
2
- * Public API Surface of angular-sdk
3
- */
4
-
5
1
  export * from './lib/services/descope-auth.service';
6
2
  export * from './lib/services/descope-auth.guard';
7
3
  export * from './lib/services/descope.interceptor';
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
- }
@@ -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 .
@@ -1,43 +0,0 @@
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 }}
@@ -1,31 +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: 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 }}
@@ -1,41 +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
- - 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/.husky/pre-commit DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env sh
2
- . "$(dirname -- "$0")/_/husky.sh"
3
-
4
- npm run format-lint
package/.prettierrc DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "tabWidth": 2,
3
- "useTabs": true,
4
- "semi": true,
5
- "singleQuote": true,
6
- "trailingComma": "none",
7
- "printWidth": 80
8
- }
@@ -1,4 +0,0 @@
1
- {
2
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
3
- "recommendations": ["angular.ng-template"]
4
- }
@@ -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
- }
@@ -1,3 +0,0 @@
1
- {
2
- "cSpell.words": ["setversion"]
3
- }
@@ -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.