@nestia/fetcher 12.0.0-dev.20260612.2 → 12.0.0-dev.20260619.1
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/lib/AesPkcs5.js +12 -9
- package/lib/AesPkcs5.js.map +1 -1
- package/lib/AesPkcs5.mjs +2 -45
- package/lib/AesPkcs5.mjs.map +1 -1
- package/lib/AesPkcs52.mjs +53 -0
- package/lib/AesPkcs52.mjs.map +1 -0
- package/lib/EncryptedFetcher.js +77 -62
- package/lib/EncryptedFetcher.js.map +1 -1
- package/lib/EncryptedFetcher.mjs +2 -82
- package/lib/EncryptedFetcher.mjs.map +1 -1
- package/lib/EncryptedFetcher2.mjs +105 -0
- package/lib/EncryptedFetcher2.mjs.map +1 -0
- package/lib/FormDataInput.js +3 -3
- package/lib/FormDataInput.js.map +1 -1
- package/lib/FormDataInput.mjs +2 -1
- package/lib/FormDataInput.mjs.map +1 -1
- package/lib/FormDataInput2.mjs +6 -0
- package/lib/FormDataInput2.mjs.map +1 -0
- package/lib/HttpError.js +6 -11
- package/lib/HttpError.js.map +1 -1
- package/lib/HttpError.mjs +1 -1
- package/lib/HttpError2.mjs +16 -0
- package/lib/HttpError2.mjs.map +1 -0
- package/lib/IConnection.js +3 -3
- package/lib/IConnection.js.map +1 -1
- package/lib/IConnection.mjs +2 -1
- package/lib/IConnection.mjs.map +1 -1
- package/lib/IConnection2.mjs +6 -0
- package/lib/IConnection2.mjs.map +1 -0
- package/lib/IEncryptionPassword.js +3 -3
- package/lib/IEncryptionPassword.js.map +1 -1
- package/lib/IEncryptionPassword.mjs +2 -1
- package/lib/IEncryptionPassword.mjs.map +1 -1
- package/lib/IEncryptionPassword2.mjs +6 -0
- package/lib/IEncryptionPassword2.mjs.map +1 -0
- package/lib/IFetchEvent.js +21 -3
- package/lib/IFetchEvent.js.map +1 -1
- package/lib/IFetchEvent.mjs +2 -1
- package/lib/IFetchEvent.mjs.map +1 -1
- package/lib/IFetchEvent2.mjs +6 -0
- package/lib/IFetchEvent2.mjs.map +1 -0
- package/lib/IFetchRoute.js +3 -3
- package/lib/IFetchRoute.js.map +1 -1
- package/lib/IFetchRoute.mjs +2 -1
- package/lib/IFetchRoute.mjs.map +1 -1
- package/lib/IFetchRoute2.mjs +6 -0
- package/lib/IFetchRoute2.mjs.map +1 -0
- package/lib/IPropagation.js +3 -3
- package/lib/IPropagation.js.map +1 -1
- package/lib/IPropagation.mjs +2 -1
- package/lib/IPropagation.mjs.map +1 -1
- package/lib/IPropagation2.mjs +6 -0
- package/lib/IPropagation2.mjs.map +1 -0
- package/lib/NestiaSimulator.js +8 -8
- package/lib/NestiaSimulator.js.map +1 -1
- package/lib/NestiaSimulator.mjs +2 -43
- package/lib/NestiaSimulator.mjs.map +1 -1
- package/lib/NestiaSimulator2.mjs +49 -0
- package/lib/NestiaSimulator2.mjs.map +1 -0
- package/lib/PlainFetcher.js +38 -23
- package/lib/PlainFetcher.js.map +1 -1
- package/lib/PlainFetcher.mjs +2 -42
- package/lib/PlainFetcher.mjs.map +1 -1
- package/lib/PlainFetcher2.mjs +63 -0
- package/lib/PlainFetcher2.mjs.map +1 -0
- package/lib/_virtual/AesPkcs5.mjs +4 -0
- package/lib/_virtual/AesPkcs5.mjs.map +1 -0
- package/lib/_virtual/EncryptedFetcher.mjs +4 -0
- package/lib/_virtual/EncryptedFetcher.mjs.map +1 -0
- package/lib/_virtual/FetcherBase.mjs +4 -0
- package/lib/_virtual/FetcherBase.mjs.map +1 -0
- package/lib/_virtual/FormDataInput.mjs +4 -0
- package/lib/_virtual/FormDataInput.mjs.map +1 -0
- package/lib/_virtual/HttpError.mjs +4 -0
- package/lib/_virtual/HttpError.mjs.map +1 -0
- package/lib/_virtual/IConnection.mjs +4 -0
- package/lib/_virtual/IConnection.mjs.map +1 -0
- package/lib/_virtual/IEncryptionPassword.mjs +4 -0
- package/lib/_virtual/IEncryptionPassword.mjs.map +1 -0
- package/lib/_virtual/IFetchEvent.mjs +4 -0
- package/lib/_virtual/IFetchEvent.mjs.map +1 -0
- package/lib/_virtual/IFetchRoute.mjs +4 -0
- package/lib/_virtual/IFetchRoute.mjs.map +1 -0
- package/lib/_virtual/IPropagation.mjs +4 -0
- package/lib/_virtual/IPropagation.mjs.map +1 -0
- package/lib/_virtual/NestiaSimulator.mjs +4 -0
- package/lib/_virtual/NestiaSimulator.mjs.map +1 -0
- package/lib/_virtual/PlainFetcher.mjs +4 -0
- package/lib/_virtual/PlainFetcher.mjs.map +1 -0
- package/lib/_virtual/_commonjsHelpers.mjs +35 -0
- package/lib/_virtual/_commonjsHelpers.mjs.map +1 -0
- package/lib/_virtual/_node_crypto.mjs +7 -0
- package/lib/_virtual/_node_crypto.mjs.map +1 -0
- package/lib/_virtual/index.mjs +4 -0
- package/lib/_virtual/index.mjs.map +1 -0
- package/lib/_virtual/is_binary_response_content_type.mjs +4 -0
- package/lib/_virtual/is_binary_response_content_type.mjs.map +1 -0
- package/lib/_virtual/utils.mjs +7 -0
- package/lib/_virtual/utils.mjs.map +1 -0
- package/lib/index.js +26 -21
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +1 -3
- package/lib/index.mjs.map +1 -1
- package/lib/index2.mjs +53 -0
- package/lib/index2.mjs.map +1 -0
- package/lib/internal/FetcherBase.js +50 -44
- package/lib/internal/FetcherBase.js.map +1 -1
- package/lib/internal/FetcherBase.mjs +2 -189
- package/lib/internal/FetcherBase.mjs.map +1 -1
- package/lib/internal/FetcherBase2.mjs +203 -0
- package/lib/internal/FetcherBase2.mjs.map +1 -0
- package/lib/internal/is_binary_response_content_type.js +4 -4
- package/lib/internal/is_binary_response_content_type.js.map +1 -1
- package/lib/internal/is_binary_response_content_type.mjs +2 -12
- package/lib/internal/is_binary_response_content_type.mjs.map +1 -1
- package/lib/internal/is_binary_response_content_type2.mjs +18 -0
- package/lib/internal/is_binary_response_content_type2.mjs.map +1 -0
- package/package.json +5 -7
package/lib/HttpError.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "HttpError", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () { return utils.HttpError; }
|
|
10
|
-
});
|
|
11
|
-
//# sourceMappingURL=HttpError.js.map
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HttpError = void 0;
|
|
4
|
+
var utils_1 = require("@typia/utils");
|
|
5
|
+
Object.defineProperty(exports, "HttpError", { enumerable: true, get: function () { return utils_1.HttpError; } });
|
|
6
|
+
//# sourceMappingURL=HttpError.js.map
|
package/lib/HttpError.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpError.js","
|
|
1
|
+
{"version":3,"file":"HttpError.js","sourceRoot":"","sources":["../src/HttpError.ts"],"names":[],"mappings":";;;AAAA,sCAAyC;AAAhC,kGAAA,SAAS,OAAA"}
|
package/lib/HttpError.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { default } from './HttpError2.mjs';
|
|
2
2
|
//# sourceMappingURL=HttpError.mjs.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { getDefaultExportFromCjs } from './_virtual/_commonjsHelpers.mjs';
|
|
2
|
+
import { __exports as HttpError$1 } from './_virtual/HttpError.mjs';
|
|
3
|
+
import require$$0 from './_virtual/utils.mjs';
|
|
4
|
+
|
|
5
|
+
(function (exports) {
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.HttpError = void 0;
|
|
8
|
+
var utils_1 = require$$0;
|
|
9
|
+
Object.defineProperty(exports, "HttpError", { enumerable: true, get: function () { return utils_1.HttpError; } });
|
|
10
|
+
|
|
11
|
+
} (HttpError$1));
|
|
12
|
+
|
|
13
|
+
var HttpError = /*@__PURE__*/getDefaultExportFromCjs(HttpError$1);
|
|
14
|
+
|
|
15
|
+
export { HttpError as default };
|
|
16
|
+
//# sourceMappingURL=HttpError2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HttpError2.mjs","sources":["HttpError.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HttpError = void 0;\nvar utils_1 = require(\"@typia/utils\");\nObject.defineProperty(exports, \"HttpError\", { enumerable: true, get: function () { return utils_1.HttpError; } });\n//# sourceMappingURL=HttpError.js.map"],"names":[],"mappings":";;;;;CACA,MAAM,CAAC,cAAc,CAAA,OAAA,EAAU,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,CAAA,OAAA,CAAA,SAAA,GAAoB,MAAM;CAC1B,IAAI,OAAO,GAAG,UAAuB;CACrC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,OAAO,CAAC,SAAS,CAAC,CAAA,CAAE,EAAE,CAAC;AACjH;;;;;;;"}
|
package/lib/IConnection.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=IConnection.js.map
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=IConnection.js.map
|
package/lib/IConnection.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IConnection.js","
|
|
1
|
+
{"version":3,"file":"IConnection.js","sourceRoot":"","sources":["../src/IConnection.ts"],"names":[],"mappings":""}
|
package/lib/IConnection.mjs
CHANGED
package/lib/IConnection.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IConnection.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"IConnection.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IConnection2.mjs","sources":["IConnection.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IConnection.js.map"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,WAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;;;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=IEncryptionPassword.js.map
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=IEncryptionPassword.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IEncryptionPassword.js","
|
|
1
|
+
{"version":3,"file":"IEncryptionPassword.js","sourceRoot":"","sources":["../src/IEncryptionPassword.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IEncryptionPassword.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"IEncryptionPassword.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IEncryptionPassword2.mjs","sources":["IEncryptionPassword.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IEncryptionPassword.js.map"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,mBAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;;;"}
|
package/lib/IFetchEvent.js
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// export namespace IFetchEvent {
|
|
4
|
+
// export interface IFunction {
|
|
5
|
+
// (connection: IConnection, ...args: any[]): Promise<any>;
|
|
6
|
+
// METADATA: {
|
|
7
|
+
// method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
|
|
8
|
+
// path: string;
|
|
9
|
+
// request: null | {
|
|
10
|
+
// type: string;
|
|
11
|
+
// encrypted: boolean;
|
|
12
|
+
// };
|
|
13
|
+
// response: null | {
|
|
14
|
+
// type: string;
|
|
15
|
+
// encrypted: boolean;
|
|
16
|
+
// };
|
|
17
|
+
// };
|
|
18
|
+
// status: null | number;
|
|
19
|
+
// }
|
|
20
|
+
// }
|
|
21
|
+
//# sourceMappingURL=IFetchEvent.js.map
|
package/lib/IFetchEvent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IFetchEvent.js","
|
|
1
|
+
{"version":3,"file":"IFetchEvent.js","sourceRoot":"","sources":["../src/IFetchEvent.ts"],"names":[],"mappings":";;AAaA,iCAAiC;AACjC,iCAAiC;AACjC,+DAA+D;AAC/D,kBAAkB;AAClB,kFAAkF;AAClF,sBAAsB;AACtB,0BAA0B;AAC1B,wBAAwB;AACxB,8BAA8B;AAC9B,WAAW;AACX,2BAA2B;AAC3B,wBAAwB;AACxB,8BAA8B;AAC9B,WAAW;AACX,SAAS;AACT,6BAA6B;AAC7B,MAAM;AACN,IAAI"}
|
package/lib/IFetchEvent.mjs
CHANGED
package/lib/IFetchEvent.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IFetchEvent.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"IFetchEvent.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IFetchEvent2.mjs","sources":["IFetchEvent.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// export namespace IFetchEvent {\n// export interface IFunction {\n// (connection: IConnection, ...args: any[]): Promise<any>;\n// METADATA: {\n// method: \"GET\" | \"POST\" | \"PUT\" | \"DELETE\" | \"PATCH\" | \"HEAD\" | \"OPTIONS\";\n// path: string;\n// request: null | {\n// type: string;\n// encrypted: boolean;\n// };\n// response: null | {\n// type: string;\n// encrypted: boolean;\n// };\n// };\n// status: null | number;\n// }\n// }\n//# sourceMappingURL=IFetchEvent.js.map"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,WAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;;;"}
|
package/lib/IFetchRoute.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=IFetchRoute.js.map
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=IFetchRoute.js.map
|
package/lib/IFetchRoute.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IFetchRoute.js","
|
|
1
|
+
{"version":3,"file":"IFetchRoute.js","sourceRoot":"","sources":["../src/IFetchRoute.ts"],"names":[],"mappings":""}
|
package/lib/IFetchRoute.mjs
CHANGED
package/lib/IFetchRoute.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IFetchRoute.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"IFetchRoute.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IFetchRoute2.mjs","sources":["IFetchRoute.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IFetchRoute.js.map"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,WAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;;;"}
|
package/lib/IPropagation.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=IPropagation.js.map
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=IPropagation.js.map
|
package/lib/IPropagation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPropagation.js","
|
|
1
|
+
{"version":3,"file":"IPropagation.js","sourceRoot":"","sources":["../src/IPropagation.ts"],"names":[],"mappings":""}
|
package/lib/IPropagation.mjs
CHANGED
package/lib/IPropagation.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPropagation.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"IPropagation.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IPropagation2.mjs","sources":["IPropagation.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IPropagation.js.map"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,YAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;;;"}
|
package/lib/NestiaSimulator.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var utils = require('@typia/utils');
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
3
|
exports.NestiaSimulator = void 0;
|
|
4
|
+
const HttpError_1 = require("./HttpError");
|
|
5
|
+
var NestiaSimulator;
|
|
6
6
|
(function (NestiaSimulator) {
|
|
7
7
|
NestiaSimulator.assert = (props) => {
|
|
8
8
|
return {
|
|
@@ -22,11 +22,11 @@ exports.NestiaSimulator = void 0;
|
|
|
22
22
|
}
|
|
23
23
|
catch (exp) {
|
|
24
24
|
if (isTypeGuardError(exp))
|
|
25
|
-
throw new
|
|
25
|
+
throw new HttpError_1.HttpError(props.method, props.host + props.path, 400, {
|
|
26
26
|
"Content-Type": props.contentType,
|
|
27
27
|
}, JSON.stringify({
|
|
28
28
|
method: exp.method,
|
|
29
|
-
path: exp.path,
|
|
29
|
+
path: path !== null && path !== void 0 ? path : exp.path,
|
|
30
30
|
expected: exp.expected,
|
|
31
31
|
value: exp.value,
|
|
32
32
|
message: message(exp),
|
|
@@ -34,11 +34,11 @@ exports.NestiaSimulator = void 0;
|
|
|
34
34
|
throw exp;
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
})(
|
|
37
|
+
})(NestiaSimulator || (exports.NestiaSimulator = NestiaSimulator = {}));
|
|
38
38
|
const isTypeGuardError = (input) => "string" === typeof input.method &&
|
|
39
39
|
(undefined === input.path || "string" === typeof input.path) &&
|
|
40
40
|
"string" === typeof input.expected &&
|
|
41
41
|
"string" === typeof input.name &&
|
|
42
42
|
"string" === typeof input.message &&
|
|
43
43
|
(undefined === input.stack || "string" === typeof input.stack);
|
|
44
|
-
//# sourceMappingURL=NestiaSimulator.js.map
|
|
44
|
+
//# sourceMappingURL=NestiaSimulator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaSimulator.js","sources":["../src/NestiaSimulator.ts"],"
|
|
1
|
+
{"version":3,"file":"NestiaSimulator.js","sourceRoot":"","sources":["../src/NestiaSimulator.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AAExC,IAAiB,eAAe,CAgE/B;AAhED,WAAiB,eAAe;IAQjB,sBAAM,GAAG,CAAC,KAAa,EAAE,EAAE;QACtC,OAAO;YACL,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC;YACnB,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC;YACnB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC;SAClB,CAAC;IACJ,CAAC,CAAC;IACF,MAAM,KAAK,GACT,CAAC,KAAa,EAAE,EAAE,CAClB,CAAC,IAAY,EAAE,EAAE,CACjB,CAAI,IAAa,EAAQ,EAAE;QACzB,QAAQ,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,kBAAkB,IAAI,YAAY,GAAG,CAAC,QAAQ,QAAQ,CAAC,CACvE,KAAK,CACN,CAAC,IAAI,CAAC,CAAC;IACV,CAAC,CAAC;IAEJ,MAAM,KAAK,GACT,CAAC,KAAa,EAAE,EAAE,CAClB,CAAI,IAAa,EAAQ,EAAE,CACzB,QAAQ,CACN,GAAG,EAAE,CAAC,+DAA+D,CACtE,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC;IAEnB,MAAM,IAAI,GACR,CAAC,KAAa,EAAE,EAAE,CAClB,CAAI,IAAa,EAAQ,EAAE,CACzB,QAAQ,CAAC,GAAG,EAAE,CAAC,kDAAkD,CAAC,CAAC,KAAK,CAAC,CACvE,IAAI,CACL,CAAC;IAEN,MAAM,QAAQ,GACZ,CAAC,OAAwC,EAAE,IAAa,EAAE,EAAE,CAC5D,CAAC,KAAa,EAAE,EAAE,CAClB,CAAI,IAAa,EAAQ,EAAE;QACzB,IAAI,CAAC;YACH,IAAI,EAAE,CAAC;QACT,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,gBAAgB,CAAC,GAAG,CAAC;gBACvB,MAAM,IAAI,qBAAS,CACjB,KAAK,CAAC,MAAM,EACZ,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,EACvB,GAAG,EACH;oBACE,cAAc,EAAE,KAAK,CAAC,WAAW;iBAClC,EACD,IAAI,CAAC,SAAS,CAAC;oBACb,MAAM,EAAE,GAAG,CAAC,MAAM;oBAClB,IAAI,EAAE,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,GAAG,CAAC,IAAI;oBACtB,QAAQ,EAAE,GAAG,CAAC,QAAQ;oBACtB,KAAK,EAAE,GAAG,CAAC,KAAK;oBAChB,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC;iBACtB,CAAC,CACH,CAAC;YACJ,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC,CAAC;AACN,CAAC,EAhEgB,eAAe,aAAf,eAAe,GAAf,eAAe,QAgE/B;AAED,MAAM,gBAAgB,GAAG,CAAC,KAAU,EAA2B,EAAE,CAC/D,QAAQ,KAAK,OAAO,KAAK,CAAC,MAAM;IAChC,CAAC,SAAS,KAAK,KAAK,CAAC,IAAI,IAAI,QAAQ,KAAK,OAAO,KAAK,CAAC,IAAI,CAAC;IAC5D,QAAQ,KAAK,OAAO,KAAK,CAAC,QAAQ;IAClC,QAAQ,KAAK,OAAO,KAAK,CAAC,IAAI;IAC9B,QAAQ,KAAK,OAAO,KAAK,CAAC,OAAO;IACjC,CAAC,SAAS,KAAK,KAAK,CAAC,KAAK,IAAI,QAAQ,KAAK,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC"}
|
package/lib/NestiaSimulator.mjs
CHANGED
|
@@ -1,44 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var NestiaSimulator;
|
|
4
|
-
(function (NestiaSimulator) {
|
|
5
|
-
NestiaSimulator.assert = (props) => {
|
|
6
|
-
return {
|
|
7
|
-
param: param(props),
|
|
8
|
-
query: query(props),
|
|
9
|
-
body: body(props),
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
const param = (props) => (name) => (task) => {
|
|
13
|
-
validate((exp) => `URL parameter "${name}" is not ${exp.expected} type.`)(props)(task);
|
|
14
|
-
};
|
|
15
|
-
const query = (props) => (task) => validate(() => "Request query parameters are not following the promised type.")(props)(task);
|
|
16
|
-
const body = (props) => (task) => validate(() => "Request body is not following the promised type.")(props)(task);
|
|
17
|
-
const validate = (message, path) => (props) => (task) => {
|
|
18
|
-
try {
|
|
19
|
-
task();
|
|
20
|
-
}
|
|
21
|
-
catch (exp) {
|
|
22
|
-
if (isTypeGuardError(exp))
|
|
23
|
-
throw new HttpError(props.method, props.host + props.path, 400, {
|
|
24
|
-
"Content-Type": props.contentType,
|
|
25
|
-
}, JSON.stringify({
|
|
26
|
-
method: exp.method,
|
|
27
|
-
path: exp.path,
|
|
28
|
-
expected: exp.expected,
|
|
29
|
-
value: exp.value,
|
|
30
|
-
message: message(exp),
|
|
31
|
-
}));
|
|
32
|
-
throw exp;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
})(NestiaSimulator || (NestiaSimulator = {}));
|
|
36
|
-
const isTypeGuardError = (input) => "string" === typeof input.method &&
|
|
37
|
-
(undefined === input.path || "string" === typeof input.path) &&
|
|
38
|
-
"string" === typeof input.expected &&
|
|
39
|
-
"string" === typeof input.name &&
|
|
40
|
-
"string" === typeof input.message &&
|
|
41
|
-
(undefined === input.stack || "string" === typeof input.stack);
|
|
42
|
-
|
|
43
|
-
export { NestiaSimulator };
|
|
1
|
+
export { NestiaSimulator } from './NestiaSimulator2.mjs';
|
|
2
|
+
export { __exports as default } from './_virtual/NestiaSimulator.mjs';
|
|
44
3
|
//# sourceMappingURL=NestiaSimulator.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaSimulator.mjs","sources":[
|
|
1
|
+
{"version":3,"file":"NestiaSimulator.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { __exports as NestiaSimulator$1 } from './_virtual/NestiaSimulator.mjs';
|
|
2
|
+
import './HttpError2.mjs';
|
|
3
|
+
import { __exports as HttpError } from './_virtual/HttpError.mjs';
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(NestiaSimulator$1, "__esModule", { value: true });
|
|
6
|
+
var NestiaSimulator_2 = NestiaSimulator$1.NestiaSimulator = void 0;
|
|
7
|
+
const HttpError_1 = HttpError;
|
|
8
|
+
var NestiaSimulator;
|
|
9
|
+
(function (NestiaSimulator) {
|
|
10
|
+
NestiaSimulator.assert = (props) => {
|
|
11
|
+
return {
|
|
12
|
+
param: param(props),
|
|
13
|
+
query: query(props),
|
|
14
|
+
body: body(props),
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
const param = (props) => (name) => (task) => {
|
|
18
|
+
validate((exp) => `URL parameter "${name}" is not ${exp.expected} type.`)(props)(task);
|
|
19
|
+
};
|
|
20
|
+
const query = (props) => (task) => validate(() => "Request query parameters are not following the promised type.")(props)(task);
|
|
21
|
+
const body = (props) => (task) => validate(() => "Request body is not following the promised type.")(props)(task);
|
|
22
|
+
const validate = (message, path) => (props) => (task) => {
|
|
23
|
+
try {
|
|
24
|
+
task();
|
|
25
|
+
}
|
|
26
|
+
catch (exp) {
|
|
27
|
+
if (isTypeGuardError(exp))
|
|
28
|
+
throw new HttpError_1.HttpError(props.method, props.host + props.path, 400, {
|
|
29
|
+
"Content-Type": props.contentType,
|
|
30
|
+
}, JSON.stringify({
|
|
31
|
+
method: exp.method,
|
|
32
|
+
path: exp.path,
|
|
33
|
+
expected: exp.expected,
|
|
34
|
+
value: exp.value,
|
|
35
|
+
message: message(exp),
|
|
36
|
+
}));
|
|
37
|
+
throw exp;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
})(NestiaSimulator || (NestiaSimulator_2 = NestiaSimulator$1.NestiaSimulator = NestiaSimulator = {}));
|
|
41
|
+
const isTypeGuardError = (input) => "string" === typeof input.method &&
|
|
42
|
+
(undefined === input.path || "string" === typeof input.path) &&
|
|
43
|
+
"string" === typeof input.expected &&
|
|
44
|
+
"string" === typeof input.name &&
|
|
45
|
+
"string" === typeof input.message &&
|
|
46
|
+
(undefined === input.stack || "string" === typeof input.stack);
|
|
47
|
+
|
|
48
|
+
export { NestiaSimulator_2 as NestiaSimulator, NestiaSimulator$1 as default };
|
|
49
|
+
//# sourceMappingURL=NestiaSimulator2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NestiaSimulator2.mjs","sources":["NestiaSimulator.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NestiaSimulator = void 0;\nconst HttpError_1 = require(\"./HttpError\");\nvar NestiaSimulator;\n(function (NestiaSimulator) {\n NestiaSimulator.assert = (props) => {\n return {\n param: param(props),\n query: query(props),\n body: body(props),\n };\n };\n const param = (props) => (name) => (task) => {\n validate((exp) => `URL parameter \"${name}\" is not ${exp.expected} type.`)(props)(task);\n };\n const query = (props) => (task) => validate(() => \"Request query parameters are not following the promised type.\")(props)(task);\n const body = (props) => (task) => validate(() => \"Request body is not following the promised type.\")(props)(task);\n const validate = (message, path) => (props) => (task) => {\n try {\n task();\n }\n catch (exp) {\n if (isTypeGuardError(exp))\n throw new HttpError_1.HttpError(props.method, props.host + props.path, 400, {\n \"Content-Type\": props.contentType,\n }, JSON.stringify({\n method: exp.method,\n path: path !== null && path !== void 0 ? path : exp.path,\n expected: exp.expected,\n value: exp.value,\n message: message(exp),\n }));\n throw exp;\n }\n };\n})(NestiaSimulator || (exports.NestiaSimulator = NestiaSimulator = {}));\nconst isTypeGuardError = (input) => \"string\" === typeof input.method &&\n (undefined === input.path || \"string\" === typeof input.path) &&\n \"string\" === typeof input.expected &&\n \"string\" === typeof input.name &&\n \"string\" === typeof input.message &&\n (undefined === input.stack || \"string\" === typeof input.stack);\n//# sourceMappingURL=NestiaSimulator.js.map"],"names":["NestiaSimulator_1","require$$0"],"mappings":";;;;AACA,MAAM,CAAC,cAAc,CAACA,iBAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,IAAA,iBAAA,GAAAA,iBAAA,CAAA,eAAuB,GAAG;AAC1B,MAAM,WAAW,GAAGC,SAAsB;AAC1C,IAAI,eAAe;AACnB,CAAC,UAAU,eAAe,EAAE;AAC5B,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,KAAK,KAAK;AACxC,QAAQ,OAAO;AACf,YAAY,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC;AAC/B,YAAY,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC;AAC/B,YAAY,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC;AAC7B,SAAS;AACT,IAAA,CAAK;AACL,IAAI,MAAM,KAAK,GAAG,CAAC,KAAK,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK;AACjD,QAAQ,QAAQ,CAAC,CAAC,GAAG,KAAK,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,EAAE,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;AAC9F,IAAA,CAAK;AACL,IAAI,MAAM,KAAK,GAAG,CAAC,KAAK,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,MAAM,+DAA+D,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;AACnI,IAAI,MAAM,IAAI,GAAG,CAAC,KAAK,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,MAAM,kDAAkD,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;AACrH,IAAI,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,IAAI,KAAK,CAAC,KAAK,KAAK,CAAC,IAAI,KAAK;AAC7D,QAAQ,IAAI;AACZ,YAAY,IAAI,EAAE;AAClB,QAAA;AACA,QAAQ,OAAO,GAAG,EAAE;AACpB,YAAY,IAAI,gBAAgB,CAAC,GAAG,CAAC;AACrC,gBAAgB,MAAM,IAAI,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE;AAC5F,oBAAoB,cAAc,EAAE,KAAK,CAAC,WAAW;AACrD,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;AAClC,oBAAoB,MAAM,EAAE,GAAG,CAAC,MAAM;AACtC,oBAAoB,IAAI,EAA4C,GAAG,CAAC,IAAI;AAC5E,oBAAoB,QAAQ,EAAE,GAAG,CAAC,QAAQ;AAC1C,oBAAoB,KAAK,EAAE,GAAG,CAAC,KAAK;AACpC,oBAAoB,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC;AACzC,iBAAiB,CAAC,CAAC;AACnB,YAAY,MAAM,GAAG;AACrB,QAAA;AACA,IAAA,CAAK;AACL,CAAC,EAAE,eAAe,KAAK,iBAAA,GAAAD,iBAAA,CAAA,eAAuB,GAAG,eAAe,GAAG,EAAE,CAAC,CAAC;AACvE,MAAM,gBAAgB,GAAG,CAAC,KAAK,KAAK,QAAQ,KAAK,OAAO,KAAK,CAAC,MAAM;AACpE,KAAK,SAAS,KAAK,KAAK,CAAC,IAAI,IAAI,QAAQ,KAAK,OAAO,KAAK,CAAC,IAAI,CAAC;AAChE,IAAI,QAAQ,KAAK,OAAO,KAAK,CAAC,QAAQ;AACtC,IAAI,QAAQ,KAAK,OAAO,KAAK,CAAC,IAAI;AAClC,IAAI,QAAQ,KAAK,OAAO,KAAK,CAAC,OAAO;AACrC,KAAK,SAAS,KAAK,KAAK,CAAC,KAAK,IAAI,QAAQ,KAAK,OAAO,KAAK,CAAC,KAAK,CAAC;;;;"}
|
package/lib/PlainFetcher.js
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PlainFetcher = void 0;
|
|
13
|
+
const FetcherBase_1 = require("./internal/FetcherBase");
|
|
5
14
|
/**
|
|
6
15
|
* Utility class for `fetch` functions used in `@nestia/sdk`.
|
|
7
16
|
*
|
|
@@ -17,27 +26,33 @@ var FetcherBase = require('./internal/FetcherBase.js');
|
|
|
17
26
|
*
|
|
18
27
|
* @author Jeongho Nam - https://github.com/samchon
|
|
19
28
|
*/
|
|
20
|
-
|
|
29
|
+
var PlainFetcher;
|
|
21
30
|
(function (PlainFetcher) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
function fetch(connection, route, input, stringify) {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
var _a, _b;
|
|
34
|
+
if (((_a = route.request) === null || _a === void 0 ? void 0 : _a.encrypted) === true || ((_b = route.response) === null || _b === void 0 ? void 0 : _b.encrypted) === true)
|
|
35
|
+
throw new Error("Error on PlainFetcher.fetch(): PlainFetcher doesn't have encryption ability. Use EncryptedFetcher instead.");
|
|
36
|
+
return FetcherBase_1.FetcherBase.request({
|
|
37
|
+
className: "PlainFetcher",
|
|
38
|
+
encode: (input) => input,
|
|
39
|
+
decode: (input) => input,
|
|
40
|
+
})(connection, route, input, stringify);
|
|
41
|
+
});
|
|
30
42
|
}
|
|
31
43
|
PlainFetcher.fetch = fetch;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
44
|
+
function propagate(connection, route, input, stringify) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
var _a, _b;
|
|
47
|
+
if (((_a = route.request) === null || _a === void 0 ? void 0 : _a.encrypted) === true || ((_b = route.response) === null || _b === void 0 ? void 0 : _b.encrypted) === true)
|
|
48
|
+
throw new Error("Error on PlainFetcher.propagate(): PlainFetcher doesn't have encryption ability. Use EncryptedFetcher instead.");
|
|
49
|
+
return FetcherBase_1.FetcherBase.propagate({
|
|
50
|
+
className: "PlainFetcher",
|
|
51
|
+
encode: (input) => input,
|
|
52
|
+
decode: (input) => input,
|
|
53
|
+
})(connection, route, input, stringify);
|
|
54
|
+
});
|
|
40
55
|
}
|
|
41
56
|
PlainFetcher.propagate = propagate;
|
|
42
|
-
})(
|
|
43
|
-
//# sourceMappingURL=PlainFetcher.js.map
|
|
57
|
+
})(PlainFetcher || (exports.PlainFetcher = PlainFetcher = {}));
|
|
58
|
+
//# sourceMappingURL=PlainFetcher.js.map
|
package/lib/PlainFetcher.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlainFetcher.js","sources":["../src/PlainFetcher.ts"],"
|
|
1
|
+
{"version":3,"file":"PlainFetcher.js","sourceRoot":"","sources":["../src/PlainFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,wDAAqD;AAErD;;;;;;;;;;;;;;GAcG;AACH,IAAiB,YAAY,CAoF5B;AApFD,WAAiB,YAAY;IAuC3B,SAAsB,KAAK,CACzB,UAAuB,EACvB,KAAwE,EACxE,KAAa,EACb,SAAoC;;;YAEpC,IAAI,CAAA,MAAA,KAAK,CAAC,OAAO,0CAAE,SAAS,MAAK,IAAI,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,SAAS,MAAK,IAAI;gBACzE,MAAM,IAAI,KAAK,CACb,4GAA4G,CAC7G,CAAC;YACJ,OAAO,yBAAW,CAAC,OAAO,CAAC;gBACzB,SAAS,EAAE,cAAc;gBACzB,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK;gBACxB,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK;aACzB,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;QAC1C,CAAC;KAAA;IAfqB,aAAA,KAAK,QAe1B,CAAA;IAcD,SAAsB,SAAS,CAC7B,UAAuB,EACvB,KAAwE,EACxE,KAAa,EACb,SAAoC;;;YAEpC,IAAI,CAAA,MAAA,KAAK,CAAC,OAAO,0CAAE,SAAS,MAAK,IAAI,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,SAAS,MAAK,IAAI;gBACzE,MAAM,IAAI,KAAK,CACb,gHAAgH,CACjH,CAAC;YACJ,OAAO,yBAAW,CAAC,SAAS,CAAC;gBAC3B,SAAS,EAAE,cAAc;gBACzB,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK;gBACxB,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK;aACzB,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,CAAoB,CAAC;QAC7D,CAAC;KAAA;IAfqB,aAAA,SAAS,YAe9B,CAAA;AACH,CAAC,EApFgB,YAAY,aAAZ,YAAY,GAAZ,YAAY,QAoF5B"}
|
package/lib/PlainFetcher.mjs
CHANGED
|
@@ -1,43 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Utility class for `fetch` functions used in `@nestia/sdk`.
|
|
5
|
-
*
|
|
6
|
-
* `PlainFetcher` is a utility class designed for SDK functions generated by
|
|
7
|
-
* [`@nestia/sdk`](https://nestia.io/docs/sdk/sdk), interacting with the remote
|
|
8
|
-
* HTTP sever API. In other words, this is a collection of dedicated `fetch()`
|
|
9
|
-
* functions for `@nestia/sdk`.
|
|
10
|
-
*
|
|
11
|
-
* For reference, `PlainFetcher` class does not encrypt or decrypt the body data
|
|
12
|
-
* at all. It just delivers plain data without any post processing. If you've
|
|
13
|
-
* defined a controller method through `@EncryptedRoute` or `@EncryptedBody`
|
|
14
|
-
* decorator, then {@liink EncryptedFetcher} class would be used instead.
|
|
15
|
-
*
|
|
16
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
17
|
-
*/
|
|
18
|
-
var PlainFetcher;
|
|
19
|
-
(function (PlainFetcher) {
|
|
20
|
-
async function fetch(connection, route, input, stringify) {
|
|
21
|
-
if (route.request?.encrypted === true || route.response?.encrypted === true)
|
|
22
|
-
throw new Error("Error on PlainFetcher.fetch(): PlainFetcher doesn't have encryption ability. Use EncryptedFetcher instead.");
|
|
23
|
-
return FetcherBase.request({
|
|
24
|
-
className: "PlainFetcher",
|
|
25
|
-
encode: (input) => input,
|
|
26
|
-
decode: (input) => input,
|
|
27
|
-
})(connection, route, input, stringify);
|
|
28
|
-
}
|
|
29
|
-
PlainFetcher.fetch = fetch;
|
|
30
|
-
async function propagate(connection, route, input, stringify) {
|
|
31
|
-
if (route.request?.encrypted === true || route.response?.encrypted === true)
|
|
32
|
-
throw new Error("Error on PlainFetcher.propagate(): PlainFetcher doesn't have encryption ability. Use EncryptedFetcher instead.");
|
|
33
|
-
return FetcherBase.propagate({
|
|
34
|
-
className: "PlainFetcher",
|
|
35
|
-
encode: (input) => input,
|
|
36
|
-
decode: (input) => input,
|
|
37
|
-
})(connection, route, input, stringify);
|
|
38
|
-
}
|
|
39
|
-
PlainFetcher.propagate = propagate;
|
|
40
|
-
})(PlainFetcher || (PlainFetcher = {}));
|
|
41
|
-
|
|
42
|
-
export { PlainFetcher };
|
|
1
|
+
export { PlainFetcher } from './PlainFetcher2.mjs';
|
|
2
|
+
export { __exports as default } from './_virtual/PlainFetcher.mjs';
|
|
43
3
|
//# sourceMappingURL=PlainFetcher.mjs.map
|
package/lib/PlainFetcher.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlainFetcher.mjs","sources":[
|
|
1
|
+
{"version":3,"file":"PlainFetcher.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|