@biorate/migrations 1.165.12 → 1.165.14
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/CHANGELOG.md +8 -0
- package/coverage/clover.xml +74 -128
- package/coverage/coverage-final.json +8 -15
- package/coverage/index.html +23 -83
- package/coverage/src/errors.ts.html +1 -1
- package/coverage/src/index.html +1 -1
- package/coverage/src/root.ts.html +1 -1
- package/coverage/src/types/amqp.ts.html +21 -21
- package/coverage/src/types/clickhouse.ts.html +31 -31
- package/coverage/src/types/index.html +68 -68
- package/coverage/src/types/index.ts.html +1 -1
- package/coverage/src/types/kafka.ts.html +17 -17
- package/coverage/src/types/migration.ts.html +13 -13
- package/coverage/src/types/minio.ts.html +27 -27
- package/coverage/src/types/mongodb.ts.html +19 -19
- package/coverage/src/types/schema-registry.ts.html +29 -29
- package/coverage/src/types/sequelize.ts.html +1 -1
- package/coverage/tests/__mocks__/index.html +7 -7
- package/coverage/tests/__mocks__/index.ts.html +5 -236
- package/dist/cjs/index.js +18 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/src/default.config.js +6 -0
- package/dist/cjs/src/default.config.js.map +1 -0
- package/dist/cjs/src/errors.js +13 -0
- package/dist/cjs/src/errors.js.map +1 -0
- package/dist/cjs/src/index.js +26 -0
- package/dist/cjs/src/index.js.map +1 -0
- package/dist/cjs/src/interfaces.js +2 -0
- package/dist/cjs/src/interfaces.js.map +1 -0
- package/dist/cjs/src/root.js +163 -0
- package/dist/cjs/src/root.js.map +1 -0
- package/dist/cjs/src/types/amqp.js +37 -0
- package/dist/cjs/src/types/amqp.js.map +1 -0
- package/dist/cjs/src/types/clickhouse.js +66 -0
- package/dist/cjs/src/types/clickhouse.js.map +1 -0
- package/dist/cjs/src/types/index.js +24 -0
- package/dist/cjs/src/types/index.js.map +1 -0
- package/dist/cjs/src/types/kafka.js +33 -0
- package/dist/cjs/src/types/kafka.js.map +1 -0
- package/dist/cjs/src/types/migration.js +70 -0
- package/dist/cjs/src/types/migration.js.map +1 -0
- package/dist/cjs/src/types/minio.js +41 -0
- package/dist/cjs/src/types/minio.js.map +1 -0
- package/dist/cjs/src/types/mongodb.js +36 -0
- package/dist/cjs/src/types/mongodb.js.map +1 -0
- package/dist/cjs/src/types/schema-registry.js +54 -0
- package/dist/cjs/src/types/schema-registry.js.map +1 -0
- package/dist/cjs/src/types/sequelize.js +43 -0
- package/dist/cjs/src/types/sequelize.js.map +1 -0
- package/dist/cjs/tsconfig.build.cjs.tsbuildinfo +1 -0
- package/dist/esm/index.mjs +2 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/src/default.config.mjs +4 -0
- package/dist/esm/src/default.config.mjs.map +1 -0
- package/dist/esm/src/errors.mjs +9 -0
- package/dist/esm/src/errors.mjs.map +1 -0
- package/dist/esm/src/index.mjs +10 -0
- package/dist/esm/src/index.mjs.map +1 -0
- package/dist/esm/src/interfaces.mjs +2 -0
- package/dist/esm/src/interfaces.mjs.map +1 -0
- package/dist/esm/src/root.mjs +137 -0
- package/dist/esm/src/root.mjs.map +1 -0
- package/dist/esm/src/types/amqp.mjs +33 -0
- package/dist/esm/src/types/amqp.mjs.map +1 -0
- package/dist/esm/src/types/clickhouse.mjs +62 -0
- package/dist/esm/src/types/clickhouse.mjs.map +1 -0
- package/dist/esm/src/types/index.mjs +8 -0
- package/dist/esm/src/types/index.mjs.map +1 -0
- package/dist/esm/src/types/kafka.mjs +29 -0
- package/dist/esm/src/types/kafka.mjs.map +1 -0
- package/dist/esm/src/types/migration.mjs +67 -0
- package/dist/esm/src/types/migration.mjs.map +1 -0
- package/dist/esm/src/types/minio.mjs +37 -0
- package/dist/esm/src/types/minio.mjs.map +1 -0
- package/dist/esm/src/types/mongodb.mjs +32 -0
- package/dist/esm/src/types/mongodb.mjs.map +1 -0
- package/dist/esm/src/types/schema-registry.mjs +50 -0
- package/dist/esm/src/types/schema-registry.mjs.map +1 -0
- package/dist/esm/src/types/sequelize.mjs +39 -0
- package/dist/esm/src/types/sequelize.mjs.map +1 -0
- package/dist/esm/tsconfig.build.esm.tsbuildinfo +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/src/default.config.d.ts +1 -0
- package/dist/types/src/errors.d.ts +4 -0
- package/dist/types/src/index.d.ts +3 -0
- package/dist/types/src/interfaces.d.ts +0 -0
- package/dist/types/src/root.d.ts +27 -0
- package/dist/types/src/types/amqp.d.ts +6 -0
- package/dist/types/src/types/clickhouse.d.ts +6 -0
- package/dist/types/src/types/index.d.ts +7 -0
- package/dist/types/src/types/kafka.d.ts +6 -0
- package/dist/types/src/types/migration.d.ts +16 -0
- package/dist/types/src/types/minio.d.ts +6 -0
- package/dist/types/src/types/mongodb.d.ts +6 -0
- package/dist/types/src/types/schema-registry.d.ts +7 -0
- package/dist/types/src/types/sequelize.d.ts +6 -0
- package/dist/types/tsconfig.build.types.tsbuildinfo +1 -0
- package/package.json +18 -18
- package/coverage/tests/migrations/amqp/test/00001_create-test.js.html +0 -94
- package/coverage/tests/migrations/amqp/test/00002_delete-test.js.html +0 -94
- package/coverage/tests/migrations/amqp/test/index.html +0 -131
- package/coverage/tests/migrations/kafka/admin/00001_create-test.js.html +0 -109
- package/coverage/tests/migrations/kafka/admin/00002_delete-test.js.html +0 -100
- package/coverage/tests/migrations/kafka/admin/index.html +0 -131
- package/coverage/tests/migrations/minio/minio/00001_create-test.js.html +0 -91
- package/coverage/tests/migrations/minio/minio/00002_delete-test.js.html +0 -94
- package/coverage/tests/migrations/minio/minio/index.html +0 -131
- package/coverage/tests/migrations/mongodb/mongodb/00001_create-index-test.js.html +0 -91
- package/coverage/tests/migrations/mongodb/mongodb/index.html +0 -116
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.config.mjs","sourceRoot":"","sources":["../../../src/default.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAE1B,SAAS,CAAC,GAAG,CAAO,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseError } from '@biorate/errors';
|
|
2
|
+
export class SchemaRegistryWrongFileNameError extends BaseError {
|
|
3
|
+
constructor(name) {
|
|
4
|
+
super(`Schema registry wrong filename: [%s], pattern: "00001_filename.avsc.json"`, [
|
|
5
|
+
name,
|
|
6
|
+
]);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=errors.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.mjs","sourceRoot":"","sources":["../../../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,gCAAiC,SAAQ,SAAS;IAC7D,YAAmB,IAAY;QAC7B,KAAK,CAAC,2EAA2E,EAAE;YACjF,IAAI;SACL,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getRequire } from '@biorate/node-tools';
|
|
2
|
+
export * from './root';
|
|
3
|
+
export * from './types/migration';
|
|
4
|
+
export * from './types';
|
|
5
|
+
const requireFn = getRequire();
|
|
6
|
+
requireFn(process.env.MIGRATIONS_CONFIG
|
|
7
|
+
? process.cwd() + process.env.MIGRATIONS_CONFIG
|
|
8
|
+
: './default.config');
|
|
9
|
+
requireFn(process.env.MIGRATIONS_ROOT ? process.cwd() + process.env.MIGRATIONS_ROOT : './root');
|
|
10
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AAExB,MAAM,SAAS,GAAG,UAAU,EAAE,CAAC;AAE/B,SAAS,CACP,OAAO,CAAC,GAAG,CAAC,iBAAiB;IAC3B,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB;IAC/C,CAAC,CAAC,kBAAkB,CACvB,CAAC;AACF,SAAS,CACP,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,QAAQ,CACrF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.mjs","sourceRoot":"","sources":["../../../src/interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,137 @@
|
|
|
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 { EventEmitter } from 'events';
|
|
11
|
+
import { init, injectable, inject, Types, Core, container } from '@biorate/inversion';
|
|
12
|
+
import { Config } from '@biorate/config';
|
|
13
|
+
import { ConfigLoader } from '@biorate/config-loader';
|
|
14
|
+
import { VaultConnector } from '@biorate/vault';
|
|
15
|
+
import { ProxyConnector } from '@biorate/proxy';
|
|
16
|
+
import * as Migrations from './types';
|
|
17
|
+
import { ConfigLoaderEnv } from '@biorate/config-loader-env';
|
|
18
|
+
import { ConfigLoaderFs } from '@biorate/config-loader-fs';
|
|
19
|
+
import { ConfigLoaderVault } from '@biorate/config-loader-vault';
|
|
20
|
+
import { SequelizeConnector } from '@biorate/sequelize';
|
|
21
|
+
import { MinioConnector } from '@biorate/minio';
|
|
22
|
+
import { MongoDBConnector } from '@biorate/mongodb';
|
|
23
|
+
import { ClickhouseConnector } from '@biorate/clickhouse';
|
|
24
|
+
import { AmqpConnector } from '@biorate/amqp';
|
|
25
|
+
import { KafkaJSAdminConnector } from '@biorate/kafkajs';
|
|
26
|
+
import { SchemaRegistryConnector, } from '@biorate/schema-registry';
|
|
27
|
+
let Root = class Root extends Core(EventEmitter) {
|
|
28
|
+
async initialize() {
|
|
29
|
+
process.exit(0);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
__decorate([
|
|
33
|
+
inject(Types.Config),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], Root.prototype, "config", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
inject(Types.ConfigLoaderEnv),
|
|
38
|
+
__metadata("design:type", ConfigLoader)
|
|
39
|
+
], Root.prototype, "configLoaderEnv", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
inject(Types.ConfigLoaderFs),
|
|
42
|
+
__metadata("design:type", ConfigLoader)
|
|
43
|
+
], Root.prototype, "configLoaderFs", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
inject(Types.ConfigLoaderVault),
|
|
46
|
+
__metadata("design:type", ConfigLoader)
|
|
47
|
+
], Root.prototype, "configLoaderVault", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
inject(Types.Vault),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], Root.prototype, "vault", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
inject(Types.Proxy),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], Root.prototype, "proxy", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
inject(Migrations.Sequelize),
|
|
58
|
+
__metadata("design:type", Migrations.Sequelize)
|
|
59
|
+
], Root.prototype, "sequelize", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
inject(Migrations.Minio),
|
|
62
|
+
__metadata("design:type", Migrations.Minio)
|
|
63
|
+
], Root.prototype, "minio", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
inject(Migrations.Mongodb),
|
|
66
|
+
__metadata("design:type", Migrations.Mongodb)
|
|
67
|
+
], Root.prototype, "mongodb", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
inject(Migrations.Kafka),
|
|
70
|
+
__metadata("design:type", Migrations.Kafka)
|
|
71
|
+
], Root.prototype, "kafkaJSAdmin", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
inject(Migrations.Clickhouse),
|
|
74
|
+
__metadata("design:type", Migrations.Clickhouse)
|
|
75
|
+
], Root.prototype, "clickhouse", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
inject(Migrations.Amqp),
|
|
78
|
+
__metadata("design:type", Migrations.Amqp)
|
|
79
|
+
], Root.prototype, "amqp", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
inject(Migrations.SchemaRegistry),
|
|
82
|
+
__metadata("design:type", Migrations.SchemaRegistry)
|
|
83
|
+
], Root.prototype, "schemaRegistry", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
init(),
|
|
86
|
+
__metadata("design:type", Function),
|
|
87
|
+
__metadata("design:paramtypes", []),
|
|
88
|
+
__metadata("design:returntype", Promise)
|
|
89
|
+
], Root.prototype, "initialize", null);
|
|
90
|
+
Root = __decorate([
|
|
91
|
+
injectable()
|
|
92
|
+
], Root);
|
|
93
|
+
export { Root };
|
|
94
|
+
Core.log = null;
|
|
95
|
+
container.bind(Types.Config).to(Config).inSingletonScope();
|
|
96
|
+
container
|
|
97
|
+
.bind(Types.ConfigLoaderEnv)
|
|
98
|
+
.to(ConfigLoaderEnv)
|
|
99
|
+
.inSingletonScope();
|
|
100
|
+
container.bind(Types.ConfigLoaderFs).to(ConfigLoaderFs).inSingletonScope();
|
|
101
|
+
container
|
|
102
|
+
.bind(Types.ConfigLoaderVault)
|
|
103
|
+
.to(ConfigLoaderVault)
|
|
104
|
+
.inSingletonScope();
|
|
105
|
+
container.bind(Types.Vault).to(VaultConnector).inSingletonScope();
|
|
106
|
+
container
|
|
107
|
+
.bind(Types.Sequelize)
|
|
108
|
+
.to(SequelizeConnector)
|
|
109
|
+
.inSingletonScope();
|
|
110
|
+
container.bind(Types.Minio).to(MinioConnector).inSingletonScope();
|
|
111
|
+
container.bind(Types.Mongodb).to(MongoDBConnector).inSingletonScope();
|
|
112
|
+
container
|
|
113
|
+
.bind(Types.Clickhouse)
|
|
114
|
+
.to(ClickhouseConnector)
|
|
115
|
+
.inSingletonScope();
|
|
116
|
+
container.bind(Types.Amqp).to(AmqpConnector).inSingletonScope();
|
|
117
|
+
container
|
|
118
|
+
.bind(Types.Kafka)
|
|
119
|
+
.to(KafkaJSAdminConnector)
|
|
120
|
+
.inSingletonScope();
|
|
121
|
+
container.bind(Types.Proxy).to(ProxyConnector).inSingletonScope();
|
|
122
|
+
container
|
|
123
|
+
.bind(Types.SchemaRegistry)
|
|
124
|
+
.to(SchemaRegistryConnector)
|
|
125
|
+
.inSingletonScope();
|
|
126
|
+
container.bind(Migrations.Sequelize).toSelf().inSingletonScope();
|
|
127
|
+
container.bind(Migrations.Minio).toSelf().inSingletonScope();
|
|
128
|
+
container.bind(Migrations.Mongodb).toSelf().inSingletonScope();
|
|
129
|
+
container.bind(Migrations.Kafka).toSelf().inSingletonScope();
|
|
130
|
+
container.bind(Migrations.Clickhouse).toSelf().inSingletonScope();
|
|
131
|
+
container.bind(Migrations.Amqp).toSelf().inSingletonScope();
|
|
132
|
+
container
|
|
133
|
+
.bind(Migrations.SchemaRegistry)
|
|
134
|
+
.toSelf()
|
|
135
|
+
.inSingletonScope();
|
|
136
|
+
container.bind(Root).to(Root).inSingletonScope();
|
|
137
|
+
//# sourceMappingURL=root.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root.mjs","sourceRoot":"","sources":["../../../src/root.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACtF,OAAO,EAAE,MAAM,EAAW,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAmB,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAmB,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,UAAU,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAuB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAmB,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAqB,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAwB,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,aAAa,EAAkB,MAAM,eAAe,CAAC;AAC9D,OAAO,EAA0B,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACjF,OAAO,EAEL,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAG3B,IAAM,I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,qBAAqB,CAAC;KACzB,gBAAgB,EAAE,CAAC;AACtB,SAAS,CAAC,IAAI,CAAkB,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC,gBAAgB,EAAE,CAAC;AACnF,SAAS;KACN,IAAI,CAA2B,KAAK,CAAC,cAAc,CAAC;KACpD,EAAE,CAAC,uBAAuB,CAAC;KAC3B,gBAAgB,EAAE,CAAC;AACtB,SAAS,CAAC,IAAI,CAAuB,UAAU,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;AACvF,SAAS,CAAC,IAAI,CAAmB,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;AAC/E,SAAS,CAAC,IAAI,CAAqB,UAAU,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;AACnF,SAAS,CAAC,IAAI,CAAmB,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;AAC/E,SAAS,CAAC,IAAI,CAAwB,UAAU,CAAC,UAAU,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;AACzF,SAAS,CAAC,IAAI,CAAkB,UAAU,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;AAC7E,SAAS;KACN,IAAI,CAA4B,UAAU,CAAC,cAAc,CAAC;KAC1D,MAAM,EAAE;KACR,gBAAgB,EAAE,CAAC;AACtB,SAAS,CAAC,IAAI,CAAO,IAAI,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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 { inject, Types } from '@biorate/inversion';
|
|
11
|
+
import { Migration } from './migration';
|
|
12
|
+
import { getRequire } from '@biorate/node-tools';
|
|
13
|
+
const requireFn = getRequire();
|
|
14
|
+
export class Amqp extends Migration {
|
|
15
|
+
async process() {
|
|
16
|
+
await this.forEach('Amqp', async (config, connection, paths) => {
|
|
17
|
+
const channel = connection.createChannel(this.config.get(`migrations.Amqp.${config.name}.amqpChannelOptions`, {}));
|
|
18
|
+
await channel.waitForConnect();
|
|
19
|
+
await this.forEachPath(paths, async (file, name) => {
|
|
20
|
+
try {
|
|
21
|
+
await requireFn(file)(channel, connection, config, this.config);
|
|
22
|
+
this.log(config.name, name);
|
|
23
|
+
}
|
|
24
|
+
catch (e) { }
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
__decorate([
|
|
30
|
+
inject(Types.Amqp),
|
|
31
|
+
__metadata("design:type", Object)
|
|
32
|
+
], Amqp.prototype, "connector", void 0);
|
|
33
|
+
//# sourceMappingURL=amqp.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amqp.mjs","sourceRoot":"","sources":["../../../../src/types/amqp.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AASnD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,MAAM,SAAS,GAAG,UAAU,EAAE,CAAC;AAI/B,MAAM,OAAO,IAAK,SAAQ,SAAS;IAKvB,KAAK,CAAC,OAAO;QACrB,MAAM,IAAI,CAAC,OAAO,CAChB,MAAM,EACN,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE;YAClC,MAAM,OAAO,GAAG,UAAU,CAAC,aAAa,CACtC,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,mBAAmB,MAAM,CAAC,IAAI,qBAAqB,EACnD,EAAE,CACH,CACF,CAAC;YACF,MAAM,OAAO,CAAC,cAAc,EAAE,CAAC;YAC/B,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;gBACjD,IAAI,CAAC;oBACH,MACE,SAAS,CAAC,IAAI,CAMf,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;oBAC5C,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;gBAC9B,CAAC;gBAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC;YAChB,CAAC,CAAC,CAAC;QACL,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AA/B+B;IAA7B,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;;uCAAqC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
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 { promises as fs } from 'fs';
|
|
11
|
+
import { inject, Types } from '@biorate/inversion';
|
|
12
|
+
import { Migration } from './migration';
|
|
13
|
+
export class Clickhouse extends Migration {
|
|
14
|
+
async process() {
|
|
15
|
+
await this.forEach('Clickhouse', async (config, connection, paths) => {
|
|
16
|
+
const tableName = this.config.get('migrations.tableName', 'migrations');
|
|
17
|
+
const createQuery = `
|
|
18
|
+
CREATE TABLE IF NOT EXISTS {tableName:Identifier} (
|
|
19
|
+
name String
|
|
20
|
+
)
|
|
21
|
+
ENGINE = MergeTree()
|
|
22
|
+
PRIMARY KEY (name);
|
|
23
|
+
`;
|
|
24
|
+
await connection.command({
|
|
25
|
+
query: createQuery,
|
|
26
|
+
query_params: { tableName },
|
|
27
|
+
clickhouse_settings: {
|
|
28
|
+
wait_end_of_query: 1,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
await this.forEachPath(paths, async (file, name) => {
|
|
32
|
+
const cursor = await connection.query({
|
|
33
|
+
query: `SELECT * FROM {tableName:Identifier} WHERE name = {name:String};`,
|
|
34
|
+
query_params: { name, tableName },
|
|
35
|
+
format: 'JSON',
|
|
36
|
+
});
|
|
37
|
+
const { data } = await cursor.json();
|
|
38
|
+
if (data.length)
|
|
39
|
+
return;
|
|
40
|
+
await connection.command({
|
|
41
|
+
query: await fs.readFile(file, 'utf8'),
|
|
42
|
+
clickhouse_settings: {
|
|
43
|
+
wait_end_of_query: 1,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
await connection.command({
|
|
47
|
+
query: `INSERT INTO {tableName:Identifier} (name) VALUES ({name:String})`,
|
|
48
|
+
query_params: { name, tableName },
|
|
49
|
+
clickhouse_settings: {
|
|
50
|
+
wait_end_of_query: 1,
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
this.log(config.name, name);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
__decorate([
|
|
59
|
+
inject(Types.Clickhouse),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], Clickhouse.prototype, "connector", void 0);
|
|
62
|
+
//# sourceMappingURL=clickhouse.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clickhouse.mjs","sourceRoot":"","sources":["../../../../src/types/clickhouse.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AASxC,MAAM,OAAO,UAAW,SAAQ,SAAS;IAK7B,KAAK,CAAC,OAAO;QACrB,MAAM,IAAI,CAAC,OAAO,CAChB,YAAY,EACZ,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE;YAClC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAS,sBAAsB,EAAE,YAAY,CAAC,CAAC;YAChF,MAAM,WAAW,GAAG;;;;;;SAMnB,CAAC;YACF,MAAM,UAAU,CAAC,OAAO,CAAC;gBACvB,KAAK,EAAE,WAAW;gBAClB,YAAY,EAAE,EAAE,SAAS,EAAE;gBAC3B,mBAAmB,EAAE;oBACnB,iBAAiB,EAAE,CAAC;iBACrB;aACF,CAAC,CAAC;YACH,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;gBACjD,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,KAAK,CAAC;oBACpC,KAAK,EAAE,kEAAkE;oBACzE,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;oBACjC,MAAM,EAAE,MAAM;iBACf,CAAC,CAAC;gBACH,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,EAAoB,CAAC;gBACvD,IAAI,IAAI,CAAC,MAAM;oBAAE,OAAO;gBACxB,MAAM,UAAU,CAAC,OAAO,CAAC;oBACvB,KAAK,EAAE,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;oBACtC,mBAAmB,EAAE;wBACnB,iBAAiB,EAAE,CAAC;qBACrB;iBACF,CAAC,CAAC;gBACH,MAAM,UAAU,CAAC,OAAO,CAAC;oBACvB,KAAK,EAAE,kEAAkE;oBACzE,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;oBACjC,mBAAmB,EAAE;wBACnB,iBAAiB,EAAE,CAAC;qBACrB;iBACF,CAAC,CAAC;gBACH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YAC9B,CAAC,CAAC,CAAC;QACL,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AAjDqC;IAAnC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC;;6CAA2C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { inject, Types } from '@biorate/inversion';
|
|
11
|
+
import { Migration } from './migration';
|
|
12
|
+
import { getRequire } from '@biorate/node-tools';
|
|
13
|
+
const requireFn = getRequire();
|
|
14
|
+
export class Kafka extends Migration {
|
|
15
|
+
async process() {
|
|
16
|
+
await this.forEach('KafkaJSAdmin', async (config, connection, paths) => await this.forEachPath(paths, async (file, name) => {
|
|
17
|
+
try {
|
|
18
|
+
await requireFn(file)(connection, config, this.config);
|
|
19
|
+
this.log(config.name, name);
|
|
20
|
+
}
|
|
21
|
+
catch (e) { }
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
__decorate([
|
|
26
|
+
inject(Types.Kafka),
|
|
27
|
+
__metadata("design:type", Object)
|
|
28
|
+
], Kafka.prototype, "connector", void 0);
|
|
29
|
+
//# sourceMappingURL=kafka.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kafka.mjs","sourceRoot":"","sources":["../../../../src/types/kafka.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAOnD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,MAAM,SAAS,GAAG,UAAU,EAAE,CAAC;AAI/B,MAAM,OAAO,KAAM,SAAQ,SAAS;IAKxB,KAAK,CAAC,OAAO;QACrB,MAAM,IAAI,CAAC,OAAO,CAChB,cAAc,EACd,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,CAClC,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;YACjD,IAAI,CAAC;gBACH,MACE,SAAS,CAAC,IAAI,CAKf,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;gBACnC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YAC9B,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC;QAChB,CAAC,CAAC,CACL,CAAC;IACJ,CAAC;CACF;AAtBgC;IAA9B,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;;wCAA6C"}
|
|
@@ -0,0 +1,67 @@
|
|
|
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 { promises as fs } from 'fs';
|
|
11
|
+
import { path } from '@biorate/tools';
|
|
12
|
+
import { init, injectable, inject, Types } from '@biorate/inversion';
|
|
13
|
+
let Migration = class Migration {
|
|
14
|
+
get type() {
|
|
15
|
+
return this.constructor.name.toLowerCase();
|
|
16
|
+
}
|
|
17
|
+
async scan(...args) {
|
|
18
|
+
try {
|
|
19
|
+
return (await fs.readdir(this.path(...args))).map((item) => this.path(...args, item));
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
path(...args) {
|
|
26
|
+
return path.create(process.cwd(), this.config.get('migrations.directory', 'migrations'), this.type, ...args);
|
|
27
|
+
}
|
|
28
|
+
log(...args) {
|
|
29
|
+
console.info(this.type, ...args, 'up!');
|
|
30
|
+
}
|
|
31
|
+
async initialize() {
|
|
32
|
+
console.info(this.constructor.name);
|
|
33
|
+
await this.process();
|
|
34
|
+
}
|
|
35
|
+
async forEach(namespace, callback) {
|
|
36
|
+
for (const config of this.config.get(namespace, [])) {
|
|
37
|
+
const paths = await this.scan(config.name);
|
|
38
|
+
if (!paths.length)
|
|
39
|
+
continue;
|
|
40
|
+
const connection = this.connector.connection(config.name);
|
|
41
|
+
if (!connection) {
|
|
42
|
+
console.info(`${namespace} connection [%s] not exists, skip...`, config.name);
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
await callback(config, connection, paths);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
async forEachPath(paths, callback) {
|
|
49
|
+
for (const p of paths)
|
|
50
|
+
await callback(p, path.basename(p));
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
__decorate([
|
|
54
|
+
inject(Types.Config),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], Migration.prototype, "config", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
init(),
|
|
59
|
+
__metadata("design:type", Function),
|
|
60
|
+
__metadata("design:paramtypes", []),
|
|
61
|
+
__metadata("design:returntype", Promise)
|
|
62
|
+
], Migration.prototype, "initialize", null);
|
|
63
|
+
Migration = __decorate([
|
|
64
|
+
injectable()
|
|
65
|
+
], Migration);
|
|
66
|
+
export { Migration };
|
|
67
|
+
//# sourceMappingURL=migration.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration.mjs","sourceRoot":"","sources":["../../../../src/types/migration.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAO9D,IAAe,SAAS,GAAxB,MAAe,SAAS;IAY7B,IAAc,IAAI;QAChB,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;IAC7C,CAAC;IAIS,KAAK,CAAC,IAAI,CAAC,GAAG,IAAc;QACpC,IAAI,CAAC;YACH,OAAO,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACzD,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,IAAI,CAAC,CACzB,CAAC;QACJ,CAAC;QAAC,MAAM,CAAC;YACP,OAAiB,EAAE,CAAC;QACtB,CAAC;IACH,CAAC;IAIS,IAAI,CAAC,GAAG,IAAc;QAC9B,OAAO,IAAI,CAAC,MAAM,CAChB,OAAO,CAAC,GAAG,EAAE,EACb,IAAI,CAAC,MAAM,CAAC,GAAG,CAAS,sBAAsB,EAAE,YAAY,CAAC,EAC7D,IAAI,CAAC,IAAI,EACT,GAAG,IAAI,CACR,CAAC;IACJ,CAAC;IAIS,GAAG,CAAC,GAAG,IAAc;QAC7B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,I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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 { inject, Types } from '@biorate/inversion';
|
|
11
|
+
import { Migration } from './migration';
|
|
12
|
+
import { getRequire } from '@biorate/node-tools';
|
|
13
|
+
const requireFn = getRequire();
|
|
14
|
+
export class Minio extends Migration {
|
|
15
|
+
async process() {
|
|
16
|
+
await this.forEach('Minio', async (config, connection, paths) => await this.forEachPath(paths, async (file, name) => {
|
|
17
|
+
const tableName = this.config.get('migrations.tableName', 'migrations');
|
|
18
|
+
try {
|
|
19
|
+
await connection.makeBucket(tableName, tableName);
|
|
20
|
+
}
|
|
21
|
+
catch { }
|
|
22
|
+
try {
|
|
23
|
+
await connection.getObject(tableName, name);
|
|
24
|
+
}
|
|
25
|
+
catch (e) {
|
|
26
|
+
await requireFn(file)(connection, config, this.config);
|
|
27
|
+
await connection.putObject(tableName, name, Buffer.from('1'));
|
|
28
|
+
this.log(config.name, name);
|
|
29
|
+
}
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
__decorate([
|
|
34
|
+
inject(Types.Minio),
|
|
35
|
+
__metadata("design:type", Object)
|
|
36
|
+
], Minio.prototype, "connector", void 0);
|
|
37
|
+
//# sourceMappingURL=minio.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1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C;IAA9B,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;;wCAAsC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 { inject, Types } from '@biorate/inversion';
|
|
11
|
+
import { Migration } from './migration';
|
|
12
|
+
import { getRequire } from '@biorate/node-tools';
|
|
13
|
+
const requireFn = getRequire();
|
|
14
|
+
export class Mongodb extends Migration {
|
|
15
|
+
async process() {
|
|
16
|
+
await this.forEach('MongoDB', async (config, connection, paths) => await this.forEachPath(paths, async (file, name) => {
|
|
17
|
+
try {
|
|
18
|
+
await requireFn(file)(connection, config, this.config);
|
|
19
|
+
await connection
|
|
20
|
+
.collection(this.config.get('migrations.tableName', 'migrations'))
|
|
21
|
+
.insertOne({ _id: name });
|
|
22
|
+
this.log(config.name, name);
|
|
23
|
+
}
|
|
24
|
+
catch (e) { }
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
__decorate([
|
|
29
|
+
inject(Types.Mongodb),
|
|
30
|
+
__metadata("design:type", Object)
|
|
31
|
+
], Mongodb.prototype, "connector", void 0);
|
|
32
|
+
//# sourceMappingURL=mongodb.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mongodb.mjs","sourceRoot":"","sources":["../../../../src/types/mongodb.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,MAAM,SAAS,GAAG,UAAU,EAAE,CAAC;AAI/B,MAAM,OAAO,OAAQ,SAAQ,SAAS;IAK1B,KAAK,CAAC,OAAO;QACrB,MAAM,IAAI,CAAC,OAAO,CAChB,SAAS,EACT,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,CAClC,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;YACjD,IAAI,CAAC;gBACH,MACE,SAAS,CAAC,IAAI,CAKf,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;gBACnC,MAAM,UAAU;qBACb,UAAU,CACT,IAAI,CAAC,MAAM,CAAC,GAAG,CAAS,sBAAsB,EAAE,YAAY,CAAC,CAC9D;qBACA,SAAS,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC5B,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YAC9B,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC;QAChB,CAAC,CAAC,CACL,CAAC;IACJ,CAAC;CACF;AA3BkC;IAAhC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;;0CAAwC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
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 { kebabCase } from 'lodash';
|
|
11
|
+
import { inject, Types } from '@biorate/inversion';
|
|
12
|
+
import { Migration } from './migration';
|
|
13
|
+
import { SchemaRegistryWrongFileNameError } from '../errors';
|
|
14
|
+
import { getRequire } from '@biorate/node-tools';
|
|
15
|
+
const requireFn = getRequire();
|
|
16
|
+
export class SchemaRegistry extends Migration {
|
|
17
|
+
get type() {
|
|
18
|
+
return kebabCase(this.constructor.name);
|
|
19
|
+
}
|
|
20
|
+
async process() {
|
|
21
|
+
await this.forEach('SchemaRegistry', async (config, connection, paths) => await this.forEachPath(paths, async (file, fullName) => {
|
|
22
|
+
const name = fullName.split('_')?.[1]?.replace('.json', '');
|
|
23
|
+
if (!name)
|
|
24
|
+
throw new SchemaRegistryWrongFileNameError(fullName);
|
|
25
|
+
const schema = requireFn(file);
|
|
26
|
+
await connection.putConfig({
|
|
27
|
+
subject: name,
|
|
28
|
+
compatibility: config.compatibility ?? 'FORWARD',
|
|
29
|
+
});
|
|
30
|
+
try {
|
|
31
|
+
await connection.postSubjects({
|
|
32
|
+
subject: name,
|
|
33
|
+
schema,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
await connection.postSubjectsVersions({
|
|
38
|
+
subject: name,
|
|
39
|
+
schema,
|
|
40
|
+
});
|
|
41
|
+
this.log(config.name, fullName);
|
|
42
|
+
}
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
__decorate([
|
|
47
|
+
inject(Types.SchemaRegistry),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], SchemaRegistry.prototype, "connector", void 0);
|
|
50
|
+
//# sourceMappingURL=schema-registry.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-registry.mjs","sourceRoot":"","sources":["../../../../src/types/schema-registry.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAOnD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,gCAAgC,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,MAAM,SAAS,GAAG,UAAU,EAAE,CAAC;AAI/B,MAAM,OAAO,cAAe,SAAQ,SAAS;IAK3C,IAAuB,IAAI;QACzB,OAAO,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;IAIS,KAAK,CAAC,OAAO;QACrB,MAAM,IAAI,CAAC,OAAO,CAIhB,gBAAgB,EAChB,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,CAClC,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;YACrD,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YAC5D,IAAI,CAAC,IAAI;gBAAE,MAAM,IAAI,gCAAgC,CAAC,QAAQ,CAAC,CAAC;YAChE,MAAM,MAAM,GAA4B,SAAS,CAAC,IAAI,CAAC,CAAC;YACxD,MAAM,UAAU,CAAC,SAAS,CAAC;gBACzB,OAAO,EAAE,IAAI;gBACb,aAAa,EAAE,MAAM,CAAC,aAAa,IAAI,SAAS;aACjD,CAAC,CAAC;YACH,IAAI,CAAC;gBACH,MAAM,UAAU,CAAC,YAAY,CAAC;oBAC5B,OAAO,EAAE,IAAI;oBACb,MAAM;iBACP,CAAC,CAAC;YACL,CAAC;YAAC,MAAM,CAAC;gBACP,MAAM,UAAU,CAAC,oBAAoB,CAAC;oBACpC,OAAO,EAAE,IAAI;oBACb,MAAM;iBACP,CAAC,CAAC;gBACH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;YAClC,CAAC;QACH,CAAC,CAAC,CACL,CAAC;IACJ,CAAC;CACF;AAxCyC;IAAvC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC;;iDAA+C"}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 { promises as fs } from 'fs';
|
|
11
|
+
import { inject, Types } from '@biorate/inversion';
|
|
12
|
+
import { Migration } from './migration';
|
|
13
|
+
import { DataType, } from '@biorate/sequelize';
|
|
14
|
+
export class Sequelize extends Migration {
|
|
15
|
+
async process() {
|
|
16
|
+
await this.forEach('Sequelize', async (config, connection, paths) => {
|
|
17
|
+
const model = connection.define(this.config.get('migrations.tableName', 'migrations'), {
|
|
18
|
+
name: {
|
|
19
|
+
type: DataType.CHAR,
|
|
20
|
+
primaryKey: true,
|
|
21
|
+
},
|
|
22
|
+
}, { timestamps: false });
|
|
23
|
+
await model.sync({});
|
|
24
|
+
await this.forEachPath(paths, async (file, name) => await connection.transaction(async (transaction) => {
|
|
25
|
+
const item = await model.findOne({ where: { name }, transaction });
|
|
26
|
+
if (item)
|
|
27
|
+
return;
|
|
28
|
+
await connection.query(await fs.readFile(file, 'utf8'), { transaction });
|
|
29
|
+
await model.create({ name }, { transaction });
|
|
30
|
+
this.log(config.name, name);
|
|
31
|
+
}));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
__decorate([
|
|
36
|
+
inject(Types.Sequelize),
|
|
37
|
+
__metadata("design:type", Object)
|
|
38
|
+
], Sequelize.prototype, "connector", void 0);
|
|
39
|
+
//# sourceMappingURL=sequelize.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sequelize.mjs","sourceRoot":"","sources":["../../../../src/types/sequelize.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAIL,QAAQ,GAET,MAAM,oBAAoB,CAAC;AAI5B,MAAM,OAAO,SAAU,SAAQ,SAAS;IAK5B,KAAK,CAAC,OAAO;QACrB,MAAM,IAAI,CAAC,OAAO,CAChB,WAAW,EACX,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE;YAClC,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,C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