@soybeanjs/cli 0.5.3 → 0.5.4

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/dist/index.cjs CHANGED
@@ -37,7 +37,7 @@ const Stream__default = /*#__PURE__*/_interopDefaultCompat(Stream);
37
37
  const stringdecoder__default = /*#__PURE__*/_interopDefaultCompat(stringdecoder);
38
38
  const versionBumpp__default = /*#__PURE__*/_interopDefaultCompat(versionBumpp);
39
39
 
40
- const version = "0.5.3";
40
+ const version = "0.5.4";
41
41
 
42
42
  async function execCommand(cmd, args, options) {
43
43
  const { execa } = await import('execa');
@@ -7480,11 +7480,18 @@ function lintStaged() {
7480
7480
  execCommand("npx", ["lint-staged", "--config", "@soybeanjs/cli/lint-staged"], { stdio: "inherit" });
7481
7481
  }
7482
7482
 
7483
- function genChangelog(total = false) {
7483
+ async function genChangelog(total = false) {
7484
+ let githubToken = "";
7485
+ try {
7486
+ const pkgJson = await promises.readFile(`${process.cwd()}/package.json`, "utf-8");
7487
+ const pkg = JSON.parse(pkgJson);
7488
+ githubToken = pkg?.["github-token"] || "";
7489
+ } catch {
7490
+ }
7484
7491
  if (total) {
7485
- changelog.generateTotalChangelog();
7492
+ changelog.generateTotalChangelog({ github: { token: githubToken, repo: "" } });
7486
7493
  } else {
7487
- changelog.generateChangelog();
7494
+ changelog.generateChangelog({ github: { token: githubToken, repo: "" } });
7488
7495
  }
7489
7496
  }
7490
7497
 
package/dist/index.mjs CHANGED
@@ -7,14 +7,14 @@ import { bgRed, red, green } from 'kolorist';
7
7
  import { rimraf } from 'rimraf';
8
8
  import { win32, posix } from 'path';
9
9
  import { fileURLToPath } from 'url';
10
- import { lstat, readdir as readdir$1, readlink, realpath } from 'fs/promises';
10
+ import { lstat, readdir as readdir$1, readlink, realpath, readFile } from 'fs/promises';
11
11
  import EE from 'events';
12
12
  import Stream from 'stream';
13
13
  import stringdecoder from 'string_decoder';
14
14
  import { generateTotalChangelog, generateChangelog } from '@soybeanjs/changelog';
15
15
  import versionBumpp from 'bumpp';
16
16
 
17
- const version = "0.5.3";
17
+ const version = "0.5.4";
18
18
 
19
19
  async function execCommand(cmd, args, options) {
20
20
  const { execa } = await import('execa');
@@ -7457,11 +7457,18 @@ function lintStaged() {
7457
7457
  execCommand("npx", ["lint-staged", "--config", "@soybeanjs/cli/lint-staged"], { stdio: "inherit" });
7458
7458
  }
7459
7459
 
7460
- function genChangelog(total = false) {
7460
+ async function genChangelog(total = false) {
7461
+ let githubToken = "";
7462
+ try {
7463
+ const pkgJson = await readFile(`${process.cwd()}/package.json`, "utf-8");
7464
+ const pkg = JSON.parse(pkgJson);
7465
+ githubToken = pkg?.["github-token"] || "";
7466
+ } catch {
7467
+ }
7461
7468
  if (total) {
7462
- generateTotalChangelog();
7469
+ generateTotalChangelog({ github: { token: githubToken, repo: "" } });
7463
7470
  } else {
7464
- generateChangelog();
7471
+ generateChangelog({ github: { token: githubToken, repo: "" } });
7465
7472
  }
7466
7473
  }
7467
7474
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soybeanjs/cli",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "description": "SoybeanJS's command line tools",
5
5
  "author": {
6
6
  "name": "Soybean",