@feigi/fleet-ctl 3.122.1 → 3.122.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/package.json +1 -1
- package/scripts/label-map.mjs +3 -2
package/package.json
CHANGED
package/scripts/label-map.mjs
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
// origin every Label role -> "table" | "default" | "maintainer"
|
|
19
19
|
//
|
|
20
20
|
// VALID STRINGS (labelStringFaults): non-empty after trimming, at most 50
|
|
21
|
-
//
|
|
21
|
+
// code points, no `"` and no `\`, and no two roles mapping to one string,
|
|
22
22
|
// compared ignoring case.
|
|
23
23
|
//
|
|
24
24
|
// THE READER (readLabelMap) returns `roles` when the cache parses, holds every
|
|
@@ -125,7 +125,8 @@ function stringFault(value) {
|
|
|
125
125
|
if (value === undefined) return "missing";
|
|
126
126
|
if (typeof value !== "string") return `not a string (${JSON.stringify(value)})`;
|
|
127
127
|
if (value.trim() === "") return "empty after trimming";
|
|
128
|
-
|
|
128
|
+
const length = [...value].length;
|
|
129
|
+
if (length > MAX_LENGTH) return `longer than ${MAX_LENGTH} code points (${length})`;
|
|
129
130
|
if (value.includes('"')) return 'contains `"`';
|
|
130
131
|
if (value.includes("\\")) return "contains `\\`";
|
|
131
132
|
return null;
|