dev-dep-tool
Advanced tools
Comparing version 0.1.0-dev.0 to 0.1.0
var e=require("child_process") | ||
var t=require("dr-js/library/common/format") | ||
var o=require("dr-js/library/common/data/SemVer") | ||
const s=/\033\[[0-9;]*[a-zA-Z]/g | ||
const r=/(\S+)\s+\S+\s+(\S+)\s+(\S+)/ | ||
const n=([e,,,t],[o,,,s])=>t!==s?t.localeCompare(s):e.localeCompare(o) | ||
const r=/\033\[[0-9;]*[a-zA-Z]/g | ||
const s=/(\S+)\s+\S+\s+(\S+)\s+(\S+)/ | ||
const n=([e,,,t],[o,,,r])=>t!==r?t.localeCompare(r):e.localeCompare(o) | ||
const c=[(e,t)=>` ${e.padStart(t)}`,void 0,void 0,e=>e] | ||
const l=e=>(0,t.padTable)({table:e,cellPad:" | ",padFuncList:c}) | ||
const a=e=>(0,t.padTable)({table:e,cellPad:" | ",padFuncList:c}) | ||
exports.logCheckOutdatedResult=(async(t,c)=>(async(e,t)=>{const c=[] | ||
const a=[] | ||
t.split("\n").forEach(t=>{const[,n,l,d]=r.exec(t.replace(s,""))||[] | ||
const l=[] | ||
t.split("\n").forEach(t=>{const[,n,a,d]=s.exec(t.replace(r,""))||[] | ||
if(!e[n])return | ||
const{version:i,source:u}=e[n] | ||
const p=(0,o.compareSemVer)(l,d)<=0?d:l | ||
const p=(0,o.compareSemVer)(a,d)<=0?d:a | ||
const h=[n,i,p,u] | ||
i.endsWith(p)?c.push(h):a.push(h)}) | ||
const d=c.length+a.length | ||
i.endsWith(p)?c.push(h):l.push(h)}) | ||
const d=c.length+l.length | ||
c.sort(n) | ||
c.length&&console.log(`SAME[${c.length}/${d}]:\n${l(c)}`) | ||
a.sort(n) | ||
a.length&&console.log(`OUTDATED[${a.length}/${d}]:\n${l(a)}`) | ||
return a.length})(t,(t=>{const{stdout:o,status:s,signal:r,error:n}=(0,e.spawnSync)("npm",["outdated"],{cwd:t,stdio:"pipe",shell:!0}) | ||
c.length&&console.log(`SAME[${c.length}/${d}]:\n${a(c)}`) | ||
l.sort(n) | ||
l.length&&console.error(`OUTDATED[${l.length}/${d}]:\n${a(l)}`) | ||
return l.length})(t,(t=>{const{stdout:o,status:r,signal:s,error:n}=(0,e.spawnSync)("npm",["outdated"],{cwd:t,stdio:"pipe",shell:!0}) | ||
if(n)throw n | ||
return o.toString()})(c))) |
var e=require("dr-js/library/common/module/Option/parser") | ||
var t=require("dr-js/library/common/module/Option/preset") | ||
var a=require("dr-js/library/node/module/Option") | ||
const{SingleString:s,BooleanFlag:o,Config:i}=t.ConfigPreset | ||
const p={prefixENV:"dev-dep",formatList:[i,Object.assign({},o,{name:"help",shortName:"h"}),Object.assign({},o,{name:"version",shortName:"v"}),Object.assign({},s,{isPath:!0,optional:(0,t.getOptionalFormatFlag)("check-outdated","pack"),name:"path-input",shortName:"i",description:"path to 'package.json', or directory with 'package.json' inside"}),Object.assign({},o,{name:"check-outdated",shortName:"C",extendFormatList:[Object.assign({},s,{isPath:!0,optional:!0,name:"path-temp"})]}),Object.assign({},o,{name:"pack",shortName:"P",extendFormatList:[Object.assign({},s,{isPath:!0,name:"path-output",shortName:"o",description:"output path"}),Object.assign({},s,{optional:!0,name:"output-name",description:"output package name"}),Object.assign({},s,{optional:!0,name:"output-version",description:"output package version"}),Object.assign({},s,{optional:!0,name:"output-description",description:"output package description"}),Object.assign({},o,{name:"publish",description:"run npm publish"}),Object.assign({},o,{name:"publish-dev",description:"run npm publish-dev"})]})]} | ||
const{parseCLI:r,parseENV:n,parseJSON:c,processOptionMap:m,formatUsage:u}=(0,e.createOptionParser)(p) | ||
exports.formatUsage=u | ||
exports.parseOption=(async()=>(0,a.createOptionGetter)(await(0,a.parseOptionMap)({parseCLI:r,parseENV:n,parseJSON:c,processOptionMap:m}))) | ||
var o=require("dr-js/library/node/module/Option") | ||
function r(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{} | ||
var r=Object.keys(o) | ||
"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable}))) | ||
r.forEach(function(t){a(e,t,o[t])})}return e}function a(e,t,o){t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o | ||
return e}const{SingleString:n,BooleanFlag:p,Config:i}=t.ConfigPreset | ||
const s={prefixENV:"dev-dep",formatList:[i,r({},p,{name:"help",shortName:"h"}),r({},p,{name:"version",shortName:"v"}),r({},n,{isPath:!0,optional:(0,t.getOptionalFormatFlag)("check-outdated","pack"),name:"path-input",shortName:"i",description:"path to 'package.json', or directory with 'package.json' inside"}),r({},p,{name:"check-outdated",shortName:"C",extendFormatList:[r({},n,{isPath:!0,optional:!0,name:"path-temp"})]}),r({},p,{name:"pack",shortName:"P",extendFormatList:[r({},n,{isPath:!0,name:"path-output",shortName:"o",description:"output path"}),r({},n,{optional:!0,name:"output-name",description:"output package name"}),r({},n,{optional:!0,name:"output-version",description:"output package version"}),r({},n,{optional:!0,name:"output-description",description:"output package description"}),r({},p,{name:"publish",description:"run npm publish"}),r({},p,{name:"publish-dev",description:"run npm publish-dev"})]})]} | ||
const{parseCLI:c,parseENV:u,parseJSON:m,processOptionMap:l,formatUsage:d}=(0,e.createOptionParser)(s) | ||
exports.formatUsage=d | ||
exports.parseOption=(async()=>(0,o.createOptionGetter)(await(0,o.parseOptionMap)({parseCLI:c,parseENV:u,parseJSON:m,processOptionMap:l}))) |
@@ -6,25 +6,26 @@ var e=require("fs") | ||
var r=require("dr-js/library/node/file/Modify") | ||
exports.initOutput=(async({fromRoot:t,fromOutput:i,logger:s,deleteKeyList:a=["private","scripts","engines","devDependencies"],copyPathList:n=["LICENSE","README.md"]})=>{s.padLog("reset output") | ||
exports.initOutput=(async({fromRoot:t,fromOutput:i,deleteKeyList:s=["private","scripts","engines","devDependencies"],copyPathList:n=["LICENSE","README.md"],logger:{padLog:a,log:p},quiet:u=!1})=>{const c=u?p:a | ||
c("reset output") | ||
await r.modify.delete(i()).catch(()=>{}) | ||
await(0,o.createDirectory)(i()) | ||
s.padLog("init output package.json") | ||
const p=require(t("package.json")) | ||
for(const e of a)delete p[e] | ||
s.log(`dropped ${JSON.stringify(a)} from package.json`);(0,e.writeFileSync)(i("package.json"),JSON.stringify(p)) | ||
s.padLog(`init output file from root: ${JSON.stringify(n)}`) | ||
c("init output package.json") | ||
const d=require(t("package.json")) | ||
for(const e of s)delete d[e] | ||
!u&&p(`dropped ${JSON.stringify(s)} from package.json`);(0,e.writeFileSync)(i("package.json"),JSON.stringify(d)) | ||
c(`init output file from root: ${JSON.stringify(n)}`) | ||
for(const e of n)await r.modify.copy(t(e),i(e)) | ||
return p}) | ||
exports.packOutput=(async({fromRoot:o,fromOutput:s,logger:a})=>{const n={cwd:s(),stdio:"inherit",shell:!0} | ||
a.padLog("run pack output");(0,t.execSync)("npm pack",n) | ||
a.padLog("move to root path") | ||
const p=require(s("package.json")) | ||
const u=`${p.name}-${p.version}.tgz` | ||
await r.modify.move(s(u),o(u)) | ||
a.log(`pack size: ${(0,i.binary)((0,e.statSync)(o(u)).size)}B`)}) | ||
exports.publishOutput=(async({flagList:e,packageJSON:i,fromOutput:o,onPublish:r=(()=>(0,t.execSync)("npm publish --tag latest",{cwd:o(),stdio:"inherit",shell:!0})),onPublishDev:n=(()=>(0,t.execSync)("npm publish --tag dev",{cwd:o(),stdio:"inherit",shell:!0})),logger:p})=>{if(e.includes("publish-dev")){p.padLog(`publish-dev: ${i.version}`) | ||
if(!a.test(i.version))throw new Error(`[publish-dev] invalid version: ${i.version}`) | ||
await n()}else if(e.includes("publish")){p.padLog(`publish: ${i.version}`) | ||
return d}) | ||
exports.packOutput=(async({fromRoot:o,fromOutput:s,logger:{padLog:n,log:a},quiet:p=!1})=>{const u=p?a:n | ||
u("run pack output");(0,t.execSync)("npm pack",{cwd:s(),stdio:p?["ignore","ignore"]:"inherit",shell:!0}) | ||
u("move to root path") | ||
const c=require(s("package.json")) | ||
const d=`${c.name}-${c.version}.tgz` | ||
await r.modify.move(s(d),o(d)) | ||
u(`pack size: ${(0,i.binary)((0,e.statSync)(o(d)).size)}B`)}) | ||
exports.publishOutput=(async({flagList:e,packageJSON:i,fromOutput:o,onPublish:r=(()=>(0,t.execSync)("npm publish --tag latest",{cwd:o(),stdio:"inherit",shell:!0})),onPublishDev:a=(()=>(0,t.execSync)("npm publish --tag dev",{cwd:o(),stdio:"inherit",shell:!0})),logger:p})=>{if(e.includes("publish-dev")){p.padLog(`publish-dev: ${i.version}`) | ||
if(!n.test(i.version))throw new Error(`[publish-dev] invalid version: ${i.version}`) | ||
await a()}else if(e.includes("publish")){p.padLog(`publish: ${i.version}`) | ||
if(!s.test(i.version))throw new Error(`[publish] invalid version: ${i.version}`) | ||
await r()}}) | ||
const s=/^\d+\.\d+\.\d+$/ | ||
const a=/^\d+\.\d+\.\d+-dev\.\d+$/ | ||
const n=/^\d+\.\d+\.\d+-dev\.\d+$/ |
@@ -1,15 +0,16 @@ | ||
const t=t=>`${t[0].toUpperCase()}${t.slice(1)}` | ||
const e=t=>t.charAt(0)>="A"&&t.charAt(0)<="Z" | ||
const o=({name:t},{name:o})=>(e(t)?t.charCodeAt(0)-255:t.charCodeAt(0))-(e(o)?o.charCodeAt(0)-255:o.charCodeAt(0)) | ||
exports.generateIndexScript=(({sourceRouteMap:r})=>{const s={} | ||
Object.values(r).forEach(({routeList:r,directoryList:p,fileList:n})=>{const c=[] | ||
const i=[] | ||
p.forEach(e=>{const o=t(e) | ||
c.push(`import * as ${o} from './${e}'`) | ||
i.push(o)}) | ||
n.sort(o).map(({name:o,exportList:r})=>{if(p.length||e(o)){const e=t(o) | ||
c.push(`import * as ${e} from './${o}'`) | ||
i.push(e)}else c.push(`export { ${r.join(", ")} } from './${o}'`)}) | ||
i.length&&c.push(`export { ${i.join(", ")} }`) | ||
s[[...r,"index.js"].join("/")]=c.join("\n")}) | ||
var t=require("dr-js/library/common/compare") | ||
const e=t=>`${t.charAt(0).toUpperCase()}${t.slice(1)}` | ||
const o=t=>/[A-Z]/.test(t.charAt(0)) | ||
const r=({name:e},{name:o})=>(0,t.compareString)(e,o) | ||
exports.generateIndexScript=(({sourceRouteMap:t})=>{const s={} | ||
Object.values(t).forEach(({routeList:t,directoryList:p,fileList:n})=>{const i=[] | ||
const c=[] | ||
p.forEach(t=>{const o=e(t) | ||
i.push(`import * as ${o} from './${t}'`) | ||
c.push(o)}) | ||
n.sort(r).map(({name:t,exportList:r})=>{if(p.length||o(t)){const o=e(t) | ||
i.push(`import * as ${o} from './${t}'`) | ||
c.push(o)}else i.push(`export { ${r.join(", ")} } from './${t}'`)}) | ||
c.length&&i.push(`export { ${c.join(", ")} }`) | ||
s[[...t,"index.js"].join("/")]=i.join("\n")}) | ||
return s}) | ||
@@ -19,11 +20,11 @@ exports.HOIST_LIST_KEY="@@|hoist" | ||
exports.EXPORT_HOIST_LIST_KEY="@@|export-hoist" | ||
exports.generateExportInfo=(({sourceRouteMap:r})=>{const s={} | ||
exports.generateExportInfo=(({sourceRouteMap:t})=>{const s={} | ||
const p=(...t)=>{const e=t.join("/") | ||
s[e]||(s[e]={}) | ||
return s[e]} | ||
Object.values(r).forEach(({routeList:r,directoryList:s,fileList:n})=>{const c=p(...r) | ||
s.forEach(e=>{c[t(e)]=p(...r,e)}) | ||
n.sort(o).map(({name:o,exportList:n})=>{if(s.length||e(o))c[t(o)]={"@@|export":n} | ||
else{c[o]={"@@|hoist":n} | ||
c["@@|export-hoist"]=[...c["@@|export-hoist"]||[],...n]}p(...r,o)["@@|export"]=n})}) | ||
Object.values(t).forEach(({routeList:t,directoryList:s,fileList:n})=>{const i=p(...t) | ||
s.forEach(o=>{i[e(o)]=p(...t,o)}) | ||
n.sort(r).map(({name:r,exportList:n})=>{if(s.length||o(r))i[e(r)]={"@@|export":n} | ||
else{i[r]={"@@|hoist":n} | ||
i["@@|export-hoist"]=[...i["@@|export-hoist"]||[],...n]}p(...t,r)["@@|export"]=n})}) | ||
return s}) |
var e=require("fs") | ||
var r=require("dr-js/library/common/format") | ||
exports.wrapFileProcessor=(({processor:s,logger:o})=>async t=>{const c=(0,e.readFileSync)(t,"utf8") | ||
const i=await s(c,t) | ||
if(c===i){o.log(`process skipped ${t}`) | ||
return 0}const{size:n}=(0,e.statSync)(t) | ||
i?(0,e.writeFileSync)(t,i):(0,e.unlinkSync)(t) | ||
const{size:a}=i?(0,e.statSync)(t):{size:0} | ||
const p=a-n | ||
o.devLog(`∆${(a/n).toFixed(2)}(${(0,r.binary)(p)}B)`,`${(0,r.binary)(n)}B → ${(0,r.binary)(a)}B`,`${t}`) | ||
return a-n}) | ||
var s=require("./__utils__") | ||
exports.wrapFileProcessor=(({processor:o,logger:t,quiet:i=!s.__VERBOSE__})=>async s=>{const c=(0,e.readFileSync)(s,"utf8") | ||
const n=await o(c,s) | ||
if(c===n){!i&&t.log(`process skipped ${s}`) | ||
return 0}const{size:a}=(0,e.statSync)(s) | ||
n?(0,e.writeFileSync)(s,n):(0,e.unlinkSync)(s) | ||
const{size:l}=n?(0,e.statSync)(s):{size:0} | ||
const p=l-a | ||
t.devLog(`∆${(l/a).toFixed(2)}(${(0,r.binary)(p)}B)`,`${(0,r.binary)(a)}B → ${(0,r.binary)(l)}B`,`${s}`) | ||
return l-a}) | ||
exports.fileProcessorBabel=(e=>e.replace(/['"]use strict['"];?\s*/g,"").replace(/Object\.defineProperty\(exports,\s*['"]__esModule['"],\s*{\s*value:\s*(true|!0)\s*}\)[;,]?\s*/g,"").replace(/(exports\.\w+\s*=\s*)+(undefined|void 0)[;,]?\s*/g,"").replace(/[\n\r]{2,}/g,"\n").replace(/^[\n\r]+/,"")) | ||
exports.fileProcessorWebpack=(e=>e.replace(/function\s*\(\)\s*{\s*return\s+([\w$]+)\s*}/g,"()=>$1")) |
var e=require("./__utils__") | ||
exports.getLogger=((o="dev-dep",_=160)=>{const t=(0,e.loadEnvKey)("__DEV_LOGGER_TITLE__") | ||
o=t?`${o}|${t}`:o;(0,e.saveEnvKey)("__DEV_LOGGER_TITLE__",o) | ||
const n=` [${o}]` | ||
const o=()=>{} | ||
exports.getLogger=((_="dev-dep",t=!1,n=120)=>{const g=(0,e.loadEnvKey)("__DEV_LOGGER_TITLE__") | ||
_=g?`${_}|${g}`:_;(0,e.saveEnvKey)("__DEV_LOGGER_TITLE__",_) | ||
const s=` [${_}]` | ||
const r=(...e)=>console.log(`- ${e.join(" ")}`) | ||
return{padLog:(...e)=>console.log(`\n## ${e.join(" ")} `.padEnd(_-n.length,"-")+n),log:r,devLog:e.__VERBOSE__?r:()=>{}}}) | ||
const d=e.__VERBOSE__?r:o | ||
return t?{padLog:r,log:d,devLog:o}:{padLog:(...e)=>console.log(`\n## ${e.join(" ")} `.padEnd(n-s.length,"-")+s),log:r,devLog:d}}) |
@@ -6,22 +6,23 @@ var e=require("path") | ||
var r=require("dr-js/library/common/format") | ||
var l=require("./__utils__") | ||
exports.getUglifyESOption=(({isDevelopment:e=!1,isModule:i=!1})=>{return{ecma:8,toplevel:!0,parse:{ecma:8},compress:{ecma:8,toplevel:!0,join_vars:!1,sequences:!1,global_defs:{"process.env.NODE_ENV":e?"development":"production",__DEV__:Boolean(e)},inline:!1},mangle:!i&&{toplevel:!0},output:i?{ecma:8,beautify:!0,indent_level:2,width:240}:{ecma:8,beautify:!1,semicolons:!1},sourceMap:!1}}) | ||
const l=({filePath:e,option:r,logger:l})=>{const n=(0,o.clock)() | ||
const n=({filePath:e,option:r,logger:l})=>{const n=(0,o.clock)() | ||
const s=(0,i.readFileSync)(e,{encoding:"utf8"}) | ||
const{error:a,code:c}=t.default.minify(s,r) | ||
if(a){l.log(`[minifyWithUglifyEs] failed to minify file: ${e}`) | ||
if(a){l.padLog(`[minifyWithUglifyEs] failed to minify file: ${e}`) | ||
throw a}(0,i.writeFileSync)(e,c) | ||
const f=(0,o.clock)() | ||
return{sizeSource:Buffer.byteLength(s),sizeOutput:Buffer.byteLength(c),timeStart:n,timeEnd:f}} | ||
exports.minifyWithUglifyEs=l | ||
exports.minifyFileListWithUglifyEs=(async({fileList:i,option:t,rootPath:n="",logger:s})=>{s.padLog(`minify ${i.length} file with uglify-es`) | ||
const a=[] | ||
let c=(0,o.clock)() | ||
let f=0 | ||
let u=0 | ||
for(const o of i){const{sizeSource:i,sizeOutput:c,timeStart:p,timeEnd:d}=l({filePath:o,option:t,logger:s}) | ||
const m=c-i | ||
a.push([`∆ ${(100*m/i).toFixed(2)}% (${(0,r.binary)(m)}B)`,(0,r.time)(d-p),`${(0,e.relative)(n,o)}`]) | ||
f+=i | ||
u+=m}a.push(["--","--","--"]) | ||
a.push([`∆ ${(100*u/f).toFixed(2)}% (${(0,r.binary)(u)}B)`,(0,r.time)((0,o.clock)()-c),`TOTAL of ${i.length} file (${(0,r.binary)(f)}B)`]) | ||
s.log(`result:\n ${(0,r.padTable)({table:a,cellPad:" | ",rowPad:"\n ",padFuncList:[(e,i)=>e.padEnd(i),void 0,e=>e]})}`)}) | ||
exports.minifyWithUglifyEs=n | ||
exports.minifyFileListWithUglifyEs=(async({fileList:i,option:t,rootPath:s="",logger:a,quiet:c=!l.__VERBOSE__})=>{a.padLog(`minify ${i.length} file with uglify-es`) | ||
const f=[] | ||
let u=(0,o.clock)() | ||
let p=0 | ||
let d=0 | ||
for(const o of i){const{sizeSource:i,sizeOutput:l,timeStart:u,timeEnd:m}=n({filePath:o,option:t,logger:a}) | ||
const y=l-i | ||
!c&&f.push([`∆ ${(100*y/i).toFixed(2)}% (${(0,r.binary)(y)}B)`,(0,r.time)(m-u),`${(0,e.relative)(s,o)}`]) | ||
p+=i | ||
d+=y}!c&&f.push(["--","--","--"]) | ||
f.push([`∆ ${(100*d/p).toFixed(2)}% (${(0,r.binary)(d)}B)`,(0,r.time)((0,o.clock)()-u),`TOTAL of ${i.length} file (${(0,r.binary)(p)}B)`]) | ||
a.log(`result:\n ${(0,r.padTable)({table:f,cellPad:" | ",rowPad:"\n ",padFuncList:[(e,i)=>e.padEnd(i),void 0,e=>e]})}`)}) |
@@ -5,2 +5,3 @@ var e=require("fs") | ||
var o=require("dr-js/library/node/system/ProcessExitListener") | ||
var i=require("./__utils__") | ||
const s=(e,t)=>(r,o)=>{if(r)return e(r) | ||
@@ -11,17 +12,17 @@ if(o.hasErrors()||o.hasWarnings()){const{errors:t=[],warnings:r=[]}=o.toJson() | ||
if(o.hasErrors())return e(new Error("webpack stats Error"))}t(o)} | ||
exports.compileWithWebpack=(async({config:i,isWatch:a,profileOutput:n,logger:c})=>{n&&a&&c.log("[watch] warning: skipped generate profileOutput") | ||
n&&(i.profile=!0) | ||
const l=(0,t.default)(i) | ||
const p=((e,t)=>{const o=({compilation:{assets:o},startTime:s,endTime:i})=>{e&&t.padLog("watch") | ||
exports.compileWithWebpack=(async({config:a,isWatch:n,profileOutput:c,logger:l,quiet:u=!i.__VERBOSE__})=>{c&&n&&l.log("[watch] warning: skipped generate profileOutput") | ||
c&&(a.profile=!0) | ||
const p=(0,t.default)(a) | ||
const g=((e,t,o)=>{const i=o?({startTime:e,endTime:o})=>{e&&o&&t.log(`compile time: ${(0,r.time)(o-e)}`)}:({compilation:{assets:o},startTime:i,endTime:s})=>{e&&t.padLog("watch") | ||
Object.entries(o).forEach(([e,o])=>o.emitted&&t.log(`emitted asset: ${e} [${(0,r.binary)(o.size())}B]`)) | ||
s&&i&&t.log(`compile time: ${(0,r.time)(i-s)}`)} | ||
return e=>{if(e.compilation)o(e) | ||
i&&s&&t.log(`compile time: ${(0,r.time)(s-i)}`)} | ||
return e=>{if(e.compilation)i(e) | ||
else{if(!e.stats){console.warn("[getLogStats] unexpected statData",e) | ||
throw new Error("[getLogStats] unexpected statData")}e.stats.map(o)}}})(a,c) | ||
if(a){c.log("[watch] start") | ||
const{eventType:e,code:t}=await new Promise(e=>{l.watch({aggregateTimeout:300,poll:void 0},s(e=>c.log(`error: ${e}`),p));(0,o.setProcessExitListener)({listenerSync:e})}) | ||
c.log(`[watch] exit with eventType: ${e}, code: ${t}`) | ||
return null}const u=await new Promise((e,t)=>l.run(s(t,e))) | ||
p(u) | ||
if(n){(0,e.writeFileSync)(n,JSON.stringify(u.toJson())) | ||
c.log(`generated profileOutput: ${n}`)}return u}) | ||
throw new Error("[getLogStats] unexpected statData")}e.stats.map(i)}}})(n,l,u) | ||
if(n){!u&&l.log("[watch] start") | ||
const{eventType:e,code:t}=await new Promise(e=>{p.watch({aggregateTimeout:300,poll:void 0},s(e=>l.log(`error: ${e}`),g));(0,o.setProcessExitListener)({listenerSync:e})}) | ||
!u&&l.log(`[watch] exit with eventType: ${e}, code: ${t}`) | ||
return null}const m=await new Promise((e,t)=>p.run(s(t,e))) | ||
g(m) | ||
if(c){(0,e.writeFileSync)(c,JSON.stringify(m.toJson())) | ||
!u&&l.log(`generated profileOutput: ${c}`)}return m}) |
@@ -1,1 +0,1 @@ | ||
{"name":"dev-dep-tool","version":"0.1.0-dev.0","author":"dr-js","license":"MIT","description":"Provide common package devDependencies","keywords":["Dr","Dr-js","JavaScript"],"repository":"https://github.com/dr-js/dev-dep.git","homepage":"https://github.com/dr-js/dev-dep#readme","bugs":"https://github.com/dr-js/dev-dep/issues","bin":"bin/index.js","dependencies":{"dr-js":"^0.12.1-dev.2"},"sideEffects":false} | ||
{"name":"dev-dep-tool","version":"0.1.0","author":"dr-js","license":"MIT","description":"Provide common package devDependencies","keywords":["Dr","Dr-js","JavaScript"],"repository":"https://github.com/dr-js/dev-dep.git","homepage":"https://github.com/dr-js/dev-dep#readme","bugs":"https://github.com/dr-js/dev-dep/issues","bin":"bin/index.js","dependencies":{"dr-js":"^0.12.1"},"sideEffects":false} |
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
21656
313
Updateddr-js@^0.12.1