@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.
@@ -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
- 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);
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,6 +34,444 @@ 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
+ function _taggedTemplateLiteral$1(strings, raw) {
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));
458
+
459
+ // TODO(Babel 8): Remove this file.
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
+ }
473
+ }
474
+
37
475
  const flagSymbol = Symbol('arg flag');
38
476
 
39
477
  class ArgError extends Error {
@@ -446,13 +884,13 @@ colorette.whiteBright = whiteBright;
446
884
  colorette.yellow = yellow;
447
885
  colorette.yellowBright = yellowBright;
448
886
 
449
- 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; }; }();
887
+ 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; }; }();
450
888
 
451
- var _templateObject = _taggedTemplateLiteral(['', ''], ['', '']);
889
+ var _templateObject$2 = _taggedTemplateLiteral(['', ''], ['', '']);
452
890
 
453
891
  function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
454
892
 
455
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
893
+ function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
456
894
 
457
895
  /**
458
896
  * @class TemplateTag
@@ -472,7 +910,7 @@ var TemplateTag = function () {
472
910
  transformers[_key] = arguments[_key];
473
911
  }
474
912
 
475
- _classCallCheck(this, TemplateTag);
913
+ _classCallCheck$1(this, TemplateTag);
476
914
 
477
915
  this.tag = function (strings) {
478
916
  for (var _len2 = arguments.length, expressions = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
@@ -520,7 +958,7 @@ var TemplateTag = function () {
520
958
  */
521
959
 
522
960
 
