ono-cli 0.1.3 → 0.1.5
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 +5 -64
- package/bin/commands/config.js +1 -1
- package/bin/commands/create.js +1 -1
- package/bin/commands/update.js +1 -1
- package/bin/common/infoConfig.js +1 -1
- package/bin/common/project.js +1 -1
- package/bin/index.js +1 -1
- package/bin/pkg.js +1 -1
- package/bin/utils/execPromisified.js +1 -1
- package/bin/utils/getConfig.js +1 -1
- package/bin/utils/loading.js +1 -1
- package/bin/utils/processExit.js +1 -1
- package/package.json +47 -49
package/README.md
CHANGED
|
@@ -14,28 +14,10 @@ npm install -g ono-cli
|
|
|
14
14
|
|
|
15
15
|
在使用脚手架前,需要先配置仓库源、组织和访问令牌:
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
**交互式设置配置项:**
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
ono-cli config -
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
**配置组织名称:**
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
ono-cli config -s organization <YOUR ORGANIZATION NAME>
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
**配置访问令牌:**
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
ono-cli config -s access_token <YOUR ACCESS TOKEN>
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
**选择使用模式:**
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
ono-cli config -m
|
|
20
|
+
ono-cli config -s
|
|
39
21
|
```
|
|
40
22
|
|
|
41
23
|
> **提示:** 一般选择`模板选择模式`,如果选择`依赖性选择模式`,则需要将仓库中的模板名称改成与选项相对应的名称。
|
|
@@ -56,30 +38,6 @@ ono-cli create [YOUR PROJECT NAME]
|
|
|
56
38
|
|
|
57
39
|
如果需要查看当前的配置信息,可以使用以下命令:
|
|
58
40
|
|
|
59
|
-
**查看组织配置:**
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
ono-cli config -g organization
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
**查看访问令牌:**
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
ono-cli config -g access_token
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**查看仓库源:**
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
ono-cli config -g repo
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
**查看使用模式:**
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
ono-cli config -g mode
|
|
81
|
-
```
|
|
82
|
-
|
|
83
41
|
**交互式查看配置项:**
|
|
84
42
|
|
|
85
43
|
```bash
|
|
@@ -90,24 +48,6 @@ ono-cli config -g
|
|
|
90
48
|
|
|
91
49
|
如果需要删除某个配置项,可以使用以下命令:
|
|
92
50
|
|
|
93
|
-
**删除组织配置:**
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
ono-cli config -d organization
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
**删除访问令牌:**
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
ono-cli config -d access_token
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
**删除指定配置项:**
|
|
106
|
-
|
|
107
|
-
```bash
|
|
108
|
-
ono-cli config -d [CONFIG_KEY]
|
|
109
|
-
```
|
|
110
|
-
|
|
111
51
|
**交互式删除配置项:**
|
|
112
52
|
|
|
113
53
|
```bash
|
|
@@ -156,7 +96,7 @@ ono-cli update [version]
|
|
|
156
96
|
5. 点击 "Generate new token" 按钮
|
|
157
97
|
6. 输入令牌描述(Note)
|
|
158
98
|
7. 设置过期时间(Expiration)
|
|
159
|
-
8.
|
|
99
|
+
8. 为令牌分配权限:
|
|
160
100
|
- 对于访问私有仓库,至少需要 `repo` 权限
|
|
161
101
|
- 如果要访问组织仓库,还需要 `admin:org` 或 `read:org` 权限
|
|
162
102
|
- 如果访问的是私有仓库,还需要 `read:org` 权限
|
|
@@ -193,6 +133,7 @@ ono-cli update [version]
|
|
|
193
133
|
|
|
194
134
|
- 直接从可用的模板列表中选择一个模板
|
|
195
135
|
- 适合对模板有明确选择的场景
|
|
136
|
+
- 可选择分支(branch)或标签(tag)进行克隆
|
|
196
137
|
|
|
197
138
|
### 依赖性选择模式
|
|
198
139
|
|
|
@@ -211,4 +152,4 @@ ono-cli update [version]
|
|
|
211
152
|
|
|
212
153
|
## 📄 许可证
|
|
213
154
|
|
|
214
|
-
MIT
|
|
155
|
+
MIT
|
package/bin/commands/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var e=this&&this.__awaiter||function(e,a,n,t){return new(n||(n=Promise))(function(o,i){function m(e){try{c(t.next(e))}catch(e){i(e)}}function s(e){try{c(t.throw(e))}catch(e){i(e)}}function c(e){var a;e.done?o(e.value):(a=e.value,a instanceof n?a:new n(function(e){e(a)})).then(m,s)}c((t=t.apply(e,a||[])).next())})};import a from"chalk";import{writeFileSync as n}from"fs";import{encode as t}from"ini";import o from"inquirer";import{repoInfo as i}from"../common/index.js";import{baseConfig as m,getCachedConfig as s,processExit as c}from"../utils/index.js";const r=e=>"repo"===e?{name:"value",type:"list",message:"选择仓库源",choices:Object.keys(i).map(e=>({name:e,value:e}))}:"mode"===e?{name:"value",type:"list",message:"选择模式",choices:[{name:"模板选择模式",value:"template"},{name:"依赖性选择模式",value:"dependencies"}]}:{name:"value",type:"input",default:"",message:"请输入"+("username"===e?"用户名称":"organization"===e?"组织名称":"访问令牌")};export default i=>e(void 0,void 0,void 0,function*(){const{config:e,configPath:u}=s(),l=Object.keys(i)[0],p=(a,o)=>{e[a]=o,n(u,t(e)),c()};try{switch(l){case"get":{const{item:a}=yield o.prompt([{name:"item",type:"list",message:"选择想要查看的配置项",choices:[{name:"用户名称",value:"username"},{name:"组织名称",value:"organization"},{name:"访问令牌",value:"access_token"},{name:"代码托管平台",value:"repo"},{name:"模式",value:"mode"}]}]);return void c(e[a])}case"set":{const{key:e}=yield o.prompt([{name:"key",type:"list",message:"选择想要查看的配置项",choices:[{name:"用户名称",value:"username"},{name:"组织名称",value:"organization"},{name:"访问令牌",value:"access_token"},{name:"代码托管平台",value:"repo"},{name:"模式",value:"mode"}]}]),{value:a}=yield o.prompt([r(e)]);p(e,a)}case"delete":{const{item:e}=yield o.prompt([{name:"item",type:"list",message:"选择想要删除的配置项",choices:[{name:"组织名称",value:"organization"},{name:"访问令牌",value:"access_token"}]}]);return void p(e,"")}case"clear":return n(u,t(m)),void c(a.greenBright("配置文件已清空"))}}catch(e){c()}});
|
package/bin/commands/create.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var e=this&&this.__awaiter||function(e,a,t,n){return new(t||(t=Promise))(function(s,i){function o(e){try{m(n.next(e))}catch(e){i(e)}}function c(e){try{m(n.throw(e))}catch(e){i(e)}}function m(e){var a;e.done?s(e.value):(a=e.value,a instanceof t?a:new t(function(e){e(a)})).then(o,c)}m((n=n.apply(e,a||[])).next())})};import a from"chalk";import{existsSync as t}from"fs";import n from"inquirer";import s from"path";import i from"process";import{cloneCodeDeps as o,cloneCodeTemplate as c,frameworkDependenciesConfig as m,getOrganizationProjects as l,getProjectBranches as r,getProjectTags as p}from"../common/index.js";import{getCachedConfig as u,processExit as h}from"../utils/index.js";const g=(e,a)=>e.length<=1?a.length>0?[{name:"tag",value:"tag"},{name:"none",value:""}]:[]:a.length<0?[{name:"branch",value:"branch"},{name:"none",value:""}]:[{name:"branch",value:"branch"},{name:"tag",value:"tag"},{name:"none",value:""}],f=e=>""===e?[]:[{name:"router",type:"list",message:"选择路由",choices:m[e].router},{name:"store",type:"list",message:"选择状态管理仓库",choices:m[e].store}];export default(m,y)=>e(void 0,void 0,void 0,function*(){const{mode:e}=u().config;try{const u={name:"",path:"",isOverwrite:!1};if(m)u.name=m.trim();else{const{projectName:e}=yield n.prompt([{name:"projectName",type:"input",default:"my-project",message:"项目名称"}]);u.name=e?e.trim():"my-project"}const h=i.cwd(),d=s.join(h,u.name);if(t(d))if(y.force)u.isOverwrite=!0,u.path=d;else{const{action:e}=yield n.prompt([{name:"action",type:"list",message:`目录${u.name}已存在,是否覆盖?`,choices:[{name:"覆盖",value:"overwrite"},{name:"取消",value:"cancel"}]}]);switch(e){case"overwrite":u.isOverwrite=!0,u.path=d;break;case"cancel":return console.log(`取消创建目录${u.name}`)}}if("template"===e){const e=e=>c(e,t,u),a=yield l(),{projectName:t}=yield n.prompt([{name:"projectName",type:"list",message:"选择模板",choices:a}]),s=yield r(t),i=yield p(t),o=g(s,i);if(0===o.length)return e(s[0]);const{mode:m}=yield n.prompt([{name:"mode",type:"list",message:"请选择branch或tag",choices:o}]);if("branch"===m)if(s.length>1){const{branch:a}=yield n.prompt([{name:"branch",type:"list",message:"请选择branch",choices:s}]);e(a)}else e(s[0]);else if("tag"===m)if(i.length>0){const{tag:a}=yield n.prompt([{name:"tag",type:"list",message:"请选择tag",choices:i}]);e(a)}else e(i[0]);else e(s[0])}else if("dependencies"===e){const e=yield n.prompt([{name:"framework",type:"list",message:"选择框架",choices:[{name:a.hex("#42b883")("Vue"),value:"vue"},{name:a.hex("#58c4dc")("React"),value:"react"},{name:a.hex("#fecf05")("Vanilla"),value:""}]}]),{language:t,eslint:s}=yield n.prompt([{name:"language",type:"confirm",message:"是否使用TypeScript?"},{name:"eslint",type:"confirm",message:"是否使用Eslint?"}]),i=yield n.prompt([...f(e.framework),{name:"atomStyle",type:"list",message:"选择原子化样式库",choices:[{name:a.hex("#38bdf8")("Tailwind CSS"),value:"tailwindcss"},{name:a.hex("#4d9375")("Uno CSS"),value:"unocss"},{name:"none",value:""}]},{name:"stylePrecompiler",type:"list",message:"选择预编译器",choices:[{name:a.hex("#cc6699")("Sass"),value:"sass"},{name:a.hex("#1d365d")("Less"),value:"less"},{name:a.hex("#89ba1b")("Stylus"),value:"stylus"},{name:"none",value:""}]}]);Object.assign(u,e,{lanuage:t?"ts":"js"},{eslint:s?"eslint":""},i),o(u)}}catch(e){e.config&&e.config.url&&console.log(a.red("tags"===e.config.url.split("/").slice(-1)[0]&&"该项目没有tag")),h()}});
|
package/bin/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var n=this&&this.__awaiter||function(n,t,i,o){return new(i||(i=Promise))(function(e,c){function r(n){try{u(o.next(n))}catch(n){c(n)}}function a(n){try{u(o.throw(n))}catch(n){c(n)}}function u(n){var t;n.done?e(n.value):(t=n.value,t instanceof i?t:new i(function(n){n(t)})).then(r,a)}u((o=o.apply(n,t||[])).next())})};import t from"chalk";import{execPromisified as i,processExit as o,wrapLoading as e}from"../utils/index.js";export default c=>n(void 0,void 0,void 0,function*(){let r="npm install -g ";return c?c.includes("@")?r+=c:r+=`ono-cli@${c}`:r+="ono-cli@latest",e(t.green("📦 更新中..."),()=>n(void 0,void 0,void 0,function*(){try{yield i(r),o("\n\n🚀 更新成功!\n\n")}catch(n){o(t.red(`\n\n❌ 更新失败: ${n.message}\n\n`))}}))});
|
package/bin/common/infoConfig.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"chalk";export const repoInfo={github:{personal:{private:"",public:"https://api.github.com/users/{username}/repos?type=all"},organization:"https://api.github.com/orgs/{organization}/repos?type=all",branch:"https://api.github.com/repos/{organization}/{repositories}/branches",tag:"https://api.github.com/repos/{organization}/{repositories}/tags",clone:"git clone --branch {branchOrTag} --depth 1 https://{repo}.com/{organization}/{projectName}.git {name}",authorization:"token {access_token}"},gitee:{personal:{private:"https://gitee.com/api/v5/user/repos?per_page=100",public:"https://gitee.com/api/v5/users/{username}/repos?per_page=100"},organization:"https://gitee.com/api/v5/orgs/{organization}/repos",branch:"https://gitee.com/api/v5/repos/{organization}/{repositories}/branches",tag:"https://gitee.com/api/v5/repos/{organization}/{repositories}/tags",clone:"git clone --branch {branchOrTag} --depth 1 https://{repo}.com/{organization}/{projectName}.git {name}",authorization:"Bearer {access_token}"}};export const frameworkDependenciesConfig={vue:{router:[{name:e.hex("#425d11")("Vue Router"),value:"vue-router"},{name:e.hex("#00bc7d")("TanStack Router"),value:"tanStack-router"},{name:"none",value:""}],store:[{name:e.hex("#425d11")("Pinia"),value:"pinia"},{name:e.hex("#3eaf7c")("Vuex"),value:"vuex"},{name:"none",value:""}]},react:{router:[{name:e.hex("#3451b2")("React Router"),value:"react-router"},{name:e.hex("#00bc7d")("TanStack Router"),value:"tanStack-router"},{name:"none",value:""}],store:[{name:e.hex("#764abc")("Redux"),value:"redux"},{name:e.hex("#1c16df")("Zustand"),value:"zustand"},{name:"none",value:""}]}};
|
package/bin/common/project.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var e=this&&this.__awaiter||function(e,o,t,n){return new(t||(t=Promise))(function(r,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function c(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var o;e.done?r(e.value):(o=e.value,o instanceof t?o:new t(function(e){e(o)})).then(a,c)}s((n=n.apply(e,o||[])).next())})},o=this&&this.__rest||function(e,o){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)o.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(t[n[r]]=e[n[r]])}return t};import t from"chalk";import{rmSync as n}from"fs";import r from"ono-fetch";import{execPromisified as i,getCachedConfig as a,processExit as c,wrapLoading as s}from"../utils/index.js";import{repoInfo as l}from"./infoConfig.js";const p=e=>{const{access_token:o,repo:t}=e;return o?{headers:{Authorization:l[t].authorization.replace("{access_token}",o)}}:{}};export const getOrganizationProjects=()=>e(void 0,void 0,void 0,function*(){try{const{config:e}=a(),{organization:o,repo:t}=e;return(yield r.get(l[t].organization.replace("{organization}",o),p(e))).data.map(e=>e.name)}catch(e){c(t.red(`🔍 没有找到组织项目!${t.white(`请使用 ${t.hex("#89ba1b")("ono-cli config -s")} 设置正确的 ${t.hex("#1c16df")("organization")} 和 ${t.hex("#1c16df")("access_token")} !`)}`))}});export const getProjectBranches=o=>e(void 0,void 0,void 0,function*(){const{config:e}=a(),{organization:t,repo:n}=e,i=yield r.get(l[n].branch.replace("{organization}",t).replace("{repositories}",o),p(e));return i.data.length>0?i.data.map(e=>e.name):[]});export const getProjectTags=o=>e(void 0,void 0,void 0,function*(){const{config:e}=a(),{organization:t,repo:n}=e,i=yield r.get(l[n].tag.replace("{organization}",t).replace("{repositories}",o),p(e));return i.data.length>0?i.data.map(e=>e.name):[]});export const cloneCodeTemplate=(o,r,p)=>e(void 0,void 0,void 0,function*(){const{organization:d,repo:g}=a().config;p.isOverwrite&&(yield s(t.yellowBright("🚚 删除旧项目..."),()=>e(void 0,void 0,void 0,function*(){return n(p.path,{recursive:!0})}))),s(t.greenBright(`📦 创建项目 ${p.name}...`),()=>e(void 0,void 0,void 0,function*(){try{yield i(l[g].clone.replace("{branchOrTag}",o).replace("{repo}",g).replace("{organization}",d).replace("{projectName}",r).replace("{name}",p.name)),n(`${p.name}/.git`,{recursive:!0,force:!0}),c(`\n\n🚀 创建项目成功!\n ${t.greenBright(`cd ${p.name}`)}\n ${t.greenBright("code .")}\n ${t.greenBright("npm install")}\n`)}catch(e){c(t.red("\n\n❌ 拉取项目失败!请检查网络连接状态、仓库权限或配置信息!\n"))}}))});export const cloneCodeDeps=n=>e(void 0,void 0,void 0,function*(){const{name:e,path:r,isOverwrite:i}=n,a=o(n,["name","path","isOverwrite"]),s=Object.values(a).filter(Boolean),l=yield getOrganizationProjects();if(!l)return;const p=l.reduce((e,o)=>(e[o]=0,e),{});for(let e=0;e<l.length;e++)for(let o=0;o<s.length;o++)l[e].includes(s[o])&&p[l[e]]++;const d=Object.keys(p).find(e=>p[e]===s.length);d||c(t.red("❌ 没有找到匹配的项目模板!"));const g=yield getProjectBranches(d);cloneCodeTemplate(g[0],d,n)});
|
package/bin/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var
|
|
2
|
+
var o=this&&this.__awaiter||function(o,e,n,t){return new(n||(n=Promise))(function(a,i){function c(o){try{m(t.next(o))}catch(o){i(o)}}function r(o){try{m(t.throw(o))}catch(o){i(o)}}function m(o){var e;o.done?a(o.value):(e=o.value,e instanceof n?e:new n(function(o){o(e)})).then(c,r)}m((t=t.apply(o,e||[])).next())})};import e from"chalk";import{program as n}from"commander";import t from"./pkg.js";const a=(e,n)=>o(void 0,void 0,void 0,function*(){return(yield import(e)).default(...n)});n.name("ono-cli").usage("<command> [option]"),n.version(t.version),n.command("create [project-name]").description("创建新项目").option("-f, --force","强制创建").action((o,e)=>a("./commands/create.js",[o,e])),n.command("config [value]").description("配置信息").option("-g, --get","get value").option("-s, --set","set value").option("-d, --delete","delete value").option("-c, --clear","clear value").action((o,e)=>a("./commands/config.js",[e])),n.command("update [version]").description("update ono-cli").action((o,e)=>a("./commands/update.js",[o,e])),n.addHelpText("after",`Run ${e.blueBright("ono-cli <command> --help")} for detailed usage of given command.`),n.parse(process.argv);
|
package/bin/pkg.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire}from"module";import{dirname,join}from"path";import{fileURLToPath}from"url";const
|
|
1
|
+
import{createRequire as o}from"module";import{dirname as r,join as m}from"path";import{fileURLToPath as t}from"url";const p=r(t(import.meta.url)),a=o(import.meta.url);export default a(m(p,"../package.json"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{exec}from"child_process";import
|
|
1
|
+
import{exec as i}from"child_process";import o from"util";export const execPromisified=o.promisify(i);
|
package/bin/utils/getConfig.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{existsSync,readFileSync,writeFileSync}from"fs";import{decode,encode}from"ini";import{configPath}from"../common/index.js";export const
|
|
1
|
+
import{existsSync as o,readFileSync as n,writeFileSync as t}from"fs";import{decode as e,encode as i}from"ini";import{configPath as s}from"../common/index.js";export const baseConfig={username:"",organization:"",access_token:"",repo:"github",mode:"template"};const c=()=>{const c=Object.assign({},baseConfig);if(o(s)){const o=e(n(s,"utf-8"));Object.assign(c,o)}else t(s,i(c));return{config:c,configPath:s}};let r=null;export const getCachedConfig=()=>(r||(r=c().config),r);
|
package/bin/utils/loading.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var t=this&&this.__awaiter||function(t,n,o,i){return new(o||(o=Promise))(function(r,c){function e(t){try{u(i.next(t))}catch(t){c(t)}}function a(t){try{u(i.throw(t))}catch(t){c(t)}}function u(t){var n;t.done?r(t.value):(n=t.value,n instanceof o?n:new o(function(t){t(n)})).then(e,a)}u((i=i.apply(t,n||[])).next())})};import n from"ora";export const wrapLoading=(o,i)=>t(void 0,void 0,void 0,function*(){const t=n(o);t.start();const r=yield i();return t.stop(),t.clear(),r});
|
package/bin/utils/processExit.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const processExit=o=>{o&&console.log(o),process.exit()};
|
|
1
|
+
export const processExit=o=>{o&&console.log(o),process.exit(0)};
|
package/package.json
CHANGED
|
@@ -1,49 +1,47 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ono-cli",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "A CLI tool for ono template",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"bin": "./bin/index.js",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"scripts": {
|
|
9
|
-
"build": "rimraf bin && tsc && node scripts/minify.js",
|
|
10
|
-
"link": "npm link",
|
|
11
|
-
"unlink": "npm unlink ono-cli"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"@types/
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "ono-cli",
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"description": "A CLI tool for ono template",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"bin": "./bin/index.js",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "rimraf bin && tsc && node scripts/minify.js",
|
|
10
|
+
"link": "npm link",
|
|
11
|
+
"unlink": "npm unlink ono-cli"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"bin",
|
|
15
|
+
"lib"
|
|
16
|
+
],
|
|
17
|
+
"keywords": [
|
|
18
|
+
"ono",
|
|
19
|
+
"cli",
|
|
20
|
+
"template"
|
|
21
|
+
],
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"chalk": "^5.3.0",
|
|
24
|
+
"commander": "^12.0.0",
|
|
25
|
+
"figlet": "^1.7.0",
|
|
26
|
+
"fs-extra": "^11.2.0",
|
|
27
|
+
"git-clone": "^0.2.0",
|
|
28
|
+
"ini": "^5.0.0",
|
|
29
|
+
"inquirer": "^11.0.2",
|
|
30
|
+
"ono-fetch": "^0.1.1",
|
|
31
|
+
"ora": "^8.0.1"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/ini": "^4.1.1",
|
|
35
|
+
"@types/node": "^22.7.2",
|
|
36
|
+
"glob": "^13.0.0",
|
|
37
|
+
"husky": "^9.1.7",
|
|
38
|
+
"rimraf": "^6.1.2",
|
|
39
|
+
"terser": "^5.44.1",
|
|
40
|
+
"typescript": "^5.0.2"
|
|
41
|
+
},
|
|
42
|
+
"author": "ono",
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
}
|
|
47
|
+
}
|