Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

esbuild-code-inspector-plugin

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 0.16.2 to 0.16.3

2

dist/index.js

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

"use strict";var f=(t,s,c)=>new Promise((a,u)=>{var p=e=>{try{r(c.next(e))}catch(o){u(o)}},n=e=>{try{r(c.throw(e))}catch(o){u(o)}},r=e=>e.done?a(e.value):Promise.resolve(e.value).then(p,n);r((c=c.apply(t,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("code-inspector-core"),C=require("fs"),h=require("path"),y="esbuild-code-inspector-plugin";function b(t){let s;return typeof t=="function"?s=t():s=t,!!s}function j(t){return{name:y,setup(s){if(t.close||!b(t.dev))return;const c={port:0,entry:"",output:t.output},{escapeTags:a=[]}=t,u=new Map;s.onLoad({filter:t.match||/\.(jsx|tsx|js|ts|mjs|mts)?$/},p=>f(this,null,function*(){const n=p.path;let r=yield C.promises.readFile(n,"utf8"),e=u.get(n);if(!e||e.originCode!==r){let o=yield l.getCodeWithWebComponent(t,n,r,c),i="";if(l.isJsTypeFile(n)?i="jsx":n.endsWith(".svelte")&&(i="svelte"),i)o=l.transformCode({content:o,filePath:n,fileType:i,escapeTags:a});else if(n.endsWith(".vue")){i="vue";const{descriptor:d}=l.parseSFC(o,{sourceMap:!1}),g=l.transformCode({content:d.template.content,filePath:n,fileType:i,escapeTags:a});o=o.replace(d.template.content,g)}const m=h.extname(n).replace(".","");e={originCode:r,output:{contents:o,loader:m}},u.set(n,e)}return e.output}))}}}exports.EsbuildCodeInspectorPlugin=j;
"use strict";var f=(n,u,r)=>new Promise((a,l)=>{var d=e=>{try{o(r.next(e))}catch(s){l(s)}},t=e=>{try{o(r.throw(e))}catch(s){l(s)}},o=e=>e.done?a(e.value):Promise.resolve(e.value).then(d,t);o((r=r.apply(n,u)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("code-inspector-core"),C=require("fs"),h=require("path"),v="esbuild-code-inspector-plugin";function b(n){return{name:v,setup(u){if(n.close||!i.isDev(n.dev,!1))return;const r={port:0,entry:"",output:n.output},{escapeTags:a=[]}=n,l=new Map;u.onLoad({filter:n.match||/\.(jsx|tsx|js|ts|mjs|mts)?$/},d=>f(this,null,function*(){const t=d.path;let o=yield C.promises.readFile(t,"utf8"),e=l.get(t);if(!e||e.originCode!==o){let s=yield i.getCodeWithWebComponent(n,t,o,r),c="";if(i.isJsTypeFile(t)?c="jsx":t.endsWith(".svelte")&&(c="svelte"),c)s=i.transformCode({content:s,filePath:t,fileType:c,escapeTags:a});else if(t.endsWith(".vue")){c="vue";const{descriptor:p}=i.parseSFC(s,{sourceMap:!1}),g=i.transformCode({content:p.template.content,filePath:t,fileType:c,escapeTags:a});s=s.replace(p.template.content,g)}const m=h.extname(t).replace(".","");e={originCode:o,output:{contents:s,loader:m}},l.set(t,e)}return e.output}))}}}exports.EsbuildCodeInspectorPlugin=b;
{
"name": "esbuild-code-inspector-plugin",
"version": "0.16.2",
"version": "0.16.3",
"main": "./dist/index.js",

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

"dependencies": {
"code-inspector-core": "0.16.2"
"code-inspector-core": "0.16.3"
},

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

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

- The following code editors are currently supported:<br />
[VSCode](https://code.visualstudio.com/) | [Visual Studio Code - Insiders](https://code.visualstudio.com/insiders/) | [WebStorm](https://www.jetbrains.com/webstorm/) | [Atom](https://atom.io/) | [HBuilderX](https://www.dcloud.io/hbuilderx.html) | [PhpStorm](https://www.jetbrains.com/phpstorm/) | [PyCharm](https://www.jetbrains.com/pycharm/) | [IntelliJ IDEA](https://www.jetbrains.com/idea/)
[VSCode](https://code.visualstudio.com/) | [Cursor](https://www.cursor.com/) | [WebStorm](https://www.jetbrains.com/webstorm/) | [Atom](https://atom.io/) | [HBuilderX](https://www.dcloud.io/hbuilderx.html) | [PhpStorm](https://www.jetbrains.com/phpstorm/) | [PyCharm](https://www.jetbrains.com/pycharm/) | [IntelliJ IDEA](https://www.jetbrains.com/idea/) | [and Others](https://inspector.fe-dev.cn/en/guide/ide.html)

@@ -59,0 +59,0 @@ ## 🚀 Install

@@ -0,0 +0,0 @@ import { CodeOptions } from 'code-inspector-core';

Sorry, the diff of this file is not supported yet

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