@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.
- package/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +13 -0
- package/dist/index.cjs +22 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/kernel.ts +28 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @objectstack/core@4.0.
|
|
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
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
[34mCLI[39m Cleaning output folder
|
|
11
11
|
[34mESM[39m Build start
|
|
12
12
|
[34mCJS[39m Build start
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
13
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m155.32 KB[39m
|
|
14
|
+
[32mCJS[39m [1mdist/index.cjs.map [22m[32m324.45 KB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 132ms
|
|
16
|
+
[32mESM[39m [1mdist/index.js [22m[32m152.14 KB[39m
|
|
17
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m322.73 KB[39m
|
|
18
|
+
[32mESM[39m ⚡️ Build success in 132ms
|
|
19
19
|
[34mDTS[39m Build start
|
|
20
|
-
[32mDTS[39m ⚡️ Build success in
|
|
21
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
22
|
-
[32mDTS[39m [1mdist/index.d.cts [22m[
|
|
20
|
+
[32mDTS[39m ⚡️ Build success in 3452ms
|
|
21
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m64.24 KB[39m
|
|
22
|
+
[32mDTS[39m [1mdist/index.d.cts [22m[32m64.24 KB[39m
|
package/CHANGELOG.md
CHANGED
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) {
|