create-cloudflare 2.13.0 → 2.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -3814,7 +3814,7 @@ var init_args = __esm({
3814
3814
  var version, devDependencies;
3815
3815
  var init_package = __esm({
3816
3816
  "package.json"() {
3817
- version = "2.13.0";
3817
+ version = "2.13.1";
3818
3818
  devDependencies = {
3819
3819
  "@babel/parser": "^7.21.3",
3820
3820
  "@babel/types": "^7.21.4",
@@ -10597,7 +10597,7 @@ var require_symbols2 = __commonJS({
10597
10597
  var require_webidl = __commonJS({
10598
10598
  "../../node_modules/.pnpm/undici@5.28.3/node_modules/undici/lib/fetch/webidl.js"(exports2, module2) {
10599
10599
  "use strict";
10600
- var { types: types5 } = require("util");
10600
+ var { types: types6 } = require("util");
10601
10601
  var { hasOwn, toUSVString } = require_util2();
10602
10602
  var webidl = {};
10603
10603
  webidl.converters = {};
@@ -10762,7 +10762,7 @@ var require_webidl = __commonJS({
10762
10762
  });
10763
10763
  }
10764
10764
  const result = {};
10765
- if (!types5.isProxy(O2)) {
10765
+ if (!types6.isProxy(O2)) {
10766
10766
  const keys2 = Object.keys(O2);
10767
10767
  for (const key of keys2) {
10768
10768
  const typedKey = keyConverter(key);
@@ -10888,14 +10888,14 @@ var require_webidl = __commonJS({
10888
10888
  return x2;
10889
10889
  };
10890
10890
  webidl.converters.ArrayBuffer = function(V2, opts = {}) {
10891
- if (webidl.util.Type(V2) !== "Object" || !types5.isAnyArrayBuffer(V2)) {
10891
+ if (webidl.util.Type(V2) !== "Object" || !types6.isAnyArrayBuffer(V2)) {
10892
10892
  throw webidl.errors.conversionFailed({
10893
10893
  prefix: `${V2}`,
10894
10894
  argument: `${V2}`,
10895
10895
  types: ["ArrayBuffer"]
10896
10896
  });
10897
10897
  }
10898
- if (opts.allowShared === false && types5.isSharedArrayBuffer(V2)) {
10898
+ if (opts.allowShared === false && types6.isSharedArrayBuffer(V2)) {
10899
10899
  throw webidl.errors.exception({
10900
10900
  header: "ArrayBuffer",
10901
10901
  message: "SharedArrayBuffer is not allowed."
@@ -10904,14 +10904,14 @@ var require_webidl = __commonJS({
10904
10904
  return V2;
10905
10905
  };
10906
10906
  webidl.converters.TypedArray = function(V2, T2, opts = {}) {
10907
- if (webidl.util.Type(V2) !== "Object" || !types5.isTypedArray(V2) || V2.constructor.name !== T2.name) {
10907
+ if (webidl.util.Type(V2) !== "Object" || !types6.isTypedArray(V2) || V2.constructor.name !== T2.name) {
10908
10908
  throw webidl.errors.conversionFailed({
10909
10909
  prefix: `${T2.name}`,
10910
10910
  argument: `${V2}`,
10911
10911
  types: [T2.name]
10912
10912
  });
10913
10913
  }
10914
- if (opts.allowShared === false && types5.isSharedArrayBuffer(V2.buffer)) {
10914
+ if (opts.allowShared === false && types6.isSharedArrayBuffer(V2.buffer)) {
10915
10915
  throw webidl.errors.exception({
10916
10916
  header: "ArrayBuffer",
10917
10917
  message: "SharedArrayBuffer is not allowed."
@@ -10920,13 +10920,13 @@ var require_webidl = __commonJS({
10920
10920
  return V2;
10921
10921
  };
10922
10922
  webidl.converters.DataView = function(V2, opts = {}) {
10923
- if (webidl.util.Type(V2) !== "Object" || !types5.isDataView(V2)) {
10923
+ if (webidl.util.Type(V2) !== "Object" || !types6.isDataView(V2)) {
10924
10924
  throw webidl.errors.exception({
10925
10925
  header: "DataView",
10926
10926
  message: "Object is not a DataView."
10927
10927
  });
10928
10928
  }
10929
- if (opts.allowShared === false && types5.isSharedArrayBuffer(V2.buffer)) {
10929
+ if (opts.allowShared === false && types6.isSharedArrayBuffer(V2.buffer)) {
10930
10930
  throw webidl.errors.exception({
10931
10931
  header: "ArrayBuffer",
10932
10932
  message: "SharedArrayBuffer is not allowed."
@@ -10935,13 +10935,13 @@ var require_webidl = __commonJS({
10935
10935
  return V2;
10936
10936
  };
10937
10937
  webidl.converters.BufferSource = function(V2, opts = {}) {
10938
- if (types5.isAnyArrayBuffer(V2)) {
10938
+ if (types6.isAnyArrayBuffer(V2)) {
10939
10939
  return webidl.converters.ArrayBuffer(V2, opts);
10940
10940
  }
10941
- if (types5.isTypedArray(V2)) {
10941
+ if (types6.isTypedArray(V2)) {
10942
10942
  return webidl.converters.TypedArray(V2, V2.constructor);
10943
10943
  }
10944
- if (types5.isDataView(V2)) {
10944
+ if (types6.isDataView(V2)) {
10945
10945
  return webidl.converters.DataView(V2, opts);
10946
10946
  }
10947
10947
  throw new TypeError(`Could not convert ${V2} to a BufferSource.`);
@@ -11256,7 +11256,7 @@ var require_file = __commonJS({
11256
11256
  "../../node_modules/.pnpm/undici@5.28.3/node_modules/undici/lib/fetch/file.js"(exports2, module2) {
11257
11257
  "use strict";
11258
11258
  var { Blob: Blob2, File: NativeFile } = require("buffer");
11259
- var { types: types5 } = require("util");
11259
+ var { types: types6 } = require("util");
11260
11260
  var { kState } = require_symbols2();
11261
11261
  var { isBlobLike } = require_util2();
11262
11262
  var { webidl } = require_webidl();
@@ -11365,7 +11365,7 @@ var require_file = __commonJS({
11365
11365
  if (isBlobLike(V2)) {
11366
11366
  return webidl.converters.Blob(V2, { strict: false });
11367
11367
  }
11368
- if (ArrayBuffer.isView(V2) || types5.isAnyArrayBuffer(V2)) {
11368
+ if (ArrayBuffer.isView(V2) || types6.isAnyArrayBuffer(V2)) {
11369
11369
  return webidl.converters.BufferSource(V2, opts);
11370
11370
  }
11371
11371
  }
@@ -11409,7 +11409,7 @@ var require_file = __commonJS({
11409
11409
  s = convertLineEndingsNative(s);
11410
11410
  }
11411
11411
  bytes.push(encoder.encode(s));
11412
- } else if (types5.isAnyArrayBuffer(element) || types5.isTypedArray(element)) {
11412
+ } else if (types6.isAnyArrayBuffer(element) || types6.isTypedArray(element)) {
11413
11413
  if (!element.buffer) {
11414
11414
  bytes.push(new Uint8Array(element));
11415
11415
  } else {
@@ -18298,7 +18298,7 @@ var require_response = __commonJS({
18298
18298
  var { URLSerializer } = require_dataURL();
18299
18299
  var { kHeadersList, kConstruct } = require_symbols();
18300
18300
  var assert = require("assert");
18301
- var { types: types5 } = require("util");
18301
+ var { types: types6 } = require("util");
18302
18302
  var ReadableStream = globalThis.ReadableStream || require("stream/web").ReadableStream;
18303
18303
  var textEncoder = new TextEncoder("utf-8");
18304
18304
  var Response = class {
@@ -18601,7 +18601,7 @@ var require_response = __commonJS({
18601
18601
  if (isBlobLike(V2)) {
18602
18602
  return webidl.converters.Blob(V2, { strict: false });
18603
18603
  }
18604
- if (types5.isArrayBuffer(V2) || types5.isTypedArray(V2) || types5.isDataView(V2)) {
18604
+ if (types6.isArrayBuffer(V2) || types6.isTypedArray(V2) || types6.isDataView(V2)) {
18605
18605
  return webidl.converters.BufferSource(V2);
18606
18606
  }
18607
18607
  if (util.isFormDataLike(V2)) {
@@ -20707,7 +20707,7 @@ var require_util4 = __commonJS({
20707
20707
  var { getEncoding } = require_encoding();
20708
20708
  var { DOMException: DOMException2 } = require_constants2();
20709
20709
  var { serializeAMimeType, parseMIMEType } = require_dataURL();
20710
- var { types: types5 } = require("util");
20710
+ var { types: types6 } = require("util");
20711
20711
  var { StringDecoder } = require("string_decoder");
20712
20712
  var { btoa: btoa2 } = require("buffer");
20713
20713
  var staticPropertyDescriptors = {
@@ -20737,7 +20737,7 @@ var require_util4 = __commonJS({
20737
20737
  });
20738
20738
  }
20739
20739
  isFirstChunk = false;
20740
- if (!done && types5.isUint8Array(value)) {
20740
+ if (!done && types6.isUint8Array(value)) {
20741
20741
  bytes.push(value);
20742
20742
  if ((fr[kLastProgressEventFired] === void 0 || Date.now() - fr[kLastProgressEventFired] >= 50) && !fr[kAborted]) {
20743
20743
  fr[kLastProgressEventFired] = Date.now();
@@ -23119,7 +23119,7 @@ var require_websocket = __commonJS({
23119
23119
  var { ByteParser } = require_receiver();
23120
23120
  var { kEnumerableProperty, isBlobLike } = require_util();
23121
23121
  var { getGlobalDispatcher } = require_global2();
23122
- var { types: types5 } = require("util");
23122
+ var { types: types6 } = require("util");
23123
23123
  var experimentalWarned = false;
23124
23124
  var WebSocket = class extends EventTarget {
23125
23125
  #events = {
@@ -23266,7 +23266,7 @@ var require_websocket = __commonJS({
23266
23266
  socket.write(buffer, () => {
23267
23267
  this.#bufferedAmount -= value.byteLength;
23268
23268
  });
23269
- } else if (types5.isArrayBuffer(data)) {
23269
+ } else if (types6.isArrayBuffer(data)) {
23270
23270
  const value = Buffer.from(data);
23271
23271
  const frame = new WebsocketFrameSend(value);
23272
23272
  const buffer = frame.createFrame(opcodes.BINARY);
@@ -23488,7 +23488,7 @@ var require_websocket = __commonJS({
23488
23488
  if (isBlobLike(V2)) {
23489
23489
  return webidl.converters.Blob(V2, { strict: false });
23490
23490
  }
23491
- if (ArrayBuffer.isView(V2) || types5.isAnyArrayBuffer(V2)) {
23491
+ if (ArrayBuffer.isView(V2) || types6.isAnyArrayBuffer(V2)) {
23492
23492
  return webidl.converters.BufferSource(V2);
23493
23493
  }
23494
23494
  }
@@ -24217,13 +24217,13 @@ var init_package2 = __esm({
24217
24217
  ],
24218
24218
  dependencies: {
24219
24219
  "create-astro": "4.7.3",
24220
- "@angular/create": "17.2.1",
24220
+ "@angular/create": "17.2.2",
24221
24221
  "create-docusaurus": "3.1.1",
24222
- "create-hono": "0.4.0",
24222
+ "create-hono": "0.5.0",
24223
24223
  "create-next-app": "14.1.0",
24224
24224
  "create-qwik": "1.4.5",
24225
24225
  "create-react-app": "5.0.1",
24226
- "create-remix": "2.7.2",
24226
+ "create-remix": "2.8.0",
24227
24227
  "create-solid": "0.4.10",
24228
24228
  "create-svelte": "6.0.9",
24229
24229
  "create-vue": "3.9.2",
@@ -25811,7 +25811,7 @@ var init_poll = __esm({
25811
25811
  var version2;
25812
25812
  var init_package3 = __esm({
25813
25813
  "../wrangler/package.json"() {
25814
- version2 = "3.30.0";
25814
+ version2 = "3.31.0";
25815
25815
  }
25816
25816
  });
25817
25817
 
@@ -27872,7 +27872,7 @@ var require_toml = __commonJS({
27872
27872
  });
27873
27873
 
27874
27874
  // src/helpers/files.ts
27875
- var import_fs5, import_path5, import_toml, copyFile, writeFile2, readFile, readJSON, writeJSON, probePaths, usesTypescript, eslintRcExts, usesEslint, compatDateFlag;
27875
+ var import_fs5, import_path5, import_toml, copyFile, writeFile2, appendFile, readFile, directoryExists, readJSON, writeJSON, probePaths, usesTypescript, eslintRcExts, usesEslint, compatDateFlag;
27876
27876
  var init_files = __esm({
27877
27877
  "src/helpers/files.ts"() {
27878
27878
  import_fs5 = __toESM(require("fs"));
@@ -27894,6 +27894,13 @@ var init_files = __esm({
27894
27894
  crash(error2);
27895
27895
  }
27896
27896
  };
27897
+ appendFile = (path3, content) => {
27898
+ try {
27899
+ import_fs5.default.appendFileSync(path3, content);
27900
+ } catch (error2) {
27901
+ crash(error2);
27902
+ }
27903
+ };
27897
27904
  readFile = (path3) => {
27898
27905
  try {
27899
27906
  return import_fs5.default.readFileSync(path3, "utf-8");
@@ -27901,6 +27908,17 @@ var init_files = __esm({
27901
27908
  return crash(error2);
27902
27909
  }
27903
27910
  };
27911
+ directoryExists = (path3) => {
27912
+ try {
27913
+ const stat = (0, import_fs5.statSync)(path3);
27914
+ return stat.isDirectory();
27915
+ } catch (error2) {
27916
+ if (error2.code === "ENOENT") {
27917
+ return false;
27918
+ }
27919
+ return crash(error2);
27920
+ }
27921
+ };
27904
27922
  readJSON = (path3) => {
27905
27923
  const contents = readFile(path3);
27906
27924
  return contents ? JSON.parse(contents) : contents;
@@ -32656,7 +32674,7 @@ var require_index_688c5d50 = __commonJS({
32656
32674
  }
32657
32675
  }
32658
32676
  };
32659
- var types5 = createCommonjsModule(function(module3, exports3) {
32677
+ var types6 = createCommonjsModule(function(module3, exports3) {
32660
32678
  exports3.name = /* @__PURE__ */ new Map([
32661
32679
  ["0", "File"],
32662
32680
  // same as File
@@ -32910,14 +32928,14 @@ var require_index_688c5d50 = __commonJS({
32910
32928
  }
32911
32929
  }
32912
32930
  get type() {
32913
- return types5.name.get(this[TYPE]) || this[TYPE];
32931
+ return types6.name.get(this[TYPE]) || this[TYPE];
32914
32932
  }
32915
32933
  get typeKey() {
32916
32934
  return this[TYPE];
32917
32935
  }
32918
32936
  set type(type) {
32919
- if (types5.code.has(type))
32920
- this[TYPE] = types5.code.get(type);
32937
+ if (types6.code.has(type))
32938
+ this[TYPE] = types6.code.get(type);
32921
32939
  else
32922
32940
  this[TYPE] = type;
32923
32941
  }
@@ -36029,7 +36047,7 @@ var require_index_688c5d50 = __commonJS({
36029
36047
  exports3.WriteEntry = writeEntry;
36030
36048
  exports3.Header = header;
36031
36049
  exports3.Pax = pax;
36032
- exports3.types = types5;
36050
+ exports3.types = types6;
36033
36051
  });
36034
36052
  var colorName = {
36035
36053
  "aliceblue": [240, 248, 255],
@@ -37987,8 +38005,8 @@ var require_index_688c5d50 = __commonJS({
37987
38005
  }
37988
38006
  var fs$appendFile = fs3.appendFile;
37989
38007
  if (fs$appendFile)
37990
- fs3.appendFile = appendFile;
37991
- function appendFile(path4, data, options, cb) {
38008
+ fs3.appendFile = appendFile2;
38009
+ function appendFile2(path4, data, options, cb) {
37992
38010
  if (typeof options === "function")
37993
38011
  cb = options, options = null;
37994
38012
  return go$appendFile(path4, data, options, cb);
@@ -42985,9 +43003,9 @@ var require_types = __commonJS({
42985
43003
  /** @class */
42986
43004
  function(_super) {
42987
43005
  (0, tslib_1.__extends)(OrType2, _super);
42988
- function OrType2(types5) {
43006
+ function OrType2(types6) {
42989
43007
  var _this = _super.call(this) || this;
42990
- _this.types = types5;
43008
+ _this.types = types6;
42991
43009
  _this.kind = "OrType";
42992
43010
  return _this;
42993
43011
  }
@@ -43132,11 +43150,11 @@ var require_types = __commonJS({
43132
43150
  function typesPlugin(_fork) {
43133
43151
  var Type = {
43134
43152
  or: function() {
43135
- var types5 = [];
43153
+ var types6 = [];
43136
43154
  for (var _i = 0; _i < arguments.length; _i++) {
43137
- types5[_i] = arguments[_i];
43155
+ types6[_i] = arguments[_i];
43138
43156
  }
43139
- return new OrType(types5.map(function(type) {
43157
+ return new OrType(types6.map(function(type) {
43140
43158
  return Type.from(type);
43141
43159
  }));
43142
43160
  },
@@ -43585,9 +43603,9 @@ var require_path = __commonJS({
43585
43603
  var Op = Object.prototype;
43586
43604
  var hasOwn = Op.hasOwnProperty;
43587
43605
  function pathPlugin(fork) {
43588
- var types5 = fork.use(types_1.default);
43589
- var isArray = types5.builtInTypes.array;
43590
- var isNumber = types5.builtInTypes.number;
43606
+ var types6 = fork.use(types_1.default);
43607
+ var isArray = types6.builtInTypes.array;
43608
+ var isNumber = types6.builtInTypes.number;
43591
43609
  var Path = function Path2(value, parentPath, name2) {
43592
43610
  if (!(this instanceof Path2)) {
43593
43611
  throw new Error("Path constructor cannot be invoked without 'new'");
@@ -43887,13 +43905,13 @@ var require_scope = __commonJS({
43887
43905
  var types_1 = (0, tslib_1.__importDefault)(require_types());
43888
43906
  var hasOwn = Object.prototype.hasOwnProperty;
43889
43907
  function scopePlugin(fork) {
43890
- var types5 = fork.use(types_1.default);
43891
- var Type = types5.Type;
43892
- var namedTypes = types5.namedTypes;
43908
+ var types6 = fork.use(types_1.default);
43909
+ var Type = types6.Type;
43910
+ var namedTypes = types6.namedTypes;
43893
43911
  var Node = namedTypes.Node;
43894
43912
  var Expression = namedTypes.Expression;
43895
- var isArray = types5.builtInTypes.array;
43896
- var b2 = types5.builders;
43913
+ var isArray = types6.builtInTypes.array;
43914
+ var b2 = types6.builders;
43897
43915
  var Scope = function Scope2(path3, parentScope) {
43898
43916
  if (!(this instanceof Scope2)) {
43899
43917
  throw new Error("Scope constructor cannot be invoked without 'new'");
@@ -43961,7 +43979,7 @@ var require_scope = __commonJS({
43961
43979
  ++index;
43962
43980
  }
43963
43981
  var name2 = prefix + index;
43964
- return this.bindings[name2] = types5.builders.identifier(name2);
43982
+ return this.bindings[name2] = types6.builders.identifier(name2);
43965
43983
  };
43966
43984
  Sp.injectTemporary = function(identifier, init) {
43967
43985
  identifier || (identifier = this.declareTemporary());
@@ -44041,7 +44059,7 @@ var require_scope = __commonJS({
44041
44059
  bindings
44042
44060
  );
44043
44061
  } else if (Node.check(node) && !Expression.check(node)) {
44044
- types5.eachField(node, function(name2, child) {
44062
+ types6.eachField(node, function(name2, child) {
44045
44063
  var childPath = path3.get(name2);
44046
44064
  if (!pathHasValue(childPath, child)) {
44047
44065
  throw new Error("");
@@ -44120,24 +44138,24 @@ var require_scope = __commonJS({
44120
44138
  addPattern(patternPath.get("argument"), bindings);
44121
44139
  }
44122
44140
  }
44123
- function addTypePattern(patternPath, types6) {
44141
+ function addTypePattern(patternPath, types7) {
44124
44142
  var pattern = patternPath.value;
44125
44143
  namedTypes.Pattern.assert(pattern);
44126
44144
  if (namedTypes.Identifier.check(pattern)) {
44127
- if (hasOwn.call(types6, pattern.name)) {
44128
- types6[pattern.name].push(patternPath);
44145
+ if (hasOwn.call(types7, pattern.name)) {
44146
+ types7[pattern.name].push(patternPath);
44129
44147
  } else {
44130
- types6[pattern.name] = [patternPath];
44148
+ types7[pattern.name] = [patternPath];
44131
44149
  }
44132
44150
  }
44133
44151
  }
44134
- function addTypeParameter(parameterPath, types6) {
44152
+ function addTypeParameter(parameterPath, types7) {
44135
44153
  var parameter = parameterPath.value;
44136
44154
  FlowOrTSTypeParameterType.assert(parameter);
44137
- if (hasOwn.call(types6, parameter.name)) {
44138
- types6[parameter.name].push(parameterPath);
44155
+ if (hasOwn.call(types7, parameter.name)) {
44156
+ types7[parameter.name].push(parameterPath);
44139
44157
  } else {
44140
- types6[parameter.name] = [parameterPath];
44158
+ types7[parameter.name] = [parameterPath];
44141
44159
  }
44142
44160
  }
44143
44161
  Sp.lookup = function(name2) {
@@ -44175,11 +44193,11 @@ var require_node_path = __commonJS({
44175
44193
  var path_1 = (0, tslib_1.__importDefault)(require_path());
44176
44194
  var scope_1 = (0, tslib_1.__importDefault)(require_scope());
44177
44195
  function nodePathPlugin(fork) {
44178
- var types5 = fork.use(types_1.default);
44179
- var n2 = types5.namedTypes;
44180
- var b2 = types5.builders;
44181
- var isNumber = types5.builtInTypes.number;
44182
- var isArray = types5.builtInTypes.array;
44196
+ var types6 = fork.use(types_1.default);
44197
+ var n2 = types6.namedTypes;
44198
+ var b2 = types6.builders;
44199
+ var isNumber = types6.builtInTypes.number;
44200
+ var isArray = types6.builtInTypes.array;
44183
44201
  var Path = fork.use(path_1.default);
44184
44202
  var Scope = fork.use(scope_1.default);
44185
44203
  var NodePath = function NodePath2(value, parentPath, name2) {
@@ -44270,7 +44288,7 @@ var require_node_path = __commonJS({
44270
44288
  return scope || null;
44271
44289
  };
44272
44290
  NPp.getValueProperty = function(name2) {
44273
- return types5.getFieldValue(this.value, name2);
44291
+ return types6.getFieldValue(this.value, name2);
44274
44292
  };
44275
44293
  NPp.needsParens = function(assumeExpressionContext) {
44276
44294
  var pp = this.parentPath;
@@ -44412,7 +44430,7 @@ var require_node_path = __commonJS({
44412
44430
  return node.some(containsCallExpression);
44413
44431
  }
44414
44432
  if (n2.Node.check(node)) {
44415
- return types5.someField(node, function(_name, child) {
44433
+ return types6.someField(node, function(_name, child) {
44416
44434
  return containsCallExpression(child);
44417
44435
  });
44418
44436
  }
@@ -44530,11 +44548,11 @@ var require_path_visitor = __commonJS({
44530
44548
  var node_path_1 = (0, tslib_1.__importDefault)(require_node_path());
44531
44549
  var hasOwn = Object.prototype.hasOwnProperty;
44532
44550
  function pathVisitorPlugin(fork) {
44533
- var types5 = fork.use(types_1.default);
44551
+ var types6 = fork.use(types_1.default);
44534
44552
  var NodePath = fork.use(node_path_1.default);
44535
- var isArray = types5.builtInTypes.array;
44536
- var isObject2 = types5.builtInTypes.object;
44537
- var isFunction2 = types5.builtInTypes.function;
44553
+ var isArray = types6.builtInTypes.array;
44554
+ var isObject2 = types6.builtInTypes.object;
44555
+ var isFunction2 = types6.builtInTypes.function;
44538
44556
  var undefined2;
44539
44557
  var PathVisitor = function PathVisitor2() {
44540
44558
  if (!(this instanceof PathVisitor2)) {
@@ -44554,7 +44572,7 @@ var require_path_visitor = __commonJS({
44554
44572
  typeNames[methodName.slice("visit".length)] = true;
44555
44573
  }
44556
44574
  }
44557
- var supertypeTable = types5.computeSupertypeLookupTable(typeNames);
44575
+ var supertypeTable = types6.computeSupertypeLookupTable(typeNames);
44558
44576
  var methodNameTable = /* @__PURE__ */ Object.create(null);
44559
44577
  var typeNameKeys = Object.keys(supertypeTable);
44560
44578
  var typeNameCount = typeNameKeys.length;
@@ -44673,7 +44691,7 @@ var require_path_visitor = __commonJS({
44673
44691
  path3.each(visitor.visitWithoutReset, visitor);
44674
44692
  } else if (!isObject2.check(value)) {
44675
44693
  } else {
44676
- var childNames = types5.getFieldNames(value);
44694
+ var childNames = types6.getFieldNames(value);
44677
44695
  if (visitor._shouldVisitComments && value.comments && childNames.indexOf("comments") < 0) {
44678
44696
  childNames.push("comments");
44679
44697
  }
@@ -44682,7 +44700,7 @@ var require_path_visitor = __commonJS({
44682
44700
  for (var i = 0; i < childCount; ++i) {
44683
44701
  var childName = childNames[i];
44684
44702
  if (!hasOwn.call(value, childName)) {
44685
- value[childName] = types5.getFieldValue(value, childName);
44703
+ value[childName] = types6.getFieldValue(value, childName);
44686
44704
  }
44687
44705
  childPaths.push(path3.get(childName));
44688
44706
  }
@@ -44822,13 +44840,13 @@ var require_equiv = __commonJS({
44822
44840
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
44823
44841
  var types_1 = (0, tslib_1.__importDefault)(require_types());
44824
44842
  function default_1(fork) {
44825
- var types5 = fork.use(types_1.default);
44826
- var getFieldNames = types5.getFieldNames;
44827
- var getFieldValue = types5.getFieldValue;
44828
- var isArray = types5.builtInTypes.array;
44829
- var isObject2 = types5.builtInTypes.object;
44830
- var isDate = types5.builtInTypes.Date;
44831
- var isRegExp = types5.builtInTypes.RegExp;
44843
+ var types6 = fork.use(types_1.default);
44844
+ var getFieldNames = types6.getFieldNames;
44845
+ var getFieldValue = types6.getFieldValue;
44846
+ var isArray = types6.builtInTypes.array;
44847
+ var isObject2 = types6.builtInTypes.object;
44848
+ var isDate = types6.builtInTypes.Date;
44849
+ var isRegExp = types6.builtInTypes.RegExp;
44832
44850
  var hasOwn = Object.prototype.hasOwnProperty;
44833
44851
  function astNodesAreEquivalent(a, b2, problemPath) {
44834
44852
  if (isArray.check(problemPath)) {
@@ -44978,24 +44996,24 @@ var require_fork = __commonJS({
44978
44996
  var node_path_1 = (0, tslib_1.__importDefault)(require_node_path());
44979
44997
  function default_1(plugins) {
44980
44998
  var fork = createFork();
44981
- var types5 = fork.use(types_1.default);
44999
+ var types6 = fork.use(types_1.default);
44982
45000
  plugins.forEach(fork.use);
44983
- types5.finalize();
45001
+ types6.finalize();
44984
45002
  var PathVisitor = fork.use(path_visitor_1.default);
44985
45003
  return {
44986
- Type: types5.Type,
44987
- builtInTypes: types5.builtInTypes,
44988
- namedTypes: types5.namedTypes,
44989
- builders: types5.builders,
44990
- defineMethod: types5.defineMethod,
44991
- getFieldNames: types5.getFieldNames,
44992
- getFieldValue: types5.getFieldValue,
44993
- eachField: types5.eachField,
44994
- someField: types5.someField,
44995
- getSupertypeNames: types5.getSupertypeNames,
44996
- getBuilderName: types5.getBuilderName,
45004
+ Type: types6.Type,
45005
+ builtInTypes: types6.builtInTypes,
45006
+ namedTypes: types6.namedTypes,
45007
+ builders: types6.builders,
45008
+ defineMethod: types6.defineMethod,
45009
+ getFieldNames: types6.getFieldNames,
45010
+ getFieldValue: types6.getFieldValue,
45011
+ eachField: types6.eachField,
45012
+ someField: types6.someField,
45013
+ getSupertypeNames: types6.getSupertypeNames,
45014
+ getBuilderName: types6.getBuilderName,
44997
45015
  astNodesAreEquivalent: fork.use(equiv_1.default),
44998
- finalize: types5.finalize,
45016
+ finalize: types6.finalize,
44999
45017
  Path: fork.use(path_1.default),
45000
45018
  NodePath: fork.use(node_path_1.default),
45001
45019
  PathVisitor,
@@ -45031,9 +45049,9 @@ var require_shared = __commonJS({
45031
45049
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
45032
45050
  var types_1 = (0, tslib_1.__importDefault)(require_types());
45033
45051
  function default_1(fork) {
45034
- var types5 = fork.use(types_1.default);
45035
- var Type = types5.Type;
45036
- var builtin = types5.builtInTypes;
45052
+ var types6 = fork.use(types_1.default);
45053
+ var Type = types6.Type;
45054
+ var builtin = types6.builtInTypes;
45037
45055
  var isNumber = builtin.number;
45038
45056
  function geq(than) {
45039
45057
  return Type.from(function(value) {
@@ -45212,8 +45230,8 @@ var require_core2 = __commonJS({
45212
45230
  var types_1 = (0, tslib_1.__importDefault)(require_types());
45213
45231
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
45214
45232
  function default_1(fork) {
45215
- var types5 = fork.use(types_1.default);
45216
- var Type = types5.Type;
45233
+ var types6 = fork.use(types_1.default);
45234
+ var Type = types6.Type;
45217
45235
  var def = Type.def;
45218
45236
  var or = Type.or;
45219
45237
  var shared = fork.use(shared_1.default);
@@ -45303,9 +45321,9 @@ var require_es6 = __commonJS({
45303
45321
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
45304
45322
  function default_1(fork) {
45305
45323
  fork.use(core_1.default);
45306
- var types5 = fork.use(types_1.default);
45307
- var def = types5.Type.def;
45308
- var or = types5.Type.or;
45324
+ var types6 = fork.use(types_1.default);
45325
+ var def = types6.Type.def;
45326
+ var or = types6.Type.or;
45309
45327
  var defaults = fork.use(shared_1.default).defaults;
45310
45328
  def("Function").field("generator", Boolean, defaults["false"]).field("expression", Boolean, defaults["false"]).field("defaults", [or(def("Expression"), null)], defaults.emptyArray).field("rest", or(def("Identifier"), null), defaults["null"]);
45311
45329
  def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
@@ -45391,8 +45409,8 @@ var require_es2017 = __commonJS({
45391
45409
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
45392
45410
  function default_1(fork) {
45393
45411
  fork.use(es2016_1.default);
45394
- var types5 = fork.use(types_1.default);
45395
- var def = types5.Type.def;
45412
+ var types6 = fork.use(types_1.default);
45413
+ var def = types6.Type.def;
45396
45414
  var defaults = fork.use(shared_1.default).defaults;
45397
45415
  def("Function").field("async", Boolean, defaults["false"]);
45398
45416
  def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
@@ -45413,9 +45431,9 @@ var require_es2018 = __commonJS({
45413
45431
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
45414
45432
  function default_1(fork) {
45415
45433
  fork.use(es2017_1.default);
45416
- var types5 = fork.use(types_1.default);
45417
- var def = types5.Type.def;
45418
- var or = types5.Type.or;
45434
+ var types6 = fork.use(types_1.default);
45435
+ var def = types6.Type.def;
45436
+ var or = types6.Type.or;
45419
45437
  var defaults = fork.use(shared_1.default).defaults;
45420
45438
  def("ForOfStatement").field("await", Boolean, defaults["false"]);
45421
45439
  def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
@@ -45445,9 +45463,9 @@ var require_es2019 = __commonJS({
45445
45463
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
45446
45464
  function default_1(fork) {
45447
45465
  fork.use(es2018_1.default);
45448
- var types5 = fork.use(types_1.default);
45449
- var def = types5.Type.def;
45450
- var or = types5.Type.or;
45466
+ var types6 = fork.use(types_1.default);
45467
+ var def = types6.Type.def;
45468
+ var or = types6.Type.or;
45451
45469
  var defaults = fork.use(shared_1.default).defaults;
45452
45470
  def("CatchClause").field("param", or(def("Pattern"), null), defaults["null"]);
45453
45471
  }
@@ -45469,9 +45487,9 @@ var require_es20202 = __commonJS({
45469
45487
  function default_1(fork) {
45470
45488
  fork.use(es2020_1.default);
45471
45489
  fork.use(es2019_1.default);
45472
- var types5 = fork.use(types_1.default);
45473
- var def = types5.Type.def;
45474
- var or = types5.Type.or;
45490
+ var types6 = fork.use(types_1.default);
45491
+ var def = types6.Type.def;
45492
+ var or = types6.Type.or;
45475
45493
  var shared = fork.use(shared_1.default);
45476
45494
  var defaults = shared.defaults;
45477
45495
  def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
@@ -45515,8 +45533,8 @@ var require_es2022 = __commonJS({
45515
45533
  var types_1 = (0, tslib_1.__importDefault)(require_types());
45516
45534
  function default_1(fork) {
45517
45535
  fork.use(es2021_1.default);
45518
- var types5 = fork.use(types_1.default);
45519
- var def = types5.Type.def;
45536
+ var types6 = fork.use(types_1.default);
45537
+ var def = types6.Type.def;
45520
45538
  def("StaticBlock").bases("Declaration").build("body").field("body", [def("Statement")]);
45521
45539
  }
45522
45540
  exports2.default = default_1;
@@ -45535,9 +45553,9 @@ var require_es_proposals = __commonJS({
45535
45553
  var es2022_1 = (0, tslib_1.__importDefault)(require_es2022());
45536
45554
  function default_1(fork) {
45537
45555
  fork.use(es2022_1.default);
45538
- var types5 = fork.use(types_1.default);
45539
- var Type = types5.Type;
45540
- var def = types5.Type.def;
45556
+ var types6 = fork.use(types_1.default);
45557
+ var Type = types6.Type;
45558
+ var def = types6.Type.def;
45541
45559
  var or = Type.or;
45542
45560
  var shared = fork.use(shared_1.default);
45543
45561
  var defaults = shared.defaults;
@@ -45575,9 +45593,9 @@ var require_jsx = __commonJS({
45575
45593
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
45576
45594
  function default_1(fork) {
45577
45595
  fork.use(es_proposals_1.default);
45578
- var types5 = fork.use(types_1.default);
45579
- var def = types5.Type.def;
45580
- var or = types5.Type.or;
45596
+ var types6 = fork.use(types_1.default);
45597
+ var def = types6.Type.def;
45598
+ var or = types6.Type.or;
45581
45599
  var defaults = fork.use(shared_1.default).defaults;
45582
45600
  def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
45583
45601
  def("Literal"),
@@ -45639,9 +45657,9 @@ var require_type_annotations = __commonJS({
45639
45657
  var types_1 = (0, tslib_1.__importDefault)(require_types());
45640
45658
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
45641
45659
  function default_1(fork) {
45642
- var types5 = fork.use(types_1.default);
45643
- var def = types5.Type.def;
45644
- var or = types5.Type.or;
45660
+ var types6 = fork.use(types_1.default);
45661
+ var def = types6.Type.def;
45662
+ var or = types6.Type.or;
45645
45663
  var defaults = fork.use(shared_1.default).defaults;
45646
45664
  var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
45647
45665
  var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
@@ -45674,9 +45692,9 @@ var require_flow = __commonJS({
45674
45692
  function default_1(fork) {
45675
45693
  fork.use(es_proposals_1.default);
45676
45694
  fork.use(type_annotations_1.default);
45677
- var types5 = fork.use(types_1.default);
45678
- var def = types5.Type.def;
45679
- var or = types5.Type.or;
45695
+ var types6 = fork.use(types_1.default);
45696
+ var def = types6.Type.def;
45697
+ var or = types6.Type.or;
45680
45698
  var defaults = fork.use(shared_1.default).defaults;
45681
45699
  def("Flow").bases("Node");
45682
45700
  def("FlowType").bases("Flow");
@@ -45791,10 +45809,10 @@ var require_esprima = __commonJS({
45791
45809
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
45792
45810
  function default_1(fork) {
45793
45811
  fork.use(es_proposals_1.default);
45794
- var types5 = fork.use(types_1.default);
45812
+ var types6 = fork.use(types_1.default);
45795
45813
  var defaults = fork.use(shared_1.default).defaults;
45796
- var def = types5.Type.def;
45797
- var or = types5.Type.or;
45814
+ var def = types6.Type.def;
45815
+ var or = types6.Type.or;
45798
45816
  def("VariableDeclaration").field("declarations", [or(
45799
45817
  def("VariableDeclarator"),
45800
45818
  def("Identifier")
@@ -45851,11 +45869,11 @@ var require_babel_core = __commonJS({
45851
45869
  function default_1(fork) {
45852
45870
  var _a2, _b2, _c2, _d, _e;
45853
45871
  fork.use(es_proposals_1.default);
45854
- var types5 = fork.use(types_1.default);
45872
+ var types6 = fork.use(types_1.default);
45855
45873
  var defaults = fork.use(shared_1.default).defaults;
45856
- var def = types5.Type.def;
45857
- var or = types5.Type.or;
45858
- var isUndefined = types5.builtInTypes.undefined;
45874
+ var def = types6.Type.def;
45875
+ var or = types6.Type.or;
45876
+ var isUndefined = types6.builtInTypes.undefined;
45859
45877
  def("Noop").bases("Statement").build();
45860
45878
  def("DoExpression").bases("Expression").build("body").field("body", [def("Statement")]);
45861
45879
  def("BindExpression").bases("Expression").build("object", "callee").field("object", or(def("Expression"), null)).field("callee", def("Expression"));
@@ -45890,7 +45908,7 @@ var require_babel_core = __commonJS({
45890
45908
  raw: String
45891
45909
  },
45892
45910
  function getDefault() {
45893
- var value = types5.getFieldValue(this, "value");
45911
+ var value = types6.getFieldValue(this, "value");
45894
45912
  return {
45895
45913
  rawValue: value,
45896
45914
  raw: toRaw ? toRaw(value) : String(value)
@@ -45981,8 +45999,8 @@ var require_babel = __commonJS({
45981
45999
  var babel_core_1 = (0, tslib_1.__importDefault)(require_babel_core());
45982
46000
  var flow_1 = (0, tslib_1.__importDefault)(require_flow());
45983
46001
  function default_1(fork) {
45984
- var types5 = fork.use(types_1.default);
45985
- var def = types5.Type.def;
46002
+ var types6 = fork.use(types_1.default);
46003
+ var def = types6.Type.def;
45986
46004
  fork.use(babel_core_1.default);
45987
46005
  fork.use(flow_1.default);
45988
46006
  def("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String);
@@ -46006,12 +46024,12 @@ var require_typescript = __commonJS({
46006
46024
  function default_1(fork) {
46007
46025
  fork.use(babel_core_1.default);
46008
46026
  fork.use(type_annotations_1.default);
46009
- var types5 = fork.use(types_1.default);
46010
- var n2 = types5.namedTypes;
46011
- var def = types5.Type.def;
46012
- var or = types5.Type.or;
46027
+ var types6 = fork.use(types_1.default);
46028
+ var n2 = types6.namedTypes;
46029
+ var def = types6.Type.def;
46030
+ var or = types6.Type.or;
46013
46031
  var defaults = fork.use(shared_1.default).defaults;
46014
- var StringLiteral = types5.Type.from(function(value, deep) {
46032
+ var StringLiteral = types6.Type.from(function(value, deep) {
46015
46033
  if (n2.StringLiteral && n2.StringLiteral.check(value, deep)) {
46016
46034
  return true;
46017
46035
  }
@@ -47989,8 +48007,8 @@ var require_util9 = __commonJS({
47989
48007
  exports2.isTrailingCommaEnabled = exports2.getParentExportDeclaration = exports2.isExportDeclaration = exports2.fixFaultyLocations = exports2.getTrueLoc = exports2.composeSourceMaps = exports2.copyPos = exports2.comparePos = exports2.getUnionOfKeys = exports2.getOption = exports2.isBrowser = exports2.getLineTerminator = void 0;
47990
48008
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
47991
48009
  var assert_1 = tslib_1.__importDefault(require("assert"));
47992
- var types5 = tslib_1.__importStar(require_main2());
47993
- var n2 = types5.namedTypes;
48010
+ var types6 = tslib_1.__importStar(require_main2());
48011
+ var n2 = types6.namedTypes;
47994
48012
  var source_map_1 = tslib_1.__importDefault(require_source_map());
47995
48013
  var SourceMapConsumer = source_map_1.default.SourceMapConsumer;
47996
48014
  var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
@@ -55403,10 +55421,10 @@ var require_comments = __commonJS({
55403
55421
  exports2.printComments = exports2.attach = void 0;
55404
55422
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
55405
55423
  var assert_1 = tslib_1.__importDefault(require("assert"));
55406
- var types5 = tslib_1.__importStar(require_main2());
55407
- var n2 = types5.namedTypes;
55408
- var isArray = types5.builtInTypes.array;
55409
- var isObject2 = types5.builtInTypes.object;
55424
+ var types6 = tslib_1.__importStar(require_main2());
55425
+ var n2 = types6.namedTypes;
55426
+ var isArray = types6.builtInTypes.array;
55427
+ var isObject2 = types6.builtInTypes.object;
55410
55428
  var lines_1 = require_lines();
55411
55429
  var util_1 = require_util9();
55412
55430
  var childNodesCache = /* @__PURE__ */ new WeakMap();
@@ -55437,7 +55455,7 @@ var require_comments = __commonJS({
55437
55455
  if (isArray.check(node)) {
55438
55456
  names = Object.keys(node);
55439
55457
  } else if (isObject2.check(node)) {
55440
- names = types5.getFieldNames(node);
55458
+ names = types6.getFieldNames(node);
55441
55459
  } else {
55442
55460
  return resultArray;
55443
55461
  }
@@ -55617,7 +55635,7 @@ var require_comments = __commonJS({
55617
55635
  function printComments(path3, print2) {
55618
55636
  var value = path3.getValue();
55619
55637
  var innerLines = print2(path3);
55620
- var comments = n2.Node.check(value) && types5.getFieldValue(value, "comments");
55638
+ var comments = n2.Node.check(value) && types6.getFieldValue(value, "comments");
55621
55639
  if (!comments || comments.length === 0) {
55622
55640
  return innerLines;
55623
55641
  }
@@ -55625,8 +55643,8 @@ var require_comments = __commonJS({
55625
55643
  var trailingParts = [innerLines];
55626
55644
  path3.each(function(commentPath) {
55627
55645
  var comment = commentPath.getValue();
55628
- var leading = types5.getFieldValue(comment, "leading");
55629
- var trailing = types5.getFieldValue(comment, "trailing");
55646
+ var leading = types6.getFieldValue(comment, "leading");
55647
+ var trailing = types6.getFieldValue(comment, "trailing");
55630
55648
  if (leading || trailing && !(n2.Statement.check(value) || comment.type === "Block" || comment.type === "CommentBlock")) {
55631
55649
  leadingParts.push(printLeadingComment(commentPath, print2));
55632
55650
  } else if (trailing) {
@@ -55648,10 +55666,10 @@ var require_parser2 = __commonJS({
55648
55666
  exports2.parse = void 0;
55649
55667
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
55650
55668
  var assert_1 = tslib_1.__importDefault(require("assert"));
55651
- var types5 = tslib_1.__importStar(require_main2());
55652
- var b2 = types5.builders;
55653
- var isObject2 = types5.builtInTypes.object;
55654
- var isArray = types5.builtInTypes.array;
55669
+ var types6 = tslib_1.__importStar(require_main2());
55670
+ var b2 = types6.builders;
55671
+ var isObject2 = types6.builtInTypes.object;
55672
+ var isArray = types6.builtInTypes.array;
55655
55673
  var options_1 = require_options();
55656
55674
  var lines_1 = require_lines();
55657
55675
  var comments_1 = require_comments();
@@ -55838,11 +55856,11 @@ var require_fast_path = __commonJS({
55838
55856
  Object.defineProperty(exports2, "__esModule", { value: true });
55839
55857
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
55840
55858
  var assert_1 = tslib_1.__importDefault(require("assert"));
55841
- var types5 = tslib_1.__importStar(require_main2());
55859
+ var types6 = tslib_1.__importStar(require_main2());
55842
55860
  var util = tslib_1.__importStar(require_util9());
55843
- var n2 = types5.namedTypes;
55844
- var isArray = types5.builtInTypes.array;
55845
- var isNumber = types5.builtInTypes.number;
55861
+ var n2 = types6.namedTypes;
55862
+ var isArray = types6.builtInTypes.array;
55863
+ var isNumber = types6.builtInTypes.number;
55846
55864
  var PRECEDENCE = {};
55847
55865
  [
55848
55866
  ["??"],
@@ -55871,7 +55889,7 @@ var require_fast_path = __commonJS({
55871
55889
  if (obj instanceof FastPath) {
55872
55890
  return obj.copy();
55873
55891
  }
55874
- if (obj instanceof types5.NodePath) {
55892
+ if (obj instanceof types6.NodePath) {
55875
55893
  var copy = Object.create(FastPath.prototype);
55876
55894
  var stack = [obj.value];
55877
55895
  for (var pp = void 0; pp = obj.parentPath; obj = pp)
@@ -56182,7 +56200,7 @@ var require_fast_path = __commonJS({
56182
56200
  return node.some(containsCallExpression);
56183
56201
  }
56184
56202
  if (n2.Node.check(node)) {
56185
- return types5.someField(node, function(_name, child) {
56203
+ return types6.someField(node, function(_name, child) {
56186
56204
  return containsCallExpression(child);
56187
56205
  });
56188
56206
  }
@@ -56272,16 +56290,16 @@ var require_patcher = __commonJS({
56272
56290
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
56273
56291
  var assert_1 = tslib_1.__importDefault(require("assert"));
56274
56292
  var linesModule = tslib_1.__importStar(require_lines());
56275
- var types5 = tslib_1.__importStar(require_main2());
56276
- var Printable = types5.namedTypes.Printable;
56277
- var Expression = types5.namedTypes.Expression;
56278
- var ReturnStatement = types5.namedTypes.ReturnStatement;
56279
- var SourceLocation = types5.namedTypes.SourceLocation;
56293
+ var types6 = tslib_1.__importStar(require_main2());
56294
+ var Printable = types6.namedTypes.Printable;
56295
+ var Expression = types6.namedTypes.Expression;
56296
+ var ReturnStatement = types6.namedTypes.ReturnStatement;
56297
+ var SourceLocation = types6.namedTypes.SourceLocation;
56280
56298
  var util_1 = require_util9();
56281
56299
  var fast_path_1 = tslib_1.__importDefault(require_fast_path());
56282
- var isObject2 = types5.builtInTypes.object;
56283
- var isArray = types5.builtInTypes.array;
56284
- var isString = types5.builtInTypes.string;
56300
+ var isObject2 = types6.builtInTypes.object;
56301
+ var isArray = types6.builtInTypes.array;
56302
+ var isString = types6.builtInTypes.string;
56285
56303
  var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
56286
56304
  var Patcher = function Patcher2(lines) {
56287
56305
  assert_1.default.ok(this instanceof Patcher2);
@@ -56560,8 +56578,8 @@ var require_patcher = __commonJS({
56560
56578
  if (k2.charAt(0) === "_") {
56561
56579
  continue;
56562
56580
  }
56563
- newPath.stack.push(k2, types5.getFieldValue(newNode, k2));
56564
- oldPath.stack.push(k2, types5.getFieldValue(oldNode, k2));
56581
+ newPath.stack.push(k2, types6.getFieldValue(newNode, k2));
56582
+ oldPath.stack.push(k2, types6.getFieldValue(oldNode, k2));
56565
56583
  var canReprint = findAnyReprints(newPath, oldPath, reprints);
56566
56584
  newPath.stack.length -= 2;
56567
56585
  oldPath.stack.length -= 2;
@@ -56589,10 +56607,10 @@ var require_printer = __commonJS({
56589
56607
  var lines_1 = require_lines();
56590
56608
  var options_1 = require_options();
56591
56609
  var patcher_1 = require_patcher();
56592
- var types5 = tslib_1.__importStar(require_main2());
56593
- var namedTypes = types5.namedTypes;
56594
- var isString = types5.builtInTypes.string;
56595
- var isObject2 = types5.builtInTypes.object;
56610
+ var types6 = tslib_1.__importStar(require_main2());
56611
+ var namedTypes = types6.namedTypes;
56612
+ var isString = types6.builtInTypes.string;
56613
+ var isObject2 = types6.builtInTypes.object;
56596
56614
  var fast_path_1 = tslib_1.__importDefault(require_fast_path());
56597
56615
  var util = tslib_1.__importStar(require_util9());
56598
56616
  var PrintResult = function PrintResult2(code, sourceMap) {
@@ -56766,7 +56784,7 @@ var require_printer = __commonJS({
56766
56784
  case "OptionalMemberExpression": {
56767
56785
  parts.push(path3.call(print2, "object"));
56768
56786
  var property = path3.call(print2, "property");
56769
- var optional = types5.getFieldValue(n2, "optional");
56787
+ var optional = types6.getFieldValue(n2, "optional");
56770
56788
  if (n2.computed) {
56771
56789
  parts.push(optional ? "?.[" : "[", property, "]");
56772
56790
  } else {
@@ -57037,7 +57055,7 @@ var require_printer = __commonJS({
57037
57055
  if (n2.typeArguments) {
57038
57056
  parts.push(path3.call(print2, "typeArguments"));
57039
57057
  }
57040
- if (types5.getFieldValue(n2, "optional")) {
57058
+ if (types6.getFieldValue(n2, "optional")) {
57041
57059
  parts.push("?.");
57042
57060
  }
57043
57061
  parts.push(printArgumentsList(path3, options, print2));
@@ -58669,8 +58687,8 @@ var require_printer = __commonJS({
58669
58687
  });
58670
58688
  }
58671
58689
  function getPossibleRaw(node) {
58672
- var value = types5.getFieldValue(node, "value");
58673
- var extra = types5.getFieldValue(node, "extra");
58690
+ var value = types6.getFieldValue(node, "value");
58691
+ var extra = types6.getFieldValue(node, "extra");
58674
58692
  if (extra && typeof extra.raw === "string" && value == extra.rawValue) {
58675
58693
  return extra.raw;
58676
58694
  }
@@ -58718,8 +58736,8 @@ var require_main3 = __commonJS({
58718
58736
  exports2.run = exports2.prettyPrint = exports2.print = exports2.visit = exports2.types = exports2.parse = void 0;
58719
58737
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
58720
58738
  var fs_1 = tslib_1.__importDefault(require("fs"));
58721
- var types5 = tslib_1.__importStar(require_main2());
58722
- exports2.types = types5;
58739
+ var types6 = tslib_1.__importStar(require_main2());
58740
+ exports2.types = types6;
58723
58741
  var parser_1 = require_parser2();
58724
58742
  Object.defineProperty(exports2, "parse", { enumerable: true, get: function() {
58725
58743
  return parser_1.parse;
@@ -59583,14 +59601,14 @@ var require_lib = __commonJS({
59583
59601
  this.preserveSpace = !!preserveSpace;
59584
59602
  }
59585
59603
  };
59586
- var types5 = {
59604
+ var types6 = {
59587
59605
  brace: new TokContext("{"),
59588
59606
  j_oTag: new TokContext("<tag"),
59589
59607
  j_cTag: new TokContext("</tag"),
59590
59608
  j_expr: new TokContext("<tag>...</tag>", true)
59591
59609
  };
59592
59610
  {
59593
- types5.template = new TokContext("`", true);
59611
+ types6.template = new TokContext("`", true);
59594
59612
  }
59595
59613
  var beforeExpr = true;
59596
59614
  var startsExpr = true;
@@ -60122,17 +60140,17 @@ var require_lib = __commonJS({
60122
60140
  context.pop();
60123
60141
  };
60124
60142
  tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
60125
- context.push(types5.brace);
60143
+ context.push(types6.brace);
60126
60144
  };
60127
60145
  tokenTypes[22].updateContext = (context) => {
60128
- if (context[context.length - 1] === types5.template) {
60146
+ if (context[context.length - 1] === types6.template) {
60129
60147
  context.pop();
60130
60148
  } else {
60131
- context.push(types5.template);
60149
+ context.push(types6.template);
60132
60150
  }
60133
60151
  };
60134
60152
  tokenTypes[140].updateContext = (context) => {
60135
- context.push(types5.j_expr, types5.j_oTag);
60153
+ context.push(types6.j_expr, types6.j_oTag);
60136
60154
  };
60137
60155
  }
60138
60156
  var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
@@ -60738,7 +60756,7 @@ var require_lib = __commonJS({
60738
60756
  this.lastTokEndLoc = null;
60739
60757
  this.lastTokStartLoc = null;
60740
60758
  this.lastTokStart = 0;
60741
- this.context = [types5.brace];
60759
+ this.context = [types6.brace];
60742
60760
  this.canStartJSXElement = true;
60743
60761
  this.containsEsc = false;
60744
60762
  this.firstInvalidTemplateEscapePos = null;
@@ -64629,7 +64647,7 @@ var require_lib = __commonJS({
64629
64647
  context
64630
64648
  } = this.state;
64631
64649
  const currentContext = context[context.length - 1];
64632
- if (currentContext === types5.j_oTag || currentContext === types5.j_expr) {
64650
+ if (currentContext === types6.j_oTag || currentContext === types6.j_expr) {
64633
64651
  context.pop();
64634
64652
  }
64635
64653
  }
@@ -65687,9 +65705,9 @@ var require_lib = __commonJS({
65687
65705
  switch (this.state.type) {
65688
65706
  case 5:
65689
65707
  node = this.startNode();
65690
- this.setContext(types5.brace);
65708
+ this.setContext(types6.brace);
65691
65709
  this.next();
65692
- node = this.jsxParseExpressionContainer(node, types5.j_oTag);
65710
+ node = this.jsxParseExpressionContainer(node, types6.j_oTag);
65693
65711
  if (node.expression.type === "JSXEmptyExpression") {
65694
65712
  this.raise(JsxErrors.AttributeIsEmpty, {
65695
65713
  at: node
@@ -65712,7 +65730,7 @@ var require_lib = __commonJS({
65712
65730
  jsxParseSpreadChild(node) {
65713
65731
  this.next();
65714
65732
  node.expression = this.parseExpression();
65715
- this.setContext(types5.j_expr);
65733
+ this.setContext(types6.j_expr);
65716
65734
  this.state.canStartJSXElement = true;
65717
65735
  this.expect(8);
65718
65736
  return this.finishNode(node, "JSXSpreadChild");
@@ -65732,11 +65750,11 @@ var require_lib = __commonJS({
65732
65750
  jsxParseAttribute() {
65733
65751
  const node = this.startNode();
65734
65752
  if (this.match(5)) {
65735
- this.setContext(types5.brace);
65753
+ this.setContext(types6.brace);
65736
65754
  this.next();
65737
65755
  this.expect(21);
65738
65756
  node.argument = this.parseMaybeAssignAllowIn();
65739
- this.setContext(types5.j_oTag);
65757
+ this.setContext(types6.j_oTag);
65740
65758
  this.state.canStartJSXElement = true;
65741
65759
  this.expect(8);
65742
65760
  return this.finishNode(node, "JSXSpreadAttribute");
@@ -65795,12 +65813,12 @@ var require_lib = __commonJS({
65795
65813
  break;
65796
65814
  case 5: {
65797
65815
  const node2 = this.startNode();
65798
- this.setContext(types5.brace);
65816
+ this.setContext(types6.brace);
65799
65817
  this.next();
65800
65818
  if (this.match(21)) {
65801
65819
  children.push(this.jsxParseSpreadChild(node2));
65802
65820
  } else {
65803
- children.push(this.jsxParseExpressionContainer(node2, types5.j_expr));
65821
+ children.push(this.jsxParseExpressionContainer(node2, types6.j_expr));
65804
65822
  }
65805
65823
  break;
65806
65824
  }
@@ -65871,11 +65889,11 @@ var require_lib = __commonJS({
65871
65889
  }
65872
65890
  getTokenFromCode(code) {
65873
65891
  const context = this.curContext();
65874
- if (context === types5.j_expr) {
65892
+ if (context === types6.j_expr) {
65875
65893
  this.jsxReadToken();
65876
65894
  return;
65877
65895
  }
65878
- if (context === types5.j_oTag || context === types5.j_cTag) {
65896
+ if (context === types6.j_oTag || context === types6.j_cTag) {
65879
65897
  if (isIdentifierStart(code)) {
65880
65898
  this.jsxReadWord();
65881
65899
  return;
@@ -65885,7 +65903,7 @@ var require_lib = __commonJS({
65885
65903
  this.finishToken(141);
65886
65904
  return;
65887
65905
  }
65888
- if ((code === 34 || code === 39) && context === types5.j_oTag) {
65906
+ if ((code === 34 || code === 39) && context === types6.j_oTag) {
65889
65907
  this.jsxReadString(code);
65890
65908
  return;
65891
65909
  }
@@ -65903,17 +65921,17 @@ var require_lib = __commonJS({
65903
65921
  type
65904
65922
  } = this.state;
65905
65923
  if (type === 56 && prevType === 140) {
65906
- context.splice(-2, 2, types5.j_cTag);
65924
+ context.splice(-2, 2, types6.j_cTag);
65907
65925
  this.state.canStartJSXElement = false;
65908
65926
  } else if (type === 140) {
65909
- context.push(types5.j_oTag);
65927
+ context.push(types6.j_oTag);
65910
65928
  } else if (type === 141) {
65911
65929
  const out = context[context.length - 1];
65912
- if (out === types5.j_oTag && prevType === 56 || out === types5.j_cTag) {
65930
+ if (out === types6.j_oTag && prevType === 56 || out === types6.j_cTag) {
65913
65931
  context.pop();
65914
- this.state.canStartJSXElement = context[context.length - 1] === types5.j_expr;
65932
+ this.state.canStartJSXElement = context[context.length - 1] === types6.j_expr;
65915
65933
  } else {
65916
- this.setContext(types5.j_expr);
65934
+ this.setContext(types6.j_expr);
65917
65935
  this.state.canStartJSXElement = true;
65918
65936
  }
65919
65937
  } else {
@@ -67357,14 +67375,14 @@ var require_lib = __commonJS({
67357
67375
  tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
67358
67376
  const node = this.startNode();
67359
67377
  const hasLeadingOperator = this.eat(operator);
67360
- const types6 = [];
67378
+ const types7 = [];
67361
67379
  do {
67362
- types6.push(parseConstituentType());
67380
+ types7.push(parseConstituentType());
67363
67381
  } while (this.eat(operator));
67364
- if (types6.length === 1 && !hasLeadingOperator) {
67365
- return types6[0];
67382
+ if (types7.length === 1 && !hasLeadingOperator) {
67383
+ return types7[0];
67366
67384
  }
67367
- node.types = types6;
67385
+ node.types = types7;
67368
67386
  return this.finishNode(node, kind);
67369
67387
  }
67370
67388
  tsParseIntersectionTypeOrHigher() {
@@ -67938,7 +67956,7 @@ var require_lib = __commonJS({
67938
67956
  this.raise(TSErrors.EmptyTypeArguments, {
67939
67957
  at: node
67940
67958
  });
67941
- } else if (!this.state.inType && this.curContext() === types5.brace) {
67959
+ } else if (!this.state.inType && this.curContext() === types6.brace) {
67942
67960
  this.reScan_lt_gt();
67943
67961
  }
67944
67962
  this.expect(48);
@@ -68615,7 +68633,7 @@ var require_lib = __commonJS({
68615
68633
  context
68616
68634
  } = this.state;
68617
68635
  const currentContext = context[context.length - 1];
68618
- if (currentContext === types5.j_oTag || currentContext === types5.j_expr) {
68636
+ if (currentContext === types6.j_oTag || currentContext === types6.j_expr) {
68619
68637
  context.pop();
68620
68638
  }
68621
68639
  }
@@ -74233,38 +74251,74 @@ var c3_exports11 = {};
74233
74251
  __export(c3_exports11, {
74234
74252
  default: () => c3_default11
74235
74253
  });
74236
- var npm11, generate11, config10, c3_default11;
74254
+ var recast5, npm11, generate11, configure7, config10, c3_default11;
74237
74255
  var init_c311 = __esm({
74238
74256
  "templates/solid/c3.ts"() {
74239
74257
  init_cli();
74258
+ init_colors();
74259
+ init_codemod();
74240
74260
  init_command();
74241
74261
  init_files();
74242
74262
  init_packages();
74263
+ recast5 = __toESM(require_main3());
74243
74264
  ({ npm: npm11 } = detectPackageManager());
74244
74265
  generate11 = async (ctx) => {
74245
74266
  await runFrameworkGenerator(ctx, [ctx.project.name]);
74246
74267
  logRaw("");
74247
74268
  };
74269
+ configure7 = async (ctx) => {
74270
+ usesTypescript(ctx);
74271
+ const filePath = `app.config.${usesTypescript(ctx) ? "ts" : "js"}`;
74272
+ updateStatus(`Updating configuration in ${blue(filePath)}`);
74273
+ transformFile(filePath, {
74274
+ visitCallExpression: function(n2) {
74275
+ const callee = n2.node.callee;
74276
+ if (callee.name !== "defineConfig") {
74277
+ return this.traverse(n2);
74278
+ }
74279
+ const b2 = recast5.types.builders;
74280
+ n2.node.arguments = [
74281
+ b2.objectExpression([
74282
+ b2.objectProperty(
74283
+ b2.identifier("server"),
74284
+ b2.objectExpression([
74285
+ b2.objectProperty(
74286
+ b2.identifier("preset"),
74287
+ b2.stringLiteral("cloudflare-pages")
74288
+ ),
74289
+ b2.objectProperty(
74290
+ b2.identifier("rollupConfig"),
74291
+ b2.objectExpression([
74292
+ b2.objectProperty(
74293
+ b2.identifier("external"),
74294
+ b2.arrayExpression([b2.stringLiteral("node:async_hooks")])
74295
+ )
74296
+ ])
74297
+ )
74298
+ ])
74299
+ )
74300
+ ])
74301
+ ];
74302
+ return false;
74303
+ }
74304
+ });
74305
+ };
74248
74306
  config10 = {
74249
74307
  configVersion: 1,
74250
74308
  id: "solid",
74251
74309
  displayName: "Solid",
74252
74310
  platform: "pages",
74253
- copyFiles: {
74254
- variants: {
74255
- js: { path: "./js" },
74256
- ts: { path: "./ts" }
74257
- }
74258
- },
74259
74311
  generate: generate11,
74312
+ configure: configure7,
74260
74313
  transformPackageJson: async () => ({
74261
74314
  scripts: {
74262
- "pages:preview": `${npm11} run build && npx wrangler pages dev dist ${await compatDateFlag()} --compatibility-flag nodejs_compat`,
74263
- "pages:deploy": `${npm11} run build && wrangler pages deploy ./dist`
74315
+ preview: `${npm11} run build && npx wrangler pages dev dist ${await compatDateFlag()} --compatibility-flag nodejs_compat`,
74316
+ deploy: `${npm11} run build && wrangler pages deploy ./dist`
74264
74317
  }
74265
74318
  }),
74266
74319
  devScript: "dev",
74267
- previewScript: "pages:preview",
74320
+ deployScript: "deploy",
74321
+ previewScript: "preview",
74268
74322
  compatibilityFlags: ["nodejs_compat"]
74269
74323
  };
74270
74324
  c3_default11 = config10;
@@ -74276,7 +74330,7 @@ var c3_exports12 = {};
74276
74330
  __export(c3_exports12, {
74277
74331
  default: () => c3_default12
74278
74332
  });
74279
- var import_node_os, recast5, npm12, generate12, configure7, updateSvelteConfig, updateTypeDefinitions, config11, c3_default12;
74333
+ var import_node_os, recast6, npm12, generate12, configure8, updateSvelteConfig, updateTypeDefinitions, config11, c3_default12;
74280
74334
  var init_c312 = __esm({
74281
74335
  "templates/svelte/c3.ts"() {
74282
74336
  import_node_os = require("node:os");
@@ -74286,13 +74340,13 @@ var init_c312 = __esm({
74286
74340
  init_command();
74287
74341
  init_files();
74288
74342
  init_packages();
74289
- recast5 = __toESM(require_main3());
74343
+ recast6 = __toESM(require_main3());
74290
74344
  ({ npm: npm12 } = detectPackageManager());
74291
74345
  generate12 = async (ctx) => {
74292
74346
  await runFrameworkGenerator(ctx, [ctx.project.name]);
74293
74347
  logRaw("");
74294
74348
  };
74295
- configure7 = async (ctx) => {
74349
+ configure8 = async (ctx) => {
74296
74350
  const pkg = `@sveltejs/adapter-cloudflare`;
74297
74351
  await installPackages([pkg], {
74298
74352
  dev: true,
@@ -74319,7 +74373,7 @@ var init_c312 = __esm({
74319
74373
  return;
74320
74374
  }
74321
74375
  updateStatus(`Updating global type definitions in ${blue("app.d.ts")}`);
74322
- const b2 = recast5.types.builders;
74376
+ const b2 = recast6.types.builders;
74323
74377
  transformFile("src/app.d.ts", {
74324
74378
  visitTSModuleDeclaration(n2) {
74325
74379
  if (n2.value.id.name === "App" && n2.node.body) {
@@ -74363,7 +74417,7 @@ var init_c312 = __esm({
74363
74417
  }
74364
74418
  },
74365
74419
  generate: generate12,
74366
- configure: configure7,
74420
+ configure: configure8,
74367
74421
  transformPackageJson: async (original, ctx) => {
74368
74422
  let scripts = {
74369
74423
  preview: `${npm12} run build && wrangler pages dev .svelte-kit/cloudflare`,
@@ -74691,7 +74745,7 @@ async function copyTemplateFiles(ctx) {
74691
74745
  }
74692
74746
  s.stop(`${brandColor("files")} ${dim("copied to project directory")}`);
74693
74747
  }
74694
- var import_fs10, import_promises2, import_os2, import_path12, import_deepmerge, import_degit, defaultSelectVariant, getFrameworkMap, getTemplateMap, selectTemplate, selectFramework, shouldUseTs, processRemoteTemplate, validateTemplate, validateTemplateSrcDirectory, inferTemplateConfig, inferCopyFilesDefinition, downloadRemoteTemplate, updatePackageName, updatePackageScripts, getTemplatePath, isVariantInfo, getCopyFilesDestinationDir;
74748
+ var import_fs10, import_promises2, import_os2, import_path12, import_deepmerge, import_degit, defaultSelectVariant, getFrameworkMap, getTemplateMap, selectTemplate, selectFramework, shouldUseTs, processRemoteTemplate, validateTemplate, validateTemplateSrcDirectory, inferTemplateConfig, inferCopyFilesDefinition, downloadRemoteTemplate, updatePackageName, updatePackageScripts, getTemplatePath, isVariantInfo, getCopyFilesDestinationDir, addWranglerToGitIgnore;
74695
74749
  var init_templates = __esm({
74696
74750
  "src/templates.ts"() {
74697
74751
  import_fs10 = require("fs");
@@ -74949,6 +75003,45 @@ var init_templates = __esm({
74949
75003
  }
74950
75004
  return copyFiles.destinationDir(ctx);
74951
75005
  };
75006
+ addWranglerToGitIgnore = (ctx) => {
75007
+ const gitIgnorePath = `${ctx.project.path}/.gitignore`;
75008
+ const gitIgnorePreExisted = (0, import_fs10.existsSync)(gitIgnorePath);
75009
+ const gitDirExists = directoryExists(`${ctx.project.path}/.git`);
75010
+ if (!gitIgnorePreExisted && !gitDirExists) {
75011
+ return;
75012
+ }
75013
+ if (!gitIgnorePreExisted) {
75014
+ writeFile2(gitIgnorePath, "");
75015
+ }
75016
+ const existingGitIgnoreContent = readFile(gitIgnorePath);
75017
+ const wranglerGitIgnoreFiles = [".wrangler", ".dev.vars"];
75018
+ const wranglerGitIgnoreFilesToAdd = wranglerGitIgnoreFiles.filter(
75019
+ (file) => !existingGitIgnoreContent.match(
75020
+ new RegExp(`
75021
+ ${file}${file === ".wrangler" ? "/?" : ""}\\s+(#'*)?`)
75022
+ )
75023
+ );
75024
+ if (wranglerGitIgnoreFilesToAdd.length === 0) {
75025
+ return;
75026
+ }
75027
+ const s = spinner();
75028
+ s.start("Adding Wrangler files to the .gitignore file");
75029
+ const linesToAppend = [
75030
+ "",
75031
+ ...!existingGitIgnoreContent.match(/\n\s*$/) ? [""] : []
75032
+ ];
75033
+ if (wranglerGitIgnoreFilesToAdd.length === wranglerGitIgnoreFiles.length) {
75034
+ linesToAppend.push("# wrangler files");
75035
+ }
75036
+ wranglerGitIgnoreFilesToAdd.forEach((line) => linesToAppend.push(line));
75037
+ linesToAppend.push("");
75038
+ appendFile(gitIgnorePath, linesToAppend.join("\n"));
75039
+ s.stop(
75040
+ `${brandColor(gitIgnorePreExisted ? "updated" : "created")} ${dim(
75041
+ ".gitignore file"
75042
+ )}`
75043
+ );
75044
+ };
74952
75045
  }
74953
75046
  });
74954
75047
 
@@ -80060,7 +80153,7 @@ var runCli = async (args) => {
80060
80153
  };
80061
80154
  var runTemplate = async (ctx) => {
80062
80155
  await create(ctx);
80063
- await configure8(ctx);
80156
+ await configure9(ctx);
80064
80157
  await deploy(ctx);
80065
80158
  await printSummary(ctx);
80066
80159
  };
@@ -80076,7 +80169,7 @@ var create = async (ctx) => {
80076
80169
  await rectifyPmMismatch(ctx);
80077
80170
  endSection(`Application created`);
80078
80171
  };
80079
- var configure8 = async (ctx) => {
80172
+ var configure9 = async (ctx) => {
80080
80173
  startSection("Configuring your application for Cloudflare", "Step 2 of 3");
80081
80174
  await installWrangler();
80082
80175
  await installWorkersTypes(ctx);
@@ -80085,6 +80178,7 @@ var configure8 = async (ctx) => {
80085
80178
  if (template.configure) {
80086
80179
  await template.configure({ ...ctx });
80087
80180
  }
80181
+ addWranglerToGitIgnore(ctx);
80088
80182
  await updatePackageScripts(ctx);
80089
80183
  await offerGit(ctx);
80090
80184
  await gitCommit(ctx);