@parity/product-deploy 0.8.3-rc.8 → 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.
Files changed (59) hide show
  1. package/LICENSE +674 -201
  2. package/README.md +59 -2
  3. package/assets/environments.json +0 -1
  4. package/bin/bulletin-deploy +21 -1
  5. package/dist/auth/index.d.ts +2 -3
  6. package/dist/auth/index.js +2 -1
  7. package/dist/auth/vendor/index.d.ts +2 -3
  8. package/dist/auth/vendor/index.js +2 -1
  9. package/dist/auth/vendor/ui/index.d.ts +1 -2
  10. package/dist/auth-C-Pel0AT.d.ts +235 -0
  11. package/dist/auth-config.d.ts +30 -8
  12. package/dist/auth-config.js +14 -6
  13. package/dist/bug-report.js +4 -4
  14. package/dist/{chunk-YXGNQZZF.js → chunk-2SR5D4CP.js} +19 -15
  15. package/dist/{chunk-OFVBJOFB.js → chunk-6NW5M3F5.js} +9 -20
  16. package/dist/{chunk-7DGFJC6E.js → chunk-DHY2ZXVZ.js} +81 -42
  17. package/dist/chunk-G56VYTUD.js +75 -0
  18. package/dist/{chunk-5K3RI5C2.js → chunk-GL3U7K2B.js} +0 -1
  19. package/dist/{chunk-327NAPBD.js → chunk-H4LWILH4.js} +32 -6
  20. package/dist/chunk-J7CYVTAW.js +43 -0
  21. package/dist/{chunk-WHMNBSG7.js → chunk-LCKLYFAZ.js} +5 -4
  22. package/dist/{chunk-3OWKSL7K.js → chunk-NP4SLURL.js} +1 -1
  23. package/dist/{chunk-T4PAK4YK.js → chunk-O2NWQLYB.js} +2 -2
  24. package/dist/{chunk-RPU72Z4B.js → chunk-RD2QHYTL.js} +242 -36
  25. package/dist/{chunk-EGNMZHMR.js → chunk-WZBAQCA5.js} +15 -4
  26. package/dist/{chunk-YOQLRCQV.js → chunk-YIKGVALU.js} +3 -3
  27. package/dist/chunk-probe.js +3 -3
  28. package/dist/commands/login.d.ts +34 -9
  29. package/dist/commands/login.js +186 -30
  30. package/dist/commands/logout.d.ts +1 -2
  31. package/dist/commands/logout.js +5 -3
  32. package/dist/commands/whoami.d.ts +1 -2
  33. package/dist/commands/whoami.js +7 -4
  34. package/dist/deploy.d.ts +19 -4
  35. package/dist/deploy.js +14 -9
  36. package/dist/dotns.d.ts +7 -0
  37. package/dist/dotns.js +4 -4
  38. package/dist/environments.js +1 -1
  39. package/dist/index.js +11 -10
  40. package/dist/manifest/publish.js +11 -10
  41. package/dist/manifest/types.d.ts +1 -1
  42. package/dist/memory-report.js +2 -2
  43. package/dist/merkle.js +10 -9
  44. package/dist/personhood/bootstrap.js +10 -10
  45. package/dist/personhood/people-client.js +4 -4
  46. package/dist/run-state.js +1 -1
  47. package/dist/{signer-CriGqahj.d.ts → signer-vR6KKC7V.d.ts} +1 -1
  48. package/dist/spinner.d.ts +21 -0
  49. package/dist/spinner.js +6 -0
  50. package/dist/sss-allowance.d.ts +29 -0
  51. package/dist/sss-allowance.js +8 -0
  52. package/dist/storage-signer.d.ts +94 -2
  53. package/dist/storage-signer.js +18 -9
  54. package/dist/telemetry.js +2 -2
  55. package/dist/version-check.d.ts +0 -3
  56. package/dist/version-check.js +3 -3
  57. package/package.json +19 -15
  58. package/dist/allocations-B65Is4Md.d.ts +0 -97
  59. package/dist/auth-DkRZBK-T.d.ts +0 -122
