removed uuid dependency from api package

This commit is contained in:
Jan Prochazka
2024-05-20 19:15:03 +02:00
parent 134d8d1b1a
commit 153f40f13e
18 changed files with 20 additions and 38 deletions

View File

@@ -1,7 +1,6 @@
const _ = require('lodash');
const path = require('path');
const fs = require('fs-extra');
const uuidv1 = require('uuid/v1');
const byline = require('byline');
const socket = require('../utility/socket');
const { fork } = require('child_process');
@@ -165,7 +164,7 @@ module.exports = {
start_meta: true,
async start({ script }) {
const runid = uuidv1();
const runid = crypto.randomUUID()
if (script.type == 'json') {
const js = jsonScriptToJavascript(script);
@@ -213,7 +212,7 @@ module.exports = {
loadReader_meta: true,
async loadReader({ functionName, props }) {
const promise = new Promise((resolve, reject) => {
const runid = uuidv1();
const runid = crypto.randomUUID();
this.requests[runid] = [resolve, reject];
this.startCore(runid, loaderScriptTemplate(functionName, props, runid));
});