Skip to content

Commit 5eefd9a

Browse files
committed
Refactored framework code into separate packages.
removed jest useESM everywhere. made sure tsconfig project references are complete. sync-tsconfig-deps.js now syncs everything per default. added packages/skeleton. @deepkit/injector: moved injector to own package. @deepkit/event: moved event to own package. @deepkit/workflow: moved workflow to own package. @deepkit/stopwatch: moved stopwatch to own package. @deepkit/command: moved framework base to own package, which allows to write CLI apps without the overhead of the full framework. orm-browser: fixed selection of entities with / in name.
1 parent ad39da6 commit 5eefd9a

File tree

170 files changed

+2850
-1251
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+2850
-1251
lines changed
File renamed without changes.

package.json

+5
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,13 @@
5050
"packages/core",
5151
"packages/core-rxjs",
5252
"packages/type",
53+
"packages/command",
54+
"packages/event",
55+
"packages/workflow",
56+
"packages/stopwatch",
5357
"packages/orm",
5458
"packages/bson",
59+
"packages/injector",
5560
"packages/mongo",
5661
"packages/sql",
5762
"packages/mysql",

packages/angular-universal/package.json

+12-7
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,22 @@
2424
"repository": "https://github.com/deepkit/deepkit-framework",
2525
"author": "Marc J. Schmidt <[email protected]>",
2626
"license": "MIT",
27+
"peerDependencies": {
28+
"@deepkit/command": "^1.0.1-alpha.13",
29+
"@deepkit/injector": "^1.0.1-alpha.13",
30+
"@deepkit/logger": "^1.0.1-alpha.13",
31+
"@deepkit/event": "^1.0.1-alpha.13",
32+
"@deepkit/type": "^1.0.1-alpha.13"
33+
},
2734
"dependencies": {
28-
"@deepkit/framework": "^1.0.1-alpha.13",
29-
"@deepkit/type": "^1.0.1-alpha.13",
3035
"domino": "^2.0.0"
3136
},
3237
"devDependencies": {
38+
"@deepkit/command": "^1.0.1-alpha.13",
39+
"@deepkit/injector": "^1.0.1-alpha.13",
40+
"@deepkit/logger": "^1.0.1-alpha.13",
41+
"@deepkit/event": "^1.0.1-alpha.13",
42+
"@deepkit/type": "^1.0.1-alpha.13",
3343
"@angular/animations": "^10.0.0 || ^11.0.0",
3444
"@angular/common": "^10.0.0 || ^11.0.0",
3545
"@angular/core": "^10.0.0 || ^11.0.0",
@@ -38,11 +48,6 @@
3848
"@types/node": "^14.0.0"
3949
},
4050
"jest": {
41-
"globals": {
42-
"ts-jest": {
43-
"useESM": true
44-
}
45-
},
4651
"transform": {
4752
"^.+\\.(ts|tsx)$": "ts-jest"
4853
},

packages/angular-universal/src/config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* You should have received a copy of the MIT License along with this program.
99
*/
1010

11-
import { createConfig } from '@deepkit/framework';
11+
import { createConfig } from '@deepkit/injector';
1212
import { t } from '@deepkit/type';
1313

1414
export const config = createConfig({

packages/angular-universal/src/listener.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,16 @@
88
* You should have received a copy of the MIT License along with this program.
99
*/
1010

11-
import { eventDispatcher, HtmlResponse, httpWorkflow, inject, injectable, Logger, RouteConfig } from '@deepkit/framework';
11+
import { HtmlResponse, httpWorkflow, RouteConfig } from '@deepkit/framework';
12+
import { eventDispatcher } from '@deepkit/event';
13+
import { Logger } from '@deepkit/logger';
14+
import { inject, injectable } from '@deepkit/injector';
1215
import { config } from './config';
1316
import { join } from 'path';
1417
import { readFileSync } from 'fs';
1518
import { Router } from '@angular/router';
1619
import domino from 'domino';
20+
1721
(global as any).window = global;
1822
Object.assign(global, domino.createWindow());
1923

packages/angular-universal/src/module.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* You should have received a copy of the MIT License along with this program.
99
*/
1010

11-
import { createModule } from '@deepkit/framework';
11+
import { createModule } from '@deepkit/command';
1212
import { AngularUniversalListener } from './listener';
1313
import { config } from './config';
1414

packages/angular-universal/tsconfig.esm.json

+11-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,19 @@
66
},
77
"references": [
88
{
9-
"path": "../type/tsconfig.esm.json"
9+
"path": "../command/tsconfig.esm.json"
10+
},
11+
{
12+
"path": "../injector/tsconfig.esm.json"
13+
},
14+
{
15+
"path": "../logger/tsconfig.esm.json"
16+
},
17+
{
18+
"path": "../event/tsconfig.esm.json"
1019
},
1120
{
12-
"path": "../framework/tsconfig.esm.json"
21+
"path": "../type/tsconfig.esm.json"
1322
}
1423
]
1524
}

packages/angular-universal/tsconfig.json

+17-9
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"target": "es2018",
1212
"module": "CommonJS",
1313
"esModuleInterop": true,
14-
1514
"baseUrl": ".",
1615
"outDir": "./dist/cjs",
1716
"declaration": true,
@@ -24,11 +23,20 @@
2423
"tokens"
2524
],
2625
"references": [
27-
{
28-
"path": "../type/tsconfig.json"
29-
},
30-
{
31-
"path": "../framework/tsconfig.json"
32-
}
33-
]
34-
}
26+
{
27+
"path": "../command/tsconfig.json"
28+
},
29+
{
30+
"path": "../injector/tsconfig.json"
31+
},
32+
{
33+
"path": "../logger/tsconfig.json"
34+
},
35+
{
36+
"path": "../event/tsconfig.json"
37+
},
38+
{
39+
"path": "../type/tsconfig.json"
40+
}
41+
]
42+
}

