permaweb-deploy 1.1.2 → 1.1.3

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 CHANGED
@@ -52,27 +52,33 @@ _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
52
52
  console.error('ANT_PROCESS not configured');
53
53
  return _context.abrupt("return");
54
54
  case 6:
55
+ // Should allow optional (subdomain input, default to '@')
55
56
  jwk = JSON.parse(Buffer.from(DEPLOY_KEY, 'base64').toString('utf-8'));
56
57
  irys = new _sdk2["default"]({
57
58
  url: 'https://turbo.ardrive.io',
58
59
  token: 'arweave',
59
60
  key: jwk
60
61
  });
61
- _context.prev = 8;
62
+ irys.uploader.useChunking = false;
63
+ _context.prev = 9;
62
64
  console.log("Deploying ".concat(DEPLOY_FOLDER, " folder"));
63
- _context.next = 12;
65
+ _context.next = 13;
64
66
  return irys.uploadFolder(DEPLOY_FOLDER, {
65
- indexFile: 'index.html'
67
+ indexFile: 'index.html',
68
+ interactivePreflight: false,
69
+ logFunction: function logFunction(log) {
70
+ return console.log(log);
71
+ }
66
72
  });
67
- case 12:
73
+ case 13:
68
74
  txResult = _context.sent;
69
75
  console.log("Bundle TxId [".concat(txResult.id, "]"));
70
76
  signer = new _sdk.ArweaveSigner(jwk);
71
77
  ant = _sdk.ANT.init({
72
78
  processId: ANT_PROCESS,
73
79
  signer: signer
74
- });
75
- _context.next = 18;
80
+ }); // Update the ANT record (assumes the JWK is a controller or owner)
81
+ _context.next = 19;
76
82
  return ant.setRecord({
77
83
  undername: '@',
78
84
  transactionId: txResult.id,
@@ -81,17 +87,17 @@ _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
81
87
  name: 'GIT-HASH',
82
88
  value: process.env.GITHUB_SHA
83
89
  });
84
- case 18:
85
- console.log("Deployed to ANT [".concat(ANT_PROCESS, "]"));
86
- _context.next = 24;
90
+ case 19:
91
+ console.log("Deployed TxId [".concat(txResult.id, "] to ANT [").concat(ANT_PROCESS, "]"));
92
+ _context.next = 25;
87
93
  break;
88
- case 21:
89
- _context.prev = 21;
90
- _context.t0 = _context["catch"](8);
94
+ case 22:
95
+ _context.prev = 22;
96
+ _context.t0 = _context["catch"](9);
91
97
  console.error(_context.t0);
92
- case 24:
98
+ case 25:
93
99
  case "end":
94
100
  return _context.stop();
95
101
  }
96
- }, _callee, null, [[8, 21]]);
102
+ }, _callee, null, [[9, 22]]);
97
103
  }))();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "permaweb-deploy",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Permaweb app deployment package",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -10,9 +10,9 @@
10
10
  "permaweb-deploy": "./dist/index.js"
11
11
  },
12
12
  "dependencies": {
13
- "@irys/sdk": "0.1.0-a1",
14
- "@ar.io/sdk": "1.2.0-alpha.19",
15
- "yargs": "^17.7.2"
13
+ "@ar.io/sdk": "1.2.0",
14
+ "@irys/sdk": "0.1.1",
15
+ "yargs": "17.7.2"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@babel/cli": "^7.23.9",
package/src/index.js CHANGED
@@ -41,22 +41,28 @@ export function getTagValue(list, name) {
41
41
  return;
42
42
  }
43
43
 
44
+ // Should allow optional (subdomain input, default to '@')
45
+
44
46
  let jwk = JSON.parse(Buffer.from(DEPLOY_KEY, 'base64').toString('utf-8'));
45
47
 
46
48
  const irys = new Irys({ url: 'https://turbo.ardrive.io', token: 'arweave', key: jwk });
49
+ irys.uploader.useChunking = false;
47
50
 
48
51
  try {
49
52
  console.log(`Deploying ${DEPLOY_FOLDER} folder`);
50
53
 
51
54
  const txResult = await irys.uploadFolder(DEPLOY_FOLDER, {
52
55
  indexFile: 'index.html',
56
+ interactivePreflight: false,
57
+ logFunction: (log) => console.log(log),
53
58
  });
54
59
 
55
- console.log(`Bundle TxId [${txResult.id}]`)
60
+ console.log(`Bundle TxId [${txResult.id}]`);
56
61
 
57
62
  const signer = new ArweaveSigner(jwk);
58
63
  const ant = ANT.init({ processId: ANT_PROCESS, signer });
59
64
 
65
+ // Update the ANT record (assumes the JWK is a controller or owner)
60
66
  await ant.setRecord({
61
67
  undername: '@',
62
68
  transactionId: txResult.id,
@@ -65,7 +71,7 @@ export function getTagValue(list, name) {
65
71
  name: 'GIT-HASH', value: process.env.GITHUB_SHA,
66
72
  })
67
73
 
68
- console.log(`Deployed to ANT [${ANT_PROCESS}]`);
74
+ console.log(`Deployed TxId [${txResult.id}] to ANT [${ANT_PROCESS}]`);
69
75
  } catch (e) {
70
76
  console.error(e);
71
77
  }