@midsummer-ai/sdk 0.1.0-staging.4135 → 0.1.0-staging.4141

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.
@@ -1413,6 +1413,12 @@ function literalReader(tree, refuse, lenient = false, env = false, from) {
1413
1413
  if (node.type === "ObjectExpression") {
1414
1414
  const out = {};
1415
1415
  for (const p of node.properties) {
1416
+ if (p.type === "SpreadElement") {
1417
+ const spread = value(p.argument);
1418
+ if (spread === null || typeof spread !== "object" || Array.isArray(spread)) refuse(p);
1419
+ Object.assign(out, spread);
1420
+ continue;
1421
+ }
1416
1422
  if (p.type !== "Property" || p.computed || p.kind !== "init" || p.method) refuse(p);
1417
1423
  out[p.key.type === "Identifier" ? p.key.name : String(p.key.value)] = value(p.value);
1418
1424
  }
package/here-C2jhTheQ.mjs CHANGED
@@ -12,7 +12,7 @@ function processEnv() {
12
12
  * This package's version: `0.0.0-dev` here, and in a published package the version it was published at, which the
13
13
  * release writes in its place as it stages the package (`stampSdk` in `scripts/release/packages.ts`).
14
14
  */
15
- const SDK_VERSION = "0.1.0-staging.4135";
15
+ const SDK_VERSION = "0.1.0-staging.4141";
16
16
  /**
17
17
  * The header that tells Midsummer which client made each of this package's calls: `Midsummer-Client: sdk/<version>
18
18
  * <part>`, `part` the product whose client it is (`database`, `storage`, `queues`, ...), so the platform counts which
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midsummer-ai/sdk",
3
- "version": "0.1.0-staging.4135",
3
+ "version": "0.1.0-staging.4141",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "description": "Midsummer's handles for an app's code: its Database, Storage, Queues, Vector DB, AI, Email and Agents, with stand-ins for tests.",
package/vector/index.mjs CHANGED
@@ -57,7 +57,7 @@ function namespace(name) {
57
57
  return vectorDb(late(() => {
58
58
  const handle = here()?.vector;
59
59
  if (handle) return remote(handle);
60
- if (processEnv().MIDSUMMER_DEV === "1") throw new VectorError("forbidden", "midsummer dev has no Vector DB stand-in yet, so namespace() reaches nothing here. Try it on a preview: midsummer ship <team>/<project>. Or reach a real namespace with a Vector key: connect({ key, origin }), the key from midsummer vector key create <team>.");
60
+ if (processEnv().MIDSUMMER_DEV === "1" || here()?.env?.MIDSUMMER_DEV === "1") throw new VectorError("forbidden", "midsummer dev has no Vector DB stand-in yet, so namespace() reaches nothing here. Try it on a preview: midsummer ship <team>/<project>. Or reach a real namespace with a Vector key: connect({ key, origin }), the key from midsummer vector key create <team>.");
61
61
  throw new VectorError("forbidden", "This code runs outside a deployment, so no environment binds a Vector DB namespace for it.");
62
62
  })).namespace(name);
63
63
  }