@quilted/create 0.1.30 → 0.1.32
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/CHANGELOG.md +12 -0
- package/build/cjs/app.cjs +44 -74
- package/build/cjs/index.cjs +5950 -5408
- package/build/cjs/index2.cjs +21 -27
- package/build/cjs/index3.cjs +32 -32
- package/build/cjs/package.cjs +50 -90
- package/build/cjs/parser-babel.cjs +2 -2
- package/build/cjs/parser-typescript.cjs +2 -2
- package/build/cjs/parser-yaml.cjs +2 -2
- package/build/cjs/{package-manager.cjs → shared/package-manager.cjs} +53 -81
- package/build/cjs/standalone.cjs +2 -2
- package/build/esm/app.mjs +41 -70
- package/build/esm/index.mjs +5954 -5404
- package/build/esm/index2.mjs +5 -5
- package/build/esm/index3.mjs +32 -32
- package/build/esm/package.mjs +47 -86
- package/build/esm/parser-babel.mjs +2 -2
- package/build/esm/parser-typescript.mjs +2 -2
- package/build/esm/parser-yaml.mjs +2 -2
- package/build/esm/{package-manager.mjs → shared/package-manager.mjs} +48 -72
- package/build/esm/standalone.mjs +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/typescript/app.d.ts.map +1 -1
- package/build/typescript/package.d.ts.map +1 -1
- package/build/typescript/shared/prompts.d.ts +4 -4
- package/build/typescript/shared/prompts.d.ts.map +1 -1
- package/package.json +2 -2
- package/source/app.ts +10 -9
- package/source/package.ts +7 -6
- package/source/shared/prompts.ts +6 -2
- package/templates/app-basic/package.json +1 -1
- package/templates/app-single-file/package.json +1 -1
package/build/cjs/index2.cjs
CHANGED
|
@@ -5,12 +5,6 @@ var node_url = require('node:url');
|
|
|
5
5
|
var process = require('node:process');
|
|
6
6
|
var fs = require('node:fs');
|
|
7
7
|
|
|
8
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
-
|
|
10
|
-
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
|
|
11
|
-
var process__default = /*#__PURE__*/_interopDefaultLegacy(process);
|
|
12
|
-
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
|
13
|
-
|
|
14
8
|
/*
|
|
15
9
|
How it works:
|
|
16
10
|
`this.#head` is an instance of `Node` which keeps track of its current value and nests another instance of `Node` that keeps the value that comes after it. When a value is provided to `.enqueue()`, the code needs to iterate through `this.#head`, going deeper and deeper to find the last value. However, iterating through every single item is slow. This problem is solved by saving a reference to the last value as `this.#tail` so that it can reference it to add a new value.
|
|
@@ -172,7 +166,7 @@ async function pLocate(
|
|
|
172
166
|
{
|
|
173
167
|
concurrency = Number.POSITIVE_INFINITY,
|
|
174
168
|
preserveOrder = true,
|
|
175
|
-
},
|
|
169
|
+
} = {},
|
|
176
170
|
) {
|
|
177
171
|
const limit = pLimit(concurrency);
|
|
178
172
|
|
|
@@ -213,7 +207,7 @@ const toPath$1 = urlOrPath => urlOrPath instanceof URL ? node_url.fileURLToPath(
|
|
|
213
207
|
async function locatePath(
|
|
214
208
|
paths,
|
|
215
209
|
{
|
|
216
|
-
cwd =
|
|
210
|
+
cwd = process.cwd(),
|
|
217
211
|
type = 'file',
|
|
218
212
|
allowSymlinks = true,
|
|
219
213
|
concurrency,
|
|
@@ -227,7 +221,7 @@ async function locatePath(
|
|
|
227
221
|
|
|
228
222
|
return pLocate(paths, async path_ => {
|
|
229
223
|
try {
|
|
230
|
-
const stat = await statFunction(
|
|
224
|
+
const stat = await statFunction(path.resolve(cwd, path_));
|
|
231
225
|
return matchType(type, stat);
|
|
232
226
|
} catch {
|
|
233
227
|
return false;
|
|
@@ -238,7 +232,7 @@ async function locatePath(
|
|
|
238
232
|
function locatePathSync(
|
|
239
233
|
paths,
|
|
240
234
|
{
|
|
241
|
-
cwd =
|
|
235
|
+
cwd = process.cwd(),
|
|
242
236
|
type = 'file',
|
|
243
237
|
allowSymlinks = true,
|
|
244
238
|
} = {},
|
|
@@ -246,11 +240,11 @@ function locatePathSync(
|
|
|
246
240
|
checkType(type);
|
|
247
241
|
cwd = toPath$1(cwd);
|
|
248
242
|
|
|
249
|
-
const statFunction = allowSymlinks ?
|
|
243
|
+
const statFunction = allowSymlinks ? fs.statSync : fs.lstatSync;
|
|
250
244
|
|
|
251
245
|
for (const path_ of paths) {
|
|
252
246
|
try {
|
|
253
|
-
const stat = statFunction(
|
|
247
|
+
const stat = statFunction(path.resolve(cwd, path_));
|
|
254
248
|
|
|
255
249
|
if (matchType(type, stat)) {
|
|
256
250
|
return path_;
|
|
@@ -263,10 +257,10 @@ const toPath = urlOrPath => urlOrPath instanceof URL ? node_url.fileURLToPath(ur
|
|
|
263
257
|
|
|
264
258
|
const findUpStop = Symbol('findUpStop');
|
|
265
259
|
|
|
266
|
-
async function findUpMultiple(name, options) {
|
|
267
|
-
let directory =
|
|
268
|
-
const {root} =
|
|
269
|
-
const stopAt =
|
|
260
|
+
async function findUpMultiple(name, options = {}) {
|
|
261
|
+
let directory = path.resolve(toPath(options.cwd) || '');
|
|
262
|
+
const {root} = path.parse(directory);
|
|
263
|
+
const stopAt = path.resolve(directory, options.stopAt || root);
|
|
270
264
|
const limit = options.limit || Number.POSITIVE_INFINITY;
|
|
271
265
|
const paths = [name].flat();
|
|
272
266
|
|
|
@@ -294,22 +288,22 @@ async function findUpMultiple(name, options) {
|
|
|
294
288
|
}
|
|
295
289
|
|
|
296
290
|
if (foundPath) {
|
|
297
|
-
matches.push(
|
|
291
|
+
matches.push(path.resolve(directory, foundPath));
|
|
298
292
|
}
|
|
299
293
|
|
|
300
294
|
if (directory === stopAt || matches.length >= limit) {
|
|
301
295
|
break;
|
|
302
296
|
}
|
|
303
297
|
|
|
304
|
-
directory =
|
|
298
|
+
directory = path.dirname(directory);
|
|
305
299
|
}
|
|
306
300
|
|
|
307
301
|
return matches;
|
|
308
302
|
}
|
|
309
303
|
|
|
310
|
-
function findUpMultipleSync(name, options) {
|
|
311
|
-
let directory =
|
|
312
|
-
const {root} =
|
|
304
|
+
function findUpMultipleSync(name, options = {}) {
|
|
305
|
+
let directory = path.resolve(toPath(options.cwd) || '');
|
|
306
|
+
const {root} = path.parse(directory);
|
|
313
307
|
const stopAt = options.stopAt || root;
|
|
314
308
|
const limit = options.limit || Number.POSITIVE_INFINITY;
|
|
315
309
|
const paths = [name].flat();
|
|
@@ -337,37 +331,37 @@ function findUpMultipleSync(name, options) {
|
|
|
337
331
|
}
|
|
338
332
|
|
|
339
333
|
if (foundPath) {
|
|
340
|
-
matches.push(
|
|
334
|
+
matches.push(path.resolve(directory, foundPath));
|
|
341
335
|
}
|
|
342
336
|
|
|
343
337
|
if (directory === stopAt || matches.length >= limit) {
|
|
344
338
|
break;
|
|
345
339
|
}
|
|
346
340
|
|
|
347
|
-
directory =
|
|
341
|
+
directory = path.dirname(directory);
|
|
348
342
|
}
|
|
349
343
|
|
|
350
344
|
return matches;
|
|
351
345
|
}
|
|
352
346
|
|
|
353
|
-
async function findUp(name, options) {
|
|
347
|
+
async function findUp(name, options = {}) {
|
|
354
348
|
const matches = await findUpMultiple(name, {...options, limit: 1});
|
|
355
349
|
return matches[0];
|
|
356
350
|
}
|
|
357
351
|
|
|
358
|
-
function findUpSync(name, options) {
|
|
352
|
+
function findUpSync(name, options = {}) {
|
|
359
353
|
const matches = findUpMultipleSync(name, {...options, limit: 1});
|
|
360
354
|
return matches[0];
|
|
361
355
|
}
|
|
362
356
|
|
|
363
357
|
async function packageDirectory({cwd} = {}) {
|
|
364
358
|
const filePath = await findUp('package.json', {cwd});
|
|
365
|
-
return filePath &&
|
|
359
|
+
return filePath && path.dirname(filePath);
|
|
366
360
|
}
|
|
367
361
|
|
|
368
362
|
function packageDirectorySync({cwd} = {}) {
|
|
369
363
|
const filePath = findUpSync('package.json', {cwd});
|
|
370
|
-
return filePath &&
|
|
364
|
+
return filePath && path.dirname(filePath);
|
|
371
365
|
}
|
|
372
366
|
|
|
373
367
|
exports.packageDirectory = packageDirectory;
|
package/build/cjs/index3.cjs
CHANGED
|
@@ -581,7 +581,7 @@ var anchors$2 = anchors$3;
|
|
|
581
581
|
var visit$2 = visit$6;
|
|
582
582
|
var Node$p = Node$t;
|
|
583
583
|
|
|
584
|
-
|
|
584
|
+
let Alias$4 = class Alias extends Node$p.NodeBase {
|
|
585
585
|
constructor(source) {
|
|
586
586
|
super(Node$p.ALIAS);
|
|
587
587
|
this.source = source;
|
|
@@ -646,7 +646,7 @@ class Alias$4 extends Node$p.NodeBase {
|
|
|
646
646
|
}
|
|
647
647
|
return src;
|
|
648
648
|
}
|
|
649
|
-
}
|
|
649
|
+
};
|
|
650
650
|
function getAliasCount(doc, node, anchors) {
|
|
651
651
|
if (Node$p.isAlias(node)) {
|
|
652
652
|
const source = node.resolve(doc);
|
|
@@ -722,7 +722,7 @@ var Node$n = Node$t;
|
|
|
722
722
|
var toJS$4 = toJS$6;
|
|
723
723
|
|
|
724
724
|
const isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object');
|
|
725
|
-
|
|
725
|
+
let Scalar$j = class Scalar extends Node$n.NodeBase {
|
|
726
726
|
constructor(value) {
|
|
727
727
|
super(Node$n.SCALAR);
|
|
728
728
|
this.value = value;
|
|
@@ -733,7 +733,7 @@ class Scalar$j extends Node$n.NodeBase {
|
|
|
733
733
|
toString() {
|
|
734
734
|
return String(this.value);
|
|
735
735
|
}
|
|
736
|
-
}
|
|
736
|
+
};
|
|
737
737
|
Scalar$j.BLOCK_FOLDED = 'BLOCK_FOLDED';
|
|
738
738
|
Scalar$j.BLOCK_LITERAL = 'BLOCK_LITERAL';
|
|
739
739
|
Scalar$j.PLAIN = 'PLAIN';
|
|
@@ -859,7 +859,7 @@ function collectionFromPath(schema, path, value) {
|
|
|
859
859
|
// as it does not cover untypable empty non-string iterables (e.g. []).
|
|
860
860
|
const isEmptyPath = (path) => path == null ||
|
|
861
861
|
(typeof path === 'object' && !!path[Symbol.iterator]().next().done);
|
|
862
|
-
|
|
862
|
+
let Collection$4 = class Collection extends Node$l.NodeBase {
|
|
863
863
|
constructor(type, schema) {
|
|
864
864
|
super(type);
|
|
865
865
|
Object.defineProperty(this, 'schema', {
|
|
@@ -972,7 +972,7 @@ class Collection$4 extends Node$l.NodeBase {
|
|
|
972
972
|
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
|
|
973
973
|
}
|
|
974
974
|
}
|
|
975
|
-
}
|
|
975
|
+
};
|
|
976
976
|
Collection$4.maxFlowStringSingleLineLength = 60;
|
|
977
977
|
|
|
978
978
|
Collection$5.Collection = Collection$4;
|
|
@@ -1853,7 +1853,7 @@ function createPair(key, value, ctx) {
|
|
|
1853
1853
|
const v = createNode$2.createNode(value, undefined, ctx);
|
|
1854
1854
|
return new Pair$8(k, v);
|
|
1855
1855
|
}
|
|
1856
|
-
|
|
1856
|
+
let Pair$8 = class Pair {
|
|
1857
1857
|
constructor(key, value = null) {
|
|
1858
1858
|
Object.defineProperty(this, Node$h.NODE_TYPE, { value: Node$h.PAIR });
|
|
1859
1859
|
this.key = key;
|
|
@@ -1876,7 +1876,7 @@ class Pair$8 {
|
|
|
1876
1876
|
? stringifyPair.stringifyPair(this, ctx, onComment, onChompKeep)
|
|
1877
1877
|
: JSON.stringify(this);
|
|
1878
1878
|
}
|
|
1879
|
-
}
|
|
1879
|
+
};
|
|
1880
1880
|
|
|
1881
1881
|
Pair$9.Pair = Pair$8;
|
|
1882
1882
|
Pair$9.createPair = createPair;
|
|
@@ -2060,7 +2060,7 @@ function findPair(items, key) {
|
|
|
2060
2060
|
}
|
|
2061
2061
|
return undefined;
|
|
2062
2062
|
}
|
|
2063
|
-
|
|
2063
|
+
let YAMLMap$6 = class YAMLMap extends Collection$2.Collection {
|
|
2064
2064
|
constructor(schema) {
|
|
2065
2065
|
super(Node$f.MAP, schema);
|
|
2066
2066
|
this.items = [];
|
|
@@ -2154,7 +2154,7 @@ class YAMLMap$6 extends Collection$2.Collection {
|
|
|
2154
2154
|
onComment
|
|
2155
2155
|
});
|
|
2156
2156
|
}
|
|
2157
|
-
}
|
|
2157
|
+
};
|
|
2158
2158
|
|
|
2159
2159
|
YAMLMap$7.YAMLMap = YAMLMap$6;
|
|
2160
2160
|
YAMLMap$7.findPair = findPair;
|
|
@@ -2212,7 +2212,7 @@ var Node$d = Node$t;
|
|
|
2212
2212
|
var Scalar$d = Scalar$k;
|
|
2213
2213
|
var toJS$2 = toJS$6;
|
|
2214
2214
|
|
|
2215
|
-
|
|
2215
|
+
let YAMLSeq$6 = class YAMLSeq extends Collection$1.Collection {
|
|
2216
2216
|
constructor(schema) {
|
|
2217
2217
|
super(Node$d.SEQ, schema);
|
|
2218
2218
|
this.items = [];
|
|
@@ -2292,7 +2292,7 @@ class YAMLSeq$6 extends Collection$1.Collection {
|
|
|
2292
2292
|
onComment
|
|
2293
2293
|
});
|
|
2294
2294
|
}
|
|
2295
|
-
}
|
|
2295
|
+
};
|
|
2296
2296
|
function asItemIndex(key) {
|
|
2297
2297
|
let idx = Node$d.isScalar(key) ? key.value : key;
|
|
2298
2298
|
if (idx && typeof idx === 'string')
|
|
@@ -3325,7 +3325,7 @@ var string = string$5;
|
|
|
3325
3325
|
var tags = tags$1;
|
|
3326
3326
|
|
|
3327
3327
|
const sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
|
|
3328
|
-
|
|
3328
|
+
let Schema$2 = class Schema {
|
|
3329
3329
|
constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
|
|
3330
3330
|
this.compat = Array.isArray(compat)
|
|
3331
3331
|
? tags.getTags(compat, 'compat')
|
|
@@ -3353,7 +3353,7 @@ class Schema$2 {
|
|
|
3353
3353
|
copy.tags = this.tags.slice();
|
|
3354
3354
|
return copy;
|
|
3355
3355
|
}
|
|
3356
|
-
}
|
|
3356
|
+
};
|
|
3357
3357
|
|
|
3358
3358
|
Schema$3.Schema = Schema$2;
|
|
3359
3359
|
|
|
@@ -3515,7 +3515,7 @@ var applyReviver = applyReviver$2;
|
|
|
3515
3515
|
var createNode = createNode$5;
|
|
3516
3516
|
var directives$1 = directives$2;
|
|
3517
3517
|
|
|
3518
|
-
|
|
3518
|
+
let Document$4 = class Document {
|
|
3519
3519
|
constructor(value, replacer, options) {
|
|
3520
3520
|
/** A comment before this Document */
|
|
3521
3521
|
this.commentBefore = null;
|
|
@@ -3826,7 +3826,7 @@ class Document$4 {
|
|
|
3826
3826
|
}
|
|
3827
3827
|
return stringifyDocument.stringifyDocument(this, options);
|
|
3828
3828
|
}
|
|
3829
|
-
}
|
|
3829
|
+
};
|
|
3830
3830
|
function assertCollection(contents) {
|
|
3831
3831
|
if (Node$6.isCollection(contents))
|
|
3832
3832
|
return true;
|
|
@@ -3837,7 +3837,7 @@ Document$5.Document = Document$4;
|
|
|
3837
3837
|
|
|
3838
3838
|
var errors$4 = {};
|
|
3839
3839
|
|
|
3840
|
-
|
|
3840
|
+
let YAMLError$1 = class YAMLError extends Error {
|
|
3841
3841
|
constructor(name, pos, code, message) {
|
|
3842
3842
|
super();
|
|
3843
3843
|
this.name = name;
|
|
@@ -3845,17 +3845,17 @@ class YAMLError$1 extends Error {
|
|
|
3845
3845
|
this.message = message;
|
|
3846
3846
|
this.pos = pos;
|
|
3847
3847
|
}
|
|
3848
|
-
}
|
|
3849
|
-
|
|
3848
|
+
};
|
|
3849
|
+
let YAMLParseError$1 = class YAMLParseError extends YAMLError$1 {
|
|
3850
3850
|
constructor(pos, code, message) {
|
|
3851
3851
|
super('YAMLParseError', pos, code, message);
|
|
3852
3852
|
}
|
|
3853
|
-
}
|
|
3854
|
-
|
|
3853
|
+
};
|
|
3854
|
+
let YAMLWarning$1 = class YAMLWarning extends YAMLError$1 {
|
|
3855
3855
|
constructor(pos, code, message) {
|
|
3856
3856
|
super('YAMLWarning', pos, code, message);
|
|
3857
3857
|
}
|
|
3858
|
-
}
|
|
3858
|
+
};
|
|
3859
3859
|
const prettifyError = (src, lc) => (error) => {
|
|
3860
3860
|
if (error.pos[0] === -1)
|
|
3861
3861
|
return;
|
|
@@ -5300,7 +5300,7 @@ function parsePrelude(prelude) {
|
|
|
5300
5300
|
* const docs = new Composer().compose(tokens)
|
|
5301
5301
|
* ```
|
|
5302
5302
|
*/
|
|
5303
|
-
|
|
5303
|
+
let Composer$1 = class Composer {
|
|
5304
5304
|
constructor(options = {}) {
|
|
5305
5305
|
this.doc = null;
|
|
5306
5306
|
this.atDirectives = false;
|
|
@@ -5462,7 +5462,7 @@ class Composer$1 {
|
|
|
5462
5462
|
yield doc;
|
|
5463
5463
|
}
|
|
5464
5464
|
}
|
|
5465
|
-
}
|
|
5465
|
+
};
|
|
5466
5466
|
|
|
5467
5467
|
composer$2.Composer = Composer$1;
|
|
5468
5468
|
|
|
@@ -6065,7 +6065,7 @@ const isNotAnchorChar = (ch) => !ch || invalidAnchorChars.includes(ch);
|
|
|
6065
6065
|
* - `\x1f` (Unit Separator): Next token is a scalar value
|
|
6066
6066
|
* - `\u{FEFF}` (Byte order mark): Emitted separately outside documents
|
|
6067
6067
|
*/
|
|
6068
|
-
|
|
6068
|
+
let Lexer$1 = class Lexer {
|
|
6069
6069
|
constructor() {
|
|
6070
6070
|
/**
|
|
6071
6071
|
* Flag indicating whether the end of the current buffer marks the end of
|
|
@@ -6662,7 +6662,7 @@ class Lexer$1 {
|
|
|
6662
6662
|
ch = this.buffer[++i];
|
|
6663
6663
|
return yield* this.pushToIndex(i, false);
|
|
6664
6664
|
}
|
|
6665
|
-
}
|
|
6665
|
+
};
|
|
6666
6666
|
|
|
6667
6667
|
lexer$2.Lexer = Lexer$1;
|
|
6668
6668
|
|
|
@@ -6673,7 +6673,7 @@ var lineCounter$2 = {};
|
|
|
6673
6673
|
* determining the one-indexed `{ line, col }` position for any offset
|
|
6674
6674
|
* within the input.
|
|
6675
6675
|
*/
|
|
6676
|
-
|
|
6676
|
+
let LineCounter$1 = class LineCounter {
|
|
6677
6677
|
constructor() {
|
|
6678
6678
|
this.lineStarts = [];
|
|
6679
6679
|
/**
|
|
@@ -6704,7 +6704,7 @@ class LineCounter$1 {
|
|
|
6704
6704
|
return { line: low, col: offset - start + 1 };
|
|
6705
6705
|
};
|
|
6706
6706
|
}
|
|
6707
|
-
}
|
|
6707
|
+
};
|
|
6708
6708
|
|
|
6709
6709
|
lineCounter$2.LineCounter = LineCounter$1;
|
|
6710
6710
|
|
|
@@ -6829,7 +6829,7 @@ function fixFlowSeqItems(fc) {
|
|
|
6829
6829
|
* }
|
|
6830
6830
|
* ```
|
|
6831
6831
|
*/
|
|
6832
|
-
|
|
6832
|
+
let Parser$1 = class Parser {
|
|
6833
6833
|
/**
|
|
6834
6834
|
* @param onNewLine - If defined, called separately with the start position of
|
|
6835
6835
|
* each new line (in `parse()`, including the start of input).
|
|
@@ -7659,7 +7659,7 @@ class Parser$1 {
|
|
|
7659
7659
|
yield* this.pop();
|
|
7660
7660
|
}
|
|
7661
7661
|
}
|
|
7662
|
-
}
|
|
7662
|
+
};
|
|
7663
7663
|
|
|
7664
7664
|
parser$2.Parser = Parser$1;
|
|
7665
7665
|
|
|
@@ -7819,7 +7819,6 @@ var visitAsync = dist.visitAsync = visit.visitAsync;
|
|
|
7819
7819
|
|
|
7820
7820
|
var index = /*#__PURE__*/_mergeNamespaces({
|
|
7821
7821
|
__proto__: null,
|
|
7822
|
-
'default': dist,
|
|
7823
7822
|
Composer: Composer,
|
|
7824
7823
|
Document: Document_1,
|
|
7825
7824
|
Schema: Schema_1,
|
|
@@ -7848,7 +7847,8 @@ var index = /*#__PURE__*/_mergeNamespaces({
|
|
|
7848
7847
|
parseDocument: parseDocument,
|
|
7849
7848
|
stringify: stringify,
|
|
7850
7849
|
visit: visit_1,
|
|
7851
|
-
visitAsync: visitAsync
|
|
7850
|
+
visitAsync: visitAsync,
|
|
7851
|
+
'default': dist
|
|
7852
7852
|
}, [dist]);
|
|
7853
7853
|
|
|
7854
7854
|
exports.index = index;
|