@eggjs/bin 8.0.0-beta.34 → 8.0.0-beta.36

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.
@@ -1,6 +1,6 @@
1
1
  import { PackageEgg } from "./types.js";
2
- import { Command, Interfaces } from "@oclif/core";
3
2
  import { ForkOptions } from "node:child_process";
3
+ import { Command, Interfaces } from "@oclif/core";
4
4
 
5
5
  //#region src/baseCommand.d.ts
6
6
  declare class ForkError extends Error {
@@ -1,11 +1,11 @@
1
1
  import { getSourceDirname, hasTsConfig, readPackageJSON } from "./utils.js";
2
- import { debuglog } from "node:util";
3
- import path from "node:path";
2
+ import { fork } from "node:child_process";
4
3
  import os from "node:os";
5
- import { Command, Flags, Interfaces } from "@oclif/core";
6
- import { importResolve } from "@eggjs/utils";
4
+ import path from "node:path";
7
5
  import { pathToFileURL } from "node:url";
8
- import { fork } from "node:child_process";
6
+ import { debuglog } from "node:util";
7
+ import { importResolve } from "@eggjs/utils";
8
+ import { Command, Flags, Interfaces } from "@oclif/core";
9
9
 
10
10
  //#region src/baseCommand.ts
11
11
  const debug = debuglog("egg/bin/baseCommand");
@@ -1,26 +1,26 @@
1
1
  import { ForkNodeOptions } from "../baseCommand.js";
2
- import { Test } from "./test.js";
3
- import * as _oclif_core_interfaces0 from "@oclif/core/interfaces";
2
+ import Test from "./test.js";
3
+ import * as _oclif_core_interfaces6 from "@oclif/core/interfaces";
4
4
 
5
5
  //#region src/commands/cov.d.ts
6
6
  declare class Cov<T extends typeof Cov> extends Test<T> {
7
7
  static description: string;
8
8
  static examples: string[];
9
9
  static flags: {
10
- prerequire: _oclif_core_interfaces0.BooleanFlag<boolean>;
11
- exclude: _oclif_core_interfaces0.OptionFlag<string[] | undefined, _oclif_core_interfaces0.CustomOptions>;
12
- c8: _oclif_core_interfaces0.OptionFlag<string, _oclif_core_interfaces0.CustomOptions>;
13
- bail: _oclif_core_interfaces0.BooleanFlag<boolean>;
14
- timeout: _oclif_core_interfaces0.OptionFlag<number, _oclif_core_interfaces0.CustomOptions>;
15
- 'no-timeout': _oclif_core_interfaces0.BooleanFlag<boolean>;
16
- grep: _oclif_core_interfaces0.OptionFlag<string | undefined, _oclif_core_interfaces0.CustomOptions>;
17
- changed: _oclif_core_interfaces0.BooleanFlag<boolean>;
18
- parallel: _oclif_core_interfaces0.BooleanFlag<boolean>;
19
- jobs: _oclif_core_interfaces0.OptionFlag<number, _oclif_core_interfaces0.CustomOptions>;
20
- 'auto-agent': _oclif_core_interfaces0.BooleanFlag<boolean>;
10
+ prerequire: _oclif_core_interfaces6.BooleanFlag<boolean>;
11
+ exclude: _oclif_core_interfaces6.OptionFlag<string[] | undefined, _oclif_core_interfaces6.CustomOptions>;
12
+ c8: _oclif_core_interfaces6.OptionFlag<string, _oclif_core_interfaces6.CustomOptions>;
13
+ bail: _oclif_core_interfaces6.BooleanFlag<boolean>;
14
+ timeout: _oclif_core_interfaces6.OptionFlag<number, _oclif_core_interfaces6.CustomOptions>;
15
+ 'no-timeout': _oclif_core_interfaces6.BooleanFlag<boolean>;
16
+ grep: _oclif_core_interfaces6.OptionFlag<string | undefined, _oclif_core_interfaces6.CustomOptions>;
17
+ changed: _oclif_core_interfaces6.BooleanFlag<boolean>;
18
+ parallel: _oclif_core_interfaces6.BooleanFlag<boolean>;
19
+ jobs: _oclif_core_interfaces6.OptionFlag<number, _oclif_core_interfaces6.CustomOptions>;
20
+ 'auto-agent': _oclif_core_interfaces6.BooleanFlag<boolean>;
21
21
  };
22
22
  protected get defaultExcludes(): string[];
23
23
  protected forkNode(modulePath: string, forkArgs: string[], options?: ForkNodeOptions): Promise<void>;
24
24
  }
25
25
  //#endregion
26
- export { Cov };
26
+ export { Cov as default };
@@ -1,9 +1,9 @@
1
1
  import "../baseCommand.js";
2
2
  import Test from "./test.js";
3
3
  import path from "node:path";
4
- import fs from "node:fs/promises";
5
- import { Flags } from "@oclif/core";
6
4
  import { importResolve } from "@eggjs/utils";
5
+ import { Flags } from "@oclif/core";
6
+ import fs from "node:fs/promises";
7
7
 
8
8
  //#region src/commands/cov.ts
9
9
  var Cov = class extends Test {
@@ -1,15 +1,15 @@
1
1
  import { BaseCommand } from "../baseCommand.js";
2
- import * as _oclif_core_interfaces27 from "@oclif/core/interfaces";
2
+ import * as _oclif_core_interfaces0 from "@oclif/core/interfaces";
3
3
 
4
4
  //#region src/commands/dev.d.ts
5
5
  declare class Dev<T extends typeof Dev> extends BaseCommand<T> {
6
6
  static description: string;
7
7
  static examples: string[];
8
8
  static flags: {
9
- port: _oclif_core_interfaces27.OptionFlag<number | undefined, _oclif_core_interfaces27.CustomOptions>;
10
- workers: _oclif_core_interfaces27.OptionFlag<number, _oclif_core_interfaces27.CustomOptions>;
11
- framework: _oclif_core_interfaces27.OptionFlag<string | undefined, _oclif_core_interfaces27.CustomOptions>;
12
- sticky: _oclif_core_interfaces27.BooleanFlag<boolean>;
9
+ port: _oclif_core_interfaces0.OptionFlag<number | undefined, _oclif_core_interfaces0.CustomOptions>;
10
+ workers: _oclif_core_interfaces0.OptionFlag<number, _oclif_core_interfaces0.CustomOptions>;
11
+ framework: _oclif_core_interfaces0.OptionFlag<string | undefined, _oclif_core_interfaces0.CustomOptions>;
12
+ sticky: _oclif_core_interfaces0.BooleanFlag<boolean>;
13
13
  };
14
14
  run(): Promise<void>;
15
15
  protected formatEggStartOptions(): Promise<{
@@ -23,4 +23,4 @@ declare class Dev<T extends typeof Dev> extends BaseCommand<T> {
23
23
  }>;
24
24
  }
25
25
  //#endregion
26
- export { Dev };
26
+ export { Dev as default };
@@ -1,8 +1,8 @@
1
1
  import { getSourceFilename } from "../utils.js";
2
2
  import { BaseCommand } from "../baseCommand.js";
3
3
  import { debuglog } from "node:util";
4
- import { Flags } from "@oclif/core";
5
4
  import { getFrameworkPath } from "@eggjs/utils";
5
+ import { Flags } from "@oclif/core";
6
6
  import { detect } from "detect-port";
7
7
 
8
8
  //#region src/commands/dev.ts
@@ -1,22 +1,22 @@
1
1
  import { BaseCommand } from "../baseCommand.js";
2
- import * as _oclif_core_interfaces15 from "@oclif/core/interfaces";
2
+ import * as _oclif_core_interfaces22 from "@oclif/core/interfaces";
3
3
 
4
4
  //#region src/commands/test.d.ts
5
5
  declare class Test<T extends typeof Test> extends BaseCommand<T> {
6
6
  static args: {
7
- file: _oclif_core_interfaces15.Arg<string | undefined, Record<string, unknown>>;
7
+ file: _oclif_core_interfaces22.Arg<string | undefined, Record<string, unknown>>;
8
8
  };
9
9
  static description: string;
10
10
  static examples: string[];
11
11
  static flags: {
12
- bail: _oclif_core_interfaces15.BooleanFlag<boolean>;
13
- timeout: _oclif_core_interfaces15.OptionFlag<number, _oclif_core_interfaces15.CustomOptions>;
14
- 'no-timeout': _oclif_core_interfaces15.BooleanFlag<boolean>;
15
- grep: _oclif_core_interfaces15.OptionFlag<string | undefined, _oclif_core_interfaces15.CustomOptions>;
16
- changed: _oclif_core_interfaces15.BooleanFlag<boolean>;
17
- parallel: _oclif_core_interfaces15.BooleanFlag<boolean>;
18
- jobs: _oclif_core_interfaces15.OptionFlag<number, _oclif_core_interfaces15.CustomOptions>;
19
- 'auto-agent': _oclif_core_interfaces15.BooleanFlag<boolean>;
12
+ bail: _oclif_core_interfaces22.BooleanFlag<boolean>;
13
+ timeout: _oclif_core_interfaces22.OptionFlag<number, _oclif_core_interfaces22.CustomOptions>;
14
+ 'no-timeout': _oclif_core_interfaces22.BooleanFlag<boolean>;
15
+ grep: _oclif_core_interfaces22.OptionFlag<string | undefined, _oclif_core_interfaces22.CustomOptions>;
16
+ changed: _oclif_core_interfaces22.BooleanFlag<boolean>;
17
+ parallel: _oclif_core_interfaces22.BooleanFlag<boolean>;
18
+ jobs: _oclif_core_interfaces22.OptionFlag<number, _oclif_core_interfaces22.CustomOptions>;
19
+ 'auto-agent': _oclif_core_interfaces22.BooleanFlag<boolean>;
20
20
  };
21
21
  run(): Promise<void>;
22
22
  protected runMocha(mochaFile: string, mochaArgs: string[]): Promise<void>;
@@ -24,4 +24,4 @@ declare class Test<T extends typeof Test> extends BaseCommand<T> {
24
24
  protected getChangedTestFiles(dir: string, ext: string): Promise<string[]>;
25
25
  }
26
26
  //#endregion
27
- export { Test };
27
+ export { Test as default };
@@ -1,13 +1,13 @@
1
1
  import { BaseCommand } from "../baseCommand.js";
2
- import { debuglog } from "node:util";
3
- import path from "node:path";
4
2
  import os from "node:os";
5
- import fs from "node:fs/promises";
3
+ import path from "node:path";
4
+ import { debuglog } from "node:util";
5
+ import { EggType, detectType, importResolve } from "@eggjs/utils";
6
6
  import { Args, Flags } from "@oclif/core";
7
+ import fs from "node:fs/promises";
8
+ import ciParallelVars from "ci-parallel-vars";
7
9
  import globby from "globby";
8
- import { EggType, detectType, importResolve } from "@eggjs/utils";
9
10
  import { getChangedFilesForRoots } from "jest-changed-files";
10
- import ciParallelVars from "ci-parallel-vars";
11
11
 
12
12
  //#region src/commands/test.ts
13
13
  const debug = debuglog("egg/bin/commands/test");
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { PackageEgg } from "./types.js";
2
2
  import { BaseCommand, ForkError, ForkNodeOptions } from "./baseCommand.js";
3
- import { Test } from "./commands/test.js";
4
- import { Cov } from "./commands/cov.js";
5
- import { Dev } from "./commands/dev.js";
3
+ import Test from "./commands/test.js";
4
+ import Cov from "./commands/cov.js";
5
+ import Dev from "./commands/dev.js";
6
6
  export * from "@oclif/core";
7
7
  export { BaseCommand, Cov, Dev, ForkError, ForkNodeOptions, PackageEgg, Test };
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,7 @@
1
+ //#region src/utils.d.ts
2
+ declare function readPackageJSON(baseDir: string): Promise<Record<string, any>>;
3
+ declare function hasTsConfig(baseDir: string): Promise<boolean>;
4
+ declare function getSourceDirname(): string;
5
+ declare function getSourceFilename(filename: string): string;
6
+ //#endregion
7
+ export { getSourceDirname, getSourceFilename, hasTsConfig, readPackageJSON };
package/dist/utils.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import path from "node:path";
2
- import fs from "node:fs/promises";
3
2
  import { fileURLToPath } from "node:url";
3
+ import fs from "node:fs/promises";
4
4
 
5
5
  //#region src/utils.ts
6
6
  async function readPackageJSON(baseDir) {
package/package.json CHANGED
@@ -1,22 +1,42 @@
1
1
  {
2
2
  "name": "@eggjs/bin",
3
- "version": "8.0.0-beta.34",
4
- "publishConfig": {
5
- "access": "public"
6
- },
3
+ "version": "8.0.0-beta.36",
7
4
  "description": "egg developer tool",
5
+ "homepage": "https://github.com/eggjs/egg/tree/next/tools/egg-bin",
6
+ "bugs": {
7
+ "url": "https://github.com/eggjs/egg/issues"
8
+ },
9
+ "license": "MIT",
10
+ "author": "fengmk2 <fengmk2@gmail.com> (https://github.com/fengmk2)",
8
11
  "repository": {
9
12
  "type": "git",
10
- "url": "git://github.com/eggjs/egg.git",
13
+ "url": "git+https://github.com/eggjs/egg.git",
11
14
  "directory": "tools/egg-bin"
12
15
  },
13
- "bugs": {
14
- "url": "https://github.com/eggjs/egg/issues"
16
+ "bin": {
17
+ "egg-bin": "./bin/run.js"
15
18
  },
16
- "homepage": "https://github.com/eggjs/egg/tree/next/tools/egg-bin",
17
- "author": "fengmk2 <fengmk2@gmail.com> (https://github.com/fengmk2)",
18
- "engines": {
19
- "node": ">=22.18.0"
19
+ "files": [
20
+ "bin",
21
+ "dist",
22
+ "scripts"
23
+ ],
24
+ "type": "module",
25
+ "main": "./dist/index.js",
26
+ "module": "./dist/index.js",
27
+ "types": "./dist/index.d.ts",
28
+ "exports": {
29
+ ".": "./dist/index.js",
30
+ "./baseCommand": "./dist/baseCommand.js",
31
+ "./commands/cov": "./dist/commands/cov.js",
32
+ "./commands/dev": "./dist/commands/dev.js",
33
+ "./commands/test": "./dist/commands/test.js",
34
+ "./types": "./dist/types.js",
35
+ "./utils": "./dist/utils.js",
36
+ "./package.json": "./package.json"
37
+ },
38
+ "publishConfig": {
39
+ "access": "public"
20
40
  },
21
41
  "dependencies": {
22
42
  "@oclif/core": "^4.2.0",
@@ -25,74 +45,55 @@
25
45
  "detect-port": "^2.1.0",
26
46
  "globby": "^11.0.2",
27
47
  "jest-changed-files": "^30.0.0",
28
- "mocha": "^11.7.4",
48
+ "mocha": "^11.7.5",
29
49
  "ts-node": "^10.9.2",
30
50
  "tsconfig-paths": "^4.2.0",
31
51
  "utility": "^2.5.0",
32
- "@eggjs/utils": "5.0.0-beta.34"
33
- },
34
- "peerDependencies": {
35
- "@eggjs/mock": "7.0.0-beta.34"
36
- },
37
- "peerDependenciesMeta": {
38
- "@eggjs/mock": {
39
- "optional": true
40
- }
52
+ "@eggjs/utils": "5.0.0-beta.36"
41
53
  },
42
54
  "devDependencies": {
43
55
  "@swc-node/register": "^1.11.1",
44
- "@swc/core": "1.13.5",
56
+ "@swc/core": "^1.15.1",
45
57
  "@types/mocha": "^10.0.10",
46
- "@types/node": "^24.9.1",
58
+ "@types/node": "^24.10.2",
47
59
  "assert-file": "1",
48
60
  "coffee": "5",
49
61
  "cpy": "^12.0.0",
50
- "esbuild": "^0.25.0",
62
+ "esbuild": "^0.27.0",
51
63
  "esbuild-register": "^3.6.0",
52
64
  "npminstall": "^7.12.0",
53
- "rimraf": "^6.0.1",
65
+ "rimraf": "^6.1.2",
54
66
  "runscript": "^2.0.1",
55
- "tsdown": "0.15.11",
56
67
  "typescript": "^5.9.3",
57
- "@eggjs/mock": "7.0.0-beta.34",
58
- "@eggjs/tsconfig": "3.1.0-beta.34",
59
- "egg": "4.1.0-beta.34",
60
- "@eggjs/supertest": "9.0.0-beta.34"
68
+ "@eggjs/mock": "7.0.0-beta.36",
69
+ "@eggjs/supertest": "9.0.0-beta.36",
70
+ "@eggjs/tsconfig": "3.1.0-beta.36",
71
+ "egg": "4.1.0-beta.36"
61
72
  },
62
- "type": "module",
63
- "files": [
64
- "bin",
65
- "dist",
66
- "scripts"
67
- ],
68
- "bin": {
69
- "egg-bin": "./bin/run.js"
73
+ "peerDependencies": {
74
+ "@eggjs/mock": "7.0.0-beta.36"
75
+ },
76
+ "peerDependenciesMeta": {
77
+ "@eggjs/mock": {
78
+ "optional": true
79
+ }
70
80
  },
71
81
  "oclif": {
82
+ "additionalHelpFlags": [
83
+ "-h"
84
+ ],
72
85
  "bin": "egg-bin",
73
86
  "commands": "./dist/commands",
74
87
  "dirname": "egg-bin",
75
- "topicSeparator": " ",
76
- "additionalHelpFlags": [
77
- "-h"
78
- ]
88
+ "topicSeparator": " "
79
89
  },
80
- "main": "./dist/index.js",
81
- "module": "./dist/index.js",
82
- "types": "./dist/index.d.ts",
83
- "exports": {
84
- ".": "./dist/index.js",
85
- "./package.json": "./package.json"
90
+ "engines": {
91
+ "node": ">=22.18.0"
86
92
  },
87
93
  "scripts": {
88
- "lint": "oxlint --type-aware",
89
- "typecheck": "tsc --noEmit",
90
- "pretest": "npm run clean && npm run lint -- --fix && npm run prepublishOnly",
94
+ "typecheck": "tsgo --noEmit",
91
95
  "test": "node bin/run.js test",
92
96
  "cov": "c8 node bin/run.js test",
93
- "preci": "npm run clean && npm run lint && npm run prepublishOnly",
94
- "ci": "npm run cov",
95
- "clean": "rimraf dist",
96
- "build": "tsdown"
97
+ "ci": "npm run cov"
97
98
  }
98
99
  }