@codemation/host 0.0.14 → 0.0.16

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 (77) hide show
  1. package/dist/{AppConfigFactory-DmHOpg8O.d.ts → AppConfigFactory-D_ReOKfV.d.ts} +5 -3
  2. package/dist/{AppConfigFactory-DWIz2hy-.js → AppConfigFactory-JjNqYnGg.js} +41 -3
  3. package/dist/AppConfigFactory-JjNqYnGg.js.map +1 -0
  4. package/dist/{AppContainerFactory-B5eRpvAa.js → AppContainerFactory-_dnF0VOf.js} +272 -105
  5. package/dist/AppContainerFactory-_dnF0VOf.js.map +1 -0
  6. package/dist/{CodemationConfig-D2ULNkec.d.ts → CodemationConfig-u80ZoIrc.d.ts} +18 -10
  7. package/dist/{CodemationConfigNormalizer-CBLxXaRV.d.ts → CodemationConfigNormalizer-DCt0mPPz.d.ts} +2 -2
  8. package/dist/{CodemationConsumerConfigLoader-BLvzcfb7.d.ts → CodemationConsumerConfigLoader-C8iscLBJ.d.ts} +4 -2
  9. package/dist/{CodemationConsumerConfigLoader-BBzAr6L_.js → CodemationConsumerConfigLoader-LGrCspIx.js} +18 -4
  10. package/dist/CodemationConsumerConfigLoader-LGrCspIx.js.map +1 -0
  11. package/dist/CodemationPluginListMerger-CGwOTdZ7.js +57 -0
  12. package/dist/CodemationPluginListMerger-CGwOTdZ7.js.map +1 -0
  13. package/dist/{CodemationPluginListMerger-B0-e4CJ6.d.ts → CodemationPluginListMerger-ZY3R_kTo.d.ts} +79 -117
  14. package/dist/{CredentialServices-BeuMtqYA.d.ts → CredentialServices-Uo1jxSYB.d.ts} +2 -2
  15. package/dist/PublicFrontendBootstrap-p7mS8aWG.d.ts +50 -0
  16. package/dist/{FrontendAppConfigFactory-Bj-DZNlt.d.ts → PublicFrontendBootstrapFactory-BA65IXL4.d.ts} +19 -4
  17. package/dist/{FrontendAppConfigJsonCodec-nOCQI0ag.js → PublicFrontendBootstrapJsonCodec-BdiVGG5R.js} +76 -2
  18. package/dist/PublicFrontendBootstrapJsonCodec-BdiVGG5R.js.map +1 -0
  19. package/dist/PublicFrontendBootstrapJsonCodec-DjkkKXcq.d.ts +35 -0
  20. package/dist/client.d.ts +3 -3
  21. package/dist/client.js +2 -2
  22. package/dist/consumer.d.ts +3 -3
  23. package/dist/consumer.js +1 -1
  24. package/dist/credentials.d.ts +2 -2
  25. package/dist/index.d.ts +44 -12
  26. package/dist/index.js +8 -8
  27. package/dist/nextServer.d.ts +30 -9
  28. package/dist/nextServer.js +4 -4
  29. package/dist/{persistenceServer-CaehMh3M.d.ts → persistenceServer-BKbOs-TQ.d.ts} +2 -2
  30. package/dist/{persistenceServer-DVeWUbc3.js → persistenceServer-J2teHIIg.js} +2 -2
  31. package/dist/{persistenceServer-DVeWUbc3.js.map → persistenceServer-J2teHIIg.js.map} +1 -1
  32. package/dist/persistenceServer.d.ts +4 -4
  33. package/dist/persistenceServer.js +2 -2
  34. package/dist/{server-C65z_kqm.js → server-CVC7QBwT.js} +42 -25
  35. package/dist/server-CVC7QBwT.js.map +1 -0
  36. package/dist/{server-Dyo8qh4k.d.ts → server-CbcnGZHm.d.ts} +14 -19
  37. package/dist/server.d.ts +10 -10
  38. package/dist/server.js +7 -7
  39. package/package.json +5 -5
  40. package/src/application/dev/BootRuntimeSummary.types.ts +2 -0
  41. package/src/application/dev/DevBootstrapSummaryAssembler.ts +1 -0
  42. package/src/application/dev/DevBootstrapSummaryJson.types.ts +6 -0
  43. package/src/bootstrap/AppContainerFactory.ts +101 -6
  44. package/src/bootstrap/runtime/AppConfigFactory.ts +22 -2
  45. package/src/client.ts +4 -0
  46. package/src/index.ts +13 -5
  47. package/src/infrastructure/config/CodemationPluginRegistrar.ts +6 -0
  48. package/src/infrastructure/di/HandlesCommandRegistry.ts +1 -10
  49. package/src/infrastructure/di/HandlesQueryRegistry.ts +1 -10
  50. package/src/nextServer.ts +4 -0
  51. package/src/presentation/config/AppConfig.ts +6 -0
  52. package/src/presentation/config/CodemationPackageManifest.ts +1 -7
  53. package/src/presentation/config/CodemationPlugin.ts +45 -9
  54. package/src/presentation/config/CodemationPluginListMerger.ts +30 -26
  55. package/src/presentation/frontend/InternalAuthBootstrap.ts +12 -0
  56. package/src/presentation/frontend/InternalAuthBootstrapFactory.ts +26 -0
  57. package/src/presentation/frontend/InternalAuthBootstrapJsonCodec.ts +49 -0
  58. package/src/presentation/frontend/PublicFrontendBootstrap.ts +12 -0
  59. package/src/presentation/frontend/PublicFrontendBootstrapFactory.ts +23 -0
  60. package/src/presentation/frontend/PublicFrontendBootstrapJsonCodec.ts +48 -0
  61. package/src/presentation/http/ApiPaths.ts +10 -0
  62. package/src/presentation/http/hono/HonoHttpAnonymousRoutePolicyRegistry.ts +3 -0
  63. package/src/presentation/http/hono/registrars/BootstrapHonoApiRouteRegistrar.ts +32 -0
  64. package/src/presentation/http/routeHandlers/InternalAuthBootstrapHttpRouteHandler.ts +18 -0
  65. package/src/presentation/http/routeHandlers/PublicFrontendBootstrapHttpRouteHandler.ts +18 -0
  66. package/src/presentation/server/CodemationConsumerConfigLoader.ts +16 -3
  67. package/src/presentation/server/CodemationPluginDiscovery.ts +59 -28
  68. package/src/server.ts +6 -0
  69. package/dist/AppConfigFactory-DWIz2hy-.js.map +0 -1
  70. package/dist/AppContainerFactory-B5eRpvAa.js.map +0 -1
  71. package/dist/CodemationConsumerConfigLoader-BBzAr6L_.js.map +0 -1
  72. package/dist/CodemationPluginListMerger-DrVOw9KP.js +0 -57
  73. package/dist/CodemationPluginListMerger-DrVOw9KP.js.map +0 -1
  74. package/dist/FrontendAppConfig-D50wjj_n.d.ts +0 -27
  75. package/dist/FrontendAppConfigJsonCodec-1_L7H_Qo.d.ts +0 -20
  76. package/dist/FrontendAppConfigJsonCodec-nOCQI0ag.js.map +0 -1
  77. package/dist/server-C65z_kqm.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { t as CodemationAuthConfig } from "./CodemationAuthConfig-Bh2cCNCI.js";
2
- import { r as CodemationFrontendAuthSnapshot, t as FrontendAppConfig } from "./FrontendAppConfig-D50wjj_n.js";
3
- import { g as AppConfig } from "./CodemationConfig-D2ULNkec.js";
2
+ import { a as CodemationFrontendAuthSnapshot, n as InternalAuthBootstrap, r as FrontendAppConfig, t as PublicFrontendBootstrap } from "./PublicFrontendBootstrap-p7mS8aWG.js";
3
+ import { g as AppConfig } from "./CodemationConfig-u80ZoIrc.js";
4
4
 
5
5
  //#region src/application/contracts/WorkflowViewContracts.d.ts