523
- _createClass(TemplateTag, [{
961
+ _createClass$1(TemplateTag, [{
524
962
  key: 'interimTag',
525
963
 
526
964
 
@@ -537,7 +975,7 @@ var TemplateTag = function () {
537
975
  substitutions[_key3 - 2] = arguments[_key3];
538
976
  }
539
977
 
540
- return this.tag(_templateObject, previousTag.apply(undefined, [template].concat(substitutions)));
978
+ return this.tag(_templateObject$2, previousTag.apply(undefined, [template].concat(substitutions)));
541
979
  }
542
980
 
543
981
  /**
@@ -807,90 +1245,232 @@ var stripIndent = new TemplateTag(stripIndentTransformer, trimResultTransformer)
807
1245
 
808
1246
  new TemplateTag(stripIndentTransformer('all'), trimResultTransformer);
809
1247
 
810
- class AbortError extends Error {
811
- static test(error) {
812
- return error != null && error.code === 'ABORT_ERR';
1248
+ function _defineProperty$1(obj, key, value) {
1249
+ if (key in obj) {
1250
+ Object.defineProperty(obj, key, {
1251
+ value: value,
1252
+ enumerable: true,
1253
+ configurable: true,
1254
+ writable: true
1255
+ });
1256
+ } else {
1257
+ obj[key] = value;
813
1258
  }
814
1259
 
815
- code = 'ABORT_ERR';
816
- name = 'AbortError';
1260
+ return obj;
1261
+ }
817
1262
 
818
- constructor(message = 'The operation was aborted') {
819
- super(message);
1263
+ function _classCallCheck(instance, Constructor) {
1264
+ if (!(instance instanceof Constructor)) {
1265
+ throw new TypeError("Cannot call a class as a function");
820
1266
  }
1267
+ }
821
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
+ }
822
1277
  }
823
1278
 
824
- function printHelp({
825
- kind,
826
- options: customOptions,
827
- packageManager
828
- }) {
829
- const command = createCommand(packageManager);
830
- const usage = stripIndent`
831
- ${bold_1('Usage:')} ${command} ${kind ? magenta_1(kind) : magenta_1('[kind]')} ${green_1('[name]')} ${cyan_1('[options]')}
832
- `;
833
- console.log(usage);
834
- const example = stripIndent`
835
- ${bold_1('Example:')} ${command} ${magenta_1(kind ?? 'app')} ${green_1(`my-${kind ?? 'app'}`)} ${cyan_1('--install')}
836
- `;
837
- console.log(dim_1(example));
1279
+ function _createClass(Constructor, protoProps, staticProps) {
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
+ }
838
1287
 
839
- if (!kind) {
840
- const kindSection = stripIndent`
841
- ${bold_1(magenta_1('kind'))} can be one of the following project types:
1288
+ function _assertThisInitialized(self) {
1289
+ if (self === void 0) {
1290
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1291
+ }
842
1292
 
843
- - ${magenta_1('app')}, a web application
844
- - ${magenta_1('package')}, a shared library of code
1293
+ return self;
1294
+ }
845
1295
 
846
- You’ll be asked a few additional questions based on the kind you choose.
847
- `;
848
- console.log();
849
- console.log(kindSection);
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
+ }
1302
+
1303
+ function _setPrototypeOf(o, p) {
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
+ }
1310
+
1311
+ function _inherits(subClass, superClass) {
1312
+ if (typeof superClass !== "function" && superClass !== null) {
1313
+ throw new TypeError("Super expression must either be null or a function");
1314
+ }
1315
+
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
+ }
1338
+
1339
+ function _possibleConstructorReturn(self, call) {
1340
+ if (call && (_typeof(call) === "object" || typeof call === "function")) {
1341
+ return call;
1342
+ } else if (call !== void 0) {
1343
+ throw new TypeError("Derived constructors may only return object or undefined");
1344
+ }
1345
+
1346
+ return _assertThisInitialized(self);
1347
+ }
1348
+
1349
+ function _isNativeFunction(fn) {
1350
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
1351
+ }
1352
+
1353
+ function _isNativeReflectConstruct$1() {
1354
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
1355
+ if (Reflect.construct.sham) return false;
1356
+ if (typeof Proxy === "function") return true;
1357
+
1358
+ try {
1359
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
1360
+ return true;
1361
+ } catch (e) {
1362
+ return false;
1363
+ }
1364
+ }
1365
+
1366
+ function _construct(Parent, args, Class) {
1367
+ if (_isNativeReflectConstruct$1()) {
1368
+ _construct = Reflect.construct.bind();
1369
+ } else {
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
+ };
850
1378
  }
851
1379
 
852
- const optionsSection = stripIndent`
853
- ${cyan_1('--name')}
854
- The name of the project. When creating a package, you should use the public name you
855
- want for the package, including any scope you want to use (example: ${bold_1('@my-org/my-package')}).
856
- If you don’t provide a name with this flag, this command will ask you for one later.
1380
+ return _construct.apply(null, arguments);
1381
+ }
1382
+
1383
+ function _wrapNativeSuper(Class) {
1384
+ var _cache = typeof Map === "function" ? new Map() : undefined;
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; } }
1420
+
1421
+ var AbortError = /*#__PURE__*/function (_Error) {
1422
+ _inherits(AbortError, _Error);
1423
+
1424
+ var _super2 = _createSuper(AbortError);
1425
+
1426
+ function AbortError() {
1427
+ var _this2;
857
1428
 
858
- ${cyan_1('--directory')}
859
- The directory to create the project in. If you don’t provide this flag, Quilt will pick
860
- a default directory based on the kind of the project and the name you provided.
1429
+ var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'The operation was aborted';
861
1430
 
862
- ${cyan_1(`--monorepo`)}, ${cyan_1(`--no-monorepo`)}
863
- If you aren’t already in a monorepo, this flag will create your new project with some
864
- additional structure that allows it to be a monorepo — that is, you will be able to add
865
- multiple projects to a single repository.
1431
+ _classCallCheck(this, AbortError);
866
1432
 
867
- ${cyan_1(`--install`)}, ${cyan_1(`--no-install`)}
868
- Whether to install dependencies in the newly created project. If you do not provide this
869
- flag, Quilt will ask you about it later.
1433
+ _this2 = _super2.call(this, message);
870
1434
 
871
- ${cyan_1('--package-manager')}
872
- The package manager to use for your new project. This choice will be used to populate
873
- some commands, and will be used to install dependencies if the ${cyan_1('--install')} flag is set.
1435
+ _defineProperty$1(_assertThisInitialized(_this2), "code", 'ABORT_ERR');
1436
+
1437
+ _defineProperty$1(_assertThisInitialized(_this2), "name", 'AbortError');
1438
+
1439
+ return _this2;
1440
+ }
1441
+
1442
+ _createClass(AbortError, null, [{
1443
+ key: "test",
1444
+ value: function test(error) {
1445
+ return error != null && error.code === 'ABORT_ERR';
1446
+ }
1447
+ }]);
874
1448
 
875
- Must be one of the following: ${bold_1('pnpm')}, ${bold_1('npm')}, or ${bold_1('yarn')}.
1449
+ return AbortError;
1450
+ }( /*#__PURE__*/_wrapNativeSuper(Error));
876
1451
 
877
- ${cyan_1(`--extras`)}, ${cyan_1(`--no-extras`)}
878
- Extra developer tools to configure when creating your new project. This option only
879
- applies when creating a brand new project, not when adding a project to an existing
880
- workspace. You can include this flag multiple times to add multiple tools. You can
881
- enable any of the following tools:
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;
882
1458
 
883
- - ${bold_1('github')}, which adds a continuous integration (CI) GitHub Action to your project.
884
- - ${bold_1('vscode')}, which adds some basic VSCode settings to your project.
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));
885
1464
 
886
- ${cyan_1('--yes')}, ${cyan_1('-y')}
887
- Answers “yes” to any question this command would have asked.
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
+ }
888
1470
 
889
- ${cyan_1('--help')}, ${cyan_1('-h')}
890
- Prints this help documentation.
891
- `;
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'));
892
1472
  console.log();
893
- console.log(`${bold_1(cyan_1('options'))} can include any of these flags:`);
1473
+ console.log("".concat(bold_1(cyan_1('options')), " can include any of these flags:"));
894
1474
 
895
1475
  if (customOptions) {
896
1476
  console.log();
@@ -902,12 +1482,16 @@ function printHelp({
902
1482
  }
903
1483
 
904
1484
  function printOptionsSection(section) {
905
- return section.split('\n').map(line => line.length > 0 ? ` ${line}` : line).join('\n');
1485
+ return section.split('\n').map(function (line) {
1486
+ return line.length > 0 ? " ".concat(line) : line;
1487
+ }).join('\n');
906
1488
  }
907
1489
 
908
1490
  function createCommand(explicitPackageManager) {
909
- let packageManager;
910
- const npmUserAgent = process.env['npm_config_user_agent'] ?? 'npm';
1491
+ var _process$env$npm_conf;
1492
+
1493
+ var packageManager;
1494
+ var npmUserAgent = (_process$env$npm_conf = process.env['npm_config_user_agent']) !== null && _process$env$npm_conf !== void 0 ? _process$env$npm_conf : 'npm';
911
1495
 
912
1496
  if (npmUserAgent.includes('pnpm') || explicitPackageManager === 'pnpm') {
913
1497
  packageManager = 'pnpm';
@@ -917,7 +1501,7 @@ function createCommand(explicitPackageManager) {
917
1501
  packageManager = 'npm';
918
1502
  }
919
1503
 
920
- return `${packageManager} create @quilted`;
1504
+ return "".concat(packageManager, " create @quilted");
921
1505
  }
922
1506
 
923
1507
  var prompts$4 = {};
@@ -3821,9 +4405,9 @@ $.autocomplete = args => {
3821
4405
  };
3822
4406
  }(prompts$4));
3823
4407
 
3824
- 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; }
4408
+ 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; }
3825
4409
 
3826
- 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; }
4410
+ 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; }
3827
4411
 
3828
4412
  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; }
3829
4413
 
@@ -3852,11 +4436,11 @@ const noop$1 = () => {};
3852
4436
 
3853
4437
 
3854
4438
  function prompt$3() {
3855
- return _prompt.apply(this, arguments);
4439
+ return _prompt$1.apply(this, arguments);
3856
4440
  }
3857
4441
 
3858
- function _prompt() {
3859
- _prompt = _asyncToGenerator(function* (questions = [], {
4442
+ function _prompt$1() {
4443
+ _prompt$1 = _asyncToGenerator(function* (questions = [], {
3860
4444
  onSubmit = noop$1,
3861
4445
  onCancel = noop$1
3862
4446
  } = {}) {
@@ -3891,7 +4475,7 @@ function _prompt() {
3891
4475
 
3892
4476
  // evaluate type first and skip if type is a falsy value
3893
4477
  if (typeof type === 'function') {
3894
- type = yield type(answer, _objectSpread({}, answers), question);
4478
+ type = yield type(answer, _objectSpread$1({}, answers), question);
3895
4479
  question['type'] = type;
3896
4480
  }
3897
4481
 
@@ -3900,7 +4484,7 @@ function _prompt() {
3900
4484
  for (let key in question) {
3901
4485
  if (passOn$1.includes(key)) continue;
3902
4486
  let value = question[key];
3903
- question[key] = typeof value === 'function' ? yield value(answer, _objectSpread({}, answers), lastPrompt) : value;
4487
+ question[key] = typeof value === 'function' ? yield value(answer, _objectSpread$1({}, answers), lastPrompt) : value;
3904
4488
  }
3905
4489
 
3906
4490
  lastPrompt = question;
@@ -3946,7 +4530,7 @@ function _prompt() {
3946
4530
 
3947
4531
  return answers;
3948
4532
  });
3949
- return _prompt.apply(this, arguments);
4533
+ return _prompt$1.apply(this, arguments);
3950
4534
  }
3951
4535
 
3952
4536
  function getInjectedAnswer$1(injected, deafultValue) {
@@ -6603,172 +7187,374 @@ var prompts =
6603
7187
  ? dist
6604
7188
  : lib;
6605
7189
 
6606
- async function prompt(prompt) {
6607
- const result = await prompts({
6608
- name: 'value',
6609
- ...prompt
6610
- }, {
6611
- onCancel() {
6612
- throw new AbortError();
6613
- }
7190
+ 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; }
6614
7191
 
6615
- });
6616
- return result.value;
7192
+ 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; }
7193
+ function prompt(_x) {
7194
+ return _prompt.apply(this, arguments);
6617
7195
  }
6618
- async function getCreateAsMonorepo(argv) {
6619
- let createAsMonorepo;
6620
7196
 
6621
- if (argv['--monorepo' ]) {
6622
- createAsMonorepo = true;
6623
- } else if (argv['--no-monorepo']) {
6624
- createAsMonorepo = false;
6625
- } else {
6626
- createAsMonorepo = await prompt({
6627
- type: 'confirm',
6628
- message: 'Do you want to create this app as a monorepo, with room for more projects?',
6629
- initial: true
6630
- });
6631
- }
7197
+ function _prompt() {
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
+ }
6632
7226
 
6633
- return createAsMonorepo;
7227
+ function getCreateAsMonorepo(_x2) {
7228
+ return _getCreateAsMonorepo.apply(this, arguments);
6634
7229
  }
6635
- async function getShouldInstall(argv) {
6636
- let shouldInstall;
6637
7230
 
6638
- if (argv['--install'] || argv['--yes']) {
6639
- shouldInstall = true;
6640
- } else if (argv['--no-install']) {
6641
- shouldInstall = false;
6642
- } else {
6643
- shouldInstall = await prompt({
6644
- type: 'confirm',
6645
- message: 'Do you want to install dependencies for this app after creating it?',
6646
- initial: true
6647
- });
6648
- }
7231
+ function _getCreateAsMonorepo() {
7232
+ _getCreateAsMonorepo = _asyncToGenerator$5( /*#__PURE__*/regenerator.mark(function _callee2(argv) {
7233
+ var createAsMonorepo;
7234
+ return regenerator.wrap(function _callee2$(_context2) {
7235
+ while (1) {
7236
+ switch (_context2.prev = _context2.next) {
7237
+ case 0:
7238
+ if (!argv['--monorepo' ]) {
7239
+ _context2.next = 4;
7240
+ break;
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
+ }
6649
7252
 
6650
- return shouldInstall;
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);
6651
7279
  }
6652
- const VALID_PACKAGE_MANAGERS = new Set(['pnpm', 'npm', 'yarn']);
6653
- async function getPackageManager(argv) {
6654
- let packageManager;
6655
7280
 
6656
- if (argv['--package-manager']) {
6657
- const explicitPackageManager = argv['--package-manager'].toLocaleLowerCase();
6658
- packageManager = VALID_PACKAGE_MANAGERS.has(explicitPackageManager) ? explicitPackageManager : 'npm';
6659
- } else {
6660
- const npmUserAgent = process.env['npm_config_user_agent'] ?? 'npm';
7281
+ function getShouldInstall(_x3) {
7282
+ return _getShouldInstall.apply(this, arguments);
7283
+ }
6661
7284
 
6662
- if (npmUserAgent.includes('pnpm') || fs__namespace.existsSync('pnpm-lock.yaml')) {
6663
- packageManager = 'pnpm';
6664
- } else if (npmUserAgent.includes('yarn') || fs__namespace.existsSync('yarn.lock')) {
6665
- packageManager = 'yarn';
6666
- } else {
6667
- packageManager = 'npm';
6668
- }
6669
- }
7285
+ function _getShouldInstall() {
7286
+ _getShouldInstall = _asyncToGenerator$5( /*#__PURE__*/regenerator.mark(function _callee3(argv) {
7287
+ var shouldInstall;
7288
+ return regenerator.wrap(function _callee3$(_context3) {
7289
+ while (1) {
7290
+ switch (_context3.prev = _context3.next) {
7291
+ case 0:
7292
+ if (!(argv['--install'] || argv['--yes'])) {
7293
+ _context3.next = 4;
7294
+ break;
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
+ }
6670
7306
 
6671
- return packageManager;
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);
6672
7333
  }
6673
- const VALID_EXTRAS = new Set(['github', 'vscode']);
6674
- async function getExtrasToSetup(argv, {
6675
- inWorkspace
6676
- }) {
6677
- if (inWorkspace || argv['--no-extras']) return new Set();
6678
-
6679
- if (argv['--extras']) {
6680
- return new Set(argv['--extras'].filter(extra => VALID_EXTRAS.has(extra)));
6681
- }
6682
-
6683
- const setupExtras = await prompt({
6684
- type: 'multiselect',
6685
- message: 'Which additional tools would you like to configure?',
6686
- instructions: dim_1(`\n Use ${bold_1('space')} to select, ${bold_1('a')} to select all, ${bold_1('return')} to submit`),
6687
- choices: [{
6688
- title: 'VSCode',
6689
- value: 'vscode'
6690
- }, {
6691
- title: 'GitHub',
6692
- value: 'github'
6693
- }]
6694
- });
6695
- const extrasToSetup = new Set(setupExtras);
6696
- return extrasToSetup;
7334
+
7335
+ var VALID_PACKAGE_MANAGERS = new Set(['pnpm', 'npm', 'yarn']);
7336
+ function getPackageManager(_x4) {
7337
+ return _getPackageManager.apply(this, arguments);
7338
+ }
7339
+
7340
+ function _getPackageManager() {
7341
+ _getPackageManager = _asyncToGenerator$5( /*#__PURE__*/regenerator.mark(function _callee4(argv) {
7342
+ var packageManager, explicitPackageManager, _process$env$npm_conf, npmUserAgent;
7343
+
7344
+ return regenerator.wrap(function _callee4$(_context4) {
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
+ }
7362
+
7363
+ return _context4.abrupt("return", packageManager);
7364
+
7365
+ case 2:
7366
+ case "end":
7367
+ return _context4.stop();
7368
+ }
7369
+ }
7370
+ }, _callee4);
7371
+ }));
7372
+ return _getPackageManager.apply(this, arguments);
6697
7373
  }
6698
7374
 
6699
- /* eslint no-console: off */
6700
- const VALID_PROJECT_KINDS = new Set(['app', 'package']);
6701
- run().catch(error => {
7375
+ var VALID_EXTRAS = new Set(['github', 'vscode']);
7376
+ function getExtrasToSetup(_x5, _x6) {
7377
+ return _getExtrasToSetup.apply(this, arguments);
7378
+ }
7379
+
7380
+ function _getExtrasToSetup() {
7381
+ _getExtrasToSetup = _asyncToGenerator$5( /*#__PURE__*/regenerator.mark(function _callee5(argv, _ref) {
7382
+ var inWorkspace, setupExtras, extrasToSetup;
7383
+ return regenerator.wrap(function _callee5$(_context5) {
7384
+ while (1) {
7385
+ switch (_context5.prev = _context5.next) {
7386
+ case 0:
7387
+ inWorkspace = _ref.inWorkspace;
7388
+
7389
+ if (!(inWorkspace || argv['--no-extras'])) {
7390
+ _context5.next = 3;
7391
+ break;
7392
+ }
7393
+
7394
+ return _context5.abrupt("return", new Set());
7395
+
7396
+ case 3:
7397
+ if (!argv['--extras']) {
7398
+ _context5.next = 5;
7399
+ break;
7400
+ }
7401
+
7402
+ return _context5.abrupt("return", new Set(argv['--extras'].filter(function (extra) {
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);
7434
+ }
7435
+
7436
+ var _templateObject;
7437
+ var VALID_PROJECT_KINDS = new Set(['app', 'package']);
7438
+ run()["catch"](function (error) {
6702
7439
  if (AbortError.test(error)) return;
6703
7440
  console.error(error);
6704
7441
  process.exitCode = 1;
6705
7442
  });
6706
7443
 
6707
- async function run() {
6708
- const permissiveArgs = arg_1({
6709
- '--help': Boolean,
6710
- '-h': '--help',
6711
- '--package-manager': String
6712
- }, {
6713
- permissive: true
6714
- });
6715
- const firstArgument = permissiveArgs._[0]?.toLowerCase();
7444
+ function run() {
7445
+ return _run.apply(this, arguments);
7446
+ }
6716
7447
 
6717
- if (firstArgument != null && !firstArgument.startsWith('-') && !VALID_PROJECT_KINDS.has(firstArgument)) {
6718
- // TODO: show help with error message
6719
- process.exitCode = 1;
6720
- return;
6721
- }
7448
+ function _run() {
7449
+ _run = _asyncToGenerator$5( /*#__PURE__*/regenerator.mark(function _callee() {
7450
+ var _permissiveArgs$_$;
7451
+
7452
+ var permissiveArgs, firstArgument, kind, header, _permissiveArgs$Pac, _yield$import, createApp, _yield$import2, createProject;
7453
+
7454
+ return regenerator.wrap(function _callee$(_context) {
7455
+ while (1) {
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
+ }
6722
7471
 
6723
- let kind = firstArgument == null || !VALID_PROJECT_KINDS.has(firstArgument) ? undefined : firstArgument;
6724
- const header = stripIndent`
6725
- 🧵 ${bold_1('quilt create')}
6726
- `;
6727
- console.log(header);
6728
- console.log();
7472
+ // TODO: show help with error message
7473
+ process.exitCode = 1;
7474
+ return _context.abrupt("return");
6729
7475
 
6730
- if (permissiveArgs['--help'] && !kind) {
6731
- printHelp({
6732
- packageManager: permissiveArgs['--package-manager']?.toLowerCase()
6733
- });
6734
- return;
6735
- }
7476
+ case 5:
7477
+ kind = firstArgument == null || !VALID_PROJECT_KINDS.has(firstArgument) ? undefined : firstArgument;
7478
+ header = stripIndent(_templateObject || (_templateObject = _taggedTemplateLiteral$1(["\n \uD83E\uDDF5 ", "\n "])), bold_1('quilt create'));
7479
+ console.log(header);
7480
+ console.log();
6736
7481
 
6737
- if (kind == null) {
6738
- kind = await prompt({
6739
- type: 'select',
6740
- message: 'What kind of project would you like to create?',
6741
- choices: [{
6742
- title: 'App',
6743
- value: 'app'
6744
- }, {
6745
- title: 'Package',
6746
- value: 'package'
6747
- }]
6748
- });
6749
- }
7482
+ if (!(permissiveArgs['--help'] && !kind)) {
7483
+ _context.next = 12;
7484
+ break;
7485
+ }
6750
7486
 
6751
- switch (kind) {
6752
- case 'app':
6753
- {
6754
- const {
6755
- createApp
6756
- } = await Promise.resolve().then(function () { return require('./app.cjs'); });
6757
- await createApp();
6758
- break;
6759
- }
7487
+ printHelp({
7488
+ packageManager: (_permissiveArgs$Pac = permissiveArgs['--package-manager']) === null || _permissiveArgs$Pac === void 0 ? void 0 : _permissiveArgs$Pac.toLowerCase()
7489
+ });
7490
+ return _context.abrupt("return");
6760
7491
 
6761
- case 'package':
6762
- {
6763
- const {
6764
- createPackage
6765
- } = await Promise.resolve().then(function () { return require('./package.cjs'); });
6766
- await createPackage();
6767
- break;
7492
+ case 12:
7493
+ if (!(kind == null)) {
7494
+ _context.next = 16;
7495
+ break;
7496
+ }
7497
+
7498
+ _context.next = 15;
7499
+ return prompt({
7500
+ type: 'select',
7501
+ message: 'What kind of project would you like to create?',
7502
+ choices: [{
7503
+ title: 'App',
7504
+ value: 'app'
7505
+ }, {
7506
+ title: 'Package',
7507
+ value: 'package'
7508
+ }]
7509
+ });
7510
+
7511
+ case 15:
7512
+ kind = _context.sent;
7513
+
7514
+ case 16:
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
+ }
6768
7549
  }
6769
- }
7550
+ }, _callee);
7551
+ }));
7552
+ return _run.apply(this, arguments);
6770
7553
  }
6771
7554
 
7555
+ exports._asyncToGenerator = _asyncToGenerator$5;
7556
+ exports._defineProperty = _defineProperty$1;
7557
+ exports._taggedTemplateLiteral = _taggedTemplateLiteral$1;
6772
7558
  exports.arg_1 = arg_1;
6773
7559
  exports.bold_1 = bold_1;
6774
7560
  exports.cyan_1 = cyan_1;
@@ -6780,5 +7566,6 @@ exports.getShouldInstall = getShouldInstall;
6780
7566
  exports.magenta_1 = magenta_1;
6781
7567
  exports.printHelp = printHelp;
6782
7568
  exports.prompt = prompt;
7569
+ exports.regenerator = regenerator;
6783
7570
  exports.stripIndent = stripIndent;
6784
7571
  exports.underline_1 = underline_1;