@veryfront/ext-content-mdx 0.1.1225 → 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.
Files changed (106) hide show
  1. package/esm/_dnt.polyfills.d.ts +105 -6
  2. package/esm/_dnt.polyfills.d.ts.map +1 -1
  3. package/esm/_dnt.polyfills.js +127 -1
  4. package/esm/deno.d.ts +6 -0
  5. package/esm/deno.js +12 -6
  6. package/esm/src/extensions/contract-registry-internal.d.ts +144 -0
  7. package/esm/src/extensions/contract-registry-internal.d.ts.map +1 -0
  8. package/esm/src/extensions/contract-registry-internal.js +642 -0
  9. package/esm/src/extensions/contracts.d.ts +16 -0
  10. package/esm/src/extensions/contracts.d.ts.map +1 -0
  11. package/esm/src/extensions/contracts.js +46 -0
  12. package/esm/src/extensions/errors.d.ts +16 -0
  13. package/esm/src/extensions/errors.d.ts.map +1 -0
  14. package/esm/src/extensions/errors.js +46 -0
  15. package/esm/src/extensions/first-party-import.d.ts +43 -0
  16. package/esm/src/extensions/first-party-import.d.ts.map +1 -0
  17. package/esm/src/extensions/first-party-import.js +358 -0
  18. package/esm/src/extensions/parser/yaml-defaults.d.ts +22 -0
  19. package/esm/src/extensions/parser/yaml-defaults.d.ts.map +1 -0
  20. package/esm/src/extensions/parser/yaml-defaults.js +57 -0
  21. package/esm/src/extensions/parser/yaml-parser.d.ts +59 -0
  22. package/esm/src/extensions/parser/yaml-parser.d.ts.map +1 -0
  23. package/esm/src/extensions/parser/yaml-parser.js +62 -0
  24. package/esm/src/extensions/recommendations.d.ts +8 -0
  25. package/esm/src/extensions/recommendations.d.ts.map +1 -0
  26. package/esm/src/extensions/recommendations.js +38 -0
  27. package/esm/src/extensions/runtime-validation.d.ts +21 -0
  28. package/esm/src/extensions/runtime-validation.d.ts.map +1 -0
  29. package/esm/src/extensions/runtime-validation.js +95 -0
  30. package/esm/src/platform/adapters/runtime/shared/node-filesystem-adapter.d.ts.map +1 -1
  31. package/esm/src/platform/adapters/runtime/shared/node-filesystem-adapter.js +15 -1
  32. package/esm/src/platform/compat/async-context.d.ts +8 -0
  33. package/esm/src/platform/compat/async-context.d.ts.map +1 -0
  34. package/esm/src/platform/compat/async-context.js +7 -0
  35. package/esm/src/platform/compat/fs.d.ts.map +1 -1
  36. package/esm/src/platform/compat/fs.js +14 -1
  37. package/esm/src/platform/compat/std/front-matter-yaml.js +1 -1
  38. package/esm/src/platform/compat/std/yaml.d.ts +17 -0
  39. package/esm/src/platform/compat/std/yaml.d.ts.map +1 -0
  40. package/esm/src/platform/compat/std/yaml.js +39 -0
  41. package/esm/src/utils/version-constant.d.ts +1 -1
  42. package/esm/src/utils/version-constant.js +1 -1
  43. package/package.json +2 -2
  44. package/esm/deps/jsr.io/@std/yaml/1.1.0/_chars.d.ts +0 -33
  45. package/esm/deps/jsr.io/@std/yaml/1.1.0/_chars.d.ts.map +0 -1
  46. package/esm/deps/jsr.io/@std/yaml/1.1.0/_chars.js +0 -48
  47. package/esm/deps/jsr.io/@std/yaml/1.1.0/_loader_state.d.ts +0 -64
  48. package/esm/deps/jsr.io/@std/yaml/1.1.0/_loader_state.d.ts.map +0 -1
  49. package/esm/deps/jsr.io/@std/yaml/1.1.0/_loader_state.js +0 -1371
  50. package/esm/deps/jsr.io/@std/yaml/1.1.0/_schema.d.ts +0 -44
  51. package/esm/deps/jsr.io/@std/yaml/1.1.0/_schema.d.ts.map +0 -1
  52. package/esm/deps/jsr.io/@std/yaml/1.1.0/_schema.js +0 -117
  53. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/binary.d.ts +0 -3
  54. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/binary.d.ts.map +0 -1
  55. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/binary.js +0 -103
  56. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/bool.d.ts +0 -3
  57. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/bool.d.ts.map +0 -1
  58. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/bool.js +0 -32
  59. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/float.d.ts +0 -3
  60. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/float.d.ts.map +0 -1
  61. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/float.js +0 -96
  62. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/int.d.ts +0 -3
  63. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/int.d.ts.map +0 -1
  64. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/int.js +0 -159
  65. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/map.d.ts +0 -3
  66. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/map.d.ts.map +0 -1
  67. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/map.js +0 -14
  68. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/merge.d.ts +0 -3
  69. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/merge.d.ts.map +0 -1
  70. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/merge.js +0 -10
  71. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/nil.d.ts +0 -3
  72. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/nil.d.ts.map +0 -1
  73. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/nil.js +0 -22
  74. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/omap.d.ts +0 -3
  75. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/omap.d.ts.map +0 -1
  76. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/omap.js +0 -29
  77. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/pairs.d.ts +0 -3
  78. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/pairs.d.ts.map +0 -1
  79. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/pairs.js +0 -19
  80. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/regexp.d.ts +0 -3
  81. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/regexp.d.ts.map +0 -1
  82. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/regexp.js +0 -30
  83. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/seq.d.ts +0 -3
  84. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/seq.d.ts.map +0 -1
  85. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/seq.js +0 -10
  86. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/set.d.ts +0 -3
  87. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/set.d.ts.map +0 -1
  88. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/set.js +0 -14
  89. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/str.d.ts +0 -3
  90. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/str.d.ts.map +0 -1
  91. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/str.js +0 -9
  92. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/timestamp.d.ts +0 -3
  93. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/timestamp.d.ts.map +0 -1
  94. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/timestamp.js +0 -81
  95. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/undefined.d.ts +0 -3
  96. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/undefined.d.ts.map +0 -1
  97. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/undefined.js +0 -20
  98. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type.d.ts +0 -32
  99. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type.d.ts.map +0 -1
  100. package/esm/deps/jsr.io/@std/yaml/1.1.0/_type.js +0 -6
  101. package/esm/deps/jsr.io/@std/yaml/1.1.0/_utils.d.ts +0 -4
  102. package/esm/deps/jsr.io/@std/yaml/1.1.0/_utils.d.ts.map +0 -1
  103. package/esm/deps/jsr.io/@std/yaml/1.1.0/_utils.js +0 -13
  104. package/esm/deps/jsr.io/@std/yaml/1.1.0/parse.d.ts +0 -76
  105. package/esm/deps/jsr.io/@std/yaml/1.1.0/parse.d.ts.map +0 -1
  106. package/esm/deps/jsr.io/@std/yaml/1.1.0/parse.js +0 -91
