New:Socket for Asana Is Now Available.Learn more
Get Started

@uipath/flow-tool

Package Overview
Dependencies
Maintainers
25
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uipath/flow-tool - npm Package Compare versions

Comparing version
1.200.0-preview.126
to
1.200.0-preview.129
dist/node-w9m3vrsn.js

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

+95
import {
VALID_PROJECT_NAME_REGEX,
catchError,
ensureProjectArtifacts,
nodeModuleRegistry,
prepareProjectLocation,
tryRegisterProjectInParentSolution,
writeFlowWorkflow
} from "./packager-tool-vrhnp8ra.js";
import {
getFileSystem
} from "./packager-tool-4f38v0ry.js";
import {
createWorkflow
} from "./packager-tool-4av2ztpm.js";
// src/services/flow-init-service.ts
var safeMkdir = async (fs, dir) => {
const [err] = await catchError(fs.mkdir(dir));
if (err && !(("code" in err) && err.code === "EEXIST")) {
throw err;
}
};
async function flowInitAsync(name, options = {}) {
if (!VALID_PROJECT_NAME_REGEX.test(name)) {
throw new Error(`Invalid project name "${name}". Name can only contain letters, numbers, underscores (_), and hyphens (-).`);
}
const fs = getFileSystem();
const baseDir = options.cwd ?? ".";
const { projectDir, autoCreatedSolution } = await prepareProjectLocation(fs, fs.path.resolve(baseDir, name), name, { skipRegistration: options.skipRegistration });
const [statError] = await catchError(fs.stat(projectDir));
const projectDirExists = !statError;
if (statError && !(("code" in statError) && (statError.code === "ENOENT" || statError.code === "PathNotFound"))) {
throw statError;
}
if (projectDirExists && !options.force) {
const existingEntries = await fs.readdir(projectDir);
if (existingEntries.length > 0) {
throw new Error(`Directory "${name}" already exists and is not empty. Use --force to overwrite.`);
}
}
await safeMkdir(fs, projectDir);
const triggerManifest = nodeModuleRegistry["core.trigger.manual"].latest;
const flowId = crypto.randomUUID();
const workflow = createWorkflow({
id: flowId,
name,
triggerManifest
});
const projectUiproj = {
Name: name,
ProjectType: "Flow"
};
await fs.writeFile(fs.path.join(projectDir, "project.uiproj"), `${JSON.stringify(projectUiproj, null, 2)}
`);
const flowFile = fs.path.join(projectDir, `${name}.flow`);
await writeFlowWorkflow(flowFile, workflow);
const operateJson = {
$schema: "https://cloud.uipath.com/draft/2024-12/operate",
projectId: flowId,
contentType: "Flow",
targetFramework: "Portable",
runtimeOptions: {
requiresUserInteraction: false,
isAttended: false
}
};
await fs.writeFile(fs.path.join(projectDir, "operate.json"), `${JSON.stringify(operateJson, null, 2)}
`);
const registration = await tryRegisterProjectInParentSolution(fs, projectDir, { skipRegistration: options.skipRegistration });
const projectArtifacts = await maybeGenerateProjectArtifacts(registration, name);
return {
projectName: name,
projectDir,
flowFile,
registration,
autoCreatedSolution,
projectArtifacts
};
}
async function maybeGenerateProjectArtifacts(registration, projectName) {
if (registration.Status !== "Registered" && registration.Status !== "AlreadyRegistered" || !registration.Solution || !registration.ProjectId) {
return;
}
const fs = getFileSystem();
return ensureProjectArtifacts({
solutionDir: fs.path.dirname(registration.Solution),
projectId: registration.ProjectId,
projectName,
projectType: "Flow"
});
}
export { flowInitAsync };
//# debugId=EB798ABBF0A2006664756E2164756E21

Sorry, the diff of this file is too big to display

import {
toolsFactoryRepository
} from "./packager-tool-7yjpwj92.js";
import {
FlowToolFactory
} from "./packager-tool-4av2ztpm.js";
// src/packager-tool.ts
function registerPackagerFactories() {
toolsFactoryRepository.registerProjectToolFactory(new FlowToolFactory);
}
export { registerPackagerFactories };
//# debugId=2A70E30168B92A8A64756E2164756E21

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

