permaweb-deploy 1.1.9 → 1.1.10
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/dist/index.js +28 -42
- package/package.json +1 -1
- package/src/index.js +7 -6
package/dist/index.js
CHANGED
|
@@ -54,53 +54,38 @@ _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
|
54
54
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
55
55
|
while (1) switch (_context.prev = _context.next) {
|
|
56
56
|
case 0:
|
|
57
|
-
if (DEPLOY_KEY) {
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
if (!DEPLOY_KEY) {
|
|
58
|
+
console.error('DEPLOY_KEY not configured');
|
|
59
|
+
process.exit(1);
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
if (ANT_PROCESS) {
|
|
65
|
-
_context.next = 6;
|
|
66
|
-
break;
|
|
61
|
+
if (!ANT_PROCESS) {
|
|
62
|
+
console.error('ANT_PROCESS not configured');
|
|
63
|
+
process.exit(1);
|
|
67
64
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
if (!(argv.deployFolder.length == 0)) {
|
|
72
|
-
_context.next = 9;
|
|
73
|
-
break;
|
|
65
|
+
if (argv.deployFolder.length == 0) {
|
|
66
|
+
console.error('deploy folder must not be empty');
|
|
67
|
+
process.exit(1);
|
|
74
68
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (!(argv.undername.length == 0)) {
|
|
79
|
-
_context.next = 12;
|
|
80
|
-
break;
|
|
69
|
+
if (argv.undername.length == 0) {
|
|
70
|
+
console.error('undername must not be empty');
|
|
71
|
+
process.exit(1);
|
|
81
72
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
if (_fs["default"].existsSync(argv.deployFolder)) {
|
|
86
|
-
_context.next = 15;
|
|
87
|
-
break;
|
|
73
|
+
if (!_fs["default"].existsSync(argv.deployFolder)) {
|
|
74
|
+
console.error("deploy folder [".concat(argv.deployFolder, "] does not exist"));
|
|
75
|
+
process.exit(1);
|
|
88
76
|
}
|
|
89
|
-
console.error("deploy folder [".concat(argv.deployFolder, "] does not exist"));
|
|
90
|
-
return _context.abrupt("return");
|
|
91
|
-
case 15:
|
|
92
77
|
jwk = JSON.parse(Buffer.from(DEPLOY_KEY, 'base64').toString('utf-8'));
|
|
93
|
-
_context.prev =
|
|
94
|
-
_context.next =
|
|
78
|
+
_context.prev = 6;
|
|
79
|
+
_context.next = 9;
|
|
95
80
|
return (0, _turbo["default"])(argv, jwk);
|
|
96
|
-
case
|
|
81
|
+
case 9:
|
|
97
82
|
manifestId = _context.sent;
|
|
98
83
|
signer = new _sdk.ArweaveSigner(jwk);
|
|
99
84
|
ant = _sdk.ANT.init({
|
|
100
85
|
processId: ANT_PROCESS,
|
|
101
86
|
signer: signer
|
|
102
87
|
}); // Update the ANT record (assumes the JWK is a controller or owner)
|
|
103
|
-
_context.next =
|
|
88
|
+
_context.next = 14;
|
|
104
89
|
return ant.setRecord({
|
|
105
90
|
undername: argv.undername,
|
|
106
91
|
transactionId: manifestId,
|
|
@@ -114,17 +99,18 @@ _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
|
114
99
|
value: process.env.GITHUB_SHA
|
|
115
100
|
}] : []))
|
|
116
101
|
});
|
|
117
|
-
case
|
|
102
|
+
case 14:
|
|
118
103
|
console.log("Deployed TxId [".concat(manifestId, "] to ANT [").concat(ANT_PROCESS, "] using undername [").concat(argv.undername, "]"));
|
|
119
|
-
_context.next =
|
|
104
|
+
_context.next = 21;
|
|
120
105
|
break;
|
|
121
|
-
case
|
|
122
|
-
_context.prev =
|
|
123
|
-
_context.t0 = _context["catch"](
|
|
124
|
-
|
|
125
|
-
|
|
106
|
+
case 17:
|
|
107
|
+
_context.prev = 17;
|
|
108
|
+
_context.t0 = _context["catch"](6);
|
|
109
|
+
console.error('Deployment failed:', _context.t0);
|
|
110
|
+
process.exit(1); // Exit with error code
|
|
111
|
+
case 21:
|
|
126
112
|
case "end":
|
|
127
113
|
return _context.stop();
|
|
128
114
|
}
|
|
129
|
-
}, _callee, null, [[
|
|
115
|
+
}, _callee, null, [[6, 17]]);
|
|
130
116
|
}))();
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -44,27 +44,27 @@ export function getTagValue(list, name) {
|
|
|
44
44
|
(async () => {
|
|
45
45
|
if (!DEPLOY_KEY) {
|
|
46
46
|
console.error('DEPLOY_KEY not configured');
|
|
47
|
-
|
|
47
|
+
process.exit(1);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
if (!ANT_PROCESS) {
|
|
51
51
|
console.error('ANT_PROCESS not configured');
|
|
52
|
-
|
|
52
|
+
process.exit(1);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
if (argv.deployFolder.length == 0) {
|
|
56
56
|
console.error('deploy folder must not be empty');
|
|
57
|
-
|
|
57
|
+
process.exit(1);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
if (argv.undername.length == 0) {
|
|
61
61
|
console.error('undername must not be empty');
|
|
62
|
-
|
|
62
|
+
process.exit(1);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
if (!fs.existsSync(argv.deployFolder)) {
|
|
66
66
|
console.error(`deploy folder [${argv.deployFolder}] does not exist`);
|
|
67
|
-
|
|
67
|
+
process.exit(1);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
let jwk = JSON.parse(Buffer.from(DEPLOY_KEY, 'base64').toString('utf-8'));
|
|
@@ -95,6 +95,7 @@ export function getTagValue(list, name) {
|
|
|
95
95
|
|
|
96
96
|
console.log(`Deployed TxId [${manifestId}] to ANT [${ANT_PROCESS}] using undername [${argv.undername}]`);
|
|
97
97
|
} catch (e) {
|
|
98
|
-
|
|
98
|
+
console.error('Deployment failed:', e);
|
|
99
|
+
process.exit(1); // Exit with error code
|
|
99
100
|
}
|
|
100
101
|
})();
|