6
6
  type WorkflowNodeDto = Readonly<{
@@ -70,5 +70,20 @@ declare class FrontendAppConfigFactory {
70
70
  create(): FrontendAppConfig;
71
71
  }
72
72
  //#endregion
73
- export { WorkflowSummary as i, CodemationFrontendAuthSnapshotFactory as n, WorkflowDto as r, FrontendAppConfigFactory as t };
74
- //# sourceMappingURL=FrontendAppConfigFactory-Bj-DZNlt.d.ts.map
73
+ //#region src/presentation/frontend/InternalAuthBootstrapFactory.d.ts
74
+ declare class InternalAuthBootstrapFactory {
75
+ private readonly appConfig;
76
+ private readonly authSnapshotFactory;
77
+ constructor(appConfig: AppConfig, authSnapshotFactory: CodemationFrontendAuthSnapshotFactory);
78
+ create(): InternalAuthBootstrap;
79
+ }
80
+ //#endregion
81
+ //#region src/presentation/frontend/PublicFrontendBootstrapFactory.d.ts
82
+ declare class PublicFrontendBootstrapFactory {
83
+ private readonly frontendAppConfigFactory;
84
+ constructor(frontendAppConfigFactory: FrontendAppConfigFactory);
85
+ create(): PublicFrontendBootstrap;
86
+ }
87
+ //#endregion
88
+ export { WorkflowDto as a, CodemationFrontendAuthSnapshotFactory as i, InternalAuthBootstrapFactory as n, WorkflowSummary as o, FrontendAppConfigFactory as r, PublicFrontendBootstrapFactory as t };
89
+ //# sourceMappingURL=PublicFrontendBootstrapFactory-BA65IXL4.d.ts.map
@@ -80,5 +80,79 @@ var FrontendAppConfigJsonCodec = class {
80
80
  };
81
81
 
82
82
  //#endregion
83
- export { CodemationFrontendAuthSnapshotJsonCodec as n, FrontendAppConfigJsonCodec as t };
84
- //# sourceMappingURL=FrontendAppConfigJsonCodec-nOCQI0ag.js.map
83
+ //#region src/presentation/frontend/InternalAuthBootstrapJsonCodec.ts
84
+ var InternalAuthBootstrapJsonCodec = class {
85
+ serialize(bootstrap) {
86
+ return JSON.stringify(bootstrap);
87
+ }
88
+ deserialize(serialized) {
89
+ if (!serialized || serialized.trim().length === 0) return null;
90
+ try {
91
+ const parsed = JSON.parse(serialized);
92
+ if (!parsed || typeof parsed !== "object") return null;
93
+ return {
94
+ authConfig: this.resolveAuthConfig(parsed.authConfig),
95
+ credentialsEnabled: parsed.credentialsEnabled === true,
96
+ oauthProviders: this.resolveOauthProviders(parsed.oauthProviders),
97
+ uiAuthEnabled: parsed.uiAuthEnabled !== false
98
+ };
99
+ } catch {
100
+ return null;
101
+ }
102
+ }
103
+ resolveAuthConfig(value) {
104
+ return value && typeof value === "object" ? value : void 0;
105
+ }
106
+ resolveOauthProviders(value) {
107
+ if (!Array.isArray(value)) return [];
108
+ return value.flatMap((entry) => {
109
+ if (!entry || typeof entry !== "object") return [];
110
+ const provider = entry;
111
+ if (typeof provider.id !== "string" || typeof provider.name !== "string") return [];
112
+ return [{
113
+ id: provider.id,
114
+ name: provider.name
115
+ }];
116
+ });
117
+ }
118
+ };
119
+
120
+ //#endregion
121
+ //#region src/presentation/frontend/PublicFrontendBootstrapJsonCodec.ts
122
+ var PublicFrontendBootstrapJsonCodec = class {
123
+ serialize(bootstrap) {
124
+ return JSON.stringify(bootstrap);
125
+ }
126
+ deserialize(serialized) {
127
+ if (!serialized || serialized.trim().length === 0) return null;
128
+ try {
129
+ const parsed = JSON.parse(serialized);
130
+ if (!parsed || typeof parsed !== "object") return null;
131
+ return {
132
+ credentialsEnabled: parsed.credentialsEnabled === true,
133
+ logoUrl: typeof parsed.logoUrl === "string" && parsed.logoUrl.trim().length > 0 ? parsed.logoUrl : null,
134
+ oauthProviders: this.resolveOauthProviders(parsed.oauthProviders),
135
+ productName: typeof parsed.productName === "string" && parsed.productName.trim().length > 0 ? parsed.productName : "Codemation",
136
+ uiAuthEnabled: parsed.uiAuthEnabled !== false
137
+ };
138
+ } catch {
139
+ return null;
140
+ }
141
+ }
142
+ resolveOauthProviders(value) {
143
+ if (!Array.isArray(value)) return [];
144
+ return value.flatMap((entry) => {
145
+ if (!entry || typeof entry !== "object") return [];
146
+ const provider = entry;
147
+ if (typeof provider.id !== "string" || typeof provider.name !== "string") return [];
148
+ return [{
149
+ id: provider.id,
150
+ name: provider.name
151
+ }];
152
+ });
153
+ }
154
+ };
155
+
156
+ //#endregion
157
+ export { CodemationFrontendAuthSnapshotJsonCodec as i, InternalAuthBootstrapJsonCodec as n, FrontendAppConfigJsonCodec as r, PublicFrontendBootstrapJsonCodec as t };
158
+ //# sourceMappingURL=PublicFrontendBootstrapJsonCodec-BdiVGG5R.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PublicFrontendBootstrapJsonCodec-BdiVGG5R.js","names":[],"sources":["../src/presentation/frontend/CodemationFrontendAuthSnapshotJsonCodec.ts","../src/presentation/frontend/FrontendAppConfigJsonCodec.ts","../src/presentation/frontend/InternalAuthBootstrapJsonCodec.ts","../src/presentation/frontend/PublicFrontendBootstrapJsonCodec.ts"],"sourcesContent":["import type { CodemationAuthConfig } from \"../config/CodemationAuthConfig\";\n\nimport type {\n CodemationFrontendAuthProviderSnapshot,\n CodemationFrontendAuthSnapshot,\n} from \"./CodemationFrontendAuthSnapshot\";\n\nexport class CodemationFrontendAuthSnapshotJsonCodec {\n serialize(snapshot: CodemationFrontendAuthSnapshot): string {\n return JSON.stringify(snapshot);\n }\n\n deserialize(serialized: string | undefined): CodemationFrontendAuthSnapshot | null {\n if (!serialized || serialized.trim().length === 0) {\n return null;\n }\n try {\n const parsed = JSON.parse(serialized) as Partial<CodemationFrontendAuthSnapshot> | null;\n if (!parsed || typeof parsed !== \"object\") {\n return null;\n }\n return {\n config: this.resolveAuthConfig(parsed.config),\n credentialsEnabled: parsed.credentialsEnabled === true,\n oauthProviders: this.resolveOauthProviders(parsed.oauthProviders),\n secret: typeof parsed.secret === \"string\" && parsed.secret.trim().length > 0 ? parsed.secret : null,\n uiAuthEnabled: parsed.uiAuthEnabled !== false,\n };\n } catch {\n return null;\n }\n }\n\n private resolveAuthConfig(value: unknown): CodemationAuthConfig | undefined {\n return value && typeof value === \"object\" ? (value as CodemationAuthConfig) : undefined;\n }\n\n private resolveOauthProviders(value: unknown): ReadonlyArray<CodemationFrontendAuthProviderSnapshot> {\n if (!Array.isArray(value)) {\n return [];\n }\n return value.flatMap((entry) => {\n if (!entry || typeof entry !== \"object\") {\n return [];\n }\n const provider = entry as Partial<CodemationFrontendAuthProviderSnapshot>;\n if (typeof provider.id !== \"string\" || typeof provider.name !== \"string\") {\n return [];\n }\n return [\n {\n id: provider.id,\n name: provider.name,\n },\n ];\n });\n }\n}\n","import type { CodemationAuthConfig } from \"../config/CodemationAuthConfig\";\nimport type { FrontendAppConfig } from \"./FrontendAppConfig\";\nimport type { CodemationFrontendAuthProviderSnapshot } from \"./CodemationFrontendAuthSnapshot\";\n\nexport class FrontendAppConfigJsonCodec {\n serialize(config: FrontendAppConfig): string {\n return JSON.stringify(config);\n }\n\n deserialize(serialized: string | undefined): FrontendAppConfig | null {\n if (!serialized || serialized.trim().length === 0) {\n return null;\n }\n try {\n const parsed = JSON.parse(serialized) as Partial<FrontendAppConfig> | null;\n if (!parsed || typeof parsed !== \"object\" || !parsed.auth || typeof parsed.auth !== \"object\") {\n return null;\n }\n return {\n auth: {\n config: this.resolveAuthConfig(parsed.auth.config),\n credentialsEnabled: parsed.auth.credentialsEnabled === true,\n oauthProviders: this.resolveOauthProviders(parsed.auth.oauthProviders),\n secret:\n typeof parsed.auth.secret === \"string\" && parsed.auth.secret.trim().length > 0 ? parsed.auth.secret : null,\n uiAuthEnabled: parsed.auth.uiAuthEnabled !== false,\n },\n productName:\n typeof parsed.productName === \"string\" && parsed.productName.trim().length > 0\n ? parsed.productName\n : \"Codemation\",\n logoUrl: typeof parsed.logoUrl === \"string\" && parsed.logoUrl.trim().length > 0 ? parsed.logoUrl : null,\n };\n } catch {\n return null;\n }\n }\n\n private resolveAuthConfig(value: unknown): CodemationAuthConfig | undefined {\n return value && typeof value === \"object\" ? (value as CodemationAuthConfig) : undefined;\n }\n\n private resolveOauthProviders(value: unknown): ReadonlyArray<CodemationFrontendAuthProviderSnapshot> {\n if (!Array.isArray(value)) {\n return [];\n }\n return value.flatMap((entry) => {\n if (!entry || typeof entry !== \"object\") {\n return [];\n }\n const provider = entry as Partial<CodemationFrontendAuthProviderSnapshot>;\n if (typeof provider.id !== \"string\" || typeof provider.name !== \"string\") {\n return [];\n }\n return [{ id: provider.id, name: provider.name }];\n });\n }\n}\n","import type { CodemationAuthConfig } from \"../config/CodemationAuthConfig\";\nimport type { CodemationFrontendAuthProviderSnapshot } from \"./CodemationFrontendAuthSnapshot\";\nimport type { InternalAuthBootstrap } from \"./InternalAuthBootstrap\";\n\nexport class InternalAuthBootstrapJsonCodec {\n serialize(bootstrap: InternalAuthBootstrap): string {\n return JSON.stringify(bootstrap);\n }\n\n deserialize(serialized: string | undefined): InternalAuthBootstrap | null {\n if (!serialized || serialized.trim().length === 0) {\n return null;\n }\n try {\n const parsed = JSON.parse(serialized) as Partial<InternalAuthBootstrap> | null;\n if (!parsed || typeof parsed !== \"object\") {\n return null;\n }\n return {\n authConfig: this.resolveAuthConfig(parsed.authConfig),\n credentialsEnabled: parsed.credentialsEnabled === true,\n oauthProviders: this.resolveOauthProviders(parsed.oauthProviders),\n uiAuthEnabled: parsed.uiAuthEnabled !== false,\n };\n } catch {\n return null;\n }\n }\n\n private resolveAuthConfig(value: unknown): CodemationAuthConfig | undefined {\n return value && typeof value === \"object\" ? (value as CodemationAuthConfig) : undefined;\n }\n\n private resolveOauthProviders(value: unknown): ReadonlyArray<CodemationFrontendAuthProviderSnapshot> {\n if (!Array.isArray(value)) {\n return [];\n }\n return value.flatMap((entry) => {\n if (!entry || typeof entry !== \"object\") {\n return [];\n }\n const provider = entry as Partial<CodemationFrontendAuthProviderSnapshot>;\n if (typeof provider.id !== \"string\" || typeof provider.name !== \"string\") {\n return [];\n }\n return [{ id: provider.id, name: provider.name }];\n });\n }\n}\n","import type { PublicFrontendBootstrap } from \"./PublicFrontendBootstrap\";\nimport type { CodemationFrontendAuthProviderSnapshot } from \"./CodemationFrontendAuthSnapshot\";\n\nexport class PublicFrontendBootstrapJsonCodec {\n serialize(bootstrap: PublicFrontendBootstrap): string {\n return JSON.stringify(bootstrap);\n }\n\n deserialize(serialized: string | undefined): PublicFrontendBootstrap | null {\n if (!serialized || serialized.trim().length === 0) {\n return null;\n }\n try {\n const parsed = JSON.parse(serialized) as Partial<PublicFrontendBootstrap> | null;\n if (!parsed || typeof parsed !== \"object\") {\n return null;\n }\n return {\n credentialsEnabled: parsed.credentialsEnabled === true,\n logoUrl: typeof parsed.logoUrl === \"string\" && parsed.logoUrl.trim().length > 0 ? parsed.logoUrl : null,\n oauthProviders: this.resolveOauthProviders(parsed.oauthProviders),\n productName:\n typeof parsed.productName === \"string\" && parsed.productName.trim().length > 0\n ? parsed.productName\n : \"Codemation\",\n uiAuthEnabled: parsed.uiAuthEnabled !== false,\n };\n } catch {\n return null;\n }\n }\n\n private resolveOauthProviders(value: unknown): ReadonlyArray<CodemationFrontendAuthProviderSnapshot> {\n if (!Array.isArray(value)) {\n return [];\n }\n return value.flatMap((entry) => {\n if (!entry || typeof entry !== \"object\") {\n return [];\n }\n const provider = entry as Partial<CodemationFrontendAuthProviderSnapshot>;\n if (typeof provider.id !== \"string\" || typeof provider.name !== \"string\") {\n return [];\n }\n return [{ id: provider.id, name: provider.name }];\n });\n }\n}\n"],"mappings":"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"}
@@ -0,0 +1,35 @@
1
+ import { a as CodemationFrontendAuthSnapshot, n as InternalAuthBootstrap, r as FrontendAppConfig, t as PublicFrontendBootstrap } from "./PublicFrontendBootstrap-p7mS8aWG.js";
2
+
3
+ //#region src/presentation/frontend/CodemationFrontendAuthSnapshotJsonCodec.d.ts
4
+ declare class CodemationFrontendAuthSnapshotJsonCodec {
5
+ serialize(snapshot: CodemationFrontendAuthSnapshot): string;
6
+ deserialize(serialized: string | undefined): CodemationFrontendAuthSnapshot | null;
7
+ private resolveAuthConfig;
8
+ private resolveOauthProviders;
9
+ }
10
+ //#endregion
11
+ //#region src/presentation/frontend/FrontendAppConfigJsonCodec.d.ts
12
+ declare class FrontendAppConfigJsonCodec {
13
+ serialize(config: FrontendAppConfig): string;
14
+ deserialize(serialized: string | undefined): FrontendAppConfig | null;
15
+ private resolveAuthConfig;
16
+ private resolveOauthProviders;
17
+ }
18
+ //#endregion
19
+ //#region src/presentation/frontend/InternalAuthBootstrapJsonCodec.d.ts
20
+ declare class InternalAuthBootstrapJsonCodec {
21
+ serialize(bootstrap: InternalAuthBootstrap): string;
22
+ deserialize(serialized: string | undefined): InternalAuthBootstrap | null;
23
+ private resolveAuthConfig;
24
+ private resolveOauthProviders;
25
+ }
26
+ //#endregion
27
+ //#region src/presentation/frontend/PublicFrontendBootstrapJsonCodec.d.ts
28
+ declare class PublicFrontendBootstrapJsonCodec {
29
+ serialize(bootstrap: PublicFrontendBootstrap): string;
30
+ deserialize(serialized: string | undefined): PublicFrontendBootstrap | null;
31
+ private resolveOauthProviders;
32
+ }
33
+ //#endregion
34
+ export { CodemationFrontendAuthSnapshotJsonCodec as i, InternalAuthBootstrapJsonCodec as n, FrontendAppConfigJsonCodec as r, PublicFrontendBootstrapJsonCodec as t };
35
+ //# sourceMappingURL=PublicFrontendBootstrapJsonCodec-DjkkKXcq.d.ts.map
package/dist/client.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { a as CodemationWhitelabelConfig, l as Logger, u as LoggerFactory } from "./CodemationAuthConfig-Bh2cCNCI.js";
2
2
  import { t as LogLevelPolicy } from "./LogLevelPolicy-BS_NlAOg.js";
3
- import { n as CodemationFrontendAuthProviderSnapshot, r as CodemationFrontendAuthSnapshot, t as FrontendAppConfig } from "./FrontendAppConfig-D50wjj_n.js";
4
- import { n as CodemationFrontendAuthSnapshotJsonCodec, t as FrontendAppConfigJsonCodec } from "./FrontendAppConfigJsonCodec-1_L7H_Qo.js";
3
+ import { a as CodemationFrontendAuthSnapshot, i as CodemationFrontendAuthProviderSnapshot, n as InternalAuthBootstrap, r as FrontendAppConfig, t as PublicFrontendBootstrap } from "./PublicFrontendBootstrap-p7mS8aWG.js";
4
+ import { i as CodemationFrontendAuthSnapshotJsonCodec, n as InternalAuthBootstrapJsonCodec, r as FrontendAppConfigJsonCodec, t as PublicFrontendBootstrapJsonCodec } from "./PublicFrontendBootstrapJsonCodec-DjkkKXcq.js";
5
5
 
6
6
  //#region src/infrastructure/logging/BrowserLoggerFactory.d.ts
7
7
  declare class BrowserLoggerFactory implements LoggerFactory {
@@ -10,5 +10,5 @@ declare class BrowserLoggerFactory implements LoggerFactory {
10
10
  create(scope: string): Logger;
11
11
  }
12
12
  //#endregion
13
- export { BrowserLoggerFactory, type CodemationFrontendAuthProviderSnapshot, type CodemationFrontendAuthSnapshot, CodemationFrontendAuthSnapshotJsonCodec, type CodemationWhitelabelConfig, type FrontendAppConfig, FrontendAppConfigJsonCodec, type Logger, type LoggerFactory };
13
+ export { BrowserLoggerFactory, type CodemationFrontendAuthProviderSnapshot, type CodemationFrontendAuthSnapshot, CodemationFrontendAuthSnapshotJsonCodec, type CodemationWhitelabelConfig, type FrontendAppConfig, FrontendAppConfigJsonCodec, type InternalAuthBootstrap, InternalAuthBootstrapJsonCodec, type Logger, type LoggerFactory, type PublicFrontendBootstrap, PublicFrontendBootstrapJsonCodec };
14
14
  //# sourceMappingURL=client.d.ts.map
package/dist/client.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as ConsoleLogger } from "./ConsoleLogger-ClPU7jtc.js";
2
- import { n as CodemationFrontendAuthSnapshotJsonCodec, t as FrontendAppConfigJsonCodec } from "./FrontendAppConfigJsonCodec-nOCQI0ag.js";
2
+ import { i as CodemationFrontendAuthSnapshotJsonCodec, n as InternalAuthBootstrapJsonCodec, r as FrontendAppConfigJsonCodec, t as PublicFrontendBootstrapJsonCodec } from "./PublicFrontendBootstrapJsonCodec-BdiVGG5R.js";
3
3
 
4
4
  //#region src/infrastructure/logging/BrowserLoggerFactory.ts
5
5
  var BrowserLoggerFactory = class {
@@ -12,5 +12,5 @@ var BrowserLoggerFactory = class {
12
12
  };
13
13
 
14
14
  //#endregion
15
- export { BrowserLoggerFactory, CodemationFrontendAuthSnapshotJsonCodec, FrontendAppConfigJsonCodec };
15
+ export { BrowserLoggerFactory, CodemationFrontendAuthSnapshotJsonCodec, FrontendAppConfigJsonCodec, InternalAuthBootstrapJsonCodec, PublicFrontendBootstrapJsonCodec };
16
16
  //# sourceMappingURL=client.js.map
@@ -1,6 +1,6 @@
1
1
  import "./CodemationAuthConfig-Bh2cCNCI.js";
2
2
  import "./index-CkiptHb-.js";
3
- import "./CodemationConfig-D2ULNkec.js";
4
- import "./CodemationConfigNormalizer-CBLxXaRV.js";
5
- import { i as CodemationConsumerAppResolver, n as CodemationConsumerConfigResolution, r as CodemationConsumerApp, t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-BLvzcfb7.js";
3
+ import "./CodemationConfig-u80ZoIrc.js";
4
+ import "./CodemationConfigNormalizer-DCt0mPPz.js";
5
+ import { i as CodemationConsumerAppResolver, n as CodemationConsumerConfigResolution, r as CodemationConsumerApp, t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-C8iscLBJ.js";
6
6
  export { type CodemationConsumerApp, CodemationConsumerAppResolver, CodemationConsumerConfigLoader, type CodemationConsumerConfigResolution };
package/dist/consumer.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./ConsoleLogger-ClPU7jtc.js";
2
- import { i as CodemationConsumerAppResolver, t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-BBzAr6L_.js";
2
+ import { i as CodemationConsumerAppResolver, t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-LGrCspIx.js";
3
3
  import "./ServerLoggerFactory-BltIIDfQ.js";
4
4
  import "./decorateParam-DrsXNPuw.js";
5
5
  import "./decorate-B0PP651O.js";
@@ -1,7 +1,7 @@
1
1
  import "./CodemationAuthConfig-Bh2cCNCI.js";
2
2
  import { c as AnyCredentialType, f as CredentialHealth, y as CredentialSessionFactoryArgs } from "./index-CkiptHb-.js";
3
- import "./CodemationConfig-D2ULNkec.js";
4
- import { a as CredentialInstanceService, i as CredentialBindingService, n as CredentialType } from "./CredentialServices-BeuMtqYA.js";
3
+ import "./CodemationConfig-u80ZoIrc.js";
4
+ import { a as CredentialInstanceService, i as CredentialBindingService, n as CredentialType } from "./CredentialServices-Uo1jxSYB.js";
5
5
 
6
6
  //#region src/infrastructure/credentials/OpenAiApiKeyCredentialShapes.types.d.ts
7
7
  /**
package/dist/index.d.ts CHANGED
@@ -1,14 +1,46 @@
1
1
  import { a as CodemationWhitelabelConfig, c as CodemationLogRule, i as CodemationAuthOidcProviderConfig, n as CodemationAuthKind, o as CodemationLogConfig, r as CodemationAuthOAuthProviderConfig, s as CodemationLogLevelName, t as CodemationAuthConfig } from "./CodemationAuthConfig-Bh2cCNCI.js";
2
- import { n as CodemationFrontendAuthProviderSnapshot, r as CodemationFrontendAuthSnapshot, t as FrontendAppConfig } from "./FrontendAppConfig-D50wjj_n.js";
3
- import { n as CodemationFrontendAuthSnapshotJsonCodec, t as FrontendAppConfigJsonCodec } from "./FrontendAppConfigJsonCodec-1_L7H_Qo.js";
2
+ import { a as CodemationFrontendAuthSnapshot, i as CodemationFrontendAuthProviderSnapshot, n as InternalAuthBootstrap, r as FrontendAppConfig, t as PublicFrontendBootstrap } from "./PublicFrontendBootstrap-p7mS8aWG.js";
3
+ import { i as CodemationFrontendAuthSnapshotJsonCodec, n as InternalAuthBootstrapJsonCodec, r as FrontendAppConfigJsonCodec, t as PublicFrontendBootstrapJsonCodec } from "./PublicFrontendBootstrapJsonCodec-DjkkKXcq.js";
4
4
  import "./index-CkiptHb-.js";
5
- import { a as CodemationConfig, c as CodemationEngineExecutionLimitsConfig, d as CodemationSchedulerConfig, f as CodemationSchedulerKind, g as AppConfig, h as CodemationRegistrationContextBase, i as CodemationApplicationRuntimeConfig, l as CodemationEventBusConfig, m as CodemationAppContext, n as CodemationAppSchedulerConfig, o as CodemationDatabaseConfig, p as CodemationWorkflowDiscovery, r as CodemationAppSchedulerKind, s as CodemationDatabaseKind, t as CodemationAppDefinition, u as CodemationEventBusKind, v as CodemationPlugin, x as CodemationClassToken, y as CodemationPluginContext } from "./CodemationConfig-D2ULNkec.js";
6
- import "./CodemationConfigNormalizer-CBLxXaRV.js";
7
- import { t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-BLvzcfb7.js";
8
- import "./CredentialServices-BeuMtqYA.js";
9
- import { _ as QueryBus, c as DatabaseMigrations, g as UpsertLocalBootstrapUserResultDto, h as ListUserAccountsQuery, l as AppContainerLifecycle, m as UpsertLocalBootstrapUserCommand, n as CodemationBootstrapRequest, o as WorkerRuntime, r as ApplicationTokens, s as FrontendRuntime, t as CodemationPluginListMerger, u as AppContainerFactory, v as CommandBus } from "./CodemationPluginListMerger-B0-e4CJ6.js";
10
- import { r as PrismaClient, t as AppConfigFactory } from "./AppConfigFactory-DmHOpg8O.js";
11
- import { c as CodemationServerGateway, d as CodemationPluginPackageManifest, l as ApiPaths, u as CodemationPackageManifest } from "./server-Dyo8qh4k.js";
12
- import { t as CodemationPostgresPrismaClientFactory } from "./persistenceServer-CaehMh3M.js";
13
- import { n as CodemationFrontendAuthSnapshotFactory, t as FrontendAppConfigFactory } from "./FrontendAppConfigFactory-Bj-DZNlt.js";
14
- export { ApiPaths, type AppConfig, AppConfigFactory, AppContainerFactory, AppContainerLifecycle, ApplicationTokens, type CodemationAppContext, type CodemationAppDefinition, type CodemationAppSchedulerConfig, type CodemationAppSchedulerKind, type CodemationApplicationRuntimeConfig, type CodemationAuthConfig, type CodemationAuthKind, type CodemationAuthOAuthProviderConfig, type CodemationAuthOidcProviderConfig, CodemationBootstrapRequest, type CodemationClassToken, type CodemationConfig, CodemationConsumerConfigLoader, type CodemationDatabaseConfig, type CodemationDatabaseKind, type CodemationEngineExecutionLimitsConfig, type CodemationEventBusConfig, type CodemationEventBusKind, type CodemationFrontendAuthProviderSnapshot, type CodemationFrontendAuthSnapshot, CodemationFrontendAuthSnapshotFactory, CodemationFrontendAuthSnapshotJsonCodec, type CodemationLogConfig, type CodemationLogLevelName, type CodemationLogRule, type CodemationPackageManifest, type CodemationPlugin, type CodemationPluginContext, CodemationPluginListMerger, type CodemationPluginPackageManifest, CodemationPostgresPrismaClientFactory, type CodemationRegistrationContextBase, type CodemationSchedulerConfig, type CodemationSchedulerKind, CodemationServerGateway, type CodemationWhitelabelConfig, type CodemationWorkflowDiscovery, type CommandBus, DatabaseMigrations, type FrontendAppConfig, FrontendAppConfigFactory, FrontendAppConfigJsonCodec, FrontendRuntime, ListUserAccountsQuery, PrismaClient, type QueryBus, UpsertLocalBootstrapUserCommand, type UpsertLocalBootstrapUserResultDto, WorkerRuntime };
5
+ import { C as definePlugin, S as CodemationPluginPackageMetadata, T as CodemationClassToken, a as CodemationConfig, b as CodemationPluginConfig, c as CodemationEngineExecutionLimitsConfig, d as CodemationSchedulerConfig, f as CodemationSchedulerKind, g as AppConfig, h as CodemationRegistrationContextBase, i as CodemationApplicationRuntimeConfig, l as CodemationEventBusConfig, m as CodemationAppContext, n as CodemationAppSchedulerConfig, o as CodemationDatabaseConfig, p as CodemationWorkflowDiscovery, r as CodemationAppSchedulerKind, s as CodemationDatabaseKind, t as CodemationAppDefinition, u as CodemationEventBusKind, v as AppPluginLoadSummary, x as CodemationPluginContext, y as CodemationPlugin } from "./CodemationConfig-u80ZoIrc.js";
6
+ import "./CodemationConfigNormalizer-DCt0mPPz.js";
7
+ import { t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-C8iscLBJ.js";
8
+ import "./CredentialServices-Uo1jxSYB.js";
9
+ import { _ as Command, c as WorkerRuntime, d as AppContainerLifecycle, f as AppContainerFactory, g as CommandBus, h as Query, l as FrontendRuntime, m as QueryBus, n as CodemationBootstrapRequest, r as ApplicationTokens, t as CodemationPluginListMerger, u as DatabaseMigrations } from "./CodemationPluginListMerger-ZY3R_kTo.js";
10
+ import { r as PrismaClient, t as AppConfigFactory } from "./AppConfigFactory-D_ReOKfV.js";
11
+ import { t as CodemationPostgresPrismaClientFactory } from "./persistenceServer-BKbOs-TQ.js";
12
+ import { c as CodemationServerGateway, l as ApiPaths } from "./server-CbcnGZHm.js";
13
+ import { i as CodemationFrontendAuthSnapshotFactory, n as InternalAuthBootstrapFactory, r as FrontendAppConfigFactory, t as PublicFrontendBootstrapFactory } from "./PublicFrontendBootstrapFactory-BA65IXL4.js";
14
+
15
+ //#region src/application/contracts/userDirectoryContracts.types.d.ts
16
+ type UserAccountStatus = "invited" | "active" | "inactive";
17
+ type UserAccountDto = Readonly<{
18
+ id: string;
19
+ email: string;
20
+ status: UserAccountStatus;
21
+ inviteExpiresAt: string | null;
22
+ /** Ways the user can sign in (password + linked OAuth / OIDC / email-link accounts). */
23
+ loginMethods: ReadonlyArray<string>;
24
+ }>;
25
+ /** Result of CLI/bootstrap `upsert` for a local password user (distinct from invite-based onboarding). */
26
+ type UpsertLocalBootstrapUserResultDto = Readonly<{
27
+ outcome: "created" | "updated";
28
+ }>;
29
+ //#endregion
30
+ //#region src/application/queries/ListUserAccountsQuery.d.ts
31
+ declare class ListUserAccountsQuery extends Query<ReadonlyArray<UserAccountDto>> {}
32
+ //#endregion
33
+ //#region src/application/commands/UpsertLocalBootstrapUserCommand.d.ts
34
+ declare class UpsertLocalBootstrapUserCommand extends Command<UpsertLocalBootstrapUserResultDto> {
35
+ readonly email: string;
36
+ readonly password: string;
37
+ constructor(email: string, password: string);
38
+ }
39
+ //#endregion
40
+ //#region src/presentation/config/CodemationPackageManifest.d.ts
41
+ interface CodemationPackageManifest {
42
+ readonly plugin?: string;
43
+ }
44
+ //#endregion
45
+ export { ApiPaths, type AppConfig, AppConfigFactory, AppContainerFactory, AppContainerLifecycle, type AppPluginLoadSummary, ApplicationTokens, type CodemationAppContext, type CodemationAppDefinition, type CodemationAppSchedulerConfig, type CodemationAppSchedulerKind, type CodemationApplicationRuntimeConfig, type CodemationAuthConfig, type CodemationAuthKind, type CodemationAuthOAuthProviderConfig, type CodemationAuthOidcProviderConfig, CodemationBootstrapRequest, type CodemationClassToken, type CodemationConfig, CodemationConsumerConfigLoader, type CodemationDatabaseConfig, type CodemationDatabaseKind, type CodemationEngineExecutionLimitsConfig, type CodemationEventBusConfig, type CodemationEventBusKind, type CodemationFrontendAuthProviderSnapshot, type CodemationFrontendAuthSnapshot, CodemationFrontendAuthSnapshotFactory, CodemationFrontendAuthSnapshotJsonCodec, type CodemationLogConfig, type CodemationLogLevelName, type CodemationLogRule, type CodemationPackageManifest, type CodemationPlugin, type CodemationPluginConfig, type CodemationPluginContext, CodemationPluginListMerger, CodemationPluginPackageMetadata, CodemationPostgresPrismaClientFactory, type CodemationRegistrationContextBase, type CodemationSchedulerConfig, type CodemationSchedulerKind, CodemationServerGateway, type CodemationWhitelabelConfig, type CodemationWorkflowDiscovery, type CommandBus, DatabaseMigrations, type FrontendAppConfig, FrontendAppConfigFactory, FrontendAppConfigJsonCodec, FrontendRuntime, type InternalAuthBootstrap, InternalAuthBootstrapFactory, InternalAuthBootstrapJsonCodec, ListUserAccountsQuery, PrismaClient, type PublicFrontendBootstrap, PublicFrontendBootstrapFactory, PublicFrontendBootstrapJsonCodec, type QueryBus, UpsertLocalBootstrapUserCommand, type UpsertLocalBootstrapUserResultDto, WorkerRuntime, definePlugin };
46
+ //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import "./ConsoleLogger-ClPU7jtc.js";
2
- import { n as CodemationFrontendAuthSnapshotJsonCodec, t as FrontendAppConfigJsonCodec } from "./FrontendAppConfigJsonCodec-nOCQI0ag.js";
3
- import { t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-BBzAr6L_.js";
2
+ import { i as CodemationFrontendAuthSnapshotJsonCodec, n as InternalAuthBootstrapJsonCodec, r as FrontendAppConfigJsonCodec, t as PublicFrontendBootstrapJsonCodec } from "./PublicFrontendBootstrapJsonCodec-BdiVGG5R.js";
3
+ import { t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-LGrCspIx.js";
4
4
  import "./ServerLoggerFactory-BltIIDfQ.js";
5
5
  import "./decorateParam-DrsXNPuw.js";
6
6
  import "./decorate-B0PP651O.js";
7
7
  import { u as ApplicationTokens } from "./CredentialServices-DNb3CZwW.js";
8
- import { C as UpsertLocalBootstrapUserCommand, _ as ApiPaths, a as AppContainerLifecycle, h as CodemationFrontendAuthSnapshotFactory, i as DatabaseMigrations, m as FrontendAppConfigFactory, n as WorkerRuntime, r as FrontendRuntime, t as AppContainerFactory, w as ListUserAccountsQuery } from "./AppContainerFactory-B5eRpvAa.js";
9
- import { t as AppConfigFactory } from "./AppConfigFactory-DWIz2hy-.js";
10
- import { n as CodemationBootstrapRequest, t as CodemationPluginListMerger } from "./CodemationPluginListMerger-DrVOw9KP.js";
11
- import { n as CodemationPostgresPrismaClientFactory, t as import_client } from "./persistenceServer-DVeWUbc3.js";
12
- import { r as CodemationServerGateway } from "./server-C65z_kqm.js";
8
+ import { E as ListUserAccountsQuery, T as UpsertLocalBootstrapUserCommand, _ as CodemationFrontendAuthSnapshotFactory, a as AppContainerLifecycle, g as FrontendAppConfigFactory, h as InternalAuthBootstrapFactory, i as DatabaseMigrations, m as PublicFrontendBootstrapFactory, n as WorkerRuntime, r as FrontendRuntime, t as AppContainerFactory, y as ApiPaths } from "./AppContainerFactory-_dnF0VOf.js";
9
+ import { n as CodemationPluginPackageMetadata, r as definePlugin, t as AppConfigFactory } from "./AppConfigFactory-JjNqYnGg.js";
10
+ import { n as CodemationBootstrapRequest, t as CodemationPluginListMerger } from "./CodemationPluginListMerger-CGwOTdZ7.js";
11
+ import { n as CodemationPostgresPrismaClientFactory, t as import_client } from "./persistenceServer-J2teHIIg.js";
12
+ import { r as CodemationServerGateway } from "./server-CVC7QBwT.js";
13
13
 
14
14
  var PrismaClient = import_client.PrismaClient;
15
- export { ApiPaths, AppConfigFactory, AppContainerFactory, AppContainerLifecycle, ApplicationTokens, CodemationBootstrapRequest, CodemationConsumerConfigLoader, CodemationFrontendAuthSnapshotFactory, CodemationFrontendAuthSnapshotJsonCodec, CodemationPluginListMerger, CodemationPostgresPrismaClientFactory, CodemationServerGateway, DatabaseMigrations, FrontendAppConfigFactory, FrontendAppConfigJsonCodec, FrontendRuntime, ListUserAccountsQuery, PrismaClient, UpsertLocalBootstrapUserCommand, WorkerRuntime };
15
+ export { ApiPaths, AppConfigFactory, AppContainerFactory, AppContainerLifecycle, ApplicationTokens, CodemationBootstrapRequest, CodemationConsumerConfigLoader, CodemationFrontendAuthSnapshotFactory, CodemationFrontendAuthSnapshotJsonCodec, CodemationPluginListMerger, CodemationPluginPackageMetadata, CodemationPostgresPrismaClientFactory, CodemationServerGateway, DatabaseMigrations, FrontendAppConfigFactory, FrontendAppConfigJsonCodec, FrontendRuntime, InternalAuthBootstrapFactory, InternalAuthBootstrapJsonCodec, ListUserAccountsQuery, PrismaClient, PublicFrontendBootstrapFactory, PublicFrontendBootstrapJsonCodec, UpsertLocalBootstrapUserCommand, WorkerRuntime, definePlugin };
@@ -1,13 +1,13 @@
1
1
  import { l as Logger, u as LoggerFactory } from "./CodemationAuthConfig-Bh2cCNCI.js";
2
2
  import { t as LogLevelPolicy } from "./LogLevelPolicy-BS_NlAOg.js";
3
- import { n as CodemationFrontendAuthProviderSnapshot, r as CodemationFrontendAuthSnapshot, t as FrontendAppConfig } from "./FrontendAppConfig-D50wjj_n.js";
4
- import { C as CredentialTypeDefinition, E as ActivationIdFactory, M as WorkflowDefinition, O as Item, P as BinaryStorage, R as WebhookInvocationMatch, U as Clock, _ as CredentialOAuth2AuthDefinition, j as RunIdFactory, k as NodeDefinition, t as RunIntentService, z as WorkflowActivationPolicy } from "./index-CkiptHb-.js";
5
- import { g as AppConfig } from "./CodemationConfig-D2ULNkec.js";
6
- import "./CodemationConfigNormalizer-CBLxXaRV.js";
7
- import { a as CredentialInstanceService, c as CredentialFieldEnvOverlayService, i as CredentialBindingService, l as CredentialTypeRegistryImpl, o as CredentialMaterialResolver, r as CredentialRuntimeMaterialService, s as CredentialSecretCipher, t as CredentialStore } from "./CredentialServices-BeuMtqYA.js";
8
- import { _ as QueryBus, a as SessionVerifier, c as DatabaseMigrations, d as WorkflowWebsocketServer, f as RunBinaryAttachmentLookupService, i as HonoApiRouteRegistrar, l as AppContainerLifecycle, n as CodemationBootstrapRequest, o as WorkerRuntime, p as WorkflowRunRepository, r as ApplicationTokens, s as FrontendRuntime, t as CodemationPluginListMerger, u as AppContainerFactory, v as CommandBus } from "./CodemationPluginListMerger-B0-e4CJ6.js";
9
- import { t as AppConfigFactory } from "./AppConfigFactory-DmHOpg8O.js";
10
- import { i as WorkflowSummary, r as WorkflowDto, t as FrontendAppConfigFactory } from "./FrontendAppConfigFactory-Bj-DZNlt.js";
3
+ import { a as CodemationFrontendAuthSnapshot, i as CodemationFrontendAuthProviderSnapshot, n as InternalAuthBootstrap, r as FrontendAppConfig, t as PublicFrontendBootstrap } from "./PublicFrontendBootstrap-p7mS8aWG.js";
4
+ import { C as CredentialTypeDefinition, D as BinaryAttachment, E as ActivationIdFactory, M as WorkflowDefinition, O as Item, P as BinaryStorage, R as WebhookInvocationMatch, U as Clock, _ as CredentialOAuth2AuthDefinition, j as RunIdFactory, k as NodeDefinition, t as RunIntentService, z as WorkflowActivationPolicy } from "./index-CkiptHb-.js";
5
+ import { g as AppConfig } from "./CodemationConfig-u80ZoIrc.js";
6
+ import "./CodemationConfigNormalizer-DCt0mPPz.js";
7
+ import { a as CredentialInstanceService, c as CredentialFieldEnvOverlayService, i as CredentialBindingService, l as CredentialTypeRegistryImpl, o as CredentialMaterialResolver, r as CredentialRuntimeMaterialService, s as CredentialSecretCipher, t as CredentialStore } from "./CredentialServices-Uo1jxSYB.js";
8
+ import { a as WorkflowDebuggerOverlayRepository, c as WorkerRuntime, d as AppContainerLifecycle, f as AppContainerFactory, g as CommandBus, i as HonoApiRouteRegistrar, l as FrontendRuntime, m as QueryBus, n as CodemationBootstrapRequest, o as WorkflowRunRepository, p as WorkflowWebsocketServer, r as ApplicationTokens, s as SessionVerifier, t as CodemationPluginListMerger, u as DatabaseMigrations } from "./CodemationPluginListMerger-ZY3R_kTo.js";
9
+ import { t as AppConfigFactory } from "./AppConfigFactory-D_ReOKfV.js";
10
+ import { a as WorkflowDto, n as InternalAuthBootstrapFactory, o as WorkflowSummary, r as FrontendAppConfigFactory, t as PublicFrontendBootstrapFactory } from "./PublicFrontendBootstrapFactory-BA65IXL4.js";
11
11
  import { Hono } from "hono";
12
12
 
13
13
  //#region src/application/dev/DevBootstrapSummaryJson.types.d.ts
@@ -22,6 +22,10 @@ type DevBootstrapSummaryJson = Readonly<{
22
22
  id: string;
23
23
  name: string;
24
24
  }>>;
25
+ plugins: ReadonlyArray<Readonly<{
26
+ packageName: string;
27
+ source: "configured" | "discovered";
28
+ }>>;
25
29
  }>;
26
30
  //#endregion
27
31
  //#region src/application/logging/LogFilter.d.ts
@@ -84,6 +88,23 @@ declare class ServerLoggerFactory implements LoggerFactory {
84
88
  createPerformanceDiagnostics(scope: string): Logger;
85
89
  }
86
90
  //#endregion
91
+ //#region src/application/binary/RunBinaryAttachmentLookupService.d.ts
92
+ declare class RunBinaryAttachmentLookupService {
93
+ private readonly workflowRunRepository;
94
+ private readonly workflowDebuggerOverlayRepository;
95
+ constructor(workflowRunRepository: WorkflowRunRepository, workflowDebuggerOverlayRepository: WorkflowDebuggerOverlayRepository);
96
+ findForRun(runId: string, binaryId: string): Promise<BinaryAttachment | undefined>;
97
+ findForWorkflowOverlay(workflowId: string, binaryId: string): Promise<BinaryAttachment | undefined>;
98
+ private findInRunState;
99
+ private findInCurrentState;
100
+ private findInOutputsByNode;
101
+ private findInNodeSnapshots;
102
+ private findInCurrentStateSnapshots;
103
+ private findInMutableState;
104
+ private findInPortItemMap;
105
+ private findInItems;
106
+ }
107
+ //#endregion
87
108
  //#region src/application/mapping/DataMapper.d.ts
88
109
  interface DataMapper<TSource, TTarget> {
89
110
  map(source: TSource): Promise<TTarget>;
@@ -320,5 +341,5 @@ declare class WorkflowHttpRouteHandler {
320
341
  postCopyWorkflowDebuggerOverlay(request: Request, params: ServerHttpRouteParams): Promise<Response>;
321
342
  }
322
343
  //#endregion
323
- export { AppConfigFactory, AppContainerFactory, AppContainerLifecycle, ApplicationTokens, BinaryHttpRouteHandler, CodemationBootstrapRequest, type CodemationFrontendAuthProviderSnapshot, type CodemationFrontendAuthSnapshot, CodemationHonoApiApp, CodemationPluginListMerger, CredentialBindingService, CredentialHttpRouteHandler, CredentialInstanceService, DatabaseMigrations, type DevBootstrapSummaryJson, FilteringLogger, type FrontendAppConfig, FrontendAppConfigFactory, FrontendRuntime, type LogFilter, LogLevelPolicyFactory, type Logger, type LoggerFactory, OAuth2HttpRouteHandler, PerformanceLogPolicy, PerformanceLogPolicyFactory, RequestToWebhookItemMapper, RunBinaryAttachmentLookupService, RunHttpRouteHandler, ServerLoggerFactory, WebhookHttpRouteHandler, WorkerRuntime, WorkflowDefinitionMapper, WorkflowHttpRouteHandler, WorkflowPolicyUiPresentationFactory, WorkflowRunRetentionPruneScheduler, WorkflowWebsocketServer, logLevelPolicyFactory, performanceLogPolicyFactory };
344
+ export { AppConfigFactory, AppContainerFactory, AppContainerLifecycle, ApplicationTokens, BinaryHttpRouteHandler, CodemationBootstrapRequest, type CodemationFrontendAuthProviderSnapshot, type CodemationFrontendAuthSnapshot, CodemationHonoApiApp, CodemationPluginListMerger, CredentialBindingService, CredentialHttpRouteHandler, CredentialInstanceService, DatabaseMigrations, type DevBootstrapSummaryJson, FilteringLogger, type FrontendAppConfig, FrontendAppConfigFactory, FrontendRuntime, type InternalAuthBootstrap, InternalAuthBootstrapFactory, type LogFilter, LogLevelPolicyFactory, type Logger, type LoggerFactory, OAuth2HttpRouteHandler, PerformanceLogPolicy, PerformanceLogPolicyFactory, type PublicFrontendBootstrap, PublicFrontendBootstrapFactory, RequestToWebhookItemMapper, RunBinaryAttachmentLookupService, RunHttpRouteHandler, ServerLoggerFactory, WebhookHttpRouteHandler, WorkerRuntime, WorkflowDefinitionMapper, WorkflowHttpRouteHandler, WorkflowPolicyUiPresentationFactory, WorkflowRunRetentionPruneScheduler, WorkflowWebsocketServer, logLevelPolicyFactory, performanceLogPolicyFactory };
324
345
  //# sourceMappingURL=nextServer.d.ts.map
@@ -3,9 +3,9 @@ import { a as FilteringLogger, i as PerformanceLogPolicy, n as PerformanceLogPol
3
3
  import { n as __decorateMetadata, t as __decorateParam } from "./decorateParam-DrsXNPuw.js";
4
4
  import { t as __decorate } from "./decorate-B0PP651O.js";
5
5
  import { a as CredentialInstanceService, i as CredentialBindingService, u as ApplicationTokens } from "./CredentialServices-DNb3CZwW.js";
6
- import { S as RunBinaryAttachmentLookupService, a as AppContainerLifecycle, c as RequestToWebhookItemMapper, d as CredentialHttpRouteHandler, f as CodemationHonoApiApp, g as WorkflowWebsocketServer, i as DatabaseMigrations, l as RunHttpRouteHandler, m as FrontendAppConfigFactory, n as WorkerRuntime, o as WorkflowHttpRouteHandler, p as BinaryHttpRouteHandler, r as FrontendRuntime, s as WebhookHttpRouteHandler, t as AppContainerFactory, u as OAuth2HttpRouteHandler, v as WorkflowDefinitionMapper, y as WorkflowPolicyUiPresentationFactory } from "./AppContainerFactory-B5eRpvAa.js";
7
- import { t as AppConfigFactory } from "./AppConfigFactory-DWIz2hy-.js";
8
- import { n as CodemationBootstrapRequest, t as CodemationPluginListMerger } from "./CodemationPluginListMerger-DrVOw9KP.js";
6
+ import { a as AppContainerLifecycle, b as WorkflowDefinitionMapper, c as RequestToWebhookItemMapper, d as CredentialHttpRouteHandler, f as CodemationHonoApiApp, g as FrontendAppConfigFactory, h as InternalAuthBootstrapFactory, i as DatabaseMigrations, l as RunHttpRouteHandler, m as PublicFrontendBootstrapFactory, n as WorkerRuntime, o as WorkflowHttpRouteHandler, p as BinaryHttpRouteHandler, r as FrontendRuntime, s as WebhookHttpRouteHandler, t as AppContainerFactory, u as OAuth2HttpRouteHandler, v as WorkflowWebsocketServer, w as RunBinaryAttachmentLookupService, x as WorkflowPolicyUiPresentationFactory } from "./AppContainerFactory-_dnF0VOf.js";
7
+ import { t as AppConfigFactory } from "./AppConfigFactory-JjNqYnGg.js";
8
+ import { n as CodemationBootstrapRequest, t as CodemationPluginListMerger } from "./CodemationPluginListMerger-CGwOTdZ7.js";
9
9
  import { CoreTokens, RunFinishedAtFactory, inject, injectable } from "@codemation/core";
10
10
 
11
11
  //#region src/application/binary/RunStateBinaryStorageKeysCollector.ts
@@ -123,5 +123,5 @@ WorkflowRunRetentionPruneScheduler = __decorate([
123
123
  ], WorkflowRunRetentionPruneScheduler);
124
124
 
125
125
  //#endregion
126
- export { AppConfigFactory, AppContainerFactory, AppContainerLifecycle, ApplicationTokens, BinaryHttpRouteHandler, CodemationBootstrapRequest, CodemationHonoApiApp, CodemationPluginListMerger, CredentialBindingService, CredentialHttpRouteHandler, CredentialInstanceService, DatabaseMigrations, FilteringLogger, FrontendAppConfigFactory, FrontendRuntime, LogLevelPolicyFactory, OAuth2HttpRouteHandler, PerformanceLogPolicy, PerformanceLogPolicyFactory, RequestToWebhookItemMapper, RunBinaryAttachmentLookupService, RunHttpRouteHandler, ServerLoggerFactory, WebhookHttpRouteHandler, WorkerRuntime, WorkflowDefinitionMapper, WorkflowHttpRouteHandler, WorkflowPolicyUiPresentationFactory, WorkflowRunRetentionPruneScheduler, WorkflowWebsocketServer, logLevelPolicyFactory, performanceLogPolicyFactory };
126
+ export { AppConfigFactory, AppContainerFactory, AppContainerLifecycle, ApplicationTokens, BinaryHttpRouteHandler, CodemationBootstrapRequest, CodemationHonoApiApp, CodemationPluginListMerger, CredentialBindingService, CredentialHttpRouteHandler, CredentialInstanceService, DatabaseMigrations, FilteringLogger, FrontendAppConfigFactory, FrontendRuntime, InternalAuthBootstrapFactory, LogLevelPolicyFactory, OAuth2HttpRouteHandler, PerformanceLogPolicy, PerformanceLogPolicyFactory, PublicFrontendBootstrapFactory, RequestToWebhookItemMapper, RunBinaryAttachmentLookupService, RunHttpRouteHandler, ServerLoggerFactory, WebhookHttpRouteHandler, WorkerRuntime, WorkflowDefinitionMapper, WorkflowHttpRouteHandler, WorkflowPolicyUiPresentationFactory, WorkflowRunRetentionPruneScheduler, WorkflowWebsocketServer, logLevelPolicyFactory, performanceLogPolicyFactory };
127
127
  //# sourceMappingURL=nextServer.js.map
@@ -1,4 +1,4 @@
1
- import { r as PrismaClient } from "./AppConfigFactory-DmHOpg8O.js";
1
+ import { r as PrismaClient } from "./AppConfigFactory-D_ReOKfV.js";
2
2
 
3
3
  //#region src/infrastructure/persistence/CodemationPostgresPrismaClientFactory.d.ts
4
4
  declare class CodemationPostgresPrismaClientFactory {
@@ -6,4 +6,4 @@ declare class CodemationPostgresPrismaClientFactory {
6
6
  }
7
7
  //#endregion
8
8
  export { CodemationPostgresPrismaClientFactory as t };
9
- //# sourceMappingURL=persistenceServer-CaehMh3M.d.ts.map
9
+ //# sourceMappingURL=persistenceServer-BKbOs-TQ.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { i as __toESM } from "./chunk-7V6ThxGB.js";
2
- import { r as require_client } from "./AppConfigFactory-DWIz2hy-.js";
2
+ import { a as require_client } from "./AppConfigFactory-JjNqYnGg.js";
3
3
  import { PrismaPg } from "@prisma/adapter-pg";
4
4
 
5
5
  //#region src/infrastructure/persistence/CodemationPostgresPrismaClientFactory.ts
@@ -16,4 +16,4 @@ var import_client = /* @__PURE__ */ __toESM(require_client(), 1);
16
16
 
17
17
  //#endregion
18
18
  export { CodemationPostgresPrismaClientFactory as n, import_client as t };
19
- //# sourceMappingURL=persistenceServer-DVeWUbc3.js.map
19
+ //# sourceMappingURL=persistenceServer-J2teHIIg.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"persistenceServer-DVeWUbc3.js","names":["PrismaClient"],"sources":["../src/infrastructure/persistence/CodemationPostgresPrismaClientFactory.ts","../src/persistenceServer.ts"],"sourcesContent":["import { PrismaPg } from \"@prisma/adapter-pg\";\nimport { PrismaClient } from \"./generated/prisma-client/client.js\";\n\nexport class CodemationPostgresPrismaClientFactory {\n static create(databaseUrl: string): PrismaClient {\n const adapter = new PrismaPg({ connectionString: databaseUrl });\n return new PrismaClient({ adapter });\n }\n}\n","export { CodemationPostgresPrismaClientFactory } from \"./infrastructure/persistence/CodemationPostgresPrismaClientFactory\";\nexport type { AppPersistenceConfig } from \"./presentation/config/AppConfig\";\nexport { AppConfigFactory } from \"./bootstrap/runtime/AppConfigFactory\";\nexport { PrismaMigrationDeployer } from \"./infrastructure/persistence/PrismaMigrationDeployer\";\nexport { PrismaClient } from \"./infrastructure/persistence/generated/prisma-client/client.js\";\n"],"mappings":";;;;;;AAGA,IAAa,wCAAb,MAAmD;CACjD,OAAO,OAAO,aAAmC;AAE/C,SAAO,IAAIA,6BAAa,EAAE,SADV,IAAI,SAAS,EAAE,kBAAkB,aAAa,CAAC,EAC5B,CAAC"}
1
+ {"version":3,"file":"persistenceServer-J2teHIIg.js","names":["PrismaClient"],"sources":["../src/infrastructure/persistence/CodemationPostgresPrismaClientFactory.ts","../src/persistenceServer.ts"],"sourcesContent":["import { PrismaPg } from \"@prisma/adapter-pg\";\nimport { PrismaClient } from \"./generated/prisma-client/client.js\";\n\nexport class CodemationPostgresPrismaClientFactory {\n static create(databaseUrl: string): PrismaClient {\n const adapter = new PrismaPg({ connectionString: databaseUrl });\n return new PrismaClient({ adapter });\n }\n}\n","export { CodemationPostgresPrismaClientFactory } from \"./infrastructure/persistence/CodemationPostgresPrismaClientFactory\";\nexport type { AppPersistenceConfig } from \"./presentation/config/AppConfig\";\nexport { AppConfigFactory } from \"./bootstrap/runtime/AppConfigFactory\";\nexport { PrismaMigrationDeployer } from \"./infrastructure/persistence/PrismaMigrationDeployer\";\nexport { PrismaClient } from \"./infrastructure/persistence/generated/prisma-client/client.js\";\n"],"mappings":";;;;;;AAGA,IAAa,wCAAb,MAAmD;CACjD,OAAO,OAAO,aAAmC;AAE/C,SAAO,IAAIA,6BAAa,EAAE,SADV,IAAI,SAAS,EAAE,kBAAkB,aAAa,CAAC,EAC5B,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import "./CodemationAuthConfig-Bh2cCNCI.js";
2
2
  import "./index-CkiptHb-.js";
3
- import { _ as AppPersistenceConfig } from "./CodemationConfig-D2ULNkec.js";
4
- import "./CodemationConfigNormalizer-CBLxXaRV.js";
5
- import { n as PrismaMigrationDeployer, r as PrismaClient, t as AppConfigFactory } from "./AppConfigFactory-DmHOpg8O.js";
6
- import { t as CodemationPostgresPrismaClientFactory } from "./persistenceServer-CaehMh3M.js";
3
+ import { _ as AppPersistenceConfig } from "./CodemationConfig-u80ZoIrc.js";
4
+ import "./CodemationConfigNormalizer-DCt0mPPz.js";
5
+ import { n as PrismaMigrationDeployer, r as PrismaClient, t as AppConfigFactory } from "./AppConfigFactory-D_ReOKfV.js";
6
+ import { t as CodemationPostgresPrismaClientFactory } from "./persistenceServer-BKbOs-TQ.js";
7
7
  export { AppConfigFactory, AppPersistenceConfig, CodemationPostgresPrismaClientFactory, PrismaClient, PrismaMigrationDeployer };
@@ -1,6 +1,6 @@
1
1
  import "./decorate-B0PP651O.js";
2
- import { n as PrismaMigrationDeployer, t as AppConfigFactory } from "./AppConfigFactory-DWIz2hy-.js";
3
- import { n as CodemationPostgresPrismaClientFactory, t as import_client } from "./persistenceServer-DVeWUbc3.js";
2
+ import { i as PrismaMigrationDeployer, t as AppConfigFactory } from "./AppConfigFactory-JjNqYnGg.js";
3
+ import { n as CodemationPostgresPrismaClientFactory, t as import_client } from "./persistenceServer-J2teHIIg.js";
4
4
 
5
5
  var PrismaClient = import_client.PrismaClient;
6
6
  export { AppConfigFactory, CodemationPostgresPrismaClientFactory, PrismaClient, PrismaMigrationDeployer };
@@ -1,7 +1,7 @@
1
- import { a as CodemationConfigNormalizer, t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-BBzAr6L_.js";
1
+ import { a as CodemationConfigNormalizer, t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-LGrCspIx.js";
2
2
  import { u as ApplicationTokens } from "./CredentialServices-DNb3CZwW.js";
3
- import { a as AppContainerLifecycle, b as GetWorkflowSummariesQuery, f as CodemationHonoApiApp, r as FrontendRuntime, t as AppContainerFactory, v as WorkflowDefinitionMapper, x as GetWorkflowDetailQuery } from "./AppContainerFactory-B5eRpvAa.js";
4
- import { t as AppConfigFactory } from "./AppConfigFactory-DWIz2hy-.js";
3
+ import { C as GetWorkflowDetailQuery, S as GetWorkflowSummariesQuery, a as AppContainerLifecycle, b as WorkflowDefinitionMapper, f as CodemationHonoApiApp, r as FrontendRuntime, t as AppContainerFactory } from "./AppContainerFactory-_dnF0VOf.js";
4
+ import { n as CodemationPluginPackageMetadata, t as AppConfigFactory } from "./AppConfigFactory-JjNqYnGg.js";
5
5
  import { readFile, readdir } from "node:fs/promises";
6
6
  import path from "node:path";
7
7
  import { pathToFileURL } from "node:url";
@@ -114,6 +114,7 @@ var AppConfigLoader = class {
114
114
  //#endregion
115
115
  //#region src/presentation/server/CodemationPluginDiscovery.ts
116
116
  var CodemationPluginDiscovery = class {
117
+ pluginPackageMetadata = new CodemationPluginPackageMetadata();
117
118
  async discover(consumerRoot) {
118
119
  const nodeModulesRoot = path.resolve(consumerRoot, "node_modules");
119
120
  const packageRoots = await this.collectPackageRoots(nodeModulesRoot);
@@ -121,12 +122,12 @@ var CodemationPluginDiscovery = class {
121
122
  for (const packageRoot of packageRoots) {
122
123
  const packageJson = await this.readPackageJson(path.resolve(packageRoot, "package.json"));
123
124
  const pluginManifest = packageJson.codemation?.plugin;
124
- if (!packageJson.name || !pluginManifest || pluginManifest.kind !== "plugin") continue;
125
+ if (!packageJson.name || typeof pluginManifest !== "string" || pluginManifest.trim().length === 0) continue;
125
126
  discoveredPackages.push({
126
127
  packageName: packageJson.name,
127
128
  packageRoot,
128
- manifest: pluginManifest,
129
- developmentEntry: this.resolveDevelopmentPluginEntry(packageJson)
129
+ pluginEntry: pluginManifest,
130
+ developmentEntry: await this.resolveDevelopmentPluginEntry(packageRoot)
130
131
  });
131
132
  }
132
133
  return discoveredPackages.sort((left, right) => left.packageName.localeCompare(right.packageName));
@@ -170,36 +171,52 @@ var CodemationPluginDiscovery = class {
170
171
  }
171
172
  }
172
173
  async loadPlugin(discoveredPackage) {
173
- const importedModule = await import(pathToFileURL(path.resolve(discoveredPackage.packageRoot, this.resolvePluginEntry(discoveredPackage))).href);
174
- const pluginExportName = discoveredPackage.manifest.exportName;
175
- const exportedValue = (pluginExportName ? importedModule[pluginExportName] : void 0) ?? importedModule.default ?? importedModule.codemationPlugin;
174
+ const pluginModulePath = path.resolve(discoveredPackage.packageRoot, this.resolvePluginEntry(discoveredPackage));
175
+ const exportedValue = (await import(
176
+ /* webpackIgnore: true */
177
+ this.resolvePluginModuleSpecifier(pluginModulePath)
178
+ )).default;
176
179
  const plugin = this.resolvePluginValue(exportedValue);
177
- if (!plugin) throw new Error(`Plugin package "${discoveredPackage.packageName}" did not export a Codemation plugin instance.`);
178
- return plugin;
180
+ if (!plugin) throw new Error(`Plugin package "${discoveredPackage.packageName}" did not default-export a Codemation plugin.`);
181
+ return this.pluginPackageMetadata.attachPackageName(plugin, discoveredPackage.packageName);
179
182
  }
180
183
  resolvePluginValue(value) {
181
- if (this.isPlugin(value)) return value;
182
- if (this.isPluginConstructor(value)) return new value();
184
+ if (this.isPluginConfig(value)) return value;
183
185
  return null;
184
186
  }
185
- isPlugin(value) {
186
- return Boolean(value) && typeof value === "object" && typeof value.register === "function";
187
- }
188
- isPluginConstructor(value) {
189
- return typeof value === "function" && this.isPlugin(value.prototype);
187
+ isPluginConfig(value) {
188
+ if (!value || typeof value !== "object" || Array.isArray(value)) return false;
189
+ const pluginValue = value;
190
+ if (pluginValue.register !== void 0 && typeof pluginValue.register !== "function") return false;
191
+ if (pluginValue.credentialTypes !== void 0 && !Array.isArray(pluginValue.credentialTypes)) return false;
192
+ return pluginValue.register !== void 0 || pluginValue.credentialTypes !== void 0 || pluginValue.sandbox !== void 0 || Object.keys(pluginValue).length === 0;
190
193
  }
191
194
  resolvePluginEntry(discoveredPackage) {
192
195
  if (process.env.CODEMATION_PREFER_PLUGIN_SOURCE_ENTRY === "true" && typeof discoveredPackage.developmentEntry === "string" && discoveredPackage.developmentEntry.trim().length > 0) return discoveredPackage.developmentEntry;
193
- return discoveredPackage.manifest.entry;
196
+ return discoveredPackage.pluginEntry;
197
+ }
198
+ async resolveDevelopmentPluginEntry(packageRoot) {
199
+ const candidates = [
200
+ path.resolve(packageRoot, "codemation.plugin.ts"),
201
+ path.resolve(packageRoot, "codemation.plugin.js"),
202
+ path.resolve(packageRoot, "src", "codemation.plugin.ts"),
203
+ path.resolve(packageRoot, "src", "codemation.plugin.js")
204
+ ];
205
+ for (const candidate of candidates) if (await this.exists(candidate)) return path.relative(packageRoot, candidate);
206
+ }
207
+ async exists(filePath) {
208
+ try {
209
+ await readFile(filePath, "utf8");
210
+ return true;
211
+ } catch {
212
+ return false;
213
+ }
194
214
  }
195
- resolveDevelopmentPluginEntry(packageJson) {
196
- const exportRecord = packageJson.exports?.["./codemation-plugin"];
197
- if (!exportRecord || typeof exportRecord !== "object") return;
198
- const importPath = exportRecord.import;
199
- return typeof importPath === "string" && importPath.trim().length > 0 ? importPath : void 0;
215
+ resolvePluginModuleSpecifier(pluginModulePath) {
216
+ return pathToFileURL(pluginModulePath).href;
200
217
  }
201
218
  };
202
219
 
203
220
  //#endregion
204
221
  export { AppConfigLoader as n, CodemationServerGateway as r, CodemationPluginDiscovery as t };
205
- //# sourceMappingURL=server-C65z_kqm.js.map
222
+ //# sourceMappingURL=server-CVC7QBwT.js.map