@codemation/host 0.0.15 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +37 -0
  3. package/dist/{AppConfigFactory-DmHOpg8O.d.ts → AppConfigFactory-Co4STjwt.d.ts} +5 -3
  4. package/dist/{AppConfigFactory-DWIz2hy-.js → AppConfigFactory-DxoZ4v8r.js} +40 -3
  5. package/dist/AppConfigFactory-DxoZ4v8r.js.map +1 -0
  6. package/dist/{AppContainerFactory-B5eRpvAa.js → AppContainerFactory-z9aUDFiJ.js} +275 -105
  7. package/dist/AppContainerFactory-z9aUDFiJ.js.map +1 -0
  8. package/dist/{CodemationConfig-D2ULNkec.d.ts → CodemationConfig-COs4GcOE.d.ts} +18 -10
  9. package/dist/{CodemationConfigNormalizer-CBLxXaRV.d.ts → CodemationConfigNormalizer-B7w1JA_2.d.ts} +2 -2
  10. package/dist/{CodemationConsumerConfigLoader-BBzAr6L_.js → CodemationConsumerConfigLoader-C_ISRrpI.js} +28 -7
  11. package/dist/CodemationConsumerConfigLoader-C_ISRrpI.js.map +1 -0
  12. package/dist/{CodemationConsumerConfigLoader-BLvzcfb7.d.ts → CodemationConsumerConfigLoader-OlXKw-us.d.ts} +6 -2
  13. package/dist/CodemationPluginListMerger-CGwOTdZ7.js +57 -0
  14. package/dist/CodemationPluginListMerger-CGwOTdZ7.js.map +1 -0
  15. package/dist/{CodemationPluginListMerger-B0-e4CJ6.d.ts → CodemationPluginListMerger-_ZIiOQxB.d.ts} +79 -117
  16. package/dist/{CredentialServices-BeuMtqYA.d.ts → CredentialServices-D3VTczpC.d.ts} +3 -3
  17. package/dist/PublicFrontendBootstrap-p7mS8aWG.d.ts +50 -0
  18. package/dist/{FrontendAppConfigFactory-Bj-DZNlt.d.ts → PublicFrontendBootstrapFactory-CE4oGogq.d.ts} +19 -4
  19. package/dist/{FrontendAppConfigJsonCodec-nOCQI0ag.js → PublicFrontendBootstrapJsonCodec-BdiVGG5R.js} +76 -2
  20. package/dist/PublicFrontendBootstrapJsonCodec-BdiVGG5R.js.map +1 -0
  21. package/dist/PublicFrontendBootstrapJsonCodec-DjkkKXcq.d.ts +35 -0
  22. package/dist/client.d.ts +3 -3
  23. package/dist/client.js +2 -2
  24. package/dist/consumer.d.ts +4 -4
  25. package/dist/consumer.js +1 -1
  26. package/dist/credentials.d.ts +3 -3
  27. package/dist/devServerSidecar.d.ts +1 -1
  28. package/dist/{index-CkiptHb-.d.ts → index-DbYzycTC.d.ts} +215 -71
  29. package/dist/index.d.ts +150 -13
  30. package/dist/index.js +94 -8
  31. package/dist/index.js.map +1 -0
  32. package/dist/nextServer.d.ts +30 -9
  33. package/dist/nextServer.js +4 -4
  34. package/dist/{persistenceServer-DVeWUbc3.js → persistenceServer-C4L1uMKn.js} +2 -2
  35. package/dist/{persistenceServer-DVeWUbc3.js.map → persistenceServer-C4L1uMKn.js.map} +1 -1
  36. package/dist/{persistenceServer-CaehMh3M.d.ts → persistenceServer-Cr-zCuEr.d.ts} +2 -2
  37. package/dist/persistenceServer.d.ts +5 -5
  38. package/dist/persistenceServer.js +2 -2
  39. package/dist/{server-Dyo8qh4k.d.ts → server-B6k53aZj.d.ts} +14 -19
  40. package/dist/{server-C65z_kqm.js → server-DDVXr7BN.js} +42 -25
  41. package/dist/server-DDVXr7BN.js.map +1 -0
  42. package/dist/server.d.ts +11 -11
  43. package/dist/server.js +7 -7
  44. package/package.json +9 -6
  45. package/playwright.scaffolded-dev.config.ts +46 -0
  46. package/src/application/dev/BootRuntimeSummary.types.ts +2 -0
  47. package/src/application/dev/DevBootstrapSummaryAssembler.ts +1 -0
  48. package/src/application/dev/DevBootstrapSummaryJson.types.ts +6 -0
  49. package/src/bootstrap/AppContainerFactory.ts +101 -6
  50. package/src/bootstrap/runtime/AppConfigFactory.ts +22 -2
  51. package/src/client.ts +4 -0
  52. package/src/index.ts +21 -5
  53. package/src/infrastructure/config/CodemationPluginRegistrar.ts +6 -0
  54. package/src/infrastructure/di/HandlesCommandRegistry.ts +1 -10
  55. package/src/infrastructure/di/HandlesQueryRegistry.ts +1 -10
  56. package/src/nextServer.ts +4 -0
  57. package/src/presentation/config/AppConfig.ts +6 -0
  58. package/src/presentation/config/CodemationAuthoring.types.ts +169 -0
  59. package/src/presentation/config/CodemationPackageManifest.ts +1 -7
  60. package/src/presentation/config/CodemationPlugin.ts +45 -8
  61. package/src/presentation/config/CodemationPluginListMerger.ts +30 -26
  62. package/src/presentation/frontend/CodemationFrontendAuthSnapshotFactory.ts +7 -0
  63. package/src/presentation/frontend/InternalAuthBootstrap.ts +12 -0
  64. package/src/presentation/frontend/InternalAuthBootstrapFactory.ts +26 -0
  65. package/src/presentation/frontend/InternalAuthBootstrapJsonCodec.ts +49 -0
  66. package/src/presentation/frontend/PublicFrontendBootstrap.ts +12 -0
  67. package/src/presentation/frontend/PublicFrontendBootstrapFactory.ts +23 -0
  68. package/src/presentation/frontend/PublicFrontendBootstrapJsonCodec.ts +48 -0
  69. package/src/presentation/http/ApiPaths.ts +10 -0
  70. package/src/presentation/http/hono/HonoHttpAnonymousRoutePolicyRegistry.ts +3 -0
  71. package/src/presentation/http/hono/registrars/BootstrapHonoApiRouteRegistrar.ts +32 -0
  72. package/src/presentation/http/routeHandlers/InternalAuthBootstrapHttpRouteHandler.ts +18 -0
  73. package/src/presentation/http/routeHandlers/PublicFrontendBootstrapHttpRouteHandler.ts +18 -0
  74. package/src/presentation/server/CodemationConsumerConfigLoader.ts +28 -6
  75. package/src/presentation/server/CodemationPluginDiscovery.ts +59 -28
  76. package/src/server.ts +6 -0
  77. package/dist/AppConfigFactory-DWIz2hy-.js.map +0 -1
  78. package/dist/AppContainerFactory-B5eRpvAa.js.map +0 -1
  79. package/dist/CodemationConsumerConfigLoader-BBzAr6L_.js.map +0 -1
  80. package/dist/CodemationPluginListMerger-DrVOw9KP.js +0 -57
  81. package/dist/CodemationPluginListMerger-DrVOw9KP.js.map +0 -1
  82. package/dist/FrontendAppConfig-D50wjj_n.d.ts +0 -27
  83. package/dist/FrontendAppConfigJsonCodec-1_L7H_Qo.d.ts +0 -20
  84. package/dist/FrontendAppConfigJsonCodec-nOCQI0ag.js.map +0 -1
  85. package/dist/server-C65z_kqm.js.map +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # @codemation/host
