dev-dep-tool
Advanced tools
Comparing version 0.3.2-dev.0 to 0.3.2-dev.1
@@ -25,3 +25,3 @@ var e=require("dr-js/library/common/format") | ||
o.then(a,a) | ||
setTimeout(i,3e4) | ||
setTimeout(i,42e3) | ||
const{code:l,signal:u}=await c.catch(async()=>{console.warn("[checkNpmOutdated] timeout") | ||
@@ -28,0 +28,0 @@ "win32"===process.platform?(0,r.runSync)({command:"taskkill",argList:["-F","-T","-PID",s.pid],option:{stdio:"ignore"}}):s.kill() |
@@ -10,3 +10,3 @@ #!/usr/bin/env node | ||
i&&await(0,a.doPack)({pathInput:o("path-input"),pathOutput:o("path-output"),outputName:p("output-name"),outputVersion:p("output-version"),outputDescription:p("output-description"),isPublish:p("publish"),isPublishDev:p("publish-dev")})})({isCheckOutdated:n,isPack:s},{getSingleOption:o,getSingleOptionOptional:p}).catch(t=>{console.warn("[Error]",t.stack||t) | ||
process.exit(2)}):p("version")?console.log(JSON.stringify({packageName:i.name,packageVersion:i.version},null," ")):console.log((0,t.formatUsage)())})().catch(e=>{console.warn((0,t.formatUsage)(e.stack||e,"simple")) | ||
process.exit(2)}):p("version")?console.log(JSON.stringify({packageName:i.name,packageVersion:i.version},null," ")):console.log((0,t.formatUsage)(null,p("help")?null:"simple"))})().catch(e=>{console.warn((0,t.formatUsage)(e.stack||e,"simple")) | ||
process.exit(1)}) |
@@ -5,3 +5,3 @@ var e=require("child_process") | ||
exports.tryExec=t | ||
exports.getGitBranch=(()=>t("git symbolic-ref --short HEAD",{stdio:"pipe"}).replace("\n","")) | ||
exports.getGitCommitHash=(()=>t('git log -1 --format="%H"',{stdio:"pipe"}).replace("\n","")) | ||
exports.getGitBranch=(()=>t("git symbolic-ref --short HEAD",{stdio:"pipe"}).replace("\n","").trim()) | ||
exports.getGitCommitHash=(()=>t('git log -1 --format="%H"',{stdio:"pipe"}).replace("\n","").trim()) |
var e=require("path") | ||
var r=require("fs") | ||
var t=require("babylon") | ||
var t=require("@babel/parser") | ||
var o=require("dr-js/library/common/compare") | ||
var i=require("dr-js/library/common/mutable/Object") | ||
var s=require("dr-js/library/node/file/File") | ||
exports.createExportParser=(({babylonPluginList:a,logger:n})=>{let c={} | ||
const p=e=>{const r=e.join("/") | ||
c[r]||(c[r]={routeList:e,directoryList:[],fileList:[]}) | ||
return c[r]} | ||
exports.createExportParser=(({babylonPluginList:a,parserPluginList:n=a,logger:c})=>{let p={} | ||
const l=e=>{const r=e.join("/") | ||
p[r]||(p[r]={routeList:e,directoryList:[],fileList:[]}) | ||
return p[r]} | ||
return{parseExport:async o=>{const i=await(0,s.getPathStat)(o) | ||
const c=o.split(e.sep) | ||
const l=c.pop() | ||
if(i.isDirectory()){n.devLog(`[directory] ${o}`) | ||
p(c).directoryList.push(l)}else if(i.isFile()&&l.endsWith(".js")){const e=((e,r,o)=>{const i=(0,t.parse)(e,{sourceFilename:r,sourceType:"module",plugins:o||["objectRestSpread","classProperties","exportDefaultFrom","exportNamespaceFrom","jsx"]}).program.body.filter(({type:e})=>"ExportNamedDeclaration"===e) | ||
return[].concat(...i.map(({specifiers:e,declaration:r})=>r?r.declarations?r.declarations.map(({id:{name:e}})=>e):[r.id.name]:e.map(({exported:{name:e}})=>e)))})((0,r.readFileSync)(o,{encoding:"utf8"}),o,a) | ||
n.devLog(`[file] ${o}`) | ||
const a=o.split(e.sep) | ||
const p=a.pop() | ||
if(i.isDirectory()){c.devLog(`[directory] ${o}`) | ||
l(a).directoryList.push(p)}else if(i.isFile()&&p.endsWith(".js")){const e=((e,r,o)=>{const i=(0,t.parse)(e,{sourceFilename:r,sourceType:"module",plugins:o||["objectRestSpread","classProperties","exportDefaultFrom","exportNamespaceFrom","jsx"]}).program.body.filter(({type:e})=>"ExportNamedDeclaration"===e) | ||
return[].concat(...i.map(({specifiers:e,declaration:r})=>r?r.declarations?r.declarations.map(({id:{name:e}})=>e):[r.id.name]:e.map(({exported:{name:e}})=>e)))})((0,r.readFileSync)(o,{encoding:"utf8"}),o,n) | ||
c.devLog(`[file] ${o}`) | ||
if(!e.length)return | ||
p(c).fileList.push({name:l.slice(0,-3),exportList:e}) | ||
n.devLog(` export [${e.length}]: ${e.join(", ")}`)}else n.devLog(`[skipped] ${o} (${(0,s.getPathTypeFromStat)(i)})`)},getSourceRouteMap:()=>{const e=(e=>{Object.values(e).forEach(({routeList:e,directoryList:r,fileList:t})=>{r.sort(o.compareString) | ||
l(a).fileList.push({name:p.slice(0,-3),exportList:e}) | ||
c.devLog(` export [${e.length}]: ${e.join(", ")}`)}else c.devLog(`[skipped] ${o} (${(0,s.getPathTypeFromStat)(i)})`)},getSourceRouteMap:()=>{const e=(e=>{Object.values(e).forEach(({routeList:e,directoryList:r,fileList:t})=>{r.sort(o.compareString) | ||
t.sort(({name:e},{name:r})=>(0,o.compareString)(e,r)) | ||
t.forEach(({exportList:e})=>e.sort(o.compareString))});(0,i.objectSortKey)(e) | ||
return e})(c) | ||
c={} | ||
return e})(p) | ||
p={} | ||
return e}}}) |
@@ -1,1 +0,1 @@ | ||
{"name":"dev-dep-tool","version":"0.3.2-dev.0","author":"dr-js","license":"MIT","description":"Provide common package devDependencies","keywords":["Dr","Dr-js","JavaScript"],"repository":"github:dr-js/dev-dep","bin":"bin/index.js","engines":{"node":">=8.10","npm":">=6"},"dependencies":{"dr-js":"^0.16.2"},"sideEffects":false} | ||
{"name":"dev-dep-tool","version":"0.3.2-dev.1","author":"dr-js","license":"MIT","description":"Provide common package devDependencies","keywords":["Dr","Dr-js","JavaScript"],"repository":"github:dr-js/dev-dep","bin":"bin/index.js","engines":{"node":">=8.10","npm":">=6"},"dependencies":{"dr-js":"0.16.3-dev.0"},"sideEffects":false} |
# dev-dep-tool | ||
[![i:npm]][l:npm] | ||
[![i:size]][l:size] | ||
[![i:lint]][l:lint] | ||
[![i:npm-dev]][l:npm] | ||
@@ -15,4 +17,7 @@ Provide common package devDependencies | ||
[i:npm]: https://img.shields.io/npm/v/dev-dep-tool.svg | ||
[i:npm]: https://img.shields.io/npm/v/dev-dep-tool.svg?colorB=blue | ||
[i:npm-dev]: https://img.shields.io/npm/v/dev-dep-tool/dev.svg | ||
[l:npm]: https://www.npmjs.com/package/dev-dep-tool | ||
[i:size]: https://packagephobia.now.sh/badge?p=dev-dep-tool | ||
[l:size]: https://packagephobia.now.sh/result?p=dev-dep-tool | ||
[i:lint]: https://img.shields.io/badge/code_style-standard-yellow.svg | ||
@@ -19,0 +24,0 @@ [l:lint]: https://standardjs.com |
22775
37
+ Addeddr-js@0.16.3-dev.0(transitive)
- Removeddr-js@0.16.2(transitive)
Updateddr-js@0.16.3-dev.0