bulletin-deploy 0.7.20-rc.4 → 0.7.20

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.
@@ -9,10 +9,10 @@ import {
9
9
  offerBugReport,
10
10
  scrubSecrets,
11
11
  setDeployContext
12
- } from "./chunk-V55BGOBX.js";
13
- import "./chunk-LHMJZC5E.js";
14
- import "./chunk-VYJAVVT6.js";
15
- import "./chunk-IU4BYHQS.js";
12
+ } from "./chunk-EZUICRCA.js";
13
+ import "./chunk-6LODTEG3.js";
14
+ import "./chunk-GGHSZZZ3.js";
15
+ import "./chunk-CD27FW4F.js";
16
16
  import "./chunk-QGM4M3NI.js";
17
17
  export {
18
18
  buildCliFlagsSummary,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-VYJAVVT6.js";
3
+ } from "./chunk-GGHSZZZ3.js";
4
4
 
5
5
  // src/version-check.ts
6
6
  import { execSync, execFileSync } from "child_process";
@@ -5,7 +5,7 @@ import {
5
5
  captureWarning,
6
6
  setDeployAttribute,
7
7
  withSpan
8
- } from "./chunk-VYJAVVT6.js";
8
+ } from "./chunk-GGHSZZZ3.js";
9
9
 
10
10
  // src/dotns.ts
11
11
  import { spawn } from "child_process";
@@ -789,58 +789,94 @@ var DotNS = class {
789
789
  } catch (e) {
790
790
  throw new Error(`DotNS connect: failed to resolve EVM address from ${this.substrateAddress} via ReviveApi.address (${e.message?.slice(0, 200)})`);
791
791
  }
792
+ this.connected = true;
792
793
  if (options.nativeToEthRatio) this._nativeToEthRatio = options.nativeToEthRatio;
