@uipath/solution-tool 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tool.js +612 -276
- package/package.json +3 -3
package/dist/tool.js
CHANGED
|
@@ -39194,7 +39194,7 @@ toolsFactoryRepository5.registerProjectToolFactory(new FunctionsToolFactory);
|
|
|
39194
39194
|
// package.json
|
|
39195
39195
|
var package_default = {
|
|
39196
39196
|
name: "@uipath/solution-tool",
|
|
39197
|
-
version: "0.1.
|
|
39197
|
+
version: "0.1.12",
|
|
39198
39198
|
description: "Create, pack, publish, and deploy UiPath Automation Solutions.",
|
|
39199
39199
|
repository: {
|
|
39200
39200
|
type: "git",
|
|
@@ -39225,7 +39225,7 @@ var package_default = {
|
|
|
39225
39225
|
"vlad-uipath"
|
|
39226
39226
|
],
|
|
39227
39227
|
scripts: {
|
|
39228
|
-
build: "bun build
|
|
39228
|
+
build: "bun ../../tools/build-tool.ts",
|
|
39229
39229
|
package: "bun run build && bun pm pack",
|
|
39230
39230
|
lint: "biome check .",
|
|
39231
39231
|
"lint:fix": "biome check --write ."
|
|
@@ -39236,7 +39236,7 @@ var package_default = {
|
|
|
39236
39236
|
peerDependencies: {
|
|
39237
39237
|
"@uipath/solutionpackager-tool-core": "workspace:*",
|
|
39238
39238
|
commander: "^14.0.3",
|
|
39239
|
-
"@uipath/common": "^0.1.
|
|
39239
|
+
"@uipath/common": "^0.1.13",
|
|
39240
39240
|
"@uipath/auth": "^0.1.9",
|
|
39241
39241
|
"@uipath/filesystem": "^0.1.6"
|
|
39242
39242
|
},
|
|
@@ -41507,7 +41507,7 @@ var TERMINAL_STATUSES = new Set([
|
|
|
41507
41507
|
"FailedActivate"
|
|
41508
41508
|
]);
|
|
41509
41509
|
var registerDeployActivateCommand = (program) => {
|
|
41510
|
-
program.command("activate").description("Activate a deployed solution that was deployed without auto-activation. Activation provisions all solution components.").argument("<deployment-name>", "Name of the deployment to activate").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth)").option("--timeout <seconds>", "Timeout in seconds for activation polling (default: 360)", (v) => parseInt(v, 10), 360).option("--poll-interval <ms>", "Milliseconds between activation status polls (default: 5000)", (v) => parseInt(v, 10), 5000).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext3, async (deploymentName, options) => {
|
|
41510
|
+
program.command("activate").description("Activate a deployed solution that was deployed without auto-activation. Activation provisions all solution components.").argument("<deployment-name>", "Name of the deployment to activate. Use 'solution deploy list' to find deployment names.").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth)").option("--timeout <seconds>", "Timeout in seconds for activation polling (default: 360)", (v) => parseInt(v, 10), 360).option("--poll-interval <ms>", "Milliseconds between activation status polls (default: 5000)", (v) => parseInt(v, 10), 5000).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext3, async (deploymentName, options) => {
|
|
41511
41511
|
const [authError, auth] = await catchError4(getSolutionAuthContext({
|
|
41512
41512
|
tenant: options.tenant,
|
|
41513
41513
|
loginValidity: options.loginValidity
|
|
@@ -41604,7 +41604,7 @@ var registerDeployActivateCommand = (program) => {
|
|
|
41604
41604
|
});
|
|
41605
41605
|
};
|
|
41606
41606
|
|
|
41607
|
-
// src/commands/deploy-config.ts
|
|
41607
|
+
// src/commands/deploy-config-get.ts
|
|
41608
41608
|
import {
|
|
41609
41609
|
catchError as catchError5,
|
|
41610
41610
|
extractErrorDetails as extractErrorDetails3,
|
|
@@ -41612,8 +41612,8 @@ import {
|
|
|
41612
41612
|
processContext as processContext4
|
|
41613
41613
|
} from "@uipath/common";
|
|
41614
41614
|
import { getFileSystem as getFileSystem3 } from "@uipath/filesystem";
|
|
41615
|
-
var
|
|
41616
|
-
program.command("
|
|
41615
|
+
var registerDeployConfigGetCommand = (program) => {
|
|
41616
|
+
program.command("get").description("Fetch the default deployment configuration for a published solution package. The config lists all resources (assets, queues, processes, etc.) and their default settings. Save to a file with -d, then customize with 'config set' or 'config link' before deploying with 'deploy run --config-file'.").argument("<package-name>", "Solution package name. Use 'solution packages list' to find available names.").option("--package-version <version>", "Package version (optional, latest if omitted)").option("-d, --destination <path>", "Write configuration to a file instead of stdout").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth)").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext4, async (packageName, options) => {
|
|
41617
41617
|
const [authError, auth] = await catchError5(getSolutionAuthContext({
|
|
41618
41618
|
tenant: options.tenant,
|
|
41619
41619
|
loginValidity: options.loginValidity
|
|
@@ -41622,7 +41622,7 @@ var registerDeployConfigCommand = (program) => {
|
|
|
41622
41622
|
OutputFormatter4.error({
|
|
41623
41623
|
Result: "Failure",
|
|
41624
41624
|
Message: authError.message,
|
|
41625
|
-
Instructions:
|
|
41625
|
+
Instructions: "Run 'uip auth login' to authenticate."
|
|
41626
41626
|
});
|
|
41627
41627
|
processContext4.exit(1);
|
|
41628
41628
|
return;
|
|
@@ -41682,12 +41682,348 @@ var registerDeployConfigCommand = (program) => {
|
|
|
41682
41682
|
});
|
|
41683
41683
|
};
|
|
41684
41684
|
|
|
41685
|
+
// src/commands/deploy-config-link.ts
|
|
41686
|
+
import { OutputFormatter as OutputFormatter5, processContext as processContext5 } from "@uipath/common";
|
|
41687
|
+
|
|
41688
|
+
// src/commands/deploy-config-utils.ts
|
|
41689
|
+
import { catchError as catchError6 } from "@uipath/common";
|
|
41690
|
+
import { getFileSystem as getFileSystem4 } from "@uipath/filesystem";
|
|
41691
|
+
async function readConfigFile(filePath) {
|
|
41692
|
+
const fs = getFileSystem4();
|
|
41693
|
+
const resolvedPath = fs.path.resolve(filePath);
|
|
41694
|
+
const [readError, rawContent] = await catchError6(fs.readFile(resolvedPath, "utf-8"));
|
|
41695
|
+
if (readError || !rawContent) {
|
|
41696
|
+
return [
|
|
41697
|
+
readError ?? new Error(`Config file is empty: ${resolvedPath}`),
|
|
41698
|
+
null
|
|
41699
|
+
];
|
|
41700
|
+
}
|
|
41701
|
+
const [parseError, config3] = catchError6(() => JSON.parse(rawContent));
|
|
41702
|
+
if (parseError) {
|
|
41703
|
+
return [
|
|
41704
|
+
new Error(`Invalid JSON in config file: ${parseError.message}`),
|
|
41705
|
+
null
|
|
41706
|
+
];
|
|
41707
|
+
}
|
|
41708
|
+
if (!config3.resources || !Array.isArray(config3.resources)) {
|
|
41709
|
+
return [
|
|
41710
|
+
new Error("Invalid config file: missing or invalid 'resources' array"),
|
|
41711
|
+
null
|
|
41712
|
+
];
|
|
41713
|
+
}
|
|
41714
|
+
return [null, { config: config3, resolvedPath }];
|
|
41715
|
+
}
|
|
41716
|
+
function findResource(config3, identifier) {
|
|
41717
|
+
const nameMatches = config3.resources.filter((r) => r.name === identifier);
|
|
41718
|
+
if (nameMatches.length === 1) {
|
|
41719
|
+
return { resource: nameMatches[0], error: null };
|
|
41720
|
+
}
|
|
41721
|
+
if (nameMatches.length > 1) {
|
|
41722
|
+
return { resource: null, error: "duplicate" };
|
|
41723
|
+
}
|
|
41724
|
+
const keyMatch = config3.resources.find((r) => r.resourceKey === identifier);
|
|
41725
|
+
if (keyMatch) {
|
|
41726
|
+
return { resource: keyMatch, error: null };
|
|
41727
|
+
}
|
|
41728
|
+
return { resource: null, error: "not_found" };
|
|
41729
|
+
}
|
|
41730
|
+
function resourceErrorMessage(identifier, findResult, config3) {
|
|
41731
|
+
if (findResult.error === "duplicate") {
|
|
41732
|
+
const dupes = config3.resources.filter((r) => r.name === identifier).map((r) => `${r.resourceKey} (${r.kind})`).join(", ");
|
|
41733
|
+
return {
|
|
41734
|
+
Message: `Multiple resources named '${identifier}' found in config`,
|
|
41735
|
+
Instructions: `Use resourceKey instead to target a specific one: ${dupes}`
|
|
41736
|
+
};
|
|
41737
|
+
}
|
|
41738
|
+
const available = config3.resources.map((r) => `${r.name} (${r.kind})`).join(", ");
|
|
41739
|
+
return {
|
|
41740
|
+
Message: `Resource '${identifier}' not found in config`,
|
|
41741
|
+
Instructions: `Available resources: ${available}`
|
|
41742
|
+
};
|
|
41743
|
+
}
|
|
41744
|
+
async function writeConfigFile(filePath, config3) {
|
|
41745
|
+
const fs = getFileSystem4();
|
|
41746
|
+
const [writeError] = await catchError6(fs.writeFile(filePath, `${JSON.stringify(config3, null, 2)}
|
|
41747
|
+
`));
|
|
41748
|
+
return writeError;
|
|
41749
|
+
}
|
|
41750
|
+
var TOP_LEVEL_FIELDS = new Set(["conflictFixingAction"]);
|
|
41751
|
+
function isTopLevelField(property) {
|
|
41752
|
+
return TOP_LEVEL_FIELDS.has(property);
|
|
41753
|
+
}
|
|
41754
|
+
function getAvailableProperties(resource) {
|
|
41755
|
+
const topLevel = [...TOP_LEVEL_FIELDS];
|
|
41756
|
+
const configKeys = Object.keys(resource.configuration ?? {});
|
|
41757
|
+
return [...topLevel, ...configKeys].join(", ");
|
|
41758
|
+
}
|
|
41759
|
+
function parseConfigValue(raw, existingValue) {
|
|
41760
|
+
if (raw === "null")
|
|
41761
|
+
return null;
|
|
41762
|
+
if (raw === "true")
|
|
41763
|
+
return true;
|
|
41764
|
+
if (raw === "false")
|
|
41765
|
+
return false;
|
|
41766
|
+
if (typeof existingValue === "string")
|
|
41767
|
+
return raw;
|
|
41768
|
+
const num = Number(raw);
|
|
41769
|
+
if (!Number.isNaN(num) && raw.trim() !== "")
|
|
41770
|
+
return num;
|
|
41771
|
+
return raw;
|
|
41772
|
+
}
|
|
41773
|
+
|
|
41774
|
+
// src/commands/deploy-config-link.ts
|
|
41775
|
+
var registerDeployConfigLinkCommand = (program) => {
|
|
41776
|
+
program.command("link").description("Link a solution resource to an existing resource in Orchestrator instead of creating a new one during deployment. Example: 'config link config.json MyQueue --name ProductionQueue --folder-path Shared/Production'. Changes are local — pass the file to 'deploy run --config-file' to apply them.").argument("<file>", "Path to the deploy config JSON file. Generate one with 'solution deploy config get <package> -d config.json'.").argument("<resource>", "Resource name or resourceKey from the config file. Open the config JSON to see available resource names.").requiredOption("-n, --name <name>", "Name of the existing Orchestrator resource to link to. Use 'uip resources <kind> list' to find existing resources.").option("--folder-path <path>", "Orchestrator folder path where the existing resource lives. Use 'uip folders list' to see available folders.").trackedAction(processContext5, async (file3, resource, options) => {
|
|
41777
|
+
const [readError, result] = await readConfigFile(file3);
|
|
41778
|
+
if (readError) {
|
|
41779
|
+
OutputFormatter5.error({
|
|
41780
|
+
Result: "Failure",
|
|
41781
|
+
Message: readError.message,
|
|
41782
|
+
Instructions: "Provide a valid path to a deploy config JSON file."
|
|
41783
|
+
});
|
|
41784
|
+
processContext5.exit(1);
|
|
41785
|
+
return;
|
|
41786
|
+
}
|
|
41787
|
+
const findResult = findResource(result.config, resource);
|
|
41788
|
+
if (findResult.error) {
|
|
41789
|
+
const errMsg = resourceErrorMessage(resource, findResult, result.config);
|
|
41790
|
+
OutputFormatter5.error({
|
|
41791
|
+
Result: "Failure",
|
|
41792
|
+
...errMsg
|
|
41793
|
+
});
|
|
41794
|
+
processContext5.exit(1);
|
|
41795
|
+
return;
|
|
41796
|
+
}
|
|
41797
|
+
const target = findResult.resource;
|
|
41798
|
+
const linkToResource = {
|
|
41799
|
+
name: options.name
|
|
41800
|
+
};
|
|
41801
|
+
if (options.folderPath) {
|
|
41802
|
+
linkToResource.folderPath = options.folderPath;
|
|
41803
|
+
}
|
|
41804
|
+
target.linkToResource = linkToResource;
|
|
41805
|
+
const writeError = await writeConfigFile(result.resolvedPath, result.config);
|
|
41806
|
+
if (writeError) {
|
|
41807
|
+
OutputFormatter5.error({
|
|
41808
|
+
Result: "Failure",
|
|
41809
|
+
Message: `Failed to write config: ${writeError.message}`,
|
|
41810
|
+
Instructions: writeError.message
|
|
41811
|
+
});
|
|
41812
|
+
processContext5.exit(1);
|
|
41813
|
+
return;
|
|
41814
|
+
}
|
|
41815
|
+
OutputFormatter5.success({
|
|
41816
|
+
Result: "Success",
|
|
41817
|
+
Code: "DeployConfigLink",
|
|
41818
|
+
Data: {
|
|
41819
|
+
Resource: target.name,
|
|
41820
|
+
LinkedTo: linkToResource
|
|
41821
|
+
}
|
|
41822
|
+
});
|
|
41823
|
+
});
|
|
41824
|
+
};
|
|
41825
|
+
var registerDeployConfigUnlinkCommand = (program) => {
|
|
41826
|
+
program.command("unlink").description("Remove a resource link from the config file. On the next 'deploy run --config-file', the resource will be unlinked from the existing Orchestrator resource and a new one will be created instead.").argument("<file>", "Path to the deploy config JSON file. Generate one with 'solution deploy config get <package> -d config.json'.").argument("<resource>", "Resource name or resourceKey from the config file. Open the config JSON to see available resource names and their current links.").trackedAction(processContext5, async (file3, resource) => {
|
|
41827
|
+
const [readError, result] = await readConfigFile(file3);
|
|
41828
|
+
if (readError) {
|
|
41829
|
+
OutputFormatter5.error({
|
|
41830
|
+
Result: "Failure",
|
|
41831
|
+
Message: readError.message,
|
|
41832
|
+
Instructions: "Provide a valid path to a deploy config JSON file."
|
|
41833
|
+
});
|
|
41834
|
+
processContext5.exit(1);
|
|
41835
|
+
return;
|
|
41836
|
+
}
|
|
41837
|
+
const findResult = findResource(result.config, resource);
|
|
41838
|
+
if (findResult.error) {
|
|
41839
|
+
const errMsg = resourceErrorMessage(resource, findResult, result.config);
|
|
41840
|
+
OutputFormatter5.error({
|
|
41841
|
+
Result: "Failure",
|
|
41842
|
+
...errMsg
|
|
41843
|
+
});
|
|
41844
|
+
processContext5.exit(1);
|
|
41845
|
+
return;
|
|
41846
|
+
}
|
|
41847
|
+
const target = findResult.resource;
|
|
41848
|
+
if (!target.linkToResource) {
|
|
41849
|
+
OutputFormatter5.error({
|
|
41850
|
+
Result: "Failure",
|
|
41851
|
+
Message: `Resource '${target.name}' is not linked to any Orchestrator resource`,
|
|
41852
|
+
Instructions: "Use 'solution deploy config link' to create a link first."
|
|
41853
|
+
});
|
|
41854
|
+
processContext5.exit(1);
|
|
41855
|
+
return;
|
|
41856
|
+
}
|
|
41857
|
+
const previousLink = target.linkToResource;
|
|
41858
|
+
delete target.linkToResource;
|
|
41859
|
+
const writeError = await writeConfigFile(result.resolvedPath, result.config);
|
|
41860
|
+
if (writeError) {
|
|
41861
|
+
OutputFormatter5.error({
|
|
41862
|
+
Result: "Failure",
|
|
41863
|
+
Message: `Failed to write config: ${writeError.message}`,
|
|
41864
|
+
Instructions: writeError.message
|
|
41865
|
+
});
|
|
41866
|
+
processContext5.exit(1);
|
|
41867
|
+
return;
|
|
41868
|
+
}
|
|
41869
|
+
OutputFormatter5.success({
|
|
41870
|
+
Result: "Success",
|
|
41871
|
+
Code: "DeployConfigUnlink",
|
|
41872
|
+
Data: {
|
|
41873
|
+
Resource: target.name,
|
|
41874
|
+
UnlinkedFrom: previousLink.name
|
|
41875
|
+
}
|
|
41876
|
+
});
|
|
41877
|
+
});
|
|
41878
|
+
};
|
|
41879
|
+
|
|
41880
|
+
// src/commands/deploy-config-set.ts
|
|
41881
|
+
import { OutputFormatter as OutputFormatter6, processContext as processContext6 } from "@uipath/common";
|
|
41882
|
+
var registerDeployConfigSetCommand = (program) => {
|
|
41883
|
+
program.command("set").description("Set a property on a resource in a deploy config file. Examples: 'config set config.json MyQueue maxNumberOfRetries 5' to set a resource property, 'config set config.json MyQueue conflictFixingAction UseExisting' to set conflict resolution, 'config set config.json --all conflictFixingAction UseExisting' to set on all resources. Changes are local — pass the file to 'deploy run --config-file' to apply them.").argument("<file>", "Path to the deploy config JSON file. Generate one with 'solution deploy config get <package> -d config.json'.").argument("<args...>", "Without --all: <resource> <property> <value>. With --all: <property> <value>. Resource names and property names are listed in the config file. Example: MyQueue maxNumberOfRetries 5").option("--all", "Apply to all resources in the config. Only works with conflictFixingAction. Example: --all conflictFixingAction UseExisting").trackedAction(processContext6, async (file3, args, options) => {
|
|
41884
|
+
let resource;
|
|
41885
|
+
let property;
|
|
41886
|
+
let value;
|
|
41887
|
+
if (options.all) {
|
|
41888
|
+
if (args.length < 2) {
|
|
41889
|
+
OutputFormatter6.error({
|
|
41890
|
+
Result: "Failure",
|
|
41891
|
+
Message: "Usage with --all: set <file> --all <property> <value>",
|
|
41892
|
+
Instructions: "Provide property and value arguments."
|
|
41893
|
+
});
|
|
41894
|
+
processContext6.exit(1);
|
|
41895
|
+
return;
|
|
41896
|
+
}
|
|
41897
|
+
property = args[0];
|
|
41898
|
+
value = args[1];
|
|
41899
|
+
} else {
|
|
41900
|
+
if (args.length < 3) {
|
|
41901
|
+
OutputFormatter6.error({
|
|
41902
|
+
Result: "Failure",
|
|
41903
|
+
Message: "Usage: set <file> <resource> <property> <value>",
|
|
41904
|
+
Instructions: "Provide resource, property, and value arguments. Use --all to apply to all resources."
|
|
41905
|
+
});
|
|
41906
|
+
processContext6.exit(1);
|
|
41907
|
+
return;
|
|
41908
|
+
}
|
|
41909
|
+
resource = args[0];
|
|
41910
|
+
property = args[1];
|
|
41911
|
+
value = args[2];
|
|
41912
|
+
}
|
|
41913
|
+
const [readError, result] = await readConfigFile(file3);
|
|
41914
|
+
if (readError) {
|
|
41915
|
+
OutputFormatter6.error({
|
|
41916
|
+
Result: "Failure",
|
|
41917
|
+
Message: readError.message,
|
|
41918
|
+
Instructions: "Provide a valid path to a deploy config JSON file."
|
|
41919
|
+
});
|
|
41920
|
+
processContext6.exit(1);
|
|
41921
|
+
return;
|
|
41922
|
+
}
|
|
41923
|
+
if (options.all) {
|
|
41924
|
+
const parsedValue = parseConfigValue(value);
|
|
41925
|
+
if (!isTopLevelField(property)) {
|
|
41926
|
+
OutputFormatter6.error({
|
|
41927
|
+
Result: "Failure",
|
|
41928
|
+
Message: `--all can only be used with conflictFixingAction`,
|
|
41929
|
+
Instructions: `To set configuration properties, target a specific resource by name or resourceKey.`
|
|
41930
|
+
});
|
|
41931
|
+
processContext6.exit(1);
|
|
41932
|
+
return;
|
|
41933
|
+
}
|
|
41934
|
+
const oldValues = {};
|
|
41935
|
+
for (const res of result.config.resources) {
|
|
41936
|
+
oldValues[res.name] = res[property];
|
|
41937
|
+
res[property] = parsedValue;
|
|
41938
|
+
}
|
|
41939
|
+
const writeError2 = await writeConfigFile(result.resolvedPath, result.config);
|
|
41940
|
+
if (writeError2) {
|
|
41941
|
+
OutputFormatter6.error({
|
|
41942
|
+
Result: "Failure",
|
|
41943
|
+
Message: `Failed to write config: ${writeError2.message}`,
|
|
41944
|
+
Instructions: writeError2.message
|
|
41945
|
+
});
|
|
41946
|
+
processContext6.exit(1);
|
|
41947
|
+
return;
|
|
41948
|
+
}
|
|
41949
|
+
OutputFormatter6.success({
|
|
41950
|
+
Result: "Success",
|
|
41951
|
+
Code: "DeployConfigSet",
|
|
41952
|
+
Data: {
|
|
41953
|
+
Resource: "all",
|
|
41954
|
+
Property: property,
|
|
41955
|
+
NewValue: parsedValue,
|
|
41956
|
+
ResourceCount: result.config.resources.length
|
|
41957
|
+
}
|
|
41958
|
+
});
|
|
41959
|
+
return;
|
|
41960
|
+
}
|
|
41961
|
+
const findResult = findResource(result.config, resource);
|
|
41962
|
+
if (findResult.error) {
|
|
41963
|
+
const errMsg = resourceErrorMessage(resource, findResult, result.config);
|
|
41964
|
+
OutputFormatter6.error({
|
|
41965
|
+
Result: "Failure",
|
|
41966
|
+
...errMsg
|
|
41967
|
+
});
|
|
41968
|
+
processContext6.exit(1);
|
|
41969
|
+
return;
|
|
41970
|
+
}
|
|
41971
|
+
const target = findResult.resource;
|
|
41972
|
+
let oldValue;
|
|
41973
|
+
if (isTopLevelField(property)) {
|
|
41974
|
+
oldValue = target[property];
|
|
41975
|
+
target[property] = parseConfigValue(value, oldValue);
|
|
41976
|
+
} else if (target.configuration && property in target.configuration) {
|
|
41977
|
+
oldValue = target.configuration[property];
|
|
41978
|
+
target.configuration[property] = parseConfigValue(value, oldValue);
|
|
41979
|
+
} else {
|
|
41980
|
+
OutputFormatter6.error({
|
|
41981
|
+
Result: "Failure",
|
|
41982
|
+
Message: `Property '${property}' not found on resource '${target.name}'`,
|
|
41983
|
+
Instructions: `Available properties: ${getAvailableProperties(target)}`
|
|
41984
|
+
});
|
|
41985
|
+
processContext6.exit(1);
|
|
41986
|
+
return;
|
|
41987
|
+
}
|
|
41988
|
+
const writeError = await writeConfigFile(result.resolvedPath, result.config);
|
|
41989
|
+
if (writeError) {
|
|
41990
|
+
OutputFormatter6.error({
|
|
41991
|
+
Result: "Failure",
|
|
41992
|
+
Message: `Failed to write config: ${writeError.message}`,
|
|
41993
|
+
Instructions: writeError.message
|
|
41994
|
+
});
|
|
41995
|
+
processContext6.exit(1);
|
|
41996
|
+
return;
|
|
41997
|
+
}
|
|
41998
|
+
const newValue = isTopLevelField(property) ? target[property] : target.configuration[property];
|
|
41999
|
+
OutputFormatter6.success({
|
|
42000
|
+
Result: "Success",
|
|
42001
|
+
Code: "DeployConfigSet",
|
|
42002
|
+
Data: {
|
|
42003
|
+
Resource: target.name,
|
|
42004
|
+
Property: property,
|
|
42005
|
+
OldValue: oldValue,
|
|
42006
|
+
NewValue: newValue
|
|
42007
|
+
}
|
|
42008
|
+
});
|
|
42009
|
+
});
|
|
42010
|
+
};
|
|
42011
|
+
|
|
42012
|
+
// src/commands/deploy-config.ts
|
|
42013
|
+
var registerDeployConfigCommand = (program) => {
|
|
42014
|
+
const config3 = program.command("config").description("Manage deployment configuration for solution packages. A config file describes the resources (assets, queues, processes, buckets, etc.) included in a solution and their settings. Workflow: 'config get' fetches the default config from the server, then 'config set' / 'config link' customize it before passing to 'deploy run --config-file'.");
|
|
42015
|
+
registerDeployConfigGetCommand(config3);
|
|
42016
|
+
registerDeployConfigSetCommand(config3);
|
|
42017
|
+
registerDeployConfigLinkCommand(config3);
|
|
42018
|
+
registerDeployConfigUnlinkCommand(config3);
|
|
42019
|
+
};
|
|
42020
|
+
|
|
41685
42021
|
// src/commands/deploy-list.ts
|
|
41686
42022
|
import {
|
|
41687
|
-
catchError as
|
|
42023
|
+
catchError as catchError8,
|
|
41688
42024
|
extractErrorDetails as extractErrorDetails4,
|
|
41689
|
-
OutputFormatter as
|
|
41690
|
-
processContext as
|
|
42025
|
+
OutputFormatter as OutputFormatter7,
|
|
42026
|
+
processContext as processContext7
|
|
41691
42027
|
} from "@uipath/common";
|
|
41692
42028
|
|
|
41693
42029
|
// ../solution-sdk/generated/src/runtime.ts
|
|
@@ -42211,7 +42547,7 @@ var TEMP_DIR2 = join2(PKG_ROOT2, "temp");
|
|
|
42211
42547
|
var GENERATE_DIR2 = join2(PKG_ROOT2, "swagger");
|
|
42212
42548
|
if (false) {}
|
|
42213
42549
|
// src/services/folder-helper.ts
|
|
42214
|
-
import { catchError as
|
|
42550
|
+
import { catchError as catchError7 } from "@uipath/common";
|
|
42215
42551
|
|
|
42216
42552
|
// ../orchestrator-sdk/generated/src/runtime.ts
|
|
42217
42553
|
var BASE_PATH3 = "https://alpha.uipath.com/uipattycyrhx/abizon_1/orchestrator_".replace(/\/+$/, "");
|
|
@@ -44562,7 +44898,7 @@ async function resolveParentFolder(options) {
|
|
|
44562
44898
|
if (options.folderPath) {
|
|
44563
44899
|
return options.folderPath;
|
|
44564
44900
|
}
|
|
44565
|
-
const [resolveError, resolved] = await
|
|
44901
|
+
const [resolveError, resolved] = await catchError7(resolveFolder({ folderKey: options.folderKey }, { tenant: options.tenant, loginValidity: options.loginValidity }));
|
|
44566
44902
|
if (resolveError) {
|
|
44567
44903
|
throw new Error(`Failed to resolve folder key '${options.folderKey}': ${resolveError.message}`);
|
|
44568
44904
|
}
|
|
@@ -44574,33 +44910,33 @@ async function resolveParentFolder(options) {
|
|
|
44574
44910
|
|
|
44575
44911
|
// src/commands/deploy-list.ts
|
|
44576
44912
|
var registerDeployListCommand = (program) => {
|
|
44577
|
-
program.command("list").description("List solution deployments. Shows deployment name, status, package version, and folder path.").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth)").option("--folder-path <path>", "Filter by parent folder path (e.g., 'Shared')").option("--folder-key <key>", "Filter by parent folder key (GUID). Alternative to --folder-path.").option("--take <number>", "Max deployments to fetch (default: 10). Applied before --folder-path filter.", (v) => parseInt(v, 10), 10).option("--order-by <column>", "Column to order by (default: startTime)", "startTime").option("--order-direction <direction>", "Order direction: Ascending or Descending (default: Descending)", "Descending").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(
|
|
44578
|
-
const [authError, auth] = await
|
|
44913
|
+
program.command("list").description("List solution deployments. Shows deployment name, status, package version, and folder path.").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth)").option("--folder-path <path>", "Filter by parent folder path (e.g., 'Shared')").option("--folder-key <key>", "Filter by parent folder key (GUID). Alternative to --folder-path.").option("--take <number>", "Max deployments to fetch (default: 10). Applied before --folder-path filter.", (v) => parseInt(v, 10), 10).option("--order-by <column>", "Column to order by (default: startTime)", "startTime").option("--order-direction <direction>", "Order direction: Ascending or Descending (default: Descending)", "Descending").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext7, async (options) => {
|
|
44914
|
+
const [authError, auth] = await catchError8(getSolutionAuthContext({
|
|
44579
44915
|
tenant: options.tenant,
|
|
44580
44916
|
loginValidity: options.loginValidity
|
|
44581
44917
|
}));
|
|
44582
44918
|
if (authError) {
|
|
44583
|
-
|
|
44919
|
+
OutputFormatter7.error({
|
|
44584
44920
|
Result: "Failure",
|
|
44585
44921
|
Message: authError.message,
|
|
44586
44922
|
Instructions: authError.message
|
|
44587
44923
|
});
|
|
44588
|
-
|
|
44924
|
+
processContext7.exit(1);
|
|
44589
44925
|
return;
|
|
44590
44926
|
}
|
|
44591
|
-
const [folderError, folderPathFilter] = await
|
|
44927
|
+
const [folderError, folderPathFilter] = await catchError8(resolveParentFolder({
|
|
44592
44928
|
folderPath: options.folderPath,
|
|
44593
44929
|
folderKey: options.folderKey,
|
|
44594
44930
|
tenant: options.tenant,
|
|
44595
44931
|
loginValidity: options.loginValidity
|
|
44596
44932
|
}));
|
|
44597
44933
|
if (folderError) {
|
|
44598
|
-
|
|
44934
|
+
OutputFormatter7.error({
|
|
44599
44935
|
Result: "Failure",
|
|
44600
44936
|
Message: folderError.message,
|
|
44601
44937
|
Instructions: "Provide a valid --folder-path or --folder-key to filter by folder."
|
|
44602
44938
|
});
|
|
44603
|
-
|
|
44939
|
+
processContext7.exit(1);
|
|
44604
44940
|
return;
|
|
44605
44941
|
}
|
|
44606
44942
|
const configuration = new Configuration2({
|
|
@@ -44608,7 +44944,7 @@ var registerDeployListCommand = (program) => {
|
|
|
44608
44944
|
accessToken: auth.accessToken
|
|
44609
44945
|
});
|
|
44610
44946
|
const api = new SearchApi(configuration);
|
|
44611
|
-
const [listError, result] = await
|
|
44947
|
+
const [listError, result] = await catchError8(api.searchSearchDeployments22({
|
|
44612
44948
|
deploymentsSearchRequest2: {
|
|
44613
44949
|
take: options.take,
|
|
44614
44950
|
orderByColumn: options.orderBy,
|
|
@@ -44619,12 +44955,12 @@ var registerDeployListCommand = (program) => {
|
|
|
44619
44955
|
}));
|
|
44620
44956
|
if (listError) {
|
|
44621
44957
|
const { message, details } = await extractErrorDetails4(listError);
|
|
44622
|
-
|
|
44958
|
+
OutputFormatter7.error({
|
|
44623
44959
|
Result: "Failure",
|
|
44624
44960
|
Message: message,
|
|
44625
44961
|
Instructions: `Failed to list deployments. Details: ${details}`
|
|
44626
44962
|
});
|
|
44627
|
-
|
|
44963
|
+
processContext7.exit(1);
|
|
44628
44964
|
return;
|
|
44629
44965
|
}
|
|
44630
44966
|
let values = result.values;
|
|
@@ -44640,7 +44976,7 @@ var registerDeployListCommand = (program) => {
|
|
|
44640
44976
|
FolderPath: d.folderPath,
|
|
44641
44977
|
CreatedAt: d.deploymentCreationTime
|
|
44642
44978
|
}));
|
|
44643
|
-
|
|
44979
|
+
OutputFormatter7.success({
|
|
44644
44980
|
Result: "Success",
|
|
44645
44981
|
Code: "SolutionDeployList",
|
|
44646
44982
|
Data: deployments
|
|
@@ -44650,13 +44986,13 @@ var registerDeployListCommand = (program) => {
|
|
|
44650
44986
|
|
|
44651
44987
|
// src/commands/deploy-run.ts
|
|
44652
44988
|
import {
|
|
44653
|
-
catchError as
|
|
44989
|
+
catchError as catchError9,
|
|
44654
44990
|
extractErrorDetails as extractErrorDetails5,
|
|
44655
|
-
OutputFormatter as
|
|
44991
|
+
OutputFormatter as OutputFormatter8,
|
|
44656
44992
|
pollUntil as pollUntil2,
|
|
44657
|
-
processContext as
|
|
44993
|
+
processContext as processContext8
|
|
44658
44994
|
} from "@uipath/common";
|
|
44659
|
-
import { getFileSystem as
|
|
44995
|
+
import { getFileSystem as getFileSystem5 } from "@uipath/filesystem";
|
|
44660
44996
|
var TERMINAL_STATUSES2 = new Set([
|
|
44661
44997
|
"DeploymentSucceeded",
|
|
44662
44998
|
"DeploymentFailed",
|
|
@@ -44665,33 +45001,33 @@ var TERMINAL_STATUSES2 = new Set([
|
|
|
44665
45001
|
"DeploymentScheduleError"
|
|
44666
45002
|
]);
|
|
44667
45003
|
var registerDeployRunCommand = (program) => {
|
|
44668
|
-
program.command("run").description("Deploy a solution package to Orchestrator. Creates a folder, provisions resources, and activates the solution.
|
|
44669
|
-
const [authError, auth] = await
|
|
45004
|
+
program.command("run").description("Deploy a solution package to Orchestrator. Creates a folder, provisions resources, and activates the solution. To customize resource settings before deploying, use 'config get' to fetch the default config, 'config set' / 'config link' to edit it, then pass it here with --config-file.").requiredOption("-n, --name <deployment-name>", "Name for the deployment").requiredOption("--package-name <name>", "Solution package name to deploy. Use 'solution packages list' to find available names.").requiredOption("--package-version <version>", "Solution package version to deploy. Use 'solution packages list' to find available versions.").requiredOption("--folder-name <name>", "Name of the Orchestrator folder to create for this deployment").option("--folder-path <path>", "Parent folder path (e.g., 'Shared'). Solution folder is created under this.").option("--folder-key <key>", "Parent folder key (GUID). Alternative to --folder-path.").option("--config-file <path>", "JSON configuration file. Generate with: uip solution deploy config get <name> -d config.json, then customize with 'config set' or 'config link'.").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth)").option("--timeout <seconds>", "Timeout in seconds for deployment polling (default: 360)", (v) => parseInt(v, 10), 360).option("--poll-interval <ms>", "Milliseconds between deployment status polls (default: 5000)", (v) => parseInt(v, 10), 5000).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext8, async (options) => {
|
|
45005
|
+
const [authError, auth] = await catchError9(getSolutionAuthContext({
|
|
44670
45006
|
tenant: options.tenant,
|
|
44671
45007
|
loginValidity: options.loginValidity
|
|
44672
45008
|
}));
|
|
44673
45009
|
if (authError) {
|
|
44674
|
-
|
|
45010
|
+
OutputFormatter8.error({
|
|
44675
45011
|
Result: "Failure",
|
|
44676
45012
|
Message: authError.message,
|
|
44677
45013
|
Instructions: authError.message
|
|
44678
45014
|
});
|
|
44679
|
-
|
|
45015
|
+
processContext8.exit(1);
|
|
44680
45016
|
return;
|
|
44681
45017
|
}
|
|
44682
|
-
const [folderError, parentFolderPath] = await
|
|
45018
|
+
const [folderError, parentFolderPath] = await catchError9(resolveParentFolder({
|
|
44683
45019
|
folderPath: options.folderPath,
|
|
44684
45020
|
folderKey: options.folderKey,
|
|
44685
45021
|
tenant: options.tenant,
|
|
44686
45022
|
loginValidity: options.loginValidity
|
|
44687
45023
|
}));
|
|
44688
45024
|
if (folderError) {
|
|
44689
|
-
|
|
45025
|
+
OutputFormatter8.error({
|
|
44690
45026
|
Result: "Failure",
|
|
44691
45027
|
Message: folderError.message,
|
|
44692
45028
|
Instructions: "Provide a valid --folder-path or --folder-key for the parent folder."
|
|
44693
45029
|
});
|
|
44694
|
-
|
|
45030
|
+
processContext8.exit(1);
|
|
44695
45031
|
return;
|
|
44696
45032
|
}
|
|
44697
45033
|
const configuration = new Configuration({
|
|
@@ -44701,31 +45037,31 @@ var registerDeployRunCommand = (program) => {
|
|
|
44701
45037
|
const api = new PipelinesApi(configuration);
|
|
44702
45038
|
let configBody;
|
|
44703
45039
|
if (options.configFile) {
|
|
44704
|
-
const fs =
|
|
45040
|
+
const fs = getFileSystem5();
|
|
44705
45041
|
const configPath = fs.path.resolve(options.configFile);
|
|
44706
|
-
const [readError, configContent] = await
|
|
45042
|
+
const [readError, configContent] = await catchError9(fs.readFile(configPath, "utf-8"));
|
|
44707
45043
|
if (readError) {
|
|
44708
|
-
|
|
45044
|
+
OutputFormatter8.error({
|
|
44709
45045
|
Result: "Failure",
|
|
44710
45046
|
Message: `Failed to read config file: ${configPath}`,
|
|
44711
45047
|
Instructions: readError.message
|
|
44712
45048
|
});
|
|
44713
|
-
|
|
45049
|
+
processContext8.exit(1);
|
|
44714
45050
|
return;
|
|
44715
45051
|
}
|
|
44716
|
-
const [parseError, parsed] =
|
|
45052
|
+
const [parseError, parsed] = catchError9(() => JSON.parse(configContent));
|
|
44717
45053
|
if (parseError) {
|
|
44718
|
-
|
|
45054
|
+
OutputFormatter8.error({
|
|
44719
45055
|
Result: "Failure",
|
|
44720
45056
|
Message: `Invalid JSON in config file: ${configPath}`,
|
|
44721
45057
|
Instructions: parseError.message
|
|
44722
45058
|
});
|
|
44723
|
-
|
|
45059
|
+
processContext8.exit(1);
|
|
44724
45060
|
return;
|
|
44725
45061
|
}
|
|
44726
45062
|
configBody = parsed;
|
|
44727
45063
|
}
|
|
44728
|
-
const [installError, installResult] = await
|
|
45064
|
+
const [installError, installResult] = await catchError9(api.pipelinesInstall({
|
|
44729
45065
|
deploymentName: options.name,
|
|
44730
45066
|
packageName: options.packageName,
|
|
44731
45067
|
packageVersion: options.packageVersion,
|
|
@@ -44735,12 +45071,12 @@ var registerDeployRunCommand = (program) => {
|
|
|
44735
45071
|
}));
|
|
44736
45072
|
if (installError) {
|
|
44737
45073
|
const { message, details } = await extractErrorDetails5(installError);
|
|
44738
|
-
|
|
45074
|
+
OutputFormatter8.error({
|
|
44739
45075
|
Result: "Failure",
|
|
44740
45076
|
Message: message,
|
|
44741
45077
|
Instructions: `Check package name/version with: uip solution packages list. Details: ${details}`
|
|
44742
45078
|
});
|
|
44743
|
-
|
|
45079
|
+
processContext8.exit(1);
|
|
44744
45080
|
return;
|
|
44745
45081
|
}
|
|
44746
45082
|
const pipelineDeploymentId = installResult.pipelineDeploymentId;
|
|
@@ -44754,7 +45090,7 @@ var registerDeployRunCommand = (program) => {
|
|
|
44754
45090
|
logPrefix: "deploy",
|
|
44755
45091
|
timeoutMs: options.timeout * 1000,
|
|
44756
45092
|
intervalMs: options.pollInterval,
|
|
44757
|
-
signal:
|
|
45093
|
+
signal: processContext8.pollSignal
|
|
44758
45094
|
});
|
|
44759
45095
|
if (handlePollFailure(pollResult, "Deployment", `Deployment may still be in progress. Check status with: uip solution deploy status ${pipelineDeploymentId}.`)) {
|
|
44760
45096
|
return;
|
|
@@ -44762,15 +45098,15 @@ var registerDeployRunCommand = (program) => {
|
|
|
44762
45098
|
const finalStatus = pollResult.data;
|
|
44763
45099
|
if (finalStatus.status !== "DeploymentSucceeded") {
|
|
44764
45100
|
const errors = finalStatus.validationResult?.validationErrors?.map((e) => e.errorText).join(", ") || "Unknown error";
|
|
44765
|
-
|
|
45101
|
+
OutputFormatter8.error({
|
|
44766
45102
|
Result: "Failure",
|
|
44767
45103
|
Message: `Deployment failed with status: ${finalStatus.status}`,
|
|
44768
45104
|
Instructions: errors
|
|
44769
45105
|
});
|
|
44770
|
-
|
|
45106
|
+
processContext8.exit(1);
|
|
44771
45107
|
return;
|
|
44772
45108
|
}
|
|
44773
|
-
|
|
45109
|
+
OutputFormatter8.success({
|
|
44774
45110
|
Result: "Success",
|
|
44775
45111
|
Code: "SolutionDeployRun",
|
|
44776
45112
|
Data: {
|
|
@@ -44785,24 +45121,24 @@ var registerDeployRunCommand = (program) => {
|
|
|
44785
45121
|
|
|
44786
45122
|
// src/commands/deploy-status.ts
|
|
44787
45123
|
import {
|
|
44788
|
-
catchError as
|
|
45124
|
+
catchError as catchError10,
|
|
44789
45125
|
extractErrorDetails as extractErrorDetails6,
|
|
44790
|
-
OutputFormatter as
|
|
44791
|
-
processContext as
|
|
45126
|
+
OutputFormatter as OutputFormatter9,
|
|
45127
|
+
processContext as processContext9
|
|
44792
45128
|
} from "@uipath/common";
|
|
44793
45129
|
var registerDeployStatusCommand = (program) => {
|
|
44794
|
-
program.command("status").description("Check the current status of a pipeline deployment. Returns deployment state, progress, and any errors.").argument("<pipeline-deployment-id>", "Pipeline deployment ID (GUID)
|
|
44795
|
-
const [authError, auth] = await
|
|
45130
|
+
program.command("status").description("Check the current status of a pipeline deployment. Returns deployment state, progress, and any errors.").argument("<pipeline-deployment-id>", "Pipeline deployment ID (GUID) returned by 'solution deploy run'.").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth)").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext9, async (pipelineDeploymentId, options) => {
|
|
45131
|
+
const [authError, auth] = await catchError10(getSolutionAuthContext({
|
|
44796
45132
|
tenant: options.tenant,
|
|
44797
45133
|
loginValidity: options.loginValidity
|
|
44798
45134
|
}));
|
|
44799
45135
|
if (authError) {
|
|
44800
|
-
|
|
45136
|
+
OutputFormatter9.error({
|
|
44801
45137
|
Result: "Failure",
|
|
44802
45138
|
Message: authError.message,
|
|
44803
45139
|
Instructions: authError.message
|
|
44804
45140
|
});
|
|
44805
|
-
|
|
45141
|
+
processContext9.exit(1);
|
|
44806
45142
|
return;
|
|
44807
45143
|
}
|
|
44808
45144
|
const configuration = new Configuration({
|
|
@@ -44810,20 +45146,20 @@ var registerDeployStatusCommand = (program) => {
|
|
|
44810
45146
|
accessToken: auth.accessToken
|
|
44811
45147
|
});
|
|
44812
45148
|
const api = new PipelinesApi(configuration);
|
|
44813
|
-
const [statusError, result] = await
|
|
45149
|
+
const [statusError, result] = await catchError10(api.pipelinesGetPipelineDeploymentStatus({
|
|
44814
45150
|
pipelineDeploymentId
|
|
44815
45151
|
}));
|
|
44816
45152
|
if (statusError) {
|
|
44817
45153
|
const { message, details } = await extractErrorDetails6(statusError);
|
|
44818
|
-
|
|
45154
|
+
OutputFormatter9.error({
|
|
44819
45155
|
Result: "Failure",
|
|
44820
45156
|
Message: message,
|
|
44821
45157
|
Instructions: `Check the pipeline deployment ID. Get it from deploy run output. Details: ${details}`
|
|
44822
45158
|
});
|
|
44823
|
-
|
|
45159
|
+
processContext9.exit(1);
|
|
44824
45160
|
return;
|
|
44825
45161
|
}
|
|
44826
|
-
|
|
45162
|
+
OutputFormatter9.success({
|
|
44827
45163
|
Result: "Success",
|
|
44828
45164
|
Code: "SolutionDeployStatus",
|
|
44829
45165
|
Data: {
|
|
@@ -44847,29 +45183,29 @@ var registerDeployStatusCommand = (program) => {
|
|
|
44847
45183
|
|
|
44848
45184
|
// src/commands/deploy-uninstall.ts
|
|
44849
45185
|
import {
|
|
44850
|
-
catchError as
|
|
45186
|
+
catchError as catchError11,
|
|
44851
45187
|
extractErrorDetails as extractErrorDetails7,
|
|
44852
|
-
OutputFormatter as
|
|
45188
|
+
OutputFormatter as OutputFormatter10,
|
|
44853
45189
|
pollUntil as pollUntil3,
|
|
44854
|
-
processContext as
|
|
45190
|
+
processContext as processContext10
|
|
44855
45191
|
} from "@uipath/common";
|
|
44856
45192
|
var TERMINAL_STATUSES3 = new Set([
|
|
44857
45193
|
"SuccessfulUninstall",
|
|
44858
45194
|
"FailedUninstall"
|
|
44859
45195
|
]);
|
|
44860
45196
|
var registerDeployUninstallCommand = (program) => {
|
|
44861
|
-
program.command("uninstall").description("Uninstall a deployed solution. Removes all provisioned resources and the solution folder.").argument("<deployment-name>", "Name of the deployment to uninstall").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth)").option("--timeout <seconds>", "Timeout in seconds for uninstall polling (default: 360)", (v) => parseInt(v, 10), 360).option("--poll-interval <ms>", "Milliseconds between uninstall status polls (default: 5000)", (v) => parseInt(v, 10), 5000).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(
|
|
44862
|
-
const [authError, auth] = await
|
|
45197
|
+
program.command("uninstall").description("Uninstall a deployed solution. Removes all provisioned resources and the solution folder.").argument("<deployment-name>", "Name of the deployment to uninstall. Use 'solution deploy list' to find deployment names.").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth)").option("--timeout <seconds>", "Timeout in seconds for uninstall polling (default: 360)", (v) => parseInt(v, 10), 360).option("--poll-interval <ms>", "Milliseconds between uninstall status polls (default: 5000)", (v) => parseInt(v, 10), 5000).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext10, async (deploymentName, options) => {
|
|
45198
|
+
const [authError, auth] = await catchError11(getSolutionAuthContext({
|
|
44863
45199
|
tenant: options.tenant,
|
|
44864
45200
|
loginValidity: options.loginValidity
|
|
44865
45201
|
}));
|
|
44866
45202
|
if (authError) {
|
|
44867
|
-
|
|
45203
|
+
OutputFormatter10.error({
|
|
44868
45204
|
Result: "Failure",
|
|
44869
45205
|
Message: authError.message,
|
|
44870
45206
|
Instructions: authError.message
|
|
44871
45207
|
});
|
|
44872
|
-
|
|
45208
|
+
processContext10.exit(1);
|
|
44873
45209
|
return;
|
|
44874
45210
|
}
|
|
44875
45211
|
const configuration = new Configuration({
|
|
@@ -44877,19 +45213,19 @@ var registerDeployUninstallCommand = (program) => {
|
|
|
44877
45213
|
accessToken: auth.accessToken
|
|
44878
45214
|
});
|
|
44879
45215
|
const api = new PipelinesApi(configuration);
|
|
44880
|
-
const [uninstallError, uninstallResult] = await
|
|
45216
|
+
const [uninstallError, uninstallResult] = await catchError11(api.pipelinesUninstall({ deploymentName }));
|
|
44881
45217
|
if (uninstallError) {
|
|
44882
45218
|
const { message, details } = await extractErrorDetails7(uninstallError);
|
|
44883
|
-
|
|
45219
|
+
OutputFormatter10.error({
|
|
44884
45220
|
Result: "Failure",
|
|
44885
45221
|
Message: message,
|
|
44886
45222
|
Instructions: `Check deployment name matches an existing deployment. Details: ${details}`
|
|
44887
45223
|
});
|
|
44888
|
-
|
|
45224
|
+
processContext10.exit(1);
|
|
44889
45225
|
return;
|
|
44890
45226
|
}
|
|
44891
45227
|
if (uninstallResult.complete) {
|
|
44892
|
-
|
|
45228
|
+
OutputFormatter10.success({
|
|
44893
45229
|
Result: "Success",
|
|
44894
45230
|
Code: "SolutionDeployUninstall",
|
|
44895
45231
|
Data: {
|
|
@@ -44901,7 +45237,7 @@ var registerDeployUninstallCommand = (program) => {
|
|
|
44901
45237
|
}
|
|
44902
45238
|
const instanceId = uninstallResult.instanceId;
|
|
44903
45239
|
if (!instanceId) {
|
|
44904
|
-
|
|
45240
|
+
OutputFormatter10.success({
|
|
44905
45241
|
Result: "Success",
|
|
44906
45242
|
Code: "SolutionDeployUninstall",
|
|
44907
45243
|
Data: {
|
|
@@ -44922,7 +45258,7 @@ var registerDeployUninstallCommand = (program) => {
|
|
|
44922
45258
|
logPrefix: "uninstall",
|
|
44923
45259
|
timeoutMs: options.timeout * 1000,
|
|
44924
45260
|
intervalMs: options.pollInterval,
|
|
44925
|
-
signal:
|
|
45261
|
+
signal: processContext10.pollSignal
|
|
44926
45262
|
});
|
|
44927
45263
|
if (handlePollFailure(pollResult, "Uninstall", "Uninstall may still be in progress.")) {
|
|
44928
45264
|
return;
|
|
@@ -44930,15 +45266,15 @@ var registerDeployUninstallCommand = (program) => {
|
|
|
44930
45266
|
const finalStatus = pollResult.data;
|
|
44931
45267
|
if (finalStatus.status !== "SuccessfulUninstall") {
|
|
44932
45268
|
const errors = finalStatus.errorMessage?.map((e) => e.errorMessage).join(", ") || "Unknown error";
|
|
44933
|
-
|
|
45269
|
+
OutputFormatter10.error({
|
|
44934
45270
|
Result: "Failure",
|
|
44935
45271
|
Message: `Uninstall failed with status: ${finalStatus.status}`,
|
|
44936
45272
|
Instructions: errors
|
|
44937
45273
|
});
|
|
44938
|
-
|
|
45274
|
+
processContext10.exit(1);
|
|
44939
45275
|
return;
|
|
44940
45276
|
}
|
|
44941
|
-
|
|
45277
|
+
OutputFormatter10.success({
|
|
44942
45278
|
Result: "Success",
|
|
44943
45279
|
Code: "SolutionDeployUninstall",
|
|
44944
45280
|
Data: {
|
|
@@ -44962,24 +45298,24 @@ var registerDeployCommand = (program) => {
|
|
|
44962
45298
|
};
|
|
44963
45299
|
|
|
44964
45300
|
// src/commands/new.ts
|
|
44965
|
-
import { catchError as
|
|
44966
|
-
import { getFileSystem as
|
|
45301
|
+
import { catchError as catchError12, OutputFormatter as OutputFormatter11, processContext as processContext11 } from "@uipath/common";
|
|
45302
|
+
import { getFileSystem as getFileSystem6 } from "@uipath/filesystem";
|
|
44967
45303
|
var registerNewCommand = (program) => {
|
|
44968
|
-
program.command("new").description("Create a new empty UiPath solution file").argument("<solutionName>", "Solution file name or path (relative or absolute). Appends .uipx if no extension is specified").trackedAction(
|
|
44969
|
-
const fs =
|
|
45304
|
+
program.command("new").description("Create a new empty UiPath solution. Creates a directory named after the solution containing a .uipx manifest file with an empty Projects array. Use 'solution project add' to add projects afterward.").argument("<solutionName>", "Solution file name or path (relative or absolute). Appends .uipx if no extension is specified").trackedAction(processContext11, async (solutionName) => {
|
|
45305
|
+
const fs = getFileSystem6();
|
|
44970
45306
|
const base = fs.path.basename(solutionName);
|
|
44971
45307
|
const hasExtension = base.lastIndexOf(".") > 0;
|
|
44972
45308
|
const nameWithoutExt = hasExtension ? base.slice(0, base.lastIndexOf(".")) : base;
|
|
44973
45309
|
const fileName = hasExtension ? base : `${base}.uipx`;
|
|
44974
45310
|
const parentDir = fs.path.resolve(fs.path.dirname(solutionName), nameWithoutExt);
|
|
44975
|
-
const [mkdirError] = await
|
|
45311
|
+
const [mkdirError] = await catchError12(fs.mkdir(parentDir));
|
|
44976
45312
|
if (mkdirError) {
|
|
44977
|
-
|
|
45313
|
+
OutputFormatter11.error({
|
|
44978
45314
|
Result: "Failure",
|
|
44979
45315
|
Message: "Failed to create solution directory",
|
|
44980
45316
|
Instructions: mkdirError.message
|
|
44981
45317
|
});
|
|
44982
|
-
|
|
45318
|
+
processContext11.exit(1);
|
|
44983
45319
|
return;
|
|
44984
45320
|
}
|
|
44985
45321
|
const filePath = fs.path.join(parentDir, fileName);
|
|
@@ -44989,18 +45325,18 @@ var registerNewCommand = (program) => {
|
|
|
44989
45325
|
SolutionId: crypto.randomUUID(),
|
|
44990
45326
|
Projects: []
|
|
44991
45327
|
};
|
|
44992
|
-
const [writeFileError] = await
|
|
45328
|
+
const [writeFileError] = await catchError12(fs.writeFile(filePath, `${JSON.stringify(solution, null, 2)}
|
|
44993
45329
|
`));
|
|
44994
45330
|
if (writeFileError) {
|
|
44995
|
-
|
|
45331
|
+
OutputFormatter11.error({
|
|
44996
45332
|
Result: "Failure",
|
|
44997
45333
|
Message: "Failed to create solution",
|
|
44998
45334
|
Instructions: writeFileError.message
|
|
44999
45335
|
});
|
|
45000
|
-
|
|
45336
|
+
processContext11.exit(1);
|
|
45001
45337
|
return;
|
|
45002
45338
|
}
|
|
45003
|
-
|
|
45339
|
+
OutputFormatter11.success({
|
|
45004
45340
|
Result: "Success",
|
|
45005
45341
|
Code: "SolutionNew",
|
|
45006
45342
|
Data: {
|
|
@@ -45008,23 +45344,23 @@ var registerNewCommand = (program) => {
|
|
|
45008
45344
|
Path: filePath
|
|
45009
45345
|
}
|
|
45010
45346
|
});
|
|
45011
|
-
|
|
45347
|
+
processContext11.exit(0);
|
|
45012
45348
|
});
|
|
45013
45349
|
};
|
|
45014
45350
|
|
|
45015
45351
|
// src/commands/pack.ts
|
|
45016
|
-
import { processContext as
|
|
45352
|
+
import { processContext as processContext12 } from "@uipath/common";
|
|
45017
45353
|
|
|
45018
45354
|
// src/services/pack-command-service.ts
|
|
45019
45355
|
import { getLoginStatusAsync as getLoginStatusAsync3 } from "@uipath/auth";
|
|
45020
45356
|
import {
|
|
45021
|
-
catchError as
|
|
45357
|
+
catchError as catchError14,
|
|
45022
45358
|
logger as logger4,
|
|
45023
|
-
OutputFormatter as
|
|
45359
|
+
OutputFormatter as OutputFormatter12,
|
|
45024
45360
|
LogLevel as SimpleLogLevel,
|
|
45025
45361
|
telemetry
|
|
45026
45362
|
} from "@uipath/common";
|
|
45027
|
-
import { getFileSystem as
|
|
45363
|
+
import { getFileSystem as getFileSystem7 } from "@uipath/filesystem";
|
|
45028
45364
|
|
|
45029
45365
|
// ../packager/solution-packager/dist/node.js
|
|
45030
45366
|
import { I18nManager as I18nManager3 } from "@uipath/solutionpackager-tool-core";
|
|
@@ -48517,7 +48853,7 @@ import {
|
|
|
48517
48853
|
} from "@uipath/solutionpackager-tool-core";
|
|
48518
48854
|
|
|
48519
48855
|
// src/services/packager-tool-resolver.ts
|
|
48520
|
-
import { catchError as
|
|
48856
|
+
import { catchError as catchError13, ensurePackagerFactory, logger as logger3 } from "@uipath/common";
|
|
48521
48857
|
import { toolsFactoryRepository as toolsFactoryRepository7 } from "@uipath/solutionpackager-tool-core";
|
|
48522
48858
|
var PROJECT_TYPE_TO_TOOL = new Map([
|
|
48523
48859
|
["Process", "rpa"],
|
|
@@ -48539,7 +48875,7 @@ async function readProjectTypes(solutionDir, fs) {
|
|
|
48539
48875
|
if (!content)
|
|
48540
48876
|
return [];
|
|
48541
48877
|
const json3 = typeof content === "string" ? content : new TextDecoder().decode(content);
|
|
48542
|
-
const [parseError, solution] =
|
|
48878
|
+
const [parseError, solution] = catchError13(() => JSON.parse(json3));
|
|
48543
48879
|
if (parseError) {
|
|
48544
48880
|
throw new Error(`Failed to parse ${uipxFile}: ${parseError.message}`);
|
|
48545
48881
|
}
|
|
@@ -48571,15 +48907,15 @@ class PackCommandService {
|
|
|
48571
48907
|
packager = null;
|
|
48572
48908
|
fs;
|
|
48573
48909
|
constructor() {
|
|
48574
|
-
this.fs =
|
|
48910
|
+
this.fs = getFileSystem7();
|
|
48575
48911
|
}
|
|
48576
48912
|
async execute(solutionPath, options, context) {
|
|
48577
48913
|
const absoluteSolutionPath = this.fs.path.resolve(solutionPath);
|
|
48578
48914
|
const absoluteOutputPath = this.fs.path.resolve(options.output);
|
|
48579
|
-
const [statError, stats] = await
|
|
48915
|
+
const [statError, stats] = await catchError14(this.fs.stat(absoluteSolutionPath));
|
|
48580
48916
|
if (statError || !stats) {
|
|
48581
48917
|
const msg = statError?.message ?? `Solution path does not exist: ${absoluteSolutionPath}`;
|
|
48582
|
-
|
|
48918
|
+
OutputFormatter12.error({
|
|
48583
48919
|
Result: "Failure",
|
|
48584
48920
|
Message: msg,
|
|
48585
48921
|
Instructions: msg
|
|
@@ -48601,9 +48937,9 @@ Packing solution...
|
|
|
48601
48937
|
logger4.info(` Package: ${packageName}@${options.version}`);
|
|
48602
48938
|
logger4.info(` Output: ${absoluteOutputPath}`);
|
|
48603
48939
|
logger4.info("");
|
|
48604
|
-
const [error79, result] = await
|
|
48940
|
+
const [error79, result] = await catchError14(this.executeAsync(solutionPath, options));
|
|
48605
48941
|
if (error79) {
|
|
48606
|
-
|
|
48942
|
+
OutputFormatter12.error({
|
|
48607
48943
|
Result: "Failure",
|
|
48608
48944
|
Message: error79 instanceof Error ? error79.message : String(error79),
|
|
48609
48945
|
Instructions: `${error79 instanceof Error ? error79.message : String(error79)}`
|
|
@@ -48616,7 +48952,7 @@ Packing solution...
|
|
|
48616
48952
|
return;
|
|
48617
48953
|
}
|
|
48618
48954
|
if (result.errorCode !== ToolErrorCodes9.Success) {
|
|
48619
|
-
|
|
48955
|
+
OutputFormatter12.error({
|
|
48620
48956
|
Result: "Failure",
|
|
48621
48957
|
Message: `Error code: ${result.errorCode} : ${result.message}`,
|
|
48622
48958
|
Instructions: `${result.message}`
|
|
@@ -48624,7 +48960,7 @@ Packing solution...
|
|
|
48624
48960
|
context.exit(1);
|
|
48625
48961
|
return;
|
|
48626
48962
|
}
|
|
48627
|
-
|
|
48963
|
+
OutputFormatter12.success({
|
|
48628
48964
|
Result: "Success",
|
|
48629
48965
|
Code: "SolutionPack",
|
|
48630
48966
|
Data: {
|
|
@@ -48652,7 +48988,7 @@ Packing solution...
|
|
|
48652
48988
|
logger4.debug(`Processing: ${absoluteSolutionPath}`);
|
|
48653
48989
|
logger4.debug(`Package: ${packageName}@${options.version}`);
|
|
48654
48990
|
logger4.debug(`Output: ${absoluteOutputPath}`);
|
|
48655
|
-
const [error79, result] = await
|
|
48991
|
+
const [error79, result] = await catchError14(async () => {
|
|
48656
48992
|
await this.fs.mkdir(absoluteOutputPath);
|
|
48657
48993
|
const packager = await this.ensurePackagerAsync();
|
|
48658
48994
|
let inputPath;
|
|
@@ -48723,58 +49059,58 @@ Packing solution...
|
|
|
48723
49059
|
|
|
48724
49060
|
// src/commands/pack.ts
|
|
48725
49061
|
var registerPackCommand = (program) => {
|
|
48726
|
-
program.command("pack").description("Pack a UiPath solution
|
|
49062
|
+
program.command("pack").description("Pack a UiPath solution into a deployable .zip package. Accepts a solution directory (containing .uipx) or a .uis bundle file. Output is used with 'solution publish' to upload to UiPath.").argument("<solutionPath>", "Path to a solution directory (containing .uipx) or a .uis bundle file").argument("<outputPath>", "Output directory where the packed solution will be saved").option("-n, --name <name>", "Package name (default: solution folder name or .uis file name)").option("-v, --version <version>", "Package version (default: 1.0.0)", "1.0.0").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext12, async (solutionPath, outputPath, options) => {
|
|
48727
49063
|
const service = new PackCommandService;
|
|
48728
49064
|
await service.execute(solutionPath, {
|
|
48729
49065
|
output: outputPath,
|
|
48730
49066
|
name: options.name,
|
|
48731
49067
|
version: options.version,
|
|
48732
49068
|
loginValidity: options.loginValidity
|
|
48733
|
-
},
|
|
49069
|
+
}, processContext12);
|
|
48734
49070
|
});
|
|
48735
49071
|
};
|
|
48736
49072
|
|
|
48737
49073
|
// src/commands/packages-delete.ts
|
|
48738
49074
|
import {
|
|
48739
|
-
catchError as
|
|
49075
|
+
catchError as catchError15,
|
|
48740
49076
|
extractErrorDetails as extractErrorDetails8,
|
|
48741
|
-
OutputFormatter as
|
|
48742
|
-
processContext as
|
|
49077
|
+
OutputFormatter as OutputFormatter13,
|
|
49078
|
+
processContext as processContext13
|
|
48743
49079
|
} from "@uipath/common";
|
|
48744
49080
|
var registerPackagesDeleteCommand = (program) => {
|
|
48745
|
-
program.command("delete").description("Delete a specific version of a solution package.").argument("<packageName>", "The name of the package").argument("<packageVersion>", "The version to delete (e.g. 1.0.0)").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth)").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(
|
|
48746
|
-
const [authError, auth] = await
|
|
49081
|
+
program.command("delete").description("Delete a specific version of a solution package. " + "Use 'solution packages list' to find available package names and versions.").argument("<packageName>", "The name of the package").argument("<packageVersion>", "The version to delete (e.g. 1.0.0)").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth)").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext13, async (packageName, packageVersion, options) => {
|
|
49082
|
+
const [authError, auth] = await catchError15(getSolutionAuthContext({
|
|
48747
49083
|
tenant: options.tenant,
|
|
48748
49084
|
loginValidity: options.loginValidity
|
|
48749
49085
|
}));
|
|
48750
49086
|
if (authError) {
|
|
48751
|
-
|
|
49087
|
+
OutputFormatter13.error({
|
|
48752
49088
|
Result: "Failure",
|
|
48753
49089
|
Message: authError.message,
|
|
48754
49090
|
Instructions: "Run 'uip login' to authenticate and try again."
|
|
48755
49091
|
});
|
|
48756
|
-
|
|
49092
|
+
processContext13.exit(1);
|
|
48757
49093
|
return;
|
|
48758
49094
|
}
|
|
48759
49095
|
const api = new PipelinesApi(new Configuration({
|
|
48760
49096
|
basePath: auth.basePath,
|
|
48761
49097
|
accessToken: auth.accessToken
|
|
48762
49098
|
}));
|
|
48763
|
-
const [deleteError] = await
|
|
49099
|
+
const [deleteError] = await catchError15(api.pipelinesPackageDelete({
|
|
48764
49100
|
packageName,
|
|
48765
49101
|
packageVersion
|
|
48766
49102
|
}));
|
|
48767
49103
|
if (deleteError) {
|
|
48768
49104
|
const { message } = await extractErrorDetails8(deleteError);
|
|
48769
|
-
|
|
49105
|
+
OutputFormatter13.error({
|
|
48770
49106
|
Result: "Failure",
|
|
48771
49107
|
Message: message,
|
|
48772
49108
|
Instructions: "Check that the package name and version are correct and that you have permission to delete it."
|
|
48773
49109
|
});
|
|
48774
|
-
|
|
49110
|
+
processContext13.exit(1);
|
|
48775
49111
|
return;
|
|
48776
49112
|
}
|
|
48777
|
-
|
|
49113
|
+
OutputFormatter13.success({
|
|
48778
49114
|
Result: "Success",
|
|
48779
49115
|
Code: "SolutionPackagesDelete",
|
|
48780
49116
|
Data: {
|
|
@@ -48787,24 +49123,24 @@ var registerPackagesDeleteCommand = (program) => {
|
|
|
48787
49123
|
|
|
48788
49124
|
// src/commands/packages-list.ts
|
|
48789
49125
|
import {
|
|
48790
|
-
catchError as
|
|
49126
|
+
catchError as catchError16,
|
|
48791
49127
|
extractErrorDetails as extractErrorDetails9,
|
|
48792
|
-
OutputFormatter as
|
|
48793
|
-
processContext as
|
|
49128
|
+
OutputFormatter as OutputFormatter14,
|
|
49129
|
+
processContext as processContext14
|
|
48794
49130
|
} from "@uipath/common";
|
|
48795
49131
|
var registerPackagesListCommand = (program) => {
|
|
48796
|
-
program.command("list").description("List
|
|
48797
|
-
const [authError, auth] = await
|
|
49132
|
+
program.command("list").description("List solution packages published to UiPath. Returns package name, version, and publish date. Use the package name and version from this output when running 'solution deploy run'.").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth)").option("--take <count>", "Number of packages to return (default: 10)", (v) => parseInt(v, 10), 10).option("--order-by <column>", "Column to order by (default: publishDate)", "publishDate").option("--order-direction <direction>", "Order direction: Ascending or Descending (default: Descending)", "Descending").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext14, async (options) => {
|
|
49133
|
+
const [authError, auth] = await catchError16(getSolutionAuthContext({
|
|
48798
49134
|
tenant: options.tenant,
|
|
48799
49135
|
loginValidity: options.loginValidity
|
|
48800
49136
|
}));
|
|
48801
49137
|
if (authError) {
|
|
48802
|
-
|
|
49138
|
+
OutputFormatter14.error({
|
|
48803
49139
|
Result: "Failure",
|
|
48804
49140
|
Message: authError.message,
|
|
48805
49141
|
Instructions: authError.message
|
|
48806
49142
|
});
|
|
48807
|
-
|
|
49143
|
+
processContext14.exit(1);
|
|
48808
49144
|
return;
|
|
48809
49145
|
}
|
|
48810
49146
|
const configuration = new Configuration2({
|
|
@@ -48812,7 +49148,7 @@ var registerPackagesListCommand = (program) => {
|
|
|
48812
49148
|
accessToken: auth.accessToken
|
|
48813
49149
|
});
|
|
48814
49150
|
const searchApi = new SearchApi(configuration);
|
|
48815
|
-
const [searchPackagesError, searchPackagesResult] = await
|
|
49151
|
+
const [searchPackagesError, searchPackagesResult] = await catchError16(searchApi.searchSearchPackages({
|
|
48816
49152
|
searchFilter: {
|
|
48817
49153
|
orderByColumn: options.orderBy,
|
|
48818
49154
|
orderByDirection: options.orderDirection,
|
|
@@ -48821,15 +49157,15 @@ var registerPackagesListCommand = (program) => {
|
|
|
48821
49157
|
}));
|
|
48822
49158
|
if (searchPackagesError) {
|
|
48823
49159
|
const { message, details } = await extractErrorDetails9(searchPackagesError);
|
|
48824
|
-
|
|
49160
|
+
OutputFormatter14.error({
|
|
48825
49161
|
Result: "Failure",
|
|
48826
49162
|
Message: message,
|
|
48827
49163
|
Instructions: `Failed to list packages. Details: ${details}`
|
|
48828
49164
|
});
|
|
48829
|
-
|
|
49165
|
+
processContext14.exit(1);
|
|
48830
49166
|
return;
|
|
48831
49167
|
}
|
|
48832
|
-
|
|
49168
|
+
OutputFormatter14.success({
|
|
48833
49169
|
Result: "Success",
|
|
48834
49170
|
Code: "SolutionPackagesList",
|
|
48835
49171
|
Data: searchPackagesResult.values
|
|
@@ -48839,22 +49175,22 @@ var registerPackagesListCommand = (program) => {
|
|
|
48839
49175
|
|
|
48840
49176
|
// src/commands/packages.ts
|
|
48841
49177
|
var registerPackagesCommand = (program) => {
|
|
48842
|
-
const packages = program.command("packages").description("
|
|
49178
|
+
const packages = program.command("packages").description("Solution packages — packaged solution bundles published to UiPath for deployment. Use 'packages list' to find available packages for 'deploy run'.");
|
|
48843
49179
|
registerPackagesListCommand(packages);
|
|
48844
49180
|
registerPackagesDeleteCommand(packages);
|
|
48845
49181
|
};
|
|
48846
49182
|
|
|
48847
49183
|
// src/commands/project.ts
|
|
48848
|
-
import { getFileSystem as
|
|
49184
|
+
import { getFileSystem as getFileSystem13 } from "@uipath/filesystem";
|
|
48849
49185
|
|
|
48850
49186
|
// src/commands/project-add.ts
|
|
48851
49187
|
import { randomUUID } from "node:crypto";
|
|
48852
|
-
import { OutputFormatter as
|
|
48853
|
-
import { getFileSystem as
|
|
49188
|
+
import { OutputFormatter as OutputFormatter15, processContext as processContext15 } from "@uipath/common";
|
|
49189
|
+
import { getFileSystem as getFileSystem10 } from "@uipath/filesystem";
|
|
48854
49190
|
|
|
48855
49191
|
// src/commands/project-utils.ts
|
|
48856
|
-
import { catchError as
|
|
48857
|
-
import { getFileSystem as
|
|
49192
|
+
import { catchError as catchError18 } from "@uipath/common";
|
|
49193
|
+
import { getFileSystem as getFileSystem9 } from "@uipath/filesystem";
|
|
48858
49194
|
|
|
48859
49195
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/index.js
|
|
48860
49196
|
var import_reflect_metadata = __toESM(require_Reflect(), 1);
|
|
@@ -60250,15 +60586,15 @@ class CliAccessProvider {
|
|
|
60250
60586
|
}
|
|
60251
60587
|
|
|
60252
60588
|
// src/providers/file-storage-provider.ts
|
|
60253
|
-
import { catchError as
|
|
60254
|
-
import { getFileSystem as
|
|
60589
|
+
import { catchError as catchError17, logger as logger5 } from "@uipath/common";
|
|
60590
|
+
import { getFileSystem as getFileSystem8 } from "@uipath/filesystem";
|
|
60255
60591
|
|
|
60256
60592
|
class FileSystemFileStorageProvider {
|
|
60257
60593
|
basePath;
|
|
60258
60594
|
fs;
|
|
60259
60595
|
constructor(basePath) {
|
|
60260
60596
|
this.basePath = basePath;
|
|
60261
|
-
this.fs =
|
|
60597
|
+
this.fs = getFileSystem8();
|
|
60262
60598
|
}
|
|
60263
60599
|
async fileExistsAsync(filePath, cancellationToken) {
|
|
60264
60600
|
this.throwIfCancelled(cancellationToken);
|
|
@@ -60317,7 +60653,7 @@ class FileSystemFileStorageProvider {
|
|
|
60317
60653
|
async deleteFileAsync(filePath, cancellationToken) {
|
|
60318
60654
|
this.throwIfCancelled(cancellationToken);
|
|
60319
60655
|
const fullPath = this.fs.path.join(this.basePath, filePath);
|
|
60320
|
-
const [deleteError] = await
|
|
60656
|
+
const [deleteError] = await catchError17(this.fs.rm(fullPath));
|
|
60321
60657
|
if (deleteError) {
|
|
60322
60658
|
logger5.warn(`File not found, skipping delete: ${fullPath}`);
|
|
60323
60659
|
}
|
|
@@ -60338,13 +60674,13 @@ class FileSystemFileStorageProvider {
|
|
|
60338
60674
|
}
|
|
60339
60675
|
this.throwIfCancelled(cancellationToken);
|
|
60340
60676
|
const results = [];
|
|
60341
|
-
const [readdirError, entries] = await
|
|
60677
|
+
const [readdirError, entries] = await catchError17(this.fs.readdir(dir));
|
|
60342
60678
|
if (readdirError) {
|
|
60343
60679
|
return [];
|
|
60344
60680
|
}
|
|
60345
60681
|
for (const entryName of entries) {
|
|
60346
60682
|
const fullPath = this.fs.path.join(dir, entryName);
|
|
60347
|
-
const [statError, stat] = await
|
|
60683
|
+
const [statError, stat] = await catchError17(this.fs.stat(fullPath));
|
|
60348
60684
|
if (statError || !stat) {
|
|
60349
60685
|
continue;
|
|
60350
60686
|
}
|
|
@@ -60395,7 +60731,7 @@ async function createResourceBuilderServices() {
|
|
|
60395
60731
|
|
|
60396
60732
|
// src/commands/project-utils.ts
|
|
60397
60733
|
async function findProjectFile(projectDir) {
|
|
60398
|
-
const fs =
|
|
60734
|
+
const fs = getFileSystem9();
|
|
60399
60735
|
const uiprojPath = fs.path.join(projectDir, "project.uiproj");
|
|
60400
60736
|
const jsonProjPath = fs.path.join(projectDir, "project.json");
|
|
60401
60737
|
if (await fs.exists(uiprojPath)) {
|
|
@@ -60424,12 +60760,12 @@ async function findProjectFile(projectDir) {
|
|
|
60424
60760
|
];
|
|
60425
60761
|
}
|
|
60426
60762
|
async function readProjectFile(filePath, useProjectJson) {
|
|
60427
|
-
const fs =
|
|
60428
|
-
const [readError, rawContent] = await
|
|
60763
|
+
const fs = getFileSystem9();
|
|
60764
|
+
const [readError, rawContent] = await catchError18(fs.readFile(filePath, "utf-8"));
|
|
60429
60765
|
if (readError || !rawContent) {
|
|
60430
60766
|
return [readError ?? new Error("Unable to read project file"), null];
|
|
60431
60767
|
}
|
|
60432
|
-
const [parseError, content] =
|
|
60768
|
+
const [parseError, content] = catchError18(() => JSON.parse(rawContent));
|
|
60433
60769
|
if (parseError) {
|
|
60434
60770
|
return [
|
|
60435
60771
|
new Error(`Invalid JSON in project file: ${parseError.message}`),
|
|
@@ -60443,12 +60779,12 @@ async function readProjectFile(filePath, useProjectJson) {
|
|
|
60443
60779
|
return [null, { content, projectType }];
|
|
60444
60780
|
}
|
|
60445
60781
|
async function readSolutionFile(filePath) {
|
|
60446
|
-
const fs =
|
|
60447
|
-
const [readError, rawContent] = await
|
|
60782
|
+
const fs = getFileSystem9();
|
|
60783
|
+
const [readError, rawContent] = await catchError18(fs.readFile(filePath, "utf-8"));
|
|
60448
60784
|
if (readError || !rawContent) {
|
|
60449
60785
|
return [readError ?? new Error("Unable to read solution file"), null];
|
|
60450
60786
|
}
|
|
60451
|
-
const [parseError, solution] =
|
|
60787
|
+
const [parseError, solution] = catchError18(() => JSON.parse(rawContent));
|
|
60452
60788
|
if (parseError) {
|
|
60453
60789
|
return [
|
|
60454
60790
|
new Error(`Invalid JSON in solution file: ${parseError.message}`),
|
|
@@ -60458,7 +60794,7 @@ async function readSolutionFile(filePath) {
|
|
|
60458
60794
|
return [null, { solution, rawContent }];
|
|
60459
60795
|
}
|
|
60460
60796
|
async function resolveSolutionFilePath(solutionFileOption, searchStartDir) {
|
|
60461
|
-
const fs =
|
|
60797
|
+
const fs = getFileSystem9();
|
|
60462
60798
|
if (solutionFileOption) {
|
|
60463
60799
|
const resolved = fs.path.resolve(fs.env.cwd(), solutionFileOption);
|
|
60464
60800
|
const exists = await fs.exists(resolved);
|
|
@@ -60467,114 +60803,114 @@ async function resolveSolutionFilePath(solutionFileOption, searchStartDir) {
|
|
|
60467
60803
|
}
|
|
60468
60804
|
return [null, resolved];
|
|
60469
60805
|
}
|
|
60470
|
-
const [findError, found] = await
|
|
60806
|
+
const [findError, found] = await catchError18(findSolutionFile(searchStartDir));
|
|
60471
60807
|
if (findError) {
|
|
60472
60808
|
return [findError, null];
|
|
60473
60809
|
}
|
|
60474
60810
|
return [null, found];
|
|
60475
60811
|
}
|
|
60476
60812
|
async function writeSolutionFile(filePath, solution) {
|
|
60477
|
-
const fs =
|
|
60478
|
-
const [writeError] = await
|
|
60813
|
+
const fs = getFileSystem9();
|
|
60814
|
+
const [writeError] = await catchError18(fs.writeFile(filePath, `${JSON.stringify(solution, null, 2)}
|
|
60479
60815
|
`));
|
|
60480
60816
|
return writeError;
|
|
60481
60817
|
}
|
|
60482
60818
|
async function createProjectInSolutionBuilder(solutionDir, projectId, projectName, projectType) {
|
|
60483
|
-
const [servicesError, services] = await
|
|
60819
|
+
const [servicesError, services] = await catchError18(createResourceBuilderServices());
|
|
60484
60820
|
if (servicesError) {
|
|
60485
60821
|
return servicesError;
|
|
60486
60822
|
}
|
|
60487
|
-
const [builderError, solutionBuilder] = await
|
|
60823
|
+
const [builderError, solutionBuilder] = await catchError18(services.getSolutionBuilder(solutionDir));
|
|
60488
60824
|
if (builderError) {
|
|
60489
60825
|
return builderError;
|
|
60490
60826
|
}
|
|
60491
|
-
const [createError] = await
|
|
60827
|
+
const [createError] = await catchError18(solutionBuilder.createProjectAsync({
|
|
60492
60828
|
projectKey: projectId,
|
|
60493
60829
|
name: projectName,
|
|
60494
60830
|
type: projectType
|
|
60495
60831
|
}));
|
|
60496
|
-
await
|
|
60832
|
+
await catchError18(solutionBuilder.disposeAsync());
|
|
60497
60833
|
return createError;
|
|
60498
60834
|
}
|
|
60499
60835
|
|
|
60500
60836
|
// src/commands/project-add.ts
|
|
60501
60837
|
var registerProjectAddCommand = (project) => {
|
|
60502
|
-
project.command("add").description("
|
|
60503
|
-
const fs =
|
|
60838
|
+
project.command("add").description("Register an existing project subfolder in the .uipx solution manifest. The project folder must already reside inside the solution directory. Use 'project import' instead to copy an external project into the solution.").argument("<projectPath>", "Path to the project folder (must contain project.uiproj or project.json)").argument("[solutionFile]", "Path to the .uipx solution file (defaults to the nearest .uipx file found by searching up from the project path)").trackedAction(processContext15, async (projectPath, solutionFile) => {
|
|
60839
|
+
const fs = getFileSystem10();
|
|
60504
60840
|
const resolvedProjectPath = fs.path.resolve(fs.env.cwd(), projectPath);
|
|
60505
60841
|
const isResolvedProjectPathValid = await fs.exists(resolvedProjectPath);
|
|
60506
60842
|
if (!isResolvedProjectPathValid) {
|
|
60507
|
-
|
|
60843
|
+
OutputFormatter15.error({
|
|
60508
60844
|
Result: "Failure",
|
|
60509
60845
|
Message: "Failed to add project to solution",
|
|
60510
60846
|
Instructions: `Project folder not found: ${resolvedProjectPath}`
|
|
60511
60847
|
});
|
|
60512
|
-
|
|
60848
|
+
processContext15.exit(1);
|
|
60513
60849
|
return;
|
|
60514
60850
|
}
|
|
60515
60851
|
const [projectFileError, projectFileInfo] = await findProjectFile(resolvedProjectPath);
|
|
60516
60852
|
if (projectFileError) {
|
|
60517
|
-
|
|
60853
|
+
OutputFormatter15.error({
|
|
60518
60854
|
Result: "Failure",
|
|
60519
60855
|
Message: "Failed to add project to solution",
|
|
60520
60856
|
Instructions: projectFileError.message
|
|
60521
60857
|
});
|
|
60522
|
-
|
|
60858
|
+
processContext15.exit(1);
|
|
60523
60859
|
return;
|
|
60524
60860
|
}
|
|
60525
60861
|
const [solutionFileError, resolvedSolutionFile] = await resolveSolutionFilePath(solutionFile, resolvedProjectPath);
|
|
60526
60862
|
if (solutionFileError) {
|
|
60527
|
-
|
|
60863
|
+
OutputFormatter15.error({
|
|
60528
60864
|
Result: "Failure",
|
|
60529
60865
|
Message: "Failed to add project to solution",
|
|
60530
60866
|
Instructions: solutionFileError.message
|
|
60531
60867
|
});
|
|
60532
|
-
|
|
60868
|
+
processContext15.exit(1);
|
|
60533
60869
|
return;
|
|
60534
60870
|
}
|
|
60535
60871
|
const solutionDir = fs.path.dirname(resolvedSolutionFile);
|
|
60536
60872
|
const relativePath = fs.path.relative(solutionDir, resolvedProjectPath);
|
|
60537
60873
|
if (relativePath.startsWith("..")) {
|
|
60538
|
-
|
|
60874
|
+
OutputFormatter15.error({
|
|
60539
60875
|
Result: "Failure",
|
|
60540
60876
|
Message: "Failed to add project to solution",
|
|
60541
60877
|
Instructions: `Project must reside within the solution folder.
|
|
60542
60878
|
Solution: ${solutionDir}
|
|
60543
60879
|
Project: ${resolvedProjectPath}`
|
|
60544
60880
|
});
|
|
60545
|
-
|
|
60881
|
+
processContext15.exit(1);
|
|
60546
60882
|
return;
|
|
60547
60883
|
}
|
|
60548
60884
|
const [readProjectError, parsedProject] = await readProjectFile(projectFileInfo.filePath, projectFileInfo.useProjectJson);
|
|
60549
60885
|
if (readProjectError) {
|
|
60550
|
-
|
|
60886
|
+
OutputFormatter15.error({
|
|
60551
60887
|
Result: "Failure",
|
|
60552
60888
|
Message: "Failed to add project to solution",
|
|
60553
60889
|
Instructions: readProjectError.message
|
|
60554
60890
|
});
|
|
60555
|
-
|
|
60891
|
+
processContext15.exit(1);
|
|
60556
60892
|
return;
|
|
60557
60893
|
}
|
|
60558
60894
|
const [readSolutionError, parsedSolution] = await readSolutionFile(resolvedSolutionFile);
|
|
60559
60895
|
if (readSolutionError) {
|
|
60560
|
-
|
|
60896
|
+
OutputFormatter15.error({
|
|
60561
60897
|
Result: "Failure",
|
|
60562
60898
|
Message: "Failed to add project to solution",
|
|
60563
60899
|
Instructions: readSolutionError.message
|
|
60564
60900
|
});
|
|
60565
|
-
|
|
60901
|
+
processContext15.exit(1);
|
|
60566
60902
|
return;
|
|
60567
60903
|
}
|
|
60568
60904
|
const { solution } = parsedSolution;
|
|
60569
60905
|
const projectRelativePath = fs.path.join(relativePath, projectFileInfo.fileName);
|
|
60570
60906
|
const alreadyExists = solution.Projects?.some((p) => p.ProjectRelativePath === projectRelativePath);
|
|
60571
60907
|
if (alreadyExists) {
|
|
60572
|
-
|
|
60908
|
+
OutputFormatter15.error({
|
|
60573
60909
|
Result: "Failure",
|
|
60574
60910
|
Message: "Failed to add project to solution",
|
|
60575
60911
|
Instructions: `Project already exists in solution: ${projectRelativePath}`
|
|
60576
60912
|
});
|
|
60577
|
-
|
|
60913
|
+
processContext15.exit(1);
|
|
60578
60914
|
return;
|
|
60579
60915
|
}
|
|
60580
60916
|
const projectId = randomUUID();
|
|
@@ -60589,25 +60925,25 @@ var registerProjectAddCommand = (project) => {
|
|
|
60589
60925
|
});
|
|
60590
60926
|
const writeError = await writeSolutionFile(resolvedSolutionFile, solution);
|
|
60591
60927
|
if (writeError) {
|
|
60592
|
-
|
|
60928
|
+
OutputFormatter15.error({
|
|
60593
60929
|
Result: "Failure",
|
|
60594
60930
|
Message: "Failed to add project to solution",
|
|
60595
60931
|
Instructions: writeError.message
|
|
60596
60932
|
});
|
|
60597
|
-
|
|
60933
|
+
processContext15.exit(1);
|
|
60598
60934
|
return;
|
|
60599
60935
|
}
|
|
60600
60936
|
const createError = await createProjectInSolutionBuilder(solutionDir, projectId, projectName, parsedProject.projectType);
|
|
60601
60937
|
if (createError) {
|
|
60602
|
-
|
|
60938
|
+
OutputFormatter15.error({
|
|
60603
60939
|
Result: "Failure",
|
|
60604
60940
|
Message: "Failed to add project to solution",
|
|
60605
60941
|
Instructions: createError.message
|
|
60606
60942
|
});
|
|
60607
|
-
|
|
60943
|
+
processContext15.exit(1);
|
|
60608
60944
|
return;
|
|
60609
60945
|
}
|
|
60610
|
-
|
|
60946
|
+
OutputFormatter15.success({
|
|
60611
60947
|
Result: "Success",
|
|
60612
60948
|
Code: "ProjectAdd",
|
|
60613
60949
|
Data: {
|
|
@@ -60621,70 +60957,70 @@ var registerProjectAddCommand = (project) => {
|
|
|
60621
60957
|
|
|
60622
60958
|
// src/commands/project-import.ts
|
|
60623
60959
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
60624
|
-
import { catchError as
|
|
60625
|
-
import { getFileSystem as
|
|
60960
|
+
import { catchError as catchError19, OutputFormatter as OutputFormatter16, processContext as processContext16 } from "@uipath/common";
|
|
60961
|
+
import { getFileSystem as getFileSystem11 } from "@uipath/filesystem";
|
|
60626
60962
|
var registerProjectImportCommand = (project) => {
|
|
60627
|
-
project.command("import").description("
|
|
60963
|
+
project.command("import").description("Copy an external project folder into the solution directory and register it in the .uipx manifest. Unlike 'project add' which references an existing subfolder, import copies the source files into the solution tree.").requiredOption("--source <path>", "Path to the project folder to import (must contain project.uiproj or project.json)").option("--solutionFile <path>", "Path to the .uipx solution file (defaults to the nearest .uipx file found by searching up from the current directory)").trackedAction(processContext16, async (options) => {
|
|
60628
60964
|
const { source: sourcePath, solutionFile } = options;
|
|
60629
|
-
const fs =
|
|
60965
|
+
const fs = getFileSystem11();
|
|
60630
60966
|
const cwd = fs.env.cwd();
|
|
60631
60967
|
const resolvedSourcePath = fs.path.resolve(cwd, sourcePath);
|
|
60632
|
-
const [statError, sourceStats] = await
|
|
60968
|
+
const [statError, sourceStats] = await catchError19(fs.stat(resolvedSourcePath));
|
|
60633
60969
|
if (statError) {
|
|
60634
|
-
|
|
60970
|
+
OutputFormatter16.error({
|
|
60635
60971
|
Result: "Failure",
|
|
60636
60972
|
Message: "Failed to import project into solution",
|
|
60637
60973
|
Instructions: statError.message
|
|
60638
60974
|
});
|
|
60639
|
-
|
|
60975
|
+
processContext16.exit(1);
|
|
60640
60976
|
return;
|
|
60641
60977
|
}
|
|
60642
60978
|
if (!sourceStats) {
|
|
60643
|
-
|
|
60979
|
+
OutputFormatter16.error({
|
|
60644
60980
|
Result: "Failure",
|
|
60645
60981
|
Message: "Failed to import project into solution",
|
|
60646
60982
|
Instructions: `Source project folder not found: ${resolvedSourcePath}`
|
|
60647
60983
|
});
|
|
60648
|
-
|
|
60984
|
+
processContext16.exit(1);
|
|
60649
60985
|
return;
|
|
60650
60986
|
}
|
|
60651
60987
|
if (!sourceStats.isDirectory()) {
|
|
60652
|
-
|
|
60988
|
+
OutputFormatter16.error({
|
|
60653
60989
|
Result: "Failure",
|
|
60654
60990
|
Message: "Failed to import project into solution",
|
|
60655
60991
|
Instructions: `Source path is not a directory: ${resolvedSourcePath}`
|
|
60656
60992
|
});
|
|
60657
|
-
|
|
60993
|
+
processContext16.exit(1);
|
|
60658
60994
|
return;
|
|
60659
60995
|
}
|
|
60660
60996
|
const [projectFileError, projectFileInfo] = await findProjectFile(resolvedSourcePath);
|
|
60661
60997
|
if (projectFileError) {
|
|
60662
|
-
|
|
60998
|
+
OutputFormatter16.error({
|
|
60663
60999
|
Result: "Failure",
|
|
60664
61000
|
Message: "Failed to import project into solution",
|
|
60665
61001
|
Instructions: projectFileError.message
|
|
60666
61002
|
});
|
|
60667
|
-
|
|
61003
|
+
processContext16.exit(1);
|
|
60668
61004
|
return;
|
|
60669
61005
|
}
|
|
60670
61006
|
const [readProjectError, parsedProject] = await readProjectFile(projectFileInfo.filePath, projectFileInfo.useProjectJson);
|
|
60671
61007
|
if (readProjectError) {
|
|
60672
|
-
|
|
61008
|
+
OutputFormatter16.error({
|
|
60673
61009
|
Result: "Failure",
|
|
60674
61010
|
Message: "Failed to import project into solution",
|
|
60675
61011
|
Instructions: readProjectError.message
|
|
60676
61012
|
});
|
|
60677
|
-
|
|
61013
|
+
processContext16.exit(1);
|
|
60678
61014
|
return;
|
|
60679
61015
|
}
|
|
60680
61016
|
const [solutionFileError, resolvedSolutionFile] = await resolveSolutionFilePath(solutionFile, cwd);
|
|
60681
61017
|
if (solutionFileError) {
|
|
60682
|
-
|
|
61018
|
+
OutputFormatter16.error({
|
|
60683
61019
|
Result: "Failure",
|
|
60684
61020
|
Message: "Failed to import project into solution",
|
|
60685
61021
|
Instructions: solutionFileError.message
|
|
60686
61022
|
});
|
|
60687
|
-
|
|
61023
|
+
processContext16.exit(1);
|
|
60688
61024
|
return;
|
|
60689
61025
|
}
|
|
60690
61026
|
const solutionDir = fs.path.dirname(resolvedSolutionFile);
|
|
@@ -60692,45 +61028,45 @@ var registerProjectImportCommand = (project) => {
|
|
|
60692
61028
|
const targetProjectPath = fs.path.join(solutionDir, projectFolderName);
|
|
60693
61029
|
const targetAlreadyExists = await fs.exists(targetProjectPath);
|
|
60694
61030
|
if (targetAlreadyExists) {
|
|
60695
|
-
|
|
61031
|
+
OutputFormatter16.error({
|
|
60696
61032
|
Result: "Failure",
|
|
60697
61033
|
Message: "Failed to import project into solution",
|
|
60698
61034
|
Instructions: `Project already exists at destination: ${targetProjectPath}`
|
|
60699
61035
|
});
|
|
60700
|
-
|
|
61036
|
+
processContext16.exit(1);
|
|
60701
61037
|
return;
|
|
60702
61038
|
}
|
|
60703
61039
|
const [readSolutionError, parsedSolution] = await readSolutionFile(resolvedSolutionFile);
|
|
60704
61040
|
if (readSolutionError) {
|
|
60705
|
-
|
|
61041
|
+
OutputFormatter16.error({
|
|
60706
61042
|
Result: "Failure",
|
|
60707
61043
|
Message: "Failed to import project into solution",
|
|
60708
61044
|
Instructions: readSolutionError.message
|
|
60709
61045
|
});
|
|
60710
|
-
|
|
61046
|
+
processContext16.exit(1);
|
|
60711
61047
|
return;
|
|
60712
61048
|
}
|
|
60713
61049
|
const { solution, rawContent: originalSolutionContent } = parsedSolution;
|
|
60714
61050
|
const projectRelativePath = fs.path.join(projectFolderName, projectFileInfo.fileName);
|
|
60715
61051
|
const alreadyExists = solution.Projects?.some((p) => p.ProjectRelativePath === projectRelativePath);
|
|
60716
61052
|
if (alreadyExists) {
|
|
60717
|
-
|
|
61053
|
+
OutputFormatter16.error({
|
|
60718
61054
|
Result: "Failure",
|
|
60719
61055
|
Message: "Failed to import project into solution",
|
|
60720
61056
|
Instructions: `Project already exists in solution manifest: ${projectRelativePath}`
|
|
60721
61057
|
});
|
|
60722
|
-
|
|
61058
|
+
processContext16.exit(1);
|
|
60723
61059
|
return;
|
|
60724
61060
|
}
|
|
60725
|
-
const [copyError] = await
|
|
61061
|
+
const [copyError] = await catchError19(fs.copyDirectory(resolvedSourcePath, targetProjectPath));
|
|
60726
61062
|
if (copyError) {
|
|
60727
|
-
await
|
|
60728
|
-
|
|
61063
|
+
await catchError19(fs.rm(targetProjectPath));
|
|
61064
|
+
OutputFormatter16.error({
|
|
60729
61065
|
Result: "Failure",
|
|
60730
61066
|
Message: "Failed to import project into solution",
|
|
60731
61067
|
Instructions: `Failed to copy project: ${copyError.message}`
|
|
60732
61068
|
});
|
|
60733
|
-
|
|
61069
|
+
processContext16.exit(1);
|
|
60734
61070
|
return;
|
|
60735
61071
|
}
|
|
60736
61072
|
const projectId = randomUUID2();
|
|
@@ -60745,31 +61081,31 @@ var registerProjectImportCommand = (project) => {
|
|
|
60745
61081
|
});
|
|
60746
61082
|
const writeError = await writeSolutionFile(resolvedSolutionFile, solution);
|
|
60747
61083
|
if (writeError) {
|
|
60748
|
-
await
|
|
60749
|
-
|
|
61084
|
+
await catchError19(fs.rm(targetProjectPath));
|
|
61085
|
+
OutputFormatter16.error({
|
|
60750
61086
|
Result: "Failure",
|
|
60751
61087
|
Message: "Failed to import project into solution",
|
|
60752
61088
|
Instructions: writeError.message
|
|
60753
61089
|
});
|
|
60754
|
-
|
|
61090
|
+
processContext16.exit(1);
|
|
60755
61091
|
return;
|
|
60756
61092
|
}
|
|
60757
61093
|
const rollback = async () => {
|
|
60758
|
-
await
|
|
60759
|
-
await
|
|
61094
|
+
await catchError19(fs.rm(targetProjectPath));
|
|
61095
|
+
await catchError19(fs.writeFile(resolvedSolutionFile, originalSolutionContent));
|
|
60760
61096
|
};
|
|
60761
61097
|
const createError = await createProjectInSolutionBuilder(solutionDir, projectId, projectName, parsedProject.projectType);
|
|
60762
61098
|
if (createError) {
|
|
60763
61099
|
await rollback();
|
|
60764
|
-
|
|
61100
|
+
OutputFormatter16.error({
|
|
60765
61101
|
Result: "Failure",
|
|
60766
61102
|
Message: "Failed to import project into solution",
|
|
60767
61103
|
Instructions: createError.message
|
|
60768
61104
|
});
|
|
60769
|
-
|
|
61105
|
+
processContext16.exit(1);
|
|
60770
61106
|
return;
|
|
60771
61107
|
}
|
|
60772
|
-
|
|
61108
|
+
OutputFormatter16.success({
|
|
60773
61109
|
Result: "Success",
|
|
60774
61110
|
Code: "ProjectImport",
|
|
60775
61111
|
Data: {
|
|
@@ -60782,54 +61118,54 @@ var registerProjectImportCommand = (project) => {
|
|
|
60782
61118
|
};
|
|
60783
61119
|
|
|
60784
61120
|
// src/commands/project-remove.ts
|
|
60785
|
-
import { catchError as
|
|
60786
|
-
import { getFileSystem as
|
|
61121
|
+
import { catchError as catchError20, OutputFormatter as OutputFormatter17, processContext as processContext17 } from "@uipath/common";
|
|
61122
|
+
import { getFileSystem as getFileSystem12 } from "@uipath/filesystem";
|
|
60787
61123
|
var registerProjectRemoveCommand = (project) => {
|
|
60788
|
-
project.command("remove").description("
|
|
60789
|
-
const fs =
|
|
61124
|
+
project.command("remove").description("Unregister a project from the .uipx solution manifest and remove its entry from the solution builder. Does not delete the project files from disk.").argument("<projectPath>", "Path to the project folder to remove").argument("[solutionFile]", "Path to the .uipx solution file (defaults to the nearest .uipx file found by searching up from the project path)").trackedAction(processContext17, async (projectPath, solutionFile) => {
|
|
61125
|
+
const fs = getFileSystem12();
|
|
60790
61126
|
const resolvedProjectPath = fs.path.resolve(fs.env.cwd(), projectPath);
|
|
60791
61127
|
const [solutionFileError, resolvedSolutionFile] = await resolveSolutionFilePath(solutionFile, resolvedProjectPath);
|
|
60792
61128
|
if (solutionFileError) {
|
|
60793
|
-
|
|
61129
|
+
OutputFormatter17.error({
|
|
60794
61130
|
Result: "Failure",
|
|
60795
61131
|
Message: "Failed to remove project from solution",
|
|
60796
61132
|
Instructions: solutionFileError.message
|
|
60797
61133
|
});
|
|
60798
|
-
|
|
61134
|
+
processContext17.exit(1);
|
|
60799
61135
|
return;
|
|
60800
61136
|
}
|
|
60801
61137
|
const solutionDir = fs.path.dirname(resolvedSolutionFile);
|
|
60802
61138
|
const relativePath = fs.path.relative(solutionDir, resolvedProjectPath);
|
|
60803
61139
|
if (relativePath.startsWith("..")) {
|
|
60804
|
-
|
|
61140
|
+
OutputFormatter17.error({
|
|
60805
61141
|
Result: "Failure",
|
|
60806
61142
|
Message: "Failed to remove project from solution",
|
|
60807
61143
|
Instructions: `Project must reside within the solution folder.
|
|
60808
61144
|
Solution: ${solutionDir}
|
|
60809
61145
|
Project: ${resolvedProjectPath}`
|
|
60810
61146
|
});
|
|
60811
|
-
|
|
61147
|
+
processContext17.exit(1);
|
|
60812
61148
|
return;
|
|
60813
61149
|
}
|
|
60814
61150
|
const [readSolutionError, parsedSolution] = await readSolutionFile(resolvedSolutionFile);
|
|
60815
61151
|
if (readSolutionError) {
|
|
60816
|
-
|
|
61152
|
+
OutputFormatter17.error({
|
|
60817
61153
|
Result: "Failure",
|
|
60818
61154
|
Message: "Failed to remove project from solution",
|
|
60819
61155
|
Instructions: readSolutionError.message
|
|
60820
61156
|
});
|
|
60821
|
-
|
|
61157
|
+
processContext17.exit(1);
|
|
60822
61158
|
return;
|
|
60823
61159
|
}
|
|
60824
61160
|
const { solution } = parsedSolution;
|
|
60825
61161
|
const projectIndex = (solution.Projects ?? []).findIndex((p) => fs.path.dirname(p.ProjectRelativePath) === relativePath);
|
|
60826
61162
|
if (projectIndex === -1) {
|
|
60827
|
-
|
|
61163
|
+
OutputFormatter17.error({
|
|
60828
61164
|
Result: "Failure",
|
|
60829
61165
|
Message: "Failed to remove project from solution",
|
|
60830
61166
|
Instructions: `Project not found in solution: ${relativePath}`
|
|
60831
61167
|
});
|
|
60832
|
-
|
|
61168
|
+
processContext17.exit(1);
|
|
60833
61169
|
return;
|
|
60834
61170
|
}
|
|
60835
61171
|
const projects = solution.Projects ?? [];
|
|
@@ -60839,46 +61175,46 @@ var registerProjectRemoveCommand = (project) => {
|
|
|
60839
61175
|
solution.Projects = projects;
|
|
60840
61176
|
const writeError = await writeSolutionFile(resolvedSolutionFile, solution);
|
|
60841
61177
|
if (writeError) {
|
|
60842
|
-
|
|
61178
|
+
OutputFormatter17.error({
|
|
60843
61179
|
Result: "Failure",
|
|
60844
61180
|
Message: "Failed to remove project from solution",
|
|
60845
61181
|
Instructions: writeError.message
|
|
60846
61182
|
});
|
|
60847
|
-
|
|
61183
|
+
processContext17.exit(1);
|
|
60848
61184
|
return;
|
|
60849
61185
|
}
|
|
60850
|
-
const [servicesError, services] = await
|
|
61186
|
+
const [servicesError, services] = await catchError20(createResourceBuilderServices());
|
|
60851
61187
|
if (servicesError) {
|
|
60852
|
-
|
|
61188
|
+
OutputFormatter17.error({
|
|
60853
61189
|
Result: "Failure",
|
|
60854
61190
|
Message: "Failed to remove project from solution",
|
|
60855
61191
|
Instructions: servicesError.message
|
|
60856
61192
|
});
|
|
60857
|
-
|
|
61193
|
+
processContext17.exit(1);
|
|
60858
61194
|
return;
|
|
60859
61195
|
}
|
|
60860
|
-
const [builderError, solutionBuilder] = await
|
|
61196
|
+
const [builderError, solutionBuilder] = await catchError20(services.getSolutionBuilder(solutionDir));
|
|
60861
61197
|
if (builderError) {
|
|
60862
|
-
|
|
61198
|
+
OutputFormatter17.error({
|
|
60863
61199
|
Result: "Failure",
|
|
60864
61200
|
Message: "Failed to remove project from solution",
|
|
60865
61201
|
Instructions: builderError.message
|
|
60866
61202
|
});
|
|
60867
|
-
|
|
61203
|
+
processContext17.exit(1);
|
|
60868
61204
|
return;
|
|
60869
61205
|
}
|
|
60870
|
-
const [deleteProjectError] = await
|
|
60871
|
-
await
|
|
61206
|
+
const [deleteProjectError] = await catchError20(solutionBuilder.deleteProjectAsync(projectId));
|
|
61207
|
+
await catchError20(solutionBuilder.disposeAsync());
|
|
60872
61208
|
if (deleteProjectError) {
|
|
60873
|
-
|
|
61209
|
+
OutputFormatter17.error({
|
|
60874
61210
|
Result: "Failure",
|
|
60875
61211
|
Message: "Failed to remove project from solution",
|
|
60876
61212
|
Instructions: deleteProjectError.message
|
|
60877
61213
|
});
|
|
60878
|
-
|
|
61214
|
+
processContext17.exit(1);
|
|
60879
61215
|
return;
|
|
60880
61216
|
}
|
|
60881
|
-
|
|
61217
|
+
OutputFormatter17.success({
|
|
60882
61218
|
Result: "Success",
|
|
60883
61219
|
Code: "ProjectRemove",
|
|
60884
61220
|
Data: {
|
|
@@ -60892,7 +61228,7 @@ var registerProjectRemoveCommand = (project) => {
|
|
|
60892
61228
|
|
|
60893
61229
|
// src/commands/project.ts
|
|
60894
61230
|
async function findSolutionFile(startDir) {
|
|
60895
|
-
const fs =
|
|
61231
|
+
const fs = getFileSystem13();
|
|
60896
61232
|
let dir = startDir;
|
|
60897
61233
|
while (true) {
|
|
60898
61234
|
const entries = await fs.readdir(dir);
|
|
@@ -60911,7 +61247,7 @@ async function findSolutionFile(startDir) {
|
|
|
60911
61247
|
}
|
|
60912
61248
|
}
|
|
60913
61249
|
var registerProjectCommand = (program) => {
|
|
60914
|
-
const project = program.command("project").description("Manage projects
|
|
61250
|
+
const project = program.command("project").description("Manage projects within a UiPath solution (.uipx). Add, import, or remove automation projects (workflows, test cases, libraries) from the solution manifest.");
|
|
60915
61251
|
registerProjectAddCommand(project);
|
|
60916
61252
|
registerProjectImportCommand(project);
|
|
60917
61253
|
registerProjectRemoveCommand(project);
|
|
@@ -60919,57 +61255,57 @@ var registerProjectCommand = (program) => {
|
|
|
60919
61255
|
|
|
60920
61256
|
// src/commands/publish.ts
|
|
60921
61257
|
import {
|
|
60922
|
-
catchError as
|
|
61258
|
+
catchError as catchError21,
|
|
60923
61259
|
extractErrorDetails as extractErrorDetails10,
|
|
60924
|
-
OutputFormatter as
|
|
60925
|
-
processContext as
|
|
61260
|
+
OutputFormatter as OutputFormatter18,
|
|
61261
|
+
processContext as processContext18
|
|
60926
61262
|
} from "@uipath/common";
|
|
60927
|
-
import { getFileSystem as
|
|
61263
|
+
import { getFileSystem as getFileSystem14 } from "@uipath/filesystem";
|
|
60928
61264
|
var registerPublishCommand = (program) => {
|
|
60929
|
-
program.command("publish").description("Publish a solution package (.zip) to UiPath.").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth)").argument("<packagePath>", "Path to a .zip package file
|
|
60930
|
-
const [authError, auth] = await
|
|
61265
|
+
program.command("publish").description("Publish a solution package (.zip) to the UiPath solution feed. The .zip must be produced by 'solution pack'. After publishing, use 'solution deploy run' to deploy it.").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth)").argument("<packagePath>", "Path to a .zip package file produced by 'solution pack'.").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext18, async (packagePath, options) => {
|
|
61266
|
+
const [authError, auth] = await catchError21(getSolutionAuthContext({
|
|
60931
61267
|
tenant: options.tenant,
|
|
60932
61268
|
loginValidity: options.loginValidity
|
|
60933
61269
|
}));
|
|
60934
61270
|
if (authError) {
|
|
60935
|
-
|
|
61271
|
+
OutputFormatter18.error({
|
|
60936
61272
|
Result: "Failure",
|
|
60937
61273
|
Message: authError.message,
|
|
60938
61274
|
Instructions: authError.message
|
|
60939
61275
|
});
|
|
60940
|
-
|
|
61276
|
+
processContext18.exit(1);
|
|
60941
61277
|
return;
|
|
60942
61278
|
}
|
|
60943
|
-
const fs =
|
|
61279
|
+
const fs = getFileSystem14();
|
|
60944
61280
|
const resolvedPath = fs.path.resolve(packagePath);
|
|
60945
61281
|
const fileExists = await fs.exists(resolvedPath);
|
|
60946
61282
|
if (!fileExists) {
|
|
60947
|
-
|
|
61283
|
+
OutputFormatter18.error({
|
|
60948
61284
|
Result: "Failure",
|
|
60949
61285
|
Message: `File not found: ${resolvedPath}`,
|
|
60950
61286
|
Instructions: `Ensure the file path is correct. Build a package first with: uip solution pack`
|
|
60951
61287
|
});
|
|
60952
|
-
|
|
61288
|
+
processContext18.exit(1);
|
|
60953
61289
|
return;
|
|
60954
61290
|
}
|
|
60955
61291
|
if (!resolvedPath.endsWith(".zip")) {
|
|
60956
|
-
|
|
61292
|
+
OutputFormatter18.error({
|
|
60957
61293
|
Result: "Failure",
|
|
60958
61294
|
Message: `Invalid file type. Expected a .zip file, got: ${resolvedPath}`,
|
|
60959
61295
|
Instructions: `Ensure file is a valid .zip solution package from: uip solution pack`
|
|
60960
61296
|
});
|
|
60961
|
-
|
|
61297
|
+
processContext18.exit(1);
|
|
60962
61298
|
return;
|
|
60963
61299
|
}
|
|
60964
|
-
const [fileBufferError, fileBuffer] = await
|
|
61300
|
+
const [fileBufferError, fileBuffer] = await catchError21(fs.readFile(resolvedPath));
|
|
60965
61301
|
if (fileBufferError) {
|
|
60966
61302
|
const { message } = await extractErrorDetails10(fileBufferError);
|
|
60967
|
-
|
|
61303
|
+
OutputFormatter18.error({
|
|
60968
61304
|
Result: "Failure",
|
|
60969
61305
|
Message: message,
|
|
60970
61306
|
Instructions: `Unable to read file: ${resolvedPath}`
|
|
60971
61307
|
});
|
|
60972
|
-
|
|
61308
|
+
processContext18.exit(1);
|
|
60973
61309
|
return;
|
|
60974
61310
|
}
|
|
60975
61311
|
const configuration = new Configuration({
|
|
@@ -60977,20 +61313,20 @@ var registerPublishCommand = (program) => {
|
|
|
60977
61313
|
accessToken: auth.accessToken
|
|
60978
61314
|
});
|
|
60979
61315
|
const api = new PipelinesApi(configuration);
|
|
60980
|
-
const [uploadError, uploadResult] = await
|
|
61316
|
+
const [uploadError, uploadResult] = await catchError21(api.pipelinesPackageUpload({
|
|
60981
61317
|
body: fileBuffer
|
|
60982
61318
|
}));
|
|
60983
61319
|
if (uploadError) {
|
|
60984
61320
|
const { message, details } = await extractErrorDetails10(uploadError);
|
|
60985
|
-
|
|
61321
|
+
OutputFormatter18.error({
|
|
60986
61322
|
Result: "Failure",
|
|
60987
61323
|
Message: message,
|
|
60988
61324
|
Instructions: `Ensure file is a valid .zip solution package from: uip solution pack. Details: ${details}`
|
|
60989
61325
|
});
|
|
60990
|
-
|
|
61326
|
+
processContext18.exit(1);
|
|
60991
61327
|
return;
|
|
60992
61328
|
}
|
|
60993
|
-
|
|
61329
|
+
OutputFormatter18.success({
|
|
60994
61330
|
Result: "Success",
|
|
60995
61331
|
Code: "SolutionPublish",
|
|
60996
61332
|
Data: {
|
|
@@ -61006,13 +61342,13 @@ var registerPublishCommand = (program) => {
|
|
|
61006
61342
|
// src/commands/upload.ts
|
|
61007
61343
|
import { getLoginStatusAsync as getLoginStatusAsync5 } from "@uipath/auth";
|
|
61008
61344
|
import {
|
|
61009
|
-
catchError as
|
|
61345
|
+
catchError as catchError22,
|
|
61010
61346
|
extractErrorMessage,
|
|
61011
61347
|
logger as logger6,
|
|
61012
|
-
OutputFormatter as
|
|
61013
|
-
processContext as
|
|
61348
|
+
OutputFormatter as OutputFormatter19,
|
|
61349
|
+
processContext as processContext19
|
|
61014
61350
|
} from "@uipath/common";
|
|
61015
|
-
import { getFileSystem as
|
|
61351
|
+
import { getFileSystem as getFileSystem15 } from "@uipath/filesystem";
|
|
61016
61352
|
class HttpError extends Error {
|
|
61017
61353
|
status;
|
|
61018
61354
|
constructor(status, message) {
|
|
@@ -61066,7 +61402,7 @@ async function overwriteSolution(baseUrl, organizationName, tenantId, accessToke
|
|
|
61066
61402
|
async function uploadOrOverwrite(baseUrl, organizationName, tenantId, accessToken, fileBuffer, fileName, solutionId) {
|
|
61067
61403
|
if (solutionId) {
|
|
61068
61404
|
logger6.info(`Attempting to overwrite existing solution ${solutionId} on Studio Web...`);
|
|
61069
|
-
const [overwriteError, overwriteResult] = await
|
|
61405
|
+
const [overwriteError, overwriteResult] = await catchError22(overwriteSolution(baseUrl, organizationName, tenantId, accessToken, fileBuffer, fileName, solutionId));
|
|
61070
61406
|
if (!overwriteError) {
|
|
61071
61407
|
logger6.info("Solution overwritten successfully.");
|
|
61072
61408
|
return overwriteResult;
|
|
@@ -61081,19 +61417,19 @@ async function uploadOrOverwrite(baseUrl, organizationName, tenantId, accessToke
|
|
|
61081
61417
|
return importSolution(baseUrl, organizationName, tenantId, accessToken, fileBuffer, fileName);
|
|
61082
61418
|
}
|
|
61083
61419
|
var registerUploadCommand = (program) => {
|
|
61084
|
-
program.command("upload").description("Upload a solution to UiPath Studio Web. Accepts a solution directory, .uipx file, or .uis file.").argument("<solutionPath>", "Path to a solution directory (containing .uipx), a .uipx file, or a .uis file.").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(
|
|
61085
|
-
const fs =
|
|
61086
|
-
const [loginError, loginStatus] = await
|
|
61420
|
+
program.command("upload").description("Upload a solution to UiPath Studio Web for browser-based editing. Accepts a solution directory, .uipx file, or .uis file. If the solution already exists on Studio Web (matching SolutionId in .uipx), it overwrites; otherwise imports as new.").argument("<solutionPath>", "Path to a solution directory (containing .uipx), a .uipx file, or a .uis file.").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext19, async (solutionPath, options) => {
|
|
61421
|
+
const fs = getFileSystem15();
|
|
61422
|
+
const [loginError, loginStatus] = await catchError22(getLoginStatusAsync5({
|
|
61087
61423
|
ensureTokenValidityMinutes: options.loginValidity
|
|
61088
61424
|
}));
|
|
61089
61425
|
if (loginError) {
|
|
61090
61426
|
const errorMessage3 = await extractErrorMessage(loginError);
|
|
61091
|
-
|
|
61427
|
+
OutputFormatter19.error({
|
|
61092
61428
|
Result: "Failure",
|
|
61093
61429
|
Message: errorMessage3,
|
|
61094
61430
|
Instructions: loginError.message
|
|
61095
61431
|
});
|
|
61096
|
-
|
|
61432
|
+
processContext19.exit(1);
|
|
61097
61433
|
return;
|
|
61098
61434
|
}
|
|
61099
61435
|
if (loginStatus.loginStatus !== "Logged in" || !loginStatus.accessToken || !loginStatus.baseUrl) {
|
|
@@ -61133,9 +61469,9 @@ var registerUploadCommand = (program) => {
|
|
|
61133
61469
|
} else if (isDirectory || isUipxFile) {
|
|
61134
61470
|
const solutionDir = resolveSolutionDir(resolvedPath);
|
|
61135
61471
|
tempDir = await fs.getTempDir();
|
|
61136
|
-
const [bundleError, bundleResult] = await
|
|
61472
|
+
const [bundleError, bundleResult] = await catchError22(bundleSolution(solutionDir, tempDir));
|
|
61137
61473
|
if (bundleError) {
|
|
61138
|
-
const [cleanupError] = await
|
|
61474
|
+
const [cleanupError] = await catchError22(fs.rm(tempDir));
|
|
61139
61475
|
if (cleanupError) {
|
|
61140
61476
|
logger6.debug(`Failed to clean up temp dir: ${cleanupError.message}`);
|
|
61141
61477
|
}
|
|
@@ -61151,21 +61487,21 @@ var registerUploadCommand = (program) => {
|
|
|
61151
61487
|
return;
|
|
61152
61488
|
}
|
|
61153
61489
|
try {
|
|
61154
|
-
const [readError, fileBuffer] = await
|
|
61490
|
+
const [readError, fileBuffer] = await catchError22(fs.readFile(uisPath));
|
|
61155
61491
|
if (readError || !fileBuffer) {
|
|
61156
61492
|
outputError(`Failed to read file: ${uisPath}${readError ? ` — ${readError.message}` : ""}`);
|
|
61157
61493
|
return;
|
|
61158
61494
|
}
|
|
61159
61495
|
const fileName = fs.path.basename(uisPath);
|
|
61160
|
-
const [uploadError, result] = await
|
|
61496
|
+
const [uploadError, result] = await catchError22(uploadOrOverwrite(baseUrl, organizationName, tenantId, accessToken, fileBuffer, fileName, solutionId));
|
|
61161
61497
|
if (uploadError) {
|
|
61162
61498
|
const errorMessage3 = await extractErrorMessage(uploadError);
|
|
61163
|
-
|
|
61499
|
+
OutputFormatter19.error({
|
|
61164
61500
|
Result: "Failure",
|
|
61165
61501
|
Message: errorMessage3,
|
|
61166
61502
|
Instructions: uploadError.message
|
|
61167
61503
|
});
|
|
61168
|
-
|
|
61504
|
+
processContext19.exit(1);
|
|
61169
61505
|
return;
|
|
61170
61506
|
}
|
|
61171
61507
|
const returnedSolutionId = result.id ?? result.solutionId ?? solutionId;
|
|
@@ -61175,7 +61511,7 @@ var registerUploadCommand = (program) => {
|
|
|
61175
61511
|
const projectId = result.projects?.[0]?.id;
|
|
61176
61512
|
const designerSolutionId = returnedSolutionId ?? solutionId;
|
|
61177
61513
|
const designerUrl = projectId && designerSolutionId ? `${baseUrl}/${organizationName}/studio_/designer/${projectId}?solutionId=${designerSolutionId}` : undefined;
|
|
61178
|
-
|
|
61514
|
+
OutputFormatter19.success({
|
|
61179
61515
|
Result: "Success",
|
|
61180
61516
|
Code: "SolutionUpload",
|
|
61181
61517
|
Data: {
|
|
@@ -61187,7 +61523,7 @@ var registerUploadCommand = (program) => {
|
|
|
61187
61523
|
});
|
|
61188
61524
|
} finally {
|
|
61189
61525
|
if (tempDir) {
|
|
61190
|
-
const [cleanupError] = await
|
|
61526
|
+
const [cleanupError] = await catchError22(fs.rm(tempDir));
|
|
61191
61527
|
if (cleanupError) {
|
|
61192
61528
|
logger6.debug(`Failed to clean up temp dir: ${cleanupError.message}`);
|
|
61193
61529
|
}
|
|
@@ -61196,12 +61532,12 @@ var registerUploadCommand = (program) => {
|
|
|
61196
61532
|
});
|
|
61197
61533
|
};
|
|
61198
61534
|
function outputError(message) {
|
|
61199
|
-
|
|
61535
|
+
OutputFormatter19.error({
|
|
61200
61536
|
Result: "Failure",
|
|
61201
61537
|
Message: message,
|
|
61202
61538
|
Instructions: message
|
|
61203
61539
|
});
|
|
61204
|
-
|
|
61540
|
+
processContext19.exit(1);
|
|
61205
61541
|
}
|
|
61206
61542
|
|
|
61207
61543
|
// src/tool.ts
|