@pleasure1234/vesper 0.1.1 → 0.1.3
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.mjs +13 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { spawn } from "node:child_process";
|
|
|
10
10
|
import { createHash, randomBytes } from "node:crypto";
|
|
11
11
|
import { createServer } from "node:http";
|
|
12
12
|
// package.json
|
|
13
|
-
var version = "0.1.
|
|
13
|
+
var version = "0.1.3";
|
|
14
14
|
// ../../packages/core/src/constants.ts
|
|
15
15
|
const VISIBILITIES = ["private", "public"];
|
|
16
16
|
const SHELVES = [
|
|
@@ -18,6 +18,17 @@ const SHELVES = [
|
|
|
18
18
|
"favorites",
|
|
19
19
|
"archive"
|
|
20
20
|
];
|
|
21
|
+
const SCOPES = [
|
|
22
|
+
"entries:create",
|
|
23
|
+
"entries:read",
|
|
24
|
+
"entries:update",
|
|
25
|
+
"entries:delete",
|
|
26
|
+
"photos:create",
|
|
27
|
+
"photos:read",
|
|
28
|
+
"tags:read",
|
|
29
|
+
"tags:update"
|
|
30
|
+
];
|
|
31
|
+
SCOPES.filter((scope) => scope.endsWith(":read"));
|
|
21
32
|
// src/types.ts
|
|
22
33
|
const visibility = z.enum(VISIBILITIES);
|
|
23
34
|
const photo = z.looseObject({
|
|
@@ -214,7 +225,7 @@ async function collect(load, first, all, max) {
|
|
|
214
225
|
}
|
|
215
226
|
}
|
|
216
227
|
// src/oauth.ts
|
|
217
|
-
const SCOPE = "
|
|
228
|
+
const SCOPE = [...SCOPES, "offline_access"].join(" ");
|
|
218
229
|
const WAIT_MS = 3e5;
|
|
219
230
|
var OAuthError = class extends Error {};
|
|
220
231
|
async function read(schema, response) {
|