jja 2.2.3 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/package.json +7 -6
- package/src/command.mjs +1 -1
- package/src/dns/checkIp.mjs +1 -0
- package/src/dns/data-store.mjs +1 -0
- package/src/dns/getIdByDnsServer.mjs +1 -0
- package/src/dns/getIp.mjs +1 -0
- package/src/dns/getLocalIp.mjs +1 -0
- package/src/dns/index.mjs +1 -0
- package/src/dns/printResult.mjs +1 -0
- package/src/main.mjs +1 -1
- package/src/package/diff/data-store.mjs +1 -1
- package/src/package/diff/dependencies.mjs +1 -1
- package/src/package/diff/diffVersion.mjs +1 -1
- package/src/package/diff/getLatestVersion.mjs +1 -1
- package/src/package/diff/getVersion.mjs +1 -1
- package/src/package/diff/installation.mjs +1 -1
- package/src/pen.mjs +1 -1
- package/src/github/byDns.mjs +0 -1
- package/src/github/byHttp.mjs +0 -1
- package/src/github/byPing.mjs +0 -1
- package/src/github/getIp.mjs +0 -1
- package/src/github/index.mjs +0 -1
- package/src/github/wheel.mjs +0 -1
package/README.md
CHANGED
|
@@ -48,6 +48,24 @@ npx jja up
|
|
|
48
48
|
|
|
49
49
|
升级前尽量保证你的功能完善,且 git 目录干净
|
|
50
50
|
|
|
51
|
+
### dns
|
|
52
|
+
|
|
53
|
+
添加了域名解析,使用线上的域名,目前仅支持 `A` 记录的查询
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# 简单使用(将返回 github.com 的解析地址)
|
|
57
|
+
npx jja dns
|
|
58
|
+
# 使用自定义的网址
|
|
59
|
+
npx jja dns --domain=www.npmjs.com
|
|
60
|
+
npx jja dns -d=www.npmjs.com
|
|
61
|
+
# 使用自定义的判断联通的接口(默认 443)
|
|
62
|
+
npx jja dns --port=80
|
|
63
|
+
npx jja dns -p=80
|
|
64
|
+
# 展示每一个测试的 dns 信息
|
|
65
|
+
npx jja dns --not-covered
|
|
66
|
+
npx jja dns -n
|
|
67
|
+
```
|
|
68
|
+
|
|
51
69
|
## 📄 文档地址
|
|
52
70
|
|
|
53
71
|
参看 [https://earthnut.dev/jja/](https://earthnut.dev/jja/)
|
package/package.json
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jja",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.3.0",
|
|
5
5
|
"description": "一些在终端的执行动作 🥜",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@qqi/
|
|
9
|
-
"
|
|
10
|
-
"a-
|
|
11
|
-
"a-
|
|
8
|
+
"@qqi/copy-text": ">=0.0.0 <1.0.0",
|
|
9
|
+
"@qqi/dev-log": ">=0.2.0 <1.0.0",
|
|
10
|
+
"a-command": ">=2.1.7 <3.0.0",
|
|
11
|
+
"a-js-tools": ">=0.6.1 <1.0.0",
|
|
12
|
+
"a-node-tools": ">=3.0.0 <4.0.0",
|
|
12
13
|
"a-type-of-js": ">=0.2.0 <1.0.0",
|
|
13
|
-
"color-pen": "^1.3.
|
|
14
|
+
"color-pen": "^1.3.2"
|
|
14
15
|
},
|
|
15
16
|
"author": {
|
|
16
17
|
"name": "🥜",
|
package/src/command.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Command as e}from"a-command";import r from"color-pen";import{dog as
|
|
1
|
+
import{Command as e}from"a-command";import r from"color-pen";import{dog as n}from"./dog.mjs";import{redPen as o,hexPen as i}from"./pen.mjs";const m=new e("jja");m.bind({"package <pkg> (包管理)":["--diff <-d> (分析当下包的差异)","--upDependencies <-u> (更新依赖,强制更新到 'latest',使用需谨慎)"],"remove <rm> (做一个简单的兼容的移除文件或文件夹的命令)":["--ignore <-i> (不打印日志(默认打印的))","--subdirectories <-s> (这是一个危险的命令,用于 windows 下递归删除执行命令下所有的给定文件名称)"],"update <up> (做一个简单的 npm 升级程序,对,简单的)":["--ignore <-i> (不建议你这么用,你会发现你像个傻子一样在那等结果)",`--dependencies <-d> (更新依赖,跟 ${r.random("npm update")} 一样)`],"clearScreen <cls> (清理终端显示屏幕,同 clearTerminal )":"","clearTerminal <clear> (清理终端显示屏幕,同 clearScreen )":"","git (一些关于 git 的操作)":[`commit (git 提交代码,是 ${o("commit")} 提交啊,不是 ${i("#666")("push")} 推送)`,"merge (合并两个分支)","tag (给提交打上 tag)"],"dns (使用 dns 获取 ip 地址)":["--domain <-d> (获取给定域名获取 ip 地址,默认 github.com )","--port <-p> (配置要校验的 port 端口号,默认为 443)","--not-covered <-n> (不覆盖解析过程,默认不展示)"]}).run(),n("参数已绑定,且已解析用户参数",m.args),n.warn("当前的执行状态",m.state),m.isEnd(!0);export{m as command};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{dog as o}from"../dog.mjs";import t from"node:net";import{dataStore as e}from"./data-store.mjs";async function r(r,n=3e3){const{ips:s,port:m}=e;if(void 0===s[r])return o(`校验 ${r} 的联通性`),new Promise((e=>{const s=new t.Socket;s.setTimeout(n),s.on("connect",(()=>{s.destroy(),e(!0)})),s.on("timeout",(()=>{s.destroy(),e(!1)})),s.on("error",(()=>{s.destroy(),e(!1)})),o("测试的接口为:",m),s.connect(m,r)}));o(`${r} 联通性已校验过 ${s[r]?"🔥":"⛓️💥"}`)}export{r as checkIp};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isUndefined as t}from"a-type-of-js";import{intersection as o}from"a-js-tools";const r=["A","AAAA","ANY","CAA","CNAME","MX","NAPTR","NS","PTR","SOA","SRV","TLSA","TXT"],e={domain:"github.com",port:443,notCovered:!1,dnsServers:["1.1.1.1","8.8.8.8","8.8.4.4","9.9.9.9","208.67.222.222","114.114.115.115","223.5.5.5","180.76.76.76"],ips:{},rrtype:["A"],reset(e){this.ips={},this.domain="github.com",this.port=443,this.notCovered=!1,this.rrtype=[],t(e)||e.forEach((e=>{const s=e["--domain"];!t(s)&&s.length>0&&(this.domain=s[0].toString());const i=e["--port"];!t(i)&&i.length>0&&(this.port=Number(i[0]));const n=e["--not-covered"];t(n)||!1===n[0]||(this.notCovered=!0);const h=e["--rrtype"];if(!t(h)&&h.length>0){const t=o(r,h);t.length>0&&(this.rrtype=t)}}))}};export{e as dataStore,r as rrtypeList};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{dog as r}from"../dog.mjs";import{Resolver as o}from"node:dns";import{checkIp as e}from"./checkIp.mjs";import{isUndefined as t}from"a-type-of-js";import{dataStore as i}from"./data-store.mjs";async function s(s="1.1.1.1"){const n=new o;n.setServers([s]);const{domain:m,ips:a}=i;try{const o=await new Promise((o=>{n.resolve4(m,((e,t)=>{if(e)return r.error(`使用 ${s} 获取 ${m} 的 ip 出错`,e),void o(void 0);r(`使用 ${s} 获取 ${m} 的 ip 值为 ${t.join(" --- ")}`),o(t)}))}));if(t(o))return{dnsServer:s,error:"获取 ip 错误"};const i=await Promise.all(o.map((async r=>{const o=await e(r);return t(o)||(a[r]=o),{ip:r.padEnd(16," "),isAlive:t(o)?a[r]:o}})));return{dnsServer:s,results:i}}catch(o){return r.error("获取 ip 错误",o),{dnsServer:s,error:o}}}export{s as getIdByDnsServer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_p as o,cursorMoveUp as r,cursorAfterClear as t}from"a-node-tools";import{dataStore as e}from"./data-store.mjs";import{isUndefined as s}from"a-type-of-js";import{getIdByDnsServer as m}from"./getIdByDnsServer.mjs";import n,{strInOneLineOnTerminal as i}from"color-pen";import{dog as p}from"../dog.mjs";import{greenPen as f,orangePen as a,pen666 as d,redPen as c}from"../pen.mjs";async function $(){const{domain:$,dnsServers:l,notCovered:v}=e;let j=0;o(`${$} ip 列表:`);for(const e of l){const{dnsServer:$,results:l}=await m(e);s(l)?p.warn(`${$} 获取 ip 失败`):(v||0===j||(r(j),t(!0)),o(),o(n.reversed`DNS: ${$}`),o(),l.forEach((({ip:r,isAlive:t})=>{const e=t?`${f(r)} ${a`->`} ✅`:`${d(r)} ${c`⛓️💥`} ❌`;o(i(e))})),j=3+l.length)}v||(r(j+1),t(!0))}export{$ as getIp};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{dog as r}from"../dog.mjs";import o from"node:dns";import{dataStore as i}from"./data-store.mjs";import{isUndefined as t}from"a-type-of-js";import{checkIp as e}from"./checkIp.mjs";import{_p as m}from"a-node-tools";import{orangePen as n,cyanPen as s,pen666 as a}from"../pen.mjs";async function p(){const{domain:p,ips:f}=i;try{const i=await new Promise((i=>{o.lookup(p,{all:!0,family:4},((o,t)=>{if(o)return r.error(`获取本地 ${p} 的 ip 出错`,o),void i(void 0);r(`获取本地 ${p} 的 ip 值为 ${t.join(" --- ")}`),i(t.map((r=>r.address)))}))}));if(t(i))return{error:"获取 ip 错误"};const c=await Promise.all(i.map((async r=>{const o=await e(r);return t(o)||(f[r]=o),{ip:r.padEnd(16," "),isAlive:t(o)?f[r]:o}})));return c.length>0&&(m(n`本地配置 ${p} 的 ip 地址及联通性为:\n`),c.forEach((r=>{m(s`- ${r.ip}`,!1),m(r.isAlive?n` -> ✅`:a` -> ❌`)})),m()),{results:c}}catch(o){return r.error(o),{error:o}}}export{p as getLocalIp};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{dataStore as t}from"./data-store.mjs";import{printResult as o}from"./printResult.mjs";import{getIp as m}from"./getIp.mjs";import{getLocalIp as r}from"./getLocalIp.mjs";async function s(s){t.reset(s.options),await r(),await m();const{ips:e}=t;Object.keys(e).length>0&&o()}export{s as dns};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_p as o}from"a-node-tools";import t from"color-pen";import{dataStore as r}from"./data-store.mjs";import{greenPen as n,orangePen as i,pen666 as p,redPen as m}from"../pen.mjs";function a(){const{domain:a,ips:$,port:e}=r;o(`${t.brightMagenta`${a}`} 域名解析结果:`),o();for(const t in $)if(Object.prototype.hasOwnProperty.call($,t)){const r=$[t];o(r?`${n`- ${t.padEnd(16)}`} ${i`->`} ✅`:`${p`- ${t.padEnd(16)}`} ${m`⛓️💥`} ❌`)}o(),o(m.italic.dim`${a} 联通性接口判断为 ${e.toString()}`),o()}export{a as printResult};
|
package/src/main.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dog as a}from"./dog.mjs";import{command as
|
|
1
|
+
import{dog as a}from"./dog.mjs";import{command as r}from"./command.mjs";import{remove as t}from"./remove/index.mjs";import i from"./update/index.mjs";import{packageManage as e}from"./package/index.mjs";import{clearScreen as n}from"./clearScreen.mjs";import m from"./git/index.mjs";import{isUndefined as o}from"a-type-of-js";import{dns as p}from"./dns/index.mjs";const s=r.args.$arrMap;0===r.args.$only.length&&(a("没有匹配到子命令,打印帮助信息并退出"),r.help(),r.end());try{await async function c(){0===s.length&&r.end();const d=s.shift();if(o(d))return await c();"remove"in d?(a("执行文件移除"),await t(d.remove)):"clearScreen"in d||"clear"in d?(a("执行清屏"),await n()):"git"in d?(a("执行 git 相关命令"),await m(d.git)):"package"in d?(a("执行 package 相关命令"),await e(d.package)):"update"in d?(a("执行 update 相关命令"),await i(d.update)):"dns"in d&&(a("执行 dns 相关的命令"),await p(d.dns));try{await c()}catch(r){a.error("执行 run 报错",r)}}()}catch(r){a.error("执行 run 报错",r)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isUndefined as e}from"a-type-of-js";const n={local:null,online:null,dependenceList:{},updateDependence:[],latestDependence:[],binning:function(n,t=!1){if(!e(n))for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)){const o=n[e];this.dependenceList[e]={type:t?"devDependencies":"dependencies",version:o,localVersion:"",latestVersion:"",onlineVersion:"",tag:"",time:""}}},preReleaseDependence:[]};export{n as diffData};
|
|
1
|
+
import{isUndefined as e}from"a-type-of-js";const n={local:null,online:null,dependenceList:{},updateDependence:[],latestDependence:[],binning:function(n,t=!1){if(!e(n))for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)){const o=n[e];this.dependenceList[e]={type:t?"devDependencies":"dependencies",version:o,localVersion:"",latestVersion:"",onlineVersion:"",tag:"",time:""}}},preReleaseDependence:[],timeoutDependence:[]};export{n as diffData};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{italicPen as
|
|
1
|
+
import{pen666 as e,redPen as t,italicPen as n}from"../../pen.mjs";import{_p as i}from"a-node-tools";import{diffVersion as o}from"./diffVersion.mjs";import r,{strInOneLineOnTerminal as a}from"color-pen";import{diffData as m}from"./data-store.mjs";import{isNull as s}from"a-type-of-js";import{installation as l}from"./installation.mjs";import{latestPen as p}from"./latestPen.mjs";import{tagPen as g}from"./tagPen.mjs";import{printInOneLine as c}from"../../printInOneLine.mjs";async function d(){const{local:d,preReleaseDependence:f,latestDependence:h,dependenceList:b,timeoutDependence:j}=m;if(s(d))return;const{dependencies:u,devDependencies:y}=d;if(m.binning(u),m.binning(y,!0),await o(),0===f.length&&0===h.length&&0===j.length)return void i(e`看起来似乎没有依赖版本差异`);if(0===f.length&&0===h.length)return void i(t`看起来网络不太好讷,所有的包线上版本的请求都出错了。或者是还没有执行 npm install 呐`);i(r.brightGreen`\n版本差异的依赖为:\n`),i([...h,...f].map((e=>{const t=b[e],i=r.random`- `.concat(`${"dependencies"===t.type?r.bold(e):r.italic(e)}:于${r.color("#066")(t.time)} 发布 ${t.latestVersion||n(t.onlineVersion)}`);return a(i)})).join("\n")),i(r.brightRed(`\n目前仅关注版本号是否为最新 ${r.brightMagenta("latest")}`)),i("使用 npm install --save 命令安装更新\n"),j.length>0&&(c(t`有一些包没有返回结果,请注意:`),c(j.map((e=>`${r.random`-`} ${e}`)).join("\n")));const $=[...h.filter((e=>!1===f.includes(e))).map((e=>r.bold(e).concat("@latest"))),...f.map((e=>g(e,b[e].tag)))],v=h.map((e=>p(e))),w=[...h.map((e=>p(e))),...f.filter((e=>!1===h.includes(e))).map((e=>g(e,b[e].tag)))],D=$.length<f.length+h.length,R=f.length>0,V=h.length>0;R&&(D&&await l({msg:"‼️ 预发布版本优先:",list:$,type:"brightRed"}),await l({msg:"⚠️ latest 版本优先:",list:w,type:"brightMagenta",copy:!V})),V&&await l({msg:"🎉 最佳安装:",list:v,type:"brightGreen",copy:!0})}export{d as dependencies};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{greenPen as e,pen399 as n}from"../../pen.mjs";import{cursorMoveUp as t,cursorLineClear as o,cursorAfterClear as s}from"a-node-tools";import{getInstallVersion as i}from"./getInstallVersion.mjs";import{getLatestVersion as r}from"./getLatestVersion.mjs";import{diffData as l}from"./data-store.mjs";import{printInOneLine as p}from"../../printInOneLine.mjs";async function
|
|
1
|
+
import{greenPen as e,pen399 as n}from"../../pen.mjs";import{cursorMoveUp as t,cursorLineClear as o,cursorAfterClear as s}from"a-node-tools";import{getInstallVersion as i}from"./getInstallVersion.mjs";import{getLatestVersion as r}from"./getLatestVersion.mjs";import{diffData as l}from"./data-store.mjs";import{printInOneLine as p}from"../../printInOneLine.mjs";async function a(){const{dependenceList:a,timeoutDependence:m}=l,c=Object.keys(a);let V=!1;for(let f=0,$=c.length;f<$;f++){const $=c[f],u=a[$],d=a[$].version;await r($);const j=i($);if(V&&(t(),o(),s(!0)),""===u.onlineVersion&&""===u.latestVersion){m.push($),p(`${$} 本地 ${u.localVersion} 请求 ❌`),V=!1;continue}if(j===u.onlineVersion){let n=`${$} 的本地${d} 安装版本为 ${j} 最新是 ${u.onlineVersion} `;if(""===u.latestVersion){p(n),V=!0;continue}V=!1,l.preReleaseDependence.push($),n+=`;最新预发布版本为 ${e(u.latestVersion)}`,p(n);continue}if(V=!1,j===u.latestVersion)continue;let h=`${$} 的本地 ${e(d)} 安装版本为 ${e(j)} 最新是 ${n(u.onlineVersion)} `;l.latestDependence.push($),""!==u.latestVersion?(l.preReleaseDependence.push($),h+=`;最新预发布版本为 ${e(u.latestVersion)}`,p(h)):p(h)}!0===V&&(t(),o(),s(!0),V=!1)}export{a as diffVersion};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dog as t}from"../../dog.mjs";import{getNpmPkgInfo as o}from"a-node-tools";import{isNull as e}from"a-type-of-js";import{diffData as
|
|
1
|
+
import{dog as t}from"../../dog.mjs";import{getNpmPkgInfo as o}from"a-node-tools";import{isNull as e}from"a-type-of-js";import{diffData as a}from"./data-store.mjs";async function n(n){const s=await o(n,"官方",4567);if("timeout"===s.status)return void t.warn("请求超时");if(e(s.data))return void t.warn("获取包信息失败");const r=a.dependenceList[n],{"dist-tags":i,time:m,version:c}=s.data;let d=c,f="latest";r.onlineVersion=d,r.tag=f;const l=Object.keys(i);for(let t=0,o=l.length;t<o;t++){const o=l[t],e=i[o];m[e]>m[d]&&(d=e,f=o)}"latest"!==f&&(t(n,"最新版本为:",d,"tag为:",f),r.tag=f,r.latestVersion=d);const g=new Date(m[d]).toLocaleString();r.time=g,t(`${n} 的最后发布时间为:${g}`)}export{n as getLatestVersion};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dog as o}from"../../dog.mjs";import{getDirectoryBy as a,readFileToJsonSync as r,pathJoin as n,getNpmPkgInfo as t}from"a-node-tools";import{isUndefined as e,isNull as s}from"a-type-of-js";import{diffData as i}from"./data-store.mjs";async function m(){const m=a("package.json","file");if(e(m))return void o.warn("未找到当前包的 package.json 文件的位置");const c=r(n(m,"package.json"));if(s(c))return void o.error("未找到当前包的 package.json 文件,改事件发生的概率极低");const p=c.name||"",f=await t(p,"淘宝");i.local=c,i.online=f}export{m as getVersion};
|
|
1
|
+
import{dog as o}from"../../dog.mjs";import{getDirectoryBy as a,readFileToJsonSync as r,pathJoin as n,getNpmPkgInfo as t}from"a-node-tools";import{isUndefined as e,isNull as s}from"a-type-of-js";import{diffData as i}from"./data-store.mjs";async function m(){const m=a("package.json","file");if(e(m))return void o.warn("未找到当前包的 package.json 文件的位置");const c=r(n(m,"package.json"));if(s(c))return void o.error("未找到当前包的 package.json 文件,改事件发生的概率极低");const p=c.name||"",f=await t(p,"淘宝");i.local=c,i.online=f.data}export{m as getVersion};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_p as o}from"a-node-tools";import{everyThreePlusBackslash as e}from"./everyThreePlusBackslash.mjs";import r from"color-pen";function
|
|
1
|
+
import{_p as o}from"a-node-tools";import{everyThreePlusBackslash as e}from"./everyThreePlusBackslash.mjs";import r,{terminalRegExp as s}from"color-pen";import{copyTextToClipboard as t}from"@qqi/copy-text";import{pen666 as m}from"../../pen.mjs";async function p(p){const{msg:n,list:i,type:a,copy:l}=p,c=r[a];o(),o(c.reversed(n),!1),o(l?m.reversed`已复制到剪切板 📋`:""),o(),o(`${c`npm install --save`} \\\n${e(i)}`),o(),l&&await t(`npm install --save ${i.join(" ")}`.replace(s,""))}export{p as installation};
|
package/src/pen.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"color-pen";const o=e.bold,r=o.green,l=e.italic,n=e.green,c=e.red,t=e.yellow,i=e.hex,p=e.cyan,a=i(10040081),d=i(3381657);export{r as boldGreenPen,o as boldPen,p as cyanPen,n as greenPen,i as hexPen,l as italicPen,a as orangePen,d as pen399,c as redPen,t as yellowPen};
|
|
1
|
+
import e from"color-pen";const o=e.bold,r=o.green,l=e.italic,n=e.green,c=e.red,t=e.yellow,i=e.hex,p=e.cyan,a=i(10040081),d=i(3381657),g=i(6710886);export{r as boldGreenPen,o as boldPen,p as cyanPen,n as greenPen,i as hexPen,l as italicPen,a as orangePen,d as pen399,g as pen666,c as redPen,t as yellowPen};
|
package/src/github/byDns.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
async function n(){}export{n as byDns};
|
package/src/github/byHttp.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
async function n(){}export{n as byHttp};
|
package/src/github/byPing.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
async function n(){}export{n as byPing};
|
package/src/github/getIp.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{byDns as t}from"./byDns.mjs";import{byHttp as m}from"./byHttp.mjs";import{byPing as i}from"./byPing.mjs";async function o(){await t(),await i(),await m()}export{o as getIp};
|
package/src/github/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{dog as o}from"../dog.mjs";import{isUndefined as t}from"a-type-of-js";import{wheel as r}from"./wheel.mjs";import{getIp as m}from"./getIp.mjs";async function i(i){const f=i.options;if(t(f)||0===f.length)return o.warn("没有配置项,直接使用所有的方式获取 github.com 的 IP 地址"),await m();for(const t of f)o("当前选项",t),await r(t)}export{i as github};
|
package/src/github/wheel.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{dog as t}from"../dog.mjs";import{byDns as i}from"./byDns.mjs";import{byHttp as m}from"./byHttp.mjs";import{byPing as o}from"./byPing.mjs";async function p(p){p["--dns"]?(t("执行使用 dns 查询 github.com 的 ip"),await i()):p["--http"]?(t("执行使用 http 查询 github.com 的 ip"),await m()):p["--ping"]&&(t("执行使用 ping 查询 github.com 的 ip"),await o())}export{p as wheel};
|