@jordond/kit 0.0.0-stage → 0.1.0

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 (186) hide show
  1. package/bin/kit +39 -0
  2. package/dist/_verb-espppzez.js +115 -0
  3. package/dist/android-g73naxgg.js +31 -0
  4. package/dist/build-88hxf0kc.js +42 -0
  5. package/dist/check-7mndz8g8.js +54 -0
  6. package/dist/check-ngc4kzmj.js +33 -0
  7. package/dist/cleanup-hrcvxmh2.js +18 -0
  8. package/dist/cli/builtins.d.ts +13 -0
  9. package/dist/cli/command.d.ts +86 -0
  10. package/dist/cli/discover.d.ts +10 -0
  11. package/dist/cli/main.d.ts +1 -0
  12. package/dist/cli/plugin.d.ts +7 -0
  13. package/dist/cli/usage.d.ts +3 -0
  14. package/dist/cli-07t28k94.js +30 -0
  15. package/dist/cli-12dww95e.js +195 -0
  16. package/dist/cli-5d61x8vg.js +675 -0
  17. package/dist/cli-5wasc5mr.js +76 -0
  18. package/dist/cli-6dxp4v3m.js +73 -0
  19. package/dist/cli-7wvrehng.js +23 -0
  20. package/dist/cli-bam7dqfd.js +33 -0
  21. package/dist/cli-fqfan92n.js +135 -0
  22. package/dist/cli-fqxtcj42.js +75 -0
  23. package/dist/cli-h974q2wr.js +2019 -0
  24. package/dist/cli-m53122z6.js +221 -0
  25. package/dist/cli-qhs8ww91.js +51 -0
  26. package/dist/cli-qq1ktr8q.js +234 -0
  27. package/dist/cli-rds33bnp.js +101 -0
  28. package/dist/cli-re3ntm60.js +48 -0
  29. package/dist/cli.d.ts +1 -0
  30. package/dist/cli.js +35 -0
  31. package/dist/cloudflare-n5c46k6x.js +43 -0
  32. package/dist/command-gazq4bmt.js +19 -0
  33. package/dist/commands/_verb.d.ts +15 -0
  34. package/dist/commands/build.d.ts +11 -0
  35. package/dist/commands/check.d.ts +8 -0
  36. package/dist/commands/config.d.ts +2 -0
  37. package/dist/commands/db/create.d.ts +7 -0
  38. package/dist/commands/db/exec.d.ts +16 -0
  39. package/dist/commands/db/list.d.ts +11 -0
  40. package/dist/commands/db/migrate.d.ts +11 -0
  41. package/dist/commands/deploy.d.ts +13 -0
  42. package/dist/commands/deps.d.ts +72 -0
  43. package/dist/commands/dev.d.ts +8 -0
  44. package/dist/commands/doctor.d.ts +56 -0
  45. package/dist/commands/env/check.d.ts +7 -0
  46. package/dist/commands/env/init.d.ts +2 -0
  47. package/dist/commands/env/push.d.ts +12 -0
  48. package/dist/commands/env/sync.d.ts +2 -0
  49. package/dist/commands/format.d.ts +11 -0
  50. package/dist/commands/gradle.d.ts +2 -0
  51. package/dist/commands/init.d.ts +53 -0
  52. package/dist/commands/lint.d.ts +12 -0
  53. package/dist/commands/release/android.d.ts +13 -0
  54. package/dist/commands/release/ios.d.ts +13 -0
  55. package/dist/commands/test.d.ts +2 -0
  56. package/dist/commands/typecheck.d.ts +2 -0
  57. package/dist/commands/wrangler.d.ts +4 -0
  58. package/dist/commands/xcode.d.ts +8 -0
  59. package/dist/config/load.d.ts +6 -0
  60. package/dist/config/schema.d.ts +135 -0
  61. package/dist/config-ey5yrrfn.js +22 -0
  62. package/dist/create-7s8h3dja.js +38 -0
  63. package/dist/deploy-8mg1zhpb.js +102 -0
  64. package/dist/deps-97dq4mg8.js +334 -0
  65. package/dist/dev-yc9xmntj.js +62 -0
  66. package/dist/doctor-0wzmfyyh.js +324 -0
  67. package/dist/errors-1fjbr7ee.js +10 -0
  68. package/dist/exec-1k3sqwxz.js +53 -0
  69. package/dist/format-mnqfak22.js +39 -0
  70. package/dist/git-52v5rk51.js +80 -0
  71. package/dist/gradle-gtkf3geq.js +39 -0
  72. package/dist/index-cx34x4np.js +874 -0
  73. package/dist/index-erv82p4z.js +1528 -0
  74. package/dist/index-jqfz6hfy.js +2659 -0
  75. package/dist/index-mm4ht8yh.js +9 -0
  76. package/dist/index-s3ehw02w.js +1610 -0
  77. package/dist/index.d.ts +10 -0
  78. package/dist/index.js +50 -0
  79. package/dist/init-0402av4m.js +78 -0
  80. package/dist/init-dk5sym9w.js +76 -0
  81. package/dist/init-qr7y55ea.js +185 -0
  82. package/dist/ios-msg4bk15.js +31 -0
  83. package/dist/lib/cleanup.d.ts +21 -0
  84. package/dist/lib/cloudflare.d.ts +96 -0
  85. package/dist/lib/env/init.d.ts +22 -0
  86. package/dist/lib/env/load.d.ts +12 -0
  87. package/dist/lib/env/push.d.ts +54 -0
  88. package/dist/lib/env/render.d.ts +49 -0
  89. package/dist/lib/env/schema.d.ts +49 -0
  90. package/dist/lib/errors.d.ts +14 -0
  91. package/dist/lib/git.d.ts +36 -0
  92. package/dist/lib/log.d.ts +11 -0
  93. package/dist/lib/pm.d.ts +8 -0
  94. package/dist/lib/proc.d.ts +73 -0
  95. package/dist/lib/prompt.d.ts +32 -0
  96. package/dist/lib/secrets.d.ts +32 -0
  97. package/dist/lib/steps.d.ts +38 -0
  98. package/dist/lib/targets.d.ts +46 -0
  99. package/dist/lib/toml.d.ts +15 -0
  100. package/dist/lint-280dpn4y.js +39 -0
  101. package/dist/list-jdc3dqk0.js +34 -0
  102. package/dist/load-5qzs1c6b.js +137 -0
  103. package/dist/log-hhspqwjw.js +11 -0
  104. package/dist/main-ywtsjxev.js +2052 -0
  105. package/dist/migrate-emk758k1.js +35 -0
  106. package/dist/picocolors-0dxagz5d.js +6 -0
  107. package/dist/pm-5q5vz6w3.js +14 -0
  108. package/dist/proc-jv4bcyyx.js +33 -0
  109. package/dist/prompt-v510j04z.js +93 -0
  110. package/dist/push-4z70h3d8.js +117 -0
  111. package/dist/push-xzqw218t.js +117 -0
  112. package/dist/render-488tjnsq.js +22 -0
  113. package/dist/sync-wc4jpmkj.js +53 -0
  114. package/dist/targets-hbwxv97d.js +22 -0
  115. package/dist/test-198w46m4.js +26 -0
  116. package/dist/toml-zbhtxjh1.js +1062 -0
  117. package/dist/typecheck-e86e6yg1.js +24 -0
  118. package/dist/wrangler-0ctx1p3w.js +66 -0
  119. package/dist/xcode-g44qh2rc.js +60 -0
  120. package/fastlane/Fastfile +413 -0
  121. package/fastlane/Gemfile +21 -0
  122. package/fastlane/Gemfile.lock +275 -0
  123. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.jar +0 -0
  124. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.jar.md5 +1 -0
  125. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.jar.sha1 +1 -0
  126. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.jar.sha256 +1 -0
  127. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.jar.sha512 +1 -0
  128. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.module +64 -0
  129. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.module.md5 +1 -0
  130. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.module.sha1 +1 -0
  131. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.module.sha256 +1 -0
  132. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.module.sha512 +1 -0
  133. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.pom +12 -0
  134. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.pom.md5 +1 -0
  135. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.pom.sha1 +1 -0
  136. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.pom.sha256 +1 -0
  137. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.pom.sha512 +1 -0
  138. package/gradle/maven/io/github/jordond/kit/kit-plugins/maven-metadata.xml +13 -0
  139. package/gradle/maven/io/github/jordond/kit/kit-plugins/maven-metadata.xml.md5 +1 -0
  140. package/gradle/maven/io/github/jordond/kit/kit-plugins/maven-metadata.xml.sha1 +1 -0
  141. package/gradle/maven/io/github/jordond/kit/kit-plugins/maven-metadata.xml.sha256 +1 -0
  142. package/gradle/maven/io/github/jordond/kit/kit-plugins/maven-metadata.xml.sha512 +1 -0
  143. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.jar +0 -0
  144. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.jar.md5 +1 -0
  145. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.jar.sha1 +1 -0
  146. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.jar.sha256 +1 -0
  147. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.jar.sha512 +1 -0
  148. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.module +64 -0
  149. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.module.md5 +1 -0
  150. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.module.sha1 +1 -0
  151. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.module.sha256 +1 -0
  152. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.module.sha512 +1 -0
  153. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.pom +12 -0
  154. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.pom.md5 +1 -0
  155. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.pom.sha1 +1 -0
  156. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.pom.sha256 +1 -0
  157. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.pom.sha512 +1 -0
  158. package/gradle/maven/io/github/jordond/kit/kit-settings/maven-metadata.xml +13 -0
  159. package/gradle/maven/io/github/jordond/kit/kit-settings/maven-metadata.xml.md5 +1 -0
  160. package/gradle/maven/io/github/jordond/kit/kit-settings/maven-metadata.xml.sha1 +1 -0
  161. package/gradle/maven/io/github/jordond/kit/kit-settings/maven-metadata.xml.sha256 +1 -0
  162. package/gradle/maven/io/github/jordond/kit/kit-settings/maven-metadata.xml.sha512 +1 -0
  163. package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.1.0/io.github.jordond.kit.release.gradle.plugin-0.1.0.pom +15 -0
  164. package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.1.0/io.github.jordond.kit.release.gradle.plugin-0.1.0.pom.md5 +1 -0
  165. package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.1.0/io.github.jordond.kit.release.gradle.plugin-0.1.0.pom.sha1 +1 -0
  166. package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.1.0/io.github.jordond.kit.release.gradle.plugin-0.1.0.pom.sha256 +1 -0
  167. package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.1.0/io.github.jordond.kit.release.gradle.plugin-0.1.0.pom.sha512 +1 -0
  168. package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/maven-metadata.xml +13 -0
  169. package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/maven-metadata.xml.md5 +1 -0
  170. package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/maven-metadata.xml.sha1 +1 -0
  171. package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/maven-metadata.xml.sha256 +1 -0
  172. package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/maven-metadata.xml.sha512 +1 -0
  173. package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.1.0/io.github.jordond.kit.settings.gradle.plugin-0.1.0.pom +15 -0
  174. package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.1.0/io.github.jordond.kit.settings.gradle.plugin-0.1.0.pom.md5 +1 -0
  175. package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.1.0/io.github.jordond.kit.settings.gradle.plugin-0.1.0.pom.sha1 +1 -0
  176. package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.1.0/io.github.jordond.kit.settings.gradle.plugin-0.1.0.pom.sha256 +1 -0
  177. package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.1.0/io.github.jordond.kit.settings.gradle.plugin-0.1.0.pom.sha512 +1 -0
  178. package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/maven-metadata.xml +13 -0
  179. package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/maven-metadata.xml.md5 +1 -0
  180. package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/maven-metadata.xml.sha1 +1 -0
  181. package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/maven-metadata.xml.sha256 +1 -0
  182. package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/maven-metadata.xml.sha512 +1 -0
  183. package/package.json +58 -4
  184. package/templates/lefthook.yml +6 -0
  185. package/templates/mise.toml +6 -0
  186. package/README.md +0 -3
