@wix/create-app 0.0.242 → 0.0.244

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.
@@ -14,7 +14,7 @@ import {
14
14
  require_is_git_url,
15
15
  require_lib,
16
16
  require_semver
17
- } from "./chunk-6P5R3I5H.js";
17
+ } from "./chunk-V6PDDX7X.js";
18
18
  import {
19
19
  __commonJS,
20
20
  __require,
@@ -3986,4 +3986,4 @@ ejs/lib/ejs.js:
3986
3986
  * @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0}
3987
3987
  *)
3988
3988
  */
3989
- //# sourceMappingURL=generator-R6MCAQJ7.js.map
3989
+ //# sourceMappingURL=generator-6OIH2MBC.js.map
package/build/index.js CHANGED
@@ -100,7 +100,7 @@ import {
100
100
  setupTestEnv,
101
101
  writeJson,
102
102
  zod_default
103
- } from "./chunk-6P5R3I5H.js";
103
+ } from "./chunk-V6PDDX7X.js";
104
104
  import {
105
105
  __commonJS,
106
106
  __dirname,
@@ -31097,6 +31097,7 @@ var require_dist4 = __commonJS({
31097
31097
  var OPENCODE = "opencode";
31098
31098
  var GITHUB_COPILOT = "github-copilot";
31099
31099
  var GITHUB_COPILOT_CLI = "github-copilot-cli";
31100
+ var V0 = "v0";
31100
31101
  var KNOWN_AGENTS = {
31101
31102
  CURSOR,
31102
31103
  CURSOR_CLI,
@@ -31109,7 +31110,8 @@ var require_dist4 = __commonJS({
31109
31110
  ANTIGRAVITY,
31110
31111
  AUGMENT_CLI,
31111
31112
  OPENCODE,
31112
- GITHUB_COPILOT
31113
+ GITHUB_COPILOT,
31114
+ V0
31113
31115
  };
31114
31116
  async function determineAgent2() {
31115
31117
  if (process.env.AI_AGENT) {
@@ -31121,6 +31123,12 @@ var require_dist4 = __commonJS({
31121
31123
  agent: { name: GITHUB_COPILOT }
31122
31124
  };
31123
31125
  }
31126
+ if (name === V0) {
31127
+ return {
31128
+ isAgent: true,
31129
+ agent: { name: V0 }
31130
+ };
31131
+ }
31124
31132
  return {
31125
31133
  isAgent: true,
31126
31134
  agent: { name }
@@ -31130,7 +31138,7 @@ var require_dist4 = __commonJS({
31130
31138
  if (process.env.CURSOR_TRACE_ID) {
31131
31139
  return { isAgent: true, agent: { name: CURSOR } };
31132
31140
  }
31133
- if (process.env.CURSOR_AGENT) {
31141
+ if (process.env.CURSOR_AGENT || process.env.CURSOR_EXTENSION_HOST_ROLE === "agent-exec") {
31134
31142
  return { isAgent: true, agent: { name: CURSOR_CLI } };
31135
31143
  }
31136
31144
  if (process.env.GEMINI_CLI) {
@@ -40902,9 +40910,21 @@ function findByPath(obj, path4, defaultValue, suffix) {
40902
40910
 
40903
40911
  // ../../node_modules/@wix/metro-runtime/es/build/url-resolver.js
40904
40912
  var USER_DOMAIN = "_";
40913
+ var WWW_BASE_DOMAIN = "www._base_domain_";
40914
+ var WILDCARD_PREFIX = "*.";
40905
40915
  var DOMAINS = ["wix.com", "editorx.com"];
40906
- var WIX_API_DOMAINS = ["42.wixprod.net", "uw2-edt-1.wixprod.net"];
40916
+ var WIX_API_DOMAINS = [
40917
+ "42.wixprod.net",
40918
+ "uw2-edt-1.wixprod.net",
40919
+ "virginia-edt.wixprod.net"
40920
+ ];
40907
40921
  var DEV_WIX_CODE_DOMAIN = "dev.wix-code.com";
40922
+ var HOST_ALIASES = {
40923
+ // payments.base44.com runs customised Business Manager, which needs to work exactly the same as normal BM on manage.wix.com
40924
+ "payments.base44.com": "manage.wix.com",
40925
+ // https://system-kb.wixanswers.com/kb/en/article/editorx-domains-matching-to-wixcom
40926
+ "create.editorx.com": "editor.editorx.com"
40927
+ };
40908
40928
  var REGEX_CAPTURE_PROTO_FIELD = /{(.*)}/;
40909
40929
  var REGEX_CAPTURE_DOMAINS = new RegExp(`\\.(${DOMAINS.join("|")})$`);
40910
40930
  var REGEX_CAPTURE_API_DOMAINS = new RegExp(`\\.(${WIX_API_DOMAINS.join("|")})$`);
@@ -40932,24 +40952,27 @@ function resolveDomain(host) {
40932
40952
  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");
40933
40953
  }
40934
40954
  function fixHostExceptions(host) {
40935
- return host.replace("create.editorx.com", "editor.editorx.com");
40955
+ return HOST_ALIASES[host] ?? host;
40936
40956
  }
40937
40957
  function resolveMappingsByDomain(domain, domainToMappings) {
40938
40958
  const mappings = domainToMappings[domain];
40939
40959
  if (mappings) {
40940
40960
  return mappings;
40941
40961
  }
40942
- const rootDomainMappings = resolveRootDomain(domain, domainToMappings);
40943
- if (!rootDomainMappings) {
40962
+ const matchedMappings = resolveRootDomain(domain, domainToMappings) ?? resolveWildcardDomain(domain, domainToMappings);
40963
+ if (!matchedMappings) {
40964
+ if (isBaseDomain(domain)) {
40965
+ const wwwMappings = domainToMappings[WWW_BASE_DOMAIN];
40966
+ if (wwwMappings) {
40967
+ return wwwMappings;
40968
+ }
40969
+ }
40944
40970
  const userMappings = domainToMappings[USER_DOMAIN];
40945
40971
  if (userMappings) {
40946
40972
  return userMappings;
40947
40973
  }
40948
- if (isBaseDomain(domain)) {
40949
- return domainToMappings[wwwBaseDomain];
40950
- }
40951
40974
  }
40952
- return rootDomainMappings ?? [];
40975
+ return matchedMappings ?? [];
40953
40976
  }
40954
40977
  function resolveRootDomain(domain, domainToMappings) {
40955
40978
  return Object.entries(domainToMappings).find(([entryDomain]) => {
@@ -40957,6 +40980,22 @@ function resolveRootDomain(domain, domainToMappings) {
40957
40980
  return rooDomainSegments.join(".") === entryDomain;
40958
40981
  })?.[1];
40959
40982
  }
40983
+ function resolveWildcardDomain(domain, domainToMappings) {
40984
+ const matchingEntries = Object.entries(domainToMappings).filter(([entryDomain]) => matchesWildcardDomain(domain, entryDomain));
40985
+ const [mostSpecificEntry] = matchingEntries.sort(([entryDomainA], [entryDomainB]) => entryDomainB.length - entryDomainA.length);
40986
+ if (!mostSpecificEntry) {
40987
+ return void 0;
40988
+ }
40989
+ const [, mappings] = mostSpecificEntry;
40990
+ return mappings;
40991
+ }
40992
+ function matchesWildcardDomain(domain, entryDomain) {
40993
+ if (!entryDomain.startsWith(WILDCARD_PREFIX)) {
40994
+ return false;
40995
+ }
40996
+ const suffix = entryDomain.slice(WILDCARD_PREFIX.length - 1);
40997
+ return domain.length > suffix.length && domain.endsWith(suffix);
40998
+ }
40960
40999
  function resolvePath(protoPath, mappings) {
40961
41000
  const mapping = mappings?.find((m) => protoPath.startsWith(m.destPath));
40962
41001
  if (!mapping) {
@@ -40967,7 +41006,6 @@ function resolvePath(protoPath, mappings) {
40967
41006
  function isBaseDomain(domain) {
40968
41007
  return !!domain.match(/\._base_domain_$/);
40969
41008
  }
40970
- var wwwBaseDomain = "www._base_domain_";
40971
41009
 
40972
41010
  // ../../node_modules/@wix/metro-runtime/es/build/flatten-params.js
40973
41011
  init_esm_shims();
@@ -41068,7 +41106,7 @@ var ConverterType;
41068
41106
  (function(ConverterType2) {
41069
41107
  ConverterType2[ConverterType2["TO_JSON"] = 0] = "TO_JSON";
41070
41108
  ConverterType2[ConverterType2["FROM_JSON"] = 1] = "FROM_JSON";
41071
- })(ConverterType = ConverterType || (ConverterType = {}));
41109
+ })(ConverterType || (ConverterType = {}));
41072
41110
 
41073
41111
  // ../../node_modules/@wix/metro-runtime/es/build/serializer/serializer.js
41074
41112
  init_esm_shims();
@@ -41733,8 +41771,10 @@ function interceptRequest(client2, fn) {
41733
41771
  function createHttpClient({
41734
41772
  getAppToken,
41735
41773
  createHeaders: createHeaders2,
41774
+ cookies,
41736
41775
  type
41737
41776
  }) {
41777
+ const cookieHeader = Object.entries({ "XSRF-TOKEN": "nocheck", ...cookies }).map(([name, value2]) => `${name}=${value2}`).join("; ");
41738
41778
  const client2 = (0, import_http_client2.createHttpClient)({
41739
41779
  baseURL: baseUrls[type],
41740
41780
  ...type !== "standalone" ? {
@@ -41744,7 +41784,7 @@ function createHttpClient({
41744
41784
  ...createHeaders2?.(),
41745
41785
  // See https://wix.slack.com/archives/C0JLGMT28/p1667219337530909
41746
41786
  "X-XSRF-TOKEN": "nocheck",
41747
- Cookie: "XSRF-TOKEN=nocheck",
41787
+ Cookie: cookieHeader,
41748
41788
  "User-Agent": "wix-cli"
41749
41789
  }),
41750
41790
  proxy: false,
@@ -55560,9 +55600,10 @@ var import_react94 = __toESM(require_react(), 1);
55560
55600
  var HttpClientContext = (0, import_react94.createContext)(null);
55561
55601
  var HttpClientProvider = ({
55562
55602
  children,
55563
- headers
55603
+ headers,
55604
+ cookies
55564
55605
  }) => {
55565
- return /* @__PURE__ */ import_react94.default.createElement(HttpClientContext.Provider, { value: { headers } }, children);
55606
+ return /* @__PURE__ */ import_react94.default.createElement(HttpClientContext.Provider, { value: { headers, cookies } }, children);
55566
55607
  };
55567
55608
 
55568
55609
  // ../cli-http-client-react/src/useHttpClient.ts
@@ -55575,6 +55616,7 @@ function useHttpClient({
55575
55616
  return (0, import_react95.useMemo)(
55576
55617
  () => createHttpClient({
55577
55618
  type,
55619
+ cookies: context2?.cookies,
55578
55620
  getAppToken: () => getAppToken({ siteId }),
55579
55621
  createHeaders: () => ({
55580
55622
  ...createAuthHeaders?.({ siteId }),
@@ -56796,7 +56838,7 @@ init_esm_shims();
56796
56838
  var package_default = {
56797
56839
  name: "@wix/create-app",
56798
56840
  description: "Create Wix apps",
56799
- version: "0.0.242",
56841
+ version: "0.0.244",
56800
56842
  author: "Ihor Machuzhak",
56801
56843
  bin: "bin/index.cjs",
56802
56844
  devDependencies: {
@@ -56806,7 +56848,7 @@ var package_default = {
56806
56848
  "@types/react": "^18.3.3",
56807
56849
  "@types/semver": "^7.5.8",
56808
56850
  "@types/validate-npm-package-name": "^4.0.2",
56809
- "@vercel/detect-agent": "^1.2.1",
56851
+ "@vercel/detect-agent": "^1.2.3",
56810
56852
  "@wix/bi-logger-dev-tools-data": "^1.169.0",
56811
56853
  "@wix/cli-auth": "workspace:*",
56812
56854
  "@wix/cli-error": "workspace:*",
@@ -63158,6 +63200,7 @@ var BackOfficeHostingPlatforms2;
63158
63200
  BackOfficeHostingPlatforms3["SYMPHONY"] = "SYMPHONY";
63159
63201
  BackOfficeHostingPlatforms3["BMR"] = "BMR";
63160
63202
  BackOfficeHostingPlatforms3["WIXEL_DASHBOARD"] = "WIXEL_DASHBOARD";
63203
+ BackOfficeHostingPlatforms3["CHANNELS_BACKOFFICE"] = "CHANNELS_BACKOFFICE";
63161
63204
  })(BackOfficeHostingPlatforms2 || (BackOfficeHostingPlatforms2 = {}));
63162
63205
  var BackOfficeScriptAssetType2;
63163
63206
  (function(BackOfficeScriptAssetType3) {
@@ -63454,6 +63497,7 @@ var ComponentType2;
63454
63497
  ComponentType3["EDITOR_EXPOSURE"] = "EDITOR_EXPOSURE";
63455
63498
  ComponentType3["TOOLS_PROVIDER_CONFIG"] = "TOOLS_PROVIDER_CONFIG";
63456
63499
  ComponentType3["APP_TOOLS"] = "APP_TOOLS";
63500
+ ComponentType3["ECOM_PURCHASE_RECOMMENDATIONS"] = "ECOM_PURCHASE_RECOMMENDATIONS";
63457
63501
  })(ComponentType2 || (ComponentType2 = {}));
63458
63502
  var AuthType;
63459
63503
  (function(AuthType2) {
@@ -65019,6 +65063,7 @@ var Tag2;
65019
65063
  Tag3["OWNER_CHECKOUT"] = "OWNER_CHECKOUT";
65020
65064
  Tag3["ECOM_PREVIEW_CHECKOUT"] = "ECOM_PREVIEW_CHECKOUT";
65021
65065
  Tag3["ALL_CATEGORIES"] = "ALL_CATEGORIES";
65066
+ Tag3["ECOM_TAX_GROUPS"] = "ECOM_TAX_GROUPS";
65022
65067
  })(Tag2 || (Tag2 = {}));
65023
65068
  var ThumbnailType2;
65024
65069
  (function(ThumbnailType3) {
@@ -65716,6 +65761,7 @@ var AssetType2;
65716
65761
  AssetType3["WIDGET"] = "WIDGET";
65717
65762
  AssetType3["FONT"] = "FONT";
65718
65763
  AssetType3["ICONS"] = "ICONS";
65764
+ AssetType3["STORY"] = "STORY";
65719
65765
  })(AssetType2 || (AssetType2 = {}));
65720
65766
  var FileMediaType;
65721
65767
  (function(FileMediaType2) {
@@ -65730,6 +65776,7 @@ var FileMediaType;
65730
65776
  var AnimationType;
65731
65777
  (function(AnimationType2) {
65732
65778
  AnimationType2["VIEW"] = "VIEW";
65779
+ AnimationType2["POINTER"] = "POINTER";
65733
65780
  })(AnimationType || (AnimationType = {}));
65734
65781
  var AppType3;
65735
65782
  (function(AppType5) {
@@ -66090,6 +66137,18 @@ var WidthType2;
66090
66137
  WidthType3["ORIGINAL"] = "ORIGINAL";
66091
66138
  WidthType3["FULL_WIDTH"] = "FULL_WIDTH";
66092
66139
  })(WidthType2 || (WidthType2 = {}));
66140
+ var PointerEffectType;
66141
+ (function(PointerEffectType2) {
66142
+ PointerEffectType2["AIRY"] = "AIRY";
66143
+ PointerEffectType2["BLOB"] = "BLOB";
66144
+ PointerEffectType2["BLUR"] = "BLUR";
66145
+ PointerEffectType2["SCALE"] = "SCALE";
66146
+ PointerEffectType2["SKEW"] = "SKEW";
66147
+ PointerEffectType2["SWIVEL"] = "SWIVEL";
66148
+ PointerEffectType2["TILT_3D"] = "TILT_3D";
66149
+ PointerEffectType2["TRACK"] = "TRACK";
66150
+ PointerEffectType2["TRACK_3D"] = "TRACK_3D";
66151
+ })(PointerEffectType || (PointerEffectType = {}));
66093
66152
  var BackgroundType2;
66094
66153
  (function(BackgroundType3) {
66095
66154
  BackgroundType3["COLOR"] = "COLOR";
@@ -67834,7 +67893,7 @@ function getTasks({
67834
67893
  cause: e2
67835
67894
  });
67836
67895
  }
67837
- const { generateApp } = await import("./generator-R6MCAQJ7.js");
67896
+ const { generateApp } = await import("./generator-6OIH2MBC.js");
67838
67897
  await generateApp({
67839
67898
  packageName,
67840
67899
  packageFolder,