New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

webpack-code-inspector-plugin

Package Overview
Dependencies
Maintainers
1
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-code-inspector-plugin - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

2

./dist/index.umd.js

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

(function(t,n){typeof exports=="object"&&typeof module!="undefined"?module.exports=n(require("code-inspector-core"),require("path")):typeof define=="function"&&define.amd?define(["code-inspector-core","path"],n):(t=typeof globalThis!="undefined"?globalThis:t||self,t.WebpackCodeInspectorPlugin=n(t.codeInspectorCore,t.path))})(this,function(t,n){"use strict";var W=Object.defineProperty;var h=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var l=(t,n,i)=>n in t?W(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i,k=(t,n)=>{for(var i in n||(n={}))v.call(n,i)&&l(t,i,n[i]);if(h)for(var i of h(n))x.call(n,i)&&l(t,i,n[i]);return t};const i=(r,e)=>{var u;const c=(r==null?void 0:r.compiler)||r,o=(u=c==null?void 0:c.options)==null?void 0:u.module;((o==null?void 0:o.rules)||(o==null?void 0:o.loaders)||[]).push({test:/\.(vue|jsx|tsx|js|ts)$/,use:[n.resolve(__dirname,"./loader.js")],enforce:"pre"}),typeof e=="function"&&e()},d=(r,e)=>{const c=r.lastIndexOf("</html>");return c>-1&&(r=r.slice(0,c)+"\n".concat(e,"\n")+r.slice(c)),r},g=(r,e,c)=>{const o=Object.keys(e).filter(s=>/\.html$/.test(s));o.length?o.forEach(s=>{const u=e[s].source(),p=d(u,r);e[s]={source:()=>p,size:()=>p.length}}):c&&c(new Error("webpack-code-inspector-plugin Cannot find output HTML file"))};class P{constructor(e){this.options=e||{}}apply(e){var o;if(((o=e==null?void 0:e.options)==null?void 0:o.mode)!=="development"&&process.env.NODE_ENV!=="development")return;const c=s=>t.getInjectCode(s,k({},this.options||{}));e.hooks&&this.handleWebpackAbove4(e,c)}handleWebpackAbove4(e,c){e.hooks.watchRun.tap("WebpackCodeInspectorLoader",i);const o=e.options.plugins.find(s=>s.constructor.name==="HtmlWebpackPlugin");o?e.hooks.compilation.tap("WebpackCodeInspectorPlugin",s=>{let u=s.hooks.htmlWebpackPluginAfterHtmlProcessing;u||(u=o.constructor.getHooks(s).beforeEmit),u.tapAsync("WebpackCodeInspectorPlugin",(p,a)=>{const f=t.normalizePath(s.options.context);t.startServer(b=>{p.html=d(p.html,c(b)),a(null,p)},f)})}):e.hooks.emit.tapAsync("WebpackCodeInspectorPlugin",(s,u)=>{const p=t.normalizePath(s.options.context);t.startServer(a=>{const{assets:f}=s;g(c(a),f,u),u()},p)})}}return P});
(function(t,n){typeof exports=="object"&&typeof module!="undefined"?module.exports=n(require("code-inspector-core"),require("path")):typeof define=="function"&&define.amd?define(["code-inspector-core","path"],n):(t=typeof globalThis!="undefined"?globalThis:t||self,t.WebpackCodeInspectorPlugin=n(t.codeInspectorCore,t.path))})(this,function(t,n){"use strict";var W=Object.defineProperty;var h=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var l=(t,n,i)=>n in t?W(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i,k=(t,n)=>{for(var i in n||(n={}))v.call(n,i)&&l(t,i,n[i]);if(h)for(var i of h(n))x.call(n,i)&&l(t,i,n[i]);return t};const i=(r,e)=>{var u;const c=(r==null?void 0:r.compiler)||r,o=(u=c==null?void 0:c.options)==null?void 0:u.module;((o==null?void 0:o.rules)||(o==null?void 0:o.loaders)||[]).push({test:/\.(vue|jsx|tsx|js|ts)$/,exclude:/node_modules/,use:[n.resolve(__dirname,"./loader.js")],enforce:"pre"}),typeof e=="function"&&e()},f=(r,e)=>{const c=r.lastIndexOf("</html>");return c>-1&&(r=r.slice(0,c)+"\n".concat(e,"\n")+r.slice(c)),r},g=(r,e,c)=>{const o=Object.keys(e).filter(s=>/\.html$/.test(s));o.length?o.forEach(s=>{const u=e[s].source(),p=f(u,r);e[s]={source:()=>p,size:()=>p.length}}):c&&c(new Error("webpack-code-inspector-plugin Cannot find output HTML file"))};class P{constructor(e){this.options=e||{}}apply(e){var o;if(((o=e==null?void 0:e.options)==null?void 0:o.mode)!=="development"&&process.env.NODE_ENV!=="development")return;const c=s=>t.getInjectCode(s,k({},this.options||{}));e.hooks&&this.handleWebpackAbove4(e,c)}handleWebpackAbove4(e,c){e.hooks.watchRun.tap("WebpackCodeInspectorLoader",i);const o=e.options.plugins.find(s=>s.constructor.name==="HtmlWebpackPlugin");o?e.hooks.compilation.tap("WebpackCodeInspectorPlugin",s=>{let u=s.hooks.htmlWebpackPluginAfterHtmlProcessing;u||(u=o.constructor.getHooks(s).beforeEmit),u.tapAsync("WebpackCodeInspectorPlugin",(p,a)=>{const d=t.normalizePath(s.options.context);t.startServer(b=>{p.html=f(p.html,c(b)),a(null,p)},d)})}):e.hooks.emit.tapAsync("WebpackCodeInspectorPlugin",(s,u)=>{const p=t.normalizePath(s.options.context);t.startServer(a=>{const{assets:d}=s;g(c(a),d,u),u()},p)})}}return P});

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

(function(t,n){typeof exports=="object"&&typeof module!="undefined"?module.exports=n(require("code-inspector-core"),require("path")):typeof define=="function"&&define.amd?define(["code-inspector-core","path"],n):(t=typeof globalThis!="undefined"?globalThis:t||self,t.WebpackCodeInspectorPlugin=n(t.codeInspectorCore,t.path))})(this,function(t,n){"use strict";var W=Object.defineProperty;var h=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var l=(t,n,i)=>n in t?W(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i,k=(t,n)=>{for(var i in n||(n={}))v.call(n,i)&&l(t,i,n[i]);if(h)for(var i of h(n))x.call(n,i)&&l(t,i,n[i]);return t};const i=(r,e)=>{var u;const c=(r==null?void 0:r.compiler)||r,o=(u=c==null?void 0:c.options)==null?void 0:u.module;((o==null?void 0:o.rules)||(o==null?void 0:o.loaders)||[]).push({test:/\.(vue|jsx|tsx|js|ts)$/,use:[n.resolve(__dirname,"./loader.js")],enforce:"pre"}),typeof e=="function"&&e()},d=(r,e)=>{const c=r.lastIndexOf("</html>");return c>-1&&(r=r.slice(0,c)+"\n".concat(e,"\n")+r.slice(c)),r},g=(r,e,c)=>{const o=Object.keys(e).filter(s=>/\.html$/.test(s));o.length?o.forEach(s=>{const u=e[s].source(),p=d(u,r);e[s]={source:()=>p,size:()=>p.length}}):c&&c(new Error("webpack-code-inspector-plugin Cannot find output HTML file"))};class P{constructor(e){this.options=e||{}}apply(e){var o;if(((o=e==null?void 0:e.options)==null?void 0:o.mode)!=="development"&&process.env.NODE_ENV!=="development")return;const c=s=>t.getInjectCode(s,k({},this.options||{}));e.hooks&&this.handleWebpackAbove4(e,c)}handleWebpackAbove4(e,c){e.hooks.watchRun.tap("WebpackCodeInspectorLoader",i);const o=e.options.plugins.find(s=>s.constructor.name==="HtmlWebpackPlugin");o?e.hooks.compilation.tap("WebpackCodeInspectorPlugin",s=>{let u=s.hooks.htmlWebpackPluginAfterHtmlProcessing;u||(u=o.constructor.getHooks(s).beforeEmit),u.tapAsync("WebpackCodeInspectorPlugin",(p,a)=>{const f=t.normalizePath(s.options.context);t.startServer(b=>{p.html=d(p.html,c(b)),a(null,p)},f)})}):e.hooks.emit.tapAsync("WebpackCodeInspectorPlugin",(s,u)=>{const p=t.normalizePath(s.options.context);t.startServer(a=>{const{assets:f}=s;g(c(a),f,u),u()},p)})}}return P});
(function(t,n){typeof exports=="object"&&typeof module!="undefined"?module.exports=n(require("code-inspector-core"),require("path")):typeof define=="function"&&define.amd?define(["code-inspector-core","path"],n):(t=typeof globalThis!="undefined"?globalThis:t||self,t.WebpackCodeInspectorPlugin=n(t.codeInspectorCore,t.path))})(this,function(t,n){"use strict";var W=Object.defineProperty;var h=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var l=(t,n,i)=>n in t?W(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i,k=(t,n)=>{for(var i in n||(n={}))v.call(n,i)&&l(t,i,n[i]);if(h)for(var i of h(n))x.call(n,i)&&l(t,i,n[i]);return t};const i=(r,e)=>{var u;const c=(r==null?void 0:r.compiler)||r,o=(u=c==null?void 0:c.options)==null?void 0:u.module;((o==null?void 0:o.rules)||(o==null?void 0:o.loaders)||[]).push({test:/\.(vue|jsx|tsx|js|ts)$/,exclude:/node_modules/,use:[n.resolve(__dirname,"./loader.js")],enforce:"pre"}),typeof e=="function"&&e()},f=(r,e)=>{const c=r.lastIndexOf("</html>");return c>-1&&(r=r.slice(0,c)+"\n".concat(e,"\n")+r.slice(c)),r},g=(r,e,c)=>{const o=Object.keys(e).filter(s=>/\.html$/.test(s));o.length?o.forEach(s=>{const u=e[s].source(),p=f(u,r);e[s]={source:()=>p,size:()=>p.length}}):c&&c(new Error("webpack-code-inspector-plugin Cannot find output HTML file"))};class P{constructor(e){this.options=e||{}}apply(e){var o;if(((o=e==null?void 0:e.options)==null?void 0:o.mode)!=="development"&&process.env.NODE_ENV!=="development")return;const c=s=>t.getInjectCode(s,k({},this.options||{}));e.hooks&&this.handleWebpackAbove4(e,c)}handleWebpackAbove4(e,c){e.hooks.watchRun.tap("WebpackCodeInspectorLoader",i);const o=e.options.plugins.find(s=>s.constructor.name==="HtmlWebpackPlugin");o?e.hooks.compilation.tap("WebpackCodeInspectorPlugin",s=>{let u=s.hooks.htmlWebpackPluginAfterHtmlProcessing;u||(u=o.constructor.getHooks(s).beforeEmit),u.tapAsync("WebpackCodeInspectorPlugin",(p,a)=>{const d=t.normalizePath(s.options.context);t.startServer(b=>{p.html=f(p.html,c(b)),a(null,p)},d)})}):e.hooks.emit.tapAsync("WebpackCodeInspectorPlugin",(s,u)=>{const p=t.normalizePath(s.options.context);t.startServer(a=>{const{assets:d}=s;g(c(a),d,u),u()},p)})}}return P});

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

"use strict";const i=require("code-inspector-core"),x=require("path");function g(e){var r,n;const t=i.normalizePath(this.resourcePath),a=i.normalizePath((n=(r=this.rootContext)!=null?r:this.options.context)!=null?n:""),o=i.normalizePath(x.relative(a,t));let s=new URLSearchParams(this.resource);const l=t.endsWith(".js")||t.endsWith(".ts")||t.endsWith(".jsx")||t.endsWith(".tsx")||t.endsWith(".vue")&&(s.get("isJsx")!==null||s.get("lang.tsx")!==null),h=t.endsWith(".vue")&&(s.get("lang")==="tsx"||s.get("lang")==="jsx"),p=t.endsWith(".vue")&&s.get("type")!=="style"&&s.get("type")!=="script"&&s.get("raw")===null;if(l)e=i.enhanceCode({code:e,filePath:o,fileType:"jsx"});else if(h){const{descriptor:d}=i.parseSFC(e,{sourceMap:!1}),c=d.script.content,u=i.enhanceCode({code:c,filePath:o,fileType:"jsx"});e=e.replace(c,u)}else p&&(e=i.enhanceCode({code:e,filePath:o,fileType:"vue"}));return e}module.exports=g;
"use strict";const i=require("code-inspector-core"),x=require("path");function g(e){var r,c;this.cacheable&&this.cacheable();const t=i.normalizePath(this.resourcePath),a=i.normalizePath((c=(r=this.rootContext)!=null?r:this.options.context)!=null?c:""),o=i.normalizePath(x.relative(a,t));let s=new URLSearchParams(this.resource);const h=t.endsWith(".js")||t.endsWith(".ts")||t.endsWith(".jsx")||t.endsWith(".tsx")||t.endsWith(".vue")&&(s.get("isJsx")!==null||s.get("lang.tsx")!==null),l=t.endsWith(".vue")&&(s.get("lang")==="tsx"||s.get("lang")==="jsx"),p=t.endsWith(".vue")&&s.get("type")!=="style"&&s.get("type")!=="script"&&s.get("raw")===null;if(h)e=i.enhanceCode({code:e,filePath:o,fileType:"jsx"});else if(l){const{descriptor:d}=i.parseSFC(e,{sourceMap:!1}),n=d.script.content,u=i.enhanceCode({code:n,filePath:o,fileType:"jsx"});e=e.replace(n,u)}else p&&(e=i.enhanceCode({code:e,filePath:o,fileType:"vue"}));return e}module.exports=g;
{
"name": "webpack-code-inspector-plugin",
"version": "0.1.5",
"version": "0.1.6",
"main": "./dist/index.umd.js",

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

"dependencies": {
"code-inspector-core": "0.1.5"
"code-inspector-core": "0.1.6"
},

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc