@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.browser.js
CHANGED
|
@@ -32820,14 +32820,17 @@ async function readPersonalServerData(params) {
|
|
|
32820
32820
|
|
|
32821
32821
|
// src/protocol/scopes.ts
|
|
32822
32822
|
import { z as z2 } from "zod";
|
|
32823
|
-
var
|
|
32823
|
+
var SOURCE_RE = /^[a-z0-9][a-z0-9_]*$/;
|
|
32824
|
+
var TAIL_SEGMENT_RE = /^[a-zA-Z0-9][a-zA-Z0-9_]*$/;
|
|
32824
32825
|
var ScopeSchema = z2.string().refine(
|
|
32825
32826
|
(scope) => {
|
|
32826
32827
|
const parts = scope.split(".");
|
|
32827
|
-
|
|
32828
|
+
if (parts.length < 2 || parts.length > 3) return false;
|
|
32829
|
+
const [source, ...tail] = parts;
|
|
32830
|
+
return SOURCE_RE.test(source) && tail.every((part) => TAIL_SEGMENT_RE.test(part));
|
|
32828
32831
|
},
|
|
32829
32832
|
{
|
|
32830
|
-
message: "Scope must be {source}.{category}[.{subcategory}]
|
|
32833
|
+
message: "Scope must be {source}.{category}[.{subcategory}]; source lowercase, tail may keep the historical camelCase form (e.g. spotify.savedTracks)"
|
|
32831
32834
|
}
|
|
32832
32835
|
);
|
|
32833
32836
|
function parseScope(scope) {
|