@veryfront/ext-content-mdx 0.1.1226 → 0.1.1228
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 +17 -2
- package/esm/deno.js +24 -9
- 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 +377 -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/observability/telemetry-error.d.ts.map +1 -1
- package/esm/src/observability/telemetry-error.js +15 -3
- 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/constants/http.d.ts +8 -2
- package/esm/src/utils/constants/http.d.ts.map +1 -1
- package/esm/src/utils/constants/http.js +10 -2
- 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
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extension boundary for general-purpose YAML decoding.
|
|
3
|
+
*
|
|
4
|
+
* Core owns front matter framing, mapping policy, and every call site's
|
|
5
|
+
* downstream validation. Implementations own only YAML decoding, which is the
|
|
6
|
+
* one part that needs a third-party parser and therefore may not live in core.
|
|
7
|
+
*
|
|
8
|
+
* This is a sibling of `SkillDocumentParserProvider`, not an extension of it,
|
|
9
|
+
* for two reasons. First, `snapshotSkillDocumentParserProvider` enforces that
|
|
10
|
+
* a provider has exactly one own key named `parseFrontmatter`; adding a second
|
|
11
|
+
* method would mean weakening an invariant that guards an untrusted Skill
|
|
12
|
+
* document trust boundary. Second, general YAML decoding needs the decoding
|
|
13
|
+
* options (`schema`, `allowDuplicateKeys`) that the Skill contract
|
|
14
|
+
* deliberately withholds so that core, not the extension, fixes Skill policy.
|
|
15
|
+
*
|
|
16
|
+
* @module extensions/parser/yaml-parser
|
|
17
|
+
*/
|
|
18
|
+
/** Stable runtime identifier for the general YAML parser contract. */
|
|
19
|
+
export declare const YamlParserProviderName: "YamlParserProvider";
|
|
20
|
+
/**
|
|
21
|
+
* Decoding options, named after the `@std/yaml` options the framework's call
|
|
22
|
+
* sites already pass so that repointing a call site is a specifier change.
|
|
23
|
+
*/
|
|
24
|
+
export interface YamlParseOptions {
|
|
25
|
+
/**
|
|
26
|
+
* Accept a mapping that repeats a key. Defaults to false: a repeated key is
|
|
27
|
+
* a source defect, and picking a winner silently hides it.
|
|
28
|
+
*/
|
|
29
|
+
readonly allowDuplicateKeys?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* `"json"` restricts resolution to JSON-representable types. Use it at
|
|
32
|
+
* trust boundaries where a timestamp, a binary blob, or any other
|
|
33
|
+
* implementation-specific tag must not appear in the decoded value.
|
|
34
|
+
*/
|
|
35
|
+
readonly schema?: "core" | "json";
|
|
36
|
+
}
|
|
37
|
+
/** Dependency-free contract implemented by YAML parser extensions. */
|
|
38
|
+
export interface YamlParserProvider {
|
|
39
|
+
/**
|
|
40
|
+
* Decode one YAML document.
|
|
41
|
+
*
|
|
42
|
+
* Implementations must be synchronous, must reject a source holding more
|
|
43
|
+
* than one document, and must raise `SyntaxError` for malformed input. The
|
|
44
|
+
* returned value is untrusted; core validates it at each call site.
|
|
45
|
+
*/
|
|
46
|
+
readonly parseYaml: (source: string, options?: YamlParseOptions) => unknown;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Capture one immutable provider generation.
|
|
50
|
+
*
|
|
51
|
+
* The captured facade re-checks the synchronous contract on every call: an
|
|
52
|
+
* implementation that returns a Promise would otherwise hand a pending value
|
|
53
|
+
* to synchronous call sites that cannot await it, and the resulting `[object
|
|
54
|
+
* Promise]` front matter is far harder to diagnose than a thrown TypeError.
|
|
55
|
+
*/
|
|
56
|
+
export declare function snapshotYamlParserProvider(value: unknown): Readonly<YamlParserProvider>;
|
|
57
|
+
/** Create immutable provider registration metadata from a standalone parser. */
|
|
58
|
+
export declare function createYamlParserProvider(parseYaml: YamlParserProvider["parseYaml"]): Readonly<YamlParserProvider>;
|
|
59
|
+
//# sourceMappingURL=yaml-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yaml-parser.d.ts","sourceRoot":"","sources":["../../../../src/src/extensions/parser/yaml-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,sEAAsE;AACtE,eAAO,MAAM,sBAAsB,EAAG,oBAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IACtC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACnC;AAED,sEAAsE;AACtE,MAAM,WAAW,kBAAkB;IACjC;;;;;;OAMG;IACH,QAAQ,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,KAAK,OAAO,CAAC;CAC7E;AAQD;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,OAAO,GACb,QAAQ,CAAC,kBAAkB,CAAC,CA4B9B;AAED,gFAAgF;AAChF,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,kBAAkB,CAAC,WAAW,CAAC,GACzC,QAAQ,CAAC,kBAAkB,CAAC,CAE9B"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extension boundary for general-purpose YAML decoding.
|
|
3
|
+
*
|
|
4
|
+
* Core owns front matter framing, mapping policy, and every call site's
|
|
5
|
+
* downstream validation. Implementations own only YAML decoding, which is the
|
|
6
|
+
* one part that needs a third-party parser and therefore may not live in core.
|
|
7
|
+
*
|
|
8
|
+
* This is a sibling of `SkillDocumentParserProvider`, not an extension of it,
|
|
9
|
+
* for two reasons. First, `snapshotSkillDocumentParserProvider` enforces that
|
|
10
|
+
* a provider has exactly one own key named `parseFrontmatter`; adding a second
|
|
11
|
+
* method would mean weakening an invariant that guards an untrusted Skill
|
|
12
|
+
* document trust boundary. Second, general YAML decoding needs the decoding
|
|
13
|
+
* options (`schema`, `allowDuplicateKeys`) that the Skill contract
|
|
14
|
+
* deliberately withholds so that core, not the extension, fixes Skill policy.
|
|
15
|
+
*
|
|
16
|
+
* @module extensions/parser/yaml-parser
|
|
17
|
+
*/
|
|
18
|
+
import { isNativePromiseWithoutHooks } from "../../platform/compat/error-introspection.js";
|
|
19
|
+
/** Stable runtime identifier for the general YAML parser contract. */
|
|
20
|
+
export const YamlParserProviderName = "YamlParserProvider";
|
|
21
|
+
function providerInspectionError() {
|
|
22
|
+
return new TypeError("YAML parser provider must be an object with a callable parseYaml property");
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Capture one immutable provider generation.
|
|
26
|
+
*
|
|
27
|
+
* The captured facade re-checks the synchronous contract on every call: an
|
|
28
|
+
* implementation that returns a Promise would otherwise hand a pending value
|
|
29
|
+
* to synchronous call sites that cannot await it, and the resulting `[object
|
|
30
|
+
* Promise]` front matter is far harder to diagnose than a thrown TypeError.
|
|
31
|
+
*/
|
|
32
|
+
export function snapshotYamlParserProvider(value) {
|
|
33
|
+
if (typeof value !== "object" || value === null)
|
|
34
|
+
throw providerInspectionError();
|
|
35
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, "parseYaml");
|
|
36
|
+
// An accessor descriptor has no own `value`, so a plain `descriptor.value`
|
|
37
|
+
// read would return whatever a poisoned `Object.prototype.value` supplies.
|
|
38
|
+
// Requiring the own property keeps an accessor-backed registration out.
|
|
39
|
+
if (descriptor === undefined ||
|
|
40
|
+
!Object.prototype.hasOwnProperty.call(descriptor, "value") ||
|
|
41
|
+
typeof descriptor.value !== "function") {
|
|
42
|
+
throw providerInspectionError();
|
|
43
|
+
}
|
|
44
|
+
const parseYaml = descriptor.value;
|
|
45
|
+
const facade = {
|
|
46
|
+
parseYaml(source, options) {
|
|
47
|
+
if (typeof source !== "string") {
|
|
48
|
+
throw new TypeError("YAML source must be a string");
|
|
49
|
+
}
|
|
50
|
+
const parsed = Reflect.apply(parseYaml, undefined, [source, options]);
|
|
51
|
+
if (isNativePromiseWithoutHooks(parsed)) {
|
|
52
|
+
throw new TypeError("YAML parser provider must be synchronous");
|
|
53
|
+
}
|
|
54
|
+
return parsed;
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
return Object.freeze(facade);
|
|
58
|
+
}
|
|
59
|
+
/** Create immutable provider registration metadata from a standalone parser. */
|
|
60
|
+
export function createYamlParserProvider(parseYaml) {
|
|
61
|
+
return snapshotYamlParserProvider({ parseYaml });
|
|
62
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maps contract names to recommended first-party extension packages.
|
|
3
|
+
*
|
|
4
|
+
* @module extensions/recommendations
|
|
5
|
+
*/
|
|
6
|
+
/** Return recommendation. */
|
|
7
|
+
export declare function getRecommendation(contractName: string): string | undefined;
|
|
8
|
+
//# sourceMappingURL=recommendations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recommendations.d.ts","sourceRoot":"","sources":["../../../src/src/extensions/recommendations.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAgCH,6BAA6B;AAC7B,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE1E"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maps contract names to recommended first-party extension packages.
|
|
3
|
+
*
|
|
4
|
+
* @module extensions/recommendations
|
|
5
|
+
*/
|
|
6
|
+
const recommendations = new Map([
|
|
7
|
+
["Bundler", "@veryfront/ext-bundler-esbuild"],
|
|
8
|
+
// ModuleLexer ships in the same package as Bundler (es-module-lexer +
|
|
9
|
+
// esbuild are co-bundled into ext-bundler-esbuild).
|
|
10
|
+
["ModuleLexer", "@veryfront/ext-bundler-esbuild"],
|
|
11
|
+
["TokenCacheStore", "@veryfront/ext-cache-redis"],
|
|
12
|
+
["RedisRuntimeProvider", "npm:@veryfront/ext-redis"],
|
|
13
|
+
["CSSProcessor", "@veryfront/ext-css-tailwind"],
|
|
14
|
+
["CSSOptimizationEngine", "@veryfront/ext-css-lightning"],
|
|
15
|
+
["CSSPurgingEngine", "@veryfront/ext-css-purgecss"],
|
|
16
|
+
["ImageOptimizationEngine", "@veryfront/ext-image-sharp"],
|
|
17
|
+
["ContentProcessor", "@veryfront/ext-content-mdx"],
|
|
18
|
+
["DocumentExtractor", "@veryfront/ext-document-kreuzberg"],
|
|
19
|
+
["AuthProvider", "@veryfront/ext-auth-jwt"],
|
|
20
|
+
["TracingExporter", "@veryfront/ext-observability-opentelemetry"],
|
|
21
|
+
["NodeTelemetryProvider", "@veryfront/ext-observability-opentelemetry"],
|
|
22
|
+
["LLMProvider:openai", "@veryfront/ext-llm-openai"],
|
|
23
|
+
["LLMProvider:anthropic", "@veryfront/ext-llm-anthropic"],
|
|
24
|
+
["LLMProvider:google", "@veryfront/ext-llm-google"],
|
|
25
|
+
["CodeParser", "@veryfront/ext-parser-babel"],
|
|
26
|
+
["SchemaValidator", "@veryfront/ext-schema-zod"],
|
|
27
|
+
["SqliteStore", "@veryfront/ext-db-sqlite"],
|
|
28
|
+
["SandboxShellToolsProvider", "@veryfront/ext-sandbox-shell-tools"],
|
|
29
|
+
["NodeWebSocketServerProvider", "@veryfront/ext-node-websocket-ws"],
|
|
30
|
+
// Skill frontmatter decoding and general YAML decoding are both satisfied by
|
|
31
|
+
// the single parser bundled in ext-yaml.
|
|
32
|
+
["SkillDocumentParserProvider", "@veryfront/ext-yaml"],
|
|
33
|
+
["YamlParserProvider", "@veryfront/ext-yaml"],
|
|
34
|
+
]);
|
|
35
|
+
/** Return recommendation. */
|
|
36
|
+
export function getRecommendation(contractName) {
|
|
37
|
+
return recommendations.get(contractName);
|
|
38
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal runtime validation for dynamically loaded extension boundaries.
|
|
3
|
+
*
|
|
4
|
+
* Static TypeScript contracts disappear at runtime. These helpers validate the
|
|
5
|
+
* small set of values that cross dynamic module and registry boundaries while
|
|
6
|
+
* containing hostile accessors behind contextual TypeErrors.
|
|
7
|
+
*/
|
|
8
|
+
export type ZeroArgumentConstructor<T> = new () => T;
|
|
9
|
+
/** Require a non-empty string without hidden surrounding whitespace. */
|
|
10
|
+
export declare function assertCanonicalNonEmptyString(value: unknown, label: string): asserts value is string;
|
|
11
|
+
/** Read and validate a zero-argument constructor from a dynamic module. */
|
|
12
|
+
export declare function getConstructibleModuleExport<T>(extensionModule: unknown, moduleName: string, exportName: string): ZeroArgumentConstructor<T>;
|
|
13
|
+
/** Validate the required method surface of a dynamically constructed value. */
|
|
14
|
+
export declare function assertRequiredMethods(instance: unknown, moduleName: string, exportName: string, methodNames: readonly string[]): void;
|
|
15
|
+
/** Capture a registry entry's identity exactly once. */
|
|
16
|
+
export declare function captureRegistrationId(value: unknown, registrationName: string): string;
|
|
17
|
+
/** Require a callable method on a registry entry. */
|
|
18
|
+
export declare function assertRegistrationMethod(value: unknown, registrationName: string, methodName: string): void;
|
|
19
|
+
/** Validate an optional method when a registry entry supplies it. */
|
|
20
|
+
export declare function assertOptionalRegistrationMethod(value: unknown, registrationName: string, methodName: string): void;
|
|
21
|
+
//# sourceMappingURL=runtime-validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-validation.d.ts","sourceRoot":"","sources":["../../../src/src/extensions/runtime-validation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,uBAAuB,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC;AAErD,wEAAwE;AACxE,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,KAAK,IAAI,MAAM,CAQzB;AAcD,2EAA2E;AAC3E,wBAAgB,4BAA4B,CAAC,CAAC,EAC5C,eAAe,EAAE,OAAO,EACxB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GACjB,uBAAuB,CAAC,CAAC,CAAC,CA0B5B;AAED,+EAA+E;AAC/E,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,OAAO,EACjB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,SAAS,MAAM,EAAE,GAC7B,IAAI,CAiBN;AAiCD,wDAAwD;AACxD,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,OAAO,EACd,gBAAgB,EAAE,MAAM,GACvB,MAAM,CAOR;AAED,qDAAqD;AACrD,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,EACd,gBAAgB,EAAE,MAAM,EACxB,UAAU,EAAE,MAAM,GACjB,IAAI,CAWN;AAED,qEAAqE;AACrE,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,OAAO,EACd,gBAAgB,EAAE,MAAM,EACxB,UAAU,EAAE,MAAM,GACjB,IAAI,CAWN"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal runtime validation for dynamically loaded extension boundaries.
|
|
3
|
+
*
|
|
4
|
+
* Static TypeScript contracts disappear at runtime. These helpers validate the
|
|
5
|
+
* small set of values that cross dynamic module and registry boundaries while
|
|
6
|
+
* containing hostile accessors behind contextual TypeErrors.
|
|
7
|
+
*/
|
|
8
|
+
/** Require a non-empty string without hidden surrounding whitespace. */
|
|
9
|
+
export function assertCanonicalNonEmptyString(value, label) {
|
|
10
|
+
if (typeof value !== "string" ||
|
|
11
|
+
value.length === 0 ||
|
|
12
|
+
value.trim() !== value) {
|
|
13
|
+
throw new TypeError(`${label} must be a non-empty canonical string`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function isConstructor(value) {
|
|
17
|
+
if (typeof value !== "function")
|
|
18
|
+
return false;
|
|
19
|
+
try {
|
|
20
|
+
Reflect.construct(Object, [], value);
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/** Read and validate a zero-argument constructor from a dynamic module. */
|
|
28
|
+
export function getConstructibleModuleExport(extensionModule, moduleName, exportName) {
|
|
29
|
+
if (extensionModule === null ||
|
|
30
|
+
(typeof extensionModule !== "object" && typeof extensionModule !== "function")) {
|
|
31
|
+
throw new TypeError(`Invalid ${moduleName} module: expected a module namespace`);
|
|
32
|
+
}
|
|
33
|
+
let candidate;
|
|
34
|
+
try {
|
|
35
|
+
candidate = extensionModule[exportName];
|
|
36
|
+
}
|
|
37
|
+
catch (cause) {
|
|
38
|
+
throw new TypeError(`Invalid ${moduleName} module: could not read export "${exportName}"`, { cause });
|
|
39
|
+
}
|
|
40
|
+
if (!isConstructor(candidate)) {
|
|
41
|
+
throw new TypeError(`Invalid ${moduleName} module: export "${exportName}" must be constructible`);
|
|
42
|
+
}
|
|
43
|
+
return candidate;
|
|
44
|
+
}
|
|
45
|
+
/** Validate the required method surface of a dynamically constructed value. */
|
|
46
|
+
export function assertRequiredMethods(instance, moduleName, exportName, methodNames) {
|
|
47
|
+
for (const methodName of methodNames) {
|
|
48
|
+
let method;
|
|
49
|
+
try {
|
|
50
|
+
method = instance[methodName];
|
|
51
|
+
}
|
|
52
|
+
catch (cause) {
|
|
53
|
+
throw new TypeError(`Invalid ${moduleName} module: "${exportName}" instance could not expose method "${methodName}"`, { cause });
|
|
54
|
+
}
|
|
55
|
+
if (typeof method !== "function") {
|
|
56
|
+
throw new TypeError(`Invalid ${moduleName} module: "${exportName}" instance must implement method "${methodName}"`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function assertRegistrationObject(value, registrationName) {
|
|
61
|
+
if (value === null ||
|
|
62
|
+
typeof value !== "object" ||
|
|
63
|
+
Array.isArray(value)) {
|
|
64
|
+
throw new TypeError(`Invalid ${registrationName} registration: expected an object`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function readRegistrationProperty(value, registrationName, propertyName) {
|
|
68
|
+
assertRegistrationObject(value, registrationName);
|
|
69
|
+
try {
|
|
70
|
+
return value[propertyName];
|
|
71
|
+
}
|
|
72
|
+
catch (cause) {
|
|
73
|
+
throw new TypeError(`Invalid ${registrationName} registration: could not read "${propertyName}"`, { cause });
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/** Capture a registry entry's identity exactly once. */
|
|
77
|
+
export function captureRegistrationId(value, registrationName) {
|
|
78
|
+
const id = readRegistrationProperty(value, registrationName, "id");
|
|
79
|
+
assertCanonicalNonEmptyString(id, `Invalid ${registrationName} registration: "id"`);
|
|
80
|
+
return id;
|
|
81
|
+
}
|
|
82
|
+
/** Require a callable method on a registry entry. */
|
|
83
|
+
export function assertRegistrationMethod(value, registrationName, methodName) {
|
|
84
|
+
const method = readRegistrationProperty(value, registrationName, methodName);
|
|
85
|
+
if (typeof method !== "function") {
|
|
86
|
+
throw new TypeError(`Invalid ${registrationName} registration: must implement method "${methodName}"`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/** Validate an optional method when a registry entry supplies it. */
|
|
90
|
+
export function assertOptionalRegistrationMethod(value, registrationName, methodName) {
|
|
91
|
+
const method = readRegistrationProperty(value, registrationName, methodName);
|
|
92
|
+
if (method !== undefined && typeof method !== "function") {
|
|
93
|
+
throw new TypeError(`Invalid ${registrationName} registration: optional method "${methodName}" must be a function when provided`);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry-error.d.ts","sourceRoot":"","sources":["../../../src/src/observability/telemetry-error.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"telemetry-error.d.ts","sourceRoot":"","sources":["../../../src/src/observability/telemetry-error.ts"],"names":[],"mappings":"AA8JA,MAAM,MAAM,uBAAuB,GAC/B,MAAM,GACN,MAAM,GACN,OAAO,GACP,SAAS,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,EAAE,GACtC,SAAS,CAAC;AAUd,6EAA6E;AAC7E,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAK9E;AAED,qDAAqD;AACrD,wBAAgB,+BAA+B,CAC7C,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,uBAAuB,GAC7B,uBAAuB,CAyBzB;AAED,wEAAwE;AACxE,wBAAgB,2BAA2B,CACzC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,GAAG,SAAS,EAC7D,UAAU,EAAE,CAAC,GAAG,CAAC,CAyClB;AA4JD;;;GAGG;AACH,wBAAgB,+BAA+B,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAc9D;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,CAwB/D"}
|
|
@@ -57,9 +57,21 @@ function readNativeErrorMessage(error) {
|
|
|
57
57
|
return "";
|
|
58
58
|
}
|
|
59
59
|
function readNativeErrorStack(error) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
if (readOwnErrorString(error, "message") === INVALID_ERROR_FIELD ||
|
|
61
|
+
readOwnErrorString(error, "name") === INVALID_ERROR_FIELD) {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
try {
|
|
65
|
+
const descriptor = getOwnPropertyDescriptor(error, "stack");
|
|
66
|
+
if (descriptor && hasOwn(descriptor, "value")) {
|
|
67
|
+
return typeof descriptor.value === "string" ? descriptor.value : undefined;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
catch (_) {
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
// Accessor-valued runtime stacks are delegated to the compat reader, which
|
|
74
|
+
// shadows the formatter and fails closed on foreign accessors.
|
|
63
75
|
return readNativeErrorStackWithoutHooks(error);
|
|
64
76
|
}
|
|
65
77
|
function primitiveErrorMessage(error) {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cross-runtime async context primitive.
|
|
3
|
+
*
|
|
4
|
+
* Node.js, Deno, and Bun expose the Node-compatible implementation. Browser
|
|
5
|
+
* bundles rewrite this builtin to Veryfront's no-op async-hooks polyfill.
|
|
6
|
+
*/
|
|
7
|
+
export { AsyncLocalStorage } from "node:async_hooks";
|
|
8
|
+
//# sourceMappingURL=async-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async-context.d.ts","sourceRoot":"","sources":["../../../../src/src/platform/compat/async-context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
|
-
import { parse } from "
|
|
6
|
+
import { parse } from "./yaml.js";
|
|
7
7
|
const FRONTMATTER_RE = /^---\r?\n([\s\S]*?)(?:\r?\n)?---(?:\r?\n|$)([\s\S]*)$/;
|
|
8
8
|
function extractUnknown(text) {
|
|
9
9
|
const match = text.match(FRONTMATTER_RE);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Portable `@std/yaml/parse` shim.
|
|
3
|
+
*
|
|
4
|
+
* `jsr:@std/yaml` only resolves under Deno, so importing it from core made
|
|
5
|
+
* every Node and Bun test that transitively touched YAML unresolvable. A
|
|
6
|
+
* third-party parser cannot move into core either. Core may depend on the
|
|
7
|
+
* Deno standard library and nothing else. So core keeps the call sites and the
|
|
8
|
+
* `YamlParserProvider` contract, and the first-party `ext-yaml` extension
|
|
9
|
+
* keeps the parser.
|
|
10
|
+
*
|
|
11
|
+
* @module platform/compat/std/yaml
|
|
12
|
+
*/
|
|
13
|
+
import { type YamlParseOptions } from "../../../extensions/parser/yaml-parser.js";
|
|
14
|
+
/** Decode one YAML document. */
|
|
15
|
+
export declare function parse(source: string, options?: YamlParseOptions): unknown;
|
|
16
|
+
export type { YamlParseOptions };
|
|
17
|
+
//# sourceMappingURL=yaml.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yaml.d.ts","sourceRoot":"","sources":["../../../../../src/src/platform/compat/std/yaml.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EACL,KAAK,gBAAgB,EAGtB,MAAM,2CAA2C,CAAC;AAsBnD,gCAAgC;AAChC,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAEzE;AAED,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Portable `@std/yaml/parse` shim.
|
|
3
|
+
*
|
|
4
|
+
* `jsr:@std/yaml` only resolves under Deno, so importing it from core made
|
|
5
|
+
* every Node and Bun test that transitively touched YAML unresolvable. A
|
|
6
|
+
* third-party parser cannot move into core either. Core may depend on the
|
|
7
|
+
* Deno standard library and nothing else. So core keeps the call sites and the
|
|
8
|
+
* `YamlParserProvider` contract, and the first-party `ext-yaml` extension
|
|
9
|
+
* keeps the parser.
|
|
10
|
+
*
|
|
11
|
+
* @module platform/compat/std/yaml
|
|
12
|
+
*/
|
|
13
|
+
import { resolve, tryResolve } from "../../../extensions/contracts.js";
|
|
14
|
+
import { loadDefaultYamlParserProvider } from "../../../extensions/parser/yaml-defaults.js";
|
|
15
|
+
import { YamlParserProviderName, } from "../../../extensions/parser/yaml-parser.js";
|
|
16
|
+
/**
|
|
17
|
+
* Every framework call site for this module is synchronous. Front matter
|
|
18
|
+
* extraction runs inside synchronous render and build paths, so the
|
|
19
|
+
* extension-owned parser must be available before `parse` is first callable.
|
|
20
|
+
* Top-level await is the same mechanism `src/agent/runtime/skill-metadata.ts`
|
|
21
|
+
* uses to load this extension's Skill parser for its own synchronous callers.
|
|
22
|
+
*/
|
|
23
|
+
const defaultProvider = await loadDefaultYamlParserProvider();
|
|
24
|
+
function requireProvider() {
|
|
25
|
+
// Extension orchestration owns the binding when an app configured one; the
|
|
26
|
+
// product distribution's default only fills the gap.
|
|
27
|
+
const registered = tryResolve(YamlParserProviderName);
|
|
28
|
+
if (registered !== undefined)
|
|
29
|
+
return registered;
|
|
30
|
+
if (defaultProvider !== undefined)
|
|
31
|
+
return defaultProvider;
|
|
32
|
+
// Raises the registry's missing-extension error, whose detail names the
|
|
33
|
+
// package to install. Never a bare throw.
|
|
34
|
+
return resolve(YamlParserProviderName);
|
|
35
|
+
}
|
|
36
|
+
/** Decode one YAML document. */
|
|
37
|
+
export function parse(source, options) {
|
|
38
|
+
return requireProvider().parseYaml(source, options);
|
|
39
|
+
}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
export { MS_PER_MINUTE, MS_PER_SECOND, SECONDS_PER_MINUTE } from "./cache.js";
|
|
2
2
|
export declare const KB_IN_BYTES = 1024;
|
|
3
|
-
/**
|
|
4
|
-
export declare const HTTP_MODULE_FETCH_TIMEOUT_MS =
|
|
3
|
+
/** HTTP module fetch timeout, including cold upstream module generation. */
|
|
4
|
+
export declare const HTTP_MODULE_FETCH_TIMEOUT_MS = 10000;
|
|
5
|
+
/** Maximum attempts for one HTTP module fetch. */
|
|
6
|
+
export declare const HTTP_MODULE_FETCH_MAX_ATTEMPTS = 3;
|
|
7
|
+
/** Linear backoff base between HTTP module fetch attempts. */
|
|
8
|
+
export declare const HTTP_MODULE_FETCH_RETRY_DELAY_MS = 100;
|
|
9
|
+
/** Maximum time consumed by all HTTP module fetch attempts and backoffs. */
|
|
10
|
+
export declare const HTTP_MODULE_FETCH_RETRY_BUDGET_MS: number;
|
|
5
11
|
export declare const HTTP_FETCH_TIMEOUT_MS = 30000; /** Default timeout for HTTP module/bundle fetch operations (30 seconds) */
|
|
6
12
|
export declare const HMR_RECONNECT_DELAY_MS = 1000;
|
|
7
13
|
export declare const HMR_RELOAD_DELAY_MS = 1000;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../../src/src/utils/constants/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAE9E,eAAO,MAAM,WAAW,OAAO,CAAC;AAEhC,
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../../src/src/utils/constants/http.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
export { MS_PER_MINUTE, MS_PER_SECOND, SECONDS_PER_MINUTE } from "./cache.js";
|
|
2
2
|
export const KB_IN_BYTES = 1024;
|
|
3
|
-
/**
|
|
4
|
-
export const HTTP_MODULE_FETCH_TIMEOUT_MS =
|
|
3
|
+
/** HTTP module fetch timeout, including cold upstream module generation. */
|
|
4
|
+
export const HTTP_MODULE_FETCH_TIMEOUT_MS = 10_000;
|
|
5
|
+
/** Maximum attempts for one HTTP module fetch. */
|
|
6
|
+
export const HTTP_MODULE_FETCH_MAX_ATTEMPTS = 3;
|
|
7
|
+
/** Linear backoff base between HTTP module fetch attempts. */
|
|
8
|
+
export const HTTP_MODULE_FETCH_RETRY_DELAY_MS = 100;
|
|
9
|
+
/** Maximum time consumed by all HTTP module fetch attempts and backoffs. */
|
|
10
|
+
export const HTTP_MODULE_FETCH_RETRY_BUDGET_MS = HTTP_MODULE_FETCH_TIMEOUT_MS * HTTP_MODULE_FETCH_MAX_ATTEMPTS +
|
|
11
|
+
HTTP_MODULE_FETCH_RETRY_DELAY_MS *
|
|
12
|
+
((HTTP_MODULE_FETCH_MAX_ATTEMPTS - 1) * HTTP_MODULE_FETCH_MAX_ATTEMPTS / 2);
|
|
5
13
|
export const HTTP_FETCH_TIMEOUT_MS = 30000; /** Default timeout for HTTP module/bundle fetch operations (30 seconds) */
|
|
6
14
|
export const HMR_RECONNECT_DELAY_MS = 1000;
|
|
7
15
|
export const HMR_RELOAD_DELAY_MS = 1000;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veryfront/ext-content-mdx",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1228",
|
|
4
4
|
"description": "Veryfront first-party extension package for ext-content-mdx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"veryfront",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"vfile": "6.0.3"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"veryfront": "^0.1.
|
|
70
|
+
"veryfront": "^0.1.1228"
|
|
71
71
|
},
|
|
72
72
|
"type": "module",
|
|
73
73
|
"types": "./esm/extensions/ext-content-mdx/src/index.d.ts",
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export declare const BOM = 65279;
|
|
2
|
-
export declare const TAB = 9;
|
|
3
|
-
export declare const LINE_FEED = 10;
|
|
4
|
-
export declare const CARRIAGE_RETURN = 13;
|
|
5
|
-
export declare const SPACE = 32;
|
|
6
|
-
export declare const EXCLAMATION = 33;
|
|
7
|
-
export declare const DOUBLE_QUOTE = 34;
|
|
8
|
-
export declare const SHARP = 35;
|
|
9
|
-
export declare const PERCENT = 37;
|
|
10
|
-
export declare const AMPERSAND = 38;
|
|
11
|
-
export declare const SINGLE_QUOTE = 39;
|
|
12
|
-
export declare const ASTERISK = 42;
|
|
13
|
-
export declare const PLUS = 43;
|
|
14
|
-
export declare const COMMA = 44;
|
|
15
|
-
export declare const MINUS = 45;
|
|
16
|
-
export declare const DOT = 46;
|
|
17
|
-
export declare const COLON = 58;
|
|
18
|
-
export declare const SMALLER_THAN = 60;
|
|
19
|
-
export declare const GREATER_THAN = 62;
|
|
20
|
-
export declare const QUESTION = 63;
|
|
21
|
-
export declare const COMMERCIAL_AT = 64;
|
|
22
|
-
export declare const LEFT_SQUARE_BRACKET = 91;
|
|
23
|
-
export declare const BACKSLASH = 92;
|
|
24
|
-
export declare const RIGHT_SQUARE_BRACKET = 93;
|
|
25
|
-
export declare const GRAVE_ACCENT = 96;
|
|
26
|
-
export declare const LEFT_CURLY_BRACKET = 123;
|
|
27
|
-
export declare const VERTICAL_LINE = 124;
|
|
28
|
-
export declare const RIGHT_CURLY_BRACKET = 125;
|
|
29
|
-
export declare function isEOL(c: number): boolean;
|
|
30
|
-
export declare function isWhiteSpace(c: number): boolean;
|
|
31
|
-
export declare function isWhiteSpaceOrEOL(c: number): boolean;
|
|
32
|
-
export declare function isFlowIndicator(c: number): boolean;
|
|
33
|
-
//# sourceMappingURL=_chars.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_chars.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/yaml/1.1.0/_chars.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,GAAG,QAAS,CAAC;AAC1B,eAAO,MAAM,GAAG,IAAO,CAAC;AACxB,eAAO,MAAM,SAAS,KAAO,CAAC;AAC9B,eAAO,MAAM,eAAe,KAAO,CAAC;AACpC,eAAO,MAAM,KAAK,KAAO,CAAC;AAC1B,eAAO,MAAM,WAAW,KAAO,CAAC;AAChC,eAAO,MAAM,YAAY,KAAO,CAAC;AACjC,eAAO,MAAM,KAAK,KAAO,CAAC;AAC1B,eAAO,MAAM,OAAO,KAAO,CAAC;AAC5B,eAAO,MAAM,SAAS,KAAO,CAAC;AAC9B,eAAO,MAAM,YAAY,KAAO,CAAC;AACjC,eAAO,MAAM,QAAQ,KAAO,CAAC;AAC7B,eAAO,MAAM,IAAI,KAAO,CAAC;AACzB,eAAO,MAAM,KAAK,KAAO,CAAC;AAC1B,eAAO,MAAM,KAAK,KAAO,CAAC;AAC1B,eAAO,MAAM,GAAG,KAAO,CAAC;AACxB,eAAO,MAAM,KAAK,KAAO,CAAC;AAC1B,eAAO,MAAM,YAAY,KAAO,CAAC;AACjC,eAAO,MAAM,YAAY,KAAO,CAAC;AACjC,eAAO,MAAM,QAAQ,KAAO,CAAC;AAC7B,eAAO,MAAM,aAAa,KAAO,CAAC;AAClC,eAAO,MAAM,mBAAmB,KAAO,CAAC;AACxC,eAAO,MAAM,SAAS,KAAO,CAAC;AAC9B,eAAO,MAAM,oBAAoB,KAAO,CAAC;AACzC,eAAO,MAAM,YAAY,KAAO,CAAC;AACjC,eAAO,MAAM,kBAAkB,MAAO,CAAC;AACvC,eAAO,MAAM,aAAa,MAAO,CAAC;AAClC,eAAO,MAAM,mBAAmB,MAAO,CAAC;AAExC,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAExC;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAQlD"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// Ported from js-yaml v3.13.1:
|
|
2
|
-
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
3
|
-
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
4
|
-
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
5
|
-
export const BOM = 0xfeff; /* BOM */
|
|
6
|
-
export const TAB = 0x09; /* Tab */
|
|
7
|
-
export const LINE_FEED = 0x0a; /* LF */
|
|
8
|
-
export const CARRIAGE_RETURN = 0x0d; /* CR */
|
|
9
|
-
export const SPACE = 0x20; /* Space */
|
|
10
|
-
export const EXCLAMATION = 0x21; /* ! */
|
|
11
|
-
export const DOUBLE_QUOTE = 0x22; /* " */
|
|
12
|
-
export const SHARP = 0x23; /* # */
|
|
13
|
-
export const PERCENT = 0x25; /* % */
|
|
14
|
-
export const AMPERSAND = 0x26; /* & */
|
|
15
|
-
export const SINGLE_QUOTE = 0x27; /* ' */
|
|
16
|
-
export const ASTERISK = 0x2a; /* * */
|
|
17
|
-
export const PLUS = 0x2b; /* + */
|
|
18
|
-
export const COMMA = 0x2c; /* , */
|
|
19
|
-
export const MINUS = 0x2d; /* - */
|
|
20
|
-
export const DOT = 0x2e; /* . */
|
|
21
|
-
export const COLON = 0x3a; /* : */
|
|
22
|
-
export const SMALLER_THAN = 0x3c; /* < */
|
|
23
|
-
export const GREATER_THAN = 0x3e; /* > */
|
|
24
|
-
export const QUESTION = 0x3f; /* ? */
|
|
25
|
-
export const COMMERCIAL_AT = 0x40; /* @ */
|
|
26
|
-
export const LEFT_SQUARE_BRACKET = 0x5b; /* [ */
|
|
27
|
-
export const BACKSLASH = 0x5c; /* \ */
|
|
28
|
-
export const RIGHT_SQUARE_BRACKET = 0x5d; /* ] */
|
|
29
|
-
export const GRAVE_ACCENT = 0x60; /* ` */
|
|
30
|
-
export const LEFT_CURLY_BRACKET = 0x7b; /* { */
|
|
31
|
-
export const VERTICAL_LINE = 0x7c; /* | */
|
|
32
|
-
export const RIGHT_CURLY_BRACKET = 0x7d; /* } */
|
|
33
|
-
export function isEOL(c) {
|
|
34
|
-
return c === LINE_FEED || c === CARRIAGE_RETURN;
|
|
35
|
-
}
|
|
36
|
-
export function isWhiteSpace(c) {
|
|
37
|
-
return c === TAB || c === SPACE;
|
|
38
|
-
}
|
|
39
|
-
export function isWhiteSpaceOrEOL(c) {
|
|
40
|
-
return isWhiteSpace(c) || isEOL(c);
|
|
41
|
-
}
|
|
42
|
-
export function isFlowIndicator(c) {
|
|
43
|
-
return (c === COMMA ||
|
|
44
|
-
c === LEFT_SQUARE_BRACKET ||
|
|
45
|
-
c === RIGHT_SQUARE_BRACKET ||
|
|
46
|
-
c === LEFT_CURLY_BRACKET ||
|
|
47
|
-
c === RIGHT_CURLY_BRACKET);
|
|
48
|
-
}
|