@antelopejs/dms 0.20.4 → 0.20.5
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 +12 -0
- package/README.md +1 -1
- package/dist/implementations/dms-builder/engine/database-access.d.ts +1 -16
- package/dist/implementations/dms-builder/engine/database-access.js +13 -44
- package/dist/implementations/dms-builder/engine/database-access.js.map +1 -1
- package/dist/implementations/dms-builder/engine/database-check.d.ts +1 -2
- package/dist/implementations/dms-builder/engine/database-check.js +28 -15
- package/dist/implementations/dms-builder/engine/database-check.js.map +1 -1
- package/dist/implementations/dms-builder/engine/driver-packages.d.ts +1 -0
- package/dist/implementations/dms-builder/engine/driver-packages.js +4 -0
- package/dist/implementations/dms-builder/engine/driver-packages.js.map +1 -1
- package/dist/implementations/dms-builder/engine/driver-probe.d.ts +27 -0
- package/dist/implementations/dms-builder/engine/driver-probe.js +53 -0
- package/dist/implementations/dms-builder/engine/driver-probe.js.map +1 -0
- package/dist/implementations/dms-builder/engine/index.d.ts +2 -6
- package/dist/implementations/dms-builder/engine/index.js +2 -6
- package/dist/implementations/dms-builder/engine/index.js.map +1 -1
- package/dist/implementations/dms-builder/engine/probe-answer.d.ts +4 -0
- package/dist/implementations/dms-builder/engine/probe-answer.js +90 -0
- package/dist/implementations/dms-builder/engine/probe-answer.js.map +1 -0
- package/dist/implementations/dms-builder/engine/probe-child.d.ts +1 -0
- package/dist/implementations/dms-builder/engine/probe-child.js +70 -0
- package/dist/implementations/dms-builder/engine/probe-child.js.map +1 -0
- package/dist/implementations/dms-builder/engine/probe-process.d.ts +2 -0
- package/dist/implementations/dms-builder/engine/probe-process.js +132 -0
- package/dist/implementations/dms-builder/engine/probe-process.js.map +1 -0
- package/dist/implementations/dms-builder/engine/probe-protocol.d.ts +46 -0
- package/dist/implementations/dms-builder/engine/probe-protocol.js +18 -0
- package/dist/implementations/dms-builder/engine/probe-protocol.js.map +1 -0
- package/dist/mockup/fixtures.d.ts +1 -1
- package/dist/routes/system-state.d.ts +1 -1
- package/package.json +5 -19
- package/dist/implementations/dms-builder/engine/access-mongodb.d.ts +0 -20
- package/dist/implementations/dms-builder/engine/access-mongodb.js +0 -30
- package/dist/implementations/dms-builder/engine/access-mongodb.js.map +0 -1
- package/dist/implementations/dms-builder/engine/access-mysql.d.ts +0 -8
- package/dist/implementations/dms-builder/engine/access-mysql.js +0 -11
- package/dist/implementations/dms-builder/engine/access-mysql.js.map +0 -1
- package/dist/implementations/dms-builder/engine/access-postgres.d.ts +0 -8
- package/dist/implementations/dms-builder/engine/access-postgres.js +0 -11
- package/dist/implementations/dms-builder/engine/access-postgres.js.map +0 -1
- package/dist/implementations/dms-builder/engine/probe-client.d.ts +0 -19
- package/dist/implementations/dms-builder/engine/probe-client.js +0 -50
- package/dist/implementations/dms-builder/engine/probe-client.js.map +0 -1
- package/dist/implementations/dms-builder/engine/probe-connections.d.ts +0 -10
- package/dist/implementations/dms-builder/engine/probe-connections.js +0 -43
- package/dist/implementations/dms-builder/engine/probe-connections.js.map +0 -1
- package/dist/implementations/dms-builder/engine/probe-mongodb.d.ts +0 -2
- package/dist/implementations/dms-builder/engine/probe-mongodb.js +0 -148
- package/dist/implementations/dms-builder/engine/probe-mongodb.js.map +0 -1
- package/dist/implementations/dms-builder/engine/probe-mysql.d.ts +0 -2
- package/dist/implementations/dms-builder/engine/probe-mysql.js +0 -189
- package/dist/implementations/dms-builder/engine/probe-mysql.js.map +0 -1
- package/dist/implementations/dms-builder/engine/probe-postgres.d.ts +0 -2
- package/dist/implementations/dms-builder/engine/probe-postgres.js +0 -164
- package/dist/implementations/dms-builder/engine/probe-postgres.js.map +0 -1
- package/dist/implementations/dms-builder/engine/probe-rethinkdb.d.ts +0 -2
- package/dist/implementations/dms-builder/engine/probe-rethinkdb.js +0 -92
- package/dist/implementations/dms-builder/engine/probe-rethinkdb.js.map +0 -1
- package/dist/implementations/dms-builder/engine/rethinkdb-client.d.ts +0 -34
- package/dist/implementations/dms-builder/engine/rethinkdb-client.js +0 -3
- package/dist/implementations/dms-builder/engine/rethinkdb-client.js.map +0 -1
- package/dist/implementations/dms-builder/engine/scram-bound.d.ts +0 -5
- package/dist/implementations/dms-builder/engine/scram-bound.js +0 -60
- package/dist/implementations/dms-builder/engine/scram-bound.js.map +0 -1
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export interface RethinkdbConnection {
|
|
2
|
-
close(): Promise<void>;
|
|
3
|
-
on(event: "error", listener: () => void): void;
|
|
4
|
-
}
|
|
5
|
-
interface Query<Result> {
|
|
6
|
-
run(connection: RethinkdbConnection): Promise<Result>;
|
|
7
|
-
}
|
|
8
|
-
interface TableQuery {
|
|
9
|
-
info(): Query<unknown>;
|
|
10
|
-
get(key: string): {
|
|
11
|
-
delete(): Query<unknown>;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
interface DatabaseQuery {
|
|
15
|
-
tableList(): Query<string[]>;
|
|
16
|
-
table(name: string): TableQuery;
|
|
17
|
-
}
|
|
18
|
-
export interface RethinkdbConnectOptions {
|
|
19
|
-
host: string;
|
|
20
|
-
port: number;
|
|
21
|
-
user: string;
|
|
22
|
-
password: string;
|
|
23
|
-
timeout: number;
|
|
24
|
-
silent: boolean;
|
|
25
|
-
}
|
|
26
|
-
export interface RethinkdbClient {
|
|
27
|
-
r: {
|
|
28
|
-
connect(options: RethinkdbConnectOptions): Promise<RethinkdbConnection>;
|
|
29
|
-
db(name: string): DatabaseQuery;
|
|
30
|
-
expr(value: number): Query<number>;
|
|
31
|
-
};
|
|
32
|
-
isRethinkDBError(error: unknown): error is Error;
|
|
33
|
-
}
|
|
34
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rethinkdb-client.js","sourceRoot":"","sources":["../../../../src/implementations/dms-builder/engine/rethinkdb-client.ts"],"names":[],"mappings":""}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.MAX_SCRAM_ITERATIONS = void 0;
|
|
7
|
-
exports.withBoundedScram = withBoundedScram;
|
|
8
|
-
const node_async_hooks_1 = require("node:async_hooks");
|
|
9
|
-
const node_crypto_1 = __importDefault(require("node:crypto"));
|
|
10
|
-
const zod_1 = require("zod");
|
|
11
|
-
exports.MAX_SCRAM_ITERATIONS = 100_000;
|
|
12
|
-
const runs = new node_async_hooks_1.AsyncLocalStorage();
|
|
13
|
-
class IterationsRefused extends Error {
|
|
14
|
-
}
|
|
15
|
-
function refuseAbove(iterations) {
|
|
16
|
-
const run = runs.getStore();
|
|
17
|
-
if (run !== undefined && iterations > exports.MAX_SCRAM_ITERATIONS) {
|
|
18
|
-
run.refused = iterations;
|
|
19
|
-
throw new IterationsRefused(`The server asks for ${iterations} SCRAM iterations; the check derives at most ${exports.MAX_SCRAM_ITERATIONS}.`);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
const deriveSync = node_crypto_1.default.pbkdf2Sync;
|
|
23
|
-
const subtle = node_crypto_1.default.webcrypto.subtle;
|
|
24
|
-
const deriveBits = subtle.deriveBits.bind(subtle);
|
|
25
|
-
const Pbkdf2Params = zod_1.z.object({ iterations: zod_1.z.number() });
|
|
26
|
-
let installed = false;
|
|
27
|
-
function install() {
|
|
28
|
-
if (installed) {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
installed = true;
|
|
32
|
-
Object.defineProperty(node_crypto_1.default, "pbkdf2Sync", {
|
|
33
|
-
configurable: true,
|
|
34
|
-
writable: true,
|
|
35
|
-
value: (...args) => {
|
|
36
|
-
refuseAbove(args[2]);
|
|
37
|
-
return deriveSync(...args);
|
|
38
|
-
},
|
|
39
|
-
});
|
|
40
|
-
Object.defineProperty(subtle, "deriveBits", {
|
|
41
|
-
configurable: true,
|
|
42
|
-
writable: true,
|
|
43
|
-
value: (...args) => {
|
|
44
|
-
const params = Pbkdf2Params.safeParse(args[0]);
|
|
45
|
-
if (params.success) {
|
|
46
|
-
refuseAbove(params.data.iterations);
|
|
47
|
-
}
|
|
48
|
-
return deriveBits(...args);
|
|
49
|
-
},
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
async function withBoundedScram(check) {
|
|
53
|
-
install();
|
|
54
|
-
const run = {};
|
|
55
|
-
const answer = await runs.run(run, check);
|
|
56
|
-
return run.refused === undefined
|
|
57
|
-
? { answer }
|
|
58
|
-
: { answer, refused: run.refused };
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=scram-bound.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scram-bound.js","sourceRoot":"","sources":["../../../../src/implementations/dms-builder/engine/scram-bound.ts"],"names":[],"mappings":";;;;;;AAuEA,4CASC;AAhFD,uDAAqD;AACrD,8DAAiC;AACjC,6BAAwB;AAGX,QAAA,oBAAoB,GAAG,OAAO,CAAC;AAO5C,MAAM,IAAI,GAAG,IAAI,oCAAiB,EAAc,CAAC;AAGjD,MAAM,iBAAkB,SAAQ,KAAK;CAAG;AAExC,SAAS,WAAW,CAAC,UAAkB;IACrC,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC5B,IAAI,GAAG,KAAK,SAAS,IAAI,UAAU,GAAG,4BAAoB,EAAE,CAAC;QAC3D,GAAG,CAAC,OAAO,GAAG,UAAU,CAAC;QACzB,MAAM,IAAI,iBAAiB,CACzB,uBAAuB,UAAU,gDAAgD,4BAAoB,GAAG,CACzG,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,UAAU,GAAG,qBAAM,CAAC,UAAU,CAAC;AACrC,MAAM,MAAM,GAAG,qBAAM,CAAC,SAAS,CAAC,MAAM,CAAC;AACvC,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,M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