oak-backend-base 1.0.4 → 1.0.6

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/lib/index.d.ts CHANGED
@@ -1,2 +1 @@
1
- export { Context as BackendContext } from './BackendContext';
2
1
  export { AppLoader } from './AppLoader';
package/lib/index.js CHANGED
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppLoader = exports.BackendContext = void 0;
4
- var BackendContext_1 = require("./BackendContext");
5
- Object.defineProperty(exports, "BackendContext", { enumerable: true, get: function () { return BackendContext_1.Context; } });
3
+ exports.AppLoader = void 0;
6
4
  var AppLoader_1 = require("./AppLoader");
7
5
  Object.defineProperty(exports, "AppLoader", { enumerable: true, get: function () { return AppLoader_1.AppLoader; } });
package/package.json CHANGED
@@ -1,37 +1,33 @@
1
1
  {
2
2
  "name": "oak-backend-base",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "oak-backend-base",
5
5
  "main": "lib/index.js",
6
6
  "author": {
7
- "name": "XuChang"
7
+ "name": "XuChang"
8
8
  },
9
9
  "files": [
10
- "lib/**/*"
10
+ "lib/**/*"
11
11
  ],
12
12
  "scripts": {
13
+ "copy-files": "copyfiles -u 1 src/**/*.json lib/",
13
14
  "test": "ts-node test/test.ts",
14
- "build": "tsc"
15
+ "build": "tsc && npm run copy-files"
15
16
  },
16
17
  "dependencies": {
17
- "koa": "^2.13.4",
18
- "koa-body": "^5.0.0",
19
- "koa-router": "^10.1.1",
20
18
  "lodash": "^4.17.21",
21
19
  "mysql": "^2.18.1",
22
20
  "mysql2": "^2.3.3",
23
- "oak-db": "1.0.2",
24
- "oak-domain": "1.1.4",
25
- "oak-general-business": "1.0.6",
26
- "oak-common-aspect": "1.0.2",
21
+ "oak-common-aspect": "1.0.5",
22
+ "oak-db": "1.0.3",
23
+ "oak-domain": "1.1.10",
27
24
  "uuid": "^8.3.2"
28
25
  },
29
26
  "license": "ISC",
30
27
  "devDependencies": {
31
- "@types/koa": "^2.13.4",
32
- "@types/koa-router": "^7.4.4",
33
28
  "@types/node": "^17.0.40",
34
29
  "@types/uuid": "^8.3.4",
30
+ "copyfiles": "^2.4.1",
35
31
  "ts-node": "~10.9.1",
36
32
  "tslib": "^2.4.0",
37
33
  "typescript": "~4.7.4"
@@ -1,7 +0,0 @@
1
- import { RowStore } from 'oak-domain/lib/types';
2
- import { GeneralRuntimeContext } from 'oak-general-business';
3
- import { EntityDict } from 'oak-general-business/lib/general-app-domain';
4
- import { EntityDict as BaseEntityDict } from 'oak-domain/lib/base-app-domain';
5
- export declare class Context<ED extends EntityDict & BaseEntityDict> extends GeneralRuntimeContext<ED> {
6
- static FromCxtStr(cxtStr?: string): <ED extends EntityDict & BaseEntityDict>(store: RowStore<ED, Context<ED>>) => Context<ED>;
7
- }
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Context = void 0;
4
- const oak_general_business_1 = require("oak-general-business");
5
- class Context extends oak_general_business_1.GeneralRuntimeContext {
6
- static FromCxtStr(cxtStr) {
7
- const { token, applicationId, scene } = cxtStr ? oak_general_business_1.GeneralRuntimeContext.fromString(cxtStr) : {
8
- token: undefined,
9
- applicationId: undefined,
10
- scene: undefined,
11
- };
12
- return (store) => {
13
- const context = new Context(store, applicationId);
14
- context.setScene(scene);
15
- context.setToken(token);
16
- return context;
17
- };
18
- }
19
- }
20
- exports.Context = Context;