-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Teo Koon Peng <teokoonpeng@gmail.com>
- Loading branch information
Showing
10 changed files
with
355 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
|
||
pnpm exec lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,194 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"definitions": { | ||
"BuildConfig": { | ||
"properties": { | ||
"adminTab": { | ||
"type": "boolean" | ||
}, | ||
"authProvider": { | ||
"enum": [ | ||
"keycloak", | ||
"stub" | ||
], | ||
"type": "string" | ||
}, | ||
"baseUrl": { | ||
"type": "string" | ||
}, | ||
"customTabs": { | ||
"type": "boolean" | ||
} | ||
}, | ||
"required": [ | ||
"authProvider", | ||
"baseUrl" | ||
], | ||
"type": "object" | ||
}, | ||
"KeycloakAuthConfig": { | ||
"properties": { | ||
"clientId": { | ||
"type": "string" | ||
}, | ||
"realm": { | ||
"type": "string" | ||
}, | ||
"url": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"clientId", | ||
"realm", | ||
"url" | ||
], | ||
"type": "object" | ||
}, | ||
"LogoResource": { | ||
"properties": { | ||
"header": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"header" | ||
], | ||
"type": "object" | ||
}, | ||
"Record<\"default\",Resources>": { | ||
"properties": { | ||
"default": { | ||
"$ref": "#/definitions/Resources" | ||
} | ||
}, | ||
"required": [ | ||
"default" | ||
], | ||
"type": "object" | ||
}, | ||
"Record<string,FleetResource>": { | ||
"type": "object" | ||
}, | ||
"Record<string,Resources>": { | ||
"type": "object" | ||
}, | ||
"Resources": { | ||
"properties": { | ||
"fleets": { | ||
"$ref": "#/definitions/Record<string,FleetResource>" | ||
}, | ||
"logos": { | ||
"$ref": "#/definitions/LogoResource" | ||
} | ||
}, | ||
"required": [ | ||
"fleets", | ||
"logos" | ||
], | ||
"type": "object" | ||
}, | ||
"StubAuthConfig": { | ||
"type": "object" | ||
}, | ||
"TaskResource": { | ||
"properties": { | ||
"displayName": { | ||
"type": "string" | ||
}, | ||
"taskDefinitionId": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"taskDefinitionId" | ||
], | ||
"type": "object" | ||
} | ||
}, | ||
"properties": { | ||
"allowedTasks": { | ||
"items": { | ||
"$ref": "#/definitions/TaskResource" | ||
}, | ||
"type": "array" | ||
}, | ||
"attributionPrefix": { | ||
"type": "string" | ||
}, | ||
"authConfig": { | ||
"anyOf": [ | ||
{ | ||
"$ref": "#/definitions/StubAuthConfig" | ||
}, | ||
{ | ||
"$ref": "#/definitions/KeycloakAuthConfig" | ||
} | ||
] | ||
}, | ||
"buildConfig": { | ||
"$ref": "#/definitions/BuildConfig" | ||
}, | ||
"cartIds": { | ||
"items": { | ||
"type": "string" | ||
}, | ||
"type": "array" | ||
}, | ||
"defaultMapLevel": { | ||
"type": "string" | ||
}, | ||
"defaultRobotZoom": { | ||
"type": "number" | ||
}, | ||
"defaultZoom": { | ||
"type": "number" | ||
}, | ||
"helpLink": { | ||
"type": "string" | ||
}, | ||
"pickupZones": { | ||
"items": { | ||
"type": "string" | ||
}, | ||
"type": "array" | ||
}, | ||
"reportIssue": { | ||
"type": "string" | ||
}, | ||
"resources": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/Record<string,Resources>" | ||
}, | ||
{ | ||
"$ref": "#/definitions/Record<\"default\",Resources>" | ||
} | ||
] | ||
}, | ||
"rmfServerUrl": { | ||
"type": "string" | ||
}, | ||
"trajectoryServerUrl": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"allowedTasks", | ||
"attributionPrefix", | ||
"authConfig", | ||
"buildConfig", | ||
"cartIds", | ||
"defaultMapLevel", | ||
"defaultRobotZoom", | ||
"defaultZoom", | ||
"helpLink", | ||
"pickupZones", | ||
"reportIssue", | ||
"resources", | ||
"rmfServerUrl", | ||
"trajectoryServerUrl" | ||
], | ||
"type": "object" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* @vitest-environment node | ||
*/ | ||
|
||
import childProcess from 'child_process'; | ||
import fs from 'fs'; | ||
import { expect, it } from 'vitest'; | ||
|
||
it('app-config json schema is up to date', () => { | ||
const curSchema = fs.readFileSync('app-config.schema.json'); | ||
const newSchema = childProcess.execSync( | ||
'pnpm typescript-json-schema tsconfig.gen.json AppConfig --required', | ||
); | ||
if (!newSchema.equals(curSchema)) { | ||
expect.fail( | ||
'app config schema has changed, please run `pnpm gen-app-config-schema` to update it', | ||
); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": "./tsconfig.app.json", | ||
"compilerOptions": { | ||
"composite": false, | ||
"tsBuildInfoFile": null | ||
} | ||
} |
Oops, something went wrong.