@cimplify/cli 0.15.2 → 0.16.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 (120) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2 -2
  3. package/dist/add-SXC6RUPQ.mjs +140 -0
  4. package/dist/{add-KRIIKAS4.mjs → add-XQVQLD3F.mjs} +4 -4
  5. package/dist/ai-NQH5L4I6.mjs +17 -0
  6. package/dist/{assets-CWB72PZG.mjs → assets-FZGVOQXH.mjs} +12 -7
  7. package/dist/{auth-step-up-Z6KOTTV7.mjs → auth-step-up-67LCPDNL.mjs} +5 -5
  8. package/dist/build-J4ZUIOPX.mjs +625 -0
  9. package/dist/{cancel-ZHVVILOU.mjs → cancel-VGJHZJ4J.mjs} +4 -4
  10. package/dist/capture-RAJ2B3BH.mjs +69 -0
  11. package/dist/chunk-25ZPFHLF.mjs +51 -0
  12. package/dist/chunk-47ZXSY47.mjs +52 -0
  13. package/dist/{chunk-NK6VC264.mjs → chunk-54J3XR4T.mjs} +2 -2
  14. package/dist/chunk-5HP2INMY.mjs +10631 -0
  15. package/dist/chunk-7JR6JCFF.mjs +32 -0
  16. package/dist/chunk-7PQL7E7K.mjs +68 -0
  17. package/dist/chunk-AKACUJ3W.mjs +81 -0
  18. package/dist/chunk-BYNE553A.mjs +2945 -0
  19. package/dist/{chunk-NYXA6X56.mjs → chunk-CLQYPTJ2.mjs} +31 -11
  20. package/dist/chunk-CNZAOVSK.mjs +104 -0
  21. package/dist/chunk-CPBESPWK.mjs +5576 -0
  22. package/dist/{chunk-GRR5U2M5.mjs → chunk-DYWUPHV3.mjs} +11 -7
  23. package/dist/chunk-EAV2P4N3.mjs +1941 -0
  24. package/dist/{chunk-KN2YSKXZ.mjs → chunk-EDZSOL5O.mjs} +14 -6
  25. package/dist/chunk-EGQIPYUN.mjs +696 -0
  26. package/dist/{chunk-DMLQBAGC.mjs → chunk-EOO4UOQD.mjs} +1 -1
  27. package/dist/chunk-EYEMPIMP.mjs +74 -0
  28. package/dist/chunk-G2ZEFSQJ.mjs +46 -0
  29. package/dist/{chunk-TH4XENKH.mjs → chunk-I4HNHPEM.mjs} +1 -1
  30. package/dist/chunk-JEVSFNPT.mjs +363 -0
  31. package/dist/chunk-JKECUAAV.mjs +2169 -0
  32. package/dist/chunk-KMHORI4Y.mjs +638 -0
  33. package/dist/chunk-KNPYBZ6B.mjs +502 -0
  34. package/dist/{chunk-3QUK5BPY.mjs → chunk-KOD4GBQ5.mjs} +8 -1
  35. package/dist/chunk-KQNZKV6E.mjs +535 -0
  36. package/dist/{chunk-MXYUAJEW.mjs → chunk-LLRUOIMU.mjs} +5 -2
  37. package/dist/{chunk-F2UI225N.mjs → chunk-LNMITJ4Z.mjs} +6 -6
  38. package/dist/chunk-MEM3MDV4.mjs +6463 -0
  39. package/dist/chunk-NY4YT7O6.mjs +84 -0
  40. package/dist/{chunk-A6WHBSXZ.mjs → chunk-Q6CF4C3E.mjs} +15 -13
  41. package/dist/chunk-RP66A52P.mjs +86 -0
  42. package/dist/{chunk-I2UP7YTG.mjs → chunk-SAXGWS2K.mjs} +1 -1
  43. package/dist/chunk-SCKQ4XSD.mjs +41 -0
  44. package/dist/chunk-SF44L2OD.mjs +1152 -0
  45. package/dist/chunk-SGT5IJVW.mjs +28 -0
  46. package/dist/{chunk-WEAB6HHQ.mjs → chunk-SS4JTMIV.mjs} +8 -8
  47. package/dist/chunk-T4MW3PD4.mjs +1456 -0
  48. package/dist/chunk-THATLMEX.mjs +1227 -0
  49. package/dist/{chunk-MLE4MVYC.mjs → chunk-TT4YI33G.mjs} +2 -2
  50. package/dist/chunk-TYV2SVFN.mjs +101 -0
  51. package/dist/chunk-VHK7WBO3.mjs +189 -0
  52. package/dist/chunk-VSA44UKR.mjs +391 -0
  53. package/dist/chunk-XL54SQJ3.mjs +42 -0
  54. package/dist/{chunk-5KYR6WJB.mjs → chunk-XQAHREKO.mjs} +17 -1
  55. package/dist/chunk-ZUCDXRFI.mjs +2011 -0
  56. package/dist/create-4S2EAUR3.mjs +10 -0
  57. package/dist/credits-NJOAOPPW.mjs +33 -0
  58. package/dist/{deploy-JE6TUYCL.mjs → deploy-26Y4UGZZ.mjs} +14 -14
  59. package/dist/dev-MOYURRWQ.mjs +401 -0
  60. package/dist/dev-WL43Q7VD.mjs +8 -0
  61. package/dist/dispatcher.mjs +131 -30
  62. package/dist/{doctor-HFB4IBYK.mjs → doctor-E6ETD2GJ.mjs} +12 -19
  63. package/dist/{domains-BZKGIDF4.mjs → domains-LOTQMVOR.mjs} +6 -6
  64. package/dist/engine-runtime-fetch-CIE7S7PB.mjs +10 -0
  65. package/dist/{env-FZNXKLGL.mjs → env-3PDFC5XF.mjs} +7 -7
  66. package/dist/env-MOTYOPM5.mjs +19 -0
  67. package/dist/explain-K5QEVWCD.mjs +251 -0
  68. package/dist/{inspect-X3M7WSTL.mjs → inspect-Q3E2DHYY.mjs} +3 -3
  69. package/dist/inspect-SJ4WBAXO.mjs +86 -0
  70. package/dist/introspect-7F34YN5V.mjs +9 -0
  71. package/dist/kernel-DEGWMHFL.mjs +662 -0
  72. package/dist/kernel-plugin.js +6862 -0
  73. package/dist/keys-W5SN3DPK.mjs +71 -0
  74. package/dist/lines-XGJYTQ7P.mjs +56 -0
  75. package/dist/{link-4NM2QMI5.mjs → link-NKUAVNM2.mjs} +6 -5
  76. package/dist/{lint-DDZ7HUQN.mjs → lint-G4YPQSSO.mjs} +2 -2
  77. package/dist/{list-2MFOQKKQ.mjs → list-TDR7K2JB.mjs} +3 -3
  78. package/dist/lock-EJPW2LM3.mjs +57 -0
  79. package/dist/{login-RLMDEWAL.mjs → login-AYLU7JU7.mjs} +10 -8
  80. package/dist/{logout-Z57X6HPE.mjs → logout-3M6VMHLH.mjs} +2 -2
  81. package/dist/{logs-36BLYJHJ.mjs → logs-4EL5SOXN.mjs} +5 -5
  82. package/dist/logs-4QQGG2XY.mjs +44 -0
  83. package/dist/mcp-4R2R6E5M.mjs +1077 -0
  84. package/dist/{mock-EVER34IX.mjs → mock-AK24GSP2.mjs} +2 -2
  85. package/dist/outdated-JEKCVLTG.mjs +58 -0
  86. package/dist/port-SBZ7X3EH.mjs +2408 -0
  87. package/dist/{projects-4XRNHJAH.mjs → projects-7JKTC5WJ.mjs} +9 -7
  88. package/dist/publish-QQCX47HK.mjs +20 -0
  89. package/dist/remix-NLLYD3BI.mjs +125 -0
  90. package/dist/repo-Z4G4EW3N.mjs +9 -0
  91. package/dist/report-M7F4ZYP7.mjs +2 -0
  92. package/dist/rollback-2WQ2CW7T.mjs +43 -0
  93. package/dist/{rollback-WCRWXSE3.mjs → rollback-ZGU32HGT.mjs} +6 -6
  94. package/dist/scene-HXARHUM7.mjs +324 -0
  95. package/dist/{status-VA326DWD.mjs → status-C3ZSLZ7Q.mjs} +5 -5
  96. package/dist/status-WEQOC25K.mjs +18 -0
  97. package/dist/test-ZPBWV4VX.mjs +233 -0
  98. package/dist/testers-A3LMXOJJ.mjs +49 -0
  99. package/dist/{unlink-H3BO3DOQ.mjs → unlink-4G4FE4RJ.mjs} +2 -2
  100. package/dist/{update-YYOTN7MG.mjs → update-GHKKM5FS.mjs} +4 -4
  101. package/dist/{whoami-CQPPARRS.mjs → whoami-3QQN6G2A.mjs} +3 -3
  102. package/dist/workshop-CD74D2LK.mjs +1703 -0
  103. package/package.json +11 -7
  104. package/templates/storefront-auto/app/products/[slug]/page.tsx +1 -1
  105. package/templates/storefront-auto/package.json +1 -1
  106. package/templates/storefront-bakery/package.json +1 -1
  107. package/templates/storefront-fashion/app/products/[slug]/page.tsx +1 -1
  108. package/templates/storefront-fashion/package.json +1 -1
  109. package/templates/storefront-grocery/package.json +1 -1
  110. package/templates/storefront-pharmacy/app/products/[slug]/page.tsx +1 -1
  111. package/templates/storefront-pharmacy/package.json +1 -1
  112. package/templates/storefront-restaurant/package.json +1 -1
  113. package/templates/storefront-retail/app/products/[slug]/page.tsx +1 -1
  114. package/templates/storefront-retail/package.json +1 -1
  115. package/templates/storefront-services/package.json +1 -1
  116. package/dist/chunk-ARIDYKLO.mjs +0 -6463
  117. package/dist/dev-V7JSUVOI.mjs +0 -8
  118. package/dist/explain-O5AC73EE.mjs +0 -251
  119. package/dist/introspect-2NGESQZE.mjs +0 -8
  120. package/dist/repo-X3KZ5R64.mjs +0 -9
