@flatjs/evolve 2.1.0-next.1 → 2.1.0-next.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. package/dist/constants.d.ts +9 -0
  2. package/dist/constants.js +1 -1
  3. package/dist/create-webpack/create-optimization.d.ts +1 -1
  4. package/dist/create-webpack/create-optimization.js +1 -1
  5. package/dist/create-webpack/create-plugins.d.ts +1 -1
  6. package/dist/create-webpack/create-plugins.js +1 -1
  7. package/dist/create-webpack/create-rule-sets.d.ts +1 -1
  8. package/dist/create-webpack/create-rule-sets.js +1 -1
  9. package/dist/create-webpack/load-webpack-config.js +1 -1
  10. package/dist/create-webpack/rule-sets/rule-assets.d.ts +2 -2
  11. package/dist/create-webpack/rule-sets/rule-assets.js +1 -1
  12. package/dist/default-options.js +1 -1
  13. package/dist/dev-server/create-dev-server-compiler-task.d.ts +3 -0
  14. package/dist/dev-server/create-dev-server-compiler-task.js +1 -0
  15. package/dist/dev-server/create-dev-server-entries.d.ts +1 -1
  16. package/dist/dev-server/create-dev-server-entries.js +1 -1
  17. package/dist/dev-server/index.d.ts +1 -1
  18. package/dist/dev-server/index.js +1 -1
  19. package/dist/dev-server/middlewares/get-page-main-html.js +1 -1
  20. package/dist/dev-server/middlewares/get-page-module-html.js +1 -1
  21. package/dist/helpers/assert-group-entry-item.d.ts +7 -0
  22. package/dist/helpers/assert-group-entry-item.js +1 -0
  23. package/dist/helpers/assert-single-compiler.d.ts +15 -0
  24. package/dist/helpers/assert-single-compiler.js +1 -0
  25. package/dist/helpers/delete-object-keys.d.ts +11 -0
  26. package/dist/helpers/delete-object-keys.js +1 -0
  27. package/dist/helpers/flat-entry-map.d.ts +8 -0
  28. package/dist/helpers/flat-entry-map.js +1 -0
  29. package/dist/helpers/get-runtime-cdn-base.d.ts +2 -0
  30. package/dist/helpers/get-runtime-cdn-base.js +1 -0
  31. package/dist/helpers/index.d.ts +12 -2
  32. package/dist/helpers/index.js +1 -1
  33. package/dist/helpers/is-deep-equal.d.ts +9 -0
  34. package/dist/helpers/is-deep-equal.js +1 -0
  35. package/dist/helpers/normalize-check-entry-options.d.ts +10 -0
  36. package/dist/helpers/normalize-check-entry-options.js +1 -0
  37. package/dist/helpers/normalize-entry-map.d.ts +1 -0
  38. package/dist/helpers/normalize-entry-map.js +1 -1
  39. package/dist/helpers/normalize-group-name.d.ts +8 -0
  40. package/dist/helpers/normalize-group-name.js +1 -0
  41. package/dist/helpers/normalize-template-inject-tokens.d.ts +16 -0
  42. package/dist/helpers/normalize-template-inject-tokens.js +1 -0
  43. package/dist/helpers/should-enable-react-fast-refresh.js +1 -1
  44. package/dist/helpers/split-to-entry-group.d.ts +53 -0
  45. package/dist/helpers/split-to-entry-group.js +1 -0
  46. package/dist/helpers/verify-group-entry-options.d.ts +9 -0
  47. package/dist/helpers/verify-group-entry-options.js +1 -0
  48. package/dist/main/create-thread-worker.d.ts +29 -14
  49. package/dist/main/create-thread-worker.js +1 -1
  50. package/dist/main/prepare-build.d.ts +3 -3
  51. package/dist/main/prepare-build.js +1 -1
  52. package/dist/main/prepare-serve.d.ts +1 -1
  53. package/dist/main/prepare-serve.js +1 -1
  54. package/dist/main/start-build-dynamic.d.ts +2 -2
  55. package/dist/main/start-build-dynamic.js +1 -1
  56. package/dist/main/start-build-worker.d.ts +12 -6
  57. package/dist/main/start-build-worker.js +1 -1
  58. package/dist/main/start-build.d.ts +1 -1
  59. package/dist/main/start-build.js +1 -1
  60. package/dist/main/start-group-entry-build.d.ts +14 -0
  61. package/dist/main/start-group-entry-build.js +1 -0
  62. package/dist/main/start-serve.d.ts +1 -1
  63. package/dist/plugins/clean-webpack/index.d.ts +1 -1
  64. package/dist/plugins/clean-webpack/index.js +1 -1
  65. package/dist/plugins/module-federation/module-federation.d.ts +1 -1
  66. package/dist/plugins/module-federation/module-federation.js +1 -1
  67. package/dist/plugins/multi-html/index.d.ts +1 -1
  68. package/dist/plugins/multi-html/index.js +1 -1
  69. package/dist/plugins/multi-html/multi-html-cdn-plugin.js +1 -1
  70. package/dist/plugins/multi-html/multi-html-plugin.d.ts +1 -1
  71. package/dist/plugins/multi-html/multi-html-plugin.js +1 -1
  72. package/dist/plugins/ts-checker/index.d.ts +1 -0
  73. package/dist/plugins/ts-checker/index.js +1 -0
  74. package/dist/plugins/ts-checker/ts-checker-plugin.d.ts +4 -0
  75. package/dist/plugins/ts-checker/ts-checker-plugin.js +1 -0
  76. package/dist/types/types-entry-map.d.ts +16 -2
  77. package/dist/types/types-options.d.ts +18 -10
  78. package/dist/types/types-threads-options.d.ts +25 -0
  79. package/dist/types/types-threads-options.js +1 -0
  80. package/package.json +61 -56
  81. package/templates/html-plugin/index-dev.html +2 -2
  82. package/templates/html-plugin/index-inte.html +2 -2
  83. package/templates/html-plugin/index-inte2.html +2 -2
  84. package/templates/html-plugin/index-inte3.html +2 -2
  85. package/templates/html-plugin/index-inte4.html +2 -2
  86. package/templates/html-plugin/index-me.html +2 -2
  87. package/templates/html-plugin/index-prod.html +2 -2
  88. package/templates/html-plugin/index-rc.html +2 -2
  89. package/templates/html-plugin/index-uat.html +2 -2
  90. package/templates/module.html +2 -2
  91. package/dist/dev-server/create-dev-server-compiler-tasks.d.ts +0 -3
  92. package/dist/dev-server/create-dev-server-compiler-tasks.js +0 -1
  93. package/dist/helpers/assert-only-single-entry-item.d.ts +0 -7
  94. package/dist/helpers/assert-only-single-entry-item.js +0 -1
  95. package/dist/helpers/split-to-multi-compiler.d.ts +0 -8
  96. package/dist/helpers/split-to-multi-compiler.js +0 -1
  97. package/dist/main/start-one-entry-build.d.ts +0 -13
  98. package/dist/main/start-one-entry-build.js +0 -1
