@flare-desktop/cli 0.1.6 → 0.1.7

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/README.md CHANGED
@@ -40,7 +40,7 @@ environment and local layers. The executable does not read JSON from disk. Rebui
40
40
  build system tracks them. `flare dev` embeds the development layer and `flare build` embeds production. The `--config`
41
41
  and `--environment` CLI flags select the input at build time. On Windows the generated CMake project enables
42
42
  `FLARE_NATIVE_WEBVIEW` before fetching the C++ core; the CLI verifies that the native backend was enabled.
43
- Generated projects require CLI 0.1.5 or newer. They target C++ core v0.1.3; prebuilt mode requires the matching GitHub SDK Release. Only TypeScript templates install the types-only npm core v0.1.0; JavaScript runtime is injected by C++.
43
+ Generated projects require CLI 0.1.7 or newer. They target C++ core v0.1.4; prebuilt mode requires the matching GitHub SDK Release. Only TypeScript templates install the types-only npm core v0.1.0; JavaScript runtime is injected by C++.
44
44
 
45
45
  `flare build` passes `build.frontendDist` to CMake as `FLARE_FRONTEND_DIR`. The scaffolded `CMakeLists.txt` uses
46
46
  that variable for `FlareEmbedFrontend` and for the development directory. Change the config key, not the CMake
@@ -92,13 +92,13 @@ variant (JavaScript or TypeScript), and C++ core source or prebuilt SDK. The CLI
92
92
  `--template=javascript|typescript|react-js|react-ts|vue-js|vue-ts` for scripted creation.
93
93
  Vanilla JavaScript has no bundler; every other template uses Vite. The C++ library injects `globalThis.flare` into the webview before navigation. Frontend code calls `flare.invoke(...)` without importing any runtime module; neither Vite nor the app serves a core JS URL. TypeScript variants install the types-only `@flare-desktop/core@0.1.0` and include it through `tsconfig.json` `types`. JavaScript variants do not require the npm core package. The first npm publication of core must be performed manually before installing TypeScript templates.
94
94
 
95
- The generated CMakeLists delegates embedded configuration generation, frontend directory selection and embedding to the library's `FlareConfigureApplication(target)` helper (provided both by FetchContent and the prebuilt SDK).
95
+ The generated CMakeLists delegates embedded configuration generation, frontend directory selection and embedding to the library's `FlareConfigureApplication(target)` helper (provided both by FetchContent and the prebuilt SDK). Application source includes only the stable `<flare/project.h>` header, available before the first build. CMake links the project-specific generated adapter and frontend; changing the external JSON after building does not change the executable.
96
96
 
97
- Choose `--sdk=source` (FetchContent of core tag `v0.1.3`) or `--sdk=prebuilt` (download the matching
97
+ Choose `--sdk=source` (FetchContent of core tag `v0.1.4`) or `--sdk=prebuilt` (download the matching
98
98
  GitHub Release SDK archives into `vendor/flare`). The first binary SDK matrix covers Windows x64 MSVC
99
99
  Debug/Release with MD/MT, Linux x64 GCC Debug/Release and macOS x64/arm64 Clang Debug/Release.
100
100
  Unsupported architectures/ABIs must use source mode. The native webview runs on Windows, macOS and Linux;
101
- headless mode is an explicit testing option. Prebuilt mode requires the published core v0.1.3 SDK Release,
101
+ headless mode is an explicit testing option. Prebuilt mode requires the published core v0.1.4 SDK Release,
102
102
  created by the core SDK workflow after successful platform builds.
103
103
 
104
104
  The former C++ `codegen` executable is replaced by `npx flare codegen --language=header|cpp|json` with
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flare-desktop/cli",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Command line interface for the flare desktop toolkit",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,3 +1,3 @@
1
- export const CORE_VERSION = "0.1.3";
1
+ export const CORE_VERSION = "0.1.4";
2
2
  export const CORE_NPM_VERSION = "0.1.0";
3
- export const MIN_CLI_VERSION = "0.1.5";
3
+ export const MIN_CLI_VERSION = "0.1.7";
@@ -1,12 +1,5 @@
1
1
  import { SCHEMA_URL } from "../schema.js";
2
2
 
3
- export function embeddedIdentifier(name) {
4
- const segments = String(name).split("-").filter(Boolean);
5
- return segments
6
- .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))
7
- .join("");
8
- }
9
-
10
3
  export function configTemplate({ name, identifier, version, template = "javascript" }) {
11
4
  const vite = template !== "javascript";
12
5
  return {
@@ -117,13 +110,9 @@ FlareConfigureApplication(${name})
117
110
  }
118
111
 
119
112
  export function sourceTemplate({ name }) {
120
- const embedded = embeddedIdentifier(name);
121
- return `#include <flare/config/config.h>
122
- #include <flare/core/application.h>
113
+ return `#include <flare/core/application.h>
123
114
  #include <flare/log/log.h>
124
-
125
- #include <${name}-frontend.h>
126
- #include <flare-embedded-config.h>
115
+ #include <flare/project.h>
127
116
 
128
117
  #include <cstdlib>
129
118
  #include <string>
@@ -136,7 +125,7 @@ int main() {
136
125
  const bool development = std::getenv("FLARE_DEV") != nullptr;
137
126
 
138
127
  Flare::ApplicationOptions options;
139
- options.config = FlareGenerated::EmbeddedConfig();
128
+ options.config = Flare::Project::EmbeddedConfig();
140
129
  options.development = development;
141
130
 
142
131
  const char* devUrl = std::getenv("FLARE_DEV_URL");
@@ -144,7 +133,7 @@ int main() {
144
133
  if (development && options.devUrl.empty()) options.frontendDirectory = FLARE_FRONTEND_DIR;
145
134
 
146
135
  Flare::Application application(options);
147
- if (!development) Flare::Embedded::Insert${embedded}(application.Assets());
136
+ if (!development) Flare::Project::InsertFrontend(application.Assets());
148
137
 
149
138
  application.RegisterCommand("greet", [](const Flare::InvokeRequest& request) {
150
139
  const std::string name =