@scout9/app 1.0.0-alpha.0.2.9 → 1.0.0-alpha.0.3.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.
|
@@ -29483,7 +29483,7 @@ class Body {
|
|
|
29483
29483
|
}
|
|
29484
29484
|
const {
|
|
29485
29485
|
toFormData
|
|
29486
|
-
} = await Promise.resolve().then(function () { return require("./multipart-parser-
|
|
29486
|
+
} = await Promise.resolve().then(function () { return require("./multipart-parser-46cd8f49.cjs"); });
|
|
29487
29487
|
return toFormData(this.body, ct);
|
|
29488
29488
|
}
|
|
29489
29489
|
|
|
@@ -41892,7 +41892,7 @@ function _loadUserPackageJson() {
|
|
|
41892
41892
|
targetPkgUrl = isTest ? packageTestJsonUrl : packageJsonUrl;
|
|
41893
41893
|
_context.t0 = JSON;
|
|
41894
41894
|
_context.next = 10;
|
|
41895
|
-
return fs__default["default"].readFile(new URL(targetPkgUrl, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-
|
|
41895
|
+
return fs__default["default"].readFile(new URL(targetPkgUrl, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-c41a1b55.js', document.baseURI).href))), 'utf-8');
|
|
41896
41896
|
case 10:
|
|
41897
41897
|
_context.t1 = _context.sent;
|
|
41898
41898
|
pkg = _context.t0.parse.call(_context.t0, _context.t1);
|
|
@@ -43098,7 +43098,7 @@ var ProjectFiles = /*#__PURE__*/function () {
|
|
|
43098
43098
|
return ProjectFiles;
|
|
43099
43099
|
}();
|
|
43100
43100
|
|
|
43101
|
-
var __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-
|
|
43101
|
+
var __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-c41a1b55.js', document.baseURI).href)));
|
|
43102
43102
|
var __dirname$1 = path__default["default"].dirname(__filename$1);
|
|
43103
43103
|
function zipDirectory(source, out) {
|
|
43104
43104
|
var archive = archiver$1('tar', {
|
|
@@ -43313,7 +43313,7 @@ function _buildApp() {
|
|
|
43313
43313
|
case 11:
|
|
43314
43314
|
_context4.t0 = JSON;
|
|
43315
43315
|
_context4.next = 14;
|
|
43316
|
-
return fs__default["default"].readFile(new URL(templatePackagePath, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-
|
|
43316
|
+
return fs__default["default"].readFile(new URL(templatePackagePath, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-c41a1b55.js', document.baseURI).href))), 'utf-8');
|
|
43317
43317
|
case 14:
|
|
43318
43318
|
_context4.t1 = _context4.sent;
|
|
43319
43319
|
packageTemplate = _context4.t0.parse.call(_context4.t0, _context4.t1);
|
|
@@ -44421,6 +44421,15 @@ var Scout9Platform = {
|
|
|
44421
44421
|
handleError: function handleError(e) {
|
|
44422
44422
|
var error = coalesceToError(e);
|
|
44423
44423
|
switch (error.name) {
|
|
44424
|
+
case 'AxiosError':
|
|
44425
|
+
var request = error.request,
|
|
44426
|
+
response = error.response;
|
|
44427
|
+
var path = request.path,
|
|
44428
|
+
method = request.method;
|
|
44429
|
+
var status = response.status,
|
|
44430
|
+
data = response.data;
|
|
44431
|
+
console.error(dev.$.red(dev.$.bold("".concat(method, " ").concat(path, " Scout9 ApiError (").concat(status, ")")) + ': ' + JSON.stringify(data)));
|
|
44432
|
+
throw new Error(JSON.stringify(data));
|
|
44424
44433
|
case 'SyntaxError':
|
|
44425
44434
|
throw error;
|
|
44426
44435
|
case 'ZodError':
|
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require("./index-
|
|
5
|
+
var index = require("./index-c41a1b55.cjs");
|
|
6
6
|
var dev = require("./dev-73437873.cjs");
|
|
7
7
|
require("./spirits-76855e30.cjs");
|
|
8
8
|
require("./macros-44f1f872.cjs");
|
package/package.json
CHANGED
package/src/platform.js
CHANGED
|
@@ -215,6 +215,12 @@ export const Scout9Platform = {
|
|
|
215
215
|
const error = coalesceToError(e);
|
|
216
216
|
|
|
217
217
|
switch (error.name) {
|
|
218
|
+
case 'AxiosError':
|
|
219
|
+
const {request, response} = error;
|
|
220
|
+
const { path, method } = request;
|
|
221
|
+
const {status, data} = response;
|
|
222
|
+
console.error(colors.red(colors.bold(`${method} ${path} Scout9 ApiError (${status})`) + ': ' + JSON.stringify(data)));
|
|
223
|
+
throw new Error(JSON.stringify(data));
|
|
218
224
|
case 'SyntaxError':
|
|
219
225
|
throw error;
|
|
220
226
|
case 'ZodError':
|