Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
+8
-8
@@ -1,15 +1,15 @@
|
||||
#!/usr/bin/env tsx
|
||||
/**
|
||||
* generate-spec — capture the boilerplate's OpenAPI document into a local file.
|
||||
* generate-spec — capture the HiveGrid OpenAPI document into a local file.
|
||||
*
|
||||
* Invokes the headless `createOpenApiDocument` factory from `@toolctrl/api` and
|
||||
* Invokes the headless `createOpenApiDocument` factory from `@hivegrid/api` and
|
||||
* writes the result to `packages/api-client-ts/openapi.json`. This file feeds
|
||||
* `@hey-api/openapi-ts` (see `openapi-ts.config.ts`) which then regenerates
|
||||
* `src/generated/`.
|
||||
*
|
||||
* Usage:
|
||||
* pnpm --filter @toolctrl/api-client-ts generate-spec
|
||||
* pnpm --filter @toolctrl/api-client-ts generate-spec -- --check
|
||||
* pnpm --filter @hivegrid/api-client-ts generate-spec
|
||||
* pnpm --filter @hivegrid/api-client-ts generate-spec -- --check
|
||||
*
|
||||
* `--check` re-runs the generation and exits non-zero if the on-disk
|
||||
* `openapi.json` would change — useful as a CI drift gate.
|
||||
@@ -21,7 +21,7 @@ import { writeFileSync, readFileSync, existsSync } from "node:fs";
|
||||
import { dirname, resolve } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
import { createOpenApiDocument } from "@toolctrl/api/openapi";
|
||||
import { createOpenApiDocument } from "@hivegrid/api/openapi";
|
||||
|
||||
const here = dirname(fileURLToPath(import.meta.url));
|
||||
const outputPath = resolve(here, "..", "openapi.json");
|
||||
@@ -30,7 +30,7 @@ function buildSpec(): string {
|
||||
const document = createOpenApiDocument({
|
||||
routing: {
|
||||
protocol: "https",
|
||||
apiHost: "api.toolctrl.de",
|
||||
apiHost: "api.hivegrid.de",
|
||||
} as never,
|
||||
});
|
||||
return `${JSON.stringify(document, null, 2)}\n`;
|
||||
@@ -42,14 +42,14 @@ function main(): void {
|
||||
|
||||
if (checkMode) {
|
||||
if (!existsSync(outputPath)) {
|
||||
process.stderr.write(`openapi.json missing at ${outputPath} — run \`pnpm --filter @toolctrl/api-client-ts generate-spec\`.\n`);
|
||||
process.stderr.write(`openapi.json missing at ${outputPath} — run \`pnpm --filter @hivegrid/api-client-ts generate-spec\`.\n`);
|
||||
process.exit(1);
|
||||
}
|
||||
const current = readFileSync(outputPath, "utf8");
|
||||
if (current !== next) {
|
||||
process.stderr.write(
|
||||
`openapi.json is stale — the upstream OpenAPI document has changed.\n` +
|
||||
`Run \`pnpm --filter @toolctrl/api-client-ts generate:all\` and commit the result.\n`,
|
||||
`Run \`pnpm --filter @hivegrid/api-client-ts generate:all\` and commit the result.\n`,
|
||||
);
|
||||
process.exit(2);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user