@flatjs/evolve 2.1.0-next.28 → 2.1.0-next.3
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/constants.d.ts +0 -9
- package/dist/constants.js +1 -1
- package/dist/create-webpack/create-externals.d.ts +1 -1
- package/dist/create-webpack/create-externals.js +1 -1
- package/dist/create-webpack/create-optimization.d.ts +1 -1
- package/dist/create-webpack/create-optimization.js +1 -1
- package/dist/create-webpack/create-output.d.ts +1 -1
- package/dist/create-webpack/create-performance.d.ts +1 -1
- package/dist/create-webpack/create-plugins.d.ts +1 -2
- package/dist/create-webpack/create-plugins.js +1 -1
- package/dist/create-webpack/create-resolve.js +1 -1
- package/dist/create-webpack/create-rule-sets.d.ts +1 -1
- package/dist/create-webpack/create-rule-sets.js +1 -1
- package/dist/create-webpack/load-webpack-config.d.ts +1 -2
- package/dist/create-webpack/load-webpack-config.js +1 -1
- package/dist/create-webpack/rule-sets/rule-assets.d.ts +2 -2
- package/dist/create-webpack/rule-sets/rule-assets.js +1 -1
- package/dist/create-webpack/rule-sets/rule-css.js +1 -1
- package/dist/create-webpack/rule-sets/rule-scripts.d.ts +0 -2
- package/dist/create-webpack/rule-sets/rule-scripts.js +1 -1
- package/dist/create-webpack/types.d.ts +1 -1
- package/dist/default-options.js +1 -1
- package/dist/define-config/define-config.d.ts +2 -2
- package/dist/dev-server/add-compiler-to-dev-server.js +1 -1
- package/dist/dev-server/create-dev-server-compiler-tasks.d.ts +3 -0
- package/dist/dev-server/create-dev-server-compiler-tasks.js +1 -0
- package/dist/dev-server/create-dev-server-entries.d.ts +1 -1
- package/dist/dev-server/create-dev-server-entries.js +1 -1
- package/dist/dev-server/create-dev-server.js +1 -1
- package/dist/dev-server/index.d.ts +3 -3
- package/dist/dev-server/index.js +1 -1
- package/dist/dev-server/middlewares/get-bundle-asset.d.ts +1 -1
- package/dist/dev-server/middlewares/get-page-main-html.js +1 -1
- package/dist/dev-server/middlewares/get-page-module-html.js +1 -1
- package/dist/helpers/assert-only-single-entry-item.d.ts +7 -0
- package/dist/helpers/assert-only-single-entry-item.js +1 -0
- package/dist/helpers/get-bundle-file-name.d.ts +1 -1
- package/dist/helpers/index.d.ts +4 -18
- package/dist/helpers/index.js +1 -1
- package/dist/helpers/json-serializer.js +1 -1
- package/dist/helpers/normalize-entry-map.d.ts +0 -1
- package/dist/helpers/normalize-entry-map.js +1 -1
- package/dist/helpers/open-page.js +1 -1
- package/dist/helpers/refresh-evolve-mock-options.js +1 -1
- package/dist/helpers/script-injects.d.ts +1 -1
- package/dist/helpers/should-enable-react-fast-refresh.js +1 -1
- package/dist/helpers/split-to-multi-compiler.d.ts +8 -0
- package/dist/helpers/split-to-multi-compiler.js +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/load-config/load-evolve-config.js +1 -1
- package/dist/loaders/loader-icon.cjs +1 -2
- package/dist/main/create-thread-worker.d.ts +14 -29
- package/dist/main/create-thread-worker.js +1 -1
- package/dist/main/index.d.ts +1 -1
- package/dist/main/index.js +1 -1
- package/dist/main/prepare-build.d.ts +3 -4
- package/dist/main/prepare-build.js +1 -1
- package/dist/main/prepare-serve.d.ts +1 -1
- package/dist/main/prepare-serve.js +1 -1
- package/dist/main/start-build-dynamic.d.ts +2 -2
- package/dist/main/start-build-dynamic.js +1 -1
- package/dist/main/start-build-worker.d.ts +6 -17
- package/dist/main/start-build-worker.js +1 -1
- package/dist/main/start-build.d.ts +2 -3
- package/dist/main/start-build.js +1 -1
- package/dist/main/start-one-entry-build.d.ts +13 -0
- package/dist/main/start-one-entry-build.js +1 -0
- package/dist/main/start-serve.d.ts +1 -1
- package/dist/main/start-serve.js +1 -1
- package/dist/minimizer/create-minimizers.js +1 -1
- package/dist/minimizer/image-minimizer.js +1 -1
- package/dist/minimizer/terser-minimizer.js +1 -1
- package/dist/plugins/circular-dependency/circular-dependency-plugin.js +1 -1
- package/dist/plugins/clean-webpack/index.d.ts +1 -1
- package/dist/plugins/clean-webpack/index.js +1 -1
- package/dist/plugins/define-variable/define-variable-plugin.js +1 -1
- package/dist/plugins/module-federation/module-federation.d.ts +1 -1
- package/dist/plugins/module-federation/module-federation.js +1 -1
- package/dist/plugins/multi-html/index.d.ts +1 -1
- package/dist/plugins/multi-html/index.js +1 -1
- package/dist/plugins/multi-html/multi-html-cdn-plugin.js +1 -1
- package/dist/plugins/multi-html/multi-html-plugin.d.ts +1 -1
- package/dist/plugins/multi-html/multi-html-plugin.js +1 -1
- package/dist/types/index.d.ts +1 -3
- package/dist/types/index.js +1 -1
- package/dist/types/types-dev-server.d.ts +6 -17
- package/dist/types/types-entry-map.d.ts +3 -21
- package/dist/types/types-loader-options.d.ts +9 -31
- package/dist/types/types-options.d.ts +15 -30
- package/dist/types/types-webpack.d.ts +2 -5
- package/package.json +61 -69
- package/templates/html-plugin/index-dev.html +2 -2
- package/templates/html-plugin/index-inte.html +2 -2
- package/templates/html-plugin/index-inte2.html +2 -2
- package/templates/html-plugin/index-inte3.html +2 -2
- package/templates/html-plugin/index-inte4.html +2 -2
- package/templates/html-plugin/index-me.html +2 -2
- package/templates/html-plugin/index-prod.html +2 -2
- package/templates/html-plugin/index-rc.html +2 -2
- package/templates/html-plugin/index-uat.html +2 -2
- package/templates/module.html +2 -2
- package/dist/compiler/create-global-compiler.d.ts +0 -2
- package/dist/compiler/create-global-compiler.js +0 -1
- package/dist/create-webpack/load-watch-options.d.ts +0 -12
- package/dist/create-webpack/load-watch-options.js +0 -1
- package/dist/dev-server/create-dev-server-compiler-task.d.ts +0 -3
- package/dist/dev-server/create-dev-server-compiler-task.js +0 -1
- package/dist/helpers/assert-group-entry-item.d.ts +0 -7
- package/dist/helpers/assert-group-entry-item.js +0 -1
- package/dist/helpers/assert-single-compiler.d.ts +0 -15
- package/dist/helpers/assert-single-compiler.js +0 -1
- package/dist/helpers/check-runtime-env.d.ts +0 -4
- package/dist/helpers/check-runtime-env.js +0 -1
- package/dist/helpers/custom-listr-renderer.d.ts +0 -41
- package/dist/helpers/custom-listr-renderer.js +0 -1
- package/dist/helpers/custom-message-channel.d.ts +0 -17
- package/dist/helpers/custom-message-channel.js +0 -1
- package/dist/helpers/delete-object-keys.d.ts +0 -11
- package/dist/helpers/delete-object-keys.js +0 -1
- package/dist/helpers/flat-entry-map.d.ts +0 -8
- package/dist/helpers/flat-entry-map.js +0 -1
- package/dist/helpers/format-spinner-text.d.ts +0 -8
- package/dist/helpers/format-spinner-text.js +0 -1
- package/dist/helpers/get-runtime-cdn-base.d.ts +0 -2
- package/dist/helpers/get-runtime-cdn-base.js +0 -1
- package/dist/helpers/get-stats-file-name.d.ts +0 -2
- package/dist/helpers/get-stats-file-name.js +0 -1
- package/dist/helpers/is-deep-equal.d.ts +0 -9
- package/dist/helpers/is-deep-equal.js +0 -1
- package/dist/helpers/normalize-check-entry-options.d.ts +0 -10
- package/dist/helpers/normalize-check-entry-options.js +0 -1
- package/dist/helpers/normalize-entry-module-absolute-path.d.ts +0 -10
- package/dist/helpers/normalize-entry-module-absolute-path.js +0 -1
- package/dist/helpers/normalize-group-name.d.ts +0 -8
- package/dist/helpers/normalize-group-name.js +0 -1
- package/dist/helpers/normalize-template-inject-tokens.d.ts +0 -16
- package/dist/helpers/normalize-template-inject-tokens.js +0 -1
- package/dist/helpers/split-to-entry-group.d.ts +0 -52
- package/dist/helpers/split-to-entry-group.js +0 -1
- package/dist/helpers/verify-group-entry-options.d.ts +0 -9
- package/dist/helpers/verify-group-entry-options.js +0 -1
- package/dist/main/prepare-analyzer.d.ts +0 -9
- package/dist/main/prepare-analyzer.js +0 -1
- package/dist/main/start-analyzer.d.ts +0 -10
- package/dist/main/start-analyzer.js +0 -1
- package/dist/main/start-group-entry-build.d.ts +0 -15
- package/dist/main/start-group-entry-build.js +0 -1
- package/dist/plugins/stats-webpack/helper-write-stats.d.ts +0 -28
- package/dist/plugins/stats-webpack/helper-write-stats.js +0 -1
- package/dist/plugins/stats-webpack/index.d.ts +0 -12
- package/dist/plugins/stats-webpack/index.js +0 -1
- package/dist/plugins/stats-webpack/stats-webpack-plugin.d.ts +0 -25
- package/dist/plugins/stats-webpack/stats-webpack-plugin.js +0 -1
- package/dist/plugins/ts-checker/ts-checker-guard-plugin.d.ts +0 -13
- package/dist/plugins/ts-checker/ts-checker-guard-plugin.js +0 -1
- package/dist/plugins/ts-checker/ts-checker-plugin.d.ts +0 -3
- package/dist/plugins/ts-checker/ts-checker-plugin.js +0 -1
- package/dist/types/types-analyzer.d.ts +0 -70
- package/dist/types/types-analyzer.js +0 -1
- package/dist/types/types-cli-options.d.ts +0 -12
- package/dist/types/types-cli-options.js +0 -1
- package/dist/types/types-global-compiler-options.d.ts +0 -7
- package/dist/types/types-global-compiler-options.js +0 -1
- package/dist/types/types-threads-options.d.ts +0 -18
- package/dist/types/types-threads-options.js +0 -1
- package/templates/html-plugin/index-ntv.html +0 -61
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flatjs/evolve",
|
|
3
|
-
"version": "2.1.0-next.
|
|
3
|
+
"version": "2.1.0-next.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -18,96 +18,88 @@
|
|
|
18
18
|
"./templates"
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
|
-
"serve": "yarn node --import=@
|
|
22
|
-
"analyzer": "yarn node --import=@hyperse/ts-node-paths/register ./tests/build-analyzer/start-analyzer.ts",
|
|
21
|
+
"serve": "yarn node --import=@armit/path-alias/register ./tests/dev-server/dev-server.ts",
|
|
23
22
|
"build": "rimraf dist && tsc -p ./tsconfig.build.json && npm run minify",
|
|
24
23
|
"?build-release": "When https://github.com/atlassian/changesets/issues/432 has a solution we can remove this trick",
|
|
25
24
|
"build-release": "yarn build && rimraf ./_release && yarn pack && mkdir ./_release && tar zxvf ./package.tgz --directory ./_release && rm ./package.tgz",
|
|
26
25
|
"minify": "node ../../scripts/minify.mjs --dest=dist",
|
|
27
26
|
"codegen": "graphql-codegen --config ./codegen.cjs",
|
|
28
27
|
"clean": "rimraf --no-glob ./dist ./coverage ./__data__ ./config/__data__ ./_release ./tsconfig.tsbuildinfo",
|
|
29
|
-
"lint": "eslint . --cache --cache-location ../../.cache/eslint/evolve.eslintcache",
|
|
28
|
+
"lint": "eslint . --ext .ts,.mts,.tsx,.js,.jsx,.cjs,.mjs --cache --cache-location ../../.cache/eslint/evolve.eslintcache",
|
|
30
29
|
"test": "run-s test-unit",
|
|
31
30
|
"test-task": "vitest run",
|
|
32
31
|
"test-unit": "vitest run --passWithNoTests",
|
|
33
32
|
"test-watch": "vitest watch --ui",
|
|
34
|
-
"fix-all-files": "eslint . --fix",
|
|
33
|
+
"fix-all-files": "eslint . --ext .ts,.tsx,.js,.jsx,.cjs,.mjs,.mdx,.graphql --fix",
|
|
35
34
|
"typecheck": "tsc --project ./tsconfig.json --noEmit"
|
|
36
35
|
},
|
|
37
36
|
"dependencies": {
|
|
38
|
-
"@armit/babel-merge": "^0.
|
|
39
|
-
"@armit/config-loader": "^0.
|
|
40
|
-
"@armit/file-utility": "^0.
|
|
41
|
-
"@armit/git": "^0.
|
|
42
|
-
"@armit/package": "^0.
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
46
|
-
"@flatjs/
|
|
47
|
-
"@flatjs/
|
|
48
|
-
"@flatjs/
|
|
49
|
-
"@flatjs/
|
|
50
|
-
"@flatjs/
|
|
51
|
-
"@
|
|
52
|
-
"@
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"webpack": "^5.92.1",
|
|
82
|
-
"webpack-bundle-analyzer": "^4.10.2",
|
|
83
|
-
"webpack-dev-server": "^5.0.4",
|
|
84
|
-
"webpack-sources": "^3.2.3"
|
|
37
|
+
"@armit/babel-merge": "^0.1.5",
|
|
38
|
+
"@armit/config-loader": "^0.1.6",
|
|
39
|
+
"@armit/file-utility": "^0.1.4",
|
|
40
|
+
"@armit/git": "^0.1.4",
|
|
41
|
+
"@armit/package": "^0.1.5",
|
|
42
|
+
"@armit/worker-threads": "^0.1.4",
|
|
43
|
+
"@babel/core": "7.24.3",
|
|
44
|
+
"@flatjs/babel-plugin-import": "2.1.0-next.2",
|
|
45
|
+
"@flatjs/common": "2.1.0-next.2",
|
|
46
|
+
"@flatjs/evolve-preset-babel": "2.1.0-next.2",
|
|
47
|
+
"@flatjs/forge-postcss-plugin-pixel": "2.1.0-next.2",
|
|
48
|
+
"@flatjs/graph": "2.1.0-next.3",
|
|
49
|
+
"@flatjs/mock": "2.1.0-next.3",
|
|
50
|
+
"@pmmmwh/react-refresh-webpack-plugin": "0.5.11",
|
|
51
|
+
"@types/babel__core": "7.20.5",
|
|
52
|
+
"babel-loader": "9.1.3",
|
|
53
|
+
"better-opn": "3.0.2",
|
|
54
|
+
"case-sensitive-paths-webpack-plugin": "2.4.0",
|
|
55
|
+
"css-loader": "6.10.0",
|
|
56
|
+
"cssnano": "6.1.2",
|
|
57
|
+
"express": "4.19.2",
|
|
58
|
+
"fork-ts-checker-webpack-plugin": "9.0.2",
|
|
59
|
+
"happy-dom": "14.3.10",
|
|
60
|
+
"html-webpack-plugin": "5.6.0",
|
|
61
|
+
"image-minimizer-webpack-plugin": "4.0.0",
|
|
62
|
+
"less": "4.2.0",
|
|
63
|
+
"less-loader": "12.2.0",
|
|
64
|
+
"listr": "0.14.3",
|
|
65
|
+
"lodash": "4.17.21",
|
|
66
|
+
"mini-css-extract-plugin": "2.8.1",
|
|
67
|
+
"postcss": "8.4.38",
|
|
68
|
+
"postcss-loader": "8.1.1",
|
|
69
|
+
"react-refresh": "0.14.0",
|
|
70
|
+
"svgo": "3.2.0",
|
|
71
|
+
"tarjan-graph": "3.0.0",
|
|
72
|
+
"terser-webpack-plugin": "5.3.10",
|
|
73
|
+
"tsconfig-paths-webpack-plugin": "4.1.0",
|
|
74
|
+
"type-fest": "^4.14.0",
|
|
75
|
+
"typescript": "5.4.3",
|
|
76
|
+
"webpack": "5.91.0",
|
|
77
|
+
"webpack-bundle-analyzer": "4.10.1",
|
|
78
|
+
"webpack-dev-server": "5.0.4",
|
|
79
|
+
"webpack-sources": "3.2.3"
|
|
85
80
|
},
|
|
86
81
|
"devDependencies": {
|
|
87
|
-
"@
|
|
88
|
-
"@
|
|
89
|
-
"@
|
|
90
|
-
"@dimjs/utils": "1.5.1",
|
|
91
|
-
"@flatjs/testing": "2.1.0-next.9",
|
|
92
|
-
"@hyperse/eslint-config-hyperse": "^1.0.10",
|
|
93
|
-
"@swc/core": "1.6.6",
|
|
82
|
+
"@armit/eslint-config-bases": "^0.1.5",
|
|
83
|
+
"@flatjs/testing": "2.1.0-next.2",
|
|
84
|
+
"@swc/core": "1.4.11",
|
|
94
85
|
"@types/express": "4.17.21",
|
|
95
86
|
"@types/listr": "0.14.9",
|
|
96
|
-
"@types/node": "20.
|
|
97
|
-
"@vitest/coverage-istanbul": "1.
|
|
98
|
-
"@vitest/ui": "1.
|
|
99
|
-
"
|
|
100
|
-
"eslint": "^9.6.0",
|
|
87
|
+
"@types/node": "20.12.2",
|
|
88
|
+
"@vitest/coverage-istanbul": "1.4.0",
|
|
89
|
+
"@vitest/ui": "1.4.0",
|
|
90
|
+
"eslint": "8.57.0",
|
|
101
91
|
"imagemin-gifsicle": "7.0.0",
|
|
102
92
|
"imagemin-jpegtran": "7.0.0",
|
|
103
|
-
"imagemin-pngquant": "
|
|
104
|
-
"imagemin-svgo": "
|
|
93
|
+
"imagemin-pngquant": "9.0.2",
|
|
94
|
+
"imagemin-svgo": "10.0.1",
|
|
105
95
|
"npm-run-all": "4.1.5",
|
|
106
|
-
"
|
|
107
|
-
"
|
|
96
|
+
"prettier": "3.2.5",
|
|
97
|
+
"react": "18.2.0",
|
|
98
|
+
"rimraf": "5.0.5",
|
|
108
99
|
"swc-unplugin-ts": "1.0.3",
|
|
100
|
+
"ts-node": "11.0.0-beta.1",
|
|
109
101
|
"vite-tsconfig-paths": "4.3.2",
|
|
110
|
-
"vitest": "1.
|
|
102
|
+
"vitest": "1.4.0",
|
|
111
103
|
"vue-loader": "17.4.2"
|
|
112
104
|
},
|
|
113
105
|
"peerDependencies": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
<% } %>
|
|
46
46
|
<% if (headBeforeScripts) { %>
|
|
47
47
|
<% for (let index = 0; index < headBeforeScripts.length; index++) { %>
|
|
48
|
-
<script src="<%= headBeforeScripts[index]%>"></script>
|
|
48
|
+
<script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
|
|
49
49
|
<% } %>
|
|
50
50
|
<% } %>
|
|
51
51
|
</head>
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<div id="app"></div>
|
|
55
55
|
<% if (bodyAfterScripts) { %>
|
|
56
56
|
<% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
|
|
57
|
-
<script src="<%= bodyAfterScripts[index]%>"></script>
|
|
57
|
+
<script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
|
|
58
58
|
<% } %>
|
|
59
59
|
<% } %>
|
|
60
60
|
</body>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
<% } %>
|
|
46
46
|
<% if (headBeforeScripts) { %>
|
|
47
47
|
<% for (let index = 0; index < headBeforeScripts.length; index++) { %>
|
|
48
|
-
<script src="<%= headBeforeScripts[index]%>"></script>
|
|
48
|
+
<script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
|
|
49
49
|
<% } %>
|
|
50
50
|
<% } %>
|
|
51
51
|
</head>
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<div id="app"></div>
|
|
55
55
|
<% if (bodyAfterScripts) { %>
|
|
56
56
|
<% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
|
|
57
|
-
<script src="<%= bodyAfterScripts[index]%>"></script>
|
|
57
|
+
<script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
|
|
58
58
|
<% } %>
|
|
59
59
|
<% } %>
|
|
60
60
|
</body>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
<% } %>
|
|
46
46
|
<% if (headBeforeScripts) { %>
|
|
47
47
|
<% for (let index = 0; index < headBeforeScripts.length; index++) { %>
|
|
48
|
-
<script src="<%= headBeforeScripts[index]%>"></script>
|
|
48
|
+
<script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
|
|
49
49
|
<% } %>
|
|
50
50
|
<% } %>
|
|
51
51
|
</head>
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<div id="app"></div>
|
|
55
55
|
<% if (bodyAfterScripts) { %>
|
|
56
56
|
<% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
|
|
57
|
-
<script src="<%= bodyAfterScripts[index]%>"></script>
|
|
57
|
+
<script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
|
|
58
58
|
<% } %>
|
|
59
59
|
<% } %>
|
|
60
60
|
</body>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
<% } %>
|
|
46
46
|
<% if (headBeforeScripts) { %>
|
|
47
47
|
<% for (let index = 0; index < headBeforeScripts.length; index++) { %>
|
|
48
|
-
<script src="<%= headBeforeScripts[index]%>"></script>
|
|
48
|
+
<script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
|
|
49
49
|
<% } %>
|
|
50
50
|
<% } %>
|
|
51
51
|
</head>
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<div id="app"></div>
|
|
55
55
|
<% if (bodyAfterScripts) { %>
|
|
56
56
|
<% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
|
|
57
|
-
<script src="<%= bodyAfterScripts[index]%>"></script>
|
|
57
|
+
<script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
|
|
58
58
|
<% } %>
|
|
59
59
|
<% } %>
|
|
60
60
|
</body>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
<% } %>
|
|
46
46
|
<% if (headBeforeScripts) { %>
|
|
47
47
|
<% for (let index = 0; index < headBeforeScripts.length; index++) { %>
|
|
48
|
-
<script src="<%= headBeforeScripts[index]%>"></script>
|
|
48
|
+
<script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
|
|
49
49
|
<% } %>
|
|
50
50
|
<% } %>
|
|
51
51
|
</head>
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<div id="app"></div>
|
|
55
55
|
<% if (bodyAfterScripts) { %>
|
|
56
56
|
<% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
|
|
57
|
-
<script src="<%= bodyAfterScripts[index]%>"></script>
|
|
57
|
+
<script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
|
|
58
58
|
<% } %>
|
|
59
59
|
<% } %>
|
|
60
60
|
</body>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
<% } %>
|
|
46
46
|
<% if (headBeforeScripts) { %>
|
|
47
47
|
<% for (let index = 0; index < headBeforeScripts.length; index++) { %>
|
|
48
|
-
<script src="<%= headBeforeScripts[index]%>"></script>
|
|
48
|
+
<script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
|
|
49
49
|
<% } %>
|
|
50
50
|
<% } %>
|
|
51
51
|
</head>
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<div id="app"></div>
|
|
55
55
|
<% if (bodyAfterScripts) { %>
|
|
56
56
|
<% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
|
|
57
|
-
<script src="<%= bodyAfterScripts[index]%>"></script>
|
|
57
|
+
<script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
|
|
58
58
|
<% } %>
|
|
59
59
|
<% } %>
|
|
60
60
|
</body>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
<% } %>
|
|
46
46
|
<% if (headBeforeScripts) { %>
|
|
47
47
|
<% for (let index = 0; index < headBeforeScripts.length; index++) { %>
|
|
48
|
-
<script src="<%= headBeforeScripts[index]%>"></script>
|
|
48
|
+
<script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
|
|
49
49
|
<% } %>
|
|
50
50
|
<% } %>
|
|
51
51
|
</head>
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<div id="app"></div>
|
|
55
55
|
<% if (bodyAfterScripts) { %>
|
|
56
56
|
<% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
|
|
57
|
-
<script src="<%= bodyAfterScripts[index]%>"></script>
|
|
57
|
+
<script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
|
|
58
58
|
<% } %>
|
|
59
59
|
<% } %>
|
|
60
60
|
</body>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
<% } %>
|
|
46
46
|
<% if (headBeforeScripts) { %>
|
|
47
47
|
<% for (let index = 0; index < headBeforeScripts.length; index++) { %>
|
|
48
|
-
<script src="<%= headBeforeScripts[index]%>"></script>
|
|
48
|
+
<script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
|
|
49
49
|
<% } %>
|
|
50
50
|
<% } %>
|
|
51
51
|
</head>
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<div id="app"></div>
|
|
55
55
|
<% if (bodyAfterScripts) { %>
|
|
56
56
|
<% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
|
|
57
|
-
<script src="<%= bodyAfterScripts[index]%>"></script>
|
|
57
|
+
<script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
|
|
58
58
|
<% } %>
|
|
59
59
|
<% } %>
|
|
60
60
|
</body>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
<% } %>
|
|
46
46
|
<% if (headBeforeScripts) { %>
|
|
47
47
|
<% for (let index = 0; index < headBeforeScripts.length; index++) { %>
|
|
48
|
-
<script src="<%= headBeforeScripts[index]%>"></script>
|
|
48
|
+
<script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
|
|
49
49
|
<% } %>
|
|
50
50
|
<% } %>
|
|
51
51
|
</head>
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<div id="app"></div>
|
|
55
55
|
<% if (bodyAfterScripts) { %>
|
|
56
56
|
<% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
|
|
57
|
-
<script src="<%= bodyAfterScripts[index]%>"></script>
|
|
57
|
+
<script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
|
|
58
58
|
<% } %>
|
|
59
59
|
<% } %>
|
|
60
60
|
</body>
|
package/templates/module.html
CHANGED
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
|
|
57
57
|
<% if (headBeforeScripts) { %>
|
|
58
58
|
<% for (let index = 0; index < headBeforeScripts.length; index++) { %>
|
|
59
|
-
<script src="<%= headBeforeScripts[index]%>"></script>
|
|
59
|
+
<script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
|
|
60
60
|
<% } %>
|
|
61
61
|
<% } %>
|
|
62
62
|
</head>
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
<% } %>
|
|
76
76
|
<% if (bodyAfterScripts) { %>
|
|
77
77
|
<% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
|
|
78
|
-
<script src="<%= bodyAfterScripts[index]%>"></script>
|
|
78
|
+
<script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
|
|
79
79
|
<% } %>
|
|
80
80
|
<% } %>
|
|
81
81
|
</body>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import webpack from"webpack";import{getDirname}from"@armit/file-utility";import{createExternals}from"../create-webpack/create-externals.js";import{createResolve}from"../create-webpack/create-resolve.js";import{ruleBabel}from"../create-webpack/rule-sets/rule-scripts.js";import{createTsCheckerPlugins}from"../plugins/ts-checker/ts-checker-plugin.js";export const createGlobalCompiler=async(e,r)=>{const{projectCwd:t,webpack:o,devServer:a,globalCompilerOptions:c}=r,{runTsChecker:l=!0}=c||{};if(!l)return!1;const s=e?"development":"production",n=a?.watchOptions||{},p=[ruleBabel({})],i=[...createTsCheckerPlugins(e,r)],m={context:t,mode:s,watch:e,name:"flat/evolve/global-compiler",entry:{".global-compiler-bundle":["."]},resolve:createResolve(t,o),module:{rules:p},plugins:i,watchOptions:n,devtool:!1,externals:createExternals(o?.externals),cache:{type:"memory"},performance:{},output:{environment:{},path:getDirname(import.meta.url,"./")}};return new Promise(((e,r)=>{webpack(m,(t=>{if(t)return r(t.message);e(!0)}))}))};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type FlatEvolveDevServerOptions } from '../types/types-dev-server.js';
|
|
2
|
-
import { EvolveEntryMap } from '../types/types-entry-map.js';
|
|
3
|
-
import { type FlatEvolveOptions } from '../types/types-options.js';
|
|
4
|
-
/**
|
|
5
|
-
* Loads the watch options for webpack configuration.
|
|
6
|
-
*
|
|
7
|
-
* @param groupEntryMap - The map of entry.
|
|
8
|
-
* @param evolveOptions - The options for the evolve process.
|
|
9
|
-
* @param originalOptions - The original watch options to be merged with.
|
|
10
|
-
* @returns The updated watch options for webpack configuration.
|
|
11
|
-
*/
|
|
12
|
-
export declare const loadWatchOptions: (groupEntryMap: EvolveEntryMap, evolveOptions: FlatEvolveOptions, originalOptions?: FlatEvolveDevServerOptions["watchOptions"]) => FlatEvolveDevServerOptions["watchOptions"];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{existsSync}from"node:fs";import{logger}from"@flatjs/common";import{normalizeEntryModuleAbsolutePath}from"../helpers/normalize-entry-module-absolute-path.js";export const loadWatchOptions=(o,e,t={})=>{const{ignored:r=[]}=t,{entryMap:n}=e,s=normalizeEntryModuleAbsolutePath(e,o),l=normalizeEntryModuleAbsolutePath(e,n);for(const o of l){existsSync(o)||logger.warn(`The module path does not exist. Check ${o}`);s.findIndex((e=>e===o))<0&&r.push(`**${o}**/*`)}return{...t,ignored:r}};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { type FlatEvolveOptions } from '../types/types-options.js';
|
|
2
|
-
import { type EvolveDevServerEntryMap } from './middlewares/types.js';
|
|
3
|
-
export declare const createDevServerCompilerTask: (publicIp: string, servedDevServerEntries: EvolveDevServerEntryMap, servedDevServerEntryList: Array<EvolveDevServerEntryMap>, evolveOptions: FlatEvolveOptions) => Promise<boolean>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{relative}from"node:path";import webpack from"webpack";import{chalk,logger,mergeOptions,urlJoin}from"@flatjs/common";import{loadWebpackConfig}from"../create-webpack/load-webpack-config.js";import{assertSingleCompiler}from"../helpers/assert-single-compiler.js";import{flatEntryMap}from"../helpers/flat-entry-map.js";import{shouldEnableReactFastRefresh}from"../helpers/should-enable-react-fast-refresh.js";import{addCompilerToDevServer}from"./add-compiler-to-dev-server.js";export const createDevServerCompilerTask=async(e,r,o,t)=>{const{projectCwd:a}=t,[n,i]=Object.entries(r)[0],{devServerPort:s,devServerHostUri:l}=i;for(const[,e]of Object.entries(r)){const r=e.entryConfig,t=r.options?.moduleFederation,a=t?.remotes||[],n=flatEntryMap(o);a.forEach((e=>{e.endpoint=e=>{const r=n[e];if(!r)throw new Error(`No servedDevServerEntry found via "${e}"`);return urlJoin(r?.devServerHostUri,["/public"])}}))}const p=Object.keys(r).reduce(((e,o)=>(e[o]=r[o].entryConfig,e)),{}),c=urlJoin(l,["public"]),m=await loadWebpackConfig("development",p,mergeOptions(t,{webpack:{publicPath:c}})),f=shouldEnableReactFastRefresh(!0,[n,i.entryConfig],t),d=assertSingleCompiler(p,m,t,f),v=webpack(d),h=addCompilerToDevServer(v,f,s,e,t),b=v.name||"";return v.hooks.invalid.tap("fileChange",(e=>{const r=relative(a,e||"");logger.info(`file change ➩ ${chalk(["cyan"])(r||"")}`,b)})),h};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type EntryMapItem, type EvolveEntryMap } from '../types/types-entry-map.js';
|
|
2
|
-
import { type FlatEvolveOptions } from '../types/types-options.js';
|
|
3
|
-
/**
|
|
4
|
-
* Only fetch group entry map once `serve`,`build` recycle.
|
|
5
|
-
* @returns
|
|
6
|
-
*/
|
|
7
|
-
export declare const assertGroupEntryItem: (entryMap: EvolveEntryMap, evolveOptions: FlatEvolveOptions) => EntryMapItem[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{normalizeEvolveEntryName}from"./normalize-entry-map.js";export const assertGroupEntryItem=(r,e)=>{const o=[];for(const[e,t]of Object.entries(r))o.push([e,t]);if(!o.length)throw new Error('No entry map found while "serve", "build" process!');return o.map((([r,o])=>[normalizeEvolveEntryName(r,e.projectVirtualPath),o]))};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type Configuration } from 'webpack';
|
|
2
|
-
import { type EvolveEntryMap } from '../types/types-entry-map.js';
|
|
3
|
-
import { type FlatEvolveOptions } from '../types/types-options.js';
|
|
4
|
-
/**
|
|
5
|
-
* Asserts a single compiler configuration by generating a new entry object based on the served entries,
|
|
6
|
-
* webpack configuration, evolve options, and enabled HMR flag.
|
|
7
|
-
*
|
|
8
|
-
* @param servedEntries - The served entries object.
|
|
9
|
-
* @param webpackConfig `Omit<Configuration, 'entry'>` webpack final configuration
|
|
10
|
-
* @param evolveOptions - The flat evolve options object.
|
|
11
|
-
* @param enabledHmr - Flag indicating whether Hot Module Replacement (HMR) is enabled. Default is false.
|
|
12
|
-
* @returns The merged webpack configuration object with the new entry object.
|
|
13
|
-
* @throws Error if the react-refresh-webpack-plugin package directory is not found.
|
|
14
|
-
*/
|
|
15
|
-
export declare function assertSingleCompiler(servedEntries: EvolveEntryMap, webpackConfig: Omit<Configuration, 'entry'>, evolveOptions: FlatEvolveOptions, enabledHmr?: boolean): Configuration;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{dirname,join}from"path";import{searchPackageDir}from"@armit/package";import{mergeOptions,requireResolve}from"@flatjs/common";import{devReactFastRefresh}from"../constants.js";import{normalizeEvolveEntryName}from"./normalize-entry-map.js";export function assertSingleCompiler(e,r,t,o=!1){const a={};for(const[r,n]of Object.entries(e)){const e=normalizeEvolveEntryName(r,t.projectVirtualPath);if(a[e]=n.entry,o){const r=join(e,devReactFastRefresh.reactRefreshSetup),t=requireResolve(import.meta.url,"@pmmmwh/react-refresh-webpack-plugin"),o=searchPackageDir({cwd:dirname(t)});if(!o)throw new Error("react-refresh-webpack-plugin package directory not found");a[r]=[join(o,"/client/ReactRefreshEntry.js")]}}const n=Object.values(e)[0].groupName;return mergeOptions(r,{name:n,entry:a})}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import ci from"ci-info";export const isCI=()=>ci.isCI;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { ListrTaskObject } from 'listr';
|
|
2
|
-
/**
|
|
3
|
-
* CustomListrRenderer is a class that provides a custom renderer for Listr tasks.
|
|
4
|
-
* It renders the tasks in a specific format and updates the output periodically.
|
|
5
|
-
*
|
|
6
|
-
* @template Ctx - The type of the context object used by the Listr tasks.
|
|
7
|
-
*/
|
|
8
|
-
export declare class CustomListrRenderer<Ctx> {
|
|
9
|
-
private _tasks;
|
|
10
|
-
private _id;
|
|
11
|
-
/**
|
|
12
|
-
* Creates an instance of CustomListrRenderer.
|
|
13
|
-
*
|
|
14
|
-
* @param tasks - An array of Listr tasks to be rendered.
|
|
15
|
-
*/
|
|
16
|
-
constructor(tasks: ReadonlyArray<ListrTaskObject<Ctx>>);
|
|
17
|
-
/**
|
|
18
|
-
* Indicates whether the renderer supports non-TTY environments.
|
|
19
|
-
*/
|
|
20
|
-
static get nonTTY(): boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Renders the Listr tasks.
|
|
23
|
-
* This method is called periodically to update the output.
|
|
24
|
-
*/
|
|
25
|
-
render(): void;
|
|
26
|
-
/**
|
|
27
|
-
* Ends the rendering of the Listr tasks.
|
|
28
|
-
* This method clears the interval and updates the final output.
|
|
29
|
-
*/
|
|
30
|
-
end(): void;
|
|
31
|
-
formatTextByTemp(title: string, status: 'successfully' | 'failed' | 'skipped' | 'building', temp?: string): string;
|
|
32
|
-
/**
|
|
33
|
-
* Renders an individual Listr task.
|
|
34
|
-
* This method is called by the render() and end() methods.
|
|
35
|
-
*/
|
|
36
|
-
renderTask: () => void;
|
|
37
|
-
/**
|
|
38
|
-
* Prints the memory logs to the console.
|
|
39
|
-
*/
|
|
40
|
-
printMemoryLogs(): void;
|
|
41
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import logUpdate from"log-update";import process from"node:process";import{chalk}from"@flatjs/common";import{customMessageChannel}from"./custom-message-channel.js";const startFrames="win32"===process.platform?["-","\\","|","/"]:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"];let startIndex=0;export class CustomListrRenderer{constructor(t){this._tasks=[],this.renderTask=()=>{const t=[];startIndex=++startIndex%startFrames.length;const e=startFrames[startIndex];for(const s of this._tasks)s.isCompleted()?t.push(`${chalk(["green"])("✔")} ${this.formatTextByTemp(s.title,"successfully")}`):s.hasFailed()?t.push(`${chalk(["red"])("✘")} ${this.formatTextByTemp(s.title,"failed")}`):s.isSkipped()?t.push(`${chalk(["gray"])("ℹ")} ${this.formatTextByTemp(s.title,"skipped")}`):t.push(`${chalk(["cyan"])(e)} ${this.formatTextByTemp(s.title,"building")}`);logUpdate(t.join("\n"))},this._tasks=t}static get nonTTY(){return!0}render(){this._id||(this._id=setInterval((()=>{this.renderTask()}),100))}end(){this._id&&(clearInterval(this._id),this._id=void 0),this.renderTask(),logUpdate.done(),this.printMemoryLogs()}formatTextByTemp(t,e,s="$STATUS"){const r={successfully:`${chalk(["green"])("done")}`,failed:`builded ${chalk(["red"])("failed")}`,skipped:`builded ${chalk(["gray"])("skipped")}`,building:chalk(["white"])("compiling...")};return t.replace(s,r[e])}printMemoryLogs(){const{stderr:t=[],stdout:e=[]}=customMessageChannel.getStdData();for(const e of t)console.error(e);for(const t of e)console.log(t);customMessageChannel.clean()}}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { MessageChannel } from 'node:worker_threads';
|
|
2
|
-
declare class CustomMessageChannel {
|
|
3
|
-
private stdoutData;
|
|
4
|
-
private stderrData;
|
|
5
|
-
private channelList;
|
|
6
|
-
constructor();
|
|
7
|
-
createMessageChannel(): MessageChannel;
|
|
8
|
-
addListener(channel: MessageChannel): void;
|
|
9
|
-
getStdData(): {
|
|
10
|
-
stdout: string[];
|
|
11
|
-
stderr: string[];
|
|
12
|
-
};
|
|
13
|
-
dispose(): void;
|
|
14
|
-
clean(): void;
|
|
15
|
-
}
|
|
16
|
-
export declare const customMessageChannel: CustomMessageChannel;
|
|
17
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{MessageChannel}from"node:worker_threads";class CustomMessageChannel{constructor(){this.stdoutData=[],this.stderrData=[],this.channelList=[],this.clean()}createMessageChannel(){const s=new MessageChannel;return this.channelList.push(s),this.addListener(s),s}addListener(s){const{port2:t}=s;t.on("message",(s=>{this.stdoutData.push(...s.stdout),this.stderrData.push(...s.stderr)}))}getStdData(){return{stdout:this.stdoutData,stderr:this.stderrData}}dispose(){for(const s of this.channelList){const{port1:t,port2:e}=s;t.close(),e.close(),e.removeAllListeners("message")}this.channelList=[]}clean(){this.stdoutData=[],this.stderrData=[]}}export const customMessageChannel=new CustomMessageChannel;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Deletes specified keys from an object and returns a new object without those keys.
|
|
3
|
-
* If the input object is undefined, the function returns undefined.
|
|
4
|
-
*
|
|
5
|
-
* @param obj - The input object.
|
|
6
|
-
* @param keys - An array of keys to be deleted from the object.
|
|
7
|
-
* @returns A new object without the specified keys, or undefined if the input object is undefined.
|
|
8
|
-
*
|
|
9
|
-
* @template T - The type of the input object.
|
|
10
|
-
*/
|
|
11
|
-
export declare const deleteObjectKeys: <T>(obj?: T, keys?: Array<keyof T>) => Partial<T> | undefined;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const deleteObjectKeys=(e,t=[])=>{if(!e)return;const r={...e};return t.forEach((e=>{delete r[e]})),r};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type EvolveDevServerEntryMap } from '../dev-server/middlewares/types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Flattens an array of `EvolveDevServerEntryMap` objects into a single `EvolveDevServerEntryMap`.
|
|
4
|
-
*
|
|
5
|
-
* @param servedDevServerEntryList - The array of `EvolveDevServerEntryMap` objects to flatten.
|
|
6
|
-
* @returns The flattened `EvolveDevServerEntryMap`.
|
|
7
|
-
*/
|
|
8
|
-
export declare const flatEntryMap: (servedDevServerEntryList: Array<EvolveDevServerEntryMap>) => EvolveDevServerEntryMap;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const flatEntryMap=t=>t.reduce(((t,e)=>Object.assign(t,e)),{});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Formats the spinner text by adding prefixes and styling using chalk.
|
|
3
|
-
*
|
|
4
|
-
* @param strArr - An array of strings to be formatted.
|
|
5
|
-
* @param prefixCode - The prefix to replace default prefix code.
|
|
6
|
-
* @returns The formatted spinner text.
|
|
7
|
-
*/
|
|
8
|
-
export declare const formatSpinnerText: (strArr?: string[], prefixCode?: string) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{chalk}from"@flatjs/common";export const formatSpinnerText=(n=[],t)=>{if(1===n.length)return` ${chalk(["blue"])(t||"●")} ${n[0]} \n`;return n.map(((e,r)=>{let l="├";return 0===r?l="┌":r===n.length-1&&(l="└"),` ${chalk(["blue"])(t||l)} ${e} \n`})).join("")};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{cdnFinder}from"./script-injects.js";export const getRuntimeCDNBase=(n,e,i="")=>{const t=[`\n (function () {\n var flatjsMultiCdn = {\n cdnConfig: ${JSON.stringify(n||{})},\n cdnResolver: ${e.toString()},\n cdnFinder: ${cdnFinder.toString()}\n };\n var runtimeCDNBase = flatjsMultiCdn.cdnFinder(flatjsMultiCdn.cdnConfig, flatjsMultiCdn.cdnResolver);\n window.$evolve = window.$evolve || {};\n window.$evolve.runtimeCDNBase=runtimeCDNBase;\n `];return i&&t.push(`${i} = runtimeCDNBase || ${i};`),t.push("})();"),t.join("\n")};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const getStatsFileName=t=>t.hash+".json";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Checks if two values are deeply equal.
|
|
3
|
-
*
|
|
4
|
-
* @template T - The type of the values being compared.
|
|
5
|
-
* @param a - The first value to compare.
|
|
6
|
-
* @param b - The second value to compare.
|
|
7
|
-
* @returns `true` if the values are deeply equal, `false` otherwise.
|
|
8
|
-
*/
|
|
9
|
-
export declare function isDeepEqual(a: any, b: any): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function isDeepEqual(t,e){if(t===e)return!0;if("function"==typeof t&&"function"==typeof e)return t.toString()===e.toString();if(t&&e&&"object"==typeof t&&"object"==typeof e){const r=Array.isArray(t),n=Array.isArray(e);let i,f,o;if(r&&n){if(f=t.length,f!==e.length)return!1;for(i=f;0!=i--;)if(!isDeepEqual(t[i],e[i]))return!1;return!0}if(r!==n)return!1;const u=t instanceof Date,c=e instanceof Date;if(u!==c)return!1;if(u&&c)return t.getTime()===e.getTime();const s=t instanceof RegExp,a=e instanceof RegExp;if(s!==a)return!1;if(s&&a)return t.toString()===e.toString();const p=Object.keys(t);if(f=p.length,f!==Object.keys(e).length)return!1;for(i=f;0!=i--;)if(!Object.prototype.hasOwnProperty.call(e,p[i]))return!1;for(i=f;0!=i--;)if(o=p[i],!isDeepEqual(t[o],e[o]))return!1;return!0}return t!=t&&e!=e}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type EvolveEntryItemOption } from '../types/types-entry-map.js';
|
|
2
|
-
/**
|
|
3
|
-
* Normalizes the check entry options.
|
|
4
|
-
*
|
|
5
|
-
* @param serveMode - A boolean indicating whether the serve mode is enabled.
|
|
6
|
-
* @param currEntryOption - The current entry option.
|
|
7
|
-
* @param ignoreOptionKeys - An array of keys to ignore in the entry option.
|
|
8
|
-
* @returns The normalized entry options.
|
|
9
|
-
*/
|
|
10
|
-
export declare const normalizeCheckEntryOptions: (serveMode: boolean, currEntryOption?: EvolveEntryItemOption, ignoreOptionKeys?: Array<keyof EvolveEntryItemOption>) => Partial<EvolveEntryItemOption> | undefined;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{urlJoin}from"@flatjs/common";import{ignoreEntryOptionKeys}from"../constants.js";import{deleteObjectKeys}from"./delete-object-keys.js";import{normalizeTemplateInjectTokens}from"./normalize-template-inject-tokens.js";export const normalizeCheckEntryOptions=(e,t,o=ignoreEntryOptionKeys)=>{const n={mode:e?"development":"production",envCdn:urlJoin(e?"http://dev.flatjs.com":"https://file.40017.cn/jinfu",["public"])},r=normalizeTemplateInjectTokens(n,t),i={...t,...r};return deleteObjectKeys(i,o)};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { EvolveEntryMap } from '../types/types-entry-map.js';
|
|
2
|
-
import { FlatEvolveOptions } from '../types/types-options.js';
|
|
3
|
-
/**
|
|
4
|
-
* Normalizes the absolute paths of entry modules based on the provided evolve options and entry map.
|
|
5
|
-
*
|
|
6
|
-
* @param evolveOptions - The options for the evolve process.
|
|
7
|
-
* @param evolveEntryMap - The map of evolve entries.
|
|
8
|
-
* @returns An array of normalized entry module paths.
|
|
9
|
-
*/
|
|
10
|
-
export declare const normalizeEntryModuleAbsolutePath: (evolveOptions: FlatEvolveOptions, evolveEntryMap: EvolveEntryMap) => string[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{resolve}from"node:path";import{ensureSlash}from"@flatjs/common";export const normalizeEntryModuleAbsolutePath=(e,o)=>{const{projectCwd:s}=e,t=[];for(const[,e]of Object.entries(o)){const{entryModuleBase:o,entry:r}=e;if(o)for(const e of o){const o=ensureSlash(resolve(s,e),!0);t.push(o)}else for(const e of r){let o=resolve(s,e);(/\.(ts|tsx|js|jsx)$/.test(o)||o.endsWith("/index"))&&(o=o.replace(/\/[^/]*$/,""));const r=ensureSlash(o,!0);t.push(r)}}return Array.from(new Set(t))};
|