lucy-cli 2.0.0-beta.1 → 2.0.0-beta.10
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/.cursorignore +4 -0
- package/.wix/debug.log +10 -0
- package/README.md +117 -102
- package/dist/args.js +41 -1
- package/dist/args.js.map +1 -1
- package/dist/commands/exec.d.ts +2 -2
- package/dist/commands/exec.js +15 -13
- package/dist/commands/exec.js.map +1 -1
- package/dist/commands/home.d.ts +2 -2
- package/dist/commands/home.js +25 -2
- package/dist/commands/home.js.map +1 -1
- package/dist/commands/install.d.ts +1 -0
- package/dist/commands/install.js +29 -16
- package/dist/commands/install.js.map +1 -1
- package/dist/helpers.d.ts +1 -1
- package/dist/helpers.js +1 -8
- package/dist/helpers.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/init/blocks.d.ts +1 -1
- package/dist/init/blocks.js +2 -2
- package/dist/init/cargo.d.ts +1 -1
- package/dist/init/cargo.js +2 -2
- package/dist/init/expo.d.ts +1 -1
- package/dist/init/expo.js +2 -2
- package/dist/init/index.d.ts +1 -2
- package/dist/init/index.js +10 -1
- package/dist/init/index.js.map +1 -1
- package/dist/init/monorepo.d.ts +1 -1
- package/dist/init/monorepo.js +2 -2
- package/dist/init/tauri.d.ts +1 -1
- package/dist/init/tauri.js +2 -2
- package/dist/init/velo.d.ts +1 -1
- package/dist/init/velo.js +3 -2
- package/dist/init/velo.js.map +1 -1
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/lucy.d.ts +2 -2
- package/dist/schemas/lucy.js +1 -1
- package/dist/schemas/lucy.js.map +1 -1
- package/dist/tasks/Gulpfile.js +3 -3
- package/dist/tasks/Gulpfile.js.map +1 -1
- package/dist/tasks/gulp/checks.js +12 -11
- package/dist/tasks/gulp/checks.js.map +1 -1
- package/dist/tasks/gulp/watchers.js +3 -3
- package/dist/tasks/gulp/watchers.js.map +1 -1
- package/dist/tasks/index.d.ts +1 -1
- package/files/templates/block[D]/files/.cursorignore +4 -0
- package/files/templates/cargo[D]/files/.cursorignore +4 -0
- package/files/templates/expo verse[D]/files/.nvmrc +1 -0
- package/files/templates/expo verse[D]/files/.prettierignore +23 -0
- package/files/templates/expo verse[D]/files/.prettierrc.js +16 -0
- package/files/templates/expo verse[D]/files/.stylelintrc.json +8 -0
- package/files/templates/expo verse[D]/files/.vscode/extensions.json +10 -0
- package/files/templates/expo verse[D]/files/.vscode/launch.json +54 -0
- package/files/templates/expo verse[D]/files/.vscode/settings.json +30 -0
- package/files/templates/expo verse[D]/files/.vscode/tasks.json +0 -0
- package/files/templates/expo verse[D]/files/.yarnrc +1 -0
- package/files/templates/expo verse[D]/files/.yarnrc.yml +8 -0
- package/files/templates/expo verse[D]/files/App.tsx +63 -0
- package/files/templates/expo verse[D]/files/DEBUGGING.md +126 -0
- package/files/templates/expo verse[D]/files/README.md +45 -0
- package/files/templates/expo verse[D]/files/android/app/build.gradle +177 -0
- package/files/templates/expo verse[D]/files/android/app/debug.keystore +0 -0
- package/files/templates/expo verse[D]/files/android/app/proguard-rules.pro +14 -0
- package/files/templates/expo verse[D]/files/android/app/src/debug/AndroidManifest.xml +7 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/AndroidManifest.xml +33 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/java/so/sunnysideup/daily_verse/MainActivity.kt +65 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/java/so/sunnysideup/daily_verse/MainApplication.kt +57 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable/ic_launcher_background.xml +6 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable-hdpi/splashscreen_logo.png +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable-mdpi/splashscreen_logo.png +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable-night-hdpi/splashscreen_logo.png +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable-night-mdpi/splashscreen_logo.png +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable-night-xhdpi/splashscreen_logo.png +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable-night-xxhdpi/splashscreen_logo.png +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable-night-xxxhdpi/splashscreen_logo.png +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable-xhdpi/splashscreen_logo.png +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable-xxhdpi/splashscreen_logo.png +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable-xxxhdpi/splashscreen_logo.png +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +6 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +6 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.webp +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.webp +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.webp +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.webp +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.webp +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp +0 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/values/colors.xml +6 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/values/strings.xml +7 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/values/styles.xml +12 -0
- package/files/templates/expo verse[D]/files/android/app/src/main/res/values-night/colors.xml +3 -0
- package/files/templates/expo verse[D]/files/android/build.gradle +37 -0
- package/files/templates/expo verse[D]/files/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/files/templates/expo verse[D]/files/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/files/templates/expo verse[D]/files/android/gradle.properties +59 -0
- package/files/templates/expo verse[D]/files/android/gradlew +251 -0
- package/files/templates/expo verse[D]/files/android/gradlew.bat +94 -0
- package/files/templates/expo verse[D]/files/android/settings.gradle +39 -0
- package/files/templates/expo verse[D]/files/app.config.ts +77 -0
- package/files/templates/expo verse[D]/files/assets/data/de.csv +949 -0
- package/files/templates/expo verse[D]/files/assets/data/en.csv +949 -0
- package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-Black.ttf +0 -0
- package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-BlackItalic.ttf +0 -0
- package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-Bold.ttf +0 -0
- package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-BoldItalic.ttf +0 -0
- package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-ExtraBold.ttf +0 -0
- package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-ExtraBoldItalic.ttf +0 -0
- package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-Italic.ttf +0 -0
- package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-Medium.ttf +0 -0
- package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-MediumItalic.ttf +0 -0
- package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-Regular.ttf +0 -0
- package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-SemiBold.ttf +0 -0
- package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-SemiBoldItalic.ttf +0 -0
- package/files/templates/expo verse[D]/files/assets/fonts/SpaceMono-Regular.ttf +0 -0
- package/files/templates/expo verse[D]/files/assets/images/andorid/background.png +0 -0
- package/files/templates/expo verse[D]/files/assets/images/android-dark.png +0 -0
- package/files/templates/expo verse[D]/files/assets/images/android-light.png +0 -0
- package/files/templates/expo verse[D]/files/assets/images/background.png +0 -0
- package/files/templates/expo verse[D]/files/assets/images/ios-dark.png +0 -0
- package/files/templates/expo verse[D]/files/assets/images/ios-light.png +0 -0
- package/files/templates/expo verse[D]/files/assets/images/ios-tinted.png +0 -0
- package/files/templates/expo verse[D]/files/assets/images/splash-icon-dark.png +0 -0
- package/files/templates/expo verse[D]/files/assets/images/splash-icon-light.png +0 -0
- package/files/templates/expo verse[D]/files/babel.config.js +10 -0
- package/files/templates/expo verse[D]/files/components/.gitkeep +0 -0
- package/files/templates/expo verse[D]/files/components/MainScreen.tsx +299 -0
- package/files/templates/expo verse[D]/files/components/Share.tsx +132 -0
- package/files/templates/expo verse[D]/files/components/ui/.gitkeep +0 -0
- package/files/templates/expo verse[D]/files/components/ui/dev.tsx +48 -0
- package/files/templates/expo verse[D]/files/constants/config.ts +30 -0
- package/files/templates/expo verse[D]/files/constants/theme.ts +18 -0
- package/files/templates/expo verse[D]/files/data/de.csv +219 -0
- package/files/templates/expo verse[D]/files/data/en.csv +219 -0
- package/files/templates/expo verse[D]/files/data/version.json +4 -0
- package/files/templates/expo verse[D]/files/eas.json +47 -0
- package/files/templates/expo verse[D]/files/eslint.config.mjs +185 -0
- package/files/templates/expo verse[D]/files/global.css +47 -0
- package/files/templates/expo verse[D]/files/hooks/useColorScheme.ts +17 -0
- package/files/templates/expo verse[D]/files/index.ts +28 -0
- package/files/templates/expo verse[D]/files/lib/content.ts +31 -0
- package/files/templates/expo verse[D]/files/lib/data.ts +180 -0
- package/files/templates/expo verse[D]/files/lib/helper.ts +54 -0
- package/files/templates/expo verse[D]/files/lib/index.ts +21 -0
- package/files/templates/expo verse[D]/files/lib/state.ts +128 -0
- package/files/templates/expo verse[D]/files/lib/storage.ts +17 -0
- package/files/templates/expo verse[D]/files/lib/taskManager/index.ts +38 -0
- package/files/templates/expo verse[D]/files/lib/taskManager/loadData.ts +14 -0
- package/files/templates/expo verse[D]/files/lib/utils/index.ts +11 -0
- package/files/templates/expo verse[D]/files/lib/utils/polyfills.ts +29 -0
- package/files/templates/expo verse[D]/files/lib/utils/screenshot.ts +77 -0
- package/files/templates/expo verse[D]/files/lucy.json +8 -0
- package/files/templates/expo verse[D]/files/metro.config.js +81 -0
- package/files/templates/expo verse[D]/files/models/index.ts +28 -0
- package/files/templates/expo verse[D]/files/nativewind-env.d.ts +1 -0
- package/files/templates/expo verse[D]/files/package.json +102 -0
- package/files/templates/expo verse[D]/files/pnpm-workspace.yaml +3 -0
- package/files/templates/expo verse[D]/files/scripts/convert-verses.ts +309 -0
- package/files/templates/expo verse[D]/files/scripts/move-artifacts.ts +83 -0
- package/files/templates/expo verse[D]/files/scripts/reset-project.ts +116 -0
- package/files/templates/expo verse[D]/files/tailwind.config.js +63 -0
- package/files/templates/expo verse[D]/files/tsconfig.json +45 -0
- package/files/templates/expo verse[D]/files/types/index.ts +4 -0
- package/files/templates/expo verse[D]/files/types/reset.d.ts +1 -0
- package/files/templates/expo verse[D]/lucy.json +86 -0
- package/files/templates/expo[D]/files/.cursorignore +4 -0
- package/files/templates/expo[D]/files/app.config.ts +69 -0
- package/files/templates/expo[D]/files/assets/fonts/SpaceMono-Regular.ttf +0 -0
- package/files/templates/expo[D]/files/scripts/reset-project.ts +0 -0
- package/files/templates/monorepo[D]/files/.cursorignore +4 -0
- package/files/templates/tauri[D]/files/.cursorignore +4 -0
- package/files/templates/velo[D]/files/.cursorignore +4 -0
- package/files/templates/velo[D]/files/.yarnrc.yml +1 -2
- package/files/templates/velo[D]/files/local.tsconfig.json +6 -5
- package/files/templates/velo[D]/files/typescript/backend/config/authz.ts +47 -0
- package/files/templates/velo[D]/files/typescript/backend/config/env.ts +8 -0
- package/files/templates/velo[D]/files/typescript/backend/config/index.ts +26 -0
- package/files/templates/velo[D]/files/typescript/backend/config/mail.ts +10 -0
- package/files/templates/velo[D]/files/typescript/backend/config/nats.ts +6 -0
- package/files/templates/velo[D]/files/typescript/public/config/env.ts +9 -0
- package/files/templates/velo[D]/files/typescript/public/config/index.ts +76 -0
- package/files/templates/velo[D]/files/typescript/public/config/locales.ts +30 -0
- package/files/templates/velo[D]/files/typescript/public/config/theme.ts +110 -0
- package/files/templates/velo[D]/files/typescript/public/i18n/default.ts +123 -0
- package/files/templates/velo[D]/files/typescript/public/i18n/en.ts +117 -0
- package/files/templates/velo[D]/files/typescript/public/models/collections/member_roles.mode.ts +21 -0
- package/files/templates/velo[D]/files/typescript/public/models/collections/organization.model.ts +38 -0
- package/files/templates/velo[D]/files/typescript/public/models/collections/plan.model.ts +94 -0
- package/files/templates/velo[D]/files/typescript/public/models/collections/stage.model.ts +14 -0
- package/files/templates/velo[D]/files/typescript/public/models/collections/subscriptions.model.ts +80 -0
- package/files/templates/velo[D]/files/typescript/public/models/collections/tag.model.ts +15 -0
- package/files/templates/velo[D]/files/typescript/public/models/collections/translations.model.ts +16 -0
- package/files/templates/velo[D]/files/typescript/public/models/modules/authz.model.ts +31 -0
- package/files/templates/velo[D]/files/typescript/public/models/modules/organization.ts +20 -0
- package/files/templates/velo[D]/files/typescript/public/models/splitwise.model.ts +18 -0
- package/files/templates/velo[D]/files/typescript/public/models/store/local.model.ts +10 -0
- package/files/templates/velo[D]/files/typescript/public/models/store/memory.model.ts +10 -0
- package/files/templates/velo[D]/files/typescript/public/models/store/session.model.ts +10 -0
- package/files/templates/velo[D]/files/typescript/public/models/wix/ecom/payment.ts +236 -0
- package/files/templates/velo[D]/lucy.json +1 -1
- package/lucy +4 -0
- package/lucy.jpg +0 -0
- package/mitarbeiter-login.html +188 -0
- package/old/index.ts +0 -0
- package/package.json +15 -14
- package/pnpm-workspace.yaml +6 -0
- package/src/args.ts +41 -1
- package/src/commands/exec.ts +22 -18
- package/src/commands/home.ts +36 -2
- package/src/commands/install.ts +41 -21
- package/src/helpers.ts +1 -9
- package/src/index.ts +4 -2
- package/src/init/blocks.ts +2 -2
- package/src/init/cargo.ts +2 -2
- package/src/init/expo.ts +2 -2
- package/src/init/index.ts +10 -2
- package/src/init/monorepo.ts +2 -2
- package/src/init/tauri.ts +2 -2
- package/src/init/velo.ts +4 -3
- package/src/schemas/index.ts +2 -0
- package/src/schemas/lucy.ts +1 -1
- package/src/tasks/Gulpfile.ts +3 -3
- package/src/tasks/gulp/checks.ts +15 -14
- package/src/tasks/gulp/watchers.ts +3 -3
package/src/commands/install.ts
CHANGED
|
@@ -105,18 +105,19 @@ export const runInstall = Effect.gen(function*() {
|
|
|
105
105
|
yield* install;
|
|
106
106
|
})
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
108
|
+
export const yarnSetVersion = Effect.gen(function*() {
|
|
109
|
+
const set = Command.make(
|
|
110
|
+
"yarn",
|
|
111
|
+
"set",
|
|
112
|
+
"version",
|
|
113
|
+
"berry",
|
|
114
|
+
).pipe(
|
|
115
|
+
Command.stdout("inherit"), // Stream stdout to process.stdout
|
|
116
|
+
Command.exitCode // Get the exit code
|
|
117
|
+
)
|
|
118
|
+
yield* set;
|
|
119
|
+
})
|
|
120
|
+
|
|
120
121
|
export const installVeloPackages = Effect.gen(function*() {
|
|
121
122
|
const config = yield* Config;
|
|
122
123
|
const simpleSchedule = Schedule.tapOutput(
|
|
@@ -192,18 +193,37 @@ export const installVeloPackages = Effect.gen(function*() {
|
|
|
192
193
|
devPkgs.push(key);
|
|
193
194
|
}
|
|
194
195
|
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
|
|
196
|
+
const manager = config.config.lucySettings.packageManager;
|
|
197
|
+
function pkgMgrParamsInstall():string[] {
|
|
198
|
+
if (manager === "npm") {
|
|
199
|
+
return ["install"];
|
|
200
|
+
}
|
|
201
|
+
if (manager === "pnpm") {
|
|
202
|
+
return ["install"];
|
|
203
|
+
}
|
|
204
|
+
return ["add"];
|
|
205
|
+
}
|
|
206
|
+
function pkgMgrParamsInstallDev():string[] {
|
|
207
|
+
if (manager === "npm") {
|
|
208
|
+
return ["install", "-D"];
|
|
209
|
+
}
|
|
210
|
+
if (manager === "pnpm") {
|
|
211
|
+
return ["install", "-D"];
|
|
212
|
+
}
|
|
213
|
+
return ["add", "-D"];
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
const install = Command.make(
|
|
217
|
+
manager,
|
|
218
|
+
...pkgMgrParamsInstall(),
|
|
198
219
|
...pkgs,
|
|
199
220
|
).pipe(
|
|
200
221
|
Command.stdout("inherit"), // Stream stdout to process.stdout
|
|
201
222
|
Command.exitCode // Get the exit code
|
|
202
223
|
)
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
"-D",
|
|
224
|
+
const installDev = Command.make(
|
|
225
|
+
manager,
|
|
226
|
+
...pkgMgrParamsInstallDev(),
|
|
207
227
|
...devPkgs,
|
|
208
228
|
).pipe(
|
|
209
229
|
Command.stdout("inherit"), // Stream stdout to process.stdout
|
|
@@ -217,12 +237,12 @@ export const installVeloPackages = Effect.gen(function*() {
|
|
|
217
237
|
}
|
|
218
238
|
|
|
219
239
|
logger.info("Installing dependencies");
|
|
220
|
-
if ((yield*
|
|
240
|
+
if ((yield* install) !== 0) {
|
|
221
241
|
return logger.error("Failed to install dependencies. Please check the error message above.");
|
|
222
242
|
}
|
|
223
243
|
|
|
224
244
|
logger.info("Installing dev dependencies");
|
|
225
|
-
if ((yield*
|
|
245
|
+
if ((yield* installDev) !== 0) {
|
|
226
246
|
return logger.error("Failed to install dev dependencies. Please check the error message above.");
|
|
227
247
|
}
|
|
228
248
|
|
package/src/helpers.ts
CHANGED
|
@@ -89,13 +89,5 @@ export function cleanupWatchers() {
|
|
|
89
89
|
|
|
90
90
|
logger.info(`Cleaning watchers for directory: ${cwd}`);
|
|
91
91
|
const result = spawnSync(command, { shell: true, encoding: 'utf-8' });
|
|
92
|
-
|
|
93
|
-
// if (result.stderr) {
|
|
94
|
-
// logger.error(`spawnSync error: ${result.stderr}`);
|
|
95
|
-
// return;
|
|
96
|
-
// }
|
|
97
|
-
// if (!result.stdout.trim()) {
|
|
98
|
-
// logger.info(`No watchers found to clean up.`);
|
|
99
|
-
// return;
|
|
100
|
-
// }
|
|
92
|
+
return result;
|
|
101
93
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
import { Effect, pipe} from "effect";
|
|
3
2
|
import { build_runtime } from "./runtime.js";
|
|
4
3
|
import { get_args } from "./args.js";
|
|
@@ -21,8 +20,9 @@ export function setNeedsCleanup(value: boolean) {
|
|
|
21
20
|
process.on('exit', (code) => {
|
|
22
21
|
if(!needsCleanup) return;
|
|
23
22
|
if(exitReason === 'none') {
|
|
24
|
-
killAllProcesses('@wix/cli/bin/wix.cjs');
|
|
23
|
+
killAllProcesses('@wix/cli/bin/wix.cjs');
|
|
25
24
|
killAllProcesses('wix:dev');
|
|
25
|
+
killAllProcesses('wix dev');
|
|
26
26
|
cleanupWatchers();
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -35,6 +35,7 @@ process.on('SIGINT', () => {
|
|
|
35
35
|
logger.info(`🐕 Received Ctrl+C (SIGINT), cleaning up...`);
|
|
36
36
|
killAllProcesses('@wix/cli/bin/wix.cjs'); // Matches processes running the Wix CLI
|
|
37
37
|
killAllProcesses('wix:dev');
|
|
38
|
+
killAllProcesses('wix dev');
|
|
38
39
|
cleanupWatchers();
|
|
39
40
|
process.exit(); // Exit explicitly after handling
|
|
40
41
|
});
|
|
@@ -45,6 +46,7 @@ process.on('SIGTERM', () => {
|
|
|
45
46
|
logger.info(`🛑 Received termination signal (SIGTERM), cleaning up...`);
|
|
46
47
|
killAllProcesses('@wix/cli/bin/wix.cjs'); // Matches processes running the Wix CLI
|
|
47
48
|
killAllProcesses('wix:dev');
|
|
49
|
+
killAllProcesses('wix dev');
|
|
48
50
|
cleanupWatchers();
|
|
49
51
|
process.exit(); // Exit explicitly after handling
|
|
50
52
|
});
|
package/src/init/blocks.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { mergeAdditions, mergeLucySettings2PackageJson, setInitialized } from ".
|
|
|
7
7
|
import { writeLucySettings, writePackageJson } from "../commands/write.js";
|
|
8
8
|
import { copyTemplateFiles } from "../commands/copy.js";
|
|
9
9
|
import { readPackageJson } from "../commands/read.js";
|
|
10
|
-
import { execCommand,
|
|
10
|
+
import { execCommand, openEditor } from "../commands/exec.js";
|
|
11
11
|
import { approveBuilds, installPackages } from "../commands/install.js";
|
|
12
12
|
import { AppError } from "../error.js";
|
|
13
13
|
import { cleanup } from "../commands/cleanup.js";
|
|
@@ -80,6 +80,6 @@ export const init_blocks = () => {
|
|
|
80
80
|
|
|
81
81
|
logger.success("Blocks project initialized successfully!");
|
|
82
82
|
|
|
83
|
-
yield*
|
|
83
|
+
yield* openEditor;
|
|
84
84
|
})
|
|
85
85
|
}
|
package/src/init/cargo.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { copyTemplateFiles } from "../commands/copy.js";
|
|
|
5
5
|
import { gitInit } from "../commands/git.js";
|
|
6
6
|
import { checkForDirty } from "../commands/checks.js";
|
|
7
7
|
import { setInitialized } from "../commands/edit.js";
|
|
8
|
-
import {
|
|
8
|
+
import { openEditor } from "../commands/exec.js";
|
|
9
9
|
|
|
10
10
|
export const init_cargo = () => {
|
|
11
11
|
return Effect.gen(function*() {
|
|
@@ -20,6 +20,6 @@ export const init_cargo = () => {
|
|
|
20
20
|
|
|
21
21
|
logger.success("Cargo project initialized successfully!");
|
|
22
22
|
|
|
23
|
-
yield*
|
|
23
|
+
yield* openEditor;
|
|
24
24
|
})
|
|
25
25
|
}
|
package/src/init/expo.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { mergeAdditions, mergeLucySettings2PackageJson, setInitialized } from ".
|
|
|
7
7
|
import { writeLucySettings, writePackageJson } from "../commands/write.js";
|
|
8
8
|
import { copyTemplateFiles } from "../commands/copy.js";
|
|
9
9
|
import { readPackageJson } from "../commands/read.js";
|
|
10
|
-
import { execCommand,
|
|
10
|
+
import { execCommand, openEditor } from "../commands/exec.js";
|
|
11
11
|
import { approveBuilds, installPackages } from "../commands/install.js";
|
|
12
12
|
import { AppError } from "../error.js";
|
|
13
13
|
import { cleanup } from "../commands/cleanup.js";
|
|
@@ -64,6 +64,6 @@ export const init_expo = () => {
|
|
|
64
64
|
|
|
65
65
|
logger.success("Expo project initialized successfully!");
|
|
66
66
|
|
|
67
|
-
yield*
|
|
67
|
+
yield* openEditor;
|
|
68
68
|
})
|
|
69
69
|
}
|
package/src/init/index.ts
CHANGED
|
@@ -14,7 +14,9 @@ import { init_submodules } from "./gitModules.js";
|
|
|
14
14
|
import { init_tauri } from "./tauri.js";
|
|
15
15
|
import { pkgManagers } from "../schemas/lucy.js";
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
//TODO: Get Templates from Reposytory
|
|
18
|
+
//TODO: Update Local tsconfig for libs
|
|
19
|
+
//TODO: Fix PNPM in VELO
|
|
18
20
|
export const init = Effect.gen(function* (_) {
|
|
19
21
|
const config = yield* Config;
|
|
20
22
|
if(config.config.action.initType === undefined) {
|
|
@@ -40,13 +42,19 @@ export const init = Effect.gen(function* (_) {
|
|
|
40
42
|
yield* selectTemplate();
|
|
41
43
|
yield* readLucyJsonFromTemplate;
|
|
42
44
|
|
|
45
|
+
function supportedPackageManagers() {
|
|
46
|
+
if(config.config.action.initType === 'velo') {
|
|
47
|
+
return pkgManagers.filter(pkgMgr => pkgMgr !== 'pnpm')
|
|
48
|
+
}
|
|
49
|
+
return pkgManagers
|
|
50
|
+
}
|
|
43
51
|
const pkgMgrQuestion = new Enquirer();
|
|
44
52
|
const pkgMgr = yield* Effect.tryPromise({
|
|
45
53
|
try: () => pkgMgrQuestion.prompt({
|
|
46
54
|
type: 'select',
|
|
47
55
|
name: 'packageManager',
|
|
48
56
|
message: 'Select a package manager',
|
|
49
|
-
choices: [...
|
|
57
|
+
choices: [...supportedPackageManagers()],
|
|
50
58
|
}),
|
|
51
59
|
catch: (e) => {
|
|
52
60
|
return new AppError({ cause: e, message: 'Error selecting package manager' });
|
package/src/init/monorepo.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { approveBuilds, installPackages, runInstall } from "../commands/install.
|
|
|
10
10
|
import { cleanup } from "../commands/cleanup.js";
|
|
11
11
|
import { gitInit } from "../commands/git.js";
|
|
12
12
|
import { checkForDirty } from "../commands/checks.js";
|
|
13
|
-
import {
|
|
13
|
+
import { openEditor } from "../commands/exec.js";
|
|
14
14
|
|
|
15
15
|
export const init_monorepo = () => {
|
|
16
16
|
return Effect.gen(function*() {
|
|
@@ -67,6 +67,6 @@ export const init_monorepo = () => {
|
|
|
67
67
|
|
|
68
68
|
logger.success("Monorepo initialized successfully!");
|
|
69
69
|
|
|
70
|
-
yield*
|
|
70
|
+
yield* openEditor;
|
|
71
71
|
})
|
|
72
72
|
}
|
package/src/init/tauri.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { Config } from "../config.js";
|
|
|
9
9
|
import { Command, FileSystem, Path } from "@effect/platform"
|
|
10
10
|
import { AppError } from "../error.js";
|
|
11
11
|
import { approveBuilds, installPackages } from "../commands/install.js";
|
|
12
|
-
import {
|
|
12
|
+
import { openEditor } from "../commands/exec.js";
|
|
13
13
|
|
|
14
14
|
export const init_tauri = () => {
|
|
15
15
|
return Effect.gen(function*() {
|
|
@@ -37,6 +37,6 @@ export const init_tauri = () => {
|
|
|
37
37
|
|
|
38
38
|
logger.success("Tauri project initialized successfully!");
|
|
39
39
|
|
|
40
|
-
yield*
|
|
40
|
+
yield* openEditor;
|
|
41
41
|
})
|
|
42
42
|
}
|
package/src/init/velo.ts
CHANGED
|
@@ -6,14 +6,14 @@ import { mergeAdditions, mergeLucySettings2PackageJson, setInitialized, setProje
|
|
|
6
6
|
import { writeLucySettings, writePackageJson } from "../commands/write.js";
|
|
7
7
|
import { copyTemplateFiles } from "../commands/copy.js";
|
|
8
8
|
import { readPackageJson } from "../commands/read.js";
|
|
9
|
-
import { installVeloPackages, runInstall } from "../commands/install.js";
|
|
9
|
+
import { installVeloPackages, runInstall, yarnSetVersion } from "../commands/install.js";
|
|
10
10
|
import { cleanup } from "../commands/cleanup.js";
|
|
11
11
|
import { gitInit } from "../commands/git.js";
|
|
12
12
|
import { checkForVelo } from "../commands/checks.js";
|
|
13
13
|
import { AppError } from "../error.js";
|
|
14
14
|
import Enquirer from "enquirer";
|
|
15
15
|
import { prepareVelo } from "./prepareVelo.js";
|
|
16
|
-
import {
|
|
16
|
+
import { openEditor } from "../commands/exec.js";
|
|
17
17
|
|
|
18
18
|
export const init_velo = () => {
|
|
19
19
|
return Effect.gen(function*() {
|
|
@@ -53,6 +53,7 @@ export const init_velo = () => {
|
|
|
53
53
|
yield* writeLucySettings;
|
|
54
54
|
yield* writePackageJson;
|
|
55
55
|
yield* gitInit();
|
|
56
|
+
yield* runInstall;
|
|
56
57
|
yield* installVeloPackages;
|
|
57
58
|
yield* runInstall;
|
|
58
59
|
yield* cleanup;
|
|
@@ -60,6 +61,6 @@ export const init_velo = () => {
|
|
|
60
61
|
|
|
61
62
|
logger.success("Velo initialized successfully!");
|
|
62
63
|
|
|
63
|
-
yield*
|
|
64
|
+
yield* openEditor;
|
|
64
65
|
})
|
|
65
66
|
}
|
package/src/schemas/index.ts
CHANGED
package/src/schemas/lucy.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect/index";
|
|
2
2
|
import { initTypes } from "./types.js";
|
|
3
3
|
|
|
4
|
-
export const pkgManagers = ['pnpm', '
|
|
4
|
+
export const pkgManagers = ['pnpm', 'yarn', 'npm'] as const;
|
|
5
5
|
export const lucySettings = Schema.mutable(Schema.Struct({
|
|
6
6
|
modules: Schema.Record({
|
|
7
7
|
key: Schema.String,
|
package/src/tasks/Gulpfile.ts
CHANGED
|
@@ -55,7 +55,7 @@ export const task_runGulp = Effect.gen(function* (_) {
|
|
|
55
55
|
logger.action(`Running task: ${task}`);
|
|
56
56
|
|
|
57
57
|
gulp.task('check-ts', gulp.parallel(
|
|
58
|
-
checkTs(taskOptions),
|
|
58
|
+
checkTs(taskOptions, false),
|
|
59
59
|
));
|
|
60
60
|
|
|
61
61
|
gulp.task('scss', gulp.parallel(
|
|
@@ -102,7 +102,7 @@ export const task_runGulp = Effect.gen(function* (_) {
|
|
|
102
102
|
});
|
|
103
103
|
|
|
104
104
|
gulp.task('sync-types', shell.task([
|
|
105
|
-
'
|
|
105
|
+
'wix sync-types',
|
|
106
106
|
]));
|
|
107
107
|
|
|
108
108
|
gulp.task('fix-wix-types', gulp.parallel(
|
|
@@ -118,7 +118,7 @@ export const task_runGulp = Effect.gen(function* (_) {
|
|
|
118
118
|
));
|
|
119
119
|
|
|
120
120
|
gulp.task('start-wix', shell.task([
|
|
121
|
-
'
|
|
121
|
+
'wix dev',
|
|
122
122
|
]));
|
|
123
123
|
|
|
124
124
|
gulp.task('gen-docs', shell.task([
|
package/src/tasks/gulp/checks.ts
CHANGED
|
@@ -52,7 +52,7 @@ import { TaskType } from '../../schemas/types.js';
|
|
|
52
52
|
* @param {string} filePath File path
|
|
53
53
|
* @param {string} pattern Pattern to match
|
|
54
54
|
*/
|
|
55
|
-
function extractMatchFromFile(filePath: string, pattern: string) {
|
|
55
|
+
async function extractMatchFromFile(filePath: string, pattern: string) {
|
|
56
56
|
return new Promise((resolve, reject) => {
|
|
57
57
|
fs.readFile(filePath, 'utf8', (err, data) => {
|
|
58
58
|
if (err){
|
|
@@ -77,29 +77,30 @@ function extractMatchFromFile(filePath: string, pattern: string) {
|
|
|
77
77
|
async function readFilesInFolder(folderPath: string, pattern: string | null, globPattern: string,) {
|
|
78
78
|
const files = await glob.glob(path.join(folderPath, globPattern));
|
|
79
79
|
const filenameList: Object[] = [];
|
|
80
|
-
function traverseFiles(index: number) {
|
|
80
|
+
async function traverseFiles(index: number) {
|
|
81
81
|
if (index === files.length){
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
84
|
const file = files[index];
|
|
85
85
|
if(pattern){
|
|
86
86
|
if(!file) return
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
})
|
|
94
|
-
|
|
87
|
+
try {
|
|
88
|
+
const capturedGroup = await extractMatchFromFile(file, pattern);
|
|
89
|
+
if (capturedGroup){
|
|
90
|
+
filenameList.push(capturedGroup);
|
|
91
|
+
}
|
|
92
|
+
} catch (error) {
|
|
93
|
+
throw new Error(`Error reading file: ${file}`);
|
|
94
|
+
}
|
|
95
95
|
}
|
|
96
96
|
if(!pattern){
|
|
97
97
|
if(!file) return
|
|
98
98
|
filenameList.push(path.basename(file));
|
|
99
|
-
traverseFiles(index + 1);
|
|
100
99
|
}
|
|
100
|
+
await traverseFiles(index + 1);
|
|
101
|
+
|
|
101
102
|
}
|
|
102
|
-
traverseFiles(0);
|
|
103
|
+
await traverseFiles(0);
|
|
103
104
|
|
|
104
105
|
return filenameList;
|
|
105
106
|
}
|
|
@@ -107,7 +108,7 @@ export async function checkPages(fail: boolean, force: boolean) {
|
|
|
107
108
|
logger.action('Checking pages...');
|
|
108
109
|
return new Promise<void>(async (resolve, reject) => {
|
|
109
110
|
try {
|
|
110
|
-
const sourcePages = await readFilesInFolder('./.wix/types/', '\\/pages\\/(?<page>.*\\.ts)', '
|
|
111
|
+
const sourcePages = await readFilesInFolder('./.wix/types/', '\\/pages\\/(?<page>.*\\.ts)', '*/*.json',) as string[];
|
|
111
112
|
const tsPages = await readFilesInFolder('./typescript/pages', null, '**/*.ts',) as string[];
|
|
112
113
|
|
|
113
114
|
const sourcePagesSet = new Set(sourcePages);
|
|
@@ -187,7 +188,7 @@ export function checkTs(options: TaskOptions, watching: boolean = false): TaskTy
|
|
|
187
188
|
const task = (done: gulp.TaskFunctionCallback) => {
|
|
188
189
|
let hasError = false;
|
|
189
190
|
const stream = gulp
|
|
190
|
-
.src([`${folder}/**/*.ts`, `!${folder}/types/**/*.ts`])
|
|
191
|
+
.src([`${folder}/**/*.{ts,tsx}`, `!${folder}/types/**/*.ts`])
|
|
191
192
|
.pipe(tsProject(customReporter))
|
|
192
193
|
.on("error", (error) => {
|
|
193
194
|
hasError = true;
|
|
@@ -35,7 +35,7 @@ export function watchAll(options: TaskOptions): TaskType {
|
|
|
35
35
|
'*/public/**/*.tsx',
|
|
36
36
|
'!src/**/*',
|
|
37
37
|
], gulp.parallel(
|
|
38
|
-
checkTs(options),
|
|
38
|
+
checkTs(options, true),
|
|
39
39
|
buildPublic(options),
|
|
40
40
|
));
|
|
41
41
|
}
|
|
@@ -43,7 +43,7 @@ export function watchAll(options: TaskOptions): TaskType {
|
|
|
43
43
|
function watchPages() {
|
|
44
44
|
return gulp.watch(['typescript/pages/**/*.ts', '!src/**/*',],
|
|
45
45
|
gulp.parallel(
|
|
46
|
-
checkTs(options),
|
|
46
|
+
checkTs(options, true),
|
|
47
47
|
buildPages(options),
|
|
48
48
|
)
|
|
49
49
|
);
|
|
@@ -68,7 +68,7 @@ export function watchAll(options: TaskOptions): TaskType {
|
|
|
68
68
|
'!src/**/*',
|
|
69
69
|
], gulp.parallel(
|
|
70
70
|
previewTemplates(options),
|
|
71
|
-
checkTs(options),
|
|
71
|
+
checkTs(options, true),
|
|
72
72
|
)
|
|
73
73
|
);
|
|
74
74
|
}
|