@@ -0,0 +1,535 @@
1
+ #!/usr/bin/env node
2
+ // src/interactives/toml.ts
3
+ var TomlSyntaxError = class extends Error {
4
+ line;
5
+ column;
6
+ reason;
7
+ constructor(reason, at) {
8
+ super(`${at.line}:${at.column}: ${reason}`);
9
+ this.name = "TomlSyntaxError";
10
+ this.reason = reason;
11
+ this.line = at.line;
12
+ this.column = at.column;
13
+ }
14
+ };
15
+ var CH_TAB = 9;
16
+ var CH_LF = 10;
17
+ var CH_CR = 13;
18
+ var CH_SPACE = 32;
19
+ var CH_QUOTE = 34;
20
+ var CH_HASH = 35;
21
+ var CH_APOS = 39;
22
+ var CH_PLUS = 43;
23
+ var CH_COMMA = 44;
24
+ var CH_MINUS = 45;
25
+ var CH_DOT = 46;
26
+ var CH_0 = 48;
27
+ var CH_9 = 57;
28
+ var CH_EQUALS = 61;
29
+ var CH_A = 65;
30
+ var CH_Z = 90;
31
+ var CH_LBRACKET = 91;
32
+ var CH_BACKSLASH = 92;
33
+ var CH_RBRACKET = 93;
34
+ var CH_UNDERSCORE = 95;
35
+ var CH_LOWER_A = 97;
36
+ var CH_LOWER_Z = 122;
37
+ var CH_LBRACE = 123;
38
+ var CH_RBRACE = 125;
39
+ var CH_DEL = 127;
40
+ var DATE_SEPARATOR_INDEX = 4;
41
+ var MAX_CODE_POINT = 1114111;
42
+ var SURROGATE_LOW = 55296;
43
+ var SURROGATE_HIGH = 57343;
44
+ function isBare(c) {
45
+ return c >= CH_A && c <= CH_Z || c >= CH_LOWER_A && c <= CH_LOWER_Z || c >= CH_0 && c <= CH_9 || c === CH_UNDERSCORE || c === CH_MINUS;
46
+ }
47
+ function isDigit(c) {
48
+ return c >= CH_0 && c <= CH_9;
49
+ }
50
+ function isControl(c) {
51
+ return c < CH_SPACE && c !== CH_TAB || c === CH_DEL;
52
+ }
53
+ var Cursor = class {
54
+ src;
55
+ pos = 0;
56
+ line = 1;
57
+ lineStart = 0;
58
+ constructor(src) {
59
+ this.src = src;
60
+ }
61
+ at() {
62
+ return { line: this.line, column: this.pos - this.lineStart + 1 };
63
+ }
64
+ peek(offset = 0) {
65
+ const i = this.pos + offset;
66
+ return i < this.src.length ? this.src.charCodeAt(i) : -1;
67
+ }
68
+ done() {
69
+ return this.pos >= this.src.length;
70
+ }
71
+ fail(reason, at = this.at()) {
72
+ throw new TomlSyntaxError(reason, at);
73
+ }
74
+ advance() {
75
+ this.pos++;
76
+ }
77
+ newline() {
78
+ if (this.peek() === CH_CR) {
79
+ if (this.peek(1) !== CH_LF) this.fail("carriage return must be followed by a line feed");
80
+ this.pos++;
81
+ }
82
+ this.pos++;
83
+ this.line++;
84
+ this.lineStart = this.pos;
85
+ }
86
+ isNewline() {
87
+ const c = this.peek();
88
+ return c === CH_LF || c === CH_CR && this.peek(1) === CH_LF;
89
+ }
90
+ skipSpaces() {
91
+ for (; ; ) {
92
+ const c = this.peek();
93
+ if (c !== CH_SPACE && c !== CH_TAB) return;
94
+ this.pos++;
95
+ }
96
+ }
97
+ skipComment() {
98
+ if (this.peek() !== CH_HASH) return;
99
+ while (!this.done() && !this.isNewline()) {
100
+ if (isControl(this.peek())) this.fail("control characters are not allowed in comments");
101
+ this.pos++;
102
+ }
103
+ }
104
+ skipBlank() {
105
+ for (; ; ) {
106
+ this.skipSpaces();
107
+ this.skipComment();
108
+ if (!this.isNewline()) return;
109
+ this.newline();
110
+ }
111
+ }
112
+ endOfLine() {
113
+ this.skipSpaces();
114
+ this.skipComment();
115
+ if (this.done()) return;
116
+ if (!this.isNewline()) this.fail(`unexpected ${describe(this.peek())} after value`);
117
+ this.newline();
118
+ }
119
+ };
120
+ function describe(c) {
121
+ if (c < 0) return "end of input";
122
+ if (c === CH_LF || c === CH_CR) return "end of line";
123
+ return `character '${String.fromCharCode(c)}'`;
124
+ }
125
+ function define(table, part, value) {
126
+ table.entries.set(part.name, value);
127
+ table.keyAt.set(part.name, part.at);
128
+ }
129
+ function newTable(at, origin) {
130
+ return { kind: "table", entries: /* @__PURE__ */ new Map(), keyAt: /* @__PURE__ */ new Map(), at, origin };
131
+ }
132
+ function parseKey(cur) {
133
+ const parts = [];
134
+ for (; ; ) {
135
+ cur.skipSpaces();
136
+ const at = cur.at();
137
+ const c = cur.peek();
138
+ let name;
139
+ if (c === CH_QUOTE) {
140
+ if (cur.peek(1) === CH_QUOTE && cur.peek(2) === CH_QUOTE) cur.fail("multi-line strings cannot be keys");
141
+ name = parseBasicString(cur);
142
+ } else if (c === CH_APOS) {
143
+ if (cur.peek(1) === CH_APOS && cur.peek(2) === CH_APOS) cur.fail("multi-line strings cannot be keys");
144
+ name = parseLiteralString(cur);
145
+ } else if (isBare(c)) {
146
+ const start = cur.pos;
147
+ while (isBare(cur.peek())) cur.advance();
148
+ name = cur.src.slice(start, cur.pos);
149
+ } else {
150
+ cur.fail(`expected a key, found ${describe(c)}`);
151
+ }
152
+ parts.push({ name, at });
153
+ cur.skipSpaces();
154
+ if (cur.peek() !== CH_DOT) return parts;
155
+ cur.advance();
156
+ }
157
+ }
158
+ function parseBasicString(cur) {
159
+ cur.advance();
160
+ let out = "";
161
+ let runStart = cur.pos;
162
+ for (; ; ) {
163
+ const c = cur.peek();
164
+ if (c < 0 || c === CH_LF || c === CH_CR) cur.fail("unterminated string");
165
+ if (c === CH_QUOTE) {
166
+ out += cur.src.slice(runStart, cur.pos);
167
+ cur.advance();
168
+ return out;
169
+ }
170
+ if (c === CH_BACKSLASH) {
171
+ out += cur.src.slice(runStart, cur.pos);
172
+ out += parseEscape(cur);
173
+ runStart = cur.pos;
174
+ continue;
175
+ }
176
+ if (isControl(c)) cur.fail("control characters must be escaped in strings");
177
+ cur.advance();
178
+ }
179
+ }
180
+ function parseMultilineBasicString(cur) {
181
+ cur.pos += 3;
182
+ if (cur.isNewline()) cur.newline();
183
+ let out = "";
184
+ let runStart = cur.pos;
185
+ for (; ; ) {
186
+ const c = cur.peek();
187
+ if (c < 0) cur.fail("unterminated multi-line string");
188
+ if (c === CH_QUOTE && cur.peek(1) === CH_QUOTE && cur.peek(2) === CH_QUOTE) {
189
+ let extra = 0;
190
+ while (extra < 2 && cur.peek(3 + extra) === CH_QUOTE) extra++;
191
+ out += cur.src.slice(runStart, cur.pos + extra);
192
+ cur.pos += 3 + extra;
193
+ return out;
194
+ }
195
+ if (c === CH_BACKSLASH) {
196
+ out += cur.src.slice(runStart, cur.pos);
197
+ const save = cur.pos;
198
+ cur.advance();
199
+ cur.skipSpaces();
200
+ if (cur.isNewline()) {
201
+ cur.skipBlank();
202
+ runStart = cur.pos;
203
+ continue;
204
+ }
205
+ cur.pos = save;
206
+ out += parseEscape(cur);
207
+ runStart = cur.pos;
208
+ continue;
209
+ }
210
+ if (cur.isNewline()) {
211
+ out += cur.src.slice(runStart, cur.pos);
212
+ out += "\n";
213
+ cur.newline();
214
+ runStart = cur.pos;
215
+ continue;
216
+ }
217
+ if (isControl(c)) cur.fail("control characters must be escaped in strings");
218
+ cur.advance();
219
+ }
220
+ }
221
+ function parseEscape(cur) {
222
+ const at = cur.at();
223
+ cur.advance();
224
+ const e = cur.peek();
225
+ cur.advance();
226
+ switch (e) {
227
+ case 98:
228
+ return "\b";
229
+ case 116:
230
+ return " ";
231
+ case 110:
232
+ return "\n";
233
+ case 102:
234
+ return "\f";
235
+ case 114:
236
+ return "\r";
237
+ case 101:
238
+ return "\x1B";
239
+ case CH_QUOTE:
240
+ return '"';
241
+ case CH_BACKSLASH:
242
+ return "\\";
243
+ case 120:
244
+ return unicodeEscape(cur, 2, at);
245
+ case 117:
246
+ return unicodeEscape(cur, 4, at);
247
+ case 85:
248
+ return unicodeEscape(cur, 8, at);
249
+ default:
250
+ return cur.fail(`invalid escape sequence \\${e < 0 ? "" : String.fromCharCode(e)}`, at);
251
+ }
252
+ }
253
+ function unicodeEscape(cur, digits, at) {
254
+ const hex = cur.src.slice(cur.pos, cur.pos + digits);
255
+ if (hex.length !== digits || !/^[0-9A-Fa-f]+$/.test(hex)) cur.fail(`escape needs ${digits} hex digits`, at);
256
+ const code = Number.parseInt(hex, 16);
257
+ if (code > MAX_CODE_POINT || code >= SURROGATE_LOW && code <= SURROGATE_HIGH) {
258
+ cur.fail("escape is not a Unicode scalar value", at);
259
+ }
260
+ cur.pos += digits;
261
+ return String.fromCodePoint(code);
262
+ }
263
+ function parseLiteralString(cur) {
264
+ cur.advance();
265
+ const start = cur.pos;
266
+ for (; ; ) {
267
+ const c = cur.peek();
268
+ if (c < 0 || c === CH_LF || c === CH_CR) cur.fail("unterminated string");
269
+ if (c === CH_APOS) {
270
+ const value = cur.src.slice(start, cur.pos);
271
+ cur.advance();
272
+ return value;
273
+ }
274
+ if (isControl(c)) cur.fail("control characters are not allowed in literal strings");
275
+ cur.advance();
276
+ }
277
+ }
278
+ function parseMultilineLiteralString(cur) {
279
+ cur.pos += 3;
280
+ if (cur.isNewline()) cur.newline();
281
+ let out = "";
282
+ let runStart = cur.pos;
283
+ for (; ; ) {
284
+ const c = cur.peek();
285
+ if (c < 0) cur.fail("unterminated multi-line string");
286
+ if (c === CH_APOS && cur.peek(1) === CH_APOS && cur.peek(2) === CH_APOS) {
287
+ let extra = 0;
288
+ while (extra < 2 && cur.peek(3 + extra) === CH_APOS) extra++;
289
+ out += cur.src.slice(runStart, cur.pos + extra);
290
+ cur.pos += 3 + extra;
291
+ return out;
292
+ }
293
+ if (cur.isNewline()) {
294
+ out += cur.src.slice(runStart, cur.pos);
295
+ out += "\n";
296
+ cur.newline();
297
+ runStart = cur.pos;
298
+ continue;
299
+ }
300
+ if (isControl(c)) cur.fail("control characters are not allowed in literal strings");
301
+ cur.advance();
302
+ }
303
+ }
304
+ var INTEGER_DEC = /^[+-]?(0|[1-9](_?[0-9])*)$/;
305
+ var INTEGER_HEX = /^0x[0-9A-Fa-f](_?[0-9A-Fa-f])*$/;
306
+ var INTEGER_OCT = /^0o[0-7](_?[0-7])*$/;
307
+ var INTEGER_BIN = /^0b[01](_?[01])*$/;
308
+ var FLOAT = /^[+-]?(0|[1-9](_?[0-9])*)(\.[0-9](_?[0-9])*)?([eE][+-]?[0-9](_?[0-9])*)?$/;
309
+ var FLOAT_SPECIAL = /^[+-]?(inf|nan)$/;
310
+ function parseNumberOrBool(cur) {
311
+ const at = cur.at();
312
+ const start = cur.pos;
313
+ for (; ; ) {
314
+ const c = cur.peek();
315
+ if (isBare(c) || c === CH_PLUS || c === CH_DOT) {
316
+ cur.advance();
317
+ continue;
318
+ }
319
+ break;
320
+ }
321
+ const raw = cur.src.slice(start, cur.pos);
322
+ if (raw.length === 0) cur.fail(`expected a value, found ${describe(cur.peek())}`, at);
323
+ if (raw === "true") return { kind: "boolean", value: true, at };
324
+ if (raw === "false") return { kind: "boolean", value: false, at };
325
+ if (raw.length > DATE_SEPARATOR_INDEX && isDigit(raw.charCodeAt(0)) && raw.charCodeAt(DATE_SEPARATOR_INDEX) === CH_MINUS) {
326
+ cur.fail("dates and times are not supported in this file", at);
327
+ }
328
+ if (cur.peek() === 58) cur.fail("dates and times are not supported in this file", at);
329
+ if (INTEGER_DEC.test(raw)) return integer(cur, Number(raw.replaceAll("_", "")), at);
330
+ if (INTEGER_HEX.test(raw) || INTEGER_OCT.test(raw) || INTEGER_BIN.test(raw)) {
331
+ return integer(cur, Number(raw.replaceAll("_", "")), at);
332
+ }
333
+ if (FLOAT_SPECIAL.test(raw)) {
334
+ const negative = raw.charCodeAt(0) === CH_MINUS;
335
+ const value = raw.endsWith("nan") ? Number.NaN : negative ? -Infinity : Infinity;
336
+ return { kind: "float", value, at };
337
+ }
338
+ if (FLOAT.test(raw)) return { kind: "float", value: Number(raw.replaceAll("_", "")), at };
339
+ return cur.fail(`invalid value '${raw}'`, at);
340
+ }
341
+ function integer(cur, value, at) {
342
+ if (!Number.isSafeInteger(value)) cur.fail("integer is outside the safe range", at);
343
+ return { kind: "integer", value, at };
344
+ }
345
+ function parseValue(cur) {
346
+ const at = cur.at();
347
+ const c = cur.peek();
348
+ if (c === CH_QUOTE) {
349
+ if (cur.peek(1) === CH_QUOTE && cur.peek(2) === CH_QUOTE) {
350
+ return { kind: "string", value: parseMultilineBasicString(cur), at };
351
+ }
352
+ return { kind: "string", value: parseBasicString(cur), at };
353
+ }
354
+ if (c === CH_APOS) {
355
+ if (cur.peek(1) === CH_APOS && cur.peek(2) === CH_APOS) {
356
+ return { kind: "string", value: parseMultilineLiteralString(cur), at };
357
+ }
358
+ return { kind: "string", value: parseLiteralString(cur), at };
359
+ }
360
+ if (c === CH_LBRACKET) return parseArray(cur);
361
+ if (c === CH_LBRACE) return parseInlineTable(cur);
362
+ return parseNumberOrBool(cur);
363
+ }
364
+ function parseArray(cur) {
365
+ const at = cur.at();
366
+ cur.advance();
367
+ const items = [];
368
+ for (; ; ) {
369
+ cur.skipBlank();
370
+ if (cur.peek() === CH_RBRACKET) {
371
+ cur.advance();
372
+ return { kind: "array", items, at, ofTables: false };
373
+ }
374
+ items.push(parseValue(cur));
375
+ cur.skipBlank();
376
+ const c = cur.peek();
377
+ if (c === CH_COMMA) {
378
+ cur.advance();
379
+ continue;
380
+ }
381
+ if (c === CH_RBRACKET) {
382
+ cur.advance();
383
+ return { kind: "array", items, at, ofTables: false };
384
+ }
385
+ cur.fail(`expected ',' or ']' in array, found ${describe(c)}`);
386
+ }
387
+ }
388
+ function parseInlineTable(cur) {
389
+ const table = newTable(cur.at(), "inline");
390
+ cur.advance();
391
+ cur.skipSpaces();
392
+ if (cur.peek() === CH_RBRACE) {
393
+ cur.advance();
394
+ return table;
395
+ }
396
+ for (; ; ) {
397
+ const key = parseKey(cur);
398
+ if (cur.peek() !== CH_EQUALS) cur.fail(`expected '=' after key, found ${describe(cur.peek())}`);
399
+ cur.advance();
400
+ cur.skipSpaces();
401
+ const value = parseValue(cur);
402
+ assignDotted(cur, table, key, value, "inline");
403
+ cur.skipSpaces();
404
+ const c = cur.peek();
405
+ if (c === CH_COMMA) {
406
+ cur.advance();
407
+ cur.skipSpaces();
408
+ if (cur.peek() === CH_RBRACE) cur.fail("trailing comma is not allowed in an inline table");
409
+ continue;
410
+ }
411
+ if (c === CH_RBRACE) {
412
+ cur.advance();
413
+ return table;
414
+ }
415
+ cur.fail(`expected ',' or '}' in inline table, found ${describe(c)}`);
416
+ }
417
+ }
418
+ function joinKey(parts, upTo) {
419
+ let out = "";
420
+ for (let i = 0; i <= upTo; i++) out += i === 0 ? parts[i].name : `.${parts[i].name}`;
421
+ return out;
422
+ }
423
+ function assignDotted(cur, root, key, value, scope) {
424
+ let table = root;
425
+ for (let i = 0; i < key.length - 1; i++) {
426
+ const part = key[i];
427
+ const existing = table.entries.get(part.name);
428
+ if (existing === void 0) {
429
+ const child = newTable(part.at, "dotted");
430
+ define(table, part, child);
431
+ table = child;
432
+ continue;
433
+ }
434
+ if (existing.kind !== "table" || existing.origin === "inline" || scope === "body" && existing.origin === "header") {
435
+ cur.fail(`key '${joinKey(key, i)}' is already defined`, part.at);
436
+ }
437
+ if (scope === "body" && existing.origin === "implicit") {
438
+ cur.fail(`key '${joinKey(key, i)}' is already defined as a table`, part.at);
439
+ }
440
+ table = existing;
441
+ }
442
+ const last = key[key.length - 1];
443
+ if (table.entries.has(last.name)) cur.fail(`key '${joinKey(key, key.length - 1)}' is already defined`, last.at);
444
+ define(table, last, value);
445
+ }
446
+ function openHeader(cur, root, key, arrayOfTables) {
447
+ let table = root;
448
+ for (let i = 0; i < key.length - 1; i++) {
449
+ const part = key[i];
450
+ const existing2 = table.entries.get(part.name);
451
+ if (existing2 === void 0) {
452
+ const child = newTable(part.at, "implicit");
453
+ define(table, part, child);
454
+ table = child;
455
+ continue;
456
+ }
457
+ if (existing2.kind === "array" && existing2.ofTables) {
458
+ table = existing2.items[existing2.items.length - 1];
459
+ continue;
460
+ }
461
+ if (existing2.kind !== "table" || existing2.origin === "inline") {
462
+ cur.fail(`key '${joinKey(key, i)}' is already defined as a value`, part.at);
463
+ }
464
+ table = existing2;
465
+ }
466
+ const last = key[key.length - 1];
467
+ const existing = table.entries.get(last.name);
468
+ if (arrayOfTables) {
469
+ const element = newTable(last.at, "array_element");
470
+ if (existing === void 0) {
471
+ define(table, last, { kind: "array", items: [element], at: last.at, ofTables: true });
472
+ return element;
473
+ }
474
+ if (existing.kind !== "array" || !existing.ofTables) {
475
+ cur.fail(`key '${joinKey(key, key.length - 1)}' is already defined and is not an array of tables`, last.at);
476
+ }
477
+ existing.items.push(element);
478
+ return element;
479
+ }
480
+ if (existing === void 0) {
481
+ const child = newTable(last.at, "header");
482
+ define(table, last, child);
483
+ return child;
484
+ }
485
+ if (existing.kind === "table" && existing.origin === "implicit") {
486
+ existing.origin = "header";
487
+ return existing;
488
+ }
489
+ return cur.fail(`table '${joinKey(key, key.length - 1)}' is already defined`, last.at);
490
+ }
491
+ function parseToml(source) {
492
+ const cur = new Cursor(source.charCodeAt(0) === 65279 ? source.slice(1) : source);
493
+ const root = newTable({ line: 1, column: 1 }, "root");
494
+ let current = root;
495
+ for (; ; ) {
496
+ cur.skipBlank();
497
+ if (cur.done()) return root;
498
+ if (cur.peek() === CH_LBRACKET) {
499
+ const arrayOfTables = cur.peek(1) === CH_LBRACKET;
500
+ cur.pos += arrayOfTables ? 2 : 1;
501
+ const key2 = parseKey(cur);
502
+ if (cur.peek() !== CH_RBRACKET || arrayOfTables && cur.peek(1) !== CH_RBRACKET) {
503
+ cur.fail(arrayOfTables ? "expected ']]' to close the table header" : "expected ']' to close the table header");
504
+ }
505
+ cur.pos += arrayOfTables ? 2 : 1;
506
+ current = openHeader(cur, root, key2, arrayOfTables);
507
+ cur.endOfLine();
508
+ continue;
509
+ }
510
+ const key = parseKey(cur);
511
+ if (cur.peek() !== CH_EQUALS) cur.fail(`expected '=' after key, found ${describe(cur.peek())}`);
512
+ cur.advance();
513
+ cur.skipSpaces();
514
+ if (cur.done() || cur.isNewline()) cur.fail("expected a value after '='");
515
+ const value = parseValue(cur);
516
+ assignDotted(cur, current, key, value, "body");
517
+ cur.endOfLine();
518
+ }
519
+ }
520
+ function quoteTomlString(value) {
521
+ let out = '"';
522
+ for (let i = 0; i < value.length; i++) {
523
+ const c = value.charCodeAt(i);
524
+ if (c === CH_QUOTE) out += '\\"';
525
+ else if (c === CH_BACKSLASH) out += "\\\\";
526
+ else if (c === CH_LF) out += "\\n";
527
+ else if (c === CH_TAB) out += "\\t";
528
+ else if (c === CH_CR) out += "\\r";
529
+ else if (c < CH_SPACE || c === CH_DEL) out += `\\u${c.toString(16).padStart(4, "0")}`;
530
+ else out += value[i];
531
+ }
532
+ return `${out}"`;
533
+ }
534
+
535
+ export { TomlSyntaxError, parseToml, quoteTomlString };
@@ -35,15 +35,18 @@ var DOMAIN_TYPE = {
35
35
  var SECRET_MASK = "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022";
36
36
  var PUBLIC_ENV_PREFIX = "NEXT_PUBLIC_";
37
37
  var REPO_PROVIDER = {
38
- FREESTYLE: "freestyle",
38
+ CODE_STORAGE: "code_storage",
39
39
  GITHUB: "github",
40
40
  GITEA: "gitea",
41
41
  EXTERNAL: "external"
42
42
  };
43
+ function isManagedRepoProvider(provider) {
44
+ return provider === REPO_PROVIDER.CODE_STORAGE;
45
+ }
43
46
  var REPO_PROVIDER_VALUES = new Set(Object.values(REPO_PROVIDER));
44
47
  var TOKEN_PURPOSE = {
45
48
  BUILD: "build",
46
49
  EDITOR: "editor"
47
50
  };
48
51
 
49
- export { DEPLOYMENT_STATUS, DEPLOY_TRIGGER, DOMAIN_TYPE, ENV_SCOPE, PUBLIC_ENV_PREFIX, REPO_PROVIDER, REPO_PROVIDER_VALUES, SECRET_MASK, TERMINAL_DEPLOYMENT_STATUSES, TOKEN_PURPOSE };
52
+ export { DEPLOYMENT_STATUS, DEPLOY_TRIGGER, DOMAIN_TYPE, ENV_SCOPE, PUBLIC_ENV_PREFIX, REPO_PROVIDER, REPO_PROVIDER_VALUES, SECRET_MASK, TERMINAL_DEPLOYMENT_STATUSES, TOKEN_PURPOSE, isManagedRepoProvider };
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import { parseEnvFile, formatEnvFile } from './chunk-I2UP7YTG.mjs';
3
- import { ENV_SCOPE, PUBLIC_ENV_PREFIX } from './chunk-MXYUAJEW.mjs';
4
- import { parseArgs, flagBool } from './chunk-5KYR6WJB.mjs';
5
- import { ApiClient } from './chunk-NYXA6X56.mjs';
6
- import { readAuth, readProjectLink } from './chunk-MLE4MVYC.mjs';
7
- import { info, CliError, CLI_ERROR_CODE, dim } from './chunk-3QUK5BPY.mjs';
2
+ import { parseEnvFile, formatEnvFile } from './chunk-SAXGWS2K.mjs';
3
+ import { ENV_SCOPE, PUBLIC_ENV_PREFIX } from './chunk-LLRUOIMU.mjs';
4
+ import { parseArgs, flagBool } from './chunk-XQAHREKO.mjs';
5
+ import { ApiClient } from './chunk-CLQYPTJ2.mjs';
6
+ import { readAuth, readProjectLink } from './chunk-TT4YI33G.mjs';
7
+ import { info, CliError, CLI_ERROR_CODE, dim } from './chunk-KOD4GBQ5.mjs';
8
8
  import { spawn } from 'child_process';
9
9
  import { promises } from 'fs';
10
10
  import path from 'path';