@widget-js/cli 1.0.6 → 1.0.7

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/widget.js CHANGED
@@ -22,7 +22,6 @@ program
22
22
 
23
23
  //TODO init 初始化项目
24
24
  //TODO publish 发布
25
- //TODO delete 删除
26
25
  program.parse(process.argv);
27
26
 
28
27
 
@@ -3,8 +3,8 @@ import {chalk} from "@vue/cli-shared-utils";
3
3
  import fs from "fs";
4
4
 
5
5
  let packageData = JSON.parse(fs.readFileSync("./package.json").toString());
6
- export const AccessKeyID = packageData.oss.id;
7
- export const AccessKeySecret = packageData.oss.secret;
6
+ export const AccessKeyID = packageData.oss?.id ?? "default";
7
+ export const AccessKeySecret = packageData.oss?.secret ?? "default";
8
8
 
9
9
  const headers = {
10
10
  // 指定Object的存储类型。
@@ -5,11 +5,6 @@ import promptChecker from "../promts/promptChecker.js";
5
5
  import zipDirectory from "./update-zip.js";
6
6
  import {copy, put} from "./oss.js";
7
7
 
8
- const packageJSON = JSON.parse(fs.readFileSync('package.json', 'utf-8'))
9
- const changelogJSON = JSON.parse(fs.readFileSync('changelog.json', 'utf-8'))
10
- const version = packageJSON["version"]
11
- const changelog = changelogJSON[version]
12
-
13
8
  async function delay(time) {
14
9
  return new Promise((resolve, reject) => {
15
10
  setTimeout(() => {
@@ -19,6 +14,11 @@ async function delay(time) {
19
14
  }
20
15
 
21
16
  const release = async () => {
17
+ const packageJSON = JSON.parse(fs.readFileSync('package.json', 'utf-8'))
18
+ const changelogJSON = JSON.parse(fs.readFileSync('changelog.json', 'utf-8'))
19
+ const version = packageJSON["version"]
20
+ const changelog = changelogJSON[version]
21
+
22
22
  let needUpdateElectron = await promptChecker({
23
23
  type: "confirm",
24
24
  name: 'electron',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widget-js/cli",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "main": "bin/widget.js",
5
5
  "author": "Neo Fu",
6
6
  "license": "MIT",