@niscorp/moss 0.8.2 → 0.9.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/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkQB7U2JDQ_cjs = require('./chunk-QB7U2JDQ.cjs');
3
+ var chunkL2GHVTJW_cjs = require('./chunk-L2GHVTJW.cjs');
4
4
  var chunkE6YAYR7G_cjs = require('./chunk-E6YAYR7G.cjs');
5
5
  require('./chunk-PVZMCEBX.cjs');
6
6
  require('./chunk-3RIWTXGI.cjs');
@@ -9,39 +9,43 @@ require('./chunk-3RIWTXGI.cjs');
9
9
 
10
10
  Object.defineProperty(exports, "MOSS_SEQUENCE", {
11
11
  enumerable: true,
12
- get: function () { return chunkQB7U2JDQ_cjs.MOSS_SEQUENCE; }
12
+ get: function () { return chunkL2GHVTJW_cjs.MOSS_SEQUENCE; }
13
13
  });
14
14
  Object.defineProperty(exports, "createServer", {
15
15
  enumerable: true,
16
- get: function () { return chunkQB7U2JDQ_cjs.createServer; }
16
+ get: function () { return chunkL2GHVTJW_cjs.createServer; }
17
17
  });
18
18
  Object.defineProperty(exports, "exportDocuments", {
19
19
  enumerable: true,
20
- get: function () { return chunkQB7U2JDQ_cjs.exportDocuments; }
20
+ get: function () { return chunkL2GHVTJW_cjs.exportDocuments; }
21
21
  });
22
22
  Object.defineProperty(exports, "migrateTables", {
23
23
  enumerable: true,
24
- get: function () { return chunkQB7U2JDQ_cjs.migrateTables; }
24
+ get: function () { return chunkL2GHVTJW_cjs.migrateTables; }
25
25
  });
26
26
  Object.defineProperty(exports, "mintDevToken", {
27
27
  enumerable: true,
28
- get: function () { return chunkQB7U2JDQ_cjs.mintDevToken; }
28
+ get: function () { return chunkL2GHVTJW_cjs.mintDevToken; }
29
29
  });
30
30
  Object.defineProperty(exports, "mintSession", {
31
31
  enumerable: true,
32
- get: function () { return chunkQB7U2JDQ_cjs.mintSession; }
32
+ get: function () { return chunkL2GHVTJW_cjs.mintSession; }
33
33
  });
34
34
  Object.defineProperty(exports, "renderDocument", {
35
35
  enumerable: true,
36
- get: function () { return chunkQB7U2JDQ_cjs.renderDocument; }
36
+ get: function () { return chunkL2GHVTJW_cjs.renderDocument; }
37
37
  });
38
38
  Object.defineProperty(exports, "revokeAllFor", {
39
39
  enumerable: true,
40
- get: function () { return chunkQB7U2JDQ_cjs.revokeAllFor; }
40
+ get: function () { return chunkL2GHVTJW_cjs.revokeAllFor; }
41
41
  });
42
42
  Object.defineProperty(exports, "sessionCookies", {
43
43
  enumerable: true,
44
- get: function () { return chunkQB7U2JDQ_cjs.sessionCookies; }
44
+ get: function () { return chunkL2GHVTJW_cjs.sessionCookies; }
45
+ });
46
+ Object.defineProperty(exports, "tableStatus", {
47
+ enumerable: true,
48
+ get: function () { return chunkL2GHVTJW_cjs.tableStatus; }
45
49
  });
