reset-framework-cli 1.2.1 → 1.2.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.
Files changed (35) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +25 -25
  3. package/package.json +8 -6
  4. package/src/commands/build.js +144 -126
  5. package/src/commands/dev.js +195 -174
  6. package/src/commands/doctor.js +140 -133
  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 +283 -268
  15. package/src/lib/process.js +303 -303
  16. package/src/lib/project.js +897 -833
  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,179 +1,200 @@
1
- import { prepareFrameworkRuntime } from "../lib/framework.js"
2
- import {
3
- registerChildCleanup,
4
- resolvePackageManagerCommand,
5
- spawnCommand,
6
- waitForProcessExit,
7
- waitForUrl
8
- } from "../lib/process.js"
9
- import {
10
- assertAppProject,
11
- assertFrameworkInstall,
12
- loadResetConfig,
13
- resolveAppPaths,
14
- resolveAppPackageManager,
15
- resolveConfigPath,
16
- resolveDevServerOptions,
17
- resolveFrontendDir,
18
- resolveFrameworkBuildPaths,
19
- resolveFrameworkRuntimeBinary,
20
- resolveFrameworkRuntimeStrategy,
21
- resolveFrameworkPaths
22
- } from "../lib/project.js"
23
- import {
24
- createProgress,
25
- printBanner,
26
- printKeyValueTable,
27
- printSection,
28
- printStatusTable
29
- } from "../lib/ui.js"
30
-
31
- export const description = "Run the frontend dev server and native host"
32
-
33
- export async function run(context) {
34
- const dryRun = Boolean(context.flags["dry-run"])
35
- const skipFrontend = Boolean(context.flags["skip-frontend"])
36
- const skipRuntime = Boolean(context.flags["skip-runtime"])
37
- const noOpen = Boolean(context.flags["no-open"])
1
+ import { prepareFrameworkRuntime } from "../lib/framework.js"
2
+ import { prepareAppBackend } from "../lib/backend.js"
3
+ import {
4
+ registerChildCleanup,
5
+ resolvePackageManagerCommand,
6
+ spawnCommand,
7
+ waitForProcessExit,
8
+ waitForUrl
9
+ } from "../lib/process.js"
10
+ import {
11
+ assertAppProject,
12
+ assertFrameworkInstall,
13
+ loadResetConfig,
14
+ resolveAppPaths,
15
+ resolveAppPackageManager,
16
+ resolveConfigPath,
17
+ resolveDevServerOptions,
18
+ resolveFrontendDir,
19
+ resolveFrameworkBuildPaths,
20
+ resolveFrameworkRuntimeBinary,
21
+ resolveFrameworkRuntimeStrategy,
22
+ resolveFrameworkPaths,
23
+ resolveOptionalBackendEntry
24
+ } from "../lib/project.js"
25
+ import {
26
+ createProgress,
27
+ printBanner,
28
+ printKeyValueTable,
29
+ printSection,
30
+ printStatusTable
31
+ } from "../lib/ui.js"
32
+
33
+ export const description = "Run the frontend dev server and native host"
34
+
35
+ export async function run(context) {
36
+ const dryRun = Boolean(context.flags["dry-run"])
37
+ const skipFrontend = Boolean(context.flags["skip-frontend"])
38
+ const skipRuntime = Boolean(context.flags["skip-runtime"])
39
+ const noOpen = Boolean(context.flags["no-open"])
38
40
  const preferSource = Boolean(context.flags["runtime-source"])
39
41
 
40
42
  const appPaths = resolveAppPaths(context.projectRoot)
41
- const frameworkPaths = resolveFrameworkPaths()
43
+ const frameworkPaths = resolveFrameworkPaths({ appRoot: context.projectRoot })
42
44
  assertAppProject(appPaths)
43
45
  assertFrameworkInstall(frameworkPaths)
44
- const config = loadResetConfig(appPaths)
45
- assertAppProject(appPaths, config)
46
- const packageManager = resolveAppPackageManager(appPaths, config)
47
- const devServer = resolveDevServerOptions(config)
48
- const configPath = resolveConfigPath(appPaths)
49
- const frontendDir = resolveFrontendDir(appPaths, config)
50
- const frameworkBuildPaths = resolveFrameworkBuildPaths(appPaths)
51
- const runtimeStrategy = resolveFrameworkRuntimeStrategy(frameworkPaths, { preferSource })
52
- const steps = [
53
- !skipRuntime ? "Prepare runtime" : null,
54
- !skipFrontend ? "Start frontend dev server" : null,
55
- !noOpen ? "Launch desktop window" : null
56
- ].filter(Boolean)
57
-
58
- printBanner("reset-framework-cli dev", description)
59
- printSection("Project")
60
- printKeyValueTable([
61
- ["Config", configPath],
62
- ["Frontend", frontendDir],
63
- ["Package manager", packageManager],
64
- ["Dev URL", config.frontend.devUrl],
65
- ["Runtime", `${runtimeStrategy.kind === "prebuilt" ? "bundled" : "source"} (${runtimeStrategy.label})`]
66
- ])
67
- console.log("")
68
-
69
- printSection("Plan")
70
- printStatusTable([
71
- [
72
- skipRuntime ? "skip" : "ready",
73
- "Runtime",
74
- skipRuntime
75
- ? (runtimeStrategy.kind === "prebuilt" ? "Reuse the bundled runtime package" : "Reuse the existing source runtime build")
76
- : (runtimeStrategy.kind === "prebuilt" ? "Use the bundled runtime package" : "Configure and build the runtime from source")
77
- ],
78
- [skipFrontend ? "skip" : "ready", "Frontend", skipFrontend ? "Expecting an already running dev server" : "Start the frontend dev server and wait for readiness"],
79
- [noOpen ? "skip" : "ready", "Window", noOpen ? "Do not launch the desktop window" : "Start the native host with the active project config"]
80
- ])
81
-
82
- if (dryRun) {
83
- console.log("")
84
- printSection("Dry run")
85
- printStatusTable(
86
- steps.length > 0
87
- ? steps.map((step) => ["plan", step, "No processes will be started"])
88
- : [["warn", "Nothing to do", "All dev phases were skipped"]]
89
- )
90
- return
91
- }
92
-
93
- if (steps.length === 0) {
94
- console.log("")
95
- printSection("Result")
96
- printStatusTable([["warn", "Nothing to do", "All dev phases were skipped"]])
97
- return
98
- }
99
-
100
- console.log("")
101
- const progress = createProgress(steps.length, "Dev")
102
-
103
- if (!skipRuntime) {
104
- const preparedRuntime = await prepareFrameworkRuntime(frameworkPaths, frameworkBuildPaths, "dev", {
105
- cwd: appPaths.appRoot,
106
- dryRun,
107
- preferSource
108
- })
109
- progress.tick(preparedRuntime.kind === "prebuilt" ? "Bundled runtime ready" : "Native runtime built")
110
- }
111
-
112
- const children = []
113
-
114
- if (!skipFrontend) {
115
- const frontendProcess = spawnCommand(resolvePackageManagerCommand(packageManager), [
116
- "run",
117
- "dev",
118
- "--",
119
- "--host",
120
- devServer.host,
121
- "--port",
122
- devServer.port,
123
- "--strictPort"
124
- ], {
125
- cwd: frontendDir,
126
- dryRun
127
- })
128
-
129
- if (frontendProcess) {
130
- children.push(frontendProcess)
131
- await waitForUrl(config.frontend.devUrl)
132
- progress.tick("Frontend dev server is reachable")
133
- }
134
- }
135
-
136
- if (!noOpen) {
137
- const appBinary = resolveFrameworkRuntimeBinary(frameworkPaths, frameworkBuildPaths, "dev", {
138
- mustExist: !dryRun,
139
- strategy: runtimeStrategy
140
- })
141
- const appProcess = spawnCommand(appBinary, [], {
142
- cwd: appPaths.appRoot,
143
- env: {
144
- RESET_CONFIG_PATH: configPath,
145
- RESET_FRONTEND_DEV_URL: config.frontend.devUrl
146
- },
147
- dryRun
148
- })
149
-
150
- if (appProcess) {
151
- children.push(appProcess)
152
- progress.tick("Desktop window launched")
153
- }
154
- }
155
-
156
- if (children.length === 0) {
157
- return
158
- }
159
-
160
- console.log("")
161
- printSection("Runtime")
162
- printStatusTable([
163
- ["done", "Frontend", config.frontend.devUrl],
164
- ["done", "Config", configPath]
165
- ])
166
- console.log(" Press Ctrl+C to stop")
167
-
168
- const cleanup = registerChildCleanup(children)
169
-
170
- try {
171
- await Promise.race([
172
- ...children.map((child, index) =>
173
- waitForProcessExit(child, index === 0 ? "dev process" : "native host")
174
- )
175
- ])
176
- } finally {
177
- await cleanup()
178
- }
179
- }
46
+ const config = loadResetConfig(appPaths)
47
+ assertAppProject(appPaths, config)
48
+ const packageManager = resolveAppPackageManager(appPaths, config)
49
+ const devServer = resolveDevServerOptions(config)
50
+ const configPath = resolveConfigPath(appPaths)
51
+ const frontendDir = resolveFrontendDir(appPaths, config)
52
+ const backendEntry = resolveOptionalBackendEntry(appPaths)
53
+ const frameworkBuildPaths = resolveFrameworkBuildPaths(appPaths)
54
+ const runtimeStrategy = resolveFrameworkRuntimeStrategy(frameworkPaths, { preferSource })
55
+ const steps = [
56
+ !skipRuntime ? "Prepare runtime" : null,
57
+ backendEntry ? "Bundle backend sidecar" : null,
58
+ !skipFrontend ? "Start frontend dev server" : null,
59
+ !noOpen ? "Launch desktop window" : null
60
+ ].filter(Boolean)
61
+
62
+ printBanner("reset-framework-cli dev", description)
63
+ printSection("Project")
64
+ printKeyValueTable([
65
+ ["Config", configPath],
66
+ ["Frontend", frontendDir],
67
+ ["Backend", backendEntry ?? "not configured"],
68
+ ["Package manager", packageManager],
69
+ ["Dev URL", config.frontend.devUrl],
70
+ ["Runtime", `${runtimeStrategy.kind === "prebuilt" ? "bundled" : "source"} (${runtimeStrategy.label})`]
71
+ ])
72
+ console.log("")
73
+
74
+ printSection("Plan")
75
+ printStatusTable([
76
+ [
77
+ skipRuntime ? "skip" : "ready",
78
+ "Runtime",
79
+ skipRuntime
80
+ ? (runtimeStrategy.kind === "prebuilt" ? "Reuse the bundled runtime package" : "Reuse the existing source runtime build")
81
+ : (runtimeStrategy.kind === "prebuilt" ? "Use the bundled runtime package" : "Configure and build the runtime from source")
82
+ ],
83
+ [backendEntry ? "ready" : "skip", "Backend", backendEntry ? "Bundle the optional TypeScript sidecar backend" : "No backend entry was found under backend/"],
84
+ [skipFrontend ? "skip" : "ready", "Frontend", skipFrontend ? "Expecting an already running dev server" : "Start the frontend dev server and wait for readiness"],
85
+ [noOpen ? "skip" : "ready", "Window", noOpen ? "Do not launch the desktop window" : "Start the native host with the active project config"]
86
+ ])
87
+
88
+ if (dryRun) {
89
+ console.log("")
90
+ printSection("Dry run")
91
+ printStatusTable(
92
+ steps.length > 0
93
+ ? steps.map((step) => ["plan", step, "No processes will be started"])
94
+ : [["warn", "Nothing to do", "All dev phases were skipped"]]
95
+ )
96
+ return
97
+ }
98
+
99
+ if (steps.length === 0) {
100
+ console.log("")
101
+ printSection("Result")
102
+ printStatusTable([["warn", "Nothing to do", "All dev phases were skipped"]])
103
+ return
104
+ }
105
+
106
+ console.log("")
107
+ const progress = createProgress(steps.length, "Dev")
108
+
109
+ if (!skipRuntime) {
110
+ const preparedRuntime = await prepareFrameworkRuntime(frameworkPaths, frameworkBuildPaths, "dev", {
111
+ cwd: appPaths.appRoot,
112
+ dryRun,
113
+ preferSource
114
+ })
115
+ progress.tick(preparedRuntime.kind === "prebuilt" ? "Bundled runtime ready" : "Native runtime built")
116
+ }
117
+
118
+ const children = []
119
+ let backendArtifact = null
120
+
121
+ if (backendEntry) {
122
+ backendArtifact = await prepareAppBackend(frameworkPaths, appPaths, "dev")
123
+ progress.tick("Backend sidecar bundled")
124
+ }
125
+
126
+ if (!skipFrontend) {
127
+ const frontendProcess = spawnCommand(resolvePackageManagerCommand(packageManager), [
128
+ "run",
129
+ "dev",
130
+ "--",
131
+ "--host",
132
+ devServer.host,
133
+ "--port",
134
+ devServer.port,
135
+ "--strictPort"
136
+ ], {
137
+ cwd: frontendDir,
138
+ dryRun
139
+ })
140
+
141
+ if (frontendProcess) {
142
+ children.push(frontendProcess)
143
+ await waitForUrl(config.frontend.devUrl)
144
+ progress.tick("Frontend dev server is reachable")
145
+ }
146
+ }
147
+
148
+ if (!noOpen) {
149
+ const appBinary = resolveFrameworkRuntimeBinary(frameworkPaths, frameworkBuildPaths, "dev", {
150
+ mustExist: !dryRun,
151
+ strategy: runtimeStrategy
152
+ })
153
+ const appProcess = spawnCommand(appBinary, [], {
154
+ cwd: appPaths.appRoot,
155
+ env: {
156
+ RESET_CONFIG_PATH: configPath,
157
+ RESET_FRONTEND_DEV_URL: config.frontend.devUrl,
158
+ ...(backendArtifact
159
+ ? {
160
+ RESET_BACKEND_EXECUTABLE: backendArtifact.runtimeExecutablePath,
161
+ RESET_BACKEND_RUNNER: backendArtifact.runnerPath,
162
+ RESET_BACKEND_ENTRY: backendArtifact.bundleEntryPath,
163
+ RESET_BACKEND_WORKING_DIRECTORY: backendArtifact.workingDirectory
164
+ }
165
+ : {})
166
+ },
167
+ dryRun
168
+ })
169
+
170
+ if (appProcess) {
171
+ children.push(appProcess)
172
+ progress.tick("Desktop window launched")
173
+ }
174
+ }
175
+
176
+ if (children.length === 0) {
177
+ return
178
+ }
179
+
180
+ console.log("")
181
+ printSection("Runtime")
182
+ printStatusTable([
183
+ ["done", "Frontend", config.frontend.devUrl],
184
+ ["done", "Config", configPath],
185
+ ["done", "Backend", backendArtifact ? backendArtifact.bundleEntryPath : "disabled"]
186
+ ])
187
+ console.log(" Press Ctrl+C to stop")
188
+
189
+ const cleanup = registerChildCleanup(children)
190
+
191
+ try {
192
+ await Promise.race([
193
+ ...children.map((child, index) =>
194
+ waitForProcessExit(child, index === 0 ? "dev process" : "native host")
195
+ )
196
+ ])
197
+ } finally {
198
+ await cleanup()
199
+ }
200
+ }
@@ -1,137 +1,144 @@
1
- import { existsSync } from "node:fs"
2
-
3
- import {
4
- getAppChecks,
5
- getFrameworkChecks,
6
- getFrameworkRuntimeChecks,
7
- getFrameworkRuntimeModeSummary,
8
- hasFrameworkSourcePackage,
9
- loadResetConfig,
10
- resolveFrontendDir,
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
-
1
+ import { existsSync } from "node:fs"
2
+
3
+ import {
4
+ getAppChecks,
5
+ getFrameworkChecks,
6
+ getFrameworkRuntimeChecks,
7
+ getFrameworkRuntimeModeSummary,
8
+ hasFrameworkSourcePackage,
9
+ loadResetConfig,
10
+ resolveOptionalBackendEntry,
11
+ resolveFrontendDir,
12
+ resolveAppPaths,
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
- const frameworkPaths = resolveFrameworkPaths()
28
+ const frameworkPaths = resolveFrameworkPaths({ appRoot: context.projectRoot })
28
29
  let runtimeMode = null
29
30
  let runtimeModeError = null
30
-
31
- let config = null
32
-
33
- if (existsSync(resolveConfigPath(appPaths))) {
34
- config = loadResetConfig(appPaths)
35
- }
36
-
37
- try {
38
- runtimeMode = getFrameworkRuntimeModeSummary(frameworkPaths)
39
- } catch (error) {
40
- runtimeModeError = error instanceof Error ? error.message : String(error)
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
-
63
- printStatusTable(
64
- getFrameworkChecks(frameworkPaths).map(([label, filePath]) => [
65
- existsSync(filePath) ? "ok" : "missing",
66
- label,
67
- filePath
68
- ])
69
- )
70
-
71
- console.log("")
72
- printSection("Runtime installation")
73
-
74
- const runtimeChecks = getFrameworkRuntimeChecks(frameworkPaths)
75
- printStatusTable(
76
- runtimeChecks.length > 0
77
- ? runtimeChecks.map(([label, filePath]) => [
78
- existsSync(filePath) ? "ok" : "missing",
79
- label,
80
- filePath
81
- ])
82
- : [["warn", "runtime", `No packaged runtime registered for ${process.platform}-${process.arch}`]]
83
- )
84
-
85
- console.log("")
86
- printSection("Framework packages")
87
- printKeyValueTable([
88
- [
89
- "Runtime",
90
- frameworkPaths.runtimePackage?.packageInfo
91
- ? `${frameworkPaths.runtimePackage.packageInfo.packageName}@${frameworkPaths.runtimePackage.packageInfo.version}`
92
- : `Not installed for ${process.platform}-${process.arch}`
93
- ],
94
- [
95
- "Native source",
96
- frameworkPaths.frameworkPackage
97
- ? `${frameworkPaths.frameworkPackage.packageName}@${frameworkPaths.frameworkPackage.version}`
98
- : "Not installed"
99
- ],
100
- ["SDK", `${frameworkPaths.sdkPackage.packageName}@${frameworkPaths.sdkPackage.version}`],
101
- ["Schema", `${frameworkPaths.schemaPackage.packageName}@${frameworkPaths.schemaPackage.version}`]
102
- ])
103
-
104
- console.log("")
105
- printSection("Runtime mode")
106
- printStatusTable([
107
- [
108
- runtimeMode ? "ok" : "warn",
109
- "Runtime mode",
110
- runtimeMode ? `${runtimeMode.kind} (${runtimeMode.label})` : runtimeModeError
111
- ]
112
- ])
113
-
114
- if (hasFrameworkSourcePackage(frameworkPaths)) {
115
- console.log("")
116
- printSection("Native toolchain")
117
- const vcpkgToolchainFile = findVcpkgToolchainFile()
118
- printStatusTable([
119
- ["ok", "Framework source", frameworkPaths.frameworkRoot],
120
- [vcpkgToolchainFile ? "ok" : "warn", "vcpkg toolchain", vcpkgToolchainFile ?? "Will be bootstrapped on first source build"]
121
- ])
122
- }
123
-
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
- }
31
+
32
+ let config = null
33
+
34
+ if (existsSync(resolveConfigPath(appPaths))) {
35
+ config = loadResetConfig(appPaths)
36
+ }
37
+
38
+ try {
39
+ runtimeMode = getFrameworkRuntimeModeSummary(frameworkPaths)
40
+ } catch (error) {
41
+ runtimeModeError = error instanceof Error ? error.message : String(error)
42
+ }
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
+
68
+ printStatusTable(
69
+ getFrameworkChecks(frameworkPaths).map(([label, filePath]) => [
70
+ existsSync(filePath) ? "ok" : "missing",
71
+ label,
72
+ filePath
73
+ ])
74
+ )
75
+
76
+ console.log("")
77
+ printSection("Runtime installation")
78
+
79
+ const runtimeChecks = getFrameworkRuntimeChecks(frameworkPaths)
80
+ printStatusTable(
81
+ runtimeChecks.length > 0
82
+ ? runtimeChecks.map(([label, filePath]) => [
83
+ existsSync(filePath) ? "ok" : "missing",
84
+ label,
85
+ filePath
86
+ ])
87
+ : [["warn", "runtime", `No packaged runtime registered for ${process.platform}-${process.arch}`]]
88
+ )
89
+
90
+ console.log("")
91
+ printSection("Framework packages")
92
+ printKeyValueTable([
93
+ [
94
+ "Runtime",
95
+ frameworkPaths.runtimePackage?.packageInfo
96
+ ? `${frameworkPaths.runtimePackage.packageInfo.packageName}@${frameworkPaths.runtimePackage.packageInfo.version}`
97
+ : `Not installed for ${process.platform}-${process.arch}`
98
+ ],
99
+ [
100
+ "Native source",
101
+ frameworkPaths.frameworkPackage
102
+ ? `${frameworkPaths.frameworkPackage.packageName}@${frameworkPaths.frameworkPackage.version}`
103
+ : "Not installed"
104
+ ],
105
+ ["Backend", `${frameworkPaths.backendPackage.packageName}@${frameworkPaths.backendPackage.version}`],
106
+ ["SDK", `${frameworkPaths.sdkPackage.packageName}@${frameworkPaths.sdkPackage.version}`],
107
+ ["Schema", `${frameworkPaths.schemaPackage.packageName}@${frameworkPaths.schemaPackage.version}`]
108
+ ])
109
+
110
+ console.log("")
111
+ printSection("Runtime mode")
112
+ printStatusTable([
113
+ [
114
+ runtimeMode ? "ok" : "warn",
115
+ "Runtime mode",
116
+ runtimeMode ? `${runtimeMode.kind} (${runtimeMode.label})` : runtimeModeError
117
+ ]
118
+ ])
119
+
120
+ if (hasFrameworkSourcePackage(frameworkPaths)) {
121
+ console.log("")
122
+ printSection("Native toolchain")
123
+ const vcpkgToolchainFile = findVcpkgToolchainFile()
124
+ printStatusTable([
125
+ ["ok", "Framework source", frameworkPaths.frameworkRoot],
126
+ [vcpkgToolchainFile ? "ok" : "warn", "vcpkg toolchain", vcpkgToolchainFile ?? "Will be bootstrapped on first source build"]
127
+ ])
128
+ }
129
+
130
+ if (config) {
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
+ }