@@ -1,14 +1,14 @@
1
1
  import { type PartialDeep } from 'type-fest';
2
2
  import { type ConfigLoaderOptions } from '../load-config/types.js';
3
3
  import { type FlatEvolveOptions } from '../types/types-options.js';
4
- import { type EvolveBuildResult } from './start-one-entry-build.js';
4
+ import { type EvolveBuildResult } from './start-group-entry-build.js';
5
5
  export declare function getBuildEntryFiles(projectCwd: string, diffFiles: string[], allEntryInputs: string[], resolveAlias?: Record<string, string>, graphTreeNodeFilter?: (moduleId: string) => boolean): Promise<string[]>;
6
6
  /**
7
7
  * Dynamic check which entry modules need to build.
8
8
  * @returns
9
9
  */
10
10
  export declare function dynamicCheckBuildEntryMap(projectCwd: string, earlyCommit?: string | null, lastCommit?: string, overrideEvolveOptions?: PartialDeep<FlatEvolveOptions>, configLoaderOptions?: ConfigLoaderOptions): Promise<{
11
- buildEntries: import("src/index.js").EvolveEntryMap;
11
+ buildEntries: import("../index.js").EvolveEntryMap;
12
12
  newEvolveOptions: FlatEvolveOptions;
13
13
  }>;
