@eggjs/standalone-decorator 4.0.0-beta.8 → 4.0.1-beta.0

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/README.md CHANGED
@@ -14,4 +14,4 @@
14
14
 
15
15
  ## Usage
16
16
 
17
- Please read [@eggjs/tegg-standalone](../../standalone/standalone/README.md)
17
+ Please read [@eggjs/standalone](../../standalone/standalone/README.md)
@@ -0,0 +1,6 @@
1
+ import { MainRunnerClass } from "../typing.js";
2
+
3
+ //#region src/decorator/Runner.d.ts
4
+ declare function Runner<T>(): (clazz: MainRunnerClass<T>) => void;
5
+ //#endregion
6
+ export { Runner };
@@ -0,0 +1,11 @@
1
+ import { StandaloneUtil } from "../util/StandaloneUtil.js";
2
+
3
+ //#region src/decorator/Runner.ts
4
+ function Runner() {
5
+ return function(clazz) {
6
+ StandaloneUtil.setMainRunner(clazz);
7
+ };
8
+ }
9
+
10
+ //#endregion
11
+ export { Runner };
package/dist/index.d.ts CHANGED
@@ -1,17 +1,4 @@
1
- //#region src/typing.d.ts
2
- interface MainRunner<T = void> {
3
- main(): Promise<T>;
4
- }
5
- type MainRunnerClass<T = void> = new () => MainRunner<T>;
6
- //#endregion
7
- //#region src/util/StandaloneUtil.d.ts
8
- declare class StandaloneUtil {
9
- private static runnerClass;
10
- static setMainRunner(runnerClass: MainRunnerClass): void;
11
- static getMainRunner(): MainRunnerClass | undefined;
12
- }
13
- //#endregion
14
- //#region src/decorator/Runner.d.ts
15
- declare function Runner<T>(): (clazz: MainRunnerClass<T>) => void;
16
- //#endregion
1
+ import { MainRunner, MainRunnerClass } from "./typing.js";
2
+ import { StandaloneUtil } from "./util/StandaloneUtil.js";
3
+ import { Runner } from "./decorator/Runner.js";
17
4
  export { MainRunner, MainRunnerClass, Runner, StandaloneUtil };
package/dist/index.js CHANGED
@@ -1,21 +1,4 @@
1
- //#region src/util/StandaloneUtil.ts
2
- var StandaloneUtil = class StandaloneUtil {
3
- static runnerClass;
4
- static setMainRunner(runnerClass) {
5
- StandaloneUtil.runnerClass = runnerClass;
6
- }
7
- static getMainRunner() {
8
- return StandaloneUtil.runnerClass;
9
- }
10
- };
1
+ import { StandaloneUtil } from "./util/StandaloneUtil.js";
2
+ import { Runner } from "./decorator/Runner.js";
11
3
 
12
- //#endregion
13
- //#region src/decorator/Runner.ts
14
- function Runner() {
15
- return function(clazz) {
16
- StandaloneUtil.setMainRunner(clazz);
17
- };
18
- }
19
-
20
- //#endregion
21
4
  export { Runner, StandaloneUtil };
@@ -0,0 +1,7 @@
1
+ //#region src/typing.d.ts
2
+ interface MainRunner<T = void> {
3
+ main(): Promise<T>;
4
+ }
5
+ type MainRunnerClass<T = void> = new () => MainRunner<T>;
6
+ //#endregion
7
+ export { MainRunner, MainRunnerClass };
@@ -0,0 +1,10 @@
1
+ import { MainRunnerClass } from "../typing.js";
2
+
3
+ //#region src/util/StandaloneUtil.d.ts
4
+ declare class StandaloneUtil {
5
+ private static runnerClass;
6
+ static setMainRunner(runnerClass: MainRunnerClass): void;
7
+ static getMainRunner(): MainRunnerClass | undefined;
8
+ }
9
+ //#endregion
10
+ export { StandaloneUtil };
@@ -0,0 +1,13 @@
1
+ //#region src/util/StandaloneUtil.ts
2
+ var StandaloneUtil = class StandaloneUtil {
3
+ static runnerClass;
4
+ static setMainRunner(runnerClass) {
5
+ StandaloneUtil.runnerClass = runnerClass;
6
+ }
7
+ static getMainRunner() {
8
+ return StandaloneUtil.runnerClass;
9
+ }
10
+ };
11
+
12
+ //#endregion
13
+ export { StandaloneUtil };
package/package.json CHANGED
@@ -1,52 +1,48 @@
1
1
  {
2
2
  "name": "@eggjs/standalone-decorator",
3
- "version": "4.0.0-beta.8",
3
+ "version": "4.0.1-beta.0",
4
4
  "description": "tegg standalone decorator",
5
5
  "keywords": [
6
- "egg",
7
- "typescript",
8
6
  "decorator",
7
+ "egg",
8
+ "standalone",
9
9
  "tegg",
10
- "standalone"
10
+ "typescript"
11
11
  ],
12
- "type": "module",
13
- "exports": {
14
- ".": "./dist/index.js",
15
- "./package.json": "./package.json"
16
- },
17
- "files": [
18
- "dist"
19
- ],
20
- "author": "killagu <killa123@126.com>",
21
- "license": "MIT",
22
- "homepage": "https://github.com/eggjs/tegg/tree/next/core/standalone-decorator",
12
+ "homepage": "https://github.com/eggjs/egg/tree/next/tegg/core/standalone-decorator",
23
13
  "bugs": {
24
- "url": "https://github.com/eggjs/tegg/issues"
14
+ "url": "https://github.com/eggjs/egg/issues"
25
15
  },
16
+ "license": "MIT",
17
+ "author": "killagu <killa123@126.com>",
26
18
  "repository": {
27
19
  "type": "git",
28
- "url": "git@github.com:eggjs/tegg.git",
29
- "directory": "core/standalone-decorator"
20
+ "url": "git+https://github.com/eggjs/egg.git",
21
+ "directory": "tegg/core/standalone-decorator"
30
22
  },
31
- "engines": {
32
- "node": ">=22.18.0"
23
+ "files": [
24
+ "dist"
25
+ ],
26
+ "type": "module",
27
+ "main": "./dist/index.js",
28
+ "module": "./dist/index.js",
29
+ "types": "./dist/index.d.ts",
30
+ "exports": {
31
+ ".": "./dist/index.js",
32
+ "./package.json": "./package.json"
33
33
  },
34
- "dependencies": {},
35
34
  "publishConfig": {
36
35
  "access": "public"
37
36
  },
37
+ "dependencies": {},
38
38
  "devDependencies": {
39
- "@types/node": "^22.10.5",
40
- "typescript": "^5.9.3",
41
- "tsdown": "^0.15.6",
42
- "unplugin-unused": "^0.5.3"
39
+ "@types/node": "^24.10.2",
40
+ "typescript": "^5.9.3"
41
+ },
42
+ "engines": {
43
+ "node": ">=22.18.0"
43
44
  },
44
- "main": "./dist/index.js",
45
- "module": "./dist/index.js",
46
- "types": "./dist/index.d.ts",
47
45
  "scripts": {
48
- "clean": "rimraf dist",
49
- "build": "tsdown",
50
- "typecheck": "tsc --noEmit"
46
+ "typecheck": "tsgo --noEmit"
51
47
  }
52
48
  }