@@ -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":"node-filesystem-adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/src/platform/adapters/runtime/shared/node-filesystem-adapter.ts"],"names":[],"mappings":"AACA,OA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,CAAC;IAIhB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,WAAW;CAmIrE;AAED,MAAM,WAAW,+BAA+B;IAC9C,2BAA2B,CAAC,CAC1B,IAAI,EAAE,MAAM,EACZ,eAAe,EAAE,MAAM,EACvB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,UAAU,CAAC,CAAC;IACvB,wBAAwB,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7E"}
1
+ {"version":3,"file":"node-filesystem-adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/src/platform/adapters/runtime/shared/node-filesystem-adapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,QAAQ,EAER,QAAQ,EACR,iBAAiB,EACjB,WAAW,EACX,YAAY,EACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAA4C,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAcnG,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,+BAA+B,CAAC;AAGvC,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAChE,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CACjE;AAUD,UAAU,oBAAoB;IAC5B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,MAAM,IAAI,OA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AG,OAAO,CAAC,MAAM,CAAC;IAKvC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAKrE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBtE,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIlD,SAAS,CAAC,YAAY,CACpB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC,GAChD,OAAO,CAAC,IAAI,CAAC;IAIhB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,WAAW;CAmIrE;AAED,MAAM,WAAW,+BAA+B;IAC9C,2BAA2B,CAAC,CAC1B,IAAI,EAAE,MAAM,EACZ,eAAe,EAAE,MAAM,EACvB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,UAAU,CAAC,CAAC;IACvB,wBAAwB,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7E"}
@@ -390,7 +390,21 @@ export class NodeCompatibleFileSystemAdapter {
390
390
  }
