mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
feat(API): Add route for schema static files (#12770)
This commit is contained in:
@@ -6,13 +6,18 @@ const { cp } = require('fs/promises');
|
||||
const { packageDir } = require('./common');
|
||||
|
||||
const limiter = pLimit(20);
|
||||
const icons = glob.sync('{nodes,credentials}/**/*.{png,svg}', { cwd: packageDir });
|
||||
const staticFiles = glob.sync(
|
||||
['{nodes,credentials}/**/*.{png,svg}', 'nodes/**/__schema__/**/*.json'],
|
||||
{
|
||||
cwd: packageDir,
|
||||
},
|
||||
);
|
||||
|
||||
(async () => {
|
||||
await Promise.all(
|
||||
icons.map((icon) =>
|
||||
staticFiles.map((path) =>
|
||||
limiter(() => {
|
||||
return cp(icon, `dist/${icon}`, { recursive: true });
|
||||
return cp(path, `dist/${path}`, { recursive: true });
|
||||
}),
|
||||
),
|
||||
);
|
||||
Reference in New Issue
Block a user