@qomicex/cli 0.1.5 → 0.1.6
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/lib/signature.js
CHANGED
|
@@ -8,7 +8,7 @@ export const SIGNATURE_FILE = 'signature.json';
|
|
|
8
8
|
export const CERT_FILE = 'signature.cert.json';
|
|
9
9
|
export const ALG = 'Ed25519';
|
|
10
10
|
/** 商店签名根公钥(raw base64),与 launcher plugin_signature.rs ROOT_PUBLIC_KEY_B64 一致 */
|
|
11
|
-
export const STORE_ROOT_PUBLIC_KEY_B64 = '
|
|
11
|
+
export const STORE_ROOT_PUBLIC_KEY_B64 = 'YkYb+Oh8CNHyGwKAEy/1p6Vz8FYp7UafymXoHCZhfmQ=';
|
|
12
12
|
/** Ed25519 PKCS#8 DER 固定前缀(前 16 字节),后接 32 字节 seed */
|
|
13
13
|
const ED25519_PKCS8_PREFIX = Uint8Array.from([0x30, 0x2e, 0x02, 0x01, 0x00, 0x30, 0x05, 0x06, 0x03, 0x2b, 0x65, 0x70, 0x04, 0x22, 0x04, 0x20]);
|
|
14
14
|
export function bytesToBase64(bytes) {
|
package/dist/lib/store.js
CHANGED
|
@@ -34,8 +34,9 @@ async function request(base, path, init, token) {
|
|
|
34
34
|
body = text;
|
|
35
35
|
}
|
|
36
36
|
if (!res.ok) {
|
|
37
|
-
const
|
|
38
|
-
|
|
37
|
+
const err = body?.error;
|
|
38
|
+
const message = typeof err?.message === 'string' ? err.message : body?.message ?? `HTTP ${res.status}`;
|
|
39
|
+
throw new StoreApiError(res.status, message, err?.code ?? body?.code);
|
|
39
40
|
}
|
|
40
41
|
return body;
|
|
41
42
|
}
|
package/package.json
CHANGED