2
+
3
+ ## 0.0.18
4
+
5
+ ### Patch Changes
6
+
7
+ - f0c6878: Introduce Changesets, a single CI status check for branch protection, and the Codemation pre-stable license across published packages.
8
+ - Updated dependencies [f0c6878]
9
+ - @codemation/core@0.0.18
10
+ - @codemation/core-nodes@0.0.18
11
+ - @codemation/eventbus-redis@0.0.18
package/LICENSE ADDED
@@ -0,0 +1,37 @@
1
+ Codemation Pre-Stable License
2
+
3
+ Copyright (c) Made Relevant B.V. All rights reserved.
4
+
5
+ 1. Definitions
6
+
7
+ "Software" means the Codemation source code, documentation, and artifacts in this repository and any published npm packages in the Codemation monorepo.
8
+
9
+ "Stable Version" means the first published release of the package `@codemation/core` on the public npm registry with version 1.0.0 or higher.
10
+
11
+ 2. Permitted use (before Stable Version)
12
+
13
+ Until a Stable Version exists, you may use, copy, modify, and distribute the Software only for non-commercial purposes, including personal learning, research, evaluation, and internal use within your organization that does not charge third parties for access to the Software or a product or service whose primary value is the Software.
14
+
15
+ 3. Restrictions (before Stable Version)
16
+
17
+ Until a Stable Version exists, you must not:
18
+
19
+ a) Sell, rent, lease, or sublicense the Software or a derivative work for a fee;
20
+
21
+ b) Offer the Software or a derivative work as part of a paid product or service (including hosting, support, or consulting) where the Software is a material part of the offering;
22
+
23
+ c) Use the Software or a derivative work primarily to generate revenue or commercial advantage for you or others.
24
+
25
+ These restrictions apply to all versions published before a Stable Version, even if a later Stable Version is released under different terms.
26
+
27
+ 4. After Stable Version
28
+
29
+ The maintainers may publish a Stable Version under different license terms. If they do, those terms apply only to that Stable Version and subsequent releases they designate; they do not automatically apply to earlier pre-stable versions.
30
+
31
+ 5. No warranty
32
+
33
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34
+
35
+ 6. Third-party components
36
+
37
+ The Software may include third-party components under their own licenses. Those licenses govern those components.
@@ -1,5 +1,5 @@
1
- import { _ as AppPersistenceConfig, g as AppConfig } from "./CodemationConfig-D2ULNkec.js";
2
- import { t as NormalizedCodemationConfig } from "./CodemationConfigNormalizer-CBLxXaRV.js";
1
+ import { _ as AppPersistenceConfig, g as AppConfig } from "./CodemationConfig-COs4GcOE.js";
2
+ import { t as NormalizedCodemationConfig } from "./CodemationConfigNormalizer-B7w1JA_2.js";
3
3
  import { AnyNull, AnyNullClass, DbNull, DbNullClass, Decimal, JsonNull, JsonNullClass, NullTypes as NullTypes$1, ObjectEnumValue, PrismaClientInitializationError, PrismaClientKnownRequestError, PrismaClientRustPanicError, PrismaClientUnknownRequestError, PrismaClientValidationError, RawValue, Sql, Value, empty, isAnyNull, isDbNull, isJsonNull, isObjectEnumValue, join, raw, sql as sqltag } from "@prisma/client-runtime-utils";
