@wix/cli-app 1.1.53 → 1.1.56
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/README.md +45 -0
- package/build/CreateVersionCommand-LU6LUBNT.js +269 -0
- package/build/{CreateVersionCommand-2W37YQW4.js.map → CreateVersionCommand-LU6LUBNT.js.map} +1 -1
- package/build/DevCommand-G2BIT4FY.js +1168 -0
- package/build/DevCommand-G2BIT4FY.js.map +1 -0
- package/build/GenerateCommand-XKWJ2FEG.js +12392 -0
- package/build/GenerateCommand-XKWJ2FEG.js.map +1 -0
- package/build/LogsCommand-HYGDI5KW.js +284 -0
- package/build/LogsCommand-HYGDI5KW.js.map +1 -0
- package/build/PreviewCommand-6EMIKGQN.js +23 -0
- package/build/ServeCommand-YJ5RHQZ4.js +165 -0
- package/build/ServeCommand-YJ5RHQZ4.js.map +1 -0
- package/build/build-EC7LZLAY.js +3596 -0
- package/build/{build-D3GVJS75.js.map → build-EC7LZLAY.js.map} +1 -1
- package/build/build-Q5P6MZLW.js +97 -0
- package/build/build-Q5P6MZLW.js.map +1 -0
- package/build/chunk-3KMSVIRS.js +1323 -0
- package/build/chunk-3KMSVIRS.js.map +1 -0
- package/build/chunk-FH6U3Y37.js +19 -0
- package/build/chunk-FH6U3Y37.js.map +1 -0
- package/build/chunk-GIUEJUXG.js +151 -0
- package/build/{chunk-PSQ4AQFG.js.map → chunk-GIUEJUXG.js.map} +1 -1
- package/build/chunk-IJVKSYIY.js +222 -0
- package/build/chunk-IJVKSYIY.js.map +1 -0
- package/build/chunk-IMNXLCE5.js +51 -0
- package/build/{chunk-SZ5JWJ4Q.js.map → chunk-IMNXLCE5.js.map} +1 -1
- package/build/chunk-IWDISZ2R.js +96 -0
- package/build/chunk-IWDISZ2R.js.map +1 -0
- package/build/chunk-JKI4MP27.js +32 -0
- package/build/{chunk-AXAJ7DJ4.js.map → chunk-JKI4MP27.js.map} +1 -1
- package/build/chunk-JOVPQ7BW.js +183 -0
- package/build/chunk-JOVPQ7BW.js.map +1 -0
- package/build/chunk-KCMEJP7H.js +897 -0
- package/build/{chunk-QXIKCJLU.js.map → chunk-KCMEJP7H.js.map} +1 -1
- package/build/chunk-NDFUPX6I.js +635 -0
- package/build/chunk-NDFUPX6I.js.map +1 -0
- package/build/chunk-NUUM6HPA.js +195 -0
- package/build/{chunk-DLQYJEV6.js.map → chunk-NUUM6HPA.js.map} +1 -1
- package/build/chunk-PYIAC2GK.js +66 -0
- package/build/{chunk-V4TR6DCM.js.map → chunk-PYIAC2GK.js.map} +1 -1
- package/build/chunk-QICLTOEP.js +46 -0
- package/build/{chunk-TSAKYUDG.js.map → chunk-QICLTOEP.js.map} +1 -1
- package/build/chunk-QLZPVGJV.js +29 -0
- package/build/{chunk-C3O7WWDR.js.map → chunk-QLZPVGJV.js.map} +1 -1
- package/build/chunk-QZOQAFHK.js +2197 -0
- package/build/chunk-QZOQAFHK.js.map +1 -0
- package/build/chunk-SP37PQ3I.js +38035 -0
- package/build/chunk-SP37PQ3I.js.map +1 -0
- package/build/chunk-TSFNDZPX.js +39101 -0
- package/build/chunk-TSFNDZPX.js.map +1 -0
- package/build/chunk-TTW4MEC3.js +104 -0
- package/build/chunk-TTW4MEC3.js.map +1 -0
- package/build/chunk-U4QPSXJP.js +45 -0
- package/build/{chunk-WXOIL7LC.js.map → chunk-U4QPSXJP.js.map} +1 -1
- package/build/chunk-WG365AHZ.js +23 -0
- package/build/{chunk-FVG3T57Z.js.map → chunk-WG365AHZ.js.map} +1 -1
- package/build/chunk-XU5JBKO6.js +29230 -0
- package/build/chunk-XU5JBKO6.js.map +1 -0
- package/build/cloudflare-runtime/entry.js +299 -47
- package/build/cloudflare-runtime/getRegisteredExtensions.js +298 -46
- package/build/devtools-YPSDP32D.js +3702 -0
- package/build/{devtools-4JFNYU2B.js.map → devtools-YPSDP32D.js.map} +1 -1
- package/build/esm-YQVNLOAI.js +22083 -0
- package/build/{esm-HBMYQBEO.js.map → esm-YQVNLOAI.js.map} +1 -1
- package/build/index.js +3252 -21
- package/build/index.js.map +1 -1
- package/build/platform-sdk/chunk-TN6HYRXL.js +2 -0
- package/build/platform-sdk/chunk-TN6HYRXL.js.map +1 -0
- package/build/platform-sdk/dashboard.js +1 -1
- package/build/platform-sdk/dashboard.js.map +1 -1
- package/build/platform-sdk/editor.js +5 -5
- package/build/platform-sdk/editor.js.map +1 -1
- package/build/platform-sdk/site.js +1 -1
- package/build/platform-sdk/site.js.map +1 -1
- package/build/preview-HPJCC5SU.js +138 -0
- package/build/preview-HPJCC5SU.js.map +1 -0
- package/build/render-command-BJTVLIM5.js +117 -0
- package/build/render-command-BJTVLIM5.js.map +1 -0
- package/build/types.impl-CD4WWRUK.js +10 -0
- package/package.json +15 -9
- package/templates/custom-element/dependencies.json +1 -1
- package/templates/dashboard-modal/dependencies.json +1 -1
- package/templates/dashboard-plugin/files/plugin.tsx.ejs +8 -18
- package/templates/site-plugin/dependencies.json +1 -1
- package/build/CreateVersionCommand-2W37YQW4.js +0 -4
- package/build/DevCommand-JDHE7RQB.js +0 -4
- package/build/DevCommand-JDHE7RQB.js.map +0 -1
- package/build/GenerateCommand-3PPXF4B6.js +0 -128
- package/build/GenerateCommand-3PPXF4B6.js.map +0 -1
- package/build/LogsCommand-LQKTBY6D.js +0 -4
- package/build/LogsCommand-LQKTBY6D.js.map +0 -1
- package/build/PreviewCommand-H3HVD7DH.js +0 -4
- package/build/ServeCommand-RHONEHTF.js +0 -4
- package/build/ServeCommand-RHONEHTF.js.map +0 -1
- package/build/build-D3GVJS75.js +0 -5
- package/build/build-QN6TGE3Q.js +0 -4
- package/build/build-QN6TGE3Q.js.map +0 -1
- package/build/chunk-2W2YJZP5.js +0 -100
- package/build/chunk-2W2YJZP5.js.map +0 -1
- package/build/chunk-4CCKO52Z.js +0 -11
- package/build/chunk-4CCKO52Z.js.map +0 -1
- package/build/chunk-5OZZ7R6I.js +0 -11
- package/build/chunk-5OZZ7R6I.js.map +0 -1
- package/build/chunk-AXAJ7DJ4.js +0 -4
- package/build/chunk-B5P4JHUW.js +0 -278
- package/build/chunk-B5P4JHUW.js.map +0 -1
- package/build/chunk-C3O7WWDR.js +0 -4
- package/build/chunk-DLQYJEV6.js +0 -4
- package/build/chunk-F6MVNSX2.js +0 -4
- package/build/chunk-F6MVNSX2.js.map +0 -1
- package/build/chunk-FVG3T57Z.js +0 -4
- package/build/chunk-HILXNAWZ.js +0 -4
- package/build/chunk-HILXNAWZ.js.map +0 -1
- package/build/chunk-LDGXTJLC.js +0 -4
- package/build/chunk-LDGXTJLC.js.map +0 -1
- package/build/chunk-PCBMS46R.js +0 -4
- package/build/chunk-PCBMS46R.js.map +0 -1
- package/build/chunk-PSQ4AQFG.js +0 -4
- package/build/chunk-QXIKCJLU.js +0 -5
- package/build/chunk-SZ5JWJ4Q.js +0 -4
- package/build/chunk-TSAKYUDG.js +0 -4
- package/build/chunk-V4TR6DCM.js +0 -4
- package/build/chunk-WJTPY35F.js +0 -9
- package/build/chunk-WJTPY35F.js.map +0 -1
- package/build/chunk-WXOIL7LC.js +0 -4
- package/build/chunk-YIGHU6O6.js +0 -4
- package/build/chunk-YIGHU6O6.js.map +0 -1
- package/build/chunk-YMRYABCG.js +0 -115
- package/build/chunk-YMRYABCG.js.map +0 -1
- package/build/devtools-4JFNYU2B.js +0 -10
- package/build/esm-HBMYQBEO.js +0 -466
- package/build/platform-sdk/chunk-32RIHE6N.js +0 -2
- package/build/platform-sdk/chunk-32RIHE6N.js.map +0 -1
- package/build/preview-457BTAHF.js +0 -4
- package/build/preview-457BTAHF.js.map +0 -1
- package/build/render-command-W6CY3R4Q.js +0 -4
- package/build/render-command-W6CY3R4Q.js.map +0 -1
- package/build/types.impl-L2DPGJ77.js +0 -4
- /package/build/{PreviewCommand-H3HVD7DH.js.map → PreviewCommand-6EMIKGQN.js.map} +0 -0
- /package/build/{types.impl-L2DPGJ77.js.map → types.impl-CD4WWRUK.js.map} +0 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { createRequire as _createRequire } from 'node:module';
|
|
2
|
+
const require = _createRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
require_index_node
|
|
5
|
+
} from "./chunk-TSFNDZPX.js";
|
|
6
|
+
import {
|
|
7
|
+
require_react,
|
|
8
|
+
require_verror
|
|
9
|
+
} from "./chunk-XU5JBKO6.js";
|
|
10
|
+
import {
|
|
11
|
+
__toESM,
|
|
12
|
+
init_esm_shims
|
|
13
|
+
} from "./chunk-PYIAC2GK.js";
|
|
14
|
+
|
|
15
|
+
// ../cli-debug-log/src/index.tsx
|
|
16
|
+
init_esm_shims();
|
|
17
|
+
var import_react = __toESM(require_react(), 1);
|
|
18
|
+
var import_verror2 = __toESM(require_verror(), 1);
|
|
19
|
+
import { dirname } from "node:path";
|
|
20
|
+
import { appendFileSync, mkdirSync } from "node:fs";
|
|
21
|
+
|
|
22
|
+
// ../cli-http-client/src/extract-error.ts
|
|
23
|
+
init_esm_shims();
|
|
24
|
+
var import_http_client = __toESM(require_index_node(), 1);
|
|
25
|
+
var import_verror = __toESM(require_verror(), 1);
|
|
26
|
+
function extractHttpError(error) {
|
|
27
|
+
if (import_http_client.HttpClient.isHttpError(error)) {
|
|
28
|
+
return error;
|
|
29
|
+
}
|
|
30
|
+
const nestedError = error instanceof Error ? import_verror.default.cause(error) : null;
|
|
31
|
+
return nestedError ? extractHttpError(nestedError) : null;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// ../cli-http-client/src/error-info.ts
|
|
35
|
+
init_esm_shims();
|
|
36
|
+
function getHttpErrorInfo(httpError) {
|
|
37
|
+
return {
|
|
38
|
+
request: {
|
|
39
|
+
baseURL: httpError.config.baseURL,
|
|
40
|
+
url: httpError.config.url,
|
|
41
|
+
method: httpError.config.method,
|
|
42
|
+
headers: httpError.config.headers,
|
|
43
|
+
data: httpError.config.data
|
|
44
|
+
},
|
|
45
|
+
response: {
|
|
46
|
+
code: httpError.code,
|
|
47
|
+
message: httpError.message,
|
|
48
|
+
status: httpError.response?.status,
|
|
49
|
+
headers: httpError.response?.headers,
|
|
50
|
+
data: httpError.response?.data
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// ../cli-debug-log/src/index.tsx
|
|
56
|
+
function writeCrashReport(reportPath, error) {
|
|
57
|
+
try {
|
|
58
|
+
let content = `----- CLI crash report at ${(/* @__PURE__ */ new Date()).toISOString()}
|
|
59
|
+
`;
|
|
60
|
+
if (error instanceof Error) {
|
|
61
|
+
content += `Error Trace
|
|
62
|
+
`;
|
|
63
|
+
content += `${import_verror2.default.fullStack(error)}
|
|
64
|
+
`;
|
|
65
|
+
content += `Error Info
|
|
66
|
+
`;
|
|
67
|
+
content += `${JSON.stringify(import_verror2.default.info(error), null, 2)}
|
|
68
|
+
`;
|
|
69
|
+
const httpError = extractHttpError(error);
|
|
70
|
+
if (httpError) {
|
|
71
|
+
content += `Request Info
|
|
72
|
+
`;
|
|
73
|
+
content += `${JSON.stringify(getHttpErrorInfo(httpError), null, 2)}
|
|
74
|
+
`;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
mkdirSync(dirname(reportPath), { recursive: true });
|
|
78
|
+
appendFileSync(reportPath, content);
|
|
79
|
+
} catch {
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
var DebugLogContext = (0, import_react.createContext)(null);
|
|
83
|
+
var DebugLogProvider = ({ filePath, children }) => {
|
|
84
|
+
const writeToDebugLog = (0, import_react.useCallback)(
|
|
85
|
+
(error) => writeCrashReport(filePath, error),
|
|
86
|
+
[filePath]
|
|
87
|
+
);
|
|
88
|
+
return /* @__PURE__ */ import_react.default.createElement(DebugLogContext.Provider, { value: writeToDebugLog }, children);
|
|
89
|
+
};
|
|
90
|
+
var useDebugLog = () => {
|
|
91
|
+
const context = (0, import_react.useContext)(DebugLogContext);
|
|
92
|
+
if (context == null) {
|
|
93
|
+
throw new Error(
|
|
94
|
+
"useDebugLog() cannot be used without an <DebugLogProvider>"
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
return context;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export {
|
|
101
|
+
DebugLogProvider,
|
|
102
|
+
useDebugLog
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=chunk-TTW4MEC3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../cli-debug-log/src/index.tsx","../../cli-http-client/src/extract-error.ts","../../cli-http-client/src/error-info.ts"],"sourcesContent":["import { dirname } from 'node:path';\nimport { appendFileSync, mkdirSync } from 'node:fs';\nimport React, { createContext, useContext, useCallback } from 'react';\nimport type { FC, ReactNode } from 'react';\nimport VError from 'verror';\nimport { extractHttpError, getHttpErrorInfo } from '@wix/cli-http-client';\n\nexport function writeCrashReport(reportPath: string, error: unknown) {\n try {\n let content = `----- CLI crash report at ${new Date().toISOString()}\\n`;\n if (error instanceof Error) {\n content += `Error Trace\\n`;\n content += `${VError.fullStack(error)}\\n`;\n content += `Error Info\\n`;\n content += `${JSON.stringify(VError.info(error), null, 2)}\\n`;\n\n const httpError = extractHttpError(error);\n if (httpError) {\n content += `Request Info\\n`;\n content += `${JSON.stringify(getHttpErrorInfo(httpError), null, 2)}\\n`;\n }\n }\n mkdirSync(dirname(reportPath), { recursive: true });\n appendFileSync(reportPath, content);\n } catch {\n // well there is so much we can do...\n }\n}\n\nexport type WriteDebugLogFn = (error: unknown) => void;\n\nconst DebugLogContext = createContext<WriteDebugLogFn | null>(null);\n\ninterface Props {\n filePath: string;\n children: ReactNode;\n}\n\nexport const DebugLogProvider: FC<Props> = ({ filePath, children }) => {\n const writeToDebugLog = useCallback<WriteDebugLogFn>(\n (error) => writeCrashReport(filePath, error),\n [filePath]\n );\n\n return (\n <DebugLogContext.Provider value={writeToDebugLog}>\n {children}\n </DebugLogContext.Provider>\n );\n};\n\nexport const useDebugLog = (): WriteDebugLogFn => {\n const context = useContext(DebugLogContext);\n if (context == null) {\n throw new Error(\n 'useDebugLog() cannot be used without an <DebugLogProvider>'\n );\n }\n return context;\n};\n","import type { IHttpError } from '@wix/http-client';\nimport { HttpClient } from '@wix/http-client';\nimport VError from 'verror';\n\nexport function extractHttpError(error: unknown): IHttpError | null {\n if (HttpClient.isHttpError(error)) {\n return error;\n }\n\n const nestedError = error instanceof Error ? VError.cause(error) : null;\n return nestedError ? extractHttpError(nestedError) : null;\n}\n","import type { IHttpError } from '@wix/http-client';\n\nexport function getHttpErrorInfo(httpError: IHttpError) {\n return {\n request: {\n baseURL: httpError.config.baseURL,\n url: httpError.config.url,\n method: httpError.config.method,\n headers: httpError.config.headers,\n data: httpError.config.data,\n },\n response: {\n code: httpError.code,\n message: httpError.message,\n status: httpError.response?.status,\n headers: httpError.response?.headers,\n data: httpError.response?.data,\n },\n } as const;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAEA,mBAA8D;AAE9D,IAAAA,iBAAmB;AAJnB,SAAS,eAAe;AACxB,SAAS,gBAAgB,iBAAiB;;;ACD1C;AACA,yBAA2B;AAC3B,oBAAmB;AAEZ,SAAS,iBAAiB,OAAmC;AAClE,MAAI,8BAAW,YAAY,KAAK,GAAG;AACjC,WAAO;AAAA,EACT;AAEA,QAAM,cAAc,iBAAiB,QAAQ,cAAAC,QAAO,MAAM,KAAK,IAAI;AACnE,SAAO,cAAc,iBAAiB,WAAW,IAAI;AACvD;;;ACXA;AAEO,SAAS,iBAAiB,WAAuB;AACtD,SAAO;AAAA,IACL,SAAS;AAAA,MACP,SAAS,UAAU,OAAO;AAAA,MAC1B,KAAK,UAAU,OAAO;AAAA,MACtB,QAAQ,UAAU,OAAO;AAAA,MACzB,SAAS,UAAU,OAAO;AAAA,MAC1B,MAAM,UAAU,OAAO;AAAA,IACzB;AAAA,IACA,UAAU;AAAA,MACR,MAAM,UAAU;AAAA,MAChB,SAAS,UAAU;AAAA,MACnB,QAAQ,UAAU,UAAU;AAAA,MAC5B,SAAS,UAAU,UAAU;AAAA,MAC7B,MAAM,UAAU,UAAU;AAAA,IAC5B;AAAA,EACF;AACF;;;AFZO,SAAS,iBAAiB,YAAoB,OAAgB;AACnE,MAAI;AACF,QAAI,UAAU,8BAA6B,oBAAI,KAAK,GAAE,YAAY,CAAC;AAAA;AACnE,QAAI,iBAAiB,OAAO;AAC1B,iBAAW;AAAA;AACX,iBAAW,GAAG,eAAAC,QAAO,UAAU,KAAK,CAAC;AAAA;AACrC,iBAAW;AAAA;AACX,iBAAW,GAAG,KAAK,UAAU,eAAAA,QAAO,KAAK,KAAK,GAAG,MAAM,CAAC,CAAC;AAAA;AAEzD,YAAM,YAAY,iBAAiB,KAAK;AACxC,UAAI,WAAW;AACb,mBAAW;AAAA;AACX,mBAAW,GAAG,KAAK,UAAU,iBAAiB,SAAS,GAAG,MAAM,CAAC,CAAC;AAAA;AAAA,MACpE;AAAA,IACF;AACA,cAAU,QAAQ,UAAU,GAAG,EAAE,WAAW,KAAK,CAAC;AAClD,mBAAe,YAAY,OAAO;AAAA,EACpC,QAAQ;AAAA,EAER;AACF;AAIA,IAAM,sBAAkB,4BAAsC,IAAI;AAO3D,IAAM,mBAA8B,CAAC,EAAE,UAAU,SAAS,MAAM;AACrE,QAAM,sBAAkB;AAAA,IACtB,CAAC,UAAU,iBAAiB,UAAU,KAAK;AAAA,IAC3C,CAAC,QAAQ;AAAA,EACX;AAEA,SACE,6BAAAC,QAAA,cAAC,gBAAgB,UAAhB,EAAyB,OAAO,mBAC9B,QACH;AAEJ;AAEO,IAAM,cAAc,MAAuB;AAChD,QAAM,cAAU,yBAAW,eAAe;AAC1C,MAAI,WAAW,MAAM;AACnB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;","names":["import_verror","VError","VError","React"]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { createRequire as _createRequire } from 'node:module';
|
|
2
|
+
const require = _createRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
DevCenterComponent,
|
|
5
|
+
useProjectModel
|
|
6
|
+
} from "./chunk-TSFNDZPX.js";
|
|
7
|
+
import {
|
|
8
|
+
require_lib,
|
|
9
|
+
require_react
|
|
10
|
+
} from "./chunk-XU5JBKO6.js";
|
|
11
|
+
import {
|
|
12
|
+
__toESM,
|
|
13
|
+
init_esm_shims
|
|
14
|
+
} from "./chunk-PYIAC2GK.js";
|
|
15
|
+
|
|
16
|
+
// src/backend/useBackendComponents.ts
|
|
17
|
+
init_esm_shims();
|
|
18
|
+
var import_react = __toESM(require_react(), 1);
|
|
19
|
+
var import_variant = __toESM(require_lib(), 1);
|
|
20
|
+
function useBackendComponents() {
|
|
21
|
+
const { model } = useProjectModel();
|
|
22
|
+
const backendComponentsByType = (0, import_react.useMemo)(() => {
|
|
23
|
+
const Api = model.components.filter((0, import_variant.isType)(DevCenterComponent.Api)).sort((a, b) => a.title.localeCompare(b.title));
|
|
24
|
+
const Event = model.components.filter((0, import_variant.isType)(DevCenterComponent.Event)).sort((a, b) => a.title.localeCompare(b.title));
|
|
25
|
+
const ServicePlugin = model.components.filter((0, import_variant.isType)(DevCenterComponent.ServicePlugin)).sort((a, b) => a.servicePlugin.name.localeCompare(b.servicePlugin.name));
|
|
26
|
+
return {
|
|
27
|
+
Api,
|
|
28
|
+
Event,
|
|
29
|
+
ServicePlugin
|
|
30
|
+
};
|
|
31
|
+
}, [model.components]);
|
|
32
|
+
return {
|
|
33
|
+
backendComponents: [
|
|
34
|
+
...backendComponentsByType.Api,
|
|
35
|
+
...backendComponentsByType.Event,
|
|
36
|
+
...backendComponentsByType.ServicePlugin
|
|
37
|
+
],
|
|
38
|
+
backendComponentsByType
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export {
|
|
43
|
+
useBackendComponents
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=chunk-U4QPSXJP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/backend/useBackendComponents.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { isType } from 'variant';\nimport { useProjectModel } from '../model.js';\nimport { DevCenterComponent } from '../dev-center/components/dev-center-component.js';\n\nexport function useBackendComponents() {\n const { model } = useProjectModel();\n\n const backendComponentsByType = useMemo(() => {\n const Api = model.components\n .filter(isType(DevCenterComponent.Api))\n .sort((a, b) => a.title.localeCompare(b.title));\n\n const Event = model.components\n .filter(isType(DevCenterComponent.Event))\n .sort((a, b) => a.title.localeCompare(b.title));\n\n const ServicePlugin = model.components\n .filter(isType(DevCenterComponent.ServicePlugin))\n .sort((a, b) => a.servicePlugin.name.localeCompare(b.servicePlugin.name));\n\n return {\n Api,\n Event,\n ServicePlugin,\n };\n }, [model.components]);\n\n return {\n backendComponents: [\n ...backendComponentsByType.Api,\n ...backendComponentsByType.Event,\n ...backendComponentsByType.ServicePlugin,\n ],\n backendComponentsByType,\n };\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/backend/useBackendComponents.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { isType } from 'variant';\nimport { useProjectModel } from '../model.js';\nimport { DevCenterComponent } from '../dev-center/components/dev-center-component.js';\n\nexport function useBackendComponents() {\n const { model } = useProjectModel();\n\n const backendComponentsByType = useMemo(() => {\n const Api = model.components\n .filter(isType(DevCenterComponent.Api))\n .sort((a, b) => a.title.localeCompare(b.title));\n\n const Event = model.components\n .filter(isType(DevCenterComponent.Event))\n .sort((a, b) => a.title.localeCompare(b.title));\n\n const ServicePlugin = model.components\n .filter(isType(DevCenterComponent.ServicePlugin))\n .sort((a, b) => a.servicePlugin.name.localeCompare(b.servicePlugin.name));\n\n return {\n Api,\n Event,\n ServicePlugin,\n };\n }, [model.components]);\n\n return {\n backendComponents: [\n ...backendComponentsByType.Api,\n ...backendComponentsByType.Event,\n ...backendComponentsByType.ServicePlugin,\n ],\n backendComponentsByType,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA,mBAAwB;AACxB,qBAAuB;AAIhB,SAAS,uBAAuB;AACrC,QAAM,EAAE,MAAM,IAAI,gBAAgB;AAElC,QAAM,8BAA0B,sBAAQ,MAAM;AAC5C,UAAM,MAAM,MAAM,WACf,WAAO,uBAAO,mBAAmB,GAAG,CAAC,EACrC,KAAK,CAAC,GAAG,MAAM,EAAE,MAAM,cAAc,EAAE,KAAK,CAAC;AAEhD,UAAM,QAAQ,MAAM,WACjB,WAAO,uBAAO,mBAAmB,KAAK,CAAC,EACvC,KAAK,CAAC,GAAG,MAAM,EAAE,MAAM,cAAc,EAAE,KAAK,CAAC;AAEhD,UAAM,gBAAgB,MAAM,WACzB,WAAO,uBAAO,mBAAmB,aAAa,CAAC,EAC/C,KAAK,CAAC,GAAG,MAAM,EAAE,cAAc,KAAK,cAAc,EAAE,cAAc,IAAI,CAAC;AAE1E,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF,GAAG,CAAC,MAAM,UAAU,CAAC;AAErB,SAAO;AAAA,IACL,mBAAmB;AAAA,MACjB,GAAG,wBAAwB;AAAA,MAC3B,GAAG,wBAAwB;AAAA,MAC3B,GAAG,wBAAwB;AAAA,IAC7B;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createRequire as _createRequire } from 'node:module';
|
|
2
|
+
const require = _createRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
messages_default
|
|
5
|
+
} from "./chunk-IJVKSYIY.js";
|
|
6
|
+
import {
|
|
7
|
+
createI18n
|
|
8
|
+
} from "./chunk-XU5JBKO6.js";
|
|
9
|
+
import {
|
|
10
|
+
init_esm_shims
|
|
11
|
+
} from "./chunk-PYIAC2GK.js";
|
|
12
|
+
|
|
13
|
+
// src/i18n.ts
|
|
14
|
+
init_esm_shims();
|
|
15
|
+
function createI18nT() {
|
|
16
|
+
const i18n = createI18n(messages_default);
|
|
17
|
+
return i18n.t.bind(i18n);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export {
|
|
21
|
+
createI18nT
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=chunk-WG365AHZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/i18n.ts"],"sourcesContent":["import { createI18n as externalCreate } from '@wix/cli-i18n';\nimport messages from './messages.json';\n\nexport function createI18nT() {\n const i18n = externalCreate(messages);\n\n return i18n.t.bind(i18n);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/i18n.ts"],"sourcesContent":["import { createI18n as externalCreate } from '@wix/cli-i18n';\nimport messages from './messages.json';\n\nexport function createI18nT() {\n const i18n = externalCreate(messages);\n\n return i18n.t.bind(i18n);\n}\n"],"mappings":";;;;;;;;;;;;;AAAA;AAGO,SAAS,cAAc;AAC5B,QAAM,OAAO,WAAe,gBAAQ;AAEpC,SAAO,KAAK,EAAE,KAAK,IAAI;AACzB;","names":[]}
|