@codemation/host 0.2.0 → 0.2.1
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/CHANGELOG.md +8 -0
- package/dist/{AppConfigFactory-ByT1D8dM.js → AppConfigFactory-CqKWXqOm.js} +2 -2
- package/dist/{AppConfigFactory-ByT1D8dM.js.map → AppConfigFactory-CqKWXqOm.js.map} +1 -1
- package/dist/{AppConfigFactory-DHdAGOmC.d.ts → AppConfigFactory-j1Mc-dIX.d.ts} +3 -3
- package/dist/{AppContainerFactory-BKaAUIi-.js → AppContainerFactory-CcSGFNLW.js} +42 -9
- package/dist/AppContainerFactory-CcSGFNLW.js.map +1 -0
- package/dist/{CodemationConfig-DBbMU3HB.d.ts → CodemationAppContext-Vtn0U2Ga.d.ts} +80 -80
- package/dist/CodemationAuthoring.types-CXubuYvd.d.ts +196 -0
- package/dist/CodemationAuthoring.types-SxVJ1qu5.js +86 -0
- package/dist/CodemationAuthoring.types-SxVJ1qu5.js.map +1 -0
- package/dist/{CodemationConfigNormalizer-C8wC0skq.d.ts → CodemationConfigNormalizer-kJmyHNDp.d.ts} +2 -2
- package/dist/{CodemationConsumerConfigLoader-Ceh6sB3X.d.ts → CodemationConsumerConfigLoader-BvTE-7tX.d.ts} +2 -2
- package/dist/{CodemationConsumerConfigLoader-D6LFSlp5.js → CodemationConsumerConfigLoader-DovlxZNb.js} +2 -2
- package/dist/{CodemationConsumerConfigLoader-D6LFSlp5.js.map → CodemationConsumerConfigLoader-DovlxZNb.js.map} +1 -1
- package/dist/{CodemationPluginListMerger-Cx9DnyR-.d.ts → CodemationPluginListMerger-DegwsxrS.d.ts} +6 -6
- package/dist/{CodemationPluginListMerger-CGwOTdZ7.js → CodemationPluginListMerger-_lZaa6gO.js} +1 -1
- package/dist/{CodemationPluginListMerger-CGwOTdZ7.js.map → CodemationPluginListMerger-_lZaa6gO.js.map} +1 -1
- package/dist/{CodemationAuthConfig-7hEfICPf.d.ts → CodemationWhitelabelConfig-D5rYcLlj.d.ts} +33 -33
- package/dist/{ConsoleLogger-ClPU7jtc.js → ConsoleLogger-DuStfHe0.js} +1 -1
- package/dist/{ConsoleLogger-ClPU7jtc.js.map → ConsoleLogger-DuStfHe0.js.map} +1 -1
- package/dist/{CredentialServices-D8BBZH1i.js → CredentialServices-BPKUF8Xs.js} +3 -3
- package/dist/{CredentialServices-D8BBZH1i.js.map → CredentialServices-BPKUF8Xs.js.map} +1 -1
- package/dist/{CredentialServices-CYETzKyb.d.ts → CredentialServices-GlBk2nL7.d.ts} +3 -3
- package/dist/{LogLevelPolicy-9IcPGZFk.d.ts → LogLevelPolicy-CkiJAH75.d.ts} +2 -2
- package/dist/{PublicFrontendBootstrap-DCniMBGu.d.ts → PublicFrontendBootstrap-ci0Vwxrb.d.ts} +2 -2
- package/dist/{PublicFrontendBootstrapFactory-DeMjp3cs.d.ts → PublicFrontendBootstrapFactory-r61MeSpZ.d.ts} +4 -4
- package/dist/{PublicFrontendBootstrapJsonCodec-BdiVGG5R.js → PublicFrontendBootstrapJsonCodec-BZgQ_FnW.js} +1 -1
- package/dist/{PublicFrontendBootstrapJsonCodec-BdiVGG5R.js.map → PublicFrontendBootstrapJsonCodec-BZgQ_FnW.js.map} +1 -1
- package/dist/{PublicFrontendBootstrapJsonCodec-BE0mhe1v.d.ts → PublicFrontendBootstrapJsonCodec-Ja0GQgpp.d.ts} +2 -2
- package/dist/{ServerLoggerFactory-BltIIDfQ.js → ServerLoggerFactory-CsNW5qhz.js} +4 -4
- package/dist/{ServerLoggerFactory-BltIIDfQ.js.map → ServerLoggerFactory-CsNW5qhz.js.map} +1 -1
- package/dist/authoring.d.ts +5 -0
- package/dist/authoring.js +4 -0
- package/dist/client.d.ts +4 -4
- package/dist/client.js +2 -2
- package/dist/consumer.d.ts +5 -5
- package/dist/consumer.js +5 -5
- package/dist/credentials.d.ts +4 -4
- package/dist/credentials.js +3 -3
- package/dist/devServerSidecar.d.ts +1 -1
- package/dist/{index-dK05sTQ4.d.ts → index-SKC6oys-.d.ts} +1 -1
- package/dist/index.d.ts +14 -203
- package/dist/index.js +14 -98
- package/dist/nextServer.d.ts +10 -10
- package/dist/nextServer.js +8 -8
- package/dist/{persistenceServer-D9vUTMqc.d.ts → persistenceServer-D89nDslh.d.ts} +2 -2
- package/dist/{persistenceServer-DMvIOGW8.js → persistenceServer-DKbFDxoS.js} +2 -2
- package/dist/{persistenceServer-DMvIOGW8.js.map → persistenceServer-DKbFDxoS.js.map} +1 -1
- package/dist/persistenceServer.d.ts +6 -6
- package/dist/persistenceServer.js +3 -3
- package/dist/{server-C-WZcsId.js → server-CFpgKuVE.js} +5 -5
- package/dist/{server-C-WZcsId.js.map → server-CFpgKuVE.js.map} +1 -1
- package/dist/{server-fxqY2WEi.d.ts → server-CUo7My6x.d.ts} +5 -5
- package/dist/server.d.ts +11 -11
- package/dist/server.js +11 -11
- package/package.json +11 -4
- package/src/application/commands/StartWorkflowRunCommandHandler.ts +64 -2
- package/src/authoring.ts +31 -0
- package/dist/AppContainerFactory-BKaAUIi-.js.map +0 -1
- package/dist/index.js.map +0 -1
- /package/dist/{decorate-B0PP651O.js → decorate-Dq0XLibd.js} +0 -0
- /package/dist/{decorateParam-DrsXNPuw.js → decorateParam-D7WPDFAf.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerLoggerFactory-BltIIDfQ.js","names":["levelRank: Record<Exclude<LogLevel, \"silent\">, number>","compiled: { matchers: ReadonlyArray<RegExp>; minLevel: LogLevel }[]","inner: Logger","scope: string","filter: LogFilter","ServerLoggerFactory","logLevelPolicyFactory: LogLevelPolicyFactory","ServerLogger"],"sources":["../src/infrastructure/logging/LogLevelPolicy.ts","../src/infrastructure/logging/LogLevelPolicyFactory.ts","../src/infrastructure/logging/FilteringLogger.ts","../src/infrastructure/logging/PerformanceLogPolicy.ts","../src/infrastructure/logging/PerformanceLogPolicyFactory.ts","../src/infrastructure/logging/ServerLoggerFactory.ts"],"sourcesContent":["import type { CodemationLogConfig, CodemationLogRule } from \"../../presentation/config/CodemationLogConfig\";\n\nexport type LogLevel = \"silent\" | \"debug\" | \"info\" | \"warn\" | \"error\";\n\nconst levelRank: Record<Exclude<LogLevel, \"silent\">, number> = {\n debug: 0,\n info: 1,\n warn: 2,\n error: 3,\n};\n\nconst globRegexMetaChars = new Set(\"\\\\^$+?()[]{}|.\");\n\n/**\n * Minimum log level for @codemation/host loggers.\n * - `CODEMATION_LOG_LEVEL` overrides when set to a known level (for namespaces not matched by `codemation.config` log rules).\n * - Under Vitest, defaults to **warn** so routine `info`/`debug` noise stays off the terminal; `warn`/`error` still print.\n * - Otherwise defaults to **info**.\n *\n * When {@link applyCodemationLogConfig} is set, the first matching rule wins per namespace; unmatched namespaces use env defaults.\n *\n * Resolve a shared instance via {@link LogLevelPolicyFactory} (DI or `logLevelPolicyFactory`).\n */\nexport class LogLevelPolicy {\n private cachedMin: LogLevel | undefined;\n\n private codemationRules: ReadonlyArray<{ matchers: ReadonlyArray<RegExp>; minLevel: LogLevel }> | null = null;\n\n resolveMin(): LogLevel {\n const raw = process.env.CODEMATION_LOG_LEVEL?.toLowerCase();\n if (raw === \"silent\" || raw === \"debug\" || raw === \"info\" || raw === \"warn\" || raw === \"error\") {\n return raw;\n }\n if (process.env.VITEST === \"true\") {\n return \"warn\";\n }\n return \"info\";\n }\n\n private minLevelCached(): LogLevel {\n if (this.cachedMin === undefined) {\n this.cachedMin = this.resolveMin();\n }\n return this.cachedMin;\n }\n\n resetForTests(): void {\n this.cachedMin = undefined;\n this.codemationRules = null;\n }\n\n /**\n * Applies `codemation.config` log rules. Pass `undefined` to clear rules and use env-only behavior.\n */\n applyCodemationLogConfig(config: CodemationLogConfig | undefined): void {\n this.codemationRules = null;\n if (!config) {\n return;\n }\n const rawRules = this.normalizeCodemationRules(config);\n if (rawRules.length === 0) {\n return;\n }\n const compiled: { matchers: ReadonlyArray<RegExp>; minLevel: LogLevel }[] = [];\n for (const rule of rawRules) {\n const minLevel = this.parseRuleLevel(rule.level);\n const patterns = this.normalizeFilterPatterns(rule.filter);\n if (patterns.length === 0) {\n throw new Error(\"codemation.config log rule filter must include at least one pattern\");\n }\n const matchers = patterns.map((pattern) => this.compileGlobPattern(pattern));\n compiled.push({\n matchers,\n minLevel,\n });\n }\n this.codemationRules = compiled;\n }\n\n shouldEmit(level: Exclude<LogLevel, \"silent\">, namespace: string): boolean {\n if (this.codemationRules && this.codemationRules.length > 0) {\n for (const rule of this.codemationRules) {\n if (rule.matchers.some((regex) => regex.test(namespace))) {\n return this.levelPassesAgainstMin(level, rule.minLevel);\n }\n }\n }\n return this.levelPassesAgainstMin(level, this.minLevelCached());\n }\n\n private normalizeCodemationRules(config: CodemationLogConfig): ReadonlyArray<CodemationLogRule> {\n if (\"rules\" in config && Array.isArray(config.rules)) {\n return [...config.rules];\n }\n return [config as CodemationLogRule];\n }\n\n private normalizeFilterPatterns(filter: string | ReadonlyArray<string>): ReadonlyArray<string> {\n if (typeof filter === \"string\") {\n return [filter];\n }\n return [...filter];\n }\n\n /**\n * Glob: only `*` is special (matches any substring). A lone `*` matches all namespaces.\n */\n private compileGlobPattern(pattern: string): RegExp {\n const trimmed = pattern.trim();\n if (trimmed === \"*\") {\n return /^.*$/;\n }\n let body = \"\";\n for (const ch of trimmed) {\n if (ch === \"*\") {\n body += \".*\";\n continue;\n }\n if (globRegexMetaChars.has(ch)) {\n body += \"\\\\\" + ch;\n continue;\n }\n body += ch;\n }\n return new RegExp(\"^\" + body + \"$\");\n }\n\n private parseRuleLevel(level: string): LogLevel {\n const normalized = level.toLowerCase();\n if (\n normalized === \"silent\" ||\n normalized === \"debug\" ||\n normalized === \"info\" ||\n normalized === \"warn\" ||\n normalized === \"error\"\n ) {\n return normalized;\n }\n throw new Error(`Invalid codemation.config log level: ${level}`);\n }\n\n private levelPassesAgainstMin(level: Exclude<LogLevel, \"silent\">, min: LogLevel): boolean {\n if (min === \"silent\") {\n return false;\n }\n return levelRank[level] >= levelRank[min];\n }\n}\n","import { LogLevelPolicy } from \"./LogLevelPolicy\";\n\n/**\n * Process-wide {@link LogLevelPolicy} singleton for server and browser loggers.\n * Plain class (no `@injectable` from `@codemation/core`): client components import this file; decorating would pull core into the browser bundle.\n */\nexport class LogLevelPolicyFactory {\n private readonly policy = new LogLevelPolicy();\n\n create(): LogLevelPolicy {\n return this.policy;\n }\n}\n\n/** Shared factory for call sites outside the DI container (e.g. next-host bootstrap). */\nexport const logLevelPolicyFactory = new LogLevelPolicyFactory();\n","import type { LogFilter } from \"../../application/logging/LogFilter\";\nimport type { Logger } from \"../../application/logging/Logger\";\n\nexport class FilteringLogger implements Logger {\n constructor(\n private readonly inner: Logger,\n private readonly scope: string,\n private readonly filter: LogFilter,\n ) {}\n\n info(message: string, exception?: Error): void {\n if (!this.filter({ scope: this.scope, level: \"info\", message })) {\n return;\n }\n this.inner.info(message, exception);\n }\n\n warn(message: string, exception?: Error): void {\n if (!this.filter({ scope: this.scope, level: \"warn\", message })) {\n return;\n }\n this.inner.warn(message, exception);\n }\n\n error(message: string, exception?: Error): void {\n if (!this.filter({ scope: this.scope, level: \"error\", message })) {\n return;\n }\n this.inner.error(message, exception);\n }\n\n debug(message: string, exception?: Error): void {\n if (!this.filter({ scope: this.scope, level: \"debug\", message })) {\n return;\n }\n this.inner.debug(message, exception);\n }\n}\n","/**\n * Opt-in detailed timing / diagnostics lines (used with `ServerLoggerFactory#createPerformanceDiagnostics`).\n *\n * Set `CODEMATION_PERFORMANCE_LOGGING=true` to enable. Otherwise those loggers are silent regardless of level.\n */\nexport class PerformanceLogPolicy {\n shouldEmitDetailedTiming(): boolean {\n return process.env.CODEMATION_PERFORMANCE_LOGGING === \"true\";\n }\n}\n","import { PerformanceLogPolicy } from \"./PerformanceLogPolicy\";\n\n/**\n * Process-wide {@link PerformanceLogPolicy} singleton (same pattern as {@link LogLevelPolicyFactory}).\n */\nexport class PerformanceLogPolicyFactory {\n private readonly policy = new PerformanceLogPolicy();\n\n create(): PerformanceLogPolicy {\n return this.policy;\n }\n}\n\nexport const performanceLogPolicyFactory = new PerformanceLogPolicyFactory();\n","import { inject, injectable } from \"@codemation/core\";\n\nimport type { LogFilter } from \"../../application/logging/LogFilter\";\nimport type { Logger, LoggerFactory } from \"../../application/logging/Logger\";\n\nimport { FilteringLogger } from \"./FilteringLogger\";\nimport { LogLevelPolicyFactory } from \"./LogLevelPolicyFactory\";\nimport { performanceLogPolicyFactory } from \"./PerformanceLogPolicyFactory\";\nimport { ServerLogger } from \"./ServerLogger\";\n\n@injectable()\nexport class ServerLoggerFactory implements LoggerFactory {\n constructor(@inject(LogLevelPolicyFactory) private readonly logLevelPolicyFactory: LogLevelPolicyFactory) {}\n\n create(scope: string): Logger {\n return new ServerLogger(scope, this.logLevelPolicyFactory.create());\n }\n\n createFiltered(scope: string, filter: LogFilter): Logger {\n return new FilteringLogger(this.create(scope), scope, filter);\n }\n\n createPerformanceDiagnostics(scope: string): Logger {\n return this.createFiltered(scope, (_entry) => performanceLogPolicyFactory.create().shouldEmitDetailedTiming());\n }\n}\n\nexport { ServerLogger } from \"./ServerLogger\";\n"],"mappings":";;;;;;AAIA,MAAMA,YAAyD;CAC7D,OAAO;CACP,MAAM;CACN,MAAM;CACN,OAAO;CACR;AAED,MAAM,qCAAqB,IAAI,IAAI,iBAAiB;;;;;;;;;;;AAYpD,IAAa,iBAAb,MAA4B;CAC1B,AAAQ;CAER,AAAQ,kBAAiG;CAEzG,aAAuB;EACrB,MAAM,MAAM,QAAQ,IAAI,sBAAsB,aAAa;AAC3D,MAAI,QAAQ,YAAY,QAAQ,WAAW,QAAQ,UAAU,QAAQ,UAAU,QAAQ,QACrF,QAAO;AAET,MAAI,QAAQ,IAAI,WAAW,OACzB,QAAO;AAET,SAAO;;CAGT,AAAQ,iBAA2B;AACjC,MAAI,KAAK,cAAc,OACrB,MAAK,YAAY,KAAK,YAAY;AAEpC,SAAO,KAAK;;CAGd,gBAAsB;AACpB,OAAK,YAAY;AACjB,OAA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a,uBAAb,MAAkC;CAChC,2BAAoC;AAClC,SAAO,QAAQ,IAAI,mCAAmC;;;;;;;;;ACF1D,IAAa,8BAAb,MAAyC;CACvC,AAAiB,SAAS,IAAI,sBAAsB;CAEpD,SAA+B;AAC7B,SAAO,KAAK;;;AAIhB,MAAa,8BAA8B,IAAI,6BAA6B;;;;;ACFrE,gCAAMC,sBAA6C;CACxD,YAAY,AAAgDC,yBAA8C;EAA9C;;CAE5D,OAAO,OAAuB;AAC5B,SAAO,IAAIC,cAAa,OAAO,KAAK,sBAAsB,QAAQ,CAAC;;CAGrE,eAAe,OAAe,QAA2B;AACvD,SAAO,IAAI,gBAAgB,KAAK,OAAO,MAAM,EAAE,OAAO,OAAO;;CAG/D,6BAA6B,OAAuB;AAClD,SAAO,KAAK,eAAe,QAAQ,WAAW,4BAA4B,QAAQ,CAAC,0BAA0B,CAAC;;;;CAbjH,YAAY;oBAEE,OAAO,sBAAsB"}
|
|
1
|
+
{"version":3,"file":"ServerLoggerFactory-CsNW5qhz.js","names":["levelRank: Record<Exclude<LogLevel, \"silent\">, number>","compiled: { matchers: ReadonlyArray<RegExp>; minLevel: LogLevel }[]","inner: Logger","scope: string","filter: LogFilter","ServerLoggerFactory","logLevelPolicyFactory: LogLevelPolicyFactory","ServerLogger"],"sources":["../src/infrastructure/logging/LogLevelPolicy.ts","../src/infrastructure/logging/LogLevelPolicyFactory.ts","../src/infrastructure/logging/FilteringLogger.ts","../src/infrastructure/logging/PerformanceLogPolicy.ts","../src/infrastructure/logging/PerformanceLogPolicyFactory.ts","../src/infrastructure/logging/ServerLoggerFactory.ts"],"sourcesContent":["import type { CodemationLogConfig, CodemationLogRule } from \"../../presentation/config/CodemationLogConfig\";\n\nexport type LogLevel = \"silent\" | \"debug\" | \"info\" | \"warn\" | \"error\";\n\nconst levelRank: Record<Exclude<LogLevel, \"silent\">, number> = {\n debug: 0,\n info: 1,\n warn: 2,\n error: 3,\n};\n\nconst globRegexMetaChars = new Set(\"\\\\^$+?()[]{}|.\");\n\n/**\n * Minimum log level for @codemation/host loggers.\n * - `CODEMATION_LOG_LEVEL` overrides when set to a known level (for namespaces not matched by `codemation.config` log rules).\n * - Under Vitest, defaults to **warn** so routine `info`/`debug` noise stays off the terminal; `warn`/`error` still print.\n * - Otherwise defaults to **info**.\n *\n * When {@link applyCodemationLogConfig} is set, the first matching rule wins per namespace; unmatched namespaces use env defaults.\n *\n * Resolve a shared instance via {@link LogLevelPolicyFactory} (DI or `logLevelPolicyFactory`).\n */\nexport class LogLevelPolicy {\n private cachedMin: LogLevel | undefined;\n\n private codemationRules: ReadonlyArray<{ matchers: ReadonlyArray<RegExp>; minLevel: LogLevel }> | null = null;\n\n resolveMin(): LogLevel {\n const raw = process.env.CODEMATION_LOG_LEVEL?.toLowerCase();\n if (raw === \"silent\" || raw === \"debug\" || raw === \"info\" || raw === \"warn\" || raw === \"error\") {\n return raw;\n }\n if (process.env.VITEST === \"true\") {\n return \"warn\";\n }\n return \"info\";\n }\n\n private minLevelCached(): LogLevel {\n if (this.cachedMin === undefined) {\n this.cachedMin = this.resolveMin();\n }\n return this.cachedMin;\n }\n\n resetForTests(): void {\n this.cachedMin = undefined;\n this.codemationRules = null;\n }\n\n /**\n * Applies `codemation.config` log rules. Pass `undefined` to clear rules and use env-only behavior.\n */\n applyCodemationLogConfig(config: CodemationLogConfig | undefined): void {\n this.codemationRules = null;\n if (!config) {\n return;\n }\n const rawRules = this.normalizeCodemationRules(config);\n if (rawRules.length === 0) {\n return;\n }\n const compiled: { matchers: ReadonlyArray<RegExp>; minLevel: LogLevel }[] = [];\n for (const rule of rawRules) {\n const minLevel = this.parseRuleLevel(rule.level);\n const patterns = this.normalizeFilterPatterns(rule.filter);\n if (patterns.length === 0) {\n throw new Error(\"codemation.config log rule filter must include at least one pattern\");\n }\n const matchers = patterns.map((pattern) => this.compileGlobPattern(pattern));\n compiled.push({\n matchers,\n minLevel,\n });\n }\n this.codemationRules = compiled;\n }\n\n shouldEmit(level: Exclude<LogLevel, \"silent\">, namespace: string): boolean {\n if (this.codemationRules && this.codemationRules.length > 0) {\n for (const rule of this.codemationRules) {\n if (rule.matchers.some((regex) => regex.test(namespace))) {\n return this.levelPassesAgainstMin(level, rule.minLevel);\n }\n }\n }\n return this.levelPassesAgainstMin(level, this.minLevelCached());\n }\n\n private normalizeCodemationRules(config: CodemationLogConfig): ReadonlyArray<CodemationLogRule> {\n if (\"rules\" in config && Array.isArray(config.rules)) {\n return [...config.rules];\n }\n return [config as CodemationLogRule];\n }\n\n private normalizeFilterPatterns(filter: string | ReadonlyArray<string>): ReadonlyArray<string> {\n if (typeof filter === \"string\") {\n return [filter];\n }\n return [...filter];\n }\n\n /**\n * Glob: only `*` is special (matches any substring). A lone `*` matches all namespaces.\n */\n private compileGlobPattern(pattern: string): RegExp {\n const trimmed = pattern.trim();\n if (trimmed === \"*\") {\n return /^.*$/;\n }\n let body = \"\";\n for (const ch of trimmed) {\n if (ch === \"*\") {\n body += \".*\";\n continue;\n }\n if (globRegexMetaChars.has(ch)) {\n body += \"\\\\\" + ch;\n continue;\n }\n body += ch;\n }\n return new RegExp(\"^\" + body + \"$\");\n }\n\n private parseRuleLevel(level: string): LogLevel {\n const normalized = level.toLowerCase();\n if (\n normalized === \"silent\" ||\n normalized === \"debug\" ||\n normalized === \"info\" ||\n normalized === \"warn\" ||\n normalized === \"error\"\n ) {\n return normalized;\n }\n throw new Error(`Invalid codemation.config log level: ${level}`);\n }\n\n private levelPassesAgainstMin(level: Exclude<LogLevel, \"silent\">, min: LogLevel): boolean {\n if (min === \"silent\") {\n return false;\n }\n return levelRank[level] >= levelRank[min];\n }\n}\n","import { LogLevelPolicy } from \"./LogLevelPolicy\";\n\n/**\n * Process-wide {@link LogLevelPolicy} singleton for server and browser loggers.\n * Plain class (no `@injectable` from `@codemation/core`): client components import this file; decorating would pull core into the browser bundle.\n */\nexport class LogLevelPolicyFactory {\n private readonly policy = new LogLevelPolicy();\n\n create(): LogLevelPolicy {\n return this.policy;\n }\n}\n\n/** Shared factory for call sites outside the DI container (e.g. next-host bootstrap). */\nexport const logLevelPolicyFactory = new LogLevelPolicyFactory();\n","import type { LogFilter } from \"../../application/logging/LogFilter\";\nimport type { Logger } from \"../../application/logging/Logger\";\n\nexport class FilteringLogger implements Logger {\n constructor(\n private readonly inner: Logger,\n private readonly scope: string,\n private readonly filter: LogFilter,\n ) {}\n\n info(message: string, exception?: Error): void {\n if (!this.filter({ scope: this.scope, level: \"info\", message })) {\n return;\n }\n this.inner.info(message, exception);\n }\n\n warn(message: string, exception?: Error): void {\n if (!this.filter({ scope: this.scope, level: \"warn\", message })) {\n return;\n }\n this.inner.warn(message, exception);\n }\n\n error(message: string, exception?: Error): void {\n if (!this.filter({ scope: this.scope, level: \"error\", message })) {\n return;\n }\n this.inner.error(message, exception);\n }\n\n debug(message: string, exception?: Error): void {\n if (!this.filter({ scope: this.scope, level: \"debug\", message })) {\n return;\n }\n this.inner.debug(message, exception);\n }\n}\n","/**\n * Opt-in detailed timing / diagnostics lines (used with `ServerLoggerFactory#createPerformanceDiagnostics`).\n *\n * Set `CODEMATION_PERFORMANCE_LOGGING=true` to enable. Otherwise those loggers are silent regardless of level.\n */\nexport class PerformanceLogPolicy {\n shouldEmitDetailedTiming(): boolean {\n return process.env.CODEMATION_PERFORMANCE_LOGGING === \"true\";\n }\n}\n","import { PerformanceLogPolicy } from \"./PerformanceLogPolicy\";\n\n/**\n * Process-wide {@link PerformanceLogPolicy} singleton (same pattern as {@link LogLevelPolicyFactory}).\n */\nexport class PerformanceLogPolicyFactory {\n private readonly policy = new PerformanceLogPolicy();\n\n create(): PerformanceLogPolicy {\n return this.policy;\n }\n}\n\nexport const performanceLogPolicyFactory = new PerformanceLogPolicyFactory();\n","import { inject, injectable } from \"@codemation/core\";\n\nimport type { LogFilter } from \"../../application/logging/LogFilter\";\nimport type { Logger, LoggerFactory } from \"../../application/logging/Logger\";\n\nimport { FilteringLogger } from \"./FilteringLogger\";\nimport { LogLevelPolicyFactory } from \"./LogLevelPolicyFactory\";\nimport { performanceLogPolicyFactory } from \"./PerformanceLogPolicyFactory\";\nimport { ServerLogger } from \"./ServerLogger\";\n\n@injectable()\nexport class ServerLoggerFactory implements LoggerFactory {\n constructor(@inject(LogLevelPolicyFactory) private readonly logLevelPolicyFactory: LogLevelPolicyFactory) {}\n\n create(scope: string): Logger {\n return new ServerLogger(scope, this.logLevelPolicyFactory.create());\n }\n\n createFiltered(scope: string, filter: LogFilter): Logger {\n return new FilteringLogger(this.create(scope), scope, filter);\n }\n\n createPerformanceDiagnostics(scope: string): Logger {\n return this.createFiltered(scope, (_entry) => performanceLogPolicyFactory.create().shouldEmitDetailedTiming());\n }\n}\n\nexport { ServerLogger } from \"./ServerLogger\";\n"],"mappings":";;;;;;AAIA,MAAMA,YAAyD;CAC7D,OAAO;CACP,MAAM;CACN,MAAM;CACN,OAAO;CACR;AAED,MAAM,qCAAqB,IAAI,IAAI,iBAAiB;;;;;;;;;;;AAYpD,IAAa,iBAAb,MAA4B;CAC1B,AAAQ;CAER,AAAQ,kBAAiG;CAEzG,aAAuB;EACrB,MAAM,MAAM,QAAQ,IAAI,sBAAsB,aAAa;AAC3D,MAAI,QAAQ,YAAY,QAAQ,WAAW,QAAQ,UAAU,QAAQ,UAAU,QAAQ,QACrF,QAAO;AAET,MAAI,QAAQ,IAAI,WAAW,OACzB,QAAO;AAET,SAAO;;CAGT,AAAQ,iBAA2B;AACjC,MAAI,KAAK,cAAc,OACrB,MAAK,YAAY,KAAK,YAAY;AAEpC,SAAO,KAAK;;CAGd,gBAAsB;AACpB,OAAK,YAAY;AACjB,OAAK,kBAAkB;;;;;CAMzB,yBAAyB,QAA+C;AACtE,OAAK,kBAAkB;AACvB,MAAI,CAAC,OACH;EAEF,MAAM,WAAW,KAAK,yBAAyB,OAAO;AACtD,MAAI,SAAS,WAAW,EACtB;EAEF,MAAMC,WAAsE,EAAE;AAC9E,OAAK,MAAM,QAAQ,UAAU;GAC3B,MAAM,WAAW,KAAK,eA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CACxD,YAAY,AAAgDC,yBAA8C;EAA9C;;CAE5D,OAAO,OAAuB;AAC5B,SAAO,IAAIC,cAAa,OAAO,KAAK,sBAAsB,QAAQ,CAAC;;CAGrE,eAAe,OAAe,QAA2B;AACvD,SAAO,IAAI,gBAAgB,KAAK,OAAO,MAAM,EAAE,OAAO,OAAO;;CAG/D,6BAA6B,OAAuB;AAClD,SAAO,KAAK,eAAe,QAAQ,WAAW,4BAA4B,QAAQ,CAAC,0BAA0B,CAAC;;;;CAbjH,YAAY;oBAEE,OAAO,sBAAsB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import "./index-SKC6oys-.js";
|
|
2
|
+
import { a as defineCodemationApp, i as FriendlyCodemationExecutionConfig, n as DefinePluginOptions, o as definePlugin, r as FriendlyCodemationDatabaseConfig, s as workflow, t as DefineCodemationAppOptions } from "./CodemationAuthoring.types-CXubuYvd.js";
|
|
3
|
+
import { _ as CodemationEngineExecutionLimitsConfig, b as CodemationSchedulerConfig, c as CodemationPluginContext, d as CodemationAppSchedulerConfig, f as CodemationAppSchedulerKind, g as CodemationDatabaseKind, h as CodemationDatabaseConfig, m as CodemationConfig, n as CodemationRegistrationContextBase, o as CodemationPlugin, p as CodemationApplicationRuntimeConfig, s as CodemationPluginConfig, t as CodemationAppContext, u as CodemationAppDefinition, v as CodemationEventBusConfig, x as CodemationSchedulerKind, y as CodemationEventBusKind } from "./CodemationAppContext-Vtn0U2Ga.js";
|
|
4
|
+
import "./CodemationWhitelabelConfig-D5rYcLlj.js";
|
|
5
|
+
export { type CodemationAppContext, type CodemationAppDefinition, type CodemationAppSchedulerConfig, type CodemationAppSchedulerKind, type CodemationApplicationRuntimeConfig, type CodemationConfig, type CodemationDatabaseConfig, type CodemationDatabaseKind, type CodemationEngineExecutionLimitsConfig, type CodemationEventBusConfig, type CodemationEventBusKind, type CodemationPlugin, type CodemationPluginConfig, type CodemationPluginContext, type CodemationRegistrationContextBase, type CodemationSchedulerConfig, type CodemationSchedulerKind, type DefineCodemationAppOptions, type DefinePluginOptions, type FriendlyCodemationDatabaseConfig, type FriendlyCodemationExecutionConfig, defineCodemationApp, definePlugin, workflow };
|
package/dist/client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as LogLevelPolicy } from "./LogLevelPolicy-
|
|
3
|
-
import { a as CodemationFrontendAuthSnapshot, i as CodemationFrontendAuthProviderSnapshot, n as InternalAuthBootstrap, r as FrontendAppConfig, t as PublicFrontendBootstrap } from "./PublicFrontendBootstrap-
|
|
4
|
-
import { i as CodemationFrontendAuthSnapshotJsonCodec, n as InternalAuthBootstrapJsonCodec, r as FrontendAppConfigJsonCodec, t as PublicFrontendBootstrapJsonCodec } from "./PublicFrontendBootstrapJsonCodec-
|
|
1
|
+
import { l as Logger, t as CodemationWhitelabelConfig, u as LoggerFactory } from "./CodemationWhitelabelConfig-D5rYcLlj.js";
|
|
2
|
+
import { t as LogLevelPolicy } from "./LogLevelPolicy-CkiJAH75.js";
|
|
3
|
+
import { a as CodemationFrontendAuthSnapshot, i as CodemationFrontendAuthProviderSnapshot, n as InternalAuthBootstrap, r as FrontendAppConfig, t as PublicFrontendBootstrap } from "./PublicFrontendBootstrap-ci0Vwxrb.js";
|
|
4
|
+
import { i as CodemationFrontendAuthSnapshotJsonCodec, n as InternalAuthBootstrapJsonCodec, r as FrontendAppConfigJsonCodec, t as PublicFrontendBootstrapJsonCodec } from "./PublicFrontendBootstrapJsonCodec-Ja0GQgpp.js";
|
|
5
5
|
|
|
6
6
|
//#region src/infrastructure/logging/BrowserLoggerFactory.d.ts
|
|
7
7
|
declare class BrowserLoggerFactory implements LoggerFactory {
|
package/dist/client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as ConsoleLogger } from "./ConsoleLogger-
|
|
2
|
-
import { i as CodemationFrontendAuthSnapshotJsonCodec, n as InternalAuthBootstrapJsonCodec, r as FrontendAppConfigJsonCodec, t as PublicFrontendBootstrapJsonCodec } from "./PublicFrontendBootstrapJsonCodec-
|
|
1
|
+
import { t as ConsoleLogger } from "./ConsoleLogger-DuStfHe0.js";
|
|
2
|
+
import { i as CodemationFrontendAuthSnapshotJsonCodec, n as InternalAuthBootstrapJsonCodec, r as FrontendAppConfigJsonCodec, t as PublicFrontendBootstrapJsonCodec } from "./PublicFrontendBootstrapJsonCodec-BZgQ_FnW.js";
|
|
3
3
|
|
|
4
4
|
//#region src/infrastructure/logging/BrowserLoggerFactory.ts
|
|
5
5
|
var BrowserLoggerFactory = class {
|
package/dist/consumer.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "./CodemationConfigNormalizer-
|
|
5
|
-
import { i as CodemationConsumerAppResolver, n as CodemationConsumerConfigResolution, r as CodemationConsumerApp, t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-
|
|
1
|
+
import "./index-SKC6oys-.js";
|
|
2
|
+
import "./CodemationAppContext-Vtn0U2Ga.js";
|
|
3
|
+
import "./CodemationWhitelabelConfig-D5rYcLlj.js";
|
|
4
|
+
import "./CodemationConfigNormalizer-kJmyHNDp.js";
|
|
5
|
+
import { i as CodemationConsumerAppResolver, n as CodemationConsumerConfigResolution, r as CodemationConsumerApp, t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-BvTE-7tX.js";
|
|
6
6
|
export { type CodemationConsumerApp, CodemationConsumerAppResolver, CodemationConsumerConfigLoader, type CodemationConsumerConfigResolution };
|
package/dist/consumer.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./ConsoleLogger-
|
|
2
|
-
import { i as CodemationConsumerAppResolver, t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-
|
|
3
|
-
import "./ServerLoggerFactory-
|
|
4
|
-
import "./decorateParam-
|
|
5
|
-
import "./decorate-
|
|
1
|
+
import "./ConsoleLogger-DuStfHe0.js";
|
|
2
|
+
import { i as CodemationConsumerAppResolver, t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-DovlxZNb.js";
|
|
3
|
+
import "./ServerLoggerFactory-CsNW5qhz.js";
|
|
4
|
+
import "./decorateParam-D7WPDFAf.js";
|
|
5
|
+
import "./decorate-Dq0XLibd.js";
|
|
6
6
|
|
|
7
7
|
export { CodemationConsumerAppResolver, CodemationConsumerConfigLoader };
|
package/dist/credentials.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import { a as CredentialInstanceService, i as CredentialBindingService, n as CredentialType } from "./CredentialServices-
|
|
1
|
+
import { d as CredentialHealth, s as AnyCredentialType, v as CredentialSessionFactoryArgs } from "./index-SKC6oys-.js";
|
|
2
|
+
import "./CodemationAppContext-Vtn0U2Ga.js";
|
|
3
|
+
import "./CodemationWhitelabelConfig-D5rYcLlj.js";
|
|
4
|
+
import { a as CredentialInstanceService, i as CredentialBindingService, n as CredentialType } from "./CredentialServices-GlBk2nL7.js";
|
|
5
5
|
|
|
6
6
|
//#region src/infrastructure/credentials/OpenAiApiKeyCredentialShapes.types.d.ts
|
|
7
7
|
/**
|
package/dist/credentials.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./decorateParam-
|
|
2
|
-
import "./decorate-
|
|
3
|
-
import { a as CredentialInstanceService, h as OpenAiApiKeyCredentialHealthTester, i as CredentialBindingService, m as OpenAiApiKeyCredentialTypeFactory } from "./CredentialServices-
|
|
1
|
+
import "./decorateParam-D7WPDFAf.js";
|
|
2
|
+
import "./decorate-Dq0XLibd.js";
|
|
3
|
+
import { a as CredentialInstanceService, h as OpenAiApiKeyCredentialHealthTester, i as CredentialBindingService, m as OpenAiApiKeyCredentialTypeFactory } from "./CredentialServices-BPKUF8Xs.js";
|
|
4
4
|
|
|
5
5
|
//#region src/credentials.ts
|
|
6
6
|
const defaultOpenAiApiKeyCredentialTypeFactory = new OpenAiApiKeyCredentialTypeFactory(new OpenAiApiKeyCredentialHealthTester(globalThis.fetch));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as Container, N as WorkflowDefinition } from "./index-
|
|
1
|
+
import { B as Container, N as WorkflowDefinition } from "./index-SKC6oys-.js";
|
|
2
2
|
|
|
3
3
|
//#region src/presentation/server/CodemationTsyringeParamInfoReader.d.ts
|
|
4
4
|
declare class CodemationTsyringeParamInfoReader {
|
|
@@ -1297,4 +1297,4 @@ declare class RunIntentService {
|
|
|
1297
1297
|
}
|
|
1298
1298
|
//#endregion
|
|
1299
1299
|
export { RunSummary as $, RunIdFactory as A, Container as B, CredentialTypeId as C, Item as D, BinaryAttachment as E, BinaryStorage as F, ChainCursor as G, EngineExecutionLimitsPolicyConfig as H, NodeExecutionContext as I, WebhookInvocationMatch as J, AnyRunnableNodeConfig as K, NodeExecutionRequestHandler as L, RunnableNodeOutputJson as M, WorkflowDefinition as N, Items as O, WorkflowId as P, RunPruneCandidate as Q, NodeExecutionScheduler as R, CredentialTypeDefinition as S, ActivationIdFactory as T, RunEvent as U, TypeToken as V, RunEventBus as W, PersistedRunState as X, WorkflowRunDetailDto as Y, RunCurrentState as Z, CredentialRequirement as _, ToolConfig as a, CredentialSetupStatus as b, CredentialBinding as c, CredentialHealth as d, Clock as et, CredentialInstanceId as f, CredentialOAuth2AuthDefinition as g, CredentialMaterialSourceKind as h, ChatModelConfig as i, RunnableNodeConfig as j, RunId as k, CredentialBindingKey as l, CredentialJsonRecord as m, Engine as n, DefinedNode as o, CredentialInstanceRecord as p, WorkflowActivationPolicy as q, AgentGuardrailConfig as r, AnyCredentialType as s, RunIntentService as t, CredentialFieldSchema as u, CredentialSessionFactoryArgs as v, CredentialTypeRegistry as w, CredentialType as x, CredentialSessionService as y, WorkflowRepository as z };
|
|
1300
|
-
//# sourceMappingURL=index-
|
|
1300
|
+
//# sourceMappingURL=index-SKC6oys-.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import "./
|
|
7
|
-
import
|
|
8
|
-
import "./
|
|
9
|
-
import
|
|
10
|
-
import { r as
|
|
11
|
-
import { t as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
1
|
+
import "./index-SKC6oys-.js";
|
|
2
|
+
import { a as defineCodemationApp, i as FriendlyCodemationExecutionConfig, n as DefinePluginOptions, o as definePlugin, r as FriendlyCodemationDatabaseConfig, s as workflow, t as DefineCodemationAppOptions } from "./CodemationAuthoring.types-CXubuYvd.js";
|
|
3
|
+
import { S as CodemationWorkflowDiscovery, _ as CodemationEngineExecutionLimitsConfig, a as AppPluginLoadSummary, b as CodemationSchedulerConfig, c as CodemationPluginContext, d as CodemationAppSchedulerConfig, f as CodemationAppSchedulerKind, g as CodemationDatabaseKind, h as CodemationDatabaseConfig, l as CodemationPluginPackageMetadata, m as CodemationConfig, n as CodemationRegistrationContextBase, o as CodemationPlugin, p as CodemationApplicationRuntimeConfig, r as AppConfig, s as CodemationPluginConfig, t as CodemationAppContext, u as CodemationAppDefinition, v as CodemationEventBusConfig, w as CodemationClassToken, x as CodemationSchedulerKind, y as CodemationEventBusKind } from "./CodemationAppContext-Vtn0U2Ga.js";
|
|
4
|
+
import { a as CodemationAuthConfig, c as CodemationAuthOidcProviderConfig, i as CodemationLogRule, n as CodemationLogConfig, o as CodemationAuthKind, r as CodemationLogLevelName, s as CodemationAuthOAuthProviderConfig, t as CodemationWhitelabelConfig } from "./CodemationWhitelabelConfig-D5rYcLlj.js";
|
|
5
|
+
import { a as CodemationFrontendAuthSnapshot, i as CodemationFrontendAuthProviderSnapshot, n as InternalAuthBootstrap, r as FrontendAppConfig, t as PublicFrontendBootstrap } from "./PublicFrontendBootstrap-ci0Vwxrb.js";
|
|
6
|
+
import { i as CodemationFrontendAuthSnapshotJsonCodec, n as InternalAuthBootstrapJsonCodec, r as FrontendAppConfigJsonCodec, t as PublicFrontendBootstrapJsonCodec } from "./PublicFrontendBootstrapJsonCodec-Ja0GQgpp.js";
|
|
7
|
+
import "./CodemationConfigNormalizer-kJmyHNDp.js";
|
|
8
|
+
import { t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-BvTE-7tX.js";
|
|
9
|
+
import "./CredentialServices-GlBk2nL7.js";
|
|
10
|
+
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-DegwsxrS.js";
|
|
11
|
+
import { r as PrismaDatabaseClient, t as AppConfigFactory } from "./AppConfigFactory-j1Mc-dIX.js";
|
|
12
|
+
import { t as CodemationPostgresPrismaClientFactory } from "./persistenceServer-D89nDslh.js";
|
|
13
|
+
import { c as CodemationServerGateway, l as ApiPaths } from "./server-CUo7My6x.js";
|
|
14
|
+
import { i as CodemationFrontendAuthSnapshotFactory, n as InternalAuthBootstrapFactory, r as FrontendAppConfigFactory, t as PublicFrontendBootstrapFactory } from "./PublicFrontendBootstrapFactory-r61MeSpZ.js";
|
|
15
15
|
|
|
16
16
|
//#region src/application/contracts/userDirectoryContracts.types.d.ts
|
|
17
17
|
type UserAccountStatus = "invited" | "active" | "inactive";
|
|
@@ -38,195 +38,6 @@ declare class UpsertLocalBootstrapUserCommand extends Command<UpsertLocalBootstr
|
|
|
38
38
|
constructor(email: string, password: string);
|
|
39
39
|
}
|
|
40
40
|
//#endregion
|
|
41
|
-
//#region ../core-nodes/src/nodes/aggregate.d.ts
|
|
42
|
-
declare class Aggregate<TIn = unknown, TOut = unknown> implements RunnableNodeConfig<TIn, TOut> {
|
|
43
|
-
readonly name: string;
|
|
44
|
-
readonly aggregate: (items: Items<TIn>, ctx: NodeExecutionContext<Aggregate<TIn, TOut>>) => TOut | Promise<TOut>;
|
|
45
|
-
readonly id?: string | undefined;
|
|
46
|
-
readonly kind: "node";
|
|
47
|
-
readonly type: TypeToken<unknown>;
|
|
48
|
-
readonly execution: {
|
|
49
|
-
readonly hint: "local";
|
|
50
|
-
};
|
|
51
|
-
readonly icon: "lucide:layers";
|
|
52
|
-
constructor(name: string, aggregate: (items: Items<TIn>, ctx: NodeExecutionContext<Aggregate<TIn, TOut>>) => TOut | Promise<TOut>, id?: string | undefined);
|
|
53
|
-
}
|
|
54
|
-
//#endregion
|
|
55
|
-
//#region ../core-nodes/src/nodes/filter.d.ts
|
|
56
|
-
declare class Filter<TIn = unknown> implements RunnableNodeConfig<TIn, TIn> {
|
|
57
|
-
readonly name: string;
|
|
58
|
-
readonly predicate: (item: Item<TIn>, index: number, items: Items<TIn>, ctx: NodeExecutionContext<Filter<TIn>>) => boolean;
|
|
59
|
-
readonly id?: string | undefined;
|
|
60
|
-
readonly kind: "node";
|
|
61
|
-
readonly type: TypeToken<unknown>;
|
|
62
|
-
readonly execution: {
|
|
63
|
-
readonly hint: "local";
|
|
64
|
-
};
|
|
65
|
-
readonly icon: "lucide:filter";
|
|
66
|
-
constructor(name: string, predicate: (item: Item<TIn>, index: number, items: Items<TIn>, ctx: NodeExecutionContext<Filter<TIn>>) => boolean, id?: string | undefined);
|
|
67
|
-
}
|
|
68
|
-
//#endregion
|
|
69
|
-
//#region ../core-nodes/src/nodes/split.d.ts
|
|
70
|
-
declare class Split<TIn = unknown, TElem = unknown> implements RunnableNodeConfig<TIn, TElem> {
|
|
71
|
-
readonly name: string;
|
|
72
|
-
readonly getElements: (item: Item<TIn>, ctx: NodeExecutionContext<Split<TIn, TElem>>) => readonly TElem[];
|
|
73
|
-
readonly id?: string | undefined;
|
|
74
|
-
readonly kind: "node";
|
|
75
|
-
readonly type: TypeToken<unknown>;
|
|
76
|
-
readonly execution: {
|
|
77
|
-
readonly hint: "local";
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* When splitting yields zero items for a batch, downstream single-input nodes still run once with an empty batch.
|
|
81
|
-
* Mirrors {@link MapData}'s empty-output behavior.
|
|
82
|
-
*/
|
|
83
|
-
readonly continueWhenEmptyOutput: true;
|
|
84
|
-
readonly icon: "lucide:ungroup";
|
|
85
|
-
constructor(name: string, getElements: (item: Item<TIn>, ctx: NodeExecutionContext<Split<TIn, TElem>>) => readonly TElem[], id?: string | undefined);
|
|
86
|
-
}
|
|
87
|
-
//#endregion
|
|
88
|
-
//#region ../core-nodes/src/nodes/merge.d.ts
|
|
89
|
-
type MergeMode = "passThrough" | "append" | "mergeByPosition";
|
|
90
|
-
//#endregion
|
|
91
|
-
//#region ../core-nodes/src/workflowAuthoring/WorkflowAuthoringOptions.types.d.ts
|
|
92
|
-
type WorkflowAgentPrompt<TCurrentJson> = string | ((item: TCurrentJson) => string);
|
|
93
|
-
interface WorkflowAgentOptions<TCurrentJson, TOutputSchema extends z.ZodTypeAny | undefined = undefined> {
|
|
94
|
-
readonly prompt: WorkflowAgentPrompt<TCurrentJson>;
|
|
95
|
-
readonly model: string | ChatModelConfig;
|
|
96
|
-
readonly tools?: ReadonlyArray<ToolConfig>;
|
|
97
|
-
readonly outputSchema?: TOutputSchema;
|
|
98
|
-
readonly retryPolicy?: RunnableNodeConfig["retryPolicy"];
|
|
99
|
-
readonly guardrails?: AgentGuardrailConfig;
|
|
100
|
-
readonly id?: string;
|
|
101
|
-
}
|
|
102
|
-
//#endregion
|
|
103
|
-
//#region ../core-nodes/src/workflowAuthoring/WorkflowBranchBuilder.types.d.ts
|
|
104
|
-
declare class WorkflowBranchBuilder<TCurrentJson> {
|
|
105
|
-
private readonly steps;
|
|
106
|
-
constructor(steps?: ReadonlyArray<AnyRunnableNodeConfig>);
|
|
107
|
-
then<TOutputJson, TConfig extends RunnableNodeConfig<TCurrentJson, TOutputJson>>(config: TConfig): WorkflowBranchBuilder<RunnableNodeOutputJson<TConfig>>;
|
|
108
|
-
map<TNextJson>(mapper: (item: TCurrentJson) => TNextJson): WorkflowBranchBuilder<TNextJson>;
|
|
109
|
-
map<TNextJson>(name: string, mapper: (item: TCurrentJson) => TNextJson, id?: string): WorkflowBranchBuilder<TNextJson>;
|
|
110
|
-
wait(duration: number | string): WorkflowBranchBuilder<TCurrentJson>;
|
|
111
|
-
wait(name: string, duration: number | string, id?: string): WorkflowBranchBuilder<TCurrentJson>;
|
|
112
|
-
split<TElem>(getElements: (item: Item<TCurrentJson>, ctx: NodeExecutionContext<Split<TCurrentJson, TElem>>) => readonly TElem[]): WorkflowBranchBuilder<TElem>;
|
|
113
|
-
split<TElem>(name: string, getElements: (item: Item<TCurrentJson>, ctx: NodeExecutionContext<Split<TCurrentJson, TElem>>) => readonly TElem[], id?: string): WorkflowBranchBuilder<TElem>;
|
|
114
|
-
filter(predicate: (item: Item<TCurrentJson>, index: number, items: Items<TCurrentJson>, ctx: NodeExecutionContext<Filter<TCurrentJson>>) => boolean): WorkflowBranchBuilder<TCurrentJson>;
|
|
115
|
-
filter(name: string, predicate: (item: Item<TCurrentJson>, index: number, items: Items<TCurrentJson>, ctx: NodeExecutionContext<Filter<TCurrentJson>>) => boolean, id?: string): WorkflowBranchBuilder<TCurrentJson>;
|
|
116
|
-
aggregate<TOut>(aggregateFn: (items: Items<TCurrentJson>, ctx: NodeExecutionContext<Aggregate<TCurrentJson, TOut>>) => TOut | Promise<TOut>): WorkflowBranchBuilder<TOut>;
|
|
117
|
-
aggregate<TOut>(name: string, aggregateFn: (items: Items<TCurrentJson>, ctx: NodeExecutionContext<Aggregate<TCurrentJson, TOut>>) => TOut | Promise<TOut>, id?: string): WorkflowBranchBuilder<TOut>;
|
|
118
|
-
agent<TOutputSchema extends z.ZodTypeAny>(options: WorkflowAgentOptions<TCurrentJson, TOutputSchema>): WorkflowBranchBuilder<z.output<TOutputSchema>>;
|
|
119
|
-
agent(options: WorkflowAgentOptions<TCurrentJson, undefined>): WorkflowBranchBuilder<Record<string, unknown>>;
|
|
120
|
-
agent<TOutputSchema extends z.ZodTypeAny>(name: string, options: WorkflowAgentOptions<TCurrentJson, TOutputSchema | undefined>): WorkflowBranchBuilder<TOutputSchema extends z.ZodTypeAny ? z.output<TOutputSchema> : Record<string, unknown>>;
|
|
121
|
-
node<TConfig extends Record<string, unknown>, TOutputJson>(definitionOrKey: DefinedNode<string, TConfig, TCurrentJson, TOutputJson> | string, config: TConfig, name?: string, id?: string): WorkflowBranchBuilder<TOutputJson>;
|
|
122
|
-
getSteps(): ReadonlyArray<AnyRunnableNodeConfig>;
|
|
123
|
-
}
|
|
124
|
-
//#endregion
|
|
125
|
-
//#region ../core-nodes/src/workflowAuthoring/WorkflowChain.types.d.ts
|
|
126
|
-
type BranchCallback<TCurrentJson, TNextJson> = (branch: WorkflowBranchBuilder<TCurrentJson>) => WorkflowBranchBuilder<TNextJson>;
|
|
127
|
-
type RouteBranchCallback<TCurrentJson, TNextJson> = (branch: WorkflowChain<TCurrentJson>) => WorkflowChain<TNextJson>;
|
|
128
|
-
declare class WorkflowChain<TCurrentJson> {
|
|
129
|
-
private readonly chain;
|
|
130
|
-
constructor(chain: ChainCursor<TCurrentJson>);
|
|
131
|
-
then<TOutputJson, TConfig extends RunnableNodeConfig<TCurrentJson, TOutputJson>>(config: TConfig): WorkflowChain<RunnableNodeOutputJson<TConfig>>;
|
|
132
|
-
map<TNextJson>(mapper: (item: TCurrentJson) => TNextJson): WorkflowChain<TNextJson>;
|
|
133
|
-
map<TNextJson>(name: string, mapper: (item: TCurrentJson) => TNextJson, id?: string): WorkflowChain<TNextJson>;
|
|
134
|
-
wait(duration: number | string): WorkflowChain<TCurrentJson>;
|
|
135
|
-
wait(name: string, duration: number | string, id?: string): WorkflowChain<TCurrentJson>;
|
|
136
|
-
split<TElem>(getElements: (item: Item<TCurrentJson>, ctx: NodeExecutionContext<Split<TCurrentJson, TElem>>) => readonly TElem[]): WorkflowChain<TElem>;
|
|
137
|
-
split<TElem>(name: string, getElements: (item: Item<TCurrentJson>, ctx: NodeExecutionContext<Split<TCurrentJson, TElem>>) => readonly TElem[], id?: string): WorkflowChain<TElem>;
|
|
138
|
-
filter(predicate: (item: Item<TCurrentJson>, index: number, items: Items<TCurrentJson>, ctx: NodeExecutionContext<Filter<TCurrentJson>>) => boolean): WorkflowChain<TCurrentJson>;
|
|
139
|
-
filter(name: string, predicate: (item: Item<TCurrentJson>, index: number, items: Items<TCurrentJson>, ctx: NodeExecutionContext<Filter<TCurrentJson>>) => boolean, id?: string): WorkflowChain<TCurrentJson>;
|
|
140
|
-
aggregate<TOut>(aggregateFn: (items: Items<TCurrentJson>, ctx: NodeExecutionContext<Aggregate<TCurrentJson, TOut>>) => TOut | Promise<TOut>): WorkflowChain<TOut>;
|
|
141
|
-
aggregate<TOut>(name: string, aggregateFn: (items: Items<TCurrentJson>, ctx: NodeExecutionContext<Aggregate<TCurrentJson, TOut>>) => TOut | Promise<TOut>, id?: string): WorkflowChain<TOut>;
|
|
142
|
-
merge(): WorkflowChain<TCurrentJson>;
|
|
143
|
-
merge(cfg: Readonly<{
|
|
144
|
-
mode: MergeMode;
|
|
145
|
-
prefer?: ReadonlyArray<string>;
|
|
146
|
-
}>, id?: string): WorkflowChain<TCurrentJson>;
|
|
147
|
-
merge(name: string, cfg?: Readonly<{
|
|
148
|
-
mode: MergeMode;
|
|
149
|
-
prefer?: ReadonlyArray<string>;
|
|
150
|
-
}>, id?: string): WorkflowChain<TCurrentJson>;
|
|
151
|
-
if<TBranchJson>(predicate: (item: TCurrentJson) => boolean, branches: Readonly<{
|
|
152
|
-
true?: BranchCallback<TCurrentJson, TBranchJson>;
|
|
153
|
-
false?: BranchCallback<TCurrentJson, TBranchJson>;
|
|
154
|
-
}>): WorkflowChain<TBranchJson>;
|
|
155
|
-
if<TBranchJson>(name: string, predicate: (item: TCurrentJson) => boolean, branches: Readonly<{
|
|
156
|
-
true?: BranchCallback<TCurrentJson, TBranchJson>;
|
|
157
|
-
false?: BranchCallback<TCurrentJson, TBranchJson>;
|
|
158
|
-
}>): WorkflowChain<TBranchJson>;
|
|
159
|
-
route<TBranchJson>(branches: Readonly<Record<string, RouteBranchCallback<TCurrentJson, TBranchJson> | undefined>>): WorkflowChain<TBranchJson>;
|
|
160
|
-
switch<TBranchJson>(cfg: Readonly<{
|
|
161
|
-
cases: readonly string[];
|
|
162
|
-
defaultCase: string;
|
|
163
|
-
resolveCaseKey: (item: TCurrentJson) => string | Promise<string>;
|
|
164
|
-
branches: Readonly<Record<string, RouteBranchCallback<TCurrentJson, TBranchJson> | undefined>>;
|
|
165
|
-
}>): WorkflowChain<TBranchJson>;
|
|
166
|
-
switch<TBranchJson>(name: string, cfg: Readonly<{
|
|
167
|
-
cases: readonly string[];
|
|
168
|
-
defaultCase: string;
|
|
169
|
-
resolveCaseKey: (item: TCurrentJson) => string | Promise<string>;
|
|
170
|
-
branches: Readonly<Record<string, RouteBranchCallback<TCurrentJson, TBranchJson> | undefined>>;
|
|
171
|
-
}>, id?: string): WorkflowChain<TBranchJson>;
|
|
172
|
-
agent<TOutputSchema extends z.ZodTypeAny>(options: WorkflowAgentOptions<TCurrentJson, TOutputSchema>): WorkflowChain<z.output<TOutputSchema>>;
|
|
173
|
-
agent(options: WorkflowAgentOptions<TCurrentJson, undefined>): WorkflowChain<Record<string, unknown>>;
|
|
174
|
-
agent<TOutputSchema extends z.ZodTypeAny>(name: string, options: WorkflowAgentOptions<TCurrentJson, TOutputSchema | undefined>): WorkflowChain<TOutputSchema extends z.ZodTypeAny ? z.output<TOutputSchema> : Record<string, unknown>>;
|
|
175
|
-
node<TConfig extends Record<string, unknown>, TOutputJson>(definitionOrKey: DefinedNode<string, TConfig, TCurrentJson, TOutputJson> | string, config: TConfig, name?: string, id?: string): WorkflowChain<TOutputJson>;
|
|
176
|
-
build(): WorkflowDefinition;
|
|
177
|
-
}
|
|
178
|
-
//#endregion
|
|
179
|
-
//#region ../core-nodes/src/workflowAuthoring/WorkflowAuthoringBuilder.types.d.ts
|
|
180
|
-
declare class WorkflowAuthoringBuilder {
|
|
181
|
-
private readonly id;
|
|
182
|
-
private readonly workflowName;
|
|
183
|
-
constructor(id: string, workflowName?: string);
|
|
184
|
-
name(name: string): WorkflowAuthoringBuilder;
|
|
185
|
-
manualTrigger<TOutputJson>(defaultItems: TOutputJson | ReadonlyArray<TOutputJson>): WorkflowChain<TOutputJson>;
|
|
186
|
-
manualTrigger<TOutputJson>(name: string, defaultItems?: TOutputJson | ReadonlyArray<TOutputJson>, id?: string): WorkflowChain<TOutputJson>;
|
|
187
|
-
}
|
|
188
|
-
//#endregion
|
|
189
|
-
//#region ../core-nodes/src/workflowAuthoring.types.d.ts
|
|
190
|
-
declare function workflow(id: string): WorkflowAuthoringBuilder;
|
|
191
|
-
//#endregion
|
|
192
|
-
//#region src/presentation/config/CodemationAuthoring.types.d.ts
|
|
193
|
-
interface FriendlyCodemationDatabaseConfig {
|
|
194
|
-
readonly kind: "postgresql" | "sqlite";
|
|
195
|
-
readonly url?: string;
|
|
196
|
-
readonly filePath?: string;
|
|
197
|
-
}
|
|
198
|
-
interface FriendlyCodemationExecutionConfig {
|
|
199
|
-
readonly mode?: "inline" | "queue";
|
|
200
|
-
readonly queuePrefix?: string;
|
|
201
|
-
readonly workerQueues?: ReadonlyArray<string>;
|
|
202
|
-
readonly redisUrl?: string;
|
|
203
|
-
}
|
|
204
|
-
interface DefineCodemationAppOptions extends Omit<CodemationConfig, "app" | "credentialTypes" | "register" | "whitelabel" | "auth"> {
|
|
205
|
-
readonly name?: string;
|
|
206
|
-
readonly auth?: CodemationConfig["auth"];
|
|
207
|
-
readonly database?: FriendlyCodemationDatabaseConfig;
|
|
208
|
-
readonly execution?: FriendlyCodemationExecutionConfig;
|
|
209
|
-
readonly nodes?: ReadonlyArray<DefinedNode<string, Record<string, unknown>, unknown, unknown>>;
|
|
210
|
-
readonly credentialTypes?: ReadonlyArray<AnyCredentialType>;
|
|
211
|
-
readonly credentials?: ReadonlyArray<AnyCredentialType>;
|
|
212
|
-
readonly register?: (context: CodemationAppContext) => void;
|
|
213
|
-
readonly whitelabel?: CodemationWhitelabelConfig;
|
|
214
|
-
}
|
|
215
|
-
interface DefinePluginOptions {
|
|
216
|
-
readonly name?: string;
|
|
217
|
-
readonly pluginPackageId?: string;
|
|
218
|
-
readonly nodes?: ReadonlyArray<DefinedNode<string, Record<string, unknown>, unknown, unknown>>;
|
|
219
|
-
readonly credentials?: ReadonlyArray<AnyCredentialType>;
|
|
220
|
-
readonly register?: (context: CodemationPluginContext) => void | Promise<void>;
|
|
221
|
-
readonly sandbox?: DefineCodemationAppOptions & Readonly<{
|
|
222
|
-
workflows?: ReadonlyArray<WorkflowDefinition>;
|
|
223
|
-
}>;
|
|
224
|
-
}
|
|
225
|
-
declare function defineCodemationApp(options: DefineCodemationAppOptions): CodemationConfig;
|
|
226
|
-
declare function definePlugin(options: DefinePluginOptions): CodemationPlugin & Readonly<{
|
|
227
|
-
sandbox?: DefinePluginOptions["sandbox"];
|
|
228
|
-
}>;
|
|
229
|
-
//#endregion
|
|
230
41
|
//#region src/presentation/config/CodemationPackageManifest.d.ts
|
|
231
42
|
interface CodemationPackageManifest {
|
|
232
43
|
readonly plugin?: string;
|
package/dist/index.js
CHANGED
|
@@ -1,100 +1,16 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import { t as
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import { n as
|
|
10
|
-
import { n as
|
|
11
|
-
import { t as
|
|
12
|
-
import {
|
|
1
|
+
import { n as definePlugin, t as defineCodemationApp } from "./CodemationAuthoring.types-SxVJ1qu5.js";
|
|
2
|
+
import "./ConsoleLogger-DuStfHe0.js";
|
|
3
|
+
import { i as CodemationFrontendAuthSnapshotJsonCodec, n as InternalAuthBootstrapJsonCodec, r as FrontendAppConfigJsonCodec, t as PublicFrontendBootstrapJsonCodec } from "./PublicFrontendBootstrapJsonCodec-BZgQ_FnW.js";
|
|
4
|
+
import { t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-DovlxZNb.js";
|
|
5
|
+
import "./ServerLoggerFactory-CsNW5qhz.js";
|
|
6
|
+
import "./decorateParam-D7WPDFAf.js";
|
|
7
|
+
import "./decorate-Dq0XLibd.js";
|
|
8
|
+
import { d as ApplicationTokens } from "./CredentialServices-BPKUF8Xs.js";
|
|
9
|
+
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-CcSGFNLW.js";
|
|
10
|
+
import { n as CodemationPluginPackageMetadata, t as AppConfigFactory } from "./AppConfigFactory-CqKWXqOm.js";
|
|
11
|
+
import { n as CodemationBootstrapRequest, t as CodemationPluginListMerger } from "./CodemationPluginListMerger-_lZaa6gO.js";
|
|
12
|
+
import { t as CodemationPostgresPrismaClientFactory } from "./persistenceServer-DKbFDxoS.js";
|
|
13
|
+
import { r as CodemationServerGateway } from "./server-CFpgKuVE.js";
|
|
13
14
|
import { workflow } from "@codemation/core-nodes";
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
var CodemationAuthoringConfigFactory = class {
|
|
17
|
-
static createApp(options) {
|
|
18
|
-
const appDefinition = this.createAppDefinition(options);
|
|
19
|
-
const credentialTypes = [...options.credentialTypes ?? [], ...options.credentials ?? []];
|
|
20
|
-
const register = this.composeAppRegister(options.register, options.nodes);
|
|
21
|
-
const { workflows, workflowDiscovery, plugins, runtime, log } = options;
|
|
22
|
-
return {
|
|
23
|
-
workflows,
|
|
24
|
-
workflowDiscovery,
|
|
25
|
-
plugins,
|
|
26
|
-
runtime,
|
|
27
|
-
log,
|
|
28
|
-
app: appDefinition,
|
|
29
|
-
credentialTypes,
|
|
30
|
-
register
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
static createPlugin(options) {
|
|
34
|
-
return {
|
|
35
|
-
pluginPackageId: options.pluginPackageId,
|
|
36
|
-
sandbox: options.sandbox,
|
|
37
|
-
async register(context) {
|
|
38
|
-
for (const nodeDefinition of options.nodes ?? []) nodeDefinition.register(context);
|
|
39
|
-
for (const credential of options.credentials ?? []) context.registerCredentialType(credential);
|
|
40
|
-
await options.register?.(context);
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
static createAppDefinition(options) {
|
|
45
|
-
const scheduler = this.createSchedulerConfig(options.execution);
|
|
46
|
-
const database = this.createDatabaseConfig(options.database);
|
|
47
|
-
const whitelabel = this.createWhitelabel(options.name, options.whitelabel);
|
|
48
|
-
if (!options.auth && !database && !scheduler && !whitelabel) return;
|
|
49
|
-
return {
|
|
50
|
-
auth: options.auth,
|
|
51
|
-
database,
|
|
52
|
-
scheduler,
|
|
53
|
-
whitelabel
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
static createDatabaseConfig(database) {
|
|
57
|
-
if (!database) return;
|
|
58
|
-
if (database.kind === "sqlite") return {
|
|
59
|
-
kind: "sqlite",
|
|
60
|
-
sqliteFilePath: database.filePath
|
|
61
|
-
};
|
|
62
|
-
return {
|
|
63
|
-
kind: "postgresql",
|
|
64
|
-
url: database.url
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
static createSchedulerConfig(execution) {
|
|
68
|
-
if (!execution) return;
|
|
69
|
-
return {
|
|
70
|
-
kind: execution.mode,
|
|
71
|
-
queuePrefix: execution.queuePrefix,
|
|
72
|
-
workerQueues: execution.workerQueues,
|
|
73
|
-
redisUrl: execution.redisUrl
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
static createWhitelabel(name, whitelabel) {
|
|
77
|
-
if (!name && !whitelabel) return;
|
|
78
|
-
return {
|
|
79
|
-
productName: name ?? whitelabel?.productName,
|
|
80
|
-
logoPath: whitelabel?.logoPath
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
static composeAppRegister(register, nodes) {
|
|
84
|
-
if (!register && (!nodes || nodes.length === 0)) return;
|
|
85
|
-
return (context) => {
|
|
86
|
-
for (const nodeDefinition of nodes ?? []) nodeDefinition.register(context);
|
|
87
|
-
register?.(context);
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
function defineCodemationApp(options) {
|
|
92
|
-
return CodemationAuthoringConfigFactory.createApp(options);
|
|
93
|
-
}
|
|
94
|
-
function definePlugin(options) {
|
|
95
|
-
return CodemationAuthoringConfigFactory.createPlugin(options);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
//#endregion
|
|
99
|
-
export { ApiPaths, AppConfigFactory, AppContainerFactory, AppContainerLifecycle, ApplicationTokens, CodemationBootstrapRequest, CodemationConsumerConfigLoader, CodemationFrontendAuthSnapshotFactory, CodemationFrontendAuthSnapshotJsonCodec, CodemationPluginListMerger, CodemationPluginPackageMetadata, CodemationPostgresPrismaClientFactory, CodemationServerGateway, DatabaseMigrations, FrontendAppConfigFactory, FrontendAppConfigJsonCodec, FrontendRuntime, InternalAuthBootstrapFactory, InternalAuthBootstrapJsonCodec, ListUserAccountsQuery, PublicFrontendBootstrapFactory, PublicFrontendBootstrapJsonCodec, UpsertLocalBootstrapUserCommand, WorkerRuntime, defineCodemationApp, definePlugin, workflow };
|
|
100
|
-
//# sourceMappingURL=index.js.map
|
|
16
|
+
export { ApiPaths, AppConfigFactory, AppContainerFactory, AppContainerLifecycle, ApplicationTokens, CodemationBootstrapRequest, CodemationConsumerConfigLoader, CodemationFrontendAuthSnapshotFactory, CodemationFrontendAuthSnapshotJsonCodec, CodemationPluginListMerger, CodemationPluginPackageMetadata, CodemationPostgresPrismaClientFactory, CodemationServerGateway, DatabaseMigrations, FrontendAppConfigFactory, FrontendAppConfigJsonCodec, FrontendRuntime, InternalAuthBootstrapFactory, InternalAuthBootstrapJsonCodec, ListUserAccountsQuery, PublicFrontendBootstrapFactory, PublicFrontendBootstrapJsonCodec, UpsertLocalBootstrapUserCommand, WorkerRuntime, defineCodemationApp, definePlugin, workflow };
|
package/dist/nextServer.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import "./CodemationConfigNormalizer-
|
|
7
|
-
import { a as CredentialInstanceService, c as CredentialSecretCipher, i as CredentialBindingService, l as CredentialFieldEnvOverlayService, o as CredentialOAuth2ScopeResolver, r as CredentialRuntimeMaterialService, s as CredentialMaterialResolver, t as CredentialStore, u as CredentialTypeRegistryImpl } from "./CredentialServices-
|
|
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-
|
|
9
|
-
import { t as AppConfigFactory } from "./AppConfigFactory-
|
|
10
|
-
import { a as WorkflowDto, n as InternalAuthBootstrapFactory, o as WorkflowSummary, r as FrontendAppConfigFactory, t as PublicFrontendBootstrapFactory } from "./PublicFrontendBootstrapFactory-
|
|
1
|
+
import { A as RunIdFactory, D as Item, E as BinaryAttachment, F as BinaryStorage, J as WebhookInvocationMatch, N as WorkflowDefinition$1, S as CredentialTypeDefinition, T as ActivationIdFactory, et as Clock, g as CredentialOAuth2AuthDefinition, q as WorkflowActivationPolicy, t as RunIntentService } from "./index-SKC6oys-.js";
|
|
2
|
+
import { r as AppConfig } from "./CodemationAppContext-Vtn0U2Ga.js";
|
|
3
|
+
import { l as Logger, u as LoggerFactory } from "./CodemationWhitelabelConfig-D5rYcLlj.js";
|
|
4
|
+
import { t as LogLevelPolicy } from "./LogLevelPolicy-CkiJAH75.js";
|
|
5
|
+
import { a as CodemationFrontendAuthSnapshot, i as CodemationFrontendAuthProviderSnapshot, n as InternalAuthBootstrap, r as FrontendAppConfig, t as PublicFrontendBootstrap } from "./PublicFrontendBootstrap-ci0Vwxrb.js";
|
|
6
|
+
import "./CodemationConfigNormalizer-kJmyHNDp.js";
|
|
7
|
+
import { a as CredentialInstanceService, c as CredentialSecretCipher, i as CredentialBindingService, l as CredentialFieldEnvOverlayService, o as CredentialOAuth2ScopeResolver, r as CredentialRuntimeMaterialService, s as CredentialMaterialResolver, t as CredentialStore, u as CredentialTypeRegistryImpl } from "./CredentialServices-GlBk2nL7.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-DegwsxrS.js";
|
|
9
|
+
import { t as AppConfigFactory } from "./AppConfigFactory-j1Mc-dIX.js";
|
|
10
|
+
import { a as WorkflowDto, n as InternalAuthBootstrapFactory, o as WorkflowSummary, r as FrontendAppConfigFactory, t as PublicFrontendBootstrapFactory } from "./PublicFrontendBootstrapFactory-r61MeSpZ.js";
|
|
11
11
|
import { Hono } from "hono";
|
|
12
12
|
import { NodeDefinition, WorkflowDefinition } from "@codemation/core/browser";
|
|
13
13
|
|
package/dist/nextServer.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./ConsoleLogger-
|
|
2
|
-
import { a as FilteringLogger, i as PerformanceLogPolicy, n as PerformanceLogPolicyFactory, o as LogLevelPolicyFactory, r as performanceLogPolicyFactory, s as logLevelPolicyFactory, t as ServerLoggerFactory } from "./ServerLoggerFactory-
|
|
3
|
-
import { n as __decorateMetadata, t as __decorateParam } from "./decorateParam-
|
|
4
|
-
import { t as __decorate } from "./decorate-
|
|
5
|
-
import { a as CredentialInstanceService, d as ApplicationTokens, i as CredentialBindingService } from "./CredentialServices-
|
|
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-
|
|
7
|
-
import { t as AppConfigFactory } from "./AppConfigFactory-
|
|
8
|
-
import { n as CodemationBootstrapRequest, t as CodemationPluginListMerger } from "./CodemationPluginListMerger-
|
|
1
|
+
import "./ConsoleLogger-DuStfHe0.js";
|
|
2
|
+
import { a as FilteringLogger, i as PerformanceLogPolicy, n as PerformanceLogPolicyFactory, o as LogLevelPolicyFactory, r as performanceLogPolicyFactory, s as logLevelPolicyFactory, t as ServerLoggerFactory } from "./ServerLoggerFactory-CsNW5qhz.js";
|
|
3
|
+
import { n as __decorateMetadata, t as __decorateParam } from "./decorateParam-D7WPDFAf.js";
|
|
4
|
+
import { t as __decorate } from "./decorate-Dq0XLibd.js";
|
|
5
|
+
import { a as CredentialInstanceService, d as ApplicationTokens, i as CredentialBindingService } from "./CredentialServices-BPKUF8Xs.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-CcSGFNLW.js";
|
|
7
|
+
import { t as AppConfigFactory } from "./AppConfigFactory-CqKWXqOm.js";
|
|
8
|
+
import { n as CodemationBootstrapRequest, t as CodemationPluginListMerger } from "./CodemationPluginListMerger-_lZaa6gO.js";
|
|
9
9
|
import { CoreTokens, inject, injectable } from "@codemation/core";
|
|
10
10
|
|
|
11
11
|
//#region src/application/runs/WorkflowRunRetentionPruneScheduler.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as PrismaClient } from "./AppConfigFactory-
|
|
1
|
+
import { i as PrismaClient } from "./AppConfigFactory-j1Mc-dIX.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-D89nDslh.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as __toESM } from "./chunk-7V6ThxGB.js";
|
|
2
|
-
import { i as require_client } from "./AppConfigFactory-
|
|
2
|
+
import { i as require_client } from "./AppConfigFactory-CqKWXqOm.js";
|
|
3
3
|
import { PrismaPg } from "@prisma/adapter-pg";
|
|
4
4
|
|
|
5
5
|
//#region src/infrastructure/persistence/CodemationPostgresPrismaClientFactory.ts
|
|
@@ -12,4 +12,4 @@ var CodemationPostgresPrismaClientFactory = class {
|
|
|
12
12
|
|
|
13
13
|
//#endregion
|
|
14
14
|
export { CodemationPostgresPrismaClientFactory as t };
|
|
15
|
-
//# sourceMappingURL=persistenceServer-
|
|
15
|
+
//# sourceMappingURL=persistenceServer-DKbFDxoS.js.map
|