ci: Correctly resolve the dirname in create-json-schema.ts on all platforms (#14433)

This commit is contained in:
RomanDavydchuk
2025-04-07 15:28:54 +03:00
committed by GitHub
parent 9f752016cd
commit ae8cbbba2e

View File

@@ -1,9 +1,10 @@
import { extensionManifestSchema } from '../src/schema';
import { zodToJsonSchema } from 'zod-to-json-schema';
import { writeFile } from 'fs/promises';
import { resolve } from 'path';
import { dirname, resolve } from 'path';
import { fileURLToPath } from 'url';
const __dirname = new URL('.', import.meta.url).pathname;
const __dirname = dirname(fileURLToPath(import.meta.url));
const rootDir = resolve(__dirname, '..');
const jsonSchema = zodToJsonSchema(extensionManifestSchema, {