@parity/product-deploy 0.10.0-rc.0 → 0.10.0-rc.2
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/DEPLOYMENT.md +124 -0
- package/README.md +73 -6
- package/assets/environments.json +41 -0
- package/bin/bulletin-deploy +11 -16
- package/dist/allocations-CEPeZr6T.d.ts +111 -0
- package/dist/auth/index.d.ts +3 -2
- package/dist/auth/index.js +5 -1
- package/dist/auth/vendor/index.d.ts +3 -2
- package/dist/auth/vendor/index.js +5 -1
- package/dist/auth/vendor/ui/index.d.ts +2 -1
- package/dist/auth-CA_YKtM2.d.ts +128 -0
- package/dist/auth-config.d.ts +13 -8
- package/dist/auth-config.js +4 -4
- package/dist/bug-report.js +4 -4
- package/dist/{chunk-2BTYPNYW.js → chunk-4D6STP5G.js} +10 -2
- package/dist/{chunk-DHY2ZXVZ.js → chunk-5OKB3TEB.js} +8 -1
- package/dist/{chunk-DY7RVMM5.js → chunk-C74YSAWC.js} +64 -20
- package/dist/{chunk-MI5B3UCM.js → chunk-EHQPRWGC.js} +1 -1
- package/dist/{chunk-VR3LF62E.js → chunk-I7UEBFP5.js} +38 -12
- package/dist/{chunk-HUT626G6.js → chunk-LYWIW6WU.js} +1 -1
- package/dist/{chunk-GL3U7K2B.js → chunk-QRKI6MMK.js} +41 -0
- package/dist/{chunk-PKQOUCPD.js → chunk-SXWFDMFT.js} +5 -5
- package/dist/{chunk-GJTVPP7E.js → chunk-UJJQME5K.js} +1 -1
- package/dist/{chunk-G676QAN4.js → chunk-V5VD5CIC.js} +2 -2
- package/dist/{chunk-ZJCTG7HF.js → chunk-WM5R4O33.js} +4 -3
- package/dist/{chunk-Q3RIJ7PU.js → chunk-XX6LNB74.js} +3 -3
- package/dist/chunk-probe.js +3 -3
- package/dist/commands/login.d.ts +42 -6
- package/dist/commands/login.js +86 -34
- package/dist/commands/logout.d.ts +2 -1
- package/dist/commands/logout.js +6 -6
- package/dist/commands/transfer.js +5 -4
- package/dist/commands/whoami.d.ts +2 -1
- package/dist/commands/whoami.js +4 -4
- package/dist/deploy-actors.d.ts +3 -2
- package/dist/deploy-actors.js +6 -5
- package/dist/deploy.d.ts +13 -1
- package/dist/deploy.js +15 -10
- package/dist/dotns.d.ts +10 -4
- package/dist/dotns.js +5 -4
- package/dist/environments.js +1 -1
- package/dist/index.js +12 -11
- package/dist/manifest/publish.js +12 -11
- package/dist/memory-report.js +2 -2
- package/dist/merkle.js +11 -10
- package/dist/personhood/bootstrap.js +6 -6
- package/dist/personhood/people-client.js +5 -4
- package/dist/run-state.js +1 -1
- package/dist/{signer-vR6KKC7V.d.ts → signer-Duup0hgQ.d.ts} +1 -1
- package/dist/sss-allowance-cache.js +5 -5
- package/dist/storage-signer.js +11 -10
- package/dist/telemetry.d.ts +17 -1
- package/dist/telemetry.js +4 -2
- package/dist/version-check.js +3 -3
- package/docs/bootstrap.md +1 -1
- package/docs/e2e-bootstrap.md +34 -12
- package/docs/telemetry.md +10 -11
- package/docs/testing.md +2 -0
- package/package.json +4 -3
- package/dist/auth-C-Pel0AT.d.ts +0 -235
|
@@ -137,6 +137,35 @@ var environments_default = {
|
|
|
137
137
|
PUBLISHER: "0xa616254fd98724c7a3d295c98ca393a486096b68"
|
|
138
138
|
}
|
|
139
139
|
},
|
|
140
|
+
{
|
|
141
|
+
id: "summit",
|
|
142
|
+
name: "Summit",
|
|
143
|
+
network: "testnet",
|
|
144
|
+
description: "Web3 Summit Network",
|
|
145
|
+
e2eEligible: false,
|
|
146
|
+
ipfs: "https://summit-ipfs.polkadot.io",
|
|
147
|
+
autoAccountMapping: true,
|
|
148
|
+
nativeToEthRatio: 1e8,
|
|
149
|
+
registerStorageDeposit: 2e12,
|
|
150
|
+
contracts: {
|
|
151
|
+
DOTNS_PROTOCOL_REGISTRY: "0x09f1AE947950eA2d1f010fE2abC00fDd5A745820",
|
|
152
|
+
DOTNS_REGISTRAR: "0xf3969bCBE60463302306663C62A6A8ef91ab9aA5",
|
|
153
|
+
DOTNS_REGISTRAR_CONTROLLER: "0xA68a5b2A6be6d014be0dB07c0ed4bacc4A6A570A",
|
|
154
|
+
DOTNS_REGISTRY: "0xFb7AB7E142ED0248D77198CA8722D67C1930D783",
|
|
155
|
+
DOTNS_POP_CONTROLLER: "0xC7DD78B145ed109092A2d1E79324E5FE219B9518",
|
|
156
|
+
ROOT_GATEWAY_DISPATCHER: "0x22362162032ED2442b43f5902b3421be5aCF1b60",
|
|
157
|
+
DOTNS_RESOLVER: "0xC7f1C3B16BFd0c5910EE37a4a2033f4506AcE94d",
|
|
158
|
+
DOTNS_CONTENT_RESOLVER: "0xf110e5799c3f0adb8ED885C02c45Ecfe7fD86226",
|
|
159
|
+
DOTNS_REVERSE_RESOLVER: "0x5aa444C6cbA9bd703d1a0B5E5C643FB886F80bB4",
|
|
160
|
+
DOTNS_POP_RESOLVER: "0x03FD2ed7B1b848c59A2428224162dE00D11a8133",
|
|
161
|
+
DOTNS_NAME_ESCROW: "0xDbE911007f8cd9876D384b8c025d3BB157DCCcA4",
|
|
162
|
+
POP_RULES: "0x6331e51C9AfC73BfE12562fd160BA2c66A73f984",
|
|
163
|
+
STORE_FACTORY: "0x2947af3CBFb45b89610524a25921C32cB65C4C39",
|
|
164
|
+
LABEL_STORE_BEACON: "0x670Dab225ea4f2EeB0e6Df2e49AA595aB2CAa5cb",
|
|
165
|
+
USER_STORE_BEACON: "0x31e392736889c973A25509861C7D6E6F2EaD951C",
|
|
166
|
+
MULTICALL3: "0x1C1044BEa5bDe0F435436bB52A8340fBE1D59847"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
140
169
|
{
|
|
141
170
|
id: "polkadot",
|
|
142
171
|
name: "Polkadot",
|
|
@@ -175,6 +204,9 @@ var environments_default = {
|
|
|
175
204
|
wss: "wss://paseo-rpc.n.dwellir.com",
|
|
176
205
|
uptimeUrl: "https://stats.uptimerobot.com/UrEXbl6Xyt"
|
|
177
206
|
},
|
|
207
|
+
summit: {
|
|
208
|
+
wss: "wss://summit-rpc.polkadot.io"
|
|
209
|
+
},
|
|
178
210
|
polkadot: {
|
|
179
211
|
wss: [
|
|
180
212
|
"wss://polkadot-rpc.n.dwellir.com",
|
|
@@ -222,6 +254,9 @@ var environments_default = {
|
|
|
222
254
|
wss: "wss://paseo-asset-hub-next-rpc.polkadot.io",
|
|
223
255
|
parachainId: 1500
|
|
224
256
|
},
|
|
257
|
+
summit: {
|
|
258
|
+
wss: "wss://summit-asset-hub-rpc.polkadot.io"
|
|
259
|
+
},
|
|
225
260
|
polkadot: {
|
|
226
261
|
wss: [
|
|
227
262
|
"wss://asset-hub-polkadot-rpc.n.dwellir.com",
|
|
@@ -335,6 +370,9 @@ var environments_default = {
|
|
|
335
370
|
wss: "wss://paseo-people-next-system-rpc.polkadot.io",
|
|
336
371
|
parachainId: 1502
|
|
337
372
|
},
|
|
373
|
+
summit: {
|
|
374
|
+
wss: "wss://summit-people-rpc.polkadot.io"
|
|
375
|
+
},
|
|
338
376
|
polkadot: {
|
|
339
377
|
wss: [
|
|
340
378
|
"wss://people-polkadot-rpc.n.dwellir.com",
|
|
@@ -385,6 +423,9 @@ var environments_default = {
|
|
|
385
423
|
wss: "wss://paseo-bulletin-next-rpc.polkadot.io",
|
|
386
424
|
parachainId: 1501
|
|
387
425
|
},
|
|
426
|
+
summit: {
|
|
427
|
+
wss: "wss://summit-bulletin-rpc.polkadot.io"
|
|
428
|
+
},
|
|
388
429
|
custom: {
|
|
389
430
|
wss: "wss://previewnet.substrate.dev/bulletin",
|
|
390
431
|
parachainId: 2487
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VERSION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4D6STP5G.js";
|
|
4
4
|
import {
|
|
5
5
|
loadEnvironments
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QRKI6MMK.js";
|
|
7
7
|
|
|
8
8
|
// src/auth-config.ts
|
|
9
9
|
import { existsSync, readdirSync } from "fs";
|
|
10
10
|
import { homedir } from "os";
|
|
11
11
|
import { join } from "path";
|
|
12
|
-
var DOT_DAPP_ID = "
|
|
13
|
-
var DOT_PRODUCT_ID =
|
|
12
|
+
var DOT_DAPP_ID = "polkadot-app-deploy";
|
|
13
|
+
var DOT_PRODUCT_ID = DOT_DAPP_ID;
|
|
14
14
|
var DOT_DERIVATION_INDEX = 0;
|
|
15
|
-
var DOT_HOST_NAME = "
|
|
15
|
+
var DOT_HOST_NAME = "polkadot-app-deploy";
|
|
16
16
|
var STALE_SESSION_MESSAGE = 'Stored login session could not be read \u2014 it may have been written by an older version. Run "bulletin-deploy logout", then "bulletin-deploy login" to pair again.';
|
|
17
17
|
function hasPersistedSession() {
|
|
18
18
|
const dir = join(homedir(), ".polkadot-apps");
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
classifyErrorArea,
|
|
3
3
|
isInteractive,
|
|
4
4
|
promptYesNo
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EHQPRWGC.js";
|
|
6
6
|
import {
|
|
7
7
|
VERSION,
|
|
8
8
|
getCurrentSentryTraceId
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4D6STP5G.js";
|
|
10
10
|
|
|
11
11
|
// src/bug-report.ts
|
|
12
12
|
import { execSync, execFileSync } from "child_process";
|
|
@@ -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.10.0-rc.
|
|
9
|
+
version: "0.10.0-rc.2",
|
|
10
10
|
private: false,
|
|
11
11
|
repository: {
|
|
12
12
|
type: "git",
|
|
@@ -47,6 +47,7 @@ var package_default = {
|
|
|
47
47
|
"docs",
|
|
48
48
|
"assets",
|
|
49
49
|
"patches",
|
|
50
|
+
"DEPLOYMENT.md",
|
|
50
51
|
"tools/release-retry-wrapper.mjs"
|
|
51
52
|
],
|
|
52
53
|
scripts: {
|
|
@@ -54,7 +55,7 @@ var package_default = {
|
|
|
54
55
|
"refresh-environments": "node scripts/refresh-environments.mjs",
|
|
55
56
|
postinstall: "patch-package || true",
|
|
56
57
|
prepare: "npm run build",
|
|
57
|
-
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 test/storage-signer.test.js test/spinner.test.js test/sss-allowance.test.js test/sss-allowance-cache.test.js test/dotns-transfer.test.js test/deploy-actors.test.js test/transfer-command.test.js test/dotns-register-fee.test.js && npm run test:vendor",
|
|
58
|
+
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 test/storage-signer.test.js test/spinner.test.js test/sss-allowance.test.js test/sss-allowance-cache.test.js test/dotns-transfer.test.js test/deploy-actors.test.js test/transfer-command.test.js test/dotns-register-fee.test.js test/deploy-label-ordering.test.js test/benign-teardown.test.js && npm run test:vendor",
|
|
58
59
|
"test:e2e": "npm run build && node --test test/e2e.test.js",
|
|
59
60
|
"test:e2e:smoke": "bash scripts/e2e-pass.sh smoke",
|
|
60
61
|
"test:e2e:pr": "bash scripts/e2e-pass.sh pr",
|
|
@@ -68,7 +69,7 @@ var package_default = {
|
|
|
68
69
|
"@noble/hashes": "^1.7.2",
|
|
69
70
|
"@parity/product-sdk-address": "^0.1.1",
|
|
70
71
|
"@parity/product-sdk-keys": "^0.3.0",
|
|
71
|
-
"@parity/product-sdk-terminal": "^0.
|
|
72
|
+
"@parity/product-sdk-terminal": "^0.4.0",
|
|
72
73
|
"@parity/product-sdk-tx": "^0.2.4",
|
|
73
74
|
"@polkadot-api/metadata-builders": "^0.14.2",
|
|
74
75
|
"@polkadot-api/substrate-bindings": "^0.20.2",
|
|
@@ -6,15 +6,15 @@ import {
|
|
|
6
6
|
resolveDotnsConnectOptions,
|
|
7
7
|
storeDirectory,
|
|
8
8
|
storeFile
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-C74YSAWC.js";
|
|
10
10
|
import {
|
|
11
11
|
DotNS
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-I7UEBFP5.js";
|
|
13
13
|
import {
|
|
14
14
|
getPopSelfServeConfig,
|
|
15
15
|
loadEnvironments,
|
|
16
16
|
resolveEndpoints
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-QRKI6MMK.js";
|
|
18
18
|
import {
|
|
19
19
|
NonRetryableError
|
|
20
20
|
} from "./chunk-ZOC4GITL.js";
|
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-LYWIW6WU.js";
|
|
9
|
+
import "./chunk-4D6STP5G.js";
|
|
10
|
+
import "./chunk-WM5R4O33.js";
|
|
11
11
|
export {
|
|
12
12
|
ChainProbeCrossValidationError,
|
|
13
13
|
ChainProbeMetadataError,
|
package/dist/commands/login.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { b as AllocationSummary } from '../allocations-CEPeZr6T.js';
|
|
2
|
+
import 'polkadot-api';
|
|
3
|
+
import '@parity/product-sdk-terminal';
|
|
4
|
+
|
|
1
5
|
/**
|
|
2
6
|
* login — QR/mobile sign-in command.
|
|
3
7
|
*
|
|
@@ -5,12 +9,17 @@
|
|
|
5
9
|
* 1. connect() → existing session (already logged in) OR QR code
|
|
6
10
|
* 2. Print QR → user scans on phone
|
|
7
11
|
* 3. waitForLogin() → phone approves → paired
|
|
8
|
-
* 4.
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
12
|
+
* 4. requestResourceAllocation(DEFAULT_RESOURCES) — one batched claim for all three deploy
|
|
13
|
+
* allowances (BulletInAllowance, StatementStoreAllowance, SmartContractAllowance). Triggers
|
|
14
|
+
* a single wallet prompt; granted key material is cached by product-sdk-terminal so later
|
|
15
|
+
* deploys find it without re-prompting. Non-fatal: Rejected/NotAvailable → log + continue.
|
|
16
|
+
* 5. createSlotAccountSigner(BULLETIN_RESOURCE) — reads the now-cached Bulletin slot from the
|
|
17
|
+
* terminal cache written in step 4 (pure cache-hit, no phone prompt). Falls back to
|
|
18
|
+
* getBulletinSigner() only on a rare cache miss.
|
|
19
|
+
* 6. Print summarizeLogin() + slot address on success; map AllowanceError.reason → message on failure
|
|
20
|
+
* 7. Destroy adapters and exit
|
|
13
21
|
*/
|
|
22
|
+
|
|
14
23
|
/**
|
|
15
24
|
* Map an AllowanceError.reason to a user-facing message.
|
|
16
25
|
*
|
|
@@ -20,6 +29,33 @@
|
|
|
20
29
|
* - UnexpectedResponse: protocol-level error in the wire exchange
|
|
21
30
|
*/
|
|
22
31
|
declare function allocationErrorMessage(reason: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Soft-warning message shown when the post-sign-in allowance pre-warm steps fail.
|
|
34
|
+
* The user IS already signed in; this is non-fatal.
|
|
35
|
+
* Pure function, unit-testable.
|
|
36
|
+
*/
|
|
37
|
+
declare function allocationFailedMessage(reason: string): string;
|
|
38
|
+
/**
|
|
39
|
+
* Format the up-front batched allocation result as a human-readable log line.
|
|
40
|
+
* Pure function, unit-testable.
|
|
41
|
+
*
|
|
42
|
+
* Granted resources are logged with ✓; rejected/unavailable are logged as warnings.
|
|
43
|
+
* Non-fatal: callers should log the message but NEVER process.exit on a non-empty
|
|
44
|
+
* rejected or unavailable list — deploys can still fall back.
|
|
45
|
+
*/
|
|
46
|
+
declare function formatAllocationSummary(summary: AllocationSummary): string;
|
|
47
|
+
/**
|
|
48
|
+
* Race `promise` against a timeout, clearing the timer once either side settles.
|
|
49
|
+
*
|
|
50
|
+
* CRITICAL: `Promise.race` does not cancel the loser, and `setTimeout` fires on
|
|
51
|
+
* wall-clock from creation. A bare `race([p, timeoutPromise])` leaves the timer
|
|
52
|
+
* armed after `p` wins — it then rejects an un-awaited promise later, surfacing as
|
|
53
|
+
* an `unhandledRejection`. In login that rejection ("…timed out…") is NOT a benign
|
|
54
|
+
* teardown string, so bin's `unhandledRejection` guard treats it as fatal → exit 1
|
|
55
|
+
* AFTER a successful login (the on-chain authorization wait can push total elapsed
|
|
56
|
+
* past the 60s window). `clearTimeout` in `finally` closes that window.
|
|
57
|
+
*/
|
|
58
|
+
declare function withTimeout<T>(promise: PromiseLike<T>, ms: number, message: string): Promise<T>;
|
|
23
59
|
/**
|
|
24
60
|
* Format a post-login summary. Pure function, unit-testable.
|
|
25
61
|
*
|
|
@@ -50,4 +86,4 @@ interface LoginOptions {
|
|
|
50
86
|
*/
|
|
51
87
|
declare function runLogin(envId: string, _opts?: LoginOptions): Promise<void>;
|
|
52
88
|
|
|
53
|
-
export { type LoginOptions, allocationErrorMessage, bulletinAuthSummary, runLogin, summarizeLogin };
|
|
89
|
+
export { type LoginOptions, allocationErrorMessage, allocationFailedMessage, bulletinAuthSummary, formatAllocationSummary, runLogin, summarizeLogin, withTimeout };
|
package/dist/commands/login.js
CHANGED
|
@@ -2,16 +2,22 @@ import {
|
|
|
2
2
|
startSpinner
|
|
3
3
|
} from "../chunk-J7CYVTAW.js";
|
|
4
4
|
import "../chunk-JQKKMUCT.js";
|
|
5
|
-
import
|
|
5
|
+
import {
|
|
6
|
+
BULLETIN_RESOURCE,
|
|
7
|
+
DEFAULT_RESOURCES,
|
|
8
|
+
createSlotAccountSigner,
|
|
9
|
+
requestResourceAllocation,
|
|
10
|
+
summarizeOutcomes
|
|
11
|
+
} from "../chunk-5OKB3TEB.js";
|
|
6
12
|
import {
|
|
7
13
|
renderLoginStatus
|
|
8
14
|
} from "../chunk-RIRDBSBG.js";
|
|
9
15
|
import {
|
|
10
16
|
waitForBulletinAuthorization
|
|
11
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-C74YSAWC.js";
|
|
12
18
|
import {
|
|
13
19
|
preflightSssAllowance
|
|
14
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-UJJQME5K.js";
|
|
15
21
|
import {
|
|
16
22
|
statementSigningAccount
|
|
17
23
|
} from "../chunk-GRPLHUYC.js";
|
|
@@ -25,18 +31,19 @@ import {
|
|
|
25
31
|
getAuthClient,
|
|
26
32
|
getPeopleChainEndpoints,
|
|
27
33
|
resolveBulletinEndpoints
|
|
28
|
-
} from "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
34
|
+
} from "../chunk-SXWFDMFT.js";
|
|
35
|
+
import "../chunk-V5VD5CIC.js";
|
|
36
|
+
import "../chunk-EHQPRWGC.js";
|
|
37
|
+
import "../chunk-LYWIW6WU.js";
|
|
32
38
|
import "../chunk-C2TS5MER.js";
|
|
33
|
-
import "../chunk-
|
|
39
|
+
import "../chunk-I7UEBFP5.js";
|
|
40
|
+
import "../chunk-SI2ZUOYD.js";
|
|
34
41
|
import "../chunk-4PVJ2JBZ.js";
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
42
|
+
import "../chunk-4D6STP5G.js";
|
|
43
|
+
import "../chunk-WM5R4O33.js";
|
|
37
44
|
import {
|
|
38
45
|
loadEnvironments
|
|
39
|
-
} from "../chunk-
|
|
46
|
+
} from "../chunk-QRKI6MMK.js";
|
|
40
47
|
import "../chunk-ZOC4GITL.js";
|
|
41
48
|
|
|
42
49
|
// src/commands/login.ts
|
|
@@ -56,6 +63,37 @@ function allocationErrorMessage(reason) {
|
|
|
56
63
|
return `Allocation failed (${reason}).`;
|
|
57
64
|
}
|
|
58
65
|
}
|
|
66
|
+
function allocationFailedMessage(reason) {
|
|
67
|
+
return `Allowance pre-warm failed: ${reason}
|
|
68
|
+
Likely cause: personhood or alias not yet established for this account.
|
|
69
|
+
Storage will fall back to the pool for now.
|
|
70
|
+
Run: bulletin-deploy logout, then bulletin-deploy login,
|
|
71
|
+
to retry once your wallet's personhood/alias is in place.`;
|
|
72
|
+
}
|
|
73
|
+
function formatAllocationSummary(summary) {
|
|
74
|
+
const parts = [];
|
|
75
|
+
for (const r of summary.granted) {
|
|
76
|
+
parts.push(` \u2713 ${r.tag}`);
|
|
77
|
+
}
|
|
78
|
+
for (const r of summary.rejected) {
|
|
79
|
+
parts.push(` \u2717 ${r.tag} (declined on phone \u2014 deploys will fall back)`);
|
|
80
|
+
}
|
|
81
|
+
for (const r of summary.unavailable) {
|
|
82
|
+
parts.push(` ~ ${r.tag} (not available \u2014 re-pair if this persists)`);
|
|
83
|
+
}
|
|
84
|
+
return parts.join("\n");
|
|
85
|
+
}
|
|
86
|
+
async function withTimeout(promise, ms, message) {
|
|
87
|
+
let timer;
|
|
88
|
+
const timeout = new Promise((_, reject) => {
|
|
89
|
+
timer = setTimeout(() => reject(new Error(message)), ms);
|
|
90
|
+
});
|
|
91
|
+
try {
|
|
92
|
+
return await Promise.race([promise, timeout]);
|
|
93
|
+
} finally {
|
|
94
|
+
if (timer) clearTimeout(timer);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
59
97
|
function summarizeLogin(address, slotAddress) {
|
|
60
98
|
const lines = [`Signed in as: ${address}`];
|
|
61
99
|
if (slotAddress) {
|
|
@@ -147,22 +185,31 @@ to re-establish your allowance.`
|
|
|
147
185
|
return;
|
|
148
186
|
}
|
|
149
187
|
try {
|
|
150
|
-
console.log("\
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
(_, reject) => setTimeout(
|
|
157
|
-
() => reject(new Error(
|
|
158
|
-
`Allocation request timed out after ${Math.round(ALLOCATION_TIMEOUT_MS / 1e3)}s \u2014 ensure your phone is unlocked and the Polkadot mobile app is open, then try logging in again.`
|
|
159
|
-
)),
|
|
160
|
-
ALLOCATION_TIMEOUT_MS
|
|
161
|
-
)
|
|
188
|
+
console.log("\nAllocating deploy resources \u2014 check your phone to approve.");
|
|
189
|
+
const resources = DEFAULT_RESOURCES;
|
|
190
|
+
const outcomes = await withTimeout(
|
|
191
|
+
requestResourceAllocation(handle.userSession, handle.adapter, resources),
|
|
192
|
+
ALLOCATION_TIMEOUT_MS,
|
|
193
|
+
`Allocation request timed out after ${Math.round(ALLOCATION_TIMEOUT_MS / 1e3)}s \u2014 the wallet did not respond to the approval request.`
|
|
162
194
|
);
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
195
|
+
const summary = summarizeOutcomes(outcomes, resources);
|
|
196
|
+
const summaryText = formatAllocationSummary(summary);
|
|
197
|
+
if (summaryText) console.log(summaryText);
|
|
198
|
+
if (summary.rejected.length > 0 || summary.unavailable.length > 0) {
|
|
199
|
+
console.warn(
|
|
200
|
+
" Some allowances were not granted \u2014 Bulletin storage falls back to a pool account;\n PGAS/contract gaps surface at deploy time. Run: bulletin-deploy logout && bulletin-deploy login to retry."
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
let slotSigner = await createSlotAccountSigner(handle.adapter, BULLETIN_RESOURCE);
|
|
204
|
+
if (!slotSigner) {
|
|
205
|
+
const fallbackResult = await withTimeout(
|
|
206
|
+
handle.adapter.allowance.getBulletinSigner(handle.userSession.id, DOT_PRODUCT_ID),
|
|
207
|
+
ALLOCATION_TIMEOUT_MS,
|
|
208
|
+
`Bulletin slot read timed out after ${Math.round(ALLOCATION_TIMEOUT_MS / 1e3)}s \u2014 the wallet did not respond.`
|
|
209
|
+
);
|
|
210
|
+
if (fallbackResult.isOk()) slotSigner = fallbackResult.value;
|
|
211
|
+
}
|
|
212
|
+
if (slotSigner) {
|
|
166
213
|
const slotAddress = ss58Encode(slotSigner.publicKey);
|
|
167
214
|
const { doc } = await loadEnvironments();
|
|
168
215
|
const bulletinEndpoints = resolveBulletinEndpoints(doc, envId) ?? void 0;
|
|
@@ -189,24 +236,26 @@ to re-establish your allowance.`
|
|
|
189
236
|
spinner.stop();
|
|
190
237
|
process.removeListener("SIGINT", onSigint);
|
|
191
238
|
}
|
|
192
|
-
const
|
|
239
|
+
const authSummary = bulletinAuthSummary(
|
|
193
240
|
authResult.authorized,
|
|
194
241
|
authResult.authorized ? authResult.expiration : void 0
|
|
195
242
|
);
|
|
196
|
-
console.log(
|
|
243
|
+
console.log(authSummary.message);
|
|
197
244
|
console.log("\n" + summarizeLogin(handle.address, slotAddress));
|
|
198
245
|
} else {
|
|
199
|
-
const err = signerResult.error;
|
|
200
246
|
console.log("\n" + summarizeLogin(handle.address, null));
|
|
201
|
-
console.warn(
|
|
247
|
+
console.warn(
|
|
248
|
+
" Bulletin storage slot not available \u2014 storage will fall back to a pool account.\n Run: bulletin-deploy logout && bulletin-deploy login to retry."
|
|
249
|
+
);
|
|
202
250
|
}
|
|
203
251
|
} catch (err) {
|
|
204
252
|
await Promise.resolve(handle.userSession.abortPendingRequests()).catch(() => {
|
|
205
253
|
});
|
|
206
254
|
tearingDown = true;
|
|
207
|
-
console.
|
|
208
|
-
|
|
209
|
-
|
|
255
|
+
console.log(
|
|
256
|
+
"\n" + allocationFailedMessage(err instanceof Error ? err.message : String(err))
|
|
257
|
+
);
|
|
258
|
+
console.log("\n" + summarizeLogin(handle.address, null));
|
|
210
259
|
} finally {
|
|
211
260
|
tearingDown = true;
|
|
212
261
|
handle.destroy();
|
|
@@ -215,7 +264,10 @@ Allocation failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
|
215
264
|
}
|
|
216
265
|
export {
|
|
217
266
|
allocationErrorMessage,
|
|
267
|
+
allocationFailedMessage,
|
|
218
268
|
bulletinAuthSummary,
|
|
269
|
+
formatAllocationSummary,
|
|
219
270
|
runLogin,
|
|
220
|
-
summarizeLogin
|
|
271
|
+
summarizeLogin,
|
|
272
|
+
withTimeout
|
|
221
273
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as LogoutStatus } from '../auth-CA_YKtM2.js';
|
|
2
2
|
import '@parity/product-sdk-terminal';
|
|
3
3
|
import 'polkadot-api';
|
|
4
|
+
import '../allocations-CEPeZr6T.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* logout — sign out the current session.
|
package/dist/commands/logout.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import "../chunk-JQKKMUCT.js";
|
|
2
|
-
import "../chunk-
|
|
2
|
+
import "../chunk-5OKB3TEB.js";
|
|
3
3
|
import {
|
|
4
4
|
renderLogoutStatus
|
|
5
5
|
} from "../chunk-RIRDBSBG.js";
|
|
6
6
|
import {
|
|
7
7
|
clearSssAllowanceCache
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-UJJQME5K.js";
|
|
9
9
|
import "../chunk-GRPLHUYC.js";
|
|
10
10
|
import {
|
|
11
11
|
getAuthClient
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-SXWFDMFT.js";
|
|
13
|
+
import "../chunk-4D6STP5G.js";
|
|
14
|
+
import "../chunk-WM5R4O33.js";
|
|
15
|
+
import "../chunk-QRKI6MMK.js";
|
|
16
16
|
import "../chunk-ZOC4GITL.js";
|
|
17
17
|
|
|
18
18
|
// src/commands/logout.ts
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_MNEMONIC,
|
|
3
3
|
DotNS
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-I7UEBFP5.js";
|
|
5
|
+
import "../chunk-SI2ZUOYD.js";
|
|
5
6
|
import "../chunk-4PVJ2JBZ.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-4D6STP5G.js";
|
|
8
|
+
import "../chunk-WM5R4O33.js";
|
|
8
9
|
import {
|
|
9
10
|
getPopSelfServeConfig,
|
|
10
11
|
loadEnvironments,
|
|
11
12
|
resolveEndpoints
|
|
12
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-QRKI6MMK.js";
|
|
13
14
|
import "../chunk-ZOC4GITL.js";
|
|
14
15
|
|
|
15
16
|
// src/commands/transfer.ts
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { S as SessionAddresses } from '../auth-
|
|
1
|
+
import { S as SessionAddresses } from '../auth-CA_YKtM2.js';
|
|
2
2
|
import '@parity/product-sdk-terminal';
|
|
3
3
|
import 'polkadot-api';
|
|
4
|
+
import '../allocations-CEPeZr6T.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* whoami — show the currently logged-in session account, or "not logged in".
|
package/dist/commands/whoami.js
CHANGED
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
STALE_SESSION_MESSAGE,
|
|
3
3
|
getAuthClient,
|
|
4
4
|
hasPersistedSession
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-SXWFDMFT.js";
|
|
6
|
+
import "../chunk-4D6STP5G.js";
|
|
7
|
+
import "../chunk-WM5R4O33.js";
|
|
8
|
+
import "../chunk-QRKI6MMK.js";
|
|
9
9
|
import "../chunk-ZOC4GITL.js";
|
|
10
10
|
|
|
11
11
|
// src/commands/whoami.ts
|
package/dist/deploy-actors.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { R as ResolvedSigner } from './signer-
|
|
1
|
+
import { A as AuthClient } from './auth-CA_YKtM2.js';
|
|
2
|
+
import { R as ResolvedSigner } from './signer-Duup0hgQ.js';
|
|
3
3
|
import '@parity/product-sdk-terminal';
|
|
4
4
|
import 'polkadot-api';
|
|
5
|
+
import './allocations-CEPeZr6T.js';
|
|
5
6
|
import '@parity/product-sdk-tx';
|
|
6
7
|
|
|
7
8
|
declare class MainnetDefaultWorkerError extends Error {
|
package/dist/deploy-actors.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import "./chunk-JQKKMUCT.js";
|
|
2
2
|
import {
|
|
3
3
|
resolveSigner
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5OKB3TEB.js";
|
|
5
5
|
import "./chunk-RIRDBSBG.js";
|
|
6
6
|
import {
|
|
7
7
|
DEFAULT_MNEMONIC
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-I7UEBFP5.js";
|
|
9
|
+
import "./chunk-SI2ZUOYD.js";
|
|
9
10
|
import "./chunk-4PVJ2JBZ.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-4D6STP5G.js";
|
|
12
|
+
import "./chunk-WM5R4O33.js";
|
|
13
|
+
import "./chunk-QRKI6MMK.js";
|
|
13
14
|
import "./chunk-ZOC4GITL.js";
|
|
14
15
|
|
|
15
16
|
// src/deploy-actors.ts
|
package/dist/deploy.d.ts
CHANGED
|
@@ -69,6 +69,17 @@ declare const CHUNK_MORTALITY_PERIOD: number;
|
|
|
69
69
|
declare const WS_HEARTBEAT_TIMEOUT_MS: number;
|
|
70
70
|
declare function retryBudgetExhausted(history: number[], maxEvents: number, windowMs: number, now?: number): boolean;
|
|
71
71
|
declare function isConnectionError(error: any): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* True for benign teardown noise that must NOT fail a deploy/command. Covers:
|
|
74
|
+
* - connection errors (recoverable via the storage reconnect path), and
|
|
75
|
+
* - "DestroyedError: Client destroyed" — orphaned pending-response promises the
|
|
76
|
+
* SSO/papi client rejects while a session adapter is torn down AFTER the work
|
|
77
|
+
* is done (e.g. the owner-signs update path destroying its re-acquired session).
|
|
78
|
+
* The CLI's crash handlers use this so a successful deploy isn't marked killed
|
|
79
|
+
* (exit 2) by late teardown noise. Checks name+message so DestroyedError matches
|
|
80
|
+
* even when its message differs.
|
|
81
|
+
*/
|
|
82
|
+
declare function isBenignTeardownError(error: any): boolean;
|
|
72
83
|
declare function deriveRootSigner(mnemonic: string, path?: string): {
|
|
73
84
|
signer: PolkadotSigner;
|
|
74
85
|
ss58: string;
|
|
@@ -106,6 +117,7 @@ declare function chooseSignerInput(opts: {
|
|
|
106
117
|
hasInjectedSigner: boolean;
|
|
107
118
|
hasSession?: boolean;
|
|
108
119
|
}): "mnemonic" | "injected" | "resolve" | "pool";
|
|
120
|
+
declare function isPhoneSignerActive(options: Pick<DeployOptions, "signer" | "signerAddress" | "transferTo">): boolean;
|
|
109
121
|
/**
|
|
110
122
|
* Produce the one-line storage-signer status printed at resolution time. Exported for unit testing.
|
|
111
123
|
* Success: " Storage signer: allowance slot <ss58>"
|
|
@@ -401,4 +413,4 @@ declare function computePhoneSigningSteps(dotnsPreflight: {
|
|
|
401
413
|
needsPopUpgrade: boolean;
|
|
402
414
|
} | null, publishNeeded: boolean): string[];
|
|
403
415
|
|
|
404
|
-
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, computePhoneSigningSteps, computeStorageCid, createCID, deploy, deriveRootSigner, detectFramework, encodeContenthash, encryptContent, estimateUploadBytes, formatStorageSignerLine, friendlyChainError, hasIPFS, interpretBitswapResult, isConnectionError, makeBulletinStatusHandler, merkleize, probeP2pRetrieval, resolveDotnsConnectOptions, resolveReproducibleTimestamp, retryBudgetExhausted, setWsHaltCallback, storeChunkedContent, storeDirectory, storeDirectoryV2, storeFile, unpublish };
|
|
416
|
+
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, computePhoneSigningSteps, computeStorageCid, createCID, deploy, deriveRootSigner, detectFramework, encodeContenthash, encryptContent, estimateUploadBytes, formatStorageSignerLine, friendlyChainError, hasIPFS, interpretBitswapResult, isBenignTeardownError, isConnectionError, isPhoneSignerActive, makeBulletinStatusHandler, merkleize, probeP2pRetrieval, resolveDotnsConnectOptions, resolveReproducibleTimestamp, retryBudgetExhausted, setWsHaltCallback, storeChunkedContent, storeDirectory, storeDirectoryV2, storeFile, unpublish };
|