@wix/cli 1.1.85 → 1.1.86
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/bin/wix.cjs +2 -2
- package/build/{DevCommand-NGOCESUJ.js → DevCommand-LK2J4SHX.js} +19 -16
- package/build/{DevCommand-NGOCESUJ.js.map → DevCommand-LK2J4SHX.js.map} +1 -1
- package/build/{DevCommand-OKLQPGTQ.js → DevCommand-NPY7LRXR.js} +27 -23
- package/build/{DevCommand-OKLQPGTQ.js.map → DevCommand-NPY7LRXR.js.map} +1 -1
- package/build/{InstallCommand-647RWVVX.js → InstallCommand-HETKQTOF.js} +21 -18
- package/build/{InstallCommand-647RWVVX.js.map → InstallCommand-HETKQTOF.js.map} +1 -1
- package/build/{LoginCommand-IK3XY4D2.js → LoginCommand-WCUDINVD.js} +17 -32
- package/build/LoginCommand-WCUDINVD.js.map +1 -0
- package/build/{LogoutCommand-YP6BXWWF.js → LogoutCommand-LKLIYJ4J.js} +15 -16
- package/build/LogoutCommand-LKLIYJ4J.js.map +1 -0
- package/build/{PreviewCommand-BZSNCYDF.js → PreviewCommand-3BMR7D7L.js} +27 -24
- package/build/{PreviewCommand-BZSNCYDF.js.map → PreviewCommand-3BMR7D7L.js.map} +1 -1
- package/build/{PreviewCommand-EETFW37L.js → PreviewCommand-C4T25Z3E.js} +22 -19
- package/build/{PreviewCommand-EETFW37L.js.map → PreviewCommand-C4T25Z3E.js.map} +1 -1
- package/build/{PublishCommand-QYBRB326.js → PublishCommand-O5NP2HRQ.js} +24 -21
- package/build/{PublishCommand-QYBRB326.js.map → PublishCommand-O5NP2HRQ.js.map} +1 -1
- package/build/{UninstallCommand-L5MMPL3G.js → UninstallCommand-CBFAJV2F.js} +21 -18
- package/build/{UninstallCommand-L5MMPL3G.js.map → UninstallCommand-CBFAJV2F.js.map} +1 -1
- package/build/{WhoamiCommand-UYSZCUEH.js → WhoamiCommand-LPJGYXSP.js} +7 -17
- package/build/WhoamiCommand-LPJGYXSP.js.map +1 -0
- package/build/{chunk-XKYPKS23.js → chunk-46OKYX3T.js} +3 -3
- package/build/{chunk-O2NAFQ2P.js → chunk-6VFQIFXS.js} +4 -4
- package/build/{chunk-MPVDKEDP.js → chunk-74KZJOZH.js} +12 -12
- package/build/{chunk-KUSSAMGC.js → chunk-7Y2EFSBJ.js} +6 -6
- package/build/{chunk-63QVSIVL.js → chunk-AGKBY3K2.js} +7 -6
- package/build/chunk-AGKBY3K2.js.map +1 -0
- package/build/chunk-AII5FZC2.js +2848 -0
- package/build/chunk-AII5FZC2.js.map +1 -0
- package/build/{chunk-FZBXS2AJ.js → chunk-APJVRHWV.js} +2 -2
- package/build/{chunk-ZVQFXRNI.js → chunk-CJHPYBMK.js} +2 -2
- package/build/{chunk-TN3LGDYK.js → chunk-FTL2KYZQ.js} +2 -2
- package/build/chunk-GPEPI5XF.js +546 -0
- package/build/chunk-GPEPI5XF.js.map +1 -0
- package/build/{chunk-GGTW6WOZ.js → chunk-GYIDIRSX.js} +2 -2
- package/build/{chunk-NKPAIWBZ.js → chunk-J3OSZVAR.js} +3 -3
- package/build/{chunk-CENCGS3N.js → chunk-JHHGNLIV.js} +2 -2
- package/build/{chunk-QJ6PLEIJ.js → chunk-JUZMIMAT.js} +2 -2
- package/build/chunk-K4AB7LGX.js +6548 -0
- package/build/chunk-K4AB7LGX.js.map +1 -0
- package/build/{chunk-4OBXQBKE.js → chunk-KT2FHEZR.js} +3 -3
- package/build/{chunk-SEJJ63NU.js → chunk-LUAAKCVP.js} +11 -11
- package/build/{chunk-U3RL4PVJ.js → chunk-M3K72MEX.js} +4 -3
- package/build/{chunk-U3RL4PVJ.js.map → chunk-M3K72MEX.js.map} +1 -1
- package/build/{chunk-PTOXPJCX.js → chunk-N4QBC52K.js} +3 -3
- package/build/{chunk-UJC5ROK2.js → chunk-NOH6CVSC.js} +5 -5
- package/build/{chunk-KUAMU72Z.js → chunk-NPVP6ZBL.js} +5 -3
- package/build/{chunk-KUAMU72Z.js.map → chunk-NPVP6ZBL.js.map} +1 -1
- package/build/{chunk-QFO3YSYZ.js → chunk-O2XYQA7P.js} +4289 -6811
- package/build/chunk-O2XYQA7P.js.map +1 -0
- package/build/{chunk-S5XQ2IIG.js → chunk-OVWRYWLC.js} +4 -4
- package/build/{chunk-ULK2YGRA.js → chunk-P5ZYMUV4.js} +4 -4
- package/build/{chunk-JDG6ZIZB.js → chunk-Q35JN7B7.js} +8 -6
- package/build/{chunk-JDG6ZIZB.js.map → chunk-Q35JN7B7.js.map} +1 -1
- package/build/{chunk-LBS2BP6E.js → chunk-QEBMMR2W.js} +2 -2
- package/build/{chunk-LDQL6ATA.js → chunk-QQCYRUA6.js} +23 -11
- package/build/{chunk-LDQL6ATA.js.map → chunk-QQCYRUA6.js.map} +1 -1
- package/build/{chunk-M33H32SE.js → chunk-RA6PTMIG.js} +5 -5
- package/build/{chunk-YEOPC4QE.js → chunk-RVGOK65D.js} +11 -9
- package/build/{chunk-YEOPC4QE.js.map → chunk-RVGOK65D.js.map} +1 -1
- package/build/{chunk-LXW2RB2I.js → chunk-SO6EZMEL.js} +1 -538
- package/build/chunk-SO6EZMEL.js.map +1 -0
- package/build/{chunk-KC3V25HP.js → chunk-T5F7W3A3.js} +7 -7
- package/build/{chunk-QYOTPFNS.js → chunk-UF2OSZ32.js} +10 -10
- package/build/{chunk-7CJQ7JJU.js → chunk-UIA2B5XZ.js} +5 -5
- package/build/{chunk-IKLUAPMI.js → chunk-UTFSE4KU.js} +3 -3
- package/build/{chunk-HLPDBQ6U.js → chunk-XBFMXGMY.js} +2895 -9425
- package/build/chunk-XBFMXGMY.js.map +1 -0
- package/build/{chunk-4RIYRAR5.js → chunk-YMJB5UO3.js} +5 -5
- package/build/{chunk-IEB2VH2B.js → chunk-Z4YQ7YWC.js} +3 -3
- package/build/{chunk-3KCJZENQ.js → chunk-Z7JQD6EN.js} +3 -3
- package/build/{dev-VXNRC2ME.js → dev-XNYFRZT2.js} +35 -32
- package/build/{dev-VXNRC2ME.js.map → dev-XNYFRZT2.js.map} +1 -1
- package/build/index.js +4461 -623
- package/build/index.js.map +1 -1
- package/build/{install-SRXLE6WL.js → install-T2VL2EW7.js} +24 -22
- package/build/{install-SRXLE6WL.js.map → install-T2VL2EW7.js.map} +1 -1
- package/build/{publish-N33PZNRJ.js → publish-X4C2MV4G.js} +29 -27
- package/build/{publish-N33PZNRJ.js.map → publish-X4C2MV4G.js.map} +1 -1
- package/build/{render-command-PBS4P7TU.js → render-command-3IKISL4W.js} +15 -12
- package/build/{render-command-PBS4P7TU.js.map → render-command-3IKISL4W.js.map} +1 -1
- package/build/{render-command-IGFGU562.js → render-command-6ZOFWK7J.js} +18 -15
- package/build/{render-command-IGFGU562.js.map → render-command-6ZOFWK7J.js.map} +1 -1
- package/build/{render-command-GRXTXIJN.js → render-command-TUP2HHMC.js} +13 -15
- package/build/render-command-TUP2HHMC.js.map +1 -0
- package/build/{render-command-X27PLUE4.js → render-command-XJNWHPDB.js} +18 -15
- package/build/{render-command-X27PLUE4.js.map → render-command-XJNWHPDB.js.map} +1 -1
- package/build/run-command-3YWR7KR7.js +21 -0
- package/build/src-5V4GOPPO.js +21 -0
- package/build/src-5V4GOPPO.js.map +1 -0
- package/build/{src-JVC2UTGW.js → src-BTBURERG.js} +16 -14
- package/build/{src-JVC2UTGW.js.map → src-BTBURERG.js.map} +1 -1
- package/build/{src-ECKUI7WH.js → src-IM374B5V.js} +10 -8
- package/build/{src-CGFSK5OY.js → src-OISHTUJS.js} +11 -9
- package/build/{src-CGFSK5OY.js.map → src-OISHTUJS.js.map} +1 -1
- package/build/{src-DDPX2PNR.js → src-SRRWPZCM.js} +2 -2
- package/build/{src-LI6JAZKF.js → src-WA6BLDHT.js} +4 -4
- package/build/{src-OXDT5CFF.js → src-XPBBV4BR.js} +19 -17
- package/build/{src-OXDT5CFF.js.map → src-XPBBV4BR.js.map} +1 -1
- package/build/sync-types-KIFWC5MO.js +32 -0
- package/build/{uninstall-J6DD7EDS.js → uninstall-TTKVW5BW.js} +24 -22
- package/build/{uninstall-J6DD7EDS.js.map → uninstall-TTKVW5BW.js.map} +1 -1
- package/package.json +4 -3
- package/build/LoginCommand-IK3XY4D2.js.map +0 -1
- package/build/LogoutCommand-YP6BXWWF.js.map +0 -1
- package/build/WhoamiCommand-UYSZCUEH.js.map +0 -1
- package/build/chunk-63QVSIVL.js.map +0 -1
- package/build/chunk-HLPDBQ6U.js.map +0 -1
- package/build/chunk-LXW2RB2I.js.map +0 -1
- package/build/chunk-QFO3YSYZ.js.map +0 -1
- package/build/chunk-WYXNH6LH.js +0 -26
- package/build/chunk-WYXNH6LH.js.map +0 -1
- package/build/render-command-GRXTXIJN.js.map +0 -1
- package/build/run-command-U73ARBLX.js +0 -20
- package/build/sync-types-ZTCY2OVN.js +0 -30
- /package/build/{chunk-XKYPKS23.js.map → chunk-46OKYX3T.js.map} +0 -0
- /package/build/{chunk-O2NAFQ2P.js.map → chunk-6VFQIFXS.js.map} +0 -0
- /package/build/{chunk-MPVDKEDP.js.map → chunk-74KZJOZH.js.map} +0 -0
- /package/build/{chunk-KUSSAMGC.js.map → chunk-7Y2EFSBJ.js.map} +0 -0
- /package/build/{chunk-FZBXS2AJ.js.map → chunk-APJVRHWV.js.map} +0 -0
- /package/build/{chunk-ZVQFXRNI.js.map → chunk-CJHPYBMK.js.map} +0 -0
- /package/build/{chunk-TN3LGDYK.js.map → chunk-FTL2KYZQ.js.map} +0 -0
- /package/build/{chunk-GGTW6WOZ.js.map → chunk-GYIDIRSX.js.map} +0 -0
- /package/build/{chunk-NKPAIWBZ.js.map → chunk-J3OSZVAR.js.map} +0 -0
- /package/build/{chunk-CENCGS3N.js.map → chunk-JHHGNLIV.js.map} +0 -0
- /package/build/{chunk-QJ6PLEIJ.js.map → chunk-JUZMIMAT.js.map} +0 -0
- /package/build/{chunk-4OBXQBKE.js.map → chunk-KT2FHEZR.js.map} +0 -0
- /package/build/{chunk-SEJJ63NU.js.map → chunk-LUAAKCVP.js.map} +0 -0
- /package/build/{chunk-PTOXPJCX.js.map → chunk-N4QBC52K.js.map} +0 -0
- /package/build/{chunk-UJC5ROK2.js.map → chunk-NOH6CVSC.js.map} +0 -0
- /package/build/{chunk-S5XQ2IIG.js.map → chunk-OVWRYWLC.js.map} +0 -0
- /package/build/{chunk-ULK2YGRA.js.map → chunk-P5ZYMUV4.js.map} +0 -0
- /package/build/{chunk-LBS2BP6E.js.map → chunk-QEBMMR2W.js.map} +0 -0
- /package/build/{chunk-M33H32SE.js.map → chunk-RA6PTMIG.js.map} +0 -0
- /package/build/{chunk-KC3V25HP.js.map → chunk-T5F7W3A3.js.map} +0 -0
- /package/build/{chunk-QYOTPFNS.js.map → chunk-UF2OSZ32.js.map} +0 -0
- /package/build/{chunk-7CJQ7JJU.js.map → chunk-UIA2B5XZ.js.map} +0 -0
- /package/build/{chunk-IKLUAPMI.js.map → chunk-UTFSE4KU.js.map} +0 -0
- /package/build/{chunk-4RIYRAR5.js.map → chunk-YMJB5UO3.js.map} +0 -0
- /package/build/{chunk-IEB2VH2B.js.map → chunk-Z4YQ7YWC.js.map} +0 -0
- /package/build/{chunk-3KCJZENQ.js.map → chunk-Z7JQD6EN.js.map} +0 -0
- /package/build/{run-command-U73ARBLX.js.map → run-command-3YWR7KR7.js.map} +0 -0
- /package/build/{src-DDPX2PNR.js.map → src-IM374B5V.js.map} +0 -0
- /package/build/{src-ECKUI7WH.js.map → src-SRRWPZCM.js.map} +0 -0
- /package/build/{src-LI6JAZKF.js.map → src-WA6BLDHT.js.map} +0 -0
- /package/build/{sync-types-ZTCY2OVN.js.map → sync-types-KIFWC5MO.js.map} +0 -0
package/bin/wix.cjs
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/* eslint-disable no-var,node/prefer-global/process */
|
|
3
3
|
|
|
4
|
-
process.setSourceMapsEnabled(true);
|
|
5
|
-
|
|
6
4
|
(function minimumNodeVersionCheck() {
|
|
7
5
|
const RED = '\x1B[0;31m';
|
|
8
6
|
const GREEN = '\x1B[0;32m';
|
|
@@ -32,4 +30,6 @@ process.setSourceMapsEnabled(true);
|
|
|
32
30
|
}
|
|
33
31
|
})();
|
|
34
32
|
|
|
33
|
+
process.setSourceMapsEnabled(true);
|
|
34
|
+
|
|
35
35
|
require('./import.cjs');
|
|
@@ -2,33 +2,36 @@ import { createRequire as _createRequire } from 'node:module';
|
|
|
2
2
|
const require = _createRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
syncLatestTypes
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NOH6CVSC.js";
|
|
6
6
|
import "./chunk-OJHDGJWP.js";
|
|
7
7
|
import {
|
|
8
8
|
useVeloClient
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-GGTW6WOZ.js";
|
|
9
|
+
} from "./chunk-UF2OSZ32.js";
|
|
10
|
+
import "./chunk-N4QBC52K.js";
|
|
12
11
|
import "./chunk-6LI4WGAW.js";
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-GYIDIRSX.js";
|
|
13
|
+
import "./chunk-APJVRHWV.js";
|
|
14
14
|
import {
|
|
15
15
|
useProjectModel
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6VFQIFXS.js";
|
|
17
17
|
import {
|
|
18
18
|
pRetry,
|
|
19
19
|
useAuth
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-RVGOK65D.js";
|
|
21
|
+
import "./chunk-QQCYRUA6.js";
|
|
22
|
+
import "./chunk-NPVP6ZBL.js";
|
|
23
23
|
import {
|
|
24
|
-
Spinner,
|
|
25
24
|
Trans,
|
|
26
|
-
useAsync,
|
|
27
25
|
useTranslation
|
|
28
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-K4AB7LGX.js";
|
|
27
|
+
import "./chunk-GPEPI5XF.js";
|
|
28
|
+
import {
|
|
29
|
+
Spinner,
|
|
30
|
+
useAsync
|
|
31
|
+
} from "./chunk-XBFMXGMY.js";
|
|
29
32
|
import {
|
|
30
33
|
require_react
|
|
31
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-SO6EZMEL.js";
|
|
32
35
|
import "./chunk-2K5KKUL3.js";
|
|
33
36
|
import "./chunk-YU54OBFT.js";
|
|
34
37
|
import "./chunk-XMTHMR2B.js";
|
|
@@ -36,7 +39,7 @@ import "./chunk-YLK75XXM.js";
|
|
|
36
39
|
import {
|
|
37
40
|
outputDir,
|
|
38
41
|
outputFile
|
|
39
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-JHHGNLIV.js";
|
|
40
43
|
import {
|
|
41
44
|
getTestOverrides
|
|
42
45
|
} from "./chunk-GO2GZJCK.js";
|
|
@@ -44,7 +47,7 @@ import {
|
|
|
44
47
|
CliError,
|
|
45
48
|
CliErrorCode,
|
|
46
49
|
require_lib
|
|
47
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-M3K72MEX.js";
|
|
48
51
|
import {
|
|
49
52
|
__toESM,
|
|
50
53
|
init_esm_shims
|
|
@@ -170,4 +173,4 @@ var DevCommand = () => {
|
|
|
170
173
|
export {
|
|
171
174
|
DevCommand
|
|
172
175
|
};
|
|
173
|
-
//# sourceMappingURL=DevCommand-
|
|
176
|
+
//# sourceMappingURL=DevCommand-LK2J4SHX.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../cli-site-live/src/components/DevCommand/DevCommand.tsx","../../cli-site-live/src/components/DevCommand/InitializingState.tsx","../../cli-site-live/src/velo-types-sync-client/useVeloTypesSyncClient.ts","../../cli-site-live/src/velo-types-sync-client/velo-types-sync-client.ts","../../cli-site-live/src/project-files-service/useProjectFilesService.ts","../../cli-site-live/src/project-files-service/project-files-service.ts","../../cli-site-live/src/components/DevCommand/ReadyState.tsx"],"sourcesContent":["import React from 'react';\nimport type { FC } from 'react';\nimport { InitializingState } from './InitializingState.js';\nimport { ReadyState } from './ReadyState.js';\n\nexport const DevCommand: FC = () => {\n return (\n <InitializingState>\n <ReadyState />\n </InitializingState>\n );\n};\n","import type { FC, PropsWithChildren } from 'react';\nimport React from 'react';\nimport { match } from 'variant';\nimport { Spinner, useAsync } from '@wix/cli-ui-kit';\nimport { useTranslation } from '@wix/cli-i18n';\nimport { useVeloClient } from '@wix/velo-client';\nimport { useVeloTypesSyncClient } from '../../velo-types-sync-client/useVeloTypesSyncClient.js';\nimport { useProjectFilesService } from '../../project-files-service/useProjectFilesService.js';\nimport { useProjectModel } from '../../model.js';\n\nexport const InitializingState: FC<PropsWithChildren> = ({ children }) => {\n const { t } = useTranslation();\n const veloClient = useVeloClient();\n const projectFilesService = useProjectFilesService();\n const { veloAppId, projectFolder } = useProjectModel();\n const veloTypeSyncer = useVeloTypesSyncClient(projectFolder);\n\n const { status } = useAsync(async () => {\n async function initProjectFiles() {\n const { files, directories } = await veloClient.listAppFiles(veloAppId);\n await Promise.all([\n ...directories.map(projectFilesService.addDir),\n ...files.map(projectFilesService.saveFile),\n ]);\n }\n await Promise.all([initProjectFiles(), veloTypeSyncer.syncLatestTypes()]);\n }, []);\n\n return match(status, {\n Success: () => children,\n Error: () => null,\n Loading: () => <Spinner text={t('dev_command.init.fetching_files')} />,\n });\n};\n","import { useAuth } from '@wix/cli-auth';\nimport { useMemo } from 'react';\nimport { VeloTypesSyncClient } from './velo-types-sync-client.js';\n\nexport function useVeloTypesSyncClient(projectFolder: string) {\n const { getAccessToken } = useAuth();\n\n return useMemo(\n () => new VeloTypesSyncClient(projectFolder, getAccessToken),\n [projectFolder, getAccessToken]\n );\n}\n","import pRetry from 'p-retry';\nimport type { Options } from 'p-retry';\nimport { syncLatestTypes } from '@wix/velo-site-types-syncer';\nimport { getTestOverrides } from '@wix/cli-test-overrides';\nimport { CliError, CliErrorCode } from '@wix/cli-error';\n\nexport class VeloTypesSyncClient {\n private readonly retryOptions: Options;\n\n constructor(\n private projectFolder: string,\n private getToken: () => Promise<string>\n ) {\n const { minRetryTimeout } = getTestOverrides();\n\n this.retryOptions = {\n retries: 3,\n minTimeout: minRetryTimeout,\n maxTimeout: 3 * 1000,\n };\n }\n\n syncLatestTypes = async () => {\n const token = await this.getToken();\n\n try {\n await pRetry(\n () =>\n syncLatestTypes(this.projectFolder, {\n getAppToken: () => token,\n }),\n this.retryOptions\n );\n } catch (e) {\n throw new CliError({\n code: CliErrorCode.FailedToSyncPagesTypes(),\n cause: e,\n });\n }\n };\n}\n","import { useMemo } from 'react';\nimport { useProjectModel } from '../model.js';\nimport { ProjectFilesService } from './project-files-service.js';\n\nexport const useProjectFilesService = () => {\n const { projectFolder } = useProjectModel();\n\n return useMemo(() => new ProjectFilesService(projectFolder), [projectFolder]);\n};\n","import { join } from 'node:path';\nimport type { Directory, File } from '@wix/velo-client';\nimport { outputFile, outputDir } from '@wix/cli-fs';\n\nexport class ProjectFilesService {\n constructor(private projectFolder: string) {}\n\n addDir = async (file: Directory): Promise<void> => {\n const filePath = this.getFullPath(file);\n await outputDir(filePath);\n };\n\n saveFile = async (file: File): Promise<void> => {\n const filePath = this.getFullPath(file);\n await outputFile(filePath, file.content);\n };\n\n private getFullPath = (file: File | Directory) =>\n join(this.projectFolder, file.path);\n}\n","import React from 'react';\nimport { Trans } from '@wix/cli-i18n';\n\nexport const ReadyState = () => {\n return <Trans i18nKey=\"dev_command.welcome\" />;\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../cli-site-live/src/components/DevCommand/DevCommand.tsx","../../cli-site-live/src/components/DevCommand/InitializingState.tsx","../../cli-site-live/src/velo-types-sync-client/useVeloTypesSyncClient.ts","../../cli-site-live/src/velo-types-sync-client/velo-types-sync-client.ts","../../cli-site-live/src/project-files-service/useProjectFilesService.ts","../../cli-site-live/src/project-files-service/project-files-service.ts","../../cli-site-live/src/components/DevCommand/ReadyState.tsx"],"sourcesContent":["import React from 'react';\nimport type { FC } from 'react';\nimport { InitializingState } from './InitializingState.js';\nimport { ReadyState } from './ReadyState.js';\n\nexport const DevCommand: FC = () => {\n return (\n <InitializingState>\n <ReadyState />\n </InitializingState>\n );\n};\n","import type { FC, PropsWithChildren } from 'react';\nimport React from 'react';\nimport { match } from 'variant';\nimport { Spinner, useAsync } from '@wix/cli-ui-kit';\nimport { useTranslation } from '@wix/cli-i18n';\nimport { useVeloClient } from '@wix/velo-client';\nimport { useVeloTypesSyncClient } from '../../velo-types-sync-client/useVeloTypesSyncClient.js';\nimport { useProjectFilesService } from '../../project-files-service/useProjectFilesService.js';\nimport { useProjectModel } from '../../model.js';\n\nexport const InitializingState: FC<PropsWithChildren> = ({ children }) => {\n const { t } = useTranslation();\n const veloClient = useVeloClient();\n const projectFilesService = useProjectFilesService();\n const { veloAppId, projectFolder } = useProjectModel();\n const veloTypeSyncer = useVeloTypesSyncClient(projectFolder);\n\n const { status } = useAsync(async () => {\n async function initProjectFiles() {\n const { files, directories } = await veloClient.listAppFiles(veloAppId);\n await Promise.all([\n ...directories.map(projectFilesService.addDir),\n ...files.map(projectFilesService.saveFile),\n ]);\n }\n await Promise.all([initProjectFiles(), veloTypeSyncer.syncLatestTypes()]);\n }, []);\n\n return match(status, {\n Success: () => children,\n Error: () => null,\n Loading: () => <Spinner text={t('dev_command.init.fetching_files')} />,\n });\n};\n","import { useAuth } from '@wix/cli-auth';\nimport { useMemo } from 'react';\nimport { VeloTypesSyncClient } from './velo-types-sync-client.js';\n\nexport function useVeloTypesSyncClient(projectFolder: string) {\n const { getAccessToken } = useAuth();\n\n return useMemo(\n () => new VeloTypesSyncClient(projectFolder, getAccessToken),\n [projectFolder, getAccessToken]\n );\n}\n","import pRetry from 'p-retry';\nimport type { Options } from 'p-retry';\nimport { syncLatestTypes } from '@wix/velo-site-types-syncer';\nimport { getTestOverrides } from '@wix/cli-test-overrides';\nimport { CliError, CliErrorCode } from '@wix/cli-error';\n\nexport class VeloTypesSyncClient {\n private readonly retryOptions: Options;\n\n constructor(\n private projectFolder: string,\n private getToken: () => Promise<string>\n ) {\n const { minRetryTimeout } = getTestOverrides();\n\n this.retryOptions = {\n retries: 3,\n minTimeout: minRetryTimeout,\n maxTimeout: 3 * 1000,\n };\n }\n\n syncLatestTypes = async () => {\n const token = await this.getToken();\n\n try {\n await pRetry(\n () =>\n syncLatestTypes(this.projectFolder, {\n getAppToken: () => token,\n }),\n this.retryOptions\n );\n } catch (e) {\n throw new CliError({\n code: CliErrorCode.FailedToSyncPagesTypes(),\n cause: e,\n });\n }\n };\n}\n","import { useMemo } from 'react';\nimport { useProjectModel } from '../model.js';\nimport { ProjectFilesService } from './project-files-service.js';\n\nexport const useProjectFilesService = () => {\n const { projectFolder } = useProjectModel();\n\n return useMemo(() => new ProjectFilesService(projectFolder), [projectFolder]);\n};\n","import { join } from 'node:path';\nimport type { Directory, File } from '@wix/velo-client';\nimport { outputFile, outputDir } from '@wix/cli-fs';\n\nexport class ProjectFilesService {\n constructor(private projectFolder: string) {}\n\n addDir = async (file: Directory): Promise<void> => {\n const filePath = this.getFullPath(file);\n await outputDir(filePath);\n };\n\n saveFile = async (file: File): Promise<void> => {\n const filePath = this.getFullPath(file);\n await outputFile(filePath, file.content);\n };\n\n private getFullPath = (file: File | Directory) =>\n join(this.projectFolder, file.path);\n}\n","import React from 'react';\nimport { Trans } from '@wix/cli-i18n';\n\nexport const ReadyState = () => {\n return <Trans i18nKey=\"dev_command.welcome\" />;\n};\n"],"mappings":"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","names":["import_react","import_react","import_react","React","import_react","React","React"]}
|
|
@@ -5,61 +5,65 @@ import {
|
|
|
5
5
|
debounceQueue,
|
|
6
6
|
require_chokidar,
|
|
7
7
|
useTunnel
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-O2XYQA7P.js";
|
|
9
9
|
import "./chunk-EDFOB3LN.js";
|
|
10
|
-
import {
|
|
11
|
-
agnosticTypeSyncer_default
|
|
12
|
-
} from "./chunk-UJC5ROK2.js";
|
|
13
10
|
import {
|
|
14
11
|
createSiteFsManager
|
|
15
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QEBMMR2W.js";
|
|
16
13
|
import "./chunk-E2POOOG2.js";
|
|
17
|
-
import "./chunk-OJHDGJWP.js";
|
|
18
14
|
import {
|
|
19
15
|
loadProjectRootFiles
|
|
20
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-Z4YQ7YWC.js";
|
|
17
|
+
import {
|
|
18
|
+
useProjectModel
|
|
19
|
+
} from "./chunk-P5ZYMUV4.js";
|
|
20
|
+
import {
|
|
21
|
+
agnosticTypeSyncer_default
|
|
22
|
+
} from "./chunk-NOH6CVSC.js";
|
|
23
|
+
import "./chunk-OJHDGJWP.js";
|
|
21
24
|
import {
|
|
22
25
|
useVeloClient
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-GGTW6WOZ.js";
|
|
26
|
+
} from "./chunk-UF2OSZ32.js";
|
|
27
|
+
import "./chunk-N4QBC52K.js";
|
|
26
28
|
import {
|
|
27
29
|
GridAppLayout
|
|
28
30
|
} from "./chunk-6LI4WGAW.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import
|
|
31
|
-
|
|
32
|
-
} from "./chunk-ULK2YGRA.js";
|
|
31
|
+
import "./chunk-GYIDIRSX.js";
|
|
32
|
+
import "./chunk-APJVRHWV.js";
|
|
33
|
+
import "./chunk-AII5FZC2.js";
|
|
33
34
|
import {
|
|
34
35
|
openBrowser,
|
|
35
36
|
pLimit
|
|
36
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-RVGOK65D.js";
|
|
37
38
|
import {
|
|
38
39
|
useErrorReporter
|
|
39
|
-
} from "./chunk-
|
|
40
|
-
import "./chunk-
|
|
40
|
+
} from "./chunk-QQCYRUA6.js";
|
|
41
|
+
import "./chunk-NPVP6ZBL.js";
|
|
42
|
+
import {
|
|
43
|
+
Trans
|
|
44
|
+
} from "./chunk-K4AB7LGX.js";
|
|
45
|
+
import "./chunk-GPEPI5XF.js";
|
|
41
46
|
import {
|
|
42
47
|
Alert,
|
|
43
48
|
Badge,
|
|
44
49
|
Box_default,
|
|
45
50
|
Key,
|
|
46
51
|
Spinner,
|
|
47
|
-
Trans,
|
|
48
52
|
useAsync,
|
|
49
53
|
useAsyncCallback,
|
|
50
54
|
useExit,
|
|
51
55
|
use_input_default
|
|
52
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-XBFMXGMY.js";
|
|
53
57
|
import {
|
|
54
58
|
require_react
|
|
55
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-SO6EZMEL.js";
|
|
56
60
|
import "./chunk-2K5KKUL3.js";
|
|
57
61
|
import "./chunk-YU54OBFT.js";
|
|
58
62
|
import "./chunk-XMTHMR2B.js";
|
|
59
63
|
import {
|
|
60
64
|
getSourceFolder
|
|
61
65
|
} from "./chunk-YLK75XXM.js";
|
|
62
|
-
import "./chunk-
|
|
66
|
+
import "./chunk-JHHGNLIV.js";
|
|
63
67
|
import {
|
|
64
68
|
getTestOverrides
|
|
65
69
|
} from "./chunk-GO2GZJCK.js";
|
|
@@ -67,7 +71,7 @@ import {
|
|
|
67
71
|
CliError,
|
|
68
72
|
CliErrorCode,
|
|
69
73
|
require_lib
|
|
70
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-M3K72MEX.js";
|
|
71
75
|
import {
|
|
72
76
|
__commonJS,
|
|
73
77
|
__require,
|
|
@@ -6762,4 +6766,4 @@ export {
|
|
|
6762
6766
|
sax/lib/sax.js:
|
|
6763
6767
|
(*! http://mths.be/fromcodepoint v0.1.0 by @mathias *)
|
|
6764
6768
|
*/
|
|
6765
|
-
//# sourceMappingURL=DevCommand-
|
|
6769
|
+
//# sourceMappingURL=DevCommand-NPY7LRXR.js.map
|