🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@code-inspector/webpack

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@code-inspector/webpack - npm Package Compare versions

Comparing version
1.6.5
to
1.6.6
+1
-1
dist/index.mjs

@@ -210,3 +210,3 @@ var V = Object.defineProperty, S = Object.defineProperties;

}, n = ((c = s == null ? void 0 : s.options) == null ? void 0 : c.cache) || ((T = (u = s == null ? void 0 : s.options) == null ? void 0 : u.experiments) == null ? void 0 : T.cache);
if ((n == null ? void 0 : n.type) === "filesystem" && (this.options.cache ? (t.port = this.options.port || ((b = Q(t)) == null ? void 0 : b.previousPort) || 0, I(this.options, t, !0)) : n.version = "code-inspector-".concat(Date.now())), this.options.vueLoader === "internal" && X(this.options, s), Z(g(p({}, this.options), { record: t }), s), (P = s == null ? void 0 : s.hooks) != null && P.emit && !((O = (y = this.options.skipSnippets) == null ? void 0 : y.includes) != null && O.call(y, "htmlScript"))) {
if (((n == null ? void 0 : n.type) === "filesystem" || (n == null ? void 0 : n.type) === "persistent") && (this.options.cache ? (t.port = this.options.port || ((b = Q(t)) == null ? void 0 : b.previousPort) || 0, I(this.options, t, !0)) : n.version = "code-inspector-".concat(Date.now())), this.options.vueLoader === "internal" && X(this.options, s), Z(g(p({}, this.options), { record: t }), s), (P = s == null ? void 0 : s.hooks) != null && P.emit && !((O = (y = this.options.skipSnippets) == null ? void 0 : y.includes) != null && O.call(y, "htmlScript"))) {
const W = this.options;

@@ -213,0 +213,0 @@ s.hooks.emit.tapAsync(

@@ -1,1 +0,1 @@

(function(o,r){typeof exports=="object"&&typeof module!="undefined"?module.exports=r(require("@code-inspector/core"),require("path"),require("url")):typeof define=="function"&&define.amd?define(["@code-inspector/core","path","url"],r):(o=typeof globalThis!="undefined"?globalThis:o||self,o.WebpackCodeInspectorPlugin=r(o.core,o.path,o.url))})(this,function(o,r,u){"use strict";var G=Object.defineProperty,J=Object.defineProperties;var K=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var M=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable;var D=(o,r,u)=>r in o?G(o,r,{enumerable:!0,configurable:!0,writable:!0,value:u}):o[r]=u,l=(o,r)=>{for(var u in r||(r={}))M.call(r,u)&&D(o,u,r[u]);if(S)for(var u of S(r))X.call(r,u)&&D(o,u,r[u]);return o},O=(o,r)=>J(o,K(r));var T=(o,r,u)=>new Promise((v,A)=>{var P=d=>{try{y(u.next(d))}catch(j){A(j)}},b=d=>{try{y(u.throw(d))}catch(j){A(j)}},y=d=>d.done?v(d.value):Promise.resolve(d.value).then(P,b);y((u=u.apply(o,r)).next())});var v=typeof document!="undefined"?document.currentScript:null;function A(t,e){return T(this,null,function*(){if(!t||!e)return[];const s=typeof t=="function"?yield t():t;let i=[];if(typeof s=="object"&&!Array.isArray(s))for(const n in s){const a=s[n],f=a.import||a;P(i,f,e)}else P(i,s,e);return i.filter(n=>!!n)})}function P(t,e,s){typeof e=="string"?t.push(b(e,s)):Array.isArray(e)&&t.push(...e.map(i=>b(i,s)))}function b(t,e){return r.isAbsolute(t)?o.normalizePath(t):t.startsWith(".")?r.resolve(e,o.normalizePath(t)):""}const y=r.dirname(u.fileURLToPath(typeof document=="undefined"&&typeof location=="undefined"?require("url").pathToFileURL(__filename).href:typeof document=="undefined"?location.href:v&&v.src||new URL("index.umd.js",document.baseURI).href)),d=r.resolve(y,"./loader.js"),j=r.resolve(y,"./inject-loader.js"),L=Symbol.for("code-inspector.vueNodeTransform");function U(t){return Array.isArray(t.use)?t.use:t.loader?[t]:[]}function k(t,e){t.forEach(s=>{s&&(e(s),Array.isArray(s.rules)&&k(s.rules,e),Array.isArray(s.oneOf)&&k(s.oneOf,e))})}function I(t){var i;const e=(t==null?void 0:t.compiler)||t,s=(i=e==null?void 0:e.options)==null?void 0:i.module;return(s==null?void 0:s.rules)||(s==null?void 0:s.loaders)||[]}function V(t){return/(^|[\\/])vue-loader([\\/]|$)/.test(t)}function _(t,e){const s=I(e);k(s,i=>{U(i).forEach(n=>{const a=typeof n=="string"?n:n==null?void 0:n.loader;if(typeof a!="string"||!V(a)||typeof n=="string")return;(!n.options||typeof n.options!="object")&&(n.options={});const f=n.options;(!f.compilerOptions||typeof f.compilerOptions!="object")&&(f.compilerOptions={});const h=f.compilerOptions;Array.isArray(h.nodeTransforms)||(h.nodeTransforms=[]);const p=h.nodeTransforms;if(!p.some(c=>c==null?void 0:c[L])){const c=o.createVueInspectorNodeTransform({escapeTags:t.escapeTags,mappings:t.mappings,pathType:t.pathType});Object.defineProperty(c,L,{value:!0}),p.push(c)}})})}function q(t){return t.some(e=>{var s,i;return(i=(s=e==null?void 0:e.use)==null?void 0:s.some)==null?void 0:i.call(s,n=>(n==null?void 0:n.loader)===d||(n==null?void 0:n.loader)===j)})}const z=(t,e)=>{var i;const s=I(e);q(s)||s.push(l({test:(i=t.match)!=null?i:/\.html$/,resourceQuery:/vue/,use:[{loader:d,options:t}]},t.enforcePre===!1?{}:{enforce:"pre"}),l({test:/\.(vue|jsx|tsx|js|ts|mjs|mts|svelte)$/,use:[{loader:d,options:t}]},t.enforcePre===!1?{}:{enforce:"pre"}),O(l({},t.injectTo?{resource:t.injectTo}:{test:/\.(jsx|tsx|js|ts|mjs|mts)$/,exclude:/node_modules/}),{use:[{loader:j,options:t}],enforce:o.isNextjsProject()?"pre":"post"}))};function w(t,e,s){return o.getCodeWithWebComponent({options:O(l({},t),{importClient:"code"}),file:"main.js",code:"",record:e,inject:!0,server:s})}function F(i){return T(this,arguments,function*({options:t,record:e,assets:s}){const n=Object.keys(s).filter(a=>/\.html$/.test(a));if(n.length){const a=yield w(t,e);n.forEach(f=>{var p,g;const h=(g=(p=s[f])==null?void 0:p.source)==null?void 0:g.call(p);if(typeof h=="string"){const c=h.replace("<head>",'<head><script type="module">\n'.concat(a,"\n<\/script>"));s[f]={source:()=>c,size:()=>c.length}}})}})}class H{constructor(e){this.options=e}apply(e){return T(this,null,function*(){var n,a,f,h,p,g,c,N,W,$,C,E;if(this.options.close||!o.isDev(this.options.dev,((n=e==null?void 0:e.options)==null?void 0:n.mode)==="development"||process.env.NODE_ENV==="development"))return;const s={port:0,entry:"",output:this.options.output,inputs:A((a=e==null?void 0:e.options)==null?void 0:a.entry,(f=e==null?void 0:e.options)==null?void 0:f.context),envDir:(h=e==null?void 0:e.options)==null?void 0:h.context,root:(p=e==null?void 0:e.options)==null?void 0:p.context},i=((g=e==null?void 0:e.options)==null?void 0:g.cache)||((N=(c=e==null?void 0:e.options)==null?void 0:c.experiments)==null?void 0:N.cache);if((i==null?void 0:i.type)==="filesystem"&&(this.options.cache?(s.port=this.options.port||((W=o.getProjectRecord(s))==null?void 0:W.previousPort)||0,w(this.options,s,!0)):i.version="code-inspector-".concat(Date.now())),this.options.vueLoader==="internal"&&_(this.options,e),z(O(l({},this.options),{record:s}),e),($=e==null?void 0:e.hooks)!=null&&$.emit&&!((E=(C=this.options.skipSnippets)==null?void 0:C.includes)!=null&&E.call(C,"htmlScript"))){const Q=this.options;e.hooks.emit.tapAsync("WebpackCodeInspectorPlugin",(x,B)=>T(this,null,function*(){let R={};x.getAssets?R=yield x.getAssets():R=x.assets,yield F({options:Q,record:s,assets:R}),B()}))}})}}return H});
(function(o,r){typeof exports=="object"&&typeof module!="undefined"?module.exports=r(require("@code-inspector/core"),require("path"),require("url")):typeof define=="function"&&define.amd?define(["@code-inspector/core","path","url"],r):(o=typeof globalThis!="undefined"?globalThis:o||self,o.WebpackCodeInspectorPlugin=r(o.core,o.path,o.url))})(this,function(o,r,u){"use strict";var G=Object.defineProperty,J=Object.defineProperties;var K=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var M=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable;var D=(o,r,u)=>r in o?G(o,r,{enumerable:!0,configurable:!0,writable:!0,value:u}):o[r]=u,l=(o,r)=>{for(var u in r||(r={}))M.call(r,u)&&D(o,u,r[u]);if(S)for(var u of S(r))X.call(r,u)&&D(o,u,r[u]);return o},O=(o,r)=>J(o,K(r));var T=(o,r,u)=>new Promise((v,A)=>{var P=c=>{try{y(u.next(c))}catch(j){A(j)}},b=c=>{try{y(u.throw(c))}catch(j){A(j)}},y=c=>c.done?v(c.value):Promise.resolve(c.value).then(P,b);y((u=u.apply(o,r)).next())});var v=typeof document!="undefined"?document.currentScript:null;function A(t,e){return T(this,null,function*(){if(!t||!e)return[];const s=typeof t=="function"?yield t():t;let i=[];if(typeof s=="object"&&!Array.isArray(s))for(const n in s){const a=s[n],f=a.import||a;P(i,f,e)}else P(i,s,e);return i.filter(n=>!!n)})}function P(t,e,s){typeof e=="string"?t.push(b(e,s)):Array.isArray(e)&&t.push(...e.map(i=>b(i,s)))}function b(t,e){return r.isAbsolute(t)?o.normalizePath(t):t.startsWith(".")?r.resolve(e,o.normalizePath(t)):""}const y=r.dirname(u.fileURLToPath(typeof document=="undefined"&&typeof location=="undefined"?require("url").pathToFileURL(__filename).href:typeof document=="undefined"?location.href:v&&v.src||new URL("index.umd.js",document.baseURI).href)),c=r.resolve(y,"./loader.js"),j=r.resolve(y,"./inject-loader.js"),L=Symbol.for("code-inspector.vueNodeTransform");function U(t){return Array.isArray(t.use)?t.use:t.loader?[t]:[]}function k(t,e){t.forEach(s=>{s&&(e(s),Array.isArray(s.rules)&&k(s.rules,e),Array.isArray(s.oneOf)&&k(s.oneOf,e))})}function I(t){var i;const e=(t==null?void 0:t.compiler)||t,s=(i=e==null?void 0:e.options)==null?void 0:i.module;return(s==null?void 0:s.rules)||(s==null?void 0:s.loaders)||[]}function V(t){return/(^|[\\/])vue-loader([\\/]|$)/.test(t)}function _(t,e){const s=I(e);k(s,i=>{U(i).forEach(n=>{const a=typeof n=="string"?n:n==null?void 0:n.loader;if(typeof a!="string"||!V(a)||typeof n=="string")return;(!n.options||typeof n.options!="object")&&(n.options={});const f=n.options;(!f.compilerOptions||typeof f.compilerOptions!="object")&&(f.compilerOptions={});const h=f.compilerOptions;Array.isArray(h.nodeTransforms)||(h.nodeTransforms=[]);const p=h.nodeTransforms;if(!p.some(d=>d==null?void 0:d[L])){const d=o.createVueInspectorNodeTransform({escapeTags:t.escapeTags,mappings:t.mappings,pathType:t.pathType});Object.defineProperty(d,L,{value:!0}),p.push(d)}})})}function q(t){return t.some(e=>{var s,i;return(i=(s=e==null?void 0:e.use)==null?void 0:s.some)==null?void 0:i.call(s,n=>(n==null?void 0:n.loader)===c||(n==null?void 0:n.loader)===j)})}const z=(t,e)=>{var i;const s=I(e);q(s)||s.push(l({test:(i=t.match)!=null?i:/\.html$/,resourceQuery:/vue/,use:[{loader:c,options:t}]},t.enforcePre===!1?{}:{enforce:"pre"}),l({test:/\.(vue|jsx|tsx|js|ts|mjs|mts|svelte)$/,use:[{loader:c,options:t}]},t.enforcePre===!1?{}:{enforce:"pre"}),O(l({},t.injectTo?{resource:t.injectTo}:{test:/\.(jsx|tsx|js|ts|mjs|mts)$/,exclude:/node_modules/}),{use:[{loader:j,options:t}],enforce:o.isNextjsProject()?"pre":"post"}))};function w(t,e,s){return o.getCodeWithWebComponent({options:O(l({},t),{importClient:"code"}),file:"main.js",code:"",record:e,inject:!0,server:s})}function F(i){return T(this,arguments,function*({options:t,record:e,assets:s}){const n=Object.keys(s).filter(a=>/\.html$/.test(a));if(n.length){const a=yield w(t,e);n.forEach(f=>{var p,g;const h=(g=(p=s[f])==null?void 0:p.source)==null?void 0:g.call(p);if(typeof h=="string"){const d=h.replace("<head>",'<head><script type="module">\n'.concat(a,"\n<\/script>"));s[f]={source:()=>d,size:()=>d.length}}})}})}class H{constructor(e){this.options=e}apply(e){return T(this,null,function*(){var n,a,f,h,p,g,d,N,W,$,C,E;if(this.options.close||!o.isDev(this.options.dev,((n=e==null?void 0:e.options)==null?void 0:n.mode)==="development"||process.env.NODE_ENV==="development"))return;const s={port:0,entry:"",output:this.options.output,inputs:A((a=e==null?void 0:e.options)==null?void 0:a.entry,(f=e==null?void 0:e.options)==null?void 0:f.context),envDir:(h=e==null?void 0:e.options)==null?void 0:h.context,root:(p=e==null?void 0:e.options)==null?void 0:p.context},i=((g=e==null?void 0:e.options)==null?void 0:g.cache)||((N=(d=e==null?void 0:e.options)==null?void 0:d.experiments)==null?void 0:N.cache);if(((i==null?void 0:i.type)==="filesystem"||(i==null?void 0:i.type)==="persistent")&&(this.options.cache?(s.port=this.options.port||((W=o.getProjectRecord(s))==null?void 0:W.previousPort)||0,w(this.options,s,!0)):i.version="code-inspector-".concat(Date.now())),this.options.vueLoader==="internal"&&_(this.options,e),z(O(l({},this.options),{record:s}),e),($=e==null?void 0:e.hooks)!=null&&$.emit&&!((E=(C=this.options.skipSnippets)==null?void 0:C.includes)!=null&&E.call(C,"htmlScript"))){const Q=this.options;e.hooks.emit.tapAsync("WebpackCodeInspectorPlugin",(x,B)=>T(this,null,function*(){let R={};x.getAssets?R=yield x.getAssets():R=x.assets,yield F({options:Q,record:s,assets:R}),B()}))}})}}return H});
{
"name": "@code-inspector/webpack",
"version": "1.6.5",
"version": "1.6.6",
"main": "./dist/index.umd.js",

@@ -43,3 +43,3 @@ "module": "./dist/index.mjs",

"dependencies": {
"@code-inspector/core": "1.6.5"
"@code-inspector/core": "1.6.6"
},

@@ -46,0 +46,0 @@ "devDependencies": {