ci: prepublishOnly and lint scripts the qqq-orb node profile runs

The orb's node_install_dependencies runs npm run prepublishOnly (now the workspace build) and
node_run_tests runs npm test then npm run lint. lint checks license headers and that no
package imports another package's src. Also records finding 10: the sample app has no
uploaded-file archive table, so bulk load cannot be exercised against it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
james.maesandClaude Fable 5.1 committed 2026-10-31 17:31:32 -05:00
1 parent 455e62ff2f
commit 7f1ad5e120
3 files changed
+45 -1

No files matched your search

+1
View File
@@ -14,3 +14,4 @@ the sample app and MOCK authentication. Each is a candidate issue for `QRun-IO/q
| 7 | Process `init` on `clonePeople` without records answers `ERROR` with `No records were selected…` only after `init`; `getProcessMetaData` says `minInputRecords` 0. | `qqq process run clonePeople`. | Clients show the message. The metadata could carry the real minimum. |
| 8 | `manageSession` has no documented username and password fields for `TABLE_BASED`, so a native client cannot sign in to such an app without the browser. | Spec `manageSession` request body. | `qqq login` refuses TABLE_BASED with a message. The design doc's nice-to-have "documented TABLE_BASED bearer recipe". |
| 9 | `searchRecords` returned no results for `Avery` although `person` has search fields; unclear whether the sample app configures a search provider. | `qqq search Avery`. | None; needs a look at the sample's search setup. |
| 10 | The sample app configures no uploaded-file archive table (`QJavalinMetaData.uploadedFileArchiveTableName`), so every bulk-insert `upload` step and `POST /uploads` fail with `UploadFileArchiveTableName was not specified in javalinMetaData`. Bulk load cannot be exercised against the sample. | `qqq api initProcess --path processName=person.bulkInsert --form 'values={"tableName":"person"}'` then step `upload` with a file. | None in the client. The sample needs an archive table (memory or filesystem backend) and the javalin setting; the Next UI acceptance fixtures may already have one. |
+3 -1
View File
@@ -18,7 +18,9 @@
"generate": "npm run generate -w @qrun-io/qqq-ui-api-client && node scripts/gen-operations.mjs",
"build": "npm run build -w @qrun-io/qqq-ui-api-client && npm run build -w @qrun-io/qqq-core && npm run build -w @qrun-io/qqq-ui-api-conformance && npm run build -w @qrun-io/qqq-cli",
"test": "npm test --workspaces --if-present",
"mock": "prism mock --dynamic --port 4010 packages/ui-api-client/openapi/qqq-v1.json"
"mock": "prism mock --dynamic --port 4010 packages/ui-api-client/openapi/qqq-v1.json",
"prepublishOnly": "npm run build",
"lint": "node scripts/lint.mjs"
},
"devDependencies": {
"@stoplight/prism-cli": "5.16.0",
+41
View File
@@ -0,0 +1,41 @@
/*
* Copyright 2026 QRun.IO, Inc.
* Licensed under the Apache License, Version 2.0 (see LICENSE).
*/
/**
* Repository lint: every TypeScript and script source carries the license header, and no file under
* packages/* /src imports from another package's src (only from its built entry point).
*
* Usage: node scripts/lint.mjs
*/
import { readdirSync, readFileSync, statSync } from 'node:fs'
import { join, relative } from 'node:path'
const HEADER = 'Copyright 2026 QRun.IO, Inc.'
const roots = ['packages/ui-api-client/src', 'packages/core/src', 'packages/conformance/src', 'packages/cli/src', 'scripts']
const problems = []
function walk(dir) {
for (const name of readdirSync(dir)) {
const path = join(dir, name)
if (name === 'node_modules' || name === 'dist') continue
if (statSync(path).isDirectory()) walk(path)
else if (/\.(ts|tsx|mjs|js)$/.test(name) && !name.endsWith('.d.ts') && name !== 'schema.ts' && name !== 'operations.ts') check(path)
}
}
function check(path) {
const text = readFileSync(path, 'utf8')
if (!text.slice(0, 400).includes(HEADER)) problems.push(`${relative('.', path)}: missing license header`)
const cross = text.match(/from '(\.\.\/)+(ui-api-client|core|conformance|cli)\/src\//)
if (cross) problems.push(`${relative('.', path)}: imports another package's src (${cross[0]}); import the package by name`)
}
for (const root of roots) walk(root)
if (problems.length) {
console.error(problems.join('\n'))
process.exit(1)
}
console.log('lint: ok')