packages/benchmark/tsconfig.json

+30-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"target": "es2020",
1313
"module": "CommonJS",
1414
"esModuleInterop": true,
15-
1615
"outDir": "./dist",
1716
"declaration": true,
1817
"composite": true,
@@ -25,17 +24,44 @@
2524
"index.ts"
2625
],
2726
"references": [
27+
{
28+
"path": "../broker/tsconfig.json"
29+
},
30+
{
31+
"path": "../bson/tsconfig.json"
32+
},
2833
{
2934
"path": "../core/tsconfig.json"
3035
},
36+
{
37+
"path": "../framework/tsconfig.json"
38+
},
39+
{
40+
"path": "../mongo/tsconfig.json"
41+
},
42+
{
43+
"path": "../orm/tsconfig.json"
44+
},
45+
{
46+
"path": "../sql/tsconfig.json"
47+
},
48+
{
49+
"path": "../sqlite/tsconfig.json"
50+
},
51+
{
52+
"path": "../mysql/tsconfig.json"
53+
},
54+
{
55+
"path": "../postgres/tsconfig.json"
56+
},
3157
{
3258
"path": "../type/tsconfig.json"
3359
},
3460
{
35-
"path": "../bson/tsconfig.json"
61+
"path": "../rpc/tsconfig.json"
3662
},
3763
{
38-
"path": "../topsort/tsconfig.json"
64+
"path": "../rpc-tcp/tsconfig.json"
3965
}
4066
]
41-
}
67+
}

packages/broker/package.json

