@wix/cli 1.1.60 → 1.1.62

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.
Files changed (126) hide show
  1. package/build/{DevCommand-AEGLMQVP.js → DevCommand-NWZ75YTP.js} +16 -16
  2. package/build/{DevCommand-GO3Z73V7.js → DevCommand-ZNHBPCVV.js} +26 -876
  3. package/build/DevCommand-ZNHBPCVV.js.map +1 -0
  4. package/build/{LoginCommand-SGLKXJF6.js → LoginCommand-AQIYGH36.js} +11 -11
  5. package/build/{LogoutCommand-YL6M6BT7.js → LogoutCommand-LPI7NUZJ.js} +7 -7
  6. package/build/PreviewCommand-666UOTAN.js +471 -0
  7. package/build/PreviewCommand-666UOTAN.js.map +1 -0
  8. package/build/{WhoamiCommand-4EJZYY4W.js → WhoamiCommand-BWXA3TXF.js} +4 -4
  9. package/build/{chunk-LPA74SM5.js → chunk-45UEHUOD.js} +7 -7
  10. package/build/{chunk-WVS26NCB.js → chunk-4YD2W3LA.js} +470 -470
  11. package/build/chunk-4YD2W3LA.js.map +1 -0
  12. package/build/{chunk-XWFG3TRU.js → chunk-4ZQFECEW.js} +84 -17
  13. package/build/{chunk-XWFG3TRU.js.map → chunk-4ZQFECEW.js.map} +1 -1
  14. package/build/{chunk-CRXPC3TE.js → chunk-55EFTE5M.js} +2 -2
  15. package/build/chunk-6LI4WGAW.js +43 -0
  16. package/build/chunk-6LI4WGAW.js.map +1 -0
  17. package/build/chunk-6XRFJZTQ.js +74 -0
  18. package/build/chunk-6XRFJZTQ.js.map +1 -0
  19. package/build/{chunk-XANTHYQG.js → chunk-A6TCWKZD.js} +4 -4
  20. package/build/{chunk-XANTHYQG.js.map → chunk-A6TCWKZD.js.map} +1 -1
  21. package/build/{chunk-PGR3OZNK.js → chunk-D6HNYFE6.js} +6 -6
  22. package/build/{chunk-GFSMOEGG.js → chunk-DTRL25IG.js} +49 -18
  23. package/build/chunk-DTRL25IG.js.map +1 -0
  24. package/build/{chunk-VNZYI6OK.js → chunk-DVR2CMCO.js} +3 -3
  25. package/build/{chunk-EDNJGHVN.js → chunk-ETAVRPIY.js} +22 -7
  26. package/build/chunk-ETAVRPIY.js.map +1 -0
  27. package/build/{chunk-J2FXQRPG.js → chunk-G34I4OXF.js} +4 -4
  28. package/build/{chunk-SELJR2HV.js → chunk-IPI4IXDD.js} +12 -73
  29. package/build/chunk-IPI4IXDD.js.map +1 -0
  30. package/build/chunk-JIH3GSZJ.js +901 -0
  31. package/build/chunk-JIH3GSZJ.js.map +1 -0
  32. package/build/{chunk-LCYX5MZA.js → chunk-LWQGSEXR.js} +3 -3
  33. package/build/{chunk-DWEFYET4.js → chunk-NLMXNKQO.js} +14 -132
  34. package/build/chunk-NLMXNKQO.js.map +1 -0
  35. package/build/{chunk-2DE7QM5C.js → chunk-OEYFKLWJ.js} +2 -2
  36. package/build/chunk-OOWNEBOM.js +135 -0
  37. package/build/chunk-OOWNEBOM.js.map +1 -0
  38. package/build/{chunk-YQ2ZYOKK.js → chunk-OSWRZGLN.js} +6 -6
  39. package/build/{chunk-QZJC3FP3.js → chunk-PF4VD6IT.js} +5 -5
  40. package/build/{chunk-BNWDAMAL.js → chunk-PX2L3CCA.js} +2 -2
  41. package/build/chunk-PX2L3CCA.js.map +1 -0
  42. package/build/{chunk-5XUFGBCU.js → chunk-SEOIN2A6.js} +7 -3
  43. package/build/chunk-SEOIN2A6.js.map +1 -0
  44. package/build/{chunk-B23S4M74.js → chunk-TCSPCAZI.js} +4 -4
  45. package/build/{chunk-B23S4M74.js.map → chunk-TCSPCAZI.js.map} +1 -1
  46. package/build/{chunk-VRDC2KLN.js → chunk-VXGNI7CP.js} +5 -2
  47. package/build/{chunk-VRDC2KLN.js.map → chunk-VXGNI7CP.js.map} +1 -1
  48. package/build/{chunk-P5FUKDOS.js → chunk-WJQFCMN3.js} +6 -6
  49. package/build/{chunk-24KEFD7K.js → chunk-XOFZJ3JQ.js} +6 -6
  50. package/build/{chunk-G6TDIUNY.js → chunk-Y4ZVXLXY.js} +2 -2
  51. package/build/{chunk-OISYBAR4.js → chunk-Y5LMYOCJ.js} +606 -115
  52. package/build/chunk-Y5LMYOCJ.js.map +1 -0
  53. package/build/{chunk-GG7YZNYL.js → chunk-YQW75RJ5.js} +17 -7
  54. package/build/{chunk-GG7YZNYL.js.map → chunk-YQW75RJ5.js.map} +1 -1
  55. package/build/{chunk-GIS574I5.js → chunk-YYH6VZI3.js} +3 -14
  56. package/build/{chunk-GIS574I5.js.map → chunk-YYH6VZI3.js.map} +1 -1
  57. package/build/{chunk-BVAC4BZH.js → chunk-ZIXYUOVJ.js} +5 -5
  58. package/build/{chunk-RNMVLLSA.js → chunk-ZR5EKZZ3.js} +6 -6
  59. package/build/{dev-72CJF6Z6.js → dev-B7FMRZWG.js} +30 -30
  60. package/build/dev-B7FMRZWG.js.map +1 -0
  61. package/build/index.js +3551 -10600
  62. package/build/index.js.map +1 -1
  63. package/build/{install-7NZK44CY.js → install-B37NJYMG.js} +20 -19
  64. package/build/{install-7NZK44CY.js.map → install-B37NJYMG.js.map} +1 -1
  65. package/build/{preview-NIPXK2PL.js → preview-W5ZYLI5U.js} +22 -20
  66. package/build/{preview-NIPXK2PL.js.map → preview-W5ZYLI5U.js.map} +1 -1
  67. package/build/{publish-Z3WVKI47.js → publish-KZKBMTND.js} +28 -25
  68. package/build/publish-KZKBMTND.js.map +1 -0
  69. package/build/{render-command-OTTR4HS4.js → render-command-FWDU3W5M.js} +11 -11
  70. package/build/{render-command-I6OSOLTK.js → render-command-S7D3MWYC.js} +10 -10
  71. package/build/{render-command-GJLP3KAJ.js → render-command-TKO7PYVO.js} +12 -12
  72. package/build/{run-command-BR7STFFP.js → run-command-YYML7BJX.js} +9 -9
  73. package/build/{src-U45WATPX.js → src-5VO6B75Q.js} +17 -17
  74. package/build/{src-U7SGKJCW.js → src-DVFFJLN5.js} +2 -2
  75. package/build/{src-7HIQOGPY.js → src-GQFPGSHL.js} +7 -7
  76. package/build/{src-IRKCACSZ.js → src-IMPYJZRW.js} +20 -8
  77. package/build/src-IMPYJZRW.js.map +1 -0
  78. package/build/{src-QCND6FA3.js → src-SCGDSQRH.js} +6 -6
  79. package/build/{src-QJJ7EIYT.js → src-WV4RZ4FT.js} +6 -6
  80. package/build/sync-types-M76E2RFC.js +30 -0
  81. package/build/{uninstall-KQDD5ADQ.js → uninstall-LDNBVTQR.js} +19 -18
  82. package/build/{uninstall-KQDD5ADQ.js.map → uninstall-LDNBVTQR.js.map} +1 -1
  83. package/package.json +2 -2
  84. package/build/DevCommand-GO3Z73V7.js.map +0 -1
  85. package/build/chunk-5XUFGBCU.js.map +0 -1
  86. package/build/chunk-BNWDAMAL.js.map +0 -1
  87. package/build/chunk-DWEFYET4.js.map +0 -1
  88. package/build/chunk-EDNJGHVN.js.map +0 -1
  89. package/build/chunk-GFSMOEGG.js.map +0 -1
  90. package/build/chunk-OISYBAR4.js.map +0 -1
  91. package/build/chunk-SELJR2HV.js.map +0 -1
  92. package/build/chunk-WVS26NCB.js.map +0 -1
  93. package/build/chunk-YXFEXGAH.js +0 -479
  94. package/build/chunk-YXFEXGAH.js.map +0 -1
  95. package/build/dev-72CJF6Z6.js.map +0 -1
  96. package/build/publish-Z3WVKI47.js.map +0 -1
  97. package/build/src-IRKCACSZ.js.map +0 -1
  98. package/build/sync-types-JLBBFIOB.js +0 -30
  99. /package/build/{DevCommand-AEGLMQVP.js.map → DevCommand-NWZ75YTP.js.map} +0 -0
  100. /package/build/{LoginCommand-SGLKXJF6.js.map → LoginCommand-AQIYGH36.js.map} +0 -0
  101. /package/build/{LogoutCommand-YL6M6BT7.js.map → LogoutCommand-LPI7NUZJ.js.map} +0 -0
  102. /package/build/{WhoamiCommand-4EJZYY4W.js.map → WhoamiCommand-BWXA3TXF.js.map} +0 -0
  103. /package/build/{chunk-LPA74SM5.js.map → chunk-45UEHUOD.js.map} +0 -0
  104. /package/build/{chunk-CRXPC3TE.js.map → chunk-55EFTE5M.js.map} +0 -0
  105. /package/build/{chunk-PGR3OZNK.js.map → chunk-D6HNYFE6.js.map} +0 -0
  106. /package/build/{chunk-VNZYI6OK.js.map → chunk-DVR2CMCO.js.map} +0 -0
  107. /package/build/{chunk-J2FXQRPG.js.map → chunk-G34I4OXF.js.map} +0 -0
  108. /package/build/{chunk-LCYX5MZA.js.map → chunk-LWQGSEXR.js.map} +0 -0
  109. /package/build/{chunk-2DE7QM5C.js.map → chunk-OEYFKLWJ.js.map} +0 -0
  110. /package/build/{chunk-YQ2ZYOKK.js.map → chunk-OSWRZGLN.js.map} +0 -0
  111. /package/build/{chunk-QZJC3FP3.js.map → chunk-PF4VD6IT.js.map} +0 -0
  112. /package/build/{chunk-P5FUKDOS.js.map → chunk-WJQFCMN3.js.map} +0 -0
  113. /package/build/{chunk-24KEFD7K.js.map → chunk-XOFZJ3JQ.js.map} +0 -0
  114. /package/build/{chunk-G6TDIUNY.js.map → chunk-Y4ZVXLXY.js.map} +0 -0
  115. /package/build/{chunk-BVAC4BZH.js.map → chunk-ZIXYUOVJ.js.map} +0 -0
  116. /package/build/{chunk-RNMVLLSA.js.map → chunk-ZR5EKZZ3.js.map} +0 -0
  117. /package/build/{render-command-OTTR4HS4.js.map → render-command-FWDU3W5M.js.map} +0 -0
  118. /package/build/{render-command-I6OSOLTK.js.map → render-command-S7D3MWYC.js.map} +0 -0
  119. /package/build/{render-command-GJLP3KAJ.js.map → render-command-TKO7PYVO.js.map} +0 -0
  120. /package/build/{run-command-BR7STFFP.js.map → run-command-YYML7BJX.js.map} +0 -0
  121. /package/build/{src-U45WATPX.js.map → src-5VO6B75Q.js.map} +0 -0
  122. /package/build/{src-7HIQOGPY.js.map → src-DVFFJLN5.js.map} +0 -0
  123. /package/build/{src-QCND6FA3.js.map → src-GQFPGSHL.js.map} +0 -0
  124. /package/build/{src-U7SGKJCW.js.map → src-SCGDSQRH.js.map} +0 -0
  125. /package/build/{src-QJJ7EIYT.js.map → src-WV4RZ4FT.js.map} +0 -0
  126. /package/build/{sync-types-JLBBFIOB.js.map → sync-types-M76E2RFC.js.map} +0 -0
