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