@parity/product-deploy 0.8.3 → 0.9.0-rc.0
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/LICENSE +674 -201
- package/README.md +9 -3
- package/assets/environments.json +0 -1
- package/dist/auth/index.d.ts +2 -3
- package/dist/auth/index.js +1 -1
- package/dist/auth/vendor/index.d.ts +2 -3
- package/dist/auth/vendor/index.js +1 -1
- package/dist/auth/vendor/ui/index.d.ts +1 -2
- package/dist/auth-C-Pel0AT.d.ts +235 -0
- package/dist/auth-config.d.ts +30 -8
- package/dist/auth-config.js +14 -6
- package/dist/bug-report.js +4 -4
- package/dist/{chunk-XM5MFMMX.js → chunk-2SR5D4CP.js} +19 -15
- package/dist/{chunk-HK3B5MKA.js → chunk-6NW5M3F5.js} +9 -20
- package/dist/{chunk-2OZVKA3D.js → chunk-DHY2ZXVZ.js} +36 -28
- package/dist/chunk-G56VYTUD.js +75 -0
- package/dist/{chunk-5K3RI5C2.js → chunk-GL3U7K2B.js} +0 -1
- package/dist/{chunk-YUSHBZBX.js → chunk-H4LWILH4.js} +32 -6
- package/dist/chunk-J7CYVTAW.js +43 -0
- package/dist/{chunk-WF2XKCEZ.js → chunk-LCKLYFAZ.js} +1 -1
- package/dist/{chunk-3LNKPUZ7.js → chunk-NP4SLURL.js} +1 -1
- package/dist/{chunk-LRRQP7DH.js → chunk-O2NWQLYB.js} +2 -2
- package/dist/{chunk-DKGCOGRT.js → chunk-RD2QHYTL.js} +144 -37
- package/dist/{chunk-S7S7WENB.js → chunk-WZBAQCA5.js} +2 -2
- package/dist/{chunk-JMHX3M4C.js → chunk-YIKGVALU.js} +3 -3
- package/dist/chunk-probe.js +3 -3
- package/dist/commands/login.d.ts +34 -9
- package/dist/commands/login.js +171 -68
- package/dist/commands/logout.d.ts +1 -2
- package/dist/commands/logout.js +5 -3
- package/dist/commands/whoami.d.ts +1 -2
- package/dist/commands/whoami.js +7 -4
- package/dist/deploy.d.ts +7 -1
- package/dist/deploy.js +12 -9
- package/dist/dotns.js +4 -4
- package/dist/environments.js +1 -1
- package/dist/index.js +11 -10
- package/dist/manifest/publish.js +11 -10
- package/dist/manifest/types.d.ts +1 -1
- package/dist/memory-report.js +2 -2
- package/dist/merkle.js +10 -9
- package/dist/personhood/bootstrap.js +10 -10
- package/dist/personhood/people-client.js +4 -4
- package/dist/run-state.js +1 -1
- package/dist/{signer-CriGqahj.d.ts → signer-vR6KKC7V.d.ts} +1 -1
- package/dist/spinner.d.ts +21 -0
- package/dist/spinner.js +6 -0
- package/dist/sss-allowance.d.ts +29 -0
- package/dist/sss-allowance.js +8 -0
- package/dist/storage-signer.d.ts +94 -2
- package/dist/storage-signer.js +18 -9
- package/dist/telemetry.js +2 -2
- package/dist/version-check.d.ts +0 -3
- package/dist/version-check.js +3 -3
- package/package.json +19 -15
- package/dist/allocations-B65Is4Md.d.ts +0 -97
- package/dist/auth-DkRZBK-T.d.ts +0 -122
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-NP4SLURL.js";
|
|
9
|
+
import "./chunk-LCKLYFAZ.js";
|
|
10
|
+
import "./chunk-2SR5D4CP.js";
|
|
11
11
|
export {
|
|
12
12
|
ChainProbeCrossValidationError,
|
|
13
13
|
ChainProbeMetadataError,
|
package/dist/commands/login.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { b as AllocationSummary } from '../allocations-B65Is4Md.js';
|
|
2
|
-
import '@parity/product-sdk-terminal';
|
|
3
|
-
|
|
4
1
|
/**
|
|
5
2
|
* login — QR/mobile sign-in command.
|
|
6
3
|
*
|
|
@@ -8,15 +5,43 @@ import '@parity/product-sdk-terminal';
|
|
|
8
5
|
* 1. connect() → existing session (already logged in) OR QR code
|
|
9
6
|
* 2. Print QR → user scans on phone
|
|
10
7
|
* 3. waitForLogin() → phone approves → paired
|
|
11
|
-
* 4.
|
|
12
|
-
*
|
|
13
|
-
*
|
|
8
|
+
* 4. getBulletinSigner() — resolves the slot account from host-papp's allowance service.
|
|
9
|
+
* Uses DOT_PRODUCT_ID ("playground.dot") as callingProductId, which matches what the
|
|
10
|
+
* mobile wallet allocated during pairing. A 60s timeout prevents hanging on unresponsive phones.
|
|
11
|
+
* 5. Print summarizeLogin() + slot address on success; map AllowanceError.reason → message on failure
|
|
12
|
+
* 6. Destroy adapters and exit
|
|
14
13
|
*/
|
|
15
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Map an AllowanceError.reason to a user-facing message.
|
|
16
|
+
*
|
|
17
|
+
* - NoSession: the paired session was not found (should not happen right after login)
|
|
18
|
+
* - Rejected: the user dismissed the wallet prompt
|
|
19
|
+
* - NotAvailable: the wallet has no allocation for this product (re-pair needed)
|
|
20
|
+
* - UnexpectedResponse: protocol-level error in the wire exchange
|
|
21
|
+
*/
|
|
22
|
+
declare function allocationErrorMessage(reason: string): string;
|
|
16
23
|
/**
|
|
17
24
|
* Format a post-login summary. Pure function, unit-testable.
|
|
25
|
+
*
|
|
26
|
+
* @param address SS58 product address (the identity signing on-chain)
|
|
27
|
+
* @param slotAddress SS58 slot account address for Bulletin storage, or null if not obtained
|
|
28
|
+
*/
|
|
29
|
+
declare function summarizeLogin(address: string, slotAddress: string | null): string;
|
|
30
|
+
/**
|
|
31
|
+
* Produce the on-chain authorization result message shown after the active-wait completes.
|
|
32
|
+
* Pure function — unit-testable without a real WS connection.
|
|
33
|
+
*
|
|
34
|
+
* - authorized = true → ✓ success message with expiration block (exit-0, show summarizeLogin).
|
|
35
|
+
* - authorized = false → soft-warning: active wait timed out before the authorization landed.
|
|
36
|
+
* Login is still valid — the slot is deterministic and often already authorized; the deploy
|
|
37
|
+
* path re-probes before use and falls back to the pool if still absent. isWarning=true so
|
|
38
|
+
* callers know it's a non-fatal outcome. The timeout bound (timeoutSeconds) is embedded in
|
|
39
|
+
* the message so users understand the ceiling that was used.
|
|
18
40
|
*/
|
|
19
|
-
declare function
|
|
41
|
+
declare function bulletinAuthSummary(authorized: boolean, expiration?: number, timeoutSeconds?: number): {
|
|
42
|
+
message: string;
|
|
43
|
+
isWarning: boolean;
|
|
44
|
+
};
|
|
20
45
|
interface LoginOptions {
|
|
21
46
|
suri?: string;
|
|
22
47
|
}
|
|
@@ -25,4 +50,4 @@ interface LoginOptions {
|
|
|
25
50
|
*/
|
|
26
51
|
declare function runLogin(envId: string, _opts?: LoginOptions): Promise<void>;
|
|
27
52
|
|
|
28
|
-
export { type LoginOptions, runLogin, summarizeLogin };
|
|
53
|
+
export { type LoginOptions, allocationErrorMessage, bulletinAuthSummary, runLogin, summarizeLogin };
|
package/dist/commands/login.js
CHANGED
|
@@ -1,116 +1,219 @@
|
|
|
1
1
|
import "../chunk-JQKKMUCT.js";
|
|
2
|
-
import
|
|
3
|
-
DEFAULT_RESOURCES,
|
|
4
|
-
summarizeOutcomes
|
|
5
|
-
} from "../chunk-2OZVKA3D.js";
|
|
2
|
+
import "../chunk-DHY2ZXVZ.js";
|
|
6
3
|
import {
|
|
7
4
|
renderLoginStatus
|
|
8
5
|
} from "../chunk-RIRDBSBG.js";
|
|
9
6
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
startSpinner
|
|
8
|
+
} from "../chunk-J7CYVTAW.js";
|
|
9
|
+
import {
|
|
10
|
+
waitForBulletinAuthorization
|
|
11
|
+
} from "../chunk-RD2QHYTL.js";
|
|
12
|
+
import {
|
|
13
|
+
checkSSSAllowance
|
|
14
|
+
} from "../chunk-G56VYTUD.js";
|
|
13
15
|
import "../chunk-HOTQDYHD.js";
|
|
14
16
|
import "../chunk-IW3X2MJF.js";
|
|
15
17
|
import "../chunk-KOSF5FDO.js";
|
|
16
18
|
import "../chunk-J3NIXHZZ.js";
|
|
17
19
|
import "../chunk-S7EM5VMW.js";
|
|
18
20
|
import {
|
|
19
|
-
|
|
20
|
-
getAuthClient
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
import "../chunk-
|
|
21
|
+
DOT_PRODUCT_ID,
|
|
22
|
+
getAuthClient,
|
|
23
|
+
getPeopleChainEndpoints,
|
|
24
|
+
resolveBulletinEndpoints
|
|
25
|
+
} from "../chunk-H4LWILH4.js";
|
|
26
|
+
import "../chunk-O2NWQLYB.js";
|
|
27
|
+
import "../chunk-6NW5M3F5.js";
|
|
28
|
+
import "../chunk-NP4SLURL.js";
|
|
25
29
|
import "../chunk-C2TS5MER.js";
|
|
26
|
-
import "../chunk-
|
|
30
|
+
import "../chunk-WZBAQCA5.js";
|
|
27
31
|
import "../chunk-QS7YU76C.js";
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import
|
|
32
|
+
import "../chunk-LCKLYFAZ.js";
|
|
33
|
+
import "../chunk-2SR5D4CP.js";
|
|
34
|
+
import {
|
|
35
|
+
loadEnvironments
|
|
36
|
+
} from "../chunk-GL3U7K2B.js";
|
|
31
37
|
import "../chunk-ZOC4GITL.js";
|
|
32
38
|
|
|
33
39
|
// src/commands/login.ts
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
import { ss58Encode } from "@parity/product-sdk-address";
|
|
41
|
+
var ALLOCATION_TIMEOUT_MS = 6e4;
|
|
42
|
+
function allocationErrorMessage(reason) {
|
|
43
|
+
switch (reason) {
|
|
44
|
+
case "NoSession":
|
|
45
|
+
return "No active session found \u2014 try logging in again.";
|
|
46
|
+
case "Rejected":
|
|
47
|
+
return "Bulletin storage access was declined on your phone. Approve the request to enable storage signing.";
|
|
48
|
+
case "NotAvailable":
|
|
49
|
+
return "Bulletin storage is not available for this product on your phone.\n This may mean the wallet paired under a different product ID.\n Run: bulletin-deploy logout\n Then: bulletin-deploy login\n to re-pair and establish the allocation.";
|
|
50
|
+
case "UnexpectedResponse":
|
|
51
|
+
return "Unexpected response from the mobile wallet during storage allocation. Try again.";
|
|
52
|
+
default:
|
|
53
|
+
return `Allocation failed (${reason}).`;
|
|
41
54
|
}
|
|
42
|
-
|
|
43
|
-
|
|
55
|
+
}
|
|
56
|
+
function summarizeLogin(address, slotAddress) {
|
|
57
|
+
const lines = [`Signed in as: ${address}`];
|
|
58
|
+
if (slotAddress) {
|
|
59
|
+
lines.push(`Bulletin storage slot: ${slotAddress} \u2713`);
|
|
60
|
+
} else {
|
|
61
|
+
lines.push("Bulletin storage slot: not allocated (storage will fall back to pool)");
|
|
44
62
|
}
|
|
45
63
|
return lines.join("\n");
|
|
46
64
|
}
|
|
65
|
+
function bulletinAuthSummary(authorized, expiration, timeoutSeconds = 180) {
|
|
66
|
+
if (authorized) {
|
|
67
|
+
return {
|
|
68
|
+
message: `\u2713 Bulletin allowance authorized (until block ${expiration})`,
|
|
69
|
+
isWarning: false
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
message: ` Couldn't confirm on-chain authorization within ${timeoutSeconds}s. Your login is valid \u2014 your next deploy will use the slot once it's authorized, or fall back to the pool meanwhile.`,
|
|
74
|
+
isWarning: true
|
|
75
|
+
};
|
|
76
|
+
}
|
|
47
77
|
async function runLogin(envId, _opts = {}) {
|
|
78
|
+
let tearingDown = false;
|
|
79
|
+
const teardownFilter = (e) => {
|
|
80
|
+
const msg = String(e?.message ?? e);
|
|
81
|
+
if (tearingDown && /not connected|client destroyed|destroyederror/i.test(msg)) return;
|
|
82
|
+
console.error(e);
|
|
83
|
+
process.exit(1);
|
|
84
|
+
};
|
|
85
|
+
process.on("uncaughtException", teardownFilter);
|
|
86
|
+
process.on("unhandledRejection", teardownFilter);
|
|
48
87
|
const client = await getAuthClient(envId);
|
|
49
88
|
const result = await client.connect();
|
|
50
89
|
if (result.kind === "existing") {
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
if (
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
origErr(...args);
|
|
62
|
-
};
|
|
63
|
-
await Promise.race([
|
|
64
|
-
client.requestAllocation(sessionHandle2.userSession, DEFAULT_RESOURCES).catch(() => {
|
|
65
|
-
}),
|
|
66
|
-
new Promise((r) => setTimeout(r, 3e3))
|
|
67
|
-
]);
|
|
68
|
-
console.error = origErr;
|
|
69
|
-
sessionHandle2.destroy();
|
|
70
|
-
if (sssExpired) {
|
|
71
|
-
console.error(
|
|
72
|
-
`
|
|
90
|
+
const sessionHandle = await client.getSessionSigner();
|
|
91
|
+
if (sessionHandle) {
|
|
92
|
+
try {
|
|
93
|
+
const productPubkey = sessionHandle.signer.publicKey;
|
|
94
|
+
const peopleEndpoints = await getPeopleChainEndpoints(envId);
|
|
95
|
+
const allowed = await checkSSSAllowance(productPubkey, peopleEndpoints);
|
|
96
|
+
if (allowed === false) {
|
|
97
|
+
console.error(
|
|
98
|
+
`
|
|
73
99
|
Statement Store allowance has expired for ${result.address}.
|
|
74
100
|
Run: bulletin-deploy logout
|
|
75
101
|
Then: bulletin-deploy login
|
|
76
102
|
to re-pair and renew (allowance lasts ~2-3 days).`
|
|
77
|
-
|
|
78
|
-
|
|
103
|
+
);
|
|
104
|
+
tearingDown = true;
|
|
105
|
+
sessionHandle.destroy();
|
|
106
|
+
process.exit(1);
|
|
107
|
+
}
|
|
108
|
+
try {
|
|
109
|
+
await Promise.race([
|
|
110
|
+
Promise.resolve(
|
|
111
|
+
sessionHandle.adapter.allowance.getBulletinSigner(sessionHandle.userSession.id, DOT_PRODUCT_ID)
|
|
112
|
+
).then((r) => {
|
|
113
|
+
if (r.isErr()) {
|
|
114
|
+
console.warn(
|
|
115
|
+
`
|
|
116
|
+
Bulletin storage slot allowance not available \u2014 storage will fall back to pool.
|
|
117
|
+
Run: bulletin-deploy logout && bulletin-deploy login
|
|
118
|
+
to re-establish your allowance.`
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
}).catch(() => {
|
|
122
|
+
}),
|
|
123
|
+
new Promise((r) => setTimeout(r, 3e3))
|
|
124
|
+
]);
|
|
125
|
+
} catch {
|
|
126
|
+
}
|
|
127
|
+
} finally {
|
|
128
|
+
sessionHandle.destroy();
|
|
79
129
|
}
|
|
80
130
|
}
|
|
81
131
|
console.log(`Already signed in as: ${result.address}`);
|
|
132
|
+
tearingDown = true;
|
|
82
133
|
return;
|
|
83
134
|
}
|
|
84
135
|
console.log(result.qrCode);
|
|
85
|
-
console.log("Scan the QR code with your Polkadot
|
|
86
|
-
const
|
|
136
|
+
console.log("Scan the QR code with your Polkadot mobile app.");
|
|
137
|
+
const handle = await client.waitForLogin(result.login, (status) => {
|
|
87
138
|
const msg = renderLoginStatus(status);
|
|
88
139
|
if (msg) process.stdout.write(`\r${msg}`);
|
|
89
140
|
});
|
|
90
|
-
if (!
|
|
141
|
+
if (!handle) {
|
|
142
|
+
tearingDown = true;
|
|
91
143
|
console.error("\nLogin failed.");
|
|
144
|
+
process.exit(1);
|
|
92
145
|
return;
|
|
93
146
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
147
|
+
try {
|
|
148
|
+
console.log("\nRequesting Bulletin storage allowance \u2014 check your phone to approve.");
|
|
149
|
+
const bulletinSignerPromise = handle.adapter.allowance.getBulletinSigner(
|
|
150
|
+
handle.userSession.id,
|
|
151
|
+
DOT_PRODUCT_ID
|
|
152
|
+
);
|
|
153
|
+
const timeoutPromise = new Promise(
|
|
154
|
+
(_, reject) => setTimeout(
|
|
155
|
+
() => reject(new Error(
|
|
156
|
+
`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.`
|
|
157
|
+
)),
|
|
158
|
+
ALLOCATION_TIMEOUT_MS
|
|
159
|
+
)
|
|
160
|
+
);
|
|
161
|
+
const signerResult = await Promise.race([bulletinSignerPromise, timeoutPromise]);
|
|
162
|
+
if (signerResult.isOk()) {
|
|
163
|
+
const slotSigner = signerResult.value;
|
|
164
|
+
const slotAddress = ss58Encode(slotSigner.publicKey);
|
|
165
|
+
const { doc } = await loadEnvironments();
|
|
166
|
+
const bulletinEndpoints = resolveBulletinEndpoints(doc, envId) ?? void 0;
|
|
167
|
+
const spinner = startSpinner("Confirming Bulletin authorization on-chain");
|
|
168
|
+
const onSigint = () => {
|
|
169
|
+
spinner.stop();
|
|
170
|
+
console.log(
|
|
171
|
+
"Cancelled \u2014 on-chain authorization not yet confirmed. Your login is saved; your next deploy will use the slot once it's authorized, or fall back to the pool meanwhile."
|
|
172
|
+
);
|
|
173
|
+
console.log("\n" + summarizeLogin(handle.address, slotAddress));
|
|
174
|
+
tearingDown = true;
|
|
175
|
+
handle.destroy();
|
|
176
|
+
process.exit(0);
|
|
177
|
+
};
|
|
178
|
+
process.once("SIGINT", onSigint);
|
|
179
|
+
let authResult;
|
|
180
|
+
try {
|
|
181
|
+
authResult = await waitForBulletinAuthorization(slotAddress, {
|
|
182
|
+
timeoutMs: Infinity,
|
|
183
|
+
quiet: true,
|
|
184
|
+
endpoints: bulletinEndpoints
|
|
185
|
+
});
|
|
186
|
+
} finally {
|
|
187
|
+
spinner.stop();
|
|
188
|
+
process.removeListener("SIGINT", onSigint);
|
|
104
189
|
}
|
|
105
|
-
|
|
106
|
-
|
|
190
|
+
const summary = bulletinAuthSummary(
|
|
191
|
+
authResult.authorized,
|
|
192
|
+
authResult.authorized ? authResult.expiration : void 0
|
|
193
|
+
);
|
|
194
|
+
console.log(summary.message);
|
|
195
|
+
console.log("\n" + summarizeLogin(handle.address, slotAddress));
|
|
196
|
+
} else {
|
|
197
|
+
const err = signerResult.error;
|
|
198
|
+
console.log("\n" + summarizeLogin(handle.address, null));
|
|
199
|
+
console.warn(` ${allocationErrorMessage(err.reason)}`);
|
|
107
200
|
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
201
|
+
} catch (err) {
|
|
202
|
+
await Promise.resolve(handle.userSession.abortPendingRequests()).catch(() => {
|
|
203
|
+
});
|
|
204
|
+
tearingDown = true;
|
|
205
|
+
console.error(`
|
|
206
|
+
Allocation failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
207
|
+
process.exit(1);
|
|
208
|
+
} finally {
|
|
209
|
+
tearingDown = true;
|
|
210
|
+
handle.destroy();
|
|
111
211
|
}
|
|
212
|
+
process.exit(0);
|
|
112
213
|
}
|
|
113
214
|
export {
|
|
215
|
+
allocationErrorMessage,
|
|
216
|
+
bulletinAuthSummary,
|
|
114
217
|
runLogin,
|
|
115
218
|
summarizeLogin
|
|
116
219
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as LogoutStatus } from '../auth-C-Pel0AT.js';
|
|
2
2
|
import '@parity/product-sdk-terminal';
|
|
3
3
|
import 'polkadot-api';
|
|
4
|
-
import '../allocations-B65Is4Md.js';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* logout — sign out the current session.
|
package/dist/commands/logout.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import "../chunk-JQKKMUCT.js";
|
|
2
|
-
import "../chunk-
|
|
2
|
+
import "../chunk-DHY2ZXVZ.js";
|
|
3
3
|
import {
|
|
4
4
|
renderLogoutStatus
|
|
5
5
|
} from "../chunk-RIRDBSBG.js";
|
|
6
6
|
import {
|
|
7
7
|
getAuthClient
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-H4LWILH4.js";
|
|
9
|
+
import "../chunk-LCKLYFAZ.js";
|
|
10
|
+
import "../chunk-2SR5D4CP.js";
|
|
11
|
+
import "../chunk-GL3U7K2B.js";
|
|
10
12
|
import "../chunk-ZOC4GITL.js";
|
|
11
13
|
|
|
12
14
|
// src/commands/logout.ts
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { S as SessionAddresses } from '../auth-
|
|
1
|
+
import { S as SessionAddresses } from '../auth-C-Pel0AT.js';
|
|
2
2
|
import '@parity/product-sdk-terminal';
|
|
3
3
|
import 'polkadot-api';
|
|
4
|
-
import '../allocations-B65Is4Md.js';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* whoami — show the currently logged-in session account, or "not logged in".
|
package/dist/commands/whoami.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
+
STALE_SESSION_MESSAGE,
|
|
2
3
|
getAuthClient,
|
|
3
4
|
hasPersistedSession
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-H4LWILH4.js";
|
|
6
|
+
import "../chunk-LCKLYFAZ.js";
|
|
7
|
+
import "../chunk-2SR5D4CP.js";
|
|
8
|
+
import "../chunk-GL3U7K2B.js";
|
|
6
9
|
import "../chunk-ZOC4GITL.js";
|
|
7
10
|
|
|
8
11
|
// src/commands/whoami.ts
|
|
@@ -29,12 +32,12 @@ async function runWhoami(envId) {
|
|
|
29
32
|
console.log(formatWhoami(handle.addresses));
|
|
30
33
|
handle.destroy();
|
|
31
34
|
} else {
|
|
32
|
-
console.
|
|
35
|
+
console.error(STALE_SESSION_MESSAGE);
|
|
33
36
|
}
|
|
34
37
|
} catch (err) {
|
|
35
38
|
const e = err;
|
|
36
39
|
if (e?.name === "SignerNotAvailableError") {
|
|
37
|
-
console.
|
|
40
|
+
console.error(STALE_SESSION_MESSAGE);
|
|
38
41
|
} else {
|
|
39
42
|
console.log(`Could not reach login service: ${e?.message ?? String(err)}`);
|
|
40
43
|
console.log(formatWhoami(null));
|
package/dist/deploy.d.ts
CHANGED
|
@@ -106,6 +106,12 @@ declare function chooseSignerInput(opts: {
|
|
|
106
106
|
hasInjectedSigner: boolean;
|
|
107
107
|
hasSession?: boolean;
|
|
108
108
|
}): "mnemonic" | "injected" | "resolve" | "pool";
|
|
109
|
+
/**
|
|
110
|
+
* Produce the one-line storage-signer status printed at resolution time. Exported for unit testing.
|
|
111
|
+
* Success: " Storage signer: allowance slot <ss58>"
|
|
112
|
+
* Fallback: " Storage signer: pool fallback (<reason>)"
|
|
113
|
+
*/
|
|
114
|
+
declare function formatStorageSignerLine(slotAddress: string | null, failReason?: string): string;
|
|
109
115
|
declare function storeFile(contentBytes: Uint8Array, { client: existingClient, unsafeApi: existingApi, signer: existingSigner }?: ExistingProvider): Promise<string>;
|
|
110
116
|
/**
|
|
111
117
|
* Pre-compute dense nonces for chunks that need submission.
|
|
@@ -388,4 +394,4 @@ declare function computePhoneSigningSteps(dotnsPreflight: {
|
|
|
388
394
|
needsPopUpgrade: boolean;
|
|
389
395
|
} | null, publishNeeded: boolean): string[];
|
|
390
396
|
|
|
391
|
-
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, friendlyChainError, hasIPFS, interpretBitswapResult, isConnectionError, makeBulletinStatusHandler, merkleize, probeP2pRetrieval, resolveDotnsConnectOptions, resolveReproducibleTimestamp, retryBudgetExhausted, setWsHaltCallback, storeChunkedContent, storeDirectory, storeDirectoryV2, storeFile, unpublish };
|
|
397
|
+
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 };
|
package/dist/deploy.js
CHANGED
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
encodeContenthash,
|
|
29
29
|
encryptContent,
|
|
30
30
|
estimateUploadBytes,
|
|
31
|
+
formatStorageSignerLine,
|
|
31
32
|
friendlyChainError,
|
|
32
33
|
hasIPFS,
|
|
33
34
|
interpretBitswapResult,
|
|
@@ -44,22 +45,23 @@ import {
|
|
|
44
45
|
storeDirectoryV2,
|
|
45
46
|
storeFile,
|
|
46
47
|
unpublish
|
|
47
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-RD2QHYTL.js";
|
|
49
|
+
import "./chunk-G56VYTUD.js";
|
|
48
50
|
import "./chunk-HOTQDYHD.js";
|
|
49
51
|
import "./chunk-IW3X2MJF.js";
|
|
50
52
|
import "./chunk-KOSF5FDO.js";
|
|
51
53
|
import "./chunk-J3NIXHZZ.js";
|
|
52
54
|
import "./chunk-S7EM5VMW.js";
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
55
|
-
import "./chunk-
|
|
56
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-H4LWILH4.js";
|
|
56
|
+
import "./chunk-O2NWQLYB.js";
|
|
57
|
+
import "./chunk-6NW5M3F5.js";
|
|
58
|
+
import "./chunk-NP4SLURL.js";
|
|
57
59
|
import "./chunk-C2TS5MER.js";
|
|
58
|
-
import "./chunk-
|
|
60
|
+
import "./chunk-WZBAQCA5.js";
|
|
59
61
|
import "./chunk-QS7YU76C.js";
|
|
60
|
-
import "./chunk-
|
|
61
|
-
import "./chunk-
|
|
62
|
-
import "./chunk-
|
|
62
|
+
import "./chunk-LCKLYFAZ.js";
|
|
63
|
+
import "./chunk-2SR5D4CP.js";
|
|
64
|
+
import "./chunk-GL3U7K2B.js";
|
|
63
65
|
import {
|
|
64
66
|
EXIT_CODE_NO_RETRY,
|
|
65
67
|
NonRetryableError
|
|
@@ -96,6 +98,7 @@ export {
|
|
|
96
98
|
encodeContenthash,
|
|
97
99
|
encryptContent,
|
|
98
100
|
estimateUploadBytes,
|
|
101
|
+
formatStorageSignerLine,
|
|
99
102
|
friendlyChainError,
|
|
100
103
|
hasIPFS,
|
|
101
104
|
interpretBitswapResult,
|
package/dist/dotns.js
CHANGED
|
@@ -50,11 +50,11 @@ import {
|
|
|
50
50
|
stripTrailingDigits,
|
|
51
51
|
validateDomainLabel,
|
|
52
52
|
verifyNonceAdvanced
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-WZBAQCA5.js";
|
|
54
54
|
import "./chunk-QS7YU76C.js";
|
|
55
|
-
import "./chunk-
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-LCKLYFAZ.js";
|
|
56
|
+
import "./chunk-2SR5D4CP.js";
|
|
57
|
+
import "./chunk-GL3U7K2B.js";
|
|
58
58
|
import "./chunk-ZOC4GITL.js";
|
|
59
59
|
export {
|
|
60
60
|
ATTR_TX_RESOLUTION_KIND,
|
package/dist/environments.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-MMAZFJDG.js";
|
|
5
5
|
import {
|
|
6
6
|
publishManifest
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YIKGVALU.js";
|
|
8
8
|
import {
|
|
9
9
|
DEFAULT_TEXT_RECORD_BUDGET_BYTES,
|
|
10
10
|
PLACEHOLDER_CID,
|
|
@@ -24,7 +24,8 @@ import {
|
|
|
24
24
|
deploy,
|
|
25
25
|
merkleizeJS,
|
|
26
26
|
merkleizeWithStableOrder
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-RD2QHYTL.js";
|
|
28
|
+
import "./chunk-G56VYTUD.js";
|
|
28
29
|
import "./chunk-HOTQDYHD.js";
|
|
29
30
|
import {
|
|
30
31
|
computeStats,
|
|
@@ -47,19 +48,19 @@ import {
|
|
|
47
48
|
isVolatilePath,
|
|
48
49
|
parseManifest
|
|
49
50
|
} from "./chunk-S7EM5VMW.js";
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-H4LWILH4.js";
|
|
52
|
+
import "./chunk-O2NWQLYB.js";
|
|
53
|
+
import "./chunk-6NW5M3F5.js";
|
|
53
54
|
import {
|
|
54
55
|
probeChunks
|
|
55
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-NP4SLURL.js";
|
|
56
57
|
import "./chunk-C2TS5MER.js";
|
|
57
58
|
import {
|
|
58
59
|
DEFAULT_MNEMONIC,
|
|
59
60
|
DotNS,
|
|
60
61
|
parseDomainName,
|
|
61
62
|
sanitizeDomainLabel
|
|
62
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-WZBAQCA5.js";
|
|
63
64
|
import {
|
|
64
65
|
bootstrapPool,
|
|
65
66
|
derivePoolAccounts,
|
|
@@ -67,7 +68,7 @@ import {
|
|
|
67
68
|
fetchPoolAuthorizations,
|
|
68
69
|
selectAccount
|
|
69
70
|
} from "./chunk-QS7YU76C.js";
|
|
70
|
-
import "./chunk-
|
|
71
|
+
import "./chunk-LCKLYFAZ.js";
|
|
71
72
|
import {
|
|
72
73
|
VERSION,
|
|
73
74
|
loadRunState,
|
|
@@ -77,7 +78,7 @@ import {
|
|
|
77
78
|
shouldSkipStaleWarning,
|
|
78
79
|
stateFilePath,
|
|
79
80
|
writeRunState
|
|
80
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-2SR5D4CP.js";
|
|
81
82
|
import {
|
|
82
83
|
DEFAULT_ENV_ID,
|
|
83
84
|
deepMergeEnvironments,
|
|
@@ -88,7 +89,7 @@ import {
|
|
|
88
89
|
loadEnvironments,
|
|
89
90
|
resolveEndpoints,
|
|
90
91
|
validateContractAddresses
|
|
91
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-GL3U7K2B.js";
|
|
92
93
|
import "./chunk-ZOC4GITL.js";
|
|
93
94
|
export {
|
|
94
95
|
DEFAULT_ENV_ID,
|
package/dist/manifest/publish.js
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
publishManifest
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-YIKGVALU.js";
|
|
4
4
|
import "../chunk-RI3ZLNPN.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-RD2QHYTL.js";
|
|
6
|
+
import "../chunk-G56VYTUD.js";
|
|
6
7
|
import "../chunk-HOTQDYHD.js";
|
|
7
8
|
import "../chunk-IW3X2MJF.js";
|
|
8
9
|
import "../chunk-KOSF5FDO.js";
|
|
9
10
|
import "../chunk-J3NIXHZZ.js";
|
|
10
11
|
import "../chunk-S7EM5VMW.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-H4LWILH4.js";
|
|
13
|
+
import "../chunk-O2NWQLYB.js";
|
|
14
|
+
import "../chunk-6NW5M3F5.js";
|
|
15
|
+
import "../chunk-NP4SLURL.js";
|
|
15
16
|
import "../chunk-C2TS5MER.js";
|
|
16
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-WZBAQCA5.js";
|
|
17
18
|
import "../chunk-QS7YU76C.js";
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-LCKLYFAZ.js";
|
|
20
|
+
import "../chunk-2SR5D4CP.js";
|
|
21
|
+
import "../chunk-GL3U7K2B.js";
|
|
21
22
|
import "../chunk-ZOC4GITL.js";
|
|
22
23
|
export {
|
|
23
24
|
publishManifest
|
package/dist/manifest/types.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ interface ProductConfig {
|
|
|
83
83
|
*
|
|
84
84
|
* @example
|
|
85
85
|
* import { defineConfig } from "bulletin-deploy";
|
|
86
|
-
* export default defineConfig({ domain: "
|
|
86
|
+
* export default defineConfig({ domain: "demoapp.dot", ... });
|
|
87
87
|
*/
|
|
88
88
|
declare function defineConfig<T extends ProductConfig>(config: T): T;
|
|
89
89
|
|
package/dist/memory-report.js
CHANGED