@wix/cli-app 1.1.101 → 1.1.103
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/{AddPermissionCommand-AQD2ALKK.js → AddPermissionCommand-47NX5FID.js} +2 -2
- package/build/{DevCommand-QWQNRPMT.js → DevCommand-R3ZGOMUJ.js} +10 -10
- package/build/{DevCommand-QWQNRPMT.js.map → DevCommand-R3ZGOMUJ.js.map} +1 -1
- package/build/{GenerateCommand-OQAZ7AQP.js → GenerateCommand-BNSFSYGT.js} +7 -7
- package/build/{LogsCommand-RQIJ3U7F.js → LogsCommand-B4XRPZLR.js} +3 -3
- package/build/PreviewCommand-WY3GWOX4.js +19 -0
- package/build/ReleaseCommand-KDD44AO7.js +23 -0
- package/build/{ServeCommand-WOUZHV2Y.js → ServeCommand-CNYCJPJS.js} +3 -3
- package/build/{build-C6DB6Y6E.js → build-A7OAZ226.js} +6 -6
- package/build/{chunk-4JT7QYEF.js → chunk-2FFNGH2K.js} +2 -2
- package/build/{chunk-KJN5NVSU.js → chunk-2PWMAOFK.js} +6 -6
- package/build/{chunk-JYS6G4NW.js → chunk-4BN6QXJE.js} +149 -37
- package/build/{chunk-JYS6G4NW.js.map → chunk-4BN6QXJE.js.map} +1 -1
- package/build/{chunk-FG7W5UDB.js → chunk-5HJEX4ZX.js} +633 -173
- package/build/{chunk-FG7W5UDB.js.map → chunk-5HJEX4ZX.js.map} +1 -1
- package/build/{chunk-HSSABJL6.js → chunk-ASICDRRU.js} +2 -2
- package/build/{chunk-P5CHCVB6.js → chunk-CLGKOJIA.js} +7 -7
- package/build/chunk-CLGKOJIA.js.map +1 -0
- package/build/{chunk-YK5OGTF3.js → chunk-D4HN4JQJ.js} +2 -2
- package/build/{chunk-VXAXSIUQ.js → chunk-EK3FDNFJ.js} +6 -6
- package/build/{chunk-NPPPO5AD.js → chunk-FQVLZZ37.js} +2 -2
- package/build/{chunk-OMC2SHRJ.js → chunk-HQWWEMUE.js} +7 -7
- package/build/{chunk-DAOCDBEQ.js → chunk-IJSYFKIP.js} +180 -2
- package/build/{chunk-DAOCDBEQ.js.map → chunk-IJSYFKIP.js.map} +1 -1
- package/build/{chunk-6XUQYB5M.js → chunk-LFE6DV2A.js} +3 -3
- package/build/{chunk-5PFWNTTF.js → chunk-N5BZMQKX.js} +2 -2
- package/build/{chunk-ZQWKIC6F.js → chunk-RBX7FQKV.js} +2 -2
- package/build/{chunk-CRTLCQQ3.js → chunk-UC4DVE5N.js} +4 -4
- package/build/{chunk-R66WIGA4.js → chunk-VDEKITDE.js} +2 -2
- package/build/{chunk-MRQDCRFF.js → chunk-WHR6NSJW.js} +2 -2
- package/build/cloudflare-runtime/entry.js +5 -2
- package/build/cloudflare-runtime/getRegisteredExtensions.js +5 -2
- package/build/index.js +23 -23
- package/build/platform-sdk/chunk-BBFFXVJD.js +2 -0
- package/build/platform-sdk/chunk-BBFFXVJD.js.map +1 -0
- package/build/platform-sdk/{chunk-ZBGVDXLX.js → chunk-MAZR75DI.js} +2 -2
- package/build/platform-sdk/chunk-MAZR75DI.js.map +1 -0
- package/build/platform-sdk/chunk-NHYZDMR5.js +2 -0
- package/build/platform-sdk/chunk-NHYZDMR5.js.map +1 -0
- package/build/platform-sdk/dashboard.js +1 -1
- package/build/platform-sdk/editor.js +2 -2
- package/build/platform-sdk/editor.js.map +1 -1
- package/build/platform-sdk/sdk-context.js +1 -1
- package/build/platform-sdk/sdk-context.js.map +1 -1
- package/build/platform-sdk/site.js +1 -1
- package/build/platform-sdk/site.js.map +1 -1
- package/build/{preview-I3VBWU7J.js → preview-O4LXNEA2.js} +12 -12
- package/build/{release-IXG7HZBL.js → release-3FUXB4BT.js} +14 -14
- package/build/{render-command-6MZYM2OA.js → render-command-WE3BHL5N.js} +5 -5
- package/package.json +4 -4
- package/build/PreviewCommand-SSA3LRRR.js +0 -19
- package/build/ReleaseCommand-BBWVLP2S.js +0 -23
- package/build/chunk-P5CHCVB6.js.map +0 -1
- package/build/platform-sdk/chunk-J3SVE4GM.js +0 -2
- package/build/platform-sdk/chunk-J3SVE4GM.js.map +0 -1
- package/build/platform-sdk/chunk-J7RIIVO6.js +0 -2
- package/build/platform-sdk/chunk-J7RIIVO6.js.map +0 -1
- package/build/platform-sdk/chunk-ZBGVDXLX.js.map +0 -1
- /package/build/{AddPermissionCommand-AQD2ALKK.js.map → AddPermissionCommand-47NX5FID.js.map} +0 -0
- /package/build/{GenerateCommand-OQAZ7AQP.js.map → GenerateCommand-BNSFSYGT.js.map} +0 -0
- /package/build/{LogsCommand-RQIJ3U7F.js.map → LogsCommand-B4XRPZLR.js.map} +0 -0
- /package/build/{PreviewCommand-SSA3LRRR.js.map → PreviewCommand-WY3GWOX4.js.map} +0 -0
- /package/build/{ReleaseCommand-BBWVLP2S.js.map → ReleaseCommand-KDD44AO7.js.map} +0 -0
- /package/build/{ServeCommand-WOUZHV2Y.js.map → ServeCommand-CNYCJPJS.js.map} +0 -0
- /package/build/{build-C6DB6Y6E.js.map → build-A7OAZ226.js.map} +0 -0
- /package/build/{chunk-4JT7QYEF.js.map → chunk-2FFNGH2K.js.map} +0 -0
- /package/build/{chunk-KJN5NVSU.js.map → chunk-2PWMAOFK.js.map} +0 -0
- /package/build/{chunk-HSSABJL6.js.map → chunk-ASICDRRU.js.map} +0 -0
- /package/build/{chunk-YK5OGTF3.js.map → chunk-D4HN4JQJ.js.map} +0 -0
- /package/build/{chunk-VXAXSIUQ.js.map → chunk-EK3FDNFJ.js.map} +0 -0
- /package/build/{chunk-NPPPO5AD.js.map → chunk-FQVLZZ37.js.map} +0 -0
- /package/build/{chunk-OMC2SHRJ.js.map → chunk-HQWWEMUE.js.map} +0 -0
- /package/build/{chunk-6XUQYB5M.js.map → chunk-LFE6DV2A.js.map} +0 -0
- /package/build/{chunk-5PFWNTTF.js.map → chunk-N5BZMQKX.js.map} +0 -0
- /package/build/{chunk-ZQWKIC6F.js.map → chunk-RBX7FQKV.js.map} +0 -0
- /package/build/{chunk-CRTLCQQ3.js.map → chunk-UC4DVE5N.js.map} +0 -0
- /package/build/{chunk-R66WIGA4.js.map → chunk-VDEKITDE.js.map} +0 -0
- /package/build/{chunk-MRQDCRFF.js.map → chunk-WHR6NSJW.js.map} +0 -0
- /package/build/{preview-I3VBWU7J.js.map → preview-O4LXNEA2.js.map} +0 -0
- /package/build/{release-IXG7HZBL.js.map → release-3FUXB4BT.js.map} +0 -0
- /package/build/{render-command-6MZYM2OA.js.map → render-command-WE3BHL5N.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{b as n}from"./chunk-NHYZDMR5.js";import"./chunk-7EYXEF6M.js";import"./chunk-SBZEOPXX.js";function o(e,t=!1){return n(e,t)}var c=["wix.com","editorx.com"];var u=new RegExp(`\\.(${c.join("|")})$`),s=["42.wixprod.net","uw2-edt-1.wixprod.net"],a="dev.wix-code.com";var _=new RegExp(`\\.(${s.join("|")})$`),d=new RegExp(`.*\\.${a}$`);import{wixContext as f}from"@wix/sdk-context";function r(e,t){t==="global"?globalThis.__wix_context__!=null?globalThis.__wix_context__.client=e:globalThis.__wix_context__={client:e}:f.client=e}var E=o(e=>(t,i)=>e.fetchWithAuth(t,i));export{r as enableContext};
|
|
2
2
|
//# sourceMappingURL=sdk-context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/@wix/sdk
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/@wix/sdk-runtime/build/rest-modules.js","../../../node_modules/@wix/sdk/build/enable-context.js","../../../node_modules/@wix/sdk/build/context.js"],"sourcesContent":["import { contextualizeRESTModuleV2 } from './context-v2.js';\nexport function createRESTModule(descriptor, elevated = false) {\n return contextualizeRESTModuleV2(descriptor, elevated);\n}\nexport function toURLSearchParams(params, isComplexRequest) {\n const flatten = flattenParams(params);\n // payloads with deep arrays or complex arrays are not serializable as URLSearchParams\n const isPayloadNonSerializableAsUrlSearchParams = Object.entries(flatten).some(([key, value]) => key.includes('.') ||\n (Array.isArray(value) && value.some((v) => typeof v === 'object')));\n const shouldSerializeToRParam = isComplexRequest && isPayloadNonSerializableAsUrlSearchParams;\n if (shouldSerializeToRParam) {\n return new URLSearchParams({ '.r': base64Encode(JSON.stringify(params)) });\n }\n else {\n return Object.entries(flatten).reduce((urlSearchParams, [key, value]) => {\n // inorder to make `foo: [1,2]` turn into `foo=1&foo=2` and not `foo[]=1&foo[]=2`\n const keyParams = Array.isArray(value) ? value : [value];\n keyParams.forEach((param) => {\n if (param === undefined ||\n param === null ||\n (Array.isArray(value) && typeof param === 'object')) {\n return;\n }\n urlSearchParams.append(key, param);\n });\n return urlSearchParams;\n }, new URLSearchParams());\n }\n}\nexport function resolveUrl(opts) {\n const domain = resolveDomain(opts.host);\n const mappings = resolveMappingsByDomain(domain, opts.domainToMappings);\n const path = injectDataIntoProtoPath(opts.protoPath, opts.data || {});\n return resolvePathFromMappings(path, mappings);\n}\nfunction flattenParams(data, path = '') {\n const params = {};\n Object.entries(data).forEach(([key, value]) => {\n const isObject = value !== null && typeof value === 'object' && !Array.isArray(value);\n const fieldPath = resolvePath(path, key);\n if (isObject) {\n const serializedObject = flattenParams(value, fieldPath);\n Object.assign(params, serializedObject);\n }\n else {\n params[fieldPath] = value;\n }\n });\n return params;\n}\nfunction resolvePath(path, key) {\n return `${path}${path ? '.' : ''}${key}`;\n}\nconst base64Encode = (value) => {\n const base64 = typeof btoa !== 'undefined'\n ? btoa(value)\n : Buffer.from(value, 'utf-8').toString('base64');\n return base64.replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_');\n};\nconst DOMAINS = ['wix.com', 'editorx.com'];\nconst USER_DOMAIN = '_';\nconst REGEX_CAPTURE_DOMAINS = new RegExp(`\\\\.(${DOMAINS.join('|')})$`);\nconst WIX_API_DOMAINS = ['42.wixprod.net', 'uw2-edt-1.wixprod.net'];\nconst DEV_WIX_CODE_DOMAIN = 'dev.wix-code.com';\nconst REGEX_CAPTURE_PROTO_FIELD = /{(.*)}/;\nconst REGEX_CAPTURE_API_DOMAINS = new RegExp(`\\\\.(${WIX_API_DOMAINS.join('|')})$`);\nconst REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN = new RegExp(`.*\\\\.${DEV_WIX_CODE_DOMAIN}$`);\nfunction resolveDomain(host) {\n const resolvedHost = fixHostExceptions(host);\n return resolvedHost\n .replace(REGEX_CAPTURE_DOMAINS, '._base_domain_')\n .replace(REGEX_CAPTURE_API_DOMAINS, '._api_base_domain_')\n .replace(REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN, '*.dev.wix-code.com');\n}\n// hosts which standard string replacing doesn't apply to them, will be fixed here.\nfunction fixHostExceptions(host) {\n // https://system-kb.wixanswers.com/kb/en/article/editorx-domains-matching-to-wixcom\n return host.replace('create.editorx.com', 'editor.editorx.com');\n}\nfunction resolveMappingsByDomain(domain, domainToMappings) {\n const mappings = domainToMappings[domain] || domainToMappings[USER_DOMAIN];\n if (!mappings) {\n if (isBaseDomain(domain)) {\n // fallback <lang>.wix.com sub domains to www.wix.com\n // since all of the languages subdomain are not mapped automatically in FP and we want to support those kind of calls\n // for example: fr.wix.com\n return domainToMappings[wwwBaseDomain];\n }\n }\n return mappings;\n}\nfunction isBaseDomain(domain) {\n return !!domain.match(/\\._base_domain_$/);\n}\nconst wwwBaseDomain = 'www._base_domain_';\nfunction injectDataIntoProtoPath(protoPath, data) {\n return protoPath\n .split('/')\n .map((path) => maybeProtoPathToData(path, data))\n .join('/');\n}\nfunction maybeProtoPathToData(protoPath, data) {\n const protoRegExpMatch = protoPath.match(REGEX_CAPTURE_PROTO_FIELD) || [];\n const field = protoRegExpMatch[1];\n if (field) {\n const suffix = protoPath.replace(protoRegExpMatch[0], '');\n return findByPath(data, field, protoPath, suffix);\n }\n return protoPath;\n}\nfunction findByPath(obj, path, defaultValue, suffix) {\n let result = obj;\n for (const field of path.split('.')) {\n if (!result) {\n return defaultValue;\n }\n result = result[field];\n }\n return `${result}${suffix}`;\n}\nfunction resolvePathFromMappings(protoPath, mappings) {\n const mapping = mappings?.find((m) => protoPath.startsWith(m.destPath));\n if (!mapping) {\n // todo: should we return the path? if no - what should we do in case of testings?\n return protoPath;\n }\n return mapping.srcPath + protoPath.slice(mapping.destPath.length);\n}\n","import { wixContext } from '@wix/sdk-context';\nexport function enableContext(wixClient, contextType) {\n if (contextType === 'global') {\n if (globalThis.__wix_context__ != null) {\n globalThis.__wix_context__.client = wixClient;\n }\n else {\n globalThis.__wix_context__ = { client: wixClient };\n }\n }\n else {\n wixContext.client = wixClient;\n }\n}\n","import { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nexport function elevate(restModule) {\n return createRESTModule(restModule, true);\n}\nexport const fetchWithAuth = createRESTModule((restModuleOpts) => {\n return ((url, options) => restModuleOpts.fetchWithAuth(url, options));\n});\nexport { graphql } from './graphql.js';\nexport { setGlobalWixContext } from './wix-context.js';\nexport { enableContext } from './enable-context.js';\n"],"mappings":"gGACO,SAASA,EAAiBC,EAAYC,EAAW,GAAO,CAC3D,OAAOC,EAA0BF,EAAYC,CAAQ,CACzD,CAwDA,IAAME,EAAU,CAAC,UAAW,aAAa,EAEzC,IAAMC,EAAwB,IAAI,OAAO,OAAOC,EAAQ,KAAK,GAAG,CAAC,IAAI,EAC/DC,EAAkB,CAAC,iBAAkB,uBAAuB,EAC5DC,EAAsB,mBAE5B,IAAMC,EAA4B,IAAI,OAAO,OAAOC,EAAgB,KAAK,GAAG,CAAC,IAAI,EAC3EC,EAAoC,IAAI,OAAO,QAAQC,CAAmB,GAAG,EClEnF,OAAS,cAAAC,MAAkB,mBACpB,SAASC,EAAcC,EAAWC,EAAa,CAC9CA,IAAgB,SACZ,WAAW,iBAAmB,KAC9B,WAAW,gBAAgB,OAASD,EAGpC,WAAW,gBAAkB,CAAE,OAAQA,CAAU,EAIrDF,EAAW,OAASE,CAE5B,CCTO,IAAME,EAAgBC,EAAkBC,GACnC,CAACC,EAAKC,IAAYF,EAAe,cAAcC,EAAKC,CAAO,CACtE","names":["createRESTModule","descriptor","elevated","contextualizeRESTModuleV2","DOMAINS","REGEX_CAPTURE_DOMAINS","DOMAINS","WIX_API_DOMAINS","DEV_WIX_CODE_DOMAIN","REGEX_CAPTURE_API_DOMAINS","WIX_API_DOMAINS","REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN","DEV_WIX_CODE_DOMAIN","wixContext","enableContext","wixClient","contextType","fetchWithAuth","createRESTModule","restModuleOpts","url","options"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a
|
|
1
|
+
import{a}from"./chunk-MAZR75DI.js";import"./chunk-NHYZDMR5.js";import"./chunk-7EYXEF6M.js";import"./chunk-SBZEOPXX.js";function d(){let t=null,n=null;return{promise:new Promise((o,i)=>{t=o,n=i}),resolve:t,reject:n}}var u=t=>{let{createHost:n}=t;return{__type:"host",create:e=>({}),host:e=>{var o,i;let{applicationId:s}=e??{},r=typeof window<"u"?window.wixEmbedsAPI:void 0,l=n(e),p=f();return{...l,apiBaseUrl:p,getMonitoringClient:r==null||r.getMonitoringClientFunction==null?void 0:r.getMonitoringClientFunction(s),essentials:{language:typeof window<"u"?(o=window.commonConfig)==null?void 0:o.language:void 0,locale:typeof window<"u"?(i=window.commonConfig)==null?void 0:i.locale:void 0}}},auth:e=>{let o=typeof window<"u"?window.wixEmbedsAPI:void 0;e||(e=o==null||o.getAccessTokenFunction==null?void 0:o.getAccessTokenFunction());let i=!1,{resolve:s,promise:r}=d();return{getAuthHeaders:async()=>{if(!e&&i&&(e=await r),!e)throw new Error("Failed to resolve auth token");return{headers:{Authorization:await e()}}},getAccessTokenInjector:()=>(i=!0,l=>{s(l)})}}}};function f(){let t=typeof window<"u"?window.wixEmbedsAPI:void 0,n=t==null||t.getExternalBaseUrl==null?void 0:t.getExternalBaseUrl();if(!n)return;let e=new URL(n);return e!=null&&e.pathname&&e.pathname!=="/"?""+e.hostname+e.pathname:e.hostname}var w=t=>{let{clientSdk:n,applicationId:e}=t;return{invoke:async o=>{let{namespace:i,method:s,args:r}=o;if(!n)throw new Error("Wix Site SDK only works in a Wix site environment. Learn more: https://dev.wix.com/docs/sdk/host-modules/site/introduction");return n.invoke({namespace:i,method:s,args:r,applicationId:e,accessToken:"accessToken"})},getAccessToken:()=>{throw new Error("Not implemented")},observeState:()=>({disconnect:()=>{}})}};var m=function(t){let n=typeof $wixContext<"u"&&$wixContext.clientSdk||t?.clientSdk||window.clientSdk,{applicationId:e}=t||{};if(!e)throw new Error('"createHost" was called without a required field "applicationId"');return{channel:w({clientSdk:n,applicationId:e}),close:()=>{}}};var c=u({createHost:m});var P=t=>{let n=c.host({applicationId:t}),e=c.auth(),o=e.getAccessTokenInjector();return a({auth:e,host:n}).enableContext("module"),{injectGetAccessToken:o}},H=({host:t,auth:n})=>{a({host:t,auth:n}).enableContext("module")};export{P as enableClient,H as enablePanelClient};
|
|
2
2
|
//# sourceMappingURL=site.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/@wix/site/src/utils.ts","../../../node_modules/@wix/site/src/websiteHostModule.ts","../../../node_modules/@wix/site/src/channel.ts","../../../node_modules/@wix/site/src/hostPlatform.ts","../../../node_modules/@wix/site/src/index.ts","../src/site.ts"],"sourcesContent":["export function withResolvers<T>(): {\n resolve: (value: T | PromiseLike<T>) => void;\n reject: (reason?: any) => void;\n promise: Promise<T>;\n} {\n let resolve = null as any;\n let reject = null as any;\n\n const promise = new Promise<T>((resolveFn, rejectFn) => {\n resolve = resolveFn;\n reject = rejectFn;\n });\n\n return { promise, resolve, reject };\n}\n","import type { HostModule } from '@wix/sdk-types';\nimport { withResolvers } from './utils';\nimport {\n AccessTokenFn,\n CreateAuthStrategy,\n CreateWebsiteHost,\n Host,\n SDK,\n SDKOptions,\n WixEmbedsAPI,\n} from './types';\n\ndeclare global {\n interface Window {\n wixEmbedsAPI?: WixEmbedsAPI;\n commonConfig?: {\n language?: string;\n locale?: string;\n };\n }\n}\n\nexport const createWebsiteModule = ({\n createHost,\n}: {\n createHost: CreateWebsiteHost;\n}): HostModule<SDK, Host> & {\n host: CreateWebsiteHost;\n auth: CreateAuthStrategy;\n} => {\n return {\n __type: 'host',\n create: (_host) => {\n // Here we can implement module methods that could be used by the SDK via \"wixClient.use(website)\" api.\n // We don't have any for now, so we just return an empty object.\n return {};\n },\n host: (options?: SDKOptions) => {\n const { applicationId } = options ?? {};\n const wixEmbedsAPI =\n typeof window !== 'undefined' ? window.wixEmbedsAPI : undefined;\n\n const host = createHost(options);\n const apiBaseUrl = getApiBaseUrl();\n\n return {\n ...host,\n apiBaseUrl,\n getMonitoringClient:\n wixEmbedsAPI?.getMonitoringClientFunction?.(applicationId),\n essentials: {\n language:\n typeof window !== 'undefined'\n ? window.commonConfig?.language\n : undefined,\n locale:\n typeof window !== 'undefined'\n ? window.commonConfig?.locale\n : undefined,\n },\n };\n },\n auth: (getAccessTokenFn?: AccessTokenFn) => {\n const wixEmbedsAPI =\n typeof window !== 'undefined' ? window.wixEmbedsAPI : undefined;\n\n if (!getAccessTokenFn) {\n /*\n We must call wixEmbedsAPI.getAccessTokenFunction() in the main frame and not from async callbacks / setTimeout calls\n since it uses document.currentScript API behind the scenes\n https://developer.mozilla.org/en-US/docs/Web/API/Document/currentScript\n * */\n getAccessTokenFn = wixEmbedsAPI?.getAccessTokenFunction?.();\n }\n\n let injectorCreated = false;\n\n const { resolve: resolveAccessTokenFn, promise: accessTokenFnPromise } =\n withResolvers<AccessTokenFn>();\n\n return {\n getAuthHeaders: async () => {\n if (!getAccessTokenFn && injectorCreated) {\n getAccessTokenFn = await accessTokenFnPromise;\n }\n\n if (!getAccessTokenFn) {\n throw new Error('Failed to resolve auth token');\n }\n\n return {\n headers: {\n Authorization: await getAccessTokenFn(),\n },\n };\n },\n getAccessTokenInjector: () => {\n injectorCreated = true;\n\n return (_getAccessTokenFn: AccessTokenFn) => {\n resolveAccessTokenFn(_getAccessTokenFn);\n };\n },\n };\n },\n };\n};\n\nfunction getApiBaseUrl() {\n const wixEmbedsAPI =\n typeof window !== 'undefined' ? window.wixEmbedsAPI : undefined;\n const apiBaseUrl = wixEmbedsAPI?.getExternalBaseUrl?.();\n if (!apiBaseUrl) {\n return;\n }\n\n // clean the protocol from the URL\n const parsedUrlObject = new URL(apiBaseUrl);\n if (parsedUrlObject?.pathname && parsedUrlObject.pathname !== '/') {\n return `${parsedUrlObject.hostname}${parsedUrlObject.pathname}`;\n }\n\n return parsedUrlObject.hostname;\n}\n","import { ClientSDK, WebsiteChannel } from './types';\n\nexport const createWebsiteChannel = ({\n clientSdk,\n applicationId,\n}: {\n clientSdk?: ClientSDK;\n applicationId: string;\n}): WebsiteChannel => {\n return {\n invoke: async ({ namespace, method, args }) => {\n if (!clientSdk) {\n throw new Error(\n 'Wix Site SDK only works in a Wix site environment. Learn more: https://dev.wix.com/docs/sdk/host-modules/site/introduction',\n );\n }\n\n return clientSdk.invoke({\n namespace,\n method,\n args,\n applicationId,\n accessToken: 'accessToken',\n });\n },\n getAccessToken: () => {\n throw new Error('Not implemented');\n },\n observeState: () => ({\n disconnect: () => {},\n }),\n };\n};\n","import { createWebsiteChannel } from './channel';\nimport type { CreateWebsiteHost, ClientSDK } from './types';\n\ndeclare global {\n interface Window {\n clientSdk?: ClientSDK;\n }\n}\n\ndeclare const $wixContext: {\n clientSdk: ClientSDK;\n};\n\nexport const createHost: CreateWebsiteHost = function (config) {\n const clientSdk =\n (typeof $wixContext !== 'undefined' && $wixContext.clientSdk) ||\n config?.clientSdk ||\n window.clientSdk;\n const { applicationId } = config || {};\n\n if (!applicationId) {\n throw new Error(\n '\"createHost\" was called without a required field \"applicationId\"',\n );\n }\n\n return {\n // environment: {},\n channel: createWebsiteChannel({ clientSdk, applicationId }),\n close: () => {},\n };\n};\n","import { createWebsiteModule } from './websiteHostModule';\nimport { createHost } from './hostPlatform';\n\nexport const site = createWebsiteModule({ createHost });\n\nexport * from './types';\n","import { site } from '@wix/site';\nimport { createClient } from '@wix/sdk';\n\nimport type { AuthenticationStrategy, Host } from '@wix/sdk';\n\nexport const enableClient = (applicationId: string) => {\n const host = site.host({ applicationId });\n const auth = site.auth();\n const injectGetAccessToken = auth.getAccessTokenInjector();\n\n const wixClient = createClient({\n auth,\n host,\n });\n wixClient.enableContext('module');\n\n return {\n injectGetAccessToken,\n };\n};\n\nexport const enableComponentClient = (applicationId: string) => {\n const host = site.host({ applicationId });\n const wixClient = createClient({\n host,\n });\n wixClient.enableContext('module');\n};\n\nexport const enablePanelClient = ({\n host,\n auth,\n}: {\n host: Host;\n auth?: AuthenticationStrategy;\n}) => {\n const wixClient = createClient({ host, auth });\n wixClient.enableContext('module');\n};\n"],"mappings":"4HAAO,SAASA,GAId,CACA,IAAIC,EAAU,KACVC,EAAS,KAOb,MAAO,CAAEC,QALO,IAAIC,QAAW,CAACC,EAAWC,IAAa,CACtDL,EAAUI,EACVH,EAASI,CACX,CAAC,EAEiBL,QAAAA,EAASC,OAAAA,CAAO,CACpC,CCQO,IAAMK,EAAsBC,GAO9B,CAAA,GAP+B,CAClCC,WAAAA,CAGF,EAACD,EAIC,MAAO,CACLE,OAAQ,OACRC,OAASC,IAGA,CAAC,GAEVC,KAAOC,GAAyB,CAAA,IAAAC,EAAAC,EAC9B,GAAM,CAAEC,cAAAA,CAAc,EAAIH,GAAW,CAAC,EAChCI,EACJ,OAAOC,OAAW,IAAcA,OAAOD,aAAeE,OAElDP,EAAOJ,EAAWK,CAAO,EACzBO,EAAaC,EAAc,EAEjC,MAAO,CACL,GAAGT,EACHQ,WAAAA,EACAE,oBACEL,GAAY,MAAZA,EAAcM,6BAA2B,KAAA,OAAzCN,EAAcM,4BAA8BP,CAAa,EAC3DQ,WAAY,CACVC,SACE,OAAOP,OAAW,KAAWJ,EACzBI,OAAOQ,eAAY,KAAA,OAAnBZ,EAAqBW,SACrBN,OACNQ,OACE,OAAOT,OAAW,KAAWH,EACzBG,OAAOQ,eAAY,KAAA,OAAnBX,EAAqBY,OACrBR,MACR,CACF,CACF,EACAS,KAA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IAAIF,MAAM,iBAAiB,CACnC,EACAG,aAAcA,KAAO,CACnBC,WAAYA,IAAM,CAAC,CACrB,EACF,CACF,ECnBO,IAAMC,EAAgC,SAAUC,EAAQ,CAC7D,IAAMC,EACH,OAAOC,YAAgB,KAAeA,YAAYD,WACnDD,GAAQC,WACRE,OAAOF,UACH,CAAEG,cAAAA,CAAc,EAAIJ,GAAU,CAAC,EAErC,GAAI,CAACI,EACH,MAAM,IAAIC,MACR,kEACF,EAGF,MAAO,CAELC,QAASC,EAAqB,CAAEN,UAAAA,EAAWG,cAAAA,CAAc,CAAC,EAC1DI,MAAOA,IAAM,CAAC,CAChB,CACF,EC5BO,IAAMC,EAAOC,EAAoB,CAAEC,WAAAA,CAAW,CAAC,ECE/C,IAAMC,EAAgBC,GAA0B,CACrD,IAAMC,EAAOC,EAAK,KAAK,CAAE,cAAAF,CAAc,CAAC,EAClCG,EAAOD,EAAK,KAAK,EACjBE,EAAuBD,EAAK,uBAAuB,EAMzD,OAJkBE,EAAa,CAC7B,KAAAF,EACA,KAAAF,CACF,CAAC,EACS,cAAc,QAAQ,EAEzB,CACL,qBAAAG,CACF,CACF,EAEaE,EAAyBN,GAA0B,CAC9D,IAAMC,EAAOC,EAAK,KAAK,CAAE,cAAAF,CAAc,CAAC,EACtBK,EAAa,CAC7B,KAAAJ,CACF,CAAC,EACS,cAAc,QAAQ,CAClC,EAEaM,EAAoB,CAAC,CAChC,KAAAN,EACA,KAAAE,CACF,IAGM,CACcE,EAAa,CAAE,KAAAJ,EAAM,KAAAE,CAAK,CAAC,EACnC,cAAc,QAAQ,CAClC","names":["withResolvers","resolve","reject","promise","Promise","resolveFn","rejectFn","createWebsiteModule","_ref","createHost","__type","create","_host","host","options","_window$commonConfig","_window$commonConfig2","applicationId","wixEmbedsAPI","window","undefined","apiBaseUrl","getApiBaseUrl","getMonitoringClient","getMonitoringClientFunction","essentials","language","commonConfig","locale","auth","getAccessTokenFn","getAccessTokenFunction","injectorCreated","resolve","resolveAccessTokenFn","promise","accessTokenFnPromise","withResolvers","getAuthHeaders","Error","headers","Authorization","getAccessTokenInjector","_getAccessTokenFn","getExternalBaseUrl","parsedUrlObject","URL","pathname","hostname","createWebsiteChannel","_ref","clientSdk","applicationId","invoke","_ref2","namespace","method","args","Error","accessToken","getAccessToken","observeState","disconnect","createHost","config","clientSdk","$wixContext","window","applicationId","Error","channel","createWebsiteChannel","close","site","createWebsiteModule","createHost","enableClient","applicationId","host","site","auth","injectGetAccessToken","createClient","enableComponentClient","enablePanelClient"]}
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/@wix/site/src/utils.ts","../../../node_modules/@wix/site/src/websiteHostModule.ts","../../../node_modules/@wix/site/src/channel.ts","../../../node_modules/@wix/site/src/hostPlatform.ts","../../../node_modules/@wix/site/src/index.ts","../src/site.ts"],"sourcesContent":["export function withResolvers<T>(): {\n resolve: (value: T | PromiseLike<T>) => void;\n reject: (reason?: any) => void;\n promise: Promise<T>;\n} {\n let resolve = null as any;\n let reject = null as any;\n\n const promise = new Promise<T>((resolveFn, rejectFn) => {\n resolve = resolveFn;\n reject = rejectFn;\n });\n\n return { promise, resolve, reject };\n}\n","import type { HostModule } from '@wix/sdk-types';\nimport { withResolvers } from './utils';\nimport {\n AccessTokenFn,\n CreateAuthStrategy,\n CreateWebsiteHost,\n Host,\n SDK,\n SDKOptions,\n WixEmbedsAPI,\n} from './types';\n\ndeclare global {\n interface Window {\n wixEmbedsAPI?: WixEmbedsAPI;\n commonConfig?: {\n language?: string;\n locale?: string;\n };\n }\n}\n\nexport const createWebsiteModule = ({\n createHost,\n}: {\n createHost: CreateWebsiteHost;\n}): HostModule<SDK, Host> & {\n host: CreateWebsiteHost;\n auth: CreateAuthStrategy;\n} => {\n return {\n __type: 'host',\n create: (_host) => {\n // Here we can implement module methods that could be used by the SDK via \"wixClient.use(website)\" api.\n // We don't have any for now, so we just return an empty object.\n return {};\n },\n host: (options?: SDKOptions) => {\n const { applicationId } = options ?? {};\n const wixEmbedsAPI =\n typeof window !== 'undefined' ? window.wixEmbedsAPI : undefined;\n\n const host = createHost(options);\n const apiBaseUrl = getApiBaseUrl();\n\n return {\n ...host,\n apiBaseUrl,\n getMonitoringClient:\n wixEmbedsAPI?.getMonitoringClientFunction?.(applicationId),\n essentials: {\n language:\n typeof window !== 'undefined'\n ? window.commonConfig?.language\n : undefined,\n locale:\n typeof window !== 'undefined'\n ? window.commonConfig?.locale\n : undefined,\n },\n };\n },\n auth: (getAccessTokenFn?: AccessTokenFn) => {\n const wixEmbedsAPI =\n typeof window !== 'undefined' ? window.wixEmbedsAPI : undefined;\n\n if (!getAccessTokenFn) {\n /*\n We must call wixEmbedsAPI.getAccessTokenFunction() in the main frame and not from async callbacks / setTimeout calls\n since it uses document.currentScript API behind the scenes\n https://developer.mozilla.org/en-US/docs/Web/API/Document/currentScript\n * */\n getAccessTokenFn = wixEmbedsAPI?.getAccessTokenFunction?.();\n }\n\n let injectorCreated = false;\n\n const { resolve: resolveAccessTokenFn, promise: accessTokenFnPromise } =\n withResolvers<AccessTokenFn>();\n\n return {\n getAuthHeaders: async () => {\n if (!getAccessTokenFn && injectorCreated) {\n getAccessTokenFn = await accessTokenFnPromise;\n }\n\n if (!getAccessTokenFn) {\n throw new Error('Failed to resolve auth token');\n }\n\n return {\n headers: {\n Authorization: await getAccessTokenFn(),\n },\n };\n },\n getAccessTokenInjector: () => {\n injectorCreated = true;\n\n return (_getAccessTokenFn: AccessTokenFn) => {\n resolveAccessTokenFn(_getAccessTokenFn);\n };\n },\n };\n },\n };\n};\n\nfunction getApiBaseUrl() {\n const wixEmbedsAPI =\n typeof window !== 'undefined' ? window.wixEmbedsAPI : undefined;\n const apiBaseUrl = wixEmbedsAPI?.getExternalBaseUrl?.();\n if (!apiBaseUrl) {\n return;\n }\n\n // clean the protocol from the URL\n const parsedUrlObject = new URL(apiBaseUrl);\n if (parsedUrlObject?.pathname && parsedUrlObject.pathname !== '/') {\n return `${parsedUrlObject.hostname}${parsedUrlObject.pathname}`;\n }\n\n return parsedUrlObject.hostname;\n}\n","import { ClientSDK, WebsiteChannel } from './types';\n\nexport const createWebsiteChannel = ({\n clientSdk,\n applicationId,\n}: {\n clientSdk?: ClientSDK;\n applicationId: string;\n}): WebsiteChannel => {\n return {\n invoke: async ({ namespace, method, args }) => {\n if (!clientSdk) {\n throw new Error(\n 'Wix Site SDK only works in a Wix site environment. Learn more: https://dev.wix.com/docs/sdk/host-modules/site/introduction',\n );\n }\n\n return clientSdk.invoke({\n namespace,\n method,\n args,\n applicationId,\n accessToken: 'accessToken',\n });\n },\n getAccessToken: () => {\n throw new Error('Not implemented');\n },\n observeState: () => ({\n disconnect: () => {},\n }),\n };\n};\n","import { createWebsiteChannel } from './channel';\nimport type { CreateWebsiteHost, ClientSDK } from './types';\n\ndeclare global {\n interface Window {\n clientSdk?: ClientSDK;\n }\n}\n\ndeclare const $wixContext: {\n clientSdk: ClientSDK;\n};\n\nexport const createHost: CreateWebsiteHost = function (config) {\n const clientSdk =\n (typeof $wixContext !== 'undefined' && $wixContext.clientSdk) ||\n config?.clientSdk ||\n window.clientSdk;\n const { applicationId } = config || {};\n\n if (!applicationId) {\n throw new Error(\n '\"createHost\" was called without a required field \"applicationId\"',\n );\n }\n\n return {\n // environment: {},\n channel: createWebsiteChannel({ clientSdk, applicationId }),\n close: () => {},\n };\n};\n","import { createWebsiteModule } from './websiteHostModule';\nimport { createHost } from './hostPlatform';\n\nexport const site = createWebsiteModule({ createHost });\n\nexport * from './types';\n","import { site } from '@wix/site';\nimport { createClient } from '@wix/sdk';\n\nimport type { AuthenticationStrategy, Host } from '@wix/sdk';\n\nexport const enableClient = (applicationId: string) => {\n const host = site.host({ applicationId });\n const auth = site.auth();\n const injectGetAccessToken = auth.getAccessTokenInjector();\n\n const wixClient = createClient({\n auth,\n host,\n });\n wixClient.enableContext('module');\n\n return {\n injectGetAccessToken,\n };\n};\n\nexport const enablePanelClient = ({\n host,\n auth,\n}: {\n host: Host;\n auth?: AuthenticationStrategy;\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AA,CAAc,CAAC,EAC1DI,MAAOA,IAAM,CAAC,CAChB,CACF,EC5BO,IAAMC,EAAOC,EAAoB,CAAEC,WAAAA,CAAW,CAAC,ECE/C,IAAMC,EAAgBC,GAA0B,CACrD,IAAMC,EAAOC,EAAK,KAAK,CAAE,cAAAF,CAAc,CAAC,EAClCG,EAAOD,EAAK,KAAK,EACjBE,EAAuBD,EAAK,uBAAuB,EAMzD,OAJkBE,EAAa,CAC7B,KAAAF,EACA,KAAAF,CACF,CAAC,EACS,cAAc,QAAQ,EAEzB,CACL,qBAAAG,CACF,CACF,EAEaE,EAAoB,CAAC,CAChC,KAAAL,EACA,KAAAE,CACF,IAGM,CACcE,EAAa,CAAE,KAAAJ,EAAM,KAAAE,CAAK,CAAC,EACnC,cAAc,QAAQ,CAClC","names":["withResolvers","resolve","reject","promise","Promise","resolveFn","rejectFn","createWebsiteModule","_ref","createHost","__type","create","_host","host","options","_window$commonConfig","_window$commonConfig2","applicationId","wixEmbedsAPI","window","undefined","apiBaseUrl","getApiBaseUrl","getMonitoringClient","getMonitoringClientFunction","essentials","language","commonConfig","locale","auth","getAccessTokenFn","getAccessTokenFunction","injectorCreated","resolve","resolveAccessTokenFn","promise","accessTokenFnPromise","withResolvers","getAuthHeaders","Error","headers","Authorization","getAccessTokenInjector","_getAccessTokenFn","getExternalBaseUrl","parsedUrlObject","URL","pathname","hostname","createWebsiteChannel","_ref","clientSdk","applicationId","invoke","_ref2","namespace","method","args","Error","accessToken","getAccessToken","observeState","disconnect","createHost","config","clientSdk","$wixContext","window","applicationId","Error","channel","createWebsiteChannel","close","site","createWebsiteModule","createHost","enableClient","applicationId","host","site","auth","injectGetAccessToken","createClient","enablePanelClient"]}
|
|
@@ -3,25 +3,25 @@ const require = _createRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
executeCommand,
|
|
5
5
|
log
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UC4DVE5N.js";
|
|
7
7
|
import {
|
|
8
8
|
PreviewCommand
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-2PWMAOFK.js";
|
|
10
|
+
import "./chunk-N5BZMQKX.js";
|
|
11
11
|
import "./chunk-T5HHDBBR.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-LFE6DV2A.js";
|
|
13
|
+
import "./chunk-HQWWEMUE.js";
|
|
14
|
+
import "./chunk-FQVLZZ37.js";
|
|
15
|
+
import "./chunk-ASICDRRU.js";
|
|
16
16
|
import "./chunk-GWE3BRHX.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-2FFNGH2K.js";
|
|
18
|
+
import "./chunk-4BN6QXJE.js";
|
|
19
|
+
import "./chunk-IJSYFKIP.js";
|
|
20
20
|
import {
|
|
21
21
|
CliError,
|
|
22
22
|
CliErrorCode,
|
|
23
23
|
require_react
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-5HJEX4ZX.js";
|
|
25
25
|
import {
|
|
26
26
|
__toESM,
|
|
27
27
|
init_esm_shims
|
|
@@ -51,4 +51,4 @@ async function nonInteractivePreview(services, model, options) {
|
|
|
51
51
|
export {
|
|
52
52
|
nonInteractivePreview
|
|
53
53
|
};
|
|
54
|
-
//# sourceMappingURL=preview-
|
|
54
|
+
//# sourceMappingURL=preview-O4LXNEA2.js.map
|
|
@@ -3,28 +3,28 @@ const require = _createRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
executeCommand,
|
|
5
5
|
log
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UC4DVE5N.js";
|
|
7
7
|
import {
|
|
8
8
|
ReleaseCommand
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-EK3FDNFJ.js";
|
|
10
|
+
import "./chunk-2PWMAOFK.js";
|
|
11
|
+
import "./chunk-N5BZMQKX.js";
|
|
12
12
|
import "./chunk-T5HHDBBR.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-LFE6DV2A.js";
|
|
14
|
+
import "./chunk-HQWWEMUE.js";
|
|
15
|
+
import "./chunk-WHR6NSJW.js";
|
|
16
|
+
import "./chunk-FQVLZZ37.js";
|
|
17
|
+
import "./chunk-ASICDRRU.js";
|
|
18
18
|
import "./chunk-GWE3BRHX.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-2FFNGH2K.js";
|
|
20
|
+
import "./chunk-4BN6QXJE.js";
|
|
21
|
+
import "./chunk-IJSYFKIP.js";
|
|
22
22
|
import {
|
|
23
23
|
CliError,
|
|
24
24
|
CliErrorCode,
|
|
25
25
|
require_react,
|
|
26
26
|
toJsonString
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-5HJEX4ZX.js";
|
|
28
28
|
import {
|
|
29
29
|
__toESM,
|
|
30
30
|
init_esm_shims
|
|
@@ -56,4 +56,4 @@ async function nonInteractiveRelease(services, model, releaseProps) {
|
|
|
56
56
|
export {
|
|
57
57
|
nonInteractiveRelease
|
|
58
58
|
};
|
|
59
|
-
//# sourceMappingURL=release-
|
|
59
|
+
//# sourceMappingURL=release-3FUXB4BT.js.map
|
|
@@ -3,14 +3,14 @@ const require = _createRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
renderCommand,
|
|
5
5
|
runCommand
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-CLGKOJIA.js";
|
|
7
|
+
import "./chunk-N5BZMQKX.js";
|
|
8
8
|
import "./chunk-T5HHDBBR.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-2FFNGH2K.js";
|
|
10
|
+
import "./chunk-5HJEX4ZX.js";
|
|
11
11
|
import "./chunk-4EFJZ3GQ.js";
|
|
12
12
|
export {
|
|
13
13
|
renderCommand,
|
|
14
14
|
runCommand
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=render-command-
|
|
16
|
+
//# sourceMappingURL=render-command-WE3BHL5N.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/cli-app",
|
|
3
3
|
"description": "CLI tool for Wix apps",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.103",
|
|
5
5
|
"author": "Amit Dahan",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"esbuild": "^0.25.0",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"@wix/ambassador-cli-site-override-service-v1-site-override": "^1.0.10",
|
|
20
20
|
"@wix/ambassador-ctp-app-cloud-backend-service-v1-app-cloud-backend-deployment": "^1.0.12",
|
|
21
21
|
"@wix/ambassador-ctp-gradual-rollout-v1-app-config": "^1.0.79",
|
|
22
|
-
"@wix/ambassador-devcenter-apps-v1-app-old": "^1.0.
|
|
22
|
+
"@wix/ambassador-devcenter-apps-v1-app-old": "^1.0.56",
|
|
23
23
|
"@wix/app-cloud-uploader": "^1.18.0",
|
|
24
24
|
"@wix/arm-client": "0.0.0",
|
|
25
|
-
"@wix/bi-logger-dev-tools-data": "^1.
|
|
25
|
+
"@wix/bi-logger-dev-tools-data": "^1.114.0",
|
|
26
26
|
"@wix/cli-app-definitions": "0.0.0",
|
|
27
27
|
"@wix/cli-app-manifest": "1.0.0",
|
|
28
28
|
"@wix/cli-app-platform-sdk": "0.0.0",
|
|
@@ -153,5 +153,5 @@
|
|
|
153
153
|
]
|
|
154
154
|
}
|
|
155
155
|
},
|
|
156
|
-
"falconPackageHash": "
|
|
156
|
+
"falconPackageHash": "c45a52e09074117dbf69b6fb66c31b4bf14662aa5b49db66aa5fc0f9"
|
|
157
157
|
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { createRequire as _createRequire } from 'node:module';
|
|
2
|
-
const require = _createRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
PreviewCommand
|
|
5
|
-
} from "./chunk-KJN5NVSU.js";
|
|
6
|
-
import "./chunk-6XUQYB5M.js";
|
|
7
|
-
import "./chunk-OMC2SHRJ.js";
|
|
8
|
-
import "./chunk-NPPPO5AD.js";
|
|
9
|
-
import "./chunk-HSSABJL6.js";
|
|
10
|
-
import "./chunk-GWE3BRHX.js";
|
|
11
|
-
import "./chunk-4JT7QYEF.js";
|
|
12
|
-
import "./chunk-JYS6G4NW.js";
|
|
13
|
-
import "./chunk-DAOCDBEQ.js";
|
|
14
|
-
import "./chunk-FG7W5UDB.js";
|
|
15
|
-
import "./chunk-4EFJZ3GQ.js";
|
|
16
|
-
export {
|
|
17
|
-
PreviewCommand
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=PreviewCommand-SSA3LRRR.js.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { createRequire as _createRequire } from 'node:module';
|
|
2
|
-
const require = _createRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
ReleaseCommand,
|
|
5
|
-
ReleaseVersionType
|
|
6
|
-
} from "./chunk-VXAXSIUQ.js";
|
|
7
|
-
import "./chunk-KJN5NVSU.js";
|
|
8
|
-
import "./chunk-6XUQYB5M.js";
|
|
9
|
-
import "./chunk-OMC2SHRJ.js";
|
|
10
|
-
import "./chunk-MRQDCRFF.js";
|
|
11
|
-
import "./chunk-NPPPO5AD.js";
|
|
12
|
-
import "./chunk-HSSABJL6.js";
|
|
13
|
-
import "./chunk-GWE3BRHX.js";
|
|
14
|
-
import "./chunk-4JT7QYEF.js";
|
|
15
|
-
import "./chunk-JYS6G4NW.js";
|
|
16
|
-
import "./chunk-DAOCDBEQ.js";
|
|
17
|
-
import "./chunk-FG7W5UDB.js";
|
|
18
|
-
import "./chunk-4EFJZ3GQ.js";
|
|
19
|
-
export {
|
|
20
|
-
ReleaseCommand,
|
|
21
|
-
ReleaseVersionType
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=ReleaseCommand-BBWVLP2S.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/render-command.tsx"],"sourcesContent":["import { cwd } from 'node:process';\nimport React from 'react';\nimport type { ReactElement } from 'react';\nimport { AccountAuthProvider } from '@wix/cli-auth';\nimport type { UserInfo } from '@wix/cli-auth';\nimport { render } from '@wix/cli-ui-kit';\nimport { I18nProvider } from '@wix/cli-i18n';\nimport { CliError, CliErrorCode } from '@wix/cli-error';\nimport { DebugLogProvider } from '@wix/cli-debug-log';\nimport { getDebugLogFilePath } from '@wix/cli-core-definitions';\nimport { ErrorReporterProvider } from '@wix/cli-error-reporting';\nimport { BiProvider } from '@wix/cli-telemetry-react';\nimport { addUserFields, reportCommandStartEvent } from '@wix/cli-telemetry';\nimport type { CommandServices } from '@wix/cli-command-contract';\nimport type { Command } from '@commander-js/extra-typings';\nimport type { ProjectModel } from '../model.js';\nimport type { DevCenterComponent } from '../dev-center/components/dev-center-component.js';\nimport { loadProjectModel, ProjectModelProvider } from '../model.js';\nimport messages from '../messages.json' with { type: 'json' };\nimport packageJson from '../../package.json' with { type: 'json' };\n\ninterface Options {\n watchForModelChanges?: boolean;\n skipProjectValidation?: boolean;\n}\n\nasync function initServices(\n model: ProjectModel,\n { biLogger, errorReporter }: CommandServices\n) {\n errorReporter.setContext('app info', {\n appId: model.config.appId,\n projectId: model.config.projectId,\n });\n\n biLogger.updateDefaults({\n _appId: model.config.appId,\n });\n}\n\nfunction getExtraBiFields(command: string, components: DevCenterComponent[]) {\n switch (command) {\n case 'dev':\n case 'preview':\n return {\n is_mocking_values: components.some(\n (component) =>\n component.type === 'EmbeddedScript' && component.paramsOverride\n ),\n };\n default:\n return;\n }\n}\n\nexport async function renderCommand(\n command: Command,\n { biLogger, errorReporter }: CommandServices,\n tree: ReactElement,\n options?: Options\n) {\n await runCommand(command, { biLogger, errorReporter }, async (model) => {\n if (model.components.length === 0 && !options?.skipProjectValidation) {\n throw new CliError({\n code: CliErrorCode.NoExtensionsFound(),\n cause: null,\n });\n }\n\n biLogger.updateDefaults({ command: command.name() });\n\n const debugLogFilePath = getDebugLogFilePath(model.projectFolder);\n\n const handleLogin = (userInfo: UserInfo) => {\n errorReporter.setUser({ id: userInfo.userId });\n addUserFields(biLogger, userInfo.userId);\n };\n\n await render(\n <BiProvider value={biLogger}>\n <ErrorReporterProvider value={errorReporter}>\n <AccountAuthProvider onLogin={handleLogin}>\n <I18nProvider messages={messages}>\n <DebugLogProvider filePath={debugLogFilePath}>\n <ProjectModelProvider\n value={model}\n watchForChanges={options?.watchForModelChanges}\n >\n {tree}\n </ProjectModelProvider>\n </DebugLogProvider>\n </I18nProvider>\n </AccountAuthProvider>\n </ErrorReporterProvider>\n </BiProvider>\n );\n });\n}\n\nexport async function runCommand(\n command: Command,\n services: CommandServices,\n commandFn: (model: ProjectModel) => Promise<void>\n) {\n const model = await loadProjectModel(cwd());\n\n await initServices(model, services);\n\n services.biLogger.updateDefaults({\n command: command.name(),\n });\n\n const commandStatus = reportCommandStartEvent({\n biLogger: services.biLogger,\n command,\n cliVersion: packageJson.version,\n flow: 'Apps',\n projectId: model.config.projectId,\n extensions: model.components.reduce<Record<string, number>>((acc, item) => {\n const value = acc[item.type];\n acc[item.type] = value ? value + 1 : 1;\n return acc;\n }, {}),\n extraFields: getExtraBiFields(command.name(), model.components),\n });\n\n try {\n await commandFn(model);\n commandStatus.succeed();\n } catch (e) {\n commandStatus.failed(e);\n throw e;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA,mBAAkB;AADlB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AA;AAAA,UACC,OAAO;AAAA,UACP,iBAAiB,SAAS;AAAA;AAAA,QAEzB;AAAA,MACH,CACF,CACF,CACF,CACF,CACF;AAAA,IACF;AAAA,EACF,CAAC;AACH;AAEA,eAAsB,WACpB,SACA,UACA,WACA;AACA,QAAM,QAAQ,MAAM,iBAAiB,IAAI,CAAC;AAE1C,QAAM,aAAa,OAAO,QAAQ;AAElC,WAAS,SAAS,eAAe;AAAA,IAC/B,SAAS,QAAQ,KAAK;AAAA,EACxB,CAAC;AAED,QAAM,gBAAgB,wBAAwB;AAAA,IAC5C,UAAU,SAAS;AAAA,IACnB;AAAA,IACA,YAAY,gBAAY;AAAA,IACxB,MAAM;AAAA,IACN,WAAW,MAAM,OAAO;AAAA,IACxB,YAAY,MAAM,WAAW,OAA+B,CAAC,KAAK,SAAS;AACzE,YAAM,QAAQ,IAAI,KAAK,IAAI;AAC3B,UAAI,KAAK,IAAI,IAAI,QAAQ,QAAQ,IAAI;AACrC,aAAO;AAAA,IACT,GAAG,CAAC,CAAC;AAAA,IACL,aAAa,iBAAiB,QAAQ,KAAK,GAAG,MAAM,UAAU;AAAA,EAChE,CAAC;AAED,MAAI;AACF,UAAM,UAAU,KAAK;AACrB,kBAAc,QAAQ;AAAA,EACxB,SAAS,GAAG;AACV,kBAAc,OAAO,CAAC;AACtB,UAAM;AAAA,EACR;AACF;","names":["React"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{wixContext as n}from"@wix/sdk-context";function d(o,t){return(...i)=>{let e=u();return e?e.initWixModules(o,t).apply(void 0,i):o.apply(void 0,i)}}function u(){let o=typeof $wixContext<"u"&&$wixContext.initWixModules?$wixContext.initWixModules:typeof globalThis.__wix_context__<"u"&&globalThis.__wix_context__.initWixModules?globalThis.__wix_context__.initWixModules:void 0;if(o)return{initWixModules(e,l){return r(()=>o(e,l))},fetchWithAuth(){throw new Error("fetchWithAuth is not available in this context")},graphql(){throw new Error("graphql is not available in this context")}};let t=typeof $wixContext<"u"?$wixContext.client:typeof n.client<"u"?n.client:typeof globalThis.__wix_context__<"u"?globalThis.__wix_context__.client:void 0,i=typeof $wixContext<"u"?$wixContext.elevatedClient:typeof n.elevatedClient<"u"?n.elevatedClient:typeof globalThis.__wix_context__<"u"?globalThis.__wix_context__.elevatedClient:void 0;if(!(!t&&!i))return{initWixModules(e,l){if(l){if(!i)throw new Error("An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules");return r(()=>i.use(e))}if(!t)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return r(()=>t.use(e))},fetchWithAuth:(e,l)=>{if(!t)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return t.fetchWithAuth(e,l)},getAuth(){if(!t)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return t.auth},async graphql(e,l,x){if(!t)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return t.graphql(e,l,x)}}}function r(o){let t=globalThis.__wix_context__,i={client:n.client,elevatedClient:n.elevatedClient},e;globalThis.__wix_context__=void 0,n.client=void 0,n.elevatedClient=void 0,typeof $wixContext<"u"&&(e={client:$wixContext?.client,elevatedClient:$wixContext?.elevatedClient},delete $wixContext.client,delete $wixContext.elevatedClient);try{return o()}finally{globalThis.__wix_context__=t,n.client=i.client,n.elevatedClient=i.elevatedClient,typeof $wixContext<"u"&&($wixContext.client=e.client,$wixContext.elevatedClient=e.elevatedClient)}}export{d as a,r as b};
|
|
2
|
-
//# sourceMappingURL=chunk-J3SVE4GM.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/@wix/sdk/node_modules/@wix/sdk-runtime/build/context.js","../../../node_modules/@wix/sdk/node_modules/@wix/sdk-runtime/build/context-v2.js"],"sourcesContent":["import { wixContext } from '@wix/sdk-context';\nexport function resolveContext() {\n const oldContext = typeof $wixContext !== 'undefined' && $wixContext.initWixModules\n ? $wixContext.initWixModules\n : typeof globalThis.__wix_context__ !== 'undefined' &&\n globalThis.__wix_context__.initWixModules\n ? globalThis.__wix_context__.initWixModules\n : undefined;\n if (oldContext) {\n return {\n // @ts-expect-error\n initWixModules(modules, elevated) {\n return runWithoutContext(() => oldContext(modules, elevated));\n },\n fetchWithAuth() {\n throw new Error('fetchWithAuth is not available in this context');\n },\n graphql() {\n throw new Error('graphql is not available in this context');\n },\n };\n }\n const contextualClient = typeof $wixContext !== 'undefined'\n ? $wixContext.client\n : typeof wixContext.client !== 'undefined'\n ? wixContext.client\n : typeof globalThis.__wix_context__ !== 'undefined'\n ? globalThis.__wix_context__.client\n : undefined;\n const elevatedClient = typeof $wixContext !== 'undefined'\n ? $wixContext.elevatedClient\n : typeof wixContext.elevatedClient !== 'undefined'\n ? wixContext.elevatedClient\n : typeof globalThis.__wix_context__ !== 'undefined'\n ? globalThis.__wix_context__.elevatedClient\n : undefined;\n if (!contextualClient && !elevatedClient) {\n return;\n }\n return {\n initWixModules(wixModules, elevated) {\n if (elevated) {\n if (!elevatedClient) {\n throw new Error('An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules');\n }\n return runWithoutContext(() => elevatedClient.use(wixModules));\n }\n if (!contextualClient) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return runWithoutContext(() => contextualClient.use(wixModules));\n },\n fetchWithAuth: (urlOrRequest, requestInit) => {\n if (!contextualClient) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return contextualClient.fetchWithAuth(urlOrRequest, requestInit);\n },\n getAuth() {\n if (!contextualClient) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return contextualClient.auth;\n },\n async graphql(query, variables, opts) {\n if (!contextualClient) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return contextualClient.graphql(query, variables, opts);\n },\n };\n}\nexport function contextualizeHostModule(hostModule, prop) {\n return (...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context.initWixModules(hostModule)[prop].apply(undefined, args);\n };\n}\nexport function getContextualAuth() {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context.getAuth();\n}\nexport function contextualizeRESTModule(restModule, expectedArgsLength) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context\n .initWixModules(restModule, args[expectedArgsLength]?.suppressAuth ? true : false)\n .apply(undefined, args);\n });\n}\nexport function contextualizeEventDefinitionModule(eventDefinition) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context.initWixModules(eventDefinition).apply(undefined, args);\n });\n}\nexport function contextualizeSerivcePluginModule(servicePlugin) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context.initWixModules(servicePlugin).apply(undefined, args);\n });\n}\nexport * from './context-v2.js';\nexport function runWithoutContext(fn) {\n const globalContext = globalThis.__wix_context__;\n const moduleContext = {\n client: wixContext.client,\n elevatedClient: wixContext.elevatedClient,\n };\n let closureContext;\n globalThis.__wix_context__ = undefined;\n wixContext.client = undefined;\n wixContext.elevatedClient = undefined;\n if (typeof $wixContext !== 'undefined') {\n closureContext = {\n client: $wixContext?.client,\n elevatedClient: $wixContext?.elevatedClient,\n };\n delete $wixContext.client;\n delete $wixContext.elevatedClient;\n }\n try {\n return fn();\n }\n finally {\n globalThis.__wix_context__ = globalContext;\n wixContext.client = moduleContext.client;\n wixContext.elevatedClient = moduleContext.elevatedClient;\n if (typeof $wixContext !== 'undefined') {\n $wixContext.client = closureContext.client;\n $wixContext.elevatedClient = closureContext.elevatedClient;\n }\n }\n}\n","import { EventDefinition, ServicePluginDefinition, } from '@wix/sdk-types';\nimport { resolveContext } from './context.js';\nexport { EventDefinition, ServicePluginDefinition, };\nexport function contextualizeHostModuleV2(hostModule, props) {\n return {\n ...hostModule,\n ...Object.fromEntries(props.map((prop) => [\n prop,\n (...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context\n .initWixModules(hostModule)[prop].apply(undefined, args);\n },\n ])),\n };\n}\nexport function contextualizeRESTModuleV2(restModule, elevated) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n // @ts-expect-error - if there is no context, we want to behave like the original module\n return restModule.apply(undefined, args);\n }\n return (context\n .initWixModules(restModule, elevated)\n // @ts-expect-error - we know the args here are meant to be passed to the initalized module\n .apply(undefined, args));\n });\n}\nexport function contextualizeEventDefinitionModuleV2(eventDefinition) {\n const contextualMethod = ((...args) => {\n const context = resolveContext();\n if (!context) {\n // this line should throw, but this would be a breaking change for older SDK versions\n // this is because in wixClient there's code that calls any function it detects and checks\n // if it's an ambassador module (see isAmbassadorModule)\n return () => { };\n }\n return context.initWixModules(eventDefinition).apply(undefined, args);\n });\n contextualMethod.__type = eventDefinition.__type;\n contextualMethod.type = eventDefinition.type;\n contextualMethod.isDomainEvent = eventDefinition.isDomainEvent;\n contextualMethod.transformations = eventDefinition.transformations;\n return contextualMethod;\n}\nexport function contextualizeSerivcePluginModuleV2(servicePlugin) {\n const contextualMethod = ((...args) => {\n const context = resolveContext();\n if (!context) {\n // this line should throw, but this would be a breaking change for older SDK versions\n // this is because in wixClient there's code that calls any function it detects and checks\n // if it's an ambassador module (see isAmbassadorModule)\n return () => { };\n }\n return context.initWixModules(servicePlugin).apply(undefined, args);\n });\n contextualMethod.__type = servicePlugin.__type;\n contextualMethod.componentType = servicePlugin.componentType;\n contextualMethod.methods = servicePlugin.methods;\n return contextualMethod;\n}\n"],"mappings":"AAAA,OAAS,cAAAA,MAAkB,mBCmBpB,SAASC,EAA0BC,EAAYC,EAAU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AcC,CAAW,CACnE,EACA,SAAU,CACN,GAAI,CAACL,EACD,MAAM,IAAI,MAAM,gGAAgG,EAEpH,OAAOA,EAAiB,IAC5B,EACA,MAAM,QAAQM,EAAOC,EAAWC,EAAM,CAClC,GAAI,CAACR,EACD,MAAM,IAAI,MAAM,gGAAgG,EAEpH,OAAOA,EAAiB,QAAQM,EAAOC,EAAWC,CAAI,CAC1D,CACJ,CACJ,CA+CO,SAASC,EAAkBC,EAAI,CAClC,IAAMC,EAAgB,WAAW,gBAC3BC,EAAgB,CAClB,OAAQC,EAAW,OACnB,eAAgBA,EAAW,cAC/B,EACIC,EACJ,WAAW,gBAAkB,OAC7BD,EAAW,OAAS,OACpBA,EAAW,eAAiB,OACxB,OAAO,YAAgB,MACvBC,EAAiB,CACb,OAAQ,aAAa,OACrB,eAAgB,aAAa,cACjC,EACA,OAAO,YAAY,OACnB,OAAO,YAAY,gBAEvB,GAAI,CACA,OAAOJ,EAAG,CACd,QACA,CACI,WAAW,gBAAkBC,EAC7BE,EAAW,OAASD,EAAc,OAClCC,EAAW,eAAiBD,EAAc,eACtC,OAAO,YAAgB,MACvB,YAAY,OAASE,EAAe,OACpC,YAAY,eAAiBA,EAAe,eAEpD,CACJ","names":["wixContext","contextualizeRESTModuleV2","restModule","elevated","args","context","resolveContext","resolveContext","oldContext","modules","elevated","runWithoutContext","contextualClient","wixContext","elevatedClient","wixModules","urlOrRequest","requestInit","query","variables","opts","runWithoutContext","fn","globalContext","moduleContext","wixContext","closureContext"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{wixContext as d}from"@wix/sdk-context";function v(){let t=typeof $wixContext<"u"&&$wixContext.initWixModules?$wixContext.initWixModules:typeof globalThis.__wix_context__<"u"&&globalThis.__wix_context__.initWixModules?globalThis.__wix_context__.initWixModules:void 0;if(t)return{initWixModules(i,o){return w(()=>t(i,o))},fetchWithAuth(){throw new Error("fetchWithAuth is not available in this context")},graphql(){throw new Error("graphql is not available in this context")}};let e=typeof $wixContext<"u"?$wixContext.client:typeof d.client<"u"?d.client:typeof globalThis.__wix_context__<"u"?globalThis.__wix_context__.client:void 0,n=typeof $wixContext<"u"?$wixContext.elevatedClient:typeof d.elevatedClient<"u"?d.elevatedClient:typeof globalThis.__wix_context__<"u"?globalThis.__wix_context__.elevatedClient:void 0;if(!(!e&&!n))return{initWixModules(i,o){if(o){if(!n)throw new Error("An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules");return w(()=>n.use(i))}if(!e)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return w(()=>e.use(i))},fetchWithAuth:(i,o)=>{if(!e)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return e.fetchWithAuth(i,o)},getAuth(){if(!e)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return e.auth},async graphql(i,o,r){if(!e)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return e.graphql(i,o,r)}}}function w(t){let e=globalThis.__wix_context__,n={client:d.client,elevatedClient:d.elevatedClient},i;globalThis.__wix_context__=void 0,d.client=void 0,d.elevatedClient=void 0,typeof $wixContext<"u"&&(i={client:$wixContext?.client,elevatedClient:$wixContext?.elevatedClient},delete $wixContext.client,delete $wixContext.elevatedClient);try{return t()}finally{globalThis.__wix_context__=e,d.client=n.client,d.elevatedClient=n.elevatedClient,typeof $wixContext<"u"&&($wixContext.client=i.client,$wixContext.elevatedClient=i.elevatedClient)}}function M(t,e){return{...t,...Object.fromEntries(e.map(n=>[n,(...i)=>{let o=v();if(!o)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return o.initWixModules(t)[n].apply(void 0,i)}]))}}function Q(t){return M({__type:"host",create:e=>Object.entries(t).reduce((n,[i,o])=>({...n,[i]:o(e)}),{})},Object.keys(t))}var k=t=>t!=null&&t!=="",g=t=>C(t,k);function C(t,e=n=>!!n){if(!t)return{};let n={};for(let i in t)e(t[i],i)&&(n[i]=t[i]);return n}var _=t=>{let e=g({"app.id":t.appId,"app.version":t.appVersion,"app.instanceId":t.appInstanceId,"extension.id":t.extensionId,"extension.name":t.extensionName,"extension.type":t.extensionType,platform:t.platform}),n=C({"extension.data":g({...t.extensionData}),site:g({url:t.siteUrl,id:t.tenantType==="SITE"?t.tenantId:void 0}),account:g({id:t.tenantType==="ACCOUNT"?t.tenantId:void 0})},i=>!!i&&Object.keys(i).length>0);return{tags:e,contexts:n}},F=class{constructor(t){this.message=t,this.captureException=()=>{console.error(this.message)},this.captureMessage=()=>{console.error(this.message)},this.startSpan=(e,n)=>(console.error(this.message),n(void 0)),this.startSpanManual=()=>(console.error(this.message),{end:()=>{},fail:()=>{}}),this.endSpanManual=()=>{console.error(this.message)},this.addBreadcrumb=()=>{console.error(this.message)}}},p=t=>new F(t);var x=t=>typeof t?.then=="function",D=(t,e)=>e?x(t)?t.then(n=>(e(n,!0),n)):(e(t,!1),t):t,P=(t,e)=>{t&&(e?setTimeout(t,e):t())},y=()=>Date.now()+Math.random(),R=class{constructor(t){this.options=t,this.spanMap=new Map}createSpan(t,e){let n,i,o,r=Date.now(),l,a=D(e,({sentrySDK:u,scope:h},f)=>{f&&(l=Date.now()-r),u.startSpan({...t,scope:h,forceTransaction:this.options.forceTransaction},()=>new Promise((m,K)=>{n=m,i=K}))?.catch(m=>{if(m?.message!==o?.message)throw m})}),s=u=>{this.spanMap.delete(t.name),D(a,()=>{P(u,l)})},c={end:()=>{s(()=>n?.())},fail:u=>{o=o??u,s(()=>i?.(u))}};return this.spanMap.set(t.name,c),c}getSpan(t){return this.spanMap.get(t.name)}},b=t=>new R(t);var z=(t,{tags:e,contexts:n})=>{e&&t.setTags(e),n&&Object.entries(n).forEach(([i,o])=>typeof o<"u"&&t.setContext(i,o))},I=(t,e)=>{if(!e)return;let{tags:n,contexts:i}=_(e);z(t,{tags:n,contexts:i})},A=["onLoad","forceLoad"],W=new Map,B=class{constructor(t){this.options=t,this.resolvedState=null,this.validateOptions=n=>{let i=A.filter(o=>typeof n.sentrySDK?.[o]!="function");if(i.length>0)throw new Error(`Missing the following options.sentrySDK methods: ${i.join(", ")}`)},this.validateOptions(t);let e=W.get(t.dsn);e||(e=b({forceTransaction:!0}),W.set(t.dsn,e)),this.manualSpanRegistry=e}isFullSDK(){return typeof this.options.sentrySDK.BrowserClient=="function"}init(){if(this.resolvedState)return this.resolvedState;let{sentrySDK:t,transport:e,hostContext:n,dsn:i,release:o,environment:r,tracesSampleRate:l=1,debug:a=!1}=this.options,s=new t.Scope,c=new t.BrowserClient({dsn:i,transport:e??t.makeFetchTransport,integrations:t.getDefaultIntegrations({}),stackParser:t.defaultStackParser,tracesSampleRate:l||1,debug:a,environment:r,release:o});return I(s,n),s.setClient(c),c.init(),this.resolvedState={sentrySDK:t,scope:s,sentryClient:c},this.resolvedState}loadFullSDK(t){if(this.isFullSDK()){t?.(this.init());return}if(this.promise){this.promise.then(t);return}this.promise=new Promise(e=>{this.options.sentrySDK.onLoad(()=>{if(this.resolvedState)return;let n=this.init();e(n),t?.(n)})}),this.options.sentrySDK.forceLoad()}},$=class extends B{constructor(){super(...arguments),this.addBreadcrumb=t=>{let e={type:t.type,category:t.category,message:t.message,level:t.level,data:t.data};this.loadFullSDK(({scope:n})=>{n.addBreadcrumb(e)})},this.captureException=(t,e)=>{this.loadFullSDK(({sentryClient:n,scope:i})=>{n.captureException(t,{captureContext:{level:e?.level??"error",tags:e?.tags,contexts:e?.contexts}},i)})},this.captureMessage=(t,e)=>{this.loadFullSDK(({sentryClient:n,scope:i})=>{n.captureMessage(t,e?.level??"error",{captureContext:{level:e?.level??"error",tags:e?.tags,contexts:e?.contexts}},i)})},this.startSpan=(t,e)=>{if(this.isFullSDK()){let{sentrySDK:a,scope:s}=this.init();return a.startSpan({...t,scope:s},e)}this.loadFullSDK();let n=(a,s)=>{let c=Date.now()-s,u=()=>new Promise(h=>setTimeout(()=>h(a),c));this.loadFullSDK(async({sentrySDK:h,scope:f})=>h.startSpan({...t,scope:f},u))},i=async(a,s)=>{let c=Date.now()-s,u=()=>new Promise((h,f)=>setTimeout(()=>f(a),c));this.loadFullSDK(async({sentrySDK:h,scope:f})=>{try{await h.startSpan({...t,scope:f},u)}catch(S){if(S?.message!==a?.message)throw S}})},o=Date.now(),r,l;try{r=e()}catch(a){l=a}if(l)throw i(l,o),l;return x(r)?r.then(a=>n(a,o)).catch(a=>i(a,o)):n(r,o),r},this.startSpanManual=t=>{let e=this.isFullSDK()?this.init():new Promise(i=>this.loadFullSDK(i));return this.manualSpanRegistry.createSpan(t,e)},this.endSpanManual=t=>{this.manualSpanRegistry.getSpan(t)?.end()}}},V=t=>`Sentry SDK version "${t}" is not supported. Please make sure to use monitoring SDK only in supported environments.`,O=t=>{try{return parseInt(t.split(".")[0],10)}catch{console.warn("Failed to parse Sentry SDK version");return}},E=({sentrySDK:t,dsn:e,...n})=>{if(!t)return p("Unsupported environment - Sentry SDK is not loaded into the environment. Please make sure to use monitoring SDK only in supported environments.");if(!e)return p("Missing Sentry DSN in the app's monitoring configuration. Please make sure to set it.");try{let i=t.SDK_VERSION&&O(t.SDK_VERSION);return i&&i<7?p(V(t.SDK_VERSION)):new $({...n,dsn:e,sentrySDK:t})}catch(i){return p(`Failed to initialize monitoring client: ${i.message}`)}};var N=class{constructor(t){this.options=t,this.captureException=(e,n)=>{let{panoramaClient:i}=this.options;e instanceof Error||(e=new Error(e)),i.errorMonitor().reportError(e,this.contextToData(n))},this.captureMessage=(e,n)=>{let{panoramaClient:i}=this.options,o=i.logger(),r;switch(n?.level){case"error":r=o.error;break;case"warning":r=o.warn;break;default:r=o.info}r(e,this.contextToData(n))},this.startSpan=(e,n)=>{let{panoramaClient:i}=this.options,{name:o}=e,r,l=i.transaction(o,{id:y()}),a=this.contextToData(e);l.start(a);try{r=n(),x(r)?r=r.then(s=>(l.finish(a),s)).catch(s=>{throw this.reportErrorInContextOfSpan(s,e),s}):l.finish(a)}catch(s){throw this.reportErrorInContextOfSpan(s,e),s}return r},this.addBreadcrumb=e=>{let{panoramaClient:n}=this.options;n.errorMonitor().addBreadcrumb(e)}}contextToData(t){return t&&{...t?.tags&&{tags:t.tags},...t?.contexts&&{context:t.contexts},...t?.level&&{severity:t.level}}}reportErrorInContextOfSpan(t,e){let{panoramaClient:n}=this.options,{name:i}=e,o=this.contextToData({...e,contexts:{transaction:{name:i}}});n.errorMonitor().reportError(t,o)}startSpanManual(t){let{panoramaClient:e}=this.options,{name:n}=t,i=e.transaction(n,{id:y()}),o=this.contextToData(t);i.start(o);let r=!1,l=a=>{r||(r=!0,a())};return{end:()=>{l(()=>i.finish(o))},fail:a=>{l(()=>this.reportErrorInContextOfSpan(a,t))}}}endSpanManual(t){let{panoramaClient:e}=this.options,{name:n}=t;e.transaction(n).finish()}},T=t=>{let{panoramaClient:e}=t;return e?new N(t):p("Missing Panorama client")};var j=t=>t?.type==="SENTRY",q=t=>t?.type==="PANORAMA",gt=({sentrySDK:t,sentryTransport:e,panoramaClient:n,monitoringConfig:i,hostContext:o})=>{if(j(i)){let{sentryOptions:r}=i;return()=>E({dsn:r?.dsn,hostContext:o,sentrySDK:t,transport:e})}else if(q(i))return()=>T({panoramaClient:n});return()=>p("Invalid monitoring configuration. Please check the monitoring setup of your application.")};export{Q as a,gt as b};
|
|
2
|
-
//# sourceMappingURL=chunk-J7RIIVO6.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/@wix/sdk-runtime/build/context.js","../../../node_modules/@wix/sdk-runtime/build/context-v2.js","../../../node_modules/@wix/sdk-runtime/build/host-modules.js","../../../node_modules/@wix/monitoring/build/index.js","../../../node_modules/@wix/monitoring-common-sentry/build/index.js","../../../node_modules/@wix/monitoring-browser-sentry/build/index.js","../../../node_modules/@wix/monitoring-browser-panorama/build/index.js","../../../node_modules/@wix/monitoring-browser-sdk-host/build/index.js"],"sourcesContent":["import { wixContext } from '@wix/sdk-context';\nexport function resolveContext() {\n const oldContext = typeof $wixContext !== 'undefined' && $wixContext.initWixModules\n ? $wixContext.initWixModules\n : typeof globalThis.__wix_context__ !== 'undefined' &&\n globalThis.__wix_context__.initWixModules\n ? globalThis.__wix_context__.initWixModules\n : undefined;\n if (oldContext) {\n return {\n // @ts-expect-error\n initWixModules(modules, elevated) {\n return runWithoutContext(() => oldContext(modules, elevated));\n },\n fetchWithAuth() {\n throw new Error('fetchWithAuth is not available in this context');\n },\n graphql() {\n throw new Error('graphql is not available in this context');\n },\n };\n }\n const contextualClient = typeof $wixContext !== 'undefined'\n ? $wixContext.client\n : typeof wixContext.client !== 'undefined'\n ? wixContext.client\n : typeof globalThis.__wix_context__ !== 'undefined'\n ? globalThis.__wix_context__.client\n : undefined;\n const elevatedClient = typeof $wixContext !== 'undefined'\n ? $wixContext.elevatedClient\n : typeof wixContext.elevatedClient !== 'undefined'\n ? wixContext.elevatedClient\n : typeof globalThis.__wix_context__ !== 'undefined'\n ? globalThis.__wix_context__.elevatedClient\n : undefined;\n if (!contextualClient && !elevatedClient) {\n return;\n }\n return {\n initWixModules(wixModules, elevated) {\n if (elevated) {\n if (!elevatedClient) {\n throw new Error('An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules');\n }\n return runWithoutContext(() => elevatedClient.use(wixModules));\n }\n if (!contextualClient) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return runWithoutContext(() => contextualClient.use(wixModules));\n },\n fetchWithAuth: (urlOrRequest, requestInit) => {\n if (!contextualClient) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return contextualClient.fetchWithAuth(urlOrRequest, requestInit);\n },\n getAuth() {\n if (!contextualClient) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return contextualClient.auth;\n },\n async graphql(query, variables, opts) {\n if (!contextualClient) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return contextualClient.graphql(query, variables, opts);\n },\n };\n}\nexport function contextualizeHostModule(hostModule, prop) {\n return (...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context.initWixModules(hostModule)[prop].apply(undefined, args);\n };\n}\nexport function getContextualAuth() {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context.getAuth();\n}\nexport function contextualizeRESTModule(restModule, expectedArgsLength) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context\n .initWixModules(restModule, args[expectedArgsLength]?.suppressAuth ? true : false)\n .apply(undefined, args);\n });\n}\nexport function contextualizeEventDefinitionModule(eventDefinition) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context.initWixModules(eventDefinition).apply(undefined, args);\n });\n}\nexport function contextualizeSerivcePluginModule(servicePlugin) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context.initWixModules(servicePlugin).apply(undefined, args);\n });\n}\nexport * from './context-v2.js';\nexport function runWithoutContext(fn) {\n const globalContext = globalThis.__wix_context__;\n const moduleContext = {\n client: wixContext.client,\n elevatedClient: wixContext.elevatedClient,\n };\n let closureContext;\n globalThis.__wix_context__ = undefined;\n wixContext.client = undefined;\n wixContext.elevatedClient = undefined;\n if (typeof $wixContext !== 'undefined') {\n closureContext = {\n client: $wixContext?.client,\n elevatedClient: $wixContext?.elevatedClient,\n };\n delete $wixContext.client;\n delete $wixContext.elevatedClient;\n }\n try {\n return fn();\n }\n finally {\n globalThis.__wix_context__ = globalContext;\n wixContext.client = moduleContext.client;\n wixContext.elevatedClient = moduleContext.elevatedClient;\n if (typeof $wixContext !== 'undefined') {\n $wixContext.client = closureContext.client;\n $wixContext.elevatedClient = closureContext.elevatedClient;\n }\n }\n}\n","import { EventDefinition, ServicePluginDefinition, } from '@wix/sdk-types';\nimport { resolveContext } from './context.js';\nexport { EventDefinition, ServicePluginDefinition, };\nexport function contextualizeHostModuleV2(hostModule, props) {\n return {\n ...hostModule,\n ...Object.fromEntries(props.map((prop) => [\n prop,\n (...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context\n .initWixModules(hostModule)[prop].apply(undefined, args);\n },\n ])),\n };\n}\nexport function contextualizeRESTModuleV2(restModule, elevated) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n // @ts-expect-error - if there is no context, we want to behave like the original module\n return restModule.apply(undefined, args);\n }\n return (context\n .initWixModules(restModule, elevated)\n // @ts-expect-error - we know the args here are meant to be passed to the initalized module\n .apply(undefined, args));\n });\n}\nexport function contextualizeEventDefinitionModuleV2(eventDefinition) {\n const contextualMethod = ((...args) => {\n const context = resolveContext();\n if (!context) {\n // this line should throw, but this would be a breaking change for older SDK versions\n // this is because in wixClient there's code that calls any function it detects and checks\n // if it's an ambassador module (see isAmbassadorModule)\n return () => { };\n }\n return context.initWixModules(eventDefinition).apply(undefined, args);\n });\n contextualMethod.__type = eventDefinition.__type;\n contextualMethod.type = eventDefinition.type;\n contextualMethod.isDomainEvent = eventDefinition.isDomainEvent;\n contextualMethod.transformations = eventDefinition.transformations;\n return contextualMethod;\n}\nexport function contextualizeSerivcePluginModuleV2(servicePlugin) {\n const contextualMethod = ((...args) => {\n const context = resolveContext();\n if (!context) {\n // this line should throw, but this would be a breaking change for older SDK versions\n // this is because in wixClient there's code that calls any function it detects and checks\n // if it's an ambassador module (see isAmbassadorModule)\n return () => { };\n }\n return context.initWixModules(servicePlugin).apply(undefined, args);\n });\n contextualMethod.__type = servicePlugin.__type;\n contextualMethod.componentType = servicePlugin.componentType;\n contextualMethod.methods = servicePlugin.methods;\n return contextualMethod;\n}\n","import { contextualizeHostModuleV2 } from './context-v2.js';\nexport function createHostModule(hostModuleAPI) {\n return contextualizeHostModuleV2({\n __type: 'host',\n create: (host) => Object.entries(hostModuleAPI).reduce((acc, [key, fn]) => ({\n ...acc,\n [key]: fn(host),\n }), {}),\n }, Object.keys(hostModuleAPI));\n}\n","// src/context/context-utils.ts\nvar validValue = (value) => value !== void 0 && value !== null && value !== \"\";\nvar pickByValidValues = (obj) => pickBy(obj, validValue);\nfunction pickBy(object, predicate = (value) => !!value) {\n if (!object) {\n return {};\n }\n const result = {};\n for (const key in object) {\n if (predicate(object[key], key)) {\n result[key] = object[key];\n }\n }\n return result;\n}\nvar generateTagsAndContext = (context) => {\n const tags = pickByValidValues({\n \"app.id\": context.appId,\n \"app.version\": context.appVersion,\n \"app.instanceId\": context.appInstanceId,\n \"extension.id\": context.extensionId,\n \"extension.name\": context.extensionName,\n \"extension.type\": context.extensionType,\n platform: context.platform\n });\n const contexts = pickBy(\n {\n \"extension.data\": pickByValidValues({\n ...context.extensionData\n }),\n site: pickByValidValues({\n url: context.siteUrl,\n id: context.tenantType === \"SITE\" ? context.tenantId : void 0\n }),\n account: pickByValidValues({\n id: context.tenantType === \"ACCOUNT\" ? context.tenantId : void 0\n })\n },\n (value) => !!value && Object.keys(value).length > 0\n );\n return {\n tags,\n contexts\n };\n};\n\n// src/fallback-client.ts\nvar FallbackMonitoringClient = class {\n constructor(message) {\n this.message = message;\n this.captureException = () => {\n console.error(this.message);\n };\n this.captureMessage = () => {\n console.error(this.message);\n };\n this.startSpan = (spanOptions, callback) => {\n console.error(this.message);\n return callback(void 0);\n };\n this.startSpanManual = () => {\n console.error(this.message);\n return {\n end: () => {\n },\n fail: () => {\n }\n };\n };\n this.endSpanManual = () => {\n console.error(this.message);\n };\n this.addBreadcrumb = () => {\n console.error(this.message);\n };\n }\n};\nvar createFallbackMonitoringClient = (message) => {\n return new FallbackMonitoringClient(message);\n};\nexport {\n createFallbackMonitoringClient,\n generateTagsAndContext\n};\n","// src/utils.ts\nvar isPromise = (value) => typeof value?.then === \"function\";\nvar runWithMaybePromise = (value, cb) => {\n if (!cb) {\n return value;\n }\n if (isPromise(value)) {\n return value.then((res) => {\n cb(res, true);\n return res;\n });\n } else {\n cb(value, false);\n return value;\n }\n};\nvar runWithMaybeDelay = (cb, maybeTimeCompensation) => {\n if (!cb) {\n return;\n }\n if (maybeTimeCompensation) {\n setTimeout(cb, maybeTimeCompensation);\n } else {\n cb();\n }\n};\nvar generateRandomId = () => Date.now() + Math.random();\n\n// src/manual-span.ts\nvar ManualSpanRegistryImpl = class {\n constructor(options) {\n this.options = options;\n this.spanMap = /* @__PURE__ */ new Map();\n }\n createSpan(spanOptions, sentryOptionsOrPromise) {\n let resolveSpan;\n let rejectSpan;\n let error;\n const startTime = Date.now();\n let maybeDurationCompensation;\n const maybePromise = runWithMaybePromise(\n sentryOptionsOrPromise,\n ({ sentrySDK, scope }, isPromise2) => {\n if (isPromise2) {\n maybeDurationCompensation = Date.now() - startTime;\n }\n const promise = sentrySDK.startSpan(\n {\n ...spanOptions,\n scope,\n forceTransaction: this.options.forceTransaction\n },\n () => new Promise((resolve, reject) => {\n resolveSpan = resolve;\n rejectSpan = reject;\n })\n );\n promise?.catch((e) => {\n if (e?.message !== error?.message) {\n throw e;\n }\n });\n }\n );\n const endSpan = (cb) => {\n this.spanMap.delete(spanOptions.name);\n runWithMaybePromise(maybePromise, () => {\n runWithMaybeDelay(cb, maybeDurationCompensation);\n });\n };\n const span = {\n end: () => {\n endSpan(() => resolveSpan?.());\n },\n fail: (_error) => {\n error = error ?? _error;\n endSpan(() => rejectSpan?.(_error));\n }\n };\n this.spanMap.set(spanOptions.name, span);\n return span;\n }\n getSpan(spanOptions) {\n return this.spanMap.get(spanOptions.name);\n }\n};\nvar createManualSpanRegistry = (options) => new ManualSpanRegistryImpl(options);\nexport {\n createManualSpanRegistry,\n generateRandomId,\n isPromise,\n runWithMaybeDelay,\n runWithMaybePromise\n};\n","// src/factory.ts\nimport { createFallbackMonitoringClient } from \"@wix/monitoring\";\n\n// src/browser/client.ts\nimport { isPromise } from \"@wix/monitoring-common-sentry\";\n\n// src/abstract-browser-client.ts\nimport {\n createManualSpanRegistry\n} from \"@wix/monitoring-common-sentry\";\n\n// src/context-utils.ts\nimport { generateTagsAndContext } from \"@wix/monitoring\";\nvar setTagsAndContextsOnScope = (scope, { tags, contexts }) => {\n if (tags) {\n scope.setTags(tags);\n }\n if (contexts) {\n Object.entries(contexts).forEach(\n ([key, value]) => typeof value !== \"undefined\" && scope.setContext(key, value)\n );\n }\n};\nvar setHostContextOnScope = (scope, hostContext) => {\n if (!hostContext) {\n return;\n }\n const { tags, contexts } = generateTagsAndContext(hostContext);\n setTagsAndContextsOnScope(scope, { tags, contexts });\n};\n\n// src/abstract-browser-client.ts\nvar MandatorySDKMethods = [\"onLoad\", \"forceLoad\"];\nvar manualSpanRegistryMap = /* @__PURE__ */ new Map();\nvar AbstractSentryBrowserClient = class {\n constructor(options) {\n this.options = options;\n this.resolvedState = null;\n this.validateOptions = (options) => {\n const missingSDKMethods = MandatorySDKMethods.filter(\n (method) => typeof options.sentrySDK?.[method] !== \"function\"\n );\n if (missingSDKMethods.length > 0) {\n throw new Error(\n `Missing the following options.sentrySDK methods: ${missingSDKMethods.join(\", \")}`\n );\n }\n };\n this.validateOptions(options);\n let manualSpanRegistry = manualSpanRegistryMap.get(options.dsn);\n if (!manualSpanRegistry) {\n manualSpanRegistry = createManualSpanRegistry({\n // Force spans to be reported as individual transactions (one http request per one span)\n forceTransaction: true\n });\n manualSpanRegistryMap.set(options.dsn, manualSpanRegistry);\n }\n this.manualSpanRegistry = manualSpanRegistry;\n }\n isFullSDK() {\n return typeof this.options.sentrySDK.BrowserClient === \"function\";\n }\n init() {\n if (this.resolvedState) {\n return this.resolvedState;\n }\n const {\n sentrySDK,\n transport,\n hostContext,\n dsn,\n release,\n environment,\n tracesSampleRate = 1,\n debug = false\n } = this.options;\n const scope = new sentrySDK.Scope();\n const sentryClient = new sentrySDK.BrowserClient({\n dsn,\n transport: transport ?? sentrySDK.makeFetchTransport,\n integrations: sentrySDK.getDefaultIntegrations({}),\n stackParser: sentrySDK.defaultStackParser,\n tracesSampleRate: tracesSampleRate || 1,\n debug,\n environment,\n release\n });\n setHostContextOnScope(scope, hostContext);\n scope.setClient(sentryClient);\n sentryClient.init();\n this.resolvedState = {\n sentrySDK,\n scope,\n sentryClient\n };\n return this.resolvedState;\n }\n loadFullSDK(handler) {\n if (this.isFullSDK()) {\n handler?.(this.init());\n return;\n }\n if (this.promise) {\n this.promise.then(handler);\n return;\n }\n this.promise = new Promise((resolve) => {\n this.options.sentrySDK.onLoad(() => {\n if (this.resolvedState) {\n return;\n }\n const resolvedState = this.init();\n resolve(resolvedState);\n handler?.(resolvedState);\n });\n });\n this.options.sentrySDK.forceLoad();\n }\n};\n\n// src/browser/client.ts\nvar SentryBrowserClient = class extends AbstractSentryBrowserClient {\n constructor() {\n super(...arguments);\n /**\n * Records a new breadcrumb which will be attached to future events.\n * Breadcrumbs will be added to subsequent events to provide more context on user's actions prior to an error or crash.\n * @param breadcrumb The breadcrumb to record.\n */\n this.addBreadcrumb = (breadcrumb) => {\n const filteredBreadcrumb = {\n type: breadcrumb.type,\n category: breadcrumb.category,\n message: breadcrumb.message,\n level: breadcrumb.level,\n data: breadcrumb.data\n };\n this.loadFullSDK(({ scope }) => {\n scope.addBreadcrumb(filteredBreadcrumb);\n });\n };\n /**\n * Captures an exception event and sends it to Sentry.\n * @param error The error to capture\n * @param captureContext Optional additional data to attach to the Sentry event.\n */\n this.captureException = (error, captureContext) => {\n this.loadFullSDK(({ sentryClient, scope }) => {\n sentryClient.captureException(\n error,\n {\n captureContext: {\n level: captureContext?.level ?? \"error\",\n tags: captureContext?.tags,\n contexts: captureContext?.contexts\n }\n },\n scope\n );\n });\n };\n /**\n * Captures a message event and sends it to Sentry.\n * @param message The message to capture\n * @param captureContext Define the level of the message or pass in additional data to attach to the message.\n */\n this.captureMessage = (message, captureContext) => {\n this.loadFullSDK(({ sentryClient, scope }) => {\n sentryClient.captureMessage(\n message,\n captureContext?.level ?? \"error\",\n {\n captureContext: {\n level: captureContext?.level ?? \"error\",\n tags: captureContext?.tags,\n contexts: captureContext?.contexts\n }\n },\n scope\n );\n });\n };\n /**\n * Wraps a function with a span and finishes the span after the function is done. The created span is the active span and will be used as parent by other spans created inside the function, as long as the function is executed while the scope is active.\n * @param spanOptions The options for the span\n * @param callback The function to wrap with a span\n * @returns The return value of the callback\n */\n this.startSpan = (spanOptions, callback) => {\n if (this.isFullSDK()) {\n const { sentrySDK, scope } = this.init();\n return sentrySDK.startSpan({ ...spanOptions, scope }, callback);\n }\n this.loadFullSDK();\n const simulateAndReportSuccessfulSpan = (callbackResult2, startTime2) => {\n const spanDuration = Date.now() - startTime2;\n const simulatedCallback = () => {\n return new Promise(\n (resolve) => setTimeout(() => resolve(callbackResult2), spanDuration)\n );\n };\n this.loadFullSDK(async ({ sentrySDK, scope }) => {\n return sentrySDK.startSpan(\n { ...spanOptions, scope },\n simulatedCallback\n );\n });\n };\n const simulateAndReportFailedSpan = async (error2, startTime2) => {\n const spanDuration = Date.now() - startTime2;\n const simulatedCallback = () => {\n return new Promise(\n (_, reject) => setTimeout(() => reject(error2), spanDuration)\n );\n };\n this.loadFullSDK(async ({ sentrySDK, scope }) => {\n try {\n await sentrySDK.startSpan(\n { ...spanOptions, scope },\n simulatedCallback\n );\n } catch (e) {\n if (e?.message !== error2?.message) {\n throw e;\n }\n }\n });\n };\n const startTime = Date.now();\n let callbackResult;\n let error;\n try {\n callbackResult = callback();\n } catch (e) {\n error = e;\n }\n if (error) {\n simulateAndReportFailedSpan(error, startTime);\n throw error;\n } else {\n if (isPromise(callbackResult)) {\n callbackResult.then((res) => simulateAndReportSuccessfulSpan(res, startTime)).catch((e) => simulateAndReportFailedSpan(e, startTime));\n } else {\n simulateAndReportSuccessfulSpan(callbackResult, startTime);\n }\n return callbackResult;\n }\n };\n this.startSpanManual = (spanOptions) => {\n const resolvedStateOrPromise = this.isFullSDK() ? this.init() : new Promise((resolve) => this.loadFullSDK(resolve));\n const span = this.manualSpanRegistry.createSpan(\n spanOptions,\n resolvedStateOrPromise\n );\n return span;\n };\n this.endSpanManual = (spanOptions) => {\n const span = this.manualSpanRegistry.getSpan(spanOptions);\n span?.end();\n };\n }\n};\n\n// src/factory.ts\nvar unsupportedEnvironmentMessage = (version) => `Sentry SDK version \"${version}\" is not supported. Please make sure to use monitoring SDK only in supported environments.`;\nvar major = (version) => {\n try {\n return parseInt(version.split(\".\")[0], 10);\n } catch {\n console.warn(\"Failed to parse Sentry SDK version\");\n return void 0;\n }\n};\nvar createSentryBrowserClient = ({\n sentrySDK,\n dsn,\n ...options\n}) => {\n if (!sentrySDK) {\n return createFallbackMonitoringClient(\n \"Unsupported environment - Sentry SDK is not loaded into the environment. Please make sure to use monitoring SDK only in supported environments.\"\n );\n }\n if (!dsn) {\n return createFallbackMonitoringClient(\n \"Missing Sentry DSN in the app's monitoring configuration. Please make sure to set it.\"\n );\n }\n try {\n const sentrySdkMajorVersion = sentrySDK.SDK_VERSION && major(sentrySDK.SDK_VERSION);\n if (sentrySdkMajorVersion && sentrySdkMajorVersion < 7) {\n return createFallbackMonitoringClient(\n unsupportedEnvironmentMessage(sentrySDK.SDK_VERSION)\n );\n }\n return new SentryBrowserClient({ ...options, dsn, sentrySDK });\n } catch (e) {\n return createFallbackMonitoringClient(\n `Failed to initialize monitoring client: ${e.message}`\n );\n }\n};\nexport {\n createSentryBrowserClient\n};\n","// src/client.ts\nimport { generateRandomId, isPromise } from \"@wix/monitoring-common-sentry\";\nvar PanoramaBrowserClient = class {\n constructor(options) {\n this.options = options;\n this.captureException = (error, captureContext) => {\n const { panoramaClient } = this.options;\n if (!(error instanceof Error)) {\n error = new Error(error);\n }\n panoramaClient.errorMonitor().reportError(error, this.contextToData(captureContext));\n };\n this.captureMessage = (message, captureContext) => {\n const { panoramaClient } = this.options;\n const logger = panoramaClient.logger();\n let loggerByLevel;\n switch (captureContext?.level) {\n case \"error\":\n loggerByLevel = logger.error;\n break;\n case \"warning\":\n loggerByLevel = logger.warn;\n break;\n default:\n loggerByLevel = logger.info;\n }\n loggerByLevel(message, this.contextToData(captureContext));\n };\n this.startSpan = (spanOptions, callback) => {\n const { panoramaClient } = this.options;\n const { name } = spanOptions;\n let res;\n const transaction = panoramaClient.transaction(name, {\n id: generateRandomId()\n });\n const data = this.contextToData(spanOptions);\n transaction.start(data);\n try {\n res = callback();\n if (isPromise(res)) {\n res = res.then((_res) => {\n transaction.finish(data);\n return _res;\n }).catch((e) => {\n this.reportErrorInContextOfSpan(e, spanOptions);\n throw e;\n });\n } else {\n transaction.finish(data);\n }\n } catch (e) {\n this.reportErrorInContextOfSpan(e, spanOptions);\n throw e;\n }\n return res;\n };\n this.addBreadcrumb = (breadcrumb) => {\n const { panoramaClient } = this.options;\n panoramaClient.errorMonitor().addBreadcrumb(breadcrumb);\n };\n }\n contextToData(captureContext) {\n return captureContext && {\n ...captureContext?.tags && { tags: captureContext.tags },\n ...captureContext?.contexts && { context: captureContext.contexts },\n ...captureContext?.level && {\n severity: captureContext.level\n }\n };\n }\n reportErrorInContextOfSpan(error, spanOptions) {\n const { panoramaClient } = this.options;\n const { name } = spanOptions;\n const data = this.contextToData({\n ...spanOptions,\n contexts: { transaction: { name } }\n });\n panoramaClient.errorMonitor().reportError(error, data);\n }\n startSpanManual(spanOptions) {\n const { panoramaClient } = this.options;\n const { name } = spanOptions;\n const transaction = panoramaClient.transaction(name, {\n id: generateRandomId()\n });\n const data = this.contextToData(spanOptions);\n transaction.start(data);\n let reported = false;\n const reportOnce = (cb) => {\n if (reported) {\n return;\n }\n reported = true;\n cb();\n };\n return {\n end: () => {\n reportOnce(() => transaction.finish(data));\n },\n fail: (error) => {\n reportOnce(() => this.reportErrorInContextOfSpan(error, spanOptions));\n }\n };\n }\n endSpanManual(spanOptions) {\n const { panoramaClient } = this.options;\n const { name } = spanOptions;\n panoramaClient.transaction(name).finish();\n }\n};\n\n// src/factory.ts\nimport { createFallbackMonitoringClient } from \"@wix/monitoring\";\nvar createPanoramaBrowserClient = (options) => {\n const { panoramaClient } = options;\n if (!panoramaClient) {\n return createFallbackMonitoringClient(\"Missing Panorama client\");\n }\n return new PanoramaBrowserClient(options);\n};\nexport {\n createPanoramaBrowserClient\n};\n","// src/monitoring-client.ts\nimport { createFallbackMonitoringClient } from \"@wix/monitoring\";\nimport { createSentryBrowserClient } from \"@wix/monitoring-browser-sentry\";\nimport {\n createPanoramaBrowserClient\n} from \"@wix/monitoring-browser-panorama\";\nvar isSentryConfig = (monitoringConfig) => monitoringConfig?.type === \"SENTRY\";\nvar isPanoramaConfig = (monitoringConfig) => monitoringConfig?.type === \"PANORAMA\";\nvar getMonitoringClientFunction = ({\n sentrySDK,\n sentryTransport,\n panoramaClient,\n monitoringConfig,\n hostContext\n}) => {\n if (isSentryConfig(monitoringConfig)) {\n const { sentryOptions } = monitoringConfig;\n return () => createSentryBrowserClient({\n dsn: sentryOptions?.dsn,\n hostContext,\n sentrySDK,\n transport: sentryTransport\n });\n } else if (isPanoramaConfig(monitoringConfig)) {\n return () => createPanoramaBrowserClient({ panoramaClient });\n }\n return () => createFallbackMonitoringClient(\n \"Invalid monitoring configuration. Please check the monitoring setup of your application.\"\n );\n};\nexport {\n getMonitoringClientFunction\n};\n"],"mappings":"AAAA,OAAS,cAAAA,MAAkB,mBACpB,SAASC,GAAiB,CAC7B,IAAMC,EAAa,OAAO,YAAgB,KAAe,YAAY,eAC/D,YAAY,eACZ,OAAO,WAAW,gBAAoB,KACpC,WAAW,gBAAgB,eACzB,WAAW,gBAAgB,eAC3B,OACV,GAAIA,EACA,MAAO,CAEH,eAAeC,EAASC,EAAU,CAC9B,OAAOC,EAAkB,IAAMH,EAAWC,EAASC,CAAQ,CAAC,CAChE,EACA,eAAgB,CACZ,MAAM,IAAI,MAAM,gDAAgD,CACpE,EACA,SAAU,CACN,MAAM,IAAI,MAAM,0CAA0C,CAC9D,CACJ,EAEJ,IAAME,EAAmB,OAAO,YAAgB,IAC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AAqBA,GAAkB,OAAS,SAClEC,EAAoBD,GAAqBA,GAAkB,OAAS,WACpEE,GAA8B,CAAC,CACjC,UAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,iBAAAL,EACA,YAAAM,CACF,IAAM,CACJ,GAAIP,EAAeC,CAAgB,EAAG,CACpC,GAAM,CAAE,cAAAO,CAAc,EAAIP,EAC1B,MAAO,IAAMQ,EAA0B,CACrC,IAAKD,GAAe,IACpB,YAAAD,EACA,UAAAH,EACA,UAAWC,CACb,CAAC,CACH,SAAWH,EAAiBD,CAAgB,EAC1C,MAAO,IAAMS,EAA4B,CAAE,eAAAJ,CAAe,CAAC,EAE7D,MAAO,IAAMK,EACX,0FACF,CACF","names":["wixContext","resolveContext","oldContext","modules","elevated","runWithoutContext","contextualClient","elevatedClient","wixModules","urlOrRequest","requestInit","query","variables","opts","runWithoutContext","fn","globalContext","moduleContext","wixContext","closureContext","contextualizeHostModuleV2","hostModule","props","prop","args","context","resolveContext","createHostModule","hostModuleAPI","contextualizeHostModuleV2","host","acc","key","fn","validValue","value","pickByValidValues","obj","pickBy","object","predicate","result","key","generateTagsAndContext","context","tags","contexts","FallbackMonitoringClient","message","spanOptions","callback","createFallbackMonitoringClient","isPromise","value","runWithMaybePromise","cb","res","runWithMaybeDelay","maybeTimeCompensation","generateRandomId","ManualSpanRegistryImpl","options","spanOptions","sentryOptionsOrPromise","resolveSpan","rejectSpan","error","startTime","maybeDurationCompensation","maybePromise","sentrySDK","scope","isPromise2","resolve","reject","e","endSpan","span","_error","createManualSpanRegistry","setTagsAndContextsOnScope","scope","tags","contexts","key","value","setHostContextOnScope","hostContext","generateTagsAndContext","MandatorySDKMethods","manualSpanRegistryMap","AbstractSentryBrowserClient","options","missingSDKMethods","method","manualSpanRegistry","createManualSpanRegistry","sentrySDK","transport","dsn","release","environment","tracesSampleRate","debug","sentryClient","handler","resolve","resolvedState","SentryBrowserClient","breadcrumb","filteredBreadcrumb","error","captureContext","message","spanOptions","callback","simulateAndReportSuccessfulSpan","callbackResult2","startTime2","spanDuration","simulatedCallback","simulateAndReportFailedSpan","error2","_","reject","e","startTime","callbackResult","isPromise","res","resolvedStateOrPromise","unsupportedEnvironmentMessage","version","major","createSentryBrowserClient","createFallbackMonitoringClient","sentrySdkMajorVersion","PanoramaBrowserClient","options","error","captureContext","panoramaClient","message","logger","loggerByLevel","spanOptions","callback","name","res","transaction","generateRandomId","data","isPromise","_res","e","breadcrumb","reported","reportOnce","cb","createPanoramaBrowserClient","createFallbackMonitoringClient","isSentryConfig","monitoringConfig","isPanoramaConfig","getMonitoringClientFunction","sentrySDK","sentryTransport","panoramaClient","hostContext","sentryOptions","createSentryBrowserClient","createPanoramaBrowserClient","createFallbackMonitoringClient"]}
|