@modern-js/plugin-data-loader 0.0.0-next-20221210182423 → 0.0.0-next-20221211034006
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/CHANGELOG.md
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
# @modern-js/plugin-data-loader
|
|
2
2
|
|
|
3
|
-
## 0.0.0-next-
|
|
3
|
+
## 0.0.0-next-20221211034006
|
|
4
4
|
|
|
5
5
|
### Major Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- dda38c9c3e: chore: v2
|
|
8
8
|
|
|
9
9
|
### Minor Changes
|
|
10
10
|
|
|
11
|
-
-
|
|
11
|
+
- b710adb843: feat: extract the data loader
|
|
12
12
|
feat: 提取 data loader
|
|
13
|
-
-
|
|
13
|
+
- 543be9558e: feat: compile server loader and support handle loader request
|
|
14
14
|
feat: 编译 server loader 并支持处理 loader 的请求
|
|
15
15
|
|
|
16
16
|
### Patch Changes
|
|
17
17
|
|
|
18
|
-
-
|
|
18
|
+
- 6604f1b8b3: feat: support router basename
|
|
19
19
|
feat: router 插件支持设置 basename
|
|
20
|
-
-
|
|
20
|
+
- 2e6031955e: fix: some optimizations for router and loader
|
|
21
21
|
fix: 一些 router 和 loader 的优化
|
|
22
22
|
q
|
|
23
|
-
-
|
|
23
|
+
- ea7cf06257: chore: bump webpack/babel-loader/postcss-loader/tsconfig-paths
|
|
24
24
|
|
|
25
25
|
chore: 升级 webpack/babel-loader/postcss-loader/tsconfig-paths 版本
|
|
26
26
|
|
|
27
|
-
- Updated dependencies [
|
|
28
|
-
- Updated dependencies [
|
|
29
|
-
- Updated dependencies [
|
|
30
|
-
- Updated dependencies [
|
|
31
|
-
- Updated dependencies [
|
|
32
|
-
- Updated dependencies [
|
|
33
|
-
- Updated dependencies [
|
|
34
|
-
- Updated dependencies [
|
|
35
|
-
- Updated dependencies [
|
|
36
|
-
- Updated dependencies [
|
|
37
|
-
- Updated dependencies [
|
|
38
|
-
- Updated dependencies [
|
|
39
|
-
- Updated dependencies [
|
|
40
|
-
- Updated dependencies [
|
|
41
|
-
- Updated dependencies [
|
|
42
|
-
- Updated dependencies [
|
|
43
|
-
- Updated dependencies [
|
|
44
|
-
- Updated dependencies [
|
|
45
|
-
- Updated dependencies [
|
|
46
|
-
- @modern-js/utils@0.0.0-next-
|
|
47
|
-
- @modern-js/babel-compiler@0.0.0-next-
|
|
27
|
+
- Updated dependencies [7879e8f711]
|
|
28
|
+
- Updated dependencies [6aca875011]
|
|
29
|
+
- Updated dependencies [2e6031955e]
|
|
30
|
+
- Updated dependencies [92f0eade39]
|
|
31
|
+
- Updated dependencies [edd1cfb1af]
|
|
32
|
+
- Updated dependencies [cc971eabfc]
|
|
33
|
+
- Updated dependencies [5b9049f2e9]
|
|
34
|
+
- Updated dependencies [92004d1906]
|
|
35
|
+
- Updated dependencies [b8bbe036c7]
|
|
36
|
+
- Updated dependencies [d5a31df781]
|
|
37
|
+
- Updated dependencies [dda38c9c3e]
|
|
38
|
+
- Updated dependencies [3bbea92b2a]
|
|
39
|
+
- Updated dependencies [b710adb843]
|
|
40
|
+
- Updated dependencies [ea7cf06257]
|
|
41
|
+
- Updated dependencies [bbe4c4ab64]
|
|
42
|
+
- Updated dependencies [e4558a0bc4]
|
|
43
|
+
- Updated dependencies [abf3421a75]
|
|
44
|
+
- Updated dependencies [543be9558e]
|
|
45
|
+
- Updated dependencies [14b712da84]
|
|
46
|
+
- @modern-js/utils@0.0.0-next-20221211034006
|
|
47
|
+
- @modern-js/babel-compiler@0.0.0-next-20221211034006
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
2
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3
|
-
function _defineProperty(obj, key, value) {
|
|
4
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
5
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
3
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
4
|
import { installGlobals, writeReadableStreamToWritable, Response as NodeResponse } from '@remix-run/node';
|
|
7
5
|
import { matchRoutes } from 'react-router-dom';
|
|
8
6
|
import { LOADER_ROUTES_DIR } from '@modern-js/utils';
|
|
@@ -13,9 +13,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
13
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
14
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
15
15
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16
|
-
function _defineProperty(obj, key, value) {
|
|
17
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
18
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
16
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
17
|
// Polyfill Web Fetch API
|
|
20
18
|
(0, _node.installGlobals)();
|
|
21
19
|
const LOADER_SEARCH_PARAM = '_loader';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ServerPlugin } from '@modern-js/server-core';
|
|
2
2
|
import type { ModernServerContext, ServerRoute } from '@modern-js/types';
|
|
3
3
|
import { Response as NodeResponse } from '@remix-run/node';
|
|
4
|
-
export type ServerContext = Pick<ModernServerContext, 'req' | 'res' | 'params' | 'headers' | 'method' | 'url' | 'host' | 'protocol' | 'origin' | 'href' | 'path' | 'query'>;
|
|
4
|
+
export declare type ServerContext = Pick<ModernServerContext, 'req' | 'res' | 'params' | 'headers' | 'method' | 'url' | 'host' | 'protocol' | 'origin' | 'href' | 'path' | 'query'>;
|
|
5
5
|
export declare function isRedirectResponse(response: NodeResponse): boolean;
|
|
6
6
|
export declare function isResponse(value: any): value is NodeResponse;
|
|
7
7
|
export declare const getPathWithoutEntry: (pathname: string, entryPath: string) => string;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "0.0.0-next-
|
|
14
|
+
"version": "0.0.0-next-20221211034006",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"@remix-run/node": "^1.7.0",
|
|
44
44
|
"path-to-regexp": "^6.2.0",
|
|
45
45
|
"react-router-dom": "^6.4.4",
|
|
46
|
-
"@modern-js/babel-compiler": "0.0.0-next-
|
|
47
|
-
"@modern-js/utils": "0.0.0-next-
|
|
46
|
+
"@modern-js/babel-compiler": "0.0.0-next-20221211034006",
|
|
47
|
+
"@modern-js/utils": "0.0.0-next-20221211034006"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/babel__core": "^7.1.15",
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
"typescript": "^4",
|
|
60
60
|
"webpack": "^5.75.0",
|
|
61
61
|
"webpack-chain": "^6.5.1",
|
|
62
|
-
"@modern-js/core": "0.0.0-next-
|
|
63
|
-
"@modern-js/server-core": "0.0.0-next-
|
|
64
|
-
"@modern-js/types": "0.0.0-next-
|
|
65
|
-
"@scripts/
|
|
66
|
-
"@scripts/
|
|
62
|
+
"@modern-js/core": "0.0.0-next-20221211034006",
|
|
63
|
+
"@modern-js/server-core": "0.0.0-next-20221211034006",
|
|
64
|
+
"@modern-js/types": "0.0.0-next-20221211034006",
|
|
65
|
+
"@scripts/build": "0.0.0-next-20221211034006",
|
|
66
|
+
"@scripts/jest-config": "0.0.0-next-20221211034006"
|
|
67
67
|
},
|
|
68
68
|
"sideEffects": false,
|
|
69
69
|
"publishConfig": {
|