reset-framework-cli 1.1.2 → 1.1.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 (34) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +47 -47
  3. package/package.json +4 -4
  4. package/src/commands/build.js +114 -113
  5. package/src/commands/dev.js +157 -153
  6. package/src/commands/doctor.js +89 -89
  7. package/src/commands/init.js +925 -920
  8. package/src/commands/package.js +49 -44
  9. package/src/index.js +213 -213
  10. package/src/lib/context.js +66 -66
  11. package/src/lib/framework.js +150 -28
  12. package/src/lib/logger.js +11 -11
  13. package/src/lib/output.js +214 -106
  14. package/src/lib/process.js +188 -181
  15. package/src/lib/project.js +559 -475
  16. package/src/lib/toolchain.js +62 -62
  17. package/src/lib/ui.js +244 -244
  18. package/templates/basic/README.md +15 -15
  19. package/templates/basic/frontend/README.md +73 -73
  20. package/templates/basic/frontend/eslint.config.js +23 -23
  21. package/templates/basic/frontend/index.html +13 -13
  22. package/templates/basic/frontend/package.json +31 -31
  23. package/templates/basic/frontend/public/icons.svg +24 -24
  24. package/templates/basic/frontend/src/App.css +216 -138
  25. package/templates/basic/frontend/src/App.tsx +77 -76
  26. package/templates/basic/frontend/src/assets/vite.svg +1 -1
  27. package/templates/basic/frontend/src/index.css +111 -111
  28. package/templates/basic/frontend/src/lib/reset.ts +1 -1
  29. package/templates/basic/frontend/src/main.tsx +10 -10
  30. package/templates/basic/frontend/tsconfig.app.json +28 -28
  31. package/templates/basic/frontend/tsconfig.json +7 -7
  32. package/templates/basic/frontend/tsconfig.node.json +26 -26
  33. package/templates/basic/frontend/vite.config.ts +16 -16
  34. package/templates/basic/reset.config.json +58 -58
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Jan Kordoš
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to do so, subject to the
10
- following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jan Kordoš
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to do so, subject to the
10
+ following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
package/README.md CHANGED
@@ -1,47 +1,47 @@
1
- # reset-framework-cli
2
-
3
- `reset-framework-cli` is the developer-facing command-line interface for Reset Framework.
4
-
5
- ## Install
6
-
7
- ```bash
8
- npm install -g reset-framework-cli
9
- ```
10
-
11
- ## Commands
12
-
13
- - `reset-framework-cli create-app my-app`
14
- - `reset-framework-cli dev`
15
- - `reset-framework-cli build`
16
- - `reset-framework-cli package`
17
- - `reset-framework-cli doctor`
18
-
19
- ## Package boundary
20
-
21
- - `reset-framework-cli` orchestrates the framework.
22
- - `@reset-framework/native` provides the CMake-based runtime source package.
23
- - `@reset-framework/sdk` provides the frontend bridge package.
24
- - `@reset-framework/schema` provides the config schema package.
25
-
26
- ## How it works
27
-
28
- - `reset-framework-cli dev` and `reset-framework-cli build` compile the native runtime into an app-local cache under `.reset/framework`.
29
- - The generated desktop app is assembled under `.reset/build`.
30
- - On first native build, the CLI will reuse an existing vcpkg toolchain when available, or bootstrap one into `~/.reset-framework-cli/vcpkg`.
31
- - The CLI remains thin. Native platform logic lives in the native package, not in command code.
32
-
33
- ## Requirements
34
-
35
- - Node.js `>= 20.19.0`
36
- - CMake
37
- - Ninja
38
- - Git
39
- - A native compiler toolchain for the target platform
40
-
41
- ## Publish model
42
-
43
- `reset-framework-cli` should be published only after:
44
-
45
- 1. `@reset-framework/schema`
46
- 2. `@reset-framework/sdk`
47
- 3. `@reset-framework/native`
1
+ # reset-framework-cli
2
+
3
+ `reset-framework-cli` is the developer-facing command-line interface for Reset Framework.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install -g reset-framework-cli
9
+ ```
10
+
11
+ ## Commands
12
+
13
+ - `reset-framework-cli create-app my-app`
14
+ - `reset-framework-cli dev`
15
+ - `reset-framework-cli build`
16
+ - `reset-framework-cli package`
17
+ - `reset-framework-cli doctor`
18
+
19
+ ## Package boundary
20
+
21
+ - `reset-framework-cli` orchestrates the framework.
22
+ - `@reset-framework/native` provides the CMake-based runtime source package.
23
+ - `@reset-framework/sdk` provides the frontend bridge package.
24
+ - `@reset-framework/schema` provides the config schema package.
25
+
26
+ ## How it works
27
+
28
+ - `reset-framework-cli dev` and `reset-framework-cli build` compile the native runtime into an app-local cache under `.reset/framework`.
29
+ - The generated desktop app is assembled under `.reset/build`.
30
+ - On first native build, the CLI will reuse an existing vcpkg toolchain when available, or bootstrap one into `~/.reset-framework-cli/vcpkg`.
31
+ - The CLI remains thin. Native platform logic lives in the native package, not in command code.
32
+
33
+ ## Requirements
34
+
35
+ - Node.js `>= 20.19.0`
36
+ - CMake
37
+ - Ninja
38
+ - Git
39
+ - A native compiler toolchain for the target platform
40
+
41
+ ## Publish model
42
+
43
+ `reset-framework-cli` should be published only after:
44
+
45
+ 1. `@reset-framework/schema`
46
+ 2. `@reset-framework/sdk`
47
+ 3. `@reset-framework/native`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reset-framework-cli",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "type": "module",
5
5
  "description": "Command-line tooling for Reset Framework.",
6
6
  "license": "MIT",
@@ -11,9 +11,9 @@
11
11
  "node": ">=20.19.0"
12
12
  },
13
13
  "dependencies": {
14
- "@reset-framework/native": "1.1.2",
15
- "@reset-framework/schema": "1.1.2",
16
- "@reset-framework/sdk": "1.1.2"
14
+ "@reset-framework/native": "1.1.4",
15
+ "@reset-framework/schema": "1.1.4",
16
+ "@reset-framework/sdk": "1.1.4"
17
17
  },
18
18
  "bin": {
19
19
  "reset-framework-cli": "src/index.js"
@@ -1,118 +1,119 @@
1
- import { buildFrameworkRuntime } from "../lib/framework.js"
2
- import { stageMacOSAppBundle } from "../lib/output.js"
3
- import { resolvePackageManagerCommand, runCommand } from "../lib/process.js"
4
- import {
5
- assertAppProject,
6
- assertFrameworkInstall,
7
- loadResetConfig,
8
- resolveAppOutputPaths,
9
- resolveAppPaths,
10
- resolveAppPackageManager,
11
- resolveConfigPath,
12
- resolveFrontendDir,
13
- resolveFrameworkBuildPaths,
14
- resolveFrameworkPaths
15
- } from "../lib/project.js"
16
- import {
17
- createProgress,
18
- printBanner,
19
- printKeyValueTable,
20
- printSection,
21
- printStatusTable
22
- } from "../lib/ui.js"
23
-
24
- export const description = "Build the frontend, runtime, and final desktop app bundle"
25
-
26
- export async function run(context) {
27
- const dryRun = Boolean(context.flags["dry-run"])
28
- const skipFrontend = Boolean(context.flags["skip-frontend"])
29
- const skipRuntime = Boolean(context.flags["skip-runtime"])
30
- const skipStage = Boolean(context.flags["skip-stage"])
31
-
32
- const appPaths = resolveAppPaths(context.projectRoot)
33
- const frameworkPaths = resolveFrameworkPaths()
34
- assertAppProject(appPaths)
35
- assertFrameworkInstall(frameworkPaths)
36
- const config = loadResetConfig(appPaths)
37
- assertAppProject(appPaths, config)
38
- const packageManager = resolveAppPackageManager(appPaths, config)
39
- const outputPaths = resolveAppOutputPaths(appPaths, config)
40
- const configPath = resolveConfigPath(appPaths)
41
- const frontendDir = resolveFrontendDir(appPaths, config)
42
- const frameworkBuildPaths = resolveFrameworkBuildPaths(appPaths)
43
- const steps = [
44
- !skipFrontend ? "Build frontend" : null,
45
- !skipRuntime ? "Build runtime" : null,
46
- !skipStage ? "Stage desktop bundle" : null
47
- ].filter(Boolean)
48
-
49
- printBanner("reset-framework-cli build", description)
50
- printSection("Project")
51
- printKeyValueTable([
52
- ["Config", configPath],
53
- ["Frontend", frontendDir],
54
- ["Package manager", packageManager],
55
- ["Output", outputPaths.appBundlePath]
56
- ])
57
- console.log("")
58
-
59
- printSection("Plan")
60
- printStatusTable([
61
- [skipFrontend ? "skip" : "ready", "Frontend", skipFrontend ? "Skipping frontend build" : "Build static frontend assets"],
62
- [skipRuntime ? "skip" : "ready", "Runtime", skipRuntime ? "Skipping release runtime build" : "Configure and build the native runtime"],
63
- [skipStage ? "skip" : "ready", "Bundle", skipStage ? "Skipping app bundle staging" : "Assemble the final desktop app bundle"]
64
- ])
65
-
66
- if (dryRun) {
67
- console.log("")
68
- printSection("Dry run")
69
- printStatusTable(
70
- steps.length > 0
71
- ? steps.map((step) => ["plan", step, "No changes will be written"])
72
- : [["warn", "Nothing to do", "All build phases were skipped"]]
73
- )
74
- return
75
- }
76
-
77
- if (steps.length === 0) {
78
- console.log("")
79
- printSection("Result")
80
- printStatusTable([["warn", "Nothing to do", "All build phases were skipped"]])
81
- return
82
- }
83
-
84
- console.log("")
85
- const progress = createProgress(steps.length, "Build")
86
-
87
- if (!skipFrontend) {
88
- await runCommand(resolvePackageManagerCommand(packageManager), ["run", "build"], {
89
- cwd: frontendDir,
90
- dryRun
91
- })
92
- progress.tick("Frontend assets built")
93
- }
94
-
95
- if (!skipRuntime) {
96
- await buildFrameworkRuntime(frameworkPaths, frameworkBuildPaths, "release", {
97
- cwd: appPaths.appRoot,
98
- dryRun
99
- })
100
- progress.tick("Native runtime built")
101
- }
102
-
1
+ import { buildFrameworkRuntime } from "../lib/framework.js"
2
+ import { stageMacOSAppBundle, stageWindowsAppBundle } from "../lib/output.js"
3
+ import { resolvePackageManagerCommand, runCommand } from "../lib/process.js"
4
+ import {
5
+ assertAppProject,
6
+ assertFrameworkInstall,
7
+ loadResetConfig,
8
+ resolveAppOutputPaths,
9
+ resolveAppPaths,
10
+ resolveAppPackageManager,
11
+ resolveConfigPath,
12
+ resolveFrontendDir,
13
+ resolveFrameworkBuildPaths,
14
+ resolveFrameworkPaths
15
+ } from "../lib/project.js"
16
+ import {
17
+ createProgress,
18
+ printBanner,
19
+ printKeyValueTable,
20
+ printSection,
21
+ printStatusTable
22
+ } from "../lib/ui.js"
23
+
24
+ export const description = "Build the frontend, runtime, and final desktop app bundle"
25
+
26
+ export async function run(context) {
27
+ const dryRun = Boolean(context.flags["dry-run"])
28
+ const skipFrontend = Boolean(context.flags["skip-frontend"])
29
+ const skipRuntime = Boolean(context.flags["skip-runtime"])
30
+ const skipStage = Boolean(context.flags["skip-stage"])
31
+
32
+ const appPaths = resolveAppPaths(context.projectRoot)
33
+ const frameworkPaths = resolveFrameworkPaths()
34
+ assertAppProject(appPaths)
35
+ assertFrameworkInstall(frameworkPaths)
36
+ const config = loadResetConfig(appPaths)
37
+ assertAppProject(appPaths, config)
38
+ const packageManager = resolveAppPackageManager(appPaths, config)
39
+ const outputPaths = resolveAppOutputPaths(appPaths, config)
40
+ const configPath = resolveConfigPath(appPaths)
41
+ const frontendDir = resolveFrontendDir(appPaths, config)
42
+ const frameworkBuildPaths = resolveFrameworkBuildPaths(appPaths)
43
+ const steps = [
44
+ !skipFrontend ? "Build frontend" : null,
45
+ !skipRuntime ? "Build runtime" : null,
46
+ !skipStage ? "Stage desktop bundle" : null
47
+ ].filter(Boolean)
48
+
49
+ printBanner("reset-framework-cli build", description)
50
+ printSection("Project")
51
+ printKeyValueTable([
52
+ ["Config", configPath],
53
+ ["Frontend", frontendDir],
54
+ ["Package manager", packageManager],
55
+ ["Output", outputPaths.appBundlePath]
56
+ ])
57
+ console.log("")
58
+
59
+ printSection("Plan")
60
+ printStatusTable([
61
+ [skipFrontend ? "skip" : "ready", "Frontend", skipFrontend ? "Skipping frontend build" : "Build static frontend assets"],
62
+ [skipRuntime ? "skip" : "ready", "Runtime", skipRuntime ? "Skipping release runtime build" : "Configure and build the native runtime"],
63
+ [skipStage ? "skip" : "ready", "Bundle", skipStage ? "Skipping app bundle staging" : "Assemble the final desktop app bundle"]
64
+ ])
65
+
66
+ if (dryRun) {
67
+ console.log("")
68
+ printSection("Dry run")
69
+ printStatusTable(
70
+ steps.length > 0
71
+ ? steps.map((step) => ["plan", step, "No changes will be written"])
72
+ : [["warn", "Nothing to do", "All build phases were skipped"]]
73
+ )
74
+ return
75
+ }
76
+
77
+ if (steps.length === 0) {
78
+ console.log("")
79
+ printSection("Result")
80
+ printStatusTable([["warn", "Nothing to do", "All build phases were skipped"]])
81
+ return
82
+ }
83
+
84
+ console.log("")
85
+ const progress = createProgress(steps.length, "Build")
86
+
87
+ if (!skipFrontend) {
88
+ await runCommand(resolvePackageManagerCommand(packageManager), ["run", "build"], {
89
+ cwd: frontendDir,
90
+ dryRun
91
+ })
92
+ progress.tick("Frontend assets built")
93
+ }
94
+
95
+ if (!skipRuntime) {
96
+ await buildFrameworkRuntime(frameworkPaths, frameworkBuildPaths, "release", {
97
+ cwd: appPaths.appRoot,
98
+ dryRun
99
+ })
100
+ progress.tick("Native runtime built")
101
+ }
102
+
103
103
  if (!skipStage) {
104
- await stageMacOSAppBundle(frameworkBuildPaths, appPaths, config, {
104
+ const stageBundle = process.platform === "win32" ? stageWindowsAppBundle : stageMacOSAppBundle
105
+ await stageBundle(frameworkBuildPaths, appPaths, config, {
105
106
  dryRun,
106
107
  outputPaths,
107
108
  configPath
108
109
  })
109
- progress.tick("Desktop app bundle staged")
110
- }
111
-
112
- console.log("")
113
- printSection("Result")
114
- printStatusTable([
115
- ["done", "Build output", outputPaths.outputRoot],
116
- ["done", "Desktop app", outputPaths.appBundlePath]
117
- ])
118
- }
110
+ progress.tick("Desktop app bundle staged")
111
+ }
112
+
113
+ console.log("")
114
+ printSection("Result")
115
+ printStatusTable([
116
+ ["done", "Build output", outputPaths.outputRoot],
117
+ ["done", "Desktop app", outputPaths.appBundlePath]
118
+ ])
119
+ }