@wix/create-new 0.0.103 → 0.0.105

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.
@@ -13,7 +13,7 @@ import {
13
13
  require_lib,
14
14
  temporaryDirectory,
15
15
  updateEnvFile
16
- } from "./chunk-FPLWF45Q.js";
16
+ } from "./chunk-H4ZDAFAO.js";
17
17
  import {
18
18
  __toESM,
19
19
  init_esm_shims
@@ -115,4 +115,4 @@ async function generateApp({
115
115
  export {
116
116
  generateApp
117
117
  };
118
- //# sourceMappingURL=generator-JYIXHB6D.js.map
118
+ //# sourceMappingURL=generator-7VK2WAO7.js.map
package/build/index.js CHANGED
@@ -119,7 +119,7 @@ import {
119
119
  writeJson,
120
120
  writePackageJson,
121
121
  zod_default
122
- } from "./chunk-FPLWF45Q.js";
122
+ } from "./chunk-H4ZDAFAO.js";
123
123
  import {
124
124
  __commonJS,
125
125
  __dirname,
@@ -47946,6 +47946,7 @@ var require_dist4 = __commonJS({
47946
47946
  var OPENCODE = "opencode";
47947
47947
  var GITHUB_COPILOT = "github-copilot";
47948
47948
  var GITHUB_COPILOT_CLI = "github-copilot-cli";
47949
+ var V0 = "v0";
47949
47950
  var KNOWN_AGENTS = {
47950
47951
  CURSOR,
47951
47952
  CURSOR_CLI,
@@ -47958,7 +47959,8 @@ var require_dist4 = __commonJS({
47958
47959
  ANTIGRAVITY,
47959
47960
  AUGMENT_CLI,
47960
47961
  OPENCODE,
47961
- GITHUB_COPILOT
47962
+ GITHUB_COPILOT,
47963
+ V0
47962
47964
  };
47963
47965
  async function determineAgent2() {
47964
47966
  if (process.env.AI_AGENT) {
@@ -47970,6 +47972,12 @@ var require_dist4 = __commonJS({
47970
47972
  agent: { name: GITHUB_COPILOT }
47971
47973
  };
47972
47974
  }
47975
+ if (name === V0) {
47976
+ return {
47977
+ isAgent: true,
47978
+ agent: { name: V0 }
47979
+ };
47980
+ }
47973
47981
  return {
47974
47982
  isAgent: true,
47975
47983
  agent: { name }
@@ -47979,7 +47987,7 @@ var require_dist4 = __commonJS({
47979
47987
  if (process.env.CURSOR_TRACE_ID) {
47980
47988
  return { isAgent: true, agent: { name: CURSOR } };
47981
47989
  }
47982
- if (process.env.CURSOR_AGENT) {
47990
+ if (process.env.CURSOR_AGENT || process.env.CURSOR_EXTENSION_HOST_ROLE === "agent-exec") {
47983
47991
  return { isAgent: true, agent: { name: CURSOR_CLI } };
47984
47992
  }
47985
47993
  if (process.env.GEMINI_CLI) {
@@ -48209,9 +48217,21 @@ function findByPath(obj, path4, defaultValue, suffix) {
48209
48217
 
48210
48218
  // ../../node_modules/@wix/metro-runtime/es/build/url-resolver.js
48211
48219
  var USER_DOMAIN = "_";
48220
+ var WWW_BASE_DOMAIN = "www._base_domain_";
48221
+ var WILDCARD_PREFIX = "*.";
48212
48222
  var DOMAINS = ["wix.com", "editorx.com"];
48213
- var WIX_API_DOMAINS = ["42.wixprod.net", "uw2-edt-1.wixprod.net"];
48223
+ var WIX_API_DOMAINS = [
48224
+ "42.wixprod.net",
48225
+ "uw2-edt-1.wixprod.net",
48226
+ "virginia-edt.wixprod.net"
48227
+ ];
48214
48228
  var DEV_WIX_CODE_DOMAIN = "dev.wix-code.com";
48229
+ var HOST_ALIASES = {
48230
+ // payments.base44.com runs customised Business Manager, which needs to work exactly the same as normal BM on manage.wix.com
48231
+ "payments.base44.com": "manage.wix.com",
48232
+ // https://system-kb.wixanswers.com/kb/en/article/editorx-domains-matching-to-wixcom
48233
+ "create.editorx.com": "editor.editorx.com"
48234
+ };
48215
48235
  var REGEX_CAPTURE_PROTO_FIELD = /{(.*)}/;
48216
48236
  var REGEX_CAPTURE_DOMAINS = new RegExp(`\\.(${DOMAINS.join("|")})$`);
48217
48237
  var REGEX_CAPTURE_API_DOMAINS = new RegExp(`\\.(${WIX_API_DOMAINS.join("|")})$`);
@@ -48239,24 +48259,27 @@ function resolveDomain(host) {
48239
48259
  return resolvedHost.replace(REGEX_CAPTURE_DOMAINS, "._base_domain_").replace(REGEX_CAPTURE_API_DOMAINS, "._api_base_domain_").replace(REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN, "*.dev.wix-code.com");
48240
48260
  }
48241
48261
  function fixHostExceptions(host) {
48242
- return host.replace("create.editorx.com", "editor.editorx.com");
48262
+ return HOST_ALIASES[host] ?? host;
48243
48263
  }
48244
48264
  function resolveMappingsByDomain(domain, domainToMappings) {
48245
48265
  const mappings = domainToMappings[domain];
48246
48266
  if (mappings) {
48247
48267
  return mappings;
48248
48268
  }
48249
- const rootDomainMappings = resolveRootDomain(domain, domainToMappings);
48250
- if (!rootDomainMappings) {
48269
+ const matchedMappings = resolveRootDomain(domain, domainToMappings) ?? resolveWildcardDomain(domain, domainToMappings);
48270
+ if (!matchedMappings) {
48271
+ if (isBaseDomain(domain)) {
48272
+ const wwwMappings = domainToMappings[WWW_BASE_DOMAIN];
48273
+ if (wwwMappings) {
48274
+ return wwwMappings;
48275
+ }
48276
+ }
48251
48277
  const userMappings = domainToMappings[USER_DOMAIN];
48252
48278
  if (userMappings) {
48253
48279
  return userMappings;
48254
48280
  }
48255
- if (isBaseDomain(domain)) {
48256
- return domainToMappings[wwwBaseDomain];
48257
- }
48258
48281
  }
48259
- return rootDomainMappings ?? [];
48282
+ return matchedMappings ?? [];
48260
48283
  }
48261
48284
  function resolveRootDomain(domain, domainToMappings) {
48262
48285
  return Object.entries(domainToMappings).find(([entryDomain]) => {
@@ -48264,6 +48287,22 @@ function resolveRootDomain(domain, domainToMappings) {
48264
48287
  return rooDomainSegments.join(".") === entryDomain;
48265
48288
  })?.[1];
48266
48289
  }
48290
+ function resolveWildcardDomain(domain, domainToMappings) {
48291
+ const matchingEntries = Object.entries(domainToMappings).filter(([entryDomain]) => matchesWildcardDomain(domain, entryDomain));
48292
+ const [mostSpecificEntry] = matchingEntries.sort(([entryDomainA], [entryDomainB]) => entryDomainB.length - entryDomainA.length);
48293
+ if (!mostSpecificEntry) {
48294
+ return void 0;
48295
+ }
48296
+ const [, mappings] = mostSpecificEntry;
48297
+ return mappings;
48298
+ }
48299
+ function matchesWildcardDomain(domain, entryDomain) {
48300
+ if (!entryDomain.startsWith(WILDCARD_PREFIX)) {
48301
+ return false;
48302
+ }
48303
+ const suffix = entryDomain.slice(WILDCARD_PREFIX.length - 1);
48304
+ return domain.length > suffix.length && domain.endsWith(suffix);
48305
+ }
48267
48306
  function resolvePath(protoPath, mappings) {
48268
48307
  const mapping = mappings?.find((m) => protoPath.startsWith(m.destPath));
48269
48308
  if (!mapping) {
@@ -48274,7 +48313,6 @@ function resolvePath(protoPath, mappings) {
48274
48313
  function isBaseDomain(domain) {
48275
48314
  return !!domain.match(/\._base_domain_$/);
48276
48315
  }
48277
- var wwwBaseDomain = "www._base_domain_";
48278
48316
 
48279
48317
  // ../../node_modules/@wix/metro-runtime/es/build/flatten-params.js
48280
48318
  init_esm_shims();
@@ -48375,7 +48413,7 @@ var ConverterType;
48375
48413
  (function(ConverterType2) {
48376
48414
  ConverterType2[ConverterType2["TO_JSON"] = 0] = "TO_JSON";
48377
48415
  ConverterType2[ConverterType2["FROM_JSON"] = 1] = "FROM_JSON";
48378
- })(ConverterType = ConverterType || (ConverterType = {}));
48416
+ })(ConverterType || (ConverterType = {}));
48379
48417
 
48380
48418
  // ../../node_modules/@wix/metro-runtime/es/build/serializer/serializer.js
48381
48419
  init_esm_shims();
@@ -49040,8 +49078,10 @@ function interceptRequest(client2, fn) {
49040
49078
  function createHttpClient({
49041
49079
  getAppToken,
49042
49080
  createHeaders: createHeaders2,
49081
+ cookies,
49043
49082
  type
49044
49083
  }) {
49084
+ const cookieHeader = Object.entries({ "XSRF-TOKEN": "nocheck", ...cookies }).map(([name, value2]) => `${name}=${value2}`).join("; ");
49045
49085
  const client2 = (0, import_http_client2.createHttpClient)({
49046
49086
  baseURL: baseUrls[type],
49047
49087
  ...type !== "standalone" ? {
@@ -49051,7 +49091,7 @@ function createHttpClient({
49051
49091
  ...createHeaders2?.(),
49052
49092
  // See https://wix.slack.com/archives/C0JLGMT28/p1667219337530909
49053
49093
  "X-XSRF-TOKEN": "nocheck",
49054
- Cookie: "XSRF-TOKEN=nocheck",
49094
+ Cookie: cookieHeader,
49055
49095
  "User-Agent": "wix-cli"
49056
49096
  }),
49057
49097
  proxy: false,
@@ -70319,9 +70359,10 @@ var import_react101 = __toESM(require_react(), 1);
70319
70359
  var HttpClientContext = (0, import_react101.createContext)(null);
70320
70360
  var HttpClientProvider = ({
70321
70361
  children,
70322
- headers
70362
+ headers,
70363
+ cookies
70323
70364
  }) => {
70324
- return /* @__PURE__ */ import_react101.default.createElement(HttpClientContext.Provider, { value: { headers } }, children);
70365
+ return /* @__PURE__ */ import_react101.default.createElement(HttpClientContext.Provider, { value: { headers, cookies } }, children);
70325
70366
  };
70326
70367
 
70327
70368
  // ../cli-http-client-react/src/useHttpClient.ts
@@ -70334,6 +70375,7 @@ function useHttpClient({
70334
70375
  return (0, import_react102.useMemo)(
70335
70376
  () => createHttpClient({
70336
70377
  type,
70378
+ cookies: context2?.cookies,
70337
70379
  getAppToken: () => getAppToken({ siteId }),
70338
70380
  createHeaders: () => ({
70339
70381
  ...createAuthHeaders?.({ siteId }),
@@ -77087,6 +77129,7 @@ var BackOfficeHostingPlatforms2;
77087
77129
  BackOfficeHostingPlatforms3["SYMPHONY"] = "SYMPHONY";
77088
77130
  BackOfficeHostingPlatforms3["BMR"] = "BMR";
77089
77131
  BackOfficeHostingPlatforms3["WIXEL_DASHBOARD"] = "WIXEL_DASHBOARD";
77132
+ BackOfficeHostingPlatforms3["CHANNELS_BACKOFFICE"] = "CHANNELS_BACKOFFICE";
77090
77133
  })(BackOfficeHostingPlatforms2 || (BackOfficeHostingPlatforms2 = {}));
77091
77134
  var BackOfficeScriptAssetType2;
77092
77135
  (function(BackOfficeScriptAssetType3) {
@@ -77383,6 +77426,7 @@ var ComponentType2;
77383
77426
  ComponentType3["EDITOR_EXPOSURE"] = "EDITOR_EXPOSURE";
77384
77427
  ComponentType3["TOOLS_PROVIDER_CONFIG"] = "TOOLS_PROVIDER_CONFIG";
77385
77428
  ComponentType3["APP_TOOLS"] = "APP_TOOLS";
77429
+ ComponentType3["ECOM_PURCHASE_RECOMMENDATIONS"] = "ECOM_PURCHASE_RECOMMENDATIONS";
77386
77430
  })(ComponentType2 || (ComponentType2 = {}));
77387
77431
  var AuthType;
77388
77432
  (function(AuthType2) {
@@ -78948,6 +78992,7 @@ var Tag2;
78948
78992
  Tag3["OWNER_CHECKOUT"] = "OWNER_CHECKOUT";
78949
78993
  Tag3["ECOM_PREVIEW_CHECKOUT"] = "ECOM_PREVIEW_CHECKOUT";
78950
78994
  Tag3["ALL_CATEGORIES"] = "ALL_CATEGORIES";
78995
+ Tag3["ECOM_TAX_GROUPS"] = "ECOM_TAX_GROUPS";
78951
78996
  })(Tag2 || (Tag2 = {}));
78952
78997
  var ThumbnailType2;
78953
78998
  (function(ThumbnailType3) {
@@ -79645,6 +79690,7 @@ var AssetType2;
79645
79690
  AssetType3["WIDGET"] = "WIDGET";
79646
79691
  AssetType3["FONT"] = "FONT";
79647
79692
  AssetType3["ICONS"] = "ICONS";
79693
+ AssetType3["STORY"] = "STORY";
79648
79694
  })(AssetType2 || (AssetType2 = {}));
79649
79695
  var FileMediaType;
79650
79696
  (function(FileMediaType2) {
@@ -79659,6 +79705,7 @@ var FileMediaType;
79659
79705
  var AnimationType;
79660
79706
  (function(AnimationType2) {
79661
79707
  AnimationType2["VIEW"] = "VIEW";
79708
+ AnimationType2["POINTER"] = "POINTER";
79662
79709
  })(AnimationType || (AnimationType = {}));
79663
79710
  var AppType3;
79664
79711
  (function(AppType6) {
@@ -80019,6 +80066,18 @@ var WidthType2;
80019
80066
  WidthType3["ORIGINAL"] = "ORIGINAL";
80020
80067
  WidthType3["FULL_WIDTH"] = "FULL_WIDTH";
80021
80068
  })(WidthType2 || (WidthType2 = {}));
80069
+ var PointerEffectType;
80070
+ (function(PointerEffectType2) {
80071
+ PointerEffectType2["AIRY"] = "AIRY";
80072
+ PointerEffectType2["BLOB"] = "BLOB";
80073
+ PointerEffectType2["BLUR"] = "BLUR";
80074
+ PointerEffectType2["SCALE"] = "SCALE";
80075
+ PointerEffectType2["SKEW"] = "SKEW";
80076
+ PointerEffectType2["SWIVEL"] = "SWIVEL";
80077
+ PointerEffectType2["TILT_3D"] = "TILT_3D";
80078
+ PointerEffectType2["TRACK"] = "TRACK";
80079
+ PointerEffectType2["TRACK_3D"] = "TRACK_3D";
80080
+ })(PointerEffectType || (PointerEffectType = {}));
80022
80081
  var BackgroundType2;
80023
80082
  (function(BackgroundType3) {
80024
80083
  BackgroundType3["COLOR"] = "COLOR";
@@ -82935,7 +82994,7 @@ function getTasks({
82935
82994
  cause: e2
82936
82995
  });
82937
82996
  }
82938
- const { generateApp } = await import("./generator-JYIXHB6D.js");
82997
+ const { generateApp } = await import("./generator-7VK2WAO7.js");
82939
82998
  await generateApp({
82940
82999
  packageName,
82941
83000
  packageFolder,
@@ -95295,11 +95354,11 @@ import { randomUUID as randomUUID3 } from "node:crypto";
95295
95354
  var package_default = {
95296
95355
  name: "@wix/create-new",
95297
95356
  description: "General entry point for creating Wix projects",
95298
- version: "0.0.103",
95357
+ version: "0.0.105",
95299
95358
  bin: "bin/index.cjs",
95300
95359
  devDependencies: {
95301
95360
  "@commander-js/extra-typings": "^13.0.0",
95302
- "@vercel/detect-agent": "^1.2.1",
95361
+ "@vercel/detect-agent": "^1.2.3",
95303
95362
  "@wix/app-command": "workspace:*",
95304
95363
  "@wix/cli-auth": "workspace:*",
95305
95364
  "@wix/cli-error-reporting": "workspace:*",