@mostra/runtime 0.8.0 → 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/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as uninstallService, i as serviceStatus, n as startInstance, o as checkPlatform, r as installService, s as resolveHomePath, t as runtimeVersion } from "./instance-BRfg27Rg.js";
2
+ import { a as uninstallService, i as serviceStatus, n as startInstance, o as checkPlatform, r as installService, s as resolveHomePath, t as runtimeVersion } from "./instance-EnaZPs14.js";
3
3
  import { s as realPath } from "./files-FygSJIzK.js";
4
4
  import { mkdirSync } from "node:fs";
5
5
  import { fileURLToPath } from "node:url";
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as startInstance, t as runtimeVersion } from "./instance-BRfg27Rg.js";
1
+ import { n as startInstance, t as runtimeVersion } from "./instance-EnaZPs14.js";
2
2
  import { t as connectToSupervisor } from "./child-Chiavhdx.js";
3
3
  export { connectToSupervisor, runtimeVersion, startInstance };
@@ -5872,7 +5872,13 @@ function notFound$1(message) {
5872
5872
  */
5873
5873
  function submissionFor(db, artifactId, submissionId) {
5874
5874
  const row = submissionId === void 0 ? db.get("SELECT * FROM submission WHERE artifact_id = ? ORDER BY position DESC LIMIT 1", artifactId) : db.get("SELECT * FROM submission WHERE id = ? AND artifact_id = ?", submissionId, artifactId);
5875
- if (!row) throw notFound$1(submissionId === void 0 ? `The artifact ${artifactId} has no submission yet.` : `The artifact ${artifactId} has no submission ${submissionId}.`);
5875
+ if (!row) {
5876
+ if (submissionId === void 0) {
5877
+ const artifact = db.get("SELECT policy_json FROM artifact WHERE id = ?", artifactId);
5878
+ if (artifact && storedPolicy(artifact.policy_json).policy === "none") throw notFound$1(`The artifact ${artifactId} takes no submissions (its submission policy is none): what its viewers do is in its shared state and its signals, so read its state, or wait for one of its signals (signal:<name>), whose event carries the payload the page sent.`);
5879
+ }
5880
+ throw notFound$1(submissionId === void 0 ? `The artifact ${artifactId} has no submission yet.` : `The artifact ${artifactId} has no submission ${submissionId}.`);
5881
+ }
5876
5882
  return row;
5877
5883
  }
5878
5884
  /** The complete results of a submission (INTERFACES §8). */
@@ -18933,4 +18939,4 @@ function sourceDirectory(path) {
18933
18939
  //#endregion
18934
18940
  export { uninstallService as a, serviceStatus as i, startInstance as n, checkPlatform as o, installService as r, resolveHomePath as s, runtimeVersion as t };
18935
18941
 
18936
- //# sourceMappingURL=instance-BRfg27Rg.js.map
18942
+ //# sourceMappingURL=instance-EnaZPs14.js.map