dinou 9.3.0 → 10.0.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/CHANGELOG.md +196 -0
- package/README.md +157 -132
- package/dinou/adapters/bun.js +34 -5
- package/dinou/adapters/cloudflare.js +110 -17
- package/dinou/adapters/deno.js +46 -8
- package/dinou/adapters/netlify.js +86 -50
- package/dinou/adapters/node.js +8 -0
- package/dinou/assets.d.ts +32 -5
- package/dinou/bun/build.js +190 -106
- package/dinou/cli.js +992 -532
- package/dinou/cloudflare/build.js +187 -106
- package/dinou/compiled/autoprefixer/index.js +509 -517
- package/dinou/compiled/babel-core/index.js +738 -716
- package/dinou/compiled/babel-generator/index.js +341 -299
- package/dinou/compiled/babel-loader/index.js +766 -744
- package/dinou/compiled/babel-parser/index.js +2 -2
- package/dinou/compiled/babel-plugin-react-compiler/index.js +178 -178
- package/dinou/compiled/babel-plugin-syntax-import-meta/index.js +4 -4
- package/dinou/compiled/babel-preset-react/index.js +752 -730
- package/dinou/compiled/babel-preset-typescript/index.js +738 -716
- package/dinou/compiled/babel-traverse/index.js +463 -433
- package/dinou/compiled/babel-types/index.js +176 -176
- package/dinou/compiled/chokidar/index.js +4 -4
- package/dinou/compiled/commander/index.js +15 -15
- package/dinou/compiled/copy-webpack-plugin/index.js +433 -425
- package/dinou/compiled/css-loader/index.js +289 -289
- package/dinou/compiled/css-loader/runtime/api.js +85 -0
- package/dinou/compiled/css-loader/runtime/getUrl.js +26 -0
- package/dinou/compiled/css-loader/runtime/noSourceMaps.js +5 -0
- package/dinou/compiled/css-loader/runtime/package.json +3 -0
- package/dinou/compiled/css-loader/runtime/sourceMaps.js +16 -0
- package/dinou/compiled/fast-glob/index.js +5810 -0
- package/dinou/compiled/generic-names/index.js +16 -16
- package/dinou/compiled/mini-css-extract-plugin/{chunk-YYEJWYXE.js → chunk-R6DP5ZYM.js} +36 -36
- package/dinou/compiled/mini-css-extract-plugin/hmr/hotModuleReplacement.js +253 -0
- package/dinou/compiled/mini-css-extract-plugin/hmr/normalize-url.js +39 -0
- package/dinou/compiled/mini-css-extract-plugin/hmr/package.json +3 -0
- package/dinou/compiled/mini-css-extract-plugin/index.js +1 -1
- package/dinou/compiled/mini-css-extract-plugin/loader.js +5 -5
- package/dinou/compiled/postcss/index.js +83 -83
- package/dinou/compiled/postcss-import/index.js +147 -117
- package/dinou/compiled/postcss-modules/index.js +216 -216
- package/dinou/compiled/resolve/index.js +1224 -0
- package/dinou/compiled/rollup-plugin-babel/index.js +753 -731
- package/dinou/compiled/rollup-plugin-commonjs/index.js +43 -38
- package/dinou/compiled/rollup-plugin-delete/index.js +615 -253
- package/dinou/compiled/rollup-plugin-json/index.js +22 -18
- package/dinou/compiled/rollup-plugin-node-resolve/index.js +130 -100
- package/dinou/compiled/rollup-plugin-postcss/index.js +3299 -3277
- package/dinou/compiled/rollup-plugin-replace/index.js +34 -29
- package/dinou/compiled/tailwindcss-postcss/index.js +214 -211
- package/dinou/compiled/vendors-manifest.json +59 -83
- package/dinou/core/asset-extensions.js +482 -33
- package/dinou/core/bailout-proxy.js +21 -2
- package/dinou/core/build-static-pages.js +523 -371
- package/dinou/core/builtin-asset-extensions.js +63 -0
- package/dinou/core/cache-revalidate.js +449 -256
- package/dinou/core/cache-slot.js +289 -79
- package/dinou/core/client-webpack.jsx +470 -39
- package/dinou/core/client.jsx +402 -39
- package/dinou/core/config.js +3 -0
- package/dinou/core/copy-static-dirs.js +98 -0
- package/dinou/core/createScopedName.js +22 -4
- package/dinou/core/dinou-paths.js +1 -1
- package/dinou/core/discover-layouts.js +200 -0
- package/dinou/core/edge-ssr.js +1 -1
- package/dinou/core/ensure-vendor-mode.js +78 -19
- package/dinou/core/env.js +544 -0
- package/dinou/core/export-static.js +41 -9
- package/dinou/core/generate-route-types.js +989 -95
- package/dinou/core/generate-static-rsc.js +5 -6
- package/dinou/core/generate-static.js +45 -6
- package/dinou/core/get-abs-path-with-ext.js +217 -75
- package/dinou/core/get-asset-from-manifest.js +19 -8
- package/dinou/core/get-error-jsx.js +4 -5
- package/dinou/core/get-file-path-and-dynamic-params.js +561 -338
- package/dinou/core/get-jsx.js +220 -53
- package/dinou/core/handler.js +1647 -466
- package/dinou/core/import-module.js +7 -0
- package/dinou/core/layout-functions.js +72 -13
- package/dinou/core/link.jsx +34 -6
- package/dinou/core/load-dinou-config.js +520 -89
- package/dinou/core/manifest-provider.js +4 -14
- package/dinou/core/navigation-utils.js +141 -3
- package/dinou/core/navigation.js +134 -50
- package/dinou/core/node-middleware-runner.js +165 -0
- package/dinou/core/postcss-pipeline.js +236 -0
- package/dinou/core/ppr-context.js +114 -22
- package/dinou/core/ppr-runtime.js +391 -127
- package/dinou/core/redirect.jsx +1 -1
- package/dinou/core/render-jsx-to-client-jsx.js +216 -48
- package/dinou/core/request-context.js +59 -3
- package/dinou/core/resolve-contextual-dinou.js +523 -0
- package/dinou/core/resolve-setup-files.js +85 -27
- package/dinou/core/revalidating.js +10 -2
- package/dinou/core/route-generator.js +6 -2
- package/dinou/core/rsc-renderer.js +4 -1
- package/dinou/core/run-ssg.js +6 -0
- package/dinou/core/runtime-env.js +265 -0
- package/dinou/core/server-css-modules-plugin.js +155 -0
- package/dinou/core/server-function-proxy-webpack.js +27 -2
- package/dinou/core/server-function-proxy.js +27 -2
- package/dinou/core/slot.js +47 -2
- package/dinou/core/static-assets.js +503 -0
- package/dinou/core/storage-adapter.js +452 -24
- package/dinou/core/transform-server-functions.js +272 -24
- package/dinou/core/tsconfig-aliases.js +964 -0
- package/dinou/core/uneject.js +640 -0
- package/dinou/core/url-resolver.js +1 -1
- package/dinou/core/vfs.js +11 -2
- package/dinou/css.d.ts +4 -1
- package/dinou/deno/build.js +205 -153
- package/dinou/deno/seed-kv.js +4 -0
- package/dinou/env.d.ts +22 -2
- package/dinou/esbuild/build.js +40 -50
- package/dinou/esbuild/dev.js +33 -7
- package/dinou/esbuild/helpers-esbuild/get-config-esbuild-prod.js +41 -16
- package/dinou/esbuild/helpers-esbuild/get-config-esbuild.js +51 -49
- package/dinou/esbuild/helpers-esbuild/get-esbuild-entries.js +73 -60
- package/dinou/esbuild/helpers-esbuild/swc-disk-cache.js +35 -16
- package/dinou/esbuild/helpers-esbuild/write.js +13 -3
- package/dinou/esbuild/plugins-esbuild/assets-plugin.js +100 -238
- package/dinou/esbuild/plugins-esbuild/babel-react-compiler-plugin.js +73 -29
- package/dinou/esbuild/plugins-esbuild/css-processor-plugin.js +283 -91
- package/dinou/esbuild/plugins-esbuild/manifest-generator-plugin.js +3 -5
- package/dinou/esbuild/plugins-esbuild/react-client-manifest-plugin.js +9 -3
- package/dinou/esbuild/plugins-esbuild/server-functions-plugin.js +4 -3
- package/dinou/esbuild/plugins-esbuild/stable-chunk-names-and-maps-plugin.js +10 -1
- package/dinou/esbuild/plugins-postcss/postcss-extract-plugin.js +84 -21
- package/dinou/esbuild/react-refresh/esm-hmr/client.js +31 -10
- package/dinou/esbuild/react-refresh/esm-hmr-plugin.js +48 -18
- package/dinou/esbuild/react-refresh/is-react-refresh-boundary.js +9 -1
- package/dinou/esbuild/react-refresh/react-refresh-runtime.js +13 -7
- package/dinou/index.d.ts +1028 -88
- package/dinou/node/build.js +138 -74
- package/dinou/node/bundle-dual-engine.js +393 -131
- package/dinou/node/dev.js +1005 -275
- package/dinou/package.json +11 -34
- package/dinou/rollup/postcss.config.js +3 -4
- package/dinou/rollup/react-refresh/esm-hmr/client.js +31 -10
- package/dinou/rollup/react-refresh/react-refresh-wrap-modules.js +16 -13
- package/dinou/rollup/react-refresh/rollup-plugin-esm-hmr.js +53 -7
- package/dinou/rollup/rollup-plugins/dinou-asset-plugin.js +58 -20
- package/dinou/rollup/rollup-plugins/manifest-generator-plugin.js +16 -7
- package/dinou/rollup/rollup-plugins/rollup-plugin-react-client-manifest.js +118 -42
- package/dinou/rollup/rollup-plugins/rollup-plugin-server-functions.js +48 -36
- package/dinou/rollup/rollup.config.js +174 -101
- package/dinou/scripts/build-vendors.js +123 -33
- package/dinou/server.d.ts +126 -15
- package/dinou/webpack/helpers/get-webpack-entries.js +87 -41
- package/dinou/webpack/helpers/patch-webpack-internals.js +93 -1
- package/dinou/webpack/loaders/server-functions-loader.js +1 -1
- package/dinou/webpack/plugins/manifest-generator-plugin.js +27 -7
- package/dinou/webpack/plugins/server-functions-plugin.js +39 -12
- package/dinou/webpack/plugins/webpack-memory-plugin.js +25 -12
- package/dinou/webpack/postcss.config.js +3 -4
- package/dinou/webpack/webpack.config.js +408 -132
- package/eject.js +6 -224
- package/package.json +7 -9
- package/dinou/compiled/cross-env/index.js +0 -661
- package/dinou/compiled/dotenv/index.js +0 -375
- package/dinou/compiled/esbuild-copy-static-files/index.js +0 -63
- package/dinou/compiled/esbuild-tsconfig-paths/index.js +0 -1314
- package/dinou/compiled/rollup-plugin-copy/index.js +0 -12066
- package/dinou/compiled/rollup-plugin-tsconfig-paths/index.js +0 -569
- package/dinou/compiled/tsconfig-paths-webpack-plugin/index.js +0 -3956
|
@@ -15,9 +15,9 @@ var __commonJS = (cb, mod) => function __require2() {
|
|
|
15
15
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
//
|
|
18
|
+
// node_modules/loader-utils/lib/hash/wasm-hash.js
|
|
19
19
|
var require_wasm_hash = __commonJS({
|
|
20
|
-
"
|
|
20
|
+
"node_modules/loader-utils/lib/hash/wasm-hash.js"(exports, module) {
|
|
21
21
|
"use strict";
|
|
22
22
|
var MAX_SHORT_STRING = Math.floor((65536 - 64) / 4) & ~3;
|
|
23
23
|
var WasmHash = class {
|
|
@@ -177,9 +177,9 @@ var require_wasm_hash = __commonJS({
|
|
|
177
177
|
}
|
|
178
178
|
});
|
|
179
179
|
|
|
180
|
-
//
|
|
180
|
+
// node_modules/loader-utils/lib/hash/xxhash64.js
|
|
181
181
|
var require_xxhash64 = __commonJS({
|
|
182
|
-
"
|
|
182
|
+
"node_modules/loader-utils/lib/hash/xxhash64.js"(exports, module) {
|
|
183
183
|
"use strict";
|
|
184
184
|
var create = require_wasm_hash();
|
|
185
185
|
var xxhash64 = new WebAssembly.Module(
|
|
@@ -193,9 +193,9 @@ var require_xxhash64 = __commonJS({
|
|
|
193
193
|
}
|
|
194
194
|
});
|
|
195
195
|
|
|
196
|
-
//
|
|
196
|
+
// node_modules/loader-utils/lib/hash/BatchedHash.js
|
|
197
197
|
var require_BatchedHash = __commonJS({
|
|
198
|
-
"
|
|
198
|
+
"node_modules/loader-utils/lib/hash/BatchedHash.js"(exports, module) {
|
|
199
199
|
var MAX_SHORT_STRING = require_wasm_hash().MAX_SHORT_STRING;
|
|
200
200
|
var BatchedHash = class {
|
|
201
201
|
constructor(hash) {
|
|
@@ -247,9 +247,9 @@ var require_BatchedHash = __commonJS({
|
|
|
247
247
|
}
|
|
248
248
|
});
|
|
249
249
|
|
|
250
|
-
//
|
|
250
|
+
// node_modules/loader-utils/lib/hash/md4.js
|
|
251
251
|
var require_md4 = __commonJS({
|
|
252
|
-
"
|
|
252
|
+
"node_modules/loader-utils/lib/hash/md4.js"(exports, module) {
|
|
253
253
|
"use strict";
|
|
254
254
|
var create = require_wasm_hash();
|
|
255
255
|
var md4 = new WebAssembly.Module(
|
|
@@ -263,9 +263,9 @@ var require_md4 = __commonJS({
|
|
|
263
263
|
}
|
|
264
264
|
});
|
|
265
265
|
|
|
266
|
-
//
|
|
266
|
+
// node_modules/loader-utils/lib/hash/BulkUpdateDecorator.js
|
|
267
267
|
var require_BulkUpdateDecorator = __commonJS({
|
|
268
|
-
"
|
|
268
|
+
"node_modules/loader-utils/lib/hash/BulkUpdateDecorator.js"(exports, module) {
|
|
269
269
|
var BULK_SIZE = 2e3;
|
|
270
270
|
var digestCaches = {};
|
|
271
271
|
var BulkUpdateDecorator = class {
|
|
@@ -346,9 +346,9 @@ var require_BulkUpdateDecorator = __commonJS({
|
|
|
346
346
|
}
|
|
347
347
|
});
|
|
348
348
|
|
|
349
|
-
//
|
|
349
|
+
// node_modules/loader-utils/lib/getHashDigest.js
|
|
350
350
|
var require_getHashDigest = __commonJS({
|
|
351
|
-
"
|
|
351
|
+
"node_modules/loader-utils/lib/getHashDigest.js"(exports, module) {
|
|
352
352
|
"use strict";
|
|
353
353
|
var baseEncodeTables = {
|
|
354
354
|
26: "abcdefghijklmnopqrstuvwxyz",
|
|
@@ -446,9 +446,9 @@ var require_getHashDigest = __commonJS({
|
|
|
446
446
|
}
|
|
447
447
|
});
|
|
448
448
|
|
|
449
|
-
//
|
|
449
|
+
// node_modules/loader-utils/lib/interpolateName.js
|
|
450
450
|
var require_interpolateName = __commonJS({
|
|
451
|
-
"
|
|
451
|
+
"node_modules/loader-utils/lib/interpolateName.js"(exports, module) {
|
|
452
452
|
"use strict";
|
|
453
453
|
var path = __require("path");
|
|
454
454
|
var getHashDigest = require_getHashDigest();
|
|
@@ -528,9 +528,9 @@ var require_interpolateName = __commonJS({
|
|
|
528
528
|
}
|
|
529
529
|
});
|
|
530
530
|
|
|
531
|
-
//
|
|
531
|
+
// node_modules/generic-names/index.js
|
|
532
532
|
var require_generic_names = __commonJS({
|
|
533
|
-
"
|
|
533
|
+
"node_modules/generic-names/index.js"(exports, module) {
|
|
534
534
|
var interpolateName = require_interpolateName();
|
|
535
535
|
var path = __require("path");
|
|
536
536
|
module.exports = function createGenerator(pattern, options) {
|
|
@@ -15,9 +15,9 @@ var __commonJS = (cb, mod) => function __require2() {
|
|
|
15
15
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
//
|
|
18
|
+
// node_modules/tapable/lib/Hook.js
|
|
19
19
|
var require_Hook = __commonJS({
|
|
20
|
-
"
|
|
20
|
+
"node_modules/tapable/lib/Hook.js"(exports, module) {
|
|
21
21
|
"use strict";
|
|
22
22
|
var util = __require("util");
|
|
23
23
|
var deprecateContext = util.deprecate(
|
|
@@ -203,9 +203,9 @@ var require_Hook = __commonJS({
|
|
|
203
203
|
}
|
|
204
204
|
});
|
|
205
205
|
|
|
206
|
-
//
|
|
206
|
+
// node_modules/tapable/lib/HookCodeFactory.js
|
|
207
207
|
var require_HookCodeFactory = __commonJS({
|
|
208
|
-
"
|
|
208
|
+
"node_modules/tapable/lib/HookCodeFactory.js"(exports, module) {
|
|
209
209
|
"use strict";
|
|
210
210
|
var HookCodeFactory = class {
|
|
211
211
|
constructor(config) {
|
|
@@ -685,9 +685,9 @@ ${this.header()}${this.contentWithInterceptors({
|
|
|
685
685
|
}
|
|
686
686
|
});
|
|
687
687
|
|
|
688
|
-
//
|
|
688
|
+
// node_modules/tapable/lib/AsyncParallelBailHook.js
|
|
689
689
|
var require_AsyncParallelBailHook = __commonJS({
|
|
690
|
-
"
|
|
690
|
+
"node_modules/tapable/lib/AsyncParallelBailHook.js"(exports, module) {
|
|
691
691
|
"use strict";
|
|
692
692
|
var Hook = require_Hook();
|
|
693
693
|
var HookCodeFactory = require_HookCodeFactory();
|
|
@@ -767,9 +767,9 @@ var require_AsyncParallelBailHook = __commonJS({
|
|
|
767
767
|
}
|
|
768
768
|
});
|
|
769
769
|
|
|
770
|
-
//
|
|
770
|
+
// node_modules/tapable/lib/AsyncParallelHook.js
|
|
771
771
|
var require_AsyncParallelHook = __commonJS({
|
|
772
|
-
"
|
|
772
|
+
"node_modules/tapable/lib/AsyncParallelHook.js"(exports, module) {
|
|
773
773
|
"use strict";
|
|
774
774
|
var Hook = require_Hook();
|
|
775
775
|
var HookCodeFactory = require_HookCodeFactory();
|
|
@@ -799,9 +799,9 @@ var require_AsyncParallelHook = __commonJS({
|
|
|
799
799
|
}
|
|
800
800
|
});
|
|
801
801
|
|
|
802
|
-
//
|
|
802
|
+
// node_modules/tapable/lib/AsyncSeriesBailHook.js
|
|
803
803
|
var require_AsyncSeriesBailHook = __commonJS({
|
|
804
|
-
"
|
|
804
|
+
"node_modules/tapable/lib/AsyncSeriesBailHook.js"(exports, module) {
|
|
805
805
|
"use strict";
|
|
806
806
|
var Hook = require_Hook();
|
|
807
807
|
var HookCodeFactory = require_HookCodeFactory();
|
|
@@ -839,9 +839,9 @@ ${next()}}
|
|
|
839
839
|
}
|
|
840
840
|
});
|
|
841
841
|
|
|
842
|
-
//
|
|
842
|
+
// node_modules/tapable/lib/AsyncSeriesHook.js
|
|
843
843
|
var require_AsyncSeriesHook = __commonJS({
|
|
844
|
-
"
|
|
844
|
+
"node_modules/tapable/lib/AsyncSeriesHook.js"(exports, module) {
|
|
845
845
|
"use strict";
|
|
846
846
|
var Hook = require_Hook();
|
|
847
847
|
var HookCodeFactory = require_HookCodeFactory();
|
|
@@ -871,9 +871,9 @@ var require_AsyncSeriesHook = __commonJS({
|
|
|
871
871
|
}
|
|
872
872
|
});
|
|
873
873
|
|
|
874
|
-
//
|
|
874
|
+
// node_modules/tapable/lib/AsyncSeriesLoopHook.js
|
|
875
875
|
var require_AsyncSeriesLoopHook = __commonJS({
|
|
876
|
-
"
|
|
876
|
+
"node_modules/tapable/lib/AsyncSeriesLoopHook.js"(exports, module) {
|
|
877
877
|
"use strict";
|
|
878
878
|
var Hook = require_Hook();
|
|
879
879
|
var HookCodeFactory = require_HookCodeFactory();
|
|
@@ -903,9 +903,9 @@ var require_AsyncSeriesLoopHook = __commonJS({
|
|
|
903
903
|
}
|
|
904
904
|
});
|
|
905
905
|
|
|
906
|
-
//
|
|
906
|
+
// node_modules/tapable/lib/AsyncSeriesWaterfallHook.js
|
|
907
907
|
var require_AsyncSeriesWaterfallHook = __commonJS({
|
|
908
|
-
"
|
|
908
|
+
"node_modules/tapable/lib/AsyncSeriesWaterfallHook.js"(exports, module) {
|
|
909
909
|
"use strict";
|
|
910
910
|
var Hook = require_Hook();
|
|
911
911
|
var HookCodeFactory = require_HookCodeFactory();
|
|
@@ -948,9 +948,9 @@ var require_AsyncSeriesWaterfallHook = __commonJS({
|
|
|
948
948
|
}
|
|
949
949
|
});
|
|
950
950
|
|
|
951
|
-
//
|
|
951
|
+
// node_modules/tapable/lib/HookMap.js
|
|
952
952
|
var require_HookMap = __commonJS({
|
|
953
|
-
"
|
|
953
|
+
"node_modules/tapable/lib/HookMap.js"(exports, module) {
|
|
954
954
|
"use strict";
|
|
955
955
|
var util = __require("util");
|
|
956
956
|
var defaultFactory = (key, hook) => hook;
|
|
@@ -1002,9 +1002,9 @@ var require_HookMap = __commonJS({
|
|
|
1002
1002
|
}
|
|
1003
1003
|
});
|
|
1004
1004
|
|
|
1005
|
-
//
|
|
1005
|
+
// node_modules/tapable/lib/MultiHook.js
|
|
1006
1006
|
var require_MultiHook = __commonJS({
|
|
1007
|
-
"
|
|
1007
|
+
"node_modules/tapable/lib/MultiHook.js"(exports, module) {
|
|
1008
1008
|
"use strict";
|
|
1009
1009
|
var MultiHook = class _MultiHook {
|
|
1010
1010
|
constructor(hooks, name = void 0) {
|
|
@@ -1053,9 +1053,9 @@ var require_MultiHook = __commonJS({
|
|
|
1053
1053
|
}
|
|
1054
1054
|
});
|
|
1055
1055
|
|
|
1056
|
-
//
|
|
1056
|
+
// node_modules/tapable/lib/SyncBailHook.js
|
|
1057
1057
|
var require_SyncBailHook = __commonJS({
|
|
1058
|
-
"
|
|
1058
|
+
"node_modules/tapable/lib/SyncBailHook.js"(exports, module) {
|
|
1059
1059
|
"use strict";
|
|
1060
1060
|
var Hook = require_Hook();
|
|
1061
1061
|
var HookCodeFactory = require_HookCodeFactory();
|
|
@@ -1100,9 +1100,9 @@ ${next()}}
|
|
|
1100
1100
|
}
|
|
1101
1101
|
});
|
|
1102
1102
|
|
|
1103
|
-
//
|
|
1103
|
+
// node_modules/tapable/lib/SyncHook.js
|
|
1104
1104
|
var require_SyncHook = __commonJS({
|
|
1105
|
-
"
|
|
1105
|
+
"node_modules/tapable/lib/SyncHook.js"(exports, module) {
|
|
1106
1106
|
"use strict";
|
|
1107
1107
|
var Hook = require_Hook();
|
|
1108
1108
|
var HookCodeFactory = require_HookCodeFactory();
|
|
@@ -1139,9 +1139,9 @@ var require_SyncHook = __commonJS({
|
|
|
1139
1139
|
}
|
|
1140
1140
|
});
|
|
1141
1141
|
|
|
1142
|
-
//
|
|
1142
|
+
// node_modules/tapable/lib/SyncLoopHook.js
|
|
1143
1143
|
var require_SyncLoopHook = __commonJS({
|
|
1144
|
-
"
|
|
1144
|
+
"node_modules/tapable/lib/SyncLoopHook.js"(exports, module) {
|
|
1145
1145
|
"use strict";
|
|
1146
1146
|
var Hook = require_Hook();
|
|
1147
1147
|
var HookCodeFactory = require_HookCodeFactory();
|
|
@@ -1178,9 +1178,9 @@ var require_SyncLoopHook = __commonJS({
|
|
|
1178
1178
|
}
|
|
1179
1179
|
});
|
|
1180
1180
|
|
|
1181
|
-
//
|
|
1181
|
+
// node_modules/tapable/lib/SyncWaterfallHook.js
|
|
1182
1182
|
var require_SyncWaterfallHook = __commonJS({
|
|
1183
|
-
"
|
|
1183
|
+
"node_modules/tapable/lib/SyncWaterfallHook.js"(exports, module) {
|
|
1184
1184
|
"use strict";
|
|
1185
1185
|
var Hook = require_Hook();
|
|
1186
1186
|
var HookCodeFactory = require_HookCodeFactory();
|
|
@@ -1231,9 +1231,9 @@ var require_SyncWaterfallHook = __commonJS({
|
|
|
1231
1231
|
}
|
|
1232
1232
|
});
|
|
1233
1233
|
|
|
1234
|
-
//
|
|
1234
|
+
// node_modules/tapable/lib/index.js
|
|
1235
1235
|
var require_lib = __commonJS({
|
|
1236
|
-
"
|
|
1236
|
+
"node_modules/tapable/lib/index.js"(exports, module) {
|
|
1237
1237
|
"use strict";
|
|
1238
1238
|
module.exports.AsyncParallelBailHook = require_AsyncParallelBailHook();
|
|
1239
1239
|
module.exports.AsyncParallelHook = require_AsyncParallelHook();
|
|
@@ -1251,9 +1251,9 @@ var require_lib = __commonJS({
|
|
|
1251
1251
|
}
|
|
1252
1252
|
});
|
|
1253
1253
|
|
|
1254
|
-
//
|
|
1254
|
+
// node_modules/mini-css-extract-plugin/dist/plugin-options.json
|
|
1255
1255
|
var require_plugin_options = __commonJS({
|
|
1256
|
-
"
|
|
1256
|
+
"node_modules/mini-css-extract-plugin/dist/plugin-options.json"(exports, module) {
|
|
1257
1257
|
module.exports = {
|
|
1258
1258
|
title: "Mini CSS Extract Plugin options",
|
|
1259
1259
|
type: "object",
|
|
@@ -1336,9 +1336,9 @@ var require_plugin_options = __commonJS({
|
|
|
1336
1336
|
}
|
|
1337
1337
|
});
|
|
1338
1338
|
|
|
1339
|
-
//
|
|
1339
|
+
// node_modules/mini-css-extract-plugin/dist/utils.js
|
|
1340
1340
|
var require_utils = __commonJS({
|
|
1341
|
-
"
|
|
1341
|
+
"node_modules/mini-css-extract-plugin/dist/utils.js"(exports, module) {
|
|
1342
1342
|
"use strict";
|
|
1343
1343
|
var NativeModule = __require("module");
|
|
1344
1344
|
var path = __require("path");
|
|
@@ -1611,9 +1611,9 @@ var require_utils = __commonJS({
|
|
|
1611
1611
|
}
|
|
1612
1612
|
});
|
|
1613
1613
|
|
|
1614
|
-
//
|
|
1614
|
+
// node_modules/mini-css-extract-plugin/dist/index.js
|
|
1615
1615
|
var require_dist = __commonJS({
|
|
1616
|
-
"
|
|
1616
|
+
"node_modules/mini-css-extract-plugin/dist/index.js"(exports, module) {
|
|
1617
1617
|
var path = __require("path");
|
|
1618
1618
|
var {
|
|
1619
1619
|
validate
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* global document */
|
|
4
|
+
/*
|
|
5
|
+
eslint-disable
|
|
6
|
+
no-console,
|
|
7
|
+
func-names
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var normalizeUrl = require("./normalize-url");
|
|
11
|
+
var srcByModuleId = Object.create(null);
|
|
12
|
+
var noDocument = typeof document === "undefined";
|
|
13
|
+
var forEach = Array.prototype.forEach;
|
|
14
|
+
|
|
15
|
+
/* eslint-disable jsdoc/reject-function-type */
|
|
16
|
+
/**
|
|
17
|
+
* @param {Function} fn any function
|
|
18
|
+
* @param {number} time time
|
|
19
|
+
* @returns {() => void} wrapped function
|
|
20
|
+
*/
|
|
21
|
+
function debounce(fn, time) {
|
|
22
|
+
var timeout = 0;
|
|
23
|
+
return function () {
|
|
24
|
+
// @ts-expect-error
|
|
25
|
+
var self = this;
|
|
26
|
+
// eslint-disable-next-line prefer-rest-params
|
|
27
|
+
var args = arguments;
|
|
28
|
+
// eslint-disable-next-line func-style
|
|
29
|
+
var functionCall = function functionCall() {
|
|
30
|
+
return fn.apply(self, args);
|
|
31
|
+
};
|
|
32
|
+
clearTimeout(timeout);
|
|
33
|
+
|
|
34
|
+
// @ts-expect-error
|
|
35
|
+
timeout = setTimeout(functionCall, time);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/* eslint-enable jsdoc/reject-function-type */
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @returns {void}
|
|
42
|
+
*/
|
|
43
|
+
function noop() {}
|
|
44
|
+
|
|
45
|
+
/** @typedef {(filename?: string) => string[]} GetScriptSrc */
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @param {string | number} moduleId a module id
|
|
49
|
+
* @returns {GetScriptSrc} current script url
|
|
50
|
+
*/
|
|
51
|
+
function getCurrentScriptUrl(moduleId) {
|
|
52
|
+
var src = srcByModuleId[moduleId];
|
|
53
|
+
if (!src) {
|
|
54
|
+
if (document.currentScript) {
|
|
55
|
+
src = (/** @type {HTMLScriptElement} */document.currentScript).src;
|
|
56
|
+
} else {
|
|
57
|
+
var scripts = document.getElementsByTagName("script");
|
|
58
|
+
var lastScriptTag = scripts[scripts.length - 1];
|
|
59
|
+
if (lastScriptTag) {
|
|
60
|
+
src = lastScriptTag.src;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
srcByModuleId[moduleId] = src;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** @type {GetScriptSrc} */
|
|
67
|
+
return function (fileMap) {
|
|
68
|
+
if (!src) {
|
|
69
|
+
return [];
|
|
70
|
+
}
|
|
71
|
+
var splitResult = src.split(/([^\\/]+)\.js$/);
|
|
72
|
+
var filename = splitResult && splitResult[1];
|
|
73
|
+
if (!filename) {
|
|
74
|
+
return [src.replace(".js", ".css")];
|
|
75
|
+
}
|
|
76
|
+
if (!fileMap) {
|
|
77
|
+
return [src.replace(".js", ".css")];
|
|
78
|
+
}
|
|
79
|
+
return fileMap.split(",").map(function (mapRule) {
|
|
80
|
+
var reg = new RegExp("".concat(filename, "\\.js$"), "g");
|
|
81
|
+
return normalizeUrl(src.replace(reg, "".concat(mapRule.replace(/{fileName}/g, filename), ".css")));
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @param {string} url URL
|
|
88
|
+
* @returns {boolean} true when URL can be request, otherwise false
|
|
89
|
+
*/
|
|
90
|
+
function isUrlRequest(url) {
|
|
91
|
+
// An URL is not an request if
|
|
92
|
+
|
|
93
|
+
// It is not http or https
|
|
94
|
+
if (!/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(url)) {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** @typedef {HTMLLinkElement & { isLoaded: boolean, visited: boolean }} HotHTMLLinkElement */
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @param {HotHTMLLinkElement} el html link element
|
|
104
|
+
* @param {string=} url a URL
|
|
105
|
+
*/
|
|
106
|
+
function updateCss(el, url) {
|
|
107
|
+
if (!url) {
|
|
108
|
+
if (!el.href) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// eslint-disable-next-line
|
|
113
|
+
url = el.href.split("?")[0];
|
|
114
|
+
}
|
|
115
|
+
if (!isUrlRequest(/** @type {string} */url)) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
if (el.isLoaded === false) {
|
|
119
|
+
// We seem to be about to replace a css link that hasn't loaded yet.
|
|
120
|
+
// We're probably changing the same file more than once.
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// eslint-disable-next-line unicorn/prefer-includes
|
|
125
|
+
if (!url || !(url.indexOf(".css") > -1)) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
el.visited = true;
|
|
129
|
+
var newEl = /** @type {HotHTMLLinkElement} */
|
|
130
|
+
el.cloneNode();
|
|
131
|
+
newEl.isLoaded = false;
|
|
132
|
+
newEl.addEventListener("load", function () {
|
|
133
|
+
if (newEl.isLoaded) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
newEl.isLoaded = true;
|
|
137
|
+
if (el.parentNode) {
|
|
138
|
+
el.parentNode.removeChild(el);
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
newEl.addEventListener("error", function () {
|
|
142
|
+
if (newEl.isLoaded) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
newEl.isLoaded = true;
|
|
146
|
+
if (el.parentNode) {
|
|
147
|
+
el.parentNode.removeChild(el);
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
newEl.href = "".concat(url, "?").concat(Date.now());
|
|
151
|
+
if (el.parentNode) {
|
|
152
|
+
if (el.nextSibling) {
|
|
153
|
+
el.parentNode.insertBefore(newEl, el.nextSibling);
|
|
154
|
+
} else {
|
|
155
|
+
el.parentNode.appendChild(newEl);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @param {string} href href
|
|
162
|
+
* @param {string[]} src src
|
|
163
|
+
* @returns {undefined | string} a reload url
|
|
164
|
+
*/
|
|
165
|
+
function getReloadUrl(href, src) {
|
|
166
|
+
var ret;
|
|
167
|
+
href = normalizeUrl(href);
|
|
168
|
+
src.some(
|
|
169
|
+
/**
|
|
170
|
+
* @param {string} url url
|
|
171
|
+
*/
|
|
172
|
+
// eslint-disable-next-line array-callback-return
|
|
173
|
+
function (url) {
|
|
174
|
+
// @ts-expect-error fix me in the next major release
|
|
175
|
+
// eslint-disable-next-line unicorn/prefer-includes
|
|
176
|
+
if (href.indexOf(src) > -1) {
|
|
177
|
+
ret = url;
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
return ret;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* @param {string[]} src source
|
|
185
|
+
* @returns {boolean} true when loaded, otherwise false
|
|
186
|
+
*/
|
|
187
|
+
function reloadStyle(src) {
|
|
188
|
+
var elements = document.querySelectorAll("link");
|
|
189
|
+
var loaded = false;
|
|
190
|
+
forEach.call(elements, function (el) {
|
|
191
|
+
if (!el.href) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
var url = getReloadUrl(el.href, src);
|
|
195
|
+
if (url && !isUrlRequest(url)) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
if (el.visited === true) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
if (url) {
|
|
202
|
+
updateCss(el, url);
|
|
203
|
+
loaded = true;
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
return loaded;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* @returns {void}
|
|
211
|
+
*/
|
|
212
|
+
function reloadAll() {
|
|
213
|
+
var elements = document.querySelectorAll("link");
|
|
214
|
+
forEach.call(elements, function (el) {
|
|
215
|
+
if (el.visited === true) {
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
updateCss(el);
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* @param {number | string} moduleId a module id
|
|
224
|
+
* @param {{ filename?: string, locals?: boolean }} options options
|
|
225
|
+
* @returns {() => void} wrapper function
|
|
226
|
+
*/
|
|
227
|
+
module.exports = function (moduleId, options) {
|
|
228
|
+
if (noDocument) {
|
|
229
|
+
console.log("no window.document found, will not HMR CSS");
|
|
230
|
+
return noop;
|
|
231
|
+
}
|
|
232
|
+
var getScriptSrc = getCurrentScriptUrl(moduleId);
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* @returns {void}
|
|
236
|
+
*/
|
|
237
|
+
function update() {
|
|
238
|
+
var src = getScriptSrc(options.filename);
|
|
239
|
+
var reloaded = reloadStyle(src);
|
|
240
|
+
if (options.locals) {
|
|
241
|
+
console.log("[HMR] Detected local css modules. Reload all css");
|
|
242
|
+
reloadAll();
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
if (reloaded) {
|
|
246
|
+
console.log("[HMR] css reload %s", src.join(" "));
|
|
247
|
+
} else {
|
|
248
|
+
console.log("[HMR] Reload all css");
|
|
249
|
+
reloadAll();
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
return debounce(update, 50);
|
|
253
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @param {string[]} pathComponents path components
|
|
5
|
+
* @returns {string} normalized url
|
|
6
|
+
*/
|
|
7
|
+
function normalizeUrlInner(pathComponents) {
|
|
8
|
+
return pathComponents.reduce(function (accumulator, item) {
|
|
9
|
+
switch (item) {
|
|
10
|
+
case "..":
|
|
11
|
+
accumulator.pop();
|
|
12
|
+
break;
|
|
13
|
+
case ".":
|
|
14
|
+
break;
|
|
15
|
+
default:
|
|
16
|
+
accumulator.push(item);
|
|
17
|
+
}
|
|
18
|
+
return accumulator;
|
|
19
|
+
}, /** @type {string[]} */[]).join("/");
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @param {string} urlString url string
|
|
24
|
+
* @returns {string} normalized url string
|
|
25
|
+
*/
|
|
26
|
+
module.exports = function normalizeUrl(urlString) {
|
|
27
|
+
urlString = urlString.trim();
|
|
28
|
+
if (/^data:/i.test(urlString)) {
|
|
29
|
+
return urlString;
|
|
30
|
+
}
|
|
31
|
+
var protocol =
|
|
32
|
+
// eslint-disable-next-line unicorn/prefer-includes
|
|
33
|
+
urlString.indexOf("//") !== -1 ? "".concat(urlString.split("//")[0], "//") : "";
|
|
34
|
+
var components = urlString.replace(new RegExp(protocol, "i"), "").split("/");
|
|
35
|
+
var host = components[0].toLowerCase().replace(/\.$/, "");
|
|
36
|
+
components[0] = "";
|
|
37
|
+
var path = normalizeUrlInner(components);
|
|
38
|
+
return protocol + host + path;
|
|
39
|
+
};
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
__require,
|
|
10
10
|
require_dist,
|
|
11
11
|
require_utils
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-R6DP5ZYM.js";
|
|
13
13
|
|
|
14
|
-
//
|
|
14
|
+
// node_modules/mini-css-extract-plugin/dist/loader-options.json
|
|
15
15
|
var require_loader_options = __commonJS({
|
|
16
|
-
"
|
|
16
|
+
"node_modules/mini-css-extract-plugin/dist/loader-options.json"(exports, module) {
|
|
17
17
|
module.exports = {
|
|
18
18
|
title: "Mini CSS Extract Plugin Loader options",
|
|
19
19
|
type: "object",
|
|
@@ -54,9 +54,9 @@ var require_loader_options = __commonJS({
|
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
|
|
57
|
-
//
|
|
57
|
+
// node_modules/mini-css-extract-plugin/dist/loader.js
|
|
58
58
|
var require_loader = __commonJS({
|
|
59
|
-
"
|
|
59
|
+
"node_modules/mini-css-extract-plugin/dist/loader.js"(exports, module) {
|
|
60
60
|
var path = __require("path");
|
|
61
61
|
var schema = require_loader_options();
|
|
62
62
|
var {
|