@rsbuild/core 2.1.8 → 2.1.10
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/compiled/css-loader/index.js +2 -2
- package/compiled/html-rspack-plugin/index.js +14 -14
- package/compiled/postcss/index.js +1 -1
- package/compiled/postcss/lib/node.d.ts +2 -2
- package/compiled/postcss/package.json +1 -1
- package/compiled/postcss-loader/index.js +6 -6
- package/compiled/rspack-chain/package.json +1 -1
- package/compiled/rspack-chain/types/index.d.ts +7 -11
- package/dist/626.js +98 -83
- package/dist/launch-editor-middleware.js +1 -1
- package/dist/manifest-plugin.js +1 -1
- package/dist/server/helper.d.ts +6 -8
- package/dist/types/context.d.ts +1 -1
- package/dist/types/hooks.d.ts +2 -2
- package/dist/types/rsbuild.d.ts +4 -3
- package/package.json +19 -19
package/dist/manifest-plugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__webpack_require__ as e}from"./rslib-runtime.js";import"./626.js";e.add({"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.5/node_modules/rspack-manifest-plugin/dist/helpers.js"(e,t,s){t.transformFiles=t.reduceChunk=t.reduceAssets=t.generateManifest=void 0;let r=s("node:path?815c");t.generateManifest=(e,t,{generate:s,seed:r={}})=>s?s(r,t,Array.from(e.entrypoints.entries()).reduce((e,[t,s])=>Object.assign(e,{[t]:s.getFiles()}),{}),{compilation:e}):t.reduce((e,t)=>Object.assign(e,{[t.name]:t.path}),r),t.reduceAssets=(e,t,s)=>{let n;return(s[t.name]?n=s[t.name]:t.info.sourceFilename&&(n=(0,r.join)((0,r.dirname)(t.name),(0,r.basename)(t.info.sourceFilename))),n)?e.concat({isAsset:!0,isChunk:!1,isInitial:!1,isModuleAsset:!0,name:n,path:t.name}):t.chunks&&t.chunks.length>0?e:e.concat({isAsset:!0,isChunk:!1,isInitial:!1,isModuleAsset:!1,name:t.name,path:t.name})},t.reduceChunk=(e,t,s,n)=>(Array.from(t.auxiliaryFiles||[]).forEach(e=>{n[e]={isAsset:!0,isChunk:!1,isInitial:!1,isModuleAsset:!0,name:(0,r.basename)(e),path:e}}),Array.from(t.files).reduce((e,r)=>{let n=t.name?t.name:null;return n=n?s.useEntryKeys&&!r.endsWith(".map")?n:`${n}.${((e,{transformExtensions:t})=>{let s=e.replace(/\?.*/,"").split("."),r=s.pop();return t.test(r)?`${s.pop()}.${r}`:r})(r,s)}`:r,e.concat({chunk:t,isAsset:!1,isChunk:!0,isInitial:t.isOnlyInitial(),isModuleAsset:!1,name:n,path:r})},e));let n=e=>{let t=Object.assign({},e);return t.name=e.name.replace(/\\/g,"/"),t.path=e.path.replace(/\\/g,"/"),t};t.transformFiles=(e,t)=>["filter","map","sort"].filter(e=>!!t[e]).reduce((e,s)=>e[s](t[s]),e).map(n)},"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.5/node_modules/rspack-manifest-plugin/dist/hooks.js"(e,t,s){t.getCompilerHooks=t.emitHook=t.beforeRunHook=void 0;let r=s("node:fs?31c0"),n=s("node:path?815c"),o=s("../../node_modules/.pnpm/@rspack+lite-tapable@1.1.2/node_modules/@rspack/lite-tapable/dist/index.cjs"),a=s("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.5/node_modules/rspack-manifest-plugin/dist/helpers.js"),i=new WeakMap,l=e=>{let t=i.get(e);return void 0===t&&(t={afterEmit:new o.SyncWaterfallHook(["manifest"]),beforeEmit:new o.SyncWaterfallHook(["manifest"])},i.set(e,t)),t};t.getCompilerHooks=l,t.beforeRunHook=({emitCountMap:e,manifestFileName:t},s,r)=>{let n=e.get(t)||0;e.set(t,n+1),r&&r()},t.emitHook=function({compiler:e,emitCountMap:t,manifestAssetId:s,manifestFileName:o,moduleAssets:i,options:p},c){let h=t.get(o)-1,u=c.getStats().toJson({all:!1,assets:!0,cachedAssets:!0,ids:!0,publicPath:!0}),g=null!==p.publicPath?p.publicPath:u.publicPath,f="auto"===g?"":g,{basePath:m,removeKeyHash:d}=p;t.set(o,h);let y={},k=Array.from(c.chunks).reduce((e,t)=>(0,a.reduceChunk)(e,t,p,y),[]);(k=(k=u.assets.reduce((e,t)=>(0,a.reduceAssets)(e,t,i),k)).filter(({name:s,path:r})=>!r.includes("hot-update")&&void 0===t.get((0,n.join)(e.options.output?.path||"<unknown>",s)))).forEach(e=>{delete y[e.path]}),Object.keys(y).forEach(e=>{k=k.concat(y[e])});let S={};u.assets?.forEach(e=>{e.integrity&&(S[e.name]=e.integrity)}),k=k.map(e=>{let t=e=>e.endsWith("/")?e:`${e}/`,s={name:m?t(m)+e.name:e.name,path:f?t(f)+e.path:e.path};return S[e.path]&&(s.integrity=S[e.path]),s.name=d?s.name.replace(d,""):s.name,Object.assign(e,s)}),k=(0,a.transformFiles)(k,p);let _=(0,a.generateManifest)(c,k,p),A=0===h;if(_=l(e).beforeEmit.call(_),A){let t=p.serialize(_);c.emitAsset(s,new e.webpack.sources.RawSource(t)),p.writeToFileEmit&&((0,r.mkdirSync)((0,n.dirname)(o),{recursive:!0}),(0,r.writeFileSync)(o,t))}l(e).afterEmit.call(_)}},"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.5/node_modules/rspack-manifest-plugin/dist/index.js"(e,t,s){t.RspackManifestPlugin=void 0;let r=s("node:path?815c"),n=s("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.5/node_modules/rspack-manifest-plugin/dist/hooks.js"),o=new Map,a={assetHookStage:1/0,basePath:"",fileName:"manifest.json",filter:null,generate:void 0,map:null,publicPath:null,removeKeyHash:/([a-f0-9]{16,32}\.?)/gi,seed:void 0,serialize:e=>JSON.stringify(e,null,2),sort:null,transformExtensions:/^(gz|map)$/i,useEntryKeys:!1,useLegacyEmit:!1,writeToFileEmit:!1};t.RspackManifestPlugin=class{options;constructor(e){this.options=Object.assign({},a,e)}apply(e){let t=(0,r.resolve)(e.options.output?.path||"./",this.options.fileName),s=(0,r.relative)(e.options.output?.path||"./",t),a=n.beforeRunHook.bind(this,{emitCountMap:o,manifestFileName:t}),i=n.emitHook.bind(this,{compiler:e,emitCountMap:o,manifestAssetId:s,manifestFileName:t,moduleAssets:{},options:this.options}),l={name:"WebpackManifestPlugin",stage:this.options.assetHookStage};!0===this.options.useLegacyEmit?e.hooks.emit.tap(l,i):e.hooks.thisCompilation.tap(l,e=>{e.hooks.processAssets.tap(l,()=>i(e))}),e.hooks.run.tapAsync(l,a),e.hooks.watchRun.tapAsync(l,a)}}},"../../node_modules/.pnpm/@rspack+lite-tapable@1.1.2/node_modules/@rspack/lite-tapable/dist/index.cjs"(e,t){var s={};s.d=(e,t,r)=>{var n=(t,r)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,[r]:t[n]})};n(t,"get"),n(r,"value")},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};function n(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}s.r(r);class o{intercept(e){if(this.interceptors.push(Object.assign({},e)),e.register)for(let t=0;t<this.taps.length;t++)this.taps[t]=e.register(this.taps[t])}_runRegisterInterceptors(e){return this.interceptors.reduce((e,t)=>t.register?.(e)??e,e)}_runCallInterceptors(...e){for(let t of this.interceptors)t.call&&t.call(...e)}_runErrorInterceptors(e){for(let t of this.interceptors)t.error&&t.error(e)}_runTapInterceptors(e){for(let t of this.interceptors)t.tap&&t.tap(e)}_runDoneInterceptors(){for(let e of this.interceptors)e.done&&e.done()}_runResultInterceptors(e){for(let t of this.interceptors)t.result&&t.result(e)}withOptions(e){let t=t=>Object.assign({},e,"string"==typeof t?{name:t}:t);return{name:this.name,tap:(e,s)=>this.tap(t(e),s),tapAsync:(e,s)=>this.tapAsync(t(e),s),tapPromise:(e,s)=>this.tapPromise(t(e),s),intercept:e=>this.intercept(e),isUsed:()=>this.isUsed(),withOptions:e=>this.withOptions(t(e)),queryStageRange:e=>this.queryStageRange(e)}}isUsed(){return this.taps.length>0||this.interceptors.length>0}queryStageRange(e){return new c(e,this)}callAsyncStageRange(e){throw Error("Hook should implement there own _callAsyncStageRange")}callAsync(...e){return this.callAsyncStageRange(this.queryStageRange(l),...e)}promiseStageRange(e,...t){return new Promise((s,r)=>{this.callAsyncStageRange(e,...t,(e,t)=>e?r(e):s(t))})}promise(...e){return this.promiseStageRange(this.queryStageRange(l),...e)}tap(e,t){this._tap("sync",e,t)}tapAsync(e,t){this._tap("async",e,t)}tapPromise(e,t){this._tap("promise",e,t)}_tap(e,t,s){let r=t;if("string"==typeof t)r={name:t.trim()};else if("object"!=typeof t||null===t)throw Error("Invalid tap options");if("string"!=typeof r.name||""===r.name)throw Error("Missing name for tap");this._insert(this._runRegisterInterceptors(Object.assign({type:e,fn:s},r)))}_insert(e){let t;"string"==typeof e.before?t=new Set([e.before]):Array.isArray(e.before)&&(t=new Set(e.before));let s=0;"number"==typeof e.stage&&(s=e.stage);let r=this.taps.length;for(;r>0;){r--;let e=this.taps[r];this.taps[r+1]=e;let n=e.stage||0;if(t){if(t.has(e.name)){t.delete(e.name);continue}if(t.size>0)continue}if(!(n>s)){r++;break}}this.taps[r]=e}_prepareArgs(e){let t=this.args.length;return e.length<t?(e.length=t,e.fill(void 0,e.length,t)):(e.length>t&&(e.length=t),e)}constructor(e=[],t){n(this,"args",void 0),n(this,"name",void 0),n(this,"taps",void 0),n(this,"interceptors",void 0),this.args=e,this.name=t,this.taps=[],this.interceptors=[]}}let a=-1/0,i=1/0,l=[a,1/0],p=0x80000000-1;class c{isUsed(){return!!(this.tapsInRange.length>0||this.stageRange[0]===a&&this.hook.interceptors.some(e=>e.call)||this.stageRange[1]===i&&this.hook.interceptors.some(e=>e.done))}call(...e){if("function"!=typeof this.hook.callStageRange)throw Error("hook is not a SyncHook, call methods only exists on SyncHook");return this.hook.callStageRange(this,...e)}callAsync(...e){return this.hook.callAsyncStageRange(this,...e)}promise(...e){return this.hook.promiseStageRange(this,...e)}constructor(e,t){n(this,"stageRange",void 0),n(this,"hook",void 0),n(this,"tapsInRange",void 0);let s=[],[r,o]=e;for(let e of t.taps){let t=e.stage??0;r<=t&&t<o?s.push(e):o===i&&t===i&&s.push(e)}this.stageRange=e,this.hook=t,this.tapsInRange=s}}class h extends o{callAsyncStageRange(e,...t){let{stageRange:[s,r],tapsInRange:n}=e,o=t.slice(0,t.length-1),l=t[t.length-1],p=this._prepareArgs(o);for(let e of(s===a&&this._runCallInterceptors(...p),n)){this._runTapInterceptors(e);try{e.fn(...p)}catch(e){return this._runErrorInterceptors(e),l(e)}}r===i&&(this._runDoneInterceptors(),l(null))}call(...e){return this.callStageRange(this.queryStageRange(l),...e)}callStageRange(e,...t){let s,r;if(this.callAsyncStageRange(e,...t,(e,t)=>{r=e,s=t}),r)throw r;return s}tapAsync(){throw Error("tapAsync is not supported on a SyncHook")}tapPromise(){throw Error("tapPromise is not supported on a SyncHook")}}class u extends o{callAsyncStageRange(e,...t){let{stageRange:[s,r],tapsInRange:n}=e,o=t.slice(0,t.length-1),l=t[t.length-1],p=this._prepareArgs(o);for(let e of(s===a&&this._runCallInterceptors(...p),n)){let t;this._runTapInterceptors(e);try{t=e.fn(...p)}catch(e){return this._runErrorInterceptors(e),l(e)}if(void 0!==t)return this._runResultInterceptors(t),l(null,t)}r===i&&(this._runDoneInterceptors(),l(null))}call(...e){return this.callStageRange(this.queryStageRange(l),...e)}callStageRange(e,...t){let s,r;if(this.callAsyncStageRange(e,...t,(e,t)=>{r=e,s=t}),r)throw r;return s}tapAsync(){throw Error("tapAsync is not supported on a SyncBailHook")}tapPromise(){throw Error("tapPromise is not supported on a SyncBailHook")}}class g extends o{callAsyncStageRange(e,...t){let{stageRange:[s,r],tapsInRange:n}=e,o=t.slice(0,t.length-1),l=t[t.length-1],p=this._prepareArgs(o);for(let e of(s===a&&this._runCallInterceptors(...p),n)){this._runTapInterceptors(e);try{let t=e.fn(...p);void 0!==t&&(p[0]=t)}catch(e){return this._runErrorInterceptors(e),l(e)}}r===i&&(this._runDoneInterceptors(),l(null,p[0]))}call(...e){return this.callStageRange(this.queryStageRange(l),...e)}callStageRange(e,...t){let s,r;if(this.callAsyncStageRange(e,...t,(e,t)=>{r=e,s=t}),r)throw r;return s}tapAsync(){throw Error("tapAsync is not supported on a SyncWaterfallHook")}tapPromise(){throw Error("tapPromise is not supported on a SyncWaterfallHook")}constructor(e=[],t){if(e.length<1)throw Error("Waterfall hooks must have at least one argument");super(e,t)}}class f extends o{callAsyncStageRange(e,...t){let{stageRange:[s],tapsInRange:r}=e,n=t.slice(0,t.length-1),o=t[t.length-1],i=this._prepareArgs(n);s===a&&this._runCallInterceptors(...i);let l=()=>{this._runDoneInterceptors(),o(null)},p=e=>{this._runErrorInterceptors(e),o(e)};if(0===r.length)return l();let c=r.length;for(let e of r){if(this._runTapInterceptors(e),"promise"===e.type){let t=e.fn(...i);if(!t||!t.then)throw Error(`Tap function (tapPromise) did not return promise (returned ${t})`);t.then(()=>{0==(c-=1)&&l()},e=>{c=0,p(e)})}else if("async"===e.type)e.fn(...i,e=>{e?(c=0,p(e)):0==(c-=1)&&l()});else{let t=!1;try{e.fn(...i)}catch(e){t=!0,c=0,p(e)}t||0!=--c||l()}if(c<=0)return}}}class m extends o{callAsyncStageRange(e,...t){let{stageRange:[s],tapsInRange:r}=e,n=t.slice(0,t.length-1),o=t[t.length-1],i=this._prepareArgs(n);s===a&&this._runCallInterceptors(...i);let l=()=>{this._runDoneInterceptors(),o(null)},p=e=>{this._runErrorInterceptors(e),o(e)};if(0===r.length)return l();let c=0,h=()=>{let e=r[c];if(this._runTapInterceptors(e),"promise"===e.type){let t=e.fn(...i);if(!t||!t.then)throw Error(`Tap function (tapPromise) did not return promise (returned ${t})`);t.then(()=>{(c+=1)===r.length?l():h()},e=>{c=r.length,p(e)})}else if("async"===e.type)e.fn(...i,e=>{e?(c=r.length,p(e)):(c+=1)===r.length?l():h()});else{let t=!1;try{e.fn(...i)}catch(e){t=!0,c=r.length,p(e)}t||((c+=1)===r.length?l():h())}if(c===r.length)return};h()}}class d extends o{callAsyncStageRange(e,...t){let{stageRange:[s],tapsInRange:r}=e,n=t.slice(0,t.length-1),o=t[t.length-1],i=this._prepareArgs(n);s===a&&this._runCallInterceptors(...i);let l=()=>{this._runDoneInterceptors(),o(null)},p=e=>{this._runErrorInterceptors(e),o(e)},c=e=>{this._runResultInterceptors(e),o(null,e)};if(0===r.length)return l();let h=0,u=()=>{let e=r[h];if(this._runTapInterceptors(e),"promise"===e.type){let t=e.fn(...i);if(!t||!t.then)throw Error(`Tap function (tapPromise) did not return promise (returned ${t})`);t.then(e=>{h+=1,void 0!==e?c(e):h===r.length?l():u()},e=>{h=r.length,p(e)})}else if("async"===e.type)e.fn(...i,(e,t)=>{e?(h=r.length,p(e)):(h+=1,void 0!==t?c(t):h===r.length?l():u())});else{let t,s=!1;try{t=e.fn(...i)}catch(e){s=!0,h=r.length,p(e)}s||(h+=1,void 0!==t?c(t):h===r.length?l():u())}if(h===r.length)return};u()}}class y extends o{callAsyncStageRange(e,...t){let{stageRange:[s],tapsInRange:r}=e,n=t.slice(0,t.length-1),o=t[t.length-1],i=this._prepareArgs(n);s===a&&this._runCallInterceptors(...i);let l=e=>{this._runResultInterceptors(e),o(null,e)},p=e=>{this._runErrorInterceptors(e),o(e)};if(0===r.length)return l(i[0]);let c=0,h=()=>{let e=r[c];if(this._runTapInterceptors(e),"promise"===e.type){let t=e.fn(...i);if(!t||!t.then)throw Error(`Tap function (tapPromise) did not return promise (returned ${t})`);t.then(e=>{c+=1,void 0!==e&&(i[0]=e),c===r.length?l(i[0]):h()},e=>{c=r.length,p(e)})}else if("async"===e.type)e.fn(...i,(e,t)=>{e?(c=r.length,p(e)):(c+=1,void 0!==t&&(i[0]=t),c===r.length?l(i[0]):h())});else{let t=!1;try{let t=e.fn(...i);void 0!==t&&(i[0]=t)}catch(e){t=!0,c=r.length,p(e)}t||((c+=1)===r.length?l(i[0]):h())}if(c===r.length)return};h()}constructor(e=[],t){if(e.length<1)throw Error("Waterfall hooks must have at least one argument");super(e,t)}}let k=(e,t)=>t;class S{get(e){return this._map.get(e)}for(e){let t=this.get(e);if(void 0!==t)return t;let s=this._factory(e),r=this._interceptors;for(let t=0;t<r.length;t++){let n=r[t].factory;n&&(s=n(e,s))}return this._map.set(e,s),s}intercept(e){this._interceptors.push(Object.assign({factory:k},e))}isUsed(){for(let e of this._map.keys()){let t=this.get(e);if(t?.isUsed())return!0}return!1}queryStageRange(e){return new _(e,this)}constructor(e,t){n(this,"_map",new Map),n(this,"_factory",void 0),n(this,"name",void 0),n(this,"_interceptors",void 0),this.name=t,this._factory=e,this._interceptors=[]}}class _{get(e){return this.hookMap.get(e)?.queryStageRange(this.stageRange)}for(e){return this.hookMap.for(e).queryStageRange(this.stageRange)}isUsed(){for(let e of this.hookMap._map.keys())if(this.get(e)?.isUsed())return!0;return!1}constructor(e,t){n(this,"stageRange",void 0),n(this,"hookMap",void 0),this.stageRange=e,this.hookMap=t}}class A{tap(e,t){for(let s of this.hooks)s.tap(e,t)}tapAsync(e,t){for(let s of this.hooks)s.tapAsync(e,t)}tapPromise(e,t){for(let s of this.hooks)s.tapPromise(e,t)}isUsed(){for(let e of this.hooks)if(e.isUsed())return!0;return!1}intercept(e){for(let t of this.hooks)t.intercept(e)}withOptions(e){return new A(this.hooks.map(t=>t.withOptions(e)),this.name)}constructor(e,t){n(this,"hooks",void 0),n(this,"name",void 0),this.hooks=e,this.name=t}}for(var H in s.d(r,{AsyncParallelHook:()=>f,AsyncSeriesBailHook:()=>d,AsyncSeriesHook:()=>m,AsyncSeriesWaterfallHook:()=>y,HookBase:()=>o,HookMap:()=>S,MultiHook:()=>A,QueriedHook:()=>c,QueriedHookMap:()=>_,SyncBailHook:()=>u,SyncHook:()=>h,SyncWaterfallHook:()=>g},{maxStage:i,minStage:a,safeStage:e=>e<-0x80000000?-0x80000000:e>p?p:e}),t.AsyncParallelHook=r.AsyncParallelHook,t.AsyncSeriesBailHook=r.AsyncSeriesBailHook,t.AsyncSeriesHook=r.AsyncSeriesHook,t.AsyncSeriesWaterfallHook=r.AsyncSeriesWaterfallHook,t.HookBase=r.HookBase,t.HookMap=r.HookMap,t.MultiHook=r.MultiHook,t.QueriedHook=r.QueriedHook,t.QueriedHookMap=r.QueriedHookMap,t.SyncBailHook=r.SyncBailHook,t.SyncHook=r.SyncHook,t.SyncWaterfallHook=r.SyncWaterfallHook,t.maxStage=r.maxStage,t.minStage=r.minStage,t.safeStage=r.safeStage,r)-1===["AsyncParallelHook","AsyncSeriesBailHook","AsyncSeriesHook","AsyncSeriesWaterfallHook","HookBase","HookMap","MultiHook","QueriedHook","QueriedHookMap","SyncBailHook","SyncHook","SyncWaterfallHook","maxStage","minStage","safeStage"].indexOf(H)&&(t[H]=r[H]);Object.defineProperty(t,"__esModule",{value:!0})}});var t=e("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.5/node_modules/rspack-manifest-plugin/dist/index.js").RspackManifestPlugin;export{t as RspackManifestPlugin};
|
|
1
|
+
import{__webpack_require__ as e}from"./rslib-runtime.js";import"./626.js";e.add({"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.8/node_modules/rspack-manifest-plugin/dist/helpers.js"(e,t,s){t.transformFiles=t.reduceChunk=t.reduceAssets=t.generateManifest=void 0;let r=s("node:path?815c");t.generateManifest=(e,t,{generate:s,seed:r={}})=>s?s(r,t,Array.from(e.entrypoints.entries()).reduce((e,[t,s])=>Object.assign(e,{[t]:s.getFiles()}),{}),{compilation:e}):t.reduce((e,t)=>Object.assign(e,{[t.name]:t.path}),r),t.reduceAssets=(e,t,s)=>{let n;return(s[t.name]?n=s[t.name]:t.info.sourceFilename&&(n=(0,r.join)((0,r.dirname)(t.name),(0,r.basename)(t.info.sourceFilename))),n)?e.concat({isAsset:!0,isChunk:!1,isInitial:!1,isModuleAsset:!0,name:n,path:t.name}):t.chunks&&t.chunks.length>0?e:e.concat({isAsset:!0,isChunk:!1,isInitial:!1,isModuleAsset:!1,name:t.name,path:t.name})},t.reduceChunk=(e,t,s,n)=>(Array.from(t.auxiliaryFiles||[]).forEach(e=>{n[e]={isAsset:!0,isChunk:!1,isInitial:!1,isModuleAsset:!0,name:(0,r.basename)(e),path:e}}),Array.from(t.files).reduce((e,r)=>{let n=t.name?t.name:null;return n=n?s.useEntryKeys&&!r.endsWith(".map")?n:`${n}.${((e,{transformExtensions:t})=>{let s=e.replace(/\?.*/,"").split("."),r=s.pop();return t.test(r)?`${s.pop()}.${r}`:r})(r,s)}`:r,e.concat({chunk:t,isAsset:!1,isChunk:!0,isInitial:t.isOnlyInitial(),isModuleAsset:!1,name:n,path:r})},e));let n=e=>{let t=Object.assign({},e);return t.name=e.name.replace(/\\/g,"/"),t.path=e.path.replace(/\\/g,"/"),t};t.transformFiles=(e,t)=>["filter","map","sort"].filter(e=>!!t[e]).reduce((e,s)=>e[s](t[s]),e).map(n)},"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.8/node_modules/rspack-manifest-plugin/dist/hooks.js"(e,t,s){t.getCompilerHooks=t.emitHook=t.beforeRunHook=void 0;let r=s("node:fs?31c0"),n=s("node:path?815c"),o=s("../../node_modules/.pnpm/@rspack+lite-tapable@1.1.2/node_modules/@rspack/lite-tapable/dist/index.cjs"),a=s("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.8/node_modules/rspack-manifest-plugin/dist/helpers.js"),i=new WeakMap,l=e=>{let t=i.get(e);return void 0===t&&(t={afterEmit:new o.SyncWaterfallHook(["manifest"]),beforeEmit:new o.SyncWaterfallHook(["manifest"])},i.set(e,t)),t};t.getCompilerHooks=l,t.beforeRunHook=({emitCountMap:e,manifestFileName:t},s,r)=>{let n=e.get(t)||0;e.set(t,n+1),r&&r()},t.emitHook=function({compiler:e,emitCountMap:t,manifestAssetId:s,manifestFileName:o,moduleAssets:i,options:p},c){let h=t.get(o)-1,u=c.getStats().toJson({all:!1,assets:!0,cachedAssets:!0,ids:!0,publicPath:!0}),g=null!==p.publicPath?p.publicPath:u.publicPath,f="auto"===g?"":g,{basePath:m,removeKeyHash:d}=p;t.set(o,h);let y={},k=Array.from(c.chunks).reduce((e,t)=>(0,a.reduceChunk)(e,t,p,y),[]);(k=(k=u.assets.reduce((e,t)=>(0,a.reduceAssets)(e,t,i),k)).filter(({name:s,path:r})=>!r.includes("hot-update")&&void 0===t.get((0,n.join)(e.options.output?.path||"<unknown>",s)))).forEach(e=>{delete y[e.path]}),Object.keys(y).forEach(e=>{k=k.concat(y[e])});let S={};u.assets?.forEach(e=>{e.integrity&&(S[e.name]=e.integrity)}),k=k.map(e=>{let t=e=>e.endsWith("/")?e:`${e}/`,s={name:m?t(m)+e.name:e.name,path:f?t(f)+e.path:e.path};return S[e.path]&&(s.integrity=S[e.path]),s.name=d?s.name.replace(d,""):s.name,Object.assign(e,s)}),k=(0,a.transformFiles)(k,p);let _=(0,a.generateManifest)(c,k,p),A=0===h;if(_=l(e).beforeEmit.call(_),A){let t=p.serialize(_);c.emitAsset(s,new e.webpack.sources.RawSource(t)),p.writeToFileEmit&&((0,r.mkdirSync)((0,n.dirname)(o),{recursive:!0}),(0,r.writeFileSync)(o,t))}l(e).afterEmit.call(_)}},"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.8/node_modules/rspack-manifest-plugin/dist/index.js"(e,t,s){t.RspackManifestPlugin=void 0;let r=s("node:path?815c"),n=s("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.8/node_modules/rspack-manifest-plugin/dist/hooks.js"),o=new Map,a={assetHookStage:1/0,basePath:"",fileName:"manifest.json",filter:null,generate:void 0,map:null,publicPath:null,removeKeyHash:/([a-f0-9]{16,32}\.?)/gi,seed:void 0,serialize:e=>JSON.stringify(e,null,2),sort:null,transformExtensions:/^(gz|map)$/i,useEntryKeys:!1,useLegacyEmit:!1,writeToFileEmit:!1};t.RspackManifestPlugin=class{options;constructor(e){this.options=Object.assign({},a,e)}apply(e){let t=(0,r.resolve)(e.options.output?.path||"./",this.options.fileName),s=(0,r.relative)(e.options.output?.path||"./",t),a=n.beforeRunHook.bind(this,{emitCountMap:o,manifestFileName:t}),i=n.emitHook.bind(this,{compiler:e,emitCountMap:o,manifestAssetId:s,manifestFileName:t,moduleAssets:{},options:this.options}),l={name:"WebpackManifestPlugin",stage:this.options.assetHookStage};!0===this.options.useLegacyEmit?e.hooks.emit.tap(l,i):e.hooks.thisCompilation.tap(l,e=>{e.hooks.processAssets.tap(l,()=>i(e))}),e.hooks.run.tapAsync(l,a),e.hooks.watchRun.tapAsync(l,a)}}},"../../node_modules/.pnpm/@rspack+lite-tapable@1.1.2/node_modules/@rspack/lite-tapable/dist/index.cjs"(e,t){var s={};s.d=(e,t,r)=>{var n=(t,r)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,[r]:t[n]})};n(t,"get"),n(r,"value")},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};function n(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}s.r(r);class o{intercept(e){if(this.interceptors.push(Object.assign({},e)),e.register)for(let t=0;t<this.taps.length;t++)this.taps[t]=e.register(this.taps[t])}_runRegisterInterceptors(e){return this.interceptors.reduce((e,t)=>t.register?.(e)??e,e)}_runCallInterceptors(...e){for(let t of this.interceptors)t.call&&t.call(...e)}_runErrorInterceptors(e){for(let t of this.interceptors)t.error&&t.error(e)}_runTapInterceptors(e){for(let t of this.interceptors)t.tap&&t.tap(e)}_runDoneInterceptors(){for(let e of this.interceptors)e.done&&e.done()}_runResultInterceptors(e){for(let t of this.interceptors)t.result&&t.result(e)}withOptions(e){let t=t=>Object.assign({},e,"string"==typeof t?{name:t}:t);return{name:this.name,tap:(e,s)=>this.tap(t(e),s),tapAsync:(e,s)=>this.tapAsync(t(e),s),tapPromise:(e,s)=>this.tapPromise(t(e),s),intercept:e=>this.intercept(e),isUsed:()=>this.isUsed(),withOptions:e=>this.withOptions(t(e)),queryStageRange:e=>this.queryStageRange(e)}}isUsed(){return this.taps.length>0||this.interceptors.length>0}queryStageRange(e){return new c(e,this)}callAsyncStageRange(e){throw Error("Hook should implement there own _callAsyncStageRange")}callAsync(...e){return this.callAsyncStageRange(this.queryStageRange(l),...e)}promiseStageRange(e,...t){return new Promise((s,r)=>{this.callAsyncStageRange(e,...t,(e,t)=>e?r(e):s(t))})}promise(...e){return this.promiseStageRange(this.queryStageRange(l),...e)}tap(e,t){this._tap("sync",e,t)}tapAsync(e,t){this._tap("async",e,t)}tapPromise(e,t){this._tap("promise",e,t)}_tap(e,t,s){let r=t;if("string"==typeof t)r={name:t.trim()};else if("object"!=typeof t||null===t)throw Error("Invalid tap options");if("string"!=typeof r.name||""===r.name)throw Error("Missing name for tap");this._insert(this._runRegisterInterceptors(Object.assign({type:e,fn:s},r)))}_insert(e){let t;"string"==typeof e.before?t=new Set([e.before]):Array.isArray(e.before)&&(t=new Set(e.before));let s=0;"number"==typeof e.stage&&(s=e.stage);let r=this.taps.length;for(;r>0;){r--;let e=this.taps[r];this.taps[r+1]=e;let n=e.stage||0;if(t){if(t.has(e.name)){t.delete(e.name);continue}if(t.size>0)continue}if(!(n>s)){r++;break}}this.taps[r]=e}_prepareArgs(e){let t=this.args.length;return e.length<t?(e.length=t,e.fill(void 0,e.length,t)):(e.length>t&&(e.length=t),e)}constructor(e=[],t){n(this,"args",void 0),n(this,"name",void 0),n(this,"taps",void 0),n(this,"interceptors",void 0),this.args=e,this.name=t,this.taps=[],this.interceptors=[]}}let a=-1/0,i=1/0,l=[a,1/0],p=0x80000000-1;class c{isUsed(){return!!(this.tapsInRange.length>0||this.stageRange[0]===a&&this.hook.interceptors.some(e=>e.call)||this.stageRange[1]===i&&this.hook.interceptors.some(e=>e.done))}call(...e){if("function"!=typeof this.hook.callStageRange)throw Error("hook is not a SyncHook, call methods only exists on SyncHook");return this.hook.callStageRange(this,...e)}callAsync(...e){return this.hook.callAsyncStageRange(this,...e)}promise(...e){return this.hook.promiseStageRange(this,...e)}constructor(e,t){n(this,"stageRange",void 0),n(this,"hook",void 0),n(this,"tapsInRange",void 0);let s=[],[r,o]=e;for(let e of t.taps){let t=e.stage??0;r<=t&&t<o?s.push(e):o===i&&t===i&&s.push(e)}this.stageRange=e,this.hook=t,this.tapsInRange=s}}class h extends o{callAsyncStageRange(e,...t){let{stageRange:[s,r],tapsInRange:n}=e,o=t.slice(0,t.length-1),l=t[t.length-1],p=this._prepareArgs(o);for(let e of(s===a&&this._runCallInterceptors(...p),n)){this._runTapInterceptors(e);try{e.fn(...p)}catch(e){return this._runErrorInterceptors(e),l(e)}}r===i&&(this._runDoneInterceptors(),l(null))}call(...e){return this.callStageRange(this.queryStageRange(l),...e)}callStageRange(e,...t){let s,r;if(this.callAsyncStageRange(e,...t,(e,t)=>{r=e,s=t}),r)throw r;return s}tapAsync(){throw Error("tapAsync is not supported on a SyncHook")}tapPromise(){throw Error("tapPromise is not supported on a SyncHook")}}class u extends o{callAsyncStageRange(e,...t){let{stageRange:[s,r],tapsInRange:n}=e,o=t.slice(0,t.length-1),l=t[t.length-1],p=this._prepareArgs(o);for(let e of(s===a&&this._runCallInterceptors(...p),n)){let t;this._runTapInterceptors(e);try{t=e.fn(...p)}catch(e){return this._runErrorInterceptors(e),l(e)}if(void 0!==t)return this._runResultInterceptors(t),l(null,t)}r===i&&(this._runDoneInterceptors(),l(null))}call(...e){return this.callStageRange(this.queryStageRange(l),...e)}callStageRange(e,...t){let s,r;if(this.callAsyncStageRange(e,...t,(e,t)=>{r=e,s=t}),r)throw r;return s}tapAsync(){throw Error("tapAsync is not supported on a SyncBailHook")}tapPromise(){throw Error("tapPromise is not supported on a SyncBailHook")}}class g extends o{callAsyncStageRange(e,...t){let{stageRange:[s,r],tapsInRange:n}=e,o=t.slice(0,t.length-1),l=t[t.length-1],p=this._prepareArgs(o);for(let e of(s===a&&this._runCallInterceptors(...p),n)){this._runTapInterceptors(e);try{let t=e.fn(...p);void 0!==t&&(p[0]=t)}catch(e){return this._runErrorInterceptors(e),l(e)}}r===i&&(this._runDoneInterceptors(),l(null,p[0]))}call(...e){return this.callStageRange(this.queryStageRange(l),...e)}callStageRange(e,...t){let s,r;if(this.callAsyncStageRange(e,...t,(e,t)=>{r=e,s=t}),r)throw r;return s}tapAsync(){throw Error("tapAsync is not supported on a SyncWaterfallHook")}tapPromise(){throw Error("tapPromise is not supported on a SyncWaterfallHook")}constructor(e=[],t){if(e.length<1)throw Error("Waterfall hooks must have at least one argument");super(e,t)}}class f extends o{callAsyncStageRange(e,...t){let{stageRange:[s],tapsInRange:r}=e,n=t.slice(0,t.length-1),o=t[t.length-1],i=this._prepareArgs(n);s===a&&this._runCallInterceptors(...i);let l=()=>{this._runDoneInterceptors(),o(null)},p=e=>{this._runErrorInterceptors(e),o(e)};if(0===r.length)return l();let c=r.length;for(let e of r){if(this._runTapInterceptors(e),"promise"===e.type){let t=e.fn(...i);if(!t||!t.then)throw Error(`Tap function (tapPromise) did not return promise (returned ${t})`);t.then(()=>{0==(c-=1)&&l()},e=>{c=0,p(e)})}else if("async"===e.type)e.fn(...i,e=>{e?(c=0,p(e)):0==(c-=1)&&l()});else{let t=!1;try{e.fn(...i)}catch(e){t=!0,c=0,p(e)}t||0!=--c||l()}if(c<=0)return}}}class m extends o{callAsyncStageRange(e,...t){let{stageRange:[s],tapsInRange:r}=e,n=t.slice(0,t.length-1),o=t[t.length-1],i=this._prepareArgs(n);s===a&&this._runCallInterceptors(...i);let l=()=>{this._runDoneInterceptors(),o(null)},p=e=>{this._runErrorInterceptors(e),o(e)};if(0===r.length)return l();let c=0,h=()=>{let e=r[c];if(this._runTapInterceptors(e),"promise"===e.type){let t=e.fn(...i);if(!t||!t.then)throw Error(`Tap function (tapPromise) did not return promise (returned ${t})`);t.then(()=>{(c+=1)===r.length?l():h()},e=>{c=r.length,p(e)})}else if("async"===e.type)e.fn(...i,e=>{e?(c=r.length,p(e)):(c+=1)===r.length?l():h()});else{let t=!1;try{e.fn(...i)}catch(e){t=!0,c=r.length,p(e)}t||((c+=1)===r.length?l():h())}if(c===r.length)return};h()}}class d extends o{callAsyncStageRange(e,...t){let{stageRange:[s],tapsInRange:r}=e,n=t.slice(0,t.length-1),o=t[t.length-1],i=this._prepareArgs(n);s===a&&this._runCallInterceptors(...i);let l=()=>{this._runDoneInterceptors(),o(null)},p=e=>{this._runErrorInterceptors(e),o(e)},c=e=>{this._runResultInterceptors(e),o(null,e)};if(0===r.length)return l();let h=0,u=()=>{let e=r[h];if(this._runTapInterceptors(e),"promise"===e.type){let t=e.fn(...i);if(!t||!t.then)throw Error(`Tap function (tapPromise) did not return promise (returned ${t})`);t.then(e=>{h+=1,void 0!==e?c(e):h===r.length?l():u()},e=>{h=r.length,p(e)})}else if("async"===e.type)e.fn(...i,(e,t)=>{e?(h=r.length,p(e)):(h+=1,void 0!==t?c(t):h===r.length?l():u())});else{let t,s=!1;try{t=e.fn(...i)}catch(e){s=!0,h=r.length,p(e)}s||(h+=1,void 0!==t?c(t):h===r.length?l():u())}if(h===r.length)return};u()}}class y extends o{callAsyncStageRange(e,...t){let{stageRange:[s],tapsInRange:r}=e,n=t.slice(0,t.length-1),o=t[t.length-1],i=this._prepareArgs(n);s===a&&this._runCallInterceptors(...i);let l=e=>{this._runResultInterceptors(e),o(null,e)},p=e=>{this._runErrorInterceptors(e),o(e)};if(0===r.length)return l(i[0]);let c=0,h=()=>{let e=r[c];if(this._runTapInterceptors(e),"promise"===e.type){let t=e.fn(...i);if(!t||!t.then)throw Error(`Tap function (tapPromise) did not return promise (returned ${t})`);t.then(e=>{c+=1,void 0!==e&&(i[0]=e),c===r.length?l(i[0]):h()},e=>{c=r.length,p(e)})}else if("async"===e.type)e.fn(...i,(e,t)=>{e?(c=r.length,p(e)):(c+=1,void 0!==t&&(i[0]=t),c===r.length?l(i[0]):h())});else{let t=!1;try{let t=e.fn(...i);void 0!==t&&(i[0]=t)}catch(e){t=!0,c=r.length,p(e)}t||((c+=1)===r.length?l(i[0]):h())}if(c===r.length)return};h()}constructor(e=[],t){if(e.length<1)throw Error("Waterfall hooks must have at least one argument");super(e,t)}}let k=(e,t)=>t;class S{get(e){return this._map.get(e)}for(e){let t=this.get(e);if(void 0!==t)return t;let s=this._factory(e),r=this._interceptors;for(let t=0;t<r.length;t++){let n=r[t].factory;n&&(s=n(e,s))}return this._map.set(e,s),s}intercept(e){this._interceptors.push(Object.assign({factory:k},e))}isUsed(){for(let e of this._map.keys()){let t=this.get(e);if(t?.isUsed())return!0}return!1}queryStageRange(e){return new _(e,this)}constructor(e,t){n(this,"_map",new Map),n(this,"_factory",void 0),n(this,"name",void 0),n(this,"_interceptors",void 0),this.name=t,this._factory=e,this._interceptors=[]}}class _{get(e){return this.hookMap.get(e)?.queryStageRange(this.stageRange)}for(e){return this.hookMap.for(e).queryStageRange(this.stageRange)}isUsed(){for(let e of this.hookMap._map.keys())if(this.get(e)?.isUsed())return!0;return!1}constructor(e,t){n(this,"stageRange",void 0),n(this,"hookMap",void 0),this.stageRange=e,this.hookMap=t}}class A{tap(e,t){for(let s of this.hooks)s.tap(e,t)}tapAsync(e,t){for(let s of this.hooks)s.tapAsync(e,t)}tapPromise(e,t){for(let s of this.hooks)s.tapPromise(e,t)}isUsed(){for(let e of this.hooks)if(e.isUsed())return!0;return!1}intercept(e){for(let t of this.hooks)t.intercept(e)}withOptions(e){return new A(this.hooks.map(t=>t.withOptions(e)),this.name)}constructor(e,t){n(this,"hooks",void 0),n(this,"name",void 0),this.hooks=e,this.name=t}}for(var H in s.d(r,{AsyncParallelHook:()=>f,AsyncSeriesBailHook:()=>d,AsyncSeriesHook:()=>m,AsyncSeriesWaterfallHook:()=>y,HookBase:()=>o,HookMap:()=>S,MultiHook:()=>A,QueriedHook:()=>c,QueriedHookMap:()=>_,SyncBailHook:()=>u,SyncHook:()=>h,SyncWaterfallHook:()=>g},{maxStage:i,minStage:a,safeStage:e=>e<-0x80000000?-0x80000000:e>p?p:e}),t.AsyncParallelHook=r.AsyncParallelHook,t.AsyncSeriesBailHook=r.AsyncSeriesBailHook,t.AsyncSeriesHook=r.AsyncSeriesHook,t.AsyncSeriesWaterfallHook=r.AsyncSeriesWaterfallHook,t.HookBase=r.HookBase,t.HookMap=r.HookMap,t.MultiHook=r.MultiHook,t.QueriedHook=r.QueriedHook,t.QueriedHookMap=r.QueriedHookMap,t.SyncBailHook=r.SyncBailHook,t.SyncHook=r.SyncHook,t.SyncWaterfallHook=r.SyncWaterfallHook,t.maxStage=r.maxStage,t.minStage=r.minStage,t.safeStage=r.safeStage,r)-1===["AsyncParallelHook","AsyncSeriesBailHook","AsyncSeriesHook","AsyncSeriesWaterfallHook","HookBase","HookMap","MultiHook","QueriedHook","QueriedHookMap","SyncBailHook","SyncHook","SyncWaterfallHook","maxStage","minStage","safeStage"].indexOf(H)&&(t[H]=r[H]);Object.defineProperty(t,"__esModule",{value:!0})}});var t=e("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.8/node_modules/rspack-manifest-plugin/dist/index.js").RspackManifestPlugin;export{t as RspackManifestPlugin};
|
package/dist/server/helper.d.ts
CHANGED
|
@@ -31,11 +31,13 @@ export declare const getRoutes: (context: InternalContext) => Routes;
|
|
|
31
31
|
/*
|
|
32
32
|
* format route by entry and adjust the index route to be the first
|
|
33
33
|
*/ export declare const formatRoutes: (entry: RsbuildEntry, base: string, distPathPrefix: string | undefined, outputStructure: OutputStructure | undefined) => Routes;
|
|
34
|
+
type AddressUrl = {
|
|
35
|
+
label: string;
|
|
36
|
+
name?: string;
|
|
37
|
+
url: string;
|
|
38
|
+
};
|
|
34
39
|
export declare function printServerURLs({ urls: originalUrls, port, routes, protocol, printUrls, fallbackPathname, showAllRoutes, cliShortcutsEnabled, originalConfig, logger }: {
|
|
35
|
-
urls:
|
|
36
|
-
url: string;
|
|
37
|
-
label: string;
|
|
38
|
-
}[];
|
|
40
|
+
urls: AddressUrl[];
|
|
39
41
|
port: number;
|
|
40
42
|
routes: Routes;
|
|
41
43
|
protocol: string;
|
|
@@ -64,10 +66,6 @@ export declare const resolvePort: (config: NormalizedConfig) => Promise<{
|
|
|
64
66
|
}>;
|
|
65
67
|
export declare const isWildcardHost: (host: string) => boolean;
|
|
66
68
|
export declare const getHostInUrl: (host: string) => Promise<string>;
|
|
67
|
-
type AddressUrl = {
|
|
68
|
-
label: string;
|
|
69
|
-
url: string;
|
|
70
|
-
};
|
|
71
69
|
export declare const getAddressUrls: ({ protocol, port, host }: {
|
|
72
70
|
protocol: string;
|
|
73
71
|
port: number;
|
package/dist/types/context.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export type ActionType = 'dev' | 'build' | 'preview';
|
|
|
24
24
|
* import { createRsbuild } from '@rsbuild/core';
|
|
25
25
|
*
|
|
26
26
|
* async function main() {
|
|
27
|
-
* const rsbuild = createRsbuild({
|
|
27
|
+
* const rsbuild = await createRsbuild({
|
|
28
28
|
* // ...
|
|
29
29
|
* });
|
|
30
30
|
* await rsbuild.startDevServer();
|
package/dist/types/hooks.d.ts
CHANGED
|
@@ -204,8 +204,8 @@ export type EnvironmentContext = {
|
|
|
204
204
|
*/ manifest?: Record<string, unknown> | ManifestData;
|
|
205
205
|
/**
|
|
206
206
|
* WebSocket authentication token, used to authenticate WebSocket connections and
|
|
207
|
-
* prevent unauthorized access.
|
|
208
|
-
* an empty string
|
|
207
|
+
* prevent unauthorized access. It contains a token when running the `dev` action
|
|
208
|
+
* and is an empty string for other actions.
|
|
209
209
|
*/ webSocketToken: string;
|
|
210
210
|
};
|
|
211
211
|
export type ModifyChainUtils = {
|
package/dist/types/rsbuild.d.ts
CHANGED
|
@@ -52,8 +52,9 @@ export type InitConfigsOptions = Pick<RsbuildContext, 'action'>;
|
|
|
52
52
|
export type InspectConfigOptions = {
|
|
53
53
|
/**
|
|
54
54
|
* Inspect the config in the specified mode.
|
|
55
|
-
* Available options: 'development' or '
|
|
56
|
-
* @default 'development'
|
|
55
|
+
* Available options: 'development', 'production', or 'none'.
|
|
56
|
+
* @default Inferred from `process.env.NODE_ENV`: 'development' when unset,
|
|
57
|
+
* 'development' or 'production' when matching, otherwise 'none'.
|
|
57
58
|
*/ mode?: RsbuildMode;
|
|
58
59
|
/**
|
|
59
60
|
* Enables verbose mode to display the complete function
|
|
@@ -62,7 +63,7 @@ export type InspectConfigOptions = {
|
|
|
62
63
|
*/ verbose?: boolean;
|
|
63
64
|
/**
|
|
64
65
|
* Specify the output path for inspection results.
|
|
65
|
-
* @default '
|
|
66
|
+
* @default '<context.distPath>/.rsbuild'
|
|
66
67
|
*/ outputPath?: string;
|
|
67
68
|
/**
|
|
68
69
|
* Whether to write the inspection results to disk.
|
package/package.json
CHANGED
|
@@ -1,29 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.10",
|
|
4
4
|
"description": "The Rspack-based build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.rs",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/web-infra-dev/rsbuild/issues"
|
|
8
8
|
},
|
|
9
|
-
"license": "MIT",
|
|
10
9
|
"repository": {
|
|
11
10
|
"type": "git",
|
|
12
11
|
"url": "https://github.com/web-infra-dev/rsbuild",
|
|
13
12
|
"directory": "packages/core"
|
|
14
13
|
},
|
|
15
|
-
"
|
|
16
|
-
"rsbuild": "./bin/rsbuild.js"
|
|
17
|
-
},
|
|
18
|
-
"files": [
|
|
19
|
-
"bin",
|
|
20
|
-
"dist",
|
|
21
|
-
"static",
|
|
22
|
-
"compiled",
|
|
23
|
-
"types.d.ts"
|
|
24
|
-
],
|
|
14
|
+
"license": "MIT",
|
|
25
15
|
"type": "module",
|
|
26
|
-
"types": "./dist/index.d.ts",
|
|
27
16
|
"exports": {
|
|
28
17
|
".": {
|
|
29
18
|
"types": "./dist/index.d.ts",
|
|
@@ -34,12 +23,19 @@
|
|
|
34
23
|
},
|
|
35
24
|
"./package.json": "./package.json"
|
|
36
25
|
},
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
"
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"bin": {
|
|
28
|
+
"rsbuild": "./bin/rsbuild.js"
|
|
40
29
|
},
|
|
30
|
+
"files": [
|
|
31
|
+
"bin",
|
|
32
|
+
"dist",
|
|
33
|
+
"static",
|
|
34
|
+
"compiled",
|
|
35
|
+
"types.d.ts"
|
|
36
|
+
],
|
|
41
37
|
"dependencies": {
|
|
42
|
-
"@rspack/core": "~2.1.
|
|
38
|
+
"@rspack/core": "~2.1.8",
|
|
43
39
|
"@swc/helpers": "^0.5.23"
|
|
44
40
|
},
|
|
45
41
|
"devDependencies": {
|
|
@@ -69,14 +65,14 @@
|
|
|
69
65
|
"mrmime": "^2.0.1",
|
|
70
66
|
"on-finished": "2.4.1",
|
|
71
67
|
"open": "^11.0.0",
|
|
72
|
-
"postcss": "^8.5.
|
|
68
|
+
"postcss": "^8.5.25",
|
|
73
69
|
"postcss-load-config": "6.0.1",
|
|
74
70
|
"postcss-loader": "8.2.1",
|
|
75
71
|
"prebundle": "1.6.5",
|
|
76
72
|
"range-parser": "^1.3.0",
|
|
77
73
|
"reduce-configs": "^2.0.1",
|
|
78
74
|
"rslog": "^2.3.0",
|
|
79
|
-
"rspack-chain": "^2.1.
|
|
75
|
+
"rspack-chain": "^2.1.2",
|
|
80
76
|
"rspack-manifest-plugin": "5.2.2",
|
|
81
77
|
"rspack-merge": "1.0.1",
|
|
82
78
|
"sirv": "^3.0.2",
|
|
@@ -97,6 +93,10 @@
|
|
|
97
93
|
"engines": {
|
|
98
94
|
"node": "^20.19.0 || >=22.12.0"
|
|
99
95
|
},
|
|
96
|
+
"publishConfig": {
|
|
97
|
+
"access": "public",
|
|
98
|
+
"registry": "https://registry.npmjs.org/"
|
|
99
|
+
},
|
|
100
100
|
"scripts": {
|
|
101
101
|
"build": "rs lib",
|
|
102
102
|
"dev": "rs lib -w",
|