@moneko/core 3.26.12-beta.4 → 3.26.13-beta.0

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.
@@ -1,6 +1,7 @@
1
1
  import { relative } from 'node:path';
2
2
  import { argv } from 'node:process';
3
+ import { stylelint } from '@moneko/stylelint';
3
4
  import { ink, print } from '@moneko/utils';
4
- import stylelints from 'stylelint';
5
5
  import { cachePath, cwd, parseBraced } from './utils/config.mjs';
6
- export default async function stylelint();
6
+ declare async function run();
7
+ export default run;
@@ -1,2 +1,2 @@
1
- import{relative as e}from"node:path";import{argv as s}from"node:process";import{ink as t,print as r}from"@moneko/utils";import o from"stylelint";import{cachePath as i,cwd as c,parseBraced as l}from"./utils/config.mjs";export default async function n(){let n=t("stylelint","cyan");r(`${n}: ${t("Runing...","yellow")}`,!0);let a=s[3],f=s.slice(4),m=f.includes("--fix"),p=await o.lint({files:l(a).map(s=>e(c,`${s}/**/*.{css,scss,sass,less,ts,tsx,js,jsx}`).replace(/\\/g,"/")),fix:m,cache:!f.includes("--cache=false"),cacheLocation:`${i}/.stylelintcache`,formatter:"string"}),u=p.errored;p.report&&process.stdout.write(p.report),r(`${n}: ${t(`✨ ${u?"Error":"Successfully"}!
2
- `,u?"red":"green")}`,!0),u&&process.exit(1)}
1
+ import{relative as e}from"node:path";import{argv as s}from"node:process";import{stylelint as t}from"@moneko/stylelint";import{ink as o,print as r}from"@moneko/utils";import{cachePath as i,cwd as c,parseBraced as l}from"./utils/config.mjs";async function n(){let n=o("stylelint","cyan");r(`${n}: ${o("Runing...","yellow")}`,!0);let a=s[3],m=s.slice(4),f=m.includes("--fix"),p=await t.lint({files:l(a).map(s=>e(c,`${s}/**/*.{css,scss,sass,less,ts,tsx,js,jsx}`).replace(/\\/g,"/")),fix:f,cache:!m.includes("--cache=false"),cacheLocation:`${i}/.stylelintcache`,formatter:"string"}),u=p.errored;p.report&&process.stdout.write(p.report),r(`${n}: ${o(`✨ ${u?"Error":"Successfully"}!
2
+ `,u?"red":"green")}`,!0),u&&process.exit(1)}export default n;
package/lib/common.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { extname, join, resolve } from 'node:path';
2
- import type { Configuration, FileCacheOptions, ResolvePluginInstance } from 'webpack';
2
+ import type { Configuration, FileCacheOptions } from 'webpack';
3
3
  import paths, { config_files, CUSTOMCONFIG } from './commom/paths.mjs';
4
- import OverrideResolverPlugin, { type OverrideResolverOption } from './plugin/override-resolve.mjs';
4
+ import OverrideResolverPlugin from './plugin/override-resolve.mjs';
5
5
  import { isObject, node_modules, resolveProgram } from './utils/index.mjs';
6
6
  import { exampleModuleName } from './vm/example.mjs';
7
7
  import app from './vm/info.mjs';
@@ -11,8 +11,4 @@ import { isDev, isLibrary, NODE_ENV, PACKAGENAME, PACKAGEVERSION } from './proce
11
11
  export declare const outputConfig: Configuration['output'];
12
12
  declare let entryMap: Configuration['entry'];
13
13
  declare let cacheConfig: FileCacheOptions | false;
14
- declare const overrideResolve: {
15
- original: string;
16
- override: string;
17
- };
18
14
  export declare const commonConfig: Configuration;
