reset-framework-cli 1.2.0 → 1.2.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/LICENSE +20 -20
- package/README.md +19 -19
- package/package.json +6 -6
- package/src/commands/build.js +71 -71
- package/src/commands/dev.js +121 -121
- package/src/commands/doctor.js +54 -54
- package/src/commands/init.js +866 -866
- package/src/commands/package.js +68 -68
- package/src/index.js +195 -195
- package/src/lib/context.js +66 -66
- package/src/lib/framework.js +57 -57
- package/src/lib/logger.js +11 -11
- package/src/lib/output.js +234 -234
- package/src/lib/process.js +303 -303
- package/src/lib/project.js +493 -493
- package/src/lib/toolchain.js +62 -62
- package/src/lib/ui.js +244 -244
- package/templates/basic/README.md +15 -15
- package/templates/basic/frontend/README.md +73 -73
- package/templates/basic/frontend/eslint.config.js +23 -23
- package/templates/basic/frontend/index.html +13 -13
- package/templates/basic/frontend/package.json +31 -31
- package/templates/basic/frontend/public/icons.svg +24 -24
- package/templates/basic/frontend/src/App.css +216 -216
- package/templates/basic/frontend/src/App.tsx +77 -77
- package/templates/basic/frontend/src/assets/vite.svg +1 -1
- package/templates/basic/frontend/src/index.css +111 -111
- package/templates/basic/frontend/src/lib/reset.ts +1 -1
- package/templates/basic/frontend/src/main.tsx +10 -10
- package/templates/basic/frontend/tsconfig.app.json +28 -28
- package/templates/basic/frontend/tsconfig.json +7 -7
- package/templates/basic/frontend/tsconfig.node.json +26 -26
- package/templates/basic/frontend/vite.config.ts +16 -16
- package/templates/basic/reset.config.json +58 -58
package/src/commands/doctor.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { existsSync } from "node:fs"
|
|
2
|
-
|
|
1
|
+
import { existsSync } from "node:fs"
|
|
2
|
+
|
|
3
3
|
import {
|
|
4
4
|
getAppChecks,
|
|
5
5
|
getFrameworkChecks,
|
|
@@ -9,19 +9,19 @@ import {
|
|
|
9
9
|
loadResetConfig,
|
|
10
10
|
resolveFrontendDir,
|
|
11
11
|
resolveAppPaths,
|
|
12
|
-
resolveConfigPath,
|
|
13
|
-
resolveFrameworkPaths
|
|
14
|
-
} from "../lib/project.js"
|
|
15
|
-
import { findVcpkgToolchainFile } from "../lib/toolchain.js"
|
|
16
|
-
import {
|
|
17
|
-
printBanner,
|
|
18
|
-
printKeyValueTable,
|
|
19
|
-
printSection,
|
|
20
|
-
printStatusTable
|
|
21
|
-
} from "../lib/ui.js"
|
|
22
|
-
|
|
23
|
-
export const description = "Inspect the current project layout"
|
|
24
|
-
|
|
12
|
+
resolveConfigPath,
|
|
13
|
+
resolveFrameworkPaths
|
|
14
|
+
} from "../lib/project.js"
|
|
15
|
+
import { findVcpkgToolchainFile } from "../lib/toolchain.js"
|
|
16
|
+
import {
|
|
17
|
+
printBanner,
|
|
18
|
+
printKeyValueTable,
|
|
19
|
+
printSection,
|
|
20
|
+
printStatusTable
|
|
21
|
+
} from "../lib/ui.js"
|
|
22
|
+
|
|
23
|
+
export const description = "Inspect the current project layout"
|
|
24
|
+
|
|
25
25
|
export async function run(context) {
|
|
26
26
|
const appPaths = resolveAppPaths(context.projectRoot)
|
|
27
27
|
const frameworkPaths = resolveFrameworkPaths()
|
|
@@ -39,35 +39,35 @@ export async function run(context) {
|
|
|
39
39
|
} catch (error) {
|
|
40
40
|
runtimeModeError = error instanceof Error ? error.message : String(error)
|
|
41
41
|
}
|
|
42
|
-
|
|
43
|
-
printBanner("reset-framework-cli doctor", description)
|
|
44
|
-
|
|
45
|
-
printSection("App project")
|
|
46
|
-
|
|
47
|
-
const appChecks = [...getAppChecks(appPaths)]
|
|
48
|
-
if (config) {
|
|
49
|
-
appChecks.unshift(["frontend", resolveFrontendDir(appPaths, config)])
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
printStatusTable(
|
|
53
|
-
appChecks.map(([label, filePath]) => [
|
|
54
|
-
existsSync(filePath) ? "ok" : "missing",
|
|
55
|
-
label,
|
|
56
|
-
filePath
|
|
57
|
-
])
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
console.log("")
|
|
61
|
-
printSection("Framework installation")
|
|
62
|
-
|
|
42
|
+
|
|
43
|
+
printBanner("reset-framework-cli doctor", description)
|
|
44
|
+
|
|
45
|
+
printSection("App project")
|
|
46
|
+
|
|
47
|
+
const appChecks = [...getAppChecks(appPaths)]
|
|
48
|
+
if (config) {
|
|
49
|
+
appChecks.unshift(["frontend", resolveFrontendDir(appPaths, config)])
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
printStatusTable(
|
|
53
|
+
appChecks.map(([label, filePath]) => [
|
|
54
|
+
existsSync(filePath) ? "ok" : "missing",
|
|
55
|
+
label,
|
|
56
|
+
filePath
|
|
57
|
+
])
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
console.log("")
|
|
61
|
+
printSection("Framework installation")
|
|
62
|
+
|
|
63
63
|
printStatusTable(
|
|
64
64
|
getFrameworkChecks(frameworkPaths).map(([label, filePath]) => [
|
|
65
65
|
existsSync(filePath) ? "ok" : "missing",
|
|
66
|
-
label,
|
|
67
|
-
filePath
|
|
68
|
-
])
|
|
69
|
-
)
|
|
70
|
-
|
|
66
|
+
label,
|
|
67
|
+
filePath
|
|
68
|
+
])
|
|
69
|
+
)
|
|
70
|
+
|
|
71
71
|
console.log("")
|
|
72
72
|
printSection("Runtime installation")
|
|
73
73
|
|
|
@@ -122,16 +122,16 @@ export async function run(context) {
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
if (config) {
|
|
125
|
-
console.log("")
|
|
126
|
-
printSection("Config")
|
|
127
|
-
printKeyValueTable([
|
|
128
|
-
["Name", config.name],
|
|
129
|
-
["Product", config.productName],
|
|
130
|
-
["App ID", config.appId],
|
|
131
|
-
["Frontend", config.project.frontendDir],
|
|
132
|
-
["Styling", config.project.styling],
|
|
133
|
-
["Dev URL", config.frontend.devUrl],
|
|
134
|
-
["Output", config.build.outputDir]
|
|
135
|
-
])
|
|
136
|
-
}
|
|
137
|
-
}
|
|
125
|
+
console.log("")
|
|
126
|
+
printSection("Config")
|
|
127
|
+
printKeyValueTable([
|
|
128
|
+
["Name", config.name],
|
|
129
|
+
["Product", config.productName],
|
|
130
|
+
["App ID", config.appId],
|
|
131
|
+
["Frontend", config.project.frontendDir],
|
|
132
|
+
["Styling", config.project.styling],
|
|
133
|
+
["Dev URL", config.frontend.devUrl],
|
|
134
|
+
["Output", config.build.outputDir]
|
|
135
|
+
])
|
|
136
|
+
}
|
|
137
|
+
}
|