@eggjs/tegg-controller-plugin 3.46.1 → 3.46.3

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.
@@ -0,0 +1,5 @@
1
+ import { EggContext, EggContextLifecycleContext } from '@eggjs/tegg-runtime';
2
+ import { LifecycleHook } from '@eggjs/tegg';
3
+ export declare class EggControllerHook implements LifecycleHook<EggContextLifecycleContext, EggContext> {
4
+ preCreate(_: any, ctx: EggContext): Promise<void>;
5
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EggControllerHook = void 0;
4
+ const egg_module_common_1 = require("@eggjs/egg-module-common");
5
+ class EggControllerHook {
6
+ async preCreate(_, ctx) {
7
+ const rootProto = ctx.get(egg_module_common_1.ROOT_PROTO);
8
+ if (rootProto) {
9
+ const proto = rootProto;
10
+ ctx.addProtoToCreate(proto.name, proto);
11
+ }
12
+ }
13
+ }
14
+ exports.EggControllerHook = EggControllerHook;
15
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRWdnQ29udHJvbGxlckhvb2suanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJFZ2dDb250cm9sbGVySG9vay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFHQSxnRUFBc0Q7QUFFdEQsTUFBYSxpQkFBaUI7SUFDNUIsS0FBSyxDQUFDLFNBQVMsQ0FBQyxDQUFDLEVBQUUsR0FBZTtRQUNoQyxNQUFNLFNBQVMsR0FBRyxHQUFHLENBQUMsR0FBRyxDQUFDLDhCQUFVLENBQUMsQ0FBQztRQUN0QyxJQUFJLFNBQVMsRUFBRTtZQUNiLE1BQU0sS0FBSyxHQUFpQixTQUFTLENBQUM7WUFDdEMsR0FBRyxDQUFDLGdCQUFnQixDQUFDLEtBQUssQ0FBQyxJQUFJLEVBQUUsS0FBSyxDQUFDLENBQUM7U0FDekM7SUFDSCxDQUFDO0NBQ0Y7QUFSRCw4Q0FRQyJ9
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "tegg"
8
8
  ]
9
9
  },
10
- "version": "3.46.1",
10
+ "version": "3.46.3",
11
11
  "description": "controller decorator for egg",
12
12
  "keywords": [
13
13
  "egg",
@@ -46,13 +46,13 @@
46
46
  "node": ">=14.0.0"
47
47
  },
48
48
  "dependencies": {
49
- "@eggjs/egg-module-common": "^3.46.1",
49
+ "@eggjs/egg-module-common": "^3.46.3",
50
50
  "@eggjs/router": "^2.0.1",
51
- "@eggjs/tegg": "^3.46.1",
52
- "@eggjs/tegg-common-util": "^3.46.1",
53
- "@eggjs/tegg-loader": "^3.46.1",
54
- "@eggjs/tegg-metadata": "^3.46.1",
55
- "@eggjs/tegg-runtime": "^3.46.1",
51
+ "@eggjs/tegg": "^3.46.3",
52
+ "@eggjs/tegg-common-util": "^3.46.3",
53
+ "@eggjs/tegg-loader": "^3.46.3",
54
+ "@eggjs/tegg-metadata": "^3.46.3",
55
+ "@eggjs/tegg-runtime": "^3.46.3",
56
56
  "egg-errors": "^2.3.0",
57
57
  "globby": "^10.0.2",
58
58
  "koa-compose": "^3.2.1",
@@ -60,9 +60,9 @@
60
60
  "sdk-base": "^4.2.0"
61
61
  },
62
62
  "devDependencies": {
63
- "@eggjs/module-test-util": "^3.46.1",
64
- "@eggjs/tegg-config": "^3.46.1",
65
- "@eggjs/tegg-plugin": "^3.46.1",
63
+ "@eggjs/module-test-util": "^3.46.3",
64
+ "@eggjs/tegg-config": "^3.46.3",
65
+ "@eggjs/tegg-plugin": "^3.46.3",
66
66
  "@types/mocha": "^10.0.1",
67
67
  "@types/node": "^20.2.4",
68
68
  "cross-env": "^7.0.3",
@@ -77,5 +77,5 @@
77
77
  "publishConfig": {
78
78
  "access": "public"
79
79
  },
80
- "gitHead": "4333b21b086f8cece6481849a483d4122b5daf58"
80
+ "gitHead": "ccff56782b11c32894622755289e325d6c99a325"
81
81
  }