@quilted/create 0.1.21 → 0.1.22
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 +6 -0
- package/build/cjs/app.cjs +244 -525
- package/build/cjs/index.cjs +255 -996
- package/build/cjs/index3.cjs +1205 -577
- package/build/cjs/package-manager.cjs +207 -799
- package/build/cjs/package.cjs +326 -701
- package/build/cjs/parser-babel.cjs +3 -3
- package/build/cjs/parser-yaml.cjs +2 -2
- package/build/cjs/standalone.cjs +3 -3
- package/build/esm/app.mjs +249 -530
- package/build/esm/index.mjs +239 -978
- package/build/esm/index3.mjs +1205 -548
- package/build/esm/package-manager.mjs +208 -799
- package/build/esm/package.mjs +326 -701
- package/build/esm/parser-babel.mjs +1 -1
- package/build/esm/parser-yaml.mjs +1 -1
- package/build/esm/standalone.mjs +1 -1
- package/package.json +1 -1
- package/build/cjs/_commonjsHelpers.cjs +0 -10
- package/build/esm/_commonjsHelpers.mjs +0 -7
package/build/cjs/index.cjs
CHANGED
|
@@ -12,21 +12,21 @@ var require$$2 = require('events');
|
|
|
12
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
13
|
|
|
14
14
|
function _interopNamespace(e) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
15
|
+
if (e && e.__esModule) return e;
|
|
16
|
+
var n = Object.create(null);
|
|
17
|
+
if (e) {
|
|
18
|
+
Object.keys(e).forEach(function (k) {
|
|
19
|
+
if (k !== 'default') {
|
|
20
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
21
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return e[k]; }
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
n["default"] = e;
|
|
29
|
+
return Object.freeze(n);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
|
|
@@ -34,442 +34,10 @@ var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
|
|
|
34
34
|
var require$$0__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$0$1);
|
|
35
35
|
var require$$2__default = /*#__PURE__*/_interopDefaultLegacy(require$$2);
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
if (!raw) {
|
|
39
|
-
raw = strings.slice(0);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
return Object.freeze(Object.defineProperties(strings, {
|
|
43
|
-
raw: {
|
|
44
|
-
value: Object.freeze(raw)
|
|
45
|
-
}
|
|
46
|
-
}));
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
|
|
50
|
-
try {
|
|
51
|
-
var info = gen[key](arg);
|
|
52
|
-
var value = info.value;
|
|
53
|
-
} catch (error) {
|
|
54
|
-
reject(error);
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
if (info.done) {
|
|
59
|
-
resolve(value);
|
|
60
|
-
} else {
|
|
61
|
-
Promise.resolve(value).then(_next, _throw);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function _asyncToGenerator$5(fn) {
|
|
66
|
-
return function () {
|
|
67
|
-
var self = this,
|
|
68
|
-
args = arguments;
|
|
69
|
-
return new Promise(function (resolve, reject) {
|
|
70
|
-
var gen = fn.apply(self, args);
|
|
71
|
-
|
|
72
|
-
function _next(value) {
|
|
73
|
-
asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "next", value);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
function _throw(err) {
|
|
77
|
-
asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "throw", err);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
_next(undefined);
|
|
81
|
-
});
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
var regeneratorRuntime$1 = {exports: {}};
|
|
86
|
-
|
|
87
|
-
var _typeof$1 = {exports: {}};
|
|
88
|
-
|
|
89
|
-
(function (module) {
|
|
90
|
-
function _typeof(obj) {
|
|
91
|
-
"@babel/helpers - typeof";
|
|
92
|
-
|
|
93
|
-
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
94
|
-
return typeof obj;
|
|
95
|
-
} : function (obj) {
|
|
96
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
97
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
101
|
-
}(_typeof$1));
|
|
102
|
-
|
|
103
|
-
(function (module) {
|
|
104
|
-
var _typeof = _typeof$1.exports["default"];
|
|
105
|
-
|
|
106
|
-
function _regeneratorRuntime() {
|
|
107
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
108
|
-
|
|
109
|
-
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
110
|
-
return exports;
|
|
111
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
112
|
-
var exports = {},
|
|
113
|
-
Op = Object.prototype,
|
|
114
|
-
hasOwn = Op.hasOwnProperty,
|
|
115
|
-
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
116
|
-
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
117
|
-
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
118
|
-
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
119
|
-
|
|
120
|
-
function define(obj, key, value) {
|
|
121
|
-
return Object.defineProperty(obj, key, {
|
|
122
|
-
value: value,
|
|
123
|
-
enumerable: !0,
|
|
124
|
-
configurable: !0,
|
|
125
|
-
writable: !0
|
|
126
|
-
}), obj[key];
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
try {
|
|
130
|
-
define({}, "");
|
|
131
|
-
} catch (err) {
|
|
132
|
-
define = function define(obj, key, value) {
|
|
133
|
-
return obj[key] = value;
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
138
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
139
|
-
generator = Object.create(protoGenerator.prototype),
|
|
140
|
-
context = new Context(tryLocsList || []);
|
|
141
|
-
return generator._invoke = function (innerFn, self, context) {
|
|
142
|
-
var state = "suspendedStart";
|
|
143
|
-
return function (method, arg) {
|
|
144
|
-
if ("executing" === state) throw new Error("Generator is already running");
|
|
145
|
-
|
|
146
|
-
if ("completed" === state) {
|
|
147
|
-
if ("throw" === method) throw arg;
|
|
148
|
-
return doneResult();
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
for (context.method = method, context.arg = arg;;) {
|
|
152
|
-
var delegate = context.delegate;
|
|
153
|
-
|
|
154
|
-
if (delegate) {
|
|
155
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
156
|
-
|
|
157
|
-
if (delegateResult) {
|
|
158
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
159
|
-
return delegateResult;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
164
|
-
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
165
|
-
context.dispatchException(context.arg);
|
|
166
|
-
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
167
|
-
state = "executing";
|
|
168
|
-
var record = tryCatch(innerFn, self, context);
|
|
169
|
-
|
|
170
|
-
if ("normal" === record.type) {
|
|
171
|
-
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
172
|
-
return {
|
|
173
|
-
value: record.arg,
|
|
174
|
-
done: context.done
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
}(innerFn, self, context), generator;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
function tryCatch(fn, obj, arg) {
|
|
185
|
-
try {
|
|
186
|
-
return {
|
|
187
|
-
type: "normal",
|
|
188
|
-
arg: fn.call(obj, arg)
|
|
189
|
-
};
|
|
190
|
-
} catch (err) {
|
|
191
|
-
return {
|
|
192
|
-
type: "throw",
|
|
193
|
-
arg: err
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
exports.wrap = wrap;
|
|
199
|
-
var ContinueSentinel = {};
|
|
200
|
-
|
|
201
|
-
function Generator() {}
|
|
202
|
-
|
|
203
|
-
function GeneratorFunction() {}
|
|
204
|
-
|
|
205
|
-
function GeneratorFunctionPrototype() {}
|
|
206
|
-
|
|
207
|
-
var IteratorPrototype = {};
|
|
208
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
209
|
-
return this;
|
|
210
|
-
});
|
|
211
|
-
var getProto = Object.getPrototypeOf,
|
|
212
|
-
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
213
|
-
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
214
|
-
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
215
|
-
|
|
216
|
-
function defineIteratorMethods(prototype) {
|
|
217
|
-
["next", "throw", "return"].forEach(function (method) {
|
|
218
|
-
define(prototype, method, function (arg) {
|
|
219
|
-
return this._invoke(method, arg);
|
|
220
|
-
});
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
225
|
-
function invoke(method, arg, resolve, reject) {
|
|
226
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
227
|
-
|
|
228
|
-
if ("throw" !== record.type) {
|
|
229
|
-
var result = record.arg,
|
|
230
|
-
value = result.value;
|
|
231
|
-
return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
232
|
-
invoke("next", value, resolve, reject);
|
|
233
|
-
}, function (err) {
|
|
234
|
-
invoke("throw", err, resolve, reject);
|
|
235
|
-
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
236
|
-
result.value = unwrapped, resolve(result);
|
|
237
|
-
}, function (error) {
|
|
238
|
-
return invoke("throw", error, resolve, reject);
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
reject(record.arg);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
var previousPromise;
|
|
246
|
-
|
|
247
|
-
this._invoke = function (method, arg) {
|
|
248
|
-
function callInvokeWithMethodAndArg() {
|
|
249
|
-
return new PromiseImpl(function (resolve, reject) {
|
|
250
|
-
invoke(method, arg, resolve, reject);
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
255
|
-
};
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
259
|
-
var method = delegate.iterator[context.method];
|
|
260
|
-
|
|
261
|
-
if (undefined === method) {
|
|
262
|
-
if (context.delegate = null, "throw" === context.method) {
|
|
263
|
-
if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
|
|
264
|
-
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
return ContinueSentinel;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
271
|
-
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
272
|
-
var info = record.arg;
|
|
273
|
-
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);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
function pushTryEntry(locs) {
|
|
277
|
-
var entry = {
|
|
278
|
-
tryLoc: locs[0]
|
|
279
|
-
};
|
|
280
|
-
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
function resetTryEntry(entry) {
|
|
284
|
-
var record = entry.completion || {};
|
|
285
|
-
record.type = "normal", delete record.arg, entry.completion = record;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
function Context(tryLocsList) {
|
|
289
|
-
this.tryEntries = [{
|
|
290
|
-
tryLoc: "root"
|
|
291
|
-
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
function values(iterable) {
|
|
295
|
-
if (iterable) {
|
|
296
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
297
|
-
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
298
|
-
if ("function" == typeof iterable.next) return iterable;
|
|
299
|
-
|
|
300
|
-
if (!isNaN(iterable.length)) {
|
|
301
|
-
var i = -1,
|
|
302
|
-
next = function next() {
|
|
303
|
-
for (; ++i < iterable.length;) {
|
|
304
|
-
if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
return next.value = undefined, next.done = !0, next;
|
|
308
|
-
};
|
|
309
|
-
|
|
310
|
-
return next.next = next;
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
return {
|
|
315
|
-
next: doneResult
|
|
316
|
-
};
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
function doneResult() {
|
|
320
|
-
return {
|
|
321
|
-
value: undefined,
|
|
322
|
-
done: !0
|
|
323
|
-
};
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
327
|
-
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
328
|
-
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
329
|
-
}, exports.mark = function (genFun) {
|
|
330
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
331
|
-
}, exports.awrap = function (arg) {
|
|
332
|
-
return {
|
|
333
|
-
__await: arg
|
|
334
|
-
};
|
|
335
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
336
|
-
return this;
|
|
337
|
-
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
338
|
-
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
339
|
-
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
340
|
-
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
341
|
-
return result.done ? result.value : iter.next();
|
|
342
|
-
});
|
|
343
|
-
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
344
|
-
return this;
|
|
345
|
-
}), define(Gp, "toString", function () {
|
|
346
|
-
return "[object Generator]";
|
|
347
|
-
}), exports.keys = function (object) {
|
|
348
|
-
var keys = [];
|
|
349
|
-
|
|
350
|
-
for (var key in object) {
|
|
351
|
-
keys.push(key);
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
return keys.reverse(), function next() {
|
|
355
|
-
for (; keys.length;) {
|
|
356
|
-
var key = keys.pop();
|
|
357
|
-
if (key in object) return next.value = key, next.done = !1, next;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
return next.done = !0, next;
|
|
361
|
-
};
|
|
362
|
-
}, exports.values = values, Context.prototype = {
|
|
363
|
-
constructor: Context,
|
|
364
|
-
reset: function reset(skipTempReset) {
|
|
365
|
-
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) {
|
|
366
|
-
"t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
|
367
|
-
}
|
|
368
|
-
},
|
|
369
|
-
stop: function stop() {
|
|
370
|
-
this.done = !0;
|
|
371
|
-
var rootRecord = this.tryEntries[0].completion;
|
|
372
|
-
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
373
|
-
return this.rval;
|
|
374
|
-
},
|
|
375
|
-
dispatchException: function dispatchException(exception) {
|
|
376
|
-
if (this.done) throw exception;
|
|
377
|
-
var context = this;
|
|
378
|
-
|
|
379
|
-
function handle(loc, caught) {
|
|
380
|
-
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
384
|
-
var entry = this.tryEntries[i],
|
|
385
|
-
record = entry.completion;
|
|
386
|
-
if ("root" === entry.tryLoc) return handle("end");
|
|
387
|
-
|
|
388
|
-
if (entry.tryLoc <= this.prev) {
|
|
389
|
-
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
390
|
-
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
391
|
-
|
|
392
|
-
if (hasCatch && hasFinally) {
|
|
393
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
394
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
395
|
-
} else if (hasCatch) {
|
|
396
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
397
|
-
} else {
|
|
398
|
-
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
399
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
},
|
|
404
|
-
abrupt: function abrupt(type, arg) {
|
|
405
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
406
|
-
var entry = this.tryEntries[i];
|
|
407
|
-
|
|
408
|
-
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
409
|
-
var finallyEntry = entry;
|
|
410
|
-
break;
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
415
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
416
|
-
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
417
|
-
},
|
|
418
|
-
complete: function complete(record, afterLoc) {
|
|
419
|
-
if ("throw" === record.type) throw record.arg;
|
|
420
|
-
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;
|
|
421
|
-
},
|
|
422
|
-
finish: function finish(finallyLoc) {
|
|
423
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
424
|
-
var entry = this.tryEntries[i];
|
|
425
|
-
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
426
|
-
}
|
|
427
|
-
},
|
|
428
|
-
"catch": function _catch(tryLoc) {
|
|
429
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
430
|
-
var entry = this.tryEntries[i];
|
|
431
|
-
|
|
432
|
-
if (entry.tryLoc === tryLoc) {
|
|
433
|
-
var record = entry.completion;
|
|
434
|
-
|
|
435
|
-
if ("throw" === record.type) {
|
|
436
|
-
var thrown = record.arg;
|
|
437
|
-
resetTryEntry(entry);
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
return thrown;
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
throw new Error("illegal catch attempt");
|
|
445
|
-
},
|
|
446
|
-
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
|
|
447
|
-
return this.delegate = {
|
|
448
|
-
iterator: values(iterable),
|
|
449
|
-
resultName: resultName,
|
|
450
|
-
nextLoc: nextLoc
|
|
451
|
-
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
452
|
-
}
|
|
453
|
-
}, exports;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
457
|
-
}(regeneratorRuntime$1));
|
|
37
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
458
38
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
var runtime = regeneratorRuntime$1.exports();
|
|
462
|
-
var regenerator = runtime;
|
|
463
|
-
|
|
464
|
-
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
|
|
465
|
-
try {
|
|
466
|
-
regeneratorRuntime = runtime;
|
|
467
|
-
} catch (accidentalStrictMode) {
|
|
468
|
-
if (typeof globalThis === "object") {
|
|
469
|
-
globalThis.regeneratorRuntime = runtime;
|
|
470
|
-
} else {
|
|
471
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
472
|
-
}
|
|
39
|
+
function getDefaultExportFromCjs (x) {
|
|
40
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
473
41
|
}
|
|
474
42
|
|
|
475
43
|
const flagSymbol = Symbol('arg flag');
|
|
@@ -884,13 +452,13 @@ colorette.whiteBright = whiteBright;
|
|
|
884
452
|
colorette.yellow = yellow;
|
|
885
453
|
colorette.yellowBright = yellowBright;
|
|
886
454
|
|
|
887
|
-
var _createClass
|
|
455
|
+
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; }; }();
|
|
888
456
|
|
|
889
|
-
var _templateObject
|
|
457
|
+
var _templateObject = _taggedTemplateLiteral(['', ''], ['', '']);
|
|
890
458
|
|
|
891
459
|
function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
892
460
|
|
|
893
|
-
function _classCallCheck
|
|
461
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
894
462
|
|
|
895
463
|
/**
|
|
896
464
|
* @class TemplateTag
|
|
@@ -910,7 +478,7 @@ var TemplateTag = function () {
|
|
|
910
478
|
transformers[_key] = arguments[_key];
|
|
911
479
|
}
|
|
912
480
|
|
|
913
|
-
_classCallCheck
|
|
481
|
+
_classCallCheck(this, TemplateTag);
|
|
914
482
|
|
|
915
483
|
this.tag = function (strings) {
|
|
916
484
|
for (var _len2 = arguments.length, expressions = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
@@ -958,7 +526,7 @@ var TemplateTag = function () {
|
|
|
958
526
|
*/
|
|
959
527
|
|
|
960
528
|
|
|
961
|
-
_createClass
|
|
529
|
+
_createClass(TemplateTag, [{
|
|
962
530
|
key: 'interimTag',
|
|
963
531
|
|
|
964
532
|
|
|
@@ -975,7 +543,7 @@ var TemplateTag = function () {
|
|
|
975
543
|
substitutions[_key3 - 2] = arguments[_key3];
|
|
976
544
|
}
|
|
977
545
|
|
|
978
|
-
return this.tag(_templateObject
|
|
546
|
+
return this.tag(_templateObject, previousTag.apply(undefined, [template].concat(substitutions)));
|
|
979
547
|
}
|
|
980
548
|
|
|
981
549
|
/**
|
|
@@ -1245,7 +813,10 @@ var stripIndent = new TemplateTag(stripIndentTransformer, trimResultTransformer)
|
|
|
1245
813
|
|
|
1246
814
|
new TemplateTag(stripIndentTransformer('all'), trimResultTransformer);
|
|
1247
815
|
|
|
1248
|
-
|
|
816
|
+
var defineProperty = {exports: {}};
|
|
817
|
+
|
|
818
|
+
(function (module) {
|
|
819
|
+
function _defineProperty(obj, key, value) {
|
|
1249
820
|
if (key in obj) {
|
|
1250
821
|
Object.defineProperty(obj, key, {
|
|
1251
822
|
value: value,
|
|
@@ -1260,217 +831,101 @@ function _defineProperty$1(obj, key, value) {
|
|
|
1260
831
|
return obj;
|
|
1261
832
|
}
|
|
1262
833
|
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
throw new TypeError("Cannot call a class as a function");
|
|
1266
|
-
}
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
|
-
function _defineProperties(target, props) {
|
|
1270
|
-
for (var i = 0; i < props.length; i++) {
|
|
1271
|
-
var descriptor = props[i];
|
|
1272
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
1273
|
-
descriptor.configurable = true;
|
|
1274
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
1275
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
1276
|
-
}
|
|
1277
|
-
}
|
|
834
|
+
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
835
|
+
}(defineProperty));
|
|
1278
836
|
|
|
1279
|
-
|
|
1280
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
1281
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
1282
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
1283
|
-
writable: false
|
|
1284
|
-
});
|
|
1285
|
-
return Constructor;
|
|
1286
|
-
}
|
|
837
|
+
var _defineProperty$1 = /*@__PURE__*/getDefaultExportFromCjs(defineProperty.exports);
|
|
1287
838
|
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
839
|
+
class AbortError extends Error {
|
|
840
|
+
static test(error) {
|
|
841
|
+
return error != null && error.code === 'ABORT_ERR';
|
|
1291
842
|
}
|
|
1292
843
|
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
function _getPrototypeOf(o) {
|
|
1297
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
1298
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
1299
|
-
};
|
|
1300
|
-
return _getPrototypeOf(o);
|
|
1301
|
-
}
|
|
844
|
+
constructor(message = 'The operation was aborted') {
|
|
845
|
+
super(message);
|
|
1302
846
|
|
|
1303
|
-
|
|
1304
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1305
|
-
o.__proto__ = p;
|
|
1306
|
-
return o;
|
|
1307
|
-
};
|
|
1308
|
-
return _setPrototypeOf(o, p);
|
|
1309
|
-
}
|
|
847
|
+
_defineProperty$1(this, "code", 'ABORT_ERR');
|
|
1310
848
|
|
|
1311
|
-
|
|
1312
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
1313
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
849
|
+
_defineProperty$1(this, "name", 'AbortError');
|
|
1314
850
|
}
|
|
1315
851
|
|
|
1316
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
1317
|
-
constructor: {
|
|
1318
|
-
value: subClass,
|
|
1319
|
-
writable: true,
|
|
1320
|
-
configurable: true
|
|
1321
|
-
}
|
|
1322
|
-
});
|
|
1323
|
-
Object.defineProperty(subClass, "prototype", {
|
|
1324
|
-
writable: false
|
|
1325
|
-
});
|
|
1326
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
1327
|
-
}
|
|
1328
|
-
|
|
1329
|
-
function _typeof(obj) {
|
|
1330
|
-
"@babel/helpers - typeof";
|
|
1331
|
-
|
|
1332
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
1333
|
-
return typeof obj;
|
|
1334
|
-
} : function (obj) {
|
|
1335
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
1336
|
-
}, _typeof(obj);
|
|
1337
852
|
}
|
|
1338
853
|
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
}
|
|
854
|
+
let _$1 = t => t,
|
|
855
|
+
_t$1,
|
|
856
|
+
_t2,
|
|
857
|
+
_t3,
|
|
858
|
+
_t4;
|
|
859
|
+
function printHelp({
|
|
860
|
+
kind,
|
|
861
|
+
options: customOptions,
|
|
862
|
+
packageManager
|
|
863
|
+
}) {
|
|
864
|
+
const command = createCommand(packageManager);
|
|
865
|
+
const usage = stripIndent(_t$1 || (_t$1 = _$1`
|
|
866
|
+
${0} ${0} ${0} ${0} ${0}
|
|
867
|
+
`), bold_1('Usage:'), command, kind ? magenta_1(kind) : magenta_1('[kind]'), green_1('[name]'), cyan_1('[options]'));
|
|
868
|
+
console.log(usage);
|
|
869
|
+
const example = stripIndent(_t2 || (_t2 = _$1`
|
|
870
|
+
${0} ${0} ${0} ${0} ${0}
|
|
871
|
+
`), bold_1('Example:'), command, magenta_1(kind !== null && kind !== void 0 ? kind : 'app'), green_1(`my-${kind !== null && kind !== void 0 ? kind : 'app'}`), cyan_1('--install'));
|
|
872
|
+
console.log(dim_1(example));
|
|
1352
873
|
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
if (typeof Proxy === "function") return true;
|
|
874
|
+
if (!kind) {
|
|
875
|
+
const kindSection = stripIndent(_t3 || (_t3 = _$1`
|
|
876
|
+
${0} can be one of the following project types:
|
|
1357
877
|
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
return true;
|
|
1361
|
-
} catch (e) {
|
|
1362
|
-
return false;
|
|
1363
|
-
}
|
|
1364
|
-
}
|
|
878
|
+
- ${0}, a web application
|
|
879
|
+
- ${0}, a shared library of code
|
|
1365
880
|
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
_construct = function _construct(Parent, args, Class) {
|
|
1371
|
-
var a = [null];
|
|
1372
|
-
a.push.apply(a, args);
|
|
1373
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
1374
|
-
var instance = new Constructor();
|
|
1375
|
-
if (Class) _setPrototypeOf(instance, Class.prototype);
|
|
1376
|
-
return instance;
|
|
1377
|
-
};
|
|
881
|
+
You’ll be asked a few additional questions based on the kind you choose.
|
|
882
|
+
`), bold_1(magenta_1('kind')), magenta_1('app'), magenta_1('package'));
|
|
883
|
+
console.log();
|
|
884
|
+
console.log(kindSection);
|
|
1378
885
|
}
|
|
1379
886
|
|
|
1380
|
-
|
|
1381
|
-
}
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
_wrapNativeSuper = function _wrapNativeSuper(Class) {
|
|
1387
|
-
if (Class === null || !_isNativeFunction(Class)) return Class;
|
|
1388
|
-
|
|
1389
|
-
if (typeof Class !== "function") {
|
|
1390
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
1391
|
-
}
|
|
1392
|
-
|
|
1393
|
-
if (typeof _cache !== "undefined") {
|
|
1394
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
|
1395
|
-
|
|
1396
|
-
_cache.set(Class, Wrapper);
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
|
-
function Wrapper() {
|
|
1400
|
-
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
|
|
1401
|
-
}
|
|
1402
|
-
|
|
1403
|
-
Wrapper.prototype = Object.create(Class.prototype, {
|
|
1404
|
-
constructor: {
|
|
1405
|
-
value: Wrapper,
|
|
1406
|
-
enumerable: false,
|
|
1407
|
-
writable: true,
|
|
1408
|
-
configurable: true
|
|
1409
|
-
}
|
|
1410
|
-
});
|
|
1411
|
-
return _setPrototypeOf(Wrapper, Class);
|
|
1412
|
-
};
|
|
1413
|
-
|
|
1414
|
-
return _wrapNativeSuper(Class);
|
|
1415
|
-
}
|
|
1416
|
-
|
|
1417
|
-
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); }; }
|
|
1418
|
-
|
|
1419
|
-
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; } }
|
|
887
|
+
const optionsSection = stripIndent(_t4 || (_t4 = _$1`
|
|
888
|
+
${0}
|
|
889
|
+
The name of the project. When creating a package, you should use the public name you
|
|
890
|
+
want for the package, including any scope you want to use (example: ${0}).
|
|
891
|
+
If you don’t provide a name with this flag, this command will ask you for one later.
|
|
1420
892
|
|
|
1421
|
-
|
|
1422
|
-
|
|
893
|
+
${0}
|
|
894
|
+
The directory to create the project in. If you don’t provide this flag, Quilt will pick
|
|
895
|
+
a default directory based on the kind of the project and the name you provided.
|
|
1423
896
|
|
|
1424
|
-
|
|
897
|
+
${0}, ${0}
|
|
898
|
+
If you aren’t already in a monorepo, this flag will create your new project with some
|
|
899
|
+
additional structure that allows it to be a monorepo — that is, you will be able to add
|
|
900
|
+
multiple projects to a single repository.
|
|
1425
901
|
|
|
1426
|
-
|
|
1427
|
-
|
|
902
|
+
${0}, ${0}
|
|
903
|
+
Whether to install dependencies in the newly created project. If you do not provide this
|
|
904
|
+
flag, Quilt will ask you about it later.
|
|
1428
905
|
|
|
1429
|
-
|
|
906
|
+
${0}
|
|
907
|
+
The package manager to use for your new project. This choice will be used to populate
|
|
908
|
+
some commands, and will be used to install dependencies if the ${0} flag is set.
|
|
1430
909
|
|
|
1431
|
-
|
|
910
|
+
Must be one of the following: ${0}, ${0}, or ${0}.
|
|
1432
911
|
|
|
1433
|
-
|
|
912
|
+
${0}, ${0}
|
|
913
|
+
Extra developer tools to configure when creating your new project. This option only
|
|
914
|
+
applies when creating a brand new project, not when adding a project to an existing
|
|
915
|
+
workspace. You can include this flag multiple times to add multiple tools. You can
|
|
916
|
+
enable any of the following tools:
|
|
1434
917
|
|
|
1435
|
-
|
|
918
|
+
- ${0}, which adds a continuous integration (CI) GitHub Action to your project.
|
|
919
|
+
- ${0}, which adds some basic VSCode settings to your project.
|
|
1436
920
|
|
|
1437
|
-
|
|
921
|
+
${0}, ${0}
|
|
922
|
+
Answers “yes” to any question this command would have asked.
|
|
1438
923
|
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
_createClass(AbortError, null, [{
|
|
1443
|
-
key: "test",
|
|
1444
|
-
value: function test(error) {
|
|
1445
|
-
return error != null && error.code === 'ABORT_ERR';
|
|
1446
|
-
}
|
|
1447
|
-
}]);
|
|
1448
|
-
|
|
1449
|
-
return AbortError;
|
|
1450
|
-
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
1451
|
-
|
|
1452
|
-
var _templateObject$1, _templateObject2, _templateObject3, _templateObject4;
|
|
1453
|
-
function printHelp() {
|
|
1454
|
-
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
1455
|
-
kind = _ref.kind,
|
|
1456
|
-
customOptions = _ref.options,
|
|
1457
|
-
packageManager = _ref.packageManager;
|
|
1458
|
-
|
|
1459
|
-
var command = createCommand(packageManager);
|
|
1460
|
-
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]'));
|
|
1461
|
-
console.log(usage);
|
|
1462
|
-
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'));
|
|
1463
|
-
console.log(dim_1(example));
|
|
1464
|
-
|
|
1465
|
-
if (!kind) {
|
|
1466
|
-
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'));
|
|
1467
|
-
console.log();
|
|
1468
|
-
console.log(kindSection);
|
|
1469
|
-
}
|
|
1470
|
-
|
|
1471
|
-
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'));
|
|
924
|
+
${0}, ${0}
|
|
925
|
+
Prints this help documentation.
|
|
926
|
+
`), 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'));
|
|
1472
927
|
console.log();
|
|
1473
|
-
console.log(
|
|
928
|
+
console.log(`${bold_1(cyan_1('options'))} can include any of these flags:`);
|
|
1474
929
|
|
|
1475
930
|
if (customOptions) {
|
|
1476
931
|
console.log();
|
|
@@ -1482,16 +937,14 @@ function printHelp() {
|
|
|
1482
937
|
}
|
|
1483
938
|
|
|
1484
939
|
function printOptionsSection(section) {
|
|
1485
|
-
return section.split('\n').map(
|
|
1486
|
-
return line.length > 0 ? " ".concat(line) : line;
|
|
1487
|
-
}).join('\n');
|
|
940
|
+
return section.split('\n').map(line => line.length > 0 ? ` ${line}` : line).join('\n');
|
|
1488
941
|
}
|
|
1489
942
|
|
|
1490
943
|
function createCommand(explicitPackageManager) {
|
|
1491
944
|
var _process$env$npm_conf;
|
|
1492
945
|
|
|
1493
|
-
|
|
1494
|
-
|
|
946
|
+
let packageManager;
|
|
947
|
+
const npmUserAgent = (_process$env$npm_conf = process.env['npm_config_user_agent']) !== null && _process$env$npm_conf !== void 0 ? _process$env$npm_conf : 'npm';
|
|
1495
948
|
|
|
1496
949
|
if (npmUserAgent.includes('pnpm') || explicitPackageManager === 'pnpm') {
|
|
1497
950
|
packageManager = 'pnpm';
|
|
@@ -1501,7 +954,7 @@ function createCommand(explicitPackageManager) {
|
|
|
1501
954
|
packageManager = 'npm';
|
|
1502
955
|
}
|
|
1503
956
|
|
|
1504
|
-
return
|
|
957
|
+
return `${packageManager} create @quilted`;
|
|
1505
958
|
}
|
|
1506
959
|
|
|
1507
960
|
var prompts$4 = {};
|
|
@@ -4405,9 +3858,9 @@ $.autocomplete = args => {
|
|
|
4405
3858
|
};
|
|
4406
3859
|
}(prompts$4));
|
|
4407
3860
|
|
|
4408
|
-
function ownKeys
|
|
3861
|
+
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; }
|
|
4409
3862
|
|
|
4410
|
-
function _objectSpread
|
|
3863
|
+
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; }
|
|
4411
3864
|
|
|
4412
3865
|
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; }
|
|
4413
3866
|
|
|
@@ -4436,11 +3889,11 @@ const noop$1 = () => {};
|
|
|
4436
3889
|
|
|
4437
3890
|
|
|
4438
3891
|
function prompt$3() {
|
|
4439
|
-
return _prompt
|
|
3892
|
+
return _prompt.apply(this, arguments);
|
|
4440
3893
|
}
|
|
4441
3894
|
|
|
4442
|
-
function _prompt
|
|
4443
|
-
_prompt
|
|
3895
|
+
function _prompt() {
|
|
3896
|
+
_prompt = _asyncToGenerator(function* (questions = [], {
|
|
4444
3897
|
onSubmit = noop$1,
|
|
4445
3898
|
onCancel = noop$1
|
|
4446
3899
|
} = {}) {
|
|
@@ -4475,7 +3928,7 @@ function _prompt$1() {
|
|
|
4475
3928
|
|
|
4476
3929
|
// evaluate type first and skip if type is a falsy value
|
|
4477
3930
|
if (typeof type === 'function') {
|
|
4478
|
-
type = yield type(answer, _objectSpread
|
|
3931
|
+
type = yield type(answer, _objectSpread({}, answers), question);
|
|
4479
3932
|
question['type'] = type;
|
|
4480
3933
|
}
|
|
4481
3934
|
|
|
@@ -4484,7 +3937,7 @@ function _prompt$1() {
|
|
|
4484
3937
|
for (let key in question) {
|
|
4485
3938
|
if (passOn$1.includes(key)) continue;
|
|
4486
3939
|
let value = question[key];
|
|
4487
|
-
question[key] = typeof value === 'function' ? yield value(answer, _objectSpread
|
|
3940
|
+
question[key] = typeof value === 'function' ? yield value(answer, _objectSpread({}, answers), lastPrompt) : value;
|
|
4488
3941
|
}
|
|
4489
3942
|
|
|
4490
3943
|
lastPrompt = question;
|
|
@@ -4530,7 +3983,7 @@ function _prompt$1() {
|
|
|
4530
3983
|
|
|
4531
3984
|
return answers;
|
|
4532
3985
|
});
|
|
4533
|
-
return _prompt
|
|
3986
|
+
return _prompt.apply(this, arguments);
|
|
4534
3987
|
}
|
|
4535
3988
|
|
|
4536
3989
|
function getInjectedAnswer$1(injected, deafultValue) {
|
|
@@ -7187,385 +6640,191 @@ var prompts =
|
|
|
7187
6640
|
? dist
|
|
7188
6641
|
: lib;
|
|
7189
6642
|
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7197
|
-
|
|
7198
|
-
_prompt = _asyncToGenerator$5( /*#__PURE__*/regenerator.mark(function _callee(prompt) {
|
|
7199
|
-
var result;
|
|
7200
|
-
return regenerator.wrap(function _callee$(_context) {
|
|
7201
|
-
while (1) {
|
|
7202
|
-
switch (_context.prev = _context.next) {
|
|
7203
|
-
case 0:
|
|
7204
|
-
_context.next = 2;
|
|
7205
|
-
return prompts(_objectSpread({
|
|
7206
|
-
name: 'value'
|
|
7207
|
-
}, prompt), {
|
|
7208
|
-
onCancel: function onCancel() {
|
|
7209
|
-
throw new AbortError();
|
|
7210
|
-
}
|
|
7211
|
-
});
|
|
7212
|
-
|
|
7213
|
-
case 2:
|
|
7214
|
-
result = _context.sent;
|
|
7215
|
-
return _context.abrupt("return", result.value);
|
|
7216
|
-
|
|
7217
|
-
case 4:
|
|
7218
|
-
case "end":
|
|
7219
|
-
return _context.stop();
|
|
7220
|
-
}
|
|
7221
|
-
}
|
|
7222
|
-
}, _callee);
|
|
7223
|
-
}));
|
|
7224
|
-
return _prompt.apply(this, arguments);
|
|
7225
|
-
}
|
|
6643
|
+
async function prompt(prompt) {
|
|
6644
|
+
const result = await prompts({
|
|
6645
|
+
name: 'value',
|
|
6646
|
+
...prompt
|
|
6647
|
+
}, {
|
|
6648
|
+
onCancel() {
|
|
6649
|
+
throw new AbortError();
|
|
6650
|
+
}
|
|
7226
6651
|
|
|
7227
|
-
|
|
7228
|
-
return
|
|
6652
|
+
});
|
|
6653
|
+
return result.value;
|
|
7229
6654
|
}
|
|
6655
|
+
async function getCreateAsMonorepo(argv) {
|
|
6656
|
+
let createAsMonorepo;
|
|
7230
6657
|
|
|
7231
|
-
|
|
7232
|
-
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
|
|
7236
|
-
|
|
7237
|
-
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
|
|
7241
|
-
|
|
7242
|
-
|
|
7243
|
-
createAsMonorepo = true;
|
|
7244
|
-
_context2.next = 11;
|
|
7245
|
-
break;
|
|
7246
|
-
|
|
7247
|
-
case 4:
|
|
7248
|
-
if (!argv['--no-monorepo']) {
|
|
7249
|
-
_context2.next = 8;
|
|
7250
|
-
break;
|
|
7251
|
-
}
|
|
7252
|
-
|
|
7253
|
-
createAsMonorepo = false;
|
|
7254
|
-
_context2.next = 11;
|
|
7255
|
-
break;
|
|
7256
|
-
|
|
7257
|
-
case 8:
|
|
7258
|
-
_context2.next = 10;
|
|
7259
|
-
return prompt({
|
|
7260
|
-
type: 'confirm',
|
|
7261
|
-
message: 'Do you want to create this app as a monorepo, with room for more projects?',
|
|
7262
|
-
initial: true
|
|
7263
|
-
});
|
|
7264
|
-
|
|
7265
|
-
case 10:
|
|
7266
|
-
createAsMonorepo = _context2.sent;
|
|
7267
|
-
|
|
7268
|
-
case 11:
|
|
7269
|
-
return _context2.abrupt("return", createAsMonorepo);
|
|
7270
|
-
|
|
7271
|
-
case 12:
|
|
7272
|
-
case "end":
|
|
7273
|
-
return _context2.stop();
|
|
7274
|
-
}
|
|
7275
|
-
}
|
|
7276
|
-
}, _callee2);
|
|
7277
|
-
}));
|
|
7278
|
-
return _getCreateAsMonorepo.apply(this, arguments);
|
|
7279
|
-
}
|
|
6658
|
+
if (argv['--monorepo' ]) {
|
|
6659
|
+
createAsMonorepo = true;
|
|
6660
|
+
} else if (argv['--no-monorepo']) {
|
|
6661
|
+
createAsMonorepo = false;
|
|
6662
|
+
} else {
|
|
6663
|
+
createAsMonorepo = await prompt({
|
|
6664
|
+
type: 'confirm',
|
|
6665
|
+
message: 'Do you want to create this app as a monorepo, with room for more projects?',
|
|
6666
|
+
initial: true
|
|
6667
|
+
});
|
|
6668
|
+
}
|
|
7280
6669
|
|
|
7281
|
-
|
|
7282
|
-
return _getShouldInstall.apply(this, arguments);
|
|
6670
|
+
return createAsMonorepo;
|
|
7283
6671
|
}
|
|
6672
|
+
async function getShouldInstall(argv) {
|
|
6673
|
+
let shouldInstall;
|
|
7284
6674
|
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
|
|
7289
|
-
|
|
7290
|
-
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
shouldInstall = true;
|
|
7298
|
-
_context3.next = 11;
|
|
7299
|
-
break;
|
|
7300
|
-
|
|
7301
|
-
case 4:
|
|
7302
|
-
if (!argv['--no-install']) {
|
|
7303
|
-
_context3.next = 8;
|
|
7304
|
-
break;
|
|
7305
|
-
}
|
|
7306
|
-
|
|
7307
|
-
shouldInstall = false;
|
|
7308
|
-
_context3.next = 11;
|
|
7309
|
-
break;
|
|
7310
|
-
|
|
7311
|
-
case 8:
|
|
7312
|
-
_context3.next = 10;
|
|
7313
|
-
return prompt({
|
|
7314
|
-
type: 'confirm',
|
|
7315
|
-
message: 'Do you want to install dependencies for this app after creating it?',
|
|
7316
|
-
initial: true
|
|
7317
|
-
});
|
|
7318
|
-
|
|
7319
|
-
case 10:
|
|
7320
|
-
shouldInstall = _context3.sent;
|
|
7321
|
-
|
|
7322
|
-
case 11:
|
|
7323
|
-
return _context3.abrupt("return", shouldInstall);
|
|
7324
|
-
|
|
7325
|
-
case 12:
|
|
7326
|
-
case "end":
|
|
7327
|
-
return _context3.stop();
|
|
7328
|
-
}
|
|
7329
|
-
}
|
|
7330
|
-
}, _callee3);
|
|
7331
|
-
}));
|
|
7332
|
-
return _getShouldInstall.apply(this, arguments);
|
|
7333
|
-
}
|
|
6675
|
+
if (argv['--install'] || argv['--yes']) {
|
|
6676
|
+
shouldInstall = true;
|
|
6677
|
+
} else if (argv['--no-install']) {
|
|
6678
|
+
shouldInstall = false;
|
|
6679
|
+
} else {
|
|
6680
|
+
shouldInstall = await prompt({
|
|
6681
|
+
type: 'confirm',
|
|
6682
|
+
message: 'Do you want to install dependencies for this app after creating it?',
|
|
6683
|
+
initial: true
|
|
6684
|
+
});
|
|
6685
|
+
}
|
|
7334
6686
|
|
|
7335
|
-
|
|
7336
|
-
function getPackageManager(_x4) {
|
|
7337
|
-
return _getPackageManager.apply(this, arguments);
|
|
6687
|
+
return shouldInstall;
|
|
7338
6688
|
}
|
|
6689
|
+
const VALID_PACKAGE_MANAGERS = new Set(['pnpm', 'npm', 'yarn']);
|
|
6690
|
+
async function getPackageManager(argv) {
|
|
6691
|
+
let packageManager;
|
|
7339
6692
|
|
|
7340
|
-
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
while (1) {
|
|
7346
|
-
switch (_context4.prev = _context4.next) {
|
|
7347
|
-
case 0:
|
|
7348
|
-
if (argv['--package-manager']) {
|
|
7349
|
-
explicitPackageManager = argv['--package-manager'].toLocaleLowerCase();
|
|
7350
|
-
packageManager = VALID_PACKAGE_MANAGERS.has(explicitPackageManager) ? explicitPackageManager : 'npm';
|
|
7351
|
-
} else {
|
|
7352
|
-
npmUserAgent = (_process$env$npm_conf = process.env['npm_config_user_agent']) !== null && _process$env$npm_conf !== void 0 ? _process$env$npm_conf : 'npm';
|
|
7353
|
-
|
|
7354
|
-
if (npmUserAgent.includes('pnpm') || fs__namespace.existsSync('pnpm-lock.yaml')) {
|
|
7355
|
-
packageManager = 'pnpm';
|
|
7356
|
-
} else if (npmUserAgent.includes('yarn') || fs__namespace.existsSync('yarn.lock')) {
|
|
7357
|
-
packageManager = 'yarn';
|
|
7358
|
-
} else {
|
|
7359
|
-
packageManager = 'npm';
|
|
7360
|
-
}
|
|
7361
|
-
}
|
|
6693
|
+
if (argv['--package-manager']) {
|
|
6694
|
+
const explicitPackageManager = argv['--package-manager'].toLocaleLowerCase();
|
|
6695
|
+
packageManager = VALID_PACKAGE_MANAGERS.has(explicitPackageManager) ? explicitPackageManager : 'npm';
|
|
6696
|
+
} else {
|
|
6697
|
+
var _process$env$npm_conf;
|
|
7362
6698
|
|
|
7363
|
-
|
|
6699
|
+
const npmUserAgent = (_process$env$npm_conf = process.env['npm_config_user_agent']) !== null && _process$env$npm_conf !== void 0 ? _process$env$npm_conf : 'npm';
|
|
7364
6700
|
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
|
|
7373
|
-
}
|
|
6701
|
+
if (npmUserAgent.includes('pnpm') || fs__namespace.existsSync('pnpm-lock.yaml')) {
|
|
6702
|
+
packageManager = 'pnpm';
|
|
6703
|
+
} else if (npmUserAgent.includes('yarn') || fs__namespace.existsSync('yarn.lock')) {
|
|
6704
|
+
packageManager = 'yarn';
|
|
6705
|
+
} else {
|
|
6706
|
+
packageManager = 'npm';
|
|
6707
|
+
}
|
|
6708
|
+
}
|
|
7374
6709
|
|
|
7375
|
-
|
|
7376
|
-
function getExtrasToSetup(_x5, _x6) {
|
|
7377
|
-
return _getExtrasToSetup.apply(this, arguments);
|
|
6710
|
+
return packageManager;
|
|
7378
6711
|
}
|
|
7379
|
-
|
|
7380
|
-
function
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
|
|
7388
|
-
|
|
7389
|
-
|
|
7390
|
-
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
return VALID_EXTRAS.has(extra);
|
|
7404
|
-
})));
|
|
7405
|
-
|
|
7406
|
-
case 5:
|
|
7407
|
-
_context5.next = 7;
|
|
7408
|
-
return prompt({
|
|
7409
|
-
type: 'multiselect',
|
|
7410
|
-
message: 'Which additional tools would you like to configure?',
|
|
7411
|
-
instructions: dim_1("\n Use ".concat(bold_1('space'), " to select, ").concat(bold_1('a'), " to select all, ").concat(bold_1('return'), " to submit")),
|
|
7412
|
-
choices: [{
|
|
7413
|
-
title: 'VSCode',
|
|
7414
|
-
value: 'vscode'
|
|
7415
|
-
}, {
|
|
7416
|
-
title: 'GitHub',
|
|
7417
|
-
value: 'github'
|
|
7418
|
-
}]
|
|
7419
|
-
});
|
|
7420
|
-
|
|
7421
|
-
case 7:
|
|
7422
|
-
setupExtras = _context5.sent;
|
|
7423
|
-
extrasToSetup = new Set(setupExtras);
|
|
7424
|
-
return _context5.abrupt("return", extrasToSetup);
|
|
7425
|
-
|
|
7426
|
-
case 10:
|
|
7427
|
-
case "end":
|
|
7428
|
-
return _context5.stop();
|
|
7429
|
-
}
|
|
7430
|
-
}
|
|
7431
|
-
}, _callee5);
|
|
7432
|
-
}));
|
|
7433
|
-
return _getExtrasToSetup.apply(this, arguments);
|
|
6712
|
+
const VALID_EXTRAS = new Set(['github', 'vscode']);
|
|
6713
|
+
async function getExtrasToSetup(argv, {
|
|
6714
|
+
inWorkspace
|
|
6715
|
+
}) {
|
|
6716
|
+
if (inWorkspace || argv['--no-extras']) return new Set();
|
|
6717
|
+
|
|
6718
|
+
if (argv['--extras']) {
|
|
6719
|
+
return new Set(argv['--extras'].filter(extra => VALID_EXTRAS.has(extra)));
|
|
6720
|
+
}
|
|
6721
|
+
|
|
6722
|
+
const setupExtras = await prompt({
|
|
6723
|
+
type: 'multiselect',
|
|
6724
|
+
message: 'Which additional tools would you like to configure?',
|
|
6725
|
+
instructions: dim_1(`\n Use ${bold_1('space')} to select, ${bold_1('a')} to select all, ${bold_1('return')} to submit`),
|
|
6726
|
+
choices: [{
|
|
6727
|
+
title: 'VSCode',
|
|
6728
|
+
value: 'vscode'
|
|
6729
|
+
}, {
|
|
6730
|
+
title: 'GitHub',
|
|
6731
|
+
value: 'github'
|
|
6732
|
+
}]
|
|
6733
|
+
});
|
|
6734
|
+
const extrasToSetup = new Set(setupExtras);
|
|
6735
|
+
return extrasToSetup;
|
|
7434
6736
|
}
|
|
7435
6737
|
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
6738
|
+
let _ = t => t,
|
|
6739
|
+
_t;
|
|
6740
|
+
const VALID_PROJECT_KINDS = new Set(['app', 'package']);
|
|
6741
|
+
run().catch(error => {
|
|
7439
6742
|
if (AbortError.test(error)) return;
|
|
7440
6743
|
console.error(error);
|
|
7441
6744
|
process.exitCode = 1;
|
|
7442
6745
|
});
|
|
7443
6746
|
|
|
7444
|
-
function run() {
|
|
7445
|
-
|
|
7446
|
-
}
|
|
6747
|
+
async function run() {
|
|
6748
|
+
var _permissiveArgs$_$;
|
|
7447
6749
|
|
|
7448
|
-
|
|
7449
|
-
|
|
7450
|
-
|
|
7451
|
-
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
switch (_context.prev = _context.next) {
|
|
7457
|
-
case 0:
|
|
7458
|
-
permissiveArgs = arg_1({
|
|
7459
|
-
'--help': Boolean,
|
|
7460
|
-
'-h': '--help',
|
|
7461
|
-
'--package-manager': String
|
|
7462
|
-
}, {
|
|
7463
|
-
permissive: true
|
|
7464
|
-
});
|
|
7465
|
-
firstArgument = (_permissiveArgs$_$ = permissiveArgs._[0]) === null || _permissiveArgs$_$ === void 0 ? void 0 : _permissiveArgs$_$.toLowerCase();
|
|
7466
|
-
|
|
7467
|
-
if (!(firstArgument != null && !firstArgument.startsWith('-') && !VALID_PROJECT_KINDS.has(firstArgument))) {
|
|
7468
|
-
_context.next = 5;
|
|
7469
|
-
break;
|
|
7470
|
-
}
|
|
6750
|
+
const permissiveArgs = arg_1({
|
|
6751
|
+
'--help': Boolean,
|
|
6752
|
+
'-h': '--help',
|
|
6753
|
+
'--package-manager': String
|
|
6754
|
+
}, {
|
|
6755
|
+
permissive: true
|
|
6756
|
+
});
|
|
6757
|
+
const firstArgument = (_permissiveArgs$_$ = permissiveArgs._[0]) === null || _permissiveArgs$_$ === void 0 ? void 0 : _permissiveArgs$_$.toLowerCase();
|
|
7471
6758
|
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
|
|
6759
|
+
if (firstArgument != null && !firstArgument.startsWith('-') && !VALID_PROJECT_KINDS.has(firstArgument)) {
|
|
6760
|
+
// TODO: show help with error message
|
|
6761
|
+
process.exitCode = 1;
|
|
6762
|
+
return;
|
|
6763
|
+
}
|
|
7475
6764
|
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
6765
|
+
let kind = firstArgument == null || !VALID_PROJECT_KINDS.has(firstArgument) ? undefined : firstArgument;
|
|
6766
|
+
const header = stripIndent(_t || (_t = _`
|
|
6767
|
+
🧵 ${0}
|
|
6768
|
+
`), bold_1('quilt create'));
|
|
6769
|
+
console.log(header);
|
|
6770
|
+
console.log();
|
|
7481
6771
|
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
break;
|
|
7485
|
-
}
|
|
6772
|
+
if (permissiveArgs['--help'] && !kind) {
|
|
6773
|
+
var _permissiveArgs$Pac;
|
|
7486
6774
|
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
6775
|
+
printHelp({
|
|
6776
|
+
packageManager: (_permissiveArgs$Pac = permissiveArgs['--package-manager']) === null || _permissiveArgs$Pac === void 0 ? void 0 : _permissiveArgs$Pac.toLowerCase()
|
|
6777
|
+
});
|
|
6778
|
+
return;
|
|
6779
|
+
}
|
|
7491
6780
|
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
6781
|
+
if (kind == null) {
|
|
6782
|
+
kind = await prompt({
|
|
6783
|
+
type: 'select',
|
|
6784
|
+
message: 'What kind of project would you like to create?',
|
|
6785
|
+
choices: [{
|
|
6786
|
+
title: 'App',
|
|
6787
|
+
value: 'app'
|
|
6788
|
+
}, {
|
|
6789
|
+
title: 'Package',
|
|
6790
|
+
value: 'package'
|
|
6791
|
+
}]
|
|
6792
|
+
});
|
|
6793
|
+
}
|
|
7497
6794
|
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
_context.t0 = kind;
|
|
7516
|
-
_context.next = _context.t0 === 'app' ? 19 : _context.t0 === 'package' ? 26 : 33;
|
|
7517
|
-
break;
|
|
7518
|
-
|
|
7519
|
-
case 19:
|
|
7520
|
-
_context.next = 21;
|
|
7521
|
-
return Promise.resolve().then(function () { return require('./app.cjs'); });
|
|
7522
|
-
|
|
7523
|
-
case 21:
|
|
7524
|
-
_yield$import = _context.sent;
|
|
7525
|
-
createApp = _yield$import.createApp;
|
|
7526
|
-
_context.next = 25;
|
|
7527
|
-
return createApp();
|
|
7528
|
-
|
|
7529
|
-
case 25:
|
|
7530
|
-
return _context.abrupt("break", 33);
|
|
7531
|
-
|
|
7532
|
-
case 26:
|
|
7533
|
-
_context.next = 28;
|
|
7534
|
-
return Promise.resolve().then(function () { return require('./package.cjs'); });
|
|
7535
|
-
|
|
7536
|
-
case 28:
|
|
7537
|
-
_yield$import2 = _context.sent;
|
|
7538
|
-
createProject = _yield$import2.createProject;
|
|
7539
|
-
_context.next = 32;
|
|
7540
|
-
return createProject();
|
|
7541
|
-
|
|
7542
|
-
case 32:
|
|
7543
|
-
return _context.abrupt("break", 33);
|
|
7544
|
-
|
|
7545
|
-
case 33:
|
|
7546
|
-
case "end":
|
|
7547
|
-
return _context.stop();
|
|
7548
|
-
}
|
|
6795
|
+
switch (kind) {
|
|
6796
|
+
case 'app':
|
|
6797
|
+
{
|
|
6798
|
+
const {
|
|
6799
|
+
createApp
|
|
6800
|
+
} = await Promise.resolve().then(function () { return require('./app.cjs'); });
|
|
6801
|
+
await createApp();
|
|
6802
|
+
break;
|
|
6803
|
+
}
|
|
6804
|
+
|
|
6805
|
+
case 'package':
|
|
6806
|
+
{
|
|
6807
|
+
const {
|
|
6808
|
+
createProject
|
|
6809
|
+
} = await Promise.resolve().then(function () { return require('./package.cjs'); });
|
|
6810
|
+
await createProject();
|
|
6811
|
+
break;
|
|
7549
6812
|
}
|
|
7550
|
-
|
|
7551
|
-
}));
|
|
7552
|
-
return _run.apply(this, arguments);
|
|
6813
|
+
}
|
|
7553
6814
|
}
|
|
7554
6815
|
|
|
7555
|
-
exports._asyncToGenerator = _asyncToGenerator$5;
|
|
7556
|
-
exports._defineProperty = _defineProperty$1;
|
|
7557
|
-
exports._taggedTemplateLiteral = _taggedTemplateLiteral$1;
|
|
7558
6816
|
exports.arg_1 = arg_1;
|
|
7559
6817
|
exports.bold_1 = bold_1;
|
|
6818
|
+
exports.commonjsGlobal = commonjsGlobal;
|
|
7560
6819
|
exports.cyan_1 = cyan_1;
|
|
7561
6820
|
exports.dim_1 = dim_1;
|
|
7562
6821
|
exports.getCreateAsMonorepo = getCreateAsMonorepo;
|
|
6822
|
+
exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
|
|
7563
6823
|
exports.getExtrasToSetup = getExtrasToSetup;
|
|
7564
6824
|
exports.getPackageManager = getPackageManager;
|
|
7565
6825
|
exports.getShouldInstall = getShouldInstall;
|
|
7566
6826
|
exports.magenta_1 = magenta_1;
|
|
7567
6827
|
exports.printHelp = printHelp;
|
|
7568
6828
|
exports.prompt = prompt;
|
|
7569
|
-
exports.regenerator = regenerator;
|
|
7570
6829
|
exports.stripIndent = stripIndent;
|
|
7571
6830
|
exports.underline_1 = underline_1;
|