create-nextly-app 0.0.2-alpha.58 → 0.0.2-alpha.60
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/{chunk-E6IFBI6N.mjs → chunk-SEU6FVET.mjs} +342 -86
- package/dist/chunk-SEU6FVET.mjs.map +1 -0
- package/dist/cli.cjs +341 -86
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +2 -3
- package/dist/cli.mjs.map +1 -1
- package/dist/index.cjs +340 -84
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +4 -5
- package/templates/base/AGENTS.md.template +158 -0
- package/templates/base/CLAUDE.md.template +1 -0
- package/templates/plugin/AGENTS.md.template +96 -0
- package/templates/plugin/CLAUDE.md.template +1 -0
- package/templates/plugin/src/admin/SettingsPage.tsx +50 -6
- package/templates/plugin/src/admin/index.ts +4 -1
- package/templates/plugin/src/plugin.test.ts +5 -6
- package/templates/plugin/tsup.config.ts +3 -1
- package/dist/chunk-E6IFBI6N.mjs.map +0 -1
|
@@ -10325,7 +10325,7 @@ var require_dist = __commonJS2({
|
|
|
10325
10325
|
}
|
|
10326
10326
|
});
|
|
10327
10327
|
var require_constants = __commonJS2({
|
|
10328
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10328
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js"(exports$1, module) {
|
|
10329
10329
|
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
10330
10330
|
var MAX_LENGTH = 256;
|
|
10331
10331
|
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
@@ -10354,14 +10354,14 @@ var require_constants = __commonJS2({
|
|
|
10354
10354
|
}
|
|
10355
10355
|
});
|
|
10356
10356
|
var require_debug = __commonJS2({
|
|
10357
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10357
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js"(exports$1, module) {
|
|
10358
10358
|
var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
10359
10359
|
};
|
|
10360
10360
|
module.exports = debug;
|
|
10361
10361
|
}
|
|
10362
10362
|
});
|
|
10363
10363
|
var require_re = __commonJS2({
|
|
10364
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10364
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js"(exports$1, module) {
|
|
10365
10365
|
var {
|
|
10366
10366
|
MAX_SAFE_COMPONENT_LENGTH,
|
|
10367
10367
|
MAX_SAFE_BUILD_LENGTH,
|
|
@@ -10446,7 +10446,7 @@ var require_re = __commonJS2({
|
|
|
10446
10446
|
}
|
|
10447
10447
|
});
|
|
10448
10448
|
var require_parse_options = __commonJS2({
|
|
10449
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10449
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js"(exports$1, module) {
|
|
10450
10450
|
var looseOption = Object.freeze({ loose: true });
|
|
10451
10451
|
var emptyOpts = Object.freeze({});
|
|
10452
10452
|
var parseOptions = (options) => {
|
|
@@ -10462,7 +10462,7 @@ var require_parse_options = __commonJS2({
|
|
|
10462
10462
|
}
|
|
10463
10463
|
});
|
|
10464
10464
|
var require_identifiers = __commonJS2({
|
|
10465
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10465
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js"(exports$1, module) {
|
|
10466
10466
|
var numeric = /^[0-9]+$/;
|
|
10467
10467
|
var compareIdentifiers = (a2, b2) => {
|
|
10468
10468
|
if (typeof a2 === "number" && typeof b2 === "number") {
|
|
@@ -10484,12 +10484,24 @@ var require_identifiers = __commonJS2({
|
|
|
10484
10484
|
}
|
|
10485
10485
|
});
|
|
10486
10486
|
var require_semver = __commonJS2({
|
|
10487
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10487
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js"(exports$1, module) {
|
|
10488
10488
|
var debug = require_debug();
|
|
10489
10489
|
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
10490
10490
|
var { safeRe: re3, t: t2 } = require_re();
|
|
10491
10491
|
var parseOptions = require_parse_options();
|
|
10492
10492
|
var { compareIdentifiers } = require_identifiers();
|
|
10493
|
+
var isPrereleaseIdentifier = (prerelease, identifier) => {
|
|
10494
|
+
const identifiers = identifier.split(".");
|
|
10495
|
+
if (identifiers.length > prerelease.length) {
|
|
10496
|
+
return false;
|
|
10497
|
+
}
|
|
10498
|
+
for (let i2 = 0; i2 < identifiers.length; i2++) {
|
|
10499
|
+
if (compareIdentifiers(prerelease[i2], identifiers[i2]) !== 0) {
|
|
10500
|
+
return false;
|
|
10501
|
+
}
|
|
10502
|
+
}
|
|
10503
|
+
return true;
|
|
10504
|
+
};
|
|
10493
10505
|
var SemVer = class _SemVer {
|
|
10494
10506
|
constructor(version2, options) {
|
|
10495
10507
|
options = parseOptions(options);
|
|
@@ -10736,8 +10748,9 @@ var require_semver = __commonJS2({
|
|
|
10736
10748
|
if (identifierBase === false) {
|
|
10737
10749
|
prerelease = [identifier];
|
|
10738
10750
|
}
|
|
10739
|
-
if (
|
|
10740
|
-
|
|
10751
|
+
if (isPrereleaseIdentifier(this.prerelease, identifier)) {
|
|
10752
|
+
const prereleaseBase = this.prerelease[identifier.split(".").length];
|
|
10753
|
+
if (isNaN(prereleaseBase)) {
|
|
10741
10754
|
this.prerelease = prerelease;
|
|
10742
10755
|
}
|
|
10743
10756
|
} else {
|
|
@@ -10760,7 +10773,7 @@ var require_semver = __commonJS2({
|
|
|
10760
10773
|
}
|
|
10761
10774
|
});
|
|
10762
10775
|
var require_parse = __commonJS2({
|
|
10763
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10776
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js"(exports$1, module) {
|
|
10764
10777
|
var SemVer = require_semver();
|
|
10765
10778
|
var parse = (version2, options, throwErrors = false) => {
|
|
10766
10779
|
if (version2 instanceof SemVer) {
|
|
@@ -10779,7 +10792,7 @@ var require_parse = __commonJS2({
|
|
|
10779
10792
|
}
|
|
10780
10793
|
});
|
|
10781
10794
|
var require_valid = __commonJS2({
|
|
10782
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10795
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js"(exports$1, module) {
|
|
10783
10796
|
var parse = require_parse();
|
|
10784
10797
|
var valid = (version2, options) => {
|
|
10785
10798
|
const v2 = parse(version2, options);
|
|
@@ -10789,7 +10802,7 @@ var require_valid = __commonJS2({
|
|
|
10789
10802
|
}
|
|
10790
10803
|
});
|
|
10791
10804
|
var require_clean = __commonJS2({
|
|
10792
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10805
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js"(exports$1, module) {
|
|
10793
10806
|
var parse = require_parse();
|
|
10794
10807
|
var clean = (version2, options) => {
|
|
10795
10808
|
const s3 = parse(version2.trim().replace(/^[=v]+/, ""), options);
|
|
@@ -10799,7 +10812,7 @@ var require_clean = __commonJS2({
|
|
|
10799
10812
|
}
|
|
10800
10813
|
});
|
|
10801
10814
|
var require_inc = __commonJS2({
|
|
10802
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10815
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js"(exports$1, module) {
|
|
10803
10816
|
var SemVer = require_semver();
|
|
10804
10817
|
var inc = (version2, release, options, identifier, identifierBase) => {
|
|
10805
10818
|
if (typeof options === "string") {
|
|
@@ -10820,7 +10833,7 @@ var require_inc = __commonJS2({
|
|
|
10820
10833
|
}
|
|
10821
10834
|
});
|
|
10822
10835
|
var require_diff = __commonJS2({
|
|
10823
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10836
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js"(exports$1, module) {
|
|
10824
10837
|
var parse = require_parse();
|
|
10825
10838
|
var diff = (version1, version2) => {
|
|
10826
10839
|
const v1 = parse(version1, null, true);
|
|
@@ -10861,28 +10874,28 @@ var require_diff = __commonJS2({
|
|
|
10861
10874
|
}
|
|
10862
10875
|
});
|
|
10863
10876
|
var require_major = __commonJS2({
|
|
10864
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10877
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js"(exports$1, module) {
|
|
10865
10878
|
var SemVer = require_semver();
|
|
10866
10879
|
var major = (a2, loose) => new SemVer(a2, loose).major;
|
|
10867
10880
|
module.exports = major;
|
|
10868
10881
|
}
|
|
10869
10882
|
});
|
|
10870
10883
|
var require_minor = __commonJS2({
|
|
10871
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10884
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js"(exports$1, module) {
|
|
10872
10885
|
var SemVer = require_semver();
|
|
10873
10886
|
var minor = (a2, loose) => new SemVer(a2, loose).minor;
|
|
10874
10887
|
module.exports = minor;
|
|
10875
10888
|
}
|
|
10876
10889
|
});
|
|
10877
10890
|
var require_patch = __commonJS2({
|
|
10878
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10891
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js"(exports$1, module) {
|
|
10879
10892
|
var SemVer = require_semver();
|
|
10880
10893
|
var patch = (a2, loose) => new SemVer(a2, loose).patch;
|
|
10881
10894
|
module.exports = patch;
|
|
10882
10895
|
}
|
|
10883
10896
|
});
|
|
10884
10897
|
var require_prerelease = __commonJS2({
|
|
10885
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10898
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js"(exports$1, module) {
|
|
10886
10899
|
var parse = require_parse();
|
|
10887
10900
|
var prerelease = (version2, options) => {
|
|
10888
10901
|
const parsed = parse(version2, options);
|
|
@@ -10892,28 +10905,28 @@ var require_prerelease = __commonJS2({
|
|
|
10892
10905
|
}
|
|
10893
10906
|
});
|
|
10894
10907
|
var require_compare = __commonJS2({
|
|
10895
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10908
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js"(exports$1, module) {
|
|
10896
10909
|
var SemVer = require_semver();
|
|
10897
10910
|
var compare = (a2, b2, loose) => new SemVer(a2, loose).compare(new SemVer(b2, loose));
|
|
10898
10911
|
module.exports = compare;
|
|
10899
10912
|
}
|
|
10900
10913
|
});
|
|
10901
10914
|
var require_rcompare = __commonJS2({
|
|
10902
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10915
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js"(exports$1, module) {
|
|
10903
10916
|
var compare = require_compare();
|
|
10904
10917
|
var rcompare = (a2, b2, loose) => compare(b2, a2, loose);
|
|
10905
10918
|
module.exports = rcompare;
|
|
10906
10919
|
}
|
|
10907
10920
|
});
|
|
10908
10921
|
var require_compare_loose = __commonJS2({
|
|
10909
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10922
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js"(exports$1, module) {
|
|
10910
10923
|
var compare = require_compare();
|
|
10911
10924
|
var compareLoose = (a2, b2) => compare(a2, b2, true);
|
|
10912
10925
|
module.exports = compareLoose;
|
|
10913
10926
|
}
|
|
10914
10927
|
});
|
|
10915
10928
|
var require_compare_build = __commonJS2({
|
|
10916
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10929
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js"(exports$1, module) {
|
|
10917
10930
|
var SemVer = require_semver();
|
|
10918
10931
|
var compareBuild = (a2, b2, loose) => {
|
|
10919
10932
|
const versionA = new SemVer(a2, loose);
|
|
@@ -10924,63 +10937,63 @@ var require_compare_build = __commonJS2({
|
|
|
10924
10937
|
}
|
|
10925
10938
|
});
|
|
10926
10939
|
var require_sort = __commonJS2({
|
|
10927
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10940
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js"(exports$1, module) {
|
|
10928
10941
|
var compareBuild = require_compare_build();
|
|
10929
10942
|
var sort = (list, loose) => list.sort((a2, b2) => compareBuild(a2, b2, loose));
|
|
10930
10943
|
module.exports = sort;
|
|
10931
10944
|
}
|
|
10932
10945
|
});
|
|
10933
10946
|
var require_rsort = __commonJS2({
|
|
10934
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10947
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js"(exports$1, module) {
|
|
10935
10948
|
var compareBuild = require_compare_build();
|
|
10936
10949
|
var rsort = (list, loose) => list.sort((a2, b2) => compareBuild(b2, a2, loose));
|
|
10937
10950
|
module.exports = rsort;
|
|
10938
10951
|
}
|
|
10939
10952
|
});
|
|
10940
10953
|
var require_gt = __commonJS2({
|
|
10941
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10954
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js"(exports$1, module) {
|
|
10942
10955
|
var compare = require_compare();
|
|
10943
10956
|
var gt4 = (a2, b2, loose) => compare(a2, b2, loose) > 0;
|
|
10944
10957
|
module.exports = gt4;
|
|
10945
10958
|
}
|
|
10946
10959
|
});
|
|
10947
10960
|
var require_lt = __commonJS2({
|
|
10948
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10961
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js"(exports$1, module) {
|
|
10949
10962
|
var compare = require_compare();
|
|
10950
10963
|
var lt3 = (a2, b2, loose) => compare(a2, b2, loose) < 0;
|
|
10951
10964
|
module.exports = lt3;
|
|
10952
10965
|
}
|
|
10953
10966
|
});
|
|
10954
10967
|
var require_eq = __commonJS2({
|
|
10955
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10968
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js"(exports$1, module) {
|
|
10956
10969
|
var compare = require_compare();
|
|
10957
10970
|
var eq = (a2, b2, loose) => compare(a2, b2, loose) === 0;
|
|
10958
10971
|
module.exports = eq;
|
|
10959
10972
|
}
|
|
10960
10973
|
});
|
|
10961
10974
|
var require_neq = __commonJS2({
|
|
10962
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10975
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js"(exports$1, module) {
|
|
10963
10976
|
var compare = require_compare();
|
|
10964
10977
|
var neq = (a2, b2, loose) => compare(a2, b2, loose) !== 0;
|
|
10965
10978
|
module.exports = neq;
|
|
10966
10979
|
}
|
|
10967
10980
|
});
|
|
10968
10981
|
var require_gte = __commonJS2({
|
|
10969
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10982
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js"(exports$1, module) {
|
|
10970
10983
|
var compare = require_compare();
|
|
10971
10984
|
var gte = (a2, b2, loose) => compare(a2, b2, loose) >= 0;
|
|
10972
10985
|
module.exports = gte;
|
|
10973
10986
|
}
|
|
10974
10987
|
});
|
|
10975
10988
|
var require_lte = __commonJS2({
|
|
10976
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10989
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js"(exports$1, module) {
|
|
10977
10990
|
var compare = require_compare();
|
|
10978
10991
|
var lte = (a2, b2, loose) => compare(a2, b2, loose) <= 0;
|
|
10979
10992
|
module.exports = lte;
|
|
10980
10993
|
}
|
|
10981
10994
|
});
|
|
10982
10995
|
var require_cmp = __commonJS2({
|
|
10983
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
10996
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js"(exports$1, module) {
|
|
10984
10997
|
var eq = require_eq();
|
|
10985
10998
|
var neq = require_neq();
|
|
10986
10999
|
var gt4 = require_gt();
|
|
@@ -11027,7 +11040,7 @@ var require_cmp = __commonJS2({
|
|
|
11027
11040
|
}
|
|
11028
11041
|
});
|
|
11029
11042
|
var require_coerce = __commonJS2({
|
|
11030
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
11043
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js"(exports$1, module) {
|
|
11031
11044
|
var SemVer = require_semver();
|
|
11032
11045
|
var parse = require_parse();
|
|
11033
11046
|
var { safeRe: re3, t: t2 } = require_re();
|
|
@@ -11070,7 +11083,7 @@ var require_coerce = __commonJS2({
|
|
|
11070
11083
|
}
|
|
11071
11084
|
});
|
|
11072
11085
|
var require_truncate = __commonJS2({
|
|
11073
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
11086
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js"(exports$1, module) {
|
|
11074
11087
|
var parse = require_parse();
|
|
11075
11088
|
var constants4 = require_constants();
|
|
11076
11089
|
var SemVer = require_semver();
|
|
@@ -11108,7 +11121,7 @@ var require_truncate = __commonJS2({
|
|
|
11108
11121
|
}
|
|
11109
11122
|
});
|
|
11110
11123
|
var require_lrucache = __commonJS2({
|
|
11111
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
11124
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js"(exports$1, module) {
|
|
11112
11125
|
var LRUCache = class {
|
|
11113
11126
|
constructor() {
|
|
11114
11127
|
this.max = 1e3;
|
|
@@ -11143,7 +11156,7 @@ var require_lrucache = __commonJS2({
|
|
|
11143
11156
|
}
|
|
11144
11157
|
});
|
|
11145
11158
|
var require_range = __commonJS2({
|
|
11146
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
11159
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js"(exports$1, module) {
|
|
11147
11160
|
var SPACE_CHARACTERS = /\s+/g;
|
|
11148
11161
|
var Range = class _Range {
|
|
11149
11162
|
constructor(range, options) {
|
|
@@ -11210,6 +11223,7 @@ var require_range = __commonJS2({
|
|
|
11210
11223
|
return this.range;
|
|
11211
11224
|
}
|
|
11212
11225
|
parseRange(range) {
|
|
11226
|
+
range = range.replace(BUILDSTRIPRE, "");
|
|
11213
11227
|
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
|
11214
11228
|
const memoKey = memoOpts + ":" + range;
|
|
11215
11229
|
const cached = cache.get(memoKey);
|
|
@@ -11292,12 +11306,14 @@ var require_range = __commonJS2({
|
|
|
11292
11306
|
var SemVer = require_semver();
|
|
11293
11307
|
var {
|
|
11294
11308
|
safeRe: re3,
|
|
11309
|
+
src,
|
|
11295
11310
|
t: t2,
|
|
11296
11311
|
comparatorTrimReplace,
|
|
11297
11312
|
tildeTrimReplace,
|
|
11298
11313
|
caretTrimReplace
|
|
11299
11314
|
} = require_re();
|
|
11300
11315
|
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
11316
|
+
var BUILDSTRIPRE = new RegExp(src[t2.BUILD], "g");
|
|
11301
11317
|
var isNullSet = (c3) => c3.value === "<0.0.0-0";
|
|
11302
11318
|
var isAny = (c3) => c3.value === "";
|
|
11303
11319
|
var isSatisfiable = (comparators, options) => {
|
|
@@ -11326,20 +11342,22 @@ var require_range = __commonJS2({
|
|
|
11326
11342
|
return comp;
|
|
11327
11343
|
};
|
|
11328
11344
|
var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
11345
|
+
var invalidXRangeOrder = (M3, m2, p2) => isX(M3) && !isX(m2) || isX(m2) && p2 && !isX(p2);
|
|
11329
11346
|
var replaceTildes = (comp, options) => {
|
|
11330
11347
|
return comp.trim().split(/\s+/).map((c3) => replaceTilde(c3, options)).join(" ");
|
|
11331
11348
|
};
|
|
11332
11349
|
var replaceTilde = (comp, options) => {
|
|
11333
11350
|
const r = options.loose ? re3[t2.TILDELOOSE] : re3[t2.TILDE];
|
|
11351
|
+
const z4 = options.includePrerelease ? "-0" : "";
|
|
11334
11352
|
return comp.replace(r, (_3, M3, m2, p2, pr2) => {
|
|
11335
11353
|
debug("tilde", comp, _3, M3, m2, p2, pr2);
|
|
11336
11354
|
let ret;
|
|
11337
11355
|
if (isX(M3)) {
|
|
11338
11356
|
ret = "";
|
|
11339
11357
|
} else if (isX(m2)) {
|
|
11340
|
-
ret = `>=${M3}.0.0 <${+M3 + 1}.0.0-0`;
|
|
11358
|
+
ret = `>=${M3}.0.0${z4} <${+M3 + 1}.0.0-0`;
|
|
11341
11359
|
} else if (isX(p2)) {
|
|
11342
|
-
ret = `>=${M3}.${m2}.0 <${M3}.${+m2 + 1}.0-0`;
|
|
11360
|
+
ret = `>=${M3}.${m2}.0${z4} <${M3}.${+m2 + 1}.0-0`;
|
|
11343
11361
|
} else if (pr2) {
|
|
11344
11362
|
debug("replaceTilde pr", pr2);
|
|
11345
11363
|
ret = `>=${M3}.${m2}.${p2}-${pr2} <${M3}.${+m2 + 1}.0-0`;
|
|
@@ -11385,9 +11403,9 @@ var require_range = __commonJS2({
|
|
|
11385
11403
|
debug("no pr");
|
|
11386
11404
|
if (M3 === "0") {
|
|
11387
11405
|
if (m2 === "0") {
|
|
11388
|
-
ret = `>=${M3}.${m2}.${p2}
|
|
11406
|
+
ret = `>=${M3}.${m2}.${p2} <${M3}.${m2}.${+p2 + 1}-0`;
|
|
11389
11407
|
} else {
|
|
11390
|
-
ret = `>=${M3}.${m2}.${p2}
|
|
11408
|
+
ret = `>=${M3}.${m2}.${p2} <${M3}.${+m2 + 1}.0-0`;
|
|
11391
11409
|
}
|
|
11392
11410
|
} else {
|
|
11393
11411
|
ret = `>=${M3}.${m2}.${p2} <${+M3 + 1}.0.0-0`;
|
|
@@ -11406,6 +11424,9 @@ var require_range = __commonJS2({
|
|
|
11406
11424
|
const r = options.loose ? re3[t2.XRANGELOOSE] : re3[t2.XRANGE];
|
|
11407
11425
|
return comp.replace(r, (ret, gtlt, M3, m2, p2, pr2) => {
|
|
11408
11426
|
debug("xRange", comp, ret, gtlt, M3, m2, p2, pr2);
|
|
11427
|
+
if (invalidXRangeOrder(M3, m2, p2)) {
|
|
11428
|
+
return comp;
|
|
11429
|
+
}
|
|
11409
11430
|
const xM = isX(M3);
|
|
11410
11431
|
const xm = xM || isX(m2);
|
|
11411
11432
|
const xp = xm || isX(p2);
|
|
@@ -11517,7 +11538,7 @@ var require_range = __commonJS2({
|
|
|
11517
11538
|
}
|
|
11518
11539
|
});
|
|
11519
11540
|
var require_comparator = __commonJS2({
|
|
11520
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
11541
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js"(exports$1, module) {
|
|
11521
11542
|
var ANY = Symbol("SemVer ANY");
|
|
11522
11543
|
var Comparator = class _Comparator {
|
|
11523
11544
|
static get ANY() {
|
|
@@ -11627,7 +11648,7 @@ var require_comparator = __commonJS2({
|
|
|
11627
11648
|
}
|
|
11628
11649
|
});
|
|
11629
11650
|
var require_satisfies = __commonJS2({
|
|
11630
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
11651
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js"(exports$1, module) {
|
|
11631
11652
|
var Range = require_range();
|
|
11632
11653
|
var satisfies = (version2, range, options) => {
|
|
11633
11654
|
try {
|
|
@@ -11641,14 +11662,14 @@ var require_satisfies = __commonJS2({
|
|
|
11641
11662
|
}
|
|
11642
11663
|
});
|
|
11643
11664
|
var require_to_comparators = __commonJS2({
|
|
11644
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
11665
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js"(exports$1, module) {
|
|
11645
11666
|
var Range = require_range();
|
|
11646
11667
|
var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c3) => c3.value).join(" ").trim().split(" "));
|
|
11647
11668
|
module.exports = toComparators;
|
|
11648
11669
|
}
|
|
11649
11670
|
});
|
|
11650
11671
|
var require_max_satisfying = __commonJS2({
|
|
11651
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
11672
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js"(exports$1, module) {
|
|
11652
11673
|
var SemVer = require_semver();
|
|
11653
11674
|
var Range = require_range();
|
|
11654
11675
|
var maxSatisfying = (versions, range, options) => {
|
|
@@ -11674,7 +11695,7 @@ var require_max_satisfying = __commonJS2({
|
|
|
11674
11695
|
}
|
|
11675
11696
|
});
|
|
11676
11697
|
var require_min_satisfying = __commonJS2({
|
|
11677
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
11698
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js"(exports$1, module) {
|
|
11678
11699
|
var SemVer = require_semver();
|
|
11679
11700
|
var Range = require_range();
|
|
11680
11701
|
var minSatisfying = (versions, range, options) => {
|
|
@@ -11700,7 +11721,7 @@ var require_min_satisfying = __commonJS2({
|
|
|
11700
11721
|
}
|
|
11701
11722
|
});
|
|
11702
11723
|
var require_min_version = __commonJS2({
|
|
11703
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
11724
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js"(exports$1, module) {
|
|
11704
11725
|
var SemVer = require_semver();
|
|
11705
11726
|
var Range = require_range();
|
|
11706
11727
|
var gt4 = require_gt();
|
|
@@ -11756,7 +11777,7 @@ var require_min_version = __commonJS2({
|
|
|
11756
11777
|
}
|
|
11757
11778
|
});
|
|
11758
11779
|
var require_valid2 = __commonJS2({
|
|
11759
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
11780
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js"(exports$1, module) {
|
|
11760
11781
|
var Range = require_range();
|
|
11761
11782
|
var validRange = (range, options) => {
|
|
11762
11783
|
try {
|
|
@@ -11769,7 +11790,7 @@ var require_valid2 = __commonJS2({
|
|
|
11769
11790
|
}
|
|
11770
11791
|
});
|
|
11771
11792
|
var require_outside = __commonJS2({
|
|
11772
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
11793
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js"(exports$1, module) {
|
|
11773
11794
|
var SemVer = require_semver();
|
|
11774
11795
|
var Comparator = require_comparator();
|
|
11775
11796
|
var { ANY } = Comparator;
|
|
@@ -11835,21 +11856,21 @@ var require_outside = __commonJS2({
|
|
|
11835
11856
|
}
|
|
11836
11857
|
});
|
|
11837
11858
|
var require_gtr = __commonJS2({
|
|
11838
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
11859
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js"(exports$1, module) {
|
|
11839
11860
|
var outside = require_outside();
|
|
11840
11861
|
var gtr = (version2, range, options) => outside(version2, range, ">", options);
|
|
11841
11862
|
module.exports = gtr;
|
|
11842
11863
|
}
|
|
11843
11864
|
});
|
|
11844
11865
|
var require_ltr = __commonJS2({
|
|
11845
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
11866
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js"(exports$1, module) {
|
|
11846
11867
|
var outside = require_outside();
|
|
11847
11868
|
var ltr = (version2, range, options) => outside(version2, range, "<", options);
|
|
11848
11869
|
module.exports = ltr;
|
|
11849
11870
|
}
|
|
11850
11871
|
});
|
|
11851
11872
|
var require_intersects = __commonJS2({
|
|
11852
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
11873
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js"(exports$1, module) {
|
|
11853
11874
|
var Range = require_range();
|
|
11854
11875
|
var intersects = (r1, r2, options) => {
|
|
11855
11876
|
r1 = new Range(r1, options);
|
|
@@ -11860,7 +11881,7 @@ var require_intersects = __commonJS2({
|
|
|
11860
11881
|
}
|
|
11861
11882
|
});
|
|
11862
11883
|
var require_simplify = __commonJS2({
|
|
11863
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
11884
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js"(exports$1, module) {
|
|
11864
11885
|
var satisfies = require_satisfies();
|
|
11865
11886
|
var compare = require_compare();
|
|
11866
11887
|
module.exports = (versions, range, options) => {
|
|
@@ -11907,7 +11928,7 @@ var require_simplify = __commonJS2({
|
|
|
11907
11928
|
}
|
|
11908
11929
|
});
|
|
11909
11930
|
var require_subset = __commonJS2({
|
|
11910
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
11931
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js"(exports$1, module) {
|
|
11911
11932
|
var Range = require_range();
|
|
11912
11933
|
var Comparator = require_comparator();
|
|
11913
11934
|
var { ANY } = Comparator;
|
|
@@ -12014,7 +12035,7 @@ var require_subset = __commonJS2({
|
|
|
12014
12035
|
if (higher === c3 && higher !== gt4) {
|
|
12015
12036
|
return false;
|
|
12016
12037
|
}
|
|
12017
|
-
} else if (gt4.operator === ">=" && !
|
|
12038
|
+
} else if (gt4.operator === ">=" && !c3.test(gt4.semver)) {
|
|
12018
12039
|
return false;
|
|
12019
12040
|
}
|
|
12020
12041
|
}
|
|
@@ -12029,7 +12050,7 @@ var require_subset = __commonJS2({
|
|
|
12029
12050
|
if (lower === c3 && lower !== lt3) {
|
|
12030
12051
|
return false;
|
|
12031
12052
|
}
|
|
12032
|
-
} else if (lt3.operator === "<=" && !
|
|
12053
|
+
} else if (lt3.operator === "<=" && !c3.test(lt3.semver)) {
|
|
12033
12054
|
return false;
|
|
12034
12055
|
}
|
|
12035
12056
|
}
|
|
@@ -12066,7 +12087,7 @@ var require_subset = __commonJS2({
|
|
|
12066
12087
|
}
|
|
12067
12088
|
});
|
|
12068
12089
|
var require_semver2 = __commonJS2({
|
|
12069
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
12090
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js"(exports$1, module) {
|
|
12070
12091
|
var internalRe = require_re();
|
|
12071
12092
|
var constants4 = require_constants();
|
|
12072
12093
|
var SemVer = require_semver();
|
|
@@ -25098,6 +25119,32 @@ getIpcExport();
|
|
|
25098
25119
|
|
|
25099
25120
|
// src/utils/template.ts
|
|
25100
25121
|
var import_fs_extra8 = __toESM(require_lib(), 1);
|
|
25122
|
+
|
|
25123
|
+
// src/utils/package-manager-commands.ts
|
|
25124
|
+
function scriptRunner(packageManager) {
|
|
25125
|
+
switch (packageManager) {
|
|
25126
|
+
case "npm":
|
|
25127
|
+
return "npm run";
|
|
25128
|
+
case "bun":
|
|
25129
|
+
return "bun run";
|
|
25130
|
+
default:
|
|
25131
|
+
return packageManager;
|
|
25132
|
+
}
|
|
25133
|
+
}
|
|
25134
|
+
function binaryRunner(packageManager) {
|
|
25135
|
+
switch (packageManager) {
|
|
25136
|
+
case "npm":
|
|
25137
|
+
return "npx";
|
|
25138
|
+
case "yarn":
|
|
25139
|
+
return "yarn";
|
|
25140
|
+
case "pnpm":
|
|
25141
|
+
return "pnpm exec";
|
|
25142
|
+
case "bun":
|
|
25143
|
+
return "bunx";
|
|
25144
|
+
}
|
|
25145
|
+
}
|
|
25146
|
+
|
|
25147
|
+
// src/utils/template.ts
|
|
25101
25148
|
var PROJECT_TYPES_WITH_FORM_BUILDER = /* @__PURE__ */ new Set([
|
|
25102
25149
|
"blog"
|
|
25103
25150
|
]);
|
|
@@ -25163,14 +25210,205 @@ var TEXT_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
|
25163
25210
|
".cjs"
|
|
25164
25211
|
]);
|
|
25165
25212
|
var SKIP_FILES = /* @__PURE__ */ new Set([".DS_Store", "Thumbs.db", ".gitkeep"]);
|
|
25166
|
-
var
|
|
25167
|
-
|
|
25168
|
-
|
|
25169
|
-
|
|
25170
|
-
|
|
25171
|
-
|
|
25172
|
-
|
|
25173
|
-
|
|
25213
|
+
var RENAMED_ON_COPY = [
|
|
25214
|
+
// Line-wise, because an ignore file is a set of patterns: the developer's entries stay and the
|
|
25215
|
+
// scaffold's missing ones are added, so `.env` ends up ignored either way.
|
|
25216
|
+
{
|
|
25217
|
+
shipped: "gitignore",
|
|
25218
|
+
inProject: ".gitignore",
|
|
25219
|
+
merge: "append-missing-lines",
|
|
25220
|
+
onLink: "materialize"
|
|
25221
|
+
},
|
|
25222
|
+
// The guide carries its content inside a managed block, which is exactly the region a
|
|
25223
|
+
// regeneration is allowed to replace.
|
|
25224
|
+
{
|
|
25225
|
+
shipped: "AGENTS.md.template",
|
|
25226
|
+
inProject: "AGENTS.md",
|
|
25227
|
+
merge: "managed-block",
|
|
25228
|
+
onLink: "preserve"
|
|
25229
|
+
},
|
|
25230
|
+
// One line pointing at the guide. If a project already points there, nothing to add; if it has
|
|
25231
|
+
// its own instructions, they keep them and gain the pointer.
|
|
25232
|
+
{
|
|
25233
|
+
shipped: "CLAUDE.md.template",
|
|
25234
|
+
inProject: "CLAUDE.md",
|
|
25235
|
+
merge: "append-missing-lines",
|
|
25236
|
+
onLink: "preserve"
|
|
25237
|
+
}
|
|
25238
|
+
];
|
|
25239
|
+
var MANAGED_START = "<!-- nextly:managed:start -->";
|
|
25240
|
+
var MANAGED_END = "<!-- nextly:managed:end -->";
|
|
25241
|
+
function mergeManagedBlock(existing, incoming) {
|
|
25242
|
+
const block = extractManagedBlock(incoming);
|
|
25243
|
+
const region = findManagedRegion(existing);
|
|
25244
|
+
if (!region) return `${existing.trimEnd()}
|
|
25245
|
+
|
|
25246
|
+
${block}
|
|
25247
|
+
`;
|
|
25248
|
+
return existing.slice(0, region.start) + block + existing.slice(region.end);
|
|
25249
|
+
}
|
|
25250
|
+
function blankRegion(match) {
|
|
25251
|
+
return match.replace(/[^\n]/g, " ");
|
|
25252
|
+
}
|
|
25253
|
+
function withoutFencedExamples(text) {
|
|
25254
|
+
return text.replace(
|
|
25255
|
+
/^[ \t]*(```|~~~)[\s\S]*?^[ \t]*\1[^\n]*$/gm,
|
|
25256
|
+
blankRegion
|
|
25257
|
+
);
|
|
25258
|
+
}
|
|
25259
|
+
function withoutInactiveText(text) {
|
|
25260
|
+
return withoutFencedExamples(text).replace(/<!--[\s\S]*?-->/g, blankRegion).replace(/`[^`\n]*`/g, blankRegion);
|
|
25261
|
+
}
|
|
25262
|
+
function findManagedRegion(text) {
|
|
25263
|
+
const scan = withoutFencedExamples(text);
|
|
25264
|
+
let cursor = 0;
|
|
25265
|
+
let found = null;
|
|
25266
|
+
for (; ; ) {
|
|
25267
|
+
const startIndex = scan.indexOf(MANAGED_START, cursor);
|
|
25268
|
+
if (startIndex === -1) return found;
|
|
25269
|
+
const after = startIndex + MANAGED_START.length;
|
|
25270
|
+
const endIndex = scan.indexOf(MANAGED_END, after);
|
|
25271
|
+
if (endIndex === -1) return found;
|
|
25272
|
+
const nextStart = scan.indexOf(MANAGED_START, after);
|
|
25273
|
+
if (nextStart !== -1 && nextStart < endIndex) {
|
|
25274
|
+
cursor = nextStart;
|
|
25275
|
+
continue;
|
|
25276
|
+
}
|
|
25277
|
+
found = { start: startIndex, end: endIndex + MANAGED_END.length };
|
|
25278
|
+
cursor = found.end;
|
|
25279
|
+
}
|
|
25280
|
+
}
|
|
25281
|
+
function extractManagedBlock(incoming) {
|
|
25282
|
+
const start = incoming.indexOf(MANAGED_START);
|
|
25283
|
+
const end = incoming.indexOf(MANAGED_END);
|
|
25284
|
+
if (start === -1 || end === -1 || end < start) return incoming.trim();
|
|
25285
|
+
return incoming.slice(start, end + MANAGED_END.length);
|
|
25286
|
+
}
|
|
25287
|
+
function appendMissingLines(existing, incoming) {
|
|
25288
|
+
const key = (line) => line.replace(/\s+$/, "");
|
|
25289
|
+
const have = new Set(withoutInactiveText(existing).split("\n").map(key));
|
|
25290
|
+
const missing = incoming.split("\n").filter((line) => line.trim() !== "" && !have.has(key(line)));
|
|
25291
|
+
if (missing.length === 0) return existing;
|
|
25292
|
+
const bom = existing.startsWith("\uFEFF") ? "\uFEFF" : "";
|
|
25293
|
+
const body = existing.slice(bom.length);
|
|
25294
|
+
return `${bom}${missing.join("\n")}
|
|
25295
|
+
|
|
25296
|
+
${body.replace(/^\n+/, "")}`;
|
|
25297
|
+
}
|
|
25298
|
+
function guidePlaceholders(packageManager) {
|
|
25299
|
+
return {
|
|
25300
|
+
"{{runCommand}}": scriptRunner(packageManager),
|
|
25301
|
+
"{{execCommand}}": binaryRunner(packageManager)
|
|
25302
|
+
};
|
|
25303
|
+
}
|
|
25304
|
+
var MAX_INCLUDE_HOPS = 64;
|
|
25305
|
+
async function pointsAtItself(targetDir, destination, incoming) {
|
|
25306
|
+
const queue = includeTargets(incoming).map((name) => ({
|
|
25307
|
+
name,
|
|
25308
|
+
depth: 0,
|
|
25309
|
+
from: targetDir
|
|
25310
|
+
}));
|
|
25311
|
+
if (queue.length === 0) return false;
|
|
25312
|
+
const self = await import_fs_extra8.default.realpath(destination).catch(() => destination);
|
|
25313
|
+
const visited = /* @__PURE__ */ new Set();
|
|
25314
|
+
let hops = 0;
|
|
25315
|
+
while (queue.length > 0) {
|
|
25316
|
+
if (++hops > MAX_INCLUDE_HOPS) return true;
|
|
25317
|
+
const { name, depth, from } = queue.shift();
|
|
25318
|
+
const targetPath = path15.resolve(from, name);
|
|
25319
|
+
if (targetPath === destination) return true;
|
|
25320
|
+
const resolved = await import_fs_extra8.default.realpath(targetPath).catch(() => null);
|
|
25321
|
+
const identity3 = `${resolved ?? targetPath}\0${path15.dirname(targetPath)}`;
|
|
25322
|
+
if (visited.has(identity3)) continue;
|
|
25323
|
+
visited.add(identity3);
|
|
25324
|
+
if (resolved === null) {
|
|
25325
|
+
if (depth === 0) return true;
|
|
25326
|
+
continue;
|
|
25327
|
+
}
|
|
25328
|
+
if (resolved === self) return true;
|
|
25329
|
+
const contents = await import_fs_extra8.default.readFile(targetPath, "utf-8").catch(() => null);
|
|
25330
|
+
if (contents !== null) {
|
|
25331
|
+
queue.push(
|
|
25332
|
+
...includeTargets(contents).map((next) => ({
|
|
25333
|
+
name: next,
|
|
25334
|
+
depth: depth + 1,
|
|
25335
|
+
from: path15.dirname(targetPath)
|
|
25336
|
+
}))
|
|
25337
|
+
);
|
|
25338
|
+
}
|
|
25339
|
+
}
|
|
25340
|
+
return false;
|
|
25341
|
+
}
|
|
25342
|
+
function includeTargets(text) {
|
|
25343
|
+
return withoutInactiveText(text).split("\n").map((line) => line.trim()).filter((line) => line.startsWith("@") && line.length > 1).map((line) => line.slice(1));
|
|
25344
|
+
}
|
|
25345
|
+
async function restoreShippedNames(targetDir, placeholders, packageManager) {
|
|
25346
|
+
const merged = /* @__PURE__ */ new Set();
|
|
25347
|
+
const forGuides = { ...placeholders, ...guidePlaceholders(packageManager) };
|
|
25348
|
+
for (const { shipped, inProject, merge, onLink } of RENAMED_ON_COPY) {
|
|
25349
|
+
const from = path15.join(targetDir, shipped);
|
|
25350
|
+
if (!await import_fs_extra8.default.pathExists(from)) continue;
|
|
25351
|
+
const to2 = path15.join(targetDir, inProject);
|
|
25352
|
+
const destination = await import_fs_extra8.default.lstat(to2).catch(() => null);
|
|
25353
|
+
if (!destination) {
|
|
25354
|
+
if (await pointsAtItself(
|
|
25355
|
+
targetDir,
|
|
25356
|
+
to2,
|
|
25357
|
+
applyPlaceholders(await import_fs_extra8.default.readFile(from, "utf-8"), forGuides)
|
|
25358
|
+
)) {
|
|
25359
|
+
await import_fs_extra8.default.remove(from);
|
|
25360
|
+
merged.add(inProject);
|
|
25361
|
+
continue;
|
|
25362
|
+
}
|
|
25363
|
+
await import_fs_extra8.default.move(from, to2);
|
|
25364
|
+
await import_fs_extra8.default.writeFile(
|
|
25365
|
+
to2,
|
|
25366
|
+
applyPlaceholders(await import_fs_extra8.default.readFile(to2, "utf-8"), forGuides),
|
|
25367
|
+
"utf-8"
|
|
25368
|
+
);
|
|
25369
|
+
merged.add(inProject);
|
|
25370
|
+
continue;
|
|
25371
|
+
}
|
|
25372
|
+
if (destination.isSymbolicLink() || destination.nlink > 1) {
|
|
25373
|
+
if (onLink === "materialize") {
|
|
25374
|
+
const existing2 = await import_fs_extra8.default.readFile(to2, "utf-8").catch((error) => {
|
|
25375
|
+
if (error?.code === "ENOENT") return "";
|
|
25376
|
+
throw error;
|
|
25377
|
+
});
|
|
25378
|
+
const incoming2 = await import_fs_extra8.default.readFile(from, "utf-8");
|
|
25379
|
+
await import_fs_extra8.default.remove(to2);
|
|
25380
|
+
await import_fs_extra8.default.writeFile(
|
|
25381
|
+
to2,
|
|
25382
|
+
appendMissingLines(
|
|
25383
|
+
existing2,
|
|
25384
|
+
applyPlaceholders(incoming2, placeholders)
|
|
25385
|
+
),
|
|
25386
|
+
"utf-8"
|
|
25387
|
+
);
|
|
25388
|
+
await import_fs_extra8.default.remove(from);
|
|
25389
|
+
merged.add(inProject);
|
|
25390
|
+
continue;
|
|
25391
|
+
}
|
|
25392
|
+
await import_fs_extra8.default.remove(from);
|
|
25393
|
+
merged.add(inProject);
|
|
25394
|
+
continue;
|
|
25395
|
+
}
|
|
25396
|
+
const [existing, incoming] = await Promise.all([
|
|
25397
|
+
import_fs_extra8.default.readFile(to2, "utf-8"),
|
|
25398
|
+
import_fs_extra8.default.readFile(from, "utf-8")
|
|
25399
|
+
]);
|
|
25400
|
+
const rendered = applyPlaceholders(incoming, forGuides);
|
|
25401
|
+
const combined = merge === "managed-block" ? mergeManagedBlock(existing, rendered) : appendMissingLines(existing, rendered);
|
|
25402
|
+
if (await pointsAtItself(targetDir, to2, incoming)) {
|
|
25403
|
+
await import_fs_extra8.default.remove(from);
|
|
25404
|
+
merged.add(inProject);
|
|
25405
|
+
continue;
|
|
25406
|
+
}
|
|
25407
|
+
await import_fs_extra8.default.writeFile(to2, combined, "utf-8");
|
|
25408
|
+
await import_fs_extra8.default.remove(from);
|
|
25409
|
+
merged.add(inProject);
|
|
25410
|
+
}
|
|
25411
|
+
return merged;
|
|
25174
25412
|
}
|
|
25175
25413
|
function resolveTemplatePath(localTemplatePath) {
|
|
25176
25414
|
const __dirname = path15.dirname(fileURLToPath(import.meta.url));
|
|
@@ -25202,26 +25440,30 @@ async function replacePlaceholdersInFile(filePath, placeholders) {
|
|
|
25202
25440
|
const basename = path15.basename(filePath);
|
|
25203
25441
|
const isTextFile = TEXT_EXTENSIONS.has(ext) || basename.startsWith(".env") || basename === ".gitignore";
|
|
25204
25442
|
if (!isTextFile) return;
|
|
25205
|
-
|
|
25206
|
-
|
|
25207
|
-
|
|
25208
|
-
|
|
25209
|
-
|
|
25210
|
-
|
|
25211
|
-
}
|
|
25443
|
+
const link = await import_fs_extra8.default.lstat(filePath).catch(() => null);
|
|
25444
|
+
if (link && link.nlink > 1) return;
|
|
25445
|
+
const content = await import_fs_extra8.default.readFile(filePath, "utf-8");
|
|
25446
|
+
const rendered = applyPlaceholders(content, placeholders);
|
|
25447
|
+
if (rendered !== content) {
|
|
25448
|
+
await import_fs_extra8.default.writeFile(filePath, rendered, "utf-8");
|
|
25212
25449
|
}
|
|
25213
|
-
|
|
25214
|
-
|
|
25450
|
+
}
|
|
25451
|
+
function applyPlaceholders(content, placeholders) {
|
|
25452
|
+
let rendered = content;
|
|
25453
|
+
for (const [placeholder, value] of Object.entries(placeholders)) {
|
|
25454
|
+
rendered = rendered.replaceAll(placeholder, value);
|
|
25215
25455
|
}
|
|
25456
|
+
return rendered;
|
|
25216
25457
|
}
|
|
25217
|
-
async function replacePlaceholders(dir, placeholders) {
|
|
25458
|
+
async function replacePlaceholders(dir, placeholders, skip = /* @__PURE__ */ new Set(), root = dir) {
|
|
25218
25459
|
const entries = await import_fs_extra8.default.readdir(dir, { withFileTypes: true });
|
|
25219
25460
|
for (const entry of entries) {
|
|
25220
25461
|
const fullPath = path15.join(dir, entry.name);
|
|
25221
25462
|
if (entry.isDirectory()) {
|
|
25222
25463
|
if (entry.name === "node_modules" || entry.name === ".git") continue;
|
|
25223
|
-
await replacePlaceholders(fullPath, placeholders);
|
|
25464
|
+
await replacePlaceholders(fullPath, placeholders, skip, root);
|
|
25224
25465
|
} else if (entry.isFile()) {
|
|
25466
|
+
if (skip.has(path15.relative(root, fullPath))) continue;
|
|
25225
25467
|
await replacePlaceholdersInFile(fullPath, placeholders);
|
|
25226
25468
|
}
|
|
25227
25469
|
}
|
|
@@ -25401,6 +25643,11 @@ async function generatePluginPackageJson(projectName, useYalc) {
|
|
|
25401
25643
|
nextly: range("nextly"),
|
|
25402
25644
|
"@nextlyhq/admin": range("@nextlyhq/admin"),
|
|
25403
25645
|
"@nextlyhq/plugin-sdk": range("@nextlyhq/plugin-sdk"),
|
|
25646
|
+
// The UI kit is supplied by the host admin at run time, so a plugin must
|
|
25647
|
+
// declare it rather than carry a copy. As a devDependency alone, tsup
|
|
25648
|
+
// treats it as bundleable and inlines the whole kit into the published
|
|
25649
|
+
// plugin — first-party plugins declare it as a peer for this reason.
|
|
25650
|
+
"@nextlyhq/ui": range("@nextlyhq/ui"),
|
|
25404
25651
|
react: PINNED_VERSIONS.react,
|
|
25405
25652
|
"react-dom": PINNED_VERSIONS["react-dom"]
|
|
25406
25653
|
};
|
|
@@ -25651,7 +25898,15 @@ async function copyTemplate(options) {
|
|
|
25651
25898
|
generatePnpmWorkspaceYaml(),
|
|
25652
25899
|
"utf-8"
|
|
25653
25900
|
);
|
|
25654
|
-
|
|
25901
|
+
const placeholders = buildPlaceholderMap({ database, databaseUrl });
|
|
25902
|
+
if (approach) {
|
|
25903
|
+
placeholders["{{approach}}"] = approach;
|
|
25904
|
+
}
|
|
25905
|
+
const alreadyRendered = await restoreShippedNames(
|
|
25906
|
+
targetDir,
|
|
25907
|
+
placeholders,
|
|
25908
|
+
packageManager
|
|
25909
|
+
);
|
|
25655
25910
|
await writeScaffoldNpmrc(targetDir, packageManager);
|
|
25656
25911
|
if (database.type === "sqlite") {
|
|
25657
25912
|
await import_fs_extra8.default.ensureDir(path15.join(targetDir, "data"));
|
|
@@ -25661,11 +25916,7 @@ async function copyTemplate(options) {
|
|
|
25661
25916
|
buildNextConfigTemplate(database),
|
|
25662
25917
|
"utf-8"
|
|
25663
25918
|
);
|
|
25664
|
-
|
|
25665
|
-
if (approach) {
|
|
25666
|
-
placeholders["{{approach}}"] = approach;
|
|
25667
|
-
}
|
|
25668
|
-
await replacePlaceholders(targetDir, placeholders);
|
|
25919
|
+
await replacePlaceholders(targetDir, placeholders, alreadyRendered);
|
|
25669
25920
|
}
|
|
25670
25921
|
async function copyPluginTemplate(opts) {
|
|
25671
25922
|
const { projectName, typeDir, targetDir, useYalc, packageManager } = opts;
|
|
@@ -25697,13 +25948,18 @@ async function copyPluginTemplate(opts) {
|
|
|
25697
25948
|
generatePnpmWorkspaceYaml(),
|
|
25698
25949
|
"utf-8"
|
|
25699
25950
|
);
|
|
25700
|
-
await restoreIgnoreFile(targetDir);
|
|
25701
|
-
await writeScaffoldNpmrc(targetDir, packageManager);
|
|
25702
25951
|
const nextlyRange = await resolvePluginNextlyRange(useYalc);
|
|
25703
|
-
|
|
25952
|
+
const placeholders = buildPlaceholderMap({
|
|
25953
|
+
pluginName: projectName,
|
|
25954
|
+
nextlyRange
|
|
25955
|
+
});
|
|
25956
|
+
const alreadyRendered = await restoreShippedNames(
|
|
25704
25957
|
targetDir,
|
|
25705
|
-
|
|
25958
|
+
placeholders,
|
|
25959
|
+
packageManager
|
|
25706
25960
|
);
|
|
25961
|
+
await writeScaffoldNpmrc(targetDir, packageManager);
|
|
25962
|
+
await replacePlaceholders(targetDir, placeholders, alreadyRendered);
|
|
25707
25963
|
}
|
|
25708
25964
|
|
|
25709
25965
|
// src/installers/dependencies.ts
|
|
@@ -29396,7 +29652,7 @@ async function createNextly(options = {}) {
|
|
|
29396
29652
|
}
|
|
29397
29653
|
}
|
|
29398
29654
|
const pm = projectInfo.packageManager;
|
|
29399
|
-
const devCommand =
|
|
29655
|
+
const devCommand = `${scriptRunner(pm)} dev`;
|
|
29400
29656
|
const lines = [];
|
|
29401
29657
|
if (isFreshProject && projectName && !installInCwd) {
|
|
29402
29658
|
lines.push(` ${import_picocolors3.default.bold("cd")} ${projectName}`);
|
|
@@ -29476,5 +29732,5 @@ async function createNextly(options = {}) {
|
|
|
29476
29732
|
*/
|
|
29477
29733
|
|
|
29478
29734
|
export { __commonJS, __require, __toESM, capture, createNextly, init, resolveProjectArg, shutdown, validateProjectName };
|
|
29479
|
-
//# sourceMappingURL=chunk-
|
|
29480
|
-
//# sourceMappingURL=chunk-
|
|
29735
|
+
//# sourceMappingURL=chunk-SEU6FVET.mjs.map
|
|
29736
|
+
//# sourceMappingURL=chunk-SEU6FVET.mjs.map
|