@modern-js/create-request 2.18.0 → 2.19.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.
- package/dist/cjs/node.js +2 -2
- package/dist/esm/node.js +1 -1
- package/dist/esm-node/node.js +1 -1
- package/package.json +5 -5
package/dist/cjs/node.js
CHANGED
|
@@ -15,7 +15,7 @@ _export(exports, {
|
|
|
15
15
|
});
|
|
16
16
|
const _nodefetch = /* @__PURE__ */ _interop_require_default(require("node-fetch"));
|
|
17
17
|
const _pathtoregexp = require("path-to-regexp");
|
|
18
|
-
const
|
|
18
|
+
const _runtimenode = require("@modern-js/utils/runtime-node");
|
|
19
19
|
const _querystring = /* @__PURE__ */ _interop_require_default(require("query-string"));
|
|
20
20
|
const _handleRes = require("./handleRes");
|
|
21
21
|
function _interop_require_default(obj) {
|
|
@@ -43,7 +43,7 @@ const createRequest = (path, method, port, httpMethodDecider = "functionName", f
|
|
|
43
43
|
const keys = [];
|
|
44
44
|
(0, _pathtoregexp.pathToRegexp)(path, keys);
|
|
45
45
|
const sender = (...args) => {
|
|
46
|
-
const webRequestHeaders = (0,
|
|
46
|
+
const webRequestHeaders = (0, _runtimenode.useHeaders)();
|
|
47
47
|
let body;
|
|
48
48
|
let headers;
|
|
49
49
|
let url;
|
package/dist/esm/node.js
CHANGED
|
@@ -34,7 +34,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
34
34
|
}
|
|
35
35
|
import nodeFetch from "node-fetch";
|
|
36
36
|
import { compile, pathToRegexp } from "path-to-regexp";
|
|
37
|
-
import { useHeaders } from "@modern-js/utils/
|
|
37
|
+
import { useHeaders } from "@modern-js/utils/runtime-node";
|
|
38
38
|
import qs from "query-string";
|
|
39
39
|
import { handleRes } from "./handleRes";
|
|
40
40
|
var realRequest;
|
package/dist/esm-node/node.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import nodeFetch from "node-fetch";
|
|
2
2
|
import { compile, pathToRegexp } from "path-to-regexp";
|
|
3
|
-
import { useHeaders } from "@modern-js/utils/
|
|
3
|
+
import { useHeaders } from "@modern-js/utils/runtime-node";
|
|
4
4
|
import qs from "query-string";
|
|
5
5
|
import { handleRes } from "./handleRes";
|
|
6
6
|
let realRequest;
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.19.0",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"node-fetch": "^2.6.1",
|
|
65
65
|
"path-to-regexp": "^6.2.0",
|
|
66
66
|
"query-string": "^7.1.1",
|
|
67
|
-
"@modern-js/utils": "2.
|
|
67
|
+
"@modern-js/utils": "2.19.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@types/jest": "^29",
|
|
@@ -74,9 +74,9 @@
|
|
|
74
74
|
"jest": "^29",
|
|
75
75
|
"nock": "^13.2.1",
|
|
76
76
|
"typescript": "^4",
|
|
77
|
-
"@modern-js/types": "2.
|
|
78
|
-
"@scripts/build": "2.
|
|
79
|
-
"@scripts/jest-config": "2.
|
|
77
|
+
"@modern-js/types": "2.19.0",
|
|
78
|
+
"@scripts/build": "2.19.0",
|
|
79
|
+
"@scripts/jest-config": "2.19.0"
|
|
80
80
|
},
|
|
81
81
|
"sideEffects": false,
|
|
82
82
|
"publishConfig": {
|