@@ -0,0 +1,1062 @@
1
+ // @bun
2
+ import"./cli-re3ntm60.js";
3
+
4
+ // src/lib/toml.ts
5
+ import { readFileSync } from "fs";
6
+
7
+ // node_modules/smol-toml/dist/error.js
8
+ /*!
9
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
10
+ * SPDX-License-Identifier: BSD-3-Clause
11
+ *
12
+ * Redistribution and use in source and binary forms, with or without
13
+ * modification, are permitted provided that the following conditions are met:
14
+ *
15
+ * 1. Redistributions of source code must retain the above copyright notice, this
16
+ * list of conditions and the following disclaimer.
17
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
18
+ * this list of conditions and the following disclaimer in the
19
+ * documentation and/or other materials provided with the distribution.
20
+ * 3. Neither the name of the copyright holder nor the names of its contributors
21
+ * may be used to endorse or promote products derived from this software without
22
+ * specific prior written permission.
23
+ *
24
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
25
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
28
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+ */
35
+ function getLineColFromPtr(string, ptr) {
36
+ let lines = string.slice(0, ptr).split(/\r?\n/);
37
+ return [lines.length, lines.pop().length + 1];
38
+ }
39
+ function makeCodeBlock(string, line, column) {
40
+ let lines = string.split(/\r?\n/);
41
+ let codeblock = "";
42
+ let numberLen = (Math.log10(line + 1) | 0) + 1;
43
+ for (let i = line - 1;i <= line + 1; i++) {
44
+ let l = lines[i - 1];
45
+ if (!l)
46
+ continue;
47
+ codeblock += i.toString().padEnd(numberLen, " ");
48
+ codeblock += ": ";
49
+ codeblock += l;
50
+ codeblock += `
51
+ `;
52
+ if (i === line) {
53
+ codeblock += " ".repeat(numberLen + column + 2);
54
+ codeblock += `^
55
+ `;
56
+ }
57
+ }
58
+ return codeblock;
59
+ }
60
+
61
+ class TomlError extends Error {
62
+ line;
63
+ column;
64
+ codeblock;
65
+ constructor(message, options) {
66
+ const [line, column] = getLineColFromPtr(options.toml, options.ptr);
67
+ const codeblock = makeCodeBlock(options.toml, line, column);
68
+ super(`Invalid TOML document: ${message}
69
+
70
+ ${codeblock}`, options);
71
+ this.line = line;
72
+ this.column = column;
73
+ this.codeblock = codeblock;
74
+ }
75
+ static x(message, ctx, ptr) {
76
+ throw new TomlError(message, { toml: ctx.s, ptr: ptr ?? ctx.p });
77
+ }
78
+ }
79
+
80
+ // node_modules/smol-toml/dist/primitive.js
81
+ /*!
82
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
83
+ * SPDX-License-Identifier: BSD-3-Clause
84
+ *
85
+ * Redistribution and use in source and binary forms, with or without
86
+ * modification, are permitted provided that the following conditions are met:
87
+ *
88
+ * 1. Redistributions of source code must retain the above copyright notice, this
89
+ * list of conditions and the following disclaimer.
90
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
91
+ * this list of conditions and the following disclaimer in the
92
+ * documentation and/or other materials provided with the distribution.
93
+ * 3. Neither the name of the copyright holder nor the names of its contributors
94
+ * may be used to endorse or promote products derived from this software without
95
+ * specific prior written permission.
96
+ *
97
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
98
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
99
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
100
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
101
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
102
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
103
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
104
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
105
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
106
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
107
+ */
108
+ function parseString(ctx) {
109
+ let startPtr = ctx.p;
110
+ let c = ctx.s.charCodeAt(ctx.p++);
111
+ let first = c;
112
+ let isLiteral = c === 39;
113
+ let isMultiline = c === ctx.s.charCodeAt(ctx.p) && c === ctx.s.charCodeAt(ctx.p + 1);
114
+ if (isMultiline) {
115
+ if ((c = ctx.s.charCodeAt(ctx.p += 2)) === 10)
116
+ ctx.p++;
117
+ else if (c === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)
118
+ ctx.p += 2;
119
+ }
120
+ let parsed = "";
121
+ let sliceStart = ctx.p;
122
+ let state = 0;
123
+ for (;ctx.p < ctx.s.length; ctx.p++) {
124
+ c = ctx.s.charCodeAt(ctx.p);
125
+ if (isMultiline && (c === 10 || c === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)) {
126
+ state = state && 3;
127
+ } else if (c < 32 && c !== 9 || c === 127) {
128
+ TomlError.x("control characters are not allowed in strings", ctx);
129
+ } else if ((!state || state === 3) && c === first && (!isMultiline || ctx.s.charCodeAt(ctx.p + 1) === first && ctx.s.charCodeAt(ctx.p + 2) === first)) {
130
+ if (isMultiline) {
131
+ if (ctx.s.charCodeAt(ctx.p + 3) === first)
132
+ ctx.p++;
133
+ if (ctx.s.charCodeAt(ctx.p + 3) === first)
134
+ ctx.p++;
135
+ }
136
+ if (!state) {
137
+ let s = ctx.s.slice(sliceStart, ctx.p);
138
+ parsed = parsed ? parsed + s : s;
139
+ }
140
+ ctx.p += isMultiline ? 3 : 1;
141
+ return parsed;
142
+ } else if (!state) {
143
+ if (!isLiteral && c === 92) {
144
+ parsed += ctx.s.slice(sliceStart, sliceStart = ctx.p);
145
+ state = 1;
146
+ }
147
+ } else if (state === 1) {
148
+ if (c === 120 || c === 117 || c === 85) {
149
+ let errPtr = ctx.p++ - 1;
150
+ let value = 0;
151
+ let len = c === 120 ? 2 : c === 117 ? 4 : 8;
152
+ for (let j = 0;j < len; j++, ctx.p++) {
153
+ let hex = ctx.s.charCodeAt(ctx.p);
154
+ let digit = hex >= 48 && hex <= 57 ? hex - 48 : hex >= 65 && hex <= 70 ? hex - 65 + 10 : hex >= 97 && hex <= 102 ? hex - 97 + 10 : -1;
155
+ if (digit < 0)
156
+ TomlError.x("invalid non-hex character in unicode escape", ctx);
157
+ value = value << 4 | digit;
158
+ }
159
+ if (value < 0 || value > 1114111 || value >= 55296 && value <= 57343) {
160
+ TomlError.x("invalid unicode escape", ctx, errPtr);
161
+ }
162
+ parsed += String.fromCodePoint(value);
163
+ sliceStart = ctx.p--;
164
+ state = 0;
165
+ } else if (isMultiline && (c === 32 || c === 9)) {
166
+ state = 2;
167
+ } else {
168
+ if (c === 98)
169
+ parsed += "\b";
170
+ else if (c === 116)
171
+ parsed += "\t";
172
+ else if (c === 110)
173
+ parsed += `
174
+ `;
175
+ else if (c === 102)
176
+ parsed += "\f";
177
+ else if (c === 114)
178
+ parsed += "\r";
179
+ else if (c === 101)
180
+ parsed += "\x1B";
181
+ else if (c === 34)
182
+ parsed += '"';
183
+ else if (c === 92)
184
+ parsed += "\\";
185
+ else
186
+ TomlError.x("unrecognised escape sequence", ctx);
187
+ sliceStart = ctx.p + 1;
188
+ state = 0;
189
+ }
190
+ } else if (c !== 32 && c !== 9) {
191
+ if (state === 2)
192
+ TomlError.x("invalid escape: only line-ending whitespace may be escaped", ctx, sliceStart);
193
+ state = !isLiteral && c === 92 ? 1 : 0;
194
+ sliceStart = ctx.p;
195
+ }
196
+ }
197
+ TomlError.x("unfinished string", ctx, startPtr);
198
+ }
199
+
200
+ // node_modules/smol-toml/dist/date.js
201
+ /*!
202
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
203
+ * SPDX-License-Identifier: BSD-3-Clause
204
+ *
205
+ * Redistribution and use in source and binary forms, with or without
206
+ * modification, are permitted provided that the following conditions are met:
207
+ *
208
+ * 1. Redistributions of source code must retain the above copyright notice, this
209
+ * list of conditions and the following disclaimer.
210
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
211
+ * this list of conditions and the following disclaimer in the
212
+ * documentation and/or other materials provided with the distribution.
213
+ * 3. Neither the name of the copyright holder nor the names of its contributors
214
+ * may be used to endorse or promote products derived from this software without
215
+ * specific prior written permission.
216
+ *
217
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
218
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
219
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
220
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
221
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
222
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
223
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
224
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
225
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
226
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
227
+ */
228
+ var DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[Tt ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|z|[-+]\d{2}:\d{2})?$/i;
229
+
230
+ class TomlDate extends Date {
231
+ #hasDate = false;
232
+ #hasTime = false;
233
+ #offset = null;
234
+ constructor(date, fasttype, unsafeDelim) {
235
+ let hasDate = true;
236
+ let hasTime = true;
237
+ let offset = "Z";
238
+ let c;
239
+ if (typeof date === "string") {
240
+ if (fasttype)
241
+ prep: {
242
+ if (fasttype < 3) {
243
+ if (+date.slice(11, 13) > 23) {
244
+ date = "";
245
+ break prep;
246
+ }
247
+ if (fasttype === 2) {
248
+ offset = null;
249
+ date += "Z";
250
+ } else if ((c = date.charCodeAt(date.length - 1)) !== 90 && c !== 122) {
251
+ offset = date.slice(date.length - 6);
252
+ }
253
+ if (unsafeDelim)
254
+ date = date.slice(0, 10) + "T" + date.slice(11);
255
+ } else if (fasttype === 4) {
256
+ date = +date.slice(0, 2) > 23 ? "" : `0000-01-01T${date}Z`;
257
+ }
258
+ hasDate = fasttype !== 4;
259
+ hasTime = fasttype !== 3;
260
+ }
261
+ else {
262
+ let match = date.match(DATE_TIME_RE);
263
+ if (match) {
264
+ if (!match[1]) {
265
+ hasDate = false;
266
+ date = `0000-01-01T${date}`;
267
+ }
268
+ hasTime = !!match[2];
269
+ hasTime && date[10] === " " && (date = date.replace(" ", "T"));
270
+ if (match[2] && +match[2] > 23) {
271
+ date = "";
272
+ } else {
273
+ offset = match[3] || null;
274
+ if (!offset && hasTime)
275
+ date += "Z";
276
+ }
277
+ } else {
278
+ date = "";
279
+ }
280
+ }
281
+ }
282
+ super(date);
283
+ if (!isNaN(this.getTime())) {
284
+ this.#hasDate = hasDate;
285
+ this.#hasTime = hasTime;
286
+ this.#offset = offset;
287
+ }
288
+ }
289
+ isDateTime() {
290
+ return this.#hasDate && this.#hasTime;
291
+ }
292
+ isLocal() {
293
+ return !this.#hasDate || !this.#hasTime || !this.#offset;
294
+ }
295
+ isDate() {
296
+ return this.#hasDate && !this.#hasTime;
297
+ }
298
+ isTime() {
299
+ return this.#hasTime && !this.#hasDate;
300
+ }
301
+ isValid() {
302
+ return this.#hasDate || this.#hasTime;
303
+ }
304
+ toISOString() {
305
+ let iso = super.toISOString();
306
+ if (this.isDate())
307
+ return iso.slice(0, 10);
308
+ if (this.isTime())
309
+ return iso.slice(11, 23);
310
+ if (this.#offset === null)
311
+ return iso.slice(0, -1);
312
+ if (this.#offset === "Z" || this.#offset === "z")
313
+ return iso;
314
+ let offset = +this.#offset.slice(1, 3) * 60 + +this.#offset.slice(4, 6);
315
+ offset = this.#offset[0] === "-" ? offset : -offset;
316
+ let offsetDate = new Date(this.getTime() - offset * 60000);
317
+ return offsetDate.toISOString().slice(0, -1) + this.#offset;
318
+ }
319
+ static wrapAsOffsetDateTime(jsDate, offset = "Z") {
320
+ let date = new TomlDate(jsDate);
321
+ date.#offset = offset;
322
+ return date;
323
+ }
324
+ static wrapAsLocalDateTime(jsDate) {
325
+ let date = new TomlDate(jsDate);
326
+ date.#offset = null;
327
+ return date;
328
+ }
329
+ static wrapAsLocalDate(jsDate) {
330
+ let date = new TomlDate(jsDate);
331
+ date.#hasTime = false;
332
+ date.#offset = null;
333
+ return date;
334
+ }
335
+ static wrapAsLocalTime(jsDate) {
336
+ let date = new TomlDate(jsDate);
337
+ date.#hasDate = false;
338
+ date.#offset = null;
339
+ return date;
340
+ }
341
+ }
342
+
343
+ // node_modules/smol-toml/dist/extract.js
344
+ /*!
345
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
346
+ * SPDX-License-Identifier: BSD-3-Clause
347
+ *
348
+ * Redistribution and use in source and binary forms, with or without
349
+ * modification, are permitted provided that the following conditions are met:
350
+ *
351
+ * 1. Redistributions of source code must retain the above copyright notice, this
352
+ * list of conditions and the following disclaimer.
353
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
354
+ * this list of conditions and the following disclaimer in the
355
+ * documentation and/or other materials provided with the distribution.
356
+ * 3. Neither the name of the copyright holder nor the names of its contributors
357
+ * may be used to endorse or promote products derived from this software without
358
+ * specific prior written permission.
359
+ *
360
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
361
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
362
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
363
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
364
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
365
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
366
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
367
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
368
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
369
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
370
+ */
371
+ function isDigit(char, base = 10) {
372
+ return base === 16 ? char > 47 && char < 58 || char > 64 && char < 71 || char > 96 && char < 103 : char > 47 && char < 48 + base;
373
+ }
374
+ function isEndOfValue(char, delim) {
375
+ return char === 32 || char === 9 || char === 10 || char === 13 || delim && (char === delim || char === 44) || char === 35;
376
+ }
377
+ function extractValue(ctx, end) {
378
+ let errPtr = ctx.p;
379
+ let c = ctx.s.charCodeAt(ctx.p);
380
+ if (c === 91 || c === 123) {
381
+ ctx.d-- || TomlError.x("document contains excessively nested structures. aborting.", ctx);
382
+ let value = c === 91 ? parseArray(ctx) : parseInlineTable(ctx);
383
+ ctx.d++;
384
+ return value;
385
+ }
386
+ if (c === 34 || c === 39) {
387
+ return parseString(ctx);
388
+ }
389
+ if (c === 116) {
390
+ if (ctx.s.charCodeAt(++ctx.p) !== 114 || ctx.s.charCodeAt(++ctx.p) !== 117 || ctx.s.charCodeAt(++ctx.p) !== 101)
391
+ TomlError.x("invalid value", ctx, errPtr);
392
+ return ctx.p++, true;
393
+ }
394
+ if (c === 102) {
395
+ if (ctx.s.charCodeAt(++ctx.p) !== 97 || ctx.s.charCodeAt(++ctx.p) !== 108 || ctx.s.charCodeAt(++ctx.p) !== 115 || ctx.s.charCodeAt(++ctx.p) !== 101)
396
+ TomlError.x("invalid value", ctx, errPtr);
397
+ return ctx.p++, false;
398
+ }
399
+ if (c === 43 || c === 45) {
400
+ return parseNumber(ctx, ctx.p, ctx.s.charCodeAt(++ctx.p), 44 - c, end);
401
+ }
402
+ if (ctx.s.charCodeAt(ctx.p + 4) === 45 && ctx.s.charCodeAt(ctx.p + 7) === 45) {
403
+ return parseDate(ctx, c, end);
404
+ }
405
+ if (ctx.s.charCodeAt(ctx.p + 2) === 58) {
406
+ return parseTime(ctx, c, end);
407
+ }
408
+ return parseNumber(ctx, ctx.p, c, 0, end);
409
+ }
410
+ function parseNumber(ctx, startPtr, startChr, sign, endChr) {
411
+ let c = startChr;
412
+ let state = 0;
413
+ let hasUnderscores = false;
414
+ if (c === 105) {
415
+ if (ctx.s.charCodeAt(++ctx.p) !== 110 || ctx.s.charCodeAt(++ctx.p) !== 102)
416
+ TomlError.x("invalid value", ctx, startPtr);
417
+ return ctx.p++, (sign || 1) / 0;
418
+ }
419
+ if (c === 110) {
420
+ if (ctx.s.charCodeAt(++ctx.p) !== 97 || ctx.s.charCodeAt(++ctx.p) !== 110)
421
+ TomlError.x("invalid value", ctx, startPtr);
422
+ return ctx.p++, NaN;
423
+ }
424
+ if (c === 48) {
425
+ if (++ctx.p >= ctx.s.length || isEndOfValue(c = ctx.s.charCodeAt(ctx.p), endChr))
426
+ return ctx.bi === true ? 0n : 0;
427
+ if (!sign) {
428
+ if (c === 120)
429
+ return parseIntegerBaseN(ctx, startPtr, 16, endChr);
430
+ else if (c === 98)
431
+ return parseIntegerBaseN(ctx, startPtr, 2, endChr);
432
+ else if (c === 111)
433
+ return parseIntegerBaseN(ctx, startPtr, 8, endChr);
434
+ }
435
+ if (c === 46)
436
+ state = 2;
437
+ else if (c === 101 || c === 69)
438
+ state = 4;
439
+ else
440
+ TomlError.x("illegal leading zero", ctx, startPtr);
441
+ } else if (!isDigit(c))
442
+ TomlError.x("invalid value", ctx, startPtr);
443
+ while (++ctx.p < ctx.s.length && (c = ctx.s.charCodeAt(ctx.p), !isEndOfValue(c, endChr))) {
444
+ if (!state)
445
+ state = 1;
446
+ if (c === 95) {
447
+ if (!(state & 1))
448
+ TomlError.x("illegal underscore", ctx);
449
+ state += 11;
450
+ hasUnderscores = true;
451
+ } else if (state === 1 && c === 46)
452
+ state = 2;
453
+ else if ((state === 1 || state === 3) && (c === 101 || c === 69))
454
+ state = 4;
455
+ else if (state === 4 && (c === 43 || c === 45)) {
456
+ state = 6;
457
+ } else if (!isDigit(c))
458
+ TomlError.x(`illegal character in numeric literal`, ctx);
459
+ else if (state > 9)
460
+ state -= 11;
461
+ else if (!(state & 1))
462
+ state++;
463
+ }
464
+ if (!state) {
465
+ let val = (startChr - 48) * (sign || 1);
466
+ return ctx.bi === true ? BigInt(val) : val;
467
+ }
468
+ if (!(state & 1))
469
+ TomlError.x("unfinished numeric value", ctx, startPtr);
470
+ let str = ctx.s.slice(startPtr, ctx.p);
471
+ if (hasUnderscores)
472
+ str = str.replaceAll("_", "");
473
+ return state > 1 ? parseFloat(str) : parseInteger(ctx, str, 10, startPtr);
474
+ }
475
+ function parseIntegerBaseN(ctx, startPtr, base, endChr) {
476
+ let c, underscore = 1;
477
+ while (++ctx.p < ctx.s.length && (c = ctx.s.charCodeAt(ctx.p), !isEndOfValue(c, endChr))) {
478
+ if (c === 95) {
479
+ if (underscore & 1)
480
+ TomlError.x("illegal underscore", ctx);
481
+ underscore = 3;
482
+ } else if (!isDigit(c, base))
483
+ TomlError.x(`illegal character in numeric literal`, ctx);
484
+ else if (underscore & 1)
485
+ underscore--;
486
+ }
487
+ if (underscore & 1)
488
+ TomlError.x("unfinished numeric value", ctx);
489
+ let str = ctx.s.slice(startPtr + 2, ctx.p);
490
+ if (underscore)
491
+ str = str.replaceAll("_", "");
492
+ return parseInteger(ctx, str, base, startPtr);
493
+ }
494
+ function parseInteger(ctx, str, base, startPtr) {
495
+ if (ctx.bi !== true)
496
+ int: {
497
+ let val = parseInt(str, base);
498
+ if (!Number.isSafeInteger(val)) {
499
+ if (ctx.bi)
500
+ break int;
501
+ TomlError.x("integer value cannot be represented losslessly", ctx, startPtr);
502
+ }
503
+ return val;
504
+ }
505
+ return base === 10 ? BigInt(str) : BigInt((base === 2 ? "0b" : base === 8 ? "0o" : "0x") + str);
506
+ }
507
+ function parseDate(ctx, c, endChr) {
508
+ let startPtr = ctx.p++, unsafeSeparator;
509
+ if (!isDigit(c) || !isDigit(ctx.s.charCodeAt(ctx.p++)) || !isDigit(ctx.s.charCodeAt(ctx.p++)) || !isDigit(ctx.s.charCodeAt(ctx.p++))) {
510
+ return parseNumber(ctx, ctx.p = startPtr, c, 0, endChr);
511
+ }
512
+ ctx.p += 5;
513
+ if (!isDigit(ctx.s.charCodeAt(ctx.p++)))
514
+ TomlError.x("invalid date-time: date part is malformed", ctx, startPtr);
515
+ if (ctx.p >= ctx.s.length || ((c = ctx.s.charCodeAt(ctx.p)) !== 32 || (unsafeSeparator = true, !isDigit(ctx.s.charCodeAt(ctx.p + 1)))) && c !== 84 && c !== 116) {
516
+ let t2 = ctx.s.slice(startPtr, ctx.p);
517
+ return readDate(ctx, t2, 3, false, startPtr);
518
+ }
519
+ if (ctx.s.charCodeAt(ctx.p += 3) !== 58)
520
+ TomlError.x("invalid date-time: time part is malformed", ctx, startPtr);
521
+ if (ctx.s.charCodeAt(ctx.p += 3) === 58)
522
+ ctx.p += 3;
523
+ if (ctx.s.charCodeAt(ctx.p) === 46)
524
+ while (isDigit(ctx.s.charCodeAt(++ctx.p)))
525
+ ;
526
+ if (c = ctx.s.charCodeAt(ctx.p)) {
527
+ if (c === 90 || c === 122) {
528
+ let t2 = ctx.s.slice(startPtr, ++ctx.p);
529
+ return readDate(ctx, t2, 1, unsafeSeparator, startPtr, "[+00:00]");
530
+ }
531
+ if (c === 43 || c === 45) {
532
+ let t2 = ctx.s.slice(startPtr, ctx.p += 6);
533
+ return readDate(ctx, t2, 1, unsafeSeparator, startPtr, !ctx.ld && "[" + ctx.s.slice(ctx.p - 6, ctx.p) + "]");
534
+ }
535
+ }
536
+ let t = ctx.s.slice(startPtr, ctx.p);
537
+ return readDate(ctx, t, 2, unsafeSeparator, startPtr);
538
+ }
539
+ function parseTime(ctx, c, endChr) {
540
+ let start = ctx.p;
541
+ if (!isDigit(c) || !isDigit(ctx.s.charCodeAt(++ctx.p))) {
542
+ return parseNumber(ctx, --ctx.p, c, 0, endChr);
543
+ }
544
+ if (ctx.s.charCodeAt(ctx.p += 4) === 58)
545
+ ctx.p += 3;
546
+ if (ctx.s.charCodeAt(ctx.p) === 46)
547
+ while (isDigit(ctx.s.charCodeAt(++ctx.p)))
548
+ ;
549
+ let t = ctx.s.slice(start, ctx.p);
550
+ return readDate(ctx, t, 4, false, start);
551
+ }
552
+ function readDate(ctx, str, type, unsafeDelim, errPtr, temporalSuffix) {
553
+ if (ctx.ld) {
554
+ let date = new TomlDate(str, type, unsafeDelim);
555
+ if (!date.isValid())
556
+ TomlError.x("invalid date", ctx, errPtr);
557
+ return date;
558
+ }
559
+ try {
560
+ if (temporalSuffix)
561
+ str += temporalSuffix;
562
+ switch (type) {
563
+ case 1:
564
+ return Temporal.ZonedDateTime.from(str);
565
+ case 2:
566
+ return Temporal.PlainDateTime.from(str);
567
+ case 3:
568
+ return Temporal.PlainDate.from(str);
569
+ case 4:
570
+ return Temporal.PlainTime.from(str);
571
+ }
572
+ } catch (e) {
573
+ TomlError.x(e instanceof Error ? e.message : "" + e, ctx, errPtr);
574
+ }
575
+ }
576
+
577
+ // node_modules/smol-toml/dist/util.js
578
+ /*!
579
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
580
+ * SPDX-License-Identifier: BSD-3-Clause
581
+ *
582
+ * Redistribution and use in source and binary forms, with or without
583
+ * modification, are permitted provided that the following conditions are met:
584
+ *
585
+ * 1. Redistributions of source code must retain the above copyright notice, this
586
+ * list of conditions and the following disclaimer.
587
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
588
+ * this list of conditions and the following disclaimer in the
589
+ * documentation and/or other materials provided with the distribution.
590
+ * 3. Neither the name of the copyright holder nor the names of its contributors
591
+ * may be used to endorse or promote products derived from this software without
592
+ * specific prior written permission.
593
+ *
594
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
595
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
596
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
597
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
598
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
599
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
600
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
601
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
602
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
603
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
604
+ */
605
+ function skipComment(ctx) {
606
+ for (;ctx.p < ctx.s.length; ctx.p++) {
607
+ let c = ctx.s.charCodeAt(ctx.p);
608
+ if (c === 10)
609
+ break;
610
+ if (c === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10) {
611
+ ctx.p++;
612
+ break;
613
+ }
614
+ if (c < 32 && c !== 9 || c === 127) {
615
+ TomlError.x("control characters are not allowed in comments", ctx);
616
+ }
617
+ }
618
+ }
619
+ function skipVoid(ctx, banNewLines, banComments) {
620
+ let c;
621
+ while (ctx.p < ctx.s.length) {
622
+ while (ctx.p < ctx.s.length && ((c = ctx.s.charCodeAt(ctx.p)) === 32 || c === 9 || !banNewLines && (c === 10 || c === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)))
623
+ ctx.p++;
624
+ if (banComments || c !== 35)
625
+ break;
626
+ skipComment(ctx);
627
+ }
628
+ }
629
+
630
+ // node_modules/smol-toml/dist/struct.js
631
+ /*!
632
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
633
+ * SPDX-License-Identifier: BSD-3-Clause
634
+ *
635
+ * Redistribution and use in source and binary forms, with or without
636
+ * modification, are permitted provided that the following conditions are met:
637
+ *
638
+ * 1. Redistributions of source code must retain the above copyright notice, this
639
+ * list of conditions and the following disclaimer.
640
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
641
+ * this list of conditions and the following disclaimer in the
642
+ * documentation and/or other materials provided with the distribution.
643
+ * 3. Neither the name of the copyright holder nor the names of its contributors
644
+ * may be used to endorse or promote products derived from this software without
645
+ * specific prior written permission.
646
+ *
647
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
648
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
649
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
650
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
651
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
652
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
653
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
654
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
655
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
656
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
657
+ */
658
+ function parseKey(ctx, end = 61) {
659
+ let startPtr;
660
+ let state = 0;
661
+ let parsed = [];
662
+ let sliceStart;
663
+ let c = ctx.s.charCodeAt(startPtr = ctx.p);
664
+ do {
665
+ if (c === end) {
666
+ if (!state)
667
+ TomlError.x("unexpected end of key", ctx);
668
+ if (state === 1)
669
+ parsed.push(ctx.s.slice(sliceStart, ctx.p));
670
+ return ctx.p++, parsed;
671
+ } else if (c === 46) {
672
+ if (!state)
673
+ TomlError.x("illegal empty bare key", ctx);
674
+ if (state === 1)
675
+ parsed.push(ctx.s.slice(sliceStart, ctx.p));
676
+ state = 0;
677
+ } else if (!state && (c === 34 || c === 39)) {
678
+ if (c === ctx.s.charCodeAt(ctx.p + 1) && c === ctx.s.charCodeAt(ctx.p + 2))
679
+ TomlError.x("illegal quoted key: multiline strings are not allowed", ctx);
680
+ parsed.push(parseString(ctx));
681
+ state = 2;
682
+ ctx.p--;
683
+ } else if (c === 32 || c === 9) {
684
+ if (state === 1) {
685
+ parsed.push(ctx.s.slice(sliceStart, ctx.p));
686
+ state = 2;
687
+ }
688
+ } else if (state === 2 || c < 48 && c !== 45 || c > 57 && c < 65 || c > 90 && c < 97 && c !== 95 || c > 122) {
689
+ TomlError.x("illegal character in key", ctx);
690
+ } else if (!state) {
691
+ state = 1;
692
+ sliceStart = ctx.p;
693
+ }
694
+ } while (c = ctx.s.charCodeAt(++ctx.p));
695
+ TomlError.x("incomplete key-value: cannot find end of key", ctx, startPtr);
696
+ }
697
+ function parseInlineTable(ctx) {
698
+ let startPtr = ctx.p++;
699
+ let res = Object.create(null);
700
+ let seen = new Set;
701
+ let c;
702
+ while (ctx.p < ctx.s.length) {
703
+ skipVoid(ctx);
704
+ if ((c = ctx.s.charCodeAt(ctx.p)) === 125) {
705
+ ctx.p++;
706
+ return res;
707
+ }
708
+ let k;
709
+ let t = res;
710
+ let hasOwn = false;
711
+ let errPtr = ctx.p;
712
+ let key = parseKey(ctx);
713
+ for (let i = 0;i < key.length; i++) {
714
+ if (i)
715
+ t = hasOwn ? t[k] : t[k] = Object.create(null);
716
+ k = key[i];
717
+ if ((hasOwn = Object.hasOwn(t, k)) && (typeof t[k] !== "object" || seen.has(t[k]))) {
718
+ TomlError.x("trying to redefine an already defined value", ctx, errPtr);
719
+ }
720
+ let unsafe = k === "__proto__";
721
+ if (ctx.uk && (unsafe || k === "constructor")) {
722
+ t = ctx.uk !== 1 && TomlError.x("document contains an unsafe property", ctx, errPtr);
723
+ break;
724
+ }
725
+ if (!hasOwn && unsafe) {
726
+ Object.defineProperty(t, k, { enumerable: true, configurable: true, writable: true });
727
+ }
728
+ }
729
+ if (hasOwn) {
730
+ TomlError.x("trying to redefine an already defined value", ctx, errPtr);
731
+ }
732
+ skipVoid(ctx, true, true);
733
+ let value = extractValue(ctx, 125);
734
+ if (t && typeof (t[k] = value) === "object")
735
+ seen.add(value);
736
+ skipVoid(ctx);
737
+ if ((c = ctx.s.charCodeAt(ctx.p++)) === 125) {
738
+ return res;
739
+ }
740
+ if (c !== 44)
741
+ TomlError.x("expected comma or end of structure", ctx, ctx.p - 1);
742
+ }
743
+ TomlError.x("unfinished table", ctx, startPtr);
744
+ }
745
+ function parseArray(ctx) {
746
+ let startPtr = ctx.p++;
747
+ let res = [];
748
+ let c;
749
+ while (ctx.p < ctx.s.length) {
750
+ skipVoid(ctx);
751
+ if ((c = ctx.s.charCodeAt(ctx.p)) === 93) {
752
+ ctx.p++;
753
+ return res;
754
+ }
755
+ res.push(extractValue(ctx, 93));
756
+ skipVoid(ctx);
757
+ if ((c = ctx.s.charCodeAt(ctx.p++)) === 93) {
758
+ return res;
759
+ }
760
+ if (c !== 44)
761
+ TomlError.x("expected comma or end of structure", ctx, ctx.p - 1);
762
+ }
763
+ TomlError.x("unfinished array", ctx, startPtr);
764
+ }
765
+
766
+ // node_modules/smol-toml/dist/parse.js
767
+ /*!
768
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
769
+ * SPDX-License-Identifier: BSD-3-Clause
770
+ *
771
+ * Redistribution and use in source and binary forms, with or without
772
+ * modification, are permitted provided that the following conditions are met:
773
+ *
774
+ * 1. Redistributions of source code must retain the above copyright notice, this
775
+ * list of conditions and the following disclaimer.
776
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
777
+ * this list of conditions and the following disclaimer in the
778
+ * documentation and/or other materials provided with the distribution.
779
+ * 3. Neither the name of the copyright holder nor the names of its contributors
780
+ * may be used to endorse or promote products derived from this software without
781
+ * specific prior written permission.
782
+ *
783
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
784
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
785
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
786
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
787
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
788
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
789
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
790
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
791
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
792
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
793
+ */
794
+ function peekTable(ctx, key, table, meta, type) {
795
+ let t = table;
796
+ let m = meta;
797
+ let k;
798
+ let hasOwn = false;
799
+ let state;
800
+ for (let i = 0;i < key.length; i++) {
801
+ if (i) {
802
+ t = hasOwn ? t[k] : t[k] = Object.create(null);
803
+ m = (state = m[k]).c;
804
+ if (type === 0 && (state.t === 1 || state.t === 2)) {
805
+ return null;
806
+ }
807
+ if (state.t === 2) {
808
+ let l = t.length - 1;
809
+ t = t[l];
810
+ m = m[l].c;
811
+ }
812
+ }
813
+ k = key[i];
814
+ if ((hasOwn = Object.hasOwn(t, k)) && m[k]?.t === 0 && m[k]?.d) {
815
+ return null;
816
+ }
817
+ if (!hasOwn) {
818
+ let unsafe = k === "__proto__";
819
+ if (ctx.uk && (unsafe || k === "constructor"))
820
+ return false;
821
+ if (unsafe) {
822
+ Object.defineProperty(t, k, { enumerable: true, configurable: true, writable: true });
823
+ Object.defineProperty(m, k, { enumerable: true, configurable: true, writable: true });
824
+ }
825
+ m[k] = {
826
+ t: i < key.length - 1 && type === 2 ? 3 : type,
827
+ d: false,
828
+ i: 0,
829
+ c: Object.create(null)
830
+ };
831
+ }
832
+ }
833
+ state = m[k];
834
+ if (state.t !== type && !(type === 1 && state.t === 3)) {
835
+ return null;
836
+ }
837
+ if (type === 2) {
838
+ if (!state.d) {
839
+ state.d = true;
840
+ t[k] = [];
841
+ }
842
+ t[k].push(t = Object.create(null));
843
+ state.c[state.i++] = state = { t: 1, d: false, i: 0, c: Object.create(null) };
844
+ }
845
+ if (state.d) {
846
+ return null;
847
+ }
848
+ state.d = true;
849
+ if (type === 1) {
850
+ t = hasOwn ? t[k] : t[k] = Object.create(null);
851
+ } else if (type === 0 && hasOwn) {
852
+ return null;
853
+ }
854
+ return [k, t, state.c];
855
+ }
856
+ function validateTablePeek(ctx, peek, ptr) {
857
+ if (peek === null || ctx.uk === 2)
858
+ TomlError.x(peek === null ? "trying to redefine an already defined table or value" : "document contains an unsafe property", ctx, ptr);
859
+ }
860
+ function parse(toml, options = {}) {
861
+ let ctx = {
862
+ s: toml,
863
+ p: 0,
864
+ d: options.maxDepth ?? 1000,
865
+ bi: options.integersAsBigInt ?? false,
866
+ ld: options.useLegacyDate ?? true,
867
+ uk: options.unsafeKeyBehaviour === "throw" ? 2 : options.unsafeKeyBehaviour === "drop" ? 1 : 0
868
+ };
869
+ let res = Object.create(null);
870
+ let meta = Object.create(null);
871
+ let tmp;
872
+ let skipping = false;
873
+ let tbl = res;
874
+ let m = meta;
875
+ if (toml.charCodeAt(0) === 65279)
876
+ ctx.p++;
877
+ skipVoid(ctx);
878
+ while (ctx.p < toml.length) {
879
+ if (toml.charCodeAt(ctx.p) === 91) {
880
+ let isTableArray = toml.charCodeAt(++ctx.p) === 91;
881
+ tmp = ctx.p += +isTableArray;
882
+ skipping = false;
883
+ let k = parseKey(ctx, 93);
884
+ if (isTableArray) {
885
+ if (toml.charCodeAt(ctx.p) !== 93) {
886
+ TomlError.x("expected end of table array declaration", ctx);
887
+ }
888
+ ctx.p++;
889
+ }
890
+ let p = peekTable(ctx, k, res, meta, isTableArray ? 2 : 1);
891
+ if (!p) {
892
+ validateTablePeek(ctx, p, tmp);
893
+ skipping = true;
894
+ } else {
895
+ m = p[2];
896
+ tbl = p[1];
897
+ }
898
+ } else {
899
+ tmp = ctx.p;
900
+ let k = parseKey(ctx);
901
+ let p = peekTable(ctx, k, tbl, m, 0);
902
+ if (!p && !skipping)
903
+ validateTablePeek(ctx, p, tmp);
904
+ skipVoid(ctx, true, true);
905
+ let v = extractValue(ctx, undefined);
906
+ if (p && !skipping)
907
+ p[1][p[0]] = v;
908
+ }
909
+ skipVoid(ctx, true);
910
+ if (ctx.p < toml.length && (tmp = toml.charCodeAt(ctx.p)) !== 10 && (tmp !== 13 || toml.charCodeAt(ctx.p + 1) !== 10)) {
911
+ TomlError.x("each key-value declaration must be followed by an end-of-line", ctx);
912
+ }
913
+ skipVoid(ctx);
914
+ }
915
+ return res;
916
+ }
917
+
918
+ // node_modules/smol-toml/dist/stringify.js
919
+ /*!
920
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
921
+ * SPDX-License-Identifier: BSD-3-Clause
922
+ *
923
+ * Redistribution and use in source and binary forms, with or without
924
+ * modification, are permitted provided that the following conditions are met:
925
+ *
926
+ * 1. Redistributions of source code must retain the above copyright notice, this
927
+ * list of conditions and the following disclaimer.
928
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
929
+ * this list of conditions and the following disclaimer in the
930
+ * documentation and/or other materials provided with the distribution.
931
+ * 3. Neither the name of the copyright holder nor the names of its contributors
932
+ * may be used to endorse or promote products derived from this software without
933
+ * specific prior written permission.
934
+ *
935
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
936
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
937
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
938
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
939
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
940
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
941
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
942
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
943
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
944
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
945
+ */
946
+ var HAS_WELLFORMED = !!"".isWellFormed;
947
+
948
+ // node_modules/smol-toml/dist/index.js
949
+ /*!
950
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
951
+ * SPDX-License-Identifier: BSD-3-Clause
952
+ *
953
+ * Redistribution and use in source and binary forms, with or without
954
+ * modification, are permitted provided that the following conditions are met:
955
+ *
956
+ * 1. Redistributions of source code must retain the above copyright notice, this
957
+ * list of conditions and the following disclaimer.
958
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
959
+ * this list of conditions and the following disclaimer in the
960
+ * documentation and/or other materials provided with the distribution.
961
+ * 3. Neither the name of the copyright holder nor the names of its contributors
962
+ * may be used to endorse or promote products derived from this software without
963
+ * specific prior written permission.
964
+ *
965
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
966
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
967
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
968
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
969
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
970
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
971
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
972
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
973
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
974
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
975
+ */
976
+
977
+ // src/lib/toml.ts
978
+ function parseToml(text) {
979
+ return parse(text);
980
+ }
981
+ function readToml(path) {
982
+ return parseToml(readFileSync(path, "utf8"));
983
+ }
984
+ function getTomlValue(text, table, key) {
985
+ let node = parseToml(text);
986
+ for (const part of table ? table.split(".") : []) {
987
+ node = node && typeof node === "object" ? node[part] : undefined;
988
+ }
989
+ return node && typeof node === "object" ? node[key] : undefined;
990
+ }
991
+ var unquote = (s) => s.trim().replace(/^(["'])(.*)\1$/, "$2");
992
+ function headerName(line) {
993
+ const m = line.match(/^\s*\[\[?\s*([^\]]+?)\s*\]\]?\s*(?:#.*)?$/);
994
+ if (!m)
995
+ return;
996
+ return m[1].split(".").map((p) => unquote(p)).join(".");
997
+ }
998
+ function valueEnd(line, i) {
999
+ const c = line[i];
1000
+ if (line.startsWith('"""', i) || line.startsWith("'''", i) || c === "[" || c === "{")
1001
+ return -1;
1002
+ if (c === '"') {
1003
+ for (let j2 = i + 1;j2 < line.length; j2++) {
1004
+ if (line[j2] === "\\")
1005
+ j2++;
1006
+ else if (line[j2] === '"')
1007
+ return j2 + 1;
1008
+ }
1009
+ return -1;
1010
+ }
1011
+ if (c === "'") {
1012
+ const j2 = line.indexOf("'", i + 1);
1013
+ return j2 < 0 ? -1 : j2 + 1;
1014
+ }
1015
+ let j = i;
1016
+ while (j < line.length && line[j] !== "#" && !/\s/.test(line[j]))
1017
+ j++;
1018
+ return j;
1019
+ }
1020
+ function encode(value, original) {
1021
+ if (typeof value !== "string")
1022
+ return String(value);
1023
+ if (original.startsWith("'") && !value.includes("'") && !/[\n\r]/.test(value))
1024
+ return `'${value}'`;
1025
+ return JSON.stringify(value);
1026
+ }
1027
+ function setTomlValue(text, table, key, value) {
1028
+ const lines = text.split(`
1029
+ `);
1030
+ let current = "";
1031
+ for (let n = 0;n < lines.length; n++) {
1032
+ const line = lines[n];
1033
+ const header = headerName(line);
1034
+ if (header !== undefined) {
1035
+ current = header;
1036
+ continue;
1037
+ }
1038
+ if (current !== table)
1039
+ continue;
1040
+ const m = line.match(/^(\s*)("[^"]*"|'[^']*'|[A-Za-z0-9_.-]+)(\s*=\s*)/);
1041
+ if (!m || unquote(m[2]) !== key)
1042
+ continue;
1043
+ const start = m[0].length;
1044
+ const end = valueEnd(line, start);
1045
+ if (end < 0)
1046
+ throw new Error(`${where(table, key)} is not a single-line value`);
1047
+ lines[n] = `${line.slice(0, start)}${encode(value, line.slice(start, end))}${line.slice(end)}`;
1048
+ const out = lines.join(`
1049
+ `);
1050
+ if (getTomlValue(out, table, key) !== value)
1051
+ throw new Error(`Could not set ${where(table, key)}`);
1052
+ return out;
1053
+ }
1054
+ throw new Error(`${where(table, key)} not found`);
1055
+ }
1056
+ var where = (table, key) => table ? `[${table}] ${key}` : key;
1057
+ export {
1058
+ setTomlValue,
1059
+ readToml,
1060
+ parseToml,
1061
+ getTomlValue
1062
+ };