793
- if (options.autoAccountMapping) {
794
- if (!await this.clientWrapper.checkIfAccountMapped(this.substrateAddress)) {
795
- try {
796
- const cd = encodeFunctionData({ abi: DOTNS_REGISTRAR_CONTROLLER_ABI, functionName: "minCommitmentAge", args: [] });
797
- await this.clientWrapper.signAndSubmitWithRetry(
798
- () => this.clientWrapper.client.tx.Revive.call({
799
- dest: this._contracts.DOTNS_REGISTRAR_CONTROLLER,
800
- value: 0n,
801
- weight_limit: { ref_time: 10000000000n, proof_size: 131072n },
802
- storage_deposit_limit: 5000000000000n,
803
- data: Binary.fromHex(cd)
804
- }),
805
- this.signer,
806
- () => {
807
- },
808
- "auto-map trigger"
809
- );
810
- } catch {
811
- }
812
- }
813
- console.log(` Account: auto-mapped`);
814
- } else {
815
- if (!await this.clientWrapper.checkIfAccountMapped(this.substrateAddress)) {
816
- console.log(` Mapping account on Asset Hub Revive...`);
817
- if (this._usesExternalSigner) {
818
- await this.clientWrapper.ensureAccountMapped(this.substrateAddress, this.signer);
819
- } else {
820
- try {
821
- await runDotnsCli(["account", "map", ...rpcFlag(rpc)], authEnv);
822
- } catch (e) {
823
- captureWarning("account map failed during connect (will rely on chain confirmation)", { error: e.message?.slice(0, 200) });
824
- }
825
- const mappingDeadline = Date.now() + 15e3;
826
- let mappingConfirmed = false;
827
- while (Date.now() < mappingDeadline) {
828
- if (await this.clientWrapper.checkIfAccountMapped(this.substrateAddress)) {
829
- mappingConfirmed = true;
830
- break;
794
+ try {
795
+ if (options.autoAccountMapping) {
796
+ await this.ensureAutoMappedAccountReady();
797
+ } else {
798
+ if (!await this.clientWrapper.checkIfAccountMapped(this.substrateAddress)) {
799
+ console.log(` Mapping account on Asset Hub Revive...`);
800
+ if (this._usesExternalSigner) {
801
+ await this.clientWrapper.ensureAccountMapped(this.substrateAddress, this.signer);
802
+ } else {
803
+ try {
804
+ await runDotnsCli(["account", "map", ...rpcFlag(rpc)], authEnv);
805
+ } catch (e) {
806
+ captureWarning("account map failed during connect (will rely on chain confirmation)", { error: e.message?.slice(0, 200) });
807
+ }
808
+ const mappingDeadline = Date.now() + 15e3;
809
+ let mappingConfirmed = false;
810
+ while (Date.now() < mappingDeadline) {
811
+ if (await this.clientWrapper.checkIfAccountMapped(this.substrateAddress)) {
812
+ mappingConfirmed = true;
813
+ break;
814
+ }
815
+ await new Promise((r) => setTimeout(r, 1500));
816
+ }
817
+ if (!mappingConfirmed) {
818
+ throw new Error(`Account mapping did not take effect on-chain for ${this.substrateAddress}. The map_account tx may have been dropped or hit a dispatch error \u2014 check the signer's balance for existential deposit + fees.`);
831
819
  }
832
- await new Promise((r) => setTimeout(r, 1500));
833
- }
834
- if (!mappingConfirmed) {
835
- throw new Error(`Account mapping did not take effect on-chain for ${this.substrateAddress}. The map_account tx may have been dropped or hit a dispatch error \u2014 check the signer's balance for existential deposit + fees.`);
836
820
  }
837
821
  }
822
+ console.log(` Account: mapped`);
838
823
  }
839
- console.log(` Account: mapped`);
824
+ } catch (e) {
825
+ this.connected = false;
826
+ throw e;
840
827
  }
841
- this.connected = true;
842
828
  return this;
843
829
  }
830
+ async ensureAutoMappedAccountReady() {
831
+ this.ensureConnected();
832
+ if (!this.clientWrapper || !this.substrateAddress || !this.signer) {
833
+ throw new Error("Account auto-mapping unavailable before DotNS signer is initialized");
834
+ }
835
+ if (await this.clientWrapper.checkIfAccountMapped(this.substrateAddress)) {
836
+ console.log(` Account: auto-mapped`);
837
+ return;
838
+ }
839
+ if (await this.isTestnet()) {
840
+ const free = await this.readFreeBalance(this.substrateAddress);
841
+ if (free < FEE_FLOOR_REGISTER) {
842
+ console.log(` DotNS signer ${this.substrateAddress.slice(0, 8)}... balance ${fmtPas(free)} PAS before auto-map \u2014 attempting testnet auto top-up...`);
843
+ const toppedUp = await this.attemptTestnetTopUp(this.substrateAddress, TOP_UP_TARGET);
844
+ if (toppedUp) {
845
+ console.log(` Topped up ${fmtPas(toppedUp.transferred)} PAS from ${toppedUp.source} for auto-map`);
846
+ setDeployAttribute("deploy.dotns.signer_below_floor", "true");
847
+ setDeployAttribute("deploy.dotns.toppedup", "true");
848
+ setDeployAttribute("deploy.dotns.toppedup_source", toppedUp.source);
849
+ }
850
+ }
851
+ }
852
+ if (!await this.clientWrapper.checkIfAccountMapped(this.substrateAddress)) {
853
+ try {
854
+ const cd = encodeFunctionData({ abi: DOTNS_REGISTRAR_CONTROLLER_ABI, functionName: "minCommitmentAge", args: [] });
855
+ await this.clientWrapper.signAndSubmitWithRetry(
856
+ () => this.clientWrapper.client.tx.Revive.call({
857
+ dest: this._contracts.DOTNS_REGISTRAR_CONTROLLER,
858
+ value: 0n,
859
+ weight_limit: { ref_time: 10000000000n, proof_size: 131072n },
860
+ storage_deposit_limit: 5000000000000n,
861
+ data: Binary.fromHex(cd)
862
+ }),
863
+ this.signer,
864
+ () => {
865
+ },
866
+ "auto-map trigger"
867
+ );
868
+ } catch (e) {
869
+ captureWarning("DotNS auto-map trigger failed", {
870
+ signer: this.substrateAddress,
871
+ error: e?.message?.slice?.(0, 200) ?? String(e).slice(0, 200)
872
+ });
873
+ }
874
+ }
875
+ if (!await this.clientWrapper.checkIfAccountMapped(this.substrateAddress)) {
876
+ throw new Error(`Account auto-mapping did not take effect on-chain for ${this.substrateAddress}. The signer needs enough testnet PAS to submit the Revive auto-map trigger before DotNS preflight can run. Top up at ${PASEO_FAUCET_URL} or fund Alice/Bob so auto-top-up can help.`);
877
+ }
878
+ console.log(` Account: auto-mapped`);
879
+ }
844
880
  ensureConnected() {
845
881
  if (!this.connected) throw new Error("Not connected. Call connect() first.");
846
882
  }
@@ -6,7 +6,7 @@ import * as path from "path";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "bulletin-deploy",
9
- version: "0.7.20-rc.4",
9
+ version: "0.7.20",
10
10
  private: false,
11
11
  repository: {
12
12
  type: "git",
@@ -2,11 +2,11 @@ import {
2
2
  classifyErrorArea,
3
3
  isInteractive,
4
4
  promptYesNo
5
- } from "./chunk-LHMJZC5E.js";
5
+ } from "./chunk-6LODTEG3.js";
6
6
  import {
7
7
  VERSION,
8
8
  getCurrentSentryTraceId
9
- } from "./chunk-VYJAVVT6.js";
9
+ } from "./chunk-GGHSZZZ3.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-IU4BYHQS.js";
4
+ } from "./chunk-CD27FW4F.js";
5
5
 
6
6
  // src/memory-report.ts
7
7
  import * as fs2 from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  captureWarning
3
- } from "./chunk-VYJAVVT6.js";
3
+ } from "./chunk-GGHSZZZ3.js";
4
4
 
