@wix/cli 1.1.148 → 1.1.149
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/agents/instructions.md +84 -0
- package/build/{DevCommand-QSEX33CH.js → DevCommand-FM4GUL35.js} +53 -37
- package/build/DevCommand-FM4GUL35.js.map +1 -0
- package/build/{EnvPullCommand-6FOYVETB.js → EnvPullCommand-22WYBFTO.js} +3 -3
- package/build/{EnvRemoveCommand-BDX7BG4C.js → EnvRemoveCommand-H6VFMJLM.js} +2 -2
- package/build/{EnvSetCommand-YV7KQDTG.js → EnvSetCommand-TDY5NJDM.js} +2 -2
- package/build/{GenerateCommand-SARUYR3M.js → GenerateCommand-WJB2UILL.js} +3 -3
- package/build/{LoginCommand-ULOYAGDX.js → LoginCommand-EWEM57CT.js} +2 -2
- package/build/{PreviewCommand-D6P52RJP.js → PreviewCommand-7CZDBECJ.js} +5 -5
- package/build/{PromoteCommand-CJUQIMD7.js → PromoteCommand-4W7JO3OG.js} +5 -5
- package/build/{ReleaseCommand-FAHUZJYF.js → ReleaseCommand-NZAM3UIY.js} +14 -16
- package/build/ReleaseCommand-NZAM3UIY.js.map +1 -0
- package/build/{chunk-CGXS2RLO.js → chunk-6B3FQNMV.js} +2 -2
- package/build/{chunk-WOLJ45IG.js → chunk-7CZ66YXW.js} +156 -366
- package/build/chunk-7CZ66YXW.js.map +1 -0
- package/build/{chunk-VGSKNKR5.js → chunk-ECEBTPKZ.js} +53 -34
- package/build/chunk-ECEBTPKZ.js.map +1 -0
- package/build/{chunk-WUQ34TQE.js → chunk-EVV3LZAI.js} +2 -2
- package/build/{chunk-2OAP2LLX.js → chunk-VT3OGC5F.js} +2 -2
- package/build/{chunk-DLDELYVB.js → chunk-W34JWURA.js} +1 -2
- package/build/{chunk-4GSO6VQT.js → chunk-WBI2P4YN.js} +2 -2
- package/build/{chunk-DUJVHVKZ.js → chunk-Y7SZOWGV.js} +4 -3
- package/build/chunk-Y7SZOWGV.js.map +1 -0
- package/build/{env-pull-MXPEH223.js → env-pull-ENQPMILC.js} +4 -4
- package/build/index.js +6 -6
- package/build/{preview-GCYV2BWG.js → preview-MGGWEWUO.js} +6 -6
- package/build/{render-command-CMTVNSQY.js → render-command-TH5F34LX.js} +3 -3
- package/build/{render-command-QYBNOZ2B.js → render-command-YIP7OO3V.js} +2 -2
- package/build/{src-WCTCENDD.js → src-S345RUFD.js} +20 -20
- package/build/src-S345RUFD.js.map +1 -0
- package/package.json +4 -3
- package/build/DevCommand-QSEX33CH.js.map +0 -1
- package/build/ReleaseCommand-FAHUZJYF.js.map +0 -1
- package/build/chunk-DUJVHVKZ.js.map +0 -1
- package/build/chunk-VGSKNKR5.js.map +0 -1
- package/build/chunk-WOLJ45IG.js.map +0 -1
- package/build/src-WCTCENDD.js.map +0 -1
- /package/build/{EnvPullCommand-6FOYVETB.js.map → EnvPullCommand-22WYBFTO.js.map} +0 -0
- /package/build/{EnvRemoveCommand-BDX7BG4C.js.map → EnvRemoveCommand-H6VFMJLM.js.map} +0 -0
- /package/build/{EnvSetCommand-YV7KQDTG.js.map → EnvSetCommand-TDY5NJDM.js.map} +0 -0
- /package/build/{GenerateCommand-SARUYR3M.js.map → GenerateCommand-WJB2UILL.js.map} +0 -0
- /package/build/{LoginCommand-ULOYAGDX.js.map → LoginCommand-EWEM57CT.js.map} +0 -0
- /package/build/{PreviewCommand-D6P52RJP.js.map → PreviewCommand-7CZDBECJ.js.map} +0 -0
- /package/build/{PromoteCommand-CJUQIMD7.js.map → PromoteCommand-4W7JO3OG.js.map} +0 -0
- /package/build/{chunk-CGXS2RLO.js.map → chunk-6B3FQNMV.js.map} +0 -0
- /package/build/{chunk-WUQ34TQE.js.map → chunk-EVV3LZAI.js.map} +0 -0
- /package/build/{chunk-2OAP2LLX.js.map → chunk-VT3OGC5F.js.map} +0 -0
- /package/build/{chunk-DLDELYVB.js.map → chunk-W34JWURA.js.map} +0 -0
- /package/build/{chunk-4GSO6VQT.js.map → chunk-WBI2P4YN.js.map} +0 -0
- /package/build/{env-pull-MXPEH223.js.map → env-pull-ENQPMILC.js.map} +0 -0
- /package/build/{preview-GCYV2BWG.js.map → preview-MGGWEWUO.js.map} +0 -0
- /package/build/{render-command-CMTVNSQY.js.map → render-command-TH5F34LX.js.map} +0 -0
- /package/build/{render-command-QYBNOZ2B.js.map → render-command-YIP7OO3V.js.map} +0 -0
|
@@ -2,25 +2,23 @@ import { createRequire as _createRequire } from 'node:module';
|
|
|
2
2
|
const require = _createRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
useDevCenterClient
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EVV3LZAI.js";
|
|
6
6
|
import {
|
|
7
7
|
wixCliAction,
|
|
8
8
|
wixCliAppFlowStepsAnswers
|
|
9
9
|
} from "./chunk-SC2W3WT3.js";
|
|
10
10
|
import {
|
|
11
11
|
AlgorithmType,
|
|
12
|
-
BACKEND_WORKER_COMPONENT_ID,
|
|
13
12
|
ComponentType,
|
|
14
13
|
ElementType,
|
|
15
14
|
EmbedCategory,
|
|
16
15
|
EmbeddedScriptPlacement,
|
|
17
16
|
PanelMode,
|
|
18
|
-
PlatformType,
|
|
19
17
|
Width,
|
|
20
18
|
deploymentTopologySchema,
|
|
21
19
|
getDeploymentTopologyPath,
|
|
22
20
|
useProjectModel
|
|
23
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-W34JWURA.js";
|
|
24
22
|
import {
|
|
25
23
|
useHttpClient
|
|
26
24
|
} from "./chunk-EYV3FS5W.js";
|
|
@@ -3079,9 +3077,9 @@ ${trace}`);
|
|
|
3079
3077
|
Object.defineProperty(exports2, "__esModule", {
|
|
3080
3078
|
value: true
|
|
3081
3079
|
});
|
|
3082
|
-
exports2.default =
|
|
3080
|
+
exports2.default = isType2;
|
|
3083
3081
|
var _index = require_definitions();
|
|
3084
|
-
function
|
|
3082
|
+
function isType2(nodeType, targetType) {
|
|
3085
3083
|
if (nodeType === targetType) return true;
|
|
3086
3084
|
if (nodeType == null) return false;
|
|
3087
3085
|
if (_index.ALIAS_KEYS[targetType]) return false;
|
|
@@ -35765,7 +35763,7 @@ var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toS
|
|
|
35765
35763
|
return false;
|
|
35766
35764
|
}
|
|
35767
35765
|
}
|
|
35768
|
-
function
|
|
35766
|
+
function isType2(node) {
|
|
35769
35767
|
return isLiteral(node) || isObjectExpression(node) || isArrayExpression(node) || isIdentifier(node) || isMemberExpression(node);
|
|
35770
35768
|
}
|
|
35771
35769
|
var nodes = exports2.nodes = {
|
|
@@ -35801,7 +35799,7 @@ var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toS
|
|
|
35801
35799
|
VariableDeclaration(node) {
|
|
35802
35800
|
for (let i = 0; i < node.declarations.length; i++) {
|
|
35803
35801
|
const declar = node.declarations[i];
|
|
35804
|
-
let enabled = isHelper(declar.id) && !
|
|
35802
|
+
let enabled = isHelper(declar.id) && !isType2(declar.init);
|
|
35805
35803
|
if (!enabled && declar.init) {
|
|
35806
35804
|
const state = crawl(declar.init);
|
|
35807
35805
|
enabled = isHelper(declar.init) && state.hasCall || state.hasFunction;
|
|
@@ -43382,7 +43380,7 @@ ${" ".repeat(indentSize)}`);
|
|
|
43382
43380
|
isIdentifier,
|
|
43383
43381
|
isLiteral,
|
|
43384
43382
|
isStringLiteral,
|
|
43385
|
-
isType:
|
|
43383
|
+
isType: isType2,
|
|
43386
43384
|
matchesPattern: _matchesPattern
|
|
43387
43385
|
} = _t;
|
|
43388
43386
|
function matchesPattern(pattern, allowPartial) {
|
|
@@ -43412,7 +43410,7 @@ ${" ".repeat(indentSize)}`);
|
|
|
43412
43410
|
};
|
|
43413
43411
|
}
|
|
43414
43412
|
function isNodeType(type) {
|
|
43415
|
-
return
|
|
43413
|
+
return isType2(this.type, type);
|
|
43416
43414
|
}
|
|
43417
43415
|
function canHaveVariableDeclarationOrExpression() {
|
|
43418
43416
|
return (this.key === "init" || this.key === "left") && this.parentPath.isFor();
|
|
@@ -107148,7 +107146,7 @@ var embeddedScriptConfigSchema = external_exports.object({
|
|
|
107148
107146
|
"An enum indicating where in the page's DOM the HTML code will be injected."
|
|
107149
107147
|
)
|
|
107150
107148
|
}).strict();
|
|
107151
|
-
var
|
|
107149
|
+
var PlatformType = (0, import_variant2.variant)({
|
|
107152
107150
|
Site: {},
|
|
107153
107151
|
Editor: {},
|
|
107154
107152
|
Dashboard: {},
|
|
@@ -107419,6 +107417,48 @@ var siteComponentPanelConfigSchema = external_exports.object({
|
|
|
107419
107417
|
panelMode: external_exports.enum([PanelMode.overlay]).optional()
|
|
107420
107418
|
}).strict();
|
|
107421
107419
|
|
|
107420
|
+
// ../cli-astro-commands/src/files/app.config.ts
|
|
107421
|
+
init_esm_shims();
|
|
107422
|
+
async function readAppConfig(projectFolder, writeDebugLog) {
|
|
107423
|
+
const configPath = getAppConfigPath(projectFolder);
|
|
107424
|
+
const isConfigExist = await pathExists(configPath);
|
|
107425
|
+
if (!isConfigExist) {
|
|
107426
|
+
return null;
|
|
107427
|
+
}
|
|
107428
|
+
try {
|
|
107429
|
+
const json = await readJson(configPath);
|
|
107430
|
+
const appConfig = await appConfigSchema.safeParseAsync(json);
|
|
107431
|
+
if (!appConfig.success) {
|
|
107432
|
+
return null;
|
|
107433
|
+
}
|
|
107434
|
+
return appConfig.data;
|
|
107435
|
+
} catch (e) {
|
|
107436
|
+
writeDebugLog?.(e);
|
|
107437
|
+
return null;
|
|
107438
|
+
}
|
|
107439
|
+
}
|
|
107440
|
+
async function saveAppConfig(projectFolder, config) {
|
|
107441
|
+
const currentConfig = await readAppConfig(projectFolder) ?? {};
|
|
107442
|
+
const newConfig = {
|
|
107443
|
+
...currentConfig,
|
|
107444
|
+
...config
|
|
107445
|
+
};
|
|
107446
|
+
await writeJson(getAppConfigPath(projectFolder), newConfig);
|
|
107447
|
+
}
|
|
107448
|
+
|
|
107449
|
+
// ../cli-astro-commands/src/site/ResolveSite.tsx
|
|
107450
|
+
init_esm_shims();
|
|
107451
|
+
var import_react11 = __toESM(require_react(), 1);
|
|
107452
|
+
var import_variant8 = __toESM(require_lib(), 1);
|
|
107453
|
+
|
|
107454
|
+
// ../cli-site-selector/src/index.ts
|
|
107455
|
+
init_esm_shims();
|
|
107456
|
+
|
|
107457
|
+
// ../cli-site-selector/src/SiteSelector.tsx
|
|
107458
|
+
init_esm_shims();
|
|
107459
|
+
var import_react10 = __toESM(require_react(), 1);
|
|
107460
|
+
var import_variant7 = __toESM(require_lib(), 1);
|
|
107461
|
+
|
|
107422
107462
|
// ../site-list-client/src/index.ts
|
|
107423
107463
|
init_esm_shims();
|
|
107424
107464
|
|
|
@@ -107648,48 +107688,6 @@ function useSiteListClient() {
|
|
|
107648
107688
|
return usePanoramaMethodLogger(client);
|
|
107649
107689
|
}
|
|
107650
107690
|
|
|
107651
|
-
// ../cli-astro-commands/src/files/app.config.ts
|
|
107652
|
-
init_esm_shims();
|
|
107653
|
-
async function readAppConfig(projectFolder, writeDebugLog) {
|
|
107654
|
-
const configPath = getAppConfigPath(projectFolder);
|
|
107655
|
-
const isConfigExist = await pathExists(configPath);
|
|
107656
|
-
if (!isConfigExist) {
|
|
107657
|
-
return null;
|
|
107658
|
-
}
|
|
107659
|
-
try {
|
|
107660
|
-
const json = await readJson(configPath);
|
|
107661
|
-
const appConfig = await appConfigSchema.safeParseAsync(json);
|
|
107662
|
-
if (!appConfig.success) {
|
|
107663
|
-
return null;
|
|
107664
|
-
}
|
|
107665
|
-
return appConfig.data;
|
|
107666
|
-
} catch (e) {
|
|
107667
|
-
writeDebugLog?.(e);
|
|
107668
|
-
return null;
|
|
107669
|
-
}
|
|
107670
|
-
}
|
|
107671
|
-
async function saveAppConfig(projectFolder, config) {
|
|
107672
|
-
const currentConfig = await readAppConfig(projectFolder) ?? {};
|
|
107673
|
-
const newConfig = {
|
|
107674
|
-
...currentConfig,
|
|
107675
|
-
...config
|
|
107676
|
-
};
|
|
107677
|
-
await writeJson(getAppConfigPath(projectFolder), newConfig);
|
|
107678
|
-
}
|
|
107679
|
-
|
|
107680
|
-
// ../cli-astro-commands/src/site/ResolveSite.tsx
|
|
107681
|
-
init_esm_shims();
|
|
107682
|
-
var import_react11 = __toESM(require_react(), 1);
|
|
107683
|
-
var import_variant8 = __toESM(require_lib(), 1);
|
|
107684
|
-
|
|
107685
|
-
// ../cli-site-selector/src/index.ts
|
|
107686
|
-
init_esm_shims();
|
|
107687
|
-
|
|
107688
|
-
// ../cli-site-selector/src/SiteSelector.tsx
|
|
107689
|
-
init_esm_shims();
|
|
107690
|
-
var import_react10 = __toESM(require_react(), 1);
|
|
107691
|
-
var import_variant7 = __toESM(require_lib(), 1);
|
|
107692
|
-
|
|
107693
107691
|
// ../cli-site-selector/src/SiteTypeSelect.tsx
|
|
107694
107692
|
init_esm_shims();
|
|
107695
107693
|
var import_react4 = __toESM(require_react(), 1);
|
|
@@ -108093,14 +108091,13 @@ var ResolveSite = ({ state, onSubmit }) => {
|
|
|
108093
108091
|
return /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, (0, import_variant8.match)(state, {
|
|
108094
108092
|
NotConfigured: (0, import_variant8.constant)(
|
|
108095
108093
|
/* @__PURE__ */ import_react11.default.createElement(Alert, { type: "insight" }, "You don't have a Development Site currently configured")
|
|
108096
|
-
)
|
|
108097
|
-
NotFound: ({ id }) => /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, /* @__PURE__ */ import_react11.default.createElement(Alert, { type: "error" }, /* @__PURE__ */ import_react11.default.createElement(Text, null, "Your currently configured Development Site was not found (", id, ")")), /* @__PURE__ */ import_react11.default.createElement(Box_default, { flexDirection: "column" }, /* @__PURE__ */ import_react11.default.createElement(Text, null, "This may happen because the site was deleted or your access has been revoked."), /* @__PURE__ */ import_react11.default.createElement(Text, null, "Please select another Development Site to continue.")))
|
|
108094
|
+
)
|
|
108098
108095
|
}), /* @__PURE__ */ import_react11.default.createElement(
|
|
108099
108096
|
SiteSelector,
|
|
108100
108097
|
{
|
|
108101
108098
|
appId: model.config.appId,
|
|
108102
108099
|
biLogger,
|
|
108103
|
-
onSubmit,
|
|
108100
|
+
onSubmit: (site) => onSubmit(site.id),
|
|
108104
108101
|
onError: exit
|
|
108105
108102
|
}
|
|
108106
108103
|
));
|
|
@@ -108116,26 +108113,9 @@ init_esm_shims();
|
|
|
108116
108113
|
var import_variant9 = __toESM(require_lib(), 1);
|
|
108117
108114
|
var SiteState = (0, import_variant9.variant)({
|
|
108118
108115
|
NotConfigured: {},
|
|
108119
|
-
NotFound: (0, import_variant9.fields)(),
|
|
108120
108116
|
Resolved: (0, import_variant9.fields)()
|
|
108121
108117
|
});
|
|
108122
108118
|
|
|
108123
|
-
// ../cli-astro-commands/src/site/resolve-configured-site.ts
|
|
108124
|
-
init_esm_shims();
|
|
108125
|
-
async function resolveConfiguredSite({
|
|
108126
|
-
siteListClient: { getSite },
|
|
108127
|
-
siteId
|
|
108128
|
-
}) {
|
|
108129
|
-
if (!siteId) {
|
|
108130
|
-
return SiteState.NotConfigured();
|
|
108131
|
-
}
|
|
108132
|
-
const site = await getSite(siteId, true);
|
|
108133
|
-
if (!site) {
|
|
108134
|
-
return SiteState.NotFound({ id: siteId });
|
|
108135
|
-
}
|
|
108136
|
-
return SiteState.Resolved({ site });
|
|
108137
|
-
}
|
|
108138
|
-
|
|
108139
108119
|
// ../cli-astro-commands/src/site/SiteProvider.tsx
|
|
108140
108120
|
var SiteProvider = ({ children }) => {
|
|
108141
108121
|
const exit = useExit();
|
|
@@ -108143,18 +108123,15 @@ var SiteProvider = ({ children }) => {
|
|
|
108143
108123
|
model: { projectFolder, config }
|
|
108144
108124
|
} = useProjectModel();
|
|
108145
108125
|
const writeDebugLog = useDebugLog();
|
|
108146
|
-
const siteListClient = useSiteListClient();
|
|
108147
108126
|
const { status, merge } = useAsync(async () => {
|
|
108148
|
-
|
|
108149
|
-
|
|
108150
|
-
siteId: config.projectType === "Site" ? config.siteId : (await readAppConfig(projectFolder, writeDebugLog))?.siteId
|
|
108151
|
-
});
|
|
108127
|
+
const siteId = config.projectType === "Site" ? config.siteId : (await readAppConfig(projectFolder, writeDebugLog))?.siteId;
|
|
108128
|
+
return siteId ? SiteState.Resolved({ siteId }) : SiteState.NotConfigured();
|
|
108152
108129
|
}, []);
|
|
108153
108130
|
const setSite = (0, import_react13.useCallback)(
|
|
108154
|
-
async (
|
|
108131
|
+
async (siteId) => {
|
|
108155
108132
|
try {
|
|
108156
|
-
await saveAppConfig(projectFolder, { siteId
|
|
108157
|
-
merge({ result: SiteState.Resolved({
|
|
108133
|
+
await saveAppConfig(projectFolder, { siteId });
|
|
108134
|
+
merge({ result: SiteState.Resolved({ siteId }) });
|
|
108158
108135
|
} catch (e) {
|
|
108159
108136
|
throw new CliError({
|
|
108160
108137
|
code: CliErrorCode.FailedToSaveDevelopmentSite({
|
|
@@ -108167,7 +108144,7 @@ var SiteProvider = ({ children }) => {
|
|
|
108167
108144
|
[merge, projectFolder]
|
|
108168
108145
|
);
|
|
108169
108146
|
const handleResolveSite = (0, import_react13.useCallback)(
|
|
108170
|
-
(
|
|
108147
|
+
(siteId) => setSite(siteId).catch(exit),
|
|
108171
108148
|
[exit, setSite]
|
|
108172
108149
|
);
|
|
108173
108150
|
return (0, import_variant10.match)(status, {
|
|
@@ -108176,273 +108153,89 @@ var SiteProvider = ({ children }) => {
|
|
|
108176
108153
|
Success: ({ result: state }) => {
|
|
108177
108154
|
return (0, import_variant10.match)(state, {
|
|
108178
108155
|
NotConfigured: (variant5) => /* @__PURE__ */ import_react13.default.createElement(ResolveSite, { state: variant5, onSubmit: handleResolveSite }),
|
|
108179
|
-
|
|
108180
|
-
Resolved: ({ site }) => /* @__PURE__ */ import_react13.default.createElement(
|
|
108156
|
+
Resolved: ({ siteId }) => /* @__PURE__ */ import_react13.default.createElement(
|
|
108181
108157
|
SiteContext.Provider,
|
|
108182
108158
|
{
|
|
108183
108159
|
value: {
|
|
108184
|
-
|
|
108160
|
+
siteId,
|
|
108185
108161
|
setSite
|
|
108186
108162
|
}
|
|
108187
108163
|
},
|
|
108188
|
-
typeof children === "function" ? children(
|
|
108164
|
+
typeof children === "function" ? children(siteId) : children
|
|
108189
108165
|
)
|
|
108190
108166
|
});
|
|
108191
108167
|
}
|
|
108192
108168
|
});
|
|
108193
108169
|
};
|
|
108194
108170
|
|
|
108195
|
-
// ../cli-astro-commands/src/
|
|
108196
|
-
init_esm_shims();
|
|
108197
|
-
|
|
108198
|
-
// ../cli-astro-commands/src/site/useSite.ts
|
|
108171
|
+
// ../cli-astro-commands/src/components/PlatformLink/RedirectLink.tsx
|
|
108199
108172
|
init_esm_shims();
|
|
108200
108173
|
var import_react14 = __toESM(require_react(), 1);
|
|
108201
|
-
|
|
108202
|
-
|
|
108203
|
-
|
|
108204
|
-
|
|
108205
|
-
|
|
108206
|
-
|
|
108207
|
-
|
|
108208
|
-
|
|
108209
|
-
|
|
108210
|
-
init_esm_shims();
|
|
108211
|
-
var import_react15 = __toESM(require_react(), 1);
|
|
108212
|
-
var componentHandlers = {
|
|
108213
|
-
[ComponentType.WEBHOOK]: ({ component, serverUrl, tunnelUrl }) => {
|
|
108214
|
-
component.compData.webhook.callbackUrl = normalizeUrl(
|
|
108215
|
-
component.compData.webhook.callbackUrl,
|
|
108216
|
-
tunnelUrl ?? serverUrl
|
|
108217
|
-
);
|
|
108218
|
-
},
|
|
108219
|
-
[ComponentType.BACK_OFFICE_PAGE]: ({ component, serverUrl }) => {
|
|
108220
|
-
component.compData.backOfficePage.iframeUrl = normalizeUrl(
|
|
108221
|
-
component.compData.backOfficePage.iframeUrl,
|
|
108222
|
-
serverUrl
|
|
108223
|
-
);
|
|
108224
|
-
},
|
|
108225
|
-
[ComponentType.BACK_OFFICE_EXTENSION_WIDGET]: ({ component, serverUrl }) => {
|
|
108226
|
-
component.compData.backOfficeExtensionWidget.iframeUrl = normalizeUrl(
|
|
108227
|
-
component.compData.backOfficeExtensionWidget.iframeUrl,
|
|
108228
|
-
serverUrl
|
|
108229
|
-
);
|
|
108230
|
-
},
|
|
108231
|
-
[ComponentType.BACK_OFFICE_MODAL]: ({ component, serverUrl }) => {
|
|
108232
|
-
component.compData.backOfficeModal.iframeUrl = normalizeUrl(
|
|
108233
|
-
component.compData.backOfficeModal.iframeUrl,
|
|
108234
|
-
serverUrl
|
|
108235
|
-
);
|
|
108236
|
-
},
|
|
108237
|
-
[ComponentType.BACK_OFFICE_EXTENSION_MENU_ITEM]: ({
|
|
108238
|
-
component,
|
|
108239
|
-
serverUrl
|
|
108240
|
-
}) => {
|
|
108241
|
-
component.compData.backOfficeExtensionMenuItem.iframeUrl = normalizeUrl(
|
|
108242
|
-
component.compData.backOfficeExtensionMenuItem.iframeUrl,
|
|
108243
|
-
serverUrl
|
|
108244
|
-
);
|
|
108245
|
-
},
|
|
108246
|
-
[ComponentType.ECOM_SHIPPING_RATES]: ({
|
|
108247
|
-
component,
|
|
108248
|
-
serverUrl,
|
|
108249
|
-
tunnelUrl
|
|
108250
|
-
}) => {
|
|
108251
|
-
component.compData.ecomShippingRates.deploymentUri = normalizeUrl(
|
|
108252
|
-
component.compData.ecomShippingRates.deploymentUri,
|
|
108253
|
-
tunnelUrl ?? serverUrl
|
|
108254
|
-
);
|
|
108255
|
-
},
|
|
108256
|
-
[ComponentType.ECOM_ADDITIONAL_FEES]: ({
|
|
108257
|
-
component,
|
|
108258
|
-
serverUrl,
|
|
108259
|
-
tunnelUrl
|
|
108260
|
-
}) => {
|
|
108261
|
-
component.compData.ecomAdditionalFees.deploymentUri = normalizeUrl(
|
|
108262
|
-
component.compData.ecomAdditionalFees.deploymentUri,
|
|
108263
|
-
tunnelUrl ?? serverUrl
|
|
108264
|
-
);
|
|
108265
|
-
},
|
|
108266
|
-
[ComponentType.ECOM_DISCOUNTS_TRIGGER]: ({
|
|
108267
|
-
component,
|
|
108268
|
-
serverUrl,
|
|
108269
|
-
tunnelUrl
|
|
108270
|
-
}) => {
|
|
108271
|
-
component.compData.ecomDiscountsTrigger.deploymentUri = normalizeUrl(
|
|
108272
|
-
component.compData.ecomDiscountsTrigger.deploymentUri,
|
|
108273
|
-
tunnelUrl ?? serverUrl
|
|
108274
|
-
);
|
|
108275
|
-
},
|
|
108276
|
-
[ComponentType.ECOM_VALIDATIONS]: ({ component, serverUrl, tunnelUrl }) => {
|
|
108277
|
-
component.compData.ecomValidations.deploymentUri = normalizeUrl(
|
|
108278
|
-
component.compData.ecomValidations.deploymentUri,
|
|
108279
|
-
tunnelUrl ?? serverUrl
|
|
108280
|
-
);
|
|
108281
|
-
},
|
|
108282
|
-
[ComponentType.ECOM_PAYMENT_SETTINGS]: ({
|
|
108283
|
-
component,
|
|
108284
|
-
serverUrl,
|
|
108285
|
-
tunnelUrl
|
|
108286
|
-
}) => {
|
|
108287
|
-
component.compData.ecomPaymentSettings.deploymentUri = normalizeUrl(
|
|
108288
|
-
component.compData.ecomPaymentSettings.deploymentUri,
|
|
108289
|
-
tunnelUrl ?? serverUrl
|
|
108290
|
-
);
|
|
108291
|
-
},
|
|
108292
|
-
[ComponentType.GIFT_CARDS_PROVIDER]: ({
|
|
108293
|
-
component,
|
|
108294
|
-
serverUrl,
|
|
108295
|
-
tunnelUrl
|
|
108296
|
-
}) => {
|
|
108297
|
-
component.compData.giftCardsProvider.deploymentUri = normalizeUrl(
|
|
108298
|
-
component.compData.giftCardsProvider.deploymentUri,
|
|
108299
|
-
tunnelUrl ?? serverUrl
|
|
108300
|
-
);
|
|
108301
|
-
},
|
|
108302
|
-
[ComponentType.BOOKINGS_PRICING_PROVIDER]: ({
|
|
108303
|
-
component,
|
|
108304
|
-
serverUrl,
|
|
108305
|
-
tunnelUrl
|
|
108306
|
-
}) => {
|
|
108307
|
-
component.compData.bookingsPricingProvider.deploymentUri = normalizeUrl(
|
|
108308
|
-
component.compData.bookingsPricingProvider.deploymentUri,
|
|
108309
|
-
tunnelUrl ?? serverUrl
|
|
108310
|
-
);
|
|
108311
|
-
},
|
|
108312
|
-
[ComponentType.TOPOLOGY]: ({ component, serverUrl, tunnelUrl }) => {
|
|
108313
|
-
component.compData.topology.topology.backendApiUrl = tunnelUrl ?? serverUrl;
|
|
108314
|
-
}
|
|
108174
|
+
var import_variant11 = __toESM(require_lib(), 1);
|
|
108175
|
+
import { URL as URL2 } from "node:url";
|
|
108176
|
+
var createAppInstallerUrl = (redirectUrl, options) => {
|
|
108177
|
+
const { appId, versionOverrideId } = options;
|
|
108178
|
+
const installerUrl = new URL2(`https://www.wix.com/app-installer`);
|
|
108179
|
+
installerUrl.searchParams.append("appId", appId);
|
|
108180
|
+
installerUrl.searchParams.append("versionOverrideId", versionOverrideId);
|
|
108181
|
+
installerUrl.searchParams.append("postInstallationUrl", redirectUrl);
|
|
108182
|
+
return installerUrl.toString();
|
|
108315
108183
|
};
|
|
108316
|
-
|
|
108317
|
-
const
|
|
108318
|
-
|
|
108319
|
-
|
|
108320
|
-
|
|
108321
|
-
|
|
108322
|
-
component,
|
|
108323
|
-
componentHandlers
|
|
108324
|
-
);
|
|
108325
|
-
handler?.({
|
|
108326
|
-
component,
|
|
108327
|
-
serverUrl,
|
|
108328
|
-
tunnelUrl
|
|
108329
|
-
});
|
|
108330
|
-
}
|
|
108331
|
-
return clone;
|
|
108332
|
-
},
|
|
108333
|
-
[]
|
|
108334
|
-
);
|
|
108335
|
-
const updateManifestWithBackendWorker = (0, import_react15.useCallback)(
|
|
108336
|
-
(manifest, deploymentId, deploymentUrl, label, commitHash) => {
|
|
108337
|
-
const clone = structuredClone(manifest);
|
|
108338
|
-
clone.components.push({
|
|
108339
|
-
compId: BACKEND_WORKER_COMPONENT_ID,
|
|
108340
|
-
compType: ComponentType.BACKEND_WORKER,
|
|
108341
|
-
compData: {
|
|
108342
|
-
backendWorker: {
|
|
108343
|
-
deploymentId,
|
|
108344
|
-
deploymentUrl,
|
|
108345
|
-
label,
|
|
108346
|
-
commitHash
|
|
108347
|
-
}
|
|
108348
|
-
}
|
|
108349
|
-
});
|
|
108350
|
-
return clone;
|
|
108351
|
-
},
|
|
108352
|
-
[]
|
|
108353
|
-
);
|
|
108354
|
-
return {
|
|
108355
|
-
updateManifest,
|
|
108356
|
-
updateManifestWithBackendWorker
|
|
108357
|
-
};
|
|
108358
|
-
}
|
|
108359
|
-
function getHandler(component, handlers) {
|
|
108360
|
-
return handlers[component.compType];
|
|
108361
|
-
}
|
|
108362
|
-
function normalizeUrl(inputUrl, baseUrl) {
|
|
108363
|
-
if (!inputUrl) {
|
|
108364
|
-
return baseUrl;
|
|
108365
|
-
}
|
|
108366
|
-
if (URL.canParse(inputUrl)) {
|
|
108367
|
-
return inputUrl;
|
|
108184
|
+
var createRedirectLink = (options) => {
|
|
108185
|
+
const { platform, tenantId, appId, versionOverrideId } = options;
|
|
108186
|
+
const url = new URL2("https://dev.wix.com/wix-cli-redirect-service/redirect");
|
|
108187
|
+
url.searchParams.append("platform", platform);
|
|
108188
|
+
if (versionOverrideId) {
|
|
108189
|
+
url.searchParams.append("versionOverrideId", versionOverrideId);
|
|
108368
108190
|
}
|
|
108369
|
-
|
|
108370
|
-
|
|
108371
|
-
|
|
108372
|
-
|
|
108191
|
+
if (options.withInstaller) {
|
|
108192
|
+
if (tenantId) {
|
|
108193
|
+
throw new Error(
|
|
108194
|
+
"The `tenantId` and `withInstaller = true` parameters are mutually exclusive. Please provide one or the other, but not both."
|
|
108195
|
+
);
|
|
108196
|
+
}
|
|
108197
|
+
return createAppInstallerUrl(url.toString(), {
|
|
108198
|
+
appId: options.appId,
|
|
108199
|
+
versionOverrideId: options.versionOverrideId
|
|
108200
|
+
});
|
|
108373
108201
|
}
|
|
108374
|
-
|
|
108375
|
-
|
|
108376
|
-
|
|
108377
|
-
// ../cli-astro-commands/src/components/PlatformLink/PlatformLink.tsx
|
|
108378
|
-
init_esm_shims();
|
|
108379
|
-
var import_react16 = __toESM(require_react(), 1);
|
|
108380
|
-
var PlatformLink = ({ url, label }) => {
|
|
108381
|
-
return /* @__PURE__ */ import_react16.default.createElement(Box_default, { marginRight: 1 }, /* @__PURE__ */ import_react16.default.createElement(PointerSmallIcon, null), /* @__PURE__ */ import_react16.default.createElement(Box_default, { marginLeft: 1 }, /* @__PURE__ */ import_react16.default.createElement(Link, { url }, label)));
|
|
108382
|
-
};
|
|
108383
|
-
|
|
108384
|
-
// ../cli-astro-commands/src/components/PreviewCommand/app-flow/useResolvePlatformUrl.ts
|
|
108385
|
-
init_esm_shims();
|
|
108386
|
-
var import_react17 = __toESM(require_react(), 1);
|
|
108387
|
-
var import_variant11 = __toESM(require_lib(), 1);
|
|
108388
|
-
var redirectWithCSMv2FTs = (url, platformType) => {
|
|
108389
|
-
const elgarBaseURL = (0, import_variant11.isType)(platformType, PlatformType.Site) ? `${url.origin}/_api` : "https://apps.wix.com";
|
|
108390
|
-
const elgarRedirectUrl = new URL(`${elgarBaseURL}/elgar-server/redirect`);
|
|
108391
|
-
const petriOvr = [
|
|
108392
|
-
// TODO: Remove once Dev Versions effort is done https://wix.atlassian.net/browse/FEDINF-13336
|
|
108393
|
-
"specs.UseAppsRuntimeCache",
|
|
108394
|
-
"specs.ApplyQueryParamsOverrides",
|
|
108395
|
-
"specs.ExcludeSiteFromSsrCache",
|
|
108396
|
-
// TODO: Remove once Blocks on CLI effort is done
|
|
108397
|
-
"specs.thunderbolt.passWidgetBundleUrls",
|
|
108398
|
-
"specs.thunderbolt.passBlocksWidgetBundleUrls",
|
|
108399
|
-
"specs.blocks-client.useBundledWidgetCode",
|
|
108400
|
-
"specs.blocks-widget-services.usePanelExtension"
|
|
108401
|
-
];
|
|
108402
|
-
for (const spec of petriOvr) {
|
|
108403
|
-
elgarRedirectUrl.searchParams.append("experiments", `${spec}#true`);
|
|
108202
|
+
if (tenantId) {
|
|
108203
|
+
url.searchParams.append("tenantId", tenantId);
|
|
108404
108204
|
}
|
|
108405
|
-
|
|
108406
|
-
|
|
108407
|
-
return elgarRedirectUrl;
|
|
108205
|
+
url.searchParams.append("appId", appId);
|
|
108206
|
+
return url.toString();
|
|
108408
108207
|
};
|
|
108409
|
-
|
|
108208
|
+
var RedirectLink = ({
|
|
108209
|
+
platform,
|
|
108210
|
+
armTag,
|
|
108211
|
+
withInstaller,
|
|
108212
|
+
tenantId
|
|
108213
|
+
}) => {
|
|
108410
108214
|
const { model } = useProjectModel();
|
|
108411
|
-
const
|
|
108412
|
-
|
|
108413
|
-
(
|
|
108414
|
-
|
|
108415
|
-
armTag
|
|
108416
|
-
}) => {
|
|
108417
|
-
return resolvePlatformUrl(platformType, {
|
|
108418
|
-
site,
|
|
108419
|
-
appId: model.config.appId,
|
|
108420
|
-
tag: armTag
|
|
108421
|
-
});
|
|
108422
|
-
},
|
|
108423
|
-
[site, model.config.appId]
|
|
108424
|
-
);
|
|
108425
|
-
}
|
|
108426
|
-
function resolvePlatformUrl(platformType, options) {
|
|
108427
|
-
const { site, tag, appId } = options;
|
|
108428
|
-
const url = (0, import_variant11.match)(platformType, {
|
|
108429
|
-
Dashboard: () => new URL(`dashboard/${site.id}`, "https://manage.wix.com/"),
|
|
108430
|
-
Editor: () => {
|
|
108431
|
-
const editorUrl = new URL(`https://manage.wix.com/editor/${site.id}`);
|
|
108432
|
-
editorUrl.searchParams.append("etpa", appId);
|
|
108433
|
-
return editorUrl;
|
|
108434
|
-
},
|
|
108435
|
-
Site: () => {
|
|
108436
|
-
return site.viewUrl ? new URL(site.viewUrl) : void 0;
|
|
108437
|
-
}
|
|
108215
|
+
const label = (0, import_variant11.match)(platform, {
|
|
108216
|
+
editor: () => "Editor",
|
|
108217
|
+
dashboard: () => "Dashboard",
|
|
108218
|
+
site: () => "Site"
|
|
108438
108219
|
});
|
|
108439
|
-
|
|
108440
|
-
|
|
108441
|
-
|
|
108442
|
-
|
|
108443
|
-
|
|
108444
|
-
|
|
108220
|
+
const url = createRedirectLink({
|
|
108221
|
+
platform,
|
|
108222
|
+
withInstaller: withInstaller === void 0 || withInstaller === true,
|
|
108223
|
+
appId: model.config.appId,
|
|
108224
|
+
versionOverrideId: armTag,
|
|
108225
|
+
tenantId
|
|
108226
|
+
});
|
|
108227
|
+
return /* @__PURE__ */ import_react14.default.createElement(Box_default, { marginRight: 1 }, /* @__PURE__ */ import_react14.default.createElement(PointerSmallIcon, null), /* @__PURE__ */ import_react14.default.createElement(Box_default, { marginLeft: 1 }, /* @__PURE__ */ import_react14.default.createElement(Link, { url }, label)));
|
|
108228
|
+
};
|
|
108229
|
+
|
|
108230
|
+
// ../cli-astro-commands/src/site/useSite.ts
|
|
108231
|
+
init_esm_shims();
|
|
108232
|
+
var import_react15 = __toESM(require_react(), 1);
|
|
108233
|
+
function useSite() {
|
|
108234
|
+
const context = (0, import_react15.useContext)(SiteContext);
|
|
108235
|
+
if (context == null) {
|
|
108236
|
+
throw new Error("useSite() cannot be used without an <SiteProvider>");
|
|
108445
108237
|
}
|
|
108238
|
+
return context;
|
|
108446
108239
|
}
|
|
108447
108240
|
|
|
108448
108241
|
// ../cli-astro-commands/src/hooks/useUpdateDeploymentTopology.ts
|
|
@@ -108451,20 +108244,36 @@ function useUpdateDeploymentTopology() {
|
|
|
108451
108244
|
const {
|
|
108452
108245
|
model: { projectFolder, config }
|
|
108453
108246
|
} = useProjectModel();
|
|
108454
|
-
const
|
|
108247
|
+
const { siteId } = useSite();
|
|
108455
108248
|
return useAsyncCallback(async (_, props) => {
|
|
108456
108249
|
const { environment, siteUrl, armTag } = props;
|
|
108457
|
-
const
|
|
108458
|
-
|
|
108459
|
-
|
|
108250
|
+
const withInstaller = environment !== "development";
|
|
108251
|
+
const _siteUrl = siteUrl ?? createRedirectLink({
|
|
108252
|
+
platform: "site",
|
|
108253
|
+
appId: config.appId,
|
|
108254
|
+
versionOverrideId: armTag,
|
|
108255
|
+
withInstaller,
|
|
108256
|
+
...!withInstaller ? {
|
|
108257
|
+
tenantId: siteId
|
|
108258
|
+
} : null
|
|
108460
108259
|
});
|
|
108461
|
-
const editorUrl = config.projectType === "App" ?
|
|
108462
|
-
|
|
108463
|
-
|
|
108260
|
+
const editorUrl = config.projectType === "App" ? createRedirectLink({
|
|
108261
|
+
platform: "editor",
|
|
108262
|
+
appId: config.appId,
|
|
108263
|
+
versionOverrideId: armTag,
|
|
108264
|
+
withInstaller,
|
|
108265
|
+
...!withInstaller ? {
|
|
108266
|
+
tenantId: siteId
|
|
108267
|
+
} : null
|
|
108464
108268
|
}) : void 0;
|
|
108465
|
-
const dashboardUrl =
|
|
108466
|
-
|
|
108467
|
-
|
|
108269
|
+
const dashboardUrl = createRedirectLink({
|
|
108270
|
+
platform: "dashboard",
|
|
108271
|
+
appId: config.appId,
|
|
108272
|
+
versionOverrideId: armTag,
|
|
108273
|
+
withInstaller,
|
|
108274
|
+
...!withInstaller ? {
|
|
108275
|
+
tenantId: siteId
|
|
108276
|
+
} : null
|
|
108468
108277
|
});
|
|
108469
108278
|
const topology = await readDeploymentTopology(projectFolder);
|
|
108470
108279
|
topology[environment] = {
|
|
@@ -108501,43 +108310,24 @@ async function readDeploymentTopology(projectFolder) {
|
|
|
108501
108310
|
return {};
|
|
108502
108311
|
}
|
|
108503
108312
|
|
|
108504
|
-
// ../cli-astro-commands/src/components/
|
|
108505
|
-
init_esm_shims();
|
|
108506
|
-
var import_react18 = __toESM(require_react(), 1);
|
|
108507
|
-
var LivesiteLinkForApp = ({ armTag }) => {
|
|
108508
|
-
const resolvePlatformUrl2 = useResolvePlatformUrl();
|
|
108509
|
-
const siteUrl = resolvePlatformUrl2({
|
|
108510
|
-
platformType: PlatformType.Site(),
|
|
108511
|
-
armTag
|
|
108512
|
-
});
|
|
108513
|
-
return siteUrl ? /* @__PURE__ */ import_react18.default.createElement(PlatformLink, { url: siteUrl, label: "Site" }) : /* @__PURE__ */ import_react18.default.createElement(Box_default, { marginRight: 1 }, /* @__PURE__ */ import_react18.default.createElement(PointerSmallIcon, null), /* @__PURE__ */ import_react18.default.createElement(Box_default, { marginLeft: 1 }, /* @__PURE__ */ import_react18.default.createElement(Text, { skin: "secondary", underline: true }, "Site (publish your site to enable preview)")));
|
|
108514
|
-
};
|
|
108515
|
-
|
|
108516
|
-
// ../cli-astro-commands/src/components/PlatformLink/EditorLink.tsx
|
|
108313
|
+
// ../cli-astro-commands/src/components/PlatformLink/PlatformLink.tsx
|
|
108517
108314
|
init_esm_shims();
|
|
108518
|
-
var
|
|
108519
|
-
var
|
|
108520
|
-
|
|
108521
|
-
const editorUrl = resolvePlatformUrl2({
|
|
108522
|
-
platformType: PlatformType.Editor(),
|
|
108523
|
-
armTag
|
|
108524
|
-
});
|
|
108525
|
-
return /* @__PURE__ */ import_react19.default.createElement(PlatformLink, { url: editorUrl, label: "Editor" });
|
|
108315
|
+
var import_react16 = __toESM(require_react(), 1);
|
|
108316
|
+
var PlatformLink = ({ url, label }) => {
|
|
108317
|
+
return /* @__PURE__ */ import_react16.default.createElement(Box_default, { marginRight: 1 }, /* @__PURE__ */ import_react16.default.createElement(PointerSmallIcon, null), /* @__PURE__ */ import_react16.default.createElement(Box_default, { marginLeft: 1 }, /* @__PURE__ */ import_react16.default.createElement(Link, { url }, label)));
|
|
108526
108318
|
};
|
|
108527
108319
|
|
|
108528
108320
|
export {
|
|
108529
108321
|
useARMClient,
|
|
108530
|
-
|
|
108322
|
+
createRedirectLink,
|
|
108323
|
+
RedirectLink,
|
|
108324
|
+
useSite,
|
|
108325
|
+
useUpdateDeploymentTopology,
|
|
108531
108326
|
PlatformLink,
|
|
108532
108327
|
readAppConfig,
|
|
108533
108328
|
saveAppConfig,
|
|
108534
108329
|
SiteSelector,
|
|
108535
|
-
SiteProvider
|
|
108536
|
-
useSite,
|
|
108537
|
-
useResolvePlatformUrl,
|
|
108538
|
-
useUpdateDeploymentTopology,
|
|
108539
|
-
LivesiteLinkForApp,
|
|
108540
|
-
EditorLink
|
|
108330
|
+
SiteProvider
|
|
108541
108331
|
};
|
|
108542
108332
|
/*! Bundled license information:
|
|
108543
108333
|
|
|
@@ -108593,4 +108383,4 @@ export {
|
|
|
108593
108383
|
*)
|
|
108594
108384
|
*)
|
|
108595
108385
|
*/
|
|
108596
|
-
//# sourceMappingURL=chunk-
|
|
108386
|
+
//# sourceMappingURL=chunk-7CZ66YXW.js.map
|