mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-26 02:11:56 +00:00
chore: update
This commit is contained in:
8
Makefile
8
Makefile
@@ -1,17 +1,17 @@
|
||||
TS_FILES := $(shell find ./**/*.ts )
|
||||
version = $(shell git tag --sort=committerdate | tail -1)
|
||||
test: $(TS_FILES)
|
||||
test: $(TS_FILES) lib/test/output.ts
|
||||
npm test
|
||||
|
||||
make clean:
|
||||
rm -rf dist
|
||||
|
||||
lib/util/artifacts/output.ts: lib/util/artifacts/makeOutput.ts lib/scripts/oldSpecToBuilder.ts
|
||||
lib/test/output.ts: lib/test/makeOutput.ts scripts/oldSpecToBuilder.ts
|
||||
npm run buildOutput
|
||||
|
||||
bundle: fmt $(TS_FILES) .FORCE node_modules
|
||||
npx tsc-multi
|
||||
npx tsc --emitDeclarationOnly
|
||||
npm run tsc-multi
|
||||
npm run tsc --emitDeclarationOnly
|
||||
|
||||
check:
|
||||
npm run check
|
||||
|
||||
18
lib/test/output.test.ts
Normal file
18
lib/test/output.test.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { InputSpec, matchInputSpec } from "./output";
|
||||
|
||||
type TEqual<A, B> = A extends B ? (B extends A ? null : never) : never;
|
||||
function testOutput<A, B>(): (c: TEqual<A, B>) => null {
|
||||
return () => null;
|
||||
}
|
||||
const testValue = null as unknown;
|
||||
// @ts-expect-error Because enable should be a boolean
|
||||
testOutput<InputSpec["rpc"]["enable"], string>()(null);
|
||||
testOutput<InputSpec["rpc"]["enable"], boolean>()(null);
|
||||
testOutput<InputSpec["rpc"]["username"], string>()(null);
|
||||
|
||||
// testOutput<InputSpec["rpc"]["advanced"]["auth"], string[]>()(null);
|
||||
describe("Inputs", () => {
|
||||
test("test", () => {
|
||||
expect(true).toEqual(true);
|
||||
});
|
||||
});
|
||||
@@ -166,13 +166,13 @@ export function matchNumberWithRange(range: string) {
|
||||
leftValue === "*"
|
||||
? (_) => true
|
||||
: left === "["
|
||||
? (x) => x >= Number(leftValue)
|
||||
: (x) => x > Number(leftValue),
|
||||
? (x) => x >= Number(leftValue)
|
||||
: (x) => x > Number(leftValue),
|
||||
leftValue === "*"
|
||||
? "any"
|
||||
: left === "["
|
||||
? `greaterThanOrEqualTo${leftValue}`
|
||||
: `greaterThan${leftValue}`
|
||||
? `greaterThanOrEqualTo${leftValue}`
|
||||
: `greaterThan${leftValue}`
|
||||
)
|
||||
.validate(
|
||||
// prettier-ignore
|
||||
|
||||
729
package-lock.json
generated
729
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "start-sdk",
|
||||
"version": "0.4.0-lib0.alpha9",
|
||||
"version": "0.4.0-alpha10",
|
||||
"description": "For making the patterns that are wanted in making services for the startOS.",
|
||||
"main": "./index.cjs",
|
||||
"types": "./index.d.ts",
|
||||
@@ -32,9 +32,11 @@
|
||||
"jest": "^29.4.3",
|
||||
"ts-jest": "^29.0.5",
|
||||
"ts-node": "^10.9.1",
|
||||
"tsc": "^2.0.4",
|
||||
"tsc-multi": "^0.6.1",
|
||||
"tsconfig-paths": "^3.14.2",
|
||||
"typescript": "^4.9.5",
|
||||
"vitest": "^0.29.2"
|
||||
},
|
||||
"declaration": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user