@tstdl/base 0.93.9 → 0.93.10
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/audit/module.d.ts +3 -3
- package/audit/module.js +3 -3
- package/document-management/api/document-management.api.d.ts +6 -6
- package/document-management/service-models/document.service-model.d.ts +3 -3
- package/orm/decorators.d.ts +35 -3
- package/orm/decorators.js +6 -0
- package/orm/query.d.ts +49 -30
- package/orm/query.js +2 -6
- package/orm/repository.types.d.ts +58 -0
- package/orm/server/drizzle/schema-converter.js +31 -2
- package/orm/server/query-converter.d.ts +5 -7
- package/orm/server/query-converter.js +69 -15
- package/orm/server/repository.d.ts +13 -5
- package/orm/server/repository.js +106 -4
- package/orm/sqls.d.ts +143 -8
- package/orm/sqls.js +143 -8
- package/package.json +3 -3
- package/schema/schemas/object.js +1 -1
- package/test/drizzle/0000_sudden_sphinx.sql +9 -0
- package/test/drizzle/meta/0000_snapshot.json +79 -0
- package/test/drizzle/meta/_journal.json +13 -0
- package/test/drizzle.config.d.ts +2 -0
- package/test/drizzle.config.js +11 -0
- package/test/index.d.ts +3 -0
- package/test/index.js +3 -0
- package/test/module.d.ts +6 -0
- package/test/module.js +17 -0
- package/test/schemas.d.ts +3 -0
- package/test/schemas.js +4 -0
- package/test/test.model.d.ts +8 -0
- package/test/test.model.js +345 -0
- package/test1.d.ts +1 -0
- package/test1.js +56 -0
- package/test3.d.ts +1 -0
- package/test3.js +47 -0
- package/test4.d.ts +23 -0
- package/test4.js +168 -0
- package/test5.d.ts +1 -0
- package/test5.js +22 -0
- package/test6.d.ts +1 -0
- package/test6.js +53 -0
package/test5.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import './polyfills.js';
|
|
2
|
+
import { Application } from './application/application.js';
|
|
3
|
+
import { provideModule, provideSignalHandler } from './application/index.js';
|
|
4
|
+
import { inject } from './injector/inject.js';
|
|
5
|
+
import { JsonLogFormatter, PrettyPrintLogFormatter } from './logger/index.js';
|
|
6
|
+
import { Logger } from './logger/logger.js';
|
|
7
|
+
import { provideConsoleLogTransport } from './logger/transports/console.js';
|
|
8
|
+
async function main(_cancellationSignal) {
|
|
9
|
+
const logger = inject(Logger, 'Test');
|
|
10
|
+
logger.error('Hello World!', { sessionId: 'abc123' });
|
|
11
|
+
logger.warn('Hello World!');
|
|
12
|
+
logger.info('Hello World!');
|
|
13
|
+
logger.verbose('Hello World!');
|
|
14
|
+
logger.debug('Hello World!');
|
|
15
|
+
logger.trace('Hello World!');
|
|
16
|
+
}
|
|
17
|
+
Application.run('Test', [
|
|
18
|
+
provideConsoleLogTransport(PrettyPrintLogFormatter),
|
|
19
|
+
provideConsoleLogTransport(JsonLogFormatter),
|
|
20
|
+
provideModule(main),
|
|
21
|
+
provideSignalHandler(),
|
|
22
|
+
]);
|
package/test6.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/test6.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { Application } from './application/application.js';
|
|
11
|
+
import { provideModule, provideSignalHandler } from './application/providers.js';
|
|
12
|
+
import { createContextProvider } from './context/context.js';
|
|
13
|
+
import { Class, Integer } from './schema/index.js';
|
|
14
|
+
const { runInschemaContext, isInschemaContext } = createContextProvider('schema');
|
|
15
|
+
function meta(type, data) {
|
|
16
|
+
// store meta somewhere
|
|
17
|
+
console.log('meta', type, data);
|
|
18
|
+
}
|
|
19
|
+
function integer() {
|
|
20
|
+
if (isInschemaContext()) {
|
|
21
|
+
return { type: 'integer' };
|
|
22
|
+
}
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
// current method
|
|
26
|
+
let Foo = class Foo {
|
|
27
|
+
age;
|
|
28
|
+
};
|
|
29
|
+
__decorate([
|
|
30
|
+
Integer(),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], Foo.prototype, "age", void 0);
|
|
33
|
+
Foo = __decorate([
|
|
34
|
+
Class({ description: 'Foo class' })
|
|
35
|
+
], Foo);
|
|
36
|
+
// new method
|
|
37
|
+
class Bar {
|
|
38
|
+
static {
|
|
39
|
+
meta(Bar, { description: 'Bar class' });
|
|
40
|
+
}
|
|
41
|
+
age = integer();
|
|
42
|
+
}
|
|
43
|
+
async function main() {
|
|
44
|
+
console.log(new Foo());
|
|
45
|
+
console.log(new Bar());
|
|
46
|
+
runInschemaContext(undefined, () => {
|
|
47
|
+
console.log(new Bar());
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
Application.run('Test', [
|
|
51
|
+
provideModule(main),
|
|
52
|
+
provideSignalHandler(),
|
|
53
|
+
]);
|