lucy-cli 2.0.0-alpha.9 → 2.0.0-beta.1
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/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.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 +67 -0
- package/dist/commands/edit.js.map +1 -0
- package/dist/commands/exec.d.ts +7 -0
- package/dist/commands/exec.js +67 -0
- package/dist/commands/exec.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 +165 -0
- package/dist/commands/install.js.map +1 -0
- package/dist/commands/read.d.ts +6 -0
- package/dist/commands/read.js +40 -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 +29 -7
- package/dist/config.js +90 -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/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 +77 -9
- package/dist/index.js.map +1 -0
- package/dist/init/blocks.d.ts +5 -0
- package/dist/init/blocks.js +62 -0
- package/dist/init/blocks.js.map +1 -0
- package/dist/init/cargo.d.ts +2 -0
- package/dist/init/cargo.js +21 -0
- package/dist/init/cargo.js.map +1 -0
- package/dist/init/expo.d.ts +5 -0
- package/dist/init/expo.js +52 -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 +77 -0
- package/dist/init/index.js.map +1 -0
- package/dist/init/monorepo.d.ts +4 -0
- package/dist/init/monorepo.js +48 -0
- package/dist/init/monorepo.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/tauri.d.ts +5 -0
- package/dist/init/tauri.js +32 -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 +60 -0
- package/dist/init/velo.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 +29 -0
- package/dist/schemas/lucy.js +42 -0
- package/dist/schemas/lucy.js.map +1 -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/tasks/Gulpfile.d.ts +4 -0
- package/dist/tasks/Gulpfile.js +111 -0
- package/dist/tasks/Gulpfile.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/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/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/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.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/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-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.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.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.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/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.d.ts +4 -0
- package/dist/wix-sync/sync.js +26 -0
- package/dist/wix-sync/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 +9 -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 +15 -0
- package/files/templates/expo[D]/files/.stylelintrc.js +8 -0
- package/files/{expo → templates/expo[D]/files}/eas.json +9 -3
- package/files/templates/expo[D]/files/lib/data.ts +197 -0
- package/files/{expo → templates/expo[D]/files}/metro.config.js +6 -0
- package/files/templates/expo[D]/files/pnpm-workspace.yaml +3 -0
- package/files/templates/expo[D]/lucy.json +86 -0
- package/files/templates/monorepo[D]/files/.editorconfig +10 -0
- package/files/templates/monorepo[D]/files/.nvmrc +1 -0
- package/files/templates/monorepo[D]/files/.prettierignore +23 -0
- package/files/templates/monorepo[D]/files/.prettierrc.json +15 -0
- 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/.yarnrc.yml +3 -0
- package/files/templates/monorepo[D]/files/README.md +109 -0
- package/files/templates/monorepo[D]/files/currents.config.ts +5 -0
- package/files/templates/monorepo[D]/files/nx.json +25 -0
- package/files/templates/monorepo[D]/files/pnpm-workspace.yaml +11 -0
- package/files/templates/monorepo[D]/files/tsconfig.json +6 -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 +69 -0
- package/files/templates/tauri[D]/lucy.json +9 -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]/lucy.json +137 -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.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 +18 -19
- package/patches/velo-sync+0.0.9.patch +13 -0
- package/src/args.ts +62 -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 +81 -0
- package/src/commands/exec.ts +69 -0
- package/src/commands/git.ts +113 -0
- package/src/commands/home.ts +22 -0
- package/src/commands/install.ts +249 -0
- package/src/commands/read.ts +45 -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 +88 -13
- package/src/init/blocks.ts +85 -0
- package/src/init/cargo.ts +25 -0
- package/src/init/expo.ts +69 -0
- package/src/init/gitModules.ts +15 -0
- package/src/init/index.ts +81 -0
- package/src/init/monorepo.ts +72 -0
- package/src/init/prepareVelo.ts +19 -0
- package/src/init/tauri.ts +42 -0
- package/src/init/templates.ts +98 -0
- package/src/init/velo.ts +65 -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 +43 -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/dist/init.d.ts +0 -4
- package/dist/init.js +0 -275
- package/dist/models.js +0 -1
- package/dist/params.d.ts +0 -7
- package/dist/params.js +0 -23
- package/files/expo/lib/data.ts +0 -48
- package/files/expo/lucy.json +0 -8
- package/src/init.ts +0 -392
- /package/dist/{models.d.ts → schemas/tsconfig.d.ts} +0 -0
- /package/{files/expo/components/.gitkeep → dist/utils/index.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}/.prettierrc.js +0 -0
- /package/files/{expo → templates/expo[D]/files}/.yarnrc +0 -0
- /package/files/{expo → templates/expo[D]/files}/.yarnrc.yml +0 -0
- /package/files/{expo → templates/expo[D]/files}/README.md +0 -0
- /package/files/{expo → templates/expo[D]/files}/assets/fonts/SpaceMono-Regular.ttf +0 -0
- /package/files/{expo → templates/expo[D]/files}/assets/images/adaptive-icon.png +0 -0
- /package/files/{expo → templates/expo[D]/files}/assets/images/favicon.png +0 -0
- /package/files/{expo → templates/expo[D]/files}/assets/images/icon.png +0 -0
- /package/files/{expo → templates/expo[D]/files}/assets/images/splash-icon.png +0 -0
- /package/files/{expo → templates/expo[D]/files}/babel.config.js +0 -0
- /package/files/{expo/components/ui → templates/expo[D]/files/components}/.gitkeep +0 -0
- /package/files/{velo/typescript/__mocks__ → templates/expo[D]/files/components/ui}/.gitkeep +0 -0
- /package/files/{expo → templates/expo[D]/files}/constants/theme.ts +0 -0
- /package/files/{expo → templates/expo[D]/files}/eslint.config.mjs +0 -0
- /package/files/{expo → templates/expo[D]/files}/global.css +0 -0
- /package/files/{expo → templates/expo[D]/files}/hooks/useColorScheme.ts +0 -0
- /package/files/{expo → templates/expo[D]/files}/index.ts +0 -0
- /package/files/{expo → templates/expo[D]/files}/lib/utils/index.ts +0 -0
- /package/files/{expo → templates/expo[D]/files}/lib/utils/polyfills.ts +0 -0
- /package/files/{expo → templates/expo[D]/files}/lib/wix/client.ts +0 -0
- /package/files/{expo → templates/expo[D]/files}/lib/wix/error.ts +0 -0
- /package/files/{expo → templates/expo[D]/files}/lib/wix/index.ts +0 -0
- /package/files/{expo → templates/expo[D]/files}/nativewind-env.d.ts +0 -0
- /package/files/{expo → templates/expo[D]/files}/scripts/reset-project.ts +0 -0
- /package/files/{expo → templates/expo[D]/files}/tailwind.config.js +0 -0
- /package/files/{expo → templates/expo[D]/files}/tsconfig.json +0 -0
- /package/files/{expo → templates/expo[D]/files}/types/reset.d.ts +0 -0
- /package/files/{velo → 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/pages → templates/velo[D]/files/typescript/__mocks__}/.gitkeep +0 -0
- /package/files/{velo → templates/velo[D]/files}/typescript/backend/data.ts +0 -0
- /package/files/{velo → 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/files/{velo/typescript/public → templates/velo[D]/files/typescript/pages}/.gitkeep +0 -0
- /package/files/{velo/typescript/styles → templates/velo[D]/files/typescript/public}/.gitkeep +0 -0
- /package/files/{velo → templates/velo[D]/files}/typescript/public/scss/app.scss +0 -0
- /package/files/{velo/typescript/styles/global.scss → templates/velo[D]/files/typescript/styles/.gitkeep} +0 -0
- /package/{src copy/schemas/index.ts → files/templates/velo[D]/files/typescript/styles/global.scss} +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/schemas/types.ts → old/schemas/index.d.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
@@ -0,0 +1,81 @@
|
|
1
|
+
import { Effect, Schema } from "effect/index"
|
2
|
+
import { Config } from "../config.js";
|
3
|
+
import { init_expo } from "./expo.js";
|
4
|
+
import { selectTemplate } from "./templates.js";
|
5
|
+
import Enquirer from "enquirer";
|
6
|
+
import { AppError } from "../error.js";
|
7
|
+
import { createLucyHome } from "../commands/home.js";
|
8
|
+
import { readLucyJsonFromTemplate } from "../commands/read.js";
|
9
|
+
import { init_monorepo } from "./monorepo.js";
|
10
|
+
import { init_cargo } from "./cargo.js";
|
11
|
+
import { init_blocks } from "./blocks.js";
|
12
|
+
import { init_velo } from "./velo.js";
|
13
|
+
import { init_submodules } from "./gitModules.js";
|
14
|
+
import { init_tauri } from "./tauri.js";
|
15
|
+
import { pkgManagers } from "../schemas/lucy.js";
|
16
|
+
|
17
|
+
|
18
|
+
export const init = Effect.gen(function* (_) {
|
19
|
+
const config = yield* Config;
|
20
|
+
if(config.config.action.initType === undefined) {
|
21
|
+
return yield* Effect.fail(new AppError({ message: "No init type provided", cause: new Error("No init type provided") }));
|
22
|
+
}
|
23
|
+
yield* createLucyHome();
|
24
|
+
const projectName = config.config.cwd.split('/').pop() || 'expo-project';
|
25
|
+
const templateQuestion = new Enquirer();
|
26
|
+
const choice = yield* Effect.tryPromise({
|
27
|
+
try: () => templateQuestion.prompt({
|
28
|
+
type: 'input',
|
29
|
+
name: 'projectName',
|
30
|
+
message: 'Enter a project name',
|
31
|
+
initial: projectName,
|
32
|
+
validate: (value: string) => value.trim() !== '' ? true : 'Project name cannot be empty'
|
33
|
+
}),
|
34
|
+
catch: (e) => {
|
35
|
+
return new AppError({ cause: e, message: 'Error selecting template' });
|
36
|
+
}
|
37
|
+
})
|
38
|
+
const selectedName = yield* Schema.decodeUnknown(Schema.Struct({ projectName: Schema.String }))(choice)
|
39
|
+
config.config.projectName = selectedName.projectName.trim();
|
40
|
+
yield* selectTemplate();
|
41
|
+
yield* readLucyJsonFromTemplate;
|
42
|
+
|
43
|
+
const pkgMgrQuestion = new Enquirer();
|
44
|
+
const pkgMgr = yield* Effect.tryPromise({
|
45
|
+
try: () => pkgMgrQuestion.prompt({
|
46
|
+
type: 'select',
|
47
|
+
name: 'packageManager',
|
48
|
+
message: 'Select a package manager',
|
49
|
+
choices: [...pkgManagers],
|
50
|
+
}),
|
51
|
+
catch: (e) => {
|
52
|
+
return new AppError({ cause: e, message: 'Error selecting package manager' });
|
53
|
+
}
|
54
|
+
})
|
55
|
+
const selectedPkgMgr = yield* Schema.decodeUnknown(Schema.Struct({ packageManager: Schema.Literal(...pkgManagers) }))(pkgMgr)
|
56
|
+
config.config.lucySettings.packageManager = selectedPkgMgr.packageManager;
|
57
|
+
|
58
|
+
|
59
|
+
if(config.config.action.initType === 'expo') {
|
60
|
+
return yield* init_expo();
|
61
|
+
}
|
62
|
+
if(config.config.action.initType === 'monorepo') {
|
63
|
+
return yield* init_monorepo();
|
64
|
+
}
|
65
|
+
if(config.config.action.initType === 'cargo') {
|
66
|
+
return yield* init_cargo();
|
67
|
+
}
|
68
|
+
if(config.config.action.initType === 'blocks') {
|
69
|
+
return yield* init_blocks();
|
70
|
+
}
|
71
|
+
if(config.config.action.initType === 'tauri') {
|
72
|
+
return yield* init_tauri();
|
73
|
+
}
|
74
|
+
if(config.config.action.initType === 'velo') {
|
75
|
+
return yield* init_velo();
|
76
|
+
}
|
77
|
+
if(config.config.action.initType === 'submodules') {
|
78
|
+
return yield* init_submodules();
|
79
|
+
}
|
80
|
+
yield* Effect.fail(new AppError({ message: `Unsupported init type: ${config.config.action.initType}`, cause: new Error(`Unsupported init type: ${config.config.action.initType}`) }));
|
81
|
+
})
|
@@ -0,0 +1,72 @@
|
|
1
|
+
import { Effect } from "effect/index"
|
2
|
+
import { Config } from "../config.js";
|
3
|
+
import { Command, FileSystem, Path } from "@effect/platform"
|
4
|
+
import { logger } from "../utils/logger.js";
|
5
|
+
import { mergeAdditions, mergeLucySettings2PackageJson, setInitialized, setProjectName, stringReplace } from "../commands/edit.js";
|
6
|
+
import { writeLucySettings, writePackageJson } from "../commands/write.js";
|
7
|
+
import { copyTemplateFiles } from "../commands/copy.js";
|
8
|
+
import { readPackageJson } from "../commands/read.js";
|
9
|
+
import { approveBuilds, installPackages, runInstall } from "../commands/install.js";
|
10
|
+
import { cleanup } from "../commands/cleanup.js";
|
11
|
+
import { gitInit } from "../commands/git.js";
|
12
|
+
import { checkForDirty } from "../commands/checks.js";
|
13
|
+
import { openVSCode } from "../commands/exec.js";
|
14
|
+
|
15
|
+
export const init_monorepo = () => {
|
16
|
+
return Effect.gen(function*() {
|
17
|
+
const config = yield* Config;
|
18
|
+
const path = yield* Path.Path;
|
19
|
+
const fs = yield* FileSystem.FileSystem;
|
20
|
+
|
21
|
+
logger.action("Initializing monorepo...");
|
22
|
+
|
23
|
+
yield* checkForDirty();
|
24
|
+
|
25
|
+
const createMonoRepo = Command.make(
|
26
|
+
"npx",
|
27
|
+
"-y",
|
28
|
+
"create-nx-workspace",
|
29
|
+
config.config.projectName,
|
30
|
+
`--appName=${config.config.projectName}`,
|
31
|
+
`--pm=${config.config.lucySettings.packageManager}`,
|
32
|
+
"--preset=ts",
|
33
|
+
"--g=true",
|
34
|
+
"--e2eTestRunner=cypress",
|
35
|
+
"--formatter=prettier"
|
36
|
+
).pipe(
|
37
|
+
Command.stdout("inherit"), // Stream stdout to process.stdout
|
38
|
+
Command.stderr("inherit"), // Stream stderr to process.stderr
|
39
|
+
Command.exitCode // Get the exit code
|
40
|
+
)
|
41
|
+
|
42
|
+
yield* createMonoRepo;
|
43
|
+
|
44
|
+
const tempPath = path.join(config.config.cwd, config.config.projectName)
|
45
|
+
const projectFiles = yield* fs.readDirectory(tempPath)
|
46
|
+
yield* Effect.forEach(
|
47
|
+
projectFiles.filter(file => file !== '.git'),
|
48
|
+
(file) => fs.copy(path.join(tempPath, file), path.join(config.config.cwd, file), { overwrite: true }),
|
49
|
+
{ discard: true }
|
50
|
+
)
|
51
|
+
yield* fs.remove(tempPath, { recursive: true })
|
52
|
+
|
53
|
+
yield* copyTemplateFiles;
|
54
|
+
yield* stringReplace(path.join(config.config.cwd, 'currents.config.ts'), ['__ProjectName__'], [config.config.projectName]);
|
55
|
+
yield* readPackageJson;
|
56
|
+
yield* setProjectName;
|
57
|
+
yield* mergeLucySettings2PackageJson;
|
58
|
+
yield* mergeAdditions;
|
59
|
+
yield* writeLucySettings;
|
60
|
+
yield* writePackageJson;
|
61
|
+
yield* gitInit();
|
62
|
+
yield* runInstall;
|
63
|
+
yield* installPackages(true);
|
64
|
+
yield* approveBuilds;
|
65
|
+
yield* cleanup;
|
66
|
+
yield* setInitialized;
|
67
|
+
|
68
|
+
logger.success("Monorepo initialized successfully!");
|
69
|
+
|
70
|
+
yield* openVSCode;
|
71
|
+
})
|
72
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { Effect } from 'effect/index';
|
2
|
+
import { logger } from '../utils/logger.js';
|
3
|
+
import { checkForVelo } from '../commands/checks.js';
|
4
|
+
import { gitInit } from '../commands/git.js';
|
5
|
+
import { installVeloPackages, runInstall } from '../commands/install.js';
|
6
|
+
import { setInitialized } from '../commands/edit.js';
|
7
|
+
|
8
|
+
export const prepareVelo = Effect.gen(function*() {
|
9
|
+
logger.action("Initializing Tauri project...");
|
10
|
+
yield* checkForVelo();
|
11
|
+
|
12
|
+
yield* gitInit(true);
|
13
|
+
yield* installVeloPackages
|
14
|
+
yield* runInstall
|
15
|
+
yield* setInitialized;
|
16
|
+
|
17
|
+
logger.success("Velo Prepared initialized successfully!");
|
18
|
+
|
19
|
+
})
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { Effect, Schema } from "effect/index"
|
2
|
+
import { logger } from "../utils/logger.js";
|
3
|
+
import { writeLucySettings } from "../commands/write.js";
|
4
|
+
import { copyTemplateFiles } from "../commands/copy.js";
|
5
|
+
import { gitInit } from "../commands/git.js";
|
6
|
+
import { checkForDirty } from "../commands/checks.js";
|
7
|
+
import { setInitialized } from "../commands/edit.js";
|
8
|
+
import { Config } from "../config.js";
|
9
|
+
import { Command, FileSystem, Path } from "@effect/platform"
|
10
|
+
import { AppError } from "../error.js";
|
11
|
+
import { approveBuilds, installPackages } from "../commands/install.js";
|
12
|
+
import { openVSCode } from "../commands/exec.js";
|
13
|
+
|
14
|
+
export const init_tauri = () => {
|
15
|
+
return Effect.gen(function*() {
|
16
|
+
const config = yield* Config;
|
17
|
+
logger.action("Initializing Tauri project...");
|
18
|
+
|
19
|
+
yield* checkForDirty();
|
20
|
+
|
21
|
+
const initTauri = Command.make("yarn", "create", "tauri-app", config.config.projectName).pipe(
|
22
|
+
Command.stdin("inherit"),
|
23
|
+
Command.stdout("inherit"),
|
24
|
+
Command.stderr("inherit"),
|
25
|
+
Command.runInShell(true),
|
26
|
+
Command.exitCode
|
27
|
+
)
|
28
|
+
if((yield* initTauri) !== 0) {
|
29
|
+
yield* Effect.fail(new AppError({ message: "Failed to initialize Tauri project. Please check the error message above.", cause: new Error("Failed to initialize Tauri project") }));
|
30
|
+
}
|
31
|
+
yield* copyTemplateFiles;
|
32
|
+
yield* installPackages();
|
33
|
+
yield* approveBuilds;
|
34
|
+
yield* writeLucySettings;
|
35
|
+
yield* gitInit();
|
36
|
+
yield* setInitialized;
|
37
|
+
|
38
|
+
logger.success("Tauri project initialized successfully!");
|
39
|
+
|
40
|
+
yield* openVSCode;
|
41
|
+
})
|
42
|
+
}
|
@@ -0,0 +1,98 @@
|
|
1
|
+
import { Effect, Schema } from "effect/index";
|
2
|
+
import { Config, lucyJsonName, lucyJsonPath } from "../config.js";
|
3
|
+
import { orange, red, green, logger } from "../utils/logger.js";
|
4
|
+
import { FileSystem } from "@effect/platform"
|
5
|
+
import path, { join } from 'path';
|
6
|
+
import fsp from 'fs/promises';
|
7
|
+
import Enquirer from 'enquirer';
|
8
|
+
import { AppError } from "../error.js";
|
9
|
+
import { lucySettings } from "../schemas/lucy.js";
|
10
|
+
import { JsonSchema } from "../schemas/index.js";
|
11
|
+
|
12
|
+
export const selectTemplate = () => {
|
13
|
+
return Effect.gen(function*() {
|
14
|
+
const config = yield* Config
|
15
|
+
const fs = yield* FileSystem.FileSystem;
|
16
|
+
const templatesPath = join(config.config.lucyHome, 'templates');
|
17
|
+
const files = yield* Effect.tryPromise({
|
18
|
+
try: () => fsp.readdir(templatesPath, { withFileTypes: true }),
|
19
|
+
catch: (e) => {
|
20
|
+
console.log((`💩 ${red.underline.bold("=> Templates folder not found at =>")} ${orange(templatesPath)}`));
|
21
|
+
return new AppError({ cause: e, message: 'Templates folder not found' });
|
22
|
+
}
|
23
|
+
})
|
24
|
+
|
25
|
+
const templateChoices: string[] = [];
|
26
|
+
for (const dirent of files) {
|
27
|
+
if (dirent.isDirectory()) {
|
28
|
+
const lucyRaw = yield* fs.readFileString(join(templatesPath, dirent.name, lucyJsonName));
|
29
|
+
const lucySettingsJSON = yield* Schema.decodeUnknown(JsonSchema)(lucyRaw);
|
30
|
+
const lucySetting = yield* Schema.decodeUnknown(lucySettings)(lucySettingsJSON)
|
31
|
+
if (lucySetting.type === config.config.action.initType) {
|
32
|
+
templateChoices.push(dirent.name);
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
if (templateChoices.length === 0) {
|
38
|
+
console.log((`💩 ${red.underline.bold("=> No templates found in =>")} ${orange(templatesPath)}`));
|
39
|
+
return;
|
40
|
+
}
|
41
|
+
|
42
|
+
const templateQuestion = new Enquirer();
|
43
|
+
const choice = yield* Effect.tryPromise({
|
44
|
+
try: () => templateQuestion.prompt({
|
45
|
+
type: 'select',
|
46
|
+
name: 'template',
|
47
|
+
message: 'Select a project template',
|
48
|
+
choices: templateChoices
|
49
|
+
}),
|
50
|
+
catch: (e) => {
|
51
|
+
return new AppError({ cause: e, message: 'Error selecting template' });
|
52
|
+
}
|
53
|
+
})
|
54
|
+
|
55
|
+
const selectedTemplate = yield* Schema.decodeUnknown(Schema.Struct({ template: Schema.String }))(choice)
|
56
|
+
const templateDir = join(templatesPath, selectedTemplate.template );
|
57
|
+
const templateFilesDir = join(templateDir, 'files');
|
58
|
+
config.config.templateDir = templateDir;
|
59
|
+
config.config.templateFiles = templateFilesDir;
|
60
|
+
|
61
|
+
const templateSettingsPath = join(templateDir, lucyJsonName);
|
62
|
+
|
63
|
+
if (!(yield* fs.exists(templateSettingsPath))) {
|
64
|
+
logger.warning((`💩 ${red.underline.bold(`Template is missing ${lucyJsonName} at =>`)} ${orange(templateSettingsPath)}`));
|
65
|
+
yield* Effect.fail(new AppError({ message: `Template is missing ${lucyJsonName}`, cause: templateSettingsPath }));
|
66
|
+
}
|
67
|
+
const lucySettingsRaw = yield* fs.readFileString(templateSettingsPath);
|
68
|
+
const newLucySettings = yield* Schema.decodeUnknown(lucySettings)(JSON.parse(lucySettingsRaw));
|
69
|
+
if( newLucySettings.type !== config.config.action.initType) return yield* Effect.fail(new AppError({
|
70
|
+
message: `Template type ${newLucySettings.type} does not match action type ${config.config.action.initType}`,
|
71
|
+
cause: newLucySettings.type
|
72
|
+
}));
|
73
|
+
if(config.config.lucySettings.initialized) {
|
74
|
+
const overwriteQuestion = new Enquirer();
|
75
|
+
|
76
|
+
const overwrite = yield* Effect.tryPromise({
|
77
|
+
try: () => overwriteQuestion.prompt({
|
78
|
+
type: 'confirm',
|
79
|
+
name: 'overwrite',
|
80
|
+
message: `Overwrite existing ${lucyJsonName} settings?`,
|
81
|
+
}),
|
82
|
+
catch: (e) => {
|
83
|
+
return new AppError({
|
84
|
+
cause: e,
|
85
|
+
message: "Error overwriting settings",
|
86
|
+
});
|
87
|
+
}
|
88
|
+
})
|
89
|
+
const choice = yield* Schema.decodeUnknown(Schema.Struct({ overwrite: Schema.Boolean }))(overwrite);
|
90
|
+
if (choice.overwrite) {
|
91
|
+
config.config.lucySettings = newLucySettings;
|
92
|
+
} else {
|
93
|
+
logger.info(`Existing ${lucyJsonName} settings will be used.`);
|
94
|
+
}
|
95
|
+
}
|
96
|
+
logger.success(`Selected template: ${green(selectedTemplate.template)}`);
|
97
|
+
});
|
98
|
+
}
|
package/src/init/velo.ts
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
import { Effect, Schema } from "effect/index"
|
2
|
+
import { Config } from "../config.js";
|
3
|
+
import { FileSystem, Path } from "@effect/platform"
|
4
|
+
import { logger } from "../utils/logger.js";
|
5
|
+
import { mergeAdditions, mergeLucySettings2PackageJson, setInitialized, setProjectName, stringReplace } from "../commands/edit.js";
|
6
|
+
import { writeLucySettings, writePackageJson } from "../commands/write.js";
|
7
|
+
import { copyTemplateFiles } from "../commands/copy.js";
|
8
|
+
import { readPackageJson } from "../commands/read.js";
|
9
|
+
import { installVeloPackages, runInstall } from "../commands/install.js";
|
10
|
+
import { cleanup } from "../commands/cleanup.js";
|
11
|
+
import { gitInit } from "../commands/git.js";
|
12
|
+
import { checkForVelo } from "../commands/checks.js";
|
13
|
+
import { AppError } from "../error.js";
|
14
|
+
import Enquirer from "enquirer";
|
15
|
+
import { prepareVelo } from "./prepareVelo.js";
|
16
|
+
import { openVSCode } from "../commands/exec.js";
|
17
|
+
|
18
|
+
export const init_velo = () => {
|
19
|
+
return Effect.gen(function*() {
|
20
|
+
const config = yield* Config;
|
21
|
+
const path = yield* Path.Path;
|
22
|
+
|
23
|
+
logger.action("Initializing Velo...");
|
24
|
+
|
25
|
+
yield* checkForVelo();
|
26
|
+
|
27
|
+
if(config.config.lucySettings.initialized && !config.config.force) {
|
28
|
+
const question = new Enquirer();
|
29
|
+
const choice = yield* Effect.tryPromise({
|
30
|
+
try: () => question.prompt({
|
31
|
+
type: 'confirm',
|
32
|
+
name: 'prepare',
|
33
|
+
message: 'Do you want to prepare the velo project?(install packages, git init)',
|
34
|
+
}),
|
35
|
+
catch: (e) => {
|
36
|
+
return new AppError({ cause: e, message: 'Error selecting template' });
|
37
|
+
}
|
38
|
+
})
|
39
|
+
const prepare = yield* Schema.decodeUnknown(Schema.Struct({ prepare: Schema.Boolean }))(choice)
|
40
|
+
if(prepare.prepare) return yield* prepareVelo
|
41
|
+
}
|
42
|
+
|
43
|
+
|
44
|
+
if(config.config.lucySettings.initialized && !config.config.force) return yield* Effect.fail(new AppError({ message: "Lucy is already initialized in this directory. Use --force to reinitialize.", cause: new Error("Lucy is already initialized in this directory") }));
|
45
|
+
if ((config.config.lucySettings.initialized && config.config.force) || (config.config.lucySettings.initialized && config.config.force)) logger.alert("Forced initialization!");
|
46
|
+
|
47
|
+
yield* copyTemplateFiles;
|
48
|
+
yield* stringReplace(path.join(config.config.cwd, 'currents.config.js'), ['__ProjectName__'], [config.config.projectName]);
|
49
|
+
yield* readPackageJson;
|
50
|
+
yield* setProjectName;
|
51
|
+
yield* mergeLucySettings2PackageJson;
|
52
|
+
yield* mergeAdditions;
|
53
|
+
yield* writeLucySettings;
|
54
|
+
yield* writePackageJson;
|
55
|
+
yield* gitInit();
|
56
|
+
yield* installVeloPackages;
|
57
|
+
yield* runInstall;
|
58
|
+
yield* cleanup;
|
59
|
+
yield* setInitialized;
|
60
|
+
|
61
|
+
logger.success("Velo initialized successfully!");
|
62
|
+
|
63
|
+
yield* openVSCode;
|
64
|
+
})
|
65
|
+
}
|
package/src/runtime.ts
CHANGED
@@ -0,0 +1,31 @@
|
|
1
|
+
import { LucySettings } from "./lucy";
|
2
|
+
import * as dartSass from 'sass';
|
3
|
+
import gulpSass from 'gulp-sass';
|
4
|
+
import backendSettings from '../../settings/backend-settings.json' with { type: "json" };;
|
5
|
+
import masterSettings from '../../settings/master-settings.json' with { type: "json" };;
|
6
|
+
import pageSettings from '../../settings/page-settings.json' with { type: "json" };;
|
7
|
+
import publicSettings from '../../settings/public-settings.json' with { type: "json" };;
|
8
|
+
|
9
|
+
const sass = gulpSass(dartSass);
|
10
|
+
|
11
|
+
export type TaskOptions = {
|
12
|
+
enableIncrementalBuild: boolean;
|
13
|
+
outputDir: string;
|
14
|
+
sass: ReturnType<typeof gulpSass>;
|
15
|
+
replaceOptions: {
|
16
|
+
logs: {
|
17
|
+
enabled: boolean;
|
18
|
+
}
|
19
|
+
};
|
20
|
+
backendSettings: typeof backendSettings,
|
21
|
+
masterSettings: typeof masterSettings,
|
22
|
+
pageSettings: typeof pageSettings,
|
23
|
+
publicSettings: typeof publicSettings,
|
24
|
+
modulesSourcePaths: string[];
|
25
|
+
cwd: string;
|
26
|
+
}
|
27
|
+
|
28
|
+
export interface File {
|
29
|
+
path: string;
|
30
|
+
dirname: string;
|
31
|
+
}
|
package/src/schemas/index.ts
CHANGED
@@ -1,3 +1,15 @@
|
|
1
1
|
import { Schema } from "effect/index";
|
2
2
|
|
3
|
-
export const JsonSchema = Schema.parseJson()
|
3
|
+
export const JsonSchema = Schema.parseJson()
|
4
|
+
|
5
|
+
export const veloSyncSettings = Schema.Struct({
|
6
|
+
siteUrl: Schema.String,
|
7
|
+
secret: Schema.String,
|
8
|
+
});
|
9
|
+
export type VeloSyncSettings = typeof veloSyncSettings.Type;
|
10
|
+
|
11
|
+
export const wixSDKSettings = Schema.Struct({
|
12
|
+
apiKey: Schema.String,
|
13
|
+
siteId: Schema.String,
|
14
|
+
});
|
15
|
+
export type WixSDKSettings = typeof wixSDKSettings.Type;
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import { Schema } from "effect/index";
|
2
|
+
import { initTypes } from "./types.js";
|
3
|
+
|
4
|
+
export const pkgManagers = ['pnpm', 'npm', 'yarn'] as const;
|
5
|
+
export const lucySettings = Schema.mutable(Schema.Struct({
|
6
|
+
modules: Schema.Record({
|
7
|
+
key: Schema.String,
|
8
|
+
value: Schema.Struct({
|
9
|
+
source: Schema.String,
|
10
|
+
branch: Schema.String,
|
11
|
+
path: Schema.optional(Schema.String),
|
12
|
+
noCompile: Schema.optional(Schema.Boolean),
|
13
|
+
})}),
|
14
|
+
veloSettings: Schema.optional(Schema.NullOr(Schema.Struct({
|
15
|
+
compilerOptions: Schema.optional(Schema.Struct({
|
16
|
+
composite: Schema.Boolean,
|
17
|
+
noEmit: Schema.Boolean,
|
18
|
+
lib: Schema.Array(Schema.String),
|
19
|
+
jsx: Schema.String,
|
20
|
+
})),
|
21
|
+
exclude: Schema.optional(Schema.Array(Schema.String)),
|
22
|
+
}))),
|
23
|
+
initialized: Schema.Boolean,
|
24
|
+
type: Schema.Literal(...initTypes),
|
25
|
+
dependencies: Schema.mutable(Schema.Record({
|
26
|
+
key: Schema.String,
|
27
|
+
value: Schema.String,
|
28
|
+
})),
|
29
|
+
devDependencies: Schema.mutable(Schema.Record({
|
30
|
+
key: Schema.String,
|
31
|
+
value: Schema.String,
|
32
|
+
})),
|
33
|
+
scripts: Schema.Record({
|
34
|
+
key: Schema.String,
|
35
|
+
value: Schema.String,
|
36
|
+
}),
|
37
|
+
additionalCommands: Schema.optional(Schema.Array(Schema.Array(Schema.String))),
|
38
|
+
additionalPkgProps: Schema.optional(Schema.Object),
|
39
|
+
packageManager: Schema.mutable(Schema.Literal(...pkgManagers)),
|
40
|
+
defaultModulePath: Schema.optional(Schema.String),
|
41
|
+
}));
|
42
|
+
|
43
|
+
export type LucySettings = typeof lucySettings.Type;
|
package/src/schemas/types.ts
CHANGED
@@ -0,0 +1,40 @@
|
|
1
|
+
export const initTypes = ["velo", "expo", "blocks", "monorepo", "tauri", "cargo", 'submodules', 'wix-sdk'] as const;
|
2
|
+
export const taskNames = ["dev", "build", "build-prod", "build-pipeline", "sync-settings"] as const;
|
3
|
+
export const syncActions = ["sync", "import", "init", "is-alive", "migrate", "export"] as const;
|
4
|
+
export const WixSDKActions = ["init", ""] as const;
|
5
|
+
export type Action = 'init' | 'open' | 'task' | 'wix-sync';
|
6
|
+
import gulp from 'gulp';
|
7
|
+
|
8
|
+
export type SyncTaskType = (filename: string, collection: string, schemaFilename: string, importOnly: boolean, dryrun: boolean) => Promise<void>;
|
9
|
+
export type MigrateFileCache = () => Promise<void>;
|
10
|
+
export type TaskType = ReturnType< typeof gulp.parallel>
|
11
|
+
|
12
|
+
export type Actions = {
|
13
|
+
action: Action;
|
14
|
+
initType?: typeof initTypes[number];
|
15
|
+
tasksName?: typeof taskNames[number];
|
16
|
+
syncAction?: typeof syncActions[number];
|
17
|
+
wixSDKAction?: typeof WixSDKActions[number];
|
18
|
+
}
|
19
|
+
|
20
|
+
export interface LucyArgs {
|
21
|
+
[x: string]: unknown;
|
22
|
+
// This will hold the command used, e.g., 'init'
|
23
|
+
_: Action[];
|
24
|
+
$0: string;
|
25
|
+
// Arguments for the 'init' command
|
26
|
+
initType?: Actions['initType'];
|
27
|
+
tasksName?: Actions['tasksName'];
|
28
|
+
syncAction?: Actions['syncAction'];
|
29
|
+
wixSDKAction?: Actions['wixSDKAction'];
|
30
|
+
// wix-sync options
|
31
|
+
input?: string; // Alias for -f
|
32
|
+
collection?: string; // Alias for -c
|
33
|
+
schema?: string; // Alias for -s
|
34
|
+
d?: boolean;
|
35
|
+
}
|
36
|
+
|
37
|
+
export interface VeloSyncConfig {
|
38
|
+
siteUrl: string;
|
39
|
+
secret: string;
|
40
|
+
}
|