@@ -1,12 +1,11 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-WHMNBSG7.js";
3
+ } from "./chunk-LCKLYFAZ.js";
4
4
 
5
5
  // src/version-check.ts
6
6
  import { execSync, execFileSync } from "child_process";
7
7
  import { createInterface } from "readline";
8
8
  var REGISTRY_URL = "https://registry.npmjs.org/bulletin-deploy/latest";
9
- var KILL_SWITCH_URL = "https://raw.githubusercontent.com/paritytech/triangle-deploy/main/min-version.json";
10
9
  var FETCH_TIMEOUT = 3e3;
11
10
  function checkNodeVersion(enginesNode, currentVersion) {
12
11
  const match = enginesNode.match(/(\d+)/);
@@ -58,26 +57,18 @@ async function fetchJson(url) {
58
57
  }
59
58
  }
60
59
  async function fetchVersionInfo() {
61
- const [registry, killSwitch] = await Promise.all([
62
- fetchJson(REGISTRY_URL),
63
- fetchJson(KILL_SWITCH_URL)
64
- ]);
65
- if (!registry && !killSwitch) return null;
60
+ const registry = await fetchJson(REGISTRY_URL);
61
+ if (!registry) return null;
66
62
  return {
67
- latest: registry?.version ?? VERSION,
68
- minimumFromRegistry: registry?.minimumVersion ?? null,
69
- minimumFromKillSwitch: killSwitch?.minimumVersion ?? null,
70
- killSwitchMessage: killSwitch?.message ?? null
63
+ latest: registry.version ?? VERSION,
64
+ minimumFromRegistry: registry.minimumVersion ?? null
71
65
  };
72
66
  }