14
14
  /**
@@ -1 +1 @@
1
- import{isAbsolute,join}from"node:path";import{getDiffFiles,getCommitIdOfBranch}from"@armit/git";import{arraysIntersect,chalk,logger,requireResolve}from"@flatjs/common";import{traverseGraph}from"@flatjs/graph";import Listr from"listr";import{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{resolveEntryMapInputFiles}from"../helpers/resolve-entry-map-input-files.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,i,o){const n=[],s=[];for(const e of t)r.includes(e)?n.push(e):s.push(e);if(o&&logger.info("Use custom graph traverse filter",moduleName),s.length){const t=await traverseGraph({input:s,projectCwd:e,treeNodeFilter:o||(()=>!0),lessImportOptions:{projectCwd:e,aliases:i}});if(!t)return n;logger.debug(`DependencyGraph:\n${JSON.stringify(t,null,2)}`);for(const e of s){const i=t[e]||[];arraysIntersect(i,r)&&n.push(e)}}return n}export async function dynamicCheckBuildEntryMap(e,r,t,i,o){const n={projectCwd:e,command:"build",resolve:requireResolve},s=await loadEvolveConfig(n,e,i,o);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),d=await getBuildEntryFiles(e,a,c,s.webpack?.resolve?.alias,s.ci?.graphTreeNodeFilter);logger.debug(`To build entry files: \n${JSON.stringify(d,null,2)}`);return{buildEntries:await filterActivedEntriesByEntryInputs(e,s.entryMap,d),newEvolveOptions:s}}export const startDynamicBuild=async(e,r,t,i={},o)=>{const{buildEntries:n,newEvolveOptions:s}=await dynamicCheckBuildEntryMap(e,r,t,i,o);await envVerify(e,s);const a=Object.keys(n);if(!a.length)return logger.warn("No build entries providered!"),[];const l=getMaxProcessTasks(a.length,s.maxProcesses);logger.info(`Start dynamic build with (${chalk(["magenta"])(String(l))}) workers:\n${JSON.stringify({buildEntries:a},null,2)}`);const c=await createThreadWorker(l),d=new Listr([],{concurrent:l,exitOnError:!0}),f=[];for(const[r]of Object.entries(n))d.add({title:`Build module ${chalk(["magenta"])(r)} ...`,task:async()=>{const t=await c.startBuildWorker(e,r,jsonSerializer.stringify(i),o);f.push(t)}});return d.tasks.length&&await d.run(),c.pool.terminate(),f};
1
+ import{isAbsolute,join}from"node:path";import{getDiffFiles,getCommitIdOfBranch}from"@armit/git";import{arraysIntersect,chalk,logger,requireResolve}from"@flatjs/common";import{traverseGraph}from"@flatjs/graph";import Listr from"listr";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,i,o){const n=[],s=[];for(const e of t)r.includes(e)?n.push(e):s.push(e);if(o&&logger.info("Use custom graph traverse filter",moduleName),s.length){const t=await traverseGraph({input:s,projectCwd:e,treeNodeFilter:o||(()=>!0),lessImportOptions:{projectCwd:e,aliases:i}});if(!t)return n;logger.debug(`DependencyGraph:\n${JSON.stringify(t,null,2)}`);for(const e of s){const i=t[e]||[];arraysIntersect(i,r)&&n.push(e)}}return n}export async function dynamicCheckBuildEntryMap(e,r,t,i,o){const n={projectCwd:e,command:"build",resolve:requireResolve},s=await loadEvolveConfig(n,e,i,o);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 p=await resolveEntryMapInputFiles(e,s.entryMap),c=await getBuildEntryFiles(e,a,p,s.webpack?.resolve?.alias,s.ci?.graphTreeNodeFilter);logger.debug(`To build entry files: \n${JSON.stringify(c,null,2)}`);return{buildEntries:await filterActivedEntriesByEntryInputs(e,s.entryMap,c),newEvolveOptions:s}}export const startDynamicBuild=async(e,r,t,i={},o)=>{const{buildEntries:n,newEvolveOptions:s}=await dynamicCheckBuildEntryMap(e,r,t,i,o);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 p=l.map((e=>Object.values(e)?.[0]?.groupName)),{threads:c={}}=s,d=getMaxProcessTasks(l.length,c?.maxThreads);logger.info(`Start dynamic build with (${chalk(["magenta"])(String(d))}) workers:\n${JSON.stringify({buildEntriesGroup:p},null,2)}`);const f=createThreadWorker({...c,maxThreads:d}),u=new Listr([],{concurrent:d,exitOnError:!0}),g=[];for(const r of l){const t=Object.values(r)?.[0]?.groupName||"",n=Object.keys(r);u.add({title:`Build group ${chalk(["magenta"])(`${t}: [ ${n.join(", ")} ]`)} ...`,task:async()=>{const r=await f.startBuildWorker({projectCwd:e,entryKeys:n,serializedEvolveOptions:jsonSerializer.stringify(i),configLoaderOptions:o});g.push(r)}})}if(u.tasks.length)try{await u.run()}catch(e){throw f.terminate(),e}return f.terminate(),g};
@@ -1,12 +1,18 @@
1
1
  import { type ConfigLoaderOptions } from '../load-config/types.js';
2
- import { type EvolveBuildResult } from './start-one-entry-build.js';
2
+ import { type EvolveBuildResult } from './start-group-entry-build.js';
3
3
  /**
4
4
  * FIXME: The main entry to start an evolve `build`, NOTE: avoid pass configuration with `function` here.
5
5
  * If you need to call build api avoid `worker` you can directly call `prepareBuild`
6
6
  * @internal
7
- * @param projectCwd The Root directory (workspace) of this project.
8
- * @param entryKey The `entryKey` for one entry build task
9
- * @param serializedEvolveOptions The overrided evolve options, NOTE: we will serialize `function` property here first
10
- * @param configLoaderOptions Evolve config loader options, NOTE: avoid pass configuration with `function` here.
7
+ * @param options.projectCwd The Root directory (workspace) of this project.
8
+ * @param options.entryKey The `entryKey` for one entry build task
9
+ * @param options.serializedEvolveOptions The overrided evolve options, NOTE: we will serialize `function` property here first
10
+ * @param options.configLoaderOptions Evolve config loader options, NOTE: avoid pass configuration with `function` here.
11
11
  */
12
- export declare const startBuildWorker: (projectCwd: string, entryKey: string, serializedEvolveOptions: string, configLoaderOptions?: ConfigLoaderOptions) => Promise<EvolveBuildResult>;
12
+ declare const _default: (options: {
13
+ projectCwd: string;
14
+ entryKeys: string[];
15
+ serializedEvolveOptions: string;
16
+ configLoaderOptions?: ConfigLoaderOptions;
17
+ }) => Promise<EvolveBuildResult>;
18
+ export default _default;
@@ -1 +1 @@
1
- import{requireResolve}from"@flatjs/common";import{filterActivedEntriesByModule}from"../helpers/filter-actived-entries.js";import{jsonSerializer}from"../helpers/json-serializer.js";import{normalizeEvolveEntryMap}from"../helpers/normalize-entry-map.js";import{loadEvolveConfig}from"../load-config/load-evolve-config.js";import{prepareBuild}from"./prepare-build.js";export const startBuildWorker=async(e,r,o,i)=>{const l={projectCwd:e,command:"build",resolve:requireResolve},t=jsonSerializer.parse(o)||{},n=await loadEvolveConfig(l,e,t,i),a=filterActivedEntriesByModule(n.entryMap,[new RegExp(`^${r}$`)]);if(!Object.keys(a).length)throw new Error(`No build entry resolved via "${r}" on "startBuildWorker"!`);const s=normalizeEvolveEntryMap(a,n.entryMap)[r];return prepareBuild([r,s],n)};
1
+ import{requireResolve}from"@flatjs/common";import{ignoreEntryOptionKeys}from"../constants.js";import{filterActivedEntriesByModule}from"../helpers/filter-actived-entries.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{prepareBuild}from"./prepare-build.js";export default async e=>{const{projectCwd:r,entryKeys:o,serializedEvolveOptions:i,configLoaderOptions:t}=e,n={projectCwd:r,command:"build",resolve:requireResolve},p=jsonSerializer.parse(i)||{},l=await loadEvolveConfig(n,r,p,t),s=o.map((e=>new RegExp(`^${e}$`))),a=filterActivedEntriesByModule(l.entryMap,s),m=normalizeEvolveEntryMap(a,l.entryMap),d=splitToEntryGroup(m,l,ignoreEntryOptionKeys,!1);return prepareBuild(d[0],l)};
@@ -1,5 +1,5 @@
1
1
  import { type PartialDeep } from 'type-fest';
