@wix/cli 1.1.59 → 1.1.61
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/{DevCommand-PLIPWJKO.js → DevCommand-3CEY3HPC.js} +17 -16
- package/build/{DevCommand-PLIPWJKO.js.map → DevCommand-3CEY3HPC.js.map} +1 -1
- package/build/{DevCommand-D6QHU2YA.js → DevCommand-NPVKUDPR.js} +27 -876
- package/build/DevCommand-NPVKUDPR.js.map +1 -0
- package/build/{LoginCommand-NRZ4VWWM.js → LoginCommand-RTNDZF77.js} +12 -12
- package/build/{LogoutCommand-INOYIE67.js → LogoutCommand-CUOS2BUH.js} +8 -8
- package/build/PreviewCommand-5GAG7MBS.js +471 -0
- package/build/PreviewCommand-5GAG7MBS.js.map +1 -0
- package/build/{WhoamiCommand-4V4GTNFW.js → WhoamiCommand-VZ6KKOVQ.js} +5 -5
- package/build/{chunk-F3E4MMLD.js → chunk-2KK3GKES.js} +6 -6
- package/build/{chunk-6F2RSXHN.js → chunk-2NWGTFAC.js} +3 -3
- package/build/{chunk-6F2RSXHN.js.map → chunk-2NWGTFAC.js.map} +1 -1
- package/build/{chunk-Z7P6TDPB.js → chunk-2WA6TGDO.js} +6 -6
- package/build/{chunk-HYAIYTKF.js → chunk-332V5RP4.js} +59 -7
- package/build/{chunk-HYAIYTKF.js.map → chunk-332V5RP4.js.map} +1 -1
- package/build/{chunk-SELJR2HV.js → chunk-3NEXZN7N.js} +5 -66
- package/build/chunk-3NEXZN7N.js.map +1 -0
- package/build/{chunk-JG7FKL4X.js → chunk-3UE73ERL.js} +29 -9
- package/build/chunk-3UE73ERL.js.map +1 -0
- package/build/{chunk-OOGMXJJV.js → chunk-6K6VPM3T.js} +6 -6
- package/build/chunk-6LI4WGAW.js +43 -0
- package/build/chunk-6LI4WGAW.js.map +1 -0
- package/build/chunk-6XRFJZTQ.js +74 -0
- package/build/chunk-6XRFJZTQ.js.map +1 -0
- package/build/{chunk-5ZVEBKUO.js → chunk-6YVNZGPU.js} +597 -362
- package/build/chunk-6YVNZGPU.js.map +1 -0
- package/build/{chunk-U32RURCT.js → chunk-77YDQA7O.js} +6 -6
- package/build/chunk-B5A3CFP2.js +135 -0
- package/build/chunk-B5A3CFP2.js.map +1 -0
- package/build/{chunk-IFQQVSBK.js → chunk-BGKFJNUK.js} +2 -2
- package/build/{chunk-VEVISRHN.js → chunk-DEO7G3RD.js} +5 -5
- package/build/{chunk-CS26555F.js → chunk-DP2BL2V4.js} +7 -7
- package/build/{chunk-X7XOMWAQ.js → chunk-G4NFI3XC.js} +4 -4
- package/build/{chunk-T4OH34QF.js → chunk-H6BDO22X.js} +12 -4
- package/build/{chunk-T4OH34QF.js.map → chunk-H6BDO22X.js.map} +1 -1
- package/build/{chunk-QGSHUCNV.js → chunk-HMGX4HL2.js} +49 -18
- package/build/chunk-HMGX4HL2.js.map +1 -0
- package/build/{chunk-AXVTET6V.js → chunk-HV2IEAOB.js} +2 -2
- package/build/{chunk-V4DAKO7L.js → chunk-J573TQNU.js} +577 -574
- package/build/chunk-J573TQNU.js.map +1 -0
- package/build/{chunk-4HVBZRJL.js → chunk-KOGQSQ4I.js} +2 -2
- package/build/{chunk-4OBSJ6OG.js → chunk-L53ZVQB7.js} +139 -113
- package/build/{chunk-4OBSJ6OG.js.map → chunk-L53ZVQB7.js.map} +1 -1
- package/build/{chunk-N5IXBRXL.js → chunk-M34KVUTA.js} +2 -2
- package/build/{chunk-3RBFRZE2.js → chunk-N3OHN3MH.js} +5 -5
- package/build/{chunk-3RBFRZE2.js.map → chunk-N3OHN3MH.js.map} +1 -1
- package/build/{chunk-GLXEVSFE.js → chunk-P4UAXEEN.js} +14 -132
- package/build/chunk-P4UAXEEN.js.map +1 -0
- package/build/{chunk-BV3B44QL.js → chunk-PTIE2TCP.js} +3 -3
- package/build/{chunk-BNWDAMAL.js → chunk-PX2L3CCA.js} +2 -2
- package/build/chunk-PX2L3CCA.js.map +1 -0
- package/build/chunk-Q3GS63B5.js +901 -0
- package/build/chunk-Q3GS63B5.js.map +1 -0
- package/build/{chunk-5XUFGBCU.js → chunk-SEOIN2A6.js} +7 -3
- package/build/chunk-SEOIN2A6.js.map +1 -0
- package/build/{chunk-YUFAOC35.js → chunk-V7JWKPQI.js} +8 -8
- package/build/{chunk-VRDC2KLN.js → chunk-VXGNI7CP.js} +5 -2
- package/build/{chunk-VRDC2KLN.js.map → chunk-VXGNI7CP.js.map} +1 -1
- package/build/{chunk-CMXHWKEP.js → chunk-XFEYPXEY.js} +3 -3
- package/build/{chunk-G6TDIUNY.js → chunk-Y4ZVXLXY.js} +2 -2
- package/build/{chunk-PNUERA4W.js → chunk-ZVHSVTAJ.js} +5 -5
- package/build/{dev-TEWYYBKR.js → dev-FOGJASYZ.js} +31 -30
- package/build/{dev-TEWYYBKR.js.map → dev-FOGJASYZ.js.map} +1 -1
- package/build/index.js +29 -29
- package/build/{install-MTS6LPPU.js → install-NSVJU2EB.js} +22 -21
- package/build/{install-MTS6LPPU.js.map → install-NSVJU2EB.js.map} +1 -1
- package/build/{preview-TDMPHSVV.js → preview-RQ5CLHV5.js} +24 -22
- package/build/{preview-TDMPHSVV.js.map → preview-RQ5CLHV5.js.map} +1 -1
- package/build/{publish-5VLMBE6J.js → publish-YWESFDVY.js} +30 -27
- package/build/publish-YWESFDVY.js.map +1 -0
- package/build/{render-command-7OMEGPW4.js → render-command-4GOKWOT7.js} +11 -11
- package/build/{render-command-UQPFUBIL.js → render-command-E3JPPTZA.js} +12 -12
- package/build/{render-command-FELGYBEY.js → render-command-WMEIFR3G.js} +13 -13
- package/build/{run-command-3YTQS4ZX.js → run-command-D54S2NI5.js} +9 -9
- package/build/{src-Y334LPF5.js → src-4W7XB5DS.js} +21 -9
- package/build/src-4W7XB5DS.js.map +1 -0
- package/build/{src-4W2WPIAM.js → src-HA6XHM2E.js} +8 -8
- package/build/{src-7NEL65ZK.js → src-IIEVMGC3.js} +18 -18
- package/build/{src-UWOBS6D7.js → src-NGHHXRWJ.js} +2 -2
- package/build/{src-LA3GYOE6.js → src-NS46VL23.js} +7 -7
- package/build/{src-IBLQL7AB.js → src-OIVJ4AKD.js} +6 -6
- package/build/{src-BMV74WCO.js → src-XSN6C5L2.js} +3 -3
- package/build/sync-types-SQEHJPEG.js +31 -0
- package/build/{uninstall-M4DEVSQC.js → uninstall-ASZ55QZA.js} +20 -19
- package/build/{uninstall-M4DEVSQC.js.map → uninstall-ASZ55QZA.js.map} +1 -1
- package/package.json +3 -3
- package/build/DevCommand-D6QHU2YA.js.map +0 -1
- package/build/chunk-5XUFGBCU.js.map +0 -1
- package/build/chunk-5ZVEBKUO.js.map +0 -1
- package/build/chunk-BNWDAMAL.js.map +0 -1
- package/build/chunk-GLXEVSFE.js.map +0 -1
- package/build/chunk-JG7FKL4X.js.map +0 -1
- package/build/chunk-QGSHUCNV.js.map +0 -1
- package/build/chunk-SELJR2HV.js.map +0 -1
- package/build/chunk-V4DAKO7L.js.map +0 -1
- package/build/publish-5VLMBE6J.js.map +0 -1
- package/build/src-Y334LPF5.js.map +0 -1
- package/build/sync-types-W3PVOJTK.js +0 -30
- /package/build/{LoginCommand-NRZ4VWWM.js.map → LoginCommand-RTNDZF77.js.map} +0 -0
- /package/build/{LogoutCommand-INOYIE67.js.map → LogoutCommand-CUOS2BUH.js.map} +0 -0
- /package/build/{WhoamiCommand-4V4GTNFW.js.map → WhoamiCommand-VZ6KKOVQ.js.map} +0 -0
- /package/build/{chunk-F3E4MMLD.js.map → chunk-2KK3GKES.js.map} +0 -0
- /package/build/{chunk-Z7P6TDPB.js.map → chunk-2WA6TGDO.js.map} +0 -0
- /package/build/{chunk-OOGMXJJV.js.map → chunk-6K6VPM3T.js.map} +0 -0
- /package/build/{chunk-U32RURCT.js.map → chunk-77YDQA7O.js.map} +0 -0
- /package/build/{chunk-IFQQVSBK.js.map → chunk-BGKFJNUK.js.map} +0 -0
- /package/build/{chunk-VEVISRHN.js.map → chunk-DEO7G3RD.js.map} +0 -0
- /package/build/{chunk-CS26555F.js.map → chunk-DP2BL2V4.js.map} +0 -0
- /package/build/{chunk-X7XOMWAQ.js.map → chunk-G4NFI3XC.js.map} +0 -0
- /package/build/{chunk-AXVTET6V.js.map → chunk-HV2IEAOB.js.map} +0 -0
- /package/build/{chunk-4HVBZRJL.js.map → chunk-KOGQSQ4I.js.map} +0 -0
- /package/build/{chunk-N5IXBRXL.js.map → chunk-M34KVUTA.js.map} +0 -0
- /package/build/{chunk-BV3B44QL.js.map → chunk-PTIE2TCP.js.map} +0 -0
- /package/build/{chunk-YUFAOC35.js.map → chunk-V7JWKPQI.js.map} +0 -0
- /package/build/{chunk-CMXHWKEP.js.map → chunk-XFEYPXEY.js.map} +0 -0
- /package/build/{chunk-G6TDIUNY.js.map → chunk-Y4ZVXLXY.js.map} +0 -0
- /package/build/{chunk-PNUERA4W.js.map → chunk-ZVHSVTAJ.js.map} +0 -0
- /package/build/{render-command-7OMEGPW4.js.map → render-command-4GOKWOT7.js.map} +0 -0
- /package/build/{render-command-UQPFUBIL.js.map → render-command-E3JPPTZA.js.map} +0 -0
- /package/build/{render-command-FELGYBEY.js.map → render-command-WMEIFR3G.js.map} +0 -0
- /package/build/{run-command-3YTQS4ZX.js.map → run-command-D54S2NI5.js.map} +0 -0
- /package/build/{src-4W2WPIAM.js.map → src-HA6XHM2E.js.map} +0 -0
- /package/build/{src-7NEL65ZK.js.map → src-IIEVMGC3.js.map} +0 -0
- /package/build/{src-BMV74WCO.js.map → src-NGHHXRWJ.js.map} +0 -0
- /package/build/{src-LA3GYOE6.js.map → src-NS46VL23.js.map} +0 -0
- /package/build/{src-IBLQL7AB.js.map → src-OIVJ4AKD.js.map} +0 -0
- /package/build/{src-UWOBS6D7.js.map → src-XSN6C5L2.js.map} +0 -0
- /package/build/{sync-types-W3PVOJTK.js.map → sync-types-SQEHJPEG.js.map} +0 -0
|
@@ -1,48 +1,49 @@
|
|
|
1
1
|
import { createRequire as _createRequire } from 'node:module';
|
|
2
2
|
const require = _createRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
useVeloClient
|
|
5
|
-
} from "./chunk-QGSHUCNV.js";
|
|
6
|
-
import "./chunk-N5IXBRXL.js";
|
|
7
|
-
import "./chunk-4HVBZRJL.js";
|
|
8
3
|
import {
|
|
9
4
|
syncLatestTypes
|
|
10
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-L53ZVQB7.js";
|
|
11
6
|
import "./chunk-OJHDGJWP.js";
|
|
7
|
+
import {
|
|
8
|
+
useVeloClient
|
|
9
|
+
} from "./chunk-HMGX4HL2.js";
|
|
10
|
+
import "./chunk-M34KVUTA.js";
|
|
11
|
+
import "./chunk-6LI4WGAW.js";
|
|
12
|
+
import "./chunk-KOGQSQ4I.js";
|
|
12
13
|
import "./chunk-YXFEXGAH.js";
|
|
13
14
|
import {
|
|
14
15
|
useProjectModel
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6K6VPM3T.js";
|
|
16
17
|
import {
|
|
17
18
|
pRetry,
|
|
18
19
|
useAuth
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-77YDQA7O.js";
|
|
21
|
+
import "./chunk-332V5RP4.js";
|
|
21
22
|
import {
|
|
22
23
|
Spinner,
|
|
23
24
|
Trans,
|
|
24
25
|
require_react,
|
|
25
26
|
useAsync,
|
|
26
27
|
useTranslation
|
|
27
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-J573TQNU.js";
|
|
28
29
|
import "./chunk-WN3D6AOY.js";
|
|
29
30
|
import "./chunk-W423UTD3.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-2NWGTFAC.js";
|
|
31
32
|
import "./chunk-YU54OBFT.js";
|
|
32
33
|
import "./chunk-XMTHMR2B.js";
|
|
33
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-SEOIN2A6.js";
|
|
34
35
|
import {
|
|
35
36
|
outputDir,
|
|
36
37
|
outputFile
|
|
37
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-3UE73ERL.js";
|
|
38
39
|
import {
|
|
39
40
|
getTestOverrides
|
|
40
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-PX2L3CCA.js";
|
|
41
42
|
import {
|
|
42
43
|
CliError,
|
|
43
44
|
CliErrorCode,
|
|
44
45
|
require_lib
|
|
45
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-H6BDO22X.js";
|
|
46
47
|
import {
|
|
47
48
|
__toESM,
|
|
48
49
|
init_esm_shims
|
|
@@ -168,4 +169,4 @@ var DevCommand = () => {
|
|
|
168
169
|
export {
|
|
169
170
|
DevCommand
|
|
170
171
|
};
|
|
171
|
-
//# sourceMappingURL=DevCommand-
|
|
172
|
+
//# sourceMappingURL=DevCommand-3CEY3HPC.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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,IAAAA,gBAAkB;;;ACAlB;AACA,IAAAC,gBAAkB;AAClB,qBAAsB;;;ACFtB;AACA,mBAAwB;;;ACDxB;AAMO,IAAM,sBAAN,MAA0B;AAAA,EAG/B,YACU,eACA,UACR;AAFQ;AACA;AAER,UAAM,EAAE,gBAAgB,IAAI,iBAAiB;AAE7C,SAAK,eAAe;AAAA,MAClB,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,YAAY,IAAI;AAAA,IAClB;AAAA,EACF;AAAA,EAbiB;AAAA,EAejB,kBAAkB,YAAY;AAC5B,UAAM,QAAQ,MAAM,KAAK,SAAS;AAElC,QAAI;AACF,YAAM;AAAA,QACJ,MACE,gBAAgB,KAAK,eAAe;AAAA,UAClC,aAAa,MAAM;AAAA,QACrB,CAAC;AAAA,QACH,KAAK;AAAA,MACP;AAAA,IACF,SAAS,GAAG;AACV,YAAM,IAAI,SAAS;AAAA,QACjB,MAAM,aAAa,uBAAuB;AAAA,QAC1C,OAAO;AAAA,MACT,CAAC;AAAA,IACH;AAAA,EACF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