gagen 0.0.4

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 (137) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +553 -0
  3. package/esm/_dnt.polyfills.d.ts +12 -0
  4. package/esm/_dnt.polyfills.d.ts.map +1 -0
  5. package/esm/_dnt.polyfills.js +15 -0
  6. package/esm/_dnt.test_shims.d.ts.map +1 -0
  7. package/esm/artifact.d.ts +20 -0
  8. package/esm/artifact.d.ts.map +1 -0
  9. package/esm/artifact.js +62 -0
  10. package/esm/deps/jsr.io/@std/assert/1.0.18/almost_equals.d.ts.map +1 -0
  11. package/esm/deps/jsr.io/@std/assert/1.0.18/array_includes.d.ts.map +1 -0
  12. package/esm/deps/jsr.io/@std/assert/1.0.18/assert.d.ts.map +1 -0
  13. package/esm/deps/jsr.io/@std/assert/1.0.18/assertion_error.d.ts.map +1 -0
  14. package/esm/deps/jsr.io/@std/assert/1.0.18/equal.d.ts.map +1 -0
  15. package/esm/deps/jsr.io/@std/assert/1.0.18/equals.d.ts.map +1 -0
  16. package/esm/deps/jsr.io/@std/assert/1.0.18/exists.d.ts.map +1 -0
  17. package/esm/deps/jsr.io/@std/assert/1.0.18/fail.d.ts.map +1 -0
  18. package/esm/deps/jsr.io/@std/assert/1.0.18/false.d.ts.map +1 -0
  19. package/esm/deps/jsr.io/@std/assert/1.0.18/greater.d.ts.map +1 -0
  20. package/esm/deps/jsr.io/@std/assert/1.0.18/greater_or_equal.d.ts.map +1 -0
  21. package/esm/deps/jsr.io/@std/assert/1.0.18/instance_of.d.ts.map +1 -0
  22. package/esm/deps/jsr.io/@std/assert/1.0.18/is_error.d.ts.map +1 -0
  23. package/esm/deps/jsr.io/@std/assert/1.0.18/less.d.ts.map +1 -0
  24. package/esm/deps/jsr.io/@std/assert/1.0.18/less_or_equal.d.ts.map +1 -0
  25. package/esm/deps/jsr.io/@std/assert/1.0.18/match.d.ts.map +1 -0
  26. package/esm/deps/jsr.io/@std/assert/1.0.18/mod.d.ts.map +1 -0
  27. package/esm/deps/jsr.io/@std/assert/1.0.18/not_equals.d.ts.map +1 -0
  28. package/esm/deps/jsr.io/@std/assert/1.0.18/not_instance_of.d.ts.map +1 -0
  29. package/esm/deps/jsr.io/@std/assert/1.0.18/not_match.d.ts.map +1 -0
  30. package/esm/deps/jsr.io/@std/assert/1.0.18/not_strict_equals.d.ts.map +1 -0
  31. package/esm/deps/jsr.io/@std/assert/1.0.18/object_match.d.ts.map +1 -0
  32. package/esm/deps/jsr.io/@std/assert/1.0.18/rejects.d.ts.map +1 -0
  33. package/esm/deps/jsr.io/@std/assert/1.0.18/strict_equals.d.ts.map +1 -0
  34. package/esm/deps/jsr.io/@std/assert/1.0.18/string_includes.d.ts.map +1 -0
  35. package/esm/deps/jsr.io/@std/assert/1.0.18/throws.d.ts.map +1 -0
  36. package/esm/deps/jsr.io/@std/assert/1.0.18/unimplemented.d.ts.map +1 -0
  37. package/esm/deps/jsr.io/@std/assert/1.0.18/unreachable.d.ts.map +1 -0
  38. package/esm/deps/jsr.io/@std/internal/1.0.12/build_message.d.ts.map +1 -0
  39. package/esm/deps/jsr.io/@std/internal/1.0.12/diff.d.ts.map +1 -0
  40. package/esm/deps/jsr.io/@std/internal/1.0.12/diff_str.d.ts.map +1 -0
  41. package/esm/deps/jsr.io/@std/internal/1.0.12/format.d.ts.map +1 -0
  42. package/esm/deps/jsr.io/@std/internal/1.0.12/styles.d.ts.map +1 -0
  43. package/esm/deps/jsr.io/@std/internal/1.0.12/types.d.ts.map +1 -0
  44. package/esm/deps/jsr.io/@std/yaml/1.0.11/_chars.d.ts +33 -0
  45. package/esm/deps/jsr.io/@std/yaml/1.0.11/_chars.d.ts.map +1 -0
  46. package/esm/deps/jsr.io/@std/yaml/1.0.11/_chars.js +48 -0
  47. package/esm/deps/jsr.io/@std/yaml/1.0.11/_dumper_state.d.ts +106 -0
  48. package/esm/deps/jsr.io/@std/yaml/1.0.11/_dumper_state.d.ts.map +1 -0
  49. package/esm/deps/jsr.io/@std/yaml/1.0.11/_dumper_state.js +712 -0
  50. package/esm/deps/jsr.io/@std/yaml/1.0.11/_loader_state.d.ts +69 -0
  51. package/esm/deps/jsr.io/@std/yaml/1.0.11/_loader_state.d.ts.map +1 -0
  52. package/esm/deps/jsr.io/@std/yaml/1.0.11/_loader_state.js +1404 -0
  53. package/esm/deps/jsr.io/@std/yaml/1.0.11/_schema.d.ts +44 -0
  54. package/esm/deps/jsr.io/@std/yaml/1.0.11/_schema.d.ts.map +1 -0
  55. package/esm/deps/jsr.io/@std/yaml/1.0.11/_schema.js +117 -0
  56. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/binary.d.ts +3 -0
  57. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/binary.d.ts.map +1 -0
  58. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/binary.js +103 -0
  59. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/bool.d.ts +3 -0
  60. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/bool.d.ts.map +1 -0
  61. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/bool.js +32 -0
  62. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/float.d.ts +3 -0
  63. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/float.d.ts.map +1 -0
  64. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/float.js +96 -0
  65. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/int.d.ts +3 -0
  66. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/int.d.ts.map +1 -0
  67. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/int.js +159 -0
  68. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/map.d.ts +3 -0
  69. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/map.d.ts.map +1 -0
  70. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/map.js +14 -0
  71. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/merge.d.ts +3 -0
  72. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/merge.d.ts.map +1 -0
  73. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/merge.js +10 -0
  74. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/nil.d.ts +3 -0
  75. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/nil.d.ts.map +1 -0
  76. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/nil.js +22 -0
  77. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/omap.d.ts +3 -0
  78. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/omap.d.ts.map +1 -0
  79. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/omap.js +29 -0
  80. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/pairs.d.ts +3 -0
  81. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/pairs.d.ts.map +1 -0
  82. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/pairs.js +19 -0
  83. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/regexp.d.ts +3 -0
  84. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/regexp.d.ts.map +1 -0
  85. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/regexp.js +30 -0
  86. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/seq.d.ts +3 -0
  87. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/seq.d.ts.map +1 -0
  88. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/seq.js +10 -0
  89. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/set.d.ts +3 -0
  90. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/set.d.ts.map +1 -0
  91. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/set.js +14 -0
  92. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/str.d.ts +3 -0
  93. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/str.d.ts.map +1 -0
  94. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/str.js +9 -0
  95. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/timestamp.d.ts +3 -0
  96. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/timestamp.d.ts.map +1 -0
  97. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/timestamp.js +81 -0
  98. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/undefined.d.ts +3 -0
  99. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/undefined.d.ts.map +1 -0
  100. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type/undefined.js +20 -0
  101. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type.d.ts +32 -0
  102. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type.d.ts.map +1 -0
  103. package/esm/deps/jsr.io/@std/yaml/1.0.11/_type.js +6 -0
  104. package/esm/deps/jsr.io/@std/yaml/1.0.11/_utils.d.ts +4 -0
  105. package/esm/deps/jsr.io/@std/yaml/1.0.11/_utils.d.ts.map +1 -0
  106. package/esm/deps/jsr.io/@std/yaml/1.0.11/_utils.js +13 -0
  107. package/esm/deps/jsr.io/@std/yaml/1.0.11/parse.d.ts +76 -0
  108. package/esm/deps/jsr.io/@std/yaml/1.0.11/parse.d.ts.map +1 -0
  109. package/esm/deps/jsr.io/@std/yaml/1.0.11/parse.js +93 -0
  110. package/esm/deps/jsr.io/@std/yaml/1.0.11/stringify.d.ts +100 -0
  111. package/esm/deps/jsr.io/@std/yaml/1.0.11/stringify.d.ts.map +1 -0
  112. package/esm/deps/jsr.io/@std/yaml/1.0.11/stringify.js +33 -0
  113. package/esm/expression.d.ts +157 -0
  114. package/esm/expression.d.ts.map +1 -0
  115. package/esm/expression.js +393 -0
  116. package/esm/expression_test.d.ts.map +1 -0
  117. package/esm/job.d.ts +77 -0
  118. package/esm/job.d.ts.map +1 -0
  119. package/esm/job.js +906 -0
  120. package/esm/matrix.d.ts +15 -0
  121. package/esm/matrix.d.ts.map +1 -0
  122. package/esm/matrix.js +44 -0
  123. package/esm/mod.d.ts +14 -0
  124. package/esm/mod.d.ts.map +1 -0
  125. package/esm/mod.js +7 -0
  126. package/esm/mod_test.d.ts.map +1 -0
  127. package/esm/package.json +3 -0
  128. package/esm/permissions.d.ts +4 -0
  129. package/esm/permissions.d.ts.map +1 -0
  130. package/esm/permissions.js +1 -0
  131. package/esm/step.d.ts +48 -0
  132. package/esm/step.d.ts.map +1 -0
  133. package/esm/step.js +226 -0
  134. package/esm/workflow.d.ts +71 -0
  135. package/esm/workflow.d.ts.map +1 -0
  136. package/esm/workflow.js +136 -0
  137. package/package.json +28 -0
