@quillsql/node 0.3.1 → 0.3.2
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/dist/index.ispec.js +31 -40
- package/dist/index.js +8 -2
- package/package.json +1 -1
- package/src/index.ispec.ts +31 -31
- package/src/index.ts +18 -1
package/dist/index.ispec.js
CHANGED
|
@@ -1,41 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
};
|
|
34
|
-
const result = yield quill.query({
|
|
35
|
-
orgId: "2",
|
|
36
|
-
metadata,
|
|
37
|
-
});
|
|
38
|
-
// TODO - add assertions
|
|
39
|
-
}));
|
|
40
|
-
});
|
|
41
|
-
});
|
|
2
|
+
// import Quill from ".";
|
|
3
|
+
// import "dotenv/config";
|
|
4
|
+
// const HOST =
|
|
5
|
+
// process.env.ENV === "development"
|
|
6
|
+
// ? "http://localhost:8080"
|
|
7
|
+
// : "https://quill-344421.uc.r.appspot.com";
|
|
8
|
+
// describe("Quill", () => {
|
|
9
|
+
// let quill: Quill;
|
|
10
|
+
// beforeEach(() => {
|
|
11
|
+
// quill = new Quill(
|
|
12
|
+
// process.env.QUILL_PRIVATE_KEY as string,
|
|
13
|
+
// process.env.DB_URL as string
|
|
14
|
+
// );
|
|
15
|
+
// });
|
|
16
|
+
// afterAll(() => {
|
|
17
|
+
// jest.restoreAllMocks();
|
|
18
|
+
// });
|
|
19
|
+
// describe("query", () => {
|
|
20
|
+
// it("org - should return ", async () => {
|
|
21
|
+
// const metadata = {
|
|
22
|
+
// task: "orgs",
|
|
23
|
+
// clientId: "62cda15d7c9fcca7bc0a3689",
|
|
24
|
+
// };
|
|
25
|
+
// const result = await quill.query({
|
|
26
|
+
// orgId: "2",
|
|
27
|
+
// metadata,
|
|
28
|
+
// });
|
|
29
|
+
// // TODO - add assertions
|
|
30
|
+
// });
|
|
31
|
+
// });
|
|
32
|
+
// });
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ const HOST = process.env.ENV === "development"
|
|
|
22
22
|
/**
|
|
23
23
|
* Quill - Fullstack API Platform for Dashboards and Reporting.
|
|
24
24
|
*/
|
|
25
|
-
class
|
|
25
|
+
class QuillClass {
|
|
26
26
|
constructor(privateKey, databaseConnectionString, cache = {}) {
|
|
27
27
|
this.ssl = { rejectUnauthorized: false };
|
|
28
28
|
this.baseUrl = HOST;
|
|
@@ -100,4 +100,10 @@ class Quill {
|
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
exports.default =
|
|
103
|
+
exports.default = QuillClass;
|
|
104
|
+
const Quill = ({ privateKey, databaseConnectionString, cache, }) => {
|
|
105
|
+
return new QuillClass(privateKey, databaseConnectionString, cache);
|
|
106
|
+
};
|
|
107
|
+
module.exports = Quill;
|
|
108
|
+
module.exports.Quill = Quill;
|
|
109
|
+
module.exports.default = Quill;
|
package/package.json
CHANGED
package/src/index.ispec.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import Quill from ".";
|
|
2
|
-
import "dotenv/config";
|
|
1
|
+
// import Quill from ".";
|
|
2
|
+
// import "dotenv/config";
|
|
3
3
|
|
|
4
|
-
const HOST =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
// const HOST =
|
|
5
|
+
// process.env.ENV === "development"
|
|
6
|
+
// ? "http://localhost:8080"
|
|
7
|
+
// : "https://quill-344421.uc.r.appspot.com";
|
|
8
8
|
|
|
9
|
-
describe("Quill", () => {
|
|
10
|
-
|
|
9
|
+
// describe("Quill", () => {
|
|
10
|
+
// let quill: Quill;
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
// beforeEach(() => {
|
|
13
|
+
// quill = new Quill(
|
|
14
|
+
// process.env.QUILL_PRIVATE_KEY as string,
|
|
15
|
+
// process.env.DB_URL as string
|
|
16
|
+
// );
|
|
17
|
+
// });
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
// afterAll(() => {
|
|
20
|
+
// jest.restoreAllMocks();
|
|
21
|
+
// });
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
});
|
|
23
|
+
// describe("query", () => {
|
|
24
|
+
// it("org - should return ", async () => {
|
|
25
|
+
// const metadata = {
|
|
26
|
+
// task: "orgs",
|
|
27
|
+
// clientId: "62cda15d7c9fcca7bc0a3689",
|
|
28
|
+
// };
|
|
29
|
+
// const result = await quill.query({
|
|
30
|
+
// orgId: "2",
|
|
31
|
+
// metadata,
|
|
32
|
+
// });
|
|
33
|
+
// // TODO - add assertions
|
|
34
|
+
// });
|
|
35
|
+
// });
|
|
36
|
+
// });
|
package/src/index.ts
CHANGED
|
@@ -22,7 +22,8 @@ const HOST =
|
|
|
22
22
|
/**
|
|
23
23
|
* Quill - Fullstack API Platform for Dashboards and Reporting.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
|
|
26
|
+
export default class QuillClass {
|
|
26
27
|
// Configure cached connection pools with the given config.
|
|
27
28
|
private connectionString;
|
|
28
29
|
private ssl = { rejectUnauthorized: false };
|
|
@@ -142,3 +143,19 @@ export default class Quill {
|
|
|
142
143
|
await this.targetPool.close();
|
|
143
144
|
}
|
|
144
145
|
}
|
|
146
|
+
|
|
147
|
+
const Quill = ({
|
|
148
|
+
privateKey,
|
|
149
|
+
databaseConnectionString,
|
|
150
|
+
cache,
|
|
151
|
+
}: {
|
|
152
|
+
privateKey: string;
|
|
153
|
+
databaseConnectionString: string;
|
|
154
|
+
cache?: Partial<CacheCredentials>;
|
|
155
|
+
}) => {
|
|
156
|
+
return new QuillClass(privateKey, databaseConnectionString, cache);
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
module.exports = Quill;
|
|
160
|
+
module.exports.Quill = Quill;
|
|
161
|
+
module.exports.default = Quill;
|