@objectstack/core 4.0.2 → 4.0.4

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @objectstack/core@4.0.2 build /home/runner/work/framework/framework/packages/core
2
+ > @objectstack/core@4.0.4 build /home/runner/work/framework/framework/packages/core
3
3
  > tsup --config ../../tsup.config.ts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,13 +10,13 @@
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
- ESM dist/index.js 151.18 KB
14
- ESM dist/index.js.map 320.91 KB
15
- ESM ⚡️ Build success in 92ms
16
- CJS dist/index.cjs 154.35 KB
17
- CJS dist/index.cjs.map 322.62 KB
18
- CJS ⚡️ Build success in 97ms
13
+ CJS dist/index.cjs 155.32 KB
14
+ CJS dist/index.cjs.map 324.45 KB
15
+ CJS ⚡️ Build success in 132ms
16
+ ESM dist/index.js 152.14 KB
17
+ ESM dist/index.js.map 322.73 KB
18
+ ESM ⚡️ Build success in 132ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 3422ms
21
- DTS dist/index.d.ts 63.91 KB
22
- DTS dist/index.d.cts 63.91 KB
20
+ DTS ⚡️ Build success in 3452ms
21
+ DTS dist/index.d.ts 64.24 KB
22
+ DTS dist/index.d.cts 64.24 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @objectstack/core
2
2
 
3
+ ## 4.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [326b66b]
8
+ - @objectstack/spec@4.0.4
9
+
10
+ ## 4.0.3
11
+
12
+ ### Patch Changes
13
+
14
+ - @objectstack/spec@4.0.3
15
+
3
16
  ## 4.0.2
4
17
 
5
18
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1337,6 +1337,27 @@ var ObjectKernel = class {
1337
1337
  });
1338
1338
  return this;
1339
1339
  }
1340
+ /**
1341
+ * Pre-inject in-memory fallbacks for 'core' services that were not registered
1342
+ * by plugins during Phase 1. Called before Phase 2 so that all core services
1343
+ * (e.g. 'metadata', 'cache', 'queue') are resolvable via ctx.getService()
1344
+ * when plugin start() methods execute.
1345
+ */
1346
+ preInjectCoreFallbacks() {
1347
+ if (this.config.skipSystemValidation) return;
1348
+ for (const [serviceName, criticality] of Object.entries(import_system.ServiceRequirementDef)) {
1349
+ if (criticality !== "core") continue;
1350
+ const hasService = this.services.has(serviceName) || this.pluginLoader.hasService(serviceName);
1351
+ if (!hasService) {
1352
+ const factory = CORE_FALLBACK_FACTORIES[serviceName];
1353
+ if (factory) {
1354
+ const fallback = factory();
1355
+ this.registerService(serviceName, fallback);
1356
+ this.logger.debug(`[Kernel] Pre-injected in-memory fallback for '${serviceName}' before Phase 2`);
1357
+ }
1358
+ }
1359
+ }
1360
+ }
1340
1361
  /**
1341
1362
  * Validate Critical System Requirements
1342
1363
  */
@@ -1398,6 +1419,7 @@ var ObjectKernel = class {
1398
1419
  for (const plugin of orderedPlugins) {
1399
1420
  await this.initPluginWithTimeout(plugin);
1400
1421
  }
1422
+ this.preInjectCoreFallbacks();
1401
1423
  this.logger.info("Phase 2: Start plugins");
1402
1424
  this.state = "running";
1403
1425
  for (const plugin of orderedPlugins) {