@shivaedev/server 0.34.1 → 0.35.0
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 +16 -0
- package/README.md +6 -6
- package/dist/adapters/defaultTraceStore.d.ts +8 -0
- package/dist/adapters/defaultTraceStore.d.ts.map +1 -0
- package/dist/adapters/defaultTraceStore.js +40 -0
- package/dist/adapters/defaultTraceStore.js.map +1 -0
- package/dist/appDatabase.d.ts +1 -1
- package/dist/appDatabase.d.ts.map +1 -1
- package/dist/appDatabase.js +1 -0
- package/dist/appDatabase.js.map +1 -1
- package/dist/appDatabaseHttp.d.ts +98 -62
- package/dist/appDatabaseHttp.d.ts.map +1 -1
- package/dist/appHost.d.ts +49 -31
- package/dist/appHost.d.ts.map +1 -1
- package/dist/appHostHttp.d.ts +49 -31
- package/dist/appHostHttp.d.ts.map +1 -1
- package/dist/hostChanges.d.ts.map +1 -1
- package/dist/hostChanges.js +2 -1
- package/dist/hostChanges.js.map +1 -1
- package/dist/hostRpc.d.ts +4 -0
- package/dist/hostRpc.d.ts.map +1 -1
- package/dist/hostRpc.js +2 -1
- package/dist/hostRpc.js.map +1 -1
- package/dist/hostRpcRoutes.d.ts +17 -11
- package/dist/hostRpcRoutes.d.ts.map +1 -1
- package/dist/hostRpcRoutes.js +2 -1
- package/dist/hostRpcRoutes.js.map +1 -1
- package/dist/liveSyncLayer.d.ts +2 -0
- package/dist/liveSyncLayer.d.ts.map +1 -0
- package/dist/liveSyncLayer.js +4 -0
- package/dist/liveSyncLayer.js.map +1 -0
- package/dist/localTracing.d.ts +1 -1
- package/dist/localTracing.d.ts.map +1 -1
- package/dist/localTracing.js +15 -1
- package/dist/localTracing.js.map +1 -1
- package/dist/otlpTracing.js +2 -2
- package/dist/otlpTracing.js.map +1 -1
- package/dist/publishCommand.d.ts +2 -1
- package/dist/publishCommand.d.ts.map +1 -1
- package/dist/publishCommand.js +9 -5
- package/dist/publishCommand.js.map +1 -1
- package/package.json +13 -13
- package/src/adapters/defaultTraceStore.ts +43 -0
- package/src/appDatabase.ts +2 -1
- package/src/hostChanges.ts +5 -1
- package/src/hostRpc.ts +2 -1
- package/src/hostRpcRoutes.ts +2 -0
- package/src/liveSyncLayer.ts +4 -0
- package/src/localTracing.ts +18 -1
- package/src/otlpTracing.ts +2 -2
- package/src/publishCommand.ts +9 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.35.0 - 2026-11-18
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Hosts send a command's sync token once its handler has finished, hand the tokens they receive to the live streams of the client each one names, and serve the `platform.liveSync.request` command.
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- The development trace store that a working directory without `node_modules` gets in the system's temporary directory is now in a folder only its user can reach. The folder is `shivaedev-server-<user id>-<hash of the working directory>`, created with owner-only permissions, so its path changes once from the earlier `shivaedev-server-<hash>` and then stays the same across restarts. When that name is held by a link, by another user's folder or by a folder open to others, the host records in a newly made private folder and the startup log line names it. Before, another user of a shared temporary directory could make the folder or a link first and read or redirect the traces.
|
|
12
|
+
|
|
13
|
+
## 0.34.2 - 2026-11-18
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- In development without an OTLP endpoint, `appHost`, `otlpTracing` and `localTracing()` record traces to `node_modules/.cache/@shivaedev/server/traces.db` in the working directory instead of `.platform/traces.db`, so an application that never added `.platform/` to its ignore file can no longer commit the store. A working directory without a `node_modules` folder records to a folder of the system's temporary directory and logs the file's path at startup. `PLATFORM_TRACE_STORE` and `localTracing({ path })` still choose another file. Delete an existing `.platform/` folder, with `git rm -r --cached .platform` first if it was committed; its ignore entry is no longer needed.
|
|
18
|
+
|
|
3
19
|
## 0.34.1 - 2026-11-11
|
|
4
20
|
|
|
5
21
|
### Changed
|
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ The process migrates the database, serves `Api` at `/rpc` and the built client f
|
|
|
37
37
|
|
|
38
38
|
The host composes pieces that live in their own packages. Request identity, sessions, Origin policy, permissions and Better Auth come from [`@shivaedev/identity`](https://github.com/ShivaeDev/platform/tree/main/packages/identity#readme); shared failures and redaction from [`@shivaedev/errors`](https://github.com/ShivaeDev/platform/tree/main/packages/errors#readme); outside HTTP calls from [`@shivaedev/http`](https://github.com/ShivaeDev/platform/tree/main/packages/http#readme). This package hosts them: `appHost` serves the RPC group with the application's session policy, database and migrations.
|
|
39
39
|
|
|
40
|
-
The RPC host composes contract's `CommandGuard` with `publishCommand` and the `CommandPublication` port from `@shivaedev/changes/commandPublication.ts`. Session middleware supplies the viewer. Successful commands publish declared changes after their handlers finish committing, deduplicating changes already announced by the handler. Publication retries do not repeat the write; exhausted retries request a live resync while preserving the committed result. Failed commands publish no declared changes.
|
|
40
|
+
The RPC host composes contract's `CommandGuard` with `publishCommand` and the `CommandPublication` port from `@shivaedev/changes/commandPublication.ts`. Session middleware supplies the viewer. Successful commands publish declared changes after their handlers finish committing, deduplicating changes already announced by the handler. Publication retries do not repeat the write; exhausted retries request a live resync while preserving the committed result. Failed commands publish no declared changes. A command that carries a sync token has it sent behind its keys through the same port once its handler has finished, including when it has no keys left to publish, and the host hands each token it receives to its live streams of the client the token names. A failed command sends no token. The host also serves the `platform.liveSync.request` command of contract's `LiveSync`, which writes nothing and exists to carry a token; [When a command's change is on the screen](https://github.com/ShivaeDev/platform/tree/main/packages/contract#when-a-commands-change-is-on-the-screen) describes what clients build from it.
|
|
41
41
|
|
|
42
42
|
The optional modules solve different boundaries. `runtime/` carries Effect services into Promise callers, and `node-http/` combines subscription cancellation sources. Choose the modules that match the application rather than adopting every integration.
|
|
43
43
|
|
|
@@ -312,17 +312,17 @@ For existing Railway services, enable manual tracing per service and environment
|
|
|
312
312
|
Set `browserErrors: { log: true, includeUserId: true, requireSession: true }` on `appHost` for the recommended signed-in application setting. `log` writes one Error log with the masked message and stack per accepted report, including when OTLP export is off. `includeUserId` resolves the session and adds `user.id` to the HTTP span and error report when signed in. `requireSession` rejects signed-out reports with 401; a session-provider outage returns 503. Session lookups use the host's session and origin policy. With no session policy, requiring a session rejects reports. All three options default to false, preserving reports before sign-in without session lookups or an extra log line. `browserErrorRoute(trustedProxy?, options?)` accepts the same options when composed directly.
|
|
313
313
|
|
|
314
314
|
|
|
315
|
-
With `NODE_ENV=development` and no OTLP endpoint, `appHost` and `otlpTracing` record to
|
|
315
|
+
With `NODE_ENV=development` and no OTLP endpoint, `appHost` and `otlpTracing` record to `node_modules/.cache/@shivaedev/server/traces.db` in the working directory using Node's SQLite support, so the store stays out of Git through the ignore entry the application already has for `node_modules`. `runDevelopment` sets this mode for its child processes. A working directory without a `node_modules` folder gets none: the store is then `traces.db` in a folder of the system's temporary directory, and a log line at startup names the file. The folder's name carries the user's id and a hash of the working directory, so it stays the same across restarts, and it is created for its owner alone. When that name is taken by a link, by another user's folder or by a folder that others can reach, the host records in a newly made private folder instead and the log line names both. Set `PLATFORM_TRACE_STORE` to choose another file and `PLATFORM_TRACE_INDEXED_ATTRIBUTES=orderId,projectId` to index application attributes. Indexed values use the same redaction as the stored spans. An explicit OTLP endpoint takes precedence; other modes without an endpoint keep export disabled.
|
|
316
316
|
|
|
317
317
|
Records flush every second on a live maintenance clock and when their scope closes. Application clock jumps do not replay flush intervals. The store retains the latest five completed recorder runs, deleting older spans, logs and attribute indexes when a recorder closes. Active recorders remain writable until their scopes close. Logs use the existing `effect.log` diagnostic spans; the `logs` view exposes their parent span ID and trace ID. Open the file with any SQLite viewer, or inspect it directly:
|
|
318
318
|
|
|
319
319
|
```sh
|
|
320
|
-
sqlite3
|
|
321
|
-
sqlite3
|
|
322
|
-
sqlite3
|
|
320
|
+
sqlite3 node_modules/.cache/@shivaedev/server/traces.db "SELECT name, trace_id, span_id, data FROM spans ORDER BY started_at_millis DESC LIMIT 20"
|
|
321
|
+
sqlite3 node_modules/.cache/@shivaedev/server/traces.db "SELECT trace_id, span_id, data FROM logs ORDER BY at_millis DESC LIMIT 20"
|
|
322
|
+
sqlite3 node_modules/.cache/@shivaedev/server/traces.db "SELECT span_id FROM span_attributes WHERE key = 'orderId' AND value = 'order-42'"
|
|
323
323
|
```
|
|
324
324
|
|
|
325
|
-
For explicit composition, provide `localTracing({ path, indexedAttributes, retainedRuns, flushInterval, clock })` from `@shivaedev/server/localTracing.ts` to the application's Layer. All options are optional; `flushInterval` is milliseconds, and `retainedRuns` is a positive integer. Supply a native `clock` to control flush timing in stories; span timestamps still follow the application clock. It uses `RedactionPolicy`, including host schema sensitivity, and preserves the application's installed tracer and console loggers. Local recording and OTLP export are alternative sinks; compose one per application scope.
|
|
325
|
+
For explicit composition, provide `localTracing({ path, indexedAttributes, retainedRuns, flushInterval, clock })` from `@shivaedev/server/localTracing.ts` to the application's Layer. All options are optional; `path` defaults to the same store, `flushInterval` is milliseconds, and `retainedRuns` is a positive integer. Supply a native `clock` to control flush timing in stories; span timestamps still follow the application clock. It uses `RedactionPolicy`, including host schema sensitivity, and preserves the application's installed tracer and console loggers. Local recording and OTLP export are alternative sinks; compose one per application scope.
|
|
326
326
|
|
|
327
327
|
Exported HTTP server spans use `{method} {route}` with `http.route` for matched RPC and router paths, including parameter templates; unmatched requests use the method alone. `appHost` continues incoming W3C `traceparent` context in RPC handling, including one sent by an edge proxy, whether or not an exporter is configured.
|
|
328
328
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
export declare const defaultTraceStore: Effect.Effect<{
|
|
3
|
+
path: string;
|
|
4
|
+
refused: string | undefined;
|
|
5
|
+
temporary: boolean;
|
|
6
|
+
workingDirectory: string;
|
|
7
|
+
}, import("effect/Cause").UnknownError, never>;
|
|
8
|
+
//# sourceMappingURL=defaultTraceStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultTraceStore.d.ts","sourceRoot":"","sources":["../../src/adapters/defaultTraceStore.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AA4BhC,eAAO,MAAM,iBAAiB;;;;;8CAS5B,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { existsSync, lstatSync, mkdirSync, mkdtempSync } from "node:fs";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import process from "node:process";
|
|
6
|
+
import { Effect } from "effect";
|
|
7
|
+
const PREFIX = "shivaedev-server-";
|
|
8
|
+
function createPrivately(folder) {
|
|
9
|
+
try {
|
|
10
|
+
mkdirSync(folder, { mode: 0o700 });
|
|
11
|
+
}
|
|
12
|
+
catch (cause) {
|
|
13
|
+
if (!(cause instanceof Error && "code" in cause && cause.code === "EEXIST")) {
|
|
14
|
+
throw cause;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function isPrivate(folder, user) {
|
|
19
|
+
const found = lstatSync(folder);
|
|
20
|
+
return found.isDirectory() && (user === undefined || (found.uid === user && (found.mode & 0o077) === 0));
|
|
21
|
+
}
|
|
22
|
+
function temporaryFolder(workingDirectory) {
|
|
23
|
+
// Other users of a shared temporary directory can make a folder or a link under any name first. Windows has no user ids and gives each user a temporary directory of their own.
|
|
24
|
+
const user = process.getuid?.();
|
|
25
|
+
const name = createHash("sha256").update(workingDirectory).digest("hex").slice(0, 12);
|
|
26
|
+
const stable = join(tmpdir(), `${PREFIX}${user === undefined ? "" : `${user}-`}${name}`);
|
|
27
|
+
createPrivately(stable);
|
|
28
|
+
return isPrivate(stable, user) ? { folder: stable, refused: undefined } : { folder: mkdtempSync(join(tmpdir(), PREFIX)), refused: stable };
|
|
29
|
+
}
|
|
30
|
+
export const defaultTraceStore = Effect.try(() => {
|
|
31
|
+
const workingDirectory = process.cwd();
|
|
32
|
+
const installed = join(workingDirectory, "node_modules");
|
|
33
|
+
if (existsSync(installed)) {
|
|
34
|
+
return { path: join(installed, ".cache", "@shivaedev", "server", "traces.db"), refused: undefined, temporary: false, workingDirectory };
|
|
35
|
+
}
|
|
36
|
+
// No node_modules folder is created here: an ignore rule anchored at a repository's root would not cover it, and the store could be committed.
|
|
37
|
+
const { folder, refused } = temporaryFolder(workingDirectory);
|
|
38
|
+
return { path: join(folder, "traces.db"), refused, temporary: true, workingDirectory };
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=defaultTraceStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultTraceStore.js","sourceRoot":"","sources":["../../src/adapters/defaultTraceStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,MAAM,MAAM,GAAG,mBAAmB,CAAC;AAEnC,SAAS,eAAe,CAAC,MAAc;IACtC,IAAI,CAAC;QACJ,SAAS,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACpC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,EAAE,CAAC;YAC7E,MAAM,KAAK,CAAC;QACb,CAAC;IACF,CAAC;AACF,CAAC;AAED,SAAS,SAAS,CAAC,MAAc,EAAE,IAAwB;IAC1D,MAAM,KAAK,GAAG,SAAS,CAAC,MAAM,C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AAE,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC;IACzI,CAAC;IACD,+IAA+I;IAC/I,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,eAAe,CAAC,gBAAgB,CAAC,CAAC;IAC9D,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;AACxF,CAAC,CAAC,CAAC"}
|
package/dist/appDatabase.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export interface AppDatabaseOptions<R = never, E = never> {
|
|
|
13
13
|
readonly postgresSettings: PostgresSettings;
|
|
14
14
|
}
|
|
15
15
|
export interface DatabaseConfig extends PostgresOptions {
|
|
16
|
-
readonly changes?: Partial<Omit<PostgresChangesOptions, "client" | "listenerClient" | "connectionSetting" | "resync">>;
|
|
16
|
+
readonly changes?: Partial<Omit<PostgresChangesOptions, "client" | "listenerClient" | "connectionSetting" | "resync" | "synced">>;
|
|
17
17
|
readonly clock?: Clock.Clock;
|
|
18
18
|
readonly databaseUrl?: Redacted.Redacted<string>;
|
|
19
19
|
readonly listenDatabaseUrl?: Redacted.Redacted<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appDatabase.d.ts","sourceRoot":"","sources":["../src/appDatabase.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAmB,KAAK,EAAU,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACjF,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,KAAK,UAAU,MAAM,8BAA8B,CAAC;AAM3D,OAAO,EAAE,KAAK,sBAAsB,EA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B,CAAC;AAOzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG7D,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,KAAK;IACvD,QAAQ,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5C,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;CAC5C;AAED,MAAM,WAAW,cAAe,SAAQ,eAAe;IACtD,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,QAAQ,GAAG,gBAAgB,GAAG,mBAAmB,GAAG,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC;IAClI,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC;IAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACjD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;CACvD;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,snBAqD1E;AAQD,eAAO,MAAM,OAAO,EAAE,cAmDrB,CAAC"}
|
package/dist/appDatabase.js
CHANGED
|
@@ -53,6 +53,7 @@ export function appDatabase(options) {
|
|
|
53
53
|
connectionSetting,
|
|
54
54
|
listenerClient,
|
|
55
55
|
resync: hints.resync(),
|
|
56
|
+
synced: hints.synced,
|
|
56
57
|
}).pipe(Layer.provide(clock));
|
|
57
58
|
})).pipe(Layer.provideMerge(base));
|
|
58
59
|
const prepared = Layer.effectDiscard(prepareMigrations(migrations)).pipe(Layer.provideMerge(connected));
|
package/dist/appDatabase.js.map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