ioc-manifest 4.0.0 → 4.0.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/dist/config/configModuleLoader.d.ts +43 -0
- package/dist/config/configModuleLoader.d.ts.map +1 -0
- package/dist/config/configModuleLoader.js +192 -0
- package/dist/config/configModuleLoader.js.map +1 -0
- package/dist/config/loadIocConfig.d.ts +2 -0
- package/dist/config/loadIocConfig.d.ts.map +1 -1
- package/dist/config/loadIocConfig.js +43 -8
- package/dist/config/loadIocConfig.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How many tsx ESM hooks this process has registered.
|
|
3
|
+
*
|
|
4
|
+
* The structural pin for the regression this module fixes: it must be 1 after loading any number
|
|
5
|
+
* of configs, and 0 before the first. A timing assertion would say the same thing far less
|
|
6
|
+
* reliably.
|
|
7
|
+
*/
|
|
8
|
+
export declare const configLoaderRegistrationCount: () => number;
|
|
9
|
+
/**
|
|
10
|
+
* Releases the tsx hook. For embedders that load configs inside a longer-lived process and want
|
|
11
|
+
* their loader chain back; a CLI run has no reason to call it.
|
|
12
|
+
*
|
|
13
|
+
* Deliberately NOT wired to `process.on("exit")`: `unregister` is async and exit handlers cannot
|
|
14
|
+
* await, so the "cleanup" would be a no-op that merely looked tidy.
|
|
15
|
+
*/
|
|
16
|
+
export declare const unregisterConfigLoader: () => Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* The identity two paths to the same config share.
|
|
19
|
+
*
|
|
20
|
+
* Realpath rather than `resolve` so a package reached through a `node_modules` symlink and the same
|
|
21
|
+
* package reached through its workspace path are one cache entry, not two. A path that cannot be
|
|
22
|
+
* realpath'd (it does not exist yet) still gets a stable key.
|
|
23
|
+
*/
|
|
24
|
+
export declare const canonicalConfigKey: (absoluteConfigPath: string) => string;
|
|
25
|
+
/**
|
|
26
|
+
* The identity of "this config file with THIS content" — path plus stamp.
|
|
27
|
+
*
|
|
28
|
+
* Anything caching a derived value (a validated {@link IocConfig}, say) must key on this rather
|
|
29
|
+
* than on the path alone, or a config rewritten in place would keep serving its old value while
|
|
30
|
+
* {@link importConfigModule} correctly re-read the new one. The two caches have to agree on when a
|
|
31
|
+
* config has changed, so they share one definition of it.
|
|
32
|
+
*/
|
|
33
|
+
export declare const configCacheKey: (absoluteConfigPath: string) => string;
|
|
34
|
+
/**
|
|
35
|
+
* Loads a `.ts` config as a module namespace, once per (path, content) per process.
|
|
36
|
+
*
|
|
37
|
+
* A rejected load is evicted rather than remembered: a config that throws on load is a condition a
|
|
38
|
+
* caller may legitimately retry after fixing it, and a cached rejection would outlive the fix.
|
|
39
|
+
*/
|
|
40
|
+
export declare const importConfigModule: (absoluteConfigPath: string) => Promise<Record<string, unknown>>;
|
|
41
|
+
/** Drops every cached config module. For tests that rebuild a fixture under one process. */
|
|
42
|
+
export declare const clearConfigModuleCache: () => void;
|
|
43
|
+
//# sourceMappingURL=configModuleLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configModuleLoader.d.ts","sourceRoot":"","sources":["../../src/config/configModuleLoader.ts"],"names":[],"mappings":"AAwGA;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,QAAO,MAA2B,CAAC;AAE7E;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,QAAa,OAAO,CAAC,IAAI,CAS3D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAAI,oBAAoB,MAAM,KAAG,MAO/D,CAAC;AAwBF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GAAI,oBAAoB,MAAM,KAAG,MAG3D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAC7B,oBAAoB,MAAM,KACzB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA0BjC,CAAC;AAEF,4FAA4F;AAC5F,eAAO,MAAM,sBAAsB,QAAO,IAEzC,CAAC"}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview The ONE place a `.ts` `ioc.config` becomes a module. Everything that needs a
|
|
3
|
+
* config goes through here; nothing else in the codebase may import `tsx`.
|
|
4
|
+
*
|
|
5
|
+
* ### Why this module exists at all
|
|
6
|
+
*
|
|
7
|
+
* `tsx`'s `tsImport()` is `register({ namespace: Date.now() }).import(...)`, and it never
|
|
8
|
+
* unregisters. On Node 18.19+/20.6+ that takes the off-thread `module.register()` path, so every
|
|
9
|
+
* call leaves ANOTHER live ESM hook in the process. Four packages meant four hooks.
|
|
10
|
+
*
|
|
11
|
+
* The hooks are supposed to be independent — each registration cache-busts `esm/index.mjs` with a
|
|
12
|
+
* `?<timestamp>` so it gets its own module instance, and each hook ignores resolutions whose
|
|
13
|
+
* namespace is not its own. In tsx 4.22.0–4.22.4 that isolation is broken: the exported
|
|
14
|
+
* `initialize` / `resolve` / `load` come from a helper module that is NOT cache-busted, and they
|
|
15
|
+
* all close over a single module-level state object which `initialize` overwrites with
|
|
16
|
+
* `Object.assign(state, createData(options))`. Every new registration therefore re-points the
|
|
17
|
+
* namespace that ALL prior hooks compare against, so all N hooks match the current namespace and
|
|
18
|
+
* each re-applies tsx's full extension fan-out (`mapTsExtensions`: 9–14 candidates) before
|
|
19
|
+
* delegating to the next. Cost goes as roughly 14^(N−1).
|
|
20
|
+
*
|
|
21
|
+
* Reproduced on tsx 4.22.0, one import, N hooks registered up front:
|
|
22
|
+
*
|
|
23
|
+
* ```
|
|
24
|
+
* N=1 0.016s N=2 0.017s N=3 0.032s
|
|
25
|
+
* N=4 0.202s N=5 2.209s N=6 30.388s
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* The field saw the same curve as 1.03 / 1.36 / 11.53 / 151.42s across four packages — a 156-second
|
|
29
|
+
* `ioc validate` whose globbing and hashing were provably innocent.
|
|
30
|
+
*
|
|
31
|
+
* `unregister()` is not a workaround: it only flips `active` to false on that same shared object,
|
|
32
|
+
* and the next `register()` re-arms it for every hook at once. Measured identical.
|
|
33
|
+
*
|
|
34
|
+
* ### The fix
|
|
35
|
+
*
|
|
36
|
+
* Register exactly once per process and reuse the scoped importer. N stays 1 however many packages
|
|
37
|
+
* are composed, which makes the pathological branch unreachable regardless of which tsx is
|
|
38
|
+
* installed. {@link configLoaderRegistrationCount} exists so a test can assert that structurally
|
|
39
|
+
* rather than by watching a clock.
|
|
40
|
+
*
|
|
41
|
+
* ### Why the specifier carries an mtime stamp
|
|
42
|
+
*
|
|
43
|
+
* The per-call namespace `tsImport` generated had one accidental virtue: it made every load a
|
|
44
|
+
* distinct module URL, so a config rewritten in place was always re-read. Under one stable
|
|
45
|
+
* namespace the URL is stable too, and Node's ESM cache would hand back the STALE module — which
|
|
46
|
+
* silently breaks anything that regenerates a config and reloads it. So the specifier carries
|
|
47
|
+
* `?ioc-config=<mtimeMs>-<size>`: unchanged file, same URL, free cache hit; changed file, new URL,
|
|
48
|
+
* genuine re-read. Verified in both directions.
|
|
49
|
+
*/
|
|
50
|
+
import fs from "node:fs";
|
|
51
|
+
import path from "node:path";
|
|
52
|
+
import { register } from "tsx/esm/api";
|
|
53
|
+
/**
|
|
54
|
+
* Stable, and deliberately not `Date.now()`.
|
|
55
|
+
*
|
|
56
|
+
* The namespace exists to keep OUR hook from claiming resolutions that belong to someone else's
|
|
57
|
+
* loader; it does not need to be unique per call, and making it unique per call is precisely the
|
|
58
|
+
* bug this module routes around.
|
|
59
|
+
*/
|
|
60
|
+
const TSX_NAMESPACE = "ioc-manifest-config";
|
|
61
|
+
/** The query key that carries the file stamp. Named so it is obvious in a stack trace. */
|
|
62
|
+
const STAMP_QUERY = "ioc-config";
|
|
63
|
+
let scopedLoader;
|
|
64
|
+
let registrationCount = 0;
|
|
65
|
+
/**
|
|
66
|
+
* `false` disables tsx's tsconfig resolution for config loading; `undefined` keeps it.
|
|
67
|
+
*
|
|
68
|
+
* Default is to KEEP it. A consumer's `ioc.config.ts` is allowed to import through the project's
|
|
69
|
+
* `paths` aliases, and `tsconfig: false` makes those imports fail outright with
|
|
70
|
+
* `ERR_MODULE_NOT_FOUND` — so it cannot be the default. It is also not the fix it looked like:
|
|
71
|
+
* measured against the reproduction above, `tsconfig: false` on its own left the blow-up fully
|
|
72
|
+
* intact (2.64s vs 2.57s across five packages), because the extension fan-out is entered whenever
|
|
73
|
+
* the IMPORTING file is TypeScript, not only when `allowJs` is set. Registering once is what
|
|
74
|
+
* flattens it (0.04s).
|
|
75
|
+
*
|
|
76
|
+
* The escape hatch stays for the case it genuinely serves: a project whose tsconfig is enormous or
|
|
77
|
+
* whose compiler options actively confuse a config that needs none of them.
|
|
78
|
+
*/
|
|
79
|
+
const resolveTsconfigOption = () => process.env.IOC_CONFIG_TSCONFIG === "false" ? false : undefined;
|
|
80
|
+
/** The process's single tsx registration, created on first use. */
|
|
81
|
+
const scoped = () => {
|
|
82
|
+
if (scopedLoader === undefined) {
|
|
83
|
+
scopedLoader = register({
|
|
84
|
+
namespace: TSX_NAMESPACE,
|
|
85
|
+
tsconfig: resolveTsconfigOption(),
|
|
86
|
+
});
|
|
87
|
+
registrationCount += 1;
|
|
88
|
+
}
|
|
89
|
+
return scopedLoader;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* How many tsx ESM hooks this process has registered.
|
|
93
|
+
*
|
|
94
|
+
* The structural pin for the regression this module fixes: it must be 1 after loading any number
|
|
95
|
+
* of configs, and 0 before the first. A timing assertion would say the same thing far less
|
|
96
|
+
* reliably.
|
|
97
|
+
*/
|
|
98
|
+
export const configLoaderRegistrationCount = () => registrationCount;
|
|
99
|
+
/**
|
|
100
|
+
* Releases the tsx hook. For embedders that load configs inside a longer-lived process and want
|
|
101
|
+
* their loader chain back; a CLI run has no reason to call it.
|
|
102
|
+
*
|
|
103
|
+
* Deliberately NOT wired to `process.on("exit")`: `unregister` is async and exit handlers cannot
|
|
104
|
+
* await, so the "cleanup" would be a no-op that merely looked tidy.
|
|
105
|
+
*/
|
|
106
|
+
export const unregisterConfigLoader = async () => {
|
|
107
|
+
const active = scopedLoader;
|
|
108
|
+
if (active === undefined) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
scopedLoader = undefined;
|
|
112
|
+
registrationCount = 0;
|
|
113
|
+
moduleCache.clear();
|
|
114
|
+
await active.unregister();
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* The identity two paths to the same config share.
|
|
118
|
+
*
|
|
119
|
+
* Realpath rather than `resolve` so a package reached through a `node_modules` symlink and the same
|
|
120
|
+
* package reached through its workspace path are one cache entry, not two. A path that cannot be
|
|
121
|
+
* realpath'd (it does not exist yet) still gets a stable key.
|
|
122
|
+
*/
|
|
123
|
+
export const canonicalConfigKey = (absoluteConfigPath) => {
|
|
124
|
+
const resolved = path.resolve(absoluteConfigPath);
|
|
125
|
+
try {
|
|
126
|
+
return fs.realpathSync(resolved);
|
|
127
|
+
}
|
|
128
|
+
catch {
|
|
129
|
+
return resolved;
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* What the file looks like right now, or `undefined` if it cannot be stat'd.
|
|
134
|
+
*
|
|
135
|
+
* mtime AND size: mtime alone has filesystem-dependent granularity, and a same-millisecond rewrite
|
|
136
|
+
* that changes length is exactly the shape a test fixture produces.
|
|
137
|
+
*/
|
|
138
|
+
const fileStamp = (canonicalPath) => {
|
|
139
|
+
try {
|
|
140
|
+
const stat = fs.statSync(canonicalPath);
|
|
141
|
+
return `${stat.mtimeMs}-${stat.size}`;
|
|
142
|
+
}
|
|
143
|
+
catch {
|
|
144
|
+
return undefined;
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
const moduleCache = new Map();
|
|
148
|
+
/**
|
|
149
|
+
* The identity of "this config file with THIS content" — path plus stamp.
|
|
150
|
+
*
|
|
151
|
+
* Anything caching a derived value (a validated {@link IocConfig}, say) must key on this rather
|
|
152
|
+
* than on the path alone, or a config rewritten in place would keep serving its old value while
|
|
153
|
+
* {@link importConfigModule} correctly re-read the new one. The two caches have to agree on when a
|
|
154
|
+
* config has changed, so they share one definition of it.
|
|
155
|
+
*/
|
|
156
|
+
export const configCacheKey = (absoluteConfigPath) => {
|
|
157
|
+
const key = canonicalConfigKey(absoluteConfigPath);
|
|
158
|
+
return `${key}@${fileStamp(key) ?? "missing"}`;
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Loads a `.ts` config as a module namespace, once per (path, content) per process.
|
|
162
|
+
*
|
|
163
|
+
* A rejected load is evicted rather than remembered: a config that throws on load is a condition a
|
|
164
|
+
* caller may legitimately retry after fixing it, and a cached rejection would outlive the fix.
|
|
165
|
+
*/
|
|
166
|
+
export const importConfigModule = async (absoluteConfigPath) => {
|
|
167
|
+
const key = canonicalConfigKey(absoluteConfigPath);
|
|
168
|
+
const stamp = fileStamp(key);
|
|
169
|
+
const cached = moduleCache.get(key);
|
|
170
|
+
if (cached !== undefined && cached.stamp === stamp) {
|
|
171
|
+
return cached.module;
|
|
172
|
+
}
|
|
173
|
+
const specifier = stamp === undefined
|
|
174
|
+
? key
|
|
175
|
+
: `${key}?${STAMP_QUERY}=${encodeURIComponent(stamp)}`;
|
|
176
|
+
const loading = scoped()
|
|
177
|
+
.import(specifier, import.meta.url)
|
|
178
|
+
.then((mod) => mod)
|
|
179
|
+
.catch((error) => {
|
|
180
|
+
if (moduleCache.get(key)?.module === loading) {
|
|
181
|
+
moduleCache.delete(key);
|
|
182
|
+
}
|
|
183
|
+
throw error;
|
|
184
|
+
});
|
|
185
|
+
moduleCache.set(key, { stamp, module: loading });
|
|
186
|
+
return loading;
|
|
187
|
+
};
|
|
188
|
+
/** Drops every cached config module. For tests that rebuild a fixture under one process. */
|
|
189
|
+
export const clearConfigModuleCache = () => {
|
|
190
|
+
moduleCache.clear();
|
|
191
|
+
};
|
|
192
|
+
//# sourceMappingURL=configModuleLoader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":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,GAAG,CAAC,CAAC;IACpC,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,KAAK,KAAK,KAAK,EAAE,CAAC;QACnD,OAAO,MAAM,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,MAAM,SAAS,GACb,KAAK,KAAK,SAAS;QACjB,CAAC,CAAC,GAAG;QACL,CAAC,CAAC,GAAG,GAAG,IAAI,WAAW,IAAI,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC;IAE3D,MAAM,OAAO,GAAG,MAAM,EAAE;SACrB,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;SAClC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAA8B,CAAC;SAC7C,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;QACxB,IAAI,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,KAAK,OAAO,EAAE,CAAC;YAC7C,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC,CAAC,CAAC;IAEL,WAAW,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;IACjD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,4FAA4F;AAC5F,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAS,EAAE;IAC/C,WAAW,CAAC,KAAK,EAAE,CAAC;AACtB,CAAC,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { IocConfig } from "./iocConfig.js";
|
|
2
2
|
export declare const loadIocConfig: (absoluteConfigPath: string) => Promise<IocConfig>;
|
|
3
|
+
/** Drops every cached config. For tests that rebuild a fixture config under one process. */
|
|
4
|
+
export declare const clearIocConfigCache: () => void;
|
|
3
5
|
/**
|
|
4
6
|
* IoC package root inferred from where `ioc.config` lives: if the config file is under a `src`
|
|
5
7
|
* directory, the package root is the parent of that `src` (so `discovery.scanDirs` entries stay relative
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadIocConfig.d.ts","sourceRoot":"","sources":["../../src/config/loadIocConfig.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"loadIocConfig.d.ts","sourceRoot":"","sources":["../../src/config/loadIocConfig.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAiMhD,eAAO,MAAM,aAAa,GACxB,oBAAoB,MAAM,KACzB,OAAO,CAAC,SAAS,CAyBnB,CAAC;AAEF,4FAA4F;AAC5F,eAAO,MAAM,mBAAmB,QAAO,IAEtC,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,mCAAmC,GAC9C,oBAAoB,MAAM,KACzB,MAKF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gCAAgC,GAC3C,aAAa,MAAM,KAClB,MAAM,GAAG,SAQX,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,GAC/B,gBAAgB,MAAM,EACtB,eAAe,MAAM,KACpB,MAwDF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAC3B,oBAAoB,MAAM,KACzB,OAAO,CAAC,SAAS,GAAG,SAAS,CAQ/B,CAAC"}
|
|
@@ -7,7 +7,7 @@ import { existsSync } from "node:fs";
|
|
|
7
7
|
import fs from "node:fs/promises";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import fg from "fast-glob";
|
|
10
|
-
import {
|
|
10
|
+
import { configCacheKey, importConfigModule } from "./configModuleLoader.js";
|
|
11
11
|
import { formatIocConfigIssues, iocConfigSchema } from "./iocConfigSchema.js";
|
|
12
12
|
import { findPackageIdentifierCollisions, formatPackageIdentifierCollisionError, } from "./packageIdentifier.js";
|
|
13
13
|
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -135,14 +135,49 @@ const resolveConfigFromModule = (mod) => {
|
|
|
135
135
|
}
|
|
136
136
|
return current;
|
|
137
137
|
};
|
|
138
|
+
/**
|
|
139
|
+
* Validated configs already loaded in this process, keyed by {@link configCacheKey}.
|
|
140
|
+
*
|
|
141
|
+
* `importConfigModule` already makes the TRANSPILE free on a repeat load; this makes the
|
|
142
|
+
* VALIDATION free too — the zod parse, the `package.json` read for self-reference detection, the
|
|
143
|
+
* composed-identifier collision scan, and the advisory warnings, which a reader should see once per
|
|
144
|
+
* config and not once per package that asks about it.
|
|
145
|
+
*
|
|
146
|
+
* Keyed on path AND content stamp, the same identity the module cache uses, so a config rewritten
|
|
147
|
+
* in place is revalidated rather than answered from a stale entry.
|
|
148
|
+
*
|
|
149
|
+
* A single `ioc validate` asks for the same config from three directions — discovery, the freshness
|
|
150
|
+
* slice loop, and the composition context. Reusing the loaded object there is not an optimization
|
|
151
|
+
* bolted on top; it is the invariant that makes those three agree on what the config SAYS.
|
|
152
|
+
*/
|
|
153
|
+
const validatedConfigCache = new Map();
|
|
138
154
|
export const loadIocConfig = async (absoluteConfigPath) => {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
155
|
+
const key = configCacheKey(absoluteConfigPath);
|
|
156
|
+
const cached = validatedConfigCache.get(key);
|
|
157
|
+
if (cached !== undefined) {
|
|
158
|
+
return cached;
|
|
159
|
+
}
|
|
160
|
+
// Transpiling the `.ts` config in-process is delegated to `configModuleLoader`, which owns the
|
|
161
|
+
// single per-process tsx registration. A bare `import()` is not an option: it fails on Node
|
|
162
|
+
// versions without native type stripping.
|
|
163
|
+
const loading = (async () => {
|
|
164
|
+
const mod = await importConfigModule(absoluteConfigPath);
|
|
165
|
+
const raw = resolveConfigFromModule(mod);
|
|
166
|
+
return validateIocConfig(raw, absoluteConfigPath);
|
|
167
|
+
})().catch((error) => {
|
|
168
|
+
// A config that failed to load or validate is retryable once its author fixes it; a remembered
|
|
169
|
+
// rejection would outlive the fix.
|
|
170
|
+
if (validatedConfigCache.get(key) === loading) {
|
|
171
|
+
validatedConfigCache.delete(key);
|
|
172
|
+
}
|
|
173
|
+
throw error;
|
|
174
|
+
});
|
|
175
|
+
validatedConfigCache.set(key, loading);
|
|
176
|
+
return loading;
|
|
177
|
+
};
|
|
178
|
+
/** Drops every cached config. For tests that rebuild a fixture config under one process. */
|
|
179
|
+
export const clearIocConfigCache = () => {
|
|
180
|
+
validatedConfigCache.clear();
|
|
146
181
|
};
|
|
147
182
|
const CONFIG_RELATIVE_SEARCH_PATHS = ["src/ioc.config.ts", "ioc.config.ts"];
|
|
148
183
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadIocConfig.js","sourceRoot":"","sources":["../../src/config/loadIocConfig.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,WAAW,CAAC;AAC3B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"loadIocConfig.js","sourceRoot":"","sources":["../../src/config/loadIocConfig.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,WAAW,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7E,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EACL,+BAA+B,EAC/B,qCAAqC,GACtC,MAAM,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EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CACb,6DAA6D,KAAK,mEAAmE,CACtI,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC;AAClD,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,EACnC,kBAA0B,EACM,EAAE;IAClC,IAAI,CAAC;QACH,MAAM,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,aAAa,CAAC,kBAAkB,CAAC,CAAC;AAC3C,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ioc-manifest",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "Build-time factory discovery and codegen: generates a typed Awilix (PROXY) registration manifest from TypeScript sources with ioc.config as the single policy surface.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|