+6
-6

@@ -5,14 +5,14 @@ #!/usr/bin/env node

registerCommands
} from "./packager-tool-g39b45dt.js";
import"./packager-tool-wy442sjw.js";
import"./packager-tool-d7gszbm5.js";
import"./packager-tool-pfxc9zg3.js";
} from "./packager-tool-pfbb9405.js";
import"./packager-tool-r4q0k9ch.js";
import"./packager-tool-mvck1a0h.js";
import"./packager-tool-x5v0memb.js";
import"./packager-tool-7yjpwj92.js";
import {
Command
} from "./packager-tool-xfk9kfjw.js";
} from "./packager-tool-vrhnp8ra.js";
import"./packager-tool-9qecd4wb.js";
import"./packager-tool-4f38v0ry.js";
import"./packager-tool-1ps2qeqg.js";
import"./packager-tool-4snc5wmt.js";
import"./packager-tool-4av2ztpm.js";
import"./packager-tool-kgkv7f24.js";

@@ -19,0 +19,0 @@ import"./packager-tool-ek2dnj9h.js";

import {
flowInitAsync
} from "./packager-tool-d7gszbm5.js";
import"./packager-tool-xfk9kfjw.js";
} from "./packager-tool-mvck1a0h.js";
import"./packager-tool-vrhnp8ra.js";
import"./packager-tool-9qecd4wb.js";
import"./packager-tool-4f38v0ry.js";
import"./packager-tool-1ps2qeqg.js";
import"./packager-tool-4snc5wmt.js";
import"./packager-tool-4av2ztpm.js";
import"./packager-tool-kgkv7f24.js";

@@ -10,0 +10,0 @@ import"./packager-tool-ek2dnj9h.js";

import {
registerPackagerFactories
} from "./packager-tool-wy442sjw.js";
} from "./packager-tool-r4q0k9ch.js";
import"./packager-tool-7yjpwj92.js";
import"./packager-tool-4snc5wmt.js";
import"./packager-tool-4av2ztpm.js";
import"./packager-tool-kgkv7f24.js";

@@ -7,0 +7,0 @@ import"./packager-tool-ek2dnj9h.js";

import {
metadata,
registerCommands
} from "./packager-tool-g39b45dt.js";
import"./packager-tool-wy442sjw.js";
import"./packager-tool-d7gszbm5.js";
import"./packager-tool-pfxc9zg3.js";
} from "./packager-tool-pfbb9405.js";
import"./packager-tool-r4q0k9ch.js";
import"./packager-tool-mvck1a0h.js";
import"./packager-tool-x5v0memb.js";
import"./packager-tool-7yjpwj92.js";
import"./packager-tool-xfk9kfjw.js";
import"./packager-tool-vrhnp8ra.js";
import"./packager-tool-9qecd4wb.js";
import"./packager-tool-4f38v0ry.js";
import"./packager-tool-1ps2qeqg.js";
import"./packager-tool-4snc5wmt.js";
import"./packager-tool-4av2ztpm.js";
import"./packager-tool-kgkv7f24.js";

@@ -15,0 +15,0 @@ import"./packager-tool-ek2dnj9h.js";

import {
FlowValidateService,
connectorNodeValidator
} from "./packager-tool-pfxc9zg3.js";
} from "./packager-tool-x5v0memb.js";
import"./packager-tool-7yjpwj92.js";
import"./packager-tool-xfk9kfjw.js";
import"./packager-tool-vrhnp8ra.js";
import"./packager-tool-9qecd4wb.js";
import"./packager-tool-4f38v0ry.js";
import"./packager-tool-1ps2qeqg.js";
import"./packager-tool-4snc5wmt.js";
import"./packager-tool-4av2ztpm.js";
import"./packager-tool-kgkv7f24.js";

@@ -12,0 +12,0 @@ import"./packager-tool-ek2dnj9h.js";