-9
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,9 @@
3535
"reflect-metadata": "^0.1.13"
3636
},
3737
"jest": {
38-
"globals": {
39-
"ts-jest": {
40-
"useESM": true
41-
}
42-
},
4338
"transform": {
4439
"^.+\\.(ts|tsx)$": "ts-jest"
4540
},
46-
"extensionsToTreatAsEsm": [
47-
".ts",
48-
".tsx"
49-
],
5041
"testMatch": [
5142
"**/tests/**/*.spec.ts"
5243
]

packages/broker/tsconfig.esm.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66
},
77
"references": [
88
{
9-
"path": "../core/tsconfig.esm.json"
9+
"path": "../bson/tsconfig.esm.json"
1010
},
1111
{
12-
"path": "../core-rxjs/tsconfig.esm.json"
12+
"path": "../core/tsconfig.esm.json"
1313
},
1414
{
15-
"path": "../type/tsconfig.esm.json"
15+
"path": "../core-rxjs/tsconfig.esm.json"
1616
},
1717
{
18-
"path": "../bson/tsconfig.esm.json"
18+
"path": "../rpc/tsconfig.esm.json"
1919
},
2020
{
21-
"path": "../rpc/tsconfig.esm.json"
21+
"path": "../type/tsconfig.esm.json"
2222
}
2323
]
2424
}

packages/broker/tsconfig.json

+6-7
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"target": "es2018",
1212
"module": "CommonJS",
1313
"esModuleInterop": true,
14-
1514
"outDir": "./dist/cjs",
1615
"declaration": true,
1716
"composite": true
@@ -23,19 +22,19 @@
2322
],
2423
"references": [
2524
{
26-
"path": "../core/tsconfig.json"
25+
"path": "../bson/tsconfig.json"
2726
},
2827
{
29-
"path": "../core-rxjs/tsconfig.json"
28+
"path": "../core/tsconfig.json"
3029
},
3130
{
32-
"path": "../type/tsconfig.json"
31+
"path": "../core-rxjs/tsconfig.json"
3332
},
3433
{
35-
"path": "../bson/tsconfig.json"
34+
"path": "../rpc/tsconfig.json"
3635
},
3736
{
38-
"path": "../rpc/tsconfig.json"
37+
"path": "../type/tsconfig.json"
3938
}
4039
]
41-
}
40+
}

packages/bson/package.json

-9
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,10 @@
3737
"reflect-metadata": "^0.1.13"
3838
},
3939
"jest": {
40-
"globals": {
41-
"ts-jest": {
42-
"useESM": true
43-
}
44-
},
4540
"testEnvironment": "node",
4641
"transform": {
4742
"^.+\\.(ts|tsx)$": "ts-jest"
4843
},
49-
"extensionsToTreatAsEsm": [
50-
".ts",
51-
".tsx"
52-
],
5344
"testMatch": [
5445
"**/tests/**/*.spec.ts"
5546
]

packages/bson/tsconfig.esm.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"path": "../core/tsconfig.esm.json"
1010
},
1111
{
12-
"path": "../type/tsconfig.esm.json"
12+
"path": "../crypto/tsconfig.json"
1313
},
1414
{
15-
"path": "../crypto/tsconfig.esm.json"
15+
"path": "../type/tsconfig.esm.json"
1616
}
1717
]
1818
}

packages/bson/tsconfig.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"target": "es2020",
1313
"module": "CommonJS",
1414
"esModuleInterop": true,
15-
1615
"outDir": "./dist/cjs",
1716
"declaration": true,
1817
"composite": true
@@ -28,10 +27,10 @@
2827
"path": "../core/tsconfig.json"
2928
},
3029
{
31-
"path": "../type/tsconfig.json"
30+
"path": "../crypto/tsconfig.json"
3231
},
3332
{
34-
"path": "../crypto/tsconfig.json"
33+
"path": "../type/tsconfig.json"
3534
}
3635
]
37-
}
36+
}

packages/command/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# @deepkit/command
2+
3+
A command line framework to write command line tools using a dependency injection container and simple classes.
4+
5+
This is the base of @deepkit/framework.

packages/command/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export * from './src/application';
2+
export * from './src/command';
3+
export * from './src/configuration';
4+
export * from './src/module';
5+
export * from './src/service-container';

0 commit comments

Comments
 (0)