@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.
- package/dist/{AppConfigFactory-DmHOpg8O.d.ts → AppConfigFactory-D_ReOKfV.d.ts} +5 -3
- package/dist/{AppConfigFactory-DWIz2hy-.js → AppConfigFactory-JjNqYnGg.js} +41 -3
- package/dist/AppConfigFactory-JjNqYnGg.js.map +1 -0
- package/dist/{AppContainerFactory-B5eRpvAa.js → AppContainerFactory-_dnF0VOf.js} +272 -105
- package/dist/AppContainerFactory-_dnF0VOf.js.map +1 -0
- package/dist/{CodemationConfig-D2ULNkec.d.ts → CodemationConfig-u80ZoIrc.d.ts} +18 -10
- package/dist/{CodemationConfigNormalizer-CBLxXaRV.d.ts → CodemationConfigNormalizer-DCt0mPPz.d.ts} +2 -2
- package/dist/{CodemationConsumerConfigLoader-BLvzcfb7.d.ts → CodemationConsumerConfigLoader-C8iscLBJ.d.ts} +4 -2
- package/dist/{CodemationConsumerConfigLoader-BBzAr6L_.js → CodemationConsumerConfigLoader-LGrCspIx.js} +18 -4
- package/dist/CodemationConsumerConfigLoader-LGrCspIx.js.map +1 -0
- package/dist/CodemationPluginListMerger-CGwOTdZ7.js +57 -0
- package/dist/CodemationPluginListMerger-CGwOTdZ7.js.map +1 -0
- package/dist/{CodemationPluginListMerger-B0-e4CJ6.d.ts → CodemationPluginListMerger-ZY3R_kTo.d.ts} +79 -117
- package/dist/{CredentialServices-BeuMtqYA.d.ts → CredentialServices-Uo1jxSYB.d.ts} +2 -2
- package/dist/PublicFrontendBootstrap-p7mS8aWG.d.ts +50 -0
- package/dist/{FrontendAppConfigFactory-Bj-DZNlt.d.ts → PublicFrontendBootstrapFactory-BA65IXL4.d.ts} +19 -4
- package/dist/{FrontendAppConfigJsonCodec-nOCQI0ag.js → PublicFrontendBootstrapJsonCodec-BdiVGG5R.js} +76 -2
- package/dist/PublicFrontendBootstrapJsonCodec-BdiVGG5R.js.map +1 -0
- package/dist/PublicFrontendBootstrapJsonCodec-DjkkKXcq.d.ts +35 -0
- package/dist/client.d.ts +3 -3
- package/dist/client.js +2 -2
- package/dist/consumer.d.ts +3 -3
- package/dist/consumer.js +1 -1
- package/dist/credentials.d.ts +2 -2
- package/dist/index.d.ts +44 -12
- package/dist/index.js +8 -8
- package/dist/nextServer.d.ts +30 -9
- package/dist/nextServer.js +4 -4
- package/dist/{persistenceServer-CaehMh3M.d.ts → persistenceServer-BKbOs-TQ.d.ts} +2 -2
- package/dist/{persistenceServer-DVeWUbc3.js → persistenceServer-J2teHIIg.js} +2 -2
- package/dist/{persistenceServer-DVeWUbc3.js.map → persistenceServer-J2teHIIg.js.map} +1 -1
- package/dist/persistenceServer.d.ts +4 -4
- package/dist/persistenceServer.js +2 -2
- package/dist/{server-C65z_kqm.js → server-CVC7QBwT.js} +42 -25
- package/dist/server-CVC7QBwT.js.map +1 -0
- package/dist/{server-Dyo8qh4k.d.ts → server-CbcnGZHm.d.ts} +14 -19
- package/dist/server.d.ts +10 -10
- package/dist/server.js +7 -7
- package/package.json +5 -5
- package/src/application/dev/BootRuntimeSummary.types.ts +2 -0
- package/src/application/dev/DevBootstrapSummaryAssembler.ts +1 -0
- package/src/application/dev/DevBootstrapSummaryJson.types.ts +6 -0
- package/src/bootstrap/AppContainerFactory.ts +101 -6
- package/src/bootstrap/runtime/AppConfigFactory.ts +22 -2
- package/src/client.ts +4 -0
- package/src/index.ts +13 -5
- package/src/infrastructure/config/CodemationPluginRegistrar.ts +6 -0
- package/src/infrastructure/di/HandlesCommandRegistry.ts +1 -10
- package/src/infrastructure/di/HandlesQueryRegistry.ts +1 -10
- package/src/nextServer.ts +4 -0
- package/src/presentation/config/AppConfig.ts +6 -0
- package/src/presentation/config/CodemationPackageManifest.ts +1 -7
- package/src/presentation/config/CodemationPlugin.ts +45 -9
- package/src/presentation/config/CodemationPluginListMerger.ts +30 -26
- package/src/presentation/frontend/InternalAuthBootstrap.ts +12 -0
- package/src/presentation/frontend/InternalAuthBootstrapFactory.ts +26 -0
- package/src/presentation/frontend/InternalAuthBootstrapJsonCodec.ts +49 -0
- package/src/presentation/frontend/PublicFrontendBootstrap.ts +12 -0
- package/src/presentation/frontend/PublicFrontendBootstrapFactory.ts +23 -0
- package/src/presentation/frontend/PublicFrontendBootstrapJsonCodec.ts +48 -0
- package/src/presentation/http/ApiPaths.ts +10 -0
- package/src/presentation/http/hono/HonoHttpAnonymousRoutePolicyRegistry.ts +3 -0
- package/src/presentation/http/hono/registrars/BootstrapHonoApiRouteRegistrar.ts +32 -0
- package/src/presentation/http/routeHandlers/InternalAuthBootstrapHttpRouteHandler.ts +18 -0
- package/src/presentation/http/routeHandlers/PublicFrontendBootstrapHttpRouteHandler.ts +18 -0
- package/src/presentation/server/CodemationConsumerConfigLoader.ts +16 -3
- package/src/presentation/server/CodemationPluginDiscovery.ts +59 -28
- package/src/server.ts +6 -0
- package/dist/AppConfigFactory-DWIz2hy-.js.map +0 -1
- package/dist/AppContainerFactory-B5eRpvAa.js.map +0 -1
- package/dist/CodemationConsumerConfigLoader-BBzAr6L_.js.map +0 -1
- package/dist/CodemationPluginListMerger-DrVOw9KP.js +0 -57
- package/dist/CodemationPluginListMerger-DrVOw9KP.js.map +0 -1
- package/dist/FrontendAppConfig-D50wjj_n.d.ts +0 -27
- package/dist/FrontendAppConfigJsonCodec-1_L7H_Qo.d.ts +0 -20
- package/dist/FrontendAppConfigJsonCodec-nOCQI0ag.js.map +0 -1
- package/dist/server-C65z_kqm.js.map +0 -1
package/dist/{FrontendAppConfigFactory-Bj-DZNlt.d.ts → PublicFrontendBootstrapFactory-BA65IXL4.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as CodemationAuthConfig } from "./CodemationAuthConfig-Bh2cCNCI.js";
|
|
2
|
-
import {
|
|
3
|
-
import { g as AppConfig } from "./CodemationConfig-
|
|
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
|
-
|
|
74
|
-
|
|
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
|
package/dist/{FrontendAppConfigJsonCodec-nOCQI0ag.js → PublicFrontendBootstrapJsonCodec-BdiVGG5R.js}
RENAMED
|
@@ -80,5 +80,79 @@ var FrontendAppConfigJsonCodec = class {
|
|
|
80
80
|
};
|
|
81
81
|
|
|
82
82
|
//#endregion
|
|
83
|
-
|
|
84
|
-
|
|
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 {
|
|
4
|
-
import {
|
|
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 {
|
|
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
|
package/dist/consumer.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./CodemationAuthConfig-Bh2cCNCI.js";
|
|
2
2
|
import "./index-CkiptHb-.js";
|
|
3
|
-
import "./CodemationConfig-
|
|
4
|
-
import "./CodemationConfigNormalizer-
|
|
5
|
-
import { i as CodemationConsumerAppResolver, n as CodemationConsumerConfigResolution, r as CodemationConsumerApp, t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-
|
|
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-
|
|
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";
|
package/dist/credentials.d.ts
CHANGED
|
@@ -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-
|
|
4
|
-
import { a as CredentialInstanceService, i as CredentialBindingService, n as CredentialType } from "./CredentialServices-
|
|
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 {
|
|
3
|
-
import {
|
|
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
|
|
6
|
-
import "./CodemationConfigNormalizer-
|
|
7
|
-
import { t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-
|
|
8
|
-
import "./CredentialServices-
|
|
9
|
-
import { _ as
|
|
10
|
-
import { r as PrismaClient, t as AppConfigFactory } from "./AppConfigFactory-
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
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 {
|
|
3
|
-
import { t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-
|
|
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 {
|
|
9
|
-
import { t as AppConfigFactory } from "./AppConfigFactory-
|
|
10
|
-
import { n as CodemationBootstrapRequest, t as CodemationPluginListMerger } from "./CodemationPluginListMerger-
|
|
11
|
-
import { n as CodemationPostgresPrismaClientFactory, t as import_client } from "./persistenceServer-
|
|
12
|
-
import { r as CodemationServerGateway } from "./server-
|
|
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 };
|
package/dist/nextServer.d.ts
CHANGED
|
@@ -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 {
|
|
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-
|
|
6
|
-
import "./CodemationConfigNormalizer-
|
|
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-
|
|
8
|
-
import {
|
|
9
|
-
import { t as AppConfigFactory } from "./AppConfigFactory-
|
|
10
|
-
import {
|
|
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
|
package/dist/nextServer.js
CHANGED
|
@@ -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 {
|
|
7
|
-
import { t as AppConfigFactory } from "./AppConfigFactory-
|
|
8
|
-
import { n as CodemationBootstrapRequest, t as CodemationPluginListMerger } from "./CodemationPluginListMerger-
|
|
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-
|
|
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-
|
|
9
|
+
//# sourceMappingURL=persistenceServer-BKbOs-TQ.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as __toESM } from "./chunk-7V6ThxGB.js";
|
|
2
|
-
import {
|
|
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-
|
|
19
|
+
//# sourceMappingURL=persistenceServer-J2teHIIg.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persistenceServer-
|
|
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-
|
|
4
|
-
import "./CodemationConfigNormalizer-
|
|
5
|
-
import { n as PrismaMigrationDeployer, r as PrismaClient, t as AppConfigFactory } from "./AppConfigFactory-
|
|
6
|
-
import { t as CodemationPostgresPrismaClientFactory } from "./persistenceServer-
|
|
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 {
|
|
3
|
-
import { n as CodemationPostgresPrismaClientFactory, t as import_client } from "./persistenceServer-
|
|
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-
|
|
1
|
+
import { a as CodemationConfigNormalizer, t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-LGrCspIx.js";
|
|
2
2
|
import { u as ApplicationTokens } from "./CredentialServices-DNb3CZwW.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as AppConfigFactory } from "./AppConfigFactory-
|
|
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 ||
|
|
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
|
-
|
|
129
|
-
developmentEntry: this.resolveDevelopmentPluginEntry(
|
|
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
|
|
174
|
-
const
|
|
175
|
-
|
|
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
|
|
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.
|
|
182
|
-
if (this.isPluginConstructor(value)) return new value();
|
|
184
|
+
if (this.isPluginConfig(value)) return value;
|
|
183
185
|
return null;
|
|
184
186
|
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
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.
|
|
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
|
-
|
|
196
|
-
|
|
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-
|
|
222
|
+
//# sourceMappingURL=server-CVC7QBwT.js.map
|