bod 5.21.2 → 5.21.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/bod.js CHANGED
@@ -5,8 +5,8 @@ const tslib_1 = require("tslib");
5
5
  const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
6
6
  const node_path_1 = tslib_1.__importDefault(require("node:path"));
7
7
  const node_process_1 = tslib_1.__importDefault(require("node:process"));
8
- const utils_1 = require("./utils");
9
8
  const index_1 = require("./index");
9
+ const utils_1 = require("./utils");
10
10
  const packageJsonPath = node_path_1.default.join(__dirname, '../package.json');
11
11
  const packageJson = JSON.parse(node_fs_1.default.readFileSync(packageJsonPath, { encoding: 'utf-8' }));
12
12
  utils_1.program.version((_a = packageJson.version) !== null && _a !== void 0 ? _a : '0.0.1', '-v, --version');
@@ -19,12 +19,12 @@ describe('createCommand', () => {
19
19
  it.each(CreateCommand_1.default.TemplateActions)('should get correct command/args and invoke [inquirer] via template choice [$name]', (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ value }) {
20
20
  const mockPrompt = jest
21
21
  .spyOn(utils_1.inquirer, 'prompt')
22
- .mockImplementation(() => {
22
+ .mockImplementation(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
23
23
  const promise = new Promise((resolve) => {
24
24
  resolve({ templateName: value });
25
25
  });
26
26
  return promise;
27
- });
27
+ }));
28
28
  const mockSpawn = jest.spyOn(utils_1.spawn, 'sync').mockImplementation(() => {
29
29
  return {
30
30
  status: 0,
@@ -49,12 +49,12 @@ describe('createCommand', () => {
49
49
  it.each(CreateCommand_1.default.TemplateActions)('should throw error when exited with non zero via template choice [$name]', (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ value }) {
50
50
  const mockPrompt = jest
51
51
  .spyOn(utils_1.inquirer, 'prompt')
52
- .mockImplementation(() => {
52
+ .mockImplementation(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
53
53
  const promise = new Promise((resolve) => {
54
54
  resolve({ templateName: value });
55
55
  });
56
56
  return promise;
57
- });
57
+ }));
58
58
  const mockSpawn = jest.spyOn(utils_1.spawn, 'sync').mockImplementation(() => {
59
59
  return {
60
60
  status: 1,
@@ -75,12 +75,12 @@ describe('createCommand', () => {
75
75
  it.each(CreateCommand_1.default.TemplateActions)('should initialize app directory via template choice [$name]', (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ value }) {
76
76
  const mockPrompt = jest
77
77
  .spyOn(utils_1.inquirer, 'prompt')
78
- .mockImplementation(() => {
78
+ .mockImplementation(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
79
79
  const promise = new Promise((resolve) => {
80
80
  resolve({ templateName: value });
81
81
  });
82
82
  return promise;
83
- });
83
+ }));
84
84
  const additionalOptions = value === 'vue'
85
85
  ? ['--default']
86
86
  : value === 'vite'
@@ -1,4 +1,6 @@
1
+ import type { Answers } from 'inquirer';
1
2
  import { Command } from 'commander';
2
3
  import inquirer from 'inquirer';
3
4
  declare const program: Command;
4
5
  export { inquirer, program };
6
+ export type { Answers };
@@ -1,5 +1,7 @@
1
+ import type { Answers } from './core';
1
2
  import { color, printer } from './console';
2
3
  import { inquirer, program } from './core';
3
4
  import { envinfo, spawn } from './os';
4
5
  declare function findPackageManager(): string;
5
6
  export { color, envinfo, findPackageManager, inquirer, printer, program, spawn };
7
+ export type { Answers };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bod",
3
- "version": "5.21.2",
3
+ "version": "5.21.4",
4
4
  "description": "Boilerplate CLI App",
5
5
  "author": "sabertazimi <sabertazimi@gmail.com>",
6
6
  "license": "MIT",
@@ -48,24 +48,25 @@
48
48
  "lint": "pnpm lint:style && pnpm lint:type-check",
49
49
  "lint:style": "eslint ./src",
50
50
  "lint:type-check": "tsc --noEmit",
51
+ "lint:fix": "eslint --fix ./src",
51
52
  "start": "pnpm dev"
52
53
  },
53
54
  "dependencies": {
54
55
  "chalk": "^4.1.2",
55
56
  "commander": "^12.1.0",
56
57
  "consola": "^3.2.3",
57
- "cross-spawn": "^7.0.3",
58
- "envinfo": "^7.13.0",
58
+ "cross-spawn": "^7.0.5",
59
+ "envinfo": "^7.14.0",
59
60
  "inquirer": "^8.2.6",
60
- "tslib": "^2.6.3"
61
+ "tslib": "^2.8.1"
61
62
  },
62
63
  "devDependencies": {
63
64
  "@types/cross-spawn": "^6.0.6",
64
65
  "@types/envinfo": "^7.8.4",
65
66
  "@types/inquirer": "^8.2.10",
66
- "ci-info": "^4.0.0",
67
- "rimraf": "^5.0.7",
68
- "type-fest": "^4.20.1"
67
+ "ci-info": "^4.1.0",
68
+ "rimraf": "^6.0.1",
69
+ "type-fest": "^4.27.0"
69
70
  },
70
- "gitHead": "b97b592c7dc6472ed786dc4762354b7b2a668930"
71
+ "gitHead": "53946d32c0b3edc4771664d755f55409624bb9bb"
71
72
  }