@powerhousedao/reactor-api 1.10.4 → 1.10.6
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 +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/server.ts +2 -2
- package/src/utils/get-knex-client.ts +5 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
## 1.10.
|
|
1
|
+
## 1.10.6 (2024-12-12)
|
|
2
2
|
|
|
3
3
|
### 🧱 Updated Dependencies
|
|
4
4
|
|
|
5
|
-
- Updated document-model-libs to 1.122.
|
|
6
|
-
- Updated document-drive to 1.11.
|
|
5
|
+
- Updated document-model-libs to 1.122.2
|
|
6
|
+
- Updated document-drive to 1.11.2
|
|
7
7
|
|
|
8
8
|
## 1.2.0 (2024-10-29)
|
|
9
9
|
|
package/dist/index.d.ts
CHANGED
|
@@ -359,7 +359,7 @@ type ProcessorOptions = Omit<Listener, "driveId"> & {
|
|
|
359
359
|
type Options = {
|
|
360
360
|
express?: Express;
|
|
361
361
|
port?: number;
|
|
362
|
-
|
|
362
|
+
dbPath: string | undefined;
|
|
363
363
|
client?: PGlite | typeof Pool | undefined;
|
|
364
364
|
};
|
|
365
365
|
declare function startAPI(reactor: IDocumentDriveServer, options: Options): Promise<API>;
|
package/dist/index.js
CHANGED
|
@@ -16,6 +16,7 @@ import 'graphql-request';
|
|
|
16
16
|
import 'nanoevents';
|
|
17
17
|
import { parse as parse$1 } from 'graphql';
|
|
18
18
|
import { buildSubgraphSchema } from '@apollo/subgraph';
|
|
19
|
+
import { PGlite } from '@electric-sql/pglite';
|
|
19
20
|
import pkg from 'knex';
|
|
20
21
|
import ClientPgLite from 'knex-pglite';
|
|
21
22
|
|
|
@@ -29185,12 +29186,12 @@ function isPG(connectionString) {
|
|
|
29185
29186
|
return false;
|
|
29186
29187
|
}
|
|
29187
29188
|
function getKnexClient(connectionString) {
|
|
29188
|
-
const isPg = isPG(connectionString);
|
|
29189
|
+
const isPg = connectionString && isPG(connectionString);
|
|
29189
29190
|
const client = isPg ? "pg" : ClientPgLite;
|
|
29190
|
-
const connection = connectionString;
|
|
29191
29191
|
return knex({
|
|
29192
29192
|
client,
|
|
29193
|
-
|
|
29193
|
+
// @ts-expect-error
|
|
29194
|
+
connection: { pglite: new PGlite(connectionString) }
|
|
29194
29195
|
});
|
|
29195
29196
|
}
|
|
29196
29197
|
|
|
@@ -29330,7 +29331,7 @@ var DEFAULT_PORT = 4e3;
|
|
|
29330
29331
|
async function startAPI(reactor, options) {
|
|
29331
29332
|
const port = options.port ?? DEFAULT_PORT;
|
|
29332
29333
|
const app = options.express ?? express2();
|
|
29333
|
-
const knex2 = getKnexClient(options.
|
|
29334
|
+
const knex2 = getKnexClient(options.dbPath);
|
|
29334
29335
|
await initialize(knex2);
|
|
29335
29336
|
const analyticsStore = new KnexAnalyticsStore({
|
|
29336
29337
|
executor: new KnexQueryExecutor(),
|