esbuild-code-inspector-plugin
Advanced tools
Comparing version 0.17.4 to 0.17.5-beta.1
@@ -1,1 +0,1 @@ | ||
"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; | ||
"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({options:n,file:t,code:o,record: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.17.4", | ||
"version": "0.17.5-beta.1", | ||
"main": "./dist/index.js", | ||
@@ -41,3 +41,3 @@ "module": "./dist/index.mjs", | ||
"dependencies": { | ||
"code-inspector-core": "0.17.4" | ||
"code-inspector-core": "0.17.5-beta.1" | ||
}, | ||
@@ -44,0 +44,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16365
+ Addedcode-inspector-core@0.17.5-beta.1(transitive)
- Removedcode-inspector-core@0.17.4(transitive)