@tsed/cli-plugin-oidc-provider 6.6.3 → 7.0.0-alpha.10

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 (29) hide show
  1. package/lib/esm/CliPluginOidcProviderModule.js +17 -22
  2. package/lib/esm/hooks/OidcProviderInitHook.js +92 -49
  3. package/{templates/init/src/config/oidc/index.ts.hbs → lib/esm/templates/index.template.js} +13 -3
  4. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  5. package/lib/types/CliPluginOidcProviderModule.d.ts +3 -2
  6. package/lib/types/hooks/OidcProviderInitHook.d.ts +9 -9
  7. package/lib/types/templates/index.template.d.ts +23 -0
  8. package/package.json +8 -5
  9. package/templates/{init/src → src}/interactions/__mock__/oidcContext.fixture.ts +2 -2
  10. /package/templates/{init/src → src}/controllers/oidc/InteractionsController.spec.ts +0 -0
  11. /package/templates/{init/src → src}/controllers/oidc/InteractionsController.ts +0 -0
  12. /package/templates/{init/src → src}/interactions/AbortInteraction.ts +0 -0
  13. /package/templates/{init/src → src}/interactions/ConsentInteraction.spec.ts +0 -0
  14. /package/templates/{init/src → src}/interactions/ConsentInteraction.ts +0 -0
  15. /package/templates/{init/src → src}/interactions/CustomInteraction.ts +0 -0
  16. /package/templates/{init/src → src}/interactions/LoginInteraction.spec.ts +0 -0
  17. /package/templates/{init/src → src}/interactions/LoginInteraction.ts +0 -0
  18. /package/templates/{init/src → src}/models/Account.ts +0 -0
  19. /package/templates/{init/src → src}/services/Accounts.ts +0 -0
  20. /package/templates/{init/views → views}/consent.ejs +0 -0
  21. /package/templates/{init/views → views}/forms/consent-form.ejs +0 -0
  22. /package/templates/{init/views → views}/forms/login-form.ejs +0 -0
  23. /package/templates/{init/views → views}/forms/select-account-form.ejs +0 -0
  24. /package/templates/{init/views → views}/login.ejs +0 -0
  25. /package/templates/{init/views → views}/partials/footer.ejs +0 -0
  26. /package/templates/{init/views → views}/partials/header.ejs +0 -0
  27. /package/templates/{init/views → views}/partials/login-help.ejs +0 -0
  28. /package/templates/{init/views → views}/repost.ejs +0 -0
  29. /package/templates/{init/views → views}/select_account.ejs +0 -0
@@ -1,5 +1,6 @@
1
+ import "./templates/index.template.js";
2
+ import type { RenderDataContext } from "@tsed/cli";
1
3
  import { ProjectPackageJson } from "@tsed/cli-core";
2
4
  export declare class CliPluginOidcProviderModule {
3
- protected packageJson: ProjectPackageJson;
4
- install(): void;
5
+ $alterPackageJson(packageJson: ProjectPackageJson, data: RenderDataContext): ProjectPackageJson;
5
6
  }
@@ -1,10 +1,10 @@
1
- import { type InitCmdContext, RootRendererService } from "@tsed/cli";
2
- import { ProjectPackageJson } from "@tsed/cli-core";
3
- export declare class OidcProviderInitHook {
4
- protected packageJson: ProjectPackageJson;
5
- protected rootRenderer: RootRendererService;
6
- onExec(ctx: InitCmdContext): {
7
- title: string;
8
- task: () => import("rxjs").Observable<unknown>;
9
- }[];
1
+ import { type CliCommandHooks, ProjectClient, type RenderDataContext } from "@tsed/cli";
2
+ export declare class OidcProviderInitHook implements CliCommandHooks {
3
+ $alterRenderFiles(files: string[], data: RenderDataContext): (string | {
4
+ id: string;
5
+ from: string;
6
+ })[];
7
+ $alterProjectFiles(project: ProjectClient, data: RenderDataContext): Promise<ProjectClient>;
8
+ private updateServerFile;
9
+ private updateConfigFile;
10
10
  }
@@ -0,0 +1,23 @@
1
+ declare global {
2
+ namespace TsED {
3
+ interface RenderDataContext {
4
+ oidcBasePath?: string;
5
+ }
6
+ }
7
+ }
8
+ declare const _default: import("@tsed/di").FactoryTokenProvider<{
9
+ id: string;
10
+ label: string;
11
+ description?: string;
12
+ outputDir: string;
13
+ type?: string;
14
+ fileName?: string;
15
+ ext: string | null;
16
+ hidden?: boolean;
17
+ preserveCase?: boolean;
18
+ preserveDirectory?: boolean;
19
+ render(symbolName: string, data: import("@tsed/cli").GenerateCmdContext): Promise<string | undefined | import("@tsed/cli").TemplateRenderReturnType> | string | undefined | import("@tsed/cli").TemplateRenderReturnType;
20
+ prompts?(data: import("@tsed/cli").GenerateCmdContext): import("@tsed/cli-core").QuestionOptions<import("@tsed/cli").GenerateCmdContext>[] | Promise<import("@tsed/cli-core").QuestionOptions<import("@tsed/cli").GenerateCmdContext>[]>;
21
+ hooks?: import("@tsed/di").ProviderOpts["hooks"];
22
+ }>;
23
+ export default _default;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tsed/cli-plugin-oidc-provider",
3
3
  "description": "Ts.ED CLI plugin. Add OIDC Provider",
4
- "version": "6.6.3",
4
+ "version": "7.0.0-alpha.10",
5
5
  "type": "module",
6
6
  "main": "./lib/esm/index.js",
7
7
  "source": "./src/index.ts",
@@ -29,9 +29,9 @@
29
29
  "tslib": "2.7.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@tsed/cli": "6.6.3",
33
- "@tsed/cli-core": "6.6.3",
34
- "@tsed/typescript": "6.6.3",
32
+ "@tsed/cli": "7.0.0-alpha.10",
33
+ "@tsed/cli-core": "7.0.0-alpha.10",
34
+ "@tsed/typescript": "7.0.0-alpha.10",
35
35
  "cross-env": "7.0.3",
36
36
  "typescript": "5.6.2",
37
37
  "vitest": "3.2.4"
@@ -46,5 +46,8 @@
46
46
  },
47
47
  "homepage": "https://github.com/tsedio/tsed-cli/tree/master/packages/cli-plugin-oidc-provider",
48
48
  "author": "Romain Lenzotti",
49
- "license": "MIT"
49
+ "license": "MIT",
50
+ "publishConfig": {
51
+ "tag": "alpha"
52
+ }
50
53
  }
@@ -1,5 +1,5 @@
1
- import { OidcInteractionContext } from "@tsed/oidc-provider";
2
- import { PromptDetail } from "oidc-provider";
1
+ import {OidcInteractionContext} from "@tsed/oidc-provider";
2
+ import {PromptDetail} from "oidc-provider";
3
3
 
4
4
  export function getPromptDetailFixture(opts: Partial<PromptDetail> = {}): PromptDetail {
5
5
  return {
File without changes
File without changes
File without changes
File without changes