@veryfront/ext-content-mdx 0.1.1226 → 0.1.1227
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/esm/_dnt.polyfills.d.ts +105 -6
- package/esm/_dnt.polyfills.d.ts.map +1 -1
- package/esm/_dnt.polyfills.js +127 -1
- package/esm/deno.d.ts +5 -0
- package/esm/deno.js +11 -6
- package/esm/src/extensions/contract-registry-internal.d.ts +144 -0
- package/esm/src/extensions/contract-registry-internal.d.ts.map +1 -0
- package/esm/src/extensions/contract-registry-internal.js +642 -0
- package/esm/src/extensions/contracts.d.ts +16 -0
- package/esm/src/extensions/contracts.d.ts.map +1 -0
- package/esm/src/extensions/contracts.js +46 -0
- package/esm/src/extensions/errors.d.ts +16 -0
- package/esm/src/extensions/errors.d.ts.map +1 -0
- package/esm/src/extensions/errors.js +46 -0
- package/esm/src/extensions/first-party-import.d.ts +43 -0
- package/esm/src/extensions/first-party-import.d.ts.map +1 -0
- package/esm/src/extensions/first-party-import.js +358 -0
- package/esm/src/extensions/parser/yaml-defaults.d.ts +22 -0
- package/esm/src/extensions/parser/yaml-defaults.d.ts.map +1 -0
- package/esm/src/extensions/parser/yaml-defaults.js +57 -0
- package/esm/src/extensions/parser/yaml-parser.d.ts +59 -0
- package/esm/src/extensions/parser/yaml-parser.d.ts.map +1 -0
- package/esm/src/extensions/parser/yaml-parser.js +62 -0
- package/esm/src/extensions/recommendations.d.ts +8 -0
- package/esm/src/extensions/recommendations.d.ts.map +1 -0
- package/esm/src/extensions/recommendations.js +38 -0
- package/esm/src/extensions/runtime-validation.d.ts +21 -0
- package/esm/src/extensions/runtime-validation.d.ts.map +1 -0
- package/esm/src/extensions/runtime-validation.js +95 -0
- package/esm/src/platform/compat/async-context.d.ts +8 -0
- package/esm/src/platform/compat/async-context.d.ts.map +1 -0
- package/esm/src/platform/compat/async-context.js +7 -0
- package/esm/src/platform/compat/std/front-matter-yaml.js +1 -1
- package/esm/src/platform/compat/std/yaml.d.ts +17 -0
- package/esm/src/platform/compat/std/yaml.d.ts.map +1 -0
- package/esm/src/platform/compat/std/yaml.js +39 -0
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +2 -2
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_chars.d.ts +0 -33
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_chars.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_chars.js +0 -48
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_loader_state.d.ts +0 -64
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_loader_state.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_loader_state.js +0 -1371
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_schema.d.ts +0 -44
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_schema.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_schema.js +0 -117
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/binary.d.ts +0 -3
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/binary.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/binary.js +0 -103
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/bool.d.ts +0 -3
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/bool.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/bool.js +0 -32
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/float.d.ts +0 -3
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/float.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/float.js +0 -96
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/int.d.ts +0 -3
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/int.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/int.js +0 -159
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/map.d.ts +0 -3
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/map.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/map.js +0 -14
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/merge.d.ts +0 -3
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/merge.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/merge.js +0 -10
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/nil.d.ts +0 -3
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/nil.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/nil.js +0 -22
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/omap.d.ts +0 -3
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/omap.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/omap.js +0 -29
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/pairs.d.ts +0 -3
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/pairs.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/pairs.js +0 -19
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/regexp.d.ts +0 -3
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/regexp.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/regexp.js +0 -30
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/seq.d.ts +0 -3
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/seq.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/seq.js +0 -10
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/set.d.ts +0 -3
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/set.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/set.js +0 -14
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/str.d.ts +0 -3
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/str.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/str.js +0 -9
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/timestamp.d.ts +0 -3
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/timestamp.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/timestamp.js +0 -81
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/undefined.d.ts +0 -3
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/undefined.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/undefined.js +0 -20
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type.d.ts +0 -32
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type.js +0 -6
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_utils.d.ts +0 -4
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_utils.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_utils.js +0 -13
- package/esm/deps/jsr.io/@std/yaml/1.1.0/parse.d.ts +0 -76
- package/esm/deps/jsr.io/@std/yaml/1.1.0/parse.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/yaml/1.1.0/parse.js +0 -91
package/esm/_dnt.polyfills.d.ts
CHANGED
|
@@ -1,18 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Based on [import-meta-ponyfill](https://github.com/gaubee/import-meta-ponyfill),
|
|
3
|
+
* but instead of using npm to install additional dependencies,
|
|
4
|
+
* this approach manually consolidates cjs/mjs/d.ts into a single file.
|
|
5
|
+
*
|
|
6
|
+
* Note that this code might be imported multiple times
|
|
7
|
+
* (for example, both dnt.test.polyfills.ts and dnt.polyfills.ts contain this code;
|
|
8
|
+
* or Node.js might dynamically clear the cache and then force a require).
|
|
9
|
+
* Therefore, it's important to avoid redundant writes to global objects.
|
|
10
|
+
* Additionally, consider that commonjs is used alongside esm,
|
|
11
|
+
* so the two ponyfill functions are stored independently in two separate global objects.
|
|
12
|
+
*/
|
|
13
|
+
import { createRequire } from "node:module";
|
|
14
|
+
import { type URL } from "node:url";
|
|
1
15
|
declare global {
|
|
2
|
-
interface
|
|
16
|
+
interface ImportMeta {
|
|
17
|
+
/** A string representation of the fully qualified module URL. When the
|
|
18
|
+
* module is loaded locally, the value will be a file URL (e.g.
|
|
19
|
+
* `file:///path/module.ts`).
|
|
20
|
+
*
|
|
21
|
+
* You can also parse the string as a URL to determine more information about
|
|
22
|
+
* how the current module was loaded. For example to determine if a module was
|
|
23
|
+
* local or not:
|
|
24
|
+
*
|
|
25
|
+
* ```ts
|
|
26
|
+
* const url = new URL(import.meta.url);
|
|
27
|
+
* if (url.protocol === "file:") {
|
|
28
|
+
* console.log("this module was loaded locally");
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
url: string;
|
|
3
33
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
34
|
+
* A function that returns resolved specifier as if it would be imported
|
|
35
|
+
* using `import(specifier)`.
|
|
36
|
+
*
|
|
37
|
+
* ```ts
|
|
38
|
+
* console.log(import.meta.resolve("./foo.js"));
|
|
39
|
+
* // file:///dev/foo.js
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @param specifier The module specifier to resolve relative to `parent`.
|
|
43
|
+
* @param parent The absolute parent module URL to resolve from.
|
|
44
|
+
* @returns The absolute (`file:`) URL string for the resolved module.
|
|
7
45
|
*/
|
|
8
|
-
|
|
46
|
+
resolve(specifier: string, parent?: string | URL | undefined): string;
|
|
47
|
+
/** A flag that indicates if the current module is the main module that was
|
|
48
|
+
* called when starting the program under Deno.
|
|
49
|
+
*
|
|
50
|
+
* ```ts
|
|
51
|
+
* if (import.meta.main) {
|
|
52
|
+
* // this was loaded as the main module, maybe do some bootstrapping
|
|
53
|
+
* }
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
main: boolean;
|
|
57
|
+
/** The absolute path of the current module.
|
|
58
|
+
*
|
|
59
|
+
* This property is only provided for local modules (ie. using `file://` URLs).
|
|
60
|
+
*
|
|
61
|
+
* Example:
|
|
62
|
+
* ```
|
|
63
|
+
* // Unix
|
|
64
|
+
* console.log(import.meta.filename); // /home/alice/my_module.ts
|
|
65
|
+
*
|
|
66
|
+
* // Windows
|
|
67
|
+
* console.log(import.meta.filename); // C:\alice\my_module.ts
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
filename: string;
|
|
71
|
+
/** The absolute path of the directory containing the current module.
|
|
72
|
+
*
|
|
73
|
+
* This property is only provided for local modules (ie. using `file://` URLs).
|
|
74
|
+
*
|
|
75
|
+
* * Example:
|
|
76
|
+
* ```
|
|
77
|
+
* // Unix
|
|
78
|
+
* console.log(import.meta.dirname); // /home/alice
|
|
79
|
+
*
|
|
80
|
+
* // Windows
|
|
81
|
+
* console.log(import.meta.dirname); // C:\alice
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
dirname: string;
|
|
9
85
|
}
|
|
10
86
|
}
|
|
11
|
-
|
|
87
|
+
type NodeRequest = ReturnType<typeof createRequire>;
|
|
88
|
+
type NodeModule = NonNullable<NodeRequest["main"]>;
|
|
89
|
+
interface ImportMetaPonyfillCommonjs {
|
|
90
|
+
(require: NodeRequest, module: NodeModule): ImportMeta;
|
|
91
|
+
}
|
|
92
|
+
interface ImportMetaPonyfillEsmodule {
|
|
93
|
+
(importMeta: ImportMeta): ImportMeta;
|
|
94
|
+
}
|
|
95
|
+
interface ImportMetaPonyfill extends ImportMetaPonyfillCommonjs, ImportMetaPonyfillEsmodule {
|
|
96
|
+
}
|
|
97
|
+
export declare let import_meta_ponyfill_commonjs: ImportMetaPonyfillCommonjs;
|
|
98
|
+
export declare let import_meta_ponyfill_esmodule: ImportMetaPonyfillEsmodule;
|
|
99
|
+
export declare let import_meta_ponyfill: ImportMetaPonyfill;
|
|
12
100
|
declare global {
|
|
13
101
|
interface Error {
|
|
14
102
|
cause?: unknown;
|
|
15
103
|
}
|
|
16
104
|
}
|
|
17
105
|
export {};
|
|
106
|
+
declare global {
|
|
107
|
+
interface Object {
|
|
108
|
+
/**
|
|
109
|
+
* Determines whether an object has a property with the specified name.
|
|
110
|
+
* @param o An object.
|
|
111
|
+
* @param v A property name.
|
|
112
|
+
*/
|
|
113
|
+
hasOwn(o: object, v: PropertyKey): boolean;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
export {};
|
|
18
117
|
//# sourceMappingURL=_dnt.polyfills.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_dnt.polyfills.d.ts","sourceRoot":"","sources":["../src/_dnt.polyfills.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_dnt.polyfills.d.ts","sourceRoot":"","sources":["../src/_dnt.polyfills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAgC,KAAK,GAAG,EAAE,MAAM,UAAU,CAAC;AAGlE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,UAAU;QAClB;;;;;;;;;;;;;;WAcG;QACH,GAAG,EAAE,MAAM,CAAC;QACZ;;;;;;;;;;;;WAYG;QACH,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,GAAG,GAAG,SAAS,GAAG,MAAM,CAAC;QACtE;;;;;;;;WAQG;QACH,IAAI,EAAE,OAAO,CAAC;QAEd;;;;;;;;;;;;WAYG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;;;;;;;;;;;WAYG;QACH,OAAO,EAAE,MAAM,CAAC;KACjB;CACF;AAED,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACpD,KAAK,UAAU,GAAG,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;AACnD,UAAU,0BAA0B;IAClC,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC;CACxD;AACD,UAAU,0BAA0B;IAClC,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,CAAC;CACtC;AACD,UAAU,kBACR,SAAQ,0BAA0B,EAAE,0BAA0B;CAC/D;AAiBD,eAAO,IAAI,6BAA6B,EA2BnC,0BAA0B,CAAC;AAMhC,eAAO,IAAI,6BAA6B,EA4DnC,0BAA0B,CAAC;AAMhC,eAAO,IAAI,oBAAoB,EAoB1B,kBAAkB,CAAC;AACxB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK;QACb,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB;CACF;AAED,OAAO,EAAE,CAAC;AAgBV,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd;;;;WAIG;QACH,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;KAC5C;CACF;AAED,OAAO,EAAE,CAAC"}
|
package/esm/_dnt.polyfills.js
CHANGED
|
@@ -1,3 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Based on [import-meta-ponyfill](https://github.com/gaubee/import-meta-ponyfill),
|
|
3
|
+
* but instead of using npm to install additional dependencies,
|
|
4
|
+
* this approach manually consolidates cjs/mjs/d.ts into a single file.
|
|
5
|
+
*
|
|
6
|
+
* Note that this code might be imported multiple times
|
|
7
|
+
* (for example, both dnt.test.polyfills.ts and dnt.polyfills.ts contain this code;
|
|
8
|
+
* or Node.js might dynamically clear the cache and then force a require).
|
|
9
|
+
* Therefore, it's important to avoid redundant writes to global objects.
|
|
10
|
+
* Additionally, consider that commonjs is used alongside esm,
|
|
11
|
+
* so the two ponyfill functions are stored independently in two separate global objects.
|
|
12
|
+
*/
|
|
13
|
+
//@ts-ignore
|
|
14
|
+
import { createRequire } from "node:module";
|
|
15
|
+
//@ts-ignore
|
|
16
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
17
|
+
//@ts-ignore
|
|
18
|
+
import { dirname } from "node:path";
|
|
19
|
+
const defineGlobalPonyfill = (symbolFor, fn) => {
|
|
20
|
+
if (!Reflect.has(globalThis, Symbol.for(symbolFor))) {
|
|
21
|
+
Object.defineProperty(globalThis, Symbol.for(symbolFor), {
|
|
22
|
+
configurable: true,
|
|
23
|
+
get() {
|
|
24
|
+
return fn;
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export let import_meta_ponyfill_commonjs = (Reflect.get(globalThis, Symbol.for("import-meta-ponyfill-commonjs")) ??
|
|
30
|
+
(() => {
|
|
31
|
+
const moduleImportMetaWM = new WeakMap();
|
|
32
|
+
return (require, module) => {
|
|
33
|
+
let importMetaCache = moduleImportMetaWM.get(module);
|
|
34
|
+
if (importMetaCache == null) {
|
|
35
|
+
const importMeta = Object.assign(Object.create(null), {
|
|
36
|
+
url: pathToFileURL(module.filename).href,
|
|
37
|
+
main: require.main == module,
|
|
38
|
+
resolve: (specifier, parentURL = importMeta.url) => {
|
|
39
|
+
return pathToFileURL((importMeta.url === parentURL
|
|
40
|
+
? require
|
|
41
|
+
: createRequire(parentURL))
|
|
42
|
+
.resolve(specifier)).href;
|
|
43
|
+
},
|
|
44
|
+
filename: module.filename,
|
|
45
|
+
dirname: module.path,
|
|
46
|
+
});
|
|
47
|
+
moduleImportMetaWM.set(module, importMeta);
|
|
48
|
+
importMetaCache = importMeta;
|
|
49
|
+
}
|
|
50
|
+
return importMetaCache;
|
|
51
|
+
};
|
|
52
|
+
})());
|
|
53
|
+
defineGlobalPonyfill("import-meta-ponyfill-commonjs", import_meta_ponyfill_commonjs);
|
|
54
|
+
export let import_meta_ponyfill_esmodule = (Reflect.get(globalThis, Symbol.for("import-meta-ponyfill-esmodule")) ??
|
|
55
|
+
((importMeta) => {
|
|
56
|
+
const resolveFunStr = String(importMeta.resolve);
|
|
57
|
+
const shimWs = new WeakSet();
|
|
58
|
+
//@ts-ignore
|
|
59
|
+
const mainUrl = ("file:///" + (process.argv[1] ?? "").replace(/\\/g, "/"))
|
|
60
|
+
.replace(/\/{3,}/, "///");
|
|
61
|
+
const commonShim = (importMeta) => {
|
|
62
|
+
if (typeof importMeta.main !== "boolean") {
|
|
63
|
+
importMeta.main = importMeta.url === mainUrl;
|
|
64
|
+
}
|
|
65
|
+
if (typeof importMeta.filename !== "string") {
|
|
66
|
+
importMeta.filename = fileURLToPath(importMeta.url);
|
|
67
|
+
importMeta.dirname = dirname(importMeta.filename);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
if (
|
|
71
|
+
// v16.2.0+, v14.18.0+: Add support for WHATWG URL object to parentURL parameter.
|
|
72
|
+
resolveFunStr === "undefined" ||
|
|
73
|
+
// v20.0.0+, v18.19.0+"" This API now returns a string synchronously instead of a Promise.
|
|
74
|
+
resolveFunStr.startsWith("async")
|
|
75
|
+
// enable by --experimental-import-meta-resolve flag
|
|
76
|
+
) {
|
|
77
|
+
import_meta_ponyfill_esmodule = (importMeta) => {
|
|
78
|
+
if (!shimWs.has(importMeta)) {
|
|
79
|
+
shimWs.add(importMeta);
|
|
80
|
+
const importMetaUrlRequire = {
|
|
81
|
+
url: importMeta.url,
|
|
82
|
+
require: createRequire(importMeta.url),
|
|
83
|
+
};
|
|
84
|
+
importMeta.resolve = function resolve(specifier, parentURL = importMeta.url) {
|
|
85
|
+
return pathToFileURL((importMetaUrlRequire.url === parentURL
|
|
86
|
+
? importMetaUrlRequire.require
|
|
87
|
+
: createRequire(parentURL)).resolve(specifier)).href;
|
|
88
|
+
};
|
|
89
|
+
commonShim(importMeta);
|
|
90
|
+
}
|
|
91
|
+
return importMeta;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
/// native support
|
|
96
|
+
import_meta_ponyfill_esmodule = (importMeta) => {
|
|
97
|
+
if (!shimWs.has(importMeta)) {
|
|
98
|
+
shimWs.add(importMeta);
|
|
99
|
+
commonShim(importMeta);
|
|
100
|
+
}
|
|
101
|
+
return importMeta;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
return import_meta_ponyfill_esmodule(importMeta);
|
|
105
|
+
}));
|
|
106
|
+
defineGlobalPonyfill("import-meta-ponyfill-esmodule", import_meta_ponyfill_esmodule);
|
|
107
|
+
export let import_meta_ponyfill = ((...args) => {
|
|
108
|
+
const _MODULE = (() => {
|
|
109
|
+
if (typeof require === "function" && typeof module === "object") {
|
|
110
|
+
return "commonjs";
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
// eval("typeof import.meta");
|
|
114
|
+
return "esmodule";
|
|
115
|
+
}
|
|
116
|
+
})();
|
|
117
|
+
if (_MODULE === "commonjs") {
|
|
118
|
+
//@ts-ignore
|
|
119
|
+
import_meta_ponyfill = (r, m) => import_meta_ponyfill_commonjs(r, m);
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
//@ts-ignore
|
|
123
|
+
import_meta_ponyfill = (im) => import_meta_ponyfill_esmodule(im);
|
|
124
|
+
}
|
|
125
|
+
//@ts-ignore
|
|
126
|
+
return import_meta_ponyfill(...args);
|
|
127
|
+
});
|
|
1
128
|
// https://github.com/tc39/proposal-accessible-object-hasownproperty/blob/main/polyfill.js
|
|
2
129
|
if (!Object.hasOwn) {
|
|
3
130
|
Object.defineProperty(Object, "hasOwn", {
|
|
@@ -12,4 +139,3 @@ if (!Object.hasOwn) {
|
|
|
12
139
|
writable: true,
|
|
13
140
|
});
|
|
14
141
|
}
|
|
15
|
-
export {};
|
package/esm/deno.d.ts
CHANGED
|
@@ -343,6 +343,10 @@ declare namespace _default {
|
|
|
343
343
|
"#std/async.ts": string;
|
|
344
344
|
"#std/front-matter/yaml": string;
|
|
345
345
|
"#std/front-matter/yaml.ts": string;
|
|
346
|
+
"#std/yaml": string;
|
|
347
|
+
"#std/yaml.ts": string;
|
|
348
|
+
"#std/yaml/parse": string;
|
|
349
|
+
"#std/yaml/parse.ts": string;
|
|
346
350
|
"@std/path": string;
|
|
347
351
|
"@std/assert": string;
|
|
348
352
|
"@std/dotenv": string;
|
|
@@ -430,6 +434,7 @@ declare namespace _default {
|
|
|
430
434
|
"docs:check-links": string;
|
|
431
435
|
"lint:ban-zod": string;
|
|
432
436
|
"lint:core-deps": string;
|
|
437
|
+
"lint:cross-runtime-jsr": string;
|
|
433
438
|
"lint:dependency-boundaries": string;
|
|
434
439
|
"lint:module-boundaries": string;
|
|
435
440
|
"lint:extension-contracts": string;
|
package/esm/deno.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"name": "veryfront",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1227",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"nodeModulesDir": "auto",
|
|
6
6
|
"minimumDependencyAge": {
|
|
@@ -413,6 +413,10 @@ export default {
|
|
|
413
413
|
"#std/async.ts": "jsr:@std/async@1.2.0",
|
|
414
414
|
"#std/front-matter/yaml": "./src/platform/compat/std/front-matter-yaml.ts",
|
|
415
415
|
"#std/front-matter/yaml.ts": "./src/platform/compat/std/front-matter-yaml.ts",
|
|
416
|
+
"#std/yaml": "./src/platform/compat/std/yaml.ts",
|
|
417
|
+
"#std/yaml.ts": "./src/platform/compat/std/yaml.ts",
|
|
418
|
+
"#std/yaml/parse": "./src/platform/compat/std/yaml.ts",
|
|
419
|
+
"#std/yaml/parse.ts": "./src/platform/compat/std/yaml.ts",
|
|
416
420
|
"@std/path": "jsr:@std/path@1.1.4",
|
|
417
421
|
"@std/assert": "jsr:@std/assert@1.0.19",
|
|
418
422
|
"@std/dotenv": "jsr:@std/dotenv@0.225.6",
|
|
@@ -420,7 +424,7 @@ export default {
|
|
|
420
424
|
"@std/fmt/colors": "jsr:@std/fmt@1.0.9/colors",
|
|
421
425
|
"@std/testing": "jsr:@std/testing@1.0.17",
|
|
422
426
|
"@std/testing/bdd": "jsr:@std/testing@1.0.17/bdd",
|
|
423
|
-
"@std/yaml/parse": "
|
|
427
|
+
"@std/yaml/parse": "./src/platform/compat/std/yaml.ts",
|
|
424
428
|
"@std/expect": "jsr:@std/expect@1.0.18",
|
|
425
429
|
"@std/fs": "jsr:@std/fs@1.0.23",
|
|
426
430
|
"@std/async": "jsr:@std/async@1.2.0",
|
|
@@ -485,12 +489,12 @@ export default {
|
|
|
485
489
|
"build:storybook": "npm --prefix storybook run build-storybook",
|
|
486
490
|
"storybook:check": "deno test --no-lock --config=scripts/test.deno.json --no-check --allow-read scripts/storybook/storybook-workbench.test.ts",
|
|
487
491
|
"lint": "DENO_NO_PACKAGE_JSON=1 deno lint && deno lint --config=scripts/test.deno.json scripts/test/ scripts/build/dnt-polyfill.ts scripts/build/dnt-polyfill.test.ts scripts/build/npm-package-metadata.test.ts scripts/build/prepare-framework-sources.test.ts && deno lint --config=scripts/codemods/deno.json scripts/codemods/",
|
|
488
|
-
"lint:ci": "deno task lint && deno task lint:core-deps && deno task lint:dependency-boundaries && deno task lint:module-boundaries && deno task lint:extension-contracts && deno task lint:extension-capabilities && deno task lint:ban-test-only && deno task lint:sanitizer-baseline && deno task lint:skipped-tests && deno task lint:chat-ratchets && deno task lint:esm-sh-codemod && deno task lint:test-typecheck && deno task storybook:check && deno task docs:api-reference:check && deno test --frozen --config=scripts/test.deno.json --no-check --allow-read --allow-write scripts/ci/setup-deno-workflow.test.ts scripts/build/generated-artifact-checks.test.ts",
|
|
492
|
+
"lint:ci": "deno task lint && deno task lint:core-deps && deno task lint:cross-runtime-jsr && deno task lint:dependency-boundaries && deno task lint:module-boundaries && deno task lint:extension-contracts && deno task lint:extension-capabilities && deno task lint:ban-test-only && deno task lint:sanitizer-baseline && deno task lint:skipped-tests && deno task lint:chat-ratchets && deno task lint:esm-sh-codemod && deno task lint:test-typecheck && deno task storybook:check && deno task docs:api-reference:check && deno test --frozen --config=scripts/test.deno.json --no-check --allow-read --allow-write scripts/ci/setup-deno-workflow.test.ts scripts/build/generated-artifact-checks.test.ts",
|
|
489
493
|
"fmt": "deno fmt src/ cli/ react/ && deno fmt --config=scripts/test.deno.json scripts/test/ scripts/build/dnt-polyfill.ts scripts/build/dnt-polyfill.test.ts scripts/build/prepare-framework-sources.test.ts && deno fmt --config=scripts/codemods/deno.json scripts/codemods/",
|
|
490
494
|
"fmt:check": "deno fmt --check src/ cli/ react/ && deno fmt --check --config=scripts/test.deno.json scripts/test/ scripts/build/dnt-polyfill.ts scripts/build/dnt-polyfill.test.ts scripts/build/prepare-framework-sources.test.ts && deno fmt --check --config=scripts/codemods/deno.json scripts/codemods/",
|
|
491
495
|
"typecheck": "deno task generate:manifests:check && deno check src/index.ts cli/main.ts src/server/index.ts src/routing/api/index.ts src/rendering/index.ts src/platform/index.ts src/platform/adapters/index.ts src/build/index.ts src/build/production-build/index.ts src/transforms/index.ts src/config/index.ts src/utils/index.ts src/data/index.ts src/security/index.ts src/middleware/index.ts src/server/handlers/dev/index.ts src/server/handlers/request/api/index.ts src/rendering/cache/index.ts src/rendering/cache/stores/index.ts src/rendering/rsc/actions/index.ts src/html/index.ts src/html/hydration-script-builder/runtime/main.ts src/modules/index.ts src/proxy/main.ts src/react/components/ui/index.ts src/chat/index.ts src/markdown/index.ts src/mdx/index.ts src/fs/index.ts src/oauth/index.ts src/agent/index.ts src/agent/service/route-export.check.ts src/eval/index.ts src/tool/index.ts src/workflow/index.ts src/prompt/index.ts src/resource/index.ts src/runs/index.ts src/mcp/index.ts src/provider/index.ts",
|
|
492
|
-
"verify": "deno task generate:manifests:check && deno task fmt:check && deno task lint && deno task lint:style && deno task lint:chat-composability && deno task lint:chat-ratchets && deno task lint:esm-sh-codemod && deno task lint:cli-boundary && deno task lint:wildcard-exports && deno task lint:barrel-jsdoc && deno task lint:ban-test-only && deno task lint:sanitizer-baseline && deno task lint:skipped-tests && deno task lint:ban-zod && deno task lint:core-deps && deno task lint:dependency-boundaries && deno task lint:module-boundaries && deno task lint:extension-contracts && deno task lint:extension-capabilities && deno task docs:api-reference:check && deno task docs:validate && deno task typecheck && deno task typecheck:consumer && deno task test && deno task test:scripts && deno task test:e2e:binary",
|
|
493
|
-
"verify:quick": "deno task generate:manifests:check && deno task fmt:check && deno task lint && deno task lint:style && deno task lint:chat-composability && deno task lint:chat-ratchets && deno task lint:esm-sh-codemod && deno task lint:cli-boundary && deno task lint:wildcard-exports && deno task lint:barrel-jsdoc && deno task lint:ban-test-only && deno task lint:sanitizer-baseline && deno task lint:skipped-tests && deno task lint:ban-zod && deno task lint:core-deps && deno task lint:dependency-boundaries && deno task lint:module-boundaries && deno task lint:extension-contracts && deno task lint:extension-capabilities && deno task docs:api-reference:check && deno task docs:validate && deno task typecheck",
|
|
496
|
+
"verify": "deno task generate:manifests:check && deno task fmt:check && deno task lint && deno task lint:style && deno task lint:chat-composability && deno task lint:chat-ratchets && deno task lint:esm-sh-codemod && deno task lint:cli-boundary && deno task lint:wildcard-exports && deno task lint:barrel-jsdoc && deno task lint:ban-test-only && deno task lint:sanitizer-baseline && deno task lint:skipped-tests && deno task lint:ban-zod && deno task lint:core-deps && deno task lint:cross-runtime-jsr && deno task lint:dependency-boundaries && deno task lint:module-boundaries && deno task lint:extension-contracts && deno task lint:extension-capabilities && deno task docs:api-reference:check && deno task docs:validate && deno task typecheck && deno task typecheck:consumer && deno task test && deno task test:scripts && deno task test:e2e:binary",
|
|
497
|
+
"verify:quick": "deno task generate:manifests:check && deno task fmt:check && deno task lint && deno task lint:style && deno task lint:chat-composability && deno task lint:chat-ratchets && deno task lint:esm-sh-codemod && deno task lint:cli-boundary && deno task lint:wildcard-exports && deno task lint:barrel-jsdoc && deno task lint:ban-test-only && deno task lint:sanitizer-baseline && deno task lint:skipped-tests && deno task lint:ban-zod && deno task lint:core-deps && deno task lint:cross-runtime-jsr && deno task lint:dependency-boundaries && deno task lint:module-boundaries && deno task lint:extension-contracts && deno task lint:extension-capabilities && deno task docs:api-reference:check && deno task docs:validate && deno task typecheck",
|
|
494
498
|
"typecheck:consumer": "deno run --allow-read --allow-run --allow-env --allow-write scripts/typecheck/run-consumer-typecheck.ts",
|
|
495
499
|
"codemod:chat": "deno run --frozen --config=scripts/codemods/deno.json --allow-read --allow-write --allow-env=BABEL_TYPES_8_BREAKING scripts/codemods/migrate-chat-composition.ts",
|
|
496
500
|
"codemod:esm-sh": "deno run --frozen --config=scripts/codemods/deno.json --allow-read --allow-write --allow-env=BABEL_TYPES_8_BREAKING scripts/codemods/migrate-esm-sh-imports.ts",
|
|
@@ -506,6 +510,7 @@ export default {
|
|
|
506
510
|
"docs:check-links": "deno run -A scripts/lint/check-doc-links.ts",
|
|
507
511
|
"lint:ban-zod": "deno run --allow-read scripts/lint/ban-zod-imports.ts",
|
|
508
512
|
"lint:core-deps": "deno run --allow-read scripts/lint/audit-core-deps.ts",
|
|
513
|
+
"lint:cross-runtime-jsr": "deno run --allow-read scripts/lint/audit-cross-runtime-jsr.ts",
|
|
509
514
|
"lint:dependency-boundaries": "deno run --allow-read scripts/lint/audit-dependency-boundaries.ts",
|
|
510
515
|
"lint:module-boundaries": "DENO_NO_PACKAGE_JSON=1 deno run --frozen --allow-read scripts/lint/check-module-boundaries.ts",
|
|
511
516
|
"lint:extension-contracts": "deno run --config=scripts/test.deno.json --frozen --allow-read scripts/lint/audit-extension-contracts.ts",
|
|
@@ -527,7 +532,7 @@ export default {
|
|
|
527
532
|
"lint:ban-test-only": "deno run --allow-read scripts/lint/ban-test-only.ts",
|
|
528
533
|
"lint:sanitizer-baseline": "deno run --allow-read scripts/lint/check-sanitizer-baseline.ts",
|
|
529
534
|
"lint:skipped-tests": "deno run --allow-read scripts/lint/check-skipped-tests-baseline.ts",
|
|
530
|
-
"test:scripts": "deno test --config=scripts/test.deno.json --no-check --allow-read --allow-write --allow-run scripts/ci/publish-npm-packages.test.ts scripts/ci/setup-deno-workflow.test.ts scripts/build/compile-binary.test.ts scripts/build/dnt-polyfill.test.ts scripts/build/generate-sbom.test.ts scripts/build/generated-artifact-checks.test.ts scripts/build/npm-dependency-sources.test.ts scripts/build/npm-extension-package-metadata.test.ts scripts/build/npm-package-metadata.test.ts scripts/build/npm-react-shims.test.ts scripts/build/npm-runtime-helper-contract.test.ts scripts/build/prepare-framework-sources.test.ts scripts/docs/docs-coverage.test.ts scripts/docs/generate-api-reference.test.ts scripts/docs/guide-validation.test.ts scripts/lint/audit-core-deps.test.ts scripts/lint/audit-dependency-boundaries.test.ts scripts/lint/audit-extension-capabilities.test.ts scripts/lint/audit-extension-contracts.test.ts scripts/lint/audit-deps.test.ts scripts/lint/check-module-boundaries.test.ts scripts/lint/lint-config.test.ts scripts/lint/ban-test-only.test.ts scripts/lint/check-sanitizer-baseline.test.ts scripts/lint/check-skipped-tests-baseline.test.ts scripts/lint/check-test-typecheck-baseline.test.ts scripts/lint/check-coverage.test.ts scripts/security/audit-npm.test.ts scripts/security/submit-dependency-snapshot.test.ts && deno task test:tool-search-live",
|
|
535
|
+
"test:scripts": "deno test --config=scripts/test.deno.json --no-check --allow-read --allow-write --allow-run scripts/ci/publish-npm-packages.test.ts scripts/ci/setup-deno-workflow.test.ts scripts/build/compile-binary.test.ts scripts/build/dnt-polyfill.test.ts scripts/build/generate-sbom.test.ts scripts/build/generated-artifact-checks.test.ts scripts/build/npm-dependency-sources.test.ts scripts/build/npm-extension-package-metadata.test.ts scripts/build/npm-package-metadata.test.ts scripts/build/npm-react-shims.test.ts scripts/build/npm-runtime-helper-contract.test.ts scripts/build/prepare-framework-sources.test.ts scripts/docs/docs-coverage.test.ts scripts/docs/generate-api-reference.test.ts scripts/docs/guide-validation.test.ts scripts/lint/audit-core-deps.test.ts scripts/lint/audit-cross-runtime-jsr.test.ts scripts/lint/audit-dependency-boundaries.test.ts scripts/lint/audit-extension-capabilities.test.ts scripts/lint/audit-extension-contracts.test.ts scripts/lint/audit-deps.test.ts scripts/lint/check-module-boundaries.test.ts scripts/lint/lint-config.test.ts scripts/lint/ban-test-only.test.ts scripts/lint/check-sanitizer-baseline.test.ts scripts/lint/check-skipped-tests-baseline.test.ts scripts/lint/check-test-typecheck-baseline.test.ts scripts/lint/check-coverage.test.ts scripts/security/audit-npm.test.ts scripts/security/submit-dependency-snapshot.test.ts && deno task test:tool-search-live",
|
|
531
536
|
"test:sentry-runtime-packages": "deno test --config=scripts/test.deno.json --no-check --no-lock --allow-read --allow-write --allow-run --allow-env=DENO_DIR,HOME,XDG_CACHE_HOME,LOCALAPPDATA,USERPROFILE scripts/build/sentry-runtime-packages.test.ts",
|
|
532
537
|
"test:tool-search-live": "VF_DISABLE_LRU_INTERVAL=1 deno test --no-check -A tests/agent/verify-tool-search-live.test.ts",
|
|
533
538
|
"test:cross-runtime": "deno run --allow-all src/platform/compat/cross-runtime.test.ts",
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal contract-registry ownership and active-use lifecycle.
|
|
3
|
+
*
|
|
4
|
+
* Public registry operations intentionally remain synchronous and preserve
|
|
5
|
+
* their existing signatures. Loader-owned registrations additionally carry
|
|
6
|
+
* an opaque generation identity so teardown can stop admission, drain active
|
|
7
|
+
* users, and remove only the exact entries that generation published.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
type ContractGenerationStatus = "staging" | "active" | "retiring" | "retired" | "failed";
|
|
12
|
+
interface ContractEntry<T = unknown> {
|
|
13
|
+
readonly implementation: T;
|
|
14
|
+
readonly generation: ContractGeneration | undefined;
|
|
15
|
+
}
|
|
16
|
+
interface ContractLeaseRecord {
|
|
17
|
+
released: boolean;
|
|
18
|
+
quarantined: boolean;
|
|
19
|
+
quarantineFailure: Error | undefined;
|
|
20
|
+
retirementNotified: boolean;
|
|
21
|
+
retirementHandler: ((reason: unknown) => void) | undefined;
|
|
22
|
+
}
|
|
23
|
+
/** Opaque ownership state for one loader generation. */
|
|
24
|
+
export interface ContractGeneration {
|
|
25
|
+
/** Registry epoch that owns every global side effect of this generation. */
|
|
26
|
+
readonly resetToken: object;
|
|
27
|
+
status: ContractGenerationStatus;
|
|
28
|
+
readonly entries: Map<string, ContractEntry>;
|
|
29
|
+
/** Candidate entries hidden by explicit rollback-time register/unregister. */
|
|
30
|
+
readonly entryOverlayShadows: Set<string>;
|
|
31
|
+
readonly leases: Set<ContractLeaseRecord>;
|
|
32
|
+
readonly retirementHandlerFailures: unknown[];
|
|
33
|
+
retirementNotificationDepth: number;
|
|
34
|
+
retirementReason: unknown;
|
|
35
|
+
hasRetirementReason: boolean;
|
|
36
|
+
retirementNotificationStarted: boolean;
|
|
37
|
+
settleLeaseDrain: (() => void) | undefined;
|
|
38
|
+
rejectLeaseDrain: ((reason: unknown) => void) | undefined;
|
|
39
|
+
retirementDrainQuarantined: boolean;
|
|
40
|
+
retirementPromise: Promise<void> | undefined;
|
|
41
|
+
}
|
|
42
|
+
/** A stable reference captured with a resolved contract implementation. */
|
|
43
|
+
export interface ContractReference<T> {
|
|
44
|
+
readonly name: string;
|
|
45
|
+
readonly entry: ContractEntry<T>;
|
|
46
|
+
}
|
|
47
|
+
/** One active-use lease. Release is idempotent. */
|
|
48
|
+
export interface ContractLease {
|
|
49
|
+
/**
|
|
50
|
+
* Register the synchronous cancellation control for this use. When
|
|
51
|
+
* retirement already started, registration invokes it immediately.
|
|
52
|
+
*/
|
|
53
|
+
setRetirementHandler(handler: (reason: unknown) => void): void;
|
|
54
|
+
/**
|
|
55
|
+
* Close generation admission after this use outlives its cancellation grace.
|
|
56
|
+
* The lease remains active until the provider reports terminal settlement.
|
|
57
|
+
*/
|
|
58
|
+
quarantine(): void;
|
|
59
|
+
/** Release this generation use. Safe to call more than once. */
|
|
60
|
+
release(): void;
|
|
61
|
+
}
|
|
62
|
+
/** A contract implementation and the identity required to lease it. */
|
|
63
|
+
export interface ContractSnapshot<T> {
|
|
64
|
+
readonly implementation: T;
|
|
65
|
+
readonly reference: ContractReference<T>;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Reject candidate preparation before extension-controlled materialization or
|
|
69
|
+
* transition hooks can run inside a current or inherited teardown scope.
|
|
70
|
+
*/
|
|
71
|
+
export declare function assertContractGenerationAdmissionAllowed(): void;
|
|
72
|
+
/** Read one raw public registration. */
|
|
73
|
+
export declare function tryResolveRegisteredContract<T>(name: string): T | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Bind raw contract resolution to a failed candidate during rollback.
|
|
76
|
+
*
|
|
77
|
+
* Failed candidates retain their unpublished staged dependencies. Reset and
|
|
78
|
+
* hook settlement still revoke inherited descendants.
|
|
79
|
+
*/
|
|
80
|
+
export declare function runWithContractGenerationResolution<T>(generation: ContractGeneration, operation: () => T | Promise<T>): Promise<T>;
|
|
81
|
+
/**
|
|
82
|
+
* Bind teardown to one registry epoch without overriding current raw entries.
|
|
83
|
+
*
|
|
84
|
+
* Successful teardown keeps the registry's public overwrite semantics while
|
|
85
|
+
* stale or detached work remains unable to cross a reset boundary.
|
|
86
|
+
*/
|
|
87
|
+
export declare function runWithContractGenerationEpoch<T>(generation: ContractGeneration, operation: () => T | Promise<T>): Promise<T>;
|
|
88
|
+
/** Install one unmanaged public registration. */
|
|
89
|
+
export declare function registerUnmanagedContract<T>(name: string, implementation: T): void;
|
|
90
|
+
/** Remove the current public registration without lifecycle coordination. */
|
|
91
|
+
export declare function unregisterContract(name: string): void;
|
|
92
|
+
/**
|
|
93
|
+
* Force-clear the public registry and lifecycle state.
|
|
94
|
+
*
|
|
95
|
+
* This preserves the historical synchronous reset primitive used by tests and
|
|
96
|
+
* composition roots. Normal loader shutdown must use generation retirement.
|
|
97
|
+
*/
|
|
98
|
+
export declare function resetContractRegistry(): void;
|
|
99
|
+
/** Start staging one candidate generation without publishing partial entries. */
|
|
100
|
+
export declare function beginContractGeneration(): ContractGeneration;
|
|
101
|
+
/** Stage or replace one loader-owned entry inside a candidate generation. */
|
|
102
|
+
export declare function stageContract<T>(generation: ContractGeneration, name: string, implementation: T): void;
|
|
103
|
+
/** Resolve candidate-local dependencies without publishing the candidate. */
|
|
104
|
+
export declare function tryResolveContractForGeneration<T>(generation: ContractGeneration, name: string): T | undefined;
|
|
105
|
+
/** Atomically publish every staged entry and open active-use admission. */
|
|
106
|
+
export declare function commitContractGeneration(generation: ContractGeneration): void;
|
|
107
|
+
/**
|
|
108
|
+
* Capture a contract for lifecycle-aware use.
|
|
109
|
+
*
|
|
110
|
+
* Missing is distinct from an unavailable transition: callers may apply their
|
|
111
|
+
* documented fallback only for a stable, genuinely absent registration.
|
|
112
|
+
*/
|
|
113
|
+
export declare function trySnapshotContractForUse<T>(name: string): Readonly<ContractSnapshot<T>> | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* Capture only a loader-generation-owned contract for security-sensitive use.
|
|
116
|
+
*
|
|
117
|
+
* Ownerless registrations remain available to compatibility consumers through
|
|
118
|
+
* `trySnapshotContractForUse`, but cannot satisfy a contract whose safety
|
|
119
|
+
* depends on retirement fencing and active-use lease drainage.
|
|
120
|
+
*/
|
|
121
|
+
export declare function trySnapshotGenerationOwnedContractForUse<T>(name: string): Readonly<ContractSnapshot<T>> | undefined;
|
|
122
|
+
/** Acquire active-use ownership immediately before invoking a contract. */
|
|
123
|
+
export declare function acquireContractLease<T>(reference: Readonly<ContractReference<T>>): Readonly<ContractLease>;
|
|
124
|
+
/**
|
|
125
|
+
* Close admission synchronously before contexts or other generation-owned
|
|
126
|
+
* resources begin revocation.
|
|
127
|
+
*/
|
|
128
|
+
export declare function sealContractGeneration(generation: ContractGeneration, reason?: unknown): void;
|
|
129
|
+
/**
|
|
130
|
+
* Notify active uses synchronously, then await release or reject if an active
|
|
131
|
+
* lease has quarantined the generation. A drain may be retried after release.
|
|
132
|
+
*/
|
|
133
|
+
export declare function drainContractGeneration(generation: ContractGeneration): Promise<void>;
|
|
134
|
+
/** Whether every admitted use has released before extension teardown begins. */
|
|
135
|
+
export declare function isContractGenerationDrained(generation: ContractGeneration): boolean;
|
|
136
|
+
/** Complete a successful teardown and remove only this generation's entries. */
|
|
137
|
+
export declare function completeContractGenerationRetirement(generation: ContractGeneration): void;
|
|
138
|
+
/**
|
|
139
|
+
* Finish a failed candidate. Absence remains fail-closed until a later
|
|
140
|
+
* generation commits successfully or the low-level registry is reset.
|
|
141
|
+
*/
|
|
142
|
+
export declare function failContractGeneration(generation: ContractGeneration): void;
|
|
143
|
+
export {};
|
|
144
|
+
//# sourceMappingURL=contract-registry-internal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract-registry-internal.d.ts","sourceRoot":"","sources":["../../../src/src/extensions/contract-registry-internal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,KAAK,wBAAwB,GACzB,SAAS,GACT,QAAQ,GACR,UAAU,GACV,SAAS,GACT,QAAQ,CAAC;AAEb,UAAU,aAAa,CAAC,CAAC,GAAG,OAAO;IACjC,QAAQ,CAAC,cAAc,EAAE,CAAC,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,kBAAkB,GAAG,SAAS,CAAC;CACrD;AAED,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,KAAK,GAAG,SAAS,CAAC;IACrC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAC5D;AAaD,wDAAwD;AACxD,MAAM,WAAW,kBAAkB;IACjC,4EAA4E;IAC5E,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,MAAM,EAAE,wBAAwB,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,GAAG,CAA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