4
4
 
5
5
  //#region src/infrastructure/persistence/generated/prisma-client/runtime/client.d.ts
@@ -21995,6 +21995,7 @@ declare class PrismaMigrationDeployer {
21995
21995
  //#endregion
21996
21996
  //#region src/bootstrap/runtime/AppConfigFactory.d.ts
21997
21997
  declare class AppConfigFactory {
21998
+ private readonly pluginPackageMetadata;
21998
21999
  create(args: Readonly<{
21999
22000
  repoRoot: string;
22000
22001
  consumerRoot: string;
@@ -22002,6 +22003,7 @@ declare class AppConfigFactory {
22002
22003
  config: NormalizedCodemationConfig;
22003
22004
  workflowSources: ReadonlyArray<string>;
22004
22005
  }>): AppConfig;
22006
+ private createConfiguredPluginLoadSummary;
22005
22007
  private resolvePersistence;
22006
22008
  private resolveDatabaseKind;
22007
22009
  private resolvePgliteDataDir;
@@ -22013,4 +22015,4 @@ declare class AppConfigFactory {
22013
22015
  }
22014
22016
  //#endregion
22015
22017
  export { PrismaMigrationDeployer as n, PrismaClient as r, AppConfigFactory as t };
22016
- //# sourceMappingURL=AppConfigFactory-DmHOpg8O.d.ts.map
22018
+ //# sourceMappingURL=AppConfigFactory-Co4STjwt.d.ts.map
@@ -8166,9 +8166,32 @@ let PrismaMigrationDeployer = class PrismaMigrationDeployer$1 {
8166
8166
  };
8167
8167
  PrismaMigrationDeployer = __decorate([injectable()], PrismaMigrationDeployer);
8168
8168
 
8169
+ //#endregion
8170
+ //#region src/presentation/config/CodemationPlugin.ts
8171
+ var CodemationPluginPackageMetadata = class CodemationPluginPackageMetadata {
8172
+ static packageNameSymbol = Symbol.for("@codemation/plugin-package-name");
8173
+ attachPackageName(plugin, packageName) {
8174
+ if (packageName.trim().length === 0) return plugin;
8175
+ const mutablePlugin = plugin;
8176
+ if (mutablePlugin[CodemationPluginPackageMetadata.packageNameSymbol] === packageName) return plugin;
8177
+ Object.defineProperty(mutablePlugin, CodemationPluginPackageMetadata.packageNameSymbol, {
8178
+ configurable: true,
8179
+ enumerable: false,
8180
+ value: packageName,
8181
+ writable: true
8182
+ });
8183
+ return plugin;
8184
+ }
8185
+ readPackageName(plugin) {
8186
+ const packageName = plugin[CodemationPluginPackageMetadata.packageNameSymbol];
8187
+ return typeof packageName === "string" && packageName.trim().length > 0 ? packageName : void 0;
8188
+ }
8189
+ };
8190
+
8169
8191
  //#endregion
8170
8192
  //#region src/bootstrap/runtime/AppConfigFactory.ts
8171
8193
  var AppConfigFactory = class {
8194
+ pluginPackageMetadata = new CodemationPluginPackageMetadata();
8172
8195
  create(args) {
8173
8196
  const runtimeConfig = args.config.runtime ?? {};
8174
8197
  const persistence = this.resolvePersistence(runtimeConfig, args.env, args.consumerRoot);
@@ -8178,6 +8201,7 @@ var AppConfigFactory = class {
8178
8201
  const workerQueues = runtimeConfig.scheduler?.workerQueues ?? [];
8179
8202
  const queuePrefix = runtimeConfig.scheduler?.queuePrefix ?? runtimeConfig.eventBus?.queuePrefix ?? args.env.QUEUE_PREFIX;
8180
8203
  const hasConfiguredCredentialSessionServiceRegistration = args.config.containerRegistrations.some((entry) => entry.token === CoreTokens.CredentialSessionService);
8204
+ const plugins = [...args.config.plugins ?? []];
8181
8205
  return {
8182
8206
  consumerRoot: args.consumerRoot,
8183
8207
  repoRoot: args.repoRoot,
@@ -8186,7 +8210,8 @@ var AppConfigFactory = class {
8186
8210
  workflows: [...args.config.workflows ?? []],
8187
8211
  containerRegistrations: [...args.config.containerRegistrations],
8188
8212
  credentialTypes: [...args.config.credentialTypes ?? []],
8189
- plugins: [...args.config.plugins ?? []],
8213
+ plugins,
8214
+ pluginLoadSummary: this.createConfiguredPluginLoadSummary(plugins),
8190
8215
  hasConfiguredCredentialSessionServiceRegistration,
8191
8216
  log: args.config.log,
8192
8217
  engineExecutionLimits: runtimeConfig.engineExecutionLimits,
@@ -8210,6 +8235,18 @@ var AppConfigFactory = class {
8210
8235
  webSocketBindHost: args.env.CODEMATION_WS_BIND_HOST ?? "0.0.0.0"
8211
8236
  };
8212
8237
  }
8238
+ createConfiguredPluginLoadSummary(plugins) {
8239
+ const summaries = [];
8240
+ for (const plugin of plugins) {
8241
+ const packageName = this.pluginPackageMetadata.readPackageName(plugin);
8242
+ if (!packageName) continue;
8243
+ summaries.push({
8244
+ packageName,
8245
+ source: "configured"
8246
+ });
8247
+ }
8248
+ return summaries;
8249
+ }
8213
8250
  resolvePersistence(runtimeConfig, env, consumerRoot) {
8214
8251
  const database = runtimeConfig.database;
8215
8252
  if (!database) return { kind: "none" };
@@ -8267,5 +8304,5 @@ var AppConfigFactory = class {
8267
8304
  };
8268
8305
 
8269
8306
  //#endregion
8270
- export { PrismaMigrationDeployer as n, require_client as r, AppConfigFactory as t };
8271
- //# sourceMappingURL=AppConfigFactory-DWIz2hy-.js.map
8307
+ export { require_client as i, CodemationPluginPackageMetadata as n, PrismaMigrationDeployer as r, AppConfigFactory as t };
8308
+ //# sourceMappingURL=AppConfigFactory-DxoZ4v8r.js.map