5
5
  // src/chunk-probe.ts
6
6
  import { Twox128, Blake2128Concat, decAnyMetadata, unifyMetadata } from "@polkadot-api/substrate-bindings";
@@ -20,10 +20,10 @@ import {
20
20
  } from "./chunk-S7EM5VMW.js";
21
21
  import {
22
22
  setDeployContext
23
- } from "./chunk-V55BGOBX.js";
23
+ } from "./chunk-EZUICRCA.js";
24
24
  import {
25
25
  probeChunks
26
- } from "./chunk-SG22GVKX.js";
26
+ } from "./chunk-GNVDLLZI.js";
27
27
  import {
28
28
  packSection
29
29
  } from "./chunk-C2TS5MER.js";
@@ -34,7 +34,7 @@ import {
34
34
  parseDomainName,
35
35
  popStatusName,
36
36
  verifyNonceAdvanced
37
- } from "./chunk-6J7JPZJS.js";
37
+ } from "./chunk-BR2EQ2X3.js";
38
38
  import {
39
39
  derivePoolAccounts,
40
40
  detectTestnet,
@@ -56,7 +56,7 @@ import {
56
56
  truncateAddress,
57
57
  withDeploySpan,
58
58
  withSpan
59
- } from "./chunk-VYJAVVT6.js";
59
+ } from "./chunk-GGHSZZZ3.js";
60
60
  import {
61
61
  DEFAULT_ENV_ID,
62
62
  loadEnvironments,
@@ -5,9 +5,9 @@ import {
5
5
  _decodeStorageValue,
6
6
  _resetProbeSession,
7
7
  probeChunks
8
- } from "./chunk-SG22GVKX.js";
9
- import "./chunk-VYJAVVT6.js";
10
- import "./chunk-IU4BYHQS.js";
8
+ } from "./chunk-GNVDLLZI.js";
9
+ import "./chunk-GGHSZZZ3.js";
10
+ import "./chunk-CD27FW4F.js";
11
11
  import "./chunk-QGM4M3NI.js";
