@opendatalabs/vana-sdk 3.8.1 → 3.8.2
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.browser.js +6 -3
- package/dist/index.browser.js.map +2 -2
- package/dist/index.node.cjs +6 -3
- package/dist/index.node.cjs.map +2 -2
- package/dist/index.node.js +6 -3
- package/dist/index.node.js.map +2 -2
- package/dist/protocol/scopes.cjs +6 -3
- package/dist/protocol/scopes.cjs.map +1 -1
- package/dist/protocol/scopes.js +6 -3
- package/dist/protocol/scopes.js.map +1 -1
- package/package.json +1 -1
package/dist/index.node.js
CHANGED
|
@@ -33447,14 +33447,17 @@ async function readPersonalServerData(params) {
|
|
|
33447
33447
|
|
|
33448
33448
|
// src/protocol/scopes.ts
|
|
33449
33449
|
import { z as z2 } from "zod";
|
|
33450
|
-
var
|
|
33450
|
+
var SOURCE_RE = /^[a-z0-9][a-z0-9_]*$/;
|
|
33451
|
+
var TAIL_SEGMENT_RE = /^[a-zA-Z0-9][a-zA-Z0-9_]*$/;
|
|
33451
33452
|
var ScopeSchema = z2.string().refine(
|
|
33452
33453
|
(scope) => {
|
|
33453
33454
|
const parts = scope.split(".");
|
|
33454
|
-
|
|
33455
|
+
if (parts.length < 2 || parts.length > 3) return false;
|
|
33456
|
+
const [source, ...tail] = parts;
|
|
33457
|
+
return SOURCE_RE.test(source) && tail.every((part) => TAIL_SEGMENT_RE.test(part));
|
|
33455
33458
|
},
|
|
33456
33459
|
{
|
|
33457
|
-
message: "Scope must be {source}.{category}[.{subcategory}]
|
|
33460
|
+
message: "Scope must be {source}.{category}[.{subcategory}]; source lowercase, tail may keep the historical camelCase form (e.g. spotify.savedTracks)"
|
|
33458
33461
|
}
|
|
33459
33462
|
);
|
|
33460
33463
|
function parseScope(scope) {
|