73
67
  function handlePreflightVersionCheck(info) {
74
68
  if (!info) return "ok";
75
- const effectiveMinimum = [info.minimumFromRegistry, info.minimumFromKillSwitch].filter(Boolean).sort((a, b) => compareSemver(b, a))[0] ?? null;
76
- if (effectiveMinimum && compareSemver(VERSION, effectiveMinimum) < 0) {
69
+ if (info.minimumFromRegistry && compareSemver(VERSION, info.minimumFromRegistry) < 0) {
77
70
  console.error(`
78
- bulletin-deploy ${VERSION} is no longer supported (minimum: ${effectiveMinimum}).`);
79
- const ks = info.killSwitchMessage;
80
- if (ks) console.error(` Reason: ${ks}`);
71
+ bulletin-deploy ${VERSION} is no longer supported (minimum: ${info.minimumFromRegistry}).`);
81
72
  console.error(` Please update: npm install -g bulletin-deploy@latest
82
73
  `);
83
74
  return "abort";
@@ -165,9 +156,8 @@ function classifyErrorArea(msg) {
165
156
  return null;
166
157
  }
167
158
  function assessVersion(currentVersion, info, internal) {
168
- const effectiveMinimum = [info.minimumFromRegistry, info.minimumFromKillSwitch].filter(Boolean).sort((a, b) => compareSemver(b, a))[0] ?? null;
169
- if (effectiveMinimum && compareSemver(currentVersion, effectiveMinimum) < 0) {
170
- return { action: "forced_update", currentVersion, minimumVersion: effectiveMinimum, message: info.killSwitchMessage };
159
+ if (info.minimumFromRegistry && compareSemver(currentVersion, info.minimumFromRegistry) < 0) {
160
+ return { action: "forced_update", currentVersion, minimumVersion: info.minimumFromRegistry };
171
161
  }
172
162
  if (compareSemver(currentVersion, info.latest) < 0) {
173
163
  return { action: "suggest_update", currentVersion, latestVersion: info.latest, internal };
@@ -190,7 +180,6 @@ async function handleFailedDeploy(error) {
190
180
  case "forced_update":
191
181
  console.error(`
192
182
  bulletin-deploy ${verdict.currentVersion} is no longer supported (minimum: ${verdict.minimumVersion}).`);
193
- if (verdict.message) console.error(` Reason: ${verdict.message}`);
194
183
  console.error(` Please update: npm install -g bulletin-deploy@latest
195
184
  `);
196
185
  break;
@@ -1,6 +1,10 @@
1
+ import {
2
+ NonRetryableError
3
+ } from "./chunk-ZOC4GITL.js";
4
+
1
5
  // src/auth/vendor/auth.ts
2
6
  import { readdir, unlink } from "fs/promises";
3
- import { homedir } from "os";
7
+ import { homedir, platform, release } from "os";
4
8
  import { join } from "path";
5
9
  import { deriveH160, ss58Encode } from "@parity/product-sdk-address";
6
10
  import {
@@ -33,22 +37,49 @@ function createSessionSigner(session, ref) {
33
37
  extra: value,
34
38
  additionalSigned
35
39
  }));
36
- const result = await session.createTransaction({
37
- payload: {
38
- tag: "v1",
39
- value: {
40
- signer: productAccountId,
41
- genesisHash,
42
- callData,
43
- extensions,
44
- txExtVersion: 0
45
- }
40
+ let noAllowanceMsg = null;
41
+ const origErr = console.error;
42
+ console.error = (...args) => {
43
+ const msg = args.map(String).join(" ");
44
+ if (msg.includes("NoAllowanceError") || msg.includes("no allowance set")) {
45
+ noAllowanceMsg = msg;
46
+ return;
46
47
  }
47
- });
48
- if (result.isErr()) {
49
- throw new Error(`Mobile signing rejected: ${result.error.message}`);
48
+ origErr(...args);
49
+ };
50
+ let clearPoll = null;
51
+ try {
52
+ const result = await Promise.race([
53
+ session.createTransaction({
54
+ payload: {
55
+ tag: "v1",
56
+ value: {
57
+ signer: productAccountId,
58
+ genesisHash,
59
+ callData,
60
+ extensions,
61
+ txExtVersion: 0
62
+ }
63
+ }
64
+ }),
65
+ new Promise((_, reject) => {
66
+ clearPoll = setInterval(() => {
67
+ if (noAllowanceMsg) {
68
+ reject(new NonRetryableError(
69
+ "Session signing allowance has expired (~2-3 days after login). Run `bulletin-deploy login` to renew."
70
+ ));
71
+ }
72
+ }, 200);
73
+ })
74
+ ]);
75
+ if (result.isErr()) {
76
+ throw new Error(`Mobile signing rejected: ${result.error.message}`);
77
+ }
78
+ return result.value;
79
+ } finally {
80
+ if (clearPoll !== null) clearInterval(clearPoll);
81
+ console.error = origErr;
50
82
  }
51
- return result.value;
52
83
  };
53
84
  const signBytes = async (data) => {
54
85
  const result = await session.signRaw({
@@ -64,22 +95,18 @@ function createSessionSigner(session, ref) {
64
95
  }
65
96
 
66
97
  // src/auth/vendor/allocations.ts
98
+ import {
99
+ requestResourceAllocation as terminalRequestResourceAllocation
100
+ } from "@parity/product-sdk-terminal/host";
67
101
  var DEFAULT_RESOURCES = [
68
102
  { tag: "BulletInAllowance", value: void 0 },
69
103
  { tag: "StatementStoreAllowance", value: void 0 },
70
104
  // derivation index 0 = the default product account.
71
105
  { tag: "SmartContractAllowance", value: 0 }
72
106
  ];
73
- async function requestResourceAllocation(session, productId, resources = DEFAULT_RESOURCES, onExisting = "Ignore") {
74
- const result = await session.requestResourceAllocation({
75
- callingProductId: productId,
76
- resources,
77
- onExisting
78
- });
79
- if (result.isErr()) {
80
- throw new Error(`Resource allocation request failed: ${result.error.message}`);
81
- }
82
- return result.value;
107
+ async function requestResourceAllocation(session, adapter, resources = DEFAULT_RESOURCES, onExisting = "Ignore") {
108
+ const outcomes = await terminalRequestResourceAllocation(session, adapter, resources, { onExisting });
109
+ return outcomes;
83
110
  }
84
111
  function summarizeOutcomes(outcomes, resources) {
85
112
  const granted = [];
@@ -102,8 +129,13 @@ function createAuthClient(config) {
102
129
  function createAdapter() {
103
130
  return createTerminalAdapter({
104
131
  appId: config.dappId,
105
- metadataUrl: config.metadataUrl,
106
- endpoints: config.peopleEndpoints
132
+ endpoints: config.peopleEndpoints,
133
+ hostMetadata: {
134
+ hostName: config.hostName,
135
+ hostVersion: config.hostVersion,
136
+ platformType: platform(),
137
+ platformVersion: release()
138
+ }
107
139
  });
108
140
  }
109
141
  function deriveSessionAddresses(session) {
@@ -135,6 +167,8 @@ function createAuthClient(config) {
135
167
  const sessions = await waitForSessions(adapter);
136
168
  if (sessions.length > 0) {
137
169
  const addresses = deriveSessionAddresses(sessions[0]);
170
+ adapter.destroy().catch(() => {
171
+ });
138
172
  return { kind: "existing", address: addresses.productAddress, addresses };
139
173
  }
140
174
  const authPromise = adapter.sso.authenticate();
@@ -183,7 +217,7 @@ function createAuthClient(config) {
183
217
  }
184
218
  });
185
219
  let authenticated = false;
186
- let address = null;
220
+ let handle = null;
187
221
  try {
188
222
  const result = await authPromise;
189
223
  result.match(
@@ -199,8 +233,8 @@ function createAuthClient(config) {
199
233
  if (authenticated) {
200
234
  const sessions = await waitForSessions(adapter, 3e3);
201
235
  if (sessions.length > 0) {
202
- const addresses = deriveSessionAddresses(sessions[0]);
203
- address = addresses.productAddress;
236
+ handle = buildSessionHandle(adapter, sessions[0]);
237
+ const { address, addresses } = handle;
204
238
  onStatus({ step: "success", address, addresses });
205
239
  } else {
206
240
  onStatus({
@@ -212,17 +246,9 @@ function createAuthClient(config) {
212
246
  } finally {
213
247
  unsubPairing();
214
248
  }
215
- return address;
249
+ return handle;
216
250
  }
217
- async function getSessionSigner() {
218
- const adapter = createAdapter();
219
- const sessions = await waitForSessions(adapter, 3e3);
220
- if (sessions.length === 0) {
221
- adapter.destroy().catch(() => {
222
- });
223
- return null;
224
- }
225
- const session = sessions[0];
251
+ function buildSessionHandle(adapter, session) {
226
252
  const signer = createSigner(session);
227
253
  const addresses = deriveSessionAddresses(session);
228
254
  let destroyed = false;
@@ -237,11 +263,22 @@ function createAuthClient(config) {
237
263
  addresses,
238
264
  signer,
239
265
  userSession: session,
266
+ adapter,
240
267
  destroy
241
268
  };
242
269
  }
243
- async function requestAllocation(session, resources = DEFAULT_RESOURCES, onExisting = "Ignore") {
244
- return requestResourceAllocation(session, config.productId, resources, onExisting);
270
+ async function getSessionSigner() {
271
+ const adapter = createAdapter();
272
+ const sessions = await waitForSessions(adapter, 3e3);
273
+ if (sessions.length === 0) {
274
+ adapter.destroy().catch(() => {
275
+ });
276
+ return null;
277
+ }
278
+ return buildSessionHandle(adapter, sessions[0]);
279
+ }
280
+ async function requestAllocation(session, adapter, resources = DEFAULT_RESOURCES, onExisting = "Ignore") {
281
+ return requestResourceAllocation(session, adapter, resources, onExisting);
245
282
  }
246
283
  async function findSession() {
247
284
  const adapter = createAdapter();
@@ -261,6 +298,8 @@ function createAuthClient(config) {
261
298
  const { adapter, address, session } = handle;
262
299
  try {
263
300
  onStatus({ step: "disconnecting", address });
301
+ await Promise.resolve(session.abortPendingRequests()).catch(() => {
302
+ });
264
303
  const result = await adapter.sessions.disconnect(session);
265
304
  if (result.isOk()) {
266
305
  await clearLocalAppStorage();
@@ -0,0 +1,75 @@
1
+ // src/sss-allowance.ts
2
+ import WebSocket from "ws";
3
+ var SSS_PREFIX = new TextEncoder().encode(":statement_allowance:");
4
+ function sssStorageKey(pubkey) {
5
+ if (pubkey.length !== 32) {
6
+ throw new Error(`SSS storage key requires a 32-byte public key, got ${pubkey.length} bytes`);
7
+ }
8
+ const full = new Uint8Array(SSS_PREFIX.length + pubkey.length);
9
+ full.set(SSS_PREFIX, 0);
10
+ full.set(pubkey, SSS_PREFIX.length);
11
+ return "0x" + Buffer.from(full).toString("hex");
12
+ }
13
+ function checkSSSAllowance(pubkey, peopleEndpoints, timeoutMs = 5e3) {
14
+ return new Promise((resolve) => {
15
+ const endpoint = peopleEndpoints[0];
16
+ if (!endpoint) {
17
+ resolve(null);
18
+ return;
19
+ }
20
+ let settled = false;
21
+ let timer = null;
22
+ function done(value) {
23
+ if (settled) return;
24
+ settled = true;
25
+ if (timer !== null) clearTimeout(timer);
26
+ try {
27
+ ws.terminate();
28
+ } catch {
29
+ }
30
+ resolve(value);
31
+ }
32
+ let ws;
33
+ try {
34
+ ws = new WebSocket(endpoint);
35
+ } catch {
36
+ resolve(null);
37
+ return;
38
+ }
39
+ timer = setTimeout(() => done(null), timeoutMs);
40
+ ws.on("error", () => done(null));
41
+ ws.on("open", () => {
42
+ let storageKey;
43
+ try {
44
+ storageKey = sssStorageKey(pubkey);
45
+ } catch {
46
+ done(null);
47
+ return;
48
+ }
49
+ const request = JSON.stringify({
50
+ jsonrpc: "2.0",
51
+ id: 1,
52
+ method: "state_getStorage",
53
+ params: [storageKey]
54
+ });
55
+ ws.send(request, (err) => {
56
+ if (err) done(null);
57
+ });
58
+ });
59
+ ws.on("message", (data) => {
60
+ try {
61
+ const msg = JSON.parse(data.toString());
62
+ const result = msg.result;
63
+ const present = result != null && result !== "0x";
64
+ done(present);
65
+ } catch {
66
+ done(null);
67
+ }
68
+ });
69
+ });
70
+ }
71
+
72
+ export {
73
+ sssStorageKey,
74
+ checkSSSAllowance
75
+ };
@@ -108,7 +108,6 @@ var environments_default = {
108
108
  e2eEligible: true,
109
109
  backend: "https://identity-backend-next.parity-testnet.parity.io",
110
110
  ipfs: "https://paseo-bulletin-next-ipfs.polkadot.io",
111
- docsUrl: "https://sre.teleport.parity.io/environments/paseo-next/",
112
111
  autoAccountMapping: true,
113
112
  nativeToEthRatio: 1e8,
114
113
  registerStorageDeposit: 2e12,
@@ -1,17 +1,28 @@
1
+ import {
2
+ VERSION
3
+ } from "./chunk-LCKLYFAZ.js";
1
4
  import {
2
5
  loadEnvironments
3
- } from "./chunk-5K3RI5C2.js";
6
+ } from "./chunk-GL3U7K2B.js";
4
7
 
5
8
  // src/auth-config.ts
6
- import { existsSync } from "fs";
9
+ import { existsSync, readdirSync } from "fs";
7
10
  import { homedir } from "os";
8
11
  import { join } from "path";
9
12
  var DOT_DAPP_ID = "dot-cli";
10
13
  var DOT_PRODUCT_ID = "playground.dot";
11
14
  var DOT_DERIVATION_INDEX = 0;
12
- var DOT_TERMINAL_METADATA_URL = "https://gist.githubusercontent.com/ReinhardHatko/1967dd3f4afe78683cc0ba14d6ec8744/raw/c1625eb7ed7671b7e09a3fa2a25998dde33c70b8/metadata.json";
15
+ var DOT_HOST_NAME = "bulletin-deploy";
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.';
13
17
  function hasPersistedSession() {
14
- return existsSync(join(homedir(), ".polkadot-apps", `${DOT_DAPP_ID}_SsoSessions.json`));
18
+ const dir = join(homedir(), ".polkadot-apps");
19
+ if (!existsSync(dir)) return false;
20
+ const prefix = `${DOT_DAPP_ID}_SsoSessions`;
21
+ try {
22
+ return readdirSync(dir).some((f) => f.startsWith(prefix) && f.endsWith(".json"));
23
+ } catch {
24
+ return false;
25
+ }
15
26
  }
16
27
  function buildAuthConfig(doc, envId) {
17
28
  const peopleChain = doc.chains.find((c) => c.id === "people");
@@ -31,10 +42,22 @@ function buildAuthConfig(doc, envId) {
31
42
  dappId: DOT_DAPP_ID,
32
43
  productId: DOT_PRODUCT_ID,
33
44
  derivationIndex: DOT_DERIVATION_INDEX,
34
- metadataUrl: DOT_TERMINAL_METADATA_URL,
45
+ hostName: DOT_HOST_NAME,
46
+ hostVersion: VERSION,
35
47
  peopleEndpoints
36
48
  };
37
49
  }
50
+ function resolveBulletinEndpoints(doc, envId) {
51
+ const bulletinChain = doc.chains.find((c) => c.id === "bulletin");
52
+ const endpoint = bulletinChain?.endpoints[envId];
53
+ if (!endpoint) return null;
54
+ return Array.isArray(endpoint.wss) ? endpoint.wss : [endpoint.wss];
55
+ }
56
+ async function getPeopleChainEndpoints(envId) {
57
+ const { doc } = await loadEnvironments();
58
+ const config = buildAuthConfig(doc, envId);
59
+ return config.peopleEndpoints;
60
+ }
38
61
  async function getAuthClient(envId) {
39
62
  const { createAuthClient } = await import("./auth/index.js");
40
63
  const { doc } = await loadEnvironments();
@@ -45,8 +68,11 @@ export {
45
68
  DOT_DAPP_ID,
46
69
  DOT_PRODUCT_ID,
47
70
  DOT_DERIVATION_INDEX,
48
- DOT_TERMINAL_METADATA_URL,
71
+ DOT_HOST_NAME,
72
+ STALE_SESSION_MESSAGE,
49
73
  hasPersistedSession,
50
74
  buildAuthConfig,
75
+ resolveBulletinEndpoints,
76
+ getPeopleChainEndpoints,
51
77
  getAuthClient
52
78
  };
@@ -0,0 +1,43 @@
1
+ // src/spinner.ts
2
+ var FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
3
+ var FRAME_MS = 120;
4
+ function startSpinner(label, stream = process.stdout) {
5
+ const start = Date.now();
6
+ if (!stream.isTTY) {
7
+ stream.write(` ${label}\u2026
8
+ `);
9
+ let stopped2 = false;
10
+ return {
11
+ stop(finalLine) {
12
+ if (stopped2) return;
13
+ stopped2 = true;
14
+ if (finalLine) stream.write(`${finalLine}
15
+ `);
16
+ }
17
+ };
18
+ }
19
+ let frame = 0;
20
+ const render = () => {
21
+ const elapsed = Math.round((Date.now() - start) / 1e3);
22
+ stream.write(`\r ${FRAMES[frame % FRAMES.length]} ${label}\u2026 (${elapsed}s)\x1B[K`);
23
+ frame++;
24
+ };
25
+ render();
26
+ const interval = setInterval(render, FRAME_MS);
27
+ interval.unref();
28
+ let stopped = false;
29
+ return {
30
+ stop(finalLine) {
31
+ if (stopped) return;
32
+ stopped = true;
33
+ clearInterval(interval);
34
+ stream.write("\r\x1B[K");
35
+ if (finalLine) stream.write(`${finalLine}
36
+ `);
37
+ }
38
+ };
39
+ }
40
+
41
+ export {
42
+ startSpinner
43
+ };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  package_default,
3
3
  writeRunState
4
- } from "./chunk-YXGNQZZF.js";
4
+ } from "./chunk-2SR5D4CP.js";
5
5
 
6
6
  // src/memory-report.ts
7
7
  import * as fs2 from "fs";
@@ -17,7 +17,6 @@ import * as path from "path";
17
17
  var VERSION = package_default.version;
18
18
  var DOTNS_BACKEND = "contract";
19
19
  var DOTNS_POP_SOURCE = "personhood-precompile";
20
- var DEFAULT_DSN = "https://e021c025d79c4c3ade2862a11f13c40b@o4511059872841728.ingest.de.sentry.io/4511093597405264";
21
20
  var INTERNAL_ORG_RE = /^(paritytech|w3f|polkadot-fellows)\//i;
22
21
  var PARITY_HOST_APPS = /* @__PURE__ */ new Set(["playground-cli"]);
23
22
  function extractRepoSlug(url) {
@@ -45,7 +44,7 @@ function isInternalContext() {
45
44
  hostApp: process.env.BULLETIN_DEPLOY_HOST_APP
46
45
  });
47
46
  }
48
- var OPT_OUT = process.env.BULLETIN_DEPLOY_TELEMETRY === "0";
47
+ var OPT_OUT = process.env.BULLETIN_DEPLOY_TELEMETRY === "0" || process.env.BULLETIN_DEPLOY_TELEMETRY === "off";
49
48
  var OPT_IN = process.env.BULLETIN_DEPLOY_TELEMETRY === "1";
50
49
  var DISABLED = OPT_OUT || !OPT_IN && !isInternalContext();
51
50
  var CONVENTIONAL_BRANCH_PREFIXES = /* @__PURE__ */ new Set([
@@ -117,8 +116,10 @@ function initTelemetry() {
117
116
  if (process.env.BULLETIN_DEPLOY_USE_AMBIENT_SENTRY === "1") {
118
117
  return;
119
118
  }
119
+ const dsn = process.env.SENTRY_DSN || (true ? "" : "");
120
+ if (!dsn) return;
120
121
  Sentry.init({
121
- dsn: process.env.SENTRY_DSN || DEFAULT_DSN,
122
+ dsn,
122
123
  release: `${package_default.name}@${VERSION}`,
123
124
  tracesSampleRate: 1,
124
125
  environment: process.env.CI ? "ci" : "local",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  captureWarning
3
- } from "./chunk-WHMNBSG7.js";
3
+ } from "./chunk-LCKLYFAZ.js";
4
4
 
5
5
  // src/chunk-probe.ts
6
6
  import { Twox128, Blake2128Concat, decAnyMetadata, unifyMetadata } from "@polkadot-api/substrate-bindings";
@@ -2,11 +2,11 @@ import {
2
2
  classifyErrorArea,
3
3
  isInteractive,
4
4
  promptYesNo
5
- } from "./chunk-OFVBJOFB.js";
5
+ } from "./chunk-6NW5M3F5.js";
6
6
  import {
7
7
  VERSION,
8
8
  getCurrentSentryTraceId
9
- } from "./chunk-WHMNBSG7.js";
9
+ } from "./chunk-LCKLYFAZ.js";
10
10
 
11
11
  // src/bug-report.ts
12
12
  import { execSync, execFileSync } from "child_process";