lucy-cli 2.0.0-alpha.2 → 2.0.0-alpha.20
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/.yarnrc.yml +0 -1
- package/dist/Gulpfile.d.ts +35 -0
- package/dist/Gulpfile.js +132 -0
- package/dist/Gulpfile.js.map +1 -0
- package/dist/args.d.ts +1 -6
- package/dist/args.js +62 -7
- package/dist/args.js.map +1 -0
- package/dist/commands/checks.d.ts +7 -0
- package/dist/commands/checks.js +47 -0
- package/dist/commands/checks.js.map +1 -0
- package/dist/commands/cleanup copy.d.ts +4 -0
- package/dist/commands/cleanup copy.js +10 -0
- package/dist/commands/cleanup copy.js.map +1 -0
- package/dist/commands/cleanup.d.ts +4 -0
- package/dist/commands/cleanup.js +10 -0
- package/dist/commands/cleanup.js.map +1 -0
- package/dist/commands/copy.d.ts +6 -0
- package/dist/commands/copy.js +20 -0
- package/dist/commands/copy.js.map +1 -0
- package/dist/commands/edit.d.ts +10 -0
- package/dist/commands/edit.js +69 -0
- package/dist/commands/edit.js.map +1 -0
- package/dist/commands/exec copy.d.ts +3 -0
- package/dist/commands/exec copy.js +20 -0
- package/dist/commands/exec copy.js.map +1 -0
- package/dist/commands/exec.d.ts +5 -0
- package/dist/commands/exec.js +40 -0
- package/dist/commands/exec.js.map +1 -0
- package/dist/commands/files.d.ts +7 -0
- package/dist/commands/files.js +28 -0
- package/dist/commands/files.js.map +1 -0
- package/dist/commands/git.d.ts +8 -0
- package/dist/commands/git.js +104 -0
- package/dist/commands/git.js.map +1 -0
- package/dist/commands/home.d.ts +4 -0
- package/dist/commands/home.js +18 -0
- package/dist/commands/home.js.map +1 -0
- package/dist/commands/install.d.ts +8 -0
- package/dist/commands/install.js +110 -0
- package/dist/commands/install.js.map +1 -0
- package/dist/commands/read.d.ts +6 -0
- package/dist/commands/read.js +41 -0
- package/dist/commands/read.js.map +1 -0
- package/dist/commands/write.d.ts +7 -0
- package/dist/commands/write.js +28 -0
- package/dist/commands/write.js.map +1 -0
- package/dist/commands.js +1 -0
- package/dist/commands.js.map +1 -0
- package/dist/config.d.ts +30 -7
- package/dist/config.js +89 -26
- package/dist/config.js.map +1 -0
- package/dist/error.d.ts +1 -9
- package/dist/error.js +1 -2
- package/dist/error.js.map +1 -0
- package/dist/gulp/backend.d.ts +3 -0
- package/dist/gulp/backend.js +92 -0
- package/dist/gulp/backend.js.map +1 -0
- package/dist/gulp/checks.d.ts +3 -0
- package/dist/gulp/checks.js +194 -0
- package/dist/gulp/checks.js.map +1 -0
- package/dist/gulp/clean.d.ts +3 -0
- package/dist/gulp/clean.js +33 -0
- package/dist/gulp/clean.js.map +1 -0
- package/dist/gulp/copy.d.ts +2 -0
- package/dist/gulp/copy.js +34 -0
- package/dist/gulp/copy.js.map +1 -0
- package/dist/gulp/helpers.d.ts +2 -0
- package/dist/gulp/helpers.js +21 -0
- package/dist/gulp/helpers.js.map +1 -0
- package/dist/gulp/pages.d.ts +2 -0
- package/dist/gulp/pages.js +39 -0
- package/dist/gulp/pages.js.map +1 -0
- package/dist/gulp/pipeline.d.ts +1 -0
- package/dist/gulp/pipeline.js +29 -0
- package/dist/gulp/pipeline.js.map +1 -0
- package/dist/gulp/public.d.ts +2 -0
- package/dist/gulp/public.js +50 -0
- package/dist/gulp/public.js.map +1 -0
- package/dist/gulp/styles.d.ts +2 -0
- package/dist/gulp/styles.js +40 -0
- package/dist/gulp/styles.js.map +1 -0
- package/dist/gulp/templates.d.ts +2 -0
- package/dist/gulp/templates.js +33 -0
- package/dist/gulp/templates.js.map +1 -0
- package/dist/gulp/types.d.ts +4 -0
- package/dist/gulp/types.js +289 -0
- package/dist/gulp/types.js.map +1 -0
- package/dist/gulp/watchers.d.ts +9 -0
- package/dist/gulp/watchers.js +57 -0
- package/dist/gulp/watchers.js.map +1 -0
- package/dist/helpers.d.ts +9 -0
- package/dist/helpers.js +83 -0
- package/dist/helpers.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +78 -9
- package/dist/index.js.map +1 -0
- package/dist/init/blocks.d.ts +5 -0
- package/dist/init/blocks.js +60 -0
- package/dist/init/blocks.js.map +1 -0
- package/dist/init/cargo copy.d.ts +2 -0
- package/dist/init/cargo copy.js +16 -0
- package/dist/init/cargo copy.js.map +1 -0
- package/dist/init/cargo.d.ts +2 -0
- package/dist/init/cargo.js +19 -0
- package/dist/init/cargo.js.map +1 -0
- package/dist/init/expo copy.d.ts +5 -0
- package/dist/init/expo copy.js +48 -0
- package/dist/init/expo copy.js.map +1 -0
- package/dist/init/expo.d.ts +5 -0
- package/dist/init/expo.js +50 -0
- package/dist/init/expo.js.map +1 -0
- package/dist/init/gitModules.d.ts +2 -0
- package/dist/init/gitModules.js +13 -0
- package/dist/init/gitModules.js.map +1 -0
- package/dist/init/index.d.ts +4 -0
- package/dist/init/index.js +62 -0
- package/dist/init/index.js.map +1 -0
- package/dist/init/lucy.d.ts +1 -0
- package/dist/init/lucy.js +2 -0
- package/dist/init/monorepo copy.d.ts +4 -0
- package/dist/init/monorepo copy.js +28 -0
- package/dist/init/monorepo copy.js.map +1 -0
- package/dist/init/monorepo.d.ts +4 -0
- package/dist/init/monorepo.js +35 -0
- package/dist/init/monorepo.js.map +1 -0
- package/dist/init/prepare.d.ts +8 -0
- package/dist/init/prepare.js +20 -0
- package/dist/init/prepare.js.map +1 -0
- package/dist/init/prepareVelo.d.ts +2 -0
- package/dist/init/prepareVelo.js +16 -0
- package/dist/init/prepareVelo.js.map +1 -0
- package/dist/init/sync.d.ts +2 -0
- package/dist/init/sync.js +88 -0
- package/dist/init/sync.js.map +1 -0
- package/dist/init/tauri.d.ts +5 -0
- package/dist/init/tauri.js +29 -0
- package/dist/init/tauri.js.map +1 -0
- package/dist/init/templates.d.ts +5 -0
- package/dist/init/templates.js +93 -0
- package/dist/init/templates.js.map +1 -0
- package/dist/init/velo.d.ts +5 -0
- package/dist/init/velo.js +58 -0
- package/dist/init/velo.js.map +1 -0
- package/dist/init/write.d.ts +5 -0
- package/dist/init/write.js +15 -0
- package/dist/init.js +44 -18
- package/dist/models.js +1 -0
- package/dist/models.js.map +1 -0
- package/dist/policy.js +1 -0
- package/dist/policy.js.map +1 -0
- package/dist/prepare.js +1 -0
- package/dist/prepare.js.map +1 -0
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +1 -0
- package/dist/runtime.js.map +1 -0
- package/dist/schemas/gulp.d.ts +25 -0
- package/dist/schemas/gulp.js +8 -0
- package/dist/schemas/gulp.js.map +1 -0
- package/dist/schemas/index.d.ts +10 -0
- package/dist/schemas/index.js +9 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/lucy.d.ts +26 -0
- package/dist/schemas/lucy.js +39 -0
- package/dist/schemas/lucy.js.map +1 -0
- package/dist/schemas/models.d.ts +37 -0
- package/dist/schemas/models.js +2 -0
- package/dist/schemas/models.js.map +1 -0
- package/dist/schemas/tsconfig.d.ts +37 -0
- package/dist/schemas/tsconfig.js +2 -0
- package/dist/schemas/tsconfig.js.map +1 -0
- package/dist/schemas/types.d.ts +33 -0
- package/dist/schemas/types.js +5 -1
- package/dist/schemas/types.js.map +1 -0
- package/dist/states.js +1 -0
- package/dist/states.js.map +1 -0
- package/dist/sync/index.js +2 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/sync.d.ts +3 -0
- package/dist/sync/sync.js +92 -0
- package/dist/sync/sync.js.map +1 -0
- package/dist/tasks/Gulpfile.d.ts +4 -0
- package/dist/tasks/Gulpfile.js +111 -0
- package/dist/tasks/Gulpfile.js.map +1 -0
- package/dist/tasks/gitModules.d.ts +2 -0
- package/dist/tasks/gitModules.js +13 -0
- package/dist/tasks/gitModules.js.map +1 -0
- package/dist/tasks/gulp/backend.d.ts +4 -0
- package/dist/tasks/gulp/backend.js +92 -0
- package/dist/tasks/gulp/backend.js.map +1 -0
- package/dist/tasks/gulp/checks.d.ts +4 -0
- package/dist/tasks/gulp/checks.js +202 -0
- package/dist/tasks/gulp/checks.js.map +1 -0
- package/dist/tasks/gulp/clean.d.ts +3 -0
- package/dist/tasks/gulp/clean.js +33 -0
- package/dist/tasks/gulp/clean.js.map +1 -0
- package/dist/tasks/gulp/copy.d.ts +3 -0
- package/dist/tasks/gulp/copy.js +34 -0
- package/dist/tasks/gulp/copy.js.map +1 -0
- package/dist/tasks/gulp/helpers.d.ts +3 -0
- package/dist/tasks/gulp/helpers.js +19 -0
- package/dist/tasks/gulp/helpers.js.map +1 -0
- package/dist/tasks/gulp/pages.d.ts +2 -0
- package/dist/tasks/gulp/pages.js +39 -0
- package/dist/tasks/gulp/pages.js.map +1 -0
- package/dist/tasks/gulp/pipeline.d.ts +1 -0
- package/dist/tasks/gulp/pipeline.js +29 -0
- package/dist/tasks/gulp/pipeline.js.map +1 -0
- package/dist/tasks/gulp/public.d.ts +3 -0
- package/dist/tasks/gulp/public.js +50 -0
- package/dist/tasks/gulp/public.js.map +1 -0
- package/dist/tasks/gulp/styles.d.ts +3 -0
- package/dist/tasks/gulp/styles.js +40 -0
- package/dist/tasks/gulp/styles.js.map +1 -0
- package/dist/tasks/gulp/templates.d.ts +2 -0
- package/dist/tasks/gulp/templates.js +45 -0
- package/dist/tasks/gulp/templates.js.map +1 -0
- package/dist/tasks/gulp/types.d.ts +4 -0
- package/dist/tasks/gulp/types.js +293 -0
- package/dist/tasks/gulp/types.js.map +1 -0
- package/dist/tasks/gulp/watchers.d.ts +3 -0
- package/dist/tasks/gulp/watchers.js +59 -0
- package/dist/tasks/gulp/watchers.js.map +1 -0
- package/dist/tasks/index.d.ts +4 -0
- package/dist/tasks/index.js +23 -0
- package/dist/tasks/index.js.map +1 -0
- package/dist/tasks/sync.d.ts +2 -0
- package/dist/tasks/sync.js +88 -0
- package/dist/tasks/sync.js.map +1 -0
- package/dist/tasks/syncPkg.d.ts +3 -0
- package/dist/tasks/syncPkg.js +13 -0
- package/dist/tasks/syncPkg.js.map +1 -0
- package/dist/tasks/syncSettings.d.ts +3 -0
- package/dist/tasks/syncSettings.js +18 -0
- package/dist/tasks/syncSettings.js.map +1 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/install.js +1 -0
- package/dist/utils/logger.d.ts +17 -0
- package/dist/utils/logger.js +37 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/wix-sdk/check.d.ts +4 -0
- package/dist/wix-sdk/check.js +23 -0
- package/dist/wix-sdk/check.js.map +1 -0
- package/dist/wix-sdk/client.d.ts +10 -0
- package/dist/wix-sdk/client.js +18 -0
- package/dist/wix-sdk/client.js.map +1 -0
- package/dist/wix-sdk/import.d.ts +1 -0
- package/dist/wix-sdk/import.js +88 -0
- package/dist/wix-sdk/import.js.map +1 -0
- package/dist/wix-sdk/index.d.ts +4 -0
- package/dist/wix-sdk/index.js +15 -0
- package/dist/wix-sdk/index.js.map +1 -0
- package/dist/wix-sdk/init copy.d.ts +4 -0
- package/dist/wix-sdk/init copy.js +51 -0
- package/dist/wix-sdk/init copy.js.map +1 -0
- package/dist/wix-sdk/init.d.ts +4 -0
- package/dist/wix-sdk/init.js +51 -0
- package/dist/wix-sdk/init.js.map +1 -0
- package/dist/wix-sdk/is-allive.d.ts +4 -0
- package/dist/wix-sdk/is-allive.js +37 -0
- package/dist/wix-sdk/is-allive.js.map +1 -0
- package/dist/wix-sdk/run.d.ts +4 -0
- package/dist/wix-sdk/run.js +53 -0
- package/dist/wix-sdk/run.js.map +1 -0
- package/dist/wix-sdk/sync copy.d.ts +1 -0
- package/dist/wix-sdk/sync copy.js +88 -0
- package/dist/wix-sdk/sync copy.js.map +1 -0
- package/dist/wix-sdk/sync.d.ts +1 -0
- package/dist/wix-sdk/sync.js +88 -0
- package/dist/wix-sdk/sync.js.map +1 -0
- package/dist/wix-sdk/wix_sdk_check.d.ts +4 -0
- package/dist/wix-sdk/wix_sdk_check.js +37 -0
- package/dist/wix-sdk/wix_sdk_check.js.map +1 -0
- package/dist/wix-sync/client.d.ts +3 -0
- package/dist/wix-sync/client.js +5 -0
- package/dist/wix-sync/client.js.map +1 -0
- package/dist/wix-sync/export copy.d.ts +4 -0
- package/dist/wix-sync/export copy.js +21 -0
- package/dist/wix-sync/export copy.js.map +1 -0
- package/dist/wix-sync/export.d.ts +4 -0
- package/dist/wix-sync/export.js +15 -0
- package/dist/wix-sync/export.js.map +1 -0
- package/dist/wix-sync/import copy.d.ts +4 -0
- package/dist/wix-sync/import copy.js +21 -0
- package/dist/wix-sync/import copy.js.map +1 -0
- package/dist/wix-sync/import.d.ts +4 -0
- package/dist/wix-sync/import.js +26 -0
- package/dist/wix-sync/import.js.map +1 -0
- package/dist/wix-sync/index.d.ts +4 -0
- package/dist/wix-sync/index.js +35 -0
- package/dist/wix-sync/index.js.map +1 -0
- package/dist/wix-sync/init copy.d.ts +4 -0
- package/dist/wix-sync/init copy.js +54 -0
- package/dist/wix-sync/init copy.js.map +1 -0
- package/dist/wix-sync/init.d.ts +4 -0
- package/dist/wix-sync/init.js +74 -0
- package/dist/wix-sync/init.js.map +1 -0
- package/dist/wix-sync/is-alive.d.ts +4 -0
- package/dist/wix-sync/is-alive.js +23 -0
- package/dist/wix-sync/is-alive.js.map +1 -0
- package/dist/wix-sync/is-allive copy.d.ts +4 -0
- package/dist/wix-sync/is-allive copy.js +23 -0
- package/dist/wix-sync/is-allive copy.js.map +1 -0
- package/dist/wix-sync/is-allive.d.ts +4 -0
- package/dist/wix-sync/is-allive.js +23 -0
- package/dist/wix-sync/is-allive.js.map +1 -0
- package/dist/wix-sync/migrate.d.ts +4 -0
- package/dist/wix-sync/migrate.js +21 -0
- package/dist/wix-sync/migrate.js.map +1 -0
- package/dist/wix-sync/sync-od.js +100 -0
- package/dist/wix-sync/sync-od.js.map +1 -0
- package/dist/wix-sync/sync.d.ts +4 -0
- package/dist/wix-sync/sync.js +26 -0
- package/dist/wix-sync/sync.js.map +1 -0
- package/dist/wix-sync/sync2.d.ts +4 -0
- package/dist/wix-sync/sync2.js +25 -0
- package/dist/wix-sync/sync2.js.map +1 -0
- package/dist/wix-sync copy/index.d.ts +4 -0
- package/dist/wix-sync copy/index.js +17 -0
- package/dist/wix-sync copy/index.js.map +1 -0
- package/dist/wix-sync copy/init.d.ts +4 -0
- package/dist/wix-sync copy/init.js +58 -0
- package/dist/wix-sync copy/init.js.map +1 -0
- package/dist/wix-sync copy/is-allive.d.ts +4 -0
- package/dist/wix-sync copy/is-allive.js +36 -0
- package/dist/wix-sync copy/is-allive.js.map +1 -0
- package/dist/wix-sync copy/sync.d.ts +1 -0
- package/dist/wix-sync copy/sync.js +88 -0
- package/dist/wix-sync copy/sync.js.map +1 -0
- package/files/sync-data/data/test.csv +17 -0
- package/files/sync-data/files/lucy.jpg +0 -0
- package/files/sync-data/schema/test.json +11 -0
- package/files/templates/block[D]/files/.stylelintrc.js +8 -0
- package/files/templates/block[D]/lucy.json +8 -0
- package/files/templates/cargo[D]/files/.env +1 -0
- package/files/templates/cargo[D]/files/Cargo.toml +238 -0
- package/files/templates/cargo[D]/files/Makefile.toml +4 -0
- package/files/templates/cargo[D]/files/build/main.rs +35 -0
- package/files/templates/cargo[D]/files/config/beta.json +19 -0
- package/files/templates/cargo[D]/files/config/ci.json +15 -0
- package/files/templates/cargo[D]/files/config/default.json +71 -0
- package/files/templates/cargo[D]/files/config/development.json +10 -0
- package/files/templates/cargo[D]/files/config/produktion.json +5 -0
- package/files/templates/cargo[D]/files/config/stage.json +4 -0
- package/files/templates/cargo[D]/files/locales/todo.yml +3 -0
- package/files/templates/cargo[D]/files/public/index.html +1 -0
- package/files/templates/cargo[D]/lucy.json +14 -0
- package/files/templates/expo[D]/files/.prettierrc.js +16 -0
- package/files/templates/expo[D]/files/.stylelintrc.js +8 -0
- package/files/templates/expo[D]/files/.yarnrc.yml +3 -0
- package/files/templates/expo[D]/files/assets/fonts/SpaceMono-Regular.ttf +0 -0
- package/files/templates/expo[D]/files/assets/images/adaptive-icon.png +0 -0
- package/files/templates/expo[D]/files/assets/images/favicon.png +0 -0
- package/files/templates/expo[D]/files/assets/images/icon.png +0 -0
- package/files/templates/expo[D]/files/assets/images/splash-icon.png +0 -0
- package/files/templates/expo[D]/files/babel.config.js +10 -0
- package/files/templates/expo[D]/files/constants/theme.ts +18 -0
- package/files/{expo → templates/expo[D]/files}/eas.json +9 -3
- package/files/{expo/eslint.config.js → templates/expo[D]/files/eslint.config.mjs} +15 -19
- package/files/templates/expo[D]/files/hooks/useColorScheme.ts +17 -0
- package/files/templates/expo[D]/files/index.ts +11 -0
- package/files/templates/expo[D]/files/lib/data.ts +48 -0
- package/files/templates/expo[D]/files/lib/utils/index.ts +11 -0
- package/files/{expo → templates/expo[D]/files}/lib/utils/polyfills.ts +1 -1
- package/files/{expo → templates/expo[D]/files}/lib/wix/client.ts +3 -5
- package/files/templates/expo[D]/files/lib/wix/error.ts +3 -0
- package/files/templates/expo[D]/files/lib/wix/index.ts +2 -0
- package/files/templates/expo[D]/files/metro.config.js +57 -0
- package/files/templates/expo[D]/files/scripts/reset-project.ts +116 -0
- package/files/templates/expo[D]/files/tailwind.config.js +63 -0
- package/files/templates/expo[D]/files/tsconfig.json +46 -0
- package/files/templates/expo[D]/lucy.json +81 -0
- package/files/templates/monorepo[D]/files/.nvmrc +1 -0
- package/files/templates/monorepo[D]/files/.prettierignore +23 -0
- package/files/{expo → templates/monorepo[D]/files}/.prettierrc.json +0 -1
- package/files/templates/monorepo[D]/files/.stylelintrc.js +8 -0
- package/files/templates/monorepo[D]/files/.yarnrc +1 -0
- package/files/templates/monorepo[D]/files/README.md +137 -0
- package/files/templates/monorepo[D]/files/currents.config.ts +5 -0
- package/files/templates/monorepo[D]/files/package.json +39 -0
- package/files/templates/monorepo[D]/files/turbo.json +34 -0
- package/files/templates/monorepo[D]/files/typedoc.json +25 -0
- package/files/templates/monorepo[D]/files/vitest.config.ts +27 -0
- package/files/templates/monorepo[D]/lucy.json +45 -0
- package/files/templates/tauri[D]/lucy.json +8 -0
- package/files/templates/velo[D]/files/.prettierignore +23 -0
- package/files/templates/velo[D]/files/.prettierrc.js +16 -0
- package/files/templates/velo[D]/files/typescript/public/.gitkeep +0 -0
- package/files/templates/velo[D]/files/typescript/public/scss/app.scss +0 -0
- package/files/templates/velo[D]/files/typescript/styles/.gitkeep +0 -0
- package/files/templates/velo[D]/files/typescript/styles/global.scss +0 -0
- package/files/templates/velo[D]/lucy.json +136 -0
- package/old/Gulpfile.d.ts +34 -0
- package/old/Gulpfile.js +116 -0
- package/old/Gulpfile.js.map +1 -0
- package/old/gulp/backend.d.ts +3 -0
- package/old/gulp/backend.js +92 -0
- package/old/gulp/backend.js.map +1 -0
- package/old/gulp/checks.d.ts +3 -0
- package/old/gulp/checks.js +205 -0
- package/old/gulp/checks.js.map +1 -0
- package/old/gulp/clean.d.ts +3 -0
- package/old/gulp/clean.js +29 -0
- package/old/gulp/clean.js.map +1 -0
- package/old/gulp/copy.d.ts +2 -0
- package/old/gulp/copy.js +34 -0
- package/old/gulp/copy.js.map +1 -0
- package/old/gulp/helpers.d.ts +2 -0
- package/old/gulp/helpers.js +25 -0
- package/old/gulp/helpers.js.map +1 -0
- package/old/gulp/pages.d.ts +2 -0
- package/old/gulp/pages.js +37 -0
- package/old/gulp/pages.js.map +1 -0
- package/old/gulp/pipeline.d.ts +1 -0
- package/old/gulp/pipeline.js +29 -0
- package/old/gulp/pipeline.js.map +1 -0
- package/old/gulp/public.d.ts +2 -0
- package/old/gulp/public.js +50 -0
- package/old/gulp/public.js.map +1 -0
- package/old/gulp/styles.d.ts +2 -0
- package/old/gulp/styles.js +40 -0
- package/old/gulp/styles.js.map +1 -0
- package/old/gulp/templates.d.ts +2 -0
- package/old/gulp/templates.js +33 -0
- package/old/gulp/templates.js.map +1 -0
- package/old/gulp/types.d.ts +4 -0
- package/old/gulp/types.js +289 -0
- package/old/gulp/types.js.map +1 -0
- package/old/gulp/watchers.d.ts +9 -0
- package/old/gulp/watchers.js +59 -0
- package/old/gulp/watchers.js.map +1 -0
- package/old/helpers.d.ts +32 -0
- package/old/helpers.js +267 -0
- package/old/helpers.js.map +1 -0
- package/{src copy/helpers.ts → old/helpers.ts} +1 -1
- package/old/index.d.ts +59 -0
- package/old/index.js +288 -0
- package/old/index.js.map +1 -0
- package/old/init.d.ts +8 -0
- package/old/init.js +165 -0
- package/old/init.js.map +1 -0
- package/old/models.d.ts +37 -0
- package/old/models.js +2 -0
- package/old/models.js.map +1 -0
- package/old/prepare.d.ts +8 -0
- package/old/prepare.js +20 -0
- package/old/prepare.js.map +1 -0
- package/old/schemas/index.d.ts +0 -0
- package/old/schemas/index.js +2 -0
- package/old/schemas/index.js.map +1 -0
- package/old/schemas/index.ts +0 -0
- package/old/schemas/types.d.ts +0 -0
- package/old/schemas/types.js +2 -0
- package/old/schemas/types.js.map +1 -0
- package/old/schemas/types.ts +0 -0
- package/old/sync.d.ts +2 -0
- package/old/sync.js +88 -0
- package/old/sync.js.map +1 -0
- package/package.json +17 -17
- package/patches/velo-sync+0.0.9.patch +13 -0
- package/src/args.ts +61 -17
- package/src/commands/checks.ts +51 -0
- package/src/commands/cleanup.ts +11 -0
- package/src/commands/copy.ts +28 -0
- package/src/commands/edit.ts +83 -0
- package/src/commands/exec.ts +37 -0
- package/src/commands/git.ts +113 -0
- package/src/commands/home.ts +22 -0
- package/src/commands/install.ts +186 -0
- package/src/commands/read.ts +46 -0
- package/src/commands/write.ts +45 -0
- package/src/config.ts +116 -35
- package/src/error.ts +1 -2
- package/src/helpers.ts +92 -0
- package/src/index.ts +89 -13
- package/src/init/blocks.ts +82 -0
- package/src/init/cargo.ts +22 -0
- package/src/init/expo.ts +66 -0
- package/src/init/gitModules.ts +15 -0
- package/src/init/index.ts +63 -0
- package/src/init/monorepo.ts +39 -0
- package/src/init/prepareVelo.ts +19 -0
- package/src/init/tauri.ts +40 -0
- package/src/init/templates.ts +98 -0
- package/src/init/velo.ts +62 -0
- package/src/runtime.ts +1 -0
- package/src/schemas/gulp.ts +31 -0
- package/src/schemas/index.ts +13 -1
- package/src/schemas/lucy.ts +40 -0
- package/src/schemas/types.ts +40 -0
- package/src/tasks/Gulpfile.ts +207 -0
- package/src/tasks/gulp/backend.ts +113 -0
- package/src/tasks/gulp/checks.ts +218 -0
- package/src/tasks/gulp/clean.ts +38 -0
- package/src/tasks/gulp/copy.ts +38 -0
- package/src/tasks/gulp/helpers.ts +18 -0
- package/src/tasks/gulp/pages.ts +43 -0
- package/src/tasks/gulp/pipeline.ts +31 -0
- package/src/tasks/gulp/public.ts +61 -0
- package/src/tasks/gulp/styles.ts +47 -0
- package/src/tasks/gulp/templates.ts +53 -0
- package/src/tasks/gulp/types.ts +310 -0
- package/src/tasks/gulp/watchers.ts +97 -0
- package/src/tasks/index.ts +24 -0
- package/src/tasks/syncSettings.ts +21 -0
- package/src/types.d.ts +1 -1
- package/src/utils/index.ts +0 -0
- package/src/utils/logger.ts +40 -0
- package/src/wix-sdk/check.ts +24 -0
- package/src/wix-sdk/client.ts +18 -0
- package/src/wix-sdk/index.ts +17 -0
- package/src/wix-sdk/init.ts +54 -0
- package/src/wix-sdk/run.ts +56 -0
- package/src/wix-sync/client.ts +6 -0
- package/src/wix-sync/export.ts +19 -0
- package/src/wix-sync/import.ts +27 -0
- package/src/wix-sync/index.ts +36 -0
- package/src/wix-sync/init.ts +77 -0
- package/src/wix-sync/is-alive.ts +25 -0
- package/src/wix-sync/migrate.ts +23 -0
- package/src/wix-sync/sync.ts +27 -0
- package/tsconfig.json +6 -5
- package/files/expo/.env +0 -1
- package/files/expo/app/(tabs)/_layout.tsx +0 -45
- package/files/expo/app/_layout.tsx +0 -45
- package/files/expo/babel.config.js +0 -9
- package/files/expo/constants/Colors.ts +0 -27
- package/files/expo/constants/theme.ts +0 -18
- package/files/expo/hooks/useColorScheme.ts +0 -11
- package/files/expo/hooks/useColorScheme.web.ts +0 -21
- package/files/expo/hooks/useColorSchemeRN.ts +0 -1
- package/files/expo/hooks/useThemeColor.ts +0 -21
- package/files/expo/lib/data.ts +0 -45
- package/files/expo/lib/utils/index.ts +0 -6
- package/files/expo/lib/wix/index.ts +0 -1
- package/files/expo/lucy.json +0 -8
- package/files/expo/tailwind.config.js +0 -198
- package/files/expo/tsconfig.json +0 -40
- package/src/init.ts +0 -352
- /package/{files/velo/.gitmodules → dist/sync/index.d.ts} +0 -0
- /package/{files/velo/typescript/__mocks__/.gitkeep → dist/utils/index.d.ts} +0 -0
- /package/{files/velo/typescript/backend/data.ts → dist/utils/install.d.ts} +0 -0
- /package/{files/velo/typescript/backend/events.ts → dist/wix-sync/sync-od.d.ts} +0 -0
- /package/files/{expo → templates/expo[D]/files}/.nvmrc +0 -0
- /package/files/{expo → templates/expo[D]/files}/.prettierignore +0 -0
- /package/files/{expo → templates/expo[D]/files}/.yarnrc +0 -0
- /package/files/{expo/readme.md → templates/expo[D]/files/README.md} +0 -0
- /package/files/{velo/typescript/pages → templates/expo[D]/files/components}/.gitkeep +0 -0
- /package/files/{velo/typescript/public → templates/expo[D]/files/components/ui}/.gitkeep +0 -0
- /package/files/{expo → templates/expo[D]/files}/global.css +0 -0
- /package/files/{expo/types → templates/expo[D]/files}/nativewind-env.d.ts +0 -0
- /package/files/{expo → templates/expo[D]/files}/types/reset.d.ts +0 -0
- /package/files/{expo → templates/monorepo[D]/files}/.yarnrc.yml +0 -0
- /package/files/{velo/typescript/public/scss/app.scss → templates/velo[D]/files/.gitmodules} +0 -0
- /package/files/{velo → templates/velo[D]/files}/.madgerc +0 -0
- /package/files/{velo → templates/velo[D]/files}/.nvmrc +0 -0
- /package/files/{velo → templates/velo[D]/files}/.stylelintrc.js +0 -0
- /package/files/{velo → templates/velo[D]/files}/.yarnrc.yml +0 -0
- /package/files/{velo → templates/velo[D]/files}/currents.config.js +0 -0
- /package/files/{velo → templates/velo[D]/files}/cypress/e2e/base/base.cy.ts +0 -0
- /package/files/{velo → templates/velo[D]/files}/cypress/fixtures/example.json +0 -0
- /package/files/{velo → templates/velo[D]/files}/cypress/support/commands.ts +0 -0
- /package/files/{velo → templates/velo[D]/files}/cypress/support/e2e.ts +0 -0
- /package/files/{velo → templates/velo[D]/files}/cypress/tsconfig.json +0 -0
- /package/files/{velo → templates/velo[D]/files}/cypress.config.mjs +0 -0
- /package/files/{velo → templates/velo[D]/files}/eslint.config.mjs +0 -0
- /package/files/{velo → templates/velo[D]/files}/local.tsconfig.json +0 -0
- /package/files/{velo → templates/velo[D]/files}/typedoc.json +0 -0
- /package/files/{velo/typescript/styles → templates/velo[D]/files/typescript/__mocks__}/.gitkeep +0 -0
- /package/files/{velo/typescript/styles/global.scss → templates/velo[D]/files/typescript/backend/data.ts} +0 -0
- /package/{src copy/schemas/index.ts → files/templates/velo[D]/files/typescript/backend/events.ts} +0 -0
- /package/files/{velo → templates/velo[D]/files}/typescript/backend/http-functions.ts +0 -0
- /package/files/{velo → templates/velo[D]/files}/typescript/backend/lib/http-functions/sync.ts +0 -0
- /package/files/{velo → templates/velo[D]/files}/typescript/backend/permissions.json +0 -0
- /package/{src copy/schemas/types.ts → files/templates/velo[D]/files/typescript/pages/.gitkeep} +0 -0
- /package/files/{velo → templates/velo[D]/files}/typescript/tsconfig.json +0 -0
- /package/files/{velo → templates/velo[D]/files}/vitest.config.ts +0 -0
- /package/{src copy → old}/Gulpfile.ts +0 -0
- /package/{src copy → old}/gulp/backend.ts +0 -0
- /package/{src copy → old}/gulp/checks.ts +0 -0
- /package/{src copy → old}/gulp/clean.ts +0 -0
- /package/{src copy → old}/gulp/copy.ts +0 -0
- /package/{src copy → old}/gulp/helpers.ts +0 -0
- /package/{src copy → old}/gulp/pages.ts +0 -0
- /package/{src copy → old}/gulp/pipeline.ts +0 -0
- /package/{src copy → old}/gulp/public.ts +0 -0
- /package/{src copy → old}/gulp/styles.ts +0 -0
- /package/{src copy → old}/gulp/templates.ts +0 -0
- /package/{src copy → old}/gulp/types.ts +0 -0
- /package/{src copy → old}/gulp/watchers.ts +0 -0
- /package/{src copy → old}/index.ts +0 -0
- /package/{src copy → old}/init.ts +0 -0
- /package/{src copy → old}/models.ts +0 -0
- /package/{src copy → old}/prepare.ts +0 -0
- /package/{src copy → old}/settings.json +0 -0
- /package/{src copy → old}/sync.ts +0 -0
- /package/{src copy → old}/types.d.ts +0 -0
- /package/src/{models.ts → schemas/tsconfig.ts} +0 -0
package/.yarnrc.yml
CHANGED
@@ -0,0 +1,35 @@
|
|
1
|
+
import gulpSass from 'gulp-sass';
|
2
|
+
import backendSettings from '../settings/backend-settings.json';
|
3
|
+
import masterSettings from '../settings/master-settings.json';
|
4
|
+
import pageSettings from '../settings/page-settings.json';
|
5
|
+
import publicSettings from '../settings/public-settings.json';
|
6
|
+
import { ModuleSettings, ProjectSettings } from './schemas/gulp.js';
|
7
|
+
import { LucyConfig } from './config.js';
|
8
|
+
export type TaskOptions = {
|
9
|
+
moduleSettings?: ModuleSettings;
|
10
|
+
projectSettings?: ProjectSettings;
|
11
|
+
enableIncrementalBuild: boolean;
|
12
|
+
outputDir: string;
|
13
|
+
sass: ReturnType<typeof gulpSass>;
|
14
|
+
userHomeDir: string;
|
15
|
+
replaceOptions: typeof replaceOptions;
|
16
|
+
backendSettings: typeof backendSettings;
|
17
|
+
masterSettings: typeof masterSettings;
|
18
|
+
pageSettings: typeof pageSettings;
|
19
|
+
publicSettings: typeof publicSettings;
|
20
|
+
modulesSourcePaths: string[];
|
21
|
+
cwd: string;
|
22
|
+
isWatching?: boolean;
|
23
|
+
};
|
24
|
+
export interface File {
|
25
|
+
path: string;
|
26
|
+
dirname: string;
|
27
|
+
}
|
28
|
+
declare const replaceOptions: {
|
29
|
+
logs: {
|
30
|
+
enabled: boolean;
|
31
|
+
};
|
32
|
+
};
|
33
|
+
export declare const taskOptions: TaskOptions;
|
34
|
+
export declare function runTask(config: LucyConfig): Promise<void>;
|
35
|
+
export {};
|
package/dist/Gulpfile.js
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
import gulp from 'gulp';
|
2
|
+
import gulpSass from 'gulp-sass';
|
3
|
+
import shell from 'gulp-shell';
|
4
|
+
import * as os from 'os';
|
5
|
+
import * as dartSass from 'sass';
|
6
|
+
import { join } from "path";
|
7
|
+
import backendSettings from '../settings/backend-settings.json' with { type: "json" };
|
8
|
+
;
|
9
|
+
import masterSettings from '../settings/master-settings.json' with { type: "json" };
|
10
|
+
;
|
11
|
+
import pageSettings from '../settings/page-settings.json' with { type: "json" };
|
12
|
+
;
|
13
|
+
import publicSettings from '../settings/public-settings.json' with { type: "json" };
|
14
|
+
;
|
15
|
+
import { buildPublic } from './gulp/public.js';
|
16
|
+
import { buildBackend, buildBackendJSW } from './gulp/backend.js';
|
17
|
+
import { checkPages, checkTs } from './gulp/checks.js';
|
18
|
+
import { compileScss } from './gulp/styles.js';
|
19
|
+
import { buildPages } from './gulp/pages.js';
|
20
|
+
import { previewTemplates } from './gulp/templates.js';
|
21
|
+
import { copyFiles } from './gulp/copy.js';
|
22
|
+
import { cleanSrc, cleanWix } from './gulp/clean.js';
|
23
|
+
import { addTypes, updateWixTypes } from './gulp/types.js';
|
24
|
+
import { setProdConfig } from './gulp/pipeline.js';
|
25
|
+
import { watchAll } from './gulp/watchers.js';
|
26
|
+
import { getModulesSourcePaths } from './gulp/helpers.js';
|
27
|
+
import { logger } from './utils/logger.js';
|
28
|
+
const sass = gulpSass(dartSass);
|
29
|
+
const outputDir = './src';
|
30
|
+
const userHomeDir = os.homedir();
|
31
|
+
const replaceOptions = {
|
32
|
+
logs: {
|
33
|
+
enabled: false
|
34
|
+
}
|
35
|
+
};
|
36
|
+
export const taskOptions = {
|
37
|
+
enableIncrementalBuild: false,
|
38
|
+
outputDir,
|
39
|
+
sass,
|
40
|
+
userHomeDir,
|
41
|
+
pageSettings,
|
42
|
+
publicSettings,
|
43
|
+
backendSettings,
|
44
|
+
masterSettings,
|
45
|
+
replaceOptions,
|
46
|
+
cwd: process.cwd(),
|
47
|
+
// modulesSync: getModulesSync(),
|
48
|
+
modulesSourcePaths: [],
|
49
|
+
};
|
50
|
+
const watchTaskOptions = { ...taskOptions, isWatching: true };
|
51
|
+
gulp.task('check-ts', gulp.parallel(checkTs(taskOptions)));
|
52
|
+
gulp.task('scss', gulp.parallel(compileScss(taskOptions)));
|
53
|
+
gulp.task('build-backend', gulp.parallel(buildBackend(taskOptions), buildBackendJSW(taskOptions)));
|
54
|
+
gulp.task('build-public', gulp.parallel(buildPublic(taskOptions)));
|
55
|
+
gulp.task('preview-templates', gulp.parallel(previewTemplates(taskOptions)));
|
56
|
+
gulp.task('copy-files', gulp.parallel(copyFiles(taskOptions)));
|
57
|
+
gulp.task('test', function () {
|
58
|
+
return shell.task(['yarn test'], { ignoreErrors: true })().then(() => {
|
59
|
+
logger.success("Tests completed successfully.");
|
60
|
+
}).catch(err => {
|
61
|
+
logger.error("Error in test task!");
|
62
|
+
});
|
63
|
+
});
|
64
|
+
gulp.task('test-ci', function () {
|
65
|
+
return shell.task(['yarn test --run'], { ignoreErrors: true })().then(() => {
|
66
|
+
logger.success("Tests completed successfully.");
|
67
|
+
}).catch(err => {
|
68
|
+
logger.error("Error in test task!");
|
69
|
+
});
|
70
|
+
});
|
71
|
+
gulp.task('sync-types', shell.task([
|
72
|
+
'yarn postinstall',
|
73
|
+
]));
|
74
|
+
gulp.task('fix-wixtypes', gulp.parallel(updateWixTypes(taskOptions)));
|
75
|
+
gulp.task('add-wix-types', function (done) {
|
76
|
+
return addTypes(taskOptions, done);
|
77
|
+
});
|
78
|
+
gulp.task('set-production', gulp.parallel(setProdConfig()));
|
79
|
+
gulp.task('start-wix', shell.task([
|
80
|
+
'yarn wix:dev',
|
81
|
+
]));
|
82
|
+
gulp.task('gen-docs', shell.task([
|
83
|
+
'yarn docs',
|
84
|
+
]));
|
85
|
+
gulp.task('fix-wix', gulp.series(cleanWix(), 'sync-types', 'fix-wixtypes', 'add-wix-types'));
|
86
|
+
gulp.task('build', gulp.parallel('build-backend', 'build-public', 'preview-templates', buildPages(taskOptions), compileScss(taskOptions), 'copy-files'));
|
87
|
+
gulp.task('build-pipeline', gulp.series(cleanSrc(taskOptions), 'set-production', 'check-ts', 'fix-wixtypes', 'add-wix-types', 'test-ci', 'build'));
|
88
|
+
gulp.task('build-prod', gulp.series((done) => checkPages(true, false).then(() => done(), (err) => done(err)), cleanSrc(taskOptions), 'set-production', 'fix-wix', 'check-ts', 'test-ci', 'build-backend', 'build-public', buildPages(taskOptions), 'copy-files', compileScss(taskOptions)));
|
89
|
+
gulp.task('start-dev-env', gulp.parallel(watchAll(watchTaskOptions), 'test', 'start-wix', 'check-ts', (done) => checkPages(false, taskOptions.moduleSettings?.force ?? false).then(() => done(), (err) => done(err))));
|
90
|
+
gulp.task('dev', gulp.series(cleanSrc(taskOptions), 'fix-wix', 'build', 'start-dev-env'));
|
91
|
+
async function gulpTaskRunner(task) {
|
92
|
+
return new Promise(function (resolve, reject) {
|
93
|
+
gulp.series(task, (done) => {
|
94
|
+
resolve(true);
|
95
|
+
done();
|
96
|
+
})(function (err) {
|
97
|
+
if (err) {
|
98
|
+
logger.error("Error starting tasks:", err);
|
99
|
+
reject(err);
|
100
|
+
}
|
101
|
+
});
|
102
|
+
});
|
103
|
+
}
|
104
|
+
export async function runTask(config) {
|
105
|
+
taskOptions.cwd = config.cwd;
|
106
|
+
taskOptions.moduleSettings = {
|
107
|
+
packageRoot: config.packageRoot,
|
108
|
+
targetFolder: config.cwd,
|
109
|
+
force: config.force,
|
110
|
+
lucyConfigPath: join(config.cwd, "lucy.json"),
|
111
|
+
packageJsonPath: join(config.cwd, "package.json"),
|
112
|
+
settings: config.lucySettings,
|
113
|
+
wixConfigPath: join(config.cwd, "wix.config.json"),
|
114
|
+
veloConfigName: join(config.cwd, "jsconfig.json"),
|
115
|
+
};
|
116
|
+
taskOptions.modulesSourcePaths = getModulesSourcePaths(config);
|
117
|
+
taskOptions.projectSettings = {
|
118
|
+
modules: config.lucySettings.modules,
|
119
|
+
lucySettings: config.lucySettings,
|
120
|
+
packageJSON: config.packageJson,
|
121
|
+
};
|
122
|
+
const task = config.action.task || "dev";
|
123
|
+
logger.action(`Running task: ${task} with options:`, taskOptions);
|
124
|
+
try {
|
125
|
+
await gulpTaskRunner(task || 'dev');
|
126
|
+
}
|
127
|
+
catch (err) {
|
128
|
+
logger.error("Error starting tasks:", err);
|
129
|
+
}
|
130
|
+
logger.report("Task completed successfully:", task);
|
131
|
+
}
|
132
|
+
//# sourceMappingURL=Gulpfile.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Gulpfile.js","sourceRoot":"","sources":["../src/Gulpfile.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,QAAQ,MAAM,MAAM,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,eAAe,MAAM,mCAAmC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAAA,CAAC;AACvF,OAAO,cAAc,MAAM,kCAAkC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAAA,CAAC;AACrF,OAAO,YAAY,MAAM,gCAAgC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAAA,CAAC;AACjF,OAAO,cAAc,MAAM,kCAAkC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAAA,CAAC;AAErF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MA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
CHANGED
@@ -1,23 +1,78 @@
|
|
1
1
|
import yargs from "yargs";
|
2
2
|
import { hideBin } from "yargs/helpers";
|
3
|
+
import { initTypes, taskNames, syncActions } from "./schemas/types.js";
|
4
|
+
import { createRequire } from "node:module";
|
5
|
+
const require = createRequire(import.meta.url);
|
6
|
+
const pkg = require("../package.json");
|
3
7
|
export async function get_args() {
|
4
8
|
const argv = await yargs(hideBin(process.argv))
|
5
9
|
.usage('Usage: $0 <command> [options]')
|
6
|
-
.command('init <
|
7
|
-
return yargs.positional('
|
10
|
+
.command('init <initType>', 'Initialize a new Lucy project', (yargs) => {
|
11
|
+
return yargs.positional('initType', {
|
8
12
|
describe: 'The type of project to initialize',
|
9
|
-
choices:
|
10
|
-
demandOption: true,
|
13
|
+
choices: initTypes,
|
14
|
+
demandOption: true,
|
15
|
+
});
|
16
|
+
}).option('force', {
|
17
|
+
alias: 'f',
|
18
|
+
type: 'boolean',
|
19
|
+
description: 'Run with force'
|
20
|
+
})
|
21
|
+
.command('open', 'Open the Lucy home directory')
|
22
|
+
.command('task <tasksName>', 'Run a task', (yargs) => {
|
23
|
+
return yargs.positional('tasksName', {
|
24
|
+
describe: 'The task to run',
|
25
|
+
choices: taskNames,
|
26
|
+
demandOption: true,
|
27
|
+
});
|
28
|
+
})
|
29
|
+
.command('wix-sync <syncAction>', 'Run a velo-sync action', (yargs) => {
|
30
|
+
return yargs.positional("syncAction", {
|
31
|
+
describe: "The velo-sync action to run",
|
32
|
+
choices: syncActions,
|
33
|
+
demandOption: true,
|
34
|
+
})
|
35
|
+
.option('input', {
|
36
|
+
alias: 'i',
|
37
|
+
type: 'string',
|
38
|
+
describe: 'The CSV file to import',
|
39
|
+
demandOption: false,
|
40
|
+
})
|
41
|
+
.option('c', {
|
42
|
+
alias: 'collection',
|
43
|
+
type: 'string',
|
44
|
+
describe: 'The name of the collection to import data into',
|
45
|
+
demandOption: false,
|
46
|
+
})
|
47
|
+
.option('s', {
|
48
|
+
alias: 'schema',
|
49
|
+
type: 'string',
|
50
|
+
describe: 'The schema file',
|
51
|
+
demandOption: false,
|
52
|
+
})
|
53
|
+
.option('d', {
|
54
|
+
type: 'boolean',
|
55
|
+
describe: 'Run in dry-run mode',
|
56
|
+
demandOption: false,
|
57
|
+
});
|
58
|
+
})
|
59
|
+
.command('wix-sdk <wixSDKAction>', 'Run a velo-sync action', (yargs) => {
|
60
|
+
return yargs.positional("wixSDKAction", {
|
61
|
+
describe: "The velo-sync action to run",
|
62
|
+
choices: syncActions,
|
63
|
+
demandOption: true,
|
11
64
|
});
|
12
65
|
})
|
13
|
-
// Enforce that a command must be provided (e.g., 'init')
|
14
66
|
.demandCommand(1, 'You need to provide a command. Use --help for a list of commands.')
|
67
|
+
.version('v', 'Show version number', pkg.version)
|
68
|
+
.alias('v', 'version')
|
15
69
|
.help()
|
16
70
|
.alias('h', 'help')
|
17
71
|
.strict()
|
18
|
-
.wrap(yargs().terminalWidth())
|
19
|
-
.epilogue('For more information, visit https://github.com/your-repo/wix-lucy-cli')
|
72
|
+
.wrap(yargs().terminalWidth())
|
73
|
+
.epilogue('For more information, visit https://github.com/your-repo/wix-lucy-cli')
|
20
74
|
.parseAsync();
|
21
75
|
// The cast is now safer with the defined interface.
|
22
76
|
return argv;
|
23
77
|
}
|
78
|
+
//# sourceMappingURL=args.js.map
|
package/dist/args.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"args.js","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,SAAS,EAAY,SAAS,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,GAAG,G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;YACd,QAAQ,EAAE,gDAAgD;YAC1D,YAAY,EAAE,KAAK;SACtB,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACT,KAAK,EAAE,QAAQ;YACf,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,iBAAiB;YAC3B,YAAY,EAAE,KAAK;SACtB,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACT,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,qBAAqB;YAC/B,YAAY,EAAE,KAAK;SACtB,CAAC,CAAC;IACP,CAAC,CAAC;SACD,OAAO,CAAC,wBAAwB,EAAE,wBAAwB,EAAE,CAAC,KAAK,EAAE,EAAE;QACnE,OAAO,KAAK,CAAC,UAAU,CAAC,cAAc,EAAE;YACpC,QAAQ,EAAE,6BAA6B;YACvC,OAAO,EAAE,WAAW;YACpB,YAAY,EAAE,IAAI;SACrB,CAAC,CAAC;IACP,CAAC,CAAC;SACD,aAAa,CAAC,CAAC,EAAE,mEAAmE,CAAC;SACrF,OAAO,CAAC,GAAG,EAAE,qBAAqB,EAAE,GAAG,CAAC,OAAO,CAAC;SAChD,KAAK,CAAC,GAAG,EAAE,SAAS,CAAC;SACrB,IAAI,EAAE;SACN,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC;SAClB,MAAM,EAAE;SACR,IAAI,CAAC,KAAK,EAAE,CAAC,aAAa,EAAE,CAAC;SAC7B,QAAQ,CAAC,uEAAuE,CAAC;SACjF,UAAU,EAAE,CAAC;IAElB,oDAAoD;IACpD,OAAO,IAAgB,CAAC;AAC5B,CAAC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Effect } from "effect/index";
|
2
|
+
import { FileSystem, Path } from "@effect/platform";
|
3
|
+
import { Config } from "../config.js";
|
4
|
+
import { AppError } from "../error.js";
|
5
|
+
export declare const isDirectoryClean: (excludes?: string[]) => Effect.Effect<boolean, import("@effect/platform/Error").PlatformError, Config | FileSystem.FileSystem>;
|
6
|
+
export declare const checkForDirty: (excludes?: string[]) => Effect.Effect<void, AppError | import("@effect/platform/Error").PlatformError, Config | FileSystem.FileSystem>;
|
7
|
+
export declare const checkForVelo: () => Effect.Effect<undefined, AppError | import("effect/ParseResult").ParseError | import("@effect/platform/Error").PlatformError, Config | FileSystem.FileSystem | Path.Path>;
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import { Effect, Schema } from "effect/index";
|
2
|
+
import { FileSystem, Path } from "@effect/platform";
|
3
|
+
import { Config, lucyJsonName } from "../config.js";
|
4
|
+
import { logger } from "../utils/logger.js";
|
5
|
+
import { AppError } from "../error.js";
|
6
|
+
import { JsonSchema } from "../schemas/index.js";
|
7
|
+
export const isDirectoryClean = (excludes = []) => {
|
8
|
+
return Effect.gen(function* () {
|
9
|
+
const fs = yield* FileSystem.FileSystem;
|
10
|
+
const config = yield* Config;
|
11
|
+
const files = yield* fs.readDirectory(config.config.cwd);
|
12
|
+
const allExcludes = [...excludes, '.git', lucyJsonName];
|
13
|
+
const filteredFiles = files.filter(file => !allExcludes.includes(file));
|
14
|
+
return filteredFiles.length > 0 ? false : true;
|
15
|
+
});
|
16
|
+
};
|
17
|
+
export const checkForDirty = (excludes = []) => {
|
18
|
+
return Effect.gen(function* () {
|
19
|
+
const config = yield* Config;
|
20
|
+
const clean = yield* isDirectoryClean(excludes);
|
21
|
+
if (!clean && !config.config.force) {
|
22
|
+
logger.alert("The current directory is not empty. Please run this command in an empty directory.");
|
23
|
+
yield* Effect.fail(new AppError({ message: "Directory is not clean", cause: new Error("Directory is not clean") }));
|
24
|
+
return;
|
25
|
+
}
|
26
|
+
if (config.config.lucySettings.initialized && !config.config.force) {
|
27
|
+
logger.alert("Lucy is already initialized in this directory. Use --force to reinitialize.");
|
28
|
+
yield* Effect.fail(new AppError({ message: "Lucy is already initialized in this directory", cause: new Error("Lucy is already initialized in this directory") }));
|
29
|
+
return;
|
30
|
+
}
|
31
|
+
if ((!clean && config.config.force) || (config.config.lucySettings.initialized && config.config.force))
|
32
|
+
logger.alert("Forced initialization!");
|
33
|
+
});
|
34
|
+
};
|
35
|
+
export const checkForVelo = () => {
|
36
|
+
return Effect.gen(function* () {
|
37
|
+
const config = yield* Config;
|
38
|
+
const fs = yield* FileSystem.FileSystem;
|
39
|
+
const path = yield* Path.Path;
|
40
|
+
const wixConfigPath = path.join(config.config.cwd, 'wix.config.json');
|
41
|
+
const wixConfigRaw = yield* fs.readFileString(wixConfigPath);
|
42
|
+
const wixConfigJSON = (yield* Schema.decodeUnknown(JsonSchema)(wixConfigRaw));
|
43
|
+
if (!(wixConfigJSON.siteId))
|
44
|
+
return yield* Effect.fail(new AppError({ message: "This directory is not a Velo project. Please run this command in a Velo project directory.", cause: new Error("Not a Velo project") }));
|
45
|
+
});
|
46
|
+
};
|
47
|
+
//# sourceMappingURL=checks.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"checks.js","sourceRoot":"","sources":["../../src/commands/checks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAW,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,MAAM,CAAC,MAAM,gBAAgB,GAAE,CAAC,WAAqB,EAAE,EAAE,EAAE;IACvD,OAAO,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QACvB,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC;QACxC,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC;QAE7B,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,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"effect/index";
|
2
|
+
import { Config } from "../config.js";
|
3
|
+
import { FileSystem, Path } from "@effect/platform";
|
4
|
+
export declare const cleanup: Effect.Effect<void, import("@effect/platform/Error").PlatformError, Config | FileSystem.FileSystem | Path.Path>;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Effect } from "effect/index";
|
2
|
+
import { Config } from "../config.js";
|
3
|
+
import { FileSystem, Path } from "@effect/platform";
|
4
|
+
export const cleanup = Effect.gen(function* () {
|
5
|
+
const config = yield* Config;
|
6
|
+
const fs = yield* FileSystem.FileSystem;
|
7
|
+
const path = yield* Path.Path;
|
8
|
+
yield* fs.remove(path.join(config.config.cwd, "package-lock.json"), { force: true });
|
9
|
+
});
|
10
|
+
//# sourceMappingURL=cleanup%20copy.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cleanup copy.js","sourceRoot":"","sources":["../../src/commands/cleanup copy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEnD,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IACvC,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC;IAC7B,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IAE9B,KAAK,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;AACxF,CAAC,CAAC,CAAC"}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { Effect } from "effect/index";
|
2
|
+
import { Config } from "../config.js";
|
3
|
+
import { FileSystem, Path } from "@effect/platform";
|
4
|
+
export declare const cleanup: Effect.Effect<void, import("@effect/platform/Error").PlatformError, Config | FileSystem.FileSystem | Path.Path>;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Effect } from "effect/index";
|
2
|
+
import { Config } from "../config.js";
|
3
|
+
import { FileSystem, Path } from "@effect/platform";
|
4
|
+
export const cleanup = Effect.gen(function* () {
|
5
|
+
const config = yield* Config;
|
6
|
+
const fs = yield* FileSystem.FileSystem;
|
7
|
+
const path = yield* Path.Path;
|
8
|
+
yield* fs.remove(path.join(config.config.cwd, "package-lock.json"), { force: true });
|
9
|
+
});
|
10
|
+
//# sourceMappingURL=cleanup.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cleanup.js","sourceRoot":"","sources":["../../src/commands/cleanup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEnD,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IACvC,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC;IAC7B,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IAE9B,KAAK,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;AACxF,CAAC,CAAC,CAAC"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { Effect } from "effect/index";
|
2
|
+
import { Path } from "@effect/platform";
|
3
|
+
import { FileSystem } from "@effect/platform";
|
4
|
+
import { Config } from "../config.js";
|
5
|
+
export declare const copyTemplateFiles: Effect.Effect<void, import("@effect/platform/Error").PlatformError, Config | FileSystem.FileSystem | Path.Path>;
|
6
|
+
export declare const copySyncFiles: Effect.Effect<void, import("@effect/platform/Error").PlatformError, Config | FileSystem.FileSystem | Path.Path>;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { Effect } from "effect/index";
|
2
|
+
import { Path } from "@effect/platform";
|
3
|
+
import { FileSystem } from "@effect/platform";
|
4
|
+
import { Config, syncDataName, syncFilesSource } from "../config.js";
|
5
|
+
export const copyTemplateFiles = Effect.gen(function* () {
|
6
|
+
const fs = yield* FileSystem.FileSystem;
|
7
|
+
const config = yield* Config;
|
8
|
+
const path = yield* Path.Path;
|
9
|
+
const templateFiles = yield* fs.readDirectory(config.config.templateFiles);
|
10
|
+
yield* Effect.forEach(templateFiles, (file) => fs.copy(path.join(config.config.templateFiles, file), path.join(config.config.cwd, file), { overwrite: true }));
|
11
|
+
});
|
12
|
+
export const copySyncFiles = Effect.gen(function* () {
|
13
|
+
const fs = yield* FileSystem.FileSystem;
|
14
|
+
const config = yield* Config;
|
15
|
+
const path = yield* Path.Path;
|
16
|
+
const synDataFiles = yield* fs.readDirectory(syncFilesSource);
|
17
|
+
yield* fs.makeDirectory(path.join(config.config.cwd, syncDataName));
|
18
|
+
yield* Effect.forEach(synDataFiles, (file) => fs.copy(path.join(syncFilesSource, file), path.join(config.config.cwd, syncDataName, file), { overwrite: true }));
|
19
|
+
});
|
20
|
+
//# sourceMappingURL=copy.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"copy.js","sourceRoot":"","sources":["../../src/commands/copy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAA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,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC;IACpE,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CACjB,YAAY,EACZ,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAC7H,CAAA;AACL,CAAC,CAAC,CAAA"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Effect } from "effect/index";
|
2
|
+
import { Config } from "../config.js";
|
3
|
+
import { FileSystem, Path } from "@effect/platform";
|
4
|
+
export declare const editJson: (json: any, keys: string[], values: string[] | Object[]) => Effect.Effect<void, never, Config>;
|
5
|
+
export declare const mergeLucySettings2PackageJson: Effect.Effect<void, never, Config>;
|
6
|
+
export declare const setModule: Effect.Effect<void, never, Config>;
|
7
|
+
export declare const mergeAdditions: Effect.Effect<void, never, Config>;
|
8
|
+
export declare const setProjectName: Effect.Effect<void, never, Config>;
|
9
|
+
export declare const setInitialized: Effect.Effect<void, import("effect/ParseResult").ParseError | import("@effect/platform/Error").PlatformError, Config | FileSystem.FileSystem | Path.Path>;
|
10
|
+
export declare const stringReplace: (filePath: string, keys: string[], values: string[]) => Effect.Effect<void, import("@effect/platform/Error").PlatformError, FileSystem.FileSystem>;
|
@@ -0,0 +1,69 @@
|
|
1
|
+
import { Effect, Schema } from "effect/index";
|
2
|
+
import { Config, lucyJsonPath } from "../config.js";
|
3
|
+
import { FileSystem, Path } from "@effect/platform";
|
4
|
+
import { logger } from "../utils/logger.js";
|
5
|
+
import { JsonSchema } from "../schemas/index.js";
|
6
|
+
export const editJson = (json, keys, values) => {
|
7
|
+
return Effect.gen(function* () {
|
8
|
+
const config = yield* Config;
|
9
|
+
for (const key of keys) {
|
10
|
+
const index = keys.indexOf(key);
|
11
|
+
const value = values[index];
|
12
|
+
json[key] = value;
|
13
|
+
}
|
14
|
+
});
|
15
|
+
};
|
16
|
+
export const mergeLucySettings2PackageJson = Effect.gen(function* () {
|
17
|
+
const config = yield* Config;
|
18
|
+
const lucySettings = config.config.lucySettings;
|
19
|
+
const packageJson = config.config.packageJson;
|
20
|
+
if (Object.keys(lucySettings.scripts).length > 0) {
|
21
|
+
yield* editJson(packageJson, ['scripts'], [{ ...packageJson.scripts, ...lucySettings.scripts }]);
|
22
|
+
}
|
23
|
+
});
|
24
|
+
export const setModule = Effect.gen(function* () {
|
25
|
+
const config = yield* Config;
|
26
|
+
const lucySettings = config.config.lucySettings;
|
27
|
+
const packageJson = config.config.packageJson;
|
28
|
+
yield* editJson(packageJson, ['type'], ['module']);
|
29
|
+
});
|
30
|
+
export const mergeAdditions = Effect.gen(function* () {
|
31
|
+
const config = yield* Config;
|
32
|
+
const lucySettings = config.config.lucySettings;
|
33
|
+
const packageJson = config.config.packageJson;
|
34
|
+
config.config.packageJson = {
|
35
|
+
...packageJson,
|
36
|
+
...lucySettings.additionalPkgProps,
|
37
|
+
};
|
38
|
+
});
|
39
|
+
export const setProjectName = Effect.gen(function* () {
|
40
|
+
const config = yield* Config;
|
41
|
+
const packageJson = config.config.packageJson;
|
42
|
+
yield* editJson(packageJson, ["name"], [config.config.projectName]);
|
43
|
+
});
|
44
|
+
export const setInitialized = Effect.gen(function* () {
|
45
|
+
const config = yield* Config;
|
46
|
+
const fs = yield* FileSystem.FileSystem;
|
47
|
+
const path = yield* Path.Path;
|
48
|
+
const lucyRaw = yield* fs.readFileString(lucyJsonPath);
|
49
|
+
const lucyJSON = (yield* Schema.decodeUnknown(JsonSchema)(lucyRaw));
|
50
|
+
lucyJSON.initialized = true;
|
51
|
+
yield* fs.writeFileString(lucyJsonPath, JSON.stringify(lucyJSON, null, 2));
|
52
|
+
});
|
53
|
+
export const stringReplace = (filePath, keys, values) => {
|
54
|
+
return Effect.gen(function* () {
|
55
|
+
const fs = yield* FileSystem.FileSystem;
|
56
|
+
let modifiedContent = '';
|
57
|
+
logger.action(`Replacing ${keys} with ${values} in ${filePath}`);
|
58
|
+
const data = yield* fs.readFileString(filePath, 'utf8');
|
59
|
+
for (const key of keys) {
|
60
|
+
const index = keys.indexOf(key);
|
61
|
+
const value = values[index];
|
62
|
+
const regex = new RegExp(`${key}`, 'g');
|
63
|
+
modifiedContent = data.replace(regex, `${value}`);
|
64
|
+
}
|
65
|
+
yield* fs.writeFileString(filePath, modifiedContent);
|
66
|
+
logger.info(`Updated file ${filePath}`);
|
67
|
+
});
|
68
|
+
};
|
69
|
+
//# sourceMappingURL=edit.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"edit.js","sourceRoot":"","sources":["../../src/commands/edit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjD,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAAS,EAAE,IAAc,EAAE,MAA2B,EAAE,EAAE;IAC/E,OAAO,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QACvB,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC;QAE7B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAC,CAAC;YAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAChC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YAC5B,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E,IAAc,EAAE,MAAgB,EAAE,EAAE;IAChF,OAAO,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QACvB,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC;QACxC,IAAI,eAAe,GAAW,EAAE,CAAC;QAEjC,MAAM,CAAC,MAAM,CAAC,aAAa,IAAI,SAAS,MAAM,OAAO,QAAQ,EAAE,CAAC,CAAC;QACjE,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACxD,KAAK,MAAM,GAAG,IAAI,IAAI,EAAC,CAAC;YAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAChC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YAC5B,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,GAAG,GAAG,EAAE,EAAE,GAAG,CAAC,CAAC;YACxC,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;QACnD,CAAC;QACK,KAAK,CAAC,CAAC,EAAE,CAAC,eAAe,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;QACrD,MAAM,CAAC,IAAI,CAAC,gBAAgB,QAAQ,EAAE,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAA;AACN,CAAC,CAAA"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { Effect } from "effect/index";
|
2
|
+
import { Config } from "../config.js";
|
3
|
+
import { Command } from "@effect/platform/index";
|
4
|
+
import { logger } from "../utils/logger.js";
|
5
|
+
export const execCommand = Effect.gen(function* () {
|
6
|
+
const config = yield* Config;
|
7
|
+
const cmds = config.config.lucySettings.additionalCommands ?? [];
|
8
|
+
logger.info("Executing additional commands...", cmds);
|
9
|
+
if (cmds.length > 0) {
|
10
|
+
logger.info("Executing additional commands");
|
11
|
+
yield* Effect.all([
|
12
|
+
...cmds.map((cmd) => {
|
13
|
+
return Command.make(cmd[0], ...cmd.slice(1))
|
14
|
+
.pipe()
|
15
|
+
.pipe(Command.stdout("inherit"), Command.exitCode);
|
16
|
+
}),
|
17
|
+
]);
|
18
|
+
}
|
19
|
+
});
|
20
|
+
//# sourceMappingURL=exec%20copy.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"exec copy.js","sourceRoot":"","sources":["../../src/commands/exec copy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAC3C,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC;IAC7B,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,kBAAkB,IAAI,EAAE,CAAC;IACjE,MAAM,CAAC,IAAI,CAAC,kCAAkC,EAAE,IAAI,CAAC,CAAC;IACtD,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClB,MAAM,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;QAC/C,KAAM,CAAC,CACL,MAAM,CAAC,GAAG,CAAC;YACP,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;gBACpB,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;qBACvC,IAAI,EAAE;qBACN,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;YACvD,CAAC,CAAC;SACL,CAAC,CAAC;IACP,CAAC;AACL,CAAC,CAAC,CAAA"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { Effect } from "effect/index";
|
2
|
+
import { Config } from "../config.js";
|
3
|
+
import { FileSystem } from "@effect/platform";
|
4
|
+
export declare const execCommand: Effect.Effect<void, import("@effect/platform/Error").PlatformError, Config | import("@effect/platform/CommandExecutor").CommandExecutor>;
|
5
|
+
export declare const open: Effect.Effect<void, import("@effect/platform/Error").PlatformError, Config | FileSystem.FileSystem | import("@effect/platform/CommandExecutor").CommandExecutor>;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { Effect } from "effect/index";
|
2
|
+
import { Config } from "../config.js";
|
3
|
+
import { Command } from "@effect/platform/index";
|
4
|
+
import { logger } from "../utils/logger.js";
|
5
|
+
import { FileSystem } from "@effect/platform";
|
6
|
+
export const execCommand = Effect.gen(function* () {
|
7
|
+
const config = yield* Config;
|
8
|
+
const cmds = config.config.lucySettings.additionalCommands ?? [];
|
9
|
+
logger.info("Executing additional commands...", cmds);
|
10
|
+
if (cmds.length > 0) {
|
11
|
+
logger.info("Executing additional commands");
|
12
|
+
yield* Effect.all([
|
13
|
+
...cmds.map((cmd) => {
|
14
|
+
return Command.make(cmd[0], ...cmd.slice(1))
|
15
|
+
.pipe()
|
16
|
+
.pipe(Command.stdout("inherit"), Command.exitCode);
|
17
|
+
}),
|
18
|
+
]);
|
19
|
+
}
|
20
|
+
});
|
21
|
+
export const open = Effect.scoped(Effect.gen(function* () {
|
22
|
+
const config = yield* Config;
|
23
|
+
const fs = yield* FileSystem.FileSystem;
|
24
|
+
console.log("Opening Lucy home directory:", config.config.lucyHome);
|
25
|
+
let command;
|
26
|
+
switch (process.platform) {
|
27
|
+
case 'darwin':
|
28
|
+
command = Command.make('open', config.config.lucyHome);
|
29
|
+
break;
|
30
|
+
case 'win32':
|
31
|
+
command = Command.make('start', config.config.lucyHome);
|
32
|
+
break;
|
33
|
+
default:
|
34
|
+
command = Command.make('xdg-open', config.config.lucyHome);
|
35
|
+
break;
|
36
|
+
}
|
37
|
+
command.pipe().pipe(Command.stdout("inherit"), Command.exitCode);
|
38
|
+
yield* command.pipe().pipe(Command.stdout("inherit"), Command.exitCode);
|
39
|
+
}));
|
40
|
+
//# sourceMappingURL=exec.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"exec.js","sourceRoot":"","sources":["../../src/commands/exec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAC3C,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC;IAC7B,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,kBAAkB,IAAI,EAAE,CAAC;IACjE,MAAM,CAAC,IAAI,CAAC,kCAAkC,EAAE,IAAI,CAAC,CAAC;IACtD,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClB,MAAM,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;QAC/C,KAAM,CAAC,CACL,MAAM,CAAC,GAAG,CAAC;YACP,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;gBACpB,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;qBACvC,IAAI,EAAE;qBACN,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC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ystem, Path } from "@effect/platform";
|
3
|
+
import { Config } from "../config.js";
|
4
|
+
export declare const writeLucySettings: Effect.Effect<void, import("@effect/platform/Error").PlatformError, Config | FileSystem.FileSystem | Path.Path>;
|
5
|
+
export declare const writePackageJson: Effect.Effect<void, import("@effect/platform/Error").PlatformError, Config | FileSystem.FileSystem | Path.Path>;
|
6
|
+
export declare const writeVeloSyncSettings: Effect.Effect<void, import("@effect/platform/Error").PlatformError, Config | FileSystem.FileSystem | Path.Path>;
|
7
|
+
export declare const writeWixSDKSettings: Effect.Effect<void, import("@effect/platform/Error").PlatformError, Config | FileSystem.FileSystem | Path.Path>;
|