reset-framework-cli 1.2.0 → 1.2.2
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 +8 -6
- package/src/commands/build.js +91 -73
- package/src/commands/dev.js +143 -122
- package/src/commands/doctor.js +61 -54
- package/src/commands/init.js +946 -866
- package/src/commands/package.js +68 -68
- package/src/index.js +195 -195
- package/src/lib/backend.js +123 -0
- 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 +251 -236
- package/src/lib/process.js +303 -303
- package/src/lib/project.js +531 -494
- 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,
|
|
@@ -7,21 +7,22 @@ import {
|
|
|
7
7
|
getFrameworkRuntimeModeSummary,
|
|
8
8
|
hasFrameworkSourcePackage,
|
|
9
9
|
loadResetConfig,
|
|
10
|
+
resolveOptionalBackendEntry,
|
|
10
11
|
resolveFrontendDir,
|
|
11
12
|
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
|
-
|
|
13
|
+
resolveConfigPath,
|
|
14
|
+
resolveFrameworkPaths
|
|
15
|
+
} from "../lib/project.js"
|
|
16
|
+
import { findVcpkgToolchainFile } from "../lib/toolchain.js"
|
|
17
|
+
import {
|
|
18
|
+
printBanner,
|
|
19
|
+
printKeyValueTable,
|
|
20
|
+
printSection,
|
|
21
|
+
printStatusTable
|
|
22
|
+
} from "../lib/ui.js"
|
|
23
|
+
|
|
24
|
+
export const description = "Inspect the current project layout"
|
|
25
|
+
|
|
25
26
|
export async function run(context) {
|
|
26
27
|
const appPaths = resolveAppPaths(context.projectRoot)
|
|
27
28
|
const frameworkPaths = resolveFrameworkPaths()
|
|
@@ -39,35 +40,39 @@ export async function run(context) {
|
|
|
39
40
|
} catch (error) {
|
|
40
41
|
runtimeModeError = error instanceof Error ? error.message : String(error)
|
|
41
42
|
}
|
|
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
|
-
|
|
53
|
-
appChecks.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
])
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
43
|
+
|
|
44
|
+
printBanner("reset-framework-cli doctor", description)
|
|
45
|
+
|
|
46
|
+
printSection("App project")
|
|
47
|
+
|
|
48
|
+
const appChecks = [...getAppChecks(appPaths)]
|
|
49
|
+
if (config) {
|
|
50
|
+
appChecks.unshift(["frontend", resolveFrontendDir(appPaths, config)])
|
|
51
|
+
}
|
|
52
|
+
const backendEntry = resolveOptionalBackendEntry(appPaths)
|
|
53
|
+
if (backendEntry) {
|
|
54
|
+
appChecks.splice(1, 0, ["backend", backendEntry])
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
printStatusTable(
|
|
58
|
+
appChecks.map(([label, filePath]) => [
|
|
59
|
+
existsSync(filePath) ? "ok" : "missing",
|
|
60
|
+
label,
|
|
61
|
+
filePath
|
|
62
|
+
])
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
console.log("")
|
|
66
|
+
printSection("Framework installation")
|
|
67
|
+
|
|
63
68
|
printStatusTable(
|
|
64
69
|
getFrameworkChecks(frameworkPaths).map(([label, filePath]) => [
|
|
65
70
|
existsSync(filePath) ? "ok" : "missing",
|
|
66
|
-
label,
|
|
67
|
-
filePath
|
|
68
|
-
])
|
|
69
|
-
)
|
|
70
|
-
|
|
71
|
+
label,
|
|
72
|
+
filePath
|
|
73
|
+
])
|
|
74
|
+
)
|
|
75
|
+
|
|
71
76
|
console.log("")
|
|
72
77
|
printSection("Runtime installation")
|
|
73
78
|
|
|
@@ -97,6 +102,7 @@ export async function run(context) {
|
|
|
97
102
|
? `${frameworkPaths.frameworkPackage.packageName}@${frameworkPaths.frameworkPackage.version}`
|
|
98
103
|
: "Not installed"
|
|
99
104
|
],
|
|
105
|
+
["Backend", `${frameworkPaths.backendPackage.packageName}@${frameworkPaths.backendPackage.version}`],
|
|
100
106
|
["SDK", `${frameworkPaths.sdkPackage.packageName}@${frameworkPaths.sdkPackage.version}`],
|
|
101
107
|
["Schema", `${frameworkPaths.schemaPackage.packageName}@${frameworkPaths.schemaPackage.version}`]
|
|
102
108
|
])
|
|
@@ -122,16 +128,17 @@ export async function run(context) {
|
|
|
122
128
|
}
|
|
123
129
|
|
|
124
130
|
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
|
-
["
|
|
133
|
-
["
|
|
134
|
-
["
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
131
|
+
console.log("")
|
|
132
|
+
printSection("Config")
|
|
133
|
+
printKeyValueTable([
|
|
134
|
+
["Name", config.name],
|
|
135
|
+
["Product", config.productName],
|
|
136
|
+
["App ID", config.appId],
|
|
137
|
+
["Frontend", config.project.frontendDir],
|
|
138
|
+
["Backend", backendEntry ?? "disabled"],
|
|
139
|
+
["Styling", config.project.styling],
|
|
140
|
+
["Dev URL", config.frontend.devUrl],
|
|
141
|
+
["Output", config.build.outputDir]
|
|
142
|
+
])
|
|
143
|
+
}
|
|
144
|
+
}
|