niuma-codex 0.0.1-beta.27 → 0.0.1-beta.28
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/dist/assets/pairing-web/settings.js +14 -6
- package/dist/cli.js +9 -3
- package/dist/managed-tauri.js +8 -2
- package/dist/managed.js +7 -2
- package/package.json +1 -1
- package/resources/lite-release.json +7 -7
- package/resources/niuma-daemon-arm64.tgz +0 -0
- package/resources/niuma-lite-arm64.dmg +0 -0
|
@@ -4,12 +4,20 @@ export function mountAutostartSettings(doc,win,request){
|
|
|
4
4
|
const bridge=win.niumaLoginItem;
|
|
5
5
|
const approvalMessage='请前往「系统设置 → 通用 → 登录项与扩展」,允许 Niuma Lite 登录时打开。返回后将自动检查状态。';
|
|
6
6
|
const errorMessage=(error,fallback)=>typeof error==='string'?error:error?.message||fallback;
|
|
7
|
-
//
|
|
7
|
+
// Lite 版本来自宿主;浏览器单独查询当前 daemon,不依赖自启动状态。
|
|
8
8
|
const about=$('app-about');
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
const hostVersion=typeof bridge?.version==='string'?bridge.version:'';
|
|
10
|
+
if(about&&hostVersion){about.hidden=false;$('app-version').textContent=hostVersion;}
|
|
11
|
+
async function loadVersion(){
|
|
12
|
+
if(!about||hostVersion)return;
|
|
13
|
+
try{
|
|
14
|
+
const response=await request('/api/v1/settings/version',{cache:'no-store'});
|
|
15
|
+
const payload=await response.json();
|
|
16
|
+
const version=response.ok&&payload.code===0&&typeof payload.data?.daemon_version==='string'?payload.data.daemon_version:'';
|
|
17
|
+
about.hidden=!version;
|
|
18
|
+
$('app-about-title').textContent='关于 Niuma daemon';
|
|
19
|
+
$('app-version').textContent=version;
|
|
20
|
+
}catch{about.hidden=true;}
|
|
13
21
|
}
|
|
14
22
|
// 只有应用 preload 提供登录项能力;普通浏览器继续使用 npm 设置接口。
|
|
15
23
|
if(bridge){
|
|
@@ -88,7 +96,7 @@ export function mountAutostartSettings(doc,win,request){
|
|
|
88
96
|
$('device-workspace').hidden=settings;
|
|
89
97
|
$('settings-toggle').setAttribute('aria-current',settings?'page':'false');
|
|
90
98
|
$('devices-nav').setAttribute('aria-current',settings?'false':'page');
|
|
91
|
-
stop();if(visible())void load();
|
|
99
|
+
stop();if(visible()){void loadVersion();void load();}
|
|
92
100
|
}
|
|
93
101
|
$('settings-toggle').onclick=()=>navigate(true);
|
|
94
102
|
$('devices-nav').onclick=()=>navigate(false);
|
package/dist/cli.js
CHANGED
|
@@ -10305,7 +10305,7 @@ var init_src = __esm({
|
|
|
10305
10305
|
// apps/desktop/src/release-version.ts
|
|
10306
10306
|
import { readFileSync } from "node:fs";
|
|
10307
10307
|
function desktopReleaseVersion() {
|
|
10308
|
-
return false ? null : "0.0.1-beta.
|
|
10308
|
+
return false ? null : "0.0.1-beta.28";
|
|
10309
10309
|
}
|
|
10310
10310
|
function desktopPresenceVersion() {
|
|
10311
10311
|
return desktopReleaseVersion() ?? sourcePresenceVersion;
|
|
@@ -19272,7 +19272,7 @@ async function runLiteInstall() {
|
|
|
19272
19272
|
if (process.platform !== "darwin") throw Error("\u8F7B\u91CF\u684C\u9762\u5E94\u7528\u4EC5\u652F\u6301 macOS\uFF0C\u8BF7\u4F7F\u7528 --background");
|
|
19273
19273
|
const version2 = desktopReleaseVersion();
|
|
19274
19274
|
if (!version2 || false || false) throw Error("\u6B64\u7248\u672C\u5C1A\u672A\u914D\u7F6E Tauri \u8F7B\u91CF\u53D1\u884C\u8D44\u6E90\uFF0C\u6682\u4E0D\u80FD\u901A\u8FC7 install-app \u5B89\u88C5\uFF1B\u7EAF\u540E\u53F0\u8BF7\u4F7F\u7528 --background");
|
|
19275
|
-
const manifest = validateManifest(JSON.parse('{\n "schema": 2,\n "source": "bundled",\n "mode": "experimental",\n "combinationId": "0.0.1-beta.
|
|
19275
|
+
const manifest = validateManifest(JSON.parse('{\n "schema": 2,\n "source": "bundled",\n "mode": "experimental",\n "combinationId": "0.0.1-beta.28",\n "cliVersion": "0.0.1-beta.28",\n "daemonVersion": "0.0.1-beta.28",\n "nodeRange": ">=18.20.5",\n "artifacts": {\n "darwin-arm64": {\n "app": {\n "path": "resources/niuma-lite-arm64.dmg",\n "size": 8124239,\n "sha256": "bf3eee909d2c700a8eddddb62061c5871de2b5505268a505c316cb6d7ae2cf46"\n },\n "runtime": {\n "path": "resources/niuma-daemon-arm64.tgz",\n "size": 18284231,\n "sha256": "a071ee886415cbfa34a0222ed89420b77c15772cae8915b85dd8183fb3415aab"\n }\n }\n }\n}\n'), version2, process.arch);
|
|
19276
19276
|
if (manifest.schema === 2) await confirmExperimental(manifest.mode, !!process.stdin.isTTY && !!process.stdout.isTTY, async () => {
|
|
19277
19277
|
const prompt = createInterface3({ input: process.stdin, output: process.stdout });
|
|
19278
19278
|
try {
|
|
@@ -36997,6 +36997,11 @@ var init_catalog = __esm({
|
|
|
36997
36997
|
});
|
|
36998
36998
|
|
|
36999
36999
|
// apps/desktop/src/pairing-web/settings.ts
|
|
37000
|
+
function dispatchSettingsVersion(request2) {
|
|
37001
|
+
if (request2.url !== "/api/v1/settings/version" || request2.method !== "GET") throw new HttpApiError(404, 900005, "\u63A5\u53E3\u4E0D\u5B58\u5728");
|
|
37002
|
+
if (request2.headers["transfer-encoding"] || Number(request2.headers["content-length"] ?? 0) > 0) throw new HttpApiError(400, 100004, "\u67E5\u8BE2\u4E0D\u80FD\u643A\u5E26\u8BF7\u6C42\u4F53");
|
|
37003
|
+
return { daemon_version: desktopPresenceVersion() };
|
|
37004
|
+
}
|
|
37000
37005
|
function projection(s) {
|
|
37001
37006
|
return {
|
|
37002
37007
|
supported: s.supported,
|
|
@@ -37061,6 +37066,7 @@ var init_settings = __esm({
|
|
|
37061
37066
|
"use strict";
|
|
37062
37067
|
init_response();
|
|
37063
37068
|
init_types();
|
|
37069
|
+
init_release_version();
|
|
37064
37070
|
}
|
|
37065
37071
|
});
|
|
37066
37072
|
|
|
@@ -46285,7 +46291,7 @@ var init_server3 = __esm({
|
|
|
46285
46291
|
const api = raw.startsWith("/api/");
|
|
46286
46292
|
authorizePairingRequest(request2, request2.socket.localPort, api);
|
|
46287
46293
|
if (api) {
|
|
46288
|
-
sendJson(response, 200, successResponse(await (raw.startsWith("/api/v1/settings/") && this.settings ? dispatchAutostartSettings(request2, this.settings) : dispatchPairingRoute(request2, this.service))));
|
|
46294
|
+
sendJson(response, 200, successResponse(await (raw === "/api/v1/settings/version" ? dispatchSettingsVersion(request2) : raw.startsWith("/api/v1/settings/") && this.settings ? dispatchAutostartSettings(request2, this.settings) : dispatchPairingRoute(request2, this.service))));
|
|
46289
46295
|
return;
|
|
46290
46296
|
}
|
|
46291
46297
|
const asset = ASSETS[raw];
|
package/dist/managed-tauri.js
CHANGED
|
@@ -6881,7 +6881,7 @@ var init_src2 = __esm({
|
|
|
6881
6881
|
// apps/desktop/src/release-version.ts
|
|
6882
6882
|
import { readFileSync } from "node:fs";
|
|
6883
6883
|
function desktopReleaseVersion() {
|
|
6884
|
-
return false ? null : "0.0.1-beta.
|
|
6884
|
+
return false ? null : "0.0.1-beta.28";
|
|
6885
6885
|
}
|
|
6886
6886
|
function desktopPresenceVersion() {
|
|
6887
6887
|
return desktopReleaseVersion() ?? sourcePresenceVersion;
|
|
@@ -30086,6 +30086,11 @@ var init_types = __esm({
|
|
|
30086
30086
|
});
|
|
30087
30087
|
|
|
30088
30088
|
// apps/desktop/src/pairing-web/settings.ts
|
|
30089
|
+
function dispatchSettingsVersion(request2) {
|
|
30090
|
+
if (request2.url !== "/api/v1/settings/version" || request2.method !== "GET") throw new HttpApiError(404, 900005, "\u63A5\u53E3\u4E0D\u5B58\u5728");
|
|
30091
|
+
if (request2.headers["transfer-encoding"] || Number(request2.headers["content-length"] ?? 0) > 0) throw new HttpApiError(400, 100004, "\u67E5\u8BE2\u4E0D\u80FD\u643A\u5E26\u8BF7\u6C42\u4F53");
|
|
30092
|
+
return { daemon_version: desktopPresenceVersion() };
|
|
30093
|
+
}
|
|
30089
30094
|
function projection(s) {
|
|
30090
30095
|
return {
|
|
30091
30096
|
supported: s.supported,
|
|
@@ -30150,6 +30155,7 @@ var init_settings = __esm({
|
|
|
30150
30155
|
"use strict";
|
|
30151
30156
|
init_response();
|
|
30152
30157
|
init_types();
|
|
30158
|
+
init_release_version();
|
|
30153
30159
|
}
|
|
30154
30160
|
});
|
|
30155
30161
|
|
|
@@ -44123,7 +44129,7 @@ var init_server3 = __esm({
|
|
|
44123
44129
|
const api = raw.startsWith("/api/");
|
|
44124
44130
|
authorizePairingRequest(request2, request2.socket.localPort, api);
|
|
44125
44131
|
if (api) {
|
|
44126
|
-
sendJson(response, 200, successResponse(await (raw.startsWith("/api/v1/settings/") && this.settings ? dispatchAutostartSettings(request2, this.settings) : dispatchPairingRoute(request2, this.service))));
|
|
44132
|
+
sendJson(response, 200, successResponse(await (raw === "/api/v1/settings/version" ? dispatchSettingsVersion(request2) : raw.startsWith("/api/v1/settings/") && this.settings ? dispatchAutostartSettings(request2, this.settings) : dispatchPairingRoute(request2, this.service))));
|
|
44127
44133
|
return;
|
|
44128
44134
|
}
|
|
44129
44135
|
const asset = ASSETS[raw];
|
package/dist/managed.js
CHANGED
|
@@ -8487,7 +8487,7 @@ function parseAttachmentTaskV2StatusQuery(value) {
|
|
|
8487
8487
|
|
|
8488
8488
|
// apps/desktop/src/release-version.ts
|
|
8489
8489
|
function desktopReleaseVersion() {
|
|
8490
|
-
return false ? null : "0.0.1-beta.
|
|
8490
|
+
return false ? null : "0.0.1-beta.28";
|
|
8491
8491
|
}
|
|
8492
8492
|
var sourcePresenceVersion = (() => {
|
|
8493
8493
|
if (true) return null;
|
|
@@ -29320,6 +29320,11 @@ var AutostartError = class extends Error {
|
|
|
29320
29320
|
};
|
|
29321
29321
|
|
|
29322
29322
|
// apps/desktop/src/pairing-web/settings.ts
|
|
29323
|
+
function dispatchSettingsVersion(request2) {
|
|
29324
|
+
if (request2.url !== "/api/v1/settings/version" || request2.method !== "GET") throw new HttpApiError(404, 900005, "\u63A5\u53E3\u4E0D\u5B58\u5728");
|
|
29325
|
+
if (request2.headers["transfer-encoding"] || Number(request2.headers["content-length"] ?? 0) > 0) throw new HttpApiError(400, 100004, "\u67E5\u8BE2\u4E0D\u80FD\u643A\u5E26\u8BF7\u6C42\u4F53");
|
|
29326
|
+
return { daemon_version: desktopPresenceVersion() };
|
|
29327
|
+
}
|
|
29323
29328
|
function projection(s) {
|
|
29324
29329
|
return {
|
|
29325
29330
|
supported: s.supported,
|
|
@@ -42937,7 +42942,7 @@ var PairingWebServer = class {
|
|
|
42937
42942
|
const api = raw.startsWith("/api/");
|
|
42938
42943
|
authorizePairingRequest(request2, request2.socket.localPort, api);
|
|
42939
42944
|
if (api) {
|
|
42940
|
-
sendJson(response, 200, successResponse(await (raw.startsWith("/api/v1/settings/") && this.settings ? dispatchAutostartSettings(request2, this.settings) : dispatchPairingRoute(request2, this.service))));
|
|
42945
|
+
sendJson(response, 200, successResponse(await (raw === "/api/v1/settings/version" ? dispatchSettingsVersion(request2) : raw.startsWith("/api/v1/settings/") && this.settings ? dispatchAutostartSettings(request2, this.settings) : dispatchPairingRoute(request2, this.service))));
|
|
42941
42946
|
return;
|
|
42942
42947
|
}
|
|
42943
42948
|
const asset = ASSETS[raw];
|
package/package.json
CHANGED
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
"schema": 2,
|
|
3
3
|
"source": "bundled",
|
|
4
4
|
"mode": "experimental",
|
|
5
|
-
"combinationId": "0.0.1-beta.
|
|
6
|
-
"cliVersion": "0.0.1-beta.
|
|
7
|
-
"daemonVersion": "0.0.1-beta.
|
|
5
|
+
"combinationId": "0.0.1-beta.28",
|
|
6
|
+
"cliVersion": "0.0.1-beta.28",
|
|
7
|
+
"daemonVersion": "0.0.1-beta.28",
|
|
8
8
|
"nodeRange": ">=18.20.5",
|
|
9
9
|
"artifacts": {
|
|
10
10
|
"darwin-arm64": {
|
|
11
11
|
"app": {
|
|
12
12
|
"path": "resources/niuma-lite-arm64.dmg",
|
|
13
|
-
"size":
|
|
14
|
-
"sha256": "
|
|
13
|
+
"size": 8124239,
|
|
14
|
+
"sha256": "bf3eee909d2c700a8eddddb62061c5871de2b5505268a505c316cb6d7ae2cf46"
|
|
15
15
|
},
|
|
16
16
|
"runtime": {
|
|
17
17
|
"path": "resources/niuma-daemon-arm64.tgz",
|
|
18
|
-
"size":
|
|
19
|
-
"sha256": "
|
|
18
|
+
"size": 18284231,
|
|
19
|
+
"sha256": "a071ee886415cbfa34a0222ed89420b77c15772cae8915b85dd8183fb3415aab"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
Binary file
|
|
Binary file
|