smartling-api-sdk-nodejs 1.2.1 → 1.2.4
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 +62 -3
- package/.scannerwork/report-task.txt +2 -2
- package/api/base/index.ts +1 -1
- package/api/exception/index.ts +8 -0
- package/built/api/base/index.js +2 -21
- package/built/api/base/index.js.map +1 -1
- package/built/api/exception/index.d.ts +2 -0
- package/built/api/exception/index.js +6 -0
- package/built/api/exception/index.js.map +1 -1
- package/built/api/files/params/upload-file-parameters.js +5 -1
- package/built/api/files/params/upload-file-parameters.js.map +1 -1
- package/built/api/job-batches/params/upload-batch-file-parameters.js +5 -1
- package/built/api/job-batches/params/upload-batch-file-parameters.js.map +1 -1
- package/built/index.js +5 -1
- package/built/index.js.map +1 -1
- package/built/package.json +11 -4
- package/package.json +11 -4
- package/test/exception.spec.ts +3 -0
- package/tsconfig.json +1 -2
package/.eslintrc
CHANGED
|
@@ -2,10 +2,18 @@
|
|
|
2
2
|
root: true,
|
|
3
3
|
parser: "@typescript-eslint/parser",
|
|
4
4
|
plugins: [
|
|
5
|
-
"@typescript-eslint"
|
|
5
|
+
"@typescript-eslint",
|
|
6
|
+
"flowtype",
|
|
7
|
+
"react",
|
|
8
|
+
"jsx-a11y",
|
|
9
|
+
"import",
|
|
10
|
+
"promise",
|
|
11
|
+
"fp"
|
|
6
12
|
],
|
|
7
13
|
extends: [
|
|
8
|
-
"
|
|
14
|
+
"airbnb",
|
|
15
|
+
"plugin:flowtype/recommended",
|
|
16
|
+
"plugin:jsx-a11y/recommended",
|
|
9
17
|
"eslint:recommended",
|
|
10
18
|
"plugin:@typescript-eslint/eslint-recommended",
|
|
11
19
|
"plugin:@typescript-eslint/recommended"
|
|
@@ -21,6 +29,57 @@
|
|
|
21
29
|
"no-return-await": "off",
|
|
22
30
|
"import/extensions": "off",
|
|
23
31
|
"no-shadow": "off",
|
|
24
|
-
"@typescript-eslint/no-shadow": "error"
|
|
32
|
+
"@typescript-eslint/no-shadow": "error",
|
|
33
|
+
"comma-dangle": ["error", "never"],
|
|
34
|
+
"import/prefer-default-export": "off",
|
|
35
|
+
"import/no-extraneous-dependencies": [
|
|
36
|
+
"error",
|
|
37
|
+
{ devDependencies: true }
|
|
38
|
+
],
|
|
39
|
+
indent: ["error", 4],
|
|
40
|
+
"no-confusing-arrow": "off",
|
|
41
|
+
"no-param-reassign": "off",
|
|
42
|
+
"quote-props": ["error", "as-needed", { numbers: true }],
|
|
43
|
+
quotes: [2, "double"],
|
|
44
|
+
"space-before-function-paren": ["off", "never"],
|
|
45
|
+
"fp/no-arguments": "error",
|
|
46
|
+
"fp/no-delete": "error",
|
|
47
|
+
"fp/no-mutating-methods": ["error", { allowedObjects: ["R", "EditorState"] }],
|
|
48
|
+
"function-paren-newline": ["off", "never"],
|
|
49
|
+
"object-curly-newline": ["off", "never"],
|
|
50
|
+
"prefer-destructuring": ["error", {
|
|
51
|
+
VariableDeclarator: {
|
|
52
|
+
array: false,
|
|
53
|
+
object: true
|
|
54
|
+
},
|
|
55
|
+
AssignmentExpression: {
|
|
56
|
+
array: false,
|
|
57
|
+
object: true
|
|
58
|
+
}
|
|
59
|
+
}, {
|
|
60
|
+
enforceForRenamedProperties: false
|
|
61
|
+
}],
|
|
62
|
+
"jsx-a11y/click-events-have-key-events": "off",
|
|
63
|
+
"jsx-a11y/mouse-events-have-key-events": "off",
|
|
64
|
+
"jsx-a11y/no-static-element-interactions": "off",
|
|
65
|
+
"promise/catch-or-return": "error",
|
|
66
|
+
"react/jsx-boolean-value": "off",
|
|
67
|
+
"react/jsx-filename-extension": "off",
|
|
68
|
+
"react/jsx-indent": ["error", 4],
|
|
69
|
+
"react/jsx-indent-props": ["error", 4],
|
|
70
|
+
"react/no-unescaped-entities": "off",
|
|
71
|
+
"react/prefer-stateless-function": "off",
|
|
72
|
+
"react/require-default-props": "off"
|
|
73
|
+
},
|
|
74
|
+
env: {
|
|
75
|
+
browser: true,
|
|
76
|
+
commonjs: true,
|
|
77
|
+
mocha: true
|
|
78
|
+
},
|
|
79
|
+
globals: {
|
|
80
|
+
sinon: true,
|
|
81
|
+
suite: true,
|
|
82
|
+
benchmark: true,
|
|
83
|
+
i18n: true
|
|
25
84
|
}
|
|
26
85
|
}
|
|
@@ -2,5 +2,5 @@ projectKey=smartling-api-sdk-nodejs
|
|
|
2
2
|
serverUrl=https://sonar-next.connectors.stg.smartling.net
|
|
3
3
|
serverVersion=8.6.1.40680
|
|
4
4
|
dashboardUrl=https://sonar-next.connectors.stg.smartling.net/dashboard?id=smartling-api-sdk-nodejs
|
|
5
|
-
ceTaskId=
|
|
6
|
-
ceTaskUrl=https://sonar-next.connectors.stg.smartling.net/api/ce/task?id=
|
|
5
|
+
ceTaskId=AYAZzI_RaTtlrvRuYgyU
|
|
6
|
+
ceTaskUrl=https://sonar-next.connectors.stg.smartling.net/api/ce/task?id=AYAZzI_RaTtlrvRuYgyU
|
package/api/base/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import merge from "merge-deep";
|
|
2
2
|
import ua from "default-user-agent";
|
|
3
3
|
import FormData from "form-data";
|
|
4
|
-
import
|
|
4
|
+
import fetch from "cross-fetch";
|
|
5
5
|
import { ParsedUrlQueryInput, stringify } from "querystring";
|
|
6
6
|
import { Logger } from "../logger";
|
|
7
7
|
import { SmartlingException } from "../exception/index";
|
package/api/exception/index.ts
CHANGED
|
@@ -7,6 +7,14 @@ class SmartlingException extends Error {
|
|
|
7
7
|
this.payload = payload;
|
|
8
8
|
this.nestedException = e;
|
|
9
9
|
}
|
|
10
|
+
|
|
11
|
+
public getPayload(): Record<string, unknown> {
|
|
12
|
+
return this.payload;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
public getNestedException(): Error {
|
|
16
|
+
return this.nestedException;
|
|
17
|
+
}
|
|
10
18
|
}
|
|
11
19
|
|
|
12
20
|
SmartlingException.prototype.toString = function smartlingExceptionToString() {
|
package/built/api/base/index.js
CHANGED
|
@@ -1,23 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -34,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
34
15
|
exports.SmartlingBaseApi = void 0;
|
|
35
16
|
const merge_deep_1 = __importDefault(require("merge-deep"));
|
|
36
17
|
const default_user_agent_1 = __importDefault(require("default-user-agent"));
|
|
37
|
-
const
|
|
18
|
+
const cross_fetch_1 = __importDefault(require("cross-fetch"));
|
|
38
19
|
const querystring_1 = require("querystring");
|
|
39
20
|
const index_1 = require("../exception/index");
|
|
40
21
|
const packageJson = require("../../package.json");
|
|
@@ -65,7 +46,7 @@ class SmartlingBaseApi {
|
|
|
65
46
|
}
|
|
66
47
|
fetch(uri, options) {
|
|
67
48
|
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
return yield
|
|
49
|
+
return yield (0, cross_fetch_1.default)(uri, options);
|
|
69
50
|
});
|
|
70
51
|
}
|
|
71
52
|
ua(clientId, clientVersion) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../api/base/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../api/base/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,4DAA+B;AAC/B,4EAAoC;AAEpC,8DAAgC;AAChC,6CAA6D;AAE7D,8CAAwD;AAIxD,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAElD,MAAa,gBAAgB;IAUzB,YAAY,MAAc;QAThB,YAAO,GAAqB,SAAS,CAAC;QAU5C,IAAI,CAAC,kBAAkB,GAAG,WAAW,CAAC,IAAI,CAAC;QAC3C,IAAI,CAAC,oBAAoB,GAAG,WAAW,CAAC,OAAO,CAAC;QAChD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,kBAAkB,CAAC;QAC3C,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,oBAAoB,CAAC;QAClD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;IACtB,CAAC;IAED,UAAU,CAAC,OAAgC;QACvC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAEM,cAAc;QACjB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAEM,cAAc,CAAC,WAAmB;QACrC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACnC,CAAC;IAEM,mBAAmB;QACtB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAEM,mBAAmB,CAAC,g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CAAC,GAAG,CAAC,gBAAgB,CAAC;iBACpD,CAAC,CAAC;aACN;;KACJ;CACJ;AAlKD,4CAkKC"}
|
|
@@ -2,5 +2,7 @@ declare class SmartlingException extends Error {
|
|
|
2
2
|
protected payload: Record<string, unknown>;
|
|
3
3
|
protected nestedException: Error;
|
|
4
4
|
constructor(message: string, payload?: Record<string, unknown>, e?: Error);
|
|
5
|
+
getPayload(): Record<string, unknown>;
|
|
6
|
+
getNestedException(): Error;
|
|
5
7
|
}
|
|
6
8
|
export { SmartlingException };
|
|
@@ -7,6 +7,12 @@ class SmartlingException extends Error {
|
|
|
7
7
|
this.payload = payload;
|
|
8
8
|
this.nestedException = e;
|
|
9
9
|
}
|
|
10
|
+
getPayload() {
|
|
11
|
+
return this.payload;
|
|
12
|
+
}
|
|
13
|
+
getNestedException() {
|
|
14
|
+
return this.nestedException;
|
|
15
|
+
}
|
|
10
16
|
}
|
|
11
17
|
exports.SmartlingException = SmartlingException;
|
|
12
18
|
SmartlingException.prototype.toString = function smartlingExceptionToString() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../api/exception/index.ts"],"names":[],"mappings":";;;AAAA,MAAM,kBAAmB,SAAQ,KAAK;IAIlC,YAAY,OAAe,EAAE,UAAmC,EAAE,EAAE,IAAW,IAAI;QAC/E,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC;IAC7B,CAAC;CACJ;AAMQ,gDAAkB;AAJ3B,kBAAkB,CAAC,SAAS,CAAC,QAAQ,GAAG,SAAS,0BAA0B;IACvE,OAAO,GAAG,IAAI,CAAC,OAAO,aAAa,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,IAAI,CAAC,KAAK,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AAClJ,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../api/exception/index.ts"],"names":[],"mappings":";;;AAAA,MAAM,kBAAmB,SAAQ,KAAK;IAIlC,YAAY,OAAe,EAAE,UAAmC,EAAE,EAAE,IAAW,IAAI;QAC/E,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC;IAC7B,CAAC;IAEM,UAAU;QACb,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAEM,kBAAkB;QACrB,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;CACJ;AAMQ,gDAAkB;AAJ3B,kBAAkB,CAAC,SAAS,CAAC,QAAQ,GAAG,SAAS,0BAA0B;IACvE,OAAO,GAAG,IAAI,CAAC,OAAO,aAAa,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,IAAI,CAAC,KAAK,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AAClJ,CAAC,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-file-parameters.js","sourceRoot":"","sources":["../../../../api/files/params/upload-file-parameters.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"upload-file-parameters.js","sourceRoot":"","sources":["../../../../api/files/params/upload-file-parameters.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,kFAAsD;AACtD,kDAAwD;AAGxD,MAAa,oBAAqB,SAAQ,sBAAc;IACpD,YAAY,CAAC,GAAW,EAAE,KAAa;QACnC,IAAI,CAAC,GAAG,CAAC,aAAa,GAAG,EAAE,EAAE,KAAK,CAAC,CAAC;QAEpC,OAAO,IAAI,CAAC;IAChB,CAAC;IAOD,OAAO,CAAC,QAAgB;QACpB,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,CAChC,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAC5B,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,wBAAwB,CAAC,QAAgB;QACrC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,CAChC,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAC5B,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,cAAc,CAAC,WAAmB;QAC9B,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAA,+BAAiB,EAAC,WAAW,CAAC,CAAC,CAAC;QAEjD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,WAAW,CAAC,QAAkB;QAC1B,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC/B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,UAAU,CAAC,OAAe;QACtB,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAzCD,oDAyCC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-batch-file-parameters.js","sourceRoot":"","sources":["../../../../api/job-batches/params/upload-batch-file-parameters.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"upload-batch-file-parameters.js","sourceRoot":"","sources":["../../../../api/job-batches/params/upload-batch-file-parameters.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,kFAAsD;AACtD,kDAAwD;AAGxD,MAAa,yBAA0B,SAAQ,sBAAc;IACzD,cAAc,CAAC,WAAmB,EAAE,OAAe;QAC/C,IAAI,CAAC,GAAG,CAAC,yBAAyB,EAAE,IAAI,CAAC,SAAS,CAAC;YAC/C,MAAM,EAAE,WAAW;YACnB,OAAO;SACV,CAAC,CAAC,CAAC;QAEJ,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,cAAc,CAAC,WAAmB;QAC9B,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;QAErC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,mBAAmB,CAAC,gBAA+B;QAC/C,IAAI,CAAC,GAAG,CAAC,sBAAsB,EAAE,gBAAgB,CAAC,CAAC;QAEnD,OAAO,IAAI,CAAC;IAChB,CAAC;IAOD,OAAO,CAAC,QAAgB;QACpB,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,CAChC,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAC5B,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,wBAAwB,CAAC,QAAgB;QACrC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,CAChC,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAC5B,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,cAAc,CAAC,WAAmB;QAC9B,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAA,+BAAiB,EAAC,WAAW,CAAC,CAAC,CAAC;QAEjD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,UAAU,CAAC,OAAe;QACtB,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAE7B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,WAAW,CAAC,QAAkB;QAC1B,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAE/B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,YAAY,CAAC,GAAW,EAAE,KAAa;QACnC,IAAI,CAAC,GAAG,CAAC,aAAa,GAAG,EAAE,EAAE,KAAK,CAAC,CAAC;QAEpC,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAlED,8DAkEC"}
|
package/built/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/built/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,kEAAgD;AAChD,mDAAiC;AACjC,sDAAoC;AACpC,sDAAoC;AACpC,wEAAsD;AACtD,6EAA2D;AAC3D,gEAA8C;AAC9C,4EAA0D;AAC1D,uEAAqD;AACrD,0FAAwE;AACxE,oEAAkD;AAClD,iFAA+D;AAC/D,kFAAgE;AAChE,uEAAqD;AACrD,sEAAoD;AACpD,wDAAsC;AACtC,oDAAkC;AAClC,8EAA4D;AAC5D,oEAAkD;AAClD,+DAA6C;AAC7C,4EAA0D;AAC1D,kFAAgE;AAChE,kFAAgE;AAChE,+EAA6D;AAC7D,oEAAkD;AAClD,qEAAmD;AACnD,0DAAwC;AACxC,kEAAgD;AAChD,uEAAqD;AACrD,yEAAuD;AACvD,yEAAuD;AACvD,mFAAiE;AACjE,wFAAsE;AACtE,2FAAyE;AACzE,wFAAsE;AACtE,0FAAwE;AACxE,wEAAsD;AACtD,wEAAsD;AACtD,6EAA2D;AAC3D,mDAAiC;AACjC,8DAA4C;AAC5C,kFAAgE;AAChE,kEAAgD;AAChD,mEAAiD;AACjD,sEAAoD;AACpD,iEAA+C;AAC/C,yDAAuC;AACvC,iEAA+C;AAC/C,mFAAiE;AACjE,uFAAqE;AACrE,kEAAgD;AAChD,mEAAiD;AACjD,yEAAuD;AACvD,kEAAgD;AAChD,0EAAwD;AACxD,6EAA2D;AAC3D,4EAA0D;AAC1D,+DAA6C;AAC7C,8EAA4D;AAC5D,yEAAuD;AACvD,2EAAyD;AACzD,yDAAuC;AACvC,yDAAuC;AACvC,uDAAqC;AACrC,iEAA+C;AAC/C,gEAA8C;AAC9C,sDAAoC;AACpC,sEAAoD;AACpD,0EAAwD;AACxD,uFAAqE;AACrE,+CAA6B"}
|
package/built/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smartling-api-sdk-nodejs",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "Package for Smartling API",
|
|
5
5
|
"main": "built/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -25,18 +25,25 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/Smartling/api-sdk-nodejs#readme",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@types/mocha": "^9.0.0",
|
|
29
28
|
"@types/node": "^16.4.7",
|
|
29
|
+
"cross-fetch": "^3.1.4",
|
|
30
30
|
"default-user-agent": "^1.0.0",
|
|
31
31
|
"form-data": "^4.0.0",
|
|
32
32
|
"merge-deep": "^3.0.3",
|
|
33
|
-
"node-fetch": "^2.6.1",
|
|
34
33
|
"querystring": "^0.2.1",
|
|
35
34
|
"string-to-file-stream": "^1.3.0",
|
|
36
35
|
"typescript": "^4.3.5"
|
|
37
36
|
},
|
|
38
37
|
"devDependencies": {
|
|
39
|
-
"@
|
|
38
|
+
"@types/mocha": "^9.0.0",
|
|
39
|
+
"babel-eslint": "^8.2.1",
|
|
40
|
+
"eslint-config-airbnb": "^16.1.0",
|
|
41
|
+
"eslint-plugin-flowtype": "^2.41.0",
|
|
42
|
+
"eslint-plugin-fp": "^2.3.0",
|
|
43
|
+
"eslint-plugin-import": "^2.8.0",
|
|
44
|
+
"eslint-plugin-jsx-a11y": "^6.0.3",
|
|
45
|
+
"eslint-plugin-promise": "^3.6.0",
|
|
46
|
+
"eslint-plugin-react": "^7.10.0",
|
|
40
47
|
"@typescript-eslint/eslint-plugin": "^4.29.0",
|
|
41
48
|
"@typescript-eslint/parser": "^4.29.0",
|
|
42
49
|
"eslint": "^7.31.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smartling-api-sdk-nodejs",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "Package for Smartling API",
|
|
5
5
|
"main": "built/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -25,18 +25,25 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/Smartling/api-sdk-nodejs#readme",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@types/mocha": "^9.0.0",
|
|
29
28
|
"@types/node": "^16.4.7",
|
|
29
|
+
"cross-fetch": "^3.1.4",
|
|
30
30
|
"default-user-agent": "^1.0.0",
|
|
31
31
|
"form-data": "^4.0.0",
|
|
32
32
|
"merge-deep": "^3.0.3",
|
|
33
|
-
"node-fetch": "^2.6.1",
|
|
34
33
|
"querystring": "^0.2.1",
|
|
35
34
|
"string-to-file-stream": "^1.3.0",
|
|
36
35
|
"typescript": "^4.3.5"
|
|
37
36
|
},
|
|
38
37
|
"devDependencies": {
|
|
39
|
-
"@
|
|
38
|
+
"@types/mocha": "^9.0.0",
|
|
39
|
+
"babel-eslint": "^8.2.1",
|
|
40
|
+
"eslint-config-airbnb": "^16.1.0",
|
|
41
|
+
"eslint-plugin-flowtype": "^2.41.0",
|
|
42
|
+
"eslint-plugin-fp": "^2.3.0",
|
|
43
|
+
"eslint-plugin-import": "^2.8.0",
|
|
44
|
+
"eslint-plugin-jsx-a11y": "^6.0.3",
|
|
45
|
+
"eslint-plugin-promise": "^3.6.0",
|
|
46
|
+
"eslint-plugin-react": "^7.10.0",
|
|
40
47
|
"@typescript-eslint/eslint-plugin": "^4.29.0",
|
|
41
48
|
"@typescript-eslint/parser": "^4.29.0",
|
|
42
49
|
"eslint": "^7.31.0",
|
package/test/exception.spec.ts
CHANGED
|
@@ -10,5 +10,8 @@ describe("Exception base class tests.", () => {
|
|
|
10
10
|
|
|
11
11
|
assert.equal(result.includes("Test root exception, payload={\"root\":\"value\"}, stack=Error: Test root exception"), true);
|
|
12
12
|
assert.equal(result.includes("Test nested exception, payload={\"foo\":\"nested\"}, stack=Error: Test nested exception"), true);
|
|
13
|
+
assert.deepEqual(rootException.getPayload(), { root: "value" });
|
|
14
|
+
assert.deepEqual(rootException.getNestedException(), nestedException);
|
|
15
|
+
assert.deepEqual((rootException.getNestedException() as SmartlingException).getPayload(), { foo: "nested" });
|
|
13
16
|
});
|
|
14
17
|
});
|