-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improving CLI tooling - adding typedoc, jsdoc, better-docs, typescrip…
…t-coverage-report, lighthouse cli & vite-bundle-analyzer. Adding test auth disabled mode for lighthouse scoring and playwright testing.
- Loading branch information
Showing
37 changed files
with
5,009 additions
and
328 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
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,39 @@ | ||
const z = require('zod').z; | ||
const readFileSync = require('fs').readFileSync; | ||
const writeFileSync = require('fs').writeFileSync; | ||
const execSync = require('child_process').execSync; | ||
|
||
const ConfigSchema = z.strictObject({ | ||
configFile: z.string(), | ||
adminToken: z.string(), | ||
buildToken: z.string(), | ||
baseURL: z.string(), | ||
serverBaseURL: z.string() | ||
}); | ||
|
||
const config = ConfigSchema.parse(JSON.parse(readFileSync(process.argv.at(2)).toString())); | ||
|
||
/** @type {() => string[]} */ | ||
const buildURLs = () => [ | ||
config.baseURL, | ||
`${config.baseURL}/login`, | ||
`${config.baseURL}/hardware` | ||
]; | ||
|
||
const urls = buildURLs(); | ||
writeFileSync(config.configFile, JSON.stringify({ | ||
ci: { | ||
collect: { | ||
url: urls | ||
}, | ||
upload: { | ||
target: 'lhci', | ||
serverBaseUrl: config.serverBaseURL, | ||
token: config.buildToken | ||
}, | ||
} | ||
}, undefined, 2)); | ||
|
||
/** @type {Buffer} */ | ||
const res = execSync(`lhci autorun --config=${config.configFile} --disable-storage-reset`); | ||
console.log(res.toString()); |
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 @@ | ||
{ | ||
"configFile": "", | ||
"adminToken": "", | ||
"buildToken": "", | ||
"serverBaseURL": "", | ||
"baseURL": "" | ||
} |
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
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
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
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
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,4 @@ | ||
declare module "*.svg" { | ||
const content: string; | ||
export default content; | ||
} |
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
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
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
VITE_CORE_URL="http://localhost:3333/api/1/trpc" | ||
VITE_LOG_LEVEL=1 | ||
VITE_LOGGING_SERVER="" | ||
VITE_VIDEO_STREAM_URL="" | ||
VITE_VIDEO_STREAM_URL="" | ||
VITE_MODE="production" | ||
VITE_DISABLE_AUTH=false |
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
Oops, something went wrong.