@baic/yolk-cli 2.1.0-alpha.5 → 2.1.0-alpha.6

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/es/index.js CHANGED
@@ -44,9 +44,9 @@ import l from "commander";
44
44
 
45
45
  import d from "inquirer";
46
46
 
47
- import { spawn as y, execSync as f } from "child_process";
47
+ import { spawn as u, execSync as y } from "child_process";
48
48
 
49
- import u from "ora";
49
+ import f from "ora";
50
50
 
51
51
  import g from "glob";
52
52
 
@@ -71,12 +71,12 @@ const w = require("staged-git-files"), $ = process.cwd(), P = "##### CREATED BY
71
71
  sass: "scss",
72
72
  scss: "scss",
73
73
  css: "css"
74
- }, E = "utf-8", F = 60, B = [ "**/node_modules/**", "**/.umi/**", "**/.umi-production/**", "**/build/**", "**/dist/**", "**/lib/**", "**/es/**", "**/public/**", "**/assets/**", "**/h5+app/**", "**/mock/**", "**/yolk/**", "**/yolk-web/**", "**/yolk-web-ui/**", "**/yolk-mobile/**", "**/yolk-mobile-ui/**", "**/yolk-miniprogram/**", "**/yolk-miniprogram-ui/**" ], D = u(), q = e => e && D.warn(Buffer.from(e, E).toString()), I = e => e && D.fail(Buffer.from(e, E).toString()), Q = e => e && D.succeed(Buffer.from(e, E).toString()), R = e => e && D.info(Buffer.from(e, E).toString()), T = e => "win32" === process.platform ? `${e}.cmd` : e, L = () => {
74
+ }, E = "utf-8", F = 60, B = [ "**/node_modules/**", "**/.umi/**", "**/.umi-production/**", "**/build/**", "**/dist/**", "**/lib/**", "**/es/**", "**/public/**", "**/assets/**", "**/h5+app/**", "**/mock/**", "**/yolk/**", "**/yolk-web/**", "**/yolk-web-ui/**", "**/yolk-mobile/**", "**/yolk-mobile-ui/**", "**/yolk-miniprogram/**", "**/yolk-miniprogram-ui/**" ], D = f(), q = e => e && D.warn(Buffer.from(e, E).toString()), I = e => e && D.fail(Buffer.from(e, E).toString()), Q = e => e && D.succeed(Buffer.from(e, E).toString()), R = e => e && D.info(Buffer.from(e, E).toString()), T = e => "win32" === process.platform ? `${e}.cmd` : e, L = () => {
75
75
  Q("yolk complete!"), process.exit(0);
76
76
  }, N = () => {
77
77
  q("yolk break!"), process.exit(0);
78
78
  }, _ = ({command: e, args: t, complete: s, close: o, exit: r = !0}) => {
79
- const i = y(T(e), t || [], {
79
+ const i = u(T(e), t || [], {
80
80
  stdio: "inherit"
81
81
  }).on("close", (e => {
82
82
  e ? (o && o(), I("yolk close!"), process.exit(e)) : (s && s(), r && L());
@@ -351,23 +351,23 @@ const w = require("staged-git-files"), $ = process.cwd(), P = "##### CREATED BY
351
351
  r.then(n);
352
352
  }));
353
353
  }, se = ({mProject: e, mPrivateKeyPath: t, mVersion: s, mDesc: o, mRobot: r, mQrcodeFormat: i, mQrcodeOutputDest: n, mPagePath: c, mSearchQuery: p}) => {
354
- const l = a.existsSync(m.join($, ".git")) ? f("git log -1 --pretty=format:%H").toString() : "", d = M(), y = d.appid, u = e || m.join($, "dist"), g = t || m.join($, `private.${y}.key`);
355
- if (a.existsSync(u)) {
354
+ const l = a.existsSync(m.join($, ".git")) ? y("git log -1 --pretty=format:%H").toString() : "", d = M(), u = d.appid, f = e || m.join($, "dist"), g = t || m.join($, `private.${u}.key`);
355
+ if (a.existsSync(f)) {
356
356
  if (a.existsSync(g)) {
357
357
  const e = U(), t = s || e.version || d.version || "1.0.0", a = o || e.description || d.description, m = `version: ${t};${l ? ` commit: ${l};` : ""}${a ? ` description: ${a};` : ""}`;
358
- l && R(`commit: ${l}`), R(`dist: ${u}`), R(`key: ${g}`), R(`appid: ${y}`), R(`version: ${t}`),
358
+ l && R(`commit: ${l}`), R(`dist: ${f}`), R(`key: ${g}`), R(`appid: ${u}`), R(`version: ${t}`),
359
359
  R(`desc: ${m}`);
360
- const f = new x.Project({
361
- appid: y,
360
+ const y = new x.Project({
361
+ appid: u,
362
362
  type: "miniProgram",
363
- projectPath: u,
363
+ projectPath: f,
364
364
  privateKeyPath: g,
365
365
  ignores: [ "node_modules/**/*", "**/*.txt", "**/*.key", "**/*.less", "**/*.sass", "**/*.scss", "**/*.css", "**/*.jsx", "**/*.ts", "**/*.tsx", "**/*.md" ]
366
366
  });
367
367
  return {
368
- appid: y,
368
+ appid: u,
369
369
  options: {
370
- project: f,
370
+ project: y,
371
371
  version: t,
372
372
  desc: m,
373
373
  setting: d.setting,
@@ -381,21 +381,21 @@ const w = require("staged-git-files"), $ = process.cwd(), P = "##### CREATED BY
381
381
  }
382
382
  throw Error(`\u6ca1\u6709\u627e\u5230\u4e0a\u4f20\u5bc6\u94a5(${g})`);
383
383
  }
384
- throw Error(`\u6ca1\u6709\u627e\u5230dist\u76ee\u5f55(${u})`);
384
+ throw Error(`\u6ca1\u6709\u627e\u5230dist\u76ee\u5f55(${f})`);
385
385
  }, oe = () => {
386
386
  ee(), process.argv.length > 2 ? l.version(v.version).usage("[command] [options]").option("--clone", "\u901a\u8fc7git clone\u62c9\u53d6\u6a21\u7248").option("--template <template>", "\u6a21\u7248\u540d\u79f0\u6216\u8005clone\u6a21\u5f0f\u7684git\u5730\u5740").option("--docs", "\u542f\u52a8\u6587\u6863\u6a21\u5f0f").option("--mProject <project>", "\u5c0f\u7a0b\u5e8f\u4e0a\u4f20\u5de5\u7a0b\u76ee\u5f55").option("--mPrivateKeyPath <privateKeyPath>", "\u5c0f\u7a0b\u5e8f\u4e0a\u4f20key\u6587\u4ef6").option("--mVersion <version>", "\u5c0f\u7a0b\u5e8f\u4e0a\u4f20\u7248\u672c\u53f7").option("--mDesc <desc>", "\u5c0f\u7a0b\u5e8f\u4e0a\u4f20\u63cf\u8ff0").option("--mRobot <robot>", "\u5c0f\u7a0b\u5e8f\u4e0a\u4f20ci\u673a\u5668\u4eba1~30").option("--mQrcodeFormat <qrcodeFormat>", '\u5c0f\u7a0b\u5e8f\u9884\u89c8\u8fd4\u56de\u4e8c\u7ef4\u7801\u6587\u4ef6\u7684\u683c\u5f0f "image" \u6216 "base64"\uff0c \u9ed8\u8ba4\u503c "terminal" \u4f9b\u8c03\u8bd5\u7528').option("--mQrcodeOutputDest <qrcodeOutputDest>", "\u5c0f\u7a0b\u5e8f\u9884\u89c8\u4e8c\u7ef4\u7801\u6587\u4ef6\u4fdd\u5b58\u8def\u5f84").option("--mPagePath <pagePath>", "\u5c0f\u7a0b\u5e8f\u9884\u89c8\u9884\u89c8\u9875\u9762\u8def\u5f84").option("--mSearchQuery <searchQuery>", "\u5c0f\u7a0b\u5e8f\u9884\u89c8\u9884\u89c8\u9875\u9762\u8def\u5f84\u542f\u52a8\u53c2\u6570").action(((t, i) => {
387
- const n = e(i), l = n[0], d = n.slice(1), y = t.clone, f = t.template, u = t.docs;
387
+ const n = e(i), l = n[0], d = n.slice(1), u = t.clone, y = t.template, f = t.docs;
388
388
  if (l) switch (R(`yolk version: ${v.version}`), R(`node version: ${process.version}`),
389
389
  R(`platform: ${p.platform()}`), R(`memory: ${r(p.freemem() / 1024 / 1024)} MB(${r(p.totalmem() / 1024 / 1024)} MB)`),
390
390
  l) {
391
391
  case "init":
392
- if (Q(`yolk ${l} \u5f00\u59cb`), y) if (f) {
392
+ if (Q(`yolk ${l} \u5f00\u59cb`), u) if (y) {
393
393
  const e = ".yolk", t = m.join($, e);
394
394
  a.existsSync(t) && S(t, (() => {
395
395
  Q(`\u7f13\u5b58\u5220\u9664 success! ${t}`);
396
396
  })), _({
397
397
  command: "git",
398
- args: [ "clone", "-b", "master", "--depth", "1", f, e ].concat(d)
398
+ args: [ "clone", "-b", "master", "--depth", "1", y, e ].concat(d)
399
399
  }), K($, t);
400
400
  } else I("--clone \u6a21\u5f0f\u5fc5\u987b\u6709--template"); else A($);
401
401
  break;
@@ -410,14 +410,14 @@ const w = require("staged-git-files"), $ = process.cwd(), P = "##### CREATED BY
410
410
  }) : _({
411
411
  command: "taro",
412
412
  args: [ "build", "--type", "weapp", "--watch" ].concat(d)
413
- }) : u ? _({
413
+ }) : f ? _({
414
414
  command: "dumi",
415
415
  args: [ "dev" ].concat(d)
416
416
  }) : G() ? _({
417
417
  command: "icejs",
418
418
  args: [ "start", "--config", H() ].concat(d)
419
419
  }) : _({
420
- command: "max",
420
+ command: "umi",
421
421
  args: [ "dev" ].concat(d)
422
422
  });
423
423
  break;
@@ -432,14 +432,14 @@ const w = require("staged-git-files"), $ = process.cwd(), P = "##### CREATED BY
432
432
  }) : _({
433
433
  command: "taro",
434
434
  args: [ "build", "--type", "weapp" ].concat(d)
435
- }) : u ? _({
435
+ }) : f ? _({
436
436
  command: "dumi",
437
437
  args: [ "build" ].concat(d)
438
438
  }) : G() ? _({
439
439
  command: "icejs",
440
440
  args: [ "build", "--config", H() ].concat(d)
441
441
  }) : _({
442
- command: "max",
442
+ command: "umi",
443
443
  args: [ "build" ].concat(d)
444
444
  });
445
445
  break;
package/lib/index.js CHANGED
@@ -137,7 +137,7 @@ function j() {
137
137
  }
138
138
 
139
139
  function S() {
140
- const e = x(require("miniprogram-ci"));
140
+ const e = w(require("miniprogram-ci"));
141
141
  return S = function() {
142
142
  return e;
143
143
  }, e;
@@ -153,7 +153,7 @@ function v(e) {
153
153
  })(e);
154
154
  }
155
155
 
156
- function x(e, t) {
156
+ function w(e, t) {
157
157
  if (!t && e && e.__esModule) return e;
158
158
  if (null === e || "object" !== typeof e && "function" !== typeof e) return {
159
159
  default: e
@@ -168,7 +168,7 @@ function x(e, t) {
168
168
  return r.default = e, n && n.set(e, r), r;
169
169
  }
170
170
 
171
- function w(e, t) {
171
+ function x(e, t) {
172
172
  var n = Object.keys(e);
173
173
  if (Object.getOwnPropertySymbols) {
174
174
  var r = Object.getOwnPropertySymbols(e);
@@ -182,9 +182,9 @@ function w(e, t) {
182
182
  function $(e) {
183
183
  for (var t = 1; t < arguments.length; t++) {
184
184
  var r = null != arguments[t] ? arguments[t] : {};
185
- t % 2 ? w(Object(r), !0).forEach((function(t) {
185
+ t % 2 ? x(Object(r), !0).forEach((function(t) {
186
186
  (0, n().default)(e, t, r[t]);
187
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : w(Object(r)).forEach((function(t) {
187
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : x(Object(r)).forEach((function(t) {
188
188
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
189
189
  }));
190
190
  }
@@ -553,7 +553,7 @@ p().default)(), R = e => e && I.warn(Buffer.from(e, F).toString()), Q = e => e &
553
553
  command: "icejs",
554
554
  args: [ "start", "--config", Y() ].concat(f)
555
555
  }) : A({
556
- command: "max",
556
+ command: "umi",
557
557
  args: [ "dev" ].concat(f)
558
558
  });
559
559
  break;
@@ -575,7 +575,7 @@ p().default)(), R = e => e && I.warn(Buffer.from(e, F).toString()), Q = e => e &
575
575
  command: "icejs",
576
576
  args: [ "build", "--config", Y() ].concat(f)
577
577
  }) : A({
578
- command: "max",
578
+ command: "umi",
579
579
  args: [ "build" ].concat(f)
580
580
  });
581
581
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baic/yolk-cli",
3
- "version": "2.1.0-alpha.5",
3
+ "version": "2.1.0-alpha.6",
4
4
  "author": "Baic <303394539@qq.com>",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -28,7 +28,7 @@
28
28
  "@types/rimraf": "~3.0.2",
29
29
  "commander": "6.x",
30
30
  "glob": "~8.0.3",
31
- "inquirer": "~8.2.4",
31
+ "inquirer": "8.x",
32
32
  "lodash": "4.x",
33
33
  "miniprogram-ci": "~1.8.25",
34
34
  "mkdirp": "~1.0.4",
@@ -40,5 +40,5 @@
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "043c753cc7456acabb86d372895ccb3eeca80429"
43
+ "gitHead": "bd5c443bd3f43d9a9fa7fc37eadb5891dec8e04c"
44
44
  }