@niscorp/moss 0.7.0 → 0.8.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 +44 -0
- package/DOCS.md +95 -58
- package/dist/{chunk-F45SFR7W.cjs → chunk-3DCTQKPQ.cjs} +56 -16
- package/dist/chunk-3DCTQKPQ.cjs.map +1 -0
- package/dist/{chunk-X2Q546EB.js → chunk-3T422CCN.js} +9 -3
- package/dist/chunk-3T422CCN.js.map +1 -0
- package/dist/{chunk-MYGVHWS5.js → chunk-6XC2MD7S.js} +51 -15
- package/dist/chunk-6XC2MD7S.js.map +1 -0
- package/dist/{chunk-Z2VA6AOE.cjs → chunk-I4UOWER3.cjs} +11 -5
- package/dist/chunk-I4UOWER3.cjs.map +1 -0
- package/dist/{chunk-C2DNDIQX.cjs → chunk-PVZMCEBX.cjs} +2 -2
- package/dist/chunk-PVZMCEBX.cjs.map +1 -0
- package/dist/{chunk-IMZZB4JE.js → chunk-QAHDSRPK.js} +2 -2
- package/dist/chunk-QAHDSRPK.js.map +1 -0
- package/dist/{chunk-DSTHFSTO.cjs → chunk-TMDKNZYL.cjs} +349 -159
- package/dist/chunk-TMDKNZYL.cjs.map +1 -0
- package/dist/{chunk-MTC46PGQ.js → chunk-YZILOVCR.js} +301 -111
- package/dist/chunk-YZILOVCR.js.map +1 -0
- package/dist/{document-AbQUbQaP.d.ts → document-BYAY-Qle.d.ts} +9 -9
- package/dist/{document-wHHxIXJz.d.cts → document-DAE71J27.d.cts} +9 -9
- package/dist/{index-Dml1klpZ.d.cts → index-CSEo7Tys.d.cts} +1 -0
- package/dist/{index-Dml1klpZ.d.ts → index-CSEo7Tys.d.ts} +1 -0
- package/dist/index.cjs +14 -14
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +3 -3
- package/dist/integrations.cjs +3 -3
- package/dist/integrations.d.cts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/integrations.js +1 -1
- package/dist/node.cjs +8 -8
- package/dist/node.d.cts +2 -2
- package/dist/node.d.ts +2 -2
- package/dist/node.js +4 -4
- package/dist/tide.d.cts +1 -1
- package/dist/tide.d.ts +1 -1
- package/dist/unverified.cjs +3 -3
- package/dist/unverified.js +2 -2
- package/dist/vite.cjs +9 -9
- package/dist/vite.d.cts +2 -2
- package/dist/vite.d.ts +2 -2
- package/dist/vite.js +4 -4
- package/package.json +8 -8
- package/dist/chunk-C2DNDIQX.cjs.map +0 -1
- package/dist/chunk-DSTHFSTO.cjs.map +0 -1
- package/dist/chunk-F45SFR7W.cjs.map +0 -1
- package/dist/chunk-IMZZB4JE.js.map +0 -1
- package/dist/chunk-MTC46PGQ.js.map +0 -1
- package/dist/chunk-MYGVHWS5.js.map +0 -1
- package/dist/chunk-X2Q546EB.js.map +0 -1
- package/dist/chunk-Z2VA6AOE.cjs.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Hono } from 'hono';
|
|
2
2
|
import { Charter, VerifyReport } from '@niscorp/charter';
|
|
3
|
-
import {
|
|
3
|
+
import { Shell, FetchFn, LayoutNode, ActionDefinition, CanvasConfig, ActionFragment, FunctionDefinition, FunctionHandler, RenderNode } from '@niscorp/nova';
|
|
4
4
|
import { GenerateDsl, MapToShape, QueryResponse, ScopeBehaviors, SeedEntry, SeedMutation, ScopePolicy } from '@niscorp/vex';
|
|
5
5
|
import { Sequence } from '@niscorp/strata';
|
|
6
6
|
import { Phrasebook, PhraseKeys } from '@niscorp/nova/i18n';
|
|
7
|
-
import { F as Feature } from './index-
|
|
7
|
+
import { F as Feature } from './index-CSEo7Tys.js';
|
|
8
8
|
import { S as SocketAccept } from './socket-D90h1xSV.js';
|
|
9
9
|
import { ScreenHead } from '@niscorp/nova/document';
|
|
10
10
|
|
|
@@ -32,11 +32,7 @@ type LayoutVariant = {
|
|
|
32
32
|
action: string;
|
|
33
33
|
layout: LayoutNode;
|
|
34
34
|
};
|
|
35
|
-
|
|
36
|
-
id: string;
|
|
37
|
-
description: string;
|
|
38
|
-
execute: FunctionHandler;
|
|
39
|
-
};
|
|
35
|
+
|
|
40
36
|
type WrittenFunctions = readonly FunctionDefinition[] | Record<string, FunctionHandler>;
|
|
41
37
|
type NiscApp = {
|
|
42
38
|
charter: Charter;
|
|
@@ -146,7 +142,7 @@ type DraftArtifact = {
|
|
|
146
142
|
body: unknown;
|
|
147
143
|
};
|
|
148
144
|
type SessionDraft = {
|
|
149
|
-
|
|
145
|
+
add: (artifacts: readonly {
|
|
150
146
|
kind: ArtifactKind;
|
|
151
147
|
id?: string;
|
|
152
148
|
body: unknown;
|
|
@@ -189,6 +185,9 @@ type FunctionSession = {
|
|
|
189
185
|
intent: string;
|
|
190
186
|
shape: unknown;
|
|
191
187
|
context?: Record<string, unknown>;
|
|
188
|
+
} | {
|
|
189
|
+
fingerprint: string;
|
|
190
|
+
context?: Record<string, unknown>;
|
|
192
191
|
}) => Promise<QueryResponse>;
|
|
193
192
|
recordRun: (run: Omit<RunRecord, 'at' | 'principal' | 'shellId'>) => void;
|
|
194
193
|
functions: () => readonly {
|
|
@@ -313,6 +312,7 @@ type MossServer = Hono<Env> & {
|
|
|
313
312
|
name: string;
|
|
314
313
|
path: string;
|
|
315
314
|
}[];
|
|
315
|
+
checkFunctions: () => Promise<void>;
|
|
316
316
|
refresh: () => void;
|
|
317
317
|
replaceActions: (source: string, actions: Record<string, ActionDefinition>) => void;
|
|
318
318
|
replaceEntries: (source: string, entries: readonly (SeedEntry | SeedMutation)[]) => Promise<void>;
|
|
@@ -378,4 +378,4 @@ type DrawnDocument = {
|
|
|
378
378
|
};
|
|
379
379
|
declare const renderDocument: (config: DocumentConfig) => Promise<DrawnDocument>;
|
|
380
380
|
|
|
381
|
-
export { type DocumentConfig as D, type ExecuteAs as E, type
|
|
381
|
+
export { type DocumentConfig as D, type ExecuteAs as E, type FunctionSession as F, type IdentityRecord as I, type LayoutVariant as L, type MossServer as M, type NiscApp as N, type PageManifest as P, type RunRecord as R, type ShellHost as S, type DrawnDocument as a, type RunSink as b, type RunTurn as c, type ShellManifest as d, type ShellSnapshot as e, defineApp as f, renderDocument as r };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Hono } from 'hono';
|
|
2
2
|
import { Charter, VerifyReport } from '@niscorp/charter';
|
|
3
|
-
import {
|
|
3
|
+
import { Shell, FetchFn, LayoutNode, ActionDefinition, CanvasConfig, ActionFragment, FunctionDefinition, FunctionHandler, RenderNode } from '@niscorp/nova';
|
|
4
4
|
import { GenerateDsl, MapToShape, QueryResponse, ScopeBehaviors, SeedEntry, SeedMutation, ScopePolicy } from '@niscorp/vex';
|
|
5
5
|
import { Sequence } from '@niscorp/strata';
|
|
6
6
|
import { Phrasebook, PhraseKeys } from '@niscorp/nova/i18n';
|
|
7
|
-
import { F as Feature } from './index-
|
|
7
|
+
import { F as Feature } from './index-CSEo7Tys.cjs';
|
|
8
8
|
import { S as SocketAccept } from './socket-D90h1xSV.cjs';
|
|
9
9
|
import { ScreenHead } from '@niscorp/nova/document';
|
|
10
10
|
|
|
@@ -32,11 +32,7 @@ type LayoutVariant = {
|
|
|
32
32
|
action: string;
|
|
33
33
|
layout: LayoutNode;
|
|
34
34
|
};
|
|
35
|
-
|
|
36
|
-
id: string;
|
|
37
|
-
description: string;
|
|
38
|
-
execute: FunctionHandler;
|
|
39
|
-
};
|
|
35
|
+
|
|
40
36
|
type WrittenFunctions = readonly FunctionDefinition[] | Record<string, FunctionHandler>;
|
|
41
37
|
type NiscApp = {
|
|
42
38
|
charter: Charter;
|
|
@@ -146,7 +142,7 @@ type DraftArtifact = {
|
|
|
146
142
|
body: unknown;
|
|
147
143
|
};
|
|
148
144
|
type SessionDraft = {
|
|
149
|
-
|
|
145
|
+
add: (artifacts: readonly {
|
|
150
146
|
kind: ArtifactKind;
|
|
151
147
|
id?: string;
|
|
152
148
|
body: unknown;
|
|
@@ -189,6 +185,9 @@ type FunctionSession = {
|
|
|
189
185
|
intent: string;
|
|
190
186
|
shape: unknown;
|
|
191
187
|
context?: Record<string, unknown>;
|
|
188
|
+
} | {
|
|
189
|
+
fingerprint: string;
|
|
190
|
+
context?: Record<string, unknown>;
|
|
192
191
|
}) => Promise<QueryResponse>;
|
|
193
192
|
recordRun: (run: Omit<RunRecord, 'at' | 'principal' | 'shellId'>) => void;
|
|
194
193
|
functions: () => readonly {
|
|
@@ -313,6 +312,7 @@ type MossServer = Hono<Env> & {
|
|
|
313
312
|
name: string;
|
|
314
313
|
path: string;
|
|
315
314
|
}[];
|
|
315
|
+
checkFunctions: () => Promise<void>;
|
|
316
316
|
refresh: () => void;
|
|
317
317
|
replaceActions: (source: string, actions: Record<string, ActionDefinition>) => void;
|
|
318
318
|
replaceEntries: (source: string, entries: readonly (SeedEntry | SeedMutation)[]) => Promise<void>;
|
|
@@ -378,4 +378,4 @@ type DrawnDocument = {
|
|
|
378
378
|
};
|
|
379
379
|
declare const renderDocument: (config: DocumentConfig) => Promise<DrawnDocument>;
|
|
380
380
|
|
|
381
|
-
export { type DocumentConfig as D, type ExecuteAs as E, type
|
|
381
|
+
export { type DocumentConfig as D, type ExecuteAs as E, type FunctionSession as F, type IdentityRecord as I, type LayoutVariant as L, type MossServer as M, type NiscApp as N, type PageManifest as P, type RunRecord as R, type ShellHost as S, type DrawnDocument as a, type RunSink as b, type RunTurn as c, type ShellManifest as d, type ShellSnapshot as e, defineApp as f, renderDocument as r };
|
package/dist/index.cjs
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var chunkTMDKNZYL_cjs = require('./chunk-TMDKNZYL.cjs');
|
|
4
|
+
var chunk3DCTQKPQ_cjs = require('./chunk-3DCTQKPQ.cjs');
|
|
5
|
+
require('./chunk-PVZMCEBX.cjs');
|
|
6
6
|
require('./chunk-3RIWTXGI.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "MOSS_SEQUENCE", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkTMDKNZYL_cjs.MOSS_SEQUENCE; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "createServer", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkTMDKNZYL_cjs.createServer; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "exportDocuments", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkTMDKNZYL_cjs.exportDocuments; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "migrateTables", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkTMDKNZYL_cjs.migrateTables; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "mintDevToken", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkTMDKNZYL_cjs.mintDevToken; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "mintSession", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkTMDKNZYL_cjs.mintSession; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "renderDocument", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkTMDKNZYL_cjs.renderDocument; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "revokeAllFor", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkTMDKNZYL_cjs.revokeAllFor; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "sessionCookies", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkTMDKNZYL_cjs.sessionCookies; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "defineApp", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunk3DCTQKPQ_cjs.defineApp; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "verifyApp", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunk3DCTQKPQ_cjs.verifyApp; }
|
|
53
53
|
});
|
|
54
54
|
//# sourceMappingURL=index.cjs.map
|
|
55
55
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.cts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { N as NiscApp, M as MossServer, D as DocumentConfig } from './document-
|
|
2
|
-
export { a as DrawnDocument, E as ExecuteAs, F as
|
|
1
|
+
import { N as NiscApp, M as MossServer, D as DocumentConfig } from './document-DAE71J27.cjs';
|
|
2
|
+
export { a as DrawnDocument, E as ExecuteAs, F as FunctionSession, I as IdentityRecord, L as LayoutVariant, P as PageManifest, R as RunRecord, b as RunSink, c as RunTurn, S as ShellHost, d as ShellManifest, e as ShellSnapshot, f as defineApp, r as renderDocument } from './document-DAE71J27.cjs';
|
|
3
3
|
import { VerifyReport } from '@niscorp/charter';
|
|
4
4
|
import { PgPool } from '@niscorp/vex';
|
|
5
|
-
import { N as NiscRuntime } from './index-
|
|
6
|
-
export { T as Telemetry, a as TelemetrySpan } from './index-
|
|
5
|
+
import { N as NiscRuntime } from './index-CSEo7Tys.cjs';
|
|
6
|
+
export { T as Telemetry, a as TelemetrySpan } from './index-CSEo7Tys.cjs';
|
|
7
7
|
import { MigrateReport } from '@niscorp/strata/postgres';
|
|
8
|
+
export { FunctionDefinition } from '@niscorp/nova';
|
|
8
9
|
import { Sequence } from '@niscorp/strata';
|
|
9
10
|
import { ScreenHead } from '@niscorp/nova/document';
|
|
10
11
|
import 'hono';
|
|
11
|
-
import '@niscorp/nova';
|
|
12
12
|
import '@niscorp/nova/i18n';
|
|
13
13
|
import './socket-D90h1xSV.cjs';
|
|
14
14
|
import 'zod';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { N as NiscApp, M as MossServer, D as DocumentConfig } from './document-
|
|
2
|
-
export { a as DrawnDocument, E as ExecuteAs, F as
|
|
1
|
+
import { N as NiscApp, M as MossServer, D as DocumentConfig } from './document-BYAY-Qle.js';
|
|
2
|
+
export { a as DrawnDocument, E as ExecuteAs, F as FunctionSession, I as IdentityRecord, L as LayoutVariant, P as PageManifest, R as RunRecord, b as RunSink, c as RunTurn, S as ShellHost, d as ShellManifest, e as ShellSnapshot, f as defineApp, r as renderDocument } from './document-BYAY-Qle.js';
|
|
3
3
|
import { VerifyReport } from '@niscorp/charter';
|
|
4
4
|
import { PgPool } from '@niscorp/vex';
|
|
5
|
-
import { N as NiscRuntime } from './index-
|
|
6
|
-
export { T as Telemetry, a as TelemetrySpan } from './index-
|
|
5
|
+
import { N as NiscRuntime } from './index-CSEo7Tys.js';
|
|
6
|
+
export { T as Telemetry, a as TelemetrySpan } from './index-CSEo7Tys.js';
|
|
7
7
|
import { MigrateReport } from '@niscorp/strata/postgres';
|
|
8
|
+
export { FunctionDefinition } from '@niscorp/nova';
|
|
8
9
|
import { Sequence } from '@niscorp/strata';
|
|
9
10
|
import { ScreenHead } from '@niscorp/nova/document';
|
|
10
11
|
import 'hono';
|
|
11
|
-
import '@niscorp/nova';
|
|
12
12
|
import '@niscorp/nova/i18n';
|
|
13
13
|
import './socket-D90h1xSV.js';
|
|
14
14
|
import 'zod';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { MOSS_SEQUENCE, createServer, exportDocuments, migrateTables, mintDevToken, mintSession, renderDocument, revokeAllFor, sessionCookies } from './chunk-
|
|
2
|
-
export { defineApp, verifyApp } from './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { MOSS_SEQUENCE, createServer, exportDocuments, migrateTables, mintDevToken, mintSession, renderDocument, revokeAllFor, sessionCookies } from './chunk-YZILOVCR.js';
|
|
2
|
+
export { defineApp, verifyApp } from './chunk-6XC2MD7S.js';
|
|
3
|
+
import './chunk-QAHDSRPK.js';
|
|
4
4
|
import './chunk-4ZGAFZGS.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/dist/integrations.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkPVZMCEBX_cjs = require('./chunk-PVZMCEBX.cjs');
|
|
4
4
|
var crypto = require('crypto');
|
|
5
5
|
var zod = require('zod');
|
|
6
6
|
var hono = require('hono');
|
|
@@ -331,9 +331,9 @@ var proxyRoutes = (deps) => {
|
|
|
331
331
|
return routes;
|
|
332
332
|
};
|
|
333
333
|
var callIntegrationWith = (deps) => {
|
|
334
|
-
const emit =
|
|
334
|
+
const emit = chunkPVZMCEBX_cjs.emitterOf(deps.telemetry);
|
|
335
335
|
return async (id, path, init) => {
|
|
336
|
-
const clock = emit === void 0 ? void 0 :
|
|
336
|
+
const clock = emit === void 0 ? void 0 : chunkPVZMCEBX_cjs.spanClock();
|
|
337
337
|
const done = (status, httpStatus) => {
|
|
338
338
|
if (emit === void 0 || clock === void 0) return;
|
|
339
339
|
emit({
|
package/dist/integrations.d.cts
CHANGED
package/dist/integrations.d.ts
CHANGED
package/dist/integrations.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { emitterOf, spanClock } from './chunk-
|
|
1
|
+
import { emitterOf, spanClock } from './chunk-QAHDSRPK.js';
|
|
2
2
|
import { generateKeyPairSync, sign, createPrivateKey, createPublicKey, createHash, randomBytes } from 'crypto';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { Hono } from 'hono';
|
package/dist/node.cjs
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
3
|
+
var chunkI4UOWER3_cjs = require('./chunk-I4UOWER3.cjs');
|
|
4
|
+
require('./chunk-TMDKNZYL.cjs');
|
|
5
|
+
require('./chunk-3DCTQKPQ.cjs');
|
|
6
|
+
require('./chunk-PVZMCEBX.cjs');
|
|
7
7
|
require('./chunk-3RIWTXGI.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
Object.defineProperty(exports, "MOSS_PATHS", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkI4UOWER3_cjs.MOSS_PATHS; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "attachSocket", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkI4UOWER3_cjs.attachSocket; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "mountSite", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkI4UOWER3_cjs.mountSite; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "serve", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkI4UOWER3_cjs.serve; }
|
|
26
26
|
});
|
|
27
27
|
//# sourceMappingURL=node.cjs.map
|
|
28
28
|
//# sourceMappingURL=node.cjs.map
|
package/dist/node.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as DocumentConfig, M as MossServer, N as NiscApp } from './document-
|
|
2
|
-
import { N as NiscRuntime } from './index-
|
|
1
|
+
import { D as DocumentConfig, M as MossServer, N as NiscApp } from './document-DAE71J27.cjs';
|
|
2
|
+
import { N as NiscRuntime } from './index-CSEo7Tys.cjs';
|
|
3
3
|
import { S as SocketAccept, T as TransportSettings } from './socket-D90h1xSV.cjs';
|
|
4
4
|
import { IncomingMessage } from 'node:http';
|
|
5
5
|
import { Duplex } from 'node:stream';
|
package/dist/node.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as DocumentConfig, M as MossServer, N as NiscApp } from './document-
|
|
2
|
-
import { N as NiscRuntime } from './index-
|
|
1
|
+
import { D as DocumentConfig, M as MossServer, N as NiscApp } from './document-BYAY-Qle.js';
|
|
2
|
+
import { N as NiscRuntime } from './index-CSEo7Tys.js';
|
|
3
3
|
import { S as SocketAccept, T as TransportSettings } from './socket-D90h1xSV.js';
|
|
4
4
|
import { IncomingMessage } from 'node:http';
|
|
5
5
|
import { Duplex } from 'node:stream';
|
package/dist/node.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { MOSS_PATHS, attachSocket, mountSite, serve } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
export { MOSS_PATHS, attachSocket, mountSite, serve } from './chunk-3T422CCN.js';
|
|
2
|
+
import './chunk-YZILOVCR.js';
|
|
3
|
+
import './chunk-6XC2MD7S.js';
|
|
4
|
+
import './chunk-QAHDSRPK.js';
|
|
5
5
|
import './chunk-4ZGAFZGS.js';
|
|
6
6
|
//# sourceMappingURL=node.js.map
|
|
7
7
|
//# sourceMappingURL=node.js.map
|
package/dist/tide.d.cts
CHANGED
package/dist/tide.d.ts
CHANGED
package/dist/unverified.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunk3DCTQKPQ_cjs = require('./chunk-3DCTQKPQ.cjs');
|
|
4
|
+
require('./chunk-PVZMCEBX.cjs');
|
|
5
5
|
require('./chunk-3RIWTXGI.cjs');
|
|
6
6
|
|
|
7
7
|
// src/shells/unverified.ts
|
|
8
|
-
var unverifiedShell = (session) =>
|
|
8
|
+
var unverifiedShell = (session) => chunk3DCTQKPQ_cjs.wholeShellOf(session.shell);
|
|
9
9
|
|
|
10
10
|
exports.unverifiedShell = unverifiedShell;
|
|
11
11
|
//# sourceMappingURL=unverified.cjs.map
|
package/dist/unverified.js
CHANGED
package/dist/vite.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
3
|
+
var chunkI4UOWER3_cjs = require('./chunk-I4UOWER3.cjs');
|
|
4
|
+
var chunkTMDKNZYL_cjs = require('./chunk-TMDKNZYL.cjs');
|
|
5
|
+
require('./chunk-3DCTQKPQ.cjs');
|
|
6
|
+
require('./chunk-PVZMCEBX.cjs');
|
|
7
7
|
require('./chunk-3RIWTXGI.cjs');
|
|
8
8
|
var promises = require('fs/promises');
|
|
9
9
|
var net = require('net');
|
|
@@ -57,7 +57,7 @@ var devMiddleware = (vite, options, owned, current) => (req, res, next) => {
|
|
|
57
57
|
}
|
|
58
58
|
const scheme = "encrypted" in req.socket && req.socket.encrypted === true ? "https" : "http";
|
|
59
59
|
res.statusCode = 302;
|
|
60
|
-
res.setHeader("set-cookie",
|
|
60
|
+
res.setHeader("set-cookie", chunkTMDKNZYL_cjs.sessionCookies(`${scheme}://${req.headers.host ?? "localhost"}`, token, app.tokenKey !== void 0 ? { key: app.tokenKey } : {}));
|
|
61
61
|
res.setHeader("location", "/");
|
|
62
62
|
res.end();
|
|
63
63
|
}).catch(() => {
|
|
@@ -83,7 +83,7 @@ var devMiddleware = (vite, options, owned, current) => (req, res, next) => {
|
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
85
85
|
const template = await vite.transformIndexHtml(url, await promises.readFile(path.resolve(vite.config.root, options.index ?? "index.html"), "utf8"));
|
|
86
|
-
const page = await
|
|
86
|
+
const page = await chunkTMDKNZYL_cjs.renderDocument({
|
|
87
87
|
server: app.server,
|
|
88
88
|
template,
|
|
89
89
|
request: { path: path$1 === "/index.html" ? "/" : path$1, cookie: req.headers.cookie ?? null, host: req.headers.host ?? null },
|
|
@@ -104,17 +104,17 @@ var mossDev = (options) => ({
|
|
|
104
104
|
configureServer: (vite) => {
|
|
105
105
|
const label = options.label ?? "moss";
|
|
106
106
|
const watch = options.watch ?? DEFAULT_WATCH;
|
|
107
|
-
const owned = options.owned ??
|
|
107
|
+
const owned = options.owned ?? chunkI4UOWER3_cjs.MOSS_PATHS;
|
|
108
108
|
const load = (id) => vite.ssrLoadModule(id);
|
|
109
109
|
const httpServer = vite.httpServer;
|
|
110
110
|
const boot = async () => {
|
|
111
111
|
const app = await options.app(load);
|
|
112
|
-
return { app, listener: nodeServer.getRequestListener(app.server.fetch), ...httpServer !== null ? { transport:
|
|
112
|
+
return { app, listener: nodeServer.getRequestListener(app.server.fetch), ...httpServer !== null ? { transport: chunkI4UOWER3_cjs.createTransport(app.server.socket) } : {} };
|
|
113
113
|
};
|
|
114
114
|
let current = boot();
|
|
115
115
|
current.catch((error) => vite.config.logger.error(`[${label}] the app did not boot: ${said(error)}`, { timestamp: true }));
|
|
116
116
|
if (httpServer !== null) {
|
|
117
|
-
|
|
117
|
+
chunkI4UOWER3_cjs.listenForUpgrades(httpServer, "/socket", (req, socket, head) => {
|
|
118
118
|
void current.then(
|
|
119
119
|
({ transport }) => transport?.upgrade(req, socket, head),
|
|
120
120
|
() => socket.end("HTTP/1.1 503 Service Unavailable\r\nConnection: close\r\nContent-Length: 0\r\n\r\n")
|
package/dist/vite.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
|
-
import { M as MossServer, D as DocumentConfig } from './document-
|
|
2
|
+
import { M as MossServer, D as DocumentConfig } from './document-DAE71J27.cjs';
|
|
3
3
|
import 'hono';
|
|
4
4
|
import '@niscorp/charter';
|
|
5
5
|
import '@niscorp/nova';
|
|
6
6
|
import '@niscorp/vex';
|
|
7
7
|
import '@niscorp/strata';
|
|
8
8
|
import '@niscorp/nova/i18n';
|
|
9
|
-
import './index-
|
|
9
|
+
import './index-CSEo7Tys.cjs';
|
|
10
10
|
import '@niscorp/strata/postgres';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import './socket-D90h1xSV.cjs';
|
package/dist/vite.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
|
-
import { M as MossServer, D as DocumentConfig } from './document-
|
|
2
|
+
import { M as MossServer, D as DocumentConfig } from './document-BYAY-Qle.js';
|
|
3
3
|
import 'hono';
|
|
4
4
|
import '@niscorp/charter';
|
|
5
5
|
import '@niscorp/nova';
|
|
6
6
|
import '@niscorp/vex';
|
|
7
7
|
import '@niscorp/strata';
|
|
8
8
|
import '@niscorp/nova/i18n';
|
|
9
|
-
import './index-
|
|
9
|
+
import './index-CSEo7Tys.js';
|
|
10
10
|
import '@niscorp/strata/postgres';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import './socket-D90h1xSV.js';
|
package/dist/vite.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MOSS_PATHS, listenForUpgrades, createTransport } from './chunk-
|
|
2
|
-
import { sessionCookies, renderDocument } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
import { MOSS_PATHS, listenForUpgrades, createTransport } from './chunk-3T422CCN.js';
|
|
2
|
+
import { sessionCookies, renderDocument } from './chunk-YZILOVCR.js';
|
|
3
|
+
import './chunk-6XC2MD7S.js';
|
|
4
|
+
import './chunk-QAHDSRPK.js';
|
|
5
5
|
import './chunk-4ZGAFZGS.js';
|
|
6
6
|
import { readFile } from 'fs/promises';
|
|
7
7
|
import { BlockList, isIPv4, isIPv6 } from 'net';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@niscorp/moss",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "moss — the nisc app server: serves existence (catalog, scoped vex, the socket), derived from artifacts",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -212,12 +212,12 @@
|
|
|
212
212
|
"zod": "^4.2.0",
|
|
213
213
|
"vue": "^3.5.0",
|
|
214
214
|
"vite": ">=6",
|
|
215
|
-
"@niscorp/strata": "^0.1.7",
|
|
216
215
|
"@niscorp/charter": "^0.1.4",
|
|
216
|
+
"@niscorp/strata": "^0.1.7",
|
|
217
|
+
"@niscorp/prism": "^0.3.1",
|
|
218
|
+
"@niscorp/nova": "^0.5.0",
|
|
217
219
|
"@niscorp/tide": "^0.1.7",
|
|
218
|
-
"@niscorp/
|
|
219
|
-
"@niscorp/vex": "^0.4.0",
|
|
220
|
-
"@niscorp/prism": "^0.3.1"
|
|
220
|
+
"@niscorp/vex": "^0.4.1"
|
|
221
221
|
},
|
|
222
222
|
"peerDependenciesMeta": {
|
|
223
223
|
"@niscorp/tide": {
|
|
@@ -256,11 +256,11 @@
|
|
|
256
256
|
"vue": "^3.5.43",
|
|
257
257
|
"zod": "^4.6.5",
|
|
258
258
|
"@niscorp/charter": "^0.1.4",
|
|
259
|
-
"@niscorp/nova": "^0.4.0",
|
|
260
|
-
"@niscorp/strata": "^0.1.7",
|
|
261
259
|
"@niscorp/prism": "^0.3.1",
|
|
260
|
+
"@niscorp/strata": "^0.1.7",
|
|
262
261
|
"@niscorp/tide": "^0.1.7",
|
|
263
|
-
"@niscorp/
|
|
262
|
+
"@niscorp/nova": "^0.5.0",
|
|
263
|
+
"@niscorp/vex": "^0.4.1"
|
|
264
264
|
},
|
|
265
265
|
"scripts": {
|
|
266
266
|
"build": "node -e \"fs.rmSync('dist',{recursive:true,force:true})\" && tsup",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/runtime/runtime.ts"],"names":["z"],"mappings":";;;;;AAsDO,IAAM,YAAY,CAAC,SAAA,KACxB,cAAc,MAAA,GACV,MAAA,GACA,CAAC,IAAA,KAAS;AACR,EAAA,IAAI;AACF,IAAA,SAAA,CAAU,KAAK,IAAI,CAAA;AAAA,EACrB,SAAS,GAAA,EAAK;AACZ,IAAA,OAAA,CAAQ,KAAA,CAAM,oBAAoB,GAAG,CAAA;AAAA,EACvC;AACF;AAIN,IAAM,YAAA,GAAe,MAAe,OAAO,WAAA,KAAgB,cAAc,WAAA,CAAY,GAAA,EAAI,GAAI,IAAA,CAAK,GAAA,EAAI;AAE/F,IAAM,YAAY,MAAiB;AACxC,EAAA,MAAM,aAAA,GAAgB,IAAA,CAAK,GAAA,EAAI,GAAI,GAAA;AACnC,EAAA,MAAM,KAAK,YAAA,EAAa;AACxB,EAAA,OAAO,EAAE,eAAe,WAAA,EAAa,MAAM,iBAAiB,YAAA,EAAa,GAAI,MAAM,GAAA,EAAI;AACzF;AAEA,IAAM,KAAA,GAAQ,EAAE,MAAA,EAAQA,KAAA,CAAE,QAAO,EAAE;AAE5B,IAAM,mBAAA,GAAsBA,KAAA,CAAE,kBAAA,CAAmB,MAAA,EAAQ;AAAA,EAC9DA,KAAA,CAAE,YAAA,CAAa,EAAE,IAAA,EAAMA,MAAE,OAAA,CAAQ,qBAAqB,CAAA,EAAG,SAAA,EAAWA,KAAA,CAAE,MAAA,EAAO,EAAG,GAAG,OAAO,CAAA;AAAA,EAC1FA,KAAA,CAAE,YAAA,CAAa,EAAE,IAAA,EAAMA,MAAE,OAAA,CAAQ,gBAAgB,CAAA,EAAG,GAAA,EAAKA,KAAA,CAAE,MAAA,EAAO,EAAG,GAAG,OAAO,CAAA;AAAA,EAC/EA,MAAE,YAAA,CAAa,EAAE,MAAMA,KAAA,CAAE,OAAA,CAAQ,OAAO,CAAA,EAAG,SAAA,EAAWA,KAAA,CAAE,MAAA,IAAU,OAAA,EAASA,KAAA,CAAE,QAAO,EAAG,GAAG,OAAO,CAAA;AAAA,EACjGA,KAAA,CAAE,YAAA,CAAa,EAAE,IAAA,EAAMA,MAAE,OAAA,CAAQ,OAAO,CAAA,EAAG,SAAA,EAAWA,KAAA,CAAE,MAAA,EAAO,EAAG,GAAG,OAAO;AAC9E,CAAC","file":"chunk-C2DNDIQX.cjs","sourcesContent":["import type { Context, Next } from 'hono';\nimport type { CacheBackend, MutationClient, PgPool, QueryEngineConfig } from '@niscorp/vex';\nimport type { Sequence } from '@niscorp/strata';\nimport { z } from 'zod';\n\nexport type SessionVerifier = (token: string) => string | null | Promise<string | null>;\n\nexport type NiscRuntime = {\n pool: PgPool;\n db: MutationClient;\n cache?: CacheBackend;\n vexConfig?: QueryEngineConfig['config'];\n session: SessionVerifier | 'sessions' | 'dev-open';\n origins?: readonly string[];\n migrations?: 'apply' | 'verify';\n tables?: readonly Sequence[];\n shellIdleMs?: number;\n anonymousShellMax?: number;\n endpointTimeoutMs?: number;\n sessionRevalidateMs?: number;\n identityMax?: number;\n identityIdleMs?: number;\n shellFrameDelta?: boolean;\n socketCompression?: boolean | Record<string, unknown>;\n socketMaxMessageBytes?: number;\n operatorKey?: string;\n\n operatorGate?: (c: Context, next: Next) => Response | void | Promise<Response | void>;\n\n fabric?: Fabric;\n\n telemetry?: Telemetry;\n};\n\nexport type TelemetrySpan = {\n name: string;\n // A JS number cannot hold epoch nanoseconds exactly: the loss is far below\n // the milliseconds measured here.\n startUnixNano: number;\n endUnixNano: number;\n status: 'ok' | 'error' | 'refused';\n // Identifiers and measurements only: never a payload, a name, or who a principal is.\n attributes: Record<string, string | number | boolean>;\n traceId?: string;\n spanId?: string;\n parentSpanId?: string;\n};\n\nexport type Telemetry = {\n emit: (span: TelemetrySpan) => void;\n};\n\nexport type Emit = (span: TelemetrySpan) => void;\n\nexport const emitterOf = (telemetry: Telemetry | undefined): Emit | undefined =>\n telemetry === undefined\n ? undefined\n : (span) => {\n try {\n telemetry.emit(span);\n } catch (err) {\n console.error('[moss:telemetry]', err);\n }\n };\n\nexport type SpanClock = { startUnixNano: number; endUnixNano: () => number };\n\nconst elapsedClock = (): number => (typeof performance !== 'undefined' ? performance.now() : Date.now());\n\nexport const spanClock = (): SpanClock => {\n const startUnixNano = Date.now() * 1e6;\n const t0 = elapsedClock();\n return { startUnixNano, endUnixNano: () => startUnixNano + (elapsedClock() - t0) * 1e6 };\n};\n\nconst stamp = { origin: z.string() };\n\nexport const FabricMessageSchema = z.discriminatedUnion('kind', [\n z.strictObject({ kind: z.literal('invalidate-identity'), principal: z.string(), ...stamp }),\n z.strictObject({ kind: z.literal('invalidate-tag'), tag: z.string(), ...stamp }),\n z.strictObject({ kind: z.literal('nudge'), principal: z.string(), channel: z.string(), ...stamp }),\n z.strictObject({ kind: z.literal('adopt'), principal: z.string(), ...stamp }),\n]);\n\nexport type FabricMessage = z.infer<typeof FabricMessageSchema>;\n\ntype Unstamped<Message> = Message extends unknown ? Omit<Message, 'origin'> : never;\nexport type FabricSignal = Unstamped<FabricMessage>;\n\nexport type Fabric = {\n publish: (message: FabricMessage) => void;\n subscribe: (apply: (message: unknown) => void) => void;\n};\n"]}
|