@flatjs/evolve 2.1.0-next.11 → 2.1.0-next.13
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/compiler/create-global-compiler.d.ts +2 -0
- package/dist/compiler/create-global-compiler.js +1 -0
- package/dist/create-webpack/create-plugins.js +1 -1
- package/dist/create-webpack/create-resolve.js +1 -1
- package/dist/create-webpack/load-watch-options.d.ts +12 -0
- package/dist/create-webpack/load-watch-options.js +1 -0
- package/dist/create-webpack/load-webpack-config.js +1 -1
- package/dist/create-webpack/rule-sets/rule-css.js +1 -1
- package/dist/create-webpack/rule-sets/rule-scripts.d.ts +2 -0
- 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/create-dev-server-compiler-task.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-page-main-html.js +1 -1
- package/dist/dev-server/middlewares/get-page-module-html.js +1 -1
- package/dist/helpers/get-runtime-cdn-base.d.ts +1 -1
- package/dist/helpers/index.d.ts +11 -11
- package/dist/helpers/index.js +1 -1
- package/dist/helpers/json-serializer.js +1 -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/split-to-entry-group.d.ts +1 -1
- 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 +2 -1
- package/dist/main/index.d.ts +1 -1
- package/dist/main/index.js +1 -1
- package/dist/main/start-build-dynamic.js +1 -1
- package/dist/main/start-build.js +1 -1
- package/dist/main/start-group-entry-build.d.ts +1 -1
- package/dist/main/start-group-entry-build.js +1 -1
- package/dist/main/start-serve.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/define-variable/define-variable-plugin.js +1 -1
- package/dist/plugins/module-federation/module-federation.js +1 -1
- package/dist/plugins/multi-html/multi-html-cdn-plugin.js +1 -1
- package/dist/plugins/ts-checker/ts-checker-guard-plugin.d.ts +13 -0
- package/dist/plugins/ts-checker/ts-checker-guard-plugin.js +1 -0
- package/dist/plugins/ts-checker/ts-checker-plugin.d.ts +1 -2
- package/dist/plugins/ts-checker/ts-checker-plugin.js +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.js +1 -1
- package/dist/types/types-dev-server.d.ts +5 -6
- package/dist/types/types-global-compiler-options.d.ts +7 -0
- package/dist/types/types-global-compiler-options.js +1 -0
- package/dist/types/types-loader-options.d.ts +31 -9
- package/dist/types/types-options.d.ts +6 -1
- package/dist/types/types-webpack.d.ts +1 -1
- package/package.json +29 -31
- package/dist/plugins/ts-checker/index.d.ts +0 -1
- package/dist/plugins/ts-checker/index.js +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
import webpack from"webpack";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=(e,r)=>{const{projectCwd:t,webpack:c,devServer:o}=r,s=e?"development":"production",l=o?.watchOptions||{},a=[ruleBabel({})],p=[...createTsCheckerPlugins(e,r)],i={context:t,mode:s,watch:e,name:"flat/evolve/global-compiler",entry:["."],resolve:createResolve(t,c),module:{rules:a},plugins:p,watchOptions:l};return new Promise(((e,r)=>{webpack(i,(t=>{if(t)return r(t.message);e(!0)}))}))};
|
@@ -1 +1 @@
|
|
1
|
-
import
|
1
|
+
import CaseSensitivePathsPlugin from"case-sensitive-paths-webpack-plugin";import MiniCssExtractPlugin from"mini-css-extract-plugin";import webpack from"webpack";import{BundleAnalyzerPlugin}from"webpack-bundle-analyzer";import{logger}from"@flatjs/common";import ReactRefreshWebpackPlugin from"@pmmmwh/react-refresh-webpack-plugin";import{enableBundleHashNameForModule}from"../helpers/enable-bundle-hashname-for-module.js";import{getBundleFileName}from"../helpers/get-bundle-file-name.js";import{shouldEnableReactFastRefresh}from"../helpers/should-enable-react-fast-refresh.js";import{createCircularDependencyPlugin}from"../plugins/circular-dependency/index.js";import{createCleanWebpackPlugin}from"../plugins/clean-webpack/index.js";import{createBuiltinDefineVariables}from"../plugins/define-variable/index.js";import{createModuleFederationPlugin}from"../plugins/module-federation/index.js";import{createHtmlPlugins}from"../plugins/multi-html/index.js";export const createPlugins=async(e,a,n)=>{const l=a[0],[r,i]=l,t=enableBundleHashNameForModule(n,i?.options),s=[new webpack.WatchIgnorePlugin({paths:[/\.d\.[cm]ts$/]}),new CaseSensitivePathsPlugin,...createCircularDependencyPlugin(e,n),new MiniCssExtractPlugin({filename:`[name]/${getBundleFileName("css",e,t)}`,chunkFilename:"[id].[contenthash].css"}),...await createBuiltinDefineVariables(e,n),...createCleanWebpackPlugin(e,a,n),...createModuleFederationPlugin(e,a,n),...createHtmlPlugins(e,a,n)];n.analyzer&&s.push(new BundleAnalyzerPlugin({analyzerPort:"auto",analyzerMode:"server",...n.analyzer}));const o=shouldEnableReactFastRefresh(e,l,n);o&&s.push(new ReactRefreshWebpackPlugin({overlay:!1})),!o&&e&&(n.devServer?.liveReload?logger.warn('The HMR disabled cause of "liveReload" specificed'):logger.warn(`The HMR disabled cause of \`"moduleFederation":"${r}"\``));const c=n.webpack?.plugins||[];return s.concat(c)};
|
@@ -1 +1 @@
|
|
1
|
-
import{join}from"node:path";import{
|
1
|
+
import{join}from"node:path";import{TsconfigPathsPlugin}from"tsconfig-paths-webpack-plugin";import{mergeOptions}from"@flatjs/common";export const createResolve=(s,o)=>{const n={mainFields:["browser","module","main"],extensions:[".ts",".tsx",".js",".json"],extensionAlias:{".js":[".js",".ts"],".cjs":[".cjs",".cts"],".mjs":[".mjs",".mts"],".jsx":[".jsx",".tsx"]},plugins:[new TsconfigPathsPlugin({configFile:join(s,"tsconfig.json"),extensions:[".ts",".tsx",".js",".jsx"]})]};return mergeOptions(n,o?.resolve||{})};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { type FlatEvolveDevServerOptions } from '../types/types-dev-server.js';
|
2
|
+
import { type 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 entryMap - The map of entry names to their corresponding paths.
|
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: (entryMap: EvolveEntryMap, evolveOptions: FlatEvolveOptions, originalOptions?: FlatEvolveDevServerOptions['watchOptions']) => FlatEvolveDevServerOptions['watchOptions'];
|
@@ -0,0 +1 @@
|
|
1
|
+
export const loadWatchOptions=(o,t,n={})=>{const{ignored:e=[]}=n,{entryMap:r}=t;for(const[t]of Object.entries(r))o[t]||e.push(`**/${t}/**/*`);return{...n,ignored:e}};
|
@@ -1 +1 @@
|
|
1
|
-
import{assertGroupEntryItem}from"../helpers/assert-group-entry-item.js";import{createExternals}from"./create-externals.js";import{createOptimization}from"./create-optimization.js";import{createOutput}from"./create-output.js";import{createPerformance}from"./create-performance.js";import{createPlugins}from"./create-plugins.js";import{createResolve}from"./create-resolve.js";import{createRuleSets}from"./create-rule-sets.js";export const loadWebpackConfig=async(e,t,r)=>{const a="development"===e,{projectCwd:o,webpack:s,devServer:c}=r,
|
1
|
+
import{assertGroupEntryItem}from"../helpers/assert-group-entry-item.js";import{createExternals}from"./create-externals.js";import{createOptimization}from"./create-optimization.js";import{createOutput}from"./create-output.js";import{createPerformance}from"./create-performance.js";import{createPlugins}from"./create-plugins.js";import{createResolve}from"./create-resolve.js";import{createRuleSets}from"./create-rule-sets.js";import{loadWatchOptions}from"./load-watch-options.js";export const loadWebpackConfig=async(e,t,r)=>{const a="development"===e,{projectCwd:o,webpack:s,devServer:c}=r,p=loadWatchOptions(t,r,c?.watchOptions),n=assertGroupEntryItem(t,r),i=createRuleSets(a,n,r),m=await createPlugins(a,n,r),l=n[0];return{mode:e,plugins:m,watchOptions:p,output:await createOutput(a,r,l),context:o,target:s?.target??["web","es5"],resolve:createResolve(o,s),module:{rules:i},devtool:a?"eval-source-map":s?.sourceMap||!1,externalsType:s?.externalsType,externals:createExternals(s?.externals,l),performance:createPerformance(a,s?.performance),optimization:createOptimization(a,r,l),infrastructureLogging:s?.infrastructureLogging??{level:"warn"},stats:s?.stats??{preset:"minimal"},cache:{type:"memory"}}};
|
@@ -1 +1 @@
|
|
1
|
-
import{requireResolve}from"@flatjs/common";import{forgePostcssPluginPixel}from"@flatjs/forge-postcss-plugin-pixel";import
|
1
|
+
import cssnano from"cssnano";import MiniCssExtractPlugin from"mini-css-extract-plugin";import{requireResolve}from"@flatjs/common";import{forgePostcssPluginPixel}from"@flatjs/forge-postcss-plugin-pixel";import{allowPx2remForModule}from"../../helpers/allow-px2rem-for-module.js";const getPostcssOptions=(s,o={},e={})=>{const r=[...e.plugins||[],cssnano({preset:["default",{discardComments:{removeAll:!s},reduceInitial:!1,normalizeWhitespace:!s,...e.cssnanoOptions}]})];return!1!==o&&r.push(forgePostcssPluginPixel(o)),{plugins:r}};export const ruleCss=(s,o,e,r=!1)=>{const{pixelOptions:t,cssLoaderOptions:i={},postcssOptions:l}=e.loaderOptions,{modules:n,...p}=i,c=r?{modules:Object.assign({namedExport:!1},n)}:{modules:!1},u={test:/\.css$/i,use:[{loader:MiniCssExtractPlugin.loader,options:{esModule:!0}},{loader:requireResolve(import.meta.url,"css-loader"),options:{sourceMap:s,...c,...p}}]};r?u.include=/\.module\.css$/i:u.exclude=/\.module\.css$/i;const a=allowPx2remForModule(o,e);if(Array.isArray(u.use)){const o=getPostcssOptions(s,!!a&&t,l);u.use.push({loader:requireResolve(import.meta.url,"postcss-loader"),options:{postcssOptions:{...o,config:!1},sourceMap:s}})}return u};
|
@@ -1,3 +1,5 @@
|
|
1
1
|
import { type RuleSetRule } from 'webpack';
|
2
|
+
import { type TransformOptions } from '@babel/core';
|
2
3
|
import { type EntryMapItem, type FlatEvolveOptions } from '../../types/index.js';
|
4
|
+
export declare const ruleBabel: (options: TransformOptions) => RuleSetRule;
|
3
5
|
export declare const ruleScripts: (serveMode: boolean, entryMapItem: EntryMapItem, evolveOptions: FlatEvolveOptions) => RuleSetRule;
|
@@ -1 +1 @@
|
|
1
|
-
import{requireResolve}from"@flatjs/common";import{mergeBabelOption}from"../../helpers/merge-babel-options.js";import{shouldEnableReactFastRefresh}from"../../helpers/should-enable-react-fast-refresh.js";export const ruleScripts=(e,r,s)=>{const{babelOptions:o={},modularImports:t=[]}=s.loaderOptions,l=mergeBabelOption(t,o);shouldEnableReactFastRefresh(e,r,s)&&(l.plugins?l.plugins.push(requireResolve(import.meta.url,"react-refresh/babel")):l.plugins=[requireResolve(import.meta.url,"react-refresh/babel")])
|
1
|
+
import{requireResolve}from"@flatjs/common";import{mergeBabelOption}from"../../helpers/merge-babel-options.js";import{shouldEnableReactFastRefresh}from"../../helpers/should-enable-react-fast-refresh.js";export const ruleBabel=e=>({test:/\.(tsx|ts|js|jsx)$/,use:[{loader:requireResolve(import.meta.url,"babel-loader"),options:e}]});export const ruleScripts=(e,r,s)=>{const{babelOptions:o={},modularImports:t=[]}=s.loaderOptions,l=mergeBabelOption(t,o);return shouldEnableReactFastRefresh(e,r,s)&&(l.plugins?l.plugins.push(requireResolve(import.meta.url,"react-refresh/babel")):l.plugins=[requireResolve(import.meta.url,"react-refresh/babel")]),ruleBabel(l)};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { type
|
1
|
+
import { type Compiler, type WebpackPluginInstance } from 'webpack';
|
2
2
|
export type WebpackPlugin = ((this: Compiler, compiler: Compiler) => void) | WebpackPluginInstance;
|
package/dist/default-options.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const defaultEvolveOptions={projectCwd:process.cwd(),projectVirtualPath:"flatjs/evolve",rejectWarnings:!1,devServer:{autoOpen:!0,pageProxy:"/pages",mockOptions:{mockBaseDir:"mocks"},clientOverlay:{errors:!0,warnings:!1},webSocketURL:"localIp",middlewares:[],watchOptions:{poll:1e3,ignored:["**/node_modules","**/mocks"],aggregateTimeout:500},defaultServeGlobalData:()=>Promise.resolve({}),bundleDirResolver:e=>e},webpack:{target:["web","es5"],plugins:[],ruleSets:[],publicPath:"auto",resolve:{},externals:{vue:"Vue",react:"React","react-dom":"ReactDOM"},outputDir:"public",enableBundleHashName:!0},pluginOptions:{},loaderOptions:{assetDataUrlMaxSize:4096,babelOptions:{usePreset:"react",plugins:[],presets:[]},
|
1
|
+
export const defaultEvolveOptions={projectCwd:process.cwd(),projectVirtualPath:"flatjs/evolve",rejectWarnings:!1,devServer:{autoOpen:!0,pageProxy:"/pages",mockOptions:{mockBaseDir:"mocks"},clientOverlay:{errors:!0,warnings:!1},webSocketURL:"localIp",middlewares:[],watchOptions:{poll:1e3,ignored:["**/node_modules","**/mocks"],aggregateTimeout:500},defaultServeGlobalData:()=>Promise.resolve({}),bundleDirResolver:e=>e},webpack:{target:["web","es5"],plugins:[],ruleSets:[],publicPath:"auto",resolve:{},externals:{vue:"Vue",react:"React","react-dom":"ReactDOM"},outputDir:"public",enableBundleHashName:!0},pluginOptions:{},loaderOptions:{assetDataUrlMaxSize:4096,babelOptions:{usePreset:"react",plugins:[],presets:[]},lessOptions:{},postcssOptions:{cssnanoOptions:{}},pixelOptions:{rootValue:{px:100,rpx:1},outputUnit:"rem"},modularImports:[]},globalCompilerOptions:{runTsChecker:!0},entryMap:{},multiHtmlCdn:{},multiHtmlCdnEnvResolver:function cdnResolver(){},needVerifyPackages:{},packageInstallChecker:{enabled:!1,detectModules:["@dimjs/*"],throwError:!1,showAllInstalledGraph:!0},ci:{basedBranch:"origin/master"}};
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { type UserConfigExport, type ConfigEnvBase } from '@armit/config-loader';
|
2
|
-
import { type requireResolve } from '@flatjs/common';
|
3
1
|
import { type PartialDeep } from 'type-fest';
|
2
|
+
import { type ConfigEnvBase, type UserConfigExport } from '@armit/config-loader';
|
3
|
+
import { type requireResolve } from '@flatjs/common';
|
4
4
|
import { type FlatEvolveOptions } from '../types/types-options.js';
|
5
5
|
export interface EvolveConfigBase extends ConfigEnvBase {
|
6
6
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
import{relative}from"node:path";import{chalk,logger,mergeOptions,urlJoin}from"@flatjs/common";import
|
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,a,n)=>{const[i,s]=Object.entries(t)[0],{devServerPort:l,devServerHostUri:p}=s;for(const[,e]of Object.entries(t)){const r=e.entryConfig,o=r.options?.moduleFederation,t=o?.remotes||[],n=flatEntryMap(a);t.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 c=Object.keys(t).reduce(((e,r)=>(e[r]=t[r].entryConfig,e)),{}),m=urlJoin(p,["public"]),f=await loadWebpackConfig("development",c,mergeOptions(n,{webpack:{publicPath:m}})),d=shouldEnableReactFastRefresh(!0,[i,s.entryConfig],n),v=assertSingleCompiler(c,f,n,d),g=webpack(v),h=addCompilerToDevServer(g,d,l,o,n),b=g.name||"";return g.hooks.invalid.tap("fileChange",(r=>{const o=relative(e,r||"");logger.info(`file change ➩ ${chalk(["cyan"])(o)}`,b)})),g.hooks.done.tap("compileDone",(()=>{logger.info(`debug page ➩ ${chalk(["cyan"])(r)}`,b)})),h};
|
@@ -1 +1 @@
|
|
1
|
-
import https from"node:https";import{prepareMockDomain}from"@flatjs/mock";
|
1
|
+
import express from"express";import https from"node:https";import{prepareMockDomain}from"@flatjs/mock";export const createDevServer=async e=>{const r=express(),t=e.devServer?.mockOptions,{mockPort:o,hostUri:p,publicIp:s}=await prepareMockDomain(t||{});return new Promise((t=>{const i=e.devServer?.https?https.createServer(e.devServer?.https,r):r;r.set("hostUri",p),i.listen(o,(()=>{t({app:r,publicIp:s,devHostUri:p,devPort:o})}))}))};
|
@@ -1,6 +1,6 @@
|
|
1
|
-
export * from './middlewares/index.js';
|
2
1
|
export * from './add-compiler-to-dev-server.js';
|
3
|
-
export * from './create-dev-server.js';
|
4
2
|
export * from './create-app-page-route.js';
|
5
|
-
export * from './create-dev-server
|
3
|
+
export * from './create-dev-server.js';
|
6
4
|
export * from './create-dev-server-compiler-task.js';
|
5
|
+
export * from './create-dev-server-entries.js';
|
6
|
+
export * from './middlewares/index.js';
|
package/dist/dev-server/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export*from"./
|
1
|
+
export*from"./add-compiler-to-dev-server.js";export*from"./create-app-page-route.js";export*from"./create-dev-server.js";export*from"./create-dev-server-compiler-task.js";export*from"./create-dev-server-entries.js";export*from"./middlewares/index.js";
|
@@ -1 +1 @@
|
|
1
|
-
import{readFileSync}from"node:fs";import{join}from"node:path";import{urlJoin}from"@flatjs/common";import
|
1
|
+
import _ from"lodash";import{readFileSync}from"node:fs";import{join}from"node:path";import{urlJoin}from"@flatjs/common";import{getPackageDir}from"../../helpers/get-pacakge-dir.js";import{normalizePageProxy}from"../../helpers/normalize-page-proxy.js";import{getSortedModules}from"./get-all-sorted-modules.js";export const getPageMainHtml=async(e,r,t)=>{const o=getPackageDir(),a=readFileSync(join(o,"./templates/main.html"),"utf-8"),n=getSortedModules(t,e,r),i=normalizePageProxy(t.devServer?.pageProxy||"/pages"),m=n.map((e=>{const{entryName:t,entryContent:o,isServedEntry:a,projectVirtualPath:n,normalizedEntryName:m}=e,s=urlJoin(r,[i,m],{env:"me"}),l=o.options?.servePageMainLinkFn||(e=>e);return{link:l(s,{hostUri:r,entryName:t,virtualPath:n}),name:t.replace(n,"").replace(/^\//,""),flagText:a?"serve":"static",isServed:a?1:0}}));m.push({flagText:"serve",isServed:1,link:urlJoin(r,[i,"/runtime/manifest.json"]),name:"Runtime Manifest"});const s={title:"@flatjs/evolve",modules:m.sort(((e,r)=>r.isServed-e.isServed))};return _.template(a)(s)};
|
@@ -1 +1 @@
|
|
1
|
-
import{existsSync,readFileSync}from"node:fs";import{isAbsolute,join}from"node:path";import{ensureSlash,urlJoin}from"@flatjs/common";import
|
1
|
+
import _ from"lodash";import{existsSync,readFileSync}from"node:fs";import{isAbsolute,join}from"node:path";import{ensureSlash,urlJoin}from"@flatjs/common";import{allowPx2remForModule}from"../../helpers/allow-px2rem-for-module.js";import{getHtmlPluginConfig}from"../../helpers/get-html-plugin-config.js";import{getPackageDir}from"../../helpers/get-pacakge-dir.js";import{getRuntimeCDNBase}from"../../helpers/get-runtime-cdn-base.js";import{normalizeEvolveEntryName}from"../../helpers/normalize-entry-map.js";import{normalizePageProxy}from"../../helpers/normalize-page-proxy.js";import{normalizeTemplateInjectTokens}from"../../helpers/normalize-template-inject-tokens.js";import{injectFederationScripts}from"../../helpers/script-injects.js";import{getBundleAsset}from"./get-bundle-asset.js";import{getDevServerHostUri}from"./get-dev-server-host-uri.js";import{getHmrRuntimeChunks}from"./get-hmr-runtime-chunks.js";import{getNormalizedEntryName}from"./get-normalized-entry-name.js";export const getPageModuleHtml=async(e,t,r,o,l)=>{const{entryMap:a,projectVirtualPath:i}=l,n=Object.keys(a).sort(((e,t)=>t.length-e.length)),m=getPackageDir(),s=n.find((e=>{const r=normalizeEvolveEntryName(e,i);return ensureSlash(t.path.replace(/^\//,""),!0).startsWith(ensureSlash(r,!0))}));if(!s){const e=readFileSync(join(m,"./templates/module-404.html"),"utf-8");return _.template(e)({title:"404 Not Found",errorMeta:[{name:"@flatjs/evolve workspace",value:m},{name:"served entry names",value:JSON.stringify(n)},{name:"module path",value:`${t.path}`}]})}const p=a[s],u=p.options,c=getDevServerHostUri(e,s,r),g=u?.serveModuleTemplate||"./templates/module.html",d=join(l.projectCwd,"./templates/module.html"),f=readFileSync(isAbsolute(g)?g:existsSync(d)?d:join(m,"./templates/module.html"),"utf-8"),h=l.devServer,v=h?.defaultServeGlobalData?await h.defaultServeGlobalData(p,r):{},j={mode:"development",envCdn:urlJoin(r,["public"])},y=getNormalizedEntryName(s,i,e,h),S=normalizePageProxy(h?.pageProxy||"/pages"),H=[getRuntimeCDNBase(l.multiHtmlCdn,l.multiHtmlCdnEnvResolver||function cdnResolver(){})],P=normalizeTemplateInjectTokens(j,u),C={title:getHtmlPluginConfig("title",j,u?.title),favicon:getHtmlPluginConfig("favicon",j,u?.favicon),viewport:allowPx2remForModule([s,p],l)?getHtmlPluginConfig("viewport",j,u?.viewport):"",...P,inlineScripts:P.inlineScripts?.concat(H),moduleFederationScripts:injectFederationScripts({me:[urlJoin(r,["public"])]},l.multiHtmlCdnEnvResolver),global:{hostUrl:r,apiBase:urlJoin(r,[o]),virtualPath:join(S,i),moduleName:s.replace(i,"").replace(/^\//,""),...v,...u?.serveGlobalData||{}},styles:[getBundleAsset(c,y,".css")],scripts:[getBundleAsset(c,y,".js")]};C.headBeforeHtmlTags?C.headBeforeHtmlTags=C.headBeforeHtmlTags.slice(0):C.headBeforeHtmlTags=[];return getHmrRuntimeChunks(e,s,y,p,l,c).forEach((e=>{C.headBeforeHtmlTags?.push(`<script src="${e}"><\/script>`)})),_.template(f)(C)};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import type {
|
1
|
+
import type { EvolveMultiCDNConfig, EvolveMultiCDNEnvResolver } from '../types/types-multi-html.js';
|
2
2
|
export declare const getRuntimeCDNBase: (config: EvolveMultiCDNConfig, cdnResolver: EvolveMultiCDNEnvResolver, requireFn?: string) => string;
|
package/dist/helpers/index.d.ts
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
export * from './allow-px2rem-for-module.js';
|
2
2
|
export * from './assert-group-entry-item.js';
|
3
|
+
export * from './assert-single-compiler.js';
|
3
4
|
export * from './chunk-entry-map.js';
|
5
|
+
export * from './delete-object-keys.js';
|
4
6
|
export * from './enable-bundle-hashname-for-module.js';
|
7
|
+
export * from './flat-entry-map.js';
|
5
8
|
export * from './get-bundle-file-name.js';
|
6
9
|
export * from './get-html-plugin-config.js';
|
7
10
|
export * from './get-pacakge-dir.js';
|
8
11
|
export * from './get-runtime-cdn-base.js';
|
12
|
+
export * from './is-deep-equal.js';
|
13
|
+
export * from './json-serializer.js';
|
9
14
|
export * from './merge-babel-options.js';
|
15
|
+
export * from './normalize-check-entry-options.js';
|
10
16
|
export * from './normalize-entry-map.js';
|
17
|
+
export * from './normalize-group-name.js';
|
18
|
+
export * from './normalize-page-proxy.js';
|
19
|
+
export * from './normalize-resolve-alias.js';
|
20
|
+
export * from './normalize-template-inject-tokens.js';
|
11
21
|
export * from './open-page.js';
|
12
22
|
export * from './print-log.js';
|
13
23
|
export * from './refresh-evolve-mock-options.js';
|
14
24
|
export * from './script-injects.js';
|
15
25
|
export * from './should-enable-react-fast-refresh.js';
|
16
|
-
export * from './json-serializer.js';
|
17
|
-
export * from './normalize-resolve-alias.js';
|
18
|
-
export * from './is-deep-equal.js';
|
19
|
-
export * from './verify-group-entry-options.js';
|
20
26
|
export * from './split-to-entry-group.js';
|
21
|
-
export * from './
|
22
|
-
export * from './normalize-page-proxy.js';
|
23
|
-
export * from './flat-entry-map.js';
|
24
|
-
export * from './normalize-template-inject-tokens.js';
|
25
|
-
export * from './normalize-check-entry-options.js';
|
26
|
-
export * from './assert-single-compiler.js';
|
27
|
-
export * from './normalize-group-name.js';
|
27
|
+
export * from './verify-group-entry-options.js';
|
package/dist/helpers/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export*from"./allow-px2rem-for-module.js";export*from"./assert-group-entry-item.js";export*from"./
|
1
|
+
export*from"./allow-px2rem-for-module.js";export*from"./assert-group-entry-item.js";export*from"./assert-single-compiler.js";export*from"./chunk-entry-map.js";export*from"./delete-object-keys.js";export*from"./enable-bundle-hashname-for-module.js";export*from"./flat-entry-map.js";export*from"./get-bundle-file-name.js";export*from"./get-html-plugin-config.js";export*from"./get-pacakge-dir.js";export*from"./get-runtime-cdn-base.js";export*from"./is-deep-equal.js";export*from"./json-serializer.js";export*from"./merge-babel-options.js";export*from"./normalize-check-entry-options.js";export*from"./normalize-entry-map.js";export*from"./normalize-group-name.js";export*from"./normalize-page-proxy.js";export*from"./normalize-resolve-alias.js";export*from"./normalize-template-inject-tokens.js";export*from"./open-page.js";export*from"./print-log.js";export*from"./refresh-evolve-mock-options.js";export*from"./script-injects.js";export*from"./should-enable-react-fast-refresh.js";export*from"./split-to-entry-group.js";export*from"./verify-group-entry-options.js";
|
@@ -1 +1 @@
|
|
1
|
-
function stringifyWithFns(n){return JSON.stringify(n,(function(n,t){if("function"==typeof t)try{return makeFunctionFromString(t),t.toString()}catch
|
1
|
+
import vm from"node:vm";function stringifyWithFns(n){return JSON.stringify(n,(function(n,t){if("function"==typeof t)try{return makeFunctionFromString(t),t.toString()}catch{return`function ${t.toString()}`}return t}))}function looksLikeAFunctionString(n){return!![/^function[^(]*\(([^()]*)\)\s*\{[\s\S]*\}$/m,/^(\s*async\s*)?(\w*\s*)\(([^)]*)\)\s*=>\s*(.*)$/m,/^\s*\w+\s*=>/m].find((t=>t.test(n)))}function makeFunctionFromString(n){return vm.runInNewContext("("+n+")")}function parseWithFns(n){try{return JSON.parse(n,(function(n,t){return looksLikeAFunctionString(t)?makeFunctionFromString(t):t}))}catch{return{}}}export const jsonSerializer={stringify:stringifyWithFns,parse:parseWithFns};
|
@@ -1 +1 @@
|
|
1
|
-
import{join}from"node:path";
|
1
|
+
import _ from"lodash";import{join}from"node:path";const normalizeEntryGroupOptions=o=>o&&o.groupName?{groupName:o.groupName,groupingSource:"manual"}:{groupingSource:"auto"};export const normalizeEvolveEntryName=(o,r)=>{const e=o.replace(/^\//,""),n=r.replace(/^\//,"");return(e.startsWith(n)?e:join(n,e)).replace(/\/$/,"")};export const normalizeEvolveEntryMap=(o={},r={})=>{const e={};for(const[n,t]of Object.entries(r)){const r={options:{}};if(o[n]){const p=normalizeEntryGroupOptions(t);e[n]=_.merge({},r,t,o[n],p)}}return e};
|
@@ -1 +1 @@
|
|
1
|
-
import opn from"better-opn";export const openPage=n=>{try{opn(n)}catch
|
1
|
+
import opn from"better-opn";export const openPage=n=>{try{opn(n)}catch{console.warn("Unable to open browser. If you are running in a headless environment\n")}};
|
@@ -1 +1 @@
|
|
1
|
-
import{requireResolve}from"@flatjs/common";import{loadMockConfig
|
1
|
+
import _ from"lodash";import{requireResolve}from"@flatjs/common";import{getMockCwd,loadMockConfig}from"@flatjs/mock";export const refreshEvolveMockOptions=async(o,t,e)=>{const s=t.devServer,r=e?.esmLoaderOptions,i=r?.externals||[],n={projectCwd:o,resolve:requireResolve},c=await loadMockConfig(n,o,s?.mockOptions||{},_.merge({},e,{configFile:"flatjs-mock",esmLoaderOptions:{externals:[...i,"@flatjs/mock"]}}));if(s){s.mockOptions=c||{},s.mockOptions&&!s.mockOptions.https&&(s.mockOptions.https=s?.https);const o=getMockCwd(c);Array.isArray(s?.watchOptions?.ignored)&&s?.watchOptions?.ignored.push(o)}return t};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { type
|
1
|
+
import { type EvolveMultiCDNConfig, type EvolveMultiCDNEnvResolver, type EvolveMultiCdnEnvType } from '../types/types-multi-html.js';
|
2
2
|
export declare function httpUrlJoin(first?: string, second?: string): string;
|
3
3
|
/**
|
4
4
|
* To extract the best matched CDN configuration url address, either use URL `query.env` or customize the `envRresolver`
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { type
|
1
|
+
import { type EvolveEntryItemOption, type EvolveEntryMap, type EvolveEntryMapContent } from '../types/types-entry-map.js';
|
2
2
|
import { type FlatEvolveOptions } from '../types/types-options.js';
|
3
3
|
/**
|
4
4
|
* Groups the manual entries based on their group names.
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export*from"./define-config/index.js";export*from"./load-config/index.js";export*from"./main/index.js";export*from"./types/types-
|
1
|
+
export*from"./define-config/index.js";export*from"./load-config/index.js";export*from"./main/index.js";export*from"./types/types-entry-map.js";export*from"./types/types-options.js";
|
@@ -1 +1 @@
|
|
1
|
-
import{searchConfig}from"@armit/config-loader";import{mergeOptions
|
1
|
+
import{searchConfig}from"@armit/config-loader";import{logger,mergeOptions}from"@flatjs/common";import{configFileName,moduleName}from"../constants.js";import{defaultEvolveOptions}from"../default-options.js";import{normalizeResolveAlias}from"../helpers/normalize-resolve-alias.js";import{refreshEvolveMockOptions}from"../helpers/refresh-evolve-mock-options.js";export const loadEvolveConfig=async(o,e,i={},s={configFile:configFileName,esmLoaderOptions:{externals:[/^@flatjs\/.*/]}})=>{const{configFile:r,esmLoaderOptions:l}=s,a=await searchConfig(r,e,{esm:{...l,projectCwd:e}});let n={};n="function"==typeof a?.config?await(a?.config(o)):a?.config||{};const t=mergeOptions(defaultEvolveOptions,n),m=mergeOptions(t,i),f=mergeOptions(m,{projectCwd:e}),c="build"===o.command?f:await refreshEvolveMockOptions(e,f,s);return logger.debug(`Load evolve config:\n${JSON.stringify(c,null,2)}`,moduleName),c.webpack?.resolve?.alias&&(c.webpack.resolve.alias=normalizeResolveAlias(e,c.webpack?.resolve?.alias)),c};
|
@@ -9,7 +9,8 @@ const svgOptimize = (buffer, svgoOption) => {
|
|
9
9
|
return data;
|
10
10
|
};
|
11
11
|
const iconLoader = function iconLoader(source) {
|
12
|
-
|
12
|
+
if (this.cacheable)
|
13
|
+
this.cacheable(true);
|
13
14
|
const options = this.getOptions();
|
14
15
|
const callback = this.async();
|
15
16
|
try {
|
package/dist/main/index.d.ts
CHANGED
package/dist/main/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export*from"./start-build.js";export*from"./start-
|
1
|
+
export*from"./start-build.js";export*from"./start-build-dynamic.js";export*from"./start-serve.js";export*from"./start-static.js";
|
@@ -1 +1 @@
|
|
1
|
-
import{isAbsolute,join}from"node:path";import{getDiffFiles
|
1
|
+
import Listr from"listr";import{isAbsolute,join}from"node:path";import{getCommitIdOfBranch,getDiffFiles}from"@armit/git";import{arraysIntersect,chalk,logger,requireResolve}from"@flatjs/common";import{traverseGraph}from"@flatjs/graph";import{createGlobalCompiler}from"../compiler/create-global-compiler.js";import{ignoreEntryOptionKeys,moduleName}from"../constants.js";import{filterActivedEntriesByEntryInputs,filterActivedEntriesByModule}from"../helpers/filter-actived-entries.js";import{getGitRoot}from"../helpers/get-git-root.js";import{getMaxProcessTasks}from"../helpers/get-max-process-tasks.js";import{jsonSerializer}from"../helpers/json-serializer.js";import{normalizeEvolveEntryMap}from"../helpers/normalize-entry-map.js";import{resolveEntryMapInputFiles}from"../helpers/resolve-entry-map-input-files.js";import{splitToEntryGroup}from"../helpers/split-to-entry-group.js";import{loadEvolveConfig}from"../load-config/load-evolve-config.js";import{createThreadWorker}from"./create-thread-worker.js";import{envVerify}from"./env-verify.js";export async function getBuildEntryFiles(e,r,t,o,i){const n=[],s=[];for(const e of t)r.includes(e)?n.push(e):s.push(e);if(i&&logger.info("Use custom graph traverse filter",moduleName),s.length){const t=await traverseGraph({input:s,projectCwd:e,treeNodeFilter:i||(()=>!0),lessImportOptions:{projectCwd:e,aliases:o}});if(!t)return n;logger.debug(`DependencyGraph:\n${JSON.stringify(t,null,2)}`);for(const e of s){const o=t[e]||[];arraysIntersect(o,r)&&n.push(e)}}return n}export async function dynamicCheckBuildEntryMap(e,r,t,o,i){const n={projectCwd:e,command:"build",resolve:requireResolve},s=await loadEvolveConfig(n,e,o,i);if(s.ci?.fixedBuildModules&&s.ci?.fixedBuildModules.length){logger.info("Use `fixedBuildModules` configuration to build...");return{buildEntries:filterActivedEntriesByModule(s.entryMap,s.ci?.fixedBuildModules),newEvolveOptions:s}}if(logger.info("Dynamicly checking code changed modules ..."),!r){const e=s.ci?.basedBranch||"origin/master";r=await getCommitIdOfBranch(e),logger.info(`Resolving base branch "${e}" commit hash "${r}" ...`)}let a=r?await getDiffFiles(r,t):[];const l=getGitRoot(e);if(!l)throw new Error(`No .git root (${e}) found`);if(a=a.map((e=>isAbsolute(e)?e:join(l,e))),logger.debug(`Diff files: \n${JSON.stringify(a,null,2)}`),!a.length)return logger.warn("It seems that there are no code files changed."),{buildEntries:{},newEvolveOptions:s};const c=await resolveEntryMapInputFiles(e,s.entryMap),p=await getBuildEntryFiles(e,a,c,s.webpack?.resolve?.alias,s.ci?.graphTreeNodeFilter);logger.debug(`To build entry files: \n${JSON.stringify(p,null,2)}`);return{buildEntries:await filterActivedEntriesByEntryInputs(e,s.entryMap,p),newEvolveOptions:s}}export const startDynamicBuild=async(e,r,t,o={},i)=>{const{buildEntries:n,newEvolveOptions:s}=await dynamicCheckBuildEntryMap(e,r,t,o,i);await envVerify(e,s);const a=normalizeEvolveEntryMap(n,s.entryMap),l=splitToEntryGroup(a,s,ignoreEntryOptionKeys,!1);if(!l.length)return logger.warn("No build entries provided!"),[];const c=l.map((e=>Object.values(e)?.[0]?.groupName));await createGlobalCompiler(!1,s);const{threads:p={}}=s,d=getMaxProcessTasks(l.length,p?.maxThreads);logger.info(`Start dynamic build with (${chalk(["magenta"])(String(d))}) workers:\n${JSON.stringify({buildEntriesGroup:c},null,2)}`);const m=createThreadWorker({...p,maxThreads:d}),f=new Listr([],{concurrent:d,exitOnError:!0}),g=[];for(const r of l){const t=Object.values(r)?.[0]?.groupName||"",n=Object.keys(r);f.add({title:`Build group ${t}: ${chalk(["magenta"])(`${JSON.stringify(n,null,2)}`)} ...`,task:async()=>{const r=await m.startBuildWorker({projectCwd:e,entryKeys:n,serializedEvolveOptions:jsonSerializer.stringify(o),configLoaderOptions:i});g.push(r)}})}if(f.tasks.length)try{await f.run()}catch(e){throw m.terminate(),e}return m.terminate(),g};
|
package/dist/main/start-build.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import{chalk,logger,requireResolve}from"@flatjs/common";import
|
1
|
+
import Listr from"listr";import{chalk,logger,requireResolve}from"@flatjs/common";import{createGlobalCompiler}from"../compiler/create-global-compiler.js";import{ignoreEntryOptionKeys}from"../constants.js";import{filterActivedEntriesByModule}from"../helpers/filter-actived-entries.js";import{getMaxProcessTasks}from"../helpers/get-max-process-tasks.js";import{jsonSerializer}from"../helpers/json-serializer.js";import{normalizeEvolveEntryMap}from"../helpers/normalize-entry-map.js";import{splitToEntryGroup}from"../helpers/split-to-entry-group.js";import{loadEvolveConfig}from"../load-config/load-evolve-config.js";import{createThreadWorker}from"./create-thread-worker.js";import{envVerify}from"./env-verify.js";export const startBuild=async(r,e,t={},o)=>{const i={projectCwd:r,command:"build",resolve:requireResolve},s=await loadEvolveConfig(i,r,t,o);await envVerify(r,s);const a=filterActivedEntriesByModule(s.entryMap,e),n=normalizeEvolveEntryMap(a,s.entryMap),l=splitToEntryGroup(n,s,ignoreEntryOptionKeys,!1);if(!l.length)return logger.warn("No build entries provided!"),[];const p=l.map((r=>Object.values(r)?.[0]?.groupName));await createGlobalCompiler(!1,s);const{threads:m={}}=s,c=getMaxProcessTasks(l.length,m?.maxThreads);logger.info(`Start standard build with (${chalk(["magenta"])(String(c))}) workers:\n${JSON.stringify({buildEntriesGroup:p},null,2)}`);const d=createThreadWorker({...m,maxThreads:c}),f=new Listr([],{concurrent:c,exitOnError:!0}),g=[];for(const e of l){const i=Object.values(e)?.[0]?.groupName||"",s=Object.keys(e);f.add({title:`Build group ${i}: ${chalk(["magenta"])(`${JSON.stringify(s,null,2)}`)} ...`,task:async()=>{const e=await d.startBuildWorker({projectCwd:r,entryKeys:s,serializedEvolveOptions:jsonSerializer.stringify(t),configLoaderOptions:o});g.push(e)}})}if(f.tasks.length)try{await f.run()}catch(r){throw d.terminate(),r}return d.terminate(),g};
|
@@ -1 +1 @@
|
|
1
|
-
import webpack from"webpack";import{loadWebpackConfig}from"../create-webpack/load-webpack-config.js";import{assertSingleCompiler}from"../helpers/assert-single-compiler.js";export const startGroupEntryBuild=async(r,e)=>{const n=await loadWebpackConfig("production",r,e),o=assertSingleCompiler(r,n,e,!1);return new Promise(((
|
1
|
+
import webpack from"webpack";import{loadWebpackConfig}from"../create-webpack/load-webpack-config.js";import{assertSingleCompiler}from"../helpers/assert-single-compiler.js";import{normalizeEvolveEntryName}from"../helpers/normalize-entry-map.js";export const startGroupEntryBuild=async(r,e)=>{const n=await loadWebpackConfig("production",r,e),o=assertSingleCompiler(r,n,e,!1);return new Promise(((n,t)=>{webpack(o,((o,a)=>{if(o)return t(o);const i=a?.toJson();if(i?.errors?.length)return t(i.errors);if(e.rejectWarnings&&i?.warnings?.length)return t(i.warnings);const{projectVirtualPath:s}=e,p=Object.keys(r).map((r=>normalizeEvolveEntryName(r,s)));n({name:p,warningStats:i?.warnings})}))}))};
|
package/dist/main/start-serve.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import{logger,requireResolve}from"@flatjs/common";import{filterActivedEntriesByModule}from"../helpers/filter-actived-entries.js";import{normalizeEvolveEntryMap}from"../helpers/normalize-entry-map.js";import{loadEvolveConfig}from"../load-config/load-evolve-config.js";import{prepareServe}from"./prepare-serve.js";export const startServe=async(e,r,o={},t)=>{const
|
1
|
+
import{logger,requireResolve}from"@flatjs/common";import{createGlobalCompiler}from"../compiler/create-global-compiler.js";import{filterActivedEntriesByModule}from"../helpers/filter-actived-entries.js";import{normalizeEvolveEntryMap}from"../helpers/normalize-entry-map.js";import{loadEvolveConfig}from"../load-config/load-evolve-config.js";import{prepareServe}from"./prepare-serve.js";export const startServe=async(e,r,o={},t)=>{const l={projectCwd:e,command:"serve",resolve:requireResolve},i=await loadEvolveConfig(l,e,o,t),a=filterActivedEntriesByModule(i.entryMap,r),n=Object.keys(a);if(!n.length)return logger.warn("No served entries providered!"),[];logger.info({servedEntries:n});const p=normalizeEvolveEntryMap(a,i.entryMap);return await createGlobalCompiler(!0,i),prepareServe(e,p,i)};
|
@@ -1 +1 @@
|
|
1
|
-
import{projectHasYarn}from"@armit/package";import{chalk,logger,requireResolve}from"@flatjs/common";import
|
1
|
+
import ImageMinimizerPlugin from"image-minimizer-webpack-plugin";import{projectHasYarn}from"@armit/package";import{chalk,logger,requireResolve}from"@flatjs/common";import{moduleName}from"../constants.js";const logs=new Map;export const imageMinimizer=()=>{const e=[],i=[["svgo",{}],["gifsicle",{}],["jpegtran",{}],["pngquant",{}]].map((i=>{const n=i[0];try{return requireResolve(import.meta.url,`imagemin-${n}`),i}catch{if(!logs.get(n)){logs.set(n,!0);const i=chalk(["magenta"])(`"${projectHasYarn()?"yarn add":"npm install"} imagemin-${n} -D"`);e.push(`Execute ${i} for assets optimization`)}return null}})).filter(Boolean);if(e.length)for(const i of e)logger.warn(i,moduleName);return i.length?new ImageMinimizerPlugin({minimizer:{implementation:ImageMinimizerPlugin.imageminMinify,options:{plugins:i}}}):null};
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import
|
1
|
+
import TerserPlugin from"terser-webpack-plugin";import{mergeOptions}from"@flatjs/common";import{defaultTerserOptions}from"./default-options.js";export const terserMinimizer=e=>new TerserPlugin({parallel:!0,
|
2
2
|
// Disable Extract all or some (use /^\**!|@preserve|@license|@cc_on/i RegExp) comments.
|
3
3
|
extractComments:!1,terserOptions:mergeOptions(defaultTerserOptions,e)});
|
@@ -1 +1 @@
|
|
1
|
-
import{relative}from"node:path";import
|
1
|
+
import{relative}from"node:path";import Graph from"tarjan-graph";import webpack from"webpack";import{mergeOptions}from"@flatjs/common";const BASE_ERROR="Circular dependency detected:\r\n",PLUGIN_TITLE="CircularDependencyPlugin";export class CircularDependencyPlugin{constructor(o={}){this.options=mergeOptions({exclude:/node_modules/,include:/.*/,failOnError:!1,allowAsyncCycles:!1,projectCwd:process.cwd()},o)}apply(o){const e=this.options.projectCwd;o.hooks.compilation.tap(PLUGIN_TITLE,(o=>{o.hooks.optimizeModules.tap(PLUGIN_TITLE,(t=>{this.options.onStart&&this.options.onStart({compilation:o});const n=new(Graph.default||Graph);for(const e of t){const t=[];for(const n of e.dependencies){if(n.constructor&&"CommonJsSelfReferenceDependency"===n.constructor.name)continue;let r=null;r=o.moduleGraph?o.moduleGraph.getModule(n):n.module,r&&(r instanceof webpack.NormalModule&&r.resource&&(this.options.allowAsyncCycles&&n.weak||e!==r&&t.push(r.identifier())))}n.add(e.identifier(),t)}const r=n.getCycles();this.isCyclic(r,o,e),this.options.onEnd&&this.options.onEnd({compilation:o})}))}))}isCyclic(o,e,t){o.forEach((o=>{const n=o.slice().reverse().map((o=>{const t=e.findModule(o.name);return t instanceof webpack.NormalModule&&t.resource||null}));if(n.every((o=>!o||this.options.exclude.test(o)||!this.options.include.test(o))))return;const r=n.map((o=>relative(t,o)));if(this.options.onDetected){try{this.options.onDetected({paths:r.concat([r[0]]),compilation:e})}catch(o){e.errors.push(o)}return}const s=new Error(BASE_ERROR.concat(r.concat([r[0]]).join(" -> ")));this.options.failOnError?e.errors.push(s):e.warnings.push(s)}))}}
|
@@ -1 +1 @@
|
|
1
|
-
import{getLastCommitHash,gitBranchName}from"@armit/git";
|
1
|
+
import webpack from"webpack";import{getLastCommitHash,gitBranchName}from"@armit/git";export const createBuiltinDefineVariables=async(e,i)=>{const t=await getLastCommitHash(),n=await gitBranchName();return[new webpack.DefinePlugin({__SENTRY_DEBUG__:e,"process.env.FLAT_BUILD_DATE":JSON.stringify((new Date).toISOString()),"process.env.FLAT_COMMIT_HASH":JSON.stringify(t),"process.env.FLAT_BRANCH_NAME":JSON.stringify(n),"process.env.FLAT_RELEASE_VERSION":JSON.stringify(i.ci?.releaseVersion||t),...i.pluginOptions.definePlugin})]};
|
@@ -1 +1 @@
|
|
1
|
-
import{join}from"node:path";import{ensureSlash}from"@flatjs/common";import
|
1
|
+
import{join}from"node:path";import webpack from"webpack";import{ensureSlash}from"@flatjs/common";import{normalizeEvolveEntryName}from"../../helpers/normalize-entry-map.js";import{injectFederationScripts}from"../../helpers/script-injects.js";import{HtmlInjectScriptPlugin}from"../html-inject-scripts/plugin-html-inject-script.js";import{ExternalTemplateRemotesPlugin}from"./external-template-remotes.js";const normalizeWidgetName=(e="")=>e.replace(/[/-]/g,"_").toLowerCase(),remoteFileName=e=>join(e,"micro-remote-module.js");export const createModuleFederationPlugin=(e,t,o)=>{const r=o.projectVirtualPath,n=o.multiHtmlCdn,i=o.multiHtmlCdnEnvResolver,m=[];for(const o of t){const[t,a]=o,l=a.options?.moduleFederation;if(l){const{remotes:o,exposes:a,...s}=l,c=remoteFileName(t),p=normalizeWidgetName(t),u=(a?Array.isArray(a)?a:[a]:[]).map((e=>{const o={};for(const[r,n]of Object.entries(e))o[r]={...n,name:join(t,n.name.replace(/^\//,""))};return o})),d=(o||[]).map((({name:e,endpoint:t})=>{const o=normalizeEvolveEntryName(e,r),n=normalizeWidgetName(o),i=remoteFileName(o),m=t?ensureSlash(t(e,o),!1):"[window.evolveFetchMicroWidgets()]";return{[n]:`${n}@${m}/${i}`}}));m.push(new webpack.container.ModuleFederationPlugin({...s,name:p,filename:c,remotes:d,exposes:u}),new ExternalTemplateRemotesPlugin),e||m.unshift(new HtmlInjectScriptPlugin([injectFederationScripts(n,i)]))}}return m};
|
@@ -1 +1 @@
|
|
1
|
-
import
|
1
|
+
import HtmlWebpackPlugin from"html-webpack-plugin";import{basename}from"node:path";import webpack from"webpack";import{getRuntimeCDNBase}from"../../helpers/get-runtime-cdn-base.js";import{findEnvCdn,httpUrlJoin}from"../../helpers/script-injects.js";export class FlatEvolveMultiCdnPlugin{constructor(e){if(this.pluginName="FlatEvolveMultiCdnPlugin",this.requireFn=webpack.RuntimeGlobals.publicPath,this.config=e.multiHtmlCdn,this.cdnResolver=e.multiHtmlCdnEnvResolver||function cdnResolver(){},!this.config?.prod)throw new Error("We must setup `prod` for each CDN config node!")}apply(e){e.hooks.thisCompilation.tap(this.pluginName,(e=>{e.mainTemplate.hooks.requireExtensions.tap(this.pluginName,((t,n)=>{const i=[];i.push("// Dynamic assets path override(`@flatjs/evolve`) plugin-multi-html-cdn`)");const s=e.chunkGraph?.getTreeRuntimeRequirements(n);return s&&s.has(webpack.RuntimeGlobals.requireScope)&&i.push(webpack.Template.indent(getRuntimeCDNBase(this.config,this.cdnResolver,this.requireFn))),webpack.Template.asString(i)}))})),e.hooks.compilation.tap(this.pluginName,(e=>{HtmlWebpackPlugin.getHooks(e).beforeAssetTagGeneration.tap(this.pluginName,(e=>{const{assets:t,plugin:n,outputName:i}=e,s=n?.options?.chunks||[],r=Array.isArray(s)?s.find((e=>i.includes(e))):s,{userOptions:o}=e.plugin;if(!r)throw new Error("We must have current chunk!");const a=t.js.filter((e=>e.includes(r))),l=t.css.filter((e=>e.includes(r))),p=o.multiCdn,u=t.publicPath,c=a.map((e=>{if(p.disabled)return basename(e);const t=findEnvCdn(this.config,p.env);return httpUrlJoin(t,e.replace(u,""))})),m=l.map((e=>{if(p.disabled)return basename(e);const t=findEnvCdn(this.config,p.env);return httpUrlJoin(t,e.replace(u,""))}));return e.assets.js=c,e.assets.css=m,e}))}))}}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { type Compiler } from 'webpack';
|
2
|
+
export interface TsCheckerGuardPluginOption {
|
3
|
+
/**
|
4
|
+
* Whether to exit the process when issues is not empty
|
5
|
+
* @default false
|
6
|
+
*/
|
7
|
+
autoExit?: boolean;
|
8
|
+
}
|
9
|
+
export declare class TsCheckerGuardPlugin {
|
10
|
+
private options;
|
11
|
+
constructor(option?: TsCheckerGuardPluginOption);
|
12
|
+
apply(compiler: Compiler): void;
|
13
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
import ForkTsCheckerWebpackPlugin from"fork-ts-checker-webpack-plugin";import{mergeOptions}from"@flatjs/common";export class TsCheckerGuardPlugin{constructor(r={}){this.options=mergeOptions({autoExit:!1},r)}apply(r){ForkTsCheckerWebpackPlugin.getCompilerHooks(r).issues.tap("issues",(r=>{const{autoExit:e}=this.options,o=r.filter((r=>"error"===r.severity));if(e&&o?.length>0)throw new Error(`TS_CHECKER_ERROR: \n ${JSON.stringify(o,null,2)}`);return r}))}}
|
@@ -1,4 +1,3 @@
|
|
1
1
|
import { type WebpackPlugin } from '../../create-webpack/types.js';
|
2
|
-
import { type EntryMapItem } from '../../types/types-entry-map.js';
|
3
2
|
import { type FlatEvolveOptions } from '../../types/types-options.js';
|
4
|
-
export declare const createTsCheckerPlugins: (serveMode: boolean,
|
3
|
+
export declare const createTsCheckerPlugins: (serveMode: boolean, evolveOptions: FlatEvolveOptions) => WebpackPlugin[];
|
@@ -1 +1 @@
|
|
1
|
-
import ForkTsCheckerWebpackPlugin from"fork-ts-checker-webpack-plugin";export const createTsCheckerPlugins=(e,r
|
1
|
+
import ForkTsCheckerWebpackPlugin from"fork-ts-checker-webpack-plugin";import{TsCheckerGuardPlugin}from"./ts-checker-guard-plugin.js";export const createTsCheckerPlugins=(e,r)=>{const{entryMap:t,globalCompilerOptions:c}=r,s=[];let n=!1;for(const[,e]of Object.entries(t)){if((e.entry||[]).find((e=>/.vue$/.test(e)))){n=!0;break}}if(c?.runTsChecker&&!n){const t=new ForkTsCheckerWebpackPlugin({async:e,devServer:!1,issue:{},typescript:{context:r.projectCwd,memoryLimit:8192}});s.push(t),s.push(new TsCheckerGuardPlugin({autoExit:!e}))}return s};
|
package/dist/types/index.d.ts
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
export * from './types-dev-server.js';
|
2
2
|
export * from './types-entry-map.js';
|
3
3
|
export * from './types-federation.js';
|
4
|
+
export * from './types-global-compiler-options.js';
|
5
|
+
export * from './types-loader-options.js';
|
4
6
|
export * from './types-modular-import.js';
|
5
7
|
export * from './types-multi-html.js';
|
6
8
|
export * from './types-options.js';
|
7
|
-
export * from './types-loader-options.js';
|
8
9
|
export * from './types-webpack.js';
|
package/dist/types/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export*from"./types-dev-server.js";export*from"./types-entry-map.js";export*from"./types-federation.js";export*from"./types-
|
1
|
+
export*from"./types-dev-server.js";export*from"./types-entry-map.js";export*from"./types-federation.js";export*from"./types-global-compiler-options.js";export*from"./types-loader-options.js";export*from"./types-modular-import.js";export*from"./types-multi-html.js";export*from"./types-options.js";export*from"./types-webpack.js";
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import { type SecureContextHttps, type FlatMockOptions } from '@flatjs/mock';
|
2
1
|
import { type RequestHandler } from 'express';
|
3
|
-
import { type
|
4
|
-
import { type
|
2
|
+
import { type ClientConfiguration, type WebSocketURL } from 'webpack-dev-server';
|
3
|
+
import { type FlatMockOptions, type SecureContextHttps } from '@flatjs/mock';
|
5
4
|
import { type EvolveEntryMapContent } from './types-entry-map.js';
|
6
5
|
export interface WebpackWatchOptions {
|
7
6
|
/**
|
@@ -13,9 +12,9 @@ export interface WebpackWatchOptions {
|
|
13
12
|
*/
|
14
13
|
followSymlinks?: boolean;
|
15
14
|
/**
|
16
|
-
* Ignore some files from watching
|
15
|
+
* Ignore some files from watching
|
17
16
|
*/
|
18
|
-
ignored?: string
|
17
|
+
ignored?: string[];
|
19
18
|
/**
|
20
19
|
* Enable polling mode for watching.
|
21
20
|
*/
|
@@ -36,7 +35,7 @@ export type FlatEvolveDevServerOptions = {
|
|
36
35
|
* In webpack-dev-server watch mode is enabled by default.
|
37
36
|
* This configuration will be merged into `webpack-dev-server`
|
38
37
|
*/
|
39
|
-
watchOptions?:
|
38
|
+
watchOptions?: WebpackWatchOptions;
|
40
39
|
/**
|
41
40
|
* Allow us costomized global serve data injected into `window.GLOBAL = {...globalData}`
|
42
41
|
*/
|
@@ -0,0 +1 @@
|
|
1
|
+
export{};
|
@@ -1,6 +1,7 @@
|
|
1
|
+
import { type AcceptedPlugin } from 'postcss';
|
2
|
+
import { type LoaderContext } from 'webpack';
|
1
3
|
import { type TransformOptions } from '@babel/core';
|
2
4
|
import { type PostcssPluginPixelOptions } from '@flatjs/forge-postcss-plugin-pixel';
|
3
|
-
import { type AcceptedPlugin } from 'postcss';
|
4
5
|
import { type ModularImportOption } from './types-modular-import.js';
|
5
6
|
export type BabelInputOptions = Pick<TransformOptions, 'presets' | 'plugins'>;
|
6
7
|
/**
|
@@ -14,6 +15,34 @@ export type BuiltinBabelOptions = BabelInputOptions & {
|
|
14
15
|
*/
|
15
16
|
usePreset?: 'react' | 'vue';
|
16
17
|
};
|
18
|
+
/**
|
19
|
+
* The configurations for `css-loader` modules
|
20
|
+
* https://github.com/webpack-contrib/css-loader/blob/master/README.md#modules
|
21
|
+
*/
|
22
|
+
export type CssLoaderModules = boolean | 'local' | 'global' | 'pure' | 'icss' | Partial<{
|
23
|
+
auto: boolean | RegExp | ((resourcePath: string) => boolean);
|
24
|
+
mode: 'local' | 'global' | 'pure' | 'icss' | ((resourcePath: any) => 'local' | 'global' | 'pure' | 'icss');
|
25
|
+
localIdentName: string;
|
26
|
+
localIdentContext: string;
|
27
|
+
localIdentHashSalt: string;
|
28
|
+
localIdentHashFunction: string;
|
29
|
+
localIdentHashDigest: string;
|
30
|
+
localIdentRegExp: string | RegExp;
|
31
|
+
getLocalIdent: (context: LoaderContext<any>, localIdentName: string, localName: string) => string;
|
32
|
+
namedExport: boolean;
|
33
|
+
exportGlobals: boolean;
|
34
|
+
exportLocalsConvention: 'as-is' | 'camel-case' | 'camel-case-only' | 'dashes' | 'dashes-only' | ((name: string) => string);
|
35
|
+
exportOnlyLocals: boolean;
|
36
|
+
getJSON: ({ resourcePath, imports, exports, replacements, }: {
|
37
|
+
resourcePath: string;
|
38
|
+
imports: object[];
|
39
|
+
exports: object[];
|
40
|
+
replacements: object[];
|
41
|
+
}) => Promise<void> | void;
|
42
|
+
}>;
|
43
|
+
export type CssLoaderOptions = {
|
44
|
+
modules?: CssLoaderModules;
|
45
|
+
} & Record<string, unknown>;
|
17
46
|
/**
|
18
47
|
* The configurations for `builtin` rule set options
|
19
48
|
*/
|
@@ -28,9 +57,7 @@ export interface RuleSetLoaderOptions {
|
|
28
57
|
* The configurations of `css-loader`
|
29
58
|
* https://github.com/webpack-contrib/css-loader/blob/master/README.md#modules
|
30
59
|
*/
|
31
|
-
cssLoaderOptions?:
|
32
|
-
modules?: Record<string, unknown>;
|
33
|
-
} & Record<string, unknown>;
|
60
|
+
cssLoaderOptions?: CssLoaderOptions;
|
34
61
|
/**
|
35
62
|
* The config for `Less`
|
36
63
|
*/
|
@@ -40,11 +67,6 @@ export interface RuleSetLoaderOptions {
|
|
40
67
|
* @default []
|
41
68
|
*/
|
42
69
|
modularImports?: ModularImportOption[];
|
43
|
-
/**
|
44
|
-
* The value indicates whether runs typescript type checker and linter on separate process.
|
45
|
-
* @default true
|
46
|
-
*/
|
47
|
-
runTsChecker?: boolean;
|
48
70
|
/**
|
49
71
|
* The configration options of `postcss-loader`
|
50
72
|
*/
|
@@ -2,8 +2,9 @@ import { type VerifyPackagePattern } from '@armit/package';
|
|
2
2
|
import { type FlatEvolveCI } from './types-ci.js';
|
3
3
|
import { type FlatEvolveDevServerOptions } from './types-dev-server.js';
|
4
4
|
import { type EvolveEntryMap } from './types-entry-map.js';
|
5
|
+
import { type GlobalCompilerOptions } from './types-global-compiler-options.js';
|
5
6
|
import { type RuleSetLoaderOptions } from './types-loader-options.js';
|
6
|
-
import { type
|
7
|
+
import { type EvolveMultiCDNConfig, type EvolveMultiCDNEnvResolver } from './types-multi-html.js';
|
7
8
|
import { type EvolvePluginOptions } from './types-plugin-options.js';
|
8
9
|
import { type ThreadsOptions } from './types-threads-options.js';
|
9
10
|
import { type FlatEvolveWebpackOptions } from './types-webpack.js';
|
@@ -45,6 +46,10 @@ export interface FlatEvolveOptions {
|
|
45
46
|
* The configurations of `webpack`
|
46
47
|
*/
|
47
48
|
webpack?: FlatEvolveWebpackOptions;
|
49
|
+
/**
|
50
|
+
* The config options of global webpack compiler.
|
51
|
+
*/
|
52
|
+
globalCompilerOptions?: GlobalCompilerOptions;
|
48
53
|
/**
|
49
54
|
* The config options of all rule set loaders.
|
50
55
|
*/
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { type
|
1
|
+
import { type Configuration, type RuleSetRule } from 'webpack';
|
2
2
|
import { type WebpackPlugin } from '../create-webpack/types.js';
|
3
3
|
import { type TerserMinimizerOptions } from '../minimizer/types.js';
|
4
4
|
/**
|
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.13",
|
4
4
|
"license": "MIT",
|
5
5
|
"type": "module",
|
6
6
|
"exports": {
|
@@ -18,46 +18,46 @@
|
|
18
18
|
"./templates"
|
19
19
|
],
|
20
20
|
"scripts": {
|
21
|
-
"serve": "yarn node --import=@
|
21
|
+
"serve": "yarn node --import=@hyperse/ts-node-paths/register ./tests/dev-server/dev-server.ts",
|
22
22
|
"build": "rimraf dist && tsc -p ./tsconfig.build.json && npm run minify",
|
23
23
|
"?build-release": "When https://github.com/atlassian/changesets/issues/432 has a solution we can remove this trick",
|
24
24
|
"build-release": "yarn build && rimraf ./_release && yarn pack && mkdir ./_release && tar zxvf ./package.tgz --directory ./_release && rm ./package.tgz",
|
25
25
|
"minify": "node ../../scripts/minify.mjs --dest=dist",
|
26
26
|
"codegen": "graphql-codegen --config ./codegen.cjs",
|
27
27
|
"clean": "rimraf --no-glob ./dist ./coverage ./__data__ ./config/__data__ ./_release ./tsconfig.tsbuildinfo",
|
28
|
-
"lint": "eslint . --
|
28
|
+
"lint": "eslint . --cache --cache-location ../../.cache/eslint/evolve.eslintcache",
|
29
29
|
"test": "run-s test-unit",
|
30
30
|
"test-task": "vitest run",
|
31
31
|
"test-unit": "vitest run --passWithNoTests",
|
32
32
|
"test-watch": "vitest watch --ui",
|
33
|
-
"fix-all-files": "eslint . --
|
33
|
+
"fix-all-files": "eslint . --fix",
|
34
34
|
"typecheck": "tsc --project ./tsconfig.json --noEmit"
|
35
35
|
},
|
36
36
|
"dependencies": {
|
37
|
-
"@armit/babel-merge": "^0.1
|
38
|
-
"@armit/config-loader": "^0.1
|
39
|
-
"@armit/file-utility": "^0.1
|
40
|
-
"@armit/git": "^0.1
|
41
|
-
"@armit/package": "^0.1
|
42
|
-
"@babel/core": "^7.24.
|
43
|
-
"@flatjs/babel-plugin-import": "2.1.0-next.
|
44
|
-
"@flatjs/common": "2.1.0-next.
|
45
|
-
"@flatjs/evolve-preset-babel": "2.1.0-next.
|
46
|
-
"@flatjs/forge-postcss-plugin-pixel": "2.1.0-next.
|
47
|
-
"@flatjs/graph": "2.1.0-next.
|
48
|
-
"@flatjs/mock": "2.1.0-next.
|
49
|
-
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.
|
37
|
+
"@armit/babel-merge": "^0.2.1",
|
38
|
+
"@armit/config-loader": "^0.2.1",
|
39
|
+
"@armit/file-utility": "^0.2.1",
|
40
|
+
"@armit/git": "^0.2.1",
|
41
|
+
"@armit/package": "^0.2.1",
|
42
|
+
"@babel/core": "^7.24.7",
|
43
|
+
"@flatjs/babel-plugin-import": "2.1.0-next.6",
|
44
|
+
"@flatjs/common": "2.1.0-next.5",
|
45
|
+
"@flatjs/evolve-preset-babel": "2.1.0-next.5",
|
46
|
+
"@flatjs/forge-postcss-plugin-pixel": "2.1.0-next.5",
|
47
|
+
"@flatjs/graph": "2.1.0-next.7",
|
48
|
+
"@flatjs/mock": "2.1.0-next.7",
|
49
|
+
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
|
50
50
|
"@types/babel__core": "^7.20.5",
|
51
51
|
"babel-loader": "^9.1.3",
|
52
52
|
"better-opn": "^3.0.2",
|
53
53
|
"case-sensitive-paths-webpack-plugin": "^2.4.0",
|
54
|
-
"css-loader": "^7.1.
|
55
|
-
"cssnano": "^7.0.
|
54
|
+
"css-loader": "^7.1.2",
|
55
|
+
"cssnano": "^7.0.2",
|
56
56
|
"express": "^4.19.2",
|
57
57
|
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
58
|
-
"happy-dom": "^14.
|
58
|
+
"happy-dom": "^14.12.0",
|
59
59
|
"html-webpack-plugin": "^5.6.0",
|
60
|
-
"image-minimizer-webpack-plugin": "^4.0.
|
60
|
+
"image-minimizer-webpack-plugin": "^4.0.2",
|
61
61
|
"less": "^4.2.0",
|
62
62
|
"less-loader": "^12.2.0",
|
63
63
|
"listr": "^0.14.3",
|
@@ -69,40 +69,38 @@
|
|
69
69
|
"svgo": "^3.3.2",
|
70
70
|
"tarjan-graph": "^3.0.0",
|
71
71
|
"terser-webpack-plugin": "^5.3.10",
|
72
|
-
"tinypool": "^0.
|
72
|
+
"tinypool": "^1.0.0",
|
73
73
|
"tsconfig-paths-webpack-plugin": "^4.1.0",
|
74
|
-
"type-fest": "^4.
|
74
|
+
"type-fest": "^4.20.0",
|
75
75
|
"typescript": "^5.4.5",
|
76
|
-
"webpack": "^5.
|
76
|
+
"webpack": "^5.92.0",
|
77
77
|
"webpack-bundle-analyzer": "^4.10.2",
|
78
78
|
"webpack-dev-server": "^5.0.4",
|
79
79
|
"webpack-sources": "^3.2.3"
|
80
80
|
},
|
81
81
|
"devDependencies": {
|
82
|
-
"@armit/eslint-config-bases": "^0.1.6",
|
83
82
|
"@dimjs/lang": "1.5.0",
|
84
83
|
"@dimjs/model": "1.2.3",
|
85
84
|
"@dimjs/model-react": "1.2.3",
|
86
85
|
"@dimjs/utils": "1.5.1",
|
87
|
-
"@flatjs/testing": "2.1.0-next.
|
88
|
-
"@
|
86
|
+
"@flatjs/testing": "2.1.0-next.5",
|
87
|
+
"@hyperse/eslint-config-hyperse": "^1.0.8",
|
88
|
+
"@swc/core": "1.5.29",
|
89
89
|
"@types/express": "4.17.21",
|
90
90
|
"@types/listr": "0.14.9",
|
91
|
-
"@types/node": "20.
|
91
|
+
"@types/node": "20.14.2",
|
92
92
|
"@vitest/coverage-istanbul": "1.6.0",
|
93
93
|
"@vitest/ui": "1.6.0",
|
94
94
|
"@wove/react": "1.2.23",
|
95
|
-
"eslint": "
|
95
|
+
"eslint": "^9.4.0",
|
96
96
|
"imagemin-gifsicle": "7.0.0",
|
97
97
|
"imagemin-jpegtran": "7.0.0",
|
98
98
|
"imagemin-pngquant": "10.0.0",
|
99
99
|
"imagemin-svgo": "11.0.0",
|
100
100
|
"npm-run-all": "4.1.5",
|
101
|
-
"prettier": "3.2.5",
|
102
101
|
"react": "18.3.1",
|
103
102
|
"rimraf": "5.0.7",
|
104
103
|
"swc-unplugin-ts": "1.0.3",
|
105
|
-
"ts-node": "11.0.0-beta.1",
|
106
104
|
"vite-tsconfig-paths": "4.3.2",
|
107
105
|
"vitest": "1.6.0",
|
108
106
|
"vue-loader": "17.4.2"
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './ts-checker-plugin.js';
|
@@ -1 +0,0 @@
|
|
1
|
-
export*from"./ts-checker-plugin.js";
|