@parity/product-deploy 0.8.3-rc.6 → 0.8.3-rc.8
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/bin/bulletin-deploy +33 -7
- package/dist/allocations-B65Is4Md.d.ts +97 -0
- package/dist/auth/index.d.ts +7 -0
- package/dist/auth/index.js +25 -0
- package/dist/auth/vendor/index.d.ts +32 -0
- package/dist/auth/vendor/index.js +26 -0
- package/dist/auth/vendor/ui/index.d.ts +15 -0
- package/dist/auth/vendor/ui/index.js +10 -0
- package/dist/auth-DkRZBK-T.d.ts +122 -0
- package/dist/auth-config.d.ts +39 -0
- package/dist/auth-config.js +20 -0
- package/dist/bug-report.js +4 -4
- package/dist/chunk-327NAPBD.js +52 -0
- package/dist/{chunk-22CE57IY.js → chunk-3OWKSL7K.js} +1 -1
- package/dist/chunk-7DGFJC6E.js +379 -0
- package/dist/{chunk-3TOFKDMY.js → chunk-EGNMZHMR.js} +1 -1
- package/dist/chunk-JQKKMUCT.js +0 -0
- package/dist/{chunk-L5Z3TJD7.js → chunk-OCKCB72S.js} +6 -6
- package/dist/{chunk-YUIBBHS2.js → chunk-OFVBJOFB.js} +1 -1
- package/dist/chunk-RIRDBSBG.js +36 -0
- package/dist/{chunk-Y7F57J2T.js → chunk-RPU72Z4B.js} +606 -384
- package/dist/{chunk-6XDIJYDO.js → chunk-T4PAK4YK.js} +2 -2
- package/dist/{chunk-M6DM2NUT.js → chunk-WHMNBSG7.js} +8 -2
- package/dist/{chunk-3ASTLJSZ.js → chunk-YOQLRCQV.js} +2 -2
- package/dist/{chunk-LX77LVIM.js → chunk-YXGNQZZF.js} +17 -3
- package/dist/chunk-probe.js +3 -3
- package/dist/commands/login.d.ts +28 -0
- package/dist/commands/login.js +63 -0
- package/dist/commands/logout.d.ts +21 -0
- package/dist/commands/logout.js +37 -0
- package/dist/commands/whoami.d.ts +22 -0
- package/dist/commands/whoami.js +47 -0
- package/dist/deploy.d.ts +40 -3
- package/dist/deploy.js +17 -8
- package/dist/dotns.js +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +13 -12
- package/dist/manifest/publish.js +10 -9
- package/dist/memory-report.js +2 -2
- package/dist/merkle.d.ts +3 -1
- package/dist/merkle.js +9 -8
- package/dist/personhood/bind-paid-alias.js +3 -3
- package/dist/personhood/bind-personal-id.js +2 -2
- package/dist/personhood/bootstrap.js +16 -16
- package/dist/personhood/claim-pgas.js +2 -2
- package/dist/personhood/people-client.js +3 -3
- package/dist/personhood/proof-validity.js +2 -2
- package/dist/personhood/reprove.js +5 -5
- package/dist/run-state.js +1 -1
- package/dist/signer-CriGqahj.d.ts +35 -0
- package/dist/storage-signer.d.ts +38 -0
- package/dist/storage-signer.js +28 -0
- package/dist/telemetry.d.ts +1 -1
- package/dist/telemetry.js +2 -2
- package/dist/version-check.js +3 -3
- package/package.json +17 -3
- package/dist/{chunk-LHLCPDGL.js → chunk-7URNKK6J.js} +3 -3
- package/dist/{chunk-7Y7RDOGT.js → chunk-EATOPQFR.js} +5 -5
- package/dist/{chunk-SLE4P6MO.js → chunk-EJI3MX4G.js} +3 -3
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
classifyErrorArea,
|
|
3
3
|
isInteractive,
|
|
4
4
|
promptYesNo
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OFVBJOFB.js";
|
|
6
6
|
import {
|
|
7
7
|
VERSION,
|
|
8
8
|
getCurrentSentryTraceId
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WHMNBSG7.js";
|
|
10
10
|
|
|
11
11
|
// src/bug-report.ts
|
|
12
12
|
import { execSync, execFileSync } from "child_process";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
package_default,
|
|
3
3
|
writeRunState
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YXGNQZZF.js";
|
|
5
5
|
|
|
6
6
|
// src/memory-report.ts
|
|
7
7
|
import * as fs2 from "fs";
|
|
@@ -316,15 +316,21 @@ var ERROR_KIND_RULES = [
|
|
|
316
316
|
[/\bstale\b.*nonce|nonce.*\bstale\b|"type"\s*:\s*"(?:Future|Stale)"|Invalid::Future|tx rejected by pool/i, "nonce-stale"],
|
|
317
317
|
[/heartbeat timeout|WS halt|Unable to connect|ChainHead disjointed|websocket.*closed|socket closed|disconnect/i, "connection"],
|
|
318
318
|
[/requires ProofOfPersonhood(?:Full|Lite|Light),\s*but this signer is NoStatus/i, "naming.pop_required"],
|
|
319
|
+
[/requires NoStatus,\s*but this signer is ProofOfPersonhood/i, "naming.nostatus_required"],
|
|
320
|
+
[/Cannot decode zero data.*with ABI parameters/i, "naming.contract_unavailable"],
|
|
319
321
|
[/Domain\s+\S+\.dot\s+is already owned by\s+0x[a-fA-F0-9]+/i, "naming.already_owned"],
|
|
320
322
|
[/Cannot deploy\s+[\w.-]+\.dot:\s*parent\s+[\w.-]+\.dot\s+is owned by/i, "naming.subdomain_orphan"],
|
|
321
323
|
[/Post-deploy verification failed for .+: on-chain contenthash is /i, "verify.contenthash_mismatch"],
|
|
322
324
|
[/Deploy verification failed:\s*DAG-PB root.+not finalised/i, "verify.dagpb_not_finalised"],
|
|
323
325
|
[/Retry budget exhausted:.*recovery attempts/i, "network.recovery_exhausted"],
|
|
326
|
+
[/Account auto-mapping did not take effect on-chain/i, "account.mapping_pending"],
|
|
324
327
|
[/ReviveApi\.\w+ timed out after \d+ms/i, "chain.api_timeout"],
|
|
325
328
|
[/ReviveApi\.\w+ returned empty result/i, "chain.api_timeout"],
|
|
326
329
|
[/transaction watcher silent for \d+s/i, "chain.tx_silent"],
|
|
327
|
-
[
|
|
330
|
+
[/(?:commit|register|setSubnodeOwner|setResolver|setContenthash|setText|publish|unpublish|Revive\.call|Utility\.batch_all) timed out after \d+ms/i, "chain.tx_timeout"],
|
|
331
|
+
[/AncientBirthBlock/i, "chain.extrinsic_expired"],
|
|
332
|
+
[/Bulletin quota exhausted/i, "chain.quota_exhausted"],
|
|
333
|
+
[/Mobile signing (?:failed|rejected).*message too big/i, "signer.message_too_large"],
|
|
328
334
|
[/^INVARIANT FAILED:/i, "tool.invariant"]
|
|
329
335
|
];
|
|
330
336
|
function classifyErrorKind(msg) {
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
resolveDotnsConnectOptions,
|
|
7
7
|
storeDirectory,
|
|
8
8
|
storeFile
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RPU72Z4B.js";
|
|
10
10
|
import {
|
|
11
11
|
DotNS
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EGNMZHMR.js";
|
|
13
13
|
import {
|
|
14
14
|
getPopSelfServeConfig,
|
|
15
15
|
loadEnvironments,
|
|
@@ -6,7 +6,7 @@ import * as path from "path";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@parity/product-deploy",
|
|
9
|
-
version: "0.8.3-rc.
|
|
9
|
+
version: "0.8.3-rc.8",
|
|
10
10
|
private: false,
|
|
11
11
|
repository: {
|
|
12
12
|
type: "git",
|
|
@@ -49,10 +49,10 @@ var package_default = {
|
|
|
49
49
|
"tools/release-retry-wrapper.mjs"
|
|
50
50
|
],
|
|
51
51
|
scripts: {
|
|
52
|
-
build: "tsup src/index.ts src/deploy.ts src/dotns.ts src/pool.ts src/telemetry.ts src/memory-report.ts src/merkle.ts src/gh-pages-mirror.ts src/version-check.ts src/bug-report.ts src/run-state.ts src/environments.ts src/errors.ts src/manifest.ts src/chunk-probe.ts src/manifest-embed.ts src/manifest-fetch.ts src/manifest-roundtrip.ts src/incremental-stats.ts src/chunker.ts src/personhood/encoding.ts src/personhood/hashing.ts src/personhood/constants.ts src/personhood/member-key.ts src/personhood/people-client.ts src/personhood/proof-validity.ts src/personhood/reprove.ts src/personhood/bind-personal-id.ts src/personhood/claim-pgas.ts src/personhood/bind-paid-alias.ts src/personhood/bootstrap.ts src/personhood/chain-prereqs.ts src/manifest/types.ts src/manifest/schema.ts src/manifest/byte-budget.ts src/manifest/config-load.ts src/manifest/publish.ts --format esm --dts --clean --target node22",
|
|
52
|
+
build: "tsup src/index.ts src/deploy.ts src/dotns.ts src/pool.ts src/telemetry.ts src/memory-report.ts src/merkle.ts src/gh-pages-mirror.ts src/version-check.ts src/bug-report.ts src/run-state.ts src/environments.ts src/errors.ts src/manifest.ts src/chunk-probe.ts src/manifest-embed.ts src/manifest-fetch.ts src/manifest-roundtrip.ts src/incremental-stats.ts src/chunker.ts src/personhood/encoding.ts src/personhood/hashing.ts src/personhood/constants.ts src/personhood/member-key.ts src/personhood/people-client.ts src/personhood/proof-validity.ts src/personhood/reprove.ts src/personhood/bind-personal-id.ts src/personhood/claim-pgas.ts src/personhood/bind-paid-alias.ts src/personhood/bootstrap.ts src/personhood/chain-prereqs.ts src/manifest/types.ts src/manifest/schema.ts src/manifest/byte-budget.ts src/manifest/config-load.ts src/manifest/publish.ts src/auth/index.ts src/auth/vendor/index.ts src/auth/vendor/ui/index.ts src/auth-config.ts src/commands/login.ts src/commands/logout.ts src/commands/whoami.ts src/storage-signer.ts --format esm --dts --clean --target node22",
|
|
53
53
|
"refresh-environments": "node scripts/refresh-environments.mjs",
|
|
54
54
|
prepare: "npm run build",
|
|
55
|
-
test: "npm run build && node --test test/test.js test/cli-help.test.js test/helpers/e2e-helpers.test.js test/environments.test.js test/refresh-environments.test.js test/chunk-sharing-report.test.js test/product-manifest.test.js test/cache-savings-totals.test.js test/error-pattern-signature.test.js test/exit-codes.test.js test/probe-env-health.test.js test/e2e-chain-calls.test.js",
|
|
55
|
+
test: "npm run build && node --test test/test.js test/cli-help.test.js test/helpers/e2e-helpers.test.js test/environments.test.js test/refresh-environments.test.js test/chunk-sharing-report.test.js test/product-manifest.test.js test/cache-savings-totals.test.js test/error-pattern-signature.test.js test/exit-codes.test.js test/probe-env-health.test.js test/e2e-chain-calls.test.js test/auth-config.test.js test/whoami.test.js test/login.test.js test/logout.test.js test/auth-resolve.test.js",
|
|
56
56
|
"test:e2e": "npm run build && node --test test/e2e.test.js",
|
|
57
57
|
"test:e2e:smoke": "bash scripts/e2e-pass.sh smoke",
|
|
58
58
|
"test:e2e:pr": "bash scripts/e2e-pass.sh pr",
|
|
@@ -63,6 +63,10 @@ var package_default = {
|
|
|
63
63
|
"@ipld/car": "^5.4.3",
|
|
64
64
|
"@ipld/dag-pb": "^4.1.3",
|
|
65
65
|
"@noble/hashes": "^1.7.2",
|
|
66
|
+
"@parity/product-sdk-address": "^0.1.1",
|
|
67
|
+
"@parity/product-sdk-keys": "^0.3.0",
|
|
68
|
+
"@parity/product-sdk-terminal": "^0.2.1",
|
|
69
|
+
"@parity/product-sdk-tx": "^0.2.4",
|
|
66
70
|
"@polkadot-api/metadata-builders": "^0.14.2",
|
|
67
71
|
"@polkadot-api/substrate-bindings": "^0.20.2",
|
|
68
72
|
"@polkadot-labs/hdkd": "^0.0.28",
|
|
@@ -82,8 +86,18 @@ var package_default = {
|
|
|
82
86
|
"@types/node": "^22.0.0",
|
|
83
87
|
tsup: "^8.5.0",
|
|
84
88
|
typescript: "^5.9.3",
|
|
89
|
+
vitest: "^3.0.0",
|
|
85
90
|
ws: "^8.20.1"
|
|
86
91
|
},
|
|
92
|
+
overrides: {
|
|
93
|
+
"@polkadot-api/json-rpc-provider": "^0.2.0",
|
|
94
|
+
"@novasamatech/host-api": "0.7.9-4",
|
|
95
|
+
"@novasamatech/host-papp": "0.7.9-4",
|
|
96
|
+
"@novasamatech/product-sdk": "0.7.9-4",
|
|
97
|
+
"@novasamatech/scale": "0.7.9-4",
|
|
98
|
+
"@novasamatech/statement-store": "0.7.9-4",
|
|
99
|
+
"@novasamatech/storage-adapter": "0.7.9-4"
|
|
100
|
+
},
|
|
87
101
|
minimumVersion: "0.5.6",
|
|
88
102
|
engines: {
|
|
89
103
|
node: ">=22"
|
package/dist/chunk-probe.js
CHANGED
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
_decodeStorageValue,
|
|
6
6
|
_resetProbeSession,
|
|
7
7
|
probeChunks
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-3OWKSL7K.js";
|
|
9
|
+
import "./chunk-WHMNBSG7.js";
|
|
10
|
+
import "./chunk-YXGNQZZF.js";
|
|
11
11
|
export {
|
|
12
12
|
ChainProbeCrossValidationError,
|
|
13
13
|
ChainProbeMetadataError,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { b as AllocationSummary } from '../allocations-B65Is4Md.js';
|
|
2
|
+
import '@parity/product-sdk-terminal';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* login — QR/mobile sign-in command.
|
|
6
|
+
*
|
|
7
|
+
* Flow:
|
|
8
|
+
* 1. connect() → existing session (already logged in) OR QR code
|
|
9
|
+
* 2. Print QR → user scans on phone
|
|
10
|
+
* 3. waitForLogin() → phone approves → paired
|
|
11
|
+
* 4. requestAllocation() — REQUIRED before the fresh session can sign (RFC-0010)
|
|
12
|
+
* 5. Print summarizeLogin()
|
|
13
|
+
* 6. destroy()
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Format a post-login summary. Pure function, unit-testable.
|
|
18
|
+
*/
|
|
19
|
+
declare function summarizeLogin(address: string, summary: AllocationSummary): string;
|
|
20
|
+
interface LoginOptions {
|
|
21
|
+
suri?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Run the login command. Prints the QR code to stdout and waits for mobile approval.
|
|
25
|
+
*/
|
|
26
|
+
declare function runLogin(envId: string, _opts?: LoginOptions): Promise<void>;
|
|
27
|
+
|
|
28
|
+
export { type LoginOptions, runLogin, summarizeLogin };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import "../chunk-JQKKMUCT.js";
|
|
2
|
+
import {
|
|
3
|
+
DEFAULT_RESOURCES,
|
|
4
|
+
summarizeOutcomes
|
|
5
|
+
} from "../chunk-7DGFJC6E.js";
|
|
6
|
+
import {
|
|
7
|
+
renderLoginStatus
|
|
8
|
+
} from "../chunk-RIRDBSBG.js";
|
|
9
|
+
import {
|
|
10
|
+
getAuthClient
|
|
11
|
+
} from "../chunk-327NAPBD.js";
|
|
12
|
+
import "../chunk-5K3RI5C2.js";
|
|
13
|
+
import "../chunk-ZOC4GITL.js";
|
|
14
|
+
|
|
15
|
+
// src/commands/login.ts
|
|
16
|
+
function summarizeLogin(address, summary) {
|
|
17
|
+
const lines = [
|
|
18
|
+
`Signed in as: ${address}`,
|
|
19
|
+
`Resources granted: ${summary.granted.length}`
|
|
20
|
+
];
|
|
21
|
+
if (summary.rejected.length > 0) {
|
|
22
|
+
lines.push(`Resources rejected: ${summary.rejected.length} (${summary.rejected.map((r) => r.tag).join(", ")})`);
|
|
23
|
+
}
|
|
24
|
+
if (summary.unavailable.length > 0) {
|
|
25
|
+
lines.push(`Resources unavailable: ${summary.unavailable.length}`);
|
|
26
|
+
}
|
|
27
|
+
return lines.join("\n");
|
|
28
|
+
}
|
|
29
|
+
async function runLogin(envId, _opts = {}) {
|
|
30
|
+
const client = await getAuthClient(envId);
|
|
31
|
+
const result = await client.connect();
|
|
32
|
+
if (result.kind === "existing") {
|
|
33
|
+
console.log(`Already signed in as: ${result.address}`);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
console.log(result.qrCode);
|
|
37
|
+
console.log("Scan the QR code with your Polkadot wallet app.");
|
|
38
|
+
const address = await client.waitForLogin(result.login, (status) => {
|
|
39
|
+
const msg = renderLoginStatus(status);
|
|
40
|
+
if (msg) process.stdout.write(`\r${msg}`);
|
|
41
|
+
});
|
|
42
|
+
if (!address) {
|
|
43
|
+
console.error("\nLogin failed.");
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const sessionHandle = await client.getSessionSigner();
|
|
47
|
+
if (sessionHandle) {
|
|
48
|
+
try {
|
|
49
|
+
const outcomes = await client.requestAllocation(sessionHandle.userSession, DEFAULT_RESOURCES);
|
|
50
|
+
const summary = summarizeOutcomes(outcomes, DEFAULT_RESOURCES);
|
|
51
|
+
console.log("\n" + summarizeLogin(address, summary));
|
|
52
|
+
} finally {
|
|
53
|
+
sessionHandle.destroy();
|
|
54
|
+
}
|
|
55
|
+
} else {
|
|
56
|
+
console.log(`
|
|
57
|
+
Signed in as: ${address}`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
runLogin,
|
|
62
|
+
summarizeLogin
|
|
63
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { d as LogoutStatus } from '../auth-DkRZBK-T.js';
|
|
2
|
+
import '@parity/product-sdk-terminal';
|
|
3
|
+
import 'polkadot-api';
|
|
4
|
+
import '../allocations-B65Is4Md.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* logout — sign out the current session.
|
|
8
|
+
*
|
|
9
|
+
* Flow: findSession() → null → "no session" ; else waitForLogout()
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Format a logout status line. Pure function, unit-testable.
|
|
14
|
+
*/
|
|
15
|
+
declare function formatLogout(status: LogoutStatus): string;
|
|
16
|
+
/**
|
|
17
|
+
* Run the logout command. Finds the current session and signs out.
|
|
18
|
+
*/
|
|
19
|
+
declare function runLogout(envId: string): Promise<void>;
|
|
20
|
+
|
|
21
|
+
export { formatLogout, runLogout };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import "../chunk-JQKKMUCT.js";
|
|
2
|
+
import "../chunk-7DGFJC6E.js";
|
|
3
|
+
import {
|
|
4
|
+
renderLogoutStatus
|
|
5
|
+
} from "../chunk-RIRDBSBG.js";
|
|
6
|
+
import {
|
|
7
|
+
getAuthClient
|
|
8
|
+
} from "../chunk-327NAPBD.js";
|
|
9
|
+
import "../chunk-5K3RI5C2.js";
|
|
10
|
+
import "../chunk-ZOC4GITL.js";
|
|
11
|
+
|
|
12
|
+
// src/commands/logout.ts
|
|
13
|
+
function formatLogout(status) {
|
|
14
|
+
return renderLogoutStatus(status);
|
|
15
|
+
}
|
|
16
|
+
async function runLogout(envId) {
|
|
17
|
+
const client = await getAuthClient(envId);
|
|
18
|
+
try {
|
|
19
|
+
const handle = await client.findSession();
|
|
20
|
+
if (!handle) {
|
|
21
|
+
console.log("Not logged in. No session to sign out.");
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
await client.waitForLogout(handle, (status) => {
|
|
25
|
+
console.log(formatLogout(status));
|
|
26
|
+
});
|
|
27
|
+
} finally {
|
|
28
|
+
try {
|
|
29
|
+
await client.clearLocalAppStorage();
|
|
30
|
+
} catch {
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
formatLogout,
|
|
36
|
+
runLogout
|
|
37
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { S as SessionAddresses } from '../auth-DkRZBK-T.js';
|
|
2
|
+
import '@parity/product-sdk-terminal';
|
|
3
|
+
import 'polkadot-api';
|
|
4
|
+
import '../allocations-B65Is4Md.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* whoami — show the currently logged-in session account, or "not logged in".
|
|
8
|
+
* Pure formatter `formatWhoami` is unit-tested; `runWhoami` is the live async path.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Format session address info for display. Pass `null` when no session exists.
|
|
13
|
+
* Pure function — unit-testable without any SSO stack.
|
|
14
|
+
*/
|
|
15
|
+
declare function formatWhoami(addresses: SessionAddresses | null): string;
|
|
16
|
+
/**
|
|
17
|
+
* Run the whoami command. Gets the session signer (if any) and prints the
|
|
18
|
+
* formatted output. Never throws — "no session" prints the not-logged-in message.
|
|
19
|
+
*/
|
|
20
|
+
declare function runWhoami(envId: string): Promise<void>;
|
|
21
|
+
|
|
22
|
+
export { formatWhoami, runWhoami };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getAuthClient,
|
|
3
|
+
hasPersistedSession
|
|
4
|
+
} from "../chunk-327NAPBD.js";
|
|
5
|
+
import "../chunk-5K3RI5C2.js";
|
|
6
|
+
import "../chunk-ZOC4GITL.js";
|
|
7
|
+
|
|
8
|
+
// src/commands/whoami.ts
|
|
9
|
+
function formatWhoami(addresses) {
|
|
10
|
+
if (!addresses) {
|
|
11
|
+
return "Not logged in. Run `bulletin-deploy login` to sign in.";
|
|
12
|
+
}
|
|
13
|
+
return [
|
|
14
|
+
`Logged in:`,
|
|
15
|
+
` Root address: ${addresses.rootAddress}`,
|
|
16
|
+
` Product address: ${addresses.productAddress}`,
|
|
17
|
+
` H160 (EVM): ${addresses.productH160}`
|
|
18
|
+
].join("\n");
|
|
19
|
+
}
|
|
20
|
+
async function runWhoami(envId) {
|
|
21
|
+
if (!hasPersistedSession()) {
|
|
22
|
+
console.log(formatWhoami(null));
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
try {
|
|
26
|
+
const client = await getAuthClient(envId);
|
|
27
|
+
const handle = await client.getSessionSigner();
|
|
28
|
+
if (handle) {
|
|
29
|
+
console.log(formatWhoami(handle.addresses));
|
|
30
|
+
handle.destroy();
|
|
31
|
+
} else {
|
|
32
|
+
console.log(formatWhoami(null));
|
|
33
|
+
}
|
|
34
|
+
} catch (err) {
|
|
35
|
+
const e = err;
|
|
36
|
+
if (e?.name === "SignerNotAvailableError") {
|
|
37
|
+
console.log(formatWhoami(null));
|
|
38
|
+
} else {
|
|
39
|
+
console.log(`Could not reach login service: ${e?.message ?? String(err)}`);
|
|
40
|
+
console.log(formatWhoami(null));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
formatWhoami,
|
|
46
|
+
runWhoami
|
|
47
|
+
};
|
package/dist/deploy.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WsEvent } from 'polkadot-api/ws';
|
|
1
2
|
import { CID } from 'multiformats/cid';
|
|
2
3
|
import { ManifestFileEntry } from './manifest.js';
|
|
3
4
|
import { PopSelfServeConfig } from './environments.js';
|
|
@@ -58,8 +59,14 @@ interface StoredChunk {
|
|
|
58
59
|
}
|
|
59
60
|
declare const DEFAULT_BULLETIN_RPC = "wss://paseo-bulletin-rpc.polkadot.io";
|
|
60
61
|
declare const DEFAULT_POOL_SIZE = 10;
|
|
62
|
+
declare let BULLETIN_ENDPOINTS: string[];
|
|
61
63
|
declare function setWsHaltCallback(cb: (() => void) | null): void;
|
|
64
|
+
declare function makeBulletinStatusHandler(primary: string): (s: {
|
|
65
|
+
type: WsEvent;
|
|
66
|
+
uri?: string;
|
|
67
|
+
}) => void;
|
|
62
68
|
declare const CHUNK_MORTALITY_PERIOD: number;
|
|
69
|
+
declare const WS_HEARTBEAT_TIMEOUT_MS: number;
|
|
63
70
|
declare function retryBudgetExhausted(history: number[], maxEvents: number, windowMs: number, now?: number): boolean;
|
|
64
71
|
declare function isConnectionError(error: any): boolean;
|
|
65
72
|
declare function deriveRootSigner(mnemonic: string, path?: string): {
|
|
@@ -75,8 +82,31 @@ declare const ENCRYPT_TAG_LEN = 16;
|
|
|
75
82
|
declare const ENCRYPT_KEY_LEN = 32;
|
|
76
83
|
declare const ENCRYPT_PBKDF2_ITERATIONS = 100000;
|
|
77
84
|
declare function encryptContent(data: Uint8Array, password: string): Promise<Uint8Array>;
|
|
78
|
-
/**
|
|
79
|
-
|
|
85
|
+
/** storageSigner > mnemonic > pool precedence for storage routing. Exported for unit testing.
|
|
86
|
+
* signer/signerAddress are DotNS-only — they no longer influence storage provider selection. */
|
|
87
|
+
declare function __selectStorageProviderModeForTest(options: Pick<DeployOptions, "storageSigner" | "storageSignerAddress" | "mnemonic">): "storageSigner" | "direct" | "pool";
|
|
88
|
+
/**
|
|
89
|
+
* Decide how to source the signer for a deploy invocation. Exported for unit testing.
|
|
90
|
+
*
|
|
91
|
+
* - "mnemonic" — caller passed --mnemonic; use mnemonic-derived signer (existing path).
|
|
92
|
+
* - "injected" — caller pre-built a PolkadotSigner (library or test seam).
|
|
93
|
+
* - "resolve" — use resolveSigner: either --suri was passed (dev account /
|
|
94
|
+
* mnemonic), OR a persisted login session exists (hasSession) so a
|
|
95
|
+
* plain `deploy` uses the logged-in identity (the #411 UX). This is
|
|
96
|
+
* the only path that loads the SSO stack.
|
|
97
|
+
* - "pool" — none of the above: no --mnemonic, no pre-built signer, no --suri,
|
|
98
|
+
* and no persisted session → pool path, unchanged from pre-#411.
|
|
99
|
+
*
|
|
100
|
+
* Layer-3 isolation is preserved because `hasSession` is computed at the call site
|
|
101
|
+
* from a cheap session-file existence check — headless/CI deploys (no session file,
|
|
102
|
+
* no --suri) never load the SSO stack or hit the People chain.
|
|
103
|
+
*/
|
|
104
|
+
declare function chooseSignerInput(opts: {
|
|
105
|
+
mnemonic: string | undefined;
|
|
106
|
+
suri: string | undefined;
|
|
107
|
+
hasInjectedSigner: boolean;
|
|
108
|
+
hasSession?: boolean;
|
|
109
|
+
}): "mnemonic" | "injected" | "resolve" | "pool";
|
|
80
110
|
declare function storeFile(contentBytes: Uint8Array, { client: existingClient, unsafeApi: existingApi, signer: existingSigner }?: ExistingProvider): Promise<string>;
|
|
81
111
|
/**
|
|
82
112
|
* Pre-compute dense nonces for chunks that need submission.
|
|
@@ -189,6 +219,13 @@ interface DeployOptions {
|
|
|
189
219
|
signer?: PolkadotSigner;
|
|
190
220
|
/** SS58 address for the signer (required when signer is provided). */
|
|
191
221
|
signerAddress?: string;
|
|
222
|
+
/** Slot-account signer for Bulletin chunk uploads. When set, used instead of pool/mnemonic
|
|
223
|
+
* for storage. DotNS still uses signer/signerAddress. */
|
|
224
|
+
storageSigner?: PolkadotSigner;
|
|
225
|
+
/** SS58 address of the slot account. Required when storageSigner is set. */
|
|
226
|
+
storageSignerAddress?: string;
|
|
227
|
+
/** Secret URI for dev signers (e.g. "//Alice" or a BIP-39 mnemonic). Passed to resolveSigner. */
|
|
228
|
+
suri?: string;
|
|
192
229
|
rpc?: string;
|
|
193
230
|
poolSize?: number;
|
|
194
231
|
password?: string;
|
|
@@ -342,4 +379,4 @@ declare function interpretBitswapResult(outcome: {
|
|
|
342
379
|
declare function probeP2pRetrieval(client: any, cid: string, timeoutMs?: number): Promise<BitswapProbeResult>;
|
|
343
380
|
declare function deploy(content: DeployContent, domainName?: string | null, options?: DeployOptions): Promise<DeployResult>;
|
|
344
381
|
|
|
345
|
-
export { type BitswapErrorVariant, type BitswapProbeResult, CHUNK_MORTALITY_PERIOD, DEFAULT_BULLETIN_RPC, DEFAULT_POOL_SIZE, type DeployContent, type DeployOptions, type DeployResult, ENCRYPT_KEY_LEN, ENCRYPT_MAGIC, ENCRYPT_NONCE_LEN, ENCRYPT_PBKDF2_ITERATIONS, ENCRYPT_SALT_LEN, ENCRYPT_TAG_LEN, type SizeDecision, type StoreDirectoryOptions, __assignDenseNoncesForTest, __selectStorageProviderModeForTest, applyManifestFetchAttributes, assertSubdomainOwnerMatchesSigner, browserUrlFor, buildFilesMap, checkDeploySize, chunk, computeStorageCid, createCID, deploy, deriveRootSigner, detectFramework, encodeContenthash, encryptContent, estimateUploadBytes, friendlyChainError, hasIPFS, interpretBitswapResult, isConnectionError, merkleize, probeP2pRetrieval, resolveDotnsConnectOptions, resolveReproducibleTimestamp, retryBudgetExhausted, setWsHaltCallback, storeChunkedContent, storeDirectory, storeDirectoryV2, storeFile, unpublish };
|
|
382
|
+
export { BULLETIN_ENDPOINTS, type BitswapErrorVariant, type BitswapProbeResult, CHUNK_MORTALITY_PERIOD, DEFAULT_BULLETIN_RPC, DEFAULT_POOL_SIZE, type DeployContent, type DeployOptions, type DeployResult, ENCRYPT_KEY_LEN, ENCRYPT_MAGIC, ENCRYPT_NONCE_LEN, ENCRYPT_PBKDF2_ITERATIONS, ENCRYPT_SALT_LEN, ENCRYPT_TAG_LEN, type SizeDecision, type StoreDirectoryOptions, WS_HEARTBEAT_TIMEOUT_MS, __assignDenseNoncesForTest, __selectStorageProviderModeForTest, applyManifestFetchAttributes, assertSubdomainOwnerMatchesSigner, browserUrlFor, buildFilesMap, checkDeploySize, chooseSignerInput, chunk, computeStorageCid, createCID, deploy, deriveRootSigner, detectFramework, encodeContenthash, encryptContent, estimateUploadBytes, friendlyChainError, hasIPFS, interpretBitswapResult, isConnectionError, makeBulletinStatusHandler, merkleize, probeP2pRetrieval, resolveDotnsConnectOptions, resolveReproducibleTimestamp, retryBudgetExhausted, setWsHaltCallback, storeChunkedContent, storeDirectory, storeDirectoryV2, storeFile, unpublish };
|
package/dist/deploy.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
BULLETIN_ENDPOINTS,
|
|
2
3
|
CHUNK_MORTALITY_PERIOD,
|
|
3
4
|
DEFAULT_BULLETIN_RPC,
|
|
4
5
|
DEFAULT_POOL_SIZE,
|
|
@@ -8,6 +9,7 @@ import {
|
|
|
8
9
|
ENCRYPT_PBKDF2_ITERATIONS,
|
|
9
10
|
ENCRYPT_SALT_LEN,
|
|
10
11
|
ENCRYPT_TAG_LEN,
|
|
12
|
+
WS_HEARTBEAT_TIMEOUT_MS,
|
|
11
13
|
__assignDenseNoncesForTest,
|
|
12
14
|
__selectStorageProviderModeForTest,
|
|
13
15
|
applyManifestFetchAttributes,
|
|
@@ -15,6 +17,7 @@ import {
|
|
|
15
17
|
browserUrlFor,
|
|
16
18
|
buildFilesMap,
|
|
17
19
|
checkDeploySize,
|
|
20
|
+
chooseSignerInput,
|
|
18
21
|
chunk,
|
|
19
22
|
computeStorageCid,
|
|
20
23
|
createCID,
|
|
@@ -28,6 +31,7 @@ import {
|
|
|
28
31
|
hasIPFS,
|
|
29
32
|
interpretBitswapResult,
|
|
30
33
|
isConnectionError,
|
|
34
|
+
makeBulletinStatusHandler,
|
|
31
35
|
merkleize,
|
|
32
36
|
probeP2pRetrieval,
|
|
33
37
|
resolveDotnsConnectOptions,
|
|
@@ -39,26 +43,28 @@ import {
|
|
|
39
43
|
storeDirectoryV2,
|
|
40
44
|
storeFile,
|
|
41
45
|
unpublish
|
|
42
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-RPU72Z4B.js";
|
|
47
|
+
import "./chunk-HOTQDYHD.js";
|
|
43
48
|
import "./chunk-IW3X2MJF.js";
|
|
44
49
|
import "./chunk-KOSF5FDO.js";
|
|
45
50
|
import "./chunk-J3NIXHZZ.js";
|
|
46
51
|
import "./chunk-S7EM5VMW.js";
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-327NAPBD.js";
|
|
53
|
+
import "./chunk-T4PAK4YK.js";
|
|
54
|
+
import "./chunk-OFVBJOFB.js";
|
|
55
|
+
import "./chunk-3OWKSL7K.js";
|
|
50
56
|
import "./chunk-C2TS5MER.js";
|
|
51
|
-
import "./chunk-
|
|
57
|
+
import "./chunk-EGNMZHMR.js";
|
|
52
58
|
import "./chunk-QS7YU76C.js";
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
59
|
+
import "./chunk-WHMNBSG7.js";
|
|
60
|
+
import "./chunk-YXGNQZZF.js";
|
|
55
61
|
import "./chunk-5K3RI5C2.js";
|
|
56
62
|
import {
|
|
57
63
|
EXIT_CODE_NO_RETRY,
|
|
58
64
|
NonRetryableError
|
|
59
65
|
} from "./chunk-ZOC4GITL.js";
|
|
60
|
-
import "./chunk-HOTQDYHD.js";
|
|
61
66
|
export {
|
|
67
|
+
BULLETIN_ENDPOINTS,
|
|
62
68
|
CHUNK_MORTALITY_PERIOD,
|
|
63
69
|
DEFAULT_BULLETIN_RPC,
|
|
64
70
|
DEFAULT_POOL_SIZE,
|
|
@@ -70,6 +76,7 @@ export {
|
|
|
70
76
|
ENCRYPT_TAG_LEN,
|
|
71
77
|
EXIT_CODE_NO_RETRY,
|
|
72
78
|
NonRetryableError,
|
|
79
|
+
WS_HEARTBEAT_TIMEOUT_MS,
|
|
73
80
|
__assignDenseNoncesForTest,
|
|
74
81
|
__selectStorageProviderModeForTest,
|
|
75
82
|
applyManifestFetchAttributes,
|
|
@@ -77,6 +84,7 @@ export {
|
|
|
77
84
|
browserUrlFor,
|
|
78
85
|
buildFilesMap,
|
|
79
86
|
checkDeploySize,
|
|
87
|
+
chooseSignerInput,
|
|
80
88
|
chunk,
|
|
81
89
|
computeStorageCid,
|
|
82
90
|
createCID,
|
|
@@ -90,6 +98,7 @@ export {
|
|
|
90
98
|
hasIPFS,
|
|
91
99
|
interpretBitswapResult,
|
|
92
100
|
isConnectionError,
|
|
101
|
+
makeBulletinStatusHandler,
|
|
93
102
|
merkleize,
|
|
94
103
|
probeP2pRetrieval,
|
|
95
104
|
resolveDotnsConnectOptions,
|
package/dist/dotns.js
CHANGED
|
@@ -50,10 +50,10 @@ import {
|
|
|
50
50
|
stripTrailingDigits,
|
|
51
51
|
validateDomainLabel,
|
|
52
52
|
verifyNonceAdvanced
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-EGNMZHMR.js";
|
|
54
54
|
import "./chunk-QS7YU76C.js";
|
|
55
|
-
import "./chunk-
|
|
56
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-WHMNBSG7.js";
|
|
56
|
+
import "./chunk-YXGNQZZF.js";
|
|
57
57
|
import "./chunk-5K3RI5C2.js";
|
|
58
58
|
import "./chunk-ZOC4GITL.js";
|
|
59
59
|
export {
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export { ValidationErr, ValidationOk, ValidationResult, validateExecutableManife
|
|
|
14
14
|
export { BudgetCheck, DEFAULT_TEXT_RECORD_BUDGET_BYTES, PLACEHOLDER_CID, PessimisticSizeReport, assertWithinBudget, getTextRecordBudgetBytes, pessimisticSizePreflight } from './manifest/byte-budget.js';
|
|
15
15
|
export { LoadProductConfigOptions, LoadedProductConfig, loadProductConfig, tryLoadProductConfig } from './manifest/config-load.js';
|
|
16
16
|
export { PublishManifestOptions, PublishManifestResult, publishManifest } from './manifest/publish.js';
|
|
17
|
+
import 'polkadot-api/ws';
|
|
17
18
|
import 'multiformats/cid';
|
|
18
19
|
import 'polkadot-api';
|
|
19
20
|
import './errors.js';
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
defineConfig
|
|
3
|
-
} from "./chunk-GZD2UFLR.js";
|
|
4
1
|
import {
|
|
5
2
|
loadProductConfig,
|
|
6
3
|
tryLoadProductConfig
|
|
7
4
|
} from "./chunk-MMAZFJDG.js";
|
|
8
5
|
import {
|
|
9
6
|
publishManifest
|
|
10
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YOQLRCQV.js";
|
|
11
8
|
import {
|
|
12
9
|
DEFAULT_TEXT_RECORD_BUDGET_BYTES,
|
|
13
10
|
PLACEHOLDER_CID,
|
|
@@ -20,11 +17,15 @@ import {
|
|
|
20
17
|
validateProductConfig,
|
|
21
18
|
validateRootManifest
|
|
22
19
|
} from "./chunk-LZJMVPYW.js";
|
|
20
|
+
import {
|
|
21
|
+
defineConfig
|
|
22
|
+
} from "./chunk-GZD2UFLR.js";
|
|
23
23
|
import {
|
|
24
24
|
deploy,
|
|
25
25
|
merkleizeJS,
|
|
26
26
|
merkleizeWithStableOrder
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-RPU72Z4B.js";
|
|
28
|
+
import "./chunk-HOTQDYHD.js";
|
|
28
29
|
import {
|
|
29
30
|
computeStats,
|
|
30
31
|
renderSummary,
|
|
@@ -46,18 +47,19 @@ import {
|
|
|
46
47
|
isVolatilePath,
|
|
47
48
|
parseManifest
|
|
48
49
|
} from "./chunk-S7EM5VMW.js";
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-327NAPBD.js";
|
|
51
|
+
import "./chunk-T4PAK4YK.js";
|
|
52
|
+
import "./chunk-OFVBJOFB.js";
|
|
51
53
|
import {
|
|
52
54
|
probeChunks
|
|
53
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-3OWKSL7K.js";
|
|
54
56
|
import "./chunk-C2TS5MER.js";
|
|
55
57
|
import {
|
|
56
58
|
DEFAULT_MNEMONIC,
|
|
57
59
|
DotNS,
|
|
58
60
|
parseDomainName,
|
|
59
61
|
sanitizeDomainLabel
|
|
60
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-EGNMZHMR.js";
|
|
61
63
|
import {
|
|
62
64
|
bootstrapPool,
|
|
63
65
|
derivePoolAccounts,
|
|
@@ -65,7 +67,7 @@ import {
|
|
|
65
67
|
fetchPoolAuthorizations,
|
|
66
68
|
selectAccount
|
|
67
69
|
} from "./chunk-QS7YU76C.js";
|
|
68
|
-
import "./chunk-
|
|
70
|
+
import "./chunk-WHMNBSG7.js";
|
|
69
71
|
import {
|
|
70
72
|
VERSION,
|
|
71
73
|
loadRunState,
|
|
@@ -75,7 +77,7 @@ import {
|
|
|
75
77
|
shouldSkipStaleWarning,
|
|
76
78
|
stateFilePath,
|
|
77
79
|
writeRunState
|
|
78
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-YXGNQZZF.js";
|
|
79
81
|
import {
|
|
80
82
|
DEFAULT_ENV_ID,
|
|
81
83
|
deepMergeEnvironments,
|
|
@@ -88,7 +90,6 @@ import {
|
|
|
88
90
|
validateContractAddresses
|
|
89
91
|
} from "./chunk-5K3RI5C2.js";
|
|
90
92
|
import "./chunk-ZOC4GITL.js";
|
|
91
|
-
import "./chunk-HOTQDYHD.js";
|
|
92
93
|
export {
|
|
93
94
|
DEFAULT_ENV_ID,
|
|
94
95
|
DEFAULT_MNEMONIC,
|
package/dist/manifest/publish.js
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
publishManifest
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-YOQLRCQV.js";
|
|
4
4
|
import "../chunk-RI3ZLNPN.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-RPU72Z4B.js";
|
|
6
|
+
import "../chunk-HOTQDYHD.js";
|
|
6
7
|
import "../chunk-IW3X2MJF.js";
|
|
7
8
|
import "../chunk-KOSF5FDO.js";
|
|
8
9
|
import "../chunk-J3NIXHZZ.js";
|
|
9
10
|
import "../chunk-S7EM5VMW.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-327NAPBD.js";
|
|
12
|
+
import "../chunk-T4PAK4YK.js";
|
|
13
|
+
import "../chunk-OFVBJOFB.js";
|
|
14
|
+
import "../chunk-3OWKSL7K.js";
|
|
13
15
|
import "../chunk-C2TS5MER.js";
|
|
14
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-EGNMZHMR.js";
|
|
15
17
|
import "../chunk-QS7YU76C.js";
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-WHMNBSG7.js";
|
|
19
|
+
import "../chunk-YXGNQZZF.js";
|
|
18
20
|
import "../chunk-5K3RI5C2.js";
|
|
19
21
|
import "../chunk-ZOC4GITL.js";
|
|
20
|
-
import "../chunk-HOTQDYHD.js";
|
|
21
22
|
export {
|
|
22
23
|
publishManifest
|
|
23
24
|
};
|