@wix/cli-app 1.1.11 → 1.1.12
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/build/CreateVersionCommand-NUIIBF7A.js +4 -0
- package/build/{CreateVersionCommand-RHTO3DA7.js.map → CreateVersionCommand-NUIIBF7A.js.map} +1 -1
- package/build/DevCommand-BN25CWVP.js +4 -0
- package/build/{DevCommand-OFSQSCJW.js.map → DevCommand-BN25CWVP.js.map} +1 -1
- package/build/GenerateCommand-YJ27MSRT.js +99 -0
- package/build/GenerateCommand-YJ27MSRT.js.map +1 -0
- package/build/PreviewCommand-UC6TGBTC.js +4 -0
- package/build/ServeCommand-HWXGL7AV.js +4 -0
- package/build/{ServeCommand-R5SAKRKU.js.map → ServeCommand-HWXGL7AV.js.map} +1 -1
- package/build/{build-IS5AWEWP.js → build-RP6W4QEA.js} +2 -2
- package/build/chunk-6WJSV7WT.js +4 -0
- package/build/chunk-6WJSV7WT.js.map +1 -0
- package/build/chunk-B5HZNQJV.js +4 -0
- package/build/{chunk-2BVF7R6U.js → chunk-BGJWNKGZ.js} +2 -2
- package/build/{chunk-7WZDL63V.js → chunk-BO7BWQLZ.js} +2 -2
- package/build/{chunk-HNH75HDQ.js → chunk-D2SHWB76.js} +2 -2
- package/build/{chunk-QWDVUZEW.js → chunk-F2KYPCJP.js} +2 -2
- package/build/{chunk-7BWMEPZ3.js → chunk-F3BQNR6X.js} +2 -2
- package/build/{chunk-JWWXSIBF.js → chunk-FV67T4ZH.js} +2 -2
- package/build/{chunk-JWWXSIBF.js.map → chunk-FV67T4ZH.js.map} +1 -1
- package/build/{chunk-YHWDL3DF.js → chunk-G5KG2B42.js} +2 -2
- package/build/chunk-GCBXRNFB.js +75 -0
- package/build/chunk-GCBXRNFB.js.map +1 -0
- package/build/{chunk-RJ43KJ3G.js → chunk-K7GUDJFG.js} +2 -2
- package/build/{chunk-JCBTQBIR.js → chunk-OYUGDF7S.js} +2 -2
- package/build/chunk-PJ7ZZBC4.js +11 -0
- package/build/chunk-PJ7ZZBC4.js.map +1 -0
- package/build/{chunk-2MVU7B3I.js → chunk-RQK35Z3D.js} +4 -4
- package/build/chunk-RQK35Z3D.js.map +1 -0
- package/build/{chunk-5IXE5FNR.js → chunk-UJW3X3T2.js} +2 -2
- package/build/chunk-UZC2NC3I.js +4 -0
- package/build/chunk-UZC2NC3I.js.map +1 -0
- package/build/chunk-VOV46J2K.js +4 -0
- package/build/chunk-VOV46J2K.js.map +1 -0
- package/build/{chunk-ZHEN7NIQ.js → chunk-VWRROJHT.js} +2 -2
- package/build/{chunk-UBWBH64V.js → chunk-W74FRPRP.js} +2 -2
- package/build/{chunk-EQI25LY6.js → chunk-Y4THEZGJ.js} +2 -2
- package/build/{chunk-EQI25LY6.js.map → chunk-Y4THEZGJ.js.map} +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/{preview-6XHIXIDA.js → preview-US5F3VRS.js} +2 -2
- package/build/{render-command-MG2TJRUD.js → render-command-SXRUN6CW.js} +2 -2
- package/package.json +2 -2
- package/templates/custom-element/element.json.ejs +4 -0
- package/templates/custom-element/element.tsx.ejs +13 -0
- package/templates/custom-element/panel.tsx.ejs +13 -0
- package/templates/dashboard-plugin/plugin.json.ejs +4 -0
- package/templates/{dashboard-page-plugin → dashboard-plugin}/plugin.tsx.ejs +4 -4
- package/build/CreateVersionCommand-RHTO3DA7.js +0 -4
- package/build/DevCommand-OFSQSCJW.js +0 -4
- package/build/GenerateCommand-43LJGGHV.js +0 -99
- package/build/GenerateCommand-43LJGGHV.js.map +0 -1
- package/build/PreviewCommand-CEE6NMDS.js +0 -4
- package/build/ServeCommand-R5SAKRKU.js +0 -4
- package/build/chunk-2MVU7B3I.js.map +0 -1
- package/build/chunk-47TDKY2B.js +0 -4
- package/build/chunk-BPHZBR73.js +0 -4
- package/build/chunk-BPHZBR73.js.map +0 -1
- package/build/chunk-GNLLOWHY.js +0 -75
- package/build/chunk-GNLLOWHY.js.map +0 -1
- package/build/chunk-LW6L3WY3.js +0 -11
- package/build/chunk-LW6L3WY3.js.map +0 -1
- package/build/chunk-WV4KTPXI.js +0 -4
- package/build/chunk-WV4KTPXI.js.map +0 -1
- package/templates/dashboard-page-plugin/plugin.json.ejs +0 -4
- /package/build/{PreviewCommand-CEE6NMDS.js.map → PreviewCommand-UC6TGBTC.js.map} +0 -0
- /package/build/{build-IS5AWEWP.js.map → build-RP6W4QEA.js.map} +0 -0
- /package/build/{chunk-47TDKY2B.js.map → chunk-B5HZNQJV.js.map} +0 -0
- /package/build/{chunk-2BVF7R6U.js.map → chunk-BGJWNKGZ.js.map} +0 -0
- /package/build/{chunk-7WZDL63V.js.map → chunk-BO7BWQLZ.js.map} +0 -0
- /package/build/{chunk-HNH75HDQ.js.map → chunk-D2SHWB76.js.map} +0 -0
- /package/build/{chunk-QWDVUZEW.js.map → chunk-F2KYPCJP.js.map} +0 -0
- /package/build/{chunk-7BWMEPZ3.js.map → chunk-F3BQNR6X.js.map} +0 -0
- /package/build/{chunk-YHWDL3DF.js.map → chunk-G5KG2B42.js.map} +0 -0
- /package/build/{chunk-RJ43KJ3G.js.map → chunk-K7GUDJFG.js.map} +0 -0
- /package/build/{chunk-JCBTQBIR.js.map → chunk-OYUGDF7S.js.map} +0 -0
- /package/build/{chunk-5IXE5FNR.js.map → chunk-UJW3X3T2.js.map} +0 -0
- /package/build/{chunk-ZHEN7NIQ.js.map → chunk-VWRROJHT.js.map} +0 -0
- /package/build/{chunk-UBWBH64V.js.map → chunk-W74FRPRP.js.map} +0 -0
- /package/build/{preview-6XHIXIDA.js.map → preview-US5F3VRS.js.map} +0 -0
- /package/build/{render-command-MG2TJRUD.js.map → render-command-SXRUN6CW.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as _createRequire } from 'node:module';
|
|
2
2
|
const require = _createRequire(import.meta.url);
|
|
3
|
-
import{i as t}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{i as t}from"./chunk-GCBXRNFB.js";import{h as r}from"./chunk-HFDLXX7R.js";r();import{mkdir as e}from"node:fs/promises";import{resolve as i}from"node:path";import{homedir as o}from"node:os";function a(){return t().dataDir??i(o(),".wix")}async function D(){await e(a(),{recursive:!0})}export{a,D as b};
|
|
4
|
+
//# sourceMappingURL=chunk-BO7BWQLZ.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as _createRequire } from 'node:module';
|
|
2
2
|
const require = _createRequire(import.meta.url);
|
|
3
|
-
import{n as s,q as c}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{n as s,q as c}from"./chunk-RQK35Z3D.js";import{c as E}from"./chunk-UJW3X3T2.js";import{e as p,f as l}from"./chunk-GCBXRNFB.js";import{e as C,h as i}from"./chunk-HFDLXX7R.js";i();import{randomUUID as S}from"node:crypto";function _(r,e){r.updateDefaults(v(e))}function v(r){return r?{_client_id:r,_uuid:r,logged_user_id:r,logged_account_id:r,target_account_id:r}:{_client_id:S()}}i();import{uptime as V}from"node:process";i();var f=C(E(),1);import U from"node:os";import{platform as k,version as L}from"node:process";function d({cliVersion:r,flow:e}){return{...e?{flow:e}:{},cliVersion:r,isCI:f.default,nodeVersion:L,osName:N(),osVersion:U.release()}}function N(){switch(k){case"darwin":return"mac";case"win32":return"windows";default:return"linux"}}var u=()=>Math.round(V()*1e3);function B({biLogger:r,command:e,flow:w,cliVersion:x,projectId:g,extensions:t}){let n={command:e.name(),arguments:e.args.join(",")??"",flags:Object.keys(e.opts()).join(",")};return r.report(c({...d({cliVersion:x,flow:w}),...n,...g?{projectId:g}:{},isValid:!0})),{succeed(){r.report(s({...n,...t?{extensions:JSON.stringify(t)}:{},duration:u(),isSuccess:!0,isValid:!0}))},failed(o){let y=p(o)?{errorType:l(o)?"SystemError":"UserError",errorName:o.name,errorMessage:o.message}:o instanceof Error?{errorType:"UnknownError",errorName:o.name,errorMessage:o.message}:{errorType:"UnknownError",errorMessage:JSON.stringify(o)};r.report(s({...n,...y,...t?{extensions:JSON.stringify(t)}:{},duration:u(),isSuccess:!1,isValid:!0}))}}}i();export{_ as a,B as b};
|
|
4
|
+
//# sourceMappingURL=chunk-D2SHWB76.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as _createRequire } from 'node:module';
|
|
2
2
|
const require = _createRequire(import.meta.url);
|
|
3
|
-
import{C as b,h as e,u as o,v as d,w as u,x as p,y as c,z as I}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{C as b,h as e,u as o,v as d,w as u,x as p,y as c,z as I}from"./chunk-GCBXRNFB.js";import{h as E}from"./chunk-HFDLXX7R.js";E();import C from"node:fs/promises";var l=e.object({errorReporting:e.object({url:e.string().optional(),artifact:e.object({fullArtifactId:e.string().max(255).min(1),version:e.string().max(255).min(1)}).optional()}).optional()}),m=e.object({iframeUrl:e.string().optional(),scriptAsset:e.object({exportedName:e.string(),containerId:e.string(),url:e.string(),scriptType:e.string().optional()}).optional()}),S=e.object({hostingPlatform:e.string(),fullPage:e.boolean().nullish(),hideInSidebar:e.boolean().nullish(),priority:e.number().nullish(),routePath:e.string().nullish(),title:e.string(),pageCategoryId:e.string().uuid().nullish(),activeSidebarPageId:e.string().nullish(),requiredPermission:e.string().nullish(),previousRoutePaths:e.array(e.string()).nullish()}).merge(l).merge(m).passthrough(),N=e.object({width:e.number().nullish(),height:e.number().nullish()}).merge(m).passthrough(),g=e.object({appId:e.string(),componentId:e.string().uuid(),spec:e.string().min(1),variantValue:e.string()}).passthrough().optional(),_=e.object({compId:e.string(),compType:e.literal(o.BACK_OFFICE_PAGE),compData:e.object({backOfficePage:S}),compName:e.string().optional(),experiment:g}).passthrough(),T=e.object({compId:e.string(),compType:e.literal(o.BACK_OFFICE_EXTENSION),compData:e.object({backOfficeExtension:e.object({hostingPlatform:e.string(),extends:e.string(),title:e.string().nullish(),extensionType:e.literal(I.BACK_OFFICE_EXTENSION_WIDGET),requiredPermission:e.string().nullish(),widget:N}).merge(l).passthrough()}),compName:e.string().optional(),experiment:g}).passthrough(),j=e.object({compId:e.string(),compType:e.literal(o.BACK_OFFICE_EXTENSION_WIDGET),compData:e.object({backOfficeExtensionWidget:e.object({hostingPlatform:e.string(),extends:e.string(),title:e.string().nullish(),description:e.string().optional(),requiredPermission:e.string().nullish(),width:e.number().nullish(),height:e.number().nullish()}).merge(m).merge(l).passthrough()}),compName:e.string().optional(),experiment:g}).passthrough(),A=e.object({compId:e.string(),compType:e.literal(o.BACK_OFFICE_EXTENSION_MENU_ITEM),compData:e.object({backOfficeExtensionMenuItem:e.object({id:e.string().uuid(),title:e.string().min(1),subtitle:e.string().max(200).optional(),iconKey:e.string().min(3).max(50).optional(),extends:e.string().uuid(),action:e.object({navigateToPage:e.object({pageId:e.string().uuid(),relativeUrl:e.string().optional()}),openModal:e.object({componentId:e.string().uuid(),componentParams:e.record(e.string().min(1),e.string().min(1)).optional()})}).partial().superRefine((n,i)=>{!n.navigateToPage&&!n.openModal&&i.addIssue({code:e.ZodIssueCode.custom,message:"action must have either navigateToPage or openModal"})}),sentryDSN:e.string().optional(),requiredPermission:e.string().optional()}).merge(m).merge(l).passthrough()}),compName:e.string().optional(),experiment:g}).passthrough(),D=e.object({compId:e.string(),compType:e.literal(o.BACK_OFFICE_MODAL),compData:e.object({backOfficeModal:e.object({hostingPlatform:e.string(),title:e.string().nullish(),requiredPermission:e.string().nullish(),width:e.number().nullish(),height:e.number().nullish()}).merge(m).merge(l).passthrough()}),compName:e.string().optional(),experiment:g}).passthrough(),v=e.object({compId:e.string(),compType:e.literal(o.BACK_OFFICE_SIDEBAR_CATEGORY),compData:e.object({backOfficeSidebarCategory:e.object({hostingPlatform:e.string(),title:e.string(),priority:e.number().nullish()})}),compName:e.string().optional()}).passthrough(),y=e.object({compId:e.string(),compType:e.literal(o.BACK_OFFICE_WIDGET),compName:e.string().optional()}).passthrough(),P=e.object({compId:e.string(),compType:e.literal(o.BACK_OFFICE_EXTENSION_CONTAINER),compName:e.string().optional()}).passthrough(),F=e.object({template:e.string(),name:e.string(),pages:e.enum([u.NONE_PAGES,u.ONCE,u.SPECIFIC_PAGES]),placement:e.enum([p.HEAD,p.BODY_START,p.BODY_END,p.NONE_PLACEMENT]),connectArticleUrl:e.string(),embedCategory:e.enum([c.UNKNOWN,c.FUNCTIONAL,c.ESSENTIAL,c.ANALYTICS,c.ADVERTISING]),loadOnce:e.boolean(),allowedForFreeSite:e.boolean()}),x=e.object({compId:e.string(),compType:e.literal(o.EMBEDDED_SCRIPT),compName:e.string().optional(),compData:e.object({embeddedScriptComponentData:F})}).passthrough(),M=e.object({base:e.object({id:e.string().optional(),name:e.string()}),installation:e.object({base:e.object({autoAdd:e.boolean().optional(),essential:e.boolean().optional(),maxInstances:e.number().optional()}).optional(),widget:e.object({default_preset:e.object({desktop_preset_id:e.string().optional(),tablet_preset_id:e.string().optional(),mobile_preset_id:e.string().optional()}).optional(),region:e.enum([d.BODY,d.FOOTER,d.HEADER])}).optional()}).optional(),widgetData:e.object({tagName:e.string(),scriptUrl:e.string()}),behaviors:e.object({settings:e.object({settingsUrl:e.string()}).optional(),dashboard:e.object({dashboardPageComponentId:e.string()}).optional()}),size:e.object({width:e.object({allowStretch:e.boolean().optional(),defaultWidth:e.number().optional(),stretchByDefault:e.boolean().optional()}),height:e.object({defaultHeight:e.number(),heightMode:e.enum([b.AUTO,b.FIXED,b.UNKNOWN]).optional()})})}),k=e.object({compId:e.string(),compType:e.literal(o.CUSTOM_ELEMENT_WIDGET),compName:e.string().optional(),compData:e.object({customElementWidget:M})}).passthrough(),W=e.object({appId:e.string(),components:e.array(e.discriminatedUnion("compType",[_,T,j,A,D,v,y,P,x,k]))});async function L(n){try{let i=await C.readFile(n,"utf-8");return W.parse(JSON.parse(i))}catch(i){let a=i instanceof Error?i.toString():JSON.stringify(i);throw new Error(`Failed to read App Manifest at ${n}: ${a}`)}}var f=(n,i)=>new URL(n,i).href,h=(n,i)=>{let{scriptAsset:a,iframeUrl:r}=n;return a?{scriptAsset:{...a,url:f(a.url,i)}}:r?{iframeUrl:f(r,i)}:n},U=(n,i)=>({template:n.template.replaceAll("__STATICS_BASE_URL_PLACEHOLDER__",i)}),J=(n,i)=>{let a=JSON.parse(JSON.stringify(n)),r=i.endsWith("/")?i:`${i}/`;return a.components.forEach(O=>{let{compData:t,compType:s}=O;s===o.BACK_OFFICE_PAGE&&(t.backOfficePage={...t.backOfficePage,...h(t.backOfficePage,r)}),s===o.BACK_OFFICE_EXTENSION&&(t.backOfficeExtension.widget={...t.backOfficeExtension.widget,...h(t.backOfficeExtension.widget,r)}),s===o.BACK_OFFICE_EXTENSION_WIDGET&&(t.backOfficeExtensionWidget={...t.backOfficeExtensionWidget,...h(t.backOfficeExtensionWidget,r)}),s===o.BACK_OFFICE_MODAL&&(t.backOfficeModal={...t.backOfficeModal,...h(t.backOfficeModal,r)}),s===o.EMBEDDED_SCRIPT&&(t.embeddedScriptComponentData={...t.embeddedScriptComponentData,...U(t.embeddedScriptComponentData,r)}),s===o.CUSTOM_ELEMENT_WIDGET&&(t.customElementWidget={...t.customElementWidget,widgetData:{...t.customElementWidget.widgetData,scriptUrl:f(t.customElementWidget.widgetData.scriptUrl,r)},behaviors:{...t.customElementWidget.behaviors,...t.customElementWidget.behaviors.settings?{settings:{settingsUrl:f(t.customElementWidget.behaviors.settings.settingsUrl,r)}}:{}}})}),a};export{L as a,J as b};
|
|
4
|
+
//# sourceMappingURL=chunk-F2KYPCJP.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as _createRequire } from 'node:module';
|
|
2
2
|
const require = _createRequire(import.meta.url);
|
|
3
|
-
import{
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{a as w}from"./chunk-UZC2NC3I.js";import{m as E,n as y}from"./chunk-G5KG2B42.js";import{A as p,B as h,d as i,g as x,j as f,s as P}from"./chunk-UJW3X3T2.js";import{I as b,L as B,N as t,c as d,d as g,n as m}from"./chunk-GCBXRNFB.js";import{h as s}from"./chunk-HFDLXX7R.js";s();async function _(o){let e=b(o),l=B(o);if(!await m(e)||!await m(l))throw new d({code:g.BuiltProjectNeeded()})}s();import r from"react";var a=({url:o,label:e,withPointer:l=!0})=>r.createElement(i,null,r.createElement(i,{marginRight:1},l&&r.createElement(f,null),r.createElement(i,{marginLeft:1},r.createElement(P,{url:o},e)))),O=()=>{let{t:o}=h(),{isPlatformExists:e,hasSinglePlatform:l}=w(),u=E(),n=C=>y({envConfig:u,platformType:C});return r.createElement(r.Fragment,null,l(t.Dashboard())?r.createElement(i,{flexDirection:"row"},r.createElement(p,{i18nKey:"general.open_preview.title_single"}),r.createElement(a,{withPointer:!1,url:n(t.Dashboard({route:"/"})),label:o("general.platform.dashboard")})):r.createElement(i,{flexDirection:"column"},r.createElement(p,{i18nKey:"general.open_preview.title_multiple"}),r.createElement(i,{paddingLeft:2,flexDirection:"column"},e(t.Site())&&(u.site.viewUrl?r.createElement(a,{url:n(t.Site()),label:o("general.platform.site")}):r.createElement(i,{marginRight:1},r.createElement(f,null),r.createElement(i,{marginLeft:1},r.createElement(x,{skin:"secondary",underline:!0},o("general.platform.unpublished_site"))))),e(t.Editor())&&r.createElement(a,{url:n(t.Editor()),label:o("general.platform.editor")}),e(t.Dashboard())&&r.createElement(a,{url:n(t.Dashboard({route:"/"})),label:o("general.platform.dashboard")}))))};export{O as a,_ as b};
|
|
4
|
+
//# sourceMappingURL=chunk-F3BQNR6X.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"@wix/cli-app\",\n \"description\": \"CLI tool for Wix apps\",\n \"version\": \"1.1.
|
|
1
|
+
{"version":3,"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"@wix/cli-app\",\n \"description\": \"CLI tool for Wix apps\",\n \"version\": \"1.1.12\",\n \"author\": \"Amit Dahan\",\n \"dependencies\": {\n \"vite\": \"5.2.2\"\n },\n \"devDependencies\": {\n \"@commander-js/extra-typings\": \"^12.0.1\",\n \"@types/lodash\": \"^4.17.0\",\n \"@types/mustache\": \"^4.2.5\",\n \"@wix/ambassador-cli-site-override-service-v1-site-override\": \"^1.0.4\",\n \"@wix/ambassador-ctp-app-cloud-deployer-service-v1-app-cloud-deployer\": \"^1.0.17\",\n \"@wix/ambassador-ctp-gradual-rollout-v1-app-config\": \"^1.0.64\",\n \"@wix/ambassador-devcenter-components-v1-component\": \"^1.0.376\",\n \"@wix/arm-client\": \"workspace:*\",\n \"@wix/bi-logger-wix-cli\": \"^1.33.0\",\n \"@wix/cli-app-definitions\": \"workspace:*\",\n \"@wix/cli-app-manifest\": \"workspace:*\",\n \"@wix/cli-auth\": \"workspace:*\",\n \"@wix/cli-command-contract\": \"workspace:*\",\n \"@wix/cli-core-definitions\": \"workspace:*\",\n \"@wix/cli-debug-log\": \"workspace:*\",\n \"@wix/cli-error\": \"workspace:*\",\n \"@wix/cli-error-reporting\": \"workspace:*\",\n \"@wix/cli-fs\": \"workspace:*\",\n \"@wix/cli-http-client\": \"workspace:*\",\n \"@wix/cli-http-client-react\": \"workspace:*\",\n \"@wix/cli-i18n\": \"workspace:*\",\n \"@wix/cli-logger\": \"workspace:*\",\n \"@wix/cli-site-selector\": \"workspace:*\",\n \"@wix/cli-ssl\": \"workspace:*\",\n \"@wix/cli-telemetry\": \"workspace:*\",\n \"@wix/cli-telemetry-react\": \"workspace:*\",\n \"@wix/cli-test-overrides\": \"workspace:*\",\n \"@wix/cli-ui-kit\": \"workspace:*\",\n \"@wix/dev-center-client\": \"workspace:*\",\n \"@wix/extensions-data-client\": \"workspace:*\",\n \"@wix/gena\": \"workspace:*\",\n \"@wix/site-list-client\": \"workspace:*\",\n \"@wix/site-override-client\": \"workspace:*\",\n \"@wix/tsup-configs\": \"workspace:*\",\n \"@wix/user-browser\": \"workspace:*\",\n \"chalk\": \"^5.3.0\",\n \"chokidar\": \"^3.6.0\",\n \"commander\": \"^12.0.0\",\n \"fast-equals\": \"^5.0.1\",\n \"form-data\": \"^4.0.0\",\n \"globby\": \"^13.2.2\",\n \"lodash\": \"^4.17.21\",\n \"mustache\": \"^4.2.0\",\n \"p-retry\": \"^5.1.2\",\n \"p-wait-for\": \"^5.0.2\",\n \"prompts\": \"^2.4.2\",\n \"semver\": \"^7.6.0\",\n \"tempy\": \"^3.1.0\",\n \"typed-emitter\": \"^2.1.0\",\n \"variant\": \"^3.0.0-dev.27\",\n \"vite-plugin-externals\": \"^0.6.2\",\n \"zod\": \"^3.22.4\"\n },\n \"engines\": {\n \"node\": \">= 18.16\"\n },\n \"exports\": {\n \".\": \"./build/index.js\",\n \"./client\": {\n \"types\": \"./client.d.ts\"\n },\n \"./internal/component-hmr-wrapper\": \"./internal/component-hmr-wrapper.tsx\",\n \"./tsconfig.app.json\": \"./tsconfig.app.json\",\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"build\",\n \"tsconfig.app.json\",\n \"client.d.ts\",\n \"internal\",\n \"templates\"\n ],\n \"peerDependencies\": {\n \"react\": \"^16.14 || ^17 || ^18\",\n \"react-dom\": \"^16.14 || ^17 || ^18\"\n },\n \"peerDependenciesMeta\": {\n \"react-dom\": {\n \"optional\": true\n }\n },\n \"perfer\": {\n \"bundleSize\": {\n \"files\": [\n {\n \"glob\": \"./build/index.js\",\n \"maxSize\": \"460kb\"\n }\n ]\n }\n },\n \"publishConfig\": {\n \"registry\": \"https://registry.npmjs.org/\",\n \"access\": \"public\",\n \"versionBumpStrategy\": \"manual\",\n \"logLevel\": \"verbose\"\n },\n \"scripts\": {\n \"build\": \"run -T tsup\",\n \"build:watch\": \"run build --watch\",\n \"lint\": \"run -T lint-package\",\n \"test\": \"yarn workspace @wix/cli-app-spec run test\",\n \"test:watch\": \"yarn workspace @wix/cli-app-spec run test:watch\",\n \"typecheck\": \"run -T tsc --noEmit\"\n },\n \"sideEffects\": false,\n \"type\": \"module\",\n \"wix\": {\n \"artifact\": {\n \"groupId\": \"com.wixpress.npm\",\n \"artifactId\": \"wix-cli-app\"\n },\n \"validations\": {\n \"postBuild\": [\n \"typecheck\",\n \"lint\"\n ]\n }\n }\n}\n"],"mappings":";;AAGE,IAAAA,EAAW","names":["version"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as _createRequire } from 'node:module';
|
|
2
2
|
const require = _createRequire(import.meta.url);
|
|
3
|
-
import{c as v,d as x,f as u,h as L,i as q,j as U,r as W}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{c as v,d as x,f as u,h as L,i as q,j as U,r as W}from"./chunk-RQK35Z3D.js";import{A as V,e as H,g as z,q as j,s as k}from"./chunk-UJW3X3T2.js";import{J as O,M as $,a as b,c as f,d as h,h as m,i as C,l as J,m as M,ma as Q,n as E}from"./chunk-GCBXRNFB.js";import{e as T,h as s}from"./chunk-HFDLXX7R.js";s();s();var ie={},pe={};var ne={},me={},ce={},le={};function I(t){var e={"api._api_base_domain_":[{srcPath:"/apps-release-manager-service-web",destPath:""}],"bo._base_domain_":[{srcPath:"/apps-release-manager-service-web",destPath:""}],"www._base_domain_":[{srcPath:"/apps-release-manager-service-web/artifacts-release-manager/app-releases",destPath:"/artifacts-release-manager/app-releases"},{srcPath:"/_api/apps-release-manager-service-web/artifacts-release-manager/app-releases",destPath:"/artifacts-release-manager/app-releases"},{srcPath:"/apps-release-manager-service-web/apps/create",destPath:"/apps/create"},{srcPath:"/apps-release-manager-service-web/apps/promote",destPath:"/apps/promote"},{srcPath:"/apps-release-manager-service-web/apps/tags",destPath:"/apps/tags"}],"manage._base_domain_":[{srcPath:"/apps-release-manager-service-web/apps/promote",destPath:"/apps/promote"},{srcPath:"/apps-release-manager-service-web/apps/create",destPath:"/apps/create"},{srcPath:"/apps-release-manager-service-web/apps/tags",destPath:"/apps/tags"}]};return x(Object.assign(t,{domainToMappings:e}))}function G(t){var e=u(ie,{}),r=e.toJSON,a=e.fromJSON,i=u(pe,{}).fromJSON;function o(d){var c=d.host,l=r(t),g={entityFqdn:"wix.ctp.gradual_rollout.v1.app_config",method:"POST",methodFqn:"com.wix.ctp.AppsReleaseManagerService.CreateAppRelease",url:I({protoPath:"/apps/create/{appId}",data:l,host:c}),data:l,transformResponse:i};return g}return o.fromReq=a,o.__isAmbassador=!0,o}function B(t){var e=u(ce,{}),r=e.toJSON,a=e.fromJSON,i=u(le,{}).fromJSON;function o(d){var c=d.host,l=r(t),g={entityFqdn:"wix.ctp.gradual_rollout.v1.app_config",method:"PUT",methodFqn:"com.wix.ctp.AppsReleaseManagerService.UpdateAppRelease",url:I({protoPath:"/apps/tags/{tag}",data:l,host:c}),data:l,transformResponse:i};return g}return o.fromReq=a,o.__isAmbassador=!0,o}function K(t){var e=u(ne,{}),r=e.toJSON,a=e.fromJSON,i=u(me,{}).fromJSON;function o(d){var c=d.host,l=r(t),g={entityFqdn:"wix.ctp.gradual_rollout.v1.app_config",method:"POST",methodFqn:"com.wix.ctp.AppsReleaseManagerService.PromoteAppReleaseToDevCenter",url:I({protoPath:"/apps/promote/{appId}/{tag}",data:l,host:c}),data:l,transformResponse:i};return g}return o.fromReq=a,o.__isAmbassador=!0,o}var P=T(b(),1);s();var X=m.object({newVersion:m.string()}),Y=m.object({tag:m.string()});var{AppPermissionDenied:Z}=h,ee=(0,P.variant)({TagUpdated:{},TagNotFound:(0,P.fields)()}),_=class{constructor(e){this.httpClient=e;let{minRetryTimeout:r}=C();this.retryOptions={retries:3,minTimeout:r,maxTimeout:3*1e3}}retryOptions;createAppRelease=async(e,r)=>{try{let{data:a}=await v(()=>this.httpClient.request(G({appId:e.appId,componentConfigs:e.components,projectId:r})),this.retryOptions);return Y.parse(a).tag}catch(a){throw q(a)&&a.response?.status===403?new f({code:Z({appId:e.appId}),cause:a}):new f({code:h.FailedToCreateAppRelease(),cause:a})}};updateAppRelease=async(e,r)=>{try{return await v(()=>this.httpClient.request(B({appId:e.appId,componentConfigs:e.components,tag:r})),this.retryOptions),ee.TagUpdated()}catch(a){if(q(a)){if(a.response?.status===404)return ee.TagNotFound({cause:a});if(a.response?.status===403)throw new f({code:Z({appId:e.appId}),cause:a})}throw new f({code:h.FailedToUpdateAppRelease(),cause:a})}};promoteToDevCenter=async(e,r,a)=>{let{data:i}=await v(()=>this.httpClient.request(K({appId:e,tag:r,versionType:a})),this.retryOptions);return X.parse(i)}};s();import{useMemo as ue}from"react";s();s();import{useMemo as de}from"react";function S({type:t}){let{getAccessToken:e}=U();return de(()=>L({type:t,getAppToken:e}),[t,e])}function fe(){let t=S({type:"backoffice"});return ue(()=>new _(t),[t])}s();s();import ge,{useContext as he,createContext as ve}from"react";var te=ve(null),it=({children:t,armTag:e})=>ge.createElement(te.Provider,{value:{armTag:e}},t),re=()=>{let t=he(te);if(t===null)throw new Error("useArmTag() cannot be used without an <ArmTagProvider>");return t};s();s();var _e={},Se={sites:"_site"},ye={createdDate:"google.protobuf.Timestamp",updatedDate:"google.protobuf.Timestamp",trashedDate:"google.protobuf.Timestamp"};function we(t){var e={"www._base_domain_":[{srcPath:"/_api/sites-list",destPath:"/api"},{srcPath:"/_api/sites-list/v2/sites",destPath:"/v2/sites"}],"feedback._base_domain_":[{srcPath:"/_api/sites-list",destPath:"/api"}],"manage._base_domain_":[{srcPath:"/_api/sites-list",destPath:"/api"},{srcPath:"/_api/sites-list/v2/sites",destPath:"/v2/sites"},{srcPath:"/_api/sites-list-data",destPath:"/api/sites-list-data"}],"www.wixapis.com":[{srcPath:"/site-list/v2/sites",destPath:"/v2/sites"}],"api._api_base_domain_":[{srcPath:"/sites-list",destPath:""}],"bo._base_domain_":[{srcPath:"/_api/sites-list/v2/sites",destPath:"/v2/sites"}],"wixbo.ai":[{srcPath:"/_api/sites-list/v2/sites",destPath:"/v2/sites"}],"dev._base_domain_":[{srcPath:"/_api/sites-list/v2/sites",destPath:"/v2/sites"}],"editor._base_domain_":[{srcPath:"/_api/sites-list/v2/sites",destPath:"/v2/sites"}],"blocks._base_domain_":[{srcPath:"/_api/sites-list/v2/sites",destPath:"/v2/sites"}],"create.editorx":[{srcPath:"/_api/sites-list/v2/sites",destPath:"/v2/sites"}]};return x(Object.assign(t,{domainToMappings:e}))}function N(t){var e=u(_e,{}),r=e.toJSON,a=e.fromJSON,i=u(Se,{_site:ye}).fromJSON;function o(d){var c=d.host,l=r(t),g={entityFqdn:"wix.site_list.v2.site",method:"POST",methodFqn:"com.wixpress.sitelist.api.SiteListServiceV2.QuerySites",url:we({protoPath:"/v2/sites/query",data:l,host:c}),data:l,transformResponse:i};return g}return o.fromReq=a,o.__isAmbassador=!0,o}s();var Re=m.object({id:m.string(),displayName:m.string(),viewUrl:m.union([m.string().url(),m.literal("")]).optional()}),F=m.object({sites:m.array(Re)});var y=class{constructor(e){this.httpClient=e;let{minRetryTimeout:r}=C();this.retryOptions={retries:3,minTimeout:r,maxTimeout:3*1e3}}retryOptions;querySites=async(e={})=>{try{let{data:r}=await v(()=>this.httpClient.request(N(e)),this.retryOptions);return F.parse(r).sites}catch(r){throw new f({code:h.FailedToQuerySites(),cause:r,info:{...e}})}};getSite=async e=>{try{let{data:r}=await v(()=>this.httpClient.request(N({query:{filter:{id:{$in:[e]}}}})),this.retryOptions),{sites:a}=F.parse(r);return a.at(0)??null}catch(r){throw new f({code:h.FailedToGetSite(),cause:r,info:{id:e}})}}};s();import{useMemo as Ce}from"react";function xe(){let t=S({type:"backoffice"});return Ce(()=>new y(t),[t])}s();s();async function D(t,e){let r=O(t);if(!await E(r))return null;try{let i=await M(r),o=await $.safeParseAsync(i);return o.success?o.data:null}catch(i){return e?.(i),null}}async function Dt(t,e){let a={...await D(t)??{},...e};await J(O(t),a)}s();import{createContext as Pe}from"react";var se=Pe(null);s();var w=T(b(),1),A=(0,w.variant)({NotConfigured:{},NotFound:(0,w.fields)(),Resolved:(0,w.fields)()});s();async function Vt({projectFolder:t,siteListClient:{getSite:e},siteId:r,writeDebugLog:a}){let i=r||(await D(t,a))?.siteId;if(!i)return A.NotConfigured();let o=await e(i);return o?A.Resolved({site:o}):A.NotFound({id:i})}s();import{useContext as Ae}from"react";function ae(){let t=Ae(se);if(t===null)throw new Error("useSiteId() cannot be used without an <SiteIdProvider>");return t}s();import R from"react";var oe=T(b(),1);function ar(){let{model:t}=Q(),{site:e}=ae(),{armTag:r}=re();return{appId:t.config.appId,site:e,tag:r}}function or({envConfig:t,platformType:e,siteOverrideId:r}){let{appId:a,site:i,tag:o}=t,d=(0,oe.match)(e,{Dashboard:({route:c})=>c!==void 0?new URL(`dashboard/${i.id}/app/${a}${c}`,"https://manage.wix.com/"):new URL(`dashboard/${i.id}`,"https://manage.wix.com/"),Editor:()=>new URL(`https://wix.com/editor/${i.id}`),Site:()=>{let c=new URL(i.viewUrl);return r&&c.searchParams.append("site-override",r),c}});return d.searchParams.append("apps-override",o),d.toString()}var ir=async({url:t,title:e},r)=>{try{await W(t)}catch{r({type:"error",prefix:"app",msg:R.createElement(j,{type:"error"},R.createElement(V,{i18nKey:"general.open_page_error",components:[R.createElement(z,{bold:!0})],values:{title:e}}),R.createElement(H,null),R.createElement(k,{url:t}))})}};export{y as a,S as b,xe as c,D as d,Dt as e,se as f,A as g,Vt as h,_ as i,fe as j,it as k,ae as l,ar as m,or as n,ir as o};
|
|
4
|
+
//# sourceMappingURL=chunk-G5KG2B42.js.map
|