2
2
  import { type ConfigLoaderOptions } from '../load-config/types.js';
3
3
  import { type FlatEvolveOptions } from '../types/types-options.js';
4
- import { type EvolveBuildResult } from './start-one-entry-build.js';
4
+ import { type EvolveBuildResult } from './start-group-entry-build.js';
5
5
  export declare const startBuild: (projectCwd: string, buildModules: string[], overrideEvolveOptions?: PartialDeep<FlatEvolveOptions>, configLoaderOptions?: ConfigLoaderOptions) => Promise<EvolveBuildResult[]>;
@@ -1 +1 @@
1
- import{chalk,logger,requireResolve}from"@flatjs/common";import Listr from"listr";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{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(e,r,t={},o)=>{const i={projectCwd:e,command:"build",resolve:requireResolve},s=await loadEvolveConfig(i,e,t,o);await envVerify(e,s);const a=filterActivedEntriesByModule(s.entryMap,r),n=Object.keys(a);if(!n.length)return logger.warn("No build entries providered!"),[];const l=getMaxProcessTasks(n.length,s.maxProcesses);logger.info(`Start standard build with (${chalk(["magenta"])(String(l))}) workers:\n${JSON.stringify({buildEntries:n},null,2)}`);const c=await createThreadWorker(l),d=new Listr([],{concurrent:l,exitOnError:!0}),m=[];for(const[r]of Object.entries(a))d.add({title:`Build module ${chalk(["magenta"])(r)} ...`,task:async()=>{const i=await c.startBuildWorker(e,r,jsonSerializer.stringify(t),o);m.push(i)}});return d.tasks.length&&await d.run(),c.pool.terminate(),m};
1
+ import{chalk,logger,requireResolve}from"@flatjs/common";import Listr from"listr";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 n=filterActivedEntriesByModule(s.entryMap,e),a=normalizeEvolveEntryMap(n,s.entryMap),l=splitToEntryGroup(a,s,ignoreEntryOptionKeys,!1);if(!l.length)return logger.warn("No build entries provided!"),[];const p=l.map((r=>Object.values(r)?.[0]?.groupName)),{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 ${chalk(["magenta"])(`${i}: [ ${s.join(", ")} ]`)} ...`,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};
@@ -0,0 +1,14 @@
1
+ import { type EvolveEntryMap } from '../types/types-entry-map.js';
2
+ import { type FlatEvolveOptions } from '../types/types-options.js';
3
+ export type EvolveBuildResult = {
4
+ name?: string;
5
+ warningStats?: unknown;
6
+ };
7
+ /**
8
+ * Starts the build process for a group of entry files.
9
+ *
10
+ * @param groupBuildEntry - The map of entry files to be built.
11
+ * @param evolveOptions - The options for the build process.
12
+ * @returns A promise that resolves to the build result.
13
+ */
14
+ export declare const startGroupEntryBuild: (groupBuildEntry: EvolveEntryMap, evolveOptions: FlatEvolveOptions) => Promise<EvolveBuildResult>;
@@ -0,0 +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(((r,n)=>{webpack(o,((a,t)=>{if(a)return n(a);const s=t?.toJson();return s?.errors?.length?n(s.errors):e.rejectWarnings&&s?.warnings?.length?n(s.warnings):void r({name:o.name,warningStats:s?.warnings})}))}))};
@@ -8,4 +8,4 @@ import { type FlatEvolveOptions } from '../types/types-options.js';
8
8
  * @param overrideEvolveOptions The overrided evolve options
9
9
  * @param configLoaderOptions Evolve config loader options
10
10
  */
11
- export declare const startServe: (projectCwd: string, serveModules: string[], overrideEvolveOptions?: PartialDeep<FlatEvolveOptions>, configLoaderOptions?: ConfigLoaderOptions) => Promise<never[] | import("express-serve-static-core").Express>;
11
+ export declare const startServe: (projectCwd: string, serveModules: string[], overrideEvolveOptions?: PartialDeep<FlatEvolveOptions>, configLoaderOptions?: ConfigLoaderOptions) => Promise<never[] | import("express-serve-static-core").Express | undefined>;
@@ -6,4 +6,4 @@ import { type FlatEvolveOptions } from '../../types/types-options.js';
6
6
  * @param singleEntryItem
7
7
  * @returns
8
8
  */
9
- export declare const createCleanWebpackPlugin: (serveMode: boolean, entryMapItem: EntryMapItem, evolveOptions: FlatEvolveOptions) => WebpackPlugin[];
9
+ export declare const createCleanWebpackPlugin: (serveMode: boolean, entryMapItemList: EntryMapItem[], evolveOptions: FlatEvolveOptions) => WebpackPlugin[];
@@ -1 +1 @@
1
- import{join}from"node:path";import{ensureSlash}from"@flatjs/common";import{CleanWebpackPlugin}from"./clean-webpack-plugin.js";export const createCleanWebpackPlugin=(e,n,o)=>e?[]:[new CleanWebpackPlugin({verbose:!0,projectCwd:o.projectCwd,cleanOnceBeforeBuildPatterns:[`${join(ensureSlash(n[0],!0),"**/*")}`]})];
1
+ import{join}from"node:path";import{ensureSlash}from"@flatjs/common";import{CleanWebpackPlugin}from"./clean-webpack-plugin.js";export const createCleanWebpackPlugin=(e,n,o)=>e?[]:[new CleanWebpackPlugin({verbose:!0,projectCwd:o.projectCwd,cleanOnceBeforeBuildPatterns:n.map((e=>`${join(ensureSlash(e[0],!0),"**/*")}`))})];
@@ -1,4 +1,4 @@
1
1
  import { type WebpackPluginInstance } from 'webpack';
2
2
  import { type EntryMapItem } from '../../types/types-entry-map.js';
3
3
  import { type FlatEvolveOptions } from '../../types/types-options.js';
4
- export declare const createModuleFederationPlugin: (serveMode: boolean, entryMapItem: EntryMapItem, evolveOptions: FlatEvolveOptions) => WebpackPluginInstance[];
4
+ export declare const createModuleFederationPlugin: (serveMode: boolean, entryMapItemList: EntryMapItem[], evolveOptions: FlatEvolveOptions) => WebpackPluginInstance[];
@@ -1 +1 @@
1
- import{join}from"node:path";import{ensureSlash}from"@flatjs/common";import webpack from"webpack";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,r)=>{const o=r.projectVirtualPath,[n,i]=t,m=r.multiHtmlCdn,a=r.multiHtmlCdnEnvResolver,l=i.options?.moduleFederation,s=[];if(l){const{remotes:t,exposes:r,...i}=l,p=remoteFileName(n),c=normalizeWidgetName(n),u=(r?Array.isArray(r)?r:[r]:[]).map((e=>{const t={};for(const[r,o]of Object.entries(e))t[r]={...o,name:join(n,o.name.replace(/^\//,""))};return t})),d=(t||[]).map((({name:e,endpoint:t})=>{const r=normalizeEvolveEntryName(e,o),n=normalizeWidgetName(r),i=remoteFileName(r);return{[n]:`${n}@${t?ensureSlash(t(e,r),!1):"[window.evolveFetchMicroWidgets()]"}/${i}`}}));s.push(new webpack.container.ModuleFederationPlugin({...i,name:c,filename:p,remotes:d,exposes:u}),new ExternalTemplateRemotesPlugin),e||s.unshift(new HtmlInjectScriptPlugin([injectFederationScripts(m,a)]))}return s};
1
+ import{join}from"node:path";import{ensureSlash}from"@flatjs/common";import webpack from"webpack";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,4 +1,4 @@
1
1
  import { type WebpackPlugin } from '../../create-webpack/types.js';
2
2
  import { type EntryMapItem } from '../../types/types-entry-map.js';
3
3
  import { type FlatEvolveOptions } from '../../types/types-options.js';
4
- export declare const createHtmlPlugins: (serveMode: boolean, entryMapItem: EntryMapItem, evolveOptions: FlatEvolveOptions) => WebpackPlugin[];
4
+ export declare const createHtmlPlugins: (serveMode: boolean, entryMapItemList: EntryMapItem[], evolveOptions: FlatEvolveOptions) => WebpackPlugin[];
@@ -1 +1 @@
1
- import{FlatEvolveMultiCdnPlugin}from"./multi-html-cdn-plugin.js";import{createMultiHtmlWebpackPlugin}from"./multi-html-plugin.js";export const createHtmlPlugins=(t,l,u)=>{const i=[];if(t||l[1]?.options?.output?.library)return i;const n=Object.keys(u.multiHtmlCdn);return i.push(...createMultiHtmlWebpackPlugin(t,u,l,n)),i.push(new FlatEvolveMultiCdnPlugin(u)),i};
1
+ import{FlatEvolveMultiCdnPlugin}from"./multi-html-cdn-plugin.js";import{createMultiHtmlWebpackPlugin}from"./multi-html-plugin.js";export const createHtmlPlugins=(t,l,u)=>{const i=[],n=l[0];if(t||n[1]?.options?.output?.library)return i;const e=Object.keys(u.multiHtmlCdn);return i.push(...createMultiHtmlWebpackPlugin(t,u,l,e)),i.push(new FlatEvolveMultiCdnPlugin(u)),i};
@@ -1 +1 @@
1
- import{basename}from"node:path";import HtmlWebpackPlugin from"html-webpack-plugin";import webpack from"webpack";import{cdnFinder,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,((n,t)=>{const i=[];i.push("// Dynamic assets path override(`@flatjs/evolve`) plugin-multi-html-cdn`)");const s=e.chunkGraph?.getTreeRuntimeRequirements(t);return s&&s.has(webpack.RuntimeGlobals.requireScope)&&(i.push("(function () {"),i.push(webpack.Template.indent("var flatjsMultiCdn = {")),i.push(webpack.Template.indent(webpack.Template.indent([`cdnConfig: ${JSON.stringify(this.config||{})},`]))),i.push(webpack.Template.indent(webpack.Template.indent([`cdnResolver: ${this.cdnResolver.toString()},`]))),i.push(webpack.Template.indent(webpack.Template.indent([`cdnFinder: ${cdnFinder.toString()}`]))),i.push(webpack.Template.indent("};")),i.push(webpack.Template.indent(`${this.requireFn} = flatjsMultiCdn.cdnFinder(flatjsMultiCdn.cdnConfig, flatjsMultiCdn.cdnResolver) || ${this.requireFn};`)),i.push("})();")),webpack.Template.asString(i)}))})),e.hooks.compilation.tap(this.pluginName,(e=>{HtmlWebpackPlugin.getHooks(e).beforeAssetTagGeneration.tap(this.pluginName,(e=>{const{assets:n}=e,{userOptions:t}=e.plugin,i=t.multiCdn,s=n.publicPath,a=n.js.map((e=>{if(i.disabled)return basename(e);const n=findEnvCdn(this.config,i.env);return httpUrlJoin(n,e.replace(s,""))})),p=n.css.map((e=>{if(i.disabled)return basename(e);const n=findEnvCdn(this.config,i.env);return httpUrlJoin(n,e.replace(s,""))}));return e.assets.js=a,e.assets.css=p,e}))}))}}
1
+ import{basename}from"node:path";import HtmlWebpackPlugin from"html-webpack-plugin";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}))}))}}
@@ -8,4 +8,4 @@ import { type FlatEvolveOptions } from '../../types/types-options.js';
8
8
  * @param buildEntryItem the entries for this `build`
