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.
Files changed (35) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +19 -19
  3. package/package.json +8 -6
  4. package/src/commands/build.js +91 -73
  5. package/src/commands/dev.js +143 -122
  6. package/src/commands/doctor.js +61 -54
  7. package/src/commands/init.js +946 -866
  8. package/src/commands/package.js +68 -68
  9. package/src/index.js +195 -195
  10. package/src/lib/backend.js +123 -0
  11. package/src/lib/context.js +66 -66
  12. package/src/lib/framework.js +57 -57
  13. package/src/lib/logger.js +11 -11
  14. package/src/lib/output.js +251 -236
  15. package/src/lib/process.js +303 -303
  16. package/src/lib/project.js +531 -494
  17. package/src/lib/toolchain.js +62 -62
  18. package/src/lib/ui.js +244 -244
  19. package/templates/basic/README.md +15 -15
  20. package/templates/basic/frontend/README.md +73 -73
  21. package/templates/basic/frontend/eslint.config.js +23 -23
  22. package/templates/basic/frontend/index.html +13 -13
  23. package/templates/basic/frontend/package.json +31 -31
  24. package/templates/basic/frontend/public/icons.svg +24 -24
  25. package/templates/basic/frontend/src/App.css +216 -216
  26. package/templates/basic/frontend/src/App.tsx +77 -77
  27. package/templates/basic/frontend/src/assets/vite.svg +1 -1
  28. package/templates/basic/frontend/src/index.css +111 -111
  29. package/templates/basic/frontend/src/lib/reset.ts +1 -1
  30. package/templates/basic/frontend/src/main.tsx +10 -10
  31. package/templates/basic/frontend/tsconfig.app.json +28 -28
  32. package/templates/basic/frontend/tsconfig.json +7 -7
  33. package/templates/basic/frontend/tsconfig.node.json +26 -26
  34. package/templates/basic/frontend/vite.config.ts +16 -16
  35. package/templates/basic/reset.config.json +58 -58
@@ -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
- 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
-
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
- ["Styling", config.project.styling],
133
- ["Dev URL", config.frontend.devUrl],
134
- ["Output", config.build.outputDir]
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
+ }