ymmv-cli 0.6.1 → 0.6.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/README.md +2 -2
- package/dist/cli.js +10 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# ymmv-cli
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**The tools you actually use. Publish from the CLI, diff against anyone's.**
|
|
4
4
|
|
|
5
|
-
Editor, OS, shell, terminal, theme
|
|
5
|
+
Editor, OS, shell, terminal, theme (and more), published to a
|
|
6
6
|
clean page at `ymmv.fyi/<handle>` in about 10 seconds. See a live one:
|
|
7
7
|
[ymmv.fyi/bardisty](https://ymmv.fyi/bardisty).
|
|
8
8
|
|
package/dist/cli.js
CHANGED
|
@@ -286,8 +286,14 @@ function parseProfile(raw) {
|
|
|
286
286
|
}
|
|
287
287
|
if (typeof raw.handle !== "string")
|
|
288
288
|
throw new ProfileParseError("handle is not a string");
|
|
289
|
+
if (raw.handle.length > MAX_PARSE_LABEL) {
|
|
290
|
+
throw new ProfileParseError(`handle exceeds ${MAX_PARSE_LABEL} chars`);
|
|
291
|
+
}
|
|
289
292
|
if (typeof raw.updated_at !== "string")
|
|
290
293
|
throw new ProfileParseError("updated_at is not a string");
|
|
294
|
+
if (raw.updated_at.length > MAX_PARSE_LABEL) {
|
|
295
|
+
throw new ProfileParseError(`updated_at exceeds ${MAX_PARSE_LABEL} chars`);
|
|
296
|
+
}
|
|
291
297
|
if (!Array.isArray(raw.entries))
|
|
292
298
|
throw new ProfileParseError("entries is not an array");
|
|
293
299
|
if (raw.entries.length > MAX_PARSE_ENTRIES) {
|
|
@@ -299,6 +305,9 @@ function parseProfile(raw) {
|
|
|
299
305
|
if (!isRecord(entry) || typeof entry.key !== "string" || typeof entry.value !== "string") {
|
|
300
306
|
throw new ProfileParseError(`entry ${i} is not {key,value} strings`);
|
|
301
307
|
}
|
|
308
|
+
if (entry.key.length > MAX_PARSE_LABEL) {
|
|
309
|
+
throw new ProfileParseError(`entry ${i} key exceeds ${MAX_PARSE_LABEL} chars`);
|
|
310
|
+
}
|
|
302
311
|
if (entry.value.length > MAX_PARSE_VALUE) {
|
|
303
312
|
throw new ProfileParseError(`entry ${i} value exceeds ${MAX_PARSE_VALUE} chars`);
|
|
304
313
|
}
|
|
@@ -330,7 +339,7 @@ function parseProfile(raw) {
|
|
|
330
339
|
}
|
|
331
340
|
|
|
332
341
|
// ../shared/dist/reserved.js
|
|
333
|
-
var RESERVED_ROUTES = ["api", "login", "logout"];
|
|
342
|
+
var RESERVED_ROUTES = ["404", "api", "login", "logout"];
|
|
334
343
|
var CLI_VERBS = ["login", "logout", "set", "unset", "delete", "view", "help"];
|
|
335
344
|
var RESERVED = [.../* @__PURE__ */ new Set([...RESERVED_ROUTES, ...CLI_VERBS])];
|
|
336
345
|
var RESERVED_SET = new Set(RESERVED);
|