9
9
  * @param allEnv
10
10
  */
11
- export declare const createMultiHtmlWebpackPlugin: (serveMode: boolean, evolveOptions: FlatEvolveOptions, entryMapItem: EntryMapItem, allEnv: Array<EvolveMultiCdnEnvType>) => WebpackPlugin[];
11
+ export declare const createMultiHtmlWebpackPlugin: (serveMode: boolean, evolveOptions: FlatEvolveOptions, entryMapItemList: EntryMapItem[], allEnv: Array<EvolveMultiCdnEnvType>) => WebpackPlugin[];
@@ -1 +1 @@
1
- import HtmlWebpackPlugin from"html-webpack-plugin";import{allowPx2remForModule}from"../../helpers/allow-px2rem-for-module.js";import{getHtmlPluginConfig}from"../../helpers/get-html-plugin-config.js";import{findEnvCdn}from"../../helpers/script-injects.js";const minifyOpts={minifyJS:!0,removeComments:!0,collapseWhitespace:!0,collapseBooleanAttributes:!1};export const createMultiHtmlWebpackPlugin=(e,t,i,l)=>{const[n,o]=i,r=[],{options:m}=o,g=e?"development":"production";for(const e of l){const l={mode:g,envCdn:findEnvCdn(t.multiHtmlCdn,e)};r.push(new HtmlWebpackPlugin({inject:"body",title:getHtmlPluginConfig("title",l,m?.title),chunks:[n],minify:!1!==m?.htmlMinify&&!["me","dev"].includes(e)&&minifyOpts,filename:`${n}/index${"prod"===e?"":`-${e}`}.html`,template:getHtmlPluginConfig("templatePath",l,m?.templatePath).replace("{0}",e),templateParameters:{title:getHtmlPluginConfig("title",l,m?.title),favicon:getHtmlPluginConfig("favicon",l,m?.favicon),headBeforeHtmlTags:getHtmlPluginConfig("headBeforeHtmlTags",l,m?.headBeforeHtmlTags),inlineScripts:getHtmlPluginConfig("inlineScripts",l,m?.inlineScripts),headBeforeStyles:getHtmlPluginConfig("headBeforeStyles",l,m?.headBeforeStyles),headBeforeScripts:getHtmlPluginConfig("headBeforeScripts",l,m?.headBeforeScripts),bodyAfterScripts:getHtmlPluginConfig("bodyAfterScripts",l,m?.bodyAfterScripts),viewport:allowPx2remForModule(i,t)?getHtmlPluginConfig("viewport",l,m?.viewport):""},multiCdn:{env:e,disabled:(m?.excludeCdnEnvs||["me","dev","ntv"]).includes(e)}}))}return r};
1
+ import HtmlWebpackPlugin from"html-webpack-plugin";import{allowPx2remForModule}from"../../helpers/allow-px2rem-for-module.js";import{getHtmlPluginConfig}from"../../helpers/get-html-plugin-config.js";import{normalizeTemplateInjectTokens}from"../../helpers/normalize-template-inject-tokens.js";import{findEnvCdn}from"../../helpers/script-injects.js";const minifyOpts={minifyJS:!0,removeComments:!0,collapseWhitespace:!0,collapseBooleanAttributes:!1};export const createMultiHtmlWebpackPlugin=(e,t,l,n)=>{const i=l[0],[,o]=i,m=[],{options:p}=o,r=e?"development":"production",a=l.map((e=>e[0]));for(const e of n){const l={mode:r,envCdn:findEnvCdn(t.multiHtmlCdn,e)},n=normalizeTemplateInjectTokens(l,p);m.push(new HtmlWebpackPlugin({inject:"body",title:getHtmlPluginConfig("title",l,p?.title),chunks:a,minify:!1!==p?.htmlMinify&&!["me","dev"].includes(e)&&minifyOpts,filename:t=>`${t}/index${"prod"===e?"":`-${e}`}.html`,template:getHtmlPluginConfig("templatePath",l,p?.templatePath).replace("{0}",e),templateParameters:{title:getHtmlPluginConfig("title",l,p?.title),favicon:getHtmlPluginConfig("favicon",l,p?.favicon),viewport:allowPx2remForModule(i,t)?getHtmlPluginConfig("viewport",l,p?.viewport):"",...n},multiCdn:{env:e,disabled:(p?.excludeCdnEnvs||["me","dev","ntv"]).includes(e)}}))}return m};
@@ -0,0 +1 @@
1
+ export * from './ts-checker-plugin.js';
@@ -0,0 +1 @@
1
+ export*from"./ts-checker-plugin.js";
@@ -0,0 +1,4 @@
1
+ import { type WebpackPlugin } from '../../create-webpack/types.js';
2
+ import { type EntryMapItem } from '../../types/types-entry-map.js';
3
+ import { type FlatEvolveOptions } from '../../types/types-options.js';
4
+ export declare const createTsCheckerPlugins: (serveMode: boolean, entryMapItemList: EntryMapItem[], evolveOptions: FlatEvolveOptions) => WebpackPlugin[];
@@ -0,0 +1 @@
1
+ import ForkTsCheckerWebpackPlugin from"fork-ts-checker-webpack-plugin";export const createTsCheckerPlugins=(e,r,t)=>{const c=[];let o=!1;for(const[,e]of r){if((e.entry||[]).find((e=>/.vue$/.test(e)))){o=!0;break}}return t.loaderOptions.runTsChecker&&!o&&c.push(new ForkTsCheckerWebpackPlugin({async:e,issue:{},typescript:{context:t.projectCwd,memoryLimit:8192}})),c};
@@ -59,8 +59,8 @@ export interface EvolveEntryItemOption extends MultiHtmlCDNEntryItem {
59
59
  */
60
60
  mockFilters?: Array<string | RegExp>;
61
61
  /**
62
- * Extends the default `output` configuration for each entry item.
63
- * normally we use `output.library` to define the global variable name.
62
+ * Extends the default `output` configuration for each entry item, normally we use `output.library` to define the global variable name.
63
+ * Note we don't need to support react fast refresh for library target. because of the library module can not run in the browser individually.
64
64
  * @example
65
65
  * ```ts
66
66
  *'plugin-chart': {
@@ -83,6 +83,20 @@ export interface EvolveEntryItemOption extends MultiHtmlCDNEntryItem {
83
83
  export type EvolveEntryMapContent = {
84
84
  entry: [string, ...string[]];
85
85
  options?: EvolveEntryItemOption;
86
+ /**
87
+ * An alias used when grouping builds
88
+ */
89
+ groupName?: string;
90
+ /**
91
+ * The basis of the grouping, this configuration takes effect when re-entering a group
92
+ *
93
+ * If groupingSource is `manual`, The grouping depends on the manually set groupName
94
+ *
95
+ * If groupingSource is `auto`, Grouping depends on whether the entry options are the same
96
+ *
97
+ * @default 'auto'
98
+ */
99
+ groupingSource?: 'auto' | 'manual';
86
100
  };
