make-dev-fast
Advanced tools
Comparing version 0.2.17 to 0.2.18
@@ -30,2 +30,3 @@ var __create = Object.create; | ||
var import_where = __toModule(require("./where")); | ||
var import_static = __toModule(require("./static")); | ||
class CLI extends import_command_core.CoreBaseCLI { | ||
@@ -54,2 +55,3 @@ loadExtensions() { | ||
this.core.addPlugin(import_where.WherePlugin); | ||
this.core.addPlugin(import_static.StaticServerPlugin); | ||
} | ||
@@ -56,0 +58,0 @@ async loadDefaultOptions() { |
@@ -30,5 +30,7 @@ var __create = Object.create; | ||
getGlobalCache: () => getGlobalCache, | ||
getIp: () => getIp, | ||
getVersion: () => getVersion, | ||
setCache: () => setCache, | ||
sleep: () => sleep | ||
sleep: () => sleep, | ||
time: () => time | ||
}); | ||
@@ -107,5 +109,5 @@ var import_child_process = __toModule(require("child_process")); | ||
}; | ||
const sleep = (time) => { | ||
const sleep = (time2) => { | ||
return new Promise((resolve) => { | ||
setTimeout(resolve, time || 1e3); | ||
setTimeout(resolve, time2 || 1e3); | ||
}); | ||
@@ -121,2 +123,20 @@ }; | ||
}; | ||
const time = () => { | ||
const date = new Date(); | ||
return `${padZero(date.getMonth() + 1)}/${padZero(date.getDate())} ${padZero(date.getHours())}:${padZero(date.getMinutes())}:${padZero(date.getSeconds())}`; | ||
}; | ||
const padZero = (num, len = 2) => { | ||
return ("0000" + num).slice(-len); | ||
}; | ||
const getIp = () => { | ||
const interfaces = (0, import_os.networkInterfaces)(); | ||
for (const devName in interfaces) { | ||
const iface = interfaces[devName]; | ||
for (const alias of iface) { | ||
if (alias.family === "IPv4" && alias.address !== "127.0.0.1" && !alias.internal) { | ||
return alias.address; | ||
} | ||
} | ||
} | ||
}; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
@@ -129,5 +149,7 @@ 0 && (module.exports = { | ||
getGlobalCache, | ||
getIp, | ||
getVersion, | ||
setCache, | ||
sleep | ||
sleep, | ||
time | ||
}); |
{ | ||
"name": "make-dev-fast", | ||
"version": "0.2.17", | ||
"version": "0.2.18", | ||
"description": "make-dev-fast", | ||
@@ -22,2 +22,4 @@ "main": "./dist/index.js", | ||
"fs-extra": "^10.0.0", | ||
"koa": "^2.14.2", | ||
"koa-static": "^5.0.0", | ||
"light-spinner": "^1.0.4", | ||
@@ -24,0 +26,0 @@ "minimist": "^1.2.0", |
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
34712
8
922
8
7
+ Addedkoa@^2.14.2
+ Addedkoa-static@^5.0.0
+ Addedaccepts@1.3.8(transitive)
+ Addedcache-content-type@1.0.1(transitive)
+ Addedco@4.6.0(transitive)
+ Addedcontent-disposition@0.5.4(transitive)
+ Addedcontent-type@1.0.5(transitive)
+ Addedcookies@0.9.1(transitive)
+ Addeddebug@3.2.74.3.7(transitive)
+ Addeddeep-equal@1.0.1(transitive)
+ Addeddelegates@1.0.0(transitive)
+ Addeddepd@1.1.22.0.0(transitive)
+ Addeddestroy@1.2.0(transitive)
+ Addedee-first@1.1.1(transitive)
+ Addedencodeurl@1.0.2(transitive)
+ Addedescape-html@1.0.3(transitive)
+ Addedfresh@0.5.2(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhas-tostringtag@1.0.2(transitive)
+ Addedhttp-assert@1.5.0(transitive)
+ Addedhttp-errors@1.6.31.8.1(transitive)
+ Addedinherits@2.0.32.0.4(transitive)
+ Addedis-generator-function@1.0.10(transitive)
+ Addedkeygrip@1.1.0(transitive)
+ Addedkoa@2.15.3(transitive)
+ Addedkoa-compose@4.2.0(transitive)
+ Addedkoa-convert@2.0.0(transitive)
+ Addedkoa-send@5.0.1(transitive)
+ Addedkoa-static@5.0.0(transitive)
+ Addedmedia-typer@0.3.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedms@2.1.3(transitive)
+ Addednegotiator@0.6.3(transitive)
+ Addedon-finished@2.4.1(transitive)
+ Addedonly@0.0.2(transitive)
+ Addedparseurl@1.3.3(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedresolve-path@1.4.0(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsetprototypeof@1.1.01.2.0(transitive)
+ Addedstatuses@1.5.0(transitive)
+ Addedtoidentifier@1.0.1(transitive)
+ Addedtsscmp@1.0.6(transitive)
+ Addedtype-is@1.6.18(transitive)
+ Addedvary@1.1.2(transitive)
+ Addedylru@1.4.0(transitive)