46
50
  Object.defineProperty(exports, "defineApp", {
47
51
  enumerable: true,
package/dist/index.d.cts CHANGED
@@ -5,8 +5,8 @@ import { PgPool } from '@niscorp/vex';
5
5
  import { N as NiscRuntime } from './index-CSEo7Tys.cjs';
6
6
  export { T as Telemetry, a as TelemetrySpan } from './index-CSEo7Tys.cjs';
7
7
  import { MigrateReport } from '@niscorp/strata/postgres';
8
+ import { Plan, Sequence } from '@niscorp/strata';
8
9
  export { FunctionDefinition } from '@niscorp/nova';
9
- import { Sequence } from '@niscorp/strata';
10
10
  import { ScreenHead } from '@niscorp/nova/document';
11
11
  import 'hono';
12
12
  import '@niscorp/nova/i18n';
@@ -39,8 +39,11 @@ type TablesReport = MigrateReport & {
39
39
  retyped: readonly string[];
40
40
  alreadyBroken: readonly string[];
41
41
  };
42
- declare const migrateTables: (runtime: Pick<NiscRuntime, "pool" | "cache" | "session" | "tables">, app: Pick<NiscApp, "entries" | "features">, options?: {
42
+ type TablesRuntime = Pick<NiscRuntime, 'pool' | 'cache' | 'session' | 'tables'>;
43
+ declare const tableStatus: (runtime: TablesRuntime, app: Pick<NiscApp, "features">) => Promise<Plan>;
44
+ declare const migrateTables: (runtime: TablesRuntime, app: Pick<NiscApp, "entries" | "features">, options?: {
43
45
  dryRun?: boolean;
46
+ allowRemoval?: boolean;
44
47
  }) => Promise<TablesReport>;
45
48
 
46
49
  declare const MOSS_SEQUENCE: Sequence;
@@ -62,4 +65,4 @@ declare const exportDocuments: (config: Omit<DocumentConfig, "request"> & {
62
65
  paths: readonly string[];
63
66
  }) => Promise<ExportedDocument[]>;
64
67
 
65
- export { DocumentConfig, type ExportedDocument, MOSS_SEQUENCE, MossServer, NiscApp, NiscRuntime, createServer, exportDocuments, migrateTables, mintDevToken, mintSession, revokeAllFor, sessionCookies, verifyApp };
68
+ export { DocumentConfig, type ExportedDocument, MOSS_SEQUENCE, MossServer, NiscApp, NiscRuntime, createServer, exportDocuments, migrateTables, mintDevToken, mintSession, revokeAllFor, sessionCookies, tableStatus, verifyApp };
package/dist/index.d.ts CHANGED
@@ -5,8 +5,8 @@ import { PgPool } from '@niscorp/vex';
5
5
  import { N as NiscRuntime } from './index-CSEo7Tys.js';
6
6
  export { T as Telemetry, a as TelemetrySpan } from './index-CSEo7Tys.js';
7
7
  import { MigrateReport } from '@niscorp/strata/postgres';
8
+ import { Plan, Sequence } from '@niscorp/strata';
8
9
  export { FunctionDefinition } from '@niscorp/nova';
9
- import { Sequence } from '@niscorp/strata';
10
10
  import { ScreenHead } from '@niscorp/nova/document';
11
11
  import 'hono';
12
12
  import '@niscorp/nova/i18n';
@@ -39,8 +39,11 @@ type TablesReport = MigrateReport & {
39
39
  retyped: readonly string[];
40
40
  alreadyBroken: readonly string[];
41
41
  };
42
- declare const migrateTables: (runtime: Pick<NiscRuntime, "pool" | "cache" | "session" | "tables">, app: Pick<NiscApp, "entries" | "features">, options?: {
42
+ type TablesRuntime = Pick<NiscRuntime, 'pool' | 'cache' | 'session' | 'tables'>;
43
+ declare const tableStatus: (runtime: TablesRuntime, app: Pick<NiscApp, "features">) => Promise<Plan>;
44
+ declare const migrateTables: (runtime: TablesRuntime, app: Pick<NiscApp, "entries" | "features">, options?: {
43
45
  dryRun?: boolean;
46
+ allowRemoval?: boolean;
44
47
  }) => Promise<TablesReport>;
45
48
 
46
49
  declare const MOSS_SEQUENCE: Sequence;
@@ -62,4 +65,4 @@ declare const exportDocuments: (config: Omit<DocumentConfig, "request"> & {
62
65
  paths: readonly string[];
63
66
  }) => Promise<ExportedDocument[]>;
64
67
 
65
- export { DocumentConfig, type ExportedDocument, MOSS_SEQUENCE, MossServer, NiscApp, NiscRuntime, createServer, exportDocuments, migrateTables, mintDevToken, mintSession, revokeAllFor, sessionCookies, verifyApp };
68
+ export { DocumentConfig, type ExportedDocument, MOSS_SEQUENCE, MossServer, NiscApp, NiscRuntime, createServer, exportDocuments, migrateTables, mintDevToken, mintSession, revokeAllFor, sessionCookies, tableStatus, verifyApp };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { MOSS_SEQUENCE, createServer, exportDocuments, migrateTables, mintDevToken, mintSession, renderDocument, revokeAllFor, sessionCookies } from './chunk-4M2MALV7.js';
1
+ export { MOSS_SEQUENCE, createServer, exportDocuments, migrateTables, mintDevToken, mintSession, renderDocument, revokeAllFor, sessionCookies, tableStatus } from './chunk-Y7PRASR3.js';
2
2
  export { defineApp, verifyApp } from './chunk-WTWRLOPK.js';
3
3
  import './chunk-QAHDSRPK.js';
4
4
  import './chunk-4ZGAFZGS.js';
package/dist/node.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkKLZYTSR2_cjs = require('./chunk-KLZYTSR2.cjs');
4
- require('./chunk-QB7U2JDQ.cjs');
3
+ var chunkLKTS4PCD_cjs = require('./chunk-LKTS4PCD.cjs');
4
+ require('./chunk-L2GHVTJW.cjs');
5
5
  require('./chunk-E6YAYR7G.cjs');
6
6
  require('./chunk-PVZMCEBX.cjs');
7
7
  require('./chunk-3RIWTXGI.cjs');
@@ -10,19 +10,19 @@ require('./chunk-3RIWTXGI.cjs');
10
10
 
11
11
  Object.defineProperty(exports, "MOSS_PATHS", {
12
12
  enumerable: true,
13
- get: function () { return chunkKLZYTSR2_cjs.MOSS_PATHS; }
13
+ get: function () { return chunkLKTS4PCD_cjs.MOSS_PATHS; }
14
14
  });
15
15
  Object.defineProperty(exports, "attachSocket", {
16
16
  enumerable: true,
17
- get: function () { return chunkKLZYTSR2_cjs.attachSocket; }
17
+ get: function () { return chunkLKTS4PCD_cjs.attachSocket; }
18
18
  });
19
19
  Object.defineProperty(exports, "mountSite", {
20
20
  enumerable: true,
21
- get: function () { return chunkKLZYTSR2_cjs.mountSite; }
21
+ get: function () { return chunkLKTS4PCD_cjs.mountSite; }
22
22
  });
23
23
  Object.defineProperty(exports, "serve", {
24
24
  enumerable: true,
25
- get: function () { return chunkKLZYTSR2_cjs.serve; }
25
+ get: function () { return chunkLKTS4PCD_cjs.serve; }
26
26
  });
27
27
  //# sourceMappingURL=node.cjs.map
28
28
  //# sourceMappingURL=node.cjs.map
package/dist/node.js CHANGED
@@ -1,5 +1,5 @@
1
- export { MOSS_PATHS, attachSocket, mountSite, serve } from './chunk-S4JSTWAE.js';
2
- import './chunk-4M2MALV7.js';
1
+ export { MOSS_PATHS, attachSocket, mountSite, serve } from './chunk-UUOATPZ7.js';
2
+ import './chunk-Y7PRASR3.js';
3
3
  import './chunk-WTWRLOPK.js';
4
4
  import './chunk-QAHDSRPK.js';
5
5
  import './chunk-4ZGAFZGS.js';
package/dist/vite.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkKLZYTSR2_cjs = require('./chunk-KLZYTSR2.cjs');
4
- var chunkQB7U2JDQ_cjs = require('./chunk-QB7U2JDQ.cjs');
3
+ var chunkLKTS4PCD_cjs = require('./chunk-LKTS4PCD.cjs');
4
+ var chunkL2GHVTJW_cjs = require('./chunk-L2GHVTJW.cjs');
5
5
  require('./chunk-E6YAYR7G.cjs');
6
6
  require('./chunk-PVZMCEBX.cjs');
7
7
  require('./chunk-3RIWTXGI.cjs');
@@ -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", chunkQB7U2JDQ_cjs.sessionCookies(`${scheme}://${req.headers.host ?? "localhost"}`, token, app.tokenKey !== void 0 ? { key: app.tokenKey } : {}));
60
+ res.setHeader("set-cookie", chunkL2GHVTJW_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 chunkQB7U2JDQ_cjs.renderDocument({
86
+ const page = await chunkL2GHVTJW_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 ?? chunkKLZYTSR2_cjs.MOSS_PATHS;
107
+ const owned = options.owned ?? chunkLKTS4PCD_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: chunkKLZYTSR2_cjs.createTransport(app.server.socket) } : {} };
112
+ return { app, listener: nodeServer.getRequestListener(app.server.fetch), ...httpServer !== null ? { transport: chunkLKTS4PCD_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
- chunkKLZYTSR2_cjs.listenForUpgrades(httpServer, "/socket", (req, socket, head) => {
117
+ chunkLKTS4PCD_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.js CHANGED
@@ -1,5 +1,5 @@
1
- import { MOSS_PATHS, listenForUpgrades, createTransport } from './chunk-S4JSTWAE.js';
2
- import { sessionCookies, renderDocument } from './chunk-4M2MALV7.js';
1
+ import { MOSS_PATHS, listenForUpgrades, createTransport } from './chunk-UUOATPZ7.js';
2
+ import { sessionCookies, renderDocument } from './chunk-Y7PRASR3.js';
3
3
  import './chunk-WTWRLOPK.js';
4
4
  import './chunk-QAHDSRPK.js';
5
5
  import './chunk-4ZGAFZGS.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@niscorp/moss",
3
- "version": "0.8.2",
3
+ "version": "0.9.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": {
@@ -213,11 +213,11 @@
213
213
  "vue": "^3.5.0",
214
214
  "vite": ">=6",
215
215
  "@niscorp/nova": "^0.5.1",
216
- "@niscorp/strata": "^0.1.7",
217
- "@niscorp/prism": "^0.3.1",
218
- "@niscorp/tide": "^0.1.7",
216
+ "@niscorp/prism": "^0.3.2",
219
217
  "@niscorp/charter": "^0.1.4",
220
- "@niscorp/vex": "^0.4.2"
218
+ "@niscorp/strata": "^0.1.8",
219
+ "@niscorp/tide": "^0.1.9",
220
+ "@niscorp/vex": "^0.4.3"
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/prism": "^0.3.2",
259
260
  "@niscorp/nova": "^0.5.1",
260
- "@niscorp/strata": "^0.1.7",
261
- "@niscorp/tide": "^0.1.7",
262
- "@niscorp/vex": "^0.4.2",
263
- "@niscorp/prism": "^0.3.1"
261
+ "@niscorp/tide": "^0.1.9",
262
+ "@niscorp/strata": "^0.1.8",
263
+ "@niscorp/vex": "^0.4.3"
264
264
  },
265
265
  "scripts": {
266
266
  "build": "node -e \"fs.rmSync('dist',{recursive:true,force:true})\" && tsup",