@@ -0,0 +1,3 @@
1
+ import type { Type } from "../_type.js";
2
+ export declare const omap: Type<"sequence", Record<PropertyKey, unknown>[]>;
3
+ //# sourceMappingURL=omap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"omap.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/yaml/1.0.11/_type/omap.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAiBxC,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,CAOjE,CAAC"}
@@ -0,0 +1,29 @@
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
+ import { isPlainObject } from "../_utils.js";
6
+ function resolveYamlOmap(data) {
7
+ const objectKeys = new Set();
8
+ for (const object of data) {
9
+ if (!isPlainObject(object))
10
+ return false;
11
+ const keys = Object.keys(object);
12
+ if (keys.length !== 1)
13
+ return false;
14
+ for (const key of keys) {
15
+ if (objectKeys.has(key))
16
+ return false;
17
+ objectKeys.add(key);
18
+ }
19
+ }
20
+ return true;
21
+ }
22
+ export const omap = {
23
+ tag: "tag:yaml.org,2002:omap",
24
+ kind: "sequence",
25
+ resolve: resolveYamlOmap,
26
+ construct(data) {
27
+ return data;
28
+ },
29
+ };
@@ -0,0 +1,3 @@
1
+ import type { Type } from "../_type.js";
2
+ export declare const pairs: Type<"sequence">;
3
+ //# sourceMappingURL=pairs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pairs.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/yaml/1.0.11/_type/pairs.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAQxC,eAAO,MAAM,KAAK,EAAE,IAAI,CAAC,UAAU,CAQlC,CAAC"}
@@ -0,0 +1,19 @@
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
+ import { isPlainObject } from "../_utils.js";
6
+ function resolveYamlPairs(data) {
7
+ if (data === null)
8
+ return true;
9
+ return data.every((it) => isPlainObject(it) && Object.keys(it).length === 1);
10
+ }
11
+ export const pairs = {
12
+ tag: "tag:yaml.org,2002:pairs",
13
+ construct(data) {
14
+ // Converts an array of objects into an array of key-value pairs.
15
+ return data?.flatMap(Object.entries) ?? [];
16
+ },
17
+ kind: "sequence",
18
+ resolve: resolveYamlPairs,
19
+ };
@@ -0,0 +1,3 @@
1
+ import type { Type } from "../_type.js";
2
+ export declare const regexp: Type<"scalar", RegExp>;
3
+ //# sourceMappingURL=regexp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"regexp.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/yaml/1.0.11/_type/regexp.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAIxC,eAAO,MAAM,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,CAuBzC,CAAC"}
@@ -0,0 +1,30 @@
1
+ // Ported and adapted from js-yaml-js-types v1.0.0:
2
+ // https://github.com/nodeca/js-yaml-js-types/tree/ac537e7bbdd3c2cbbd9882ca3919c520c2dc022b
3
+ // Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
4
+ // Copyright 2018-2026 the Deno authors. MIT license.
5
+ const REGEXP = /^\/(?<regexp>[\s\S]+)\/(?<modifiers>[gismuy]*)$/;
6
+ export const regexp = {
7
+ tag: "tag:yaml.org,2002:js/regexp",
8
+ kind: "scalar",
9
+ resolve(data) {
10
+ if (data === null || !data.length)
11
+ return false;
12
+ if (data.charAt(0) === "/") {
13
+ // Ensure regex is properly terminated
14
+ const groups = data.match(REGEXP)?.groups;
15
+ if (!groups)
16
+ return false;
17
+ // Check no duplicate modifiers
18
+ const modifiers = groups.modifiers ?? "";
19
+ if (new Set(modifiers).size < modifiers.length)
20
+ return false;
21
+ }
22
+ return true;
23
+ },
24
+ construct(data) {
25
+ const { regexp = data, modifiers = "" } = data.match(REGEXP)?.groups ?? {};
26
+ return new RegExp(regexp, modifiers);
27
+ },
28
+ predicate: (object) => object instanceof RegExp,
29
+ represent: (object) => object.toString(),
30
+ };
@@ -0,0 +1,3 @@
1
+ import type { Type } from "../_type.js";
2
+ export declare const seq: Type<"sequence", unknown[]>;
3
+ //# sourceMappingURL=seq.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seq.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/yaml/1.0.11/_type/seq.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAExC,eAAO,MAAM,GAAG,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,CAK3C,CAAC"}
@@ -0,0 +1,10 @@
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 seq = {
6
+ tag: "tag:yaml.org,2002:seq",
7
+ kind: "sequence",
8
+ resolve: () => true,
9
+ construct: (data) => data !== null ? data : [],
10
+ };
@@ -0,0 +1,3 @@
1
+ import type { Type } from "../_type.js";
2
+ export declare const set: Type<"mapping", Record<PropertyKey, unknown>>;
3
+ //# sourceMappingURL=set.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/yaml/1.0.11/_type/set.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAExC,eAAO,MAAM,GAAG,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAS7D,CAAC"}
@@ -0,0 +1,14 @@
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 set = {
6
+ tag: "tag:yaml.org,2002:set",
7
+ kind: "mapping",
8
+ construct: (data) => data !== null ? data : {},
9
+ resolve: (data) => {
10
+ if (data === null)
11
+ return true;
12
+ return Object.values(data).every((it) => it === null);
13
+ },
14
+ };
@@ -0,0 +1,3 @@
1
+ import type { Type } from "../_type.js";
2
+ export declare const str: Type<"scalar", string>;
3
+ //# sourceMappingURL=str.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"str.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/yaml/1.0.11/_type/str.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAExC,eAAO,MAAM,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,CAKtC,CAAC"}
@@ -0,0 +1,9 @@
1
+ // Ported from js-yaml v3.13.1:
2
+ // https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
3
+ // Copyright 2018-2026 the Deno authors. MIT license.
4
+ export const str = {
5
+ tag: "tag:yaml.org,2002:str",
6
+ kind: "scalar",
7
+ resolve: () => true,
8
+ construct: (data) => data !== null ? data : "",
9
+ };
@@ -0,0 +1,3 @@
1
+ import type { Type } from "../_type.js";
2
+ export declare const timestamp: Type<"scalar", Date>;
3
+ //# sourceMappingURL=timestamp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timestamp.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/yaml/1.0.11/_type/timestamp.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAsFxC,eAAO,MAAM,SAAS,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAS1C,CAAC"}
@@ -0,0 +1,81 @@
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
+ const YAML_DATE_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])" + // [1] year
6
+ "-([0-9][0-9])" + // [2] month
7
+ "-([0-9][0-9])$");
8
+ const YAML_TIMESTAMP_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])" + // [1] year
9
+ "-([0-9][0-9]?)" + // [2] month
10
+ "-([0-9][0-9]?)" + // [3] day
11
+ "(?:[Tt]|[ \\t]+)" + // ...
12
+ "([0-9][0-9]?)" + // [4] hour
13
+ ":([0-9][0-9])" + // [5] minute
14
+ ":([0-9][0-9])" + // [6] second
15
+ "(?:\\.([0-9]*))?" + // [7] fraction
16
+ "(?:[ \\t]*(Z|([-+])([0-9][0-9]?)" + // [8] tz [9] tz_sign [10] tz_hour
17
+ "(?::([0-9][0-9]))?))?$");
18
+ function resolveYamlTimestamp(data) {
19
+ if (data === null)
20
+ return false;
21
+ if (YAML_DATE_REGEXP.exec(data) !== null)
22
+ return true;
23
+ if (YAML_TIMESTAMP_REGEXP.exec(data) !== null)
24
+ return true;
25
+ return false;
26
+ }
27
+ function constructYamlTimestamp(data) {
28
+ let match = YAML_DATE_REGEXP.exec(data);
29
+ if (match === null)
30
+ match = YAML_TIMESTAMP_REGEXP.exec(data);
31
+ if (match === null) {
32
+ throw new Error("Cannot construct YAML timestamp: date resolve error");
33
+ }
34
+ // match: [1] year [2] month [3] day
35
+ const year = +match[1];
36
+ const month = +match[2] - 1; // JS month starts with 0
37
+ const day = +match[3];
38
+ if (!match[4]) {
39
+ // no hour
40
+ return new Date(Date.UTC(year, month, day));
41
+ }
42
+ // match: [4] hour [5] minute [6] second [7] fraction
43
+ const hour = +match[4];
44
+ const minute = +match[5];
45
+ const second = +match[6];
46
+ let fraction = 0;
47
+ if (match[7]) {
48
+ let partFraction = match[7].slice(0, 3);
49
+ while (partFraction.length < 3) {
50
+ // milli-seconds
51
+ partFraction += "0";
52
+ }
53
+ fraction = +partFraction;
54
+ }
55
+ // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute
56
+ let delta = null;
57
+ if (match[9] && match[10]) {
58
+ const tzHour = +match[10];
59
+ const tzMinute = +(match[11] || 0);
60
+ delta = (tzHour * 60 + tzMinute) * 60000; // delta in milli-seconds
61
+ if (match[9] === "-")
62
+ delta = -delta;
63
+ }
64
+ const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
65
+ if (delta)
66
+ date.setTime(date.getTime() - delta);
67
+ return date;
68
+ }
69
+ function representYamlTimestamp(date) {
70
+ return date.toISOString();
71
+ }
72
+ export const timestamp = {
73
+ tag: "tag:yaml.org,2002:timestamp",
74
+ construct: constructYamlTimestamp,
75
+ predicate(object) {
76
+ return object instanceof Date;
77
+ },
78
+ kind: "scalar",
79
+ represent: representYamlTimestamp,
80
+ resolve: resolveYamlTimestamp,
81
+ };
@@ -0,0 +1,3 @@
1
+ import type { Type } from "../_type.js";
2
+ export declare const undefinedType: Type<"scalar", undefined>;
3
+ //# sourceMappingURL=undefined.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"undefined.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/yaml/1.0.11/_type/undefined.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAExC,eAAO,MAAM,aAAa,EAAE,IAAI,CAAC,QAAQ,EAAE,SAAS,CAenD,CAAC"}
@@ -0,0 +1,20 @@
1
+ // Ported and adapted from js-yaml-js-types v1.0.0:
2
+ // https://github.com/nodeca/js-yaml-js-types/tree/ac537e7bbdd3c2cbbd9882ca3919c520c2dc022b
3
+ // Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
4
+ // Copyright 2018-2026 the Deno authors. MIT license.
5
+ export const undefinedType = {
6
+ tag: "tag:yaml.org,2002:js/undefined",
7
+ kind: "scalar",
8
+ resolve() {
9
+ return true;
10
+ },
11
+ construct() {
12
+ return undefined;
13
+ },
14
+ predicate(object) {
15
+ return typeof object === "undefined";
16
+ },
17
+ represent() {
18
+ return "";
19
+ },
20
+ };
@@ -0,0 +1,32 @@
1
+ /**
2
+ * The kind of YAML node.
3
+ */
4
+ export type KindType = "sequence" | "scalar" | "mapping";
5
+ /**
6
+ * The style variation for `styles` option of {@linkcode stringify}
7
+ */
8
+ export type StyleVariant = "lowercase" | "uppercase" | "camelcase" | "decimal" | "binary" | "octal" | "hexadecimal";
9
+ /**
10
+ * Function to convert data to a string for YAML serialization.
11
+ */
12
+ export type RepresentFn<D> = (data: D, style?: StyleVariant) => string;
13
+ /**
14
+ * A type definition for a YAML node.
15
+ */
16
+ export interface Type<K extends KindType, D = any> {
17
+ /** Tag to identify the type */
18
+ tag: string;
19
+ /** Kind of type */
20
+ kind: K;
21
+ /** Cast the type. Used to stringify */
22
+ predicate?: (data: unknown) => data is D;
23
+ /** Function to represent data. Used to stringify */
24
+ represent?: RepresentFn<D> | Record<string, RepresentFn<D>>;
25
+ /** Default style for the type. Used to stringify */
26
+ defaultStyle?: StyleVariant;
27
+ /** Function to test whether data can be resolved by this type. Used to parse */
28
+ resolve: (data: any) => boolean;
29
+ /** Function to construct data from string. Used to parse */
30
+ construct: (data: any) => D;
31
+ }
32
+ //# sourceMappingURL=_type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_type.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/yaml/1.0.11/_type.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;AACzD;;GAEG;AACH,MAAM,MAAM,YAAY,GACpB,WAAW,GACX,WAAW,GACX,WAAW,GACX,SAAS,GACT,QAAQ,GACR,OAAO,GACP,aAAa,CAAC;AAElB;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,YAAY,KAAK,MAAM,CAAC;AAEvE;;GAEG;AAEH,MAAM,WAAW,IAAI,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,GAAG,GAAG;IAC/C,+BAA+B;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,mBAAmB;IACnB,IAAI,EAAE,CAAC,CAAC;IACR,uCAAuC;IACvC,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,IAAI,CAAC,CAAC;IACzC,oDAAoD;IACpD,SAAS,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5D,oDAAoD;IACpD,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,gFAAgF;IAEhF,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC;IAChC,4DAA4D;IAE5D,SAAS,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,CAAC;CAC7B"}
@@ -0,0 +1,6 @@
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
+ // This module is browser compatible.
6
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare function isObject(value: unknown): value is Record<string, unknown>;
2
+ export declare function isNegativeZero(i: number): boolean;
3
+ export declare function isPlainObject(object: unknown): object is object;
4
+ //# sourceMappingURL=_utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_utils.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/yaml/1.0.11/_utils.ts"],"names":[],"mappings":"AAKA,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzE;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,MAAM,CAE/D"}
@@ -0,0 +1,13 @@
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 function isObject(value) {
6
+ return value !== null && typeof value === "object";
7
+ }
8
+ export function isNegativeZero(i) {
9
+ return i === 0 && Number.NEGATIVE_INFINITY === 1 / i;
10
+ }
11
+ export function isPlainObject(object) {
12
+ return Object.prototype.toString.call(object) === "[object Object]";
13
+ }
@@ -0,0 +1,76 @@
1
+ import { type SchemaType } from "./_schema.js";
2
+ export type { SchemaType };
3
+ /** Options for {@linkcode parse}. */
4
+ export interface ParseOptions {
5
+ /**
6
+ * Name of the schema to use.
7
+ *
8
+ * @default {"default"}
9
+ */
10
+ schema?: SchemaType;
11
+ /**
12
+ * If `true`, duplicate keys will overwrite previous values. Otherwise,
13
+ * duplicate keys will throw a {@linkcode SyntaxError}.
14
+ *
15
+ * @default {false}
16
+ */
17
+ allowDuplicateKeys?: boolean;
18
+ /**
19
+ * If defined, a function to call on warning messages taking an
20
+ * {@linkcode Error} as its only argument.
21
+ */
22
+ onWarning?(error: Error): void;
23
+ }
24
+ /**
25
+ * Parse and return a YAML string as a parsed YAML document object.
26
+ *
27
+ * Note: This does not support functions. Untrusted data is safe to parse.
28
+ *
29
+ * @example Usage
30
+ * ```ts
31
+ * import { parse } from "@std/yaml/parse";
32
+ * import { assertEquals } from "@std/assert";
33
+ *
34
+ * const data = parse(`
35
+ * id: 1
36
+ * name: Alice
37
+ * `);
38
+ *
39
+ * assertEquals(data, { id: 1, name: "Alice" });
40
+ * ```
41
+ *
42
+ * @throws {SyntaxError} Throws error on invalid YAML.
43
+ * @param content YAML string to parse.
44
+ * @param options Parsing options.
45
+ * @returns Parsed document.
46
+ */
47
+ export declare function parse(content: string, options?: ParseOptions): unknown;
48
+ /**
49
+ * Same as {@linkcode parse}, but understands multi-document YAML sources, and
50
+ * returns multiple parsed YAML document objects.
51
+ *
52
+ * @example Usage
53
+ * ```ts
54
+ * import { parseAll } from "@std/yaml/parse";
55
+ * import { assertEquals } from "@std/assert";
56
+ *
57
+ * const data = parseAll(`
58
+ * ---
59
+ * id: 1
60
+ * name: Alice
61
+ * ---
62
+ * id: 2
63
+ * name: Bob
64
+ * ---
65
+ * id: 3
66
+ * name: Eve
67
+ * `);
68
+ * assertEquals(data, [ { id: 1, name: "Alice" }, { id: 2, name: "Bob" }, { id: 3, name: "Eve" }]);
69
+ * ```
70
+ *
71
+ * @param content YAML string to parse.
72
+ * @param options Parsing options.
73
+ * @returns Array of parsed documents.
74
+ */
75
+ export declare function parseAll(content: string, options?: ParseOptions): unknown;
76
+ //# sourceMappingURL=parse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/yaml/1.0.11/parse.ts"],"names":[],"mappings":"AAQA,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE3D,YAAY,EAAE,UAAU,EAAE,CAAC;AAE3B,qCAAqC;AACrC,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,SAAS,CAAC,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CAChC;AAmBD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,KAAK,CACnB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,YAAiB,GACzB,OAAO,CAcT;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAO7E"}
@@ -0,0 +1,93 @@
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
+ // This module is browser compatible.
6
+ import { isEOL } from "./_chars.js";
7
+ import { LoaderState } from "./_loader_state.js";
8
+ import { SCHEMA_MAP } from "./_schema.js";
9
+ function sanitizeInput(input) {
10
+ input = String(input);
11
+ if (input.length > 0) {
12
+ // Add trailing `\n` if not exists
13
+ if (!isEOL(input.charCodeAt(input.length - 1)))
14
+ input += "\n";
15
+ // Strip BOM
16
+ if (input.charCodeAt(0) === 0xfeff)
17
+ input = input.slice(1);
18
+ }
19
+ // Use 0 as string terminator. That significantly simplifies bounds check.
20
+ input += "\0";
21
+ return input;
22
+ }
23
+ /**
24
+ * Parse and return a YAML string as a parsed YAML document object.
25
+ *
26
+ * Note: This does not support functions. Untrusted data is safe to parse.
27
+ *
28
+ * @example Usage
29
+ * ```ts
30
+ * import { parse } from "@std/yaml/parse";
31
+ * import { assertEquals } from "@std/assert";
32
+ *
33
+ * const data = parse(`
34
+ * id: 1
35
+ * name: Alice
36
+ * `);
37
+ *
38
+ * assertEquals(data, { id: 1, name: "Alice" });
39
+ * ```
40
+ *
41
+ * @throws {SyntaxError} Throws error on invalid YAML.
42
+ * @param content YAML string to parse.
43
+ * @param options Parsing options.
44
+ * @returns Parsed document.
45
+ */
46
+ export function parse(content, options = {}) {
47
+ content = sanitizeInput(content);
48
+ const state = new LoaderState(content, {
49
+ ...options,
50
+ schema: SCHEMA_MAP.get(options.schema),
51
+ });
52
+ const documentGenerator = state.readDocuments();
53
+ const document = documentGenerator.next().value;
54
+ if (!documentGenerator.next().done) {
55
+ throw new SyntaxError("Found more than 1 document in the stream: expected a single document");
56
+ }
57
+ return document ?? null;
58
+ }
59
+ /**
60
+ * Same as {@linkcode parse}, but understands multi-document YAML sources, and
61
+ * returns multiple parsed YAML document objects.
62
+ *
63
+ * @example Usage
64
+ * ```ts
65
+ * import { parseAll } from "@std/yaml/parse";
66
+ * import { assertEquals } from "@std/assert";
67
+ *
68
+ * const data = parseAll(`
69
+ * ---
70
+ * id: 1
71
+ * name: Alice
72
+ * ---
73
+ * id: 2
74
+ * name: Bob
75
+ * ---
76
+ * id: 3
77
+ * name: Eve
78
+ * `);
79
+ * assertEquals(data, [ { id: 1, name: "Alice" }, { id: 2, name: "Bob" }, { id: 3, name: "Eve" }]);
80
+ * ```
81
+ *
82
+ * @param content YAML string to parse.
83
+ * @param options Parsing options.
84
+ * @returns Array of parsed documents.
85
+ */
86
+ export function parseAll(content, options = {}) {
87
+ content = sanitizeInput(content);
88
+ const state = new LoaderState(content, {
89
+ ...options,
90
+ schema: SCHEMA_MAP.get(options.schema),
91
+ });
92
+ return [...state.readDocuments()];
93
+ }
@@ -0,0 +1,100 @@
1
+ import { type SchemaType } from "./_schema.js";
2
+ import type { StyleVariant } from "./_type.js";
3
+ export type { SchemaType, StyleVariant };
4
+ /** Options for {@linkcode stringify}. */
5
+ export type StringifyOptions = {
6
+ /**
7
+ * Indentation width to use (in spaces).
8
+ *
9
+ * @default {2}
10
+ */
11
+ indent?: number;
12
+ /**
13
+ * When true, adds an indentation level to array elements.
14
+ *
15
+ * @default {true}
16
+ */
17
+ arrayIndent?: boolean;
18
+ /**
19
+ * Do not throw on invalid types (like function in the safe schema) and skip
20
+ * pairs and single values with such types.
21
+ *
22
+ * @default {false}
23
+ */
24
+ skipInvalid?: boolean;
25
+ /**
26
+ * Specifies level of nesting, when to switch from block to flow style for
27
+ * collections. `-1` means block style everywhere.
28
+ *
29
+ * @default {-1}
30
+ */
31
+ flowLevel?: number;
32
+ /** Each tag may have own set of styles. - "tag" => "style" map. */
33
+ styles?: Record<string, StyleVariant>;
34
+ /**
35
+ * Name of the schema to use.
36
+ *
37
+ * @default {"default"}
38
+ */
39
+ schema?: SchemaType;
40
+ /**
41
+ * If true, sort keys when dumping YAML in ascending, ASCII character order.
42
+ * If a function, use the function to sort the keys.
43
+ * If a function is specified, the function must return a negative value
44
+ * if first argument is less than second argument, zero if they're equal
45
+ * and a positive value otherwise.
46
+ *
47
+ * @default {false}
48
+ */
49
+ sortKeys?: boolean | ((a: string, b: string) => number);
50
+ /**
51
+ * Set max line width.
52
+ *
53
+ * @default {80}
54
+ */
55
+ lineWidth?: number;
56
+ /**
57
+ * If false, don't convert duplicate objects into references.
58
+ *
59
+ * @default {true}
60
+ */
61
+ useAnchors?: boolean;
62
+ /**
63
+ * If false don't try to be compatible with older yaml versions.
64
+ * Currently: don't quote "yes", "no" and so on,
65
+ * as required for YAML 1.1.
66
+ *
67
+ * @default {true}
68
+ */
69
+ compatMode?: boolean;
70
+ /**
71
+ * If true flow sequences will be condensed, omitting the
72
+ * space between `key: value` or `a, b`. Eg. `'[a,b]'` or `{a:{b:c}}`.
73
+ * Can be useful when using yaml for pretty URL query params
74
+ * as spaces are %-encoded.
75
+ *
76
+ * @default {false}
77
+ */
78
+ condenseFlow?: boolean;
79
+ };
80
+ /**
81
+ * Converts a JavaScript object or value to a YAML document string.
82
+ *
83
+ * @example Usage
84
+ * ```ts
85
+ * import { stringify } from "@std/yaml/stringify";
86
+ * import { assertEquals } from "@std/assert";
87
+ *
88
+ * const data = { id: 1, name: "Alice" };
89
+ * const yaml = stringify(data);
90
+ *
91
+ * assertEquals(yaml, "id: 1\nname: Alice\n");
92
+ * ```
93
+ *
94
+ * @throws {TypeError} If `data` contains invalid types.
95
+ * @param data The data to serialize.
96
+ * @param options The options for serialization.
97
+ * @returns A YAML string.
98
+ */
99
+ export declare function stringify(data: unknown, options?: StringifyOptions): string;
100
+ //# sourceMappingURL=stringify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stringify.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/yaml/1.0.11/stringify.ts"],"names":[],"mappings":"AAOA,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;AAEzC,yCAAyC;AACzC,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACtC;;;;OAIG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC;IACxD;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,OAAO,EACb,OAAO,GAAE,gBAAqB,GAC7B,MAAM,CAMR"}