lightshortcuts 1.0.2 → 1.0.3

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/bin/lsc.js CHANGED
@@ -93,19 +93,31 @@ program.command("config").action(function () {
93
93
  choices: [
94
94
  { key: 0, value: 0, name: "保留", checked: true },
95
95
  { key: 1, value: 1, name: "暂停" },
96
- { key: 2, value: 3, name: "结束" },
96
+ { key: 2, value: 2, name: "结束" },
97
97
  ],
98
98
  },
99
+ {
100
+ type: "input",
101
+ message: "发布日志:",
102
+ name: "release_desc",
103
+ default: "功能更新",
104
+ },
105
+ {
106
+ type: "input",
107
+ message: "请输入API前缀地址:",
108
+ name: "lightBaseURL",
109
+ default: "https://xxx.xxx.xxx/lightadmin/pas-api",
110
+ when:(answers)=>{
111
+ initAnswers = Object.assign({},answers);
112
+ // console.log("initAnswers",initAnswers);
113
+ return true;
114
+ }
115
+ },
99
116
  {
100
117
  type: "confirm",
101
118
  message: "是否使用以上配置?",
102
119
  name: "useConfig",
103
120
  default: true,
104
- when: function (answers) {
105
- initAnswers = answers;
106
- console.log(answers);
107
- return true;
108
- },
109
121
  },
110
122
  {
111
123
  type: "confirm",
@@ -118,18 +130,19 @@ program.command("config").action(function () {
118
130
  },
119
131
  ])
120
132
  .then((asw) => {
133
+ // console.log("initAnswersXXXXX",initAnswers);
121
134
  // 用户输入的结果最终会在这里输出
122
135
  let { useConfig, saveConfig } = asw;
123
136
  if (useConfig) {
124
137
  let totalConfig = {
125
138
  publishInfo: {...initAnswers,apps_name:defaultConfig.publishInfo.apps_name},
126
- lightBaseURL: defaultConfig.lightBaseURL,
139
+ lightBaseURL:asw.lightBaseURL,
127
140
  };
128
141
  if (saveConfig) {
129
142
  // 保存配置
130
143
  writeConfig(totalConfig);
131
144
  }
132
- // console.log(totalConfig);
145
+ console.log(totalConfig);
133
146
  } else {
134
147
  console.log("已结束!");
135
148
  }
package/lsc.config.json CHANGED
@@ -10,5 +10,5 @@
10
10
  "pkg_dir": "./dist/",
11
11
  "task_status": "2"
12
12
  },
13
- "lightBaseURL": "https://xxx.xxx.xxx/lightadmin/pas-api"
13
+ "lightBaseURL": "https://XXXXX.XXXXX./lightadmin/pas-api"
14
14
  }
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "inquirer": "^8.2.0",
10
10
  "qs": "^6.10.3"
11
11
  },
12
- "version": "1.0.2",
12
+ "version": "1.0.3",
13
13
  "description": "Light离线包自动发布工具",
14
14
  "main": "index.js",
15
15
  "devDependencies": {},