{
"name": "@uipath/flow-tool",
"license": "MIT",
"version": "1.200.0-preview.126",
"version": "1.200.0-preview.129",
"description": "Create, debug, and run UiPath Flow projects and jobs.",

@@ -38,3 +38,3 @@ "private": false,

],
"gitHead": "c2f816a61073d9668c4a3f4e80999de71f417818"
"gitHead": "0d1695ec4c5fc5ebe38a4bd0f92d61e7884fcfb1"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

import {
VALID_PROJECT_NAME_REGEX,
catchError,
ensureProjectArtifacts,
nodeModuleRegistry,
prepareProjectLocation,
tryRegisterProjectInParentSolution,
writeFlowWorkflow
} from "./packager-tool-xfk9kfjw.js";
import {
getFileSystem
} from "./packager-tool-4f38v0ry.js";
import {
createWorkflow
} from "./packager-tool-4snc5wmt.js";
// src/services/flow-init-service.ts
var safeMkdir = async (fs, dir) => {
const [err] = await catchError(fs.mkdir(dir));
if (err && !(("code" in err) && err.code === "EEXIST")) {
throw err;
}
};
async function flowInitAsync(name, options = {}) {
if (!VALID_PROJECT_NAME_REGEX.test(name)) {
throw new Error(`Invalid project name "${name}". Name can only contain letters, numbers, underscores (_), and hyphens (-).`);
}
const fs = getFileSystem();
const baseDir = options.cwd ?? ".";
const { projectDir, autoCreatedSolution } = await prepareProjectLocation(fs, fs.path.resolve(baseDir, name), name, { skipRegistration: options.skipRegistration });
const [statError] = await catchError(fs.stat(projectDir));
const projectDirExists = !statError;
if (statError && !(("code" in statError) && (statError.code === "ENOENT" || statError.code === "PathNotFound"))) {
throw statError;
}
if (projectDirExists && !options.force) {
const existingEntries = await fs.readdir(projectDir);
if (existingEntries.length > 0) {
throw new Error(`Directory "${name}" already exists and is not empty. Use --force to overwrite.`);
}
}
await safeMkdir(fs, projectDir);
const triggerManifest = nodeModuleRegistry["core.trigger.manual"].latest;
const flowId = crypto.randomUUID();
const workflow = createWorkflow({
id: flowId,
name,
triggerManifest
});
const projectUiproj = {
Name: name,
ProjectType: "Flow"
};
await fs.writeFile(fs.path.join(projectDir, "project.uiproj"), `${JSON.stringify(projectUiproj, null, 2)}
`);
const flowFile = fs.path.join(projectDir, `${name}.flow`);
await writeFlowWorkflow(flowFile, workflow);
const operateJson = {
$schema: "https://cloud.uipath.com/draft/2024-12/operate",
projectId: flowId,
contentType: "Flow",
targetFramework: "Portable",
runtimeOptions: {
requiresUserInteraction: false,
isAttended: false
}
};
await fs.writeFile(fs.path.join(projectDir, "operate.json"), `${JSON.stringify(operateJson, null, 2)}
`);
const registration = await tryRegisterProjectInParentSolution(fs, projectDir, { skipRegistration: options.skipRegistration });
const projectArtifacts = await maybeGenerateProjectArtifacts(registration, name);
return {
projectName: name,
projectDir,
flowFile,
registration,
autoCreatedSolution,
projectArtifacts
};
}
async function maybeGenerateProjectArtifacts(registration, projectName) {
if (registration.Status !== "Registered" && registration.Status !== "AlreadyRegistered" || !registration.Solution || !registration.ProjectId) {
return;
}
const fs = getFileSystem();
return ensureProjectArtifacts({
solutionDir: fs.path.dirname(registration.Solution),
projectId: registration.ProjectId,
projectName,
projectType: "Flow"
});
}
export { flowInitAsync };
//# debugId=EB798ABBF0A2006664756E2164756E21

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

import {
toolsFactoryRepository
} from "./packager-tool-7yjpwj92.js";
import {
FlowToolFactory
} from "./packager-tool-4snc5wmt.js";
// src/packager-tool.ts
function registerPackagerFactories() {
toolsFactoryRepository.registerProjectToolFactory(new FlowToolFactory);
}
export { registerPackagerFactories };
//# debugId=2A70E30168B92A8A64756E2164756E21

Sorry, the diff of this file is too big to display