391
391
  async remove(path, options) {
392
392
  const fs = await import("node:fs/promises");
393
- await fs.rm(path, { recursive: options?.recursive, force: true });
393
+ const recursive = options?.recursive ?? false;
394
+ try {
395
+ await fs.rm(path, { recursive, force: true });
396
+ }
397
+ catch (error) {
398
+ // Same divergence as `platform/compat/fs.ts`: Deno removes an empty
399
+ // directory without `recursive`, `node:fs` `rm` refuses one, and `force`
400
+ // does not cover it -- it suppresses a missing path, not a directory.
401
+ if (recursive)
402
+ throw error;
403
+ const info = await fs.lstat(path).catch(() => undefined);
404
+ if (!info?.isDirectory())
405
+ throw error;
406
+ await fs.rmdir(path);
407
+ }
394
408
  }
395
409
  async makeTempDir(prefix) {
396
410
  return makeNodeTempDir(prefix);
@@ -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"}
@@ -0,0 +1,7 @@
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";
@@ -1 +1 @@
1
- {"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../../../src/src/platform/compat/fs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAUpD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,CAAC;AAuB3B,wDAAwD;AACxD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAqCD;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5C,QAAQ,CA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1E;AAED,+DAA+D;AAC/D,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/D;AAED,wBAAsB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQzE;AAED;;;;GAIG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAO5D;AAED,yCAAyC;AACzC,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAY5D"}
@@ -174,7 +174,20 @@ class NodeFileSystem {
174
174
  async remove(path, options) {
175
175
  await this.ensureInitialized();
176
176
  const recursive = options?.recursive ?? false;
177
- await this.getFs().rm(path, { recursive, force: false });
177
+ try {
178
+ await this.getFs().rm(path, { recursive, force: false });
179
+ }
180
+ catch (error) {
181
+ // Deno removes an empty directory without `recursive`; `node:fs` `rm`
182
+ // refuses one, and refuses it with a different code on Node (ERR_FS_EISDIR)
183
+ // than on Bun (EFAULT). Ask the filesystem instead of reading the code.
184
+ if (recursive)
185
+ throw error;
186
+ const info = await this.getFs().lstat(path).catch(() => undefined);
187
+ if (!info?.isDirectory())
188
+ throw error;
189
+ await this.getFs().rmdir(path);
190
+ }
178
191
  }
179
192
  async makeTempDir(options) {
180
193
  await this.ensureInitialized();
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @module
5
5
  */
6
- import { parse } from "../../../../deps/jsr.io/@std/yaml/1.1.0/parse.js";
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 has to be in hand 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,3 +1,3 @@
1
1
  /** Shared version value. */
2
- export declare const VERSION = "0.1.1225";
2
+ export declare const VERSION = "0.1.1227";
3
3
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
3
  /** Shared version value. */
4
- export const VERSION = "0.1.1225";
4
+ export const VERSION = "0.1.1227";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veryfront/ext-content-mdx",
3
- "version": "0.1.1225",
3
+ "version": "0.1.1227",
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.1225"
70
+ "veryfront": "^0.1.1227"
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
- }
@@ -1,64 +0,0 @@
1
- import { type Schema, type TypeMap } from "./_schema.js";
2
- import type { KindType, Type } from "./_type.js";
3
- export interface LoaderStateOptions {
4
- /** specifies a schema to use. */
5
- schema?: Schema;
6
- /** compatibility with JSON.parse behaviour. */
7
- allowDuplicateKeys?: boolean;
8
- /** function to call on warning messages. */
9
- onWarning?(error: Error): void;
10
- }
11
- interface State {
12
- tag: string | null;
13
- anchor: string | null;
14
- kind: KindType | null;
15
- result: unknown[] | Record<string, unknown> | string | null;
16
- }
17
- export declare class LoaderState {
18
- #private;
19
- lineIndent: number;
20
- lineStart: number;
21
- line: number;
22
- onWarning: ((error: Error) => void) | undefined;
23
- allowDuplicateKeys: boolean;
24
- implicitTypes: Type<"scalar">[];
25
- typeMap: TypeMap;
26
- checkLineBreaks: boolean;
27
- tagMap: Map<any, any>;
28
- anchorMap: Map<any, any>;
29
- constructor(input: string, { schema, onWarning, allowDuplicateKeys, }: LoaderStateOptions);
30
- skipWhitespaces(): void;
31
- skipComment(): void;
32
- readIndent(): void;
33
- dispatchWarning(message: string): void;
34
- yamlDirectiveHandler(args: string[]): string | null;
35
- tagDirectiveHandler(args: string[]): void;
36
- captureSegment(start: number, end: number, checkJson: boolean): string | undefined;
37
- readBlockSequence(tag: string | null, anchor: string | null, nodeIndent: number): State | void;
38
- mergeMappings(destination: Record<string, unknown>, source: Record<string, unknown>, overridableKeys: Set<string>): void;
39
- storeMappingPair(result: Record<string, unknown>, overridableKeys: Set<string>, keyTag: string | null, keyNode: Record<PropertyKey, unknown> | unknown[] | string | null, valueNode: unknown, startLine?: number, startPos?: number): Record<string, unknown>;
40
- readLineBreak(): void;
41
- skipSeparationSpace(allowComments: boolean, checkIndent: number): number;
42
- testDocumentSeparator(): boolean;
43
- readPlainScalar(tag: string | null, anchor: string | null, nodeIndent: number, withinFlowCollection: boolean): State | void;
44
- readSingleQuotedScalar(tag: string | null, anchor: string | null, nodeIndent: number): State | void;
45
- readDoubleQuotedScalar(tag: string | null, anchor: string | null, nodeIndent: number): State | void;
46
- readFlowCollection(tag: string | null, anchor: string | null, nodeIndent: number): State | void;
47
- readBlockScalar(tag: string | null, anchor: string | null, nodeIndent: number): State | void;
48
- readBlockMapping(tag: string | null, anchor: string | null, nodeIndent: number, flowIndent: number): State | void;
49
- readTagProperty(tag: string | null): string | void;
50
- readAnchorProperty(anchor: string | null): string | void;
51
- readAlias(): string | void;
52
- resolveTag(state: State): State;
53
- composeNode({ parentIndent, nodeContext, allowToSeek, allowCompact }: {
54
- parentIndent: number;
55
- nodeContext: number;
56
- allowToSeek: boolean;
57
- allowCompact: boolean;
58
- }): State | void;
59
- readDirectives(): boolean;
60
- readDocument(): string | unknown[] | Record<string, unknown> | null;
61
- readDocuments(): Generator<string | unknown[] | Record<string, unknown> | null, void, unknown>;
62
- }
63
- export {};
64
- //# sourceMappingURL=_loader_state.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_loader_state.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/yaml/1.1.0/_loader_state.ts"],"names":[],"mappings":"AAsCA,OAAO,EAAkB,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAqBjD,MAAM,WAAW,kBAAkB;IACjC,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,4CAA4C;IAC5C,SAAS,CAAC,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CAChC;AAyJD,UAAU,KAAK;IACb,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,IAAI,CAAC;CAC7D;AACD,qBAAa,WAAW;;IAEtB,UAAU,SAAK;IACf,SAAS,SAAK;IACd,IAAI,SAAK;IACT,SAAS,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAChD,kBAAkB,EAAE,OAAO,CAAC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