mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
ci: Correctly resolve the dirname in create-json-schema.ts on all platforms (#14433)
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
import { extensionManifestSchema } from '../src/schema';
|
import { extensionManifestSchema } from '../src/schema';
|
||||||
import { zodToJsonSchema } from 'zod-to-json-schema';
|
import { zodToJsonSchema } from 'zod-to-json-schema';
|
||||||
import { writeFile } from 'fs/promises';
|
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 rootDir = resolve(__dirname, '..');
|
||||||
|
|
||||||
const jsonSchema = zodToJsonSchema(extensionManifestSchema, {
|
const jsonSchema = zodToJsonSchema(extensionManifestSchema, {
|
||||||
|
|||||||
Reference in New Issue
Block a user