@@ -4,19 +4,19 @@ import {
4
4
  require_isexe
5
5
  } from "./chunk-OJHDGJWP.js";
6
6
  import {
7
- require_http_cache_semantics
8
- } from "./chunk-YXFEXGAH.js";
7
+ GridAppLayout
8
+ } from "./chunk-6LI4WGAW.js";
9
9
  import {
10
10
  resolveUrl,
11
11
  serializer,
12
12
  toURLSearchParams
13
- } from "./chunk-24KEFD7K.js";
13
+ } from "./chunk-XOFZJ3JQ.js";
14
14
  import {
15
15
  require_clean,
16
16
  require_is_core_module,
17
17
  require_semver,
18
18
  require_valid
19
- } from "./chunk-XWFG3TRU.js";
19
+ } from "./chunk-4ZQFECEW.js";
20
20
  import {
21
21
  require_index_node,
22
22
  require_ms,
@@ -24,10 +24,10 @@ import {
24
24
  } from "./chunk-WN3D6AOY.js";
25
25
  import {
26
26
  z
27
- } from "./chunk-BNWDAMAL.js";
27
+ } from "./chunk-PX2L3CCA.js";
28
28
  import {
29
29
  require_verror
30
- } from "./chunk-GG7YZNYL.js";
30
+ } from "./chunk-YQW75RJ5.js";
31
31
  import {
32
32
  __commonJS,
33
33
  __dirname,
@@ -34881,6 +34881,474 @@ var require_options = __commonJS({
34881
34881
  }
34882
34882
  });