12
12
  export {
13
13
  ChainProbeCrossValidationError,
package/dist/deploy.js CHANGED
@@ -32,19 +32,19 @@ import {
32
32
  storeDirectory,
33
33
  storeDirectoryV2,
34
34
  storeFile
35
- } from "./chunk-HALS6ZKT.js";
35
+ } from "./chunk-UVIG5UAV.js";
36
36
  import "./chunk-MJTQOXBC.js";
37
37
  import "./chunk-KOSF5FDO.js";
38
38
  import "./chunk-5MRZ3V4A.js";
39
39
  import "./chunk-S7EM5VMW.js";
40
- import "./chunk-V55BGOBX.js";
41
- import "./chunk-LHMJZC5E.js";
42
- import "./chunk-SG22GVKX.js";
40
+ import "./chunk-EZUICRCA.js";
41
+ import "./chunk-6LODTEG3.js";
42
+ import "./chunk-GNVDLLZI.js";
43
43
  import "./chunk-C2TS5MER.js";
44
- import "./chunk-6J7JPZJS.js";
44
+ import "./chunk-BR2EQ2X3.js";
45
45
  import "./chunk-4TS6R26J.js";
46
- import "./chunk-VYJAVVT6.js";
47
- import "./chunk-IU4BYHQS.js";
46
+ import "./chunk-GGHSZZZ3.js";
47
+ import "./chunk-CD27FW4F.js";
48
48
  import "./chunk-HUT7ZGRQ.js";
49
49
  import {
50
50
  EXIT_CODE_NO_RETRY,
package/dist/dotns.d.ts CHANGED
@@ -200,6 +200,7 @@ declare class DotNS {
200
200
  private get _useContractPath();
201
201
  constructor();
202
202
  connect(options?: DotNSConnectOptions): Promise<this>;
203
+ ensureAutoMappedAccountReady(): Promise<void>;
203
204
  ensureConnected(): void;
204
205
  private _testnetCache;
205
206
  isTestnet(): Promise<boolean>;
package/dist/dotns.js CHANGED
@@ -38,10 +38,10 @@ import {
38
38
  stripTrailingDigits,
39
39
  validateDomainLabel,
40
40
  verifyNonceAdvanced
41
- } from "./chunk-6J7JPZJS.js";
41
+ } from "./chunk-BR2EQ2X3.js";
42
42
  import "./chunk-4TS6R26J.js";
43
- import "./chunk-VYJAVVT6.js";
44
- import "./chunk-IU4BYHQS.js";
43
+ import "./chunk-GGHSZZZ3.js";
44
+ import "./chunk-CD27FW4F.js";
45
45
  import "./chunk-QGM4M3NI.js";
46
46
  export {
47
47
  CONNECTION_TIMEOUT_MS,
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export { ChainProbeOptions, ChunkProbeResult, probeChunks } from './chunk-probe.
7
7
  export { finaliseEmbeddedManifest, writeEmbeddedManifestPlaceholder } from './manifest-embed.js';
8
8
  export { FetchOptions, FetchOutcome, fetchPreviousManifest } from './manifest-fetch.js';
9
9
  export { ComputeStatsInput, IncrementalStats, computeStats, renderSummary, telemetryAttributes } from './incremental-stats.js';
10
+ export { Chain, ChainEndpoint, DEFAULT_ENV_ID, Environment, EnvironmentListing, EnvironmentsDoc, EnvironmentsSource, LoadOptions, LoadResult, ResolvedEndpoints, defaultBundledPath, formatEnvironmentTable, listEnvironments, loadEnvironments, resolveEndpoints } from './environments.js';
10
11
  export { RunState, RunStatus, VERSION, loadRunState, probablyOomRssMb, resolveStateDir, shouldShowOomHint, shouldSkipStaleWarning, stateFilePath, writeRunState } from './run-state.js';
11
12
  export { shouldMirrorToPaseoNextV2 } from './mirror.js';
12
13
  import 'multiformats/cid';
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  deploy,
6
6
  merkleizeJS,
7
7
  merkleizeWithStableOrder
8
- } from "./chunk-HALS6ZKT.js";
8
+ } from "./chunk-UVIG5UAV.js";
9
9
  import {
10
10
  computeStats,
11
11
  renderSummary,
@@ -27,16 +27,16 @@ import {
27
27
  isVolatilePath,
28
28
  parseManifest
29
29
  } from "./chunk-S7EM5VMW.js";
30
- import "./chunk-V55BGOBX.js";
31
- import "./chunk-LHMJZC5E.js";
30
+ import "./chunk-EZUICRCA.js";
31
+ import "./chunk-6LODTEG3.js";
32
32
  import {
33
33
  probeChunks
34
- } from "./chunk-SG22GVKX.js";
34
+ } from "./chunk-GNVDLLZI.js";
35
35
  import "./chunk-C2TS5MER.js";
