@moneko/core 3.56.14 → 3.56.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/common.mjs CHANGED
@@ -1 +1 @@
1
- import{extname as e,join as t,resolve as o}from"node:path";import{argv as s}from"node:process";import a,{config_files as i,CUSTOMCONFIG as n,TMP_DIR as r}from"./commom/paths.mjs";import{OverrideResolverPlugin as l}from"./plugin/override-resolve.mjs";import{digest as m,isObject as c,node_modules as p,resolveProgram as u}from"./utils/index.mjs";import{exampleModuleName as h}from"./vm/example.mjs";import d from"./vm/info.mjs";import{CONFIG as f}from"./config.mjs";import b from"./plugins.config.mjs";import{isCI as g,isDev as y,isLibrary as j,NODE_ENV as v,packageJson as P}from"./process-env.mjs";export const outputConfig={path:u(j?"docs":"dist"),filename:"js/[name].[contenthash].bundle.js",chunkFilename:"js/[contenthash].chunk.js",assetModuleFilename:t=>{let o=e(t.filename||"").substring(1);return`assets/${o}/[hash][ext]`},library:{name:`${d.projectName}`,type:"umd",umdNamedDefine:!0},globalObject:"self",chunkLoadingGlobal:`webpackJsonp_${P.name}`,pathinfo:y,clean:!0,publicPath:f.publicPath,workerPublicPath:f.publicPath,asyncChunks:!0,charset:!0,iife:!0,crossOriginLoading:"use-credentials",enabledWasmLoadingTypes:["fetch"],uniqueName:`${d.projectName}`};let C={main:[p("@app/entry")]},x=[t(a.corePath,"./polyfills/public-path.mjs")];if(y&&f.refresh&&f.env.injectRemoteReactRefresh&&x.push(t(a.corePath,"./polyfills/inject-react-refresh.mjs")),f.polyfill&&x.push(t(a.corePath,"./polyfills/replace-children.mjs")),f.entry&&("string"==typeof f.entry?C={...C,main:[f.entry]}:Object.keys(f.entry)&&(C=Object.assign(C,f.entry))),"string"==typeof C.main?C.main=[...x,C.main]:Array.isArray(C.main)&&(C.main=[...x,...C.main]),f.output){if("string"==typeof f.output)outputConfig.path=f.output;else if(Object.keys(f.output)){let e=f.output,t={...outputConfig.library};Object.assign(outputConfig,e),"object"==typeof f.output&&e.library&&(outputConfig.library=Object.assign(t,e.library))}}let k={type:"filesystem",allowCollectingMemory:!0,cacheDirectory:a.webpackCachePath,memoryCacheUnaffected:!0,name:await m([s[2],n,v].join("-"),"SHA-256"),version:`${P.version}`,buildDependencies:{config:i},maxMemoryGenerations:1};!1===f.cache?k=!1:c(f.cache)&&(k=Object.assign(k,f.cache)),g&&(void 0===f.cache||f.cache&&!f.cache.cacheDirectory)&&(k.cacheDirectory=o(r,P.name));let M={},w={imports:!0,entries:!0,test:e=>{let t=e.nameForCondition();return!!(t&&(t.startsWith(p(h))||t.startsWith(p("@app/comment"))||t.startsWith(a.pagesPath)||t.startsWith(a.componentsPath)))}};f.lazyCompilation&&y&&"true"!==process.env.IS_BUILD?c(f.lazyCompilation)?Object.assign(M,w,f.lazyCompilation):Object.assign(M,w):M=!1;export const commonConfig={name:"client",target:"web",devtool:f.devtool,entry:C,mode:f.mode??"production",stats:"errors-only",cache:k,snapshot:{immutablePaths:[a.pnpmNodeModules,a.denoNodeModules,/node_modules\/(?!(@app)\/)/],managedPaths:[a.pnpmNodeModules,a.denoNodeModules,/node_modules\/(?!(@app)\/)/],resolveBuildDependencies:{timestamp:!0,hash:!0},resolve:{timestamp:!0,hash:!0},module:{timestamp:!0,hash:!0},buildDependencies:{timestamp:!0,hash:!0},contextModule:{timestamp:!0,hash:!0}},infrastructureLogging:{level:"error"},externalsPresets:f.externalsPresets,plugins:b,node:{global:!1,__filename:!1,__dirname:!1},experiments:{asyncWebAssembly:!0,cacheUnaffected:!0,lazyCompilation:M,buildHttp:c(f.buildHttp)?{allowedUris:[],lockfileLocation:o(a.httpCachePath,"http.lock"),cacheLocation:o(a.httpCachePath,"data"),upgrade:!0,...f.buildHttp}:f.buildHttp,backCompat:!0,futureDefaults:!0,css:!1,outputModule:!1},resolve:{extensions:[".mts",".mjs",".ts",".tsx",".js",".jsx",".json",".wasm"],alias:f.alias,modules:[a.nodeModules,a.pnpmNodeModules,a.denoNodeModules],mainFields:["browser","module","main"],mainFiles:["index"],plugins:f.resolvePlugins,preferAbsolute:!0,cache:!0,fallback:{}},externals:f.externals,output:outputConfig,recordsPath:f.recordsPath?t(a.programPath,f.recordsPath):t(a.webpackCachePath,"records.json")};f.overrideResolve&&commonConfig.resolve.plugins.push(new l(Object.assign({original:f.alias["@"],override:n&&u(n)},f.overrideResolve)));
1
+ import{extname as e,join as t,resolve as o}from"node:path";import{argv as s}from"node:process";import a,{config_files as i,CUSTOMCONFIG as n,TMP_DIR as r}from"./commom/paths.mjs";import{OverrideResolverPlugin as l}from"./plugin/override-resolve.mjs";import{digest as m,isObject as c,node_modules as p,resolveProgram as u}from"./utils/index.mjs";import{exampleModuleName as h}from"./vm/example.mjs";import d from"./vm/info.mjs";import{CONFIG as f}from"./config.mjs";import b from"./plugins.config.mjs";import{isCI as g,isDev as y,isLibrary as j,NODE_ENV as v,packageJson as P}from"./process-env.mjs";export const outputConfig={path:u(j?"docs":"dist"),filename:"js/[name].[contenthash].bundle.js",chunkFilename:"js/[contenthash].chunk.js",assetModuleFilename:t=>{let o=e(t.filename||"").substring(1);return`assets/${o}/[hash][ext]`},library:{name:`${d.projectName}`,type:"umd",umdNamedDefine:!0},globalObject:"self",chunkLoadingGlobal:`webpackJsonp_${P.name}`,pathinfo:y,clean:!0,publicPath:f.publicPath,workerPublicPath:f.publicPath,asyncChunks:!0,charset:!0,iife:!0,crossOriginLoading:"use-credentials",enabledWasmLoadingTypes:["fetch"],uniqueName:`${d.projectName}`};let C={main:[p("@app/entry")]},x=[t(a.corePath,"./polyfills/public-path.mjs")];if(y&&f.refresh&&f.env.injectRemoteReactRefresh&&x.push(t(a.corePath,"./polyfills/inject-react-refresh.mjs")),f.polyfill&&x.push(t(a.corePath,"./polyfills/replace-children.mjs")),f.entry&&("string"==typeof f.entry?C={...C,main:[f.entry]}:Object.keys(f.entry)&&(C=Object.assign(C,f.entry))),"string"==typeof C.main?C.main=[...x,C.main]:Array.isArray(C.main)&&(C.main=[...x,...C.main]),f.output){if("string"==typeof f.output)outputConfig.path=f.output;else if(Object.keys(f.output)){let e=f.output,t={...outputConfig.library};Object.assign(outputConfig,e),"object"==typeof f.output&&e.library&&(outputConfig.library=Object.assign(t,e.library))}}let k={type:"filesystem",allowCollectingMemory:!0,cacheDirectory:a.webpackCachePath,memoryCacheUnaffected:!y,name:await m([s[2],n,v].join("-"),"SHA-256"),version:`${P.version}`,buildDependencies:{config:i},maxMemoryGenerations:1};!1===f.cache?k=!1:c(f.cache)&&(k=Object.assign(k,f.cache)),g&&(void 0===f.cache||f.cache&&!f.cache.cacheDirectory)&&(k.cacheDirectory=o(r,P.name));let M={},w={imports:!0,entries:!0,test:e=>{let t=e.nameForCondition();return!!(t&&(t.startsWith(p(h))||t.startsWith(p("@app/comment"))||t.startsWith(a.pagesPath)||t.startsWith(a.componentsPath)))}};f.lazyCompilation&&y&&"true"!==process.env.IS_BUILD?c(f.lazyCompilation)?Object.assign(M,w,f.lazyCompilation):Object.assign(M,w):M=!1;export const commonConfig={name:"client",target:"web",devtool:f.devtool,entry:C,mode:f.mode??"production",stats:"errors-only",cache:k,snapshot:{immutablePaths:[a.pnpmNodeModules,a.denoNodeModules,/node_modules\/(?!(@app)\/)/],managedPaths:[a.pnpmNodeModules,a.denoNodeModules,/node_modules\/(?!(@app)\/)/],resolveBuildDependencies:{timestamp:!0,hash:!0},resolve:{timestamp:!0,hash:!0},module:{timestamp:!0,hash:!0},buildDependencies:{timestamp:!0,hash:!0},contextModule:{timestamp:!0,hash:!0}},infrastructureLogging:{level:"error"},externalsPresets:f.externalsPresets,plugins:b,node:{global:!1,__filename:!1,__dirname:!1},experiments:{asyncWebAssembly:!0,cacheUnaffected:!y,lazyCompilation:M,buildHttp:c(f.buildHttp)?{allowedUris:[],lockfileLocation:o(a.httpCachePath,"http.lock"),cacheLocation:o(a.httpCachePath,"data"),upgrade:!0,...f.buildHttp}:f.buildHttp,backCompat:!0,futureDefaults:!0,css:!1,outputModule:!1},resolve:{extensions:[".mts",".mjs",".ts",".tsx",".js",".jsx",".json",".wasm"],alias:f.alias,modules:[a.nodeModules,a.pnpmNodeModules,a.denoNodeModules],mainFields:["browser","module","main"],mainFiles:["index"],plugins:f.resolvePlugins,preferAbsolute:!0,cache:!0,fallback:{}},externals:f.externals,output:outputConfig,recordsPath:f.recordsPath?t(a.programPath,f.recordsPath):t(a.webpackCachePath,"records.json")};f.overrideResolve&&commonConfig.resolve.plugins.push(new l(Object.assign({original:f.alias["@"],override:n&&u(n)},f.overrideResolve)));
@@ -1 +1 @@
1
- import e from"webpack";import{merge as i}from"webpack-merge";import{LightningCssMinifyPlugin as m}from"./plugin/lightningcss-plugin.mjs";import{SwcMinifyPlugin as n}from"./plugin/swc-minify-plugin.mjs";import{getLightningCssTargets as r}from"./polyfills/targets.mjs";import{commonConfig as o}from"./common.mjs";import{CONFIG as t}from"./config.mjs";import p from"./module.config.mjs";import{isReact as s,refresh as l}from"./process-env.mjs";export async function createDevelopmentConfiguration(u={}){let a=[];t.minifier&&(a.push(new n({compress:{ecma:2015,toplevel:!1,module:!1,ie8:!1,keep_fnames:!1,top_retain:[],keep_infinity:!0},...t.minifier})),a.push(new m({targets:r()})));let c=i(o,{module:p(!1),plugins:[new e.HotModuleReplacementPlugin],optimization:{runtimeChunk:t.runtimeChunk,minimize:a.length>0,minimizer:a,chunkIds:"deterministic",moduleIds:"deterministic",concatenateModules:!0,emitOnErrors:!1,removeAvailableModules:!0,removeEmptyChunks:!0,mergeDuplicateChunks:!0,sideEffects:!0,providedExports:!0,flagIncludedChunks:!0,innerGraph:!1,mangleExports:!1,portableRecords:!0,realContentHash:!1}});if(s&&l){let e=(await import("@pmmmwh/react-refresh-webpack-plugin")).default;c.plugins.push(new e({overlay:!1}))}return i(c,u)}
1
+ import e from"webpack";import{merge as i}from"webpack-merge";import{LightningCssMinifyPlugin as m}from"./plugin/lightningcss-plugin.mjs";import{SwcMinifyPlugin as n}from"./plugin/swc-minify-plugin.mjs";import{getLightningCssTargets as t}from"./polyfills/targets.mjs";import{commonConfig as o}from"./common.mjs";import{CONFIG as r}from"./config.mjs";import p from"./module.config.mjs";import{isReact as s,refresh as l}from"./process-env.mjs";export async function createDevelopmentConfiguration(u={}){let f=[];r.minifier&&(f.push(new n({compress:{ecma:2015,toplevel:!1,module:!1,ie8:!1,keep_fnames:!1,top_retain:[],keep_infinity:!0},...r.minifier})),f.push(new m({targets:t()})));let c=i(o,{module:p(!1),plugins:[new e.HotModuleReplacementPlugin],optimization:{runtimeChunk:r.runtimeChunk,minimize:f.length>0,minimizer:f,chunkIds:"deterministic",moduleIds:"deterministic",mangleExports:"deterministic"}});if(s&&l){let e=(await import("@pmmmwh/react-refresh-webpack-plugin")).default;c.plugins.push(new e({overlay:!1}))}return i(c,u)}
@@ -1 +1 @@
1
- import{resolve as t}from"node:path";import e from"../commom/paths.mjs";export function toCamelCase(t){return t.replace(/-./g,t=>t.charAt(1).toUpperCase())}export function convertToCamelCase(t){return t.toLowerCase().replace(/-(\w)/g,(t,e)=>e?e.toUpperCase():"").replace(/^./,t=>t.toUpperCase()).replace(/Ui$/,"UI")}export function resolveProgram(o){return t(e.programPath,`./${o}`)}export function node_modules(o){return t(e.nodeModules,`./${o}`)}export function isObject(t){let e=typeof t;return null!==t&&("object"===e||"function"===e)}export function isFunction(t){return["[object Function]","[object AsyncFunction]","[object GeneratorFunction]"].includes(Object.prototype.toString.call(t))}export function transformModule(t){let e="";if("string"==typeof t)e=t;else for(let[o,r]of Object.entries(t))e+=`export const ${o} = ${isFunction(r)?r:JSON.stringify(r)};`;return e}export function empty(){}export async function digest(t,e){let o=new TextEncoder().encode(t);return Array.from(new Uint8Array(await crypto.subtle.digest(e,o))).map(t=>t.toString(16).padStart(2,"0")).join("")}
1
+ import t from"node:crypto";import{resolve as e}from"node:path";import o from"../commom/paths.mjs";export function toCamelCase(t){return t.replace(/-./g,t=>t.charAt(1).toUpperCase())}export function convertToCamelCase(t){return t.toLowerCase().replace(/-(\w)/g,(t,e)=>e?e.toUpperCase():"").replace(/^./,t=>t.toUpperCase()).replace(/Ui$/,"UI")}export function resolveProgram(t){return e(o.programPath,`./${t}`)}export function node_modules(t){return e(o.nodeModules,`./${t}`)}export function isObject(t){let e=typeof t;return null!==t&&("object"===e||"function"===e)}export function isFunction(t){return["[object Function]","[object AsyncFunction]","[object GeneratorFunction]"].includes(Object.prototype.toString.call(t))}export function transformModule(t){let e="";if("string"==typeof t)e=t;else for(let[o,r]of Object.entries(t))e+=`export const ${o} = ${isFunction(r)?r:JSON.stringify(r)};`;return e}export function empty(){}export async function digest(e,o){let r=new TextEncoder().encode(e);return Array.from(new Uint8Array(await t.subtle.digest(o,r))).map(t=>t.toString(16).padStart(2,"0")).join("")}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "3.56.14",
3
+ "version": "3.56.16",
4
4
  "description": "core",
5
5
  "main": "lib/index.mjs",
6
6
  "type": "module",