@niscorp/moss 0.3.3 → 0.4.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.js CHANGED
@@ -1,4 +1,4 @@
1
- export { DEFAULT_GENERATION_POLL_MS, DEFAULT_IDENTITY_IDLE_MS, DEFAULT_IDENTITY_MAX, DEFAULT_IDLE_MS, GENERATION_DDL, MOSS_SEQUENCE, SESSIONS_SEQUENCE, SNAPSHOT_ELEMENT_ID, TIDE_DDL, TIDE_SEQUENCE, TIDE_TABLES, auditClosure, buildContract, callIntegrationWith, contractAsMarkdown, copyPress, createAssertionSigner, createDataLayer, createGeneration, createIdentityCache, createPageRouter, createServer, createShellHost, createTideStore, describePlacements, devSession, documentHeaders, embedSnapshot, exportDocuments, filterInstalled, hashIntegrationKey, initIntegrations, initSessions, integrationByKey, integrationOfAction, listAttachments, listIntegrations, listPlacements, loadIntegrationActions, memoKeyOf, migrateTables, mintDevToken, mintIntegrationKey, mintSession, mintWrites, renderDocument, resolveCatalog, resolveCatalogForRoles, resolvePolicy, resolvePolicyAtReach, resolvePolicyForRoles, resolveRoles, resolveVariants, resolveVariantsForRoles, revokeAllFor, revokeSession, runIntake, sessionOf, sessionVerifierOf, shellNeedOf, verifyAssertion, verifyVariants, wearableOf, wireFabric } from './chunk-AUZMT3GL.js';
1
+ export { DEFAULT_GENERATION_POLL_MS, DEFAULT_IDENTITY_IDLE_MS, DEFAULT_IDENTITY_MAX, DEFAULT_IDLE_MS, GENERATION_DDL, MOSS_SEQUENCE, SESSIONS_SEQUENCE, SNAPSHOT_ELEMENT_ID, TIDE_DDL, TIDE_SEQUENCE, TIDE_TABLES, auditClosure, buildContract, callIntegrationWith, contractAsMarkdown, copyPress, createAssertionSigner, createDataLayer, createGeneration, createIdentityCache, createPageRouter, createServer, createShellHost, createTideStore, describePlacements, devSession, documentHeaders, embedSnapshot, exportDocuments, filterInstalled, hashIntegrationKey, initIntegrations, initSessions, integrationByKey, integrationOfAction, listAttachments, listIntegrations, listPlacements, loadIntegrationActions, memoKeyOf, migrateTables, mintDevToken, mintIntegrationKey, mintSession, mintWrites, renderDocument, resolveCatalog, resolveCatalogForRoles, resolvePolicy, resolvePolicyAtReach, resolvePolicyForRoles, resolveRoles, resolveVariants, resolveVariantsForRoles, revokeAllFor, revokeSession, runIntake, sessionOf, sessionVerifierOf, shellNeedOf, verifyAssertion, verifyVariants, wearableOf, wireFabric } from './chunk-R3QMJ3JF.js';
2
2
  export { CLOSE_INVALID_TOKEN, CLOSE_SHELL_FAILED, CLOSE_SIGNED_OUT, DEFAULT_REVALIDATE_MS, PROTOCOL, createSocket, emitterOf, offerToken, sessionCookies, spanClock, tokenFromCookie } from './chunk-HOZID4EM.js';
3
3
 
4
4
  // src/app.ts
package/dist/node.cjs CHANGED
@@ -12,15 +12,15 @@ var hono$1 = require('@niscorp/vex/hono');
12
12
  var vex = require('@niscorp/vex');
13
13
  var postgres = require('@niscorp/strata/postgres');
14
14
  var strata = require('@niscorp/strata');
15
- var migrations$1 = require('@niscorp/nova/migrations');
16
- var migrations = require('@niscorp/prism/migrations');
15
+ var migrations = require('@niscorp/nova/migrations');
16
+ var prism = require('@niscorp/prism');
17
+ var migrations$1 = require('@niscorp/prism/migrations');
17
18
  var charter = require('@niscorp/charter');
18
19
  var nova = require('@niscorp/nova');
19
20
  var zod = require('zod');
20
21
  var reflect = require('@niscorp/nova/reflect');
21
22
  var i18n = require('@niscorp/nova/i18n');
22
23
  require('@niscorp/tide');
23
- var prism = require('@niscorp/prism');
24
24
  var document = require('@niscorp/nova/document');
25
25
 
26
26
  // src/node.ts
@@ -67,11 +67,11 @@ var createWireFollower = (callSignal) => {
67
67
  return { live, onChange, handedOver, end };
68
68
  };
69
69
  var grammarsOf = (app) => [
70
- migrations$1.NOVA_SEQUENCE,
71
- migrations.PRISM_SEQUENCE,
70
+ migrations.NOVA_SEQUENCE,
71
+ migrations$1.PRISM_SEQUENCE,
72
72
  ...app.grammars ?? []
73
73
  ];
74
- var createGrammarUpgrader = (app) => strata.createUpgrader(grammarsOf(app), { transform: migrations.prismTransform });
74
+ var createGrammarUpgrader = (app) => strata.createUpgrader(grammarsOf(app), { transform: prism.evaluate });
75
75
 
76
76
  // src/telemetry.ts
77
77
  var emitterOf = (telemetry) => telemetry === void 0 ? void 0 : (span) => {
@@ -1941,11 +1941,9 @@ var createShellHost = (ctx) => {
1941
1941
  ...shellManifest.fragments !== void 0 ? { fragments: shellManifest.fragments } : {},
1942
1942
  // The same seam the client shell used: prism evaluates endpoint
1943
1943
  // request/response transforms; `$.userId` and `$.today` are ambient,
1944
- // never authorable by a request.
1945
- transform: (config, source) => prism.evaluate(
1946
- config,
1947
- source !== null && typeof source === "object" && !Array.isArray(source) ? { ...source, userId, today: today() } : source
1948
- ),
1944
+ // never authorable by a request. The config is the action's own object
1945
+ // on every call, so evaluate checks it once (the source is new each time).
1946
+ transform: (config, source) => prism.evaluate(config, source !== null && typeof source === "object" && !Array.isArray(source) ? { ...source, userId, today: today() } : source),
1949
1947
  fetch: wire,
1950
1948
  functions,
1951
1949
  ...ctx.runtime.endpointTimeoutMs === void 0 ? {} : { endpointTimeoutMs: ctx.runtime.endpointTimeoutMs },