@xrystal/core 3.38.2 → 3.39.0
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/README.md +477 -2071
- package/package.json +3 -3
- package/x/bin/helpers/.generated/tmp-schema.mjs +8 -1
- package/x/bin/helpers/build-config.mjs +1 -0
- package/x/bin/scripts/clean-dist-tests.mjs +50 -0
- package/x/bin/scripts/fix-dist-imports.mjs +7 -2
- package/x/dist/loader/clients/index.js +1 -1
- package/x/dist/loader/configs/index.js +1 -1
- package/x/dist/loader/controller/index.js +1 -1
- package/x/dist/loader/dto/index.js +1 -1
- package/x/dist/loader/events/index.js +1 -1
- package/x/dist/loader/index.js +1 -1
- package/x/dist/loader/kafka/index.js +1 -1
- package/x/dist/loader/localizations/index.js +1 -1
- package/x/dist/loader/logger/index.js +1 -1
- package/x/dist/loader/system/index.js +1 -1
- package/x/dist/project/index.js +1 -1
- package/x/dist/utils/constants/index.js +1 -1
- package/x/dist/utils/helpers/context/index.js +1 -1
- package/x/dist/utils/helpers/core/index.js +1 -1
- package/x/dist/utils/helpers/core/tmp-layout.js +1 -1
- package/x/dist/utils/helpers/date/index.js +1 -1
- package/x/dist/utils/helpers/dispatch/index.js +1 -1
- package/x/dist/utils/helpers/framework/index.js +1 -1
- package/x/dist/utils/helpers/handlers/adapters.js +1 -1
- package/x/dist/utils/helpers/handlers/execute.js +1 -1
- package/x/dist/utils/helpers/handlers/index.js +1 -1
- package/x/dist/utils/helpers/index.js +1 -1
- package/x/dist/utils/helpers/middleware/index.js +1 -1
- package/x/dist/utils/helpers/protocol/index.js +1 -1
- package/x/dist/utils/helpers/protocol/options.js +1 -1
- package/x/dist/utils/helpers/runtime/dto-access.js +1 -1
- package/x/dist/utils/helpers/runtime/index.js +1 -1
- package/x/dist/utils/helpers/runtime/shutdown.js +1 -1
- package/x/dist/utils/helpers/state/index.js +1 -1
- package/x/dist/utils/helpers/state/props-from-tmp.js +1 -1
- package/x/dist/utils/helpers/state/request-key-guard.js +1 -1
- package/x/dist/utils/helpers/state/scopes.js +1 -1
- package/x/dist/utils/helpers/tmp/index.js +1 -1
- package/x/dist/utils/helpers/tmp/loader-tmp-sync.js +1 -1
- package/x/dist/utils/helpers/tmp/tmp-loader.js +1 -1
- package/x/dist/utils/helpers/tmp/tmp-schema.js +1 -1
- package/x/dist/utils/helpers/tmp/tmp-watch.js +1 -1
- package/x/dist/utils/index.js +1 -1
- package/x/dist/utils/models/classes/class.clients.js +1 -1
- package/x/dist/utils/models/classes/class.tmp-file-loader.js +1 -1
- package/x/dist/utils/models/index.js +1 -1
- package/x/dist/utils/helpers/tests/tmp-schema.test.d.ts +0 -1
- package/x/dist/utils/helpers/tests/tmp-schema.test.js +0 -1
- package/x/dist/utils/helpers/tests/tmp-watch.test.d.ts +0 -1
- package/x/dist/utils/helpers/tests/tmp-watch.test.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import _ from"lodash";import x from"../../utils/models/classes/class.x
|
|
1
|
+
import _ from"lodash";import x from"../../utils/models/classes/class.x";import locator from"../../utils/models/classes/class.service-locator";export*from"../../utils/models/classes/class.tmp-file-loader";export*from"../../utils/models/classes/class.interfaces";export*from"../../utils/models/classes/class.clients";export*from"../../utils/models/types";export*from"../../utils/models/enums";export{x,locator,_};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{describe as K,expect as j,test as A}from"bun:test";import{normalizeRootFolder as H,normalizeTmpDocument as N,readTmpCoreBlock as O,readTmpServiceBlock as J,resolveServiceLayoutPaths as Q,resolveTmpRuntimeConfigs as U}from"../../../utils/helpers/tmp/tmp-schema.js";import{resolveTmpWatchIntervalMs as V}from"../../../utils/helpers/tmp/tmp-watch.js";const G={configs:{service:{name:"my-api",framework:"elysia",paths:{root:"./infra.js",source:"./src.js",special:{tests:"specs",environments:"env",dist:"out"}},protocols:["http"],build:{typecheck:!0},loaders:{dto:{withDefaultHeaders:!0}}},core:{tmp:{fileWatchIntervalMs:200}}}};K("tmp-schema service + core blocks",()=>{A("readTmpServiceBlock reads paths.root, paths.source, paths.special",()=>{const q=J(G.configs);j(q.paths?.root).toBe("./infra.js");j(q.paths?.source).toBe("./src.js");j(q.paths?.special?.tests).toBe("specs");j(q.name).toBe("my-api");j(q.build?.typecheck).toBe(!0)});A("readTmpCoreBlock reads core.tmp.fileWatchIntervalMs",()=>{j(O(G.configs).tmp?.fileWatchIntervalMs).toBe(200)});A("normalizeRootFolder strips ./ prefix",()=>{j(H("./x.js")).toBe("x");j(H("infra")).toBe("infra")});A("resolveTmpRuntimeConfigs returns service, core, and rootFolderPath",()=>{const q=U(G);j(Object.keys(q)).toEqual(["service","core","rootFolderPath"]);j(q.rootFolderPath).toBe("infra");j(q.service.paths?.special?.dist).toBe("out");j(q.service.framework).toBe("elysia");j(q.service.loaders).toEqual({dto:{withDefaultHeaders:!0}});j(q.core.tmp?.fileWatchIntervalMs).toBe(200);j("loaders"in q).toBe(!1);j("mainFolderPath"in q).toBe(!1)});A("normalizeTmpDocument merges service + core + derived rootFolderPath onto configs",()=>{const E=N(G).configs;j(E.service).toBeTruthy();j(E.core).toBeTruthy();j(E.rootFolderPath).toBe("infra");j(E.service.loaders).toBeTruthy();j(E.loaders).toBeUndefined();j(E.mainFolderPath).toBeUndefined()});A("resolveTmpWatchIntervalMs reads core.tmp.fileWatchIntervalMs",()=>{j(V(G)).toBe(200)});A("resolveServiceLayoutPaths uses defaults when special omitted",()=>{const q=Q(J({service:{paths:{}}}));j(q.tests).toBe("tests");j(q.dist).toBe("dist")})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{describe as k,expect as f,test as j}from"bun:test";import{resolveTmpWatchIntervalMs as g}from"../../../utils/helpers/tmp/tmp-watch.js";k("resolveTmpWatchIntervalMs",()=>{j("defaults to 500ms when core.tmp omitted",()=>{f(g({configs:{}})).toBe(500)});j("reads configs.core.tmp.fileWatchIntervalMs",()=>{f(g({configs:{core:{tmp:{fileWatchIntervalMs:200}}}})).toBe(200)});j("clamps to min/max bounds",()=>{f(g({configs:{core:{tmp:{fileWatchIntervalMs:10}}}})).toBe(100);f(g({configs:{core:{tmp:{fileWatchIntervalMs:60000}}}})).toBe(1e4)})});
|