This commit is contained in:
BluJ
2023-03-27 15:39:01 -06:00
parent 2607f05e63
commit ce0170b808
3 changed files with 10 additions and 18 deletions

View File

@@ -10,8 +10,8 @@ lib/test/output.ts: lib/test/makeOutput.ts scripts/oldSpecToBuilder.ts
npm run buildOutput npm run buildOutput
bundle: fmt $(TS_FILES) .FORCE node_modules bundle: fmt $(TS_FILES) .FORCE node_modules
npm run tsc-multi npx tsc-multi
npm run tsc --emitDeclarationOnly npx tsc --emitDeclarationOnly
check: check:
npm run check npm run check

View File

@@ -2,16 +2,8 @@ import * as matches from "ts-matches";
import { Parser } from "ts-matches"; import { Parser } from "ts-matches";
import { InputSpec, ValueSpec as ValueSpecAny } from "../config/config-types"; import { InputSpec, ValueSpec as ValueSpecAny } from "../config/config-types";
const { const { string, some, object, dictionary, unknown, number, literals, boolean } =
string, matches;
some,
object,
dictionary,
unknown,
number,
literals,
boolean,
} = matches;
type TypeBoolean = "boolean"; type TypeBoolean = "boolean";
type TypeString = "string"; type TypeString = "string";
@@ -166,13 +158,13 @@ export function matchNumberWithRange(range: string) {
leftValue === "*" leftValue === "*"
? (_) => true ? (_) => true
: left === "[" : left === "["
? (x) => x >= Number(leftValue) ? (x) => x >= Number(leftValue)
: (x) => x > Number(leftValue), : (x) => x > Number(leftValue),
leftValue === "*" leftValue === "*"
? "any" ? "any"
: left === "[" : left === "["
? `greaterThanOrEqualTo${leftValue}` ? `greaterThanOrEqualTo${leftValue}`
: `greaterThan${leftValue}` : `greaterThan${leftValue}`
) )
.validate( .validate(
// prettier-ignore // prettier-ignore

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "start-sdk", "name": "start-sdk",
"version": "0.4.0-lib0.alpha9", "version": "0.4.0-alpha10",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "start-sdk", "name": "start-sdk",
"version": "0.4.0-lib0.alpha9", "version": "0.4.0-alpha10",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@iarna/toml": "^2.2.5", "@iarna/toml": "^2.2.5",