87
101
  export interface EvolveEntryMap {
88
102
  /**
@@ -5,6 +5,7 @@ import { type EvolveEntryMap } from './types-entry-map.js';
5
5
  import { type RuleSetLoaderOptions } from './types-loader-options.js';
6
6
  import { type EvolveMultiCDNEnvResolver, type EvolveMultiCDNConfig } from './types-multi-html.js';
7
7
  import { type EvolvePluginOptions } from './types-plugin-options.js';
8
+ import { type ThreadsOptions } from './types-threads-options.js';
8
9
  import { type FlatEvolveWebpackOptions } from './types-webpack.js';
9
10
  /**
10
11
  * Detect locally installed dependencies that have correctly installed from `package.json` declared version `dependencies`
@@ -96,20 +97,13 @@ export interface FlatEvolveOptions {
96
97
  /**
97
98
  * All webpack entries configuration
98
99
  */
99
- entryMap: EvolveEntryMap;
100
+ entryMap: {
101
+ [K in keyof EvolveEntryMap]: Omit<EvolveEntryMap[K], 'groupingSource'>;
102
+ };
100
103
  /**
101
104
  * Visualize size of webpack output files with an interactive zoomable treemap.
102
105
  */
103
106
  analyzer?: Record<string, unknown>;
104
- /**
105
- * Maximum number of process to run at once for production build
106
- * Exact number or a percent of CPUs available (for example "50%").
107
- *
108
- * If undefined, then all build processes will start in parallel.
109
- * Setting this value to 1 will achieve sequential running.
110
- * @default 5
111
- */
112
- maxProcesses?: number | string;
113
107
  /**
114
108
  * For `production` mode, the value indicates if we interrupt compilation process while received "warnings" while evolve `build`
115
109
  * @default false
@@ -119,4 +113,18 @@ export interface FlatEvolveOptions {
119
113
  * The faster builds, simplified ci pipeline configurations
120
114
  */
121
115
  ci?: FlatEvolveCI;
116
+ /**
117
+ * The configurations of `threads`
118
+ */
119
+ threads?: ThreadsOptions;
120
+ /**
121
+ * Control whether each entry is built independently.
122
+ *
123
+ * If `true`, each entry will be built independently.
124
+ *
125
+ * If `false`, each entries are grouped according to certain rules
126
+ *
127
+ * @default false
128
+ */
129
+ isolation?: boolean;
122
130
  }
