Files
docs/scripts/update-stackblitz-versions.ts
zooqueenandHanzo Dev 685c94fd09
Hanzo CI/CD / test (linux-arm64) (push) Skipped
Hanzo CI/CD / test (linux-amd64) (push) Skipped
Hanzo CI/CD / test-advisory (push) Skipped
Release / Release (push) Failing after 3m46s
Hanzo CI/CD / test-amd64 (push) Failing after 5m53s
Hanzo CI/CD / cicd (push) Skipped
Hanzo CI/CD / verify (push) Skipped
Deploy Zen Docs / deploy (push) Failing after 6m11s
CI/CD / cicd (push) Failing after 5m56s
Deploy ZT Docs / deploy (push) Failing after 5m26s
Deploy Cloud Landing Page / deploy (push) Failing after 6m38s
Deploy Base Docs / deploy (push) Failing after 7m3s
Deploy Insights Docs / deploy (push) Failing after 9m13s
Deploy Bootnode Docs / deploy (push) Failing after 10m32s
Deploy Dev Docs / deploy (push) Failing after 10m56s
Deploy Bot Docs / deploy (push) Failing after 17m41s
refactor(ts): standardize scripts, helpers, and Next configs to .ts
Co-authored-by: Hanzo Dev <[email protected]>
2026-11-10 18:49:10 -08:00

31 lines
984 B
TypeScript

/**
* Update template for StackBlitz
*/
import { readFileSync, writeFileSync } from 'node:fs';
import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';
const root = join(dirname(fileURLToPath(import.meta.url)), '..');
const packageDirs: Record<string, string> = {
'@hanzo/docs-core': 'packages/core',
'@hanzo/docs-mdx': 'packages/mdx',
'@hanzo/docs-ui': 'packages/radix-ui',
};
const stackblitzPath = join(root, 'examples/stackblitz/package.json');
const stackblitz = JSON.parse(readFileSync(stackblitzPath, 'utf8')) as {
dependencies?: Record<string, string>;
};
for (const [name, dir] of Object.entries(packageDirs)) {
if (!stackblitz.dependencies || !(name in stackblitz.dependencies)) continue;
const { version } = JSON.parse(readFileSync(join(root, dir, 'package.json'), 'utf8')) as {
version: string;
};
stackblitz.dependencies[name] = version;
}
writeFileSync(stackblitzPath, `${JSON.stringify(stackblitz, null, 2)}\n`);