@quilted/create 0.1.18 → 0.1.21
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 +18 -0
- package/build/cjs/app.cjs +525 -236
- package/build/cjs/index.cjs +1020 -233
- package/build/cjs/index3.cjs +577 -1205
- package/build/cjs/package-manager.cjs +801 -199
- package/build/cjs/package.cjs +702 -320
- package/build/esm/app.mjs +530 -241
- package/build/esm/index.mjs +1002 -219
- package/build/esm/index3.mjs +548 -1205
- package/build/esm/package-manager.mjs +801 -200
- package/build/esm/package.mjs +702 -320
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/typescript/package.d.ts +1 -1
- package/package.json +5 -3
- package/quilt.project.ts +19 -5
- package/source/create.ts +2 -2
- package/source/package.ts +1 -1
- package/templates/app-basic/quilt.project.ts +5 -5
- package/templates/app-basic/tsconfig.json +1 -1
- package/templates/app-single-file/quilt.project.ts +3 -4
- package/templates/app-single-file/tsconfig.json +1 -1
- package/templates/package/package.json +3 -2
- package/templates/package/quilt.project.ts +3 -4
- package/templates/package/tsconfig.json +1 -1
- package/templates/workspace/package.json +1 -1
- package/tsconfig.json +1 -1
package/build/esm/index.mjs
CHANGED
|
@@ -5,6 +5,444 @@ import 'url';
|
|
|
5
5
|
import require$$0$1 from 'readline';
|
|
6
6
|
import require$$2 from 'events';
|
|
7
7
|
|
|
8
|
+
function _taggedTemplateLiteral$1(strings, raw) {
|
|
9
|
+
if (!raw) {
|
|
10
|
+
raw = strings.slice(0);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
14
|
+
raw: {
|
|
15
|
+
value: Object.freeze(raw)
|
|
16
|
+
}
|
|
17
|
+
}));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
|
|
21
|
+
try {
|
|
22
|
+
var info = gen[key](arg);
|
|
23
|
+
var value = info.value;
|
|
24
|
+
} catch (error) {
|
|
25
|
+
reject(error);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (info.done) {
|
|
30
|
+
resolve(value);
|
|
31
|
+
} else {
|
|
32
|
+
Promise.resolve(value).then(_next, _throw);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function _asyncToGenerator$5(fn) {
|
|
37
|
+
return function () {
|
|
38
|
+
var self = this,
|
|
39
|
+
args = arguments;
|
|
40
|
+
return new Promise(function (resolve, reject) {
|
|
41
|
+
var gen = fn.apply(self, args);
|
|
42
|
+
|
|
43
|
+
function _next(value) {
|
|
44
|
+
asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "next", value);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function _throw(err) {
|
|
48
|
+
asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "throw", err);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
_next(undefined);
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
var regeneratorRuntime$1 = {exports: {}};
|
|
57
|
+
|
|
58
|
+
var _typeof$1 = {exports: {}};
|
|
59
|
+
|
|
60
|
+
(function (module) {
|
|
61
|
+
function _typeof(obj) {
|
|
62
|
+
"@babel/helpers - typeof";
|
|
63
|
+
|
|
64
|
+
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
65
|
+
return typeof obj;
|
|
66
|
+
} : function (obj) {
|
|
67
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
68
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
72
|
+
}(_typeof$1));
|
|
73
|
+
|
|
74
|
+
(function (module) {
|
|
75
|
+
var _typeof = _typeof$1.exports["default"];
|
|
76
|
+
|
|
77
|
+
function _regeneratorRuntime() {
|
|
78
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
79
|
+
|
|
80
|
+
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
81
|
+
return exports;
|
|
82
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83
|
+
var exports = {},
|
|
84
|
+
Op = Object.prototype,
|
|
85
|
+
hasOwn = Op.hasOwnProperty,
|
|
86
|
+
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
87
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
88
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
89
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
90
|
+
|
|
91
|
+
function define(obj, key, value) {
|
|
92
|
+
return Object.defineProperty(obj, key, {
|
|
93
|
+
value: value,
|
|
94
|
+
enumerable: !0,
|
|
95
|
+
configurable: !0,
|
|
96
|
+
writable: !0
|
|
97
|
+
}), obj[key];
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
try {
|
|
101
|
+
define({}, "");
|
|
102
|
+
} catch (err) {
|
|
103
|
+
define = function define(obj, key, value) {
|
|
104
|
+
return obj[key] = value;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
109
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
110
|
+
generator = Object.create(protoGenerator.prototype),
|
|
111
|
+
context = new Context(tryLocsList || []);
|
|
112
|
+
return generator._invoke = function (innerFn, self, context) {
|
|
113
|
+
var state = "suspendedStart";
|
|
114
|
+
return function (method, arg) {
|
|
115
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
|
116
|
+
|
|
117
|
+
if ("completed" === state) {
|
|
118
|
+
if ("throw" === method) throw arg;
|
|
119
|
+
return doneResult();
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
for (context.method = method, context.arg = arg;;) {
|
|
123
|
+
var delegate = context.delegate;
|
|
124
|
+
|
|
125
|
+
if (delegate) {
|
|
126
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
127
|
+
|
|
128
|
+
if (delegateResult) {
|
|
129
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
130
|
+
return delegateResult;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
135
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
136
|
+
context.dispatchException(context.arg);
|
|
137
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
138
|
+
state = "executing";
|
|
139
|
+
var record = tryCatch(innerFn, self, context);
|
|
140
|
+
|
|
141
|
+
if ("normal" === record.type) {
|
|
142
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
143
|
+
return {
|
|
144
|
+
value: record.arg,
|
|
145
|
+
done: context.done
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
}(innerFn, self, context), generator;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function tryCatch(fn, obj, arg) {
|
|
156
|
+
try {
|
|
157
|
+
return {
|
|
158
|
+
type: "normal",
|
|
159
|
+
arg: fn.call(obj, arg)
|
|
160
|
+
};
|
|
161
|
+
} catch (err) {
|
|
162
|
+
return {
|
|
163
|
+
type: "throw",
|
|
164
|
+
arg: err
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
exports.wrap = wrap;
|
|
170
|
+
var ContinueSentinel = {};
|
|
171
|
+
|
|
172
|
+
function Generator() {}
|
|
173
|
+
|
|
174
|
+
function GeneratorFunction() {}
|
|
175
|
+
|
|
176
|
+
function GeneratorFunctionPrototype() {}
|
|
177
|
+
|
|
178
|
+
var IteratorPrototype = {};
|
|
179
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
180
|
+
return this;
|
|
181
|
+
});
|
|
182
|
+
var getProto = Object.getPrototypeOf,
|
|
183
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
184
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
185
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
186
|
+
|
|
187
|
+
function defineIteratorMethods(prototype) {
|
|
188
|
+
["next", "throw", "return"].forEach(function (method) {
|
|
189
|
+
define(prototype, method, function (arg) {
|
|
190
|
+
return this._invoke(method, arg);
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
196
|
+
function invoke(method, arg, resolve, reject) {
|
|
197
|
+
var record = tryCatch(generator[method], generator, arg);
|
|
198
|
+
|
|
199
|
+
if ("throw" !== record.type) {
|
|
200
|
+
var result = record.arg,
|
|
201
|
+
value = result.value;
|
|
202
|
+
return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
203
|
+
invoke("next", value, resolve, reject);
|
|
204
|
+
}, function (err) {
|
|
205
|
+
invoke("throw", err, resolve, reject);
|
|
206
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
207
|
+
result.value = unwrapped, resolve(result);
|
|
208
|
+
}, function (error) {
|
|
209
|
+
return invoke("throw", error, resolve, reject);
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
reject(record.arg);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
var previousPromise;
|
|
217
|
+
|
|
218
|
+
this._invoke = function (method, arg) {
|
|
219
|
+
function callInvokeWithMethodAndArg() {
|
|
220
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
221
|
+
invoke(method, arg, resolve, reject);
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
230
|
+
var method = delegate.iterator[context.method];
|
|
231
|
+
|
|
232
|
+
if (undefined === method) {
|
|
233
|
+
if (context.delegate = null, "throw" === context.method) {
|
|
234
|
+
if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
|
|
235
|
+
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
return ContinueSentinel;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
242
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
243
|
+
var info = record.arg;
|
|
244
|
+
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
function pushTryEntry(locs) {
|
|
248
|
+
var entry = {
|
|
249
|
+
tryLoc: locs[0]
|
|
250
|
+
};
|
|
251
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
function resetTryEntry(entry) {
|
|
255
|
+
var record = entry.completion || {};
|
|
256
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
function Context(tryLocsList) {
|
|
260
|
+
this.tryEntries = [{
|
|
261
|
+
tryLoc: "root"
|
|
262
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
function values(iterable) {
|
|
266
|
+
if (iterable) {
|
|
267
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
268
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
269
|
+
if ("function" == typeof iterable.next) return iterable;
|
|
270
|
+
|
|
271
|
+
if (!isNaN(iterable.length)) {
|
|
272
|
+
var i = -1,
|
|
273
|
+
next = function next() {
|
|
274
|
+
for (; ++i < iterable.length;) {
|
|
275
|
+
if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
return next.value = undefined, next.done = !0, next;
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
return next.next = next;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
return {
|
|
286
|
+
next: doneResult
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
function doneResult() {
|
|
291
|
+
return {
|
|
292
|
+
value: undefined,
|
|
293
|
+
done: !0
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
298
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
299
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
300
|
+
}, exports.mark = function (genFun) {
|
|
301
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
302
|
+
}, exports.awrap = function (arg) {
|
|
303
|
+
return {
|
|
304
|
+
__await: arg
|
|
305
|
+
};
|
|
306
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
307
|
+
return this;
|
|
308
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
309
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
310
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
311
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
312
|
+
return result.done ? result.value : iter.next();
|
|
313
|
+
});
|
|
314
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
315
|
+
return this;
|
|
316
|
+
}), define(Gp, "toString", function () {
|
|
317
|
+
return "[object Generator]";
|
|
318
|
+
}), exports.keys = function (object) {
|
|
319
|
+
var keys = [];
|
|
320
|
+
|
|
321
|
+
for (var key in object) {
|
|
322
|
+
keys.push(key);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
return keys.reverse(), function next() {
|
|
326
|
+
for (; keys.length;) {
|
|
327
|
+
var key = keys.pop();
|
|
328
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
return next.done = !0, next;
|
|
332
|
+
};
|
|
333
|
+
}, exports.values = values, Context.prototype = {
|
|
334
|
+
constructor: Context,
|
|
335
|
+
reset: function reset(skipTempReset) {
|
|
336
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {
|
|
337
|
+
"t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
stop: function stop() {
|
|
341
|
+
this.done = !0;
|
|
342
|
+
var rootRecord = this.tryEntries[0].completion;
|
|
343
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
344
|
+
return this.rval;
|
|
345
|
+
},
|
|
346
|
+
dispatchException: function dispatchException(exception) {
|
|
347
|
+
if (this.done) throw exception;
|
|
348
|
+
var context = this;
|
|
349
|
+
|
|
350
|
+
function handle(loc, caught) {
|
|
351
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
355
|
+
var entry = this.tryEntries[i],
|
|
356
|
+
record = entry.completion;
|
|
357
|
+
if ("root" === entry.tryLoc) return handle("end");
|
|
358
|
+
|
|
359
|
+
if (entry.tryLoc <= this.prev) {
|
|
360
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
361
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
362
|
+
|
|
363
|
+
if (hasCatch && hasFinally) {
|
|
364
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
365
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
366
|
+
} else if (hasCatch) {
|
|
367
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
368
|
+
} else {
|
|
369
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
370
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
abrupt: function abrupt(type, arg) {
|
|
376
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
377
|
+
var entry = this.tryEntries[i];
|
|
378
|
+
|
|
379
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
380
|
+
var finallyEntry = entry;
|
|
381
|
+
break;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
386
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
387
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
388
|
+
},
|
|
389
|
+
complete: function complete(record, afterLoc) {
|
|
390
|
+
if ("throw" === record.type) throw record.arg;
|
|
391
|
+
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
|
392
|
+
},
|
|
393
|
+
finish: function finish(finallyLoc) {
|
|
394
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
395
|
+
var entry = this.tryEntries[i];
|
|
396
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
"catch": function _catch(tryLoc) {
|
|
400
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
401
|
+
var entry = this.tryEntries[i];
|
|
402
|
+
|
|
403
|
+
if (entry.tryLoc === tryLoc) {
|
|
404
|
+
var record = entry.completion;
|
|
405
|
+
|
|
406
|
+
if ("throw" === record.type) {
|
|
407
|
+
var thrown = record.arg;
|
|
408
|
+
resetTryEntry(entry);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
return thrown;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
throw new Error("illegal catch attempt");
|
|
416
|
+
},
|
|
417
|
+
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
|
|
418
|
+
return this.delegate = {
|
|
419
|
+
iterator: values(iterable),
|
|
420
|
+
resultName: resultName,
|
|
421
|
+
nextLoc: nextLoc
|
|
422
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
423
|
+
}
|
|
424
|
+
}, exports;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
428
|
+
}(regeneratorRuntime$1));
|
|
429
|
+
|
|
430
|
+
// TODO(Babel 8): Remove this file.
|
|
431
|
+
|
|
432
|
+
var runtime = regeneratorRuntime$1.exports();
|
|
433
|
+
var regenerator = runtime;
|
|
434
|
+
|
|
435
|
+
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
|
|
436
|
+
try {
|
|
437
|
+
regeneratorRuntime = runtime;
|
|
438
|
+
} catch (accidentalStrictMode) {
|
|
439
|
+
if (typeof globalThis === "object") {
|
|
440
|
+
globalThis.regeneratorRuntime = runtime;
|
|
441
|
+
} else {
|
|
442
|
+
Function("r", "regeneratorRuntime = r")(runtime);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
|
|
8
446
|
const flagSymbol = Symbol('arg flag');
|
|
9
447
|
|
|
10
448
|
class ArgError extends Error {
|
|
@@ -417,13 +855,13 @@ colorette.whiteBright = whiteBright;
|
|
|
417
855
|
colorette.yellow = yellow;
|
|
418
856
|
colorette.yellowBright = yellowBright;
|
|
419
857
|
|
|
420
|
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
858
|
+
var _createClass$1 = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
421
859
|
|
|
422
|
-
var _templateObject = _taggedTemplateLiteral(['', ''], ['', '']);
|
|
860
|
+
var _templateObject$2 = _taggedTemplateLiteral(['', ''], ['', '']);
|
|
423
861
|
|
|
424
862
|
function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
425
863
|
|
|
426
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
864
|
+
function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
427
865
|
|
|
428
866
|
/**
|
|
429
867
|
* @class TemplateTag
|
|
@@ -443,7 +881,7 @@ var TemplateTag = function () {
|
|
|
443
881
|
transformers[_key] = arguments[_key];
|
|
444
882
|
}
|
|
445
883
|
|
|
446
|
-
_classCallCheck(this, TemplateTag);
|
|
884
|
+
_classCallCheck$1(this, TemplateTag);
|
|
447
885
|
|
|
448
886
|
this.tag = function (strings) {
|
|
449
887
|
for (var _len2 = arguments.length, expressions = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
@@ -491,7 +929,7 @@ var TemplateTag = function () {
|
|
|
491
929
|
*/
|
|
492
930
|
|
|
493
931
|
|
|
494
|
-
_createClass(TemplateTag, [{
|
|
932
|
+
_createClass$1(TemplateTag, [{
|
|
495
933
|
key: 'interimTag',
|
|
496
934
|
|
|
497
935
|
|
|
@@ -508,7 +946,7 @@ var TemplateTag = function () {
|
|
|
508
946
|
substitutions[_key3 - 2] = arguments[_key3];
|
|
509
947
|
}
|
|
510
948
|
|
|
511
|
-
return this.tag(_templateObject, previousTag.apply(undefined, [template].concat(substitutions)));
|
|
949
|
+
return this.tag(_templateObject$2, previousTag.apply(undefined, [template].concat(substitutions)));
|
|
512
950
|
}
|
|
513
951
|
|
|
514
952
|
/**
|
|
@@ -778,90 +1216,232 @@ var stripIndent = new TemplateTag(stripIndentTransformer, trimResultTransformer)
|
|
|
778
1216
|
|
|
779
1217
|
new TemplateTag(stripIndentTransformer('all'), trimResultTransformer);
|
|
780
1218
|
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
1219
|
+
function _defineProperty$1(obj, key, value) {
|
|
1220
|
+
if (key in obj) {
|
|
1221
|
+
Object.defineProperty(obj, key, {
|
|
1222
|
+
value: value,
|
|
1223
|
+
enumerable: true,
|
|
1224
|
+
configurable: true,
|
|
1225
|
+
writable: true
|
|
1226
|
+
});
|
|
1227
|
+
} else {
|
|
1228
|
+
obj[key] = value;
|
|
784
1229
|
}
|
|
785
1230
|
|
|
786
|
-
|
|
787
|
-
|
|
1231
|
+
return obj;
|
|
1232
|
+
}
|
|
788
1233
|
|
|
789
|
-
|
|
790
|
-
|
|
1234
|
+
function _classCallCheck(instance, Constructor) {
|
|
1235
|
+
if (!(instance instanceof Constructor)) {
|
|
1236
|
+
throw new TypeError("Cannot call a class as a function");
|
|
791
1237
|
}
|
|
1238
|
+
}
|
|
792
1239
|
|
|
1240
|
+
function _defineProperties(target, props) {
|
|
1241
|
+
for (var i = 0; i < props.length; i++) {
|
|
1242
|
+
var descriptor = props[i];
|
|
1243
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
1244
|
+
descriptor.configurable = true;
|
|
1245
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
1246
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
1247
|
+
}
|
|
793
1248
|
}
|
|
794
1249
|
|
|
795
|
-
function
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
`;
|
|
804
|
-
console.log(usage);
|
|
805
|
-
const example = stripIndent`
|
|
806
|
-
${bold_1('Example:')} ${command} ${magenta_1(kind ?? 'app')} ${green_1(`my-${kind ?? 'app'}`)} ${cyan_1('--install')}
|
|
807
|
-
`;
|
|
808
|
-
console.log(dim_1(example));
|
|
1250
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
1251
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
1252
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
1253
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
1254
|
+
writable: false
|
|
1255
|
+
});
|
|
1256
|
+
return Constructor;
|
|
1257
|
+
}
|
|
809
1258
|
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
1259
|
+
function _assertThisInitialized(self) {
|
|
1260
|
+
if (self === void 0) {
|
|
1261
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
return self;
|
|
1265
|
+
}
|
|
813
1266
|
|
|
814
|
-
|
|
815
|
-
|
|
1267
|
+
function _getPrototypeOf(o) {
|
|
1268
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
1269
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
1270
|
+
};
|
|
1271
|
+
return _getPrototypeOf(o);
|
|
1272
|
+
}
|
|
816
1273
|
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
1274
|
+
function _setPrototypeOf(o, p) {
|
|
1275
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1276
|
+
o.__proto__ = p;
|
|
1277
|
+
return o;
|
|
1278
|
+
};
|
|
1279
|
+
return _setPrototypeOf(o, p);
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
function _inherits(subClass, superClass) {
|
|
1283
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
1284
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
1288
|
+
constructor: {
|
|
1289
|
+
value: subClass,
|
|
1290
|
+
writable: true,
|
|
1291
|
+
configurable: true
|
|
1292
|
+
}
|
|
1293
|
+
});
|
|
1294
|
+
Object.defineProperty(subClass, "prototype", {
|
|
1295
|
+
writable: false
|
|
1296
|
+
});
|
|
1297
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
function _typeof(obj) {
|
|
1301
|
+
"@babel/helpers - typeof";
|
|
1302
|
+
|
|
1303
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
1304
|
+
return typeof obj;
|
|
1305
|
+
} : function (obj) {
|
|
1306
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
1307
|
+
}, _typeof(obj);
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
function _possibleConstructorReturn(self, call) {
|
|
1311
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
1312
|
+
return call;
|
|
1313
|
+
} else if (call !== void 0) {
|
|
1314
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
821
1315
|
}
|
|
822
1316
|
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
1317
|
+
return _assertThisInitialized(self);
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
function _isNativeFunction(fn) {
|
|
1321
|
+
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
function _isNativeReflectConstruct$1() {
|
|
1325
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
1326
|
+
if (Reflect.construct.sham) return false;
|
|
1327
|
+
if (typeof Proxy === "function") return true;
|
|
1328
|
+
|
|
1329
|
+
try {
|
|
1330
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
1331
|
+
return true;
|
|
1332
|
+
} catch (e) {
|
|
1333
|
+
return false;
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
function _construct(Parent, args, Class) {
|
|
1338
|
+
if (_isNativeReflectConstruct$1()) {
|
|
1339
|
+
_construct = Reflect.construct.bind();
|
|
1340
|
+
} else {
|
|
1341
|
+
_construct = function _construct(Parent, args, Class) {
|
|
1342
|
+
var a = [null];
|
|
1343
|
+
a.push.apply(a, args);
|
|
1344
|
+
var Constructor = Function.bind.apply(Parent, a);
|
|
1345
|
+
var instance = new Constructor();
|
|
1346
|
+
if (Class) _setPrototypeOf(instance, Class.prototype);
|
|
1347
|
+
return instance;
|
|
1348
|
+
};
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
return _construct.apply(null, arguments);
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
function _wrapNativeSuper(Class) {
|
|
1355
|
+
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
828
1356
|
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
a default directory based on the kind of the project and the name you provided.
|
|
1357
|
+
_wrapNativeSuper = function _wrapNativeSuper(Class) {
|
|
1358
|
+
if (Class === null || !_isNativeFunction(Class)) return Class;
|
|
832
1359
|
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
1360
|
+
if (typeof Class !== "function") {
|
|
1361
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
if (typeof _cache !== "undefined") {
|
|
1365
|
+
if (_cache.has(Class)) return _cache.get(Class);
|
|
1366
|
+
|
|
1367
|
+
_cache.set(Class, Wrapper);
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
function Wrapper() {
|
|
1371
|
+
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
Wrapper.prototype = Object.create(Class.prototype, {
|
|
1375
|
+
constructor: {
|
|
1376
|
+
value: Wrapper,
|
|
1377
|
+
enumerable: false,
|
|
1378
|
+
writable: true,
|
|
1379
|
+
configurable: true
|
|
1380
|
+
}
|
|
1381
|
+
});
|
|
1382
|
+
return _setPrototypeOf(Wrapper, Class);
|
|
1383
|
+
};
|
|
1384
|
+
|
|
1385
|
+
return _wrapNativeSuper(Class);
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
1389
|
+
|
|
1390
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
1391
|
+
|
|
1392
|
+
var AbortError = /*#__PURE__*/function (_Error) {
|
|
1393
|
+
_inherits(AbortError, _Error);
|
|
1394
|
+
|
|
1395
|
+
var _super2 = _createSuper(AbortError);
|
|
1396
|
+
|
|
1397
|
+
function AbortError() {
|
|
1398
|
+
var _this2;
|
|
1399
|
+
|
|
1400
|
+
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'The operation was aborted';
|
|
1401
|
+
|
|
1402
|
+
_classCallCheck(this, AbortError);
|
|
837
1403
|
|
|
838
|
-
|
|
839
|
-
Whether to install dependencies in the newly created project. If you do not provide this
|
|
840
|
-
flag, Quilt will ask you about it later.
|
|
1404
|
+
_this2 = _super2.call(this, message);
|
|
841
1405
|
|
|
842
|
-
$
|
|
843
|
-
The package manager to use for your new project. This choice will be used to populate
|
|
844
|
-
some commands, and will be used to install dependencies if the ${cyan_1('--install')} flag is set.
|
|
1406
|
+
_defineProperty$1(_assertThisInitialized(_this2), "code", 'ABORT_ERR');
|
|
845
1407
|
|
|
846
|
-
|
|
1408
|
+
_defineProperty$1(_assertThisInitialized(_this2), "name", 'AbortError');
|
|
847
1409
|
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
1410
|
+
return _this2;
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
_createClass(AbortError, null, [{
|
|
1414
|
+
key: "test",
|
|
1415
|
+
value: function test(error) {
|
|
1416
|
+
return error != null && error.code === 'ABORT_ERR';
|
|
1417
|
+
}
|
|
1418
|
+
}]);
|
|
1419
|
+
|
|
1420
|
+
return AbortError;
|
|
1421
|
+
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
853
1422
|
|
|
854
|
-
|
|
855
|
-
|
|
1423
|
+
var _templateObject$1, _templateObject2, _templateObject3, _templateObject4;
|
|
1424
|
+
function printHelp() {
|
|
1425
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
1426
|
+
kind = _ref.kind,
|
|
1427
|
+
customOptions = _ref.options,
|
|
1428
|
+
packageManager = _ref.packageManager;
|
|
856
1429
|
|
|
857
|
-
|
|
858
|
-
|
|
1430
|
+
var command = createCommand(packageManager);
|
|
1431
|
+
var usage = stripIndent(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral$1(["\n ", " ", " ", " ", " ", "\n "])), bold_1('Usage:'), command, kind ? magenta_1(kind) : magenta_1('[kind]'), green_1('[name]'), cyan_1('[options]'));
|
|
1432
|
+
console.log(usage);
|
|
1433
|
+
var example = stripIndent(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral$1(["\n ", " ", " ", " ", " ", "\n "])), bold_1('Example:'), command, magenta_1(kind !== null && kind !== void 0 ? kind : 'app'), green_1("my-".concat(kind !== null && kind !== void 0 ? kind : 'app')), cyan_1('--install'));
|
|
1434
|
+
console.log(dim_1(example));
|
|
859
1435
|
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
1436
|
+
if (!kind) {
|
|
1437
|
+
var kindSection = stripIndent(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral$1(["\n ", " can be one of the following project types:\n\n - ", ", a web application\n - ", ", a shared library of code\n\n You\u2019ll be asked a few additional questions based on the kind you choose.\n "])), bold_1(magenta_1('kind')), magenta_1('app'), magenta_1('package'));
|
|
1438
|
+
console.log();
|
|
1439
|
+
console.log(kindSection);
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
var optionsSection = stripIndent(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral$1(["\n ", "\n The name of the project. When creating a package, you should use the public name you\n want for the package, including any scope you want to use (example: ", ").\n If you don\u2019t provide a name with this flag, this command will ask you for one later.\n\n ", "\n The directory to create the project in. If you don\u2019t provide this flag, Quilt will pick\n a default directory based on the kind of the project and the name you provided.\n\n ", ", ", "\n If you aren\u2019t already in a monorepo, this flag will create your new project with some\n additional structure that allows it to be a monorepo \u2014 that is, you will be able to add\n multiple projects to a single repository.\n\n ", ", ", "\n Whether to install dependencies in the newly created project. If you do not provide this\n flag, Quilt will ask you about it later.\n\n ", "\n The package manager to use for your new project. This choice will be used to populate\n some commands, and will be used to install dependencies if the ", " flag is set.\n\n Must be one of the following: ", ", ", ", or ", ".\n\n ", ", ", "\n Extra developer tools to configure when creating your new project. This option only\n applies when creating a brand new project, not when adding a project to an existing\n workspace. You can include this flag multiple times to add multiple tools. You can\n enable any of the following tools:\n\n - ", ", which adds a continuous integration (CI) GitHub Action to your project.\n - ", ", which adds some basic VSCode settings to your project.\n\n ", ", ", "\n Answers \u201Cyes\u201D to any question this command would have asked.\n\n ", ", ", "\n Prints this help documentation.\n "])), cyan_1('--name'), bold_1('@my-org/my-package'), cyan_1('--directory'), cyan_1("--monorepo"), cyan_1("--no-monorepo"), cyan_1("--install"), cyan_1("--no-install"), cyan_1('--package-manager'), cyan_1('--install'), bold_1('pnpm'), bold_1('npm'), bold_1('yarn'), cyan_1("--extras"), cyan_1("--no-extras"), bold_1('github'), bold_1('vscode'), cyan_1('--yes'), cyan_1('-y'), cyan_1('--help'), cyan_1('-h'));
|
|
863
1443
|
console.log();
|
|
864
|
-
console.log(
|
|
1444
|
+
console.log("".concat(bold_1(cyan_1('options')), " can include any of these flags:"));
|
|
865
1445
|
|
|
866
1446
|
if (customOptions) {
|
|
867
1447
|
console.log();
|
|
@@ -873,12 +1453,16 @@ function printHelp({
|
|
|
873
1453
|
}
|
|
874
1454
|
|
|
875
1455
|
function printOptionsSection(section) {
|
|
876
|
-
return section.split('\n').map(
|
|
1456
|
+
return section.split('\n').map(function (line) {
|
|
1457
|
+
return line.length > 0 ? " ".concat(line) : line;
|
|
1458
|
+
}).join('\n');
|
|
877
1459
|
}
|
|
878
1460
|
|
|
879
1461
|
function createCommand(explicitPackageManager) {
|
|
880
|
-
|
|
881
|
-
|
|
1462
|
+
var _process$env$npm_conf;
|
|
1463
|
+
|
|
1464
|
+
var packageManager;
|
|
1465
|
+
var npmUserAgent = (_process$env$npm_conf = process.env['npm_config_user_agent']) !== null && _process$env$npm_conf !== void 0 ? _process$env$npm_conf : 'npm';
|
|
882
1466
|
|
|
883
1467
|
if (npmUserAgent.includes('pnpm') || explicitPackageManager === 'pnpm') {
|
|
884
1468
|
packageManager = 'pnpm';
|
|
@@ -888,7 +1472,7 @@ function createCommand(explicitPackageManager) {
|
|
|
888
1472
|
packageManager = 'npm';
|
|
889
1473
|
}
|
|
890
1474
|
|
|
891
|
-
return
|
|
1475
|
+
return "".concat(packageManager, " create @quilted");
|
|
892
1476
|
}
|
|
893
1477
|
|
|
894
1478
|
var prompts$4 = {};
|
|
@@ -3792,9 +4376,9 @@ $.autocomplete = args => {
|
|
|
3792
4376
|
};
|
|
3793
4377
|
}(prompts$4));
|
|
3794
4378
|
|
|
3795
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
4379
|
+
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
3796
4380
|
|
|
3797
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
4381
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
3798
4382
|
|
|
3799
4383
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3800
4384
|
|
|
@@ -3823,11 +4407,11 @@ const noop$1 = () => {};
|
|
|
3823
4407
|
|
|
3824
4408
|
|
|
3825
4409
|
function prompt$3() {
|
|
3826
|
-
return _prompt.apply(this, arguments);
|
|
4410
|
+
return _prompt$1.apply(this, arguments);
|
|
3827
4411
|
}
|
|
3828
4412
|
|
|
3829
|
-
function _prompt() {
|
|
3830
|
-
_prompt = _asyncToGenerator(function* (questions = [], {
|
|
4413
|
+
function _prompt$1() {
|
|
4414
|
+
_prompt$1 = _asyncToGenerator(function* (questions = [], {
|
|
3831
4415
|
onSubmit = noop$1,
|
|
3832
4416
|
onCancel = noop$1
|
|
3833
4417
|
} = {}) {
|
|
@@ -3862,7 +4446,7 @@ function _prompt() {
|
|
|
3862
4446
|
|
|
3863
4447
|
// evaluate type first and skip if type is a falsy value
|
|
3864
4448
|
if (typeof type === 'function') {
|
|
3865
|
-
type = yield type(answer, _objectSpread({}, answers), question);
|
|
4449
|
+
type = yield type(answer, _objectSpread$1({}, answers), question);
|
|
3866
4450
|
question['type'] = type;
|
|
3867
4451
|
}
|
|
3868
4452
|
|
|
@@ -3871,7 +4455,7 @@ function _prompt() {
|
|
|
3871
4455
|
for (let key in question) {
|
|
3872
4456
|
if (passOn$1.includes(key)) continue;
|
|
3873
4457
|
let value = question[key];
|
|
3874
|
-
question[key] = typeof value === 'function' ? yield value(answer, _objectSpread({}, answers), lastPrompt) : value;
|
|
4458
|
+
question[key] = typeof value === 'function' ? yield value(answer, _objectSpread$1({}, answers), lastPrompt) : value;
|
|
3875
4459
|
}
|
|
3876
4460
|
|
|
3877
4461
|
lastPrompt = question;
|
|
@@ -3917,7 +4501,7 @@ function _prompt() {
|
|
|
3917
4501
|
|
|
3918
4502
|
return answers;
|
|
3919
4503
|
});
|
|
3920
|
-
return _prompt.apply(this, arguments);
|
|
4504
|
+
return _prompt$1.apply(this, arguments);
|
|
3921
4505
|
}
|
|
3922
4506
|
|
|
3923
4507
|
function getInjectedAnswer$1(injected, deafultValue) {
|
|
@@ -6574,170 +7158,369 @@ var prompts =
|
|
|
6574
7158
|
? dist
|
|
6575
7159
|
: lib;
|
|
6576
7160
|
|
|
6577
|
-
|
|
6578
|
-
const result = await prompts({
|
|
6579
|
-
name: 'value',
|
|
6580
|
-
...prompt
|
|
6581
|
-
}, {
|
|
6582
|
-
onCancel() {
|
|
6583
|
-
throw new AbortError();
|
|
6584
|
-
}
|
|
7161
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6585
7162
|
|
|
6586
|
-
|
|
6587
|
-
|
|
7163
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7164
|
+
function prompt(_x) {
|
|
7165
|
+
return _prompt.apply(this, arguments);
|
|
6588
7166
|
}
|
|
6589
|
-
async function getCreateAsMonorepo(argv) {
|
|
6590
|
-
let createAsMonorepo;
|
|
6591
7167
|
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
|
|
6602
|
-
|
|
7168
|
+
function _prompt() {
|
|
7169
|
+
_prompt = _asyncToGenerator$5( /*#__PURE__*/regenerator.mark(function _callee(prompt) {
|
|
7170
|
+
var result;
|
|
7171
|
+
return regenerator.wrap(function _callee$(_context) {
|
|
7172
|
+
while (1) {
|
|
7173
|
+
switch (_context.prev = _context.next) {
|
|
7174
|
+
case 0:
|
|
7175
|
+
_context.next = 2;
|
|
7176
|
+
return prompts(_objectSpread({
|
|
7177
|
+
name: 'value'
|
|
7178
|
+
}, prompt), {
|
|
7179
|
+
onCancel: function onCancel() {
|
|
7180
|
+
throw new AbortError();
|
|
7181
|
+
}
|
|
7182
|
+
});
|
|
7183
|
+
|
|
7184
|
+
case 2:
|
|
7185
|
+
result = _context.sent;
|
|
7186
|
+
return _context.abrupt("return", result.value);
|
|
7187
|
+
|
|
7188
|
+
case 4:
|
|
7189
|
+
case "end":
|
|
7190
|
+
return _context.stop();
|
|
7191
|
+
}
|
|
7192
|
+
}
|
|
7193
|
+
}, _callee);
|
|
7194
|
+
}));
|
|
7195
|
+
return _prompt.apply(this, arguments);
|
|
7196
|
+
}
|
|
6603
7197
|
|
|
6604
|
-
|
|
7198
|
+
function getCreateAsMonorepo(_x2) {
|
|
7199
|
+
return _getCreateAsMonorepo.apply(this, arguments);
|
|
6605
7200
|
}
|
|
6606
|
-
async function getShouldInstall(argv) {
|
|
6607
|
-
let shouldInstall;
|
|
6608
7201
|
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
|
|
6618
|
-
|
|
6619
|
-
|
|
7202
|
+
function _getCreateAsMonorepo() {
|
|
7203
|
+
_getCreateAsMonorepo = _asyncToGenerator$5( /*#__PURE__*/regenerator.mark(function _callee2(argv) {
|
|
7204
|
+
var createAsMonorepo;
|
|
7205
|
+
return regenerator.wrap(function _callee2$(_context2) {
|
|
7206
|
+
while (1) {
|
|
7207
|
+
switch (_context2.prev = _context2.next) {
|
|
7208
|
+
case 0:
|
|
7209
|
+
if (!argv['--monorepo' ]) {
|
|
7210
|
+
_context2.next = 4;
|
|
7211
|
+
break;
|
|
7212
|
+
}
|
|
7213
|
+
|
|
7214
|
+
createAsMonorepo = true;
|
|
7215
|
+
_context2.next = 11;
|
|
7216
|
+
break;
|
|
7217
|
+
|
|
7218
|
+
case 4:
|
|
7219
|
+
if (!argv['--no-monorepo']) {
|
|
7220
|
+
_context2.next = 8;
|
|
7221
|
+
break;
|
|
7222
|
+
}
|
|
7223
|
+
|
|
7224
|
+
createAsMonorepo = false;
|
|
7225
|
+
_context2.next = 11;
|
|
7226
|
+
break;
|
|
7227
|
+
|
|
7228
|
+
case 8:
|
|
7229
|
+
_context2.next = 10;
|
|
7230
|
+
return prompt({
|
|
7231
|
+
type: 'confirm',
|
|
7232
|
+
message: 'Do you want to create this app as a monorepo, with room for more projects?',
|
|
7233
|
+
initial: true
|
|
7234
|
+
});
|
|
7235
|
+
|
|
7236
|
+
case 10:
|
|
7237
|
+
createAsMonorepo = _context2.sent;
|
|
6620
7238
|
|
|
6621
|
-
|
|
7239
|
+
case 11:
|
|
7240
|
+
return _context2.abrupt("return", createAsMonorepo);
|
|
7241
|
+
|
|
7242
|
+
case 12:
|
|
7243
|
+
case "end":
|
|
7244
|
+
return _context2.stop();
|
|
7245
|
+
}
|
|
7246
|
+
}
|
|
7247
|
+
}, _callee2);
|
|
7248
|
+
}));
|
|
7249
|
+
return _getCreateAsMonorepo.apply(this, arguments);
|
|
6622
7250
|
}
|
|
6623
|
-
const VALID_PACKAGE_MANAGERS = new Set(['pnpm', 'npm', 'yarn']);
|
|
6624
|
-
async function getPackageManager(argv) {
|
|
6625
|
-
let packageManager;
|
|
6626
7251
|
|
|
6627
|
-
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
} else {
|
|
6631
|
-
const npmUserAgent = process.env['npm_config_user_agent'] ?? 'npm';
|
|
7252
|
+
function getShouldInstall(_x3) {
|
|
7253
|
+
return _getShouldInstall.apply(this, arguments);
|
|
7254
|
+
}
|
|
6632
7255
|
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
|
|
6639
|
-
|
|
6640
|
-
|
|
7256
|
+
function _getShouldInstall() {
|
|
7257
|
+
_getShouldInstall = _asyncToGenerator$5( /*#__PURE__*/regenerator.mark(function _callee3(argv) {
|
|
7258
|
+
var shouldInstall;
|
|
7259
|
+
return regenerator.wrap(function _callee3$(_context3) {
|
|
7260
|
+
while (1) {
|
|
7261
|
+
switch (_context3.prev = _context3.next) {
|
|
7262
|
+
case 0:
|
|
7263
|
+
if (!(argv['--install'] || argv['--yes'])) {
|
|
7264
|
+
_context3.next = 4;
|
|
7265
|
+
break;
|
|
7266
|
+
}
|
|
7267
|
+
|
|
7268
|
+
shouldInstall = true;
|
|
7269
|
+
_context3.next = 11;
|
|
7270
|
+
break;
|
|
6641
7271
|
|
|
6642
|
-
|
|
7272
|
+
case 4:
|
|
7273
|
+
if (!argv['--no-install']) {
|
|
7274
|
+
_context3.next = 8;
|
|
7275
|
+
break;
|
|
7276
|
+
}
|
|
7277
|
+
|
|
7278
|
+
shouldInstall = false;
|
|
7279
|
+
_context3.next = 11;
|
|
7280
|
+
break;
|
|
7281
|
+
|
|
7282
|
+
case 8:
|
|
7283
|
+
_context3.next = 10;
|
|
7284
|
+
return prompt({
|
|
7285
|
+
type: 'confirm',
|
|
7286
|
+
message: 'Do you want to install dependencies for this app after creating it?',
|
|
7287
|
+
initial: true
|
|
7288
|
+
});
|
|
7289
|
+
|
|
7290
|
+
case 10:
|
|
7291
|
+
shouldInstall = _context3.sent;
|
|
7292
|
+
|
|
7293
|
+
case 11:
|
|
7294
|
+
return _context3.abrupt("return", shouldInstall);
|
|
7295
|
+
|
|
7296
|
+
case 12:
|
|
7297
|
+
case "end":
|
|
7298
|
+
return _context3.stop();
|
|
7299
|
+
}
|
|
7300
|
+
}
|
|
7301
|
+
}, _callee3);
|
|
7302
|
+
}));
|
|
7303
|
+
return _getShouldInstall.apply(this, arguments);
|
|
6643
7304
|
}
|
|
6644
|
-
|
|
6645
|
-
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
7305
|
+
|
|
7306
|
+
var VALID_PACKAGE_MANAGERS = new Set(['pnpm', 'npm', 'yarn']);
|
|
7307
|
+
function getPackageManager(_x4) {
|
|
7308
|
+
return _getPackageManager.apply(this, arguments);
|
|
7309
|
+
}
|
|
7310
|
+
|
|
7311
|
+
function _getPackageManager() {
|
|
7312
|
+
_getPackageManager = _asyncToGenerator$5( /*#__PURE__*/regenerator.mark(function _callee4(argv) {
|
|
7313
|
+
var packageManager, explicitPackageManager, _process$env$npm_conf, npmUserAgent;
|
|
7314
|
+
|
|
7315
|
+
return regenerator.wrap(function _callee4$(_context4) {
|
|
7316
|
+
while (1) {
|
|
7317
|
+
switch (_context4.prev = _context4.next) {
|
|
7318
|
+
case 0:
|
|
7319
|
+
if (argv['--package-manager']) {
|
|
7320
|
+
explicitPackageManager = argv['--package-manager'].toLocaleLowerCase();
|
|
7321
|
+
packageManager = VALID_PACKAGE_MANAGERS.has(explicitPackageManager) ? explicitPackageManager : 'npm';
|
|
7322
|
+
} else {
|
|
7323
|
+
npmUserAgent = (_process$env$npm_conf = process.env['npm_config_user_agent']) !== null && _process$env$npm_conf !== void 0 ? _process$env$npm_conf : 'npm';
|
|
7324
|
+
|
|
7325
|
+
if (npmUserAgent.includes('pnpm') || fs.existsSync('pnpm-lock.yaml')) {
|
|
7326
|
+
packageManager = 'pnpm';
|
|
7327
|
+
} else if (npmUserAgent.includes('yarn') || fs.existsSync('yarn.lock')) {
|
|
7328
|
+
packageManager = 'yarn';
|
|
7329
|
+
} else {
|
|
7330
|
+
packageManager = 'npm';
|
|
7331
|
+
}
|
|
7332
|
+
}
|
|
7333
|
+
|
|
7334
|
+
return _context4.abrupt("return", packageManager);
|
|
7335
|
+
|
|
7336
|
+
case 2:
|
|
7337
|
+
case "end":
|
|
7338
|
+
return _context4.stop();
|
|
7339
|
+
}
|
|
7340
|
+
}
|
|
7341
|
+
}, _callee4);
|
|
7342
|
+
}));
|
|
7343
|
+
return _getPackageManager.apply(this, arguments);
|
|
7344
|
+
}
|
|
7345
|
+
|
|
7346
|
+
var VALID_EXTRAS = new Set(['github', 'vscode']);
|
|
7347
|
+
function getExtrasToSetup(_x5, _x6) {
|
|
7348
|
+
return _getExtrasToSetup.apply(this, arguments);
|
|
7349
|
+
}
|
|
7350
|
+
|
|
7351
|
+
function _getExtrasToSetup() {
|
|
7352
|
+
_getExtrasToSetup = _asyncToGenerator$5( /*#__PURE__*/regenerator.mark(function _callee5(argv, _ref) {
|
|
7353
|
+
var inWorkspace, setupExtras, extrasToSetup;
|
|
7354
|
+
return regenerator.wrap(function _callee5$(_context5) {
|
|
7355
|
+
while (1) {
|
|
7356
|
+
switch (_context5.prev = _context5.next) {
|
|
7357
|
+
case 0:
|
|
7358
|
+
inWorkspace = _ref.inWorkspace;
|
|
7359
|
+
|
|
7360
|
+
if (!(inWorkspace || argv['--no-extras'])) {
|
|
7361
|
+
_context5.next = 3;
|
|
7362
|
+
break;
|
|
7363
|
+
}
|
|
7364
|
+
|
|
7365
|
+
return _context5.abrupt("return", new Set());
|
|
7366
|
+
|
|
7367
|
+
case 3:
|
|
7368
|
+
if (!argv['--extras']) {
|
|
7369
|
+
_context5.next = 5;
|
|
7370
|
+
break;
|
|
7371
|
+
}
|
|
7372
|
+
|
|
7373
|
+
return _context5.abrupt("return", new Set(argv['--extras'].filter(function (extra) {
|
|
7374
|
+
return VALID_EXTRAS.has(extra);
|
|
7375
|
+
})));
|
|
7376
|
+
|
|
7377
|
+
case 5:
|
|
7378
|
+
_context5.next = 7;
|
|
7379
|
+
return prompt({
|
|
7380
|
+
type: 'multiselect',
|
|
7381
|
+
message: 'Which additional tools would you like to configure?',
|
|
7382
|
+
instructions: dim_1("\n Use ".concat(bold_1('space'), " to select, ").concat(bold_1('a'), " to select all, ").concat(bold_1('return'), " to submit")),
|
|
7383
|
+
choices: [{
|
|
7384
|
+
title: 'VSCode',
|
|
7385
|
+
value: 'vscode'
|
|
7386
|
+
}, {
|
|
7387
|
+
title: 'GitHub',
|
|
7388
|
+
value: 'github'
|
|
7389
|
+
}]
|
|
7390
|
+
});
|
|
7391
|
+
|
|
7392
|
+
case 7:
|
|
7393
|
+
setupExtras = _context5.sent;
|
|
7394
|
+
extrasToSetup = new Set(setupExtras);
|
|
7395
|
+
return _context5.abrupt("return", extrasToSetup);
|
|
7396
|
+
|
|
7397
|
+
case 10:
|
|
7398
|
+
case "end":
|
|
7399
|
+
return _context5.stop();
|
|
7400
|
+
}
|
|
7401
|
+
}
|
|
7402
|
+
}, _callee5);
|
|
7403
|
+
}));
|
|
7404
|
+
return _getExtrasToSetup.apply(this, arguments);
|
|
6668
7405
|
}
|
|
6669
7406
|
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
run()
|
|
7407
|
+
var _templateObject;
|
|
7408
|
+
var VALID_PROJECT_KINDS = new Set(['app', 'package']);
|
|
7409
|
+
run()["catch"](function (error) {
|
|
6673
7410
|
if (AbortError.test(error)) return;
|
|
6674
7411
|
console.error(error);
|
|
6675
7412
|
process.exitCode = 1;
|
|
6676
7413
|
});
|
|
6677
7414
|
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
'-h': '--help',
|
|
6682
|
-
'--package-manager': String
|
|
6683
|
-
}, {
|
|
6684
|
-
permissive: true
|
|
6685
|
-
});
|
|
6686
|
-
const firstArgument = permissiveArgs._[0]?.toLowerCase();
|
|
7415
|
+
function run() {
|
|
7416
|
+
return _run.apply(this, arguments);
|
|
7417
|
+
}
|
|
6687
7418
|
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
|
|
6692
|
-
|
|
7419
|
+
function _run() {
|
|
7420
|
+
_run = _asyncToGenerator$5( /*#__PURE__*/regenerator.mark(function _callee() {
|
|
7421
|
+
var _permissiveArgs$_$;
|
|
7422
|
+
|
|
7423
|
+
var permissiveArgs, firstArgument, kind, header, _permissiveArgs$Pac, _yield$import, createApp, _yield$import2, createProject;
|
|
7424
|
+
|
|
7425
|
+
return regenerator.wrap(function _callee$(_context) {
|
|
7426
|
+
while (1) {
|
|
7427
|
+
switch (_context.prev = _context.next) {
|
|
7428
|
+
case 0:
|
|
7429
|
+
permissiveArgs = arg_1({
|
|
7430
|
+
'--help': Boolean,
|
|
7431
|
+
'-h': '--help',
|
|
7432
|
+
'--package-manager': String
|
|
7433
|
+
}, {
|
|
7434
|
+
permissive: true
|
|
7435
|
+
});
|
|
7436
|
+
firstArgument = (_permissiveArgs$_$ = permissiveArgs._[0]) === null || _permissiveArgs$_$ === void 0 ? void 0 : _permissiveArgs$_$.toLowerCase();
|
|
7437
|
+
|
|
7438
|
+
if (!(firstArgument != null && !firstArgument.startsWith('-') && !VALID_PROJECT_KINDS.has(firstArgument))) {
|
|
7439
|
+
_context.next = 5;
|
|
7440
|
+
break;
|
|
7441
|
+
}
|
|
6693
7442
|
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
`;
|
|
6698
|
-
console.log(header);
|
|
6699
|
-
console.log();
|
|
7443
|
+
// TODO: show help with error message
|
|
7444
|
+
process.exitCode = 1;
|
|
7445
|
+
return _context.abrupt("return");
|
|
6700
7446
|
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
}
|
|
7447
|
+
case 5:
|
|
7448
|
+
kind = firstArgument == null || !VALID_PROJECT_KINDS.has(firstArgument) ? undefined : firstArgument;
|
|
7449
|
+
header = stripIndent(_templateObject || (_templateObject = _taggedTemplateLiteral$1(["\n \uD83E\uDDF5 ", "\n "])), bold_1('quilt create'));
|
|
7450
|
+
console.log(header);
|
|
7451
|
+
console.log();
|
|
6707
7452
|
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
choices: [{
|
|
6713
|
-
title: 'App',
|
|
6714
|
-
value: 'app'
|
|
6715
|
-
}, {
|
|
6716
|
-
title: 'Package',
|
|
6717
|
-
value: 'package'
|
|
6718
|
-
}]
|
|
6719
|
-
});
|
|
6720
|
-
}
|
|
7453
|
+
if (!(permissiveArgs['--help'] && !kind)) {
|
|
7454
|
+
_context.next = 12;
|
|
7455
|
+
break;
|
|
7456
|
+
}
|
|
6721
7457
|
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
createApp
|
|
6727
|
-
} = await import('./app.mjs');
|
|
6728
|
-
await createApp();
|
|
6729
|
-
break;
|
|
6730
|
-
}
|
|
7458
|
+
printHelp({
|
|
7459
|
+
packageManager: (_permissiveArgs$Pac = permissiveArgs['--package-manager']) === null || _permissiveArgs$Pac === void 0 ? void 0 : _permissiveArgs$Pac.toLowerCase()
|
|
7460
|
+
});
|
|
7461
|
+
return _context.abrupt("return");
|
|
6731
7462
|
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
7463
|
+
case 12:
|
|
7464
|
+
if (!(kind == null)) {
|
|
7465
|
+
_context.next = 16;
|
|
7466
|
+
break;
|
|
7467
|
+
}
|
|
7468
|
+
|
|
7469
|
+
_context.next = 15;
|
|
7470
|
+
return prompt({
|
|
7471
|
+
type: 'select',
|
|
7472
|
+
message: 'What kind of project would you like to create?',
|
|
7473
|
+
choices: [{
|
|
7474
|
+
title: 'App',
|
|
7475
|
+
value: 'app'
|
|
7476
|
+
}, {
|
|
7477
|
+
title: 'Package',
|
|
7478
|
+
value: 'package'
|
|
7479
|
+
}]
|
|
7480
|
+
});
|
|
7481
|
+
|
|
7482
|
+
case 15:
|
|
7483
|
+
kind = _context.sent;
|
|
7484
|
+
|
|
7485
|
+
case 16:
|
|
7486
|
+
_context.t0 = kind;
|
|
7487
|
+
_context.next = _context.t0 === 'app' ? 19 : _context.t0 === 'package' ? 26 : 33;
|
|
7488
|
+
break;
|
|
7489
|
+
|
|
7490
|
+
case 19:
|
|
7491
|
+
_context.next = 21;
|
|
7492
|
+
return import('./app.mjs');
|
|
7493
|
+
|
|
7494
|
+
case 21:
|
|
7495
|
+
_yield$import = _context.sent;
|
|
7496
|
+
createApp = _yield$import.createApp;
|
|
7497
|
+
_context.next = 25;
|
|
7498
|
+
return createApp();
|
|
7499
|
+
|
|
7500
|
+
case 25:
|
|
7501
|
+
return _context.abrupt("break", 33);
|
|
7502
|
+
|
|
7503
|
+
case 26:
|
|
7504
|
+
_context.next = 28;
|
|
7505
|
+
return import('./package.mjs');
|
|
7506
|
+
|
|
7507
|
+
case 28:
|
|
7508
|
+
_yield$import2 = _context.sent;
|
|
7509
|
+
createProject = _yield$import2.createProject;
|
|
7510
|
+
_context.next = 32;
|
|
7511
|
+
return createProject();
|
|
7512
|
+
|
|
7513
|
+
case 32:
|
|
7514
|
+
return _context.abrupt("break", 33);
|
|
7515
|
+
|
|
7516
|
+
case 33:
|
|
7517
|
+
case "end":
|
|
7518
|
+
return _context.stop();
|
|
7519
|
+
}
|
|
6739
7520
|
}
|
|
6740
|
-
|
|
7521
|
+
}, _callee);
|
|
7522
|
+
}));
|
|
7523
|
+
return _run.apply(this, arguments);
|
|
6741
7524
|
}
|
|
6742
7525
|
|
|
6743
|
-
export {
|
|
7526
|
+
export { _asyncToGenerator$5 as _, _taggedTemplateLiteral$1 as a, getPackageManager as b, cyan_1 as c, dim_1 as d, getShouldInstall as e, getCreateAsMonorepo as f, getExtrasToSetup as g, bold_1 as h, arg_1 as i, prompt as j, _defineProperty$1 as k, magenta_1 as m, printHelp as p, regenerator as r, stripIndent as s, underline_1 as u };
|