mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(API): Add route for schema static files (#12770)
This commit is contained in:
24
packages/core/bin/copy-static-files
Executable file
24
packages/core/bin/copy-static-files
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const glob = require('fast-glob');
|
||||
const pLimit = require('p-limit');
|
||||
const { cp } = require('fs/promises');
|
||||
const { packageDir } = require('./common');
|
||||
|
||||
const limiter = pLimit(20);
|
||||
const staticFiles = glob.sync(
|
||||
['{nodes,credentials}/**/*.{png,svg}', 'nodes/**/__schema__/**/*.json'],
|
||||
{
|
||||
cwd: packageDir,
|
||||
},
|
||||
);
|
||||
|
||||
(async () => {
|
||||
await Promise.all(
|
||||
staticFiles.map((path) =>
|
||||
limiter(() => {
|
||||
return cp(path, `dist/${path}`, { recursive: true });
|
||||
}),
|
||||
),
|
||||
);
|
||||
})();
|
||||
Reference in New Issue
Block a user