@native-sdk/cli 0.4.0 → 0.4.1
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 +4 -4
- package/assets/icon.icns +0 -0
- package/assets/icon.ico +0 -0
- package/assets/icon.png +0 -0
- package/assets/icon.svg +15 -0
- package/assets/native-sdk.entitlements +10 -0
- package/assets/native-sdk.manifest +12 -0
- package/build.zig +1 -1
- package/package.json +12 -11
- package/src/runtime/ui_app_tests.zig +2 -2
- package/src/tooling/cef.zig +1 -1
- package/src/tooling/templates.zig +4 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @native-sdk/cli
|
|
2
2
|
|
|
3
|
-
The command line for [Native SDK](https://
|
|
3
|
+
The command line for [Native SDK](https://native-sdk.dev): the complete toolkit for building native desktop applications.
|
|
4
4
|
|
|
5
5
|
Views are declarative markup in `.native` files, logic is plain Zig, and Native SDK's own engine draws every pixel into real OS windows — no browser, no WebView, no interpreter in the binary.
|
|
6
6
|
|
|
@@ -24,7 +24,7 @@ A native window opens with a working counter. The scaffold is a native-rendered
|
|
|
24
24
|
|
|
25
25
|
When part of your product is the web, WebView surfaces coexist with the native canvas; web-frontend scaffolds (`--frontend next`, `--frontend vite`, and more) install their generated frontend dependencies automatically on first run.
|
|
26
26
|
|
|
27
|
-
Read the full guide at [
|
|
27
|
+
Read the full guide at [native-sdk.dev/quick-start](https://native-sdk.dev/quick-start).
|
|
28
28
|
|
|
29
29
|
## Commands
|
|
30
30
|
|
|
@@ -47,6 +47,6 @@ Read the full guide at [zero-native.dev/quick-start](https://zero-native.dev/qui
|
|
|
47
47
|
|
|
48
48
|
## More
|
|
49
49
|
|
|
50
|
-
The full documentation is at [
|
|
50
|
+
The full documentation is at [native-sdk.dev](https://native-sdk.dev) — the [app model](https://native-sdk.dev/app-model), [native UI authoring](https://native-sdk.dev/native-ui), [components](https://native-sdk.dev/components), [testing](https://native-sdk.dev/testing), [automation](https://native-sdk.dev/automation), [capabilities](https://native-sdk.dev/capabilities), [packaging](https://native-sdk.dev/packaging), and [platform support](https://native-sdk.dev/platform-support).
|
|
51
51
|
|
|
52
|
-
Native SDK is pre-1.0 and Apache-2.0 licensed; the source lives at [github.com/vercel-labs/
|
|
52
|
+
Native SDK is pre-1.0 and Apache-2.0 licensed; the source lives at [github.com/vercel-labs/native](https://github.com/vercel-labs/native).
|
package/assets/icon.icns
ADDED
|
Binary file
|
package/assets/icon.ico
ADDED
|
Binary file
|
package/assets/icon.png
ADDED
|
Binary file
|
package/assets/icon.svg
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!-- Generated by `zig build generate-icon` (tools/generate_app_icon.zig). Edit the tool, not this file. -->
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024">
|
|
3
|
+
<defs>
|
|
4
|
+
<linearGradient id="plate" x1="0" y1="0" x2="0" y2="1">
|
|
5
|
+
<stop offset="0" stop-color="#262626"/>
|
|
6
|
+
<stop offset="1" stop-color="#171717"/>
|
|
7
|
+
</linearGradient>
|
|
8
|
+
<filter id="shadow" x="-20%" y="-20%" width="140%" height="140%">
|
|
9
|
+
<feDropShadow dx="0" dy="12" stdDeviation="16" flood-color="#000000" flood-opacity="0.3"/>
|
|
10
|
+
</filter>
|
|
11
|
+
</defs>
|
|
12
|
+
<rect x="100" y="100" width="824" height="824" rx="185.4" fill="url(#plate)" filter="url(#shadow)"/>
|
|
13
|
+
<rect x="372" y="272" width="380" height="380" rx="84" fill="#ffffff" fill-opacity="0.52"/>
|
|
14
|
+
<rect x="272" y="372" width="380" height="380" rx="84" fill="#ffffff"/>
|
|
15
|
+
</svg>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
|
6
|
+
<true/>
|
|
7
|
+
<key>com.apple.security.network.client</key>
|
|
8
|
+
<true/>
|
|
9
|
+
</dict>
|
|
10
|
+
</plist>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<!-- Application manifest embedded into Windows app executables. Declaring
|
|
3
|
+
the common-controls v6 side-by-side dependency activates the modern
|
|
4
|
+
control styling and the v6-only exports (TaskDialogIndirect); without
|
|
5
|
+
it the loader binds the system-default v5 assembly. -->
|
|
6
|
+
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
|
7
|
+
<dependency>
|
|
8
|
+
<dependentAssembly>
|
|
9
|
+
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
|
|
10
|
+
</dependentAssembly>
|
|
11
|
+
</dependency>
|
|
12
|
+
</assembly>
|
package/build.zig
CHANGED
|
@@ -1582,7 +1582,7 @@ pub fn build(b: *std.Build) void {
|
|
|
1582
1582
|
\\# Navigation from a Msg: the app command switches the model URL and
|
|
1583
1583
|
\\# the runtime navigates the platform webview.
|
|
1584
1584
|
\\"$cli" automate native-command app.docs >/dev/null 2>&1
|
|
1585
|
-
\\"$cli" automate assert 'view @w1/preview kind=webview.*url="https://
|
|
1585
|
+
\\"$cli" automate assert 'view @w1/preview kind=webview.*url="https://native-sdk.dev/"' 'name="URL: https://native-sdk.dev/"'
|
|
1586
1586
|
\\# Resize keeps the pane snapped to the anchor widget's new frame:
|
|
1587
1587
|
\\# the panel right of the 224pt sidebar and below the 56pt toolbar.
|
|
1588
1588
|
\\"$cli" automate resize 1200 800 >/dev/null 2>&1
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@native-sdk/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "The Native SDK: the complete toolkit for building native desktop applications — declarative markup, native rendering, WebView surfaces, and OS capabilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"types": "./native-sdk.d.ts",
|
|
10
10
|
"files": [
|
|
11
11
|
"bin/native.js",
|
|
12
|
+
"assets",
|
|
12
13
|
"skill-data",
|
|
13
14
|
"skills",
|
|
14
15
|
"src",
|
|
@@ -21,20 +22,20 @@
|
|
|
21
22
|
"LICENSE"
|
|
22
23
|
],
|
|
23
24
|
"optionalDependencies": {
|
|
24
|
-
"@native-sdk/cli-darwin-arm64": "0.4.
|
|
25
|
-
"@native-sdk/cli-darwin-x64": "0.4.
|
|
26
|
-
"@native-sdk/cli-linux-arm64-gnu": "0.4.
|
|
27
|
-
"@native-sdk/cli-linux-arm64-musl": "0.4.
|
|
28
|
-
"@native-sdk/cli-linux-x64-gnu": "0.4.
|
|
29
|
-
"@native-sdk/cli-linux-x64-musl": "0.4.
|
|
30
|
-
"@native-sdk/cli-win32-arm64": "0.4.
|
|
31
|
-
"@native-sdk/cli-win32-x64": "0.4.
|
|
25
|
+
"@native-sdk/cli-darwin-arm64": "0.4.1",
|
|
26
|
+
"@native-sdk/cli-darwin-x64": "0.4.1",
|
|
27
|
+
"@native-sdk/cli-linux-arm64-gnu": "0.4.1",
|
|
28
|
+
"@native-sdk/cli-linux-arm64-musl": "0.4.1",
|
|
29
|
+
"@native-sdk/cli-linux-x64-gnu": "0.4.1",
|
|
30
|
+
"@native-sdk/cli-linux-x64-musl": "0.4.1",
|
|
31
|
+
"@native-sdk/cli-win32-arm64": "0.4.1",
|
|
32
|
+
"@native-sdk/cli-win32-x64": "0.4.1"
|
|
32
33
|
},
|
|
33
34
|
"repository": {
|
|
34
35
|
"type": "git",
|
|
35
|
-
"url": "git+https://github.com/vercel-labs/
|
|
36
|
+
"url": "git+https://github.com/vercel-labs/native.git"
|
|
36
37
|
},
|
|
37
|
-
"homepage": "https://
|
|
38
|
+
"homepage": "https://native-sdk.dev",
|
|
38
39
|
"scripts": {
|
|
39
40
|
"version": "npm run version:sync && git add ../../tools/native-sdk/main.zig npm/*/package.json package.json",
|
|
40
41
|
"version:sync": "node scripts/sync-version.js",
|
|
@@ -2228,7 +2228,7 @@ test "rapid-fire automation commands all dispatch, one per frame turn" {
|
|
|
2228
2228
|
const preview_canvas_label = "preview-canvas";
|
|
2229
2229
|
const preview_pane_anchor = "preview-pane";
|
|
2230
2230
|
const example_url = "https://example.com/";
|
|
2231
|
-
const docs_url = "https://
|
|
2231
|
+
const docs_url = "https://native-sdk.dev/";
|
|
2232
2232
|
|
|
2233
2233
|
const PreviewModel = struct {
|
|
2234
2234
|
show_docs: bool = false,
|
|
@@ -2291,7 +2291,7 @@ const preview_windows = [_]app_manifest.ShellWindow{.{
|
|
|
2291
2291
|
.views = &preview_views,
|
|
2292
2292
|
}};
|
|
2293
2293
|
const preview_scene: app_manifest.ShellConfig = .{ .windows = &preview_windows };
|
|
2294
|
-
const preview_origins = [_][]const u8{ "https://example.com", "https://
|
|
2294
|
+
const preview_origins = [_][]const u8{ "https://example.com", "https://native-sdk.dev", "zero://app", "zero://inline" };
|
|
2295
2295
|
|
|
2296
2296
|
fn previewOptions() PreviewApp.Options {
|
|
2297
2297
|
return .{
|
package/src/tooling/cef.zig
CHANGED
|
@@ -2,7 +2,7 @@ const std = @import("std");
|
|
|
2
2
|
const builtin = @import("builtin");
|
|
3
3
|
|
|
4
4
|
pub const default_version = "144.0.6+g5f7e671+chromium-144.0.7559.59";
|
|
5
|
-
pub const default_prepared_download_url = "https://github.com/vercel-labs/
|
|
5
|
+
pub const default_prepared_download_url = "https://github.com/vercel-labs/native/releases/download";
|
|
6
6
|
pub const default_official_download_url = "https://cef-builds.spotifycdn.com";
|
|
7
7
|
pub const default_download_url = default_prepared_download_url;
|
|
8
8
|
pub const default_macos_dir = "third_party/cef/macos";
|
|
@@ -703,7 +703,7 @@ fn nativeCiYaml(allocator: std.mem.Allocator, names: TemplateNames, framework_pa
|
|
|
703
703
|
\\ - name: Fetch native-sdk
|
|
704
704
|
\\ run: |
|
|
705
705
|
\\ if [ ! -f "$NATIVE_SDK_PATH/build.zig" ]; then
|
|
706
|
-
\\ git clone --depth 1 https://github.com/vercel-labs/
|
|
706
|
+
\\ git clone --depth 1 https://github.com/vercel-labs/native.git "$NATIVE_SDK_PATH"
|
|
707
707
|
\\ fi
|
|
708
708
|
\\ - run: zig build test -Dplatform=null
|
|
709
709
|
\\
|
|
@@ -720,7 +720,7 @@ fn nativeCiYaml(allocator: std.mem.Allocator, names: TemplateNames, framework_pa
|
|
|
720
720
|
\\ - name: Fetch native-sdk
|
|
721
721
|
\\ run: |
|
|
722
722
|
\\ if [ ! -f "$NATIVE_SDK_PATH/build.zig" ]; then
|
|
723
|
-
\\ git clone --depth 1 https://github.com/vercel-labs/
|
|
723
|
+
\\ git clone --depth 1 https://github.com/vercel-labs/native.git "$NATIVE_SDK_PATH"
|
|
724
724
|
\\ fi
|
|
725
725
|
\\ - name: Build the Native SDK CLI
|
|
726
726
|
\\ run: cd "$NATIVE_SDK_PATH" && zig build
|
|
@@ -782,7 +782,7 @@ fn frontendCiYaml(allocator: std.mem.Allocator, names: TemplateNames) ![]const u
|
|
|
782
782
|
\\ - name: Fetch native-sdk
|
|
783
783
|
\\ run: |
|
|
784
784
|
\\ if [ ! -f "$NATIVE_SDK_PATH/build.zig" ]; then
|
|
785
|
-
\\ git clone --depth 1 https://github.com/vercel-labs/
|
|
785
|
+
\\ git clone --depth 1 https://github.com/vercel-labs/native.git "$NATIVE_SDK_PATH"
|
|
786
786
|
\\ fi
|
|
787
787
|
\\ - run: zig build test -Dplatform=null -Dnative-sdk-path="$NATIVE_SDK_PATH"
|
|
788
788
|
\\
|
|
@@ -3001,7 +3001,7 @@ test "writeDefaultApp emits a CI workflow for native apps" {
|
|
|
3001
3001
|
try std.testing.expect(std.mem.indexOf(u8, ci_yaml_text, "test -s .zig-cache/native-sdk-automation/screenshot-main-canvas.png") != null);
|
|
3002
3002
|
// The framework fetch step reuses the build.zig.zon dependency path.
|
|
3003
3003
|
try std.testing.expect(std.mem.indexOf(u8, ci_yaml_text, "NATIVE_SDK_PATH:") != null);
|
|
3004
|
-
try std.testing.expect(std.mem.indexOf(u8, ci_yaml_text, "git clone --depth 1 https://github.com/vercel-labs/
|
|
3004
|
+
try std.testing.expect(std.mem.indexOf(u8, ci_yaml_text, "git clone --depth 1 https://github.com/vercel-labs/native.git \"$NATIVE_SDK_PATH\"") != null);
|
|
3005
3005
|
}
|
|
3006
3006
|
|
|
3007
3007
|
/// Structural sanity for generated workflows (the repo scaffold CI job runs
|