lucy-cli 2.0.0-alpha.7 → 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 -1
- 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/.env +0 -1
- 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,34 @@
|
|
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 './index.js';
|
7
|
+
export type TaskOptions = {
|
8
|
+
moduleSettings?: ModuleSettings;
|
9
|
+
projectSettings?: ProjectSettings;
|
10
|
+
enableIncrementalBuild: boolean;
|
11
|
+
outputDir: string;
|
12
|
+
sass: ReturnType<typeof gulpSass>;
|
13
|
+
userHomeDir: string;
|
14
|
+
replaceOptions: typeof replaceOptions;
|
15
|
+
backendSettings: typeof backendSettings;
|
16
|
+
masterSettings: typeof masterSettings;
|
17
|
+
pageSettings: typeof pageSettings;
|
18
|
+
publicSettings: typeof publicSettings;
|
19
|
+
modulesSync: Record<string, string> | undefined;
|
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 function runTask(task: string, moduleSettings: ModuleSettings, projectSettings: ProjectSettings): Promise<void>;
|
34
|
+
export {};
|
package/old/Gulpfile.js
ADDED
@@ -0,0 +1,116 @@
|
|
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 backendSettings from '../settings/backend-settings.json' with { type: "json" };
|
7
|
+
;
|
8
|
+
import masterSettings from '../settings/master-settings.json' with { type: "json" };
|
9
|
+
;
|
10
|
+
import pageSettings from '../settings/page-settings.json' with { type: "json" };
|
11
|
+
;
|
12
|
+
import publicSettings from '../settings/public-settings.json' with { type: "json" };
|
13
|
+
;
|
14
|
+
import { buildPublic } from './gulp/public.js';
|
15
|
+
import { buildBackend, buildBackendJSW } from './gulp/backend.js';
|
16
|
+
import { checkPages, checkTs } from './gulp/checks.js';
|
17
|
+
import { compileScss } from './gulp/styles.js';
|
18
|
+
import { buildPages } from './gulp/pages.js';
|
19
|
+
import { previewTemplates } from './gulp/templates.js';
|
20
|
+
import { copyFiles } from './gulp/copy.js';
|
21
|
+
import { cleanSrc, cleanWix } from './gulp/clean.js';
|
22
|
+
import { addTypes, updateWixTypes } from './gulp/types.js';
|
23
|
+
import { setProdConfig } from './gulp/pipeline.js';
|
24
|
+
import { watchAll } from './gulp/watchers.js';
|
25
|
+
import { blue, green, magenta, orange, red } from './index.js';
|
26
|
+
import { getModulesSourcePaths, getModulesSync } from './gulp/helpers.js';
|
27
|
+
const sass = gulpSass(dartSass);
|
28
|
+
const outputDir = './src';
|
29
|
+
const userHomeDir = os.homedir();
|
30
|
+
const replaceOptions = {
|
31
|
+
logs: {
|
32
|
+
enabled: false
|
33
|
+
}
|
34
|
+
};
|
35
|
+
const taskOptions = {
|
36
|
+
enableIncrementalBuild: false,
|
37
|
+
outputDir,
|
38
|
+
sass,
|
39
|
+
userHomeDir,
|
40
|
+
pageSettings,
|
41
|
+
publicSettings,
|
42
|
+
backendSettings,
|
43
|
+
masterSettings,
|
44
|
+
replaceOptions,
|
45
|
+
cwd: process.cwd(),
|
46
|
+
modulesSync: getModulesSync(),
|
47
|
+
modulesSourcePaths: getModulesSourcePaths(),
|
48
|
+
};
|
49
|
+
const watchTaskOptions = { ...taskOptions, isWatching: true };
|
50
|
+
gulp.task('check-ts', gulp.parallel(checkTs(taskOptions)));
|
51
|
+
gulp.task('scss', gulp.parallel(compileScss(taskOptions)));
|
52
|
+
gulp.task('build-backend', gulp.parallel(buildBackend(taskOptions), buildBackendJSW(taskOptions)));
|
53
|
+
gulp.task('build-public', gulp.parallel(buildPublic(taskOptions)));
|
54
|
+
gulp.task('preview-templates', gulp.parallel(previewTemplates(taskOptions)));
|
55
|
+
gulp.task('copy-files', gulp.parallel(copyFiles(taskOptions)));
|
56
|
+
gulp.task('test', function () {
|
57
|
+
return shell.task(['yarn test'], { ignoreErrors: true })().then(() => {
|
58
|
+
console.log("🐕" + blue.underline.bold(' => Exited test task!'));
|
59
|
+
}).catch(err => {
|
60
|
+
console.log("💩" + red.underline.bold(' => Error in test task!'));
|
61
|
+
});
|
62
|
+
});
|
63
|
+
gulp.task('test-ci', function () {
|
64
|
+
return shell.task(['yarn test --run'], { ignoreErrors: true })().then(() => {
|
65
|
+
console.log("🐕" + blue.underline.bold(' => Exited test task!'));
|
66
|
+
}).catch(err => {
|
67
|
+
console.log("💩" + red.underline.bold(' => Error in test task!'));
|
68
|
+
});
|
69
|
+
});
|
70
|
+
gulp.task('sync-types', shell.task([
|
71
|
+
'yarn postinstall',
|
72
|
+
]));
|
73
|
+
gulp.task('fix-wixtypes', gulp.parallel(updateWixTypes(taskOptions)));
|
74
|
+
gulp.task('add-wix-types', function (done) {
|
75
|
+
return addTypes(taskOptions, done);
|
76
|
+
});
|
77
|
+
gulp.task('set-production', gulp.parallel(setProdConfig()));
|
78
|
+
gulp.task('start-wix', shell.task([
|
79
|
+
'yarn wix:dev',
|
80
|
+
]));
|
81
|
+
gulp.task('gen-docs', shell.task([
|
82
|
+
'yarn docs',
|
83
|
+
]));
|
84
|
+
gulp.task('fix-wix', gulp.series(cleanWix(), 'sync-types', 'fix-wixtypes', 'add-wix-types'));
|
85
|
+
gulp.task('build', gulp.parallel('build-backend', 'build-public', 'preview-templates', buildPages(taskOptions), compileScss(taskOptions), 'copy-files'));
|
86
|
+
gulp.task('build-pipeline', gulp.series(cleanSrc(taskOptions), 'set-production', 'check-ts', 'fix-wixtypes', 'add-wix-types', 'test-ci', 'build'));
|
87
|
+
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)));
|
88
|
+
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))));
|
89
|
+
gulp.task('dev', gulp.series(cleanSrc(taskOptions), 'fix-wix', 'build', 'start-dev-env'));
|
90
|
+
async function gulpTaskRunner(task) {
|
91
|
+
return new Promise(function (resolve, reject) {
|
92
|
+
gulp.series(task, (done) => {
|
93
|
+
resolve(true);
|
94
|
+
done();
|
95
|
+
})(function (err) {
|
96
|
+
if (err) {
|
97
|
+
console.log((`💩 ${red.underline.bold("=> Error starting tasks =>")} ${orange(err)}`));
|
98
|
+
reject(err);
|
99
|
+
}
|
100
|
+
});
|
101
|
+
});
|
102
|
+
}
|
103
|
+
export async function runTask(task, moduleSettings, projectSettings) {
|
104
|
+
taskOptions.cwd = moduleSettings.targetFolder;
|
105
|
+
taskOptions.moduleSettings = moduleSettings;
|
106
|
+
taskOptions.projectSettings = projectSettings;
|
107
|
+
console.log("🐕" + magenta.underline(' => Starting Task => ' + orange(task)));
|
108
|
+
try {
|
109
|
+
await gulpTaskRunner(task);
|
110
|
+
}
|
111
|
+
catch (err) {
|
112
|
+
console.log((`💩 ${red.underline.bold("=> Error starting tasks =>")} ${orange(err)}`));
|
113
|
+
}
|
114
|
+
console.log("🐶" + green.underline.bold(' => Task completed: ' + task));
|
115
|
+
}
|
116
|
+
//# sourceMappingURL=Gulpfile.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Gulpfile.js","sourceRoot":"","sources":["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;AAEjC,OAAO,eAAe,MAAM,mCAAmC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAAA,CAAC;AACvF,OAAO,cAAc,MAAM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CAAC,SAAS,CAAC,uBAAuB,GAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC/E,IAAI,CAAC;QACL,MAAM,cAAc,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,4BAA4B,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IACxF,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAAC,CAAC;AACzE,CAAC"}
|
@@ -0,0 +1,92 @@
|
|
1
|
+
import gulp from 'gulp';
|
2
|
+
import rename from 'gulp-rename';
|
3
|
+
import * as path from 'path';
|
4
|
+
import { blue, orange, red } from '../index.js';
|
5
|
+
import swc from 'gulp-swc';
|
6
|
+
const swcOptions = {
|
7
|
+
jsc: {
|
8
|
+
target: 'es2020',
|
9
|
+
parser: {
|
10
|
+
syntax: "typescript",
|
11
|
+
tsx: true,
|
12
|
+
decorators: true,
|
13
|
+
// preserveAllComments: true
|
14
|
+
},
|
15
|
+
preserveAllComments: false,
|
16
|
+
minify: {
|
17
|
+
compress: true // equivalent to {}
|
18
|
+
}
|
19
|
+
},
|
20
|
+
};
|
21
|
+
export function buildBackend(options) {
|
22
|
+
const folders = ['typescript', ...options.modulesSourcePaths];
|
23
|
+
const { outputDir } = options;
|
24
|
+
// Create tasks for each folder
|
25
|
+
const tasks = folders.map((folder) => {
|
26
|
+
const taskName = `build_Backend-${folder}`; // Create a unique name for each task
|
27
|
+
const task = () => gulp.src([
|
28
|
+
`${folder}/backend/**/*.ts`,
|
29
|
+
`${folder}/backend/**/*.tsx`,
|
30
|
+
`!${folder}/backend/**/*.jsw.ts`,
|
31
|
+
`!${folder}/backend/**/*.spec.ts`,
|
32
|
+
])
|
33
|
+
.pipe(swc(swcOptions))
|
34
|
+
.on('error', function (e) {
|
35
|
+
console.log("💩" + red.underline.bold(` => Build of Backend files for ${orange(folder)} failed!`));
|
36
|
+
console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
|
37
|
+
this.emit('end');
|
38
|
+
})
|
39
|
+
.pipe(gulp.dest(path.join(outputDir, 'backend')))
|
40
|
+
.on('error', function (e) {
|
41
|
+
console.log("💩" + red.underline.bold(` => Build of Backend files for ${orange(folder)} failed!`));
|
42
|
+
console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
|
43
|
+
this.emit('end');
|
44
|
+
})
|
45
|
+
.on('end', function () {
|
46
|
+
console.log("🐶" + blue.underline(` => Build of Backend files for ${orange(folder)} succeeded!`));
|
47
|
+
});
|
48
|
+
// Register the task with Gulp
|
49
|
+
Object.defineProperty(task, 'name', { value: taskName }); // Set a unique name for debugging
|
50
|
+
return task;
|
51
|
+
});
|
52
|
+
// Run all tasks in parallel
|
53
|
+
return gulp.parallel(...tasks);
|
54
|
+
}
|
55
|
+
export function buildBackendJSW(options) {
|
56
|
+
const folders = ['typescript', ...options.modulesSourcePaths];
|
57
|
+
const swcOptions = {
|
58
|
+
jsc: {
|
59
|
+
target: 'es6',
|
60
|
+
},
|
61
|
+
};
|
62
|
+
const { outputDir } = options;
|
63
|
+
// Create tasks for each folder
|
64
|
+
const tasks = folders.map((folder) => {
|
65
|
+
const taskName = `build-${folder}`; // Create a unique name for each task
|
66
|
+
const task = () => gulp.src([
|
67
|
+
`${folder}/backend/**/*.jsw.ts`,
|
68
|
+
])
|
69
|
+
.pipe(swc(swcOptions))
|
70
|
+
.on('error', function (e) {
|
71
|
+
console.log("💩" + red.underline.bold(` => Build of Public files for ${orange(folder)} failed!`));
|
72
|
+
console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
|
73
|
+
this.emit('end');
|
74
|
+
})
|
75
|
+
.pipe(rename({ extname: '' }))
|
76
|
+
.pipe(gulp.dest(path.join(outputDir, 'backend')))
|
77
|
+
.on('error', function (e) {
|
78
|
+
console.log("💩" + red.underline.bold(` => Build of JSW files for ${orange(folder)} failed!`));
|
79
|
+
console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
|
80
|
+
this.emit('end');
|
81
|
+
})
|
82
|
+
.on('end', function () {
|
83
|
+
console.log("🐶" + blue.underline(` => Build of JSW files for ${orange(folder)} succeeded!`));
|
84
|
+
});
|
85
|
+
// Register the task with Gulp
|
86
|
+
Object.defineProperty(task, 'name', { value: taskName }); // Set a unique name for debugging
|
87
|
+
return task;
|
88
|
+
});
|
89
|
+
// Run all tasks in parallel
|
90
|
+
return gulp.parallel(...tasks);
|
91
|
+
}
|
92
|
+
//# sourceMappingURL=backend.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"backend.js","sourceRoot":"","sources":["backend.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,GAAG,MAAM,UAAU,CAAC;AAG3B,MAAM,UAAU,GAAG;IACf,GAAG,EAAE;QACD,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACJ,MAAM,EAAE,YAAY;YACpB,GAAG,EAAE,IAAI;YACT,UAAU,EAAE,IAAI;YAChB,4BAA4B;SAC/B;QACD,mBAAmB,EAAE,KAAK;QAC1B,MAAM,EAAE;YACJ,QAAQ,EAAE,IAAI,CAAC,mBAAmB;SACrC;KACJ;CACJ,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,OAAoB;IAC7C,MAAM,OAAO,GAAG,CAAC,YAAY,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAE9D,MAAM,EAAE,SAAS,EAAE,GA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@@
|
|
1
|
+
import * as fs from 'fs';
|
2
|
+
import glob from 'glob';
|
3
|
+
import * as path from 'path';
|
4
|
+
import gulp from 'gulp';
|
5
|
+
import ts from 'gulp-typescript';
|
6
|
+
import { blue, green, magenta, orange, red, yellow } from '../index.js';
|
7
|
+
// /**
|
8
|
+
// * Extracts a match from a file
|
9
|
+
// * @param {string} filePath File path
|
10
|
+
// * @param {string} pattern Pattern to match
|
11
|
+
// */
|
12
|
+
// function extractMatchFromFile(filePath: string, pattern: string) {
|
13
|
+
// return new Promise((resolve, reject) => {
|
14
|
+
// fs.readFile(filePath, 'utf8', (err, data) => {
|
15
|
+
// if (err){
|
16
|
+
// reject(err);
|
17
|
+
// return;
|
18
|
+
// }
|
19
|
+
// const regex = new RegExp(pattern);
|
20
|
+
// const match = regex.exec(data);
|
21
|
+
// const capturedGroup = match ? match.groups?.page : null;
|
22
|
+
// resolve(capturedGroup);
|
23
|
+
// });
|
24
|
+
// });
|
25
|
+
// }
|
26
|
+
// async function readFilesInFolder(folderPath: string, pattern: string | null, globPattern: string): Promise<Object[]> {
|
27
|
+
// const files = await glob(path.join(folderPath, globPattern));
|
28
|
+
// const filenameList: Object[] = [];
|
29
|
+
// for (const file of files) {
|
30
|
+
// if (pattern) {
|
31
|
+
// const capturedGroup = await extractMatchFromFile(file, pattern);
|
32
|
+
// if (capturedGroup) {
|
33
|
+
// filenameList.push(capturedGroup);
|
34
|
+
// }
|
35
|
+
// } else {
|
36
|
+
// filenameList.push(path.basename(file));
|
37
|
+
// }
|
38
|
+
// }
|
39
|
+
// return filenameList;
|
40
|
+
// }
|
41
|
+
/**
|
42
|
+
* Extracts a match from a file
|
43
|
+
* @param {string} filePath File path
|
44
|
+
* @param {string} pattern Pattern to match
|
45
|
+
*/
|
46
|
+
function extractMatchFromFile(filePath, pattern) {
|
47
|
+
return new Promise((resolve, reject) => {
|
48
|
+
fs.readFile(filePath, 'utf8', (err, data) => {
|
49
|
+
if (err) {
|
50
|
+
reject(err);
|
51
|
+
return;
|
52
|
+
}
|
53
|
+
const regex = new RegExp(pattern);
|
54
|
+
const match = regex.exec(data);
|
55
|
+
const capturedGroup = match ? match.groups?.page : null;
|
56
|
+
resolve(capturedGroup);
|
57
|
+
});
|
58
|
+
});
|
59
|
+
}
|
60
|
+
/**
|
61
|
+
* Reads files in a folder
|
62
|
+
* @param {string} folderPath Folder path
|
63
|
+
* @param {string} pattern Pattern to match
|
64
|
+
* @param {string} globPattern Glob pattern
|
65
|
+
*/
|
66
|
+
function readFilesInFolder(folderPath, pattern, globPattern) {
|
67
|
+
return new Promise((resolve, reject) => {
|
68
|
+
glob(path.join(folderPath, globPattern), (err, files) => {
|
69
|
+
if (err) {
|
70
|
+
reject(err);
|
71
|
+
return;
|
72
|
+
}
|
73
|
+
const filenameList = [];
|
74
|
+
/**
|
75
|
+
* Traverse files
|
76
|
+
* @param {number} index Index
|
77
|
+
*/
|
78
|
+
function traverseFiles(index) {
|
79
|
+
if (index === files.length) {
|
80
|
+
resolve(filenameList);
|
81
|
+
return;
|
82
|
+
}
|
83
|
+
const file = files[index];
|
84
|
+
if (pattern) {
|
85
|
+
if (!file)
|
86
|
+
return;
|
87
|
+
extractMatchFromFile(file, pattern)
|
88
|
+
.then((capturedGroup) => {
|
89
|
+
if (capturedGroup) {
|
90
|
+
filenameList.push(capturedGroup);
|
91
|
+
}
|
92
|
+
traverseFiles(index + 1);
|
93
|
+
})
|
94
|
+
.catch(reject);
|
95
|
+
}
|
96
|
+
if (!pattern) {
|
97
|
+
if (!file)
|
98
|
+
return;
|
99
|
+
filenameList.push(path.basename(file));
|
100
|
+
traverseFiles(index + 1);
|
101
|
+
}
|
102
|
+
}
|
103
|
+
traverseFiles(0);
|
104
|
+
});
|
105
|
+
});
|
106
|
+
}
|
107
|
+
export async function checkPages(fail, force) {
|
108
|
+
console.log("🐕" + green.underline.bold(' => Checking pages...'));
|
109
|
+
return new Promise(async (resolve, reject) => {
|
110
|
+
try {
|
111
|
+
const sourcePages = await readFilesInFolder('./.wix/types/', '\\/pages\\/(?<page>.*\\.ts)', '**/*.json');
|
112
|
+
const tsPages = await readFilesInFolder('./typescript/pages', null, '**/*.ts');
|
113
|
+
const sourcePagesSet = new Set(sourcePages);
|
114
|
+
const tsPagesSet = new Set(tsPages);
|
115
|
+
const missingInTs = Array.from(sourcePagesSet).filter((item) => !tsPages.includes(item));
|
116
|
+
const obsoleteInTs = Array.from(tsPagesSet).filter((item) => !sourcePages.includes(item));
|
117
|
+
if (missingInTs.length > 0) {
|
118
|
+
if (!force) {
|
119
|
+
console.log("💩" + red.underline.bold(' => Missing pages in ts folder: '), '\n', missingInTs);
|
120
|
+
}
|
121
|
+
if (force) {
|
122
|
+
for (const page of missingInTs) {
|
123
|
+
console.log("🐶" + magenta.underline.bold(' => Creating missing page: '), page);
|
124
|
+
fs.writeFileSync(`./typescript/pages/${page}`, '');
|
125
|
+
}
|
126
|
+
}
|
127
|
+
}
|
128
|
+
if (obsoleteInTs.length > 0) {
|
129
|
+
if (!force) {
|
130
|
+
console.log("🦴" + yellow.underline.bold(' => Obsolete in ts folder'), '\n', obsoleteInTs);
|
131
|
+
}
|
132
|
+
if (force) {
|
133
|
+
for (const page of obsoleteInTs) {
|
134
|
+
console.log("🐶" + magenta.underline.bold(' => Deleting obsolete page: '), page);
|
135
|
+
fs.rmSync(`./typescript/pages/${page}`);
|
136
|
+
}
|
137
|
+
}
|
138
|
+
}
|
139
|
+
if (missingInTs.length === 0 && obsoleteInTs.length === 0) {
|
140
|
+
console.log("🐶" + blue.underline.bold(' => Pages are in-sync!'));
|
141
|
+
}
|
142
|
+
else if (fail) {
|
143
|
+
process.exit(1);
|
144
|
+
}
|
145
|
+
;
|
146
|
+
}
|
147
|
+
catch (error) {
|
148
|
+
reject(error);
|
149
|
+
}
|
150
|
+
});
|
151
|
+
}
|
152
|
+
const customReporter = {
|
153
|
+
error: (error, tsInstance) => {
|
154
|
+
if (!error.diagnostic) {
|
155
|
+
console.log(red(error.message));
|
156
|
+
return;
|
157
|
+
}
|
158
|
+
const { fullFilename, startPosition } = error;
|
159
|
+
const relativePath = path.relative(process.cwd(), fullFilename ?? '');
|
160
|
+
const line = startPosition ? startPosition.line + 1 : 0;
|
161
|
+
const col = startPosition ? startPosition.character + 1 : 0;
|
162
|
+
const message = tsInstance.flattenDiagnosticMessageText(error.diagnostic.messageText, '\n');
|
163
|
+
console.log(`${blue.underline(relativePath)}:${yellow(String(line))}:${yellow(String(col))}`);
|
164
|
+
console.log(` ${red('error')} ${yellow(`TS${error.diagnostic.code}`)}: ${message}`);
|
165
|
+
},
|
166
|
+
finish: (results) => {
|
167
|
+
const errorCount = results.transpileErrors + results.semanticErrors + results.declarationErrors;
|
168
|
+
if (errorCount > 0) {
|
169
|
+
console.log(`\n💥 ${red.bold(`Found ${errorCount} error${errorCount > 1 ? 's' : ''}.`)}`);
|
170
|
+
}
|
171
|
+
},
|
172
|
+
};
|
173
|
+
export function checkTs(options) {
|
174
|
+
const folders = ['typescript', ...options.modulesSourcePaths];
|
175
|
+
// Create tasks for each folder
|
176
|
+
const tasks = folders.map((folder) => {
|
177
|
+
const tsProject = ts.createProject(`./local.tsconfig.json`, { noEmit: true, declaration: false, skipDefaultLibCheck: true });
|
178
|
+
const taskName = `test-${folder}`; // Create a unique name for each task
|
179
|
+
const task = () => {
|
180
|
+
let hasError = false;
|
181
|
+
const stream = gulp.src([`${folder}/**/*.ts`, `!${folder}/types/**/*.ts`])
|
182
|
+
.pipe(tsProject(customReporter))
|
183
|
+
.on('error', () => {
|
184
|
+
hasError = true;
|
185
|
+
});
|
186
|
+
if (options.isWatching) {
|
187
|
+
stream.on('error', function () {
|
188
|
+
this.emit('end');
|
189
|
+
});
|
190
|
+
}
|
191
|
+
stream.on('end', () => {
|
192
|
+
if (!hasError) {
|
193
|
+
console.log("🐶" + blue.underline(` => Typescriptcheck for ${orange(folder)} succeeded!`));
|
194
|
+
}
|
195
|
+
});
|
196
|
+
return stream;
|
197
|
+
};
|
198
|
+
// Register the task with Gulp
|
199
|
+
Object.defineProperty(task, 'name', { value: taskName }); // Set a unique name for debugging
|
200
|
+
return task;
|
201
|
+
});
|
202
|
+
// Run all tasks in parallel
|
203
|
+
return gulp.parallel(...tasks);
|
204
|
+
}
|
205
|
+
//# sourceMappingURL=checks.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"checks.js","sourceRoot":"","sources":["checks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGxE,MAAM;AACN,mCAAmC;AACnC,wCAAwC;AACxC,8CAA8C;AAC9C,MAAM;AACN,qEAAqE;AACrE,6CAA6C;AAC7C,mDAAmD;AACnD,eAAe;AACf,mBAAmB;AAEnB,cAAc;AACd,OAAO;AACP,wCAAwC;AACxC,qCAAqC;AACrC,8DAA8D;AAC9D,6BAA6B;AAC7B,QAAQ;AACR,OAAO;AACP,IAAI;AAEJ,yHAAyH;AACzH,oEAAoE;AACpE,yCAAyC;AAEzC,kCAAkC;AAClC,yBAAyB;AACzB,+EAA+E;AAC/E,mCAAmC;AACnC,oDAAoD;AACpD,gBAAgB;AAChB,mBAAmB;AACnB,sDAAsD;AACtD,YAAY;AACZ,QAAQ;AAER,2BAA2B;AAC3B,IAAI;AAEJ;;;;GAIG;AACH,SAAS,oBAAoB,CAAC,QAAgB,EAAE,OAAe;IAC9D,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACtC,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC,G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G,MAAM,UAAU,EAAE,IAAI,MAAM,gBAAgB,CAAC,CAAC;iBACrE,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;iBAC/B,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;gBACd,QAAQ,GAAG,IAAI,CAAC;YACpB,CAAC,CAAC,CAAC;YAEP,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;gBACrB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE;oBACf,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACrB,CAAC,CAAC,CAAC;YACP,CAAC;YAED,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;gBAClB,IAAI,CAAC,QAAQ,EAAE,CAAC;oBACZ,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,2BAA2B,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;gBAC/F,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC;QAClB,CAAC,CAAC;QAEF,8BAA8B;QAC9B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,kCAAkC;QAC5F,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC,CAAC;IAEH,4BAA4B;IAC5B,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,CAAC;AACnC,CAAC"}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import gulp from 'gulp';
|
2
|
+
import clean from 'gulp-clean';
|
3
|
+
import { blue, orange, red } from '../index.js';
|
4
|
+
export function cleanWix() {
|
5
|
+
return () => {
|
6
|
+
return gulp.src('./.wix', { read: false, allowEmpty: true })
|
7
|
+
.pipe(clean({ force: true }))
|
8
|
+
.on('error', function (e) {
|
9
|
+
console.log("💩" + red.underline.bold(' => Cleaning of .wix failed!'));
|
10
|
+
console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
|
11
|
+
this.emit('end');
|
12
|
+
})
|
13
|
+
.on('end', function () { console.log("🐶" + blue.underline(' => Cleaning of .wix succeeded!')); });
|
14
|
+
};
|
15
|
+
}
|
16
|
+
export function cleanSrc(options) {
|
17
|
+
const { outputDir } = options;
|
18
|
+
return () => {
|
19
|
+
return gulp.src([`${outputDir}/pages`, `${outputDir}/public`, `${outputDir}/backend`], { read: false, allowEmpty: true })
|
20
|
+
.pipe(clean({ force: true }))
|
21
|
+
.on('error', function (e) {
|
22
|
+
console.log("💩" + red.underline.bold('Cleaning of output files failed!'));
|
23
|
+
console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
|
24
|
+
this.emit('end');
|
25
|
+
})
|
26
|
+
.on('end', function () { console.log("🐶" + blue.underline(' => Cleaning of .src succeeded!')); });
|
27
|
+
};
|
28
|
+
}
|
29
|
+
//# sourceMappingURL=clean.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"clean.js","sourceRoot":"","sources":["clean.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,UAAU,QAAQ;IACpB,OAAO,GAAG,EAAE;QACR,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;aACjE,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;aAC5B,EAAE,CAAC,OAAO,EAAE,UAAU,CAAQ;YAC9B,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;YACvE,OAAO,CAAC,GAAG,CAAC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ACnG,CAAC,CAAA;AACF,CAAC"}
|
package/old/gulp/copy.js
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
import gulp from 'gulp';
|
2
|
+
import { blue, orange, red } from '../index.js';
|
3
|
+
export function copyFiles(options) {
|
4
|
+
const folders = ['typescript', ...options.modulesSourcePaths];
|
5
|
+
// Create tasks for each folder
|
6
|
+
const tasks = folders.map((folder) => {
|
7
|
+
const { outputDir } = options;
|
8
|
+
const taskName = `copy-${folder}`; // Create a unique name for each task
|
9
|
+
const task = () => gulp.src([
|
10
|
+
`${folder}/**/*`,
|
11
|
+
`!${folder}/*tsconfig.json`,
|
12
|
+
`!${folder}/**/*.ts`,
|
13
|
+
`!${folder}/**/*.tsx`,
|
14
|
+
`!${folder}/types/**/**`,
|
15
|
+
`!${folder}/__mocks__/**/**`,
|
16
|
+
`!${folder}/styles/**`,
|
17
|
+
])
|
18
|
+
.pipe(gulp.dest(outputDir))
|
19
|
+
.on('error', function (e) {
|
20
|
+
console.log("💩" + red.underline.bold(` => Copy of files for ${orange(folder)} failed!`));
|
21
|
+
console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
|
22
|
+
this.emit('end');
|
23
|
+
})
|
24
|
+
.on('end', function () {
|
25
|
+
console.log("🐶" + blue.underline(` => Copy of files for ${orange(folder)} succeeded!`));
|
26
|
+
});
|
27
|
+
// Register the task with Gulp
|
28
|
+
Object.defineProperty(task, 'name', { value: taskName }); // Set a unique name for debugging
|
29
|
+
return task;
|
30
|
+
});
|
31
|
+
// Run all tasks in parallel
|
32
|
+
return gulp.parallel(...tasks);
|
33
|
+
}
|
34
|
+
//# sourceMappingURL=copy.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"copy.js","sourceRoot":"","sources":["copy.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAEhD,MA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CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,kCAAkC;QAC5F,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC,CAAC;IAEH,4BAA4B;IAC5B,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,CAAC;AACnC,CAAC"}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import * as path from 'path';
|
2
|
+
import * as fs from 'fs';
|
3
|
+
export function getModulesSync() {
|
4
|
+
const absolutePath = path.resolve('./lucy.json');
|
5
|
+
const fileContent = fs.readFileSync(absolutePath, 'utf8');
|
6
|
+
return JSON.parse(fileContent).modules;
|
7
|
+
}
|
8
|
+
export function getModulesSourcePaths() {
|
9
|
+
const absolutePath = path.resolve('./lucy.json');
|
10
|
+
const fileContent = fs.readFileSync(absolutePath, 'utf8');
|
11
|
+
const data = JSON.parse(fileContent).modules;
|
12
|
+
const paths = [];
|
13
|
+
for (const module of Object.keys(data)) {
|
14
|
+
if (!data[module].noCompile) {
|
15
|
+
if (data[module].path) {
|
16
|
+
paths.push(data[module].path);
|
17
|
+
}
|
18
|
+
else {
|
19
|
+
paths.push(module);
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
return paths;
|
24
|
+
}
|
25
|
+
//# sourceMappingURL=helpers.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB,MAAM,UAAU,cAAc;IAC1B,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACjD,MAAM,WAAW,GAAG,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAQ,CAAC;IACjE,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC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