package/lib/common.mjs CHANGED
@@ -1 +1 @@
1
- import{extname as e,join as t,resolve as o}from"node:path";import a,{config_files as n,CUSTOMCONFIG as s}from"./commom/paths.mjs";import i from"./plugin/override-resolve.mjs";import{isObject as l,node_modules as r,resolveProgram as m}from"./utils/index.mjs";import{exampleModuleName as p}from"./vm/example.mjs";import c from"./vm/info.mjs";import{CONFIG as u,PUBLICPATH as d}from"./config.mjs";import h from"./plugins.config.mjs";import{isDev as f,isLibrary as g,NODE_ENV as b,PACKAGENAME as y,PACKAGEVERSION as j}from"./process-env.mjs";export const outputConfig={path:m(g?"docs":"dist"),filename:"js/[name].bundle.js",chunkFilename:`js/[${f?"name":"contenthash"}].js`,assetModuleFilename:t=>{let o=e(t.filename||"").substring(1);return`assets/${o}/[name][hash][ext]`},library:{name:`${c.projectName}`,type:"umd",umdNamedDefine:!0},globalObject:"window",chunkLoadingGlobal:`webpackJsonp_${y}`,pathinfo:f,clean:!0,publicPath:d,asyncChunks:!0,charset:!0,iife:!0,crossOriginLoading:"anonymous",enabledWasmLoadingTypes:["fetch"],hotUpdateChunkFilename:"[id].[fullhash].hot.js",hotUpdateMainFilename:"[runtime].[fullhash].hot.json"};let v={main:[u.polyfill&&t(a.corePath,"./polyfills/replace-children.mjs"),r("@app/entry")].filter(Boolean)};u.entry&&("string"==typeof u.entry?v={main:[u.entry]}:Object.keys(u.entry)&&(v=Object.assign(v,u.entry))),"string"==typeof v.main&&(v.main=[v.main]),u.output&&("string"==typeof u.output?outputConfig.path=u.output:Object.keys(u.output)&&Object.assign(outputConfig,u.output));let C={type:"filesystem",allowCollectingMemory:!0,cacheDirectory:a.webpackCachePath,memoryCacheUnaffected:!0,name:`.${[s,b].filter(Boolean).join("-")}`,version:`${j}`,buildDependencies:{config:n}};!1===u.cache?C=!1:l(u.cache)&&(C=Object.assign(C,u.cache));let k=Object.assign({original:u.alias["@"],override:s&&m(s)},u.overrideResolve);export const commonConfig={name:"client",target:"web",devtool:u.devtool,entry:v,mode:f?"development":"production",stats:"errors-only",cache:C,snapshot:{immutablePaths:[/node_modules\/(?!(@app|@moneko)\/)/],managedPaths:[/^@app\/.+/,/^@moneko\/.+/],buildDependencies:{timestamp:!0,hash:!0}},infrastructureLogging:{level:"error"},externalsPresets:u.externalsPresets,plugins:h,node:{global:!1,__filename:!1,__dirname:!1},experiments:{topLevelAwait:!0,asyncWebAssembly:!0,cacheUnaffected:!0,layers:!0,lazyCompilation:u.lazyCompilation&&f&&{imports:!0,entries:!0,test:e=>{let t=e.nameForCondition();return!!(t&&(t.startsWith(r(p))||t.startsWith(r("@app/comment"))||t.startsWith(a.pagesPath)||t.startsWith(a.componentsPath)))}},buildHttp:l(u.buildHttp)?{allowedUris:[],lockfileLocation:o(a.httpCachePath,"http.lock"),cacheLocation:o(a.httpCachePath,"data"),upgrade:!0,...u.buildHttp}:u.buildHttp,backCompat:!0,futureDefaults:!0,css:!1,outputModule:!1},resolve:{extensions:[".mts",".mjs",".ts",".tsx",".js",".jsx",".json",".wasm"],alias:u.alias,modules:[a.nodeModules,a.pnpmNodeModules,a.denoNodeModules],mainFields:["browser","module","main"],mainFiles:["index"],plugins:[u.overrideResolve&&new i(k),...u.resolvePlugins].filter(Boolean),preferAbsolute:!0,cache:!0,fallback:{}},externals:u.externals,output:outputConfig};
1
+ import{extname as e,join as t,resolve as o}from"node:path";import s,{config_files as n,CUSTOMCONFIG as a}from"./commom/paths.mjs";import i from"./plugin/override-resolve.mjs";import{isObject as l,node_modules as r,resolveProgram as m}from"./utils/index.mjs";import{exampleModuleName as p}from"./vm/example.mjs";import c from"./vm/info.mjs";import{CONFIG as u,PUBLICPATH as d}from"./config.mjs";import h from"./plugins.config.mjs";import{isDev as f,isLibrary as g,NODE_ENV as b,PACKAGENAME as y,PACKAGEVERSION as j}from"./process-env.mjs";export const outputConfig={path:m(g?"docs":"dist"),filename:"js/[name].bundle.js",chunkFilename:`js/[${f?"name":"contenthash"}].js`,assetModuleFilename:t=>{let o=e(t.filename||"").substring(1);return`assets/${o}/[name][hash][ext]`},library:{name:`${c.projectName}`,type:"umd",umdNamedDefine:!0},globalObject:"window",chunkLoadingGlobal:`webpackJsonp_${y}`,pathinfo:f,clean:!0,publicPath:d,asyncChunks:!0,charset:!0,iife:!0,crossOriginLoading:"anonymous",enabledWasmLoadingTypes:["fetch"],hotUpdateChunkFilename:"[id].[fullhash].hot.js",hotUpdateMainFilename:"[runtime].[fullhash].hot.json"};let v={main:[u.polyfill&&t(s.corePath,"./polyfills/replace-children.mjs"),r("@app/entry")].filter(Boolean)};u.entry&&("string"==typeof u.entry?v={main:[u.entry]}:Object.keys(u.entry)&&(v=Object.assign(v,u.entry))),"string"==typeof v.main&&(v.main=[v.main]),u.output&&("string"==typeof u.output?outputConfig.path=u.output:Object.keys(u.output)&&Object.assign(outputConfig,u.output));let C={type:"filesystem",allowCollectingMemory:!0,cacheDirectory:s.webpackCachePath,memoryCacheUnaffected:!0,name:`.${[a,b].filter(Boolean).join("-")}`,version:`${j}`,buildDependencies:{config:n}};!1===u.cache?C=!1:l(u.cache)&&(C=Object.assign(C,u.cache));export const commonConfig={name:"client",target:"web",devtool:u.devtool,entry:v,mode:f?"development":"production",stats:"errors-only",cache:C,snapshot:{immutablePaths:[/node_modules\/(?!(@app|@moneko)\/)/],managedPaths:[/^@app\/.+/,/^@moneko\/.+/],buildDependencies:{timestamp:!0,hash:!0}},infrastructureLogging:{level:"error"},externalsPresets:u.externalsPresets,plugins:h,node:{global:!1,__filename:!1,__dirname:!1},experiments:{topLevelAwait:!0,asyncWebAssembly:!0,cacheUnaffected:!0,layers:!0,lazyCompilation:u.lazyCompilation&&f&&{imports:!0,entries:!0,test:e=>{let t=e.nameForCondition();return!!(t&&(t.startsWith(r(p))||t.startsWith(r("@app/comment"))||t.startsWith(s.pagesPath)||t.startsWith(s.componentsPath)))}},buildHttp:l(u.buildHttp)?{allowedUris:[],lockfileLocation:o(s.httpCachePath,"http.lock"),cacheLocation:o(s.httpCachePath,"data"),upgrade:!0,...u.buildHttp}:u.buildHttp,backCompat:!0,futureDefaults:!0,css:!1,outputModule:!1},resolve:{extensions:[".mts",".mjs",".ts",".tsx",".js",".jsx",".json",".wasm"],alias:u.alias,modules:[s.nodeModules,s.pnpmNodeModules,s.denoNodeModules],mainFields:["browser","module","main"],mainFiles:["index"],plugins:u.resolvePlugins,preferAbsolute:!0,cache:!0,fallback:{}},externals:u.externals,output:outputConfig};u.overrideResolve&&commonConfig.resolve.plugins.push(new i(Object.assign({original:u.alias["@"],override:a&&m(a)},u.overrideResolve)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "3.26.12-beta.4",
3
+ "version": "3.26.13-beta.0",
4
4
  "description": "core",
5
5
  "main": "lib/index.mjs",
6
6
  "type": "module",
@@ -20,6 +20,7 @@
20
20
  "@fastify/http-proxy": "9.5.0",
21
21
  "@fastify/middie": "8.3.3",
22
22
  "@moneko/mdx": "0.1.42",
23
+ "@moneko/stylelint": "1.0.0-beta.2",
23
24
  "@moneko/transform-imports": "0.6.1",
24
25
  "@moneko/utils": "0.1.19",
25
26
  "@swc/cli": "0.5.2",
@@ -52,7 +53,6 @@
52
53
  "sass": "1.83.0",
53
54
  "sass-loader": "16.0.4",
54
55
  "solid-refresh": "0.7.5",
55
- "stylelint": "16.11.0",
56
56
  "webpack-bundle-analyzer": "4.10.2"
57
57
  },
58
58
  "files": [