@@ -0,0 +1,25 @@
1
+ export interface ThreadsOptions {
2
+ /**
3
+ * Minimum number of process to run at once for production build
4
+ *
5
+ * @default 1
6
+ */
7
+ minThreads?: number;
8
+ /**
9
+ * Maximum number of process to run at once for production build
10
+ */
11
+ maxThreads?: number;
12
+ /**
13
+ * The runtime to use for creating threads.
14
+ * Possible values are 'child_process' or 'worker_threads'.
15
+ *
16
+ * @default 'worker_threads'
17
+ */
18
+ runtime?: 'child_process' | 'worker_threads';
19
+ /**
20
+ * Default timeout to wait for close when Thread shuts down, in milliseconds
21
+ *
22
+ * @default 60000
23
+ */
24
+ idleTimeout?: number;
25
+ }
@@ -0,0 +1 @@
1
+ export{};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatjs/evolve",
3
- "version": "2.1.0-next.1",
3
+ "version": "2.1.0-next.10",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -34,72 +34,77 @@
34
34
  "typecheck": "tsc --project ./tsconfig.json --noEmit"
35
35
  },
36
36
  "dependencies": {
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.1",
45
- "@flatjs/common": "2.1.0-next.1",
46
- "@flatjs/evolve-preset-babel": "2.1.0-next.1",
47
- "@flatjs/forge-postcss-plugin-pixel": "2.1.0-next.1",
48
- "@flatjs/graph": "2.1.0-next.1",
49
- "@flatjs/mock": "2.1.0-next.1",
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"
37
+ "@armit/babel-merge": "^0.1.6",
38
+ "@armit/config-loader": "^0.1.8",
39
+ "@armit/file-utility": "^0.1.5",
40
+ "@armit/git": "^0.1.5",
41
+ "@armit/package": "^0.1.6",
42
+ "@babel/core": "^7.24.5",
43
+ "@flatjs/babel-plugin-import": "2.1.0-next.5",
44
+ "@flatjs/common": "2.1.0-next.4",
45
+ "@flatjs/evolve-preset-babel": "2.1.0-next.4",
46
+ "@flatjs/forge-postcss-plugin-pixel": "2.1.0-next.4",
47
+ "@flatjs/graph": "2.1.0-next.6",
48
+ "@flatjs/mock": "2.1.0-next.6",
49
+ "@pmmmwh/react-refresh-webpack-plugin": "^0.5.13",
50
+ "@types/babel__core": "^7.20.5",
51
+ "babel-loader": "^9.1.3",
52
+ "better-opn": "^3.0.2",
53
+ "case-sensitive-paths-webpack-plugin": "^2.4.0",
54
+ "css-loader": "^7.1.1",
55
+ "cssnano": "^7.0.1",
56
+ "express": "^4.19.2",
57
+ "fork-ts-checker-webpack-plugin": "^9.0.2",
58
+ "happy-dom": "^14.10.1",
59
+ "html-webpack-plugin": "^5.6.0",
60
+ "image-minimizer-webpack-plugin": "^4.0.0",
61
+ "less": "^4.2.0",
62
+ "less-loader": "^12.2.0",
63
+ "listr": "^0.14.3",
64
+ "lodash": "^4.17.21",
65
+ "mini-css-extract-plugin": "^2.9.0",
66
+ "postcss": "^8.4.38",
67
+ "postcss-loader": "^8.1.1",
68
+ "react-refresh": "^0.14.2",
69
+ "svgo": "^3.3.2",
70
+ "tarjan-graph": "^3.0.0",
71
+ "terser-webpack-plugin": "^5.3.10",
72
+ "tinypool": "^0.9.0",
73
+ "tsconfig-paths-webpack-plugin": "^4.1.0",
74
+ "type-fest": "^4.18.2",
75
+ "typescript": "^5.4.5",
76
+ "webpack": "^5.91.0",
77
+ "webpack-bundle-analyzer": "^4.10.2",
78
+ "webpack-dev-server": "^5.0.4",
79
+ "webpack-sources": "^3.2.3"
80
80
  },
