bulletin-deploy 0.6.0 → 0.6.1
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 +201 -0
- package/bin/bulletin-deploy +11 -1
- package/cdm.json +75 -3
- package/dist/{chunk-EMQEE6KJ.js → chunk-5Q26TR27.js} +13 -8
- package/dist/{chunk-S5VOTF3L.js → chunk-CWGI2QOL.js} +7 -2
- package/dist/{chunk-JALS3N4S.js → chunk-MMJR6Z2H.js} +8 -5
- package/dist/deploy.d.ts +4 -0
- package/dist/deploy.js +3 -3
- package/dist/dotns.d.ts +2 -0
- package/dist/dotns.js +2 -2
- package/dist/index.js +3 -3
- package/dist/telemetry.d.ts +2 -1
- package/dist/telemetry.js +3 -1
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/bin/bulletin-deploy
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { deploy, DEFAULT_BULLETIN_RPC, DEFAULT_POOL_SIZE } from "../dist/deploy.js";
|
|
4
4
|
import { bootstrapPool } from "../dist/pool.js";
|
|
5
|
+
import { VERSION } from "../dist/telemetry.js";
|
|
5
6
|
import * as fs from "fs";
|
|
6
7
|
|
|
7
8
|
const args = process.argv.slice(2);
|
|
@@ -15,12 +16,20 @@ for (let i = 0; i < args.length; i++) {
|
|
|
15
16
|
else if (args[i] === "--rpc") { flags.rpc = args[++i]; }
|
|
16
17
|
else if (args[i] === "--password") { flags.password = args[++i]; }
|
|
17
18
|
else if (args[i] === "--playground") { flags.playground = true; }
|
|
19
|
+
else if (args[i] === "--version" || args[i] === "-V") { flags.version = true; }
|
|
18
20
|
else if (args[i] === "--help" || args[i] === "-h") { flags.help = true; }
|
|
19
21
|
else { positional.push(args[i]); }
|
|
20
22
|
}
|
|
21
23
|
|
|
24
|
+
if (flags.version) {
|
|
25
|
+
console.log(`bulletin-deploy v${VERSION}`);
|
|
26
|
+
process.exit(0);
|
|
27
|
+
}
|
|
28
|
+
|
|
22
29
|
if (flags.help || (positional.length === 0 && !flags.bootstrap)) {
|
|
23
|
-
console.log(`
|
|
30
|
+
console.log(`bulletin-deploy v${VERSION}
|
|
31
|
+
|
|
32
|
+
Usage:
|
|
24
33
|
bulletin-deploy <build-dir> <domain.dot> Deploy an app
|
|
25
34
|
bulletin-deploy --bootstrap Initialize pool accounts
|
|
26
35
|
|
|
@@ -30,6 +39,7 @@ Options:
|
|
|
30
39
|
--pool-size N Number of pool accounts (default: 10)
|
|
31
40
|
--password "..." Encrypt SPA content (users will be prompted to decrypt)
|
|
32
41
|
--playground Publish to the playground remix registry
|
|
42
|
+
--version Show version
|
|
33
43
|
--help Show this help`);
|
|
34
44
|
process.exit(0);
|
|
35
45
|
}
|
package/cdm.json
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"contracts": {
|
|
14
14
|
"acc2c3b5e912b762": {
|
|
15
15
|
"@example/playground-registry": {
|
|
16
|
-
"version":
|
|
17
|
-
"address": "
|
|
16
|
+
"version": 5,
|
|
17
|
+
"address": "0x150dCe6077E4546151919bF1d202419fe1131d9b",
|
|
18
18
|
"abi": [
|
|
19
19
|
{
|
|
20
20
|
"type": "constructor",
|
|
@@ -37,6 +37,66 @@
|
|
|
37
37
|
"outputs": [],
|
|
38
38
|
"stateMutability": "nonpayable"
|
|
39
39
|
},
|
|
40
|
+
{
|
|
41
|
+
"type": "function",
|
|
42
|
+
"name": "unpublish",
|
|
43
|
+
"inputs": [
|
|
44
|
+
{
|
|
45
|
+
"name": "domain",
|
|
46
|
+
"type": "string"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"outputs": [],
|
|
50
|
+
"stateMutability": "nonpayable"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "function",
|
|
54
|
+
"name": "rateApp",
|
|
55
|
+
"inputs": [
|
|
56
|
+
{
|
|
57
|
+
"name": "domain",
|
|
58
|
+
"type": "string"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "rating",
|
|
62
|
+
"type": "uint8"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "comment_uri",
|
|
66
|
+
"type": "string"
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"outputs": [],
|
|
70
|
+
"stateMutability": "nonpayable"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"type": "function",
|
|
74
|
+
"name": "removeRating",
|
|
75
|
+
"inputs": [
|
|
76
|
+
{
|
|
77
|
+
"name": "domain",
|
|
78
|
+
"type": "string"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "reviewer",
|
|
82
|
+
"type": "address"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"outputs": [],
|
|
86
|
+
"stateMutability": "nonpayable"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"type": "function",
|
|
90
|
+
"name": "getContextId",
|
|
91
|
+
"inputs": [],
|
|
92
|
+
"outputs": [
|
|
93
|
+
{
|
|
94
|
+
"name": "",
|
|
95
|
+
"type": "bytes32"
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"stateMutability": "view"
|
|
99
|
+
},
|
|
40
100
|
{
|
|
41
101
|
"type": "function",
|
|
42
102
|
"name": "getAppCount",
|
|
@@ -104,6 +164,18 @@
|
|
|
104
164
|
],
|
|
105
165
|
"stateMutability": "view"
|
|
106
166
|
},
|
|
167
|
+
{
|
|
168
|
+
"type": "function",
|
|
169
|
+
"name": "getSudo",
|
|
170
|
+
"inputs": [],
|
|
171
|
+
"outputs": [
|
|
172
|
+
{
|
|
173
|
+
"name": "",
|
|
174
|
+
"type": "address"
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
"stateMutability": "view"
|
|
178
|
+
},
|
|
107
179
|
{
|
|
108
180
|
"type": "function",
|
|
109
181
|
"name": "getMetadataUri",
|
|
@@ -149,7 +221,7 @@
|
|
|
149
221
|
"stateMutability": "view"
|
|
150
222
|
}
|
|
151
223
|
],
|
|
152
|
-
"metadataCid": "
|
|
224
|
+
"metadataCid": "bafk2bzaceaic2pcafqerskl6qxrhh7kylyqysnblynku4znebh4uinkbvihgg"
|
|
153
225
|
}
|
|
154
226
|
}
|
|
155
227
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
captureWarning,
|
|
3
3
|
withSpan
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CWGI2QOL.js";
|
|
5
5
|
|
|
6
6
|
// src/dotns.ts
|
|
7
7
|
import crypto from "crypto";
|
|
@@ -381,8 +381,6 @@ var DotNS = class {
|
|
|
381
381
|
}
|
|
382
382
|
async connect(options = {}) {
|
|
383
383
|
const endpoints = options.rpc ? [options.rpc] : process.env.DOTNS_RPC ? [process.env.DOTNS_RPC] : RPC_ENDPOINTS;
|
|
384
|
-
const source = options.keyUri || options.mnemonic || process.env.DOTNS_KEY_URI || process.env.DOTNS_MNEMONIC || process.env.MNEMONIC || DEFAULT_MNEMONIC;
|
|
385
|
-
const isKeyUri = Boolean(options.keyUri || process.env.DOTNS_KEY_URI);
|
|
386
384
|
let lastError;
|
|
387
385
|
for (const rpc of endpoints) {
|
|
388
386
|
try {
|
|
@@ -391,12 +389,19 @@ var DotNS = class {
|
|
|
391
389
|
this.client = createClient(getWsProvider(rpc));
|
|
392
390
|
const unsafeApi = this.client.getUnsafeApi();
|
|
393
391
|
this.clientWrapper = new ReviveClientWrapper(unsafeApi);
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
392
|
+
if (options.signer && options.signerAddress) {
|
|
393
|
+
this.signer = options.signer;
|
|
394
|
+
this.substrateAddress = options.signerAddress;
|
|
395
|
+
} else {
|
|
396
|
+
const source = options.keyUri || options.mnemonic || process.env.DOTNS_KEY_URI || process.env.DOTNS_MNEMONIC || process.env.MNEMONIC || DEFAULT_MNEMONIC;
|
|
397
|
+
const isKeyUri = Boolean(options.keyUri || process.env.DOTNS_KEY_URI);
|
|
398
|
+
await cryptoWaitReady();
|
|
399
|
+
const keyring = new Keyring({ type: "sr25519" });
|
|
400
|
+
const account = isKeyUri ? keyring.addFromUri(source) : keyring.addFromMnemonic(source);
|
|
401
|
+
this.substrateAddress = account.address;
|
|
402
|
+
this.signer = getPolkadotSigner(account.publicKey, "Sr25519", async (input) => account.sign(input));
|
|
403
|
+
}
|
|
398
404
|
this.evmAddress = await this.clientWrapper.getEvmAddress(this.substrateAddress);
|
|
399
|
-
this.signer = getPolkadotSigner(account.publicKey, "Sr25519", async (input) => account.sign(input));
|
|
400
405
|
this.connected = true;
|
|
401
406
|
console.log(` SS58 Address: ${this.substrateAddress}`);
|
|
402
407
|
console.log(` H160 Address: ${this.evmAddress}`);
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
import { execSync } from "child_process";
|
|
3
3
|
import * as fs from "fs";
|
|
4
4
|
import * as path from "path";
|
|
5
|
+
import { fileURLToPath } from "url";
|
|
6
|
+
var __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
var pkg = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "package.json"), "utf-8"));
|
|
8
|
+
var VERSION = pkg.version;
|
|
5
9
|
var DEFAULT_DSN = "https://e021c025d79c4c3ade2862a11f13c40b@o4509440811401216.ingest.de.sentry.io/4511093597405264";
|
|
6
10
|
var DISABLED = process.env.BULLETIN_DEPLOY_TELEMETRY === "0";
|
|
7
11
|
var Sentry = null;
|
|
@@ -31,8 +35,8 @@ function tryGitRemote() {
|
|
|
31
35
|
}
|
|
32
36
|
function tryPackageJsonRepo() {
|
|
33
37
|
try {
|
|
34
|
-
const
|
|
35
|
-
const repo = typeof
|
|
38
|
+
const pkg2 = JSON.parse(fs.readFileSync(path.join(process.cwd(), "package.json"), "utf-8"));
|
|
39
|
+
const repo = typeof pkg2.repository === "string" ? pkg2.repository : pkg2.repository?.url;
|
|
36
40
|
if (repo) return extractRepoSlug(repo);
|
|
37
41
|
} catch {
|
|
38
42
|
}
|
|
@@ -118,6 +122,7 @@ async function flush() {
|
|
|
118
122
|
}
|
|
119
123
|
|
|
120
124
|
export {
|
|
125
|
+
VERSION,
|
|
121
126
|
initTelemetry,
|
|
122
127
|
resolveRepo,
|
|
123
128
|
isExpectedError,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
DotNS,
|
|
4
4
|
TX_TIMEOUT_MS,
|
|
5
5
|
fetchNonce
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5Q26TR27.js";
|
|
7
7
|
import {
|
|
8
8
|
derivePoolAccounts,
|
|
9
9
|
ensureAuthorized,
|
|
@@ -11,12 +11,13 @@ import {
|
|
|
11
11
|
selectAccount
|
|
12
12
|
} from "./chunk-AIHW2WLO.js";
|
|
13
13
|
import {
|
|
14
|
+
VERSION,
|
|
14
15
|
captureWarning,
|
|
15
16
|
initTelemetry,
|
|
16
17
|
setDeployAttribute,
|
|
17
18
|
withDeploySpan,
|
|
18
19
|
withSpan
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-CWGI2QOL.js";
|
|
20
21
|
|
|
21
22
|
// src/deploy.ts
|
|
22
23
|
import { Buffer } from "buffer";
|
|
@@ -427,7 +428,7 @@ async function deploy(content, domainName = null, options = {}) {
|
|
|
427
428
|
let cid;
|
|
428
429
|
let ipfsCid;
|
|
429
430
|
console.log("\n" + "=".repeat(60));
|
|
430
|
-
console.log(
|
|
431
|
+
console.log(`DEPLOYING TO TESTNET v${VERSION}`);
|
|
431
432
|
console.log("=".repeat(60));
|
|
432
433
|
console.log(` Domain: ${name}.dot`);
|
|
433
434
|
if (typeof content === "string") console.log(` Build dir: ${path.resolve(content)}`);
|
|
@@ -513,7 +514,9 @@ async function deploy(content, domainName = null, options = {}) {
|
|
|
513
514
|
console.log("=".repeat(60));
|
|
514
515
|
await withSpan("deploy.dotns", "2. dotns", { "deploy.domain": name }, async () => {
|
|
515
516
|
const dotns = new DotNS();
|
|
516
|
-
await dotns.connect(
|
|
517
|
+
await dotns.connect(
|
|
518
|
+
options.signer && options.signerAddress ? { signer: options.signer, signerAddress: options.signerAddress } : options.mnemonic ? { mnemonic: options.mnemonic } : {}
|
|
519
|
+
);
|
|
517
520
|
const { owned, owner } = await dotns.checkOwnership(name);
|
|
518
521
|
if (owned) {
|
|
519
522
|
console.log(` Status: Already owned`);
|
|
@@ -546,7 +549,7 @@ async function deploy(content, domainName = null, options = {}) {
|
|
|
546
549
|
const metadataCid = await storeFile(metadataBytes, provider);
|
|
547
550
|
console.log(` Metadata CID: ${metadataCid}`);
|
|
548
551
|
const cdmJson = JSON.parse(fs.readFileSync(CDM_JSON_PATH, "utf-8"));
|
|
549
|
-
const { signer, origin } = getRegistrySigner(options.mnemonic);
|
|
552
|
+
const { signer, origin } = options.signer && options.signerAddress ? { signer: options.signer, origin: options.signerAddress } : getRegistrySigner(options.mnemonic);
|
|
550
553
|
console.log(` Publishing to registry as ${origin}...`);
|
|
551
554
|
const MAX_REGISTRY_RETRIES = 3;
|
|
552
555
|
for (let attempt = 1; attempt <= MAX_REGISTRY_RETRIES; attempt++) {
|
package/dist/deploy.d.ts
CHANGED
|
@@ -44,6 +44,10 @@ declare function storeDirectory(directoryPath: string, provider?: ExistingProvid
|
|
|
44
44
|
interface DeployOptions {
|
|
45
45
|
playground?: boolean;
|
|
46
46
|
mnemonic?: string;
|
|
47
|
+
/** Pre-built signer — skips mnemonic derivation. Use for QR/mobile signing. */
|
|
48
|
+
signer?: PolkadotSigner;
|
|
49
|
+
/** SS58 address for the signer (required when signer is provided). */
|
|
50
|
+
signerAddress?: string;
|
|
47
51
|
rpc?: string;
|
|
48
52
|
poolSize?: number;
|
|
49
53
|
password?: string;
|
package/dist/deploy.js
CHANGED
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
storeChunkedContent,
|
|
19
19
|
storeDirectory,
|
|
20
20
|
storeFile
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-MMJR6Z2H.js";
|
|
22
|
+
import "./chunk-5Q26TR27.js";
|
|
23
23
|
import "./chunk-AIHW2WLO.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-CWGI2QOL.js";
|
|
25
25
|
import "./chunk-QGM4M3NI.js";
|
|
26
26
|
export {
|
|
27
27
|
DEFAULT_BULLETIN_RPC,
|
package/dist/dotns.d.ts
CHANGED
package/dist/dotns.js
CHANGED
|
@@ -18,8 +18,8 @@ import {
|
|
|
18
18
|
sanitizeDomainLabel,
|
|
19
19
|
stripTrailingDigits,
|
|
20
20
|
validateDomainLabel
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-5Q26TR27.js";
|
|
22
|
+
import "./chunk-CWGI2QOL.js";
|
|
23
23
|
import "./chunk-QGM4M3NI.js";
|
|
24
24
|
export {
|
|
25
25
|
CONTRACTS,
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
deploy
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MMJR6Z2H.js";
|
|
4
4
|
import {
|
|
5
5
|
DotNS
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5Q26TR27.js";
|
|
7
7
|
import {
|
|
8
8
|
bootstrapPool,
|
|
9
9
|
derivePoolAccounts,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
fetchPoolAuthorizations,
|
|
12
12
|
selectAccount
|
|
13
13
|
} from "./chunk-AIHW2WLO.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-CWGI2QOL.js";
|
|
15
15
|
import "./chunk-QGM4M3NI.js";
|
|
16
16
|
export {
|
|
17
17
|
DotNS,
|
package/dist/telemetry.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
declare const VERSION: string;
|
|
1
2
|
declare function initTelemetry(): void;
|
|
2
3
|
declare function resolveRepo(domain: string): string;
|
|
3
4
|
declare function isExpectedError(msg: string): boolean;
|
|
@@ -7,4 +8,4 @@ declare function setDeployAttribute(key: string, value: string | number | boolea
|
|
|
7
8
|
declare function captureWarning(message: string, context?: Record<string, unknown>): void;
|
|
8
9
|
declare function flush(): Promise<void>;
|
|
9
10
|
|
|
10
|
-
export { captureWarning, flush, initTelemetry, isExpectedError, resolveRepo, setDeployAttribute, withDeploySpan, withSpan };
|
|
11
|
+
export { VERSION, captureWarning, flush, initTelemetry, isExpectedError, resolveRepo, setDeployAttribute, withDeploySpan, withSpan };
|
package/dist/telemetry.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
VERSION,
|
|
2
3
|
captureWarning,
|
|
3
4
|
flush,
|
|
4
5
|
initTelemetry,
|
|
@@ -7,9 +8,10 @@ import {
|
|
|
7
8
|
setDeployAttribute,
|
|
8
9
|
withDeploySpan,
|
|
9
10
|
withSpan
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CWGI2QOL.js";
|
|
11
12
|
import "./chunk-QGM4M3NI.js";
|
|
12
13
|
export {
|
|
14
|
+
VERSION,
|
|
13
15
|
captureWarning,
|
|
14
16
|
flush,
|
|
15
17
|
initTelemetry,
|