@orangecheck/agent-core 2.0.0 → 2.1.0
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/canonical.js.map +1 -1
- package/dist/canonical.mjs.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -2
- package/dist/index.mjs.map +1 -1
- package/dist/scope.js +7 -2
- package/dist/scope.js.map +1 -1
- package/dist/scope.mjs +7 -2
- package/dist/scope.mjs.map +1 -1
- package/package.json +1 -1
- package/src/revocation-failclosed.test.ts +19 -8
- package/src/scope.test.ts +44 -0
- package/src/scope.ts +17 -2
package/dist/index.mjs
CHANGED
|
@@ -223,10 +223,15 @@ function rangeSubset(ex, g) {
|
|
|
223
223
|
if (!exRange || !gRange) return false;
|
|
224
224
|
return gRange.lo <= exRange.lo && exRange.hi <= gRange.hi;
|
|
225
225
|
}
|
|
226
|
+
function parseDecimalInteger(value) {
|
|
227
|
+
if (!/^-?\d+$/.test(value)) return null;
|
|
228
|
+
const n = Number(value);
|
|
229
|
+
return Number.isSafeInteger(n) ? n : null;
|
|
230
|
+
}
|
|
226
231
|
function opToRange(c) {
|
|
227
232
|
if (c.value === void 0) return null;
|
|
228
|
-
const n =
|
|
229
|
-
if (
|
|
233
|
+
const n = parseDecimalInteger(c.value);
|
|
234
|
+
if (n === null) return null;
|
|
230
235
|
switch (c.op) {
|
|
231
236
|
case "=":
|
|
232
237
|
return { lo: n, hi: n };
|