81
81
  "devDependencies": {
82
- "@armit/eslint-config-bases": "^0.1.5",
83
- "@flatjs/testing": "2.1.0-next.1",
84
- "@swc/core": "1.4.11",
82
+ "@armit/eslint-config-bases": "^0.1.6",
83
+ "@dimjs/lang": "1.5.0",
84
+ "@dimjs/model": "1.2.3",
85
+ "@dimjs/model-react": "1.2.3",
86
+ "@dimjs/utils": "1.5.1",
87
+ "@flatjs/testing": "2.1.0-next.4",
88
+ "@swc/core": "1.5.5",
85
89
  "@types/express": "4.17.21",
86
90
  "@types/listr": "0.14.9",
87
- "@types/node": "20.12.2",
88
- "@vitest/coverage-istanbul": "1.4.0",
89
- "@vitest/ui": "1.4.0",
90
- "eslint": "8.57.0",
91
+ "@types/node": "20.12.11",
92
+ "@vitest/coverage-istanbul": "1.6.0",
93
+ "@vitest/ui": "1.6.0",
94
+ "@wove/react": "1.2.23",
95
+ "eslint": "8.x",
91
96
  "imagemin-gifsicle": "7.0.0",
92
97
  "imagemin-jpegtran": "7.0.0",
93
- "imagemin-pngquant": "9.0.2",
94
- "imagemin-svgo": "10.0.1",
98
+ "imagemin-pngquant": "10.0.0",
99
+ "imagemin-svgo": "11.0.0",
95
100
  "npm-run-all": "4.1.5",
96
101
  "prettier": "3.2.5",
97
- "react": "18.2.0",
98
- "rimraf": "5.0.5",
102
+ "react": "18.3.1",
103
+ "rimraf": "5.0.7",
99
104
  "swc-unplugin-ts": "1.0.3",
100
105
  "ts-node": "11.0.0-beta.1",
101
106
  "vite-tsconfig-paths": "4.3.2",
102
- "vitest": "1.4.0",
107
+ "vitest": "1.6.0",
103
108
  "vue-loader": "17.4.2"
104
109
  },
105
110
  "peerDependencies": {
@@ -45,7 +45,7 @@
45
45
  <% } %>
46
46
  <% if (headBeforeScripts) { %>
47
47
  <% for (let index = 0; index < headBeforeScripts.length; index++) { %>
48
- <script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
48
+ <script 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 crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
57
+ <script 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 crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
48
+ <script 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 crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
57
+ <script 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 crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
48
+ <script 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 crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
57
+ <script 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 crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
48
+ <script 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 crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
57
+ <script 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 crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
48
+ <script 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 crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
57
+ <script 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 crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
48
+ <script 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 crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
57
+ <script 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 crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
48
+ <script 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 crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
57
+ <script src="<%= bodyAfterScripts[index]%>"></script>
58
58
  <% } %>
59
59
  <% } %>
60
60
  </body>