34883
34883
 
34884
+ // ../../node_modules/http-cache-semantics/index.js
34885
+ var require_http_cache_semantics = __commonJS({
34886
+ "../../node_modules/http-cache-semantics/index.js"(exports2, module2) {
34887
+ "use strict";
34888
+ init_esm_shims();
34889
+ var statusCodeCacheableByDefault = /* @__PURE__ */ new Set([
34890
+ 200,
34891
+ 203,
34892
+ 204,
34893
+ 206,
34894
+ 300,
34895
+ 301,
34896
+ 308,
34897
+ 404,
34898
+ 405,
34899
+ 410,
34900
+ 414,
34901
+ 501
34902
+ ]);
34903
+ var understoodStatuses = /* @__PURE__ */ new Set([
34904
+ 200,
34905
+ 203,
34906
+ 204,
34907
+ 300,
34908
+ 301,
34909
+ 302,
34910
+ 303,
34911
+ 307,
34912
+ 308,
34913
+ 404,
34914
+ 405,
34915
+ 410,
34916
+ 414,
34917
+ 501
34918
+ ]);
34919
+ var errorStatusCodes = /* @__PURE__ */ new Set([
34920
+ 500,
34921
+ 502,
34922
+ 503,
34923
+ 504
34924
+ ]);
34925
+ var hopByHopHeaders = {
34926
+ date: true,
34927
+ // included, because we add Age update Date
34928
+ connection: true,
34929
+ "keep-alive": true,
34930
+ "proxy-authenticate": true,
34931
+ "proxy-authorization": true,
34932
+ te: true,
34933
+ trailer: true,
34934
+ "transfer-encoding": true,
34935
+ upgrade: true
34936
+ };
34937
+ var excludedFromRevalidationUpdate = {
34938
+ // Since the old body is reused, it doesn't make sense to change properties of the body
34939
+ "content-length": true,
34940
+ "content-encoding": true,
34941
+ "transfer-encoding": true,
34942
+ "content-range": true
34943
+ };
34944
+ function toNumberOrZero(s) {
34945
+ const n = parseInt(s, 10);
34946
+ return isFinite(n) ? n : 0;
34947
+ }
34948
+ function isErrorResponse(response) {
34949
+ if (!response) {
34950
+ return true;
34951
+ }
34952
+ return errorStatusCodes.has(response.status);
34953
+ }
34954
+ function parseCacheControl(header) {
34955
+ const cc = {};
34956
+ if (!header) return cc;
34957
+ const parts = header.trim().split(/,/);
34958
+ for (const part of parts) {
34959
+ const [k, v] = part.split(/=/, 2);
34960
+ cc[k.trim()] = v === void 0 ? true : v.trim().replace(/^"|"$/g, "");
34961
+ }
34962
+ return cc;
34963
+ }
34964
+ function formatCacheControl(cc) {
34965
+ let parts = [];
34966
+ for (const k in cc) {
34967
+ const v = cc[k];
34968
+ parts.push(v === true ? k : k + "=" + v);
34969
+ }
34970
+ if (!parts.length) {
34971
+ return void 0;
34972
+ }
34973
+ return parts.join(", ");
34974
+ }
34975
+ module2.exports = class CachePolicy {
34976
+ constructor(req, res, {
34977
+ shared,
34978
+ cacheHeuristic,
34979
+ immutableMinTimeToLive,
34980
+ ignoreCargoCult,
34981
+ _fromObject
34982
+ } = {}) {
34983
+ if (_fromObject) {
34984
+ this._fromObject(_fromObject);
34985
+ return;
34986
+ }
34987
+ if (!res || !res.headers) {
34988
+ throw Error("Response headers missing");
34989
+ }
34990
+ this._assertRequestHasHeaders(req);
34991
+ this._responseTime = this.now();
34992
+ this._isShared = shared !== false;
34993
+ this._cacheHeuristic = void 0 !== cacheHeuristic ? cacheHeuristic : 0.1;
34994
+ this._immutableMinTtl = void 0 !== immutableMinTimeToLive ? immutableMinTimeToLive : 24 * 3600 * 1e3;
34995
+ this._status = "status" in res ? res.status : 200;
34996
+ this._resHeaders = res.headers;
34997
+ this._rescc = parseCacheControl(res.headers["cache-control"]);
34998
+ this._method = "method" in req ? req.method : "GET";
34999
+ this._url = req.url;
35000
+ this._host = req.headers.host;
35001
+ this._noAuthorization = !req.headers.authorization;
35002
+ this._reqHeaders = res.headers.vary ? req.headers : null;
35003
+ this._reqcc = parseCacheControl(req.headers["cache-control"]);
35004
+ if (ignoreCargoCult && "pre-check" in this._rescc && "post-check" in this._rescc) {
35005
+ delete this._rescc["pre-check"];
35006
+ delete this._rescc["post-check"];
35007
+ delete this._rescc["no-cache"];
35008
+ delete this._rescc["no-store"];
35009
+ delete this._rescc["must-revalidate"];
35010
+ this._resHeaders = Object.assign({}, this._resHeaders, {
35011
+ "cache-control": formatCacheControl(this._rescc)
35012
+ });
35013
+ delete this._resHeaders.expires;
35014
+ delete this._resHeaders.pragma;
35015
+ }
35016
+ if (res.headers["cache-control"] == null && /no-cache/.test(res.headers.pragma)) {
35017
+ this._rescc["no-cache"] = true;
35018
+ }
35019
+ }
35020
+ now() {
35021
+ return Date.now();
35022
+ }
35023
+ storable() {
35024
+ return !!(!this._reqcc["no-store"] && // A cache MUST NOT store a response to any request, unless:
35025
+ // The request method is understood by the cache and defined as being cacheable, and
35026
+ ("GET" === this._method || "HEAD" === this._method || "POST" === this._method && this._hasExplicitExpiration()) && // the response status code is understood by the cache, and
35027
+ understoodStatuses.has(this._status) && // the "no-store" cache directive does not appear in request or response header fields, and
35028
+ !this._rescc["no-store"] && // the "private" response directive does not appear in the response, if the cache is shared, and
35029
+ (!this._isShared || !this._rescc.private) && // the Authorization header field does not appear in the request, if the cache is shared,
35030
+ (!this._isShared || this._noAuthorization || this._allowsStoringAuthenticated()) && // the response either:
35031
+ // contains an Expires header field, or
35032
+ (this._resHeaders.expires || // contains a max-age response directive, or
35033
+ // contains a s-maxage response directive and the cache is shared, or
35034
+ // contains a public response directive.
35035
+ this._rescc["max-age"] || this._isShared && this._rescc["s-maxage"] || this._rescc.public || // has a status code that is defined as cacheable by default
35036
+ statusCodeCacheableByDefault.has(this._status)));
35037
+ }
35038
+ _hasExplicitExpiration() {
35039
+ return this._isShared && this._rescc["s-maxage"] || this._rescc["max-age"] || this._resHeaders.expires;
35040
+ }
35041
+ _assertRequestHasHeaders(req) {
35042
+ if (!req || !req.headers) {
35043
+ throw Error("Request headers missing");
35044
+ }
35045
+ }
35046
+ satisfiesWithoutRevalidation(req) {
35047
+ this._assertRequestHasHeaders(req);
35048
+ const requestCC = parseCacheControl(req.headers["cache-control"]);
35049
+ if (requestCC["no-cache"] || /no-cache/.test(req.headers.pragma)) {
35050
+ return false;
35051
+ }
35052
+ if (requestCC["max-age"] && this.age() > requestCC["max-age"]) {
35053
+ return false;
35054
+ }
35055
+ if (requestCC["min-fresh"] && this.timeToLive() < 1e3 * requestCC["min-fresh"]) {
35056
+ return false;
35057
+ }
35058
+ if (this.stale()) {
35059
+ const allowsStale = requestCC["max-stale"] && !this._rescc["must-revalidate"] && (true === requestCC["max-stale"] || requestCC["max-stale"] > this.age() - this.maxAge());
35060
+ if (!allowsStale) {
35061
+ return false;
35062
+ }
35063
+ }
35064
+ return this._requestMatches(req, false);
35065
+ }
35066
+ _requestMatches(req, allowHeadMethod) {
35067
+ return (!this._url || this._url === req.url) && this._host === req.headers.host && // the request method associated with the stored response allows it to be used for the presented request, and
35068
+ (!req.method || this._method === req.method || allowHeadMethod && "HEAD" === req.method) && // selecting header fields nominated by the stored response (if any) match those presented, and
35069
+ this._varyMatches(req);
35070
+ }
35071
+ _allowsStoringAuthenticated() {
35072
+ return this._rescc["must-revalidate"] || this._rescc.public || this._rescc["s-maxage"];
35073
+ }
35074
+ _varyMatches(req) {
35075
+ if (!this._resHeaders.vary) {
35076
+ return true;
35077
+ }
35078
+ if (this._resHeaders.vary === "*") {
35079
+ return false;
35080
+ }
35081
+ const fields = this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);
35082
+ for (const name of fields) {
35083
+ if (req.headers[name] !== this._reqHeaders[name]) return false;
35084
+ }
35085
+ return true;
35086
+ }
35087
+ _copyWithoutHopByHopHeaders(inHeaders) {
35088
+ const headers = {};
35089
+ for (const name in inHeaders) {
35090
+ if (hopByHopHeaders[name]) continue;
35091
+ headers[name] = inHeaders[name];
35092
+ }
35093
+ if (inHeaders.connection) {
35094
+ const tokens = inHeaders.connection.trim().split(/\s*,\s*/);
35095
+ for (const name of tokens) {
35096
+ delete headers[name];
35097
+ }
35098
+ }
35099
+ if (headers.warning) {
35100
+ const warnings = headers.warning.split(/,/).filter((warning) => {
35101
+ return !/^\s*1[0-9][0-9]/.test(warning);
35102
+ });
35103
+ if (!warnings.length) {
35104
+ delete headers.warning;
35105
+ } else {
35106
+ headers.warning = warnings.join(",").trim();
35107
+ }
35108
+ }
35109
+ return headers;
35110
+ }
35111
+ responseHeaders() {
35112
+ const headers = this._copyWithoutHopByHopHeaders(this._resHeaders);
35113
+ const age = this.age();
35114
+ if (age > 3600 * 24 && !this._hasExplicitExpiration() && this.maxAge() > 3600 * 24) {
35115
+ headers.warning = (headers.warning ? `${headers.warning}, ` : "") + '113 - "rfc7234 5.5.4"';
35116
+ }
35117
+ headers.age = `${Math.round(age)}`;
35118
+ headers.date = new Date(this.now()).toUTCString();
35119
+ return headers;
35120
+ }
35121
+ /**
35122
+ * Value of the Date response header or current time if Date was invalid
35123
+ * @return timestamp
35124
+ */
35125
+ date() {
35126
+ const serverDate = Date.parse(this._resHeaders.date);
35127
+ if (isFinite(serverDate)) {
35128
+ return serverDate;
35129
+ }
35130
+ return this._responseTime;
35131
+ }
35132
+ /**
35133
+ * Value of the Age header, in seconds, updated for the current time.
35134
+ * May be fractional.
35135
+ *
35136
+ * @return Number
35137
+ */
35138
+ age() {
35139
+ let age = this._ageValue();
35140
+ const residentTime = (this.now() - this._responseTime) / 1e3;
35141
+ return age + residentTime;
35142
+ }
35143
+ _ageValue() {
35144
+ return toNumberOrZero(this._resHeaders.age);
35145
+ }
35146
+ /**
35147
+ * Value of applicable max-age (or heuristic equivalent) in seconds. This counts since response's `Date`.
35148
+ *
35149
+ * For an up-to-date value, see `timeToLive()`.
35150
+ *
35151
+ * @return Number
35152
+ */
35153
+ maxAge() {
35154
+ if (!this.storable() || this._rescc["no-cache"]) {
35155
+ return 0;
35156
+ }
35157
+ if (this._isShared && (this._resHeaders["set-cookie"] && !this._rescc.public && !this._rescc.immutable)) {
35158
+ return 0;
35159
+ }
35160
+ if (this._resHeaders.vary === "*") {
35161
+ return 0;
35162
+ }
35163
+ if (this._isShared) {
35164
+ if (this._rescc["proxy-revalidate"]) {
35165
+ return 0;
35166
+ }
35167
+ if (this._rescc["s-maxage"]) {
35168
+ return toNumberOrZero(this._rescc["s-maxage"]);
35169
+ }
35170
+ }
35171
+ if (this._rescc["max-age"]) {
35172
+ return toNumberOrZero(this._rescc["max-age"]);
35173
+ }
35174
+ const defaultMinTtl = this._rescc.immutable ? this._immutableMinTtl : 0;
35175
+ const serverDate = this.date();
35176
+ if (this._resHeaders.expires) {
35177
+ const expires = Date.parse(this._resHeaders.expires);
35178
+ if (Number.isNaN(expires) || expires < serverDate) {
35179
+ return 0;
35180
+ }
35181
+ return Math.max(defaultMinTtl, (expires - serverDate) / 1e3);
35182
+ }
35183
+ if (this._resHeaders["last-modified"]) {
35184
+ const lastModified = Date.parse(this._resHeaders["last-modified"]);
35185
+ if (isFinite(lastModified) && serverDate > lastModified) {
35186
+ return Math.max(
35187
+ defaultMinTtl,
35188
+ (serverDate - lastModified) / 1e3 * this._cacheHeuristic
35189
+ );
35190
+ }
35191
+ }
35192
+ return defaultMinTtl;
35193
+ }
35194
+ timeToLive() {
35195
+ const age = this.maxAge() - this.age();
35196
+ const staleIfErrorAge = age + toNumberOrZero(this._rescc["stale-if-error"]);
35197
+ const staleWhileRevalidateAge = age + toNumberOrZero(this._rescc["stale-while-revalidate"]);
35198
+ return Math.max(0, age, staleIfErrorAge, staleWhileRevalidateAge) * 1e3;
35199
+ }
35200
+ stale() {
35201
+ return this.maxAge() <= this.age();
35202
+ }
35203
+ _useStaleIfError() {
35204
+ return this.maxAge() + toNumberOrZero(this._rescc["stale-if-error"]) > this.age();
35205
+ }
35206
+ useStaleWhileRevalidate() {
35207
+ return this.maxAge() + toNumberOrZero(this._rescc["stale-while-revalidate"]) > this.age();
35208
+ }
35209
+ static fromObject(obj) {
35210
+ return new this(void 0, void 0, { _fromObject: obj });
35211
+ }
35212
+ _fromObject(obj) {
35213
+ if (this._responseTime) throw Error("Reinitialized");
35214
+ if (!obj || obj.v !== 1) throw Error("Invalid serialization");
35215
+ this._responseTime = obj.t;
35216
+ this._isShared = obj.sh;
35217
+ this._cacheHeuristic = obj.ch;
35218
+ this._immutableMinTtl = obj.imm !== void 0 ? obj.imm : 24 * 3600 * 1e3;
35219
+ this._status = obj.st;
35220
+ this._resHeaders = obj.resh;
35221
+ this._rescc = obj.rescc;
35222
+ this._method = obj.m;
35223
+ this._url = obj.u;
35224
+ this._host = obj.h;
35225
+ this._noAuthorization = obj.a;
35226
+ this._reqHeaders = obj.reqh;
35227
+ this._reqcc = obj.reqcc;
35228
+ }
35229
+ toObject() {
35230
+ return {
35231
+ v: 1,
35232
+ t: this._responseTime,
35233
+ sh: this._isShared,
35234
+ ch: this._cacheHeuristic,
35235
+ imm: this._immutableMinTtl,
35236
+ st: this._status,
35237
+ resh: this._resHeaders,
35238
+ rescc: this._rescc,
35239
+ m: this._method,
35240
+ u: this._url,
35241
+ h: this._host,
35242
+ a: this._noAuthorization,
35243
+ reqh: this._reqHeaders,
35244
+ reqcc: this._reqcc
35245
+ };
35246
+ }
35247
+ /**
35248
+ * Headers for sending to the origin server to revalidate stale response.
35249
+ * Allows server to return 304 to allow reuse of the previous response.
35250
+ *
35251
+ * Hop by hop headers are always stripped.
35252
+ * Revalidation headers may be added or removed, depending on request.
35253
+ */
35254
+ revalidationHeaders(incomingReq) {
35255
+ this._assertRequestHasHeaders(incomingReq);
35256
+ const headers = this._copyWithoutHopByHopHeaders(incomingReq.headers);
35257
+ delete headers["if-range"];
35258
+ if (!this._requestMatches(incomingReq, true) || !this.storable()) {
35259
+ delete headers["if-none-match"];
35260
+ delete headers["if-modified-since"];
35261
+ return headers;
35262
+ }
35263
+ if (this._resHeaders.etag) {
35264
+ headers["if-none-match"] = headers["if-none-match"] ? `${headers["if-none-match"]}, ${this._resHeaders.etag}` : this._resHeaders.etag;
35265
+ }
35266
+ const forbidsWeakValidators = headers["accept-ranges"] || headers["if-match"] || headers["if-unmodified-since"] || this._method && this._method != "GET";
35267
+ if (forbidsWeakValidators) {
35268
+ delete headers["if-modified-since"];
35269
+ if (headers["if-none-match"]) {
35270
+ const etags = headers["if-none-match"].split(/,/).filter((etag) => {
35271
+ return !/^\s*W\//.test(etag);
35272
+ });
35273
+ if (!etags.length) {
35274
+ delete headers["if-none-match"];
35275
+ } else {
35276
+ headers["if-none-match"] = etags.join(",").trim();
35277
+ }
35278
+ }
35279
+ } else if (this._resHeaders["last-modified"] && !headers["if-modified-since"]) {
35280
+ headers["if-modified-since"] = this._resHeaders["last-modified"];
35281
+ }
35282
+ return headers;
35283
+ }
35284
+ /**
35285
+ * Creates new CachePolicy with information combined from the previews response,
35286
+ * and the new revalidation response.
35287
+ *
35288
+ * Returns {policy, modified} where modified is a boolean indicating
35289
+ * whether the response body has been modified, and old cached body can't be used.
35290
+ *
35291
+ * @return {Object} {policy: CachePolicy, modified: Boolean}
35292
+ */
35293
+ revalidatedPolicy(request, response) {
35294
+ this._assertRequestHasHeaders(request);
35295
+ if (this._useStaleIfError() && isErrorResponse(response)) {
35296
+ return {
35297
+ modified: false,
35298
+ matches: false,
35299
+ policy: this
35300
+ };
35301
+ }
35302
+ if (!response || !response.headers) {
35303
+ throw Error("Response headers missing");
35304
+ }
35305
+ let matches = false;
35306
+ if (response.status !== void 0 && response.status != 304) {
35307
+ matches = false;
35308
+ } else if (response.headers.etag && !/^\s*W\//.test(response.headers.etag)) {
35309
+ matches = this._resHeaders.etag && this._resHeaders.etag.replace(/^\s*W\//, "") === response.headers.etag;
35310
+ } else if (this._resHeaders.etag && response.headers.etag) {
35311
+ matches = this._resHeaders.etag.replace(/^\s*W\//, "") === response.headers.etag.replace(/^\s*W\//, "");
35312
+ } else if (this._resHeaders["last-modified"]) {
35313
+ matches = this._resHeaders["last-modified"] === response.headers["last-modified"];
35314
+ } else {
35315
+ if (!this._resHeaders.etag && !this._resHeaders["last-modified"] && !response.headers.etag && !response.headers["last-modified"]) {
35316
+ matches = true;
35317
+ }
35318
+ }
35319
+ if (!matches) {
35320
+ return {
35321
+ policy: new this.constructor(request, response),
35322
+ // Client receiving 304 without body, even if it's invalid/mismatched has no option
35323
+ // but to reuse a cached body. We don't have a good way to tell clients to do
35324
+ // error recovery in such case.
35325
+ modified: response.status != 304,
35326
+ matches: false
35327
+ };
35328
+ }
35329
+ const headers = {};
35330
+ for (const k in this._resHeaders) {
35331
+ headers[k] = k in response.headers && !excludedFromRevalidationUpdate[k] ? response.headers[k] : this._resHeaders[k];
35332
+ }
35333
+ const newResponse = Object.assign({}, response, {
35334
+ status: this._status,
35335
+ method: this._method,
35336
+ headers
35337
+ });
35338
+ return {
35339
+ policy: new this.constructor(request, newResponse, {
35340
+ shared: this._isShared,
35341
+ cacheHeuristic: this._cacheHeuristic,
35342
+ immutableMinTimeToLive: this._immutableMinTtl
35343
+ }),
35344
+ modified: false,
35345
+ matches: true
35346
+ };
35347
+ }
35348
+ };
35349
+ }
35350
+ });
35351
+
34884
35352
  // ../../node_modules/negotiator/lib/charset.js
34885
35353
  var require_charset = __commonJS({
34886
35354
  "../../node_modules/negotiator/lib/charset.js"(exports2, module2) {
@@ -49223,6 +49691,46 @@ var require_types_impl = __commonJS({
49223
49691
  }
49224
49692
  });
49225
49693
 
49694
+ // ../../node_modules/@wix/ambassador-velo-ide-v1-gridapp-filestructure/build/cjs/types.impl.js
49695
+ var require_types_impl2 = __commonJS({
49696
+ "../../node_modules/@wix/ambassador-velo-ide-v1-gridapp-filestructure/build/cjs/types.impl.js"(exports2) {
49697
+ "use strict";
49698
+ init_esm_shims();
49699
+ Object.defineProperty(exports2, "__esModule", { value: true });
49700
+ exports2.WebhookIdentityType = exports2.Action = exports2.GridAppLayout = exports2.FileType = void 0;
49701
+ var FileType;
49702
+ (function(FileType2) {
49703
+ FileType2["FILE"] = "FILE";
49704
+ FileType2["DIRECTORY"] = "DIRECTORY";
49705
+ })(FileType = exports2.FileType || (exports2.FileType = {}));
49706
+ var GridAppLayout3;
49707
+ (function(GridAppLayout4) {
49708
+ GridAppLayout4["UNKNOWN_GRID_APP_LAYOUT"] = "UNKNOWN_GRID_APP_LAYOUT";
49709
+ GridAppLayout4["ONLINE"] = "ONLINE";
49710
+ GridAppLayout4["GITHUB"] = "GITHUB";
49711
+ GridAppLayout4["GITHUB_BLOCKS"] = "GITHUB_BLOCKS";
49712
+ GridAppLayout4["WIX_IDE"] = "WIX_IDE";
49713
+ })(GridAppLayout3 = exports2.GridAppLayout || (exports2.GridAppLayout = {}));
49714
+ var Action;
49715
+ (function(Action2) {
49716
+ Action2["UNKNOWN"] = "UNKNOWN";
49717
+ Action2["UPDATE"] = "UPDATE";
49718
+ Action2["CREATE"] = "CREATE";
49719
+ Action2["MOVE"] = "MOVE";
49720
+ Action2["OVERWRITE"] = "OVERWRITE";
49721
+ Action2["COPY"] = "COPY";
49722
+ })(Action = exports2.Action || (exports2.Action = {}));
49723
+ var WebhookIdentityType;
49724
+ (function(WebhookIdentityType2) {
49725
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
49726
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
49727
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
49728
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
49729
+ WebhookIdentityType2["APP"] = "APP";
49730
+ })(WebhookIdentityType = exports2.WebhookIdentityType || (exports2.WebhookIdentityType = {}));
49731
+ }
49732
+ });
49733
+
49226
49734
  // ../../node_modules/@wix/velo-site-types-syncer/build/index.js
49227
49735
  init_esm_shims();
49228
49736
  import { mkdir as mkdir5 } from "node:fs/promises";
@@ -49385,11 +49893,18 @@ async function pRetry(input, options) {
49385
49893
 
49386
49894
  // ../../node_modules/@wix/velo-site-types-syncer/build/index.js
49387
49895
  var import_comment_json2 = __toESM(require_src3(), 1);
49896
+ var import_http_client = __toESM(require_index_node(), 1);
49388
49897
  import { join as join3 } from "node:path";
49389
49898
  import { mkdir as mkdir2 } from "node:fs/promises";
49390
49899
  import { join as join32, dirname as dirname2, relative as relative22 } from "node:path";
49391
- import { mkdir as mkdir3, writeFile as writeFile3, rm, readFile as readFile3 } from "node:fs/promises";
49392
- import path, { dirname as dirname3, join as join5, relative as relative4 } from "node:path";
49900
+ import { mkdir as mkdir3, writeFile as writeFile3, rm as rm2, readFile as readFile3 } from "node:fs/promises";
49901
+ import path, { dirname as dirname3, join as join6, relative as relative4 } from "node:path";
49902
+ var import_verror2 = __toESM(require_verror(), 1);
49903
+ var import_types = __toESM(require_types_impl(), 1);
49904
+ var import_types_impl = __toESM(require_types_impl2(), 1);
49905
+ import { join as join5 } from "node:path";
49906
+ import { readdir, rm, unlink } from "node:fs/promises";
49907
+ import { existsSync } from "node:fs";
49393
49908
  import process2 from "node:process";
49394
49909
 
49395
49910
  // ../../node_modules/@wix/ambassador-typok-v1-site/build/es/http.impl.js
@@ -49553,49 +50068,10 @@ function getLatestPageTypes(payload) {
49553
50068
  getLatestPageTypes.__isAmbassador = true;
49554
50069
 
49555
50070
  // ../../node_modules/@wix/velo-site-types-syncer/build/index.js
49556
- var import_verror2 = __toESM(require_verror(), 1);
49557
- var import_http_client = __toESM(require_index_node(), 1);
49558
50071
  var import_verror3 = __toESM(require_verror(), 1);
49559
- var import_types = __toESM(require_types_impl(), 1);
49560
- import { join as join6 } from "node:path";
49561
- import { readdir, rm as rm2, unlink } from "node:fs/promises";
49562
- import { existsSync } from "node:fs";
49563
50072
  import { join as join7 } from "node:path";
49564
50073
  import { mkdir as mkdir4 } from "node:fs/promises";
49565
50074
 
49566
- // ../../node_modules/@wix/ambassador-velo-ide-v1-gridapp-filestructure/build/es/types.impl.js
49567
- init_esm_shims();
49568
- var FileType;
49569
- (function(FileType2) {
49570
- FileType2["FILE"] = "FILE";
49571
- FileType2["DIRECTORY"] = "DIRECTORY";
49572
- })(FileType || (FileType = {}));
49573
- var GridAppLayout;
49574
- (function(GridAppLayout3) {
49575
- GridAppLayout3["UNKNOWN_GRID_APP_LAYOUT"] = "UNKNOWN_GRID_APP_LAYOUT";
49576
- GridAppLayout3["ONLINE"] = "ONLINE";
49577
- GridAppLayout3["GITHUB"] = "GITHUB";
49578
- GridAppLayout3["GITHUB_BLOCKS"] = "GITHUB_BLOCKS";
49579
- GridAppLayout3["WIX_IDE"] = "WIX_IDE";
49580
- })(GridAppLayout || (GridAppLayout = {}));
49581
- var Action;
49582
- (function(Action2) {
49583
- Action2["UNKNOWN"] = "UNKNOWN";
49584
- Action2["UPDATE"] = "UPDATE";
49585
- Action2["CREATE"] = "CREATE";
49586
- Action2["MOVE"] = "MOVE";
49587
- Action2["OVERWRITE"] = "OVERWRITE";
49588
- Action2["COPY"] = "COPY";
49589
- })(Action || (Action = {}));
49590
- var WebhookIdentityType;
49591
- (function(WebhookIdentityType2) {
49592
- WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
49593
- WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
49594
- WebhookIdentityType2["MEMBER"] = "MEMBER";
49595
- WebhookIdentityType2["WIX_USER"] = "WIX_USER";
49596
- WebhookIdentityType2["APP"] = "APP";
49597
- })(WebhookIdentityType || (WebhookIdentityType = {}));
49598
-
49599
50075
  // ../../node_modules/@wix/ambassador-velo-ide-v1-path-transform/build/es/http.impl.js
49600
50076
  init_esm_shims();
49601
50077
  var _transformPathRequest = {};
@@ -50019,6 +50495,70 @@ async function updateRootConfigPageReferences(projectFolder, createdPageIds, rem
50019
50495
  );
50020
50496
  await writeRootConfig(projectFolder, rootConfig);
50021
50497
  }
50498
+ async function httpRequest(opts, requestOptions) {
50499
+ try {
50500
+ return await new import_http_client.HttpClient(opts).request(requestOptions);
50501
+ } catch (e) {
50502
+ if (e instanceof import_http_client.HttpError) {
50503
+ if (e.response?.status === 403) {
50504
+ throw new import_verror2.default(
50505
+ {
50506
+ name: "PermissionDenied",
50507
+ cause: e
50508
+ },
50509
+ "Forbidden operation. Missing permissions"
50510
+ );
50511
+ }
50512
+ throw e;
50513
+ } else {
50514
+ throw e;
50515
+ }
50516
+ }
50517
+ }
50518
+ var cleanupTypes = async (projectFolder) => {
50519
+ const typesDir = getTypesDir2(projectFolder);
50520
+ if (!existsSync(typesDir)) {
50521
+ return Promise.resolve();
50522
+ }
50523
+ const filesOrDirs = await readdir(typesDir, { withFileTypes: true });
50524
+ const rootConfigPath = join5(projectFolder, "jsconfig.json");
50525
+ const files = filesOrDirs.filter((f) => f.isFile());
50526
+ const dirs = filesOrDirs.filter(
50527
+ (dir) => dir.isDirectory() && dir.name !== WIX_CODE_TYPES_DIR
50528
+ );
50529
+ return Promise.all([
50530
+ () => {
50531
+ if (existsSync(rootConfigPath)) {
50532
+ return unlink(rootConfigPath);
50533
+ }
50534
+ Promise.resolve();
50535
+ },
50536
+ ...files.map((file) => unlink(join5(typesDir, file.name))),
50537
+ ...dirs.map((dir) => rm(join5(typesDir, dir.name), { recursive: true }))
50538
+ ]);
50539
+ };
50540
+ var getPageCodeFilePathFromLayoutPath = (pFolder, page) => {
50541
+ return join5(pFolder, page.pageMetaData.layoutPath);
50542
+ };
50543
+ var isGridAppLayout = (layout) => {
50544
+ return typeof layout === "string" && isValidGridAppLayout(layout);
50545
+ };
50546
+ var isCustomLayout = (layout) => {
50547
+ return typeof layout === "function";
50548
+ };
50549
+ var isValidGridAppLayout = (layout) => {
50550
+ return Object.keys(import_types.GridAppLayout).includes(layout);
50551
+ };
50552
+ var widgetDtsContent = `declare global {
50553
+ namespace $widget {
50554
+ const props: any;
50555
+ function fireEvent(eventName: string, data: any): void;
50556
+ function onPropsChanged(handler: onPropsChangedHandler): any;
50557
+ type onPropsChangedHandler = (oldProps: any, newProps: any) => void;
50558
+ }
50559
+ }
50560
+
50561
+ export {};`;
50022
50562
  async function syncTypesForPages(projectFolder, pagesData, definitions, hasMasterPage = true) {
50023
50563
  await writeFile3(
50024
50564
  definitions.types.getBackendDTSPath(projectFolder),
@@ -50042,7 +50582,7 @@ async function syncTypesForPages(projectFolder, pagesData, definitions, hasMaste
50042
50582
  await Promise.all(
50043
50583
  Object.entries(pageDeclarationsFiles).map(
50044
50584
  async ([filename, content]) => {
50045
- await writeFile3(join5(pageConfigDir, filename), content);
50585
+ await writeFile3(join6(pageConfigDir, filename), content);
50046
50586
  }
50047
50587
  )
50048
50588
  );
@@ -50079,7 +50619,7 @@ function getConfigForPage(projectFolder, page, definitions) {
50079
50619
  jsx: "react",
50080
50620
  paths: {
50081
50621
  "public/*": [
50082
- join5(
50622
+ join6(
50083
50623
  relative4(
50084
50624
  dirname3(configFilePath),
50085
50625
  definitions.layout.getPublicFolder(projectFolder)
@@ -50088,7 +50628,7 @@ function getConfigForPage(projectFolder, page, definitions) {
50088
50628
  )
50089
50629
  ],
50090
50630
  "backend/*.web.js": [
50091
- join5(
50631
+ join6(
50092
50632
  relative4(
50093
50633
  dirname3(configFilePath),
50094
50634
  definitions.layout.getBackendFolder(projectFolder)
@@ -50097,7 +50637,7 @@ function getConfigForPage(projectFolder, page, definitions) {
50097
50637
  )
50098
50638
  ],
50099
50639
  "backend/*.web": [
50100
- join5(
50640
+ join6(
50101
50641
  relative4(
50102
50642
  dirname3(configFilePath),
50103
50643
  definitions.layout.getBackendFolder(projectFolder)
@@ -50119,14 +50659,14 @@ function getConfigForPage(projectFolder, page, definitions) {
50119
50659
  ...Object.entries(
50120
50660
  getPageDeclarationFiles(projectFolder, page, definitions)
50121
50661
  ).map(([filename]) => filename),
50122
- join5(
50662
+ join6(
50123
50663
  relative4(
50124
50664
  dirname3(configFilePath),
50125
50665
  definitions.layout.getPublicFolder(projectFolder)
50126
50666
  ),
50127
50667
  "**/*"
50128
50668
  ),
50129
- join5(
50669
+ join6(
50130
50670
  relative4(
50131
50671
  dirname3(configFilePath),
50132
50672
  definitions.layout.getBackendFolder(projectFolder)
@@ -50158,6 +50698,7 @@ function getPageDeclarationFiles(projectFolder, page, definitions, hasMasterPage
50158
50698
  "index.d.ts": `type PageElementsMap = MasterPageElementsMap;`
50159
50699
  };
50160
50700
  }
50701
+ let returnedDeclarationFiles;
50161
50702
  if (hasMasterPage) {
50162
50703
  const masterPageDTSDir = dirname3(
50163
50704
  definitions.types.getPageConfigFilename(projectFolder, MASTER_PAGE_NAME)
@@ -50168,81 +50709,31 @@ function getPageDeclarationFiles(projectFolder, page, definitions, hasMasterPage
50168
50709
  page.pageMetaData.pageId
50169
50710
  )
50170
50711
  );
50171
- const masterPageDTSRelativePath = join5(
50712
+ const masterPageDTSRelativePath = join6(
50172
50713
  relative4(pageDTSDir, masterPageDTSDir),
50173
50714
  definitions.types.getPageElementsMapDTSFilename(MASTER_PAGE_NAME)
50174
50715
  );
50175
- return {
50716
+ returnedDeclarationFiles = {
50176
50717
  [pageDTSFilename]: `/// <reference path="${masterPageDTSRelativePath}" />
50177
50718
  type PageElementsMap = MasterPageElementsMap & {${pageElementsMapContent}}`
50178
50719
  };
50179
50720
  } else {
50180
- return {
50721
+ returnedDeclarationFiles = {
50181
50722
  [pageDTSFilename]: `type PageElementsMap = {${pageElementsMapContent}}`
50182
50723
  };
50183
50724
  }
50725
+ if (definitions.layout.outputLayout === import_types_impl.GridAppLayout.GITHUB_BLOCKS) {
50726
+ returnedDeclarationFiles["widget.d.ts"] = widgetDtsContent;
50727
+ }
50728
+ return returnedDeclarationFiles;
50184
50729
  }
50185
50730
  async function deletePageTypes(projectFolder, pageId, definitions) {
50186
50731
  const pageConfigFile = definitions.types.getPageConfigFilename(
50187
50732
  projectFolder,
50188
50733
  pageId
50189
50734
  );
50190
- await rm(path.dirname(pageConfigFile), { recursive: true });
50191
- }
50192
- async function httpRequest(opts, requestOptions) {
50193
- try {
50194
- return await new import_http_client.HttpClient(opts).request(requestOptions);
50195
- } catch (e) {
50196
- if (e instanceof import_http_client.HttpError) {
50197
- if (e.response?.status === 403) {
50198
- throw new import_verror3.default(
50199
- {
50200
- name: "PermissionDenied",
50201
- cause: e
50202
- },
50203
- "Forbidden operation. Missing permissions"
50204
- );
50205
- }
50206
- throw e;
50207
- } else {
50208
- throw e;
50209
- }
50210
- }
50735
+ await rm2(path.dirname(pageConfigFile), { recursive: true });
50211
50736
  }
50212
- var cleanupTypes = async (projectFolder) => {
50213
- const typesDir = getTypesDir2(projectFolder);
50214
- if (!existsSync(typesDir)) {
50215
- return Promise.resolve();
50216
- }
50217
- const filesOrDirs = await readdir(typesDir, { withFileTypes: true });
50218
- const rootConfigPath = join6(projectFolder, "jsconfig.json");
50219
- const files = filesOrDirs.filter((f) => f.isFile());
50220
- const dirs = filesOrDirs.filter(
50221
- (dir) => dir.isDirectory() && dir.name !== WIX_CODE_TYPES_DIR
50222
- );
50223
- return Promise.all([
50224
- () => {
50225
- if (existsSync(rootConfigPath)) {
50226
- return unlink(rootConfigPath);
50227
- }
50228
- Promise.resolve();
50229
- },
50230
- ...files.map((file) => unlink(join6(typesDir, file.name))),
50231
- ...dirs.map((dir) => rm2(join6(typesDir, dir.name), { recursive: true }))
50232
- ]);
50233
- };
50234
- var getPageCodeFilePathFromLayoutPath = (pFolder, page) => {
50235
- return join6(pFolder, page.pageMetaData.layoutPath);
50236
- };
50237
- var isGridAppLayout = (layout) => {
50238
- return typeof layout === "string" && isValidGridAppLayout(layout);
50239
- };
50240
- var isCustomLayout = (layout) => {
50241
- return typeof layout === "function";
50242
- };
50243
- var isValidGridAppLayout = (layout) => {
50244
- return Object.keys(import_types.GridAppLayout).includes(layout);
50245
- };
50246
50737
  var pageSchema = z.object({
50247
50738
  pageTitle: z.string().optional().default(""),
50248
50739
  pageMetaData: z.object({
@@ -50261,7 +50752,7 @@ var siteSchema = z.object({
50261
50752
  var getSiteTypesSchema = z.object({
50262
50753
  site: siteSchema
50263
50754
  });
50264
- var { WError } = import_verror2.default;
50755
+ var { WError } = import_verror3.default;
50265
50756
  async function fetchPagesData(metaSiteId, revision, requestOptions) {
50266
50757
  let response;
50267
50758
  try {
@@ -50498,7 +50989,8 @@ var createAgnosticTypeSyncer = async (projectFolder, layout = GridAppLayout.GITH
50498
50989
  layout: {
50499
50990
  getPageCodeFilePath: getPageCodeFilePathFromLayoutPath,
50500
50991
  getBackendFolder: (projectFolder_ = "") => join7(projectFolder_, backendFolder),
50501
- getPublicFolder: (projectFolder_ = "") => join7(projectFolder_, publicFolder)
50992
+ getPublicFolder: (projectFolder_ = "") => join7(projectFolder_, publicFolder),
50993
+ outputLayout: layout
50502
50994
  },
50503
50995
  types: {
50504
50996
  getBackendConfigPath,
@@ -50795,7 +51287,6 @@ async function syncTypes(projectFolder, pagesData, definitions = defaultDefiniti
50795
51287
  }
50796
51288
 
50797
51289
  export {
50798
- GridAppLayout,
50799
51290
  require_negotiator,
50800
51291
  agnosticTypeSyncer_default,
50801
51292
  syncRevisionTypes,
@@ -50883,4 +51374,4 @@ make-fetch-happen/lib/fetch.js:
50883
51374
  * governing permissions and limitations under the License.
50884
51375
  *)
50885
51376
  */
50886
- //# sourceMappingURL=chunk-OISYBAR4.js.map
51377
+ //# sourceMappingURL=chunk-Y5LMYOCJ.js.map