@atproto/xrpc 0.4.0 → 0.4.1
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/CHANGELOG.md +7 -0
- package/dist/index.js +6 -6
- package/dist/index.js.map +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -12688,13 +12688,13 @@ var ensureValidAtUri = (uri2) => {
|
|
|
12688
12688
|
throw new Error("ATURI requires at least method and authority sections");
|
|
12689
12689
|
}
|
|
12690
12690
|
try {
|
|
12691
|
-
|
|
12692
|
-
} catch {
|
|
12693
|
-
try {
|
|
12691
|
+
if (parts[2].startsWith("did:")) {
|
|
12694
12692
|
ensureValidDid(parts[2]);
|
|
12695
|
-
}
|
|
12696
|
-
|
|
12693
|
+
} else {
|
|
12694
|
+
ensureValidHandle(parts[2]);
|
|
12697
12695
|
}
|
|
12696
|
+
} catch {
|
|
12697
|
+
throw new Error("ATURI authority must be a valid handle or DID");
|
|
12698
12698
|
}
|
|
12699
12699
|
if (parts.length >= 4) {
|
|
12700
12700
|
if (parts[3].length == 0) {
|
|
@@ -13989,7 +13989,7 @@ function datetime(path, value) {
|
|
|
13989
13989
|
} catch {
|
|
13990
13990
|
return {
|
|
13991
13991
|
success: false,
|
|
13992
|
-
error: new ValidationError(`${path} must be an
|
|
13992
|
+
error: new ValidationError(`${path} must be an valid atproto datetime (both RFC-3339 and ISO-8601)`)
|
|
13993
13993
|
};
|
|
13994
13994
|
}
|
|
13995
13995
|
return { success: true, value };
|