datagrok-tools 4.12.18 → 4.12.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.
- package/.eslintrc.json +43 -0
- package/bin/_deprecated/migrate.js +9 -9
- package/bin/_deprecated/upload.js +36 -36
- package/bin/commands/add.js +16 -29
- package/bin/commands/api.js +22 -21
- package/bin/commands/check.js +10 -12
- package/bin/commands/config.js +120 -140
- package/bin/commands/create.js +6 -11
- package/bin/commands/help.js +11 -5
- package/bin/commands/init.js +11 -13
- package/bin/commands/link.js +6 -7
- package/bin/commands/publish.js +220 -226
- package/bin/commands/test.js +184 -185
- package/bin/grok.js +3 -3
- package/bin/utils/color-utils.js +5 -10
- package/bin/utils/ent-helpers.js +2 -3
- package/bin/utils/func-generation.js +19 -20
- package/bin/utils/test-utils.js +140 -150
- package/bin/utils/utils.js +20 -41
- package/bin/validators/config-validator.js +1 -3
- package/package-template/ts.webpack.config.js +3 -3
- package/package-template/webpack.config.js +1 -1
- package/package.json +26 -21
- package/plugins/func-gen-plugin.js +12 -12
- package/script-template/node.js +1 -1
package/bin/commands/publish.js
CHANGED
|
@@ -19,8 +19,8 @@ var _jsYaml = _interopRequireDefault(require("js-yaml"));
|
|
|
19
19
|
var _check = require("./check");
|
|
20
20
|
var utils = _interopRequireWildcard(require("../utils/utils"));
|
|
21
21
|
var color = _interopRequireWildcard(require("../utils/color-utils"));
|
|
22
|
-
function _getRequireWildcardCache(
|
|
23
|
-
function _interopRequireWildcard(
|
|
22
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
23
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
24
24
|
// @ts-ignore
|
|
25
25
|
|
|
26
26
|
// @ts-ignore
|
|
@@ -41,216 +41,212 @@ function _processPackage() {
|
|
|
41
41
|
_processPackage = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(debug, rebuild, host, devKey, packageName, suffix) {
|
|
42
42
|
var timestamps, url, zip, localTimestamps, files, isWebpack, distFiles, contentValidationLog, checkStart, jsTsFiles, packageFilePath, json, webpackConfigPath, content, externals, importWarnings, funcFiles, funcWarnings, packageWarnings, changelogWarnings, uploadPromise, log;
|
|
43
43
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
44
|
-
while (1) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if (!debug) {
|
|
51
|
-
_context3.next = 18;
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
54
|
-
_context3.prev = 3;
|
|
55
|
-
_context3.next = 6;
|
|
56
|
-
return (0, _nodeFetch["default"])(url + '/timestamps');
|
|
57
|
-
case 6:
|
|
58
|
-
_context3.next = 8;
|
|
59
|
-
return _context3.sent.json();
|
|
60
|
-
case 8:
|
|
61
|
-
timestamps = _context3.sent;
|
|
62
|
-
if (!(timestamps['#type'] === 'ApiError')) {
|
|
63
|
-
_context3.next = 12;
|
|
64
|
-
break;
|
|
65
|
-
}
|
|
66
|
-
color.error(timestamps.message);
|
|
67
|
-
return _context3.abrupt("return", 1);
|
|
68
|
-
case 12:
|
|
44
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
45
|
+
case 0:
|
|
46
|
+
// Get the server timestamps
|
|
47
|
+
timestamps = {};
|
|
48
|
+
url = "".concat(host, "/packages/dev/").concat(devKey, "/").concat(packageName);
|
|
49
|
+
if (!debug) {
|
|
69
50
|
_context3.next = 18;
|
|
70
51
|
break;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
_context3.next =
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
});
|
|
52
|
+
}
|
|
53
|
+
_context3.prev = 3;
|
|
54
|
+
_context3.next = 6;
|
|
55
|
+
return (0, _nodeFetch["default"])(url + '/timestamps');
|
|
56
|
+
case 6:
|
|
57
|
+
_context3.next = 8;
|
|
58
|
+
return _context3.sent.json();
|
|
59
|
+
case 8:
|
|
60
|
+
timestamps = _context3.sent;
|
|
61
|
+
if (!(timestamps['#type'] === 'ApiError')) {
|
|
62
|
+
_context3.next = 12;
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
color.error(timestamps.message);
|
|
66
|
+
return _context3.abrupt("return", 1);
|
|
67
|
+
case 12:
|
|
68
|
+
_context3.next = 18;
|
|
69
|
+
break;
|
|
70
|
+
case 14:
|
|
71
|
+
_context3.prev = 14;
|
|
72
|
+
_context3.t0 = _context3["catch"](3);
|
|
73
|
+
console.error(_context3.t0);
|
|
74
|
+
return _context3.abrupt("return", 1);
|
|
75
|
+
case 18:
|
|
76
|
+
zip = (0, _archiverPromise["default"])('zip', {
|
|
77
|
+
store: false
|
|
78
|
+
}); // Gather the files
|
|
79
|
+
localTimestamps = {};
|
|
80
|
+
_context3.next = 22;
|
|
81
|
+
return (0, _ignoreWalk["default"])({
|
|
82
|
+
path: '.',
|
|
83
|
+
ignoreFiles: ['.npmignore', '.gitignore', '.grokignore'],
|
|
84
|
+
includeEmpty: false,
|
|
85
|
+
follow: true
|
|
86
|
+
});
|
|
87
|
+
case 22:
|
|
88
|
+
files = _context3.sent;
|
|
89
|
+
isWebpack = _fs["default"].existsSync('webpack.config.js');
|
|
90
|
+
if (!(!rebuild && isWebpack)) {
|
|
111
91
|
_context3.next = 34;
|
|
112
92
|
break;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
93
|
+
}
|
|
94
|
+
if (!_fs["default"].existsSync('dist/package.js')) {
|
|
95
|
+
_context3.next = 32;
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
_context3.next = 28;
|
|
99
|
+
return (0, _ignoreWalk["default"])({
|
|
100
|
+
path: './dist',
|
|
101
|
+
ignoreFiles: [],
|
|
102
|
+
includeEmpty: false,
|
|
103
|
+
follow: true
|
|
104
|
+
});
|
|
105
|
+
case 28:
|
|
106
|
+
distFiles = _context3.sent;
|
|
107
|
+
distFiles.forEach(function (df) {
|
|
108
|
+
files.push("dist/".concat(df));
|
|
109
|
+
});
|
|
110
|
+
_context3.next = 34;
|
|
111
|
+
break;
|
|
112
|
+
case 32:
|
|
113
|
+
color.warn('File `dist/package.js` not found. Building the package on the server side...\n' + 'Next time, please build your package locally with Webpack beforehand\n' + 'or run `grok publish` with the `--rebuild` option');
|
|
114
|
+
rebuild = true;
|
|
115
|
+
case 34:
|
|
116
|
+
contentValidationLog = '';
|
|
117
|
+
console.log('Starting package checks...');
|
|
118
|
+
checkStart = Date.now();
|
|
119
|
+
jsTsFiles = files.filter(function (f) {
|
|
120
|
+
return !f.startsWith('dist/') && (f.endsWith('.js') || f.endsWith('.ts'));
|
|
121
|
+
});
|
|
122
|
+
packageFilePath = _path["default"].join(curDir, 'package.json');
|
|
123
|
+
json = JSON.parse(_fs["default"].readFileSync(packageFilePath, {
|
|
124
|
+
encoding: 'utf-8'
|
|
125
|
+
}));
|
|
126
|
+
if (isWebpack) {
|
|
127
|
+
webpackConfigPath = _path["default"].join(curDir, 'webpack.config.js');
|
|
128
|
+
content = _fs["default"].readFileSync(webpackConfigPath, {
|
|
125
129
|
encoding: 'utf-8'
|
|
126
|
-
}));
|
|
127
|
-
if (isWebpack) {
|
|
128
|
-
webpackConfigPath = _path["default"].join(curDir, 'webpack.config.js');
|
|
129
|
-
content = _fs["default"].readFileSync(webpackConfigPath, {
|
|
130
|
-
encoding: 'utf-8'
|
|
131
|
-
});
|
|
132
|
-
externals = (0, _check.extractExternals)(content);
|
|
133
|
-
if (externals) {
|
|
134
|
-
importWarnings = (0, _check.checkImportStatements)(curDir, jsTsFiles, externals);
|
|
135
|
-
contentValidationLog += importWarnings.join('\n') + (importWarnings.length ? '\n' : '');
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
funcFiles = jsTsFiles.filter(function (f) {
|
|
139
|
-
return packageFiles.includes(f);
|
|
140
|
-
});
|
|
141
|
-
funcWarnings = (0, _check.checkFuncSignatures)(curDir, funcFiles);
|
|
142
|
-
contentValidationLog += funcWarnings.join('\n') + (funcWarnings.length ? '\n' : '');
|
|
143
|
-
packageWarnings = (0, _check.checkPackageFile)(curDir, json);
|
|
144
|
-
contentValidationLog += packageWarnings.join('\n') + (packageWarnings.length ? '\n' : '');
|
|
145
|
-
changelogWarnings = (0, _check.checkChangelog)(curDir, json);
|
|
146
|
-
contentValidationLog += changelogWarnings.join('\n') + (packageWarnings.length ? '\n' : '');
|
|
147
|
-
console.log("Checks finished in ".concat(Date.now() - checkStart, " ms"));
|
|
148
|
-
files.forEach(function (file) {
|
|
149
|
-
var fullPath = file;
|
|
150
|
-
var relativePath = _path["default"].relative(curDir, fullPath);
|
|
151
|
-
var canonicalRelativePath = relativePath.replace(/\\/g, '/');
|
|
152
|
-
if (canonicalRelativePath.includes('/.')) return;
|
|
153
|
-
if (canonicalRelativePath.startsWith('.')) return;
|
|
154
|
-
if (relativePath.startsWith('node_modules')) return;
|
|
155
|
-
if (relativePath.startsWith('dist') && rebuild) return;
|
|
156
|
-
if (relativePath.startsWith('src') && !rebuild && isWebpack) {
|
|
157
|
-
if (!relativePath.startsWith('src/package') && !relativePath.startsWith('src\\package')) return;
|
|
158
|
-
}
|
|
159
|
-
if (relativePath.startsWith('upload.keys.json')) return;
|
|
160
|
-
if (relativePath === 'zip') return;
|
|
161
|
-
if (!utils.checkScriptLocation(canonicalRelativePath)) {
|
|
162
|
-
contentValidationLog += "Warning: file `".concat(canonicalRelativePath, "`") + " should be in directory `".concat(_path["default"].basename(curDir), "/scripts/`\n");
|
|
163
|
-
}
|
|
164
|
-
var t = _fs["default"].statSync(fullPath).mtime.toUTCString();
|
|
165
|
-
localTimestamps[canonicalRelativePath] = t;
|
|
166
|
-
if (debug && timestamps[canonicalRelativePath] === t) {
|
|
167
|
-
console.log("Skipping ".concat(canonicalRelativePath));
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
zip.append(_fs["default"].createReadStream(fullPath), {
|
|
171
|
-
name: relativePath
|
|
172
|
-
});
|
|
173
|
-
console.log("Adding ".concat(canonicalRelativePath, "..."));
|
|
174
130
|
});
|
|
175
|
-
|
|
176
|
-
|
|
131
|
+
externals = (0, _check.extractExternals)(content);
|
|
132
|
+
if (externals) {
|
|
133
|
+
importWarnings = (0, _check.checkImportStatements)(curDir, jsTsFiles, externals);
|
|
134
|
+
contentValidationLog += importWarnings.join('\n') + (importWarnings.length ? '\n' : '');
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
funcFiles = jsTsFiles.filter(function (f) {
|
|
138
|
+
return packageFiles.includes(f);
|
|
139
|
+
});
|
|
140
|
+
funcWarnings = (0, _check.checkFuncSignatures)(curDir, funcFiles);
|
|
141
|
+
contentValidationLog += funcWarnings.join('\n') + (funcWarnings.length ? '\n' : '');
|
|
142
|
+
packageWarnings = (0, _check.checkPackageFile)(curDir, json);
|
|
143
|
+
contentValidationLog += packageWarnings.join('\n') + (packageWarnings.length ? '\n' : '');
|
|
144
|
+
changelogWarnings = (0, _check.checkChangelog)(curDir, json);
|
|
145
|
+
contentValidationLog += changelogWarnings.join('\n') + (packageWarnings.length ? '\n' : '');
|
|
146
|
+
console.log("Checks finished in ".concat(Date.now() - checkStart, " ms"));
|
|
147
|
+
files.forEach(function (file) {
|
|
148
|
+
var fullPath = file;
|
|
149
|
+
var relativePath = _path["default"].relative(curDir, fullPath);
|
|
150
|
+
var canonicalRelativePath = relativePath.replace(/\\/g, '/');
|
|
151
|
+
if (canonicalRelativePath.includes('/.')) return;
|
|
152
|
+
if (canonicalRelativePath.startsWith('.')) return;
|
|
153
|
+
if (relativePath.startsWith('node_modules')) return;
|
|
154
|
+
if (relativePath.startsWith('dist') && rebuild) return;
|
|
155
|
+
if (relativePath.startsWith('src') && !rebuild && isWebpack) {
|
|
156
|
+
if (!relativePath.startsWith('src/package') && !relativePath.startsWith('src\\package')) return;
|
|
157
|
+
}
|
|
158
|
+
if (relativePath.startsWith('upload.keys.json')) return;
|
|
159
|
+
if (relativePath === 'zip') return;
|
|
160
|
+
if (!utils.checkScriptLocation(canonicalRelativePath)) {
|
|
161
|
+
contentValidationLog += "Warning: file `".concat(canonicalRelativePath, "`") + " should be in directory `".concat(_path["default"].basename(curDir), "/scripts/`\n");
|
|
162
|
+
}
|
|
163
|
+
var t = _fs["default"].statSync(fullPath).mtime.toUTCString();
|
|
164
|
+
localTimestamps[canonicalRelativePath] = t;
|
|
165
|
+
if (debug && timestamps[canonicalRelativePath] === t) {
|
|
166
|
+
console.log("Skipping ".concat(canonicalRelativePath));
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
zip.append(_fs["default"].createReadStream(fullPath), {
|
|
170
|
+
name: relativePath
|
|
177
171
|
});
|
|
172
|
+
console.log("Adding ".concat(canonicalRelativePath, "..."));
|
|
173
|
+
});
|
|
174
|
+
zip.append(JSON.stringify(localTimestamps), {
|
|
175
|
+
name: 'timestamps.json'
|
|
176
|
+
});
|
|
178
177
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
})["catch"](function (err) {
|
|
216
|
-
reject(err);
|
|
217
|
-
});
|
|
218
|
-
})["catch"](function (error) {
|
|
219
|
-
console.error(error);
|
|
178
|
+
// Upload
|
|
179
|
+
url += "?debug=".concat(debug.toString(), "&rebuild=").concat(rebuild.toString());
|
|
180
|
+
if (suffix) url += "&suffix=".concat(suffix.toString());
|
|
181
|
+
uploadPromise = new Promise(function (resolve, reject) {
|
|
182
|
+
(0, _nodeFetch["default"])(url, {
|
|
183
|
+
method: 'POST',
|
|
184
|
+
body: zip
|
|
185
|
+
}).then( /*#__PURE__*/function () {
|
|
186
|
+
var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(body) {
|
|
187
|
+
var response;
|
|
188
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
189
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
190
|
+
case 0:
|
|
191
|
+
_context2.prev = 0;
|
|
192
|
+
_context2.next = 3;
|
|
193
|
+
return body.text();
|
|
194
|
+
case 3:
|
|
195
|
+
response = _context2.sent;
|
|
196
|
+
return _context2.abrupt("return", JSON.parse(response));
|
|
197
|
+
case 7:
|
|
198
|
+
_context2.prev = 7;
|
|
199
|
+
_context2.t0 = _context2["catch"](0);
|
|
200
|
+
console.error(response);
|
|
201
|
+
case 10:
|
|
202
|
+
case "end":
|
|
203
|
+
return _context2.stop();
|
|
204
|
+
}
|
|
205
|
+
}, _callee2, null, [[0, 7]]);
|
|
206
|
+
}));
|
|
207
|
+
return function (_x7) {
|
|
208
|
+
return _ref2.apply(this, arguments);
|
|
209
|
+
};
|
|
210
|
+
}()).then(function (j) {
|
|
211
|
+
return resolve(j);
|
|
212
|
+
})["catch"](function (err) {
|
|
213
|
+
reject(err);
|
|
220
214
|
});
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
console.error(log['innerMessage']);
|
|
236
|
-
return _context3.abrupt("return", 1);
|
|
237
|
-
case 67:
|
|
238
|
-
console.log(log);
|
|
239
|
-
color.warn(contentValidationLog);
|
|
240
|
-
case 69:
|
|
241
|
-
_context3.next = 75;
|
|
215
|
+
})["catch"](function (error) {
|
|
216
|
+
console.error(error);
|
|
217
|
+
});
|
|
218
|
+
_context3.next = 56;
|
|
219
|
+
return zip.finalize();
|
|
220
|
+
case 56:
|
|
221
|
+
_context3.prev = 56;
|
|
222
|
+
_context3.next = 59;
|
|
223
|
+
return uploadPromise;
|
|
224
|
+
case 59:
|
|
225
|
+
log = _context3.sent;
|
|
226
|
+
_fs["default"].unlinkSync('zip');
|
|
227
|
+
if (!(log['#type'] === 'ApiError')) {
|
|
228
|
+
_context3.next = 67;
|
|
242
229
|
break;
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
230
|
+
}
|
|
231
|
+
color.error(log['message']);
|
|
232
|
+
console.error(log['innerMessage']);
|
|
233
|
+
return _context3.abrupt("return", 1);
|
|
234
|
+
case 67:
|
|
235
|
+
console.log(log);
|
|
236
|
+
color.warn(contentValidationLog);
|
|
237
|
+
case 69:
|
|
238
|
+
_context3.next = 75;
|
|
239
|
+
break;
|
|
240
|
+
case 71:
|
|
241
|
+
_context3.prev = 71;
|
|
242
|
+
_context3.t1 = _context3["catch"](56);
|
|
243
|
+
console.error(_context3.t1);
|
|
244
|
+
return _context3.abrupt("return", 1);
|
|
245
|
+
case 75:
|
|
246
|
+
return _context3.abrupt("return", 0);
|
|
247
|
+
case 76:
|
|
248
|
+
case "end":
|
|
249
|
+
return _context3.stop();
|
|
254
250
|
}
|
|
255
251
|
}, _callee3, null, [[3, 14], [56, 71]]);
|
|
256
252
|
}));
|
|
@@ -307,33 +303,31 @@ function publish(args) {
|
|
|
307
303
|
var packageName = _package.name;
|
|
308
304
|
|
|
309
305
|
// Upload the package
|
|
310
|
-
process.env.NODE_TLS_REJECT_UNAUTHORIZED =
|
|
306
|
+
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
|
311
307
|
process.on('beforeExit', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
312
308
|
var code;
|
|
313
309
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
314
|
-
while (1) {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
return _context.stop();
|
|
336
|
-
}
|
|
310
|
+
while (1) switch (_context.prev = _context.next) {
|
|
311
|
+
case 0:
|
|
312
|
+
code = 0;
|
|
313
|
+
_context.prev = 1;
|
|
314
|
+
_context.next = 4;
|
|
315
|
+
return processPackage(!args.release, Boolean(args.rebuild), url, key, packageName, args.suffix);
|
|
316
|
+
case 4:
|
|
317
|
+
code = _context.sent;
|
|
318
|
+
_context.next = 11;
|
|
319
|
+
break;
|
|
320
|
+
case 7:
|
|
321
|
+
_context.prev = 7;
|
|
322
|
+
_context.t0 = _context["catch"](1);
|
|
323
|
+
console.error(_context.t0);
|
|
324
|
+
code = 1;
|
|
325
|
+
case 11:
|
|
326
|
+
console.log("Exiting with code ".concat(code));
|
|
327
|
+
process.exit(code);
|
|
328
|
+
case 13:
|
|
329
|
+
case "end":
|
|
330
|
+
return _context.stop();
|
|
337
331
|
}
|
|
338
332
|
}, _callee, null, [[1, 7]]);
|
|
339
333
|
})));
|