@powerhousedao/reactor-local 1.10.3 → 1.10.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 +2 -13
- package/dist/{chunk-AIMZBVFH.js → chunk-XAXNFYWD.js} +5 -6
- package/dist/cli.js +1 -1
- package/dist/index.js +2 -2
- package/dist/server.js +1 -1
- package/package.json +4 -4
- package/src/server.ts +5 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
## 1.10.
|
|
2
|
-
|
|
3
|
-
### 🚀 Features
|
|
4
|
-
|
|
5
|
-
- **document-model:** export generateId method ([71d945b2](https://github.com/powerhouse-inc/powerhouse/commit/71d945b2))
|
|
1
|
+
## 1.10.5 (2024-12-12)
|
|
6
2
|
|
|
7
3
|
### 🧱 Updated Dependencies
|
|
8
4
|
|
|
9
|
-
- Updated
|
|
10
|
-
- Updated document-drive to 1.11.0
|
|
11
|
-
- Updated document-model to 2.13.0
|
|
12
|
-
- Updated @powerhousedao/reactor-api to 1.10.3
|
|
13
|
-
|
|
14
|
-
### ❤️ Thank You
|
|
15
|
-
|
|
16
|
-
- acaldas @acaldas
|
|
5
|
+
- Updated @powerhousedao/reactor-api to 1.10.5
|
|
17
6
|
|
|
18
7
|
## 1.1.0 (2024-10-29)
|
|
19
8
|
|
|
@@ -16,7 +16,6 @@ import * as DocumentModelsLibs from 'document-model-libs/document-models';
|
|
|
16
16
|
import { module } from 'document-model/document-model';
|
|
17
17
|
import dotenv from 'dotenv';
|
|
18
18
|
import path2 from 'node:path';
|
|
19
|
-
import { fileURLToPath } from 'node:url';
|
|
20
19
|
import { createServer } from 'vite';
|
|
21
20
|
|
|
22
21
|
// src/server.ts
|
|
@@ -3918,12 +3917,12 @@ var FilesystemStorage = class _FilesystemStorage {
|
|
|
3918
3917
|
}, []);
|
|
3919
3918
|
}
|
|
3920
3919
|
};
|
|
3921
|
-
var dirname =
|
|
3920
|
+
var dirname = process.cwd();
|
|
3922
3921
|
dotenv.config();
|
|
3923
3922
|
var DefaultStartServerOptions = {
|
|
3924
3923
|
port: 4001,
|
|
3925
|
-
storagePath: path2.join(dirname, "
|
|
3926
|
-
dbPath: path2.join(dirname, "
|
|
3924
|
+
storagePath: path2.join(dirname, ".ph/file-storage"),
|
|
3925
|
+
dbPath: path2.join(dirname, ".ph/read-model.db"),
|
|
3927
3926
|
drive: {
|
|
3928
3927
|
global: {
|
|
3929
3928
|
id: "powerhouse",
|
|
@@ -3944,7 +3943,7 @@ var baseDocumentModels = [
|
|
|
3944
3943
|
...Object.values(DocumentModelsLibs)
|
|
3945
3944
|
];
|
|
3946
3945
|
var startServer = async (options) => {
|
|
3947
|
-
const { port, storagePath, drive, dev } = {
|
|
3946
|
+
const { port, storagePath, drive, dev, dbPath } = {
|
|
3948
3947
|
...DefaultStartServerOptions,
|
|
3949
3948
|
...options
|
|
3950
3949
|
};
|
|
@@ -3973,7 +3972,7 @@ var startServer = async (options) => {
|
|
|
3973
3972
|
try {
|
|
3974
3973
|
const api = await startAPI(driveServer, {
|
|
3975
3974
|
port: serverPort,
|
|
3976
|
-
|
|
3975
|
+
dbPath
|
|
3977
3976
|
});
|
|
3978
3977
|
driveUrl = `http://localhost:${serverPort}/${driveId ? `d/${drive.global.slug ?? drive.global.id}` : ""}`;
|
|
3979
3978
|
console.log(` \u279C Reactor: ${driveUrl}`);
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { startServer } from './chunk-
|
|
2
|
-
export { DefaultStartServerOptions, startServer } from './chunk-
|
|
1
|
+
import { startServer } from './chunk-XAXNFYWD.js';
|
|
2
|
+
export { DefaultStartServerOptions, startServer } from './chunk-XAXNFYWD.js';
|
|
3
3
|
|
|
4
4
|
// src/index.ts
|
|
5
5
|
startServer({ dev: true }).catch((error) => {
|
package/dist/server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DefaultStartServerOptions, startServer } from './chunk-
|
|
1
|
+
export { DefaultStartServerOptions, startServer } from './chunk-XAXNFYWD.js';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/reactor-local",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.10.
|
|
4
|
+
"version": "1.10.5",
|
|
5
5
|
"main": "dist/server.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"reactor-local": "dist/cli.js"
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"nanoevents": "^9.0.0",
|
|
28
28
|
"sanitize-filename": "^1.6.3",
|
|
29
29
|
"uuid": "^11.0.2",
|
|
30
|
-
"@powerhousedao/reactor-api": "1.10.
|
|
30
|
+
"@powerhousedao/reactor-api": "1.10.5",
|
|
31
31
|
"@powerhousedao/scalars": "1.13.0",
|
|
32
32
|
"document-model": "2.13.0",
|
|
33
|
-
"document-model-libs": "1.122.
|
|
33
|
+
"document-model-libs": "1.122.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@powerhousedao/analytics-engine-graphql": "^0.2.0",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@types/ms": "^0.7.34",
|
|
41
41
|
"@types/node": "^22.7.5",
|
|
42
42
|
"tsup": "^8.3.5",
|
|
43
|
-
"document-drive": "1.11.
|
|
43
|
+
"document-drive": "1.11.1"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"start": "vite-node src/index.ts",
|
package/src/server.ts
CHANGED
|
@@ -22,8 +22,7 @@ import path from "node:path";
|
|
|
22
22
|
import { fileURLToPath } from "node:url";
|
|
23
23
|
import { createServer as createViteServer, ViteDevServer } from "vite";
|
|
24
24
|
|
|
25
|
-
const dirname =
|
|
26
|
-
import.meta.dirname || path.dirname(fileURLToPath(import.meta.url));
|
|
25
|
+
const dirname = process.cwd();
|
|
27
26
|
|
|
28
27
|
dotenv.config();
|
|
29
28
|
|
|
@@ -37,8 +36,8 @@ export type StartServerOptions = {
|
|
|
37
36
|
|
|
38
37
|
export const DefaultStartServerOptions = {
|
|
39
38
|
port: 4001,
|
|
40
|
-
storagePath: path.join(dirname, "
|
|
41
|
-
dbPath: path.join(dirname, "
|
|
39
|
+
storagePath: path.join(dirname, ".ph/file-storage"),
|
|
40
|
+
dbPath: path.join(dirname, ".ph/read-model.db"),
|
|
42
41
|
drive: {
|
|
43
42
|
global: {
|
|
44
43
|
id: "powerhouse",
|
|
@@ -78,7 +77,7 @@ const baseDocumentModels = [
|
|
|
78
77
|
const startServer = async (
|
|
79
78
|
options?: StartServerOptions,
|
|
80
79
|
): Promise<LocalReactor> => {
|
|
81
|
-
const { port, storagePath, drive, dev } = {
|
|
80
|
+
const { port, storagePath, drive, dev, dbPath } = {
|
|
82
81
|
...DefaultStartServerOptions,
|
|
83
82
|
...options,
|
|
84
83
|
};
|
|
@@ -117,7 +116,7 @@ const startServer = async (
|
|
|
117
116
|
// start api
|
|
118
117
|
const api = await startAPI(driveServer, {
|
|
119
118
|
port: serverPort,
|
|
120
|
-
|
|
119
|
+
dbPath,
|
|
121
120
|
});
|
|
122
121
|
driveUrl = `http://localhost:${serverPort}/${driveId ? `d/${drive.global.slug ?? drive.global.id}` : ""}`;
|
|
123
122
|
console.log(` ➜ Reactor: ${driveUrl}`);
|