@elaraai/create-e3 1.0.110 → 1.0.112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // ../scaffold-core/dist/scaffold.js
4
- import { existsSync as existsSync2, mkdirSync as mkdirSync2, readdirSync as readdirSync2, readFileSync as readFileSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
5
- import { join as join2, relative as relative2 } from "node:path";
4
+ import { existsSync as existsSync3, mkdirSync as mkdirSync2, readdirSync as readdirSync2, readFileSync as readFileSync3, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
5
+ import { join as join3, relative as relative2 } from "node:path";
6
6
  import { spawnSync } from "node:child_process";
7
7
 
8
8
  // ../scaffold-core/dist/names.js
@@ -21,6 +21,13 @@ function deriveNames(rawName, cwd) {
21
21
  // ../scaffold-core/dist/packages.js
22
22
  import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
23
23
  import { join, relative } from "node:path";
24
+ var EAST_PY_DEPENDENCIES = [
25
+ "elaraai-east-py",
26
+ "elaraai-east-py-std",
27
+ "elaraai-east-py-io",
28
+ "elaraai-east-py-datascience",
29
+ "elaraai-east-py-cli"
30
+ ];
24
31
  var RUNTIMES = {
25
32
  // Python package/dir names must be import-safe (letters, digits, underscore).
26
33
  python: {
@@ -103,12 +110,8 @@ version = "0.1.0"
103
110
  description = "${names.displayName}"
104
111
  requires-python = ">=3.12"
105
112
  dependencies = [
106
- "elaraai-east-py",
107
- "elaraai-east-py-std",
108
- "elaraai-east-py-io",
109
- "elaraai-east-py-datascience",
110
- "elaraai-east-py-cli",
111
- ]
113
+ ${EAST_PY_DEPENDENCIES.map((name) => ` "${name}",
114
+ `).join("")}]
112
115
 
113
116
  # This project is a uv workspace root: each package under packages/python/*
114
117
  # is its own member with its own dependency closure (and its own captured
@@ -223,7 +226,7 @@ function generatePackages(options) {
223
226
  }
224
227
  }
225
228
  if (members.length === 0)
226
- return;
229
+ return false;
227
230
  for (const runtime of RUNTIME_ORDER) {
228
231
  if ((spec[runtime]?.length ?? 0) > 0 && !existsSync(join(templateRoot, RUNTIMES[runtime].templateName))) {
229
232
  throw new Error(`${RUNTIMES[runtime].label} packages are not available in this scaffold yet \u2014 remove --${runtime}-packages for now`);
@@ -242,6 +245,830 @@ function generatePackages(options) {
242
245
  writeAppWiring(projectDir, names, members);
243
246
  const summary = RUNTIME_ORDER.map((r) => ({ r, n: members.filter((m) => m.runtime === r).length })).filter((x) => x.n > 0).map((x) => `${x.n} ${RUNTIMES[x.r].label}`).join(", ");
244
247
  log(`Generated ${members.length} workspace package${members.length === 1 ? "" : "s"} (${summary}).`);
248
+ return py.length > 0;
249
+ }
250
+
251
+ // ../scaffold-core/dist/pins.js
252
+ import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
253
+ import { join as join2 } from "node:path";
254
+
255
+ // ../../../../node_modules/.pnpm/smol-toml@1.7.0/node_modules/smol-toml/dist/date.js
256
+ var DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
257
+ var TomlDate = class _TomlDate extends Date {
258
+ #hasDate = false;
259
+ #hasTime = false;
260
+ #offset = null;
261
+ constructor(date) {
262
+ let hasDate = true;
263
+ let hasTime = true;
264
+ let offset = "Z";
265
+ if (typeof date === "string") {
266
+ let match = date.match(DATE_TIME_RE);
267
+ if (match) {
268
+ if (!match[1]) {
269
+ hasDate = false;
270
+ date = `0000-01-01T${date}`;
271
+ }
272
+ hasTime = !!match[2];
273
+ hasTime && date[10] === " " && (date = date.replace(" ", "T"));
274
+ if (match[2] && +match[2] > 23) {
275
+ date = "";
276
+ } else {
277
+ offset = match[3] || null;
278
+ date = date.toUpperCase();
279
+ if (!offset && hasTime)
280
+ date += "Z";
281
+ }
282
+ } else {
283
+ date = "";
284
+ }
285
+ }
286
+ super(date);
287
+ if (!isNaN(this.getTime())) {
288
+ this.#hasDate = hasDate;
289
+ this.#hasTime = hasTime;
290
+ this.#offset = offset;
291
+ }
292
+ }
293
+ isDateTime() {
294
+ return this.#hasDate && this.#hasTime;
295
+ }
296
+ isLocal() {
297
+ return !this.#hasDate || !this.#hasTime || !this.#offset;
298
+ }
299
+ isDate() {
300
+ return this.#hasDate && !this.#hasTime;
301
+ }
302
+ isTime() {
303
+ return this.#hasTime && !this.#hasDate;
304
+ }
305
+ isValid() {
306
+ return this.#hasDate || this.#hasTime;
307
+ }
308
+ toISOString() {
309
+ let iso = super.toISOString();
310
+ if (this.isDate())
311
+ return iso.slice(0, 10);
312
+ if (this.isTime())
313
+ return iso.slice(11, 23);
314
+ if (this.#offset === null)
315
+ return iso.slice(0, -1);
316
+ if (this.#offset === "Z")
317
+ return iso;
318
+ let offset = +this.#offset.slice(1, 3) * 60 + +this.#offset.slice(4, 6);
319
+ offset = this.#offset[0] === "-" ? offset : -offset;
320
+ let offsetDate = new Date(this.getTime() - offset * 6e4);
321
+ return offsetDate.toISOString().slice(0, -1) + this.#offset;
322
+ }
323
+ static wrapAsOffsetDateTime(jsDate, offset = "Z") {
324
+ let date = new _TomlDate(jsDate);
325
+ date.#offset = offset;
326
+ return date;
327
+ }
328
+ static wrapAsLocalDateTime(jsDate) {
329
+ let date = new _TomlDate(jsDate);
330
+ date.#offset = null;
331
+ return date;
332
+ }
333
+ static wrapAsLocalDate(jsDate) {
334
+ let date = new _TomlDate(jsDate);
335
+ date.#hasTime = false;
336
+ date.#offset = null;
337
+ return date;
338
+ }
339
+ static wrapAsLocalTime(jsDate) {
340
+ let date = new _TomlDate(jsDate);
341
+ date.#hasDate = false;
342
+ date.#offset = null;
343
+ return date;
344
+ }
345
+ };
346
+
347
+ // ../../../../node_modules/.pnpm/smol-toml@1.7.0/node_modules/smol-toml/dist/error.js
348
+ function getLineColFromPtr(string, ptr) {
349
+ let lines = string.slice(0, ptr).split(/\r\n|\n|\r/g);
350
+ return [lines.length, lines.pop().length + 1];
351
+ }
352
+ function makeCodeBlock(string, line, column) {
353
+ let lines = string.split(/\r\n|\n|\r/g);
354
+ let codeblock = "";
355
+ let numberLen = (Math.log10(line + 1) | 0) + 1;
356
+ for (let i = line - 1; i <= line + 1; i++) {
357
+ let l = lines[i - 1];
358
+ if (!l)
359
+ continue;
360
+ codeblock += i.toString().padEnd(numberLen, " ");
361
+ codeblock += ": ";
362
+ codeblock += l;
363
+ codeblock += "\n";
364
+ if (i === line) {
365
+ codeblock += " ".repeat(numberLen + column + 2);
366
+ codeblock += "^\n";
367
+ }
368
+ }
369
+ return codeblock;
370
+ }
371
+ var TomlError = class extends Error {
372
+ line;
373
+ column;
374
+ codeblock;
375
+ constructor(message, options) {
376
+ const [line, column] = getLineColFromPtr(options.toml, options.ptr);
377
+ const codeblock = makeCodeBlock(options.toml, line, column);
378
+ super(`Invalid TOML document: ${message}
379
+
380
+ ${codeblock}`, options);
381
+ this.line = line;
382
+ this.column = column;
383
+ this.codeblock = codeblock;
384
+ }
385
+ };
386
+
387
+ // ../../../../node_modules/.pnpm/smol-toml@1.7.0/node_modules/smol-toml/dist/primitive.js
388
+ var INT_REGEX = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/;
389
+ var FLOAT_REGEX = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/;
390
+ var LEADING_ZERO = /^[+-]?0[0-9_]/;
391
+ function parseString(str, ptr) {
392
+ let c = str[ptr++];
393
+ let first = c;
394
+ let isLiteral = c === "'";
395
+ let isMultiline = c === str[ptr] && c === str[ptr + 1];
396
+ if (isMultiline) {
397
+ if (str[ptr += 2] === "\n")
398
+ ptr++;
399
+ else if (str[ptr] === "\r" && str[ptr + 1] === "\n")
400
+ ptr += 2;
401
+ }
402
+ let parsed = "";
403
+ let sliceStart = ptr;
404
+ let state = 0;
405
+ for (let i = ptr; i < str.length; i++) {
406
+ c = str[i];
407
+ if (isMultiline && (c === "\n" || c === "\r" && str[i + 1] === "\n")) {
408
+ state = state && 3;
409
+ } else if (c < " " && c !== " " || c === "\x7F") {
410
+ throw new TomlError("control characters are not allowed in strings", {
411
+ toml: str,
412
+ ptr: i
413
+ });
414
+ } else if ((!state || state === 3) && c === first && (!isMultiline || str[i + 1] === first && str[i + 2] === first)) {
415
+ if (isMultiline) {
416
+ if (str[i + 3] === first)
417
+ i++;
418
+ if (str[i + 3] === first)
419
+ i++;
420
+ }
421
+ return [
422
+ // If we're in a newline escape still, then there's nothing to add.
423
+ // Also try to avoid concat if there's nothing to add to parsed, or nothing has been added to parsed.
424
+ state ? parsed : parsed + str.slice(sliceStart, i),
425
+ i + (isMultiline ? 3 : 1)
426
+ ];
427
+ } else if (!state) {
428
+ if (!isLiteral && c === "\\") {
429
+ parsed += str.slice(sliceStart, sliceStart = i);
430
+ state = 1;
431
+ }
432
+ } else if (state === 1) {
433
+ if (c === "x" || c === "u" || c === "U") {
434
+ let value = 0;
435
+ let len = c === "x" ? 2 : c === "u" ? 4 : 8;
436
+ for (let j = 0; j < len; j++, i++) {
437
+ let hex = str.charCodeAt(i + 1);
438
+ let digit = (
439
+ /* 0-9 */
440
+ hex >= 48 && hex <= 57 ? hex - 48 : (
441
+ /* A-F */
442
+ hex >= 65 && hex <= 70 ? hex - 65 + 10 : (
443
+ /* a-f */
444
+ hex >= 97 && hex <= 102 ? hex - 97 + 10 : -1
445
+ )
446
+ )
447
+ );
448
+ if (digit < 0)
449
+ throw new TomlError("invalid non-hex character in unicode escape", { toml: str, ptr: i + 1 });
450
+ value = value << 4 | digit;
451
+ }
452
+ if (value < 0 || value > 1114111 || value >= 55296 && value <= 57343) {
453
+ throw new TomlError("invalid unicode escape", { toml: str, ptr: i });
454
+ }
455
+ parsed += String.fromCodePoint(value);
456
+ sliceStart = i + 1;
457
+ state = 0;
458
+ } else if (c === " " || c === " ") {
459
+ state = 2;
460
+ } else {
461
+ if (c === "b")
462
+ parsed += "\b";
463
+ else if (c === "t")
464
+ parsed += " ";
465
+ else if (c === "n")
466
+ parsed += "\n";
467
+ else if (c === "f")
468
+ parsed += "\f";
469
+ else if (c === "r")
470
+ parsed += "\r";
471
+ else if (c === "e")
472
+ parsed += "\x1B";
473
+ else if (c === '"')
474
+ parsed += '"';
475
+ else if (c === "\\")
476
+ parsed += "\\";
477
+ else
478
+ throw new TomlError("unrecognized escape sequence", { toml: str, ptr: i });
479
+ sliceStart = i + 1;
480
+ state = 0;
481
+ }
482
+ } else if (c !== " " && c !== " ") {
483
+ if (state === 2) {
484
+ throw new TomlError("invalid escape: only line-ending whitespace may be escaped", {
485
+ toml: str,
486
+ ptr: sliceStart
487
+ });
488
+ }
489
+ state = !isLiteral && c === "\\" ? 1 : 0;
490
+ sliceStart = i;
491
+ }
492
+ }
493
+ throw new TomlError("unfinished string", { toml: str, ptr });
494
+ }
495
+ function parseValue(value, toml, ptr, integersAsBigInt) {
496
+ if (value === "true")
497
+ return true;
498
+ if (value === "false")
499
+ return false;
500
+ if (value === "-inf")
501
+ return -Infinity;
502
+ if (value === "inf" || value === "+inf")
503
+ return Infinity;
504
+ if (value === "nan" || value === "+nan" || value === "-nan")
505
+ return NaN;
506
+ if (value === "-0")
507
+ return integersAsBigInt ? 0n : 0;
508
+ let isInt = INT_REGEX.test(value);
509
+ if (isInt || FLOAT_REGEX.test(value)) {
510
+ if (LEADING_ZERO.test(value)) {
511
+ throw new TomlError("leading zeroes are not allowed", {
512
+ toml,
513
+ ptr
514
+ });
515
+ }
516
+ value = value.replace(/_/g, "");
517
+ let numeric = +value;
518
+ if (isNaN(numeric)) {
519
+ throw new TomlError("invalid number", {
520
+ toml,
521
+ ptr
522
+ });
523
+ }
524
+ if (isInt) {
525
+ if ((isInt = !Number.isSafeInteger(numeric)) && !integersAsBigInt) {
526
+ throw new TomlError("integer value cannot be represented losslessly", {
527
+ toml,
528
+ ptr
529
+ });
530
+ }
531
+ if (isInt || integersAsBigInt === true)
532
+ numeric = BigInt(value);
533
+ }
534
+ return numeric;
535
+ }
536
+ const date = new TomlDate(value);
537
+ if (!date.isValid()) {
538
+ throw new TomlError("invalid value", {
539
+ toml,
540
+ ptr
541
+ });
542
+ }
543
+ return date;
544
+ }
545
+
546
+ // ../../../../node_modules/.pnpm/smol-toml@1.7.0/node_modules/smol-toml/dist/util.js
547
+ function indexOfNewline(str, start = 0, end = str.length) {
548
+ let idx = str.indexOf("\n", start);
549
+ if (str[idx - 1] === "\r")
550
+ idx--;
551
+ return idx <= end ? idx : -1;
552
+ }
553
+ function skipComment(str, ptr) {
554
+ for (let i = ptr; i < str.length; i++) {
555
+ let c = str[i];
556
+ if (c === "\n")
557
+ return i;
558
+ if (c === "\r" && str[i + 1] === "\n")
559
+ return i + 1;
560
+ if (c < " " && c !== " " || c === "\x7F") {
561
+ throw new TomlError("control characters are not allowed in comments", {
562
+ toml: str,
563
+ ptr
564
+ });
565
+ }
566
+ }
567
+ return str.length;
568
+ }
569
+ function skipVoid(str, ptr, banNewLines, banComments) {
570
+ let c;
571
+ while (1) {
572
+ while ((c = str[ptr]) === " " || c === " " || !banNewLines && (c === "\n" || c === "\r" && str[ptr + 1] === "\n"))
573
+ ptr++;
574
+ if (banComments || c !== "#")
575
+ break;
576
+ ptr = skipComment(str, ptr);
577
+ }
578
+ return ptr;
579
+ }
580
+ function skipUntil(str, ptr, sep, end, banNewLines = false) {
581
+ if (!end) {
582
+ ptr = indexOfNewline(str, ptr);
583
+ return ptr < 0 ? str.length : ptr;
584
+ }
585
+ for (let i = ptr; i < str.length; i++) {
586
+ let c = str[i];
587
+ if (c === "#") {
588
+ i = indexOfNewline(str, i);
589
+ } else if (c === sep) {
590
+ return i + 1;
591
+ } else if (c === end || banNewLines && (c === "\n" || c === "\r" && str[i + 1] === "\n")) {
592
+ return i;
593
+ }
594
+ }
595
+ throw new TomlError("cannot find end of structure", {
596
+ toml: str,
597
+ ptr
598
+ });
599
+ }
600
+
601
+ // ../../../../node_modules/.pnpm/smol-toml@1.7.0/node_modules/smol-toml/dist/extract.js
602
+ function sliceAndTrimEndOf(str, startPtr, endPtr) {
603
+ let value = str.slice(startPtr, endPtr);
604
+ let commentIdx = value.indexOf("#");
605
+ if (commentIdx > -1) {
606
+ skipComment(str, commentIdx);
607
+ value = value.slice(0, commentIdx);
608
+ }
609
+ return [value.trimEnd(), commentIdx];
610
+ }
611
+ function extractValue(str, ptr, end, depth, integersAsBigInt) {
612
+ if (depth === 0) {
613
+ throw new TomlError("document contains excessively nested structures. aborting.", {
614
+ toml: str,
615
+ ptr
616
+ });
617
+ }
618
+ let c = str[ptr];
619
+ if (c === "[" || c === "{") {
620
+ let [value, endPtr2] = c === "[" ? parseArray(str, ptr, depth, integersAsBigInt) : parseInlineTable(str, ptr, depth, integersAsBigInt);
621
+ if (end) {
622
+ endPtr2 = skipVoid(str, endPtr2);
623
+ if (str[endPtr2] === ",")
624
+ endPtr2++;
625
+ else if (str[endPtr2] !== end) {
626
+ throw new TomlError("expected comma or end of structure", {
627
+ toml: str,
628
+ ptr: endPtr2
629
+ });
630
+ }
631
+ }
632
+ return [value, endPtr2];
633
+ }
634
+ if (c === '"' || c === "'") {
635
+ let [parsed, endPtr2] = parseString(str, ptr);
636
+ if (end) {
637
+ endPtr2 = skipVoid(str, endPtr2);
638
+ if (str[endPtr2] && str[endPtr2] !== "," && str[endPtr2] !== end && str[endPtr2] !== "\n" && str[endPtr2] !== "\r") {
639
+ throw new TomlError("unexpected character encountered", {
640
+ toml: str,
641
+ ptr: endPtr2
642
+ });
643
+ }
644
+ if (str[endPtr2] === ",")
645
+ endPtr2++;
646
+ }
647
+ return [parsed, endPtr2];
648
+ }
649
+ let endPtr = skipUntil(str, ptr, ",", end);
650
+ let slice = sliceAndTrimEndOf(str, ptr, endPtr - (str[endPtr - 1] === "," ? 1 : 0));
651
+ if (!slice[0]) {
652
+ throw new TomlError("incomplete key-value declaration: no value specified", {
653
+ toml: str,
654
+ ptr
655
+ });
656
+ }
657
+ if (end && slice[1] > -1) {
658
+ endPtr = skipVoid(str, ptr + slice[1]);
659
+ if (str[endPtr] === ",")
660
+ endPtr++;
661
+ }
662
+ return [
663
+ parseValue(slice[0], str, ptr, integersAsBigInt),
664
+ endPtr
665
+ ];
666
+ }
667
+
668
+ // ../../../../node_modules/.pnpm/smol-toml@1.7.0/node_modules/smol-toml/dist/struct.js
669
+ var KEY_PART_RE = /^[a-zA-Z0-9-_]+[ \t]*$/;
670
+ function parseKey(str, ptr, end = "=") {
671
+ let dot = ptr - 1;
672
+ let parsed = [];
673
+ let endPtr = str.indexOf(end, ptr);
674
+ if (endPtr < 0) {
675
+ throw new TomlError("incomplete key-value: cannot find end of key", {
676
+ toml: str,
677
+ ptr
678
+ });
679
+ }
680
+ do {
681
+ let c = str[ptr = ++dot];
682
+ if (c !== " " && c !== " ") {
683
+ if (c === '"' || c === "'") {
684
+ if (c === str[ptr + 1] && c === str[ptr + 2]) {
685
+ throw new TomlError("multiline strings are not allowed in keys", {
686
+ toml: str,
687
+ ptr
688
+ });
689
+ }
690
+ let [part, eos] = parseString(str, ptr);
691
+ dot = str.indexOf(".", eos);
692
+ let strEnd = str.slice(eos, dot < 0 || dot > endPtr ? endPtr : dot);
693
+ let newLine = indexOfNewline(strEnd);
694
+ if (newLine > -1) {
695
+ throw new TomlError("newlines are not allowed in keys", {
696
+ toml: str,
697
+ ptr: ptr + dot + newLine
698
+ });
699
+ }
700
+ if (strEnd.trimStart()) {
701
+ throw new TomlError("found extra tokens after the string part", {
702
+ toml: str,
703
+ ptr: eos
704
+ });
705
+ }
706
+ if (endPtr < eos) {
707
+ endPtr = str.indexOf(end, eos);
708
+ if (endPtr < 0) {
709
+ throw new TomlError("incomplete key-value: cannot find end of key", {
710
+ toml: str,
711
+ ptr
712
+ });
713
+ }
714
+ }
715
+ parsed.push(part);
716
+ } else {
717
+ dot = str.indexOf(".", ptr);
718
+ let part = str.slice(ptr, dot < 0 || dot > endPtr ? endPtr : dot);
719
+ if (!KEY_PART_RE.test(part)) {
720
+ throw new TomlError("only letter, numbers, dashes and underscores are allowed in keys", {
721
+ toml: str,
722
+ ptr
723
+ });
724
+ }
725
+ parsed.push(part.trimEnd());
726
+ }
727
+ }
728
+ } while (dot + 1 && dot < endPtr);
729
+ return [parsed, skipVoid(str, endPtr + 1, true, true)];
730
+ }
731
+ function parseInlineTable(str, ptr, depth, integersAsBigInt) {
732
+ let res = {};
733
+ let seen = /* @__PURE__ */ new Set();
734
+ let c;
735
+ ptr++;
736
+ while ((c = str[ptr++]) !== "}" && c) {
737
+ if (c === ",") {
738
+ throw new TomlError("expected value, found comma", {
739
+ toml: str,
740
+ ptr: ptr - 1
741
+ });
742
+ } else if (c === "#")
743
+ ptr = skipComment(str, ptr);
744
+ else if (c !== " " && c !== " " && c !== "\n" && c !== "\r") {
745
+ let k;
746
+ let t = res;
747
+ let hasOwn = false;
748
+ let [key, keyEndPtr] = parseKey(str, ptr - 1);
749
+ for (let i = 0; i < key.length; i++) {
750
+ if (i)
751
+ t = hasOwn ? t[k] : t[k] = {};
752
+ k = key[i];
753
+ if ((hasOwn = Object.hasOwn(t, k)) && (typeof t[k] !== "object" || seen.has(t[k]))) {
754
+ throw new TomlError("trying to redefine an already defined value", {
755
+ toml: str,
756
+ ptr
757
+ });
758
+ }
759
+ if (!hasOwn && k === "__proto__") {
760
+ Object.defineProperty(t, k, { enumerable: true, configurable: true, writable: true });
761
+ }
762
+ }
763
+ if (hasOwn) {
764
+ throw new TomlError("trying to redefine an already defined value", {
765
+ toml: str,
766
+ ptr
767
+ });
768
+ }
769
+ let [value, valueEndPtr] = extractValue(str, keyEndPtr, "}", depth - 1, integersAsBigInt);
770
+ seen.add(value);
771
+ t[k] = value;
772
+ ptr = valueEndPtr;
773
+ }
774
+ }
775
+ if (!c) {
776
+ throw new TomlError("unfinished table encountered", {
777
+ toml: str,
778
+ ptr
779
+ });
780
+ }
781
+ return [res, ptr];
782
+ }
783
+ function parseArray(str, ptr, depth, integersAsBigInt) {
784
+ let res = [];
785
+ let c;
786
+ ptr++;
787
+ while ((c = str[ptr++]) !== "]" && c) {
788
+ if (c === ",") {
789
+ throw new TomlError("expected value, found comma", {
790
+ toml: str,
791
+ ptr: ptr - 1
792
+ });
793
+ } else if (c === "#")
794
+ ptr = skipComment(str, ptr);
795
+ else if (c !== " " && c !== " " && c !== "\n" && c !== "\r") {
796
+ let e = extractValue(str, ptr - 1, "]", depth - 1, integersAsBigInt);
797
+ res.push(e[0]);
798
+ ptr = e[1];
799
+ }
800
+ }
801
+ if (!c) {
802
+ throw new TomlError("unfinished array encountered", {
803
+ toml: str,
804
+ ptr
805
+ });
806
+ }
807
+ return [res, ptr];
808
+ }
809
+
810
+ // ../../../../node_modules/.pnpm/smol-toml@1.7.0/node_modules/smol-toml/dist/parse.js
811
+ function peekTable(key, table, meta, type) {
812
+ let t = table;
813
+ let m = meta;
814
+ let k;
815
+ let hasOwn = false;
816
+ let state;
817
+ for (let i = 0; i < key.length; i++) {
818
+ if (i) {
819
+ t = hasOwn ? t[k] : t[k] = {};
820
+ m = (state = m[k]).c;
821
+ if (type === 0 && (state.t === 1 || state.t === 2)) {
822
+ return null;
823
+ }
824
+ if (state.t === 2) {
825
+ let l = t.length - 1;
826
+ t = t[l];
827
+ m = m[l].c;
828
+ }
829
+ }
830
+ k = key[i];
831
+ if ((hasOwn = Object.hasOwn(t, k)) && m[k]?.t === 0 && m[k]?.d) {
832
+ return null;
833
+ }
834
+ if (!hasOwn) {
835
+ if (k === "__proto__") {
836
+ Object.defineProperty(t, k, { enumerable: true, configurable: true, writable: true });
837
+ Object.defineProperty(m, k, { enumerable: true, configurable: true, writable: true });
838
+ }
839
+ m[k] = {
840
+ t: i < key.length - 1 && type === 2 ? 3 : type,
841
+ d: false,
842
+ i: 0,
843
+ c: {}
844
+ };
845
+ }
846
+ }
847
+ state = m[k];
848
+ if (state.t !== type && !(type === 1 && state.t === 3)) {
849
+ return null;
850
+ }
851
+ if (type === 2) {
852
+ if (!state.d) {
853
+ state.d = true;
854
+ t[k] = [];
855
+ }
856
+ t[k].push(t = {});
857
+ state.c[state.i++] = state = { t: 1, d: false, i: 0, c: {} };
858
+ }
859
+ if (state.d) {
860
+ return null;
861
+ }
862
+ state.d = true;
863
+ if (type === 1) {
864
+ t = hasOwn ? t[k] : t[k] = {};
865
+ } else if (type === 0 && hasOwn) {
866
+ return null;
867
+ }
868
+ return [k, t, state.c];
869
+ }
870
+ function parse(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
871
+ let res = {};
872
+ let meta = {};
873
+ let tbl = res;
874
+ let m = meta;
875
+ for (let ptr = skipVoid(toml, 0); ptr < toml.length; ) {
876
+ if (toml[ptr] === "[") {
877
+ let isTableArray = toml[++ptr] === "[";
878
+ let k = parseKey(toml, ptr += +isTableArray, "]");
879
+ if (isTableArray) {
880
+ if (toml[k[1] - 1] !== "]") {
881
+ throw new TomlError("expected end of table declaration", {
882
+ toml,
883
+ ptr: k[1] - 1
884
+ });
885
+ }
886
+ k[1]++;
887
+ }
888
+ let p = peekTable(
889
+ k[0],
890
+ res,
891
+ meta,
892
+ isTableArray ? 2 : 1
893
+ /* Type.EXPLICIT */
894
+ );
895
+ if (!p) {
896
+ throw new TomlError("trying to redefine an already defined table or value", {
897
+ toml,
898
+ ptr
899
+ });
900
+ }
901
+ m = p[2];
902
+ tbl = p[1];
903
+ ptr = k[1];
904
+ } else {
905
+ let k = parseKey(toml, ptr);
906
+ let p = peekTable(
907
+ k[0],
908
+ tbl,
909
+ m,
910
+ 0
911
+ /* Type.DOTTED */
912
+ );
913
+ if (!p) {
914
+ throw new TomlError("trying to redefine an already defined table or value", {
915
+ toml,
916
+ ptr
917
+ });
918
+ }
919
+ let v = extractValue(toml, k[1], void 0, maxDepth, integersAsBigInt);
920
+ p[1][p[0]] = v[0];
921
+ ptr = v[1];
922
+ }
923
+ ptr = skipVoid(toml, ptr, true);
924
+ if (toml[ptr] && toml[ptr] !== "\n" && toml[ptr] !== "\r") {
925
+ throw new TomlError("each key-value declaration must be followed by an end-of-line", {
926
+ toml,
927
+ ptr
928
+ });
929
+ }
930
+ ptr = skipVoid(toml, ptr);
931
+ }
932
+ return res;
933
+ }
934
+
935
+ // ../scaffold-core/dist/util.js
936
+ function isPlainObject(value) {
937
+ return typeof value === "object" && value !== null && !Array.isArray(value);
938
+ }
939
+
940
+ // ../scaffold-core/dist/pins.js
941
+ var RELEASE_PINS_FILE = "_release-pins.json";
942
+ var BLOCK_START = "# >>> east release pins";
943
+ var BLOCK_END = "# <<< east release pins";
944
+ var UV_TABLE = /^\s*\[\s*(tool|"tool"|'tool')\s*\.\s*(uv|"uv"|'uv')\s*\]\s*(#.*)?$/;
945
+ function isStrings(value) {
946
+ return Array.isArray(value) && value.every((item) => typeof item === "string");
947
+ }
948
+ function readReleasePins(templateDir) {
949
+ const path = join2(templateDir, RELEASE_PINS_FILE);
950
+ if (!existsSync2(path))
951
+ return null;
952
+ const pins = JSON.parse(readFileSync2(path, "utf8"));
953
+ if (pins === null || typeof pins.release !== "string" || !isStrings(pins.constraints) || !isStrings(pins.overrides)) {
954
+ throw new Error(`internal: the template's ${RELEASE_PINS_FILE} is not a release's pins`);
955
+ }
956
+ return { release: pins.release, constraints: pins.constraints, overrides: pins.overrides };
957
+ }
958
+ function normalized(name) {
959
+ return name.toLowerCase().replace(/[-_.]+/g, "-");
960
+ }
961
+ function pinName(pin) {
962
+ return /^[A-Za-z0-9][A-Za-z0-9._-]*/.exec(pin)?.[0] ?? pin;
963
+ }
964
+ function tomlArray(key, values) {
965
+ return [`${key} = [`, ...values.map((value) => ` ${JSON.stringify(value)},`), "]"];
966
+ }
967
+ function pinsBlock(release, constraints, overrides) {
968
+ return [
969
+ `${BLOCK_START}: written by create-e3, and replaced by`,
970
+ "# `npm create @elaraai/e3@<version> -- --update` with that release's.",
971
+ `# The versions east release ${release}'s python packages were tested with,`,
972
+ "# which its python images hold: locked under them, an environment built over",
973
+ "# a rack's tier image leaves nearly all it installs to the image. Edit your",
974
+ "# dependencies, not these lines. To pin by hand, replace this block with",
975
+ "# constraint-dependencies of your own: --update then leaves them alone.",
976
+ ...tomlArray("constraint-dependencies", constraints),
977
+ ...tomlArray("override-dependencies", overrides),
978
+ BLOCK_END
979
+ ];
980
+ }
981
+ function linesOf(text) {
982
+ const parts = text.split(/(\r?\n)/);
983
+ const lines = [];
984
+ for (let i = 0; i < parts.length; i += 2)
985
+ lines.push({ text: parts[i], eol: parts[i + 1] ?? "" });
986
+ return lines;
987
+ }
988
+ var textOf = (lines) => lines.map((line) => line.text + line.eol).join("");
989
+ var tomlOf = (lines) => lines.map((line) => line.text).join("\n");
990
+ function commonEol(lines) {
991
+ const crlf = lines.filter((line) => line.eol === "\r\n").length;
992
+ const lf = lines.filter((line) => line.eol === "\n").length;
993
+ return crlf > lf ? "\r\n" : "\n";
994
+ }
995
+ function blockLines(block, eol, lastEol) {
996
+ return block.map((text, i) => ({ text, eol: i === block.length - 1 ? lastEol : eol }));
997
+ }
998
+ function blockAt(lines) {
999
+ const start = lines.findIndex((line) => line.text.trimStart().startsWith(BLOCK_START));
1000
+ if (start === -1)
1001
+ return null;
1002
+ const end = lines.findIndex((line, i) => i > start && line.text.trim() === BLOCK_END);
1003
+ if (end === -1) {
1004
+ throw new Error(`pyproject.toml's east release pins have lost their last line (${BLOCK_END}): put it back after their override-dependencies, or remove them all`);
1005
+ }
1006
+ return { start, end };
1007
+ }
1008
+ function uvTable(document) {
1009
+ const tool = document["tool"];
1010
+ const uv = isPlainObject(tool) ? tool["uv"] : void 0;
1011
+ return isPlainObject(uv) ? uv : {};
1012
+ }
1013
+ function sameStrings(value, expected) {
1014
+ return isStrings(value) && value.length === expected.length && value.every((item, i) => item === expected[i]);
1015
+ }
1016
+ function holdsPins(text, constraints, overrides) {
1017
+ let uv;
1018
+ try {
1019
+ uv = uvTable(parse(text));
1020
+ } catch {
1021
+ return false;
1022
+ }
1023
+ return sameStrings(uv["constraint-dependencies"], constraints) && sameStrings(uv["override-dependencies"], overrides);
1024
+ }
1025
+ function hasReleasePins(pyproject) {
1026
+ return blockAt(linesOf(pyproject)) !== null;
1027
+ }
1028
+ function withReleasePins(pyproject, pins, own = []) {
1029
+ const lines = linesOf(pyproject);
1030
+ const at = blockAt(lines);
1031
+ const rest = at === null ? lines : [...lines.slice(0, at.start), ...lines.slice(at.end + 1)];
1032
+ let document;
1033
+ try {
1034
+ document = parse(tomlOf(rest));
1035
+ } catch (err) {
1036
+ throw new Error(`pyproject.toml is not TOML: ${(err instanceof Error ? err.message : String(err)).split("\n")[0]}`);
1037
+ }
1038
+ const uv = uvTable(document);
1039
+ if (uv["constraint-dependencies"] !== void 0 || uv["override-dependencies"] !== void 0) {
1040
+ throw new Error("pyproject.toml sets its own [tool.uv] constraint-dependencies or override-dependencies: remove them to take the release's pins, or keep them and pin by hand");
1041
+ }
1042
+ const project = document["project"];
1043
+ const sources = uv["sources"];
1044
+ const ownNames = new Set([
1045
+ ...isPlainObject(project) && typeof project["name"] === "string" ? [project["name"]] : [],
1046
+ ...isPlainObject(sources) ? Object.keys(sources) : [],
1047
+ ...own
1048
+ ].map(normalized));
1049
+ const constraints = pins.constraints.filter((pin) => !ownNames.has(normalized(pinName(pin))));
1050
+ const block = pinsBlock(pins.release, constraints, pins.overrides);
1051
+ const candidates = [];
1052
+ if (at !== null) {
1053
+ candidates.push([...lines.slice(0, at.start), ...blockLines(block, lines[at.start].eol, lines[at.end].eol), ...lines.slice(at.end + 1)]);
1054
+ }
1055
+ const eol = commonEol(rest);
1056
+ rest.forEach((line, i) => {
1057
+ if (!UV_TABLE.test(line.text))
1058
+ return;
1059
+ const header = { text: line.text, eol: line.eol === "" ? eol : line.eol };
1060
+ candidates.push([...rest.slice(0, i), header, ...blockLines(block, header.eol, line.eol), ...rest.slice(i + 1)]);
1061
+ });
1062
+ const body = [...rest];
1063
+ while (body.length > 0 && body[body.length - 1].text.trim() === "")
1064
+ body.pop();
1065
+ const tail = body.length === 0 ? [] : [{ text: body[body.length - 1].text, eol: body[body.length - 1].eol || eol }];
1066
+ candidates.push([...body.slice(0, -1), ...tail, ...body.length > 0 ? [{ text: "", eol }] : [], { text: "[tool.uv]", eol }, ...blockLines(block, eol, eol)]);
1067
+ const pinned = candidates.find((candidate) => holdsPins(tomlOf(candidate), constraints, pins.overrides));
1068
+ if (pinned === void 0) {
1069
+ throw new Error("pyproject.toml defines [tool.uv] in a form the release's pins cannot be added to (dotted keys or an inline table): write it as a [tool.uv] table, or pin by hand");
1070
+ }
1071
+ return textOf(pinned);
245
1072
  }
246
1073
 
247
1074
  // ../scaffold-core/dist/scaffold.js
@@ -269,9 +1096,6 @@ var MANIFEST_FILE = "template.json";
269
1096
  function substituteTokens(content, names) {
270
1097
  return content.replaceAll("__PROJECT_NAME__", names.projectName).replaceAll("__DISPLAY_NAME__", names.displayName).replaceAll("__WORKSPACE_NAME__", names.workspaceName);
271
1098
  }
272
- function isPlainObject(v) {
273
- return typeof v === "object" && v !== null && !Array.isArray(v);
274
- }
275
1099
  function mergeInto(target, source) {
276
1100
  for (const [k, v] of Object.entries(source)) {
277
1101
  const existing = target[k];
@@ -329,7 +1153,7 @@ function transformPackageJson(raw, names, version, manifest, enabled) {
329
1153
  function walk(dir) {
330
1154
  const out = [];
331
1155
  for (const entry of readdirSync2(dir)) {
332
- const full = join2(dir, entry);
1156
+ const full = join3(dir, entry);
333
1157
  if (statSync2(full).isDirectory())
334
1158
  out.push(...walk(full));
335
1159
  else
@@ -343,19 +1167,20 @@ function extOf(path) {
343
1167
  return dot <= 0 ? "" : base.slice(dot);
344
1168
  }
345
1169
  function loadManifest(templateDir) {
346
- const path = join2(templateDir, MANIFEST_FILE);
347
- if (!existsSync2(path))
1170
+ const path = join3(templateDir, MANIFEST_FILE);
1171
+ if (!existsSync3(path))
348
1172
  return null;
349
- return JSON.parse(readFileSync2(path, "utf8"));
1173
+ return JSON.parse(readFileSync3(path, "utf8"));
350
1174
  }
351
1175
  function scaffold(options) {
352
1176
  const { kind, name, templateDir, version } = options;
353
1177
  const cwd = options.cwd ?? process.cwd();
354
1178
  const log = options.log ?? ((m) => console.log(m));
355
- if (!existsSync2(templateDir)) {
1179
+ if (!existsSync3(templateDir)) {
356
1180
  throw new Error(`Template directory not found: ${templateDir}`);
357
1181
  }
358
1182
  const manifest = loadManifest(templateDir);
1183
+ const pins = readReleasePins(templateDir);
359
1184
  const enabled = (feature) => {
360
1185
  const spec = manifest?.features[feature];
361
1186
  if (spec?.allOf)
@@ -390,11 +1215,12 @@ function scaffold(options) {
390
1215
  }
391
1216
  const names = deriveNames(name, cwd);
392
1217
  const inPlace = name === ".";
393
- const projectDir = inPlace ? cwd : join2(cwd, names.projectName);
394
- if (!inPlace && existsSync2(projectDir)) {
1218
+ const projectDir = inPlace ? cwd : join3(cwd, names.projectName);
1219
+ if (!inPlace && existsSync3(projectDir)) {
395
1220
  throw new Error(`Directory already exists: ${projectDir}`);
396
1221
  }
397
1222
  mkdirSync2(projectDir, { recursive: true });
1223
+ let wrotePyproject = false;
398
1224
  for (const srcPath of walk(templateDir)) {
399
1225
  const rel = relative2(templateDir, srcPath).replaceAll("\\", "/");
400
1226
  if (rel === MANIFEST_FILE)
@@ -404,24 +1230,32 @@ function scaffold(options) {
404
1230
  if (skip.has(rel))
405
1231
  continue;
406
1232
  const destRel = renames[rel] ?? rel;
1233
+ if (destRel === "pyproject.toml")
1234
+ wrotePyproject = true;
407
1235
  const segments = destRel.split("/");
408
1236
  const last = segments[segments.length - 1];
409
1237
  segments[segments.length - 1] = DOTFILE_RENAMES[last] ?? last;
410
- const destPath = join2(projectDir, segments.join("/"));
411
- mkdirSync2(join2(destPath, ".."), { recursive: true });
1238
+ const destPath = join3(projectDir, segments.join("/"));
1239
+ mkdirSync2(join3(destPath, ".."), { recursive: true });
412
1240
  const baseName = segments[segments.length - 1];
413
1241
  if (baseName === "package.json") {
414
- const transformed = transformPackageJson(readFileSync2(srcPath, "utf8"), names, version, manifest, enabled);
1242
+ const transformed = transformPackageJson(readFileSync3(srcPath, "utf8"), names, version, manifest, enabled);
415
1243
  writeFileSync2(destPath, substituteTokens(transformed, names));
416
1244
  } else if (TEXT_REPLACE_EXT.has(extOf(srcPath)) || baseName.startsWith(".")) {
417
- writeFileSync2(destPath, substituteTokens(readFileSync2(srcPath, "utf8"), names));
1245
+ writeFileSync2(destPath, substituteTokens(readFileSync3(srcPath, "utf8"), names));
418
1246
  } else {
419
- writeFileSync2(destPath, readFileSync2(srcPath));
1247
+ writeFileSync2(destPath, readFileSync3(srcPath));
420
1248
  }
421
1249
  }
422
1250
  log(`Created ${names.projectName} (${kind}) at ${projectDir}`);
423
1251
  if (options.packages) {
424
- generatePackages({ projectDir, templateDir, names, version, spec: options.packages, log });
1252
+ if (generatePackages({ projectDir, templateDir, names, version, spec: options.packages, log }))
1253
+ wrotePyproject = true;
1254
+ }
1255
+ if (pins !== null && wrotePyproject) {
1256
+ const pyproject = join3(projectDir, "pyproject.toml");
1257
+ writeFileSync2(pyproject, withReleasePins(readFileSync3(pyproject, "utf8"), pins));
1258
+ log(`Pinned the python dependencies to east release ${pins.release}'s.`);
425
1259
  }
426
1260
  if (options.install) {
427
1261
  runInstall(kind, projectDir, enabled, log);
@@ -432,6 +1266,15 @@ function hasCommand(cmd) {
432
1266
  const probe = process.platform === "win32" ? "where" : "which";
433
1267
  return spawnSync(probe, [cmd], { stdio: "ignore" }).status === 0;
434
1268
  }
1269
+ function uvSync(cwd, log) {
1270
+ if (!hasCommand("uv")) {
1271
+ log("uv not found \u2014 install it (https://docs.astral.sh/uv/) then run `uv sync` to set up Python.");
1272
+ return "no-uv";
1273
+ }
1274
+ log("Installing Python dependencies (uv sync)...");
1275
+ const uv = spawnSync("uv", ["sync"], { cwd, stdio: "inherit", shell: process.platform === "win32" });
1276
+ return uv.status === 0 ? "synced" : "failed";
1277
+ }
435
1278
  function runInstall(kind, projectDir, enabled, log) {
436
1279
  log("Installing Node dependencies (npm install)...");
437
1280
  const npm = spawnSync("npm", ["install"], { cwd: projectDir, stdio: "inherit", shell: process.platform === "win32" });
@@ -439,37 +1282,30 @@ function runInstall(kind, projectDir, enabled, log) {
439
1282
  log("npm install failed \u2014 fix the issue and re-run `npm install`.");
440
1283
  return;
441
1284
  }
442
- if (kind === "e3" && enabled("runner:east-py")) {
443
- if (hasCommand("uv")) {
444
- log("Installing Python dependencies (uv sync)...");
445
- const uv = spawnSync("uv", ["sync"], { cwd: projectDir, stdio: "inherit", shell: process.platform === "win32" });
446
- if (uv.status !== 0)
447
- log("uv sync failed \u2014 fix the issue and re-run `uv sync`.");
448
- } else {
449
- log("uv not found \u2014 install it (https://docs.astral.sh/uv/) then run `uv sync` to set up Python.");
450
- }
1285
+ if (kind === "e3" && enabled("runner:east-py") && uvSync(projectDir, log) === "failed") {
1286
+ log("uv sync failed \u2014 fix the issue and re-run `uv sync`.");
451
1287
  }
452
1288
  }
453
1289
 
454
1290
  // ../scaffold-core/dist/cli.js
455
- import { existsSync as existsSync4, readFileSync as readFileSync4 } from "node:fs";
456
- import { dirname, join as join4, resolve } from "node:path";
1291
+ import { existsSync as existsSync5, readFileSync as readFileSync5 } from "node:fs";
1292
+ import { dirname, join as join5, resolve } from "node:path";
457
1293
  import { createInterface } from "node:readline/promises";
458
1294
  import { fileURLToPath } from "node:url";
459
1295
 
460
1296
  // ../scaffold-core/dist/update.js
461
- import { existsSync as existsSync3, readFileSync as readFileSync3, writeFileSync as writeFileSync3, rmSync } from "node:fs";
462
- import { join as join3 } from "node:path";
1297
+ import { existsSync as existsSync4, readdirSync as readdirSync3, readFileSync as readFileSync4, statSync as statSync3, writeFileSync as writeFileSync3, rmSync } from "node:fs";
1298
+ import { join as join4 } from "node:path";
463
1299
  import { spawnSync as spawnSync2 } from "node:child_process";
464
1300
  var DEP_BUCKETS = ["dependencies", "devDependencies", "optionalDependencies", "peerDependencies"];
465
1301
  function updateStack(options) {
466
1302
  const { cwd, version, install = false } = options;
467
1303
  const log = options.log ?? ((msg) => console.log(msg));
468
- const pkgPath = join3(cwd, "package.json");
469
- if (!existsSync3(pkgPath)) {
1304
+ const pkgPath = join4(cwd, "package.json");
1305
+ if (!existsSync4(pkgPath)) {
470
1306
  throw new Error(`no package.json in ${cwd} \u2014 run this inside an East / e3 project`);
471
1307
  }
472
- const raw = readFileSync3(pkgPath, "utf8");
1308
+ const raw = readFileSync4(pkgPath, "utf8");
473
1309
  const pkg = JSON.parse(raw);
474
1310
  const changed = [];
475
1311
  let found = 0;
@@ -491,6 +1327,7 @@ function updateStack(options) {
491
1327
  if (found === 0) {
492
1328
  throw new Error(`no @elaraai/* dependencies in ${pkgPath} \u2014 is this an East / e3 project?`);
493
1329
  }
1330
+ const python = pythonMove(cwd, version, options.pins, log);
494
1331
  if (changed.length > 0) {
495
1332
  const indent = /^\{\n( +)/.exec(raw)?.[1].length ?? 2;
496
1333
  const trailingNewline = raw.endsWith("\n") ? "\n" : "";
@@ -500,9 +1337,14 @@ function updateStack(options) {
500
1337
  log(`All ${found} @elaraai/* dependencies already at ${version}.`);
501
1338
  }
502
1339
  if (changed.length > 0) {
503
- rmSync(join3(cwd, "package-lock.json"), { force: true });
1340
+ rmSync(join4(cwd, "package-lock.json"), { force: true });
504
1341
  }
1342
+ if (python.write !== null)
1343
+ writeFileSync3(join4(cwd, "pyproject.toml"), python.write);
1344
+ if (python.said !== null)
1345
+ log(python.said);
505
1346
  let installed = false;
1347
+ let pythonLocked = false;
506
1348
  if (install) {
507
1349
  log("Reinstalling (npm install)...");
508
1350
  const npm = spawnSync2("npm", ["install"], { cwd, stdio: "inherit", shell: process.platform === "win32" });
@@ -510,24 +1352,94 @@ function updateStack(options) {
510
1352
  throw new Error(`npm install failed (exit ${npm.status ?? "unknown"})`);
511
1353
  }
512
1354
  installed = true;
1355
+ if (python.pinned) {
1356
+ const synced = uvSync(cwd, log);
1357
+ if (synced === "failed") {
1358
+ throw new Error("uv sync failed. Where uv says the project's dependencies conflict with the release's pins, those are the `# >>> east release pins` block of pyproject.toml: change the dependency, or replace the block with constraint-dependencies of your own");
1359
+ }
1360
+ pythonLocked = synced === "synced";
1361
+ }
1362
+ }
1363
+ return { projectName: pkg.name ?? "project", changed, found, pythonPinned: python.pinned, pythonLocked, installed };
1364
+ }
1365
+ function pythonMove(cwd, version, loadPins, log) {
1366
+ const path = join4(cwd, "pyproject.toml");
1367
+ if (!existsSync4(path))
1368
+ return { write: null, said: null, pinned: false };
1369
+ const before = readFileSync4(path, "utf8");
1370
+ const refused = (why) => new Error(`${why}. Nothing was changed: the npm packages and the python pins move together`);
1371
+ const reason = (err) => err instanceof Error ? err.message : String(err);
1372
+ let carries;
1373
+ try {
1374
+ carries = hasReleasePins(before);
1375
+ } catch (err) {
1376
+ throw refused(reason(err));
1377
+ }
1378
+ if (!carries) {
1379
+ log("pyproject.toml carries no east release pins (a project create-e3 scaffolds does): its python dependencies are left as they are.");
1380
+ return { write: null, said: null, pinned: false };
1381
+ }
1382
+ const pins = loadPins?.() ?? null;
1383
+ if (pins === null) {
1384
+ throw refused(`pyproject.toml carries east release pins, which this initializer does not move: update the project with \`npm create @elaraai/e3@${version} -- --update\`, which moves them with the npm packages`);
1385
+ }
1386
+ let after;
1387
+ try {
1388
+ after = withReleasePins(before, pins, workspaceMembers(cwd, before));
1389
+ } catch (err) {
1390
+ throw refused(reason(err));
1391
+ }
1392
+ return after === before ? { write: null, said: `The python dependencies are pinned to east release ${pins.release}'s already.`, pinned: true } : { write: after, said: `Pinned the python dependencies to east release ${pins.release}'s.`, pinned: true };
1393
+ }
1394
+ function workspaceMembers(cwd, pyproject) {
1395
+ let members;
1396
+ try {
1397
+ const uv = parse(pyproject).tool?.uv;
1398
+ members = uv?.workspace?.members;
1399
+ } catch {
1400
+ return [];
513
1401
  }
514
- return { projectName: pkg.name ?? "project", changed, found, installed };
1402
+ if (!Array.isArray(members))
1403
+ return [];
1404
+ const dirs = members.flatMap((entry) => {
1405
+ if (typeof entry !== "string")
1406
+ return [];
1407
+ if (!entry.includes("*"))
1408
+ return [join4(cwd, entry)];
1409
+ if (!entry.endsWith("/*") || entry.slice(0, -2).includes("*"))
1410
+ return [];
1411
+ const parent = join4(cwd, entry.slice(0, -2));
1412
+ try {
1413
+ return readdirSync3(parent).map((name) => join4(parent, name)).filter((dir) => statSync3(dir).isDirectory());
1414
+ } catch {
1415
+ return [];
1416
+ }
1417
+ });
1418
+ return dirs.flatMap((dir) => {
1419
+ try {
1420
+ const project = parse(readFileSync4(join4(dir, "pyproject.toml"), "utf8"))["project"];
1421
+ return isPlainObject(project) && typeof project["name"] === "string" ? [project["name"]] : [];
1422
+ } catch {
1423
+ return [];
1424
+ }
1425
+ });
515
1426
  }
516
1427
 
517
1428
  // ../scaffold-core/dist/cli.js
518
1429
  async function runCreateCli(kind, moduleUrl) {
519
- const pkgRoot = join4(dirname(fileURLToPath(moduleUrl)), "..");
1430
+ const pkgRoot = join5(dirname(fileURLToPath(moduleUrl)), "..");
520
1431
  const args = process.argv.slice(2);
521
1432
  if (args.includes("--help") || args.includes("-h")) {
522
1433
  printHelp(kind);
523
1434
  return;
524
1435
  }
525
- const version = JSON.parse(readFileSync4(join4(pkgRoot, "package.json"), "utf8")).version;
1436
+ const version = JSON.parse(readFileSync5(join5(pkgRoot, "package.json"), "utf8")).version;
526
1437
  if (args.includes("--update")) {
527
1438
  const target = args.find((a) => !a.startsWith("-")) ?? ".";
528
1439
  const install2 = args.includes("--no-install") ? false : args.includes("--install") ? true : Boolean(process.stdout.isTTY);
529
1440
  try {
530
- const result = updateStack({ cwd: resolve(target), version, install: install2 });
1441
+ const pins = () => readReleasePins(join5(pkgRoot, "templates", kind));
1442
+ const result = updateStack({ cwd: resolve(target), version, install: install2, pins });
531
1443
  printUpdateNextSteps(result, install2);
532
1444
  } catch (err) {
533
1445
  console.error(`error: ${err instanceof Error ? err.message : String(err)}`);
@@ -535,7 +1447,7 @@ async function runCreateCli(kind, moduleUrl) {
535
1447
  }
536
1448
  return;
537
1449
  }
538
- const templateDir = join4(pkgRoot, "templates", kind);
1450
+ const templateDir = join5(pkgRoot, "templates", kind);
539
1451
  const name = args.find((a) => !a.startsWith("-")) ?? ".";
540
1452
  const install = args.includes("--install") ? true : args.includes("--no-install") ? false : Boolean(process.stdout.isTTY);
541
1453
  try {
@@ -549,10 +1461,10 @@ async function runCreateCli(kind, moduleUrl) {
549
1461
  }
550
1462
  }
551
1463
  async function resolveFeatures(templateDir, args, packages) {
552
- const manifestPath = join4(templateDir, "template.json");
553
- if (!existsSync4(manifestPath))
1464
+ const manifestPath = join5(templateDir, "template.json");
1465
+ if (!existsSync5(manifestPath))
554
1466
  return {};
555
- const manifest = JSON.parse(readFileSync4(manifestPath, "utf8"));
1467
+ const manifest = JSON.parse(readFileSync5(manifestPath, "utf8"));
556
1468
  const features = {};
557
1469
  for (const [key, spec] of Object.entries(manifest.features)) {
558
1470
  if (spec.allOf)
@@ -667,6 +1579,13 @@ function printHelp(kind) {
667
1579
  console.log(` npm create @elaraai/${kind}@<version> -- --update (@latest for newest)`);
668
1580
  console.log(" Rewrites every @elaraai/* dependency to <version> and regenerates the lock,");
669
1581
  console.log(" keeping the stack in lockstep without an ERESOLVE on bump.");
1582
+ if (kind === "e3") {
1583
+ console.log(" A python project's east release pins in pyproject.toml, which a scaffold");
1584
+ console.log(" writes, take <version>'s too.");
1585
+ } else {
1586
+ console.log(" A python project that carries east release pins is refused: create-e3's");
1587
+ console.log(" --update moves them with the npm packages.");
1588
+ }
670
1589
  console.log("");
671
1590
  console.log("Options:");
672
1591
  console.log(" --update bump this project's @elaraai/* deps instead of scaffolding");
@@ -708,12 +1627,282 @@ function printUpdateNextSteps(result, installed) {
708
1627
  console.log(` ${dep.name} ${dep.from} -> ${dep.to}`);
709
1628
  }
710
1629
  }
711
- if (!installed) {
1630
+ const steps = [
1631
+ // updateStack already dropped the stale lock, so a plain install resolves.
1632
+ ...installed ? [] : ["npm install"],
1633
+ // The python lock holds the earlier release's pins: a sync locks again.
1634
+ ...result.pythonPinned && !result.pythonLocked ? ["uv sync"] : []
1635
+ ];
1636
+ if (steps.length > 0) {
712
1637
  console.log("");
713
1638
  console.log("Next steps:");
714
- console.log(" npm install");
1639
+ for (const step of steps)
1640
+ console.log(` ${step}`);
715
1641
  }
716
1642
  }
717
1643
 
718
1644
  // src/index.ts
719
1645
  await runCreateCli("e3", import.meta.url);
1646
+ /*! Bundled license information:
1647
+
1648
+ smol-toml/dist/date.js:
1649
+ (*!
1650
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
1651
+ * SPDX-License-Identifier: BSD-3-Clause
1652
+ *
1653
+ * Redistribution and use in source and binary forms, with or without
1654
+ * modification, are permitted provided that the following conditions are met:
1655
+ *
1656
+ * 1. Redistributions of source code must retain the above copyright notice, this
1657
+ * list of conditions and the following disclaimer.
1658
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
1659
+ * this list of conditions and the following disclaimer in the
1660
+ * documentation and/or other materials provided with the distribution.
1661
+ * 3. Neither the name of the copyright holder nor the names of its contributors
1662
+ * may be used to endorse or promote products derived from this software without
1663
+ * specific prior written permission.
1664
+ *
1665
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1666
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1667
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1668
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
1669
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1670
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1671
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1672
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1673
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1674
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1675
+ *)
1676
+
1677
+ smol-toml/dist/error.js:
1678
+ (*!
1679
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
1680
+ * SPDX-License-Identifier: BSD-3-Clause
1681
+ *
1682
+ * Redistribution and use in source and binary forms, with or without
1683
+ * modification, are permitted provided that the following conditions are met:
1684
+ *
1685
+ * 1. Redistributions of source code must retain the above copyright notice, this
1686
+ * list of conditions and the following disclaimer.
1687
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
1688
+ * this list of conditions and the following disclaimer in the
1689
+ * documentation and/or other materials provided with the distribution.
1690
+ * 3. Neither the name of the copyright holder nor the names of its contributors
1691
+ * may be used to endorse or promote products derived from this software without
1692
+ * specific prior written permission.
1693
+ *
1694
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1695
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1696
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1697
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
1698
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1699
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1700
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1701
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1702
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1703
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1704
+ *)
1705
+
1706
+ smol-toml/dist/primitive.js:
1707
+ (*!
1708
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
1709
+ * SPDX-License-Identifier: BSD-3-Clause
1710
+ *
1711
+ * Redistribution and use in source and binary forms, with or without
1712
+ * modification, are permitted provided that the following conditions are met:
1713
+ *
1714
+ * 1. Redistributions of source code must retain the above copyright notice, this
1715
+ * list of conditions and the following disclaimer.
1716
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
1717
+ * this list of conditions and the following disclaimer in the
1718
+ * documentation and/or other materials provided with the distribution.
1719
+ * 3. Neither the name of the copyright holder nor the names of its contributors
1720
+ * may be used to endorse or promote products derived from this software without
1721
+ * specific prior written permission.
1722
+ *
1723
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1724
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1725
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1726
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
1727
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1728
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1729
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1730
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1731
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1732
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1733
+ *)
1734
+
1735
+ smol-toml/dist/util.js:
1736
+ (*!
1737
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
1738
+ * SPDX-License-Identifier: BSD-3-Clause
1739
+ *
1740
+ * Redistribution and use in source and binary forms, with or without
1741
+ * modification, are permitted provided that the following conditions are met:
1742
+ *
1743
+ * 1. Redistributions of source code must retain the above copyright notice, this
1744
+ * list of conditions and the following disclaimer.
1745
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
1746
+ * this list of conditions and the following disclaimer in the
1747
+ * documentation and/or other materials provided with the distribution.
1748
+ * 3. Neither the name of the copyright holder nor the names of its contributors
1749
+ * may be used to endorse or promote products derived from this software without
1750
+ * specific prior written permission.
1751
+ *
1752
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1753
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1754
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1755
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
1756
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1757
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1758
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1759
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1760
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1761
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1762
+ *)
1763
+
1764
+ smol-toml/dist/extract.js:
1765
+ (*!
1766
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
1767
+ * SPDX-License-Identifier: BSD-3-Clause
1768
+ *
1769
+ * Redistribution and use in source and binary forms, with or without
1770
+ * modification, are permitted provided that the following conditions are met:
1771
+ *
1772
+ * 1. Redistributions of source code must retain the above copyright notice, this
1773
+ * list of conditions and the following disclaimer.
1774
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
1775
+ * this list of conditions and the following disclaimer in the
1776
+ * documentation and/or other materials provided with the distribution.
1777
+ * 3. Neither the name of the copyright holder nor the names of its contributors
1778
+ * may be used to endorse or promote products derived from this software without
1779
+ * specific prior written permission.
1780
+ *
1781
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1782
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1783
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1784
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
1785
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1786
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1787
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1788
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1789
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1790
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1791
+ *)
1792
+
1793
+ smol-toml/dist/struct.js:
1794
+ (*!
1795
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
1796
+ * SPDX-License-Identifier: BSD-3-Clause
1797
+ *
1798
+ * Redistribution and use in source and binary forms, with or without
1799
+ * modification, are permitted provided that the following conditions are met:
1800
+ *
1801
+ * 1. Redistributions of source code must retain the above copyright notice, this
1802
+ * list of conditions and the following disclaimer.
1803
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
1804
+ * this list of conditions and the following disclaimer in the
1805
+ * documentation and/or other materials provided with the distribution.
1806
+ * 3. Neither the name of the copyright holder nor the names of its contributors
1807
+ * may be used to endorse or promote products derived from this software without
1808
+ * specific prior written permission.
1809
+ *
1810
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1811
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1812
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1813
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
1814
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1815
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1816
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1817
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1818
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1819
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1820
+ *)
1821
+
1822
+ smol-toml/dist/parse.js:
1823
+ (*!
1824
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
1825
+ * SPDX-License-Identifier: BSD-3-Clause
1826
+ *
1827
+ * Redistribution and use in source and binary forms, with or without
1828
+ * modification, are permitted provided that the following conditions are met:
1829
+ *
1830
+ * 1. Redistributions of source code must retain the above copyright notice, this
1831
+ * list of conditions and the following disclaimer.
1832
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
1833
+ * this list of conditions and the following disclaimer in the
1834
+ * documentation and/or other materials provided with the distribution.
1835
+ * 3. Neither the name of the copyright holder nor the names of its contributors
1836
+ * may be used to endorse or promote products derived from this software without
1837
+ * specific prior written permission.
1838
+ *
1839
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1840
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1841
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1842
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
1843
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1844
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1845
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1846
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1847
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1848
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1849
+ *)
1850
+
1851
+ smol-toml/dist/stringify.js:
1852
+ (*!
1853
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
1854
+ * SPDX-License-Identifier: BSD-3-Clause
1855
+ *
1856
+ * Redistribution and use in source and binary forms, with or without
1857
+ * modification, are permitted provided that the following conditions are met:
1858
+ *
1859
+ * 1. Redistributions of source code must retain the above copyright notice, this
1860
+ * list of conditions and the following disclaimer.
1861
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
1862
+ * this list of conditions and the following disclaimer in the
1863
+ * documentation and/or other materials provided with the distribution.
1864
+ * 3. Neither the name of the copyright holder nor the names of its contributors
1865
+ * may be used to endorse or promote products derived from this software without
1866
+ * specific prior written permission.
1867
+ *
1868
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1869
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1870
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1871
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
1872
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1873
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1874
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1875
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1876
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1877
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1878
+ *)
1879
+
1880
+ smol-toml/dist/index.js:
1881
+ (*!
1882
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
1883
+ * SPDX-License-Identifier: BSD-3-Clause
1884
+ *
1885
+ * Redistribution and use in source and binary forms, with or without
1886
+ * modification, are permitted provided that the following conditions are met:
1887
+ *
1888
+ * 1. Redistributions of source code must retain the above copyright notice, this
1889
+ * list of conditions and the following disclaimer.
1890
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
1891
+ * this list of conditions and the following disclaimer in the
1892
+ * documentation and/or other materials provided with the distribution.
1893
+ * 3. Neither the name of the copyright holder nor the names of its contributors
1894
+ * may be used to endorse or promote products derived from this software without
1895
+ * specific prior written permission.
1896
+ *
1897
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1898
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1899
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1900
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
1901
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1902
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1903
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1904
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1905
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1906
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1907
+ *)
1908
+ */