webpack-code-inspector-plugin
Advanced tools
Comparing version
@@ -1,1 +0,1 @@ | ||
(function(n,s){typeof exports=="object"&&typeof module!="undefined"?module.exports=s(require("code-inspector-core"),require("path")):typeof define=="function"&&define.amd?define(["code-inspector-core","path"],s):(n=typeof globalThis!="undefined"?globalThis:n||self,n.WebpackCodeInspectorPlugin=s(n.codeInspectorCore,n.path))})(this,function(n,s){"use strict";var $=Object.defineProperty,L=Object.defineProperties;var m=Object.getOwnPropertyDescriptors;var T=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var W=(n,s,r)=>s in n?$(n,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[s]=r,j=(n,s)=>{for(var r in s||(s={}))D.call(s,r)&&W(n,r,s[r]);if(T)for(var r of T(s))E.call(s,r)&&W(n,r,s[r]);return n},k=(n,s)=>L(n,m(s));var x=(n,s,r)=>new Promise((P,v)=>{var l=a=>{try{b(r.next(a))}catch(g){v(g)}},A=a=>{try{b(r.throw(a))}catch(g){v(g)}},b=a=>a.done?P(a.value):Promise.resolve(a.value).then(l,A);b((r=r.apply(n,s)).next())});function r(t,e){return x(this,null,function*(){if(!t||!e)return[];const o=typeof t=="function"?yield t():t;let i=[];if(typeof o=="object"&&!Array.isArray(o))for(const d in o){const u=o[d],f=u.import||u;P(i,f,e)}else P(i,o,e);return i.filter(d=>!!d)})}function P(t,e,o){typeof e=="string"?t.push(v(e,o)):Array.isArray(e)&&t.push(...e.map(i=>v(i,o)))}function v(t,e){return s.isAbsolute(t)?n.normalizePath(t):t.startsWith(".")?s.resolve(e,n.normalizePath(t)):""}let l="";typeof __dirname!="undefined"?l=__dirname:l=s.dirname(n.fileURLToPath(typeof document=="undefined"&&typeof location=="undefined"?require("url").pathToFileURL(__filename).href:typeof document=="undefined"?location.href:document.currentScript&&document.currentScript.src||new URL("index.umd.js",document.baseURI).href));let A=!0;const b=(t,e)=>{var h,c;if(!A)return;A=!1;const o=(e==null?void 0:e.compiler)||e,i=(h=o==null?void 0:o.options)==null?void 0:h.module,d=(i==null?void 0:i.rules)||(i==null?void 0:i.loaders)||[];let u=t.include||[];Array.isArray(u)||(u=[u]);let f=t.exclude||[];Array.isArray(f)||(f=[f]),d.push(j({test:(c=t.match)!=null?c:/\.(vue|jsx|tsx|js|ts|mjs|mts)$/,exclude:[...f,/node_modules/],use:[{loader:s.resolve(l,"./loader.js"),options:t}]},t.enforcePre===!1?{}:{enforce:"pre"}),...u.map(y=>j({resource:{and:[y,/\.(vue|jsx|tsx|js|ts|mjs|mts)$/]},use:[{loader:s.resolve(l,"./loader.js"),options:t}]},t.enforcePre===!1?{}:{enforce:"pre"})),k(j({},t.injectTo?{resource:t.injectTo}:{test:/\.(jsx|tsx|js|ts|mjs|mts)$/,exclude:/node_modules/}),{use:[{loader:s.resolve(l,"./inject-loader.js"),options:t}],enforce:"post"}))};function a(t,e){return n.getCodeWithWebComponent({options:k(j({},t),{importClient:"code"}),file:"main.js",code:"",record:e,inject:!0})}function g(i){return x(this,arguments,function*({options:t,record:e,assets:o}){const d=Object.keys(o).filter(u=>/\.html$/.test(u));if(d.length){const u=yield a(t,e);d.forEach(f=>{var c,y;const h=(y=(c=o[f])==null?void 0:c.source)==null?void 0:y.call(c);if(typeof h=="string"){const p=h.replace("<head>",'<head><script type="module">\n'.concat(u,"\n<\/script>"));o[f]={source:()=>p,size:()=>p.length}}})}})}class w{constructor(e){this.options=e}apply(e){return x(this,null,function*(){var i,d,u,f,h,c;if(A=!0,this.options.close||!n.isDev(this.options.dev,((i=e==null?void 0:e.options)==null?void 0:i.mode)==="development"||process.env.NODE_ENV==="development"))return;const o={port:0,entry:"",output:this.options.output,inputs:r((d=e==null?void 0:e.options)==null?void 0:d.entry,(u=e==null?void 0:e.options)==null?void 0:u.context)};if(((h=(f=e==null?void 0:e.options)==null?void 0:f.cache)==null?void 0:h.type)==="filesystem"&&(this.options.cache?a(this.options,o):e.options.cache.version="code-inspector-".concat(Date.now())),b(k(j({},this.options),{record:o}),e),(c=e==null?void 0:e.hooks)!=null&&c.emit){const y=this.options;e.hooks.emit.tapAsync("WebpackCodeInspectorPlugin",(p,C)=>x(this,null,function*(){let _={};p.getAssets?_=yield p.getAssets():_=p.assets,yield g({options:y,record:o,assets:_}),C()}))}})}}return w}); | ||
(function(n,s){typeof exports=="object"&&typeof module!="undefined"?module.exports=s(require("code-inspector-core"),require("path")):typeof define=="function"&&define.amd?define(["code-inspector-core","path"],s):(n=typeof globalThis!="undefined"?globalThis:n||self,n.WebpackCodeInspectorPlugin=s(n.codeInspectorCore,n.path))})(this,function(n,s){"use strict";var S=Object.defineProperty,U=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var $=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var L=(n,s,r)=>s in n?S(n,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[s]=r,p=(n,s)=>{for(var r in s||(s={}))z.call(s,r)&&L(n,r,s[r]);if($)for(var r of $(s))O.call(s,r)&&L(n,r,s[r]);return n},P=(n,s)=>U(n,q(s));var g=(n,s,r)=>new Promise((k,j)=>{var y=f=>{try{A(r.next(f))}catch(b){j(b)}},v=f=>{try{A(r.throw(f))}catch(b){j(b)}},A=f=>f.done?k(f.value):Promise.resolve(f.value).then(y,v);A((r=r.apply(n,s)).next())});function r(t,e){return g(this,null,function*(){if(!t||!e)return[];const o=typeof t=="function"?yield t():t;let i=[];if(typeof o=="object"&&!Array.isArray(o))for(const c in o){const u=o[c],a=u.import||u;k(i,a,e)}else k(i,o,e);return i.filter(c=>!!c)})}function k(t,e,o){typeof e=="string"?t.push(j(e,o)):Array.isArray(e)&&t.push(...e.map(i=>j(i,o)))}function j(t,e){return s.isAbsolute(t)?n.normalizePath(t):t.startsWith(".")?s.resolve(e,n.normalizePath(t)):""}let y="";typeof __dirname!="undefined"?y=__dirname:y=s.dirname(n.fileURLToPath(typeof document=="undefined"&&typeof location=="undefined"?require("url").pathToFileURL(__filename).href:typeof document=="undefined"?location.href:document.currentScript&&document.currentScript.src||new URL("index.umd.js",document.baseURI).href));let v=!0;const A=(t,e)=>{var h,d;if(!v)return;v=!1;const o=(e==null?void 0:e.compiler)||e,i=(h=o==null?void 0:o.options)==null?void 0:h.module,c=(i==null?void 0:i.rules)||(i==null?void 0:i.loaders)||[];let u=t.include||[];Array.isArray(u)||(u=[u]);let a=t.exclude||[];Array.isArray(a)||(a=[a]),c.push(p({test:(d=t.match)!=null?d:/\.(vue|jsx|tsx|js|ts|mjs|mts)$/,exclude:[...a,/node_modules/],use:[{loader:s.resolve(y,"./loader.js"),options:t}]},t.enforcePre===!1?{}:{enforce:"pre"}),...u.map(l=>p({resource:{and:[l,/\.(vue|jsx|tsx|js|ts|mjs|mts)$/]},use:[{loader:s.resolve(y,"./loader.js"),options:t}]},t.enforcePre===!1?{}:{enforce:"pre"})),P(p({},t.injectTo?{resource:t.injectTo}:{test:/\.(jsx|tsx|js|ts|mjs|mts)$/,exclude:/node_modules/}),{use:[{loader:s.resolve(y,"./inject-loader.js"),options:t}],enforce:"post"}))};function f(t,e){return n.getCodeWithWebComponent({options:P(p({},t),{importClient:"code"}),file:"main.js",code:"",record:e,inject:!0})}function b(i){return g(this,arguments,function*({options:t,record:e,assets:o}){const c=Object.keys(o).filter(u=>/\.html$/.test(u));if(c.length){const u=yield f(t,e);c.forEach(a=>{var d,l;const h=(l=(d=o[a])==null?void 0:d.source)==null?void 0:l.call(d);if(typeof h=="string"){const x=h.replace("<head>",'<head><script type="module">\n'.concat(u,"\n<\/script>"));o[a]={source:()=>x,size:()=>x.length}}})}})}class R{constructor(e){this.options=e}apply(e){return g(this,null,function*(){var u,a,h,d,l,x,W,T,w;if(v=!0,this.options.close||!n.isDev(this.options.dev,((u=e==null?void 0:e.options)==null?void 0:u.mode)==="development"||process.env.NODE_ENV==="development"))return;const o={port:0,entry:"",output:this.options.output,inputs:r((a=e==null?void 0:e.options)==null?void 0:a.entry,(h=e==null?void 0:e.options)==null?void 0:h.context)},i=((l=(d=e==null?void 0:e.options)==null?void 0:d.cache)==null?void 0:l.type)==="filesystem",c=((T=(W=(x=e==null?void 0:e.options)==null?void 0:x.experiments)==null?void 0:W.cache)==null?void 0:T.type)==="persistent";if((i||c)&&(this.options.cache?f(this.options,o):e.options.cache.version="code-inspector-".concat(Date.now())),A(P(p({},this.options),{record:o}),e),(w=e==null?void 0:e.hooks)!=null&&w.emit){const D=this.options;e.hooks.emit.tapAsync("WebpackCodeInspectorPlugin",(_,E)=>g(this,null,function*(){let C={};_.getAssets?C=yield _.getAssets():C=_.assets,yield b({options:D,record:o,assets:C}),E()}))}})}}return R}); |
{ | ||
"name": "webpack-code-inspector-plugin", | ||
"version": "0.20.6", | ||
"version": "0.20.7", | ||
"main": "./dist/index.umd.js", | ||
@@ -41,3 +41,3 @@ "module": "./dist/index.mjs", | ||
"dependencies": { | ||
"code-inspector-core": "0.20.6" | ||
"code-inspector-core": "0.20.7" | ||
}, | ||
@@ -44,0 +44,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
24773
1.31%+ Added
- Removed
Updated