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

vite-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

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

Comparing version 0.13.0 to 0.14.0-beta.1

2

./dist/index.js

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

"use strict";var y=Object.defineProperty,P=Object.defineProperties;var h=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var g=(e,r,l)=>r in e?y(e,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[r]=l,m=(e,r)=>{for(var l in r||(r={}))x.call(r,l)&&g(e,l,r[l]);if(C)for(var l of C(r))_.call(r,l)&&g(e,l,r[l]);return e},v=(e,r)=>P(e,h(r));var d=(e,r,l)=>new Promise((t,s)=>{var i=a=>{try{f(l.next(a))}catch(c){s(c)}},u=a=>{try{f(l.throw(a))}catch(c){s(c)}},f=a=>a.done?t(a.value):Promise.resolve(a.value).then(i,u);f((l=l.apply(e,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("code-inspector-core"),M="vite-code-inspector-plugin",T=["isJsx","isTsx","lang.jsx","lang.tsx"];function j(e){const r={port:0,entry:"",nextJsEntry:"",ssrEntry:""};return v(m({name:M},e.enforcePre===!1?{}:{enforce:"pre"}),{apply(t,{command:s}){if(e!=null&&e.close)return!1;let i;return typeof(e==null?void 0:e.dev)=="function"?i=e==null?void 0:e.dev():i=e==null?void 0:e.dev,i===!1?!1:!!i||s==="serve"},resolveId(t){return d(this,null,function*(){return r.port||(yield n.startServer(e,r)),t===n.ViteVirtualModule_PrependCode?"\0".concat(n.ViteVirtualModule_PrependCode):t===n.ViteVirtualModule_ClientCode?"\0".concat(n.ViteVirtualModule_ClientCode):null})},load(t){return t==="\0".concat(n.ViteVirtualModule_PrependCode)?n.getPrependCode(e):t==="\0".concat(n.ViteVirtualModule_ClientCode)?n.getClientInjectCode(r.port,e):null},transform(t,s){return d(this,null,function*(){if(s.match("node_modules"))return t;t=yield n.getCodeWithWebComponent(e,s,t,r);const[i]=s.split("?",2),u=n.normalizePath(i),f=new URLSearchParams(s);if(e!=null&&e.match&&!e.match.test(u))return t;const{escapeTags:a=[]}=e||{};return n.isJsTypeFile(u)||u.endsWith(".vue")&&(T.some(V=>f.get(V)!==null)||f.get("lang")==="tsx"||f.get("lang")==="jsx")?n.transformCode({content:t,filePath:u,fileType:"jsx",escapeTags:a}):u.endsWith(".vue")&&f.get("type")!=="style"&&f.get("raw")===null?n.transformCode({content:t,filePath:u,fileType:"vue",escapeTags:a}):u.endsWith(".svelte")?n.transformCode({content:t,filePath:u,fileType:"svelte",escapeTags:a}):t})}})}exports.ViteCodeInspectorPlugin=j;
"use strict";var P=Object.defineProperty,d=Object.defineProperties;var C=Object.getOwnPropertyDescriptors;var g=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var v=(e,t,r)=>t in e?P(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,i=(e,t)=>{for(var r in t||(t={}))T.call(t,r)&&v(e,r,t[r]);if(g)for(var r of g(t))j.call(t,r)&&v(e,r,t[r]);return e},y=(e,t)=>d(e,C(t));var h=(e,t,r)=>new Promise((l,n)=>{var c=a=>{try{u(r.next(a))}catch(m){n(m)}},s=a=>{try{u(r.throw(a))}catch(m){n(m)}},u=a=>a.done?l(a.value):Promise.resolve(a.value).then(c,s);u((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("code-inspector-core"),S="vite-code-inspector-plugin",W=["isJsx","isTsx","lang.jsx","lang.tsx"];function J(e){const t={port:0,entry:"",output:e.output};return y(i({name:S},e.enforcePre===!1?{}:{enforce:"pre"}),{apply(l,{command:n}){if(e!=null&&e.close)return!1;let c;return typeof(e==null?void 0:e.dev)=="function"?c=e==null?void 0:e.dev():c=e==null?void 0:e.dev,c===!1?!1:!!c||n==="serve"},transform(l,n){return h(this,null,function*(){if(n.match("node_modules"))return l;l=yield f.getCodeWithWebComponent(e,n,l,t);const[c]=n.split("?",2),s=f.normalizePath(c),u=new URLSearchParams(n);if(e!=null&&e.match&&!e.match.test(s))return l;const{escapeTags:a=[]}=e||{};return f.isJsTypeFile(s)||s.endsWith(".vue")&&(W.some(x=>u.get(x)!==null)||u.get("lang")==="tsx"||u.get("lang")==="jsx")?f.transformCode({content:l,filePath:s,fileType:"jsx",escapeTags:a}):s.endsWith(".vue")&&u.get("type")!=="style"&&u.get("raw")===null?f.transformCode({content:l,filePath:s,fileType:"vue",escapeTags:a}):s.endsWith(".svelte")?f.transformCode({content:l,filePath:s,fileType:"svelte",escapeTags:a}):l})}})}exports.ViteCodeInspectorPlugin=J;

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

"use strict";var y=Object.defineProperty,P=Object.defineProperties;var h=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var g=(e,r,l)=>r in e?y(e,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[r]=l,m=(e,r)=>{for(var l in r||(r={}))x.call(r,l)&&g(e,l,r[l]);if(C)for(var l of C(r))_.call(r,l)&&g(e,l,r[l]);return e},v=(e,r)=>P(e,h(r));var d=(e,r,l)=>new Promise((t,s)=>{var i=a=>{try{f(l.next(a))}catch(c){s(c)}},u=a=>{try{f(l.throw(a))}catch(c){s(c)}},f=a=>a.done?t(a.value):Promise.resolve(a.value).then(i,u);f((l=l.apply(e,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("code-inspector-core"),M="vite-code-inspector-plugin",T=["isJsx","isTsx","lang.jsx","lang.tsx"];function j(e){const r={port:0,entry:"",nextJsEntry:"",ssrEntry:""};return v(m({name:M},e.enforcePre===!1?{}:{enforce:"pre"}),{apply(t,{command:s}){if(e!=null&&e.close)return!1;let i;return typeof(e==null?void 0:e.dev)=="function"?i=e==null?void 0:e.dev():i=e==null?void 0:e.dev,i===!1?!1:!!i||s==="serve"},resolveId(t){return d(this,null,function*(){return r.port||(yield n.startServer(e,r)),t===n.ViteVirtualModule_PrependCode?"\0".concat(n.ViteVirtualModule_PrependCode):t===n.ViteVirtualModule_ClientCode?"\0".concat(n.ViteVirtualModule_ClientCode):null})},load(t){return t==="\0".concat(n.ViteVirtualModule_PrependCode)?n.getPrependCode(e):t==="\0".concat(n.ViteVirtualModule_ClientCode)?n.getClientInjectCode(r.port,e):null},transform(t,s){return d(this,null,function*(){if(s.match("node_modules"))return t;t=yield n.getCodeWithWebComponent(e,s,t,r);const[i]=s.split("?",2),u=n.normalizePath(i),f=new URLSearchParams(s);if(e!=null&&e.match&&!e.match.test(u))return t;const{escapeTags:a=[]}=e||{};return n.isJsTypeFile(u)||u.endsWith(".vue")&&(T.some(V=>f.get(V)!==null)||f.get("lang")==="tsx"||f.get("lang")==="jsx")?n.transformCode({content:t,filePath:u,fileType:"jsx",escapeTags:a}):u.endsWith(".vue")&&f.get("type")!=="style"&&f.get("raw")===null?n.transformCode({content:t,filePath:u,fileType:"vue",escapeTags:a}):u.endsWith(".svelte")?n.transformCode({content:t,filePath:u,fileType:"svelte",escapeTags:a}):t})}})}exports.ViteCodeInspectorPlugin=j;
"use strict";var P=Object.defineProperty,d=Object.defineProperties;var C=Object.getOwnPropertyDescriptors;var g=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var v=(e,t,r)=>t in e?P(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,i=(e,t)=>{for(var r in t||(t={}))T.call(t,r)&&v(e,r,t[r]);if(g)for(var r of g(t))j.call(t,r)&&v(e,r,t[r]);return e},y=(e,t)=>d(e,C(t));var h=(e,t,r)=>new Promise((l,n)=>{var c=a=>{try{u(r.next(a))}catch(m){n(m)}},s=a=>{try{u(r.throw(a))}catch(m){n(m)}},u=a=>a.done?l(a.value):Promise.resolve(a.value).then(c,s);u((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("code-inspector-core"),S="vite-code-inspector-plugin",W=["isJsx","isTsx","lang.jsx","lang.tsx"];function J(e){const t={port:0,entry:"",output:e.output};return y(i({name:S},e.enforcePre===!1?{}:{enforce:"pre"}),{apply(l,{command:n}){if(e!=null&&e.close)return!1;let c;return typeof(e==null?void 0:e.dev)=="function"?c=e==null?void 0:e.dev():c=e==null?void 0:e.dev,c===!1?!1:!!c||n==="serve"},transform(l,n){return h(this,null,function*(){if(n.match("node_modules"))return l;l=yield f.getCodeWithWebComponent(e,n,l,t);const[c]=n.split("?",2),s=f.normalizePath(c),u=new URLSearchParams(n);if(e!=null&&e.match&&!e.match.test(s))return l;const{escapeTags:a=[]}=e||{};return f.isJsTypeFile(s)||s.endsWith(".vue")&&(W.some(x=>u.get(x)!==null)||u.get("lang")==="tsx"||u.get("lang")==="jsx")?f.transformCode({content:l,filePath:s,fileType:"jsx",escapeTags:a}):s.endsWith(".vue")&&u.get("type")!=="style"&&u.get("raw")===null?f.transformCode({content:l,filePath:s,fileType:"vue",escapeTags:a}):s.endsWith(".svelte")?f.transformCode({content:l,filePath:s,fileType:"svelte",escapeTags:a}):l})}})}exports.ViteCodeInspectorPlugin=J;
{
"name": "vite-code-inspector-plugin",
"version": "0.13.0",
"version": "0.14.0-beta.1",
"main": "./dist/index.js",

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

"dependencies": {
"code-inspector-core": "0.13.0"
"code-inspector-core": "0.14.0-beta.1"
},

@@ -50,3 +50,4 @@ "devDependencies": {

"scripts": {
"build": "tsc && vite build",
"clear": "rimraf ./dist && rimraf ./types",
"build": "pnpm clear && tsc && vite build",
"pub": "pnpm publish",

@@ -53,0 +54,0 @@ "pub:beta": "pnpm publish --tag beta"

@@ -10,3 +10,3 @@ <div align="center">

[![NPM version](https://img.shields.io/npm/v/code-inspector-plugin.svg)](https://www.npmjs.com/package/code-inspector-plugin)
[![NPM Downloads](https://img.shields.io/npm/dm/code-inspector-plugin.svg)](https://npmcharts.com/compare/code-inspector-plugin?minimal=true)
[![NPM Downloads](https://img.shields.io/npm/dm/code-inspector-plugin.svg)](https://npmcharts.netlify.app/compare/code-inspector-plugin?minimal=true)
[![MIT-license](https://img.shields.io/npm/l/code-inspector.svg)](https://opensource.org/licenses/MIT)

@@ -13,0 +13,0 @@ [![GITHUB-language](https://img.shields.io/github/languages/top/zh-lx/code-inspector)](https://github.com/zh-lx/code-inspector)

import { CodeOptions } from 'code-inspector-core';
interface Options extends CodeOptions {
close?: boolean;
output: string;
}
export declare function ViteCodeInspectorPlugin(options?: Options): {
export declare function ViteCodeInspectorPlugin(options: Options): {
apply(_: any, { command }: {
command: any;
}): boolean;
resolveId(id: any): Promise<string>;
load(id: any): string;
transform(code: any, id: any): Promise<any>;

@@ -12,0 +11,0 @@ enforce?: "pre";

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