36
36
  import {
37
37
  DotNS,
38
38
  parseDomainName
39
- } from "./chunk-6J7JPZJS.js";
39
+ } from "./chunk-BR2EQ2X3.js";
40
40
  import {
41
41
  bootstrapPool,
42
42
  derivePoolAccounts,
@@ -44,7 +44,7 @@ import {
44
44
  fetchPoolAuthorizations,
45
45
  selectAccount
46
46
  } from "./chunk-4TS6R26J.js";
47
- import "./chunk-VYJAVVT6.js";
47
+ import "./chunk-GGHSZZZ3.js";
48
48
  import {
49
49
  VERSION,
50
50
  loadRunState,
@@ -54,12 +54,20 @@ import {
54
54
  shouldSkipStaleWarning,
55
55
  stateFilePath,
56
56
  writeRunState
57
- } from "./chunk-IU4BYHQS.js";
58
- import "./chunk-HUT7ZGRQ.js";
57
+ } from "./chunk-CD27FW4F.js";
58
+ import {
59
+ DEFAULT_ENV_ID,
60
+ defaultBundledPath,
61
+ formatEnvironmentTable,
62
+ listEnvironments,
63
+ loadEnvironments,
64
+ resolveEndpoints
65
+ } from "./chunk-HUT7ZGRQ.js";
59
66
  import "./chunk-ZOC4GITL.js";
60
67
  import "./chunk-HOTQDYHD.js";
61
68
  import "./chunk-QGM4M3NI.js";
62
69
  export {
70
+ DEFAULT_ENV_ID,
63
71
  DotNS,
64
72
  MANIFEST_DIR,
65
73
  MANIFEST_FILENAME,
@@ -69,13 +77,17 @@ export {
69
77
  bootstrapPool,
70
78
  classifyFile,
71
79
  computeStats,
80
+ defaultBundledPath,
72
81
  deploy,
73
82
  derivePoolAccounts,
74
83
  ensureAuthorized,
75
84
  fetchPoolAuthorizations,
76
85
  fetchPreviousManifest,
77
86
  finaliseEmbeddedManifest,
87
+ formatEnvironmentTable,
78
88
  isVolatilePath,
89
+ listEnvironments,
90
+ loadEnvironments,
79
91
  loadRunState,
80
92
  merkleizeJS,
81
93
  merkleizeWithStableOrder,
@@ -84,6 +96,7 @@ export {
84
96
  probablyOomRssMb,
85
97
  probeChunks,
86
98
  renderSummary,
99
+ resolveEndpoints,
87
100
  resolveStateDir,
88
101
  selectAccount,
89
102
  shouldMirrorToPaseoNextV2,
@@ -5,8 +5,8 @@ import {
5
5
  maybeWriteMemoryReport,
6
6
  safeHeap,
7
7
  sampleFromBytes
8
- } from "./chunk-VYJAVVT6.js";
9
- import "./chunk-IU4BYHQS.js";
8
+ } from "./chunk-GGHSZZZ3.js";
9
+ import "./chunk-CD27FW4F.js";
10
10
  import "./chunk-QGM4M3NI.js";
11
11
  export {
12
12
  DEFAULT_THRESHOLD_MB,
package/dist/merkle.js CHANGED
@@ -6,19 +6,19 @@ import {
6
6
  merkleizeKuboBackend,
7
7
  merkleizeWithStableOrder,
8
8
  rebuildOrderedCarFromBytes
9
- } from "./chunk-HALS6ZKT.js";
9
+ } from "./chunk-UVIG5UAV.js";
10
10
  import "./chunk-MJTQOXBC.js";
11
11
  import "./chunk-KOSF5FDO.js";
12
12
  import "./chunk-5MRZ3V4A.js";
13
13
  import "./chunk-S7EM5VMW.js";
14
- import "./chunk-V55BGOBX.js";
15
- import "./chunk-LHMJZC5E.js";
16
- import "./chunk-SG22GVKX.js";
14
+ import "./chunk-EZUICRCA.js";
15
+ import "./chunk-6LODTEG3.js";
16
+ import "./chunk-GNVDLLZI.js";
17
17
  import "./chunk-C2TS5MER.js";
18
- import "./chunk-6J7JPZJS.js";
18
+ import "./chunk-BR2EQ2X3.js";
19
19
  import "./chunk-4TS6R26J.js";
20
- import "./chunk-VYJAVVT6.js";
21
- import "./chunk-IU4BYHQS.js";
20
+ import "./chunk-GGHSZZZ3.js";
21
+ import "./chunk-CD27FW4F.js";
22
22
  import "./chunk-HUT7ZGRQ.js";
23
23
  import "./chunk-ZOC4GITL.js";
24
24
  import "./chunk-HOTQDYHD.js";
package/dist/run-state.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  shouldSkipStaleWarning,
8
8
  stateFilePath,
9
9
  writeRunState
10
- } from "./chunk-IU4BYHQS.js";
10
+ } from "./chunk-CD27FW4F.js";
11
11
  import "./chunk-QGM4M3NI.js";
12
12
  export {
13
13
  VERSION,
package/dist/telemetry.js CHANGED
@@ -28,8 +28,8 @@ import {
28
28
  truncateAddress,
29
29
  withDeploySpan,
30
30
  withSpan
31
- } from "./chunk-VYJAVVT6.js";
32
- import "./chunk-IU4BYHQS.js";
31
+ } from "./chunk-GGHSZZZ3.js";
32
+ import "./chunk-CD27FW4F.js";
33
33
  import "./chunk-QGM4M3NI.js";
34
34
  export {
35
35
  VERSION,
@@ -9,9 +9,9 @@ import {
9
9
  isPreReleaseVersion,
10
10
  preReleaseWarning,
11
11
  promptYesNo
12
- } from "./chunk-LHMJZC5E.js";
13
- import "./chunk-VYJAVVT6.js";
14
- import "./chunk-IU4BYHQS.js";
12
+ } from "./chunk-6LODTEG3.js";
13
+ import "./chunk-GGHSZZZ3.js";
14
+ import "./chunk-CD27FW4F.js";
15
15
  import "./chunk-QGM4M3NI.js";
16
16
  export {
17
17
  assessVersion,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bulletin-deploy",
3
- "version": "0.7.20-rc.4",
3
+ "version": "0.7.20",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",