lucy-cli 2.0.0-beta.3 → 2.0.0-beta.4
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/.wix/debug.log +10 -0
- package/dist/args.js +0 -1
- package/dist/args.js.map +1 -1
- package/dist/commands/checks.d.ts +1 -1
- package/dist/commands/edit.d.ts +1 -1
- package/dist/commands/exec.d.ts +1 -1
- package/dist/commands/exec.js +15 -13
- package/dist/commands/exec.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/commands/read.d.ts +3 -3
- package/dist/config.d.ts +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/gitModules.d.ts +1 -1
- package/dist/init/index.d.ts +1 -1
- package/dist/init/index.js +7 -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/prepareVelo.d.ts +1 -1
- package/dist/init/tauri.d.ts +1 -1
- package/dist/init/tauri.js +2 -2
- package/dist/init/templates.d.ts +1 -1
- 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/runtime.d.ts +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/wix-sdk/index.d.ts +1 -1
- package/dist/wix-sdk/init.d.ts +1 -1
- package/dist/wix-sdk/run.d.ts +1 -1
- package/dist/wix-sync/index.d.ts +1 -1
- package/dist/wix-sync/init.d.ts +1 -1
- package/files/templates/velo[D]/files/.yarnrc.yml +1 -2
- package/files/templates/velo[D]/lucy.json +1 -1
- package/mitarbeiter-login.html +188 -0
- package/package.json +3 -2
- package/src/args.ts +0 -1
- package/src/commands/exec.ts +22 -18
- package/src/commands/install.ts +41 -21
- 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 +7 -1
- 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/dist/wix-sdk/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
import { Effect } from "effect/index";
|
2
2
|
import { Config } from "../config.js";
|
3
3
|
import { AppError } from "../error.js";
|
4
|
-
export declare const wix_sdk: Effect.Effect<void, AppError | import("effect/
|
4
|
+
export declare const wix_sdk: Effect.Effect<void, AppError | import("@effect/platform/Error").PlatformError | import("effect/ParseResult").ParseError, Config | import("@effect/platform/FileSystem").FileSystem | import("@effect/platform/Path").Path>;
|
package/dist/wix-sdk/init.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
import { Effect } from "effect/index";
|
2
2
|
import { Config } from "../config.js";
|
3
3
|
import { AppError } from "../error.js";
|
4
|
-
export declare const wix_sdk_init: Effect.Effect<void, AppError | import("effect/
|
4
|
+
export declare const wix_sdk_init: Effect.Effect<void, AppError | import("@effect/platform/Error").PlatformError | import("effect/ParseResult").ParseError, Config | import("@effect/platform/FileSystem").FileSystem | import("@effect/platform/Path").Path>;
|
package/dist/wix-sdk/run.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
import { Effect } from "effect/index";
|
2
2
|
import { Config } from "../config.js";
|
3
3
|
import { AppError } from "../error.js";
|
4
|
-
export declare const wix_sdk_run: (program: Effect.Effect<never, AppError, never>) => Effect.Effect<void, AppError | import("effect/
|
4
|
+
export declare const wix_sdk_run: (program: Effect.Effect<never, AppError, never>) => Effect.Effect<void, AppError | import("@effect/platform/Error").PlatformError | import("effect/ParseResult").ParseError, Config | import("@effect/platform/FileSystem").FileSystem | import("@effect/platform/Path").Path>;
|
package/dist/wix-sync/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
import { Effect } from "effect/index";
|
2
2
|
import { Config } from "../config.js";
|
3
3
|
import { AppError } from "../error.js";
|
4
|
-
export declare const wix_sync: Effect.Effect<void, AppError | import("effect/
|
4
|
+
export declare const wix_sync: Effect.Effect<void, AppError | import("@effect/platform/Error").PlatformError | import("effect/ParseResult").ParseError, Config | import("@effect/platform/FileSystem").FileSystem | import("@effect/platform/Path").Path>;
|
package/dist/wix-sync/init.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
import { Effect } from "effect/index";
|
2
2
|
import { Config } from "../config.js";
|
3
3
|
import { AppError } from "../error.js";
|
4
|
-
export declare const init: Effect.Effect<void, AppError | import("effect/
|
4
|
+
export declare const init: Effect.Effect<void, AppError | import("@effect/platform/Error").PlatformError | import("effect/ParseResult").ParseError, Config | import("@effect/platform/FileSystem").FileSystem | import("@effect/platform/Path").Path>;
|
@@ -0,0 +1,188 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="de">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>Mitarbeiter Login</title>
|
7
|
+
<style>
|
8
|
+
@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed&display=swap');
|
9
|
+
|
10
|
+
* {
|
11
|
+
margin: 0;
|
12
|
+
padding: 0;
|
13
|
+
box-sizing: border-box;
|
14
|
+
}
|
15
|
+
|
16
|
+
body {
|
17
|
+
font-family: 'Barlow Semi Condensed', sans-serif;
|
18
|
+
height: 100vh;
|
19
|
+
display: flex;
|
20
|
+
justify-content: center;
|
21
|
+
align-items: center;
|
22
|
+
background-color: #f0f0f0;
|
23
|
+
}
|
24
|
+
|
25
|
+
.login-container {
|
26
|
+
position: relative;
|
27
|
+
width: 1200px;
|
28
|
+
height: 1920px;
|
29
|
+
border-radius: 20px;
|
30
|
+
overflow: hidden;
|
31
|
+
background: radial-gradient(ellipse at center,
|
32
|
+
rgba(122,206,255,1) 0%,
|
33
|
+
rgba(92,187,243,1) 10.677%,
|
34
|
+
rgba(61,168,231,1) 21.354%,
|
35
|
+
rgba(31,148,218,1) 32.031%,
|
36
|
+
rgba(15,139,212,1) 37.37%,
|
37
|
+
rgba(0,129,206,1) 42.708%,
|
38
|
+
rgba(14,111,169,1) 51.563%,
|
39
|
+
rgba(28,93,132,1) 60.417%,
|
40
|
+
rgba(41,74,94,1) 69.271%,
|
41
|
+
rgba(55,56,57,1) 78.125%);
|
42
|
+
}
|
43
|
+
|
44
|
+
.login-button {
|
45
|
+
position: absolute;
|
46
|
+
top: 50%;
|
47
|
+
left: 50%;
|
48
|
+
transform: translate(-50%, -50%);
|
49
|
+
width: 440px;
|
50
|
+
height: 440px;
|
51
|
+
background-color: #ffffff;
|
52
|
+
border-radius: 9999px;
|
53
|
+
display: flex;
|
54
|
+
align-items: center;
|
55
|
+
justify-content: center;
|
56
|
+
padding: 10px 24px;
|
57
|
+
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
|
58
|
+
}
|
59
|
+
|
60
|
+
.login-text {
|
61
|
+
font-family: 'Barlow Semi Condensed', sans-serif;
|
62
|
+
font-size: 56px;
|
63
|
+
font-weight: 400;
|
64
|
+
color: #363839;
|
65
|
+
text-align: center;
|
66
|
+
line-height: 1;
|
67
|
+
}
|
68
|
+
|
69
|
+
.instruction-text {
|
70
|
+
position: absolute;
|
71
|
+
top: 608px;
|
72
|
+
left: 50%;
|
73
|
+
transform: translateX(-50%);
|
74
|
+
width: 1030px;
|
75
|
+
height: 102px;
|
76
|
+
display: flex;
|
77
|
+
align-items: center;
|
78
|
+
justify-content: center;
|
79
|
+
font-family: 'Barlow Semi Condensed', sans-serif;
|
80
|
+
font-size: 56px;
|
81
|
+
font-weight: 400;
|
82
|
+
color: #ffffff;
|
83
|
+
text-align: center;
|
84
|
+
line-height: 1;
|
85
|
+
}
|
86
|
+
|
87
|
+
.icon-button {
|
88
|
+
position: absolute;
|
89
|
+
bottom: 20px;
|
90
|
+
left: 14px;
|
91
|
+
width: 80px;
|
92
|
+
height: 80px;
|
93
|
+
background-color: #363839;
|
94
|
+
border-radius: 100px;
|
95
|
+
display: flex;
|
96
|
+
align-items: center;
|
97
|
+
justify-content: center;
|
98
|
+
border: 4px solid #ffffff;
|
99
|
+
}
|
100
|
+
|
101
|
+
.icon {
|
102
|
+
width: 50px;
|
103
|
+
height: 50px;
|
104
|
+
position: relative;
|
105
|
+
}
|
106
|
+
|
107
|
+
.icon-inner {
|
108
|
+
position: absolute;
|
109
|
+
top: 16.667%;
|
110
|
+
left: 16.667%;
|
111
|
+
width: 66.666%;
|
112
|
+
height: 66.666%;
|
113
|
+
background-color: #ffffff;
|
114
|
+
border-radius: 8px;
|
115
|
+
}
|
116
|
+
|
117
|
+
.logo {
|
118
|
+
position: absolute;
|
119
|
+
bottom: 95px;
|
120
|
+
right: 98px;
|
121
|
+
width: 600px;
|
122
|
+
height: 125px;
|
123
|
+
background-color: rgba(255, 255, 255, 0.1);
|
124
|
+
border-radius: 10px;
|
125
|
+
display: flex;
|
126
|
+
align-items: center;
|
127
|
+
justify-content: center;
|
128
|
+
color: #ffffff;
|
129
|
+
font-size: 24px;
|
130
|
+
}
|
131
|
+
|
132
|
+
/* Responsive adjustments */
|
133
|
+
@media (max-width: 1200px) {
|
134
|
+
.login-container {
|
135
|
+
width: 100vw;
|
136
|
+
height: 100vh;
|
137
|
+
border-radius: 0;
|
138
|
+
}
|
139
|
+
|
140
|
+
.login-button {
|
141
|
+
width: 300px;
|
142
|
+
height: 300px;
|
143
|
+
}
|
144
|
+
|
145
|
+
.login-text {
|
146
|
+
font-size: 40px;
|
147
|
+
}
|
148
|
+
|
149
|
+
.instruction-text {
|
150
|
+
width: 90%;
|
151
|
+
font-size: 40px;
|
152
|
+
}
|
153
|
+
|
154
|
+
.logo {
|
155
|
+
width: 400px;
|
156
|
+
height: 80px;
|
157
|
+
right: 20px;
|
158
|
+
bottom: 60px;
|
159
|
+
}
|
160
|
+
}
|
161
|
+
</style>
|
162
|
+
</head>
|
163
|
+
<body>
|
164
|
+
<div class="login-container">
|
165
|
+
<!-- Main Login Button -->
|
166
|
+
<div class="login-button">
|
167
|
+
<div class="login-text">LOGIN</div>
|
168
|
+
</div>
|
169
|
+
|
170
|
+
<!-- Instruction Text -->
|
171
|
+
<div class="instruction-text">
|
172
|
+
<p>Mitarbeiterausweis an das Gerät halten.</p>
|
173
|
+
</div>
|
174
|
+
|
175
|
+
<!-- Icon Button -->
|
176
|
+
<div class="icon-button">
|
177
|
+
<div class="icon">
|
178
|
+
<div class="icon-inner"></div>
|
179
|
+
</div>
|
180
|
+
</div>
|
181
|
+
|
182
|
+
<!-- Logo Placeholder -->
|
183
|
+
<div class="logo">
|
184
|
+
[Logo Placeholder]
|
185
|
+
</div>
|
186
|
+
</div>
|
187
|
+
</body>
|
188
|
+
</html>
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"type": "module",
|
3
3
|
"name": "lucy-cli",
|
4
|
-
"version": "2.0.0-beta.
|
4
|
+
"version": "2.0.0-beta.4",
|
5
5
|
"description": "Lucy Framework for WIX Studio Editor",
|
6
6
|
"main": ".dist/index.js",
|
7
7
|
"scripts": {
|
@@ -103,5 +103,6 @@
|
|
103
103
|
"eslint-plugin-named-import-spacing": "^1.0.3",
|
104
104
|
"eslint-plugin-simple-import-sort": "12.1.1",
|
105
105
|
"ts-node": "10.9.2"
|
106
|
-
}
|
106
|
+
},
|
107
|
+
"packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610"
|
107
108
|
}
|
package/src/args.ts
CHANGED
@@ -109,7 +109,6 @@ export async function get_args(): Promise<LucyArgs> {
|
|
109
109
|
monorepo Monorepo setup
|
110
110
|
tauri Tauri desktop app
|
111
111
|
cargo Rust project
|
112
|
-
submodules Git submodules
|
113
112
|
wix-sdk Wix SDK setup
|
114
113
|
|
115
114
|
For more information, visit https://github.com/Sunnyside-UP-GmbH/lucy-cli
|
package/src/commands/exec.ts
CHANGED
@@ -5,6 +5,7 @@ import { logger } from "../utils/logger.js";
|
|
5
5
|
import { FileSystem } from "@effect/platform"
|
6
6
|
import Enquirer from "enquirer";
|
7
7
|
import { AppError } from "../error.js";
|
8
|
+
import { editors } from "../schemas/index.js";
|
8
9
|
|
9
10
|
export const execCommand = Effect.gen(function*() {
|
10
11
|
const config = yield* Config;
|
@@ -38,22 +39,16 @@ export const open = Effect.scoped(Effect.gen(function*() {
|
|
38
39
|
yield* command.pipe().pipe(Command.stdout("inherit"), Command.stderr("inherit"), Command.exitCode);
|
39
40
|
}))
|
40
41
|
|
41
|
-
export const
|
42
|
+
export const openEditor = Effect.gen(function*() {
|
42
43
|
const config = yield* Config;
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
).
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
const overwriteQuestion = new Enquirer();
|
52
|
-
const openVScodeQuestion = yield* Effect.tryPromise({
|
53
|
-
try: () => overwriteQuestion.prompt({
|
54
|
-
type: 'confirm',
|
55
|
-
name: 'openVSCode',
|
56
|
-
message: `Do you want to open the project in VSCode?`,
|
44
|
+
|
45
|
+
const editorQuestion = new Enquirer();
|
46
|
+
const openEditorQuestion = yield* Effect.tryPromise({
|
47
|
+
try: () => editorQuestion.prompt({
|
48
|
+
type: 'select',
|
49
|
+
name: 'openEditor',
|
50
|
+
message: `Do you want to open the project in a supported editor?`,
|
51
|
+
choices: [...editors, 'No'],
|
57
52
|
}),
|
58
53
|
catch: (e) => {
|
59
54
|
return new AppError({
|
@@ -62,8 +57,17 @@ export const openVSCode = Effect.gen(function*() {
|
|
62
57
|
});
|
63
58
|
}
|
64
59
|
})
|
65
|
-
const choice = yield* Schema.decodeUnknown(Schema.Struct({
|
66
|
-
|
60
|
+
const choice = yield* Schema.decodeUnknown(Schema.Struct({ openEditor: Schema.Literal(...editors, 'No') }))(openEditorQuestion);
|
61
|
+
|
62
|
+
const open = Command.make(
|
63
|
+
choice.openEditor,
|
64
|
+
config.config.cwd,
|
65
|
+
).pipe(
|
66
|
+
Command.stdout("inherit"), // Stream stdout to process.stdout
|
67
|
+
Command.stderr("inherit"), // Stream stderr to process.stderr
|
68
|
+
Command.exitCode // Get the exit code
|
69
|
+
)
|
70
|
+
if (choice.openEditor !== 'No') {
|
67
71
|
yield* open
|
68
72
|
}
|
69
|
-
})
|
73
|
+
})
|
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/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
@@ -40,13 +40,19 @@ export const init = Effect.gen(function* (_) {
|
|
40
40
|
yield* selectTemplate();
|
41
41
|
yield* readLucyJsonFromTemplate;
|
42
42
|
|
43
|
+
function supportedPackageManagers() {
|
44
|
+
if(config.config.action.initType === 'velo') {
|
45
|
+
return pkgManagers.filter(pkgMgr => pkgMgr !== 'pnpm')
|
46
|
+
}
|
47
|
+
return pkgManagers
|
48
|
+
}
|
43
49
|
const pkgMgrQuestion = new Enquirer();
|
44
50
|
const pkgMgr = yield* Effect.tryPromise({
|
45
51
|
try: () => pkgMgrQuestion.prompt({
|
46
52
|
type: 'select',
|
47
53
|
name: 'packageManager',
|
48
54
|
message: 'Select a package manager',
|
49
|
-
choices: [...
|
55
|
+
choices: [...supportedPackageManagers()],
|
50
56
|
}),
|
51
57
|
catch: (e) => {
|
52
58
|
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,
|