@uipath/api-workflow-tool 1.206.0-preview.306 → 1.207.0-preview.307
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/executor-tool.js +40 -8
- package/dist/{index-3d09whjq.js → index-c6a7npfj.js} +2 -2
- package/dist/{index-9hp2gyn1.js → index-kav5dp9k.js} +3 -3
- package/dist/index.js +7 -7
- package/dist/{node-mt6hegjc.js → node-szcvaymf.js} +4 -4
- package/dist/{packager-tool-61bdk9sn.js → packager-tool-3krn4ar5.js} +18 -7
- package/dist/{packager-tool-rph3pq68.js → packager-tool-bwfnc2ak.js} +80 -17
- package/dist/{packager-tool-2ckhrf4j.js → packager-tool-f5s12jc4.js} +8 -12
- package/dist/{packager-tool-v069z7x2.js → packager-tool-jdrbc2pk.js} +432 -68
- package/dist/{packager-tool-3hmfzeg0.js → packager-tool-pyp8tym0.js} +141 -28
- package/dist/{packager-tool-rqprykf5.js → packager-tool-ryk871db.js} +2 -2
- package/dist/{packager-tool-02cb0chk.js → packager-tool-wytzpk0s.js} +85 -30
- package/dist/{packager-tool-qhv22qaj.js → packager-tool-y9sda1br.js} +133 -106
- package/dist/packager-tool.js +3 -3
- package/dist/tool.js +7 -7
- package/package.json +2 -2
package/dist/executor-tool.js
CHANGED
|
@@ -1,8 +1,33 @@
|
|
|
1
1
|
import {
|
|
2
|
+
hasWorkflowData,
|
|
2
3
|
WorkflowRunService
|
|
3
|
-
} from "./packager-tool-
|
|
4
|
-
import"./packager-tool-
|
|
5
|
-
import"./packager-tool-
|
|
4
|
+
} from "./packager-tool-bwfnc2ak.js";
|
|
5
|
+
import"./packager-tool-pyp8tym0.js";
|
|
6
|
+
import"./packager-tool-y9sda1br.js";
|
|
7
|
+
|
|
8
|
+
// ../executor/jit-debug-contract/src/index.ts
|
|
9
|
+
var ORCHESTRATOR_PROJECT_TYPES = [
|
|
10
|
+
"Undefined",
|
|
11
|
+
"Process",
|
|
12
|
+
"ProcessLibrary",
|
|
13
|
+
"BusinessProcess",
|
|
14
|
+
"BusinessProcessLibrary",
|
|
15
|
+
"TestAutomationProcess",
|
|
16
|
+
"ProcessOrchestration",
|
|
17
|
+
"BusinessProcessOrchestration",
|
|
18
|
+
"WebApp",
|
|
19
|
+
"BusinessWebApp",
|
|
20
|
+
"Agent",
|
|
21
|
+
"BusinessAgent",
|
|
22
|
+
"Api",
|
|
23
|
+
"MCPServer",
|
|
24
|
+
"BusinessRules",
|
|
25
|
+
"CaseManagement",
|
|
26
|
+
"Flow",
|
|
27
|
+
"Function",
|
|
28
|
+
"FlowAutomate"
|
|
29
|
+
];
|
|
30
|
+
var READABLE_PROJECT_TYPES = new Set(ORCHESTRATOR_PROJECT_TYPES.map((type) => type.toLowerCase()));
|
|
6
31
|
// ../executor/project-executor/src/models/run-status.ts
|
|
7
32
|
var TERMINAL_RUN_STATUSES = [
|
|
8
33
|
"Succeeded" /* Succeeded */,
|
|
@@ -130,6 +155,15 @@ class ProjectExecutor {
|
|
|
130
155
|
}
|
|
131
156
|
return;
|
|
132
157
|
}
|
|
158
|
+
buildJitProcessEntriesAsync(_context, _cancellationToken) {
|
|
159
|
+
return Promise.resolve(undefined);
|
|
160
|
+
}
|
|
161
|
+
getProcessCallsAsync(_project, _cancellationToken) {
|
|
162
|
+
return Promise.resolve({
|
|
163
|
+
status: "unknown",
|
|
164
|
+
reason: `${this.constructor.name} does not list the process calls of a project`
|
|
165
|
+
});
|
|
166
|
+
}
|
|
133
167
|
dispose() {
|
|
134
168
|
return Promise.resolve();
|
|
135
169
|
}
|
|
@@ -205,7 +239,8 @@ function toRunResult(outcome, entryPoint) {
|
|
|
205
239
|
if (outcome.success) {
|
|
206
240
|
const result = RunResult.succeeded({
|
|
207
241
|
output: asOutputArguments(outcome.data),
|
|
208
|
-
|
|
242
|
+
...outcome.instructions ? { message: outcome.instructions } : {},
|
|
243
|
+
details: hasWorkflowData(outcome.data) ? { ...details, data: outcome.data } : details
|
|
209
244
|
});
|
|
210
245
|
result.rawStatus = outcome.status;
|
|
211
246
|
return result;
|
|
@@ -227,9 +262,6 @@ function errorCodeFor(stage) {
|
|
|
227
262
|
function asOutputArguments(data) {
|
|
228
263
|
return data !== null && typeof data === "object" && !Array.isArray(data) ? data : undefined;
|
|
229
264
|
}
|
|
230
|
-
function hasData(data) {
|
|
231
|
-
return data !== undefined && data !== null;
|
|
232
|
-
}
|
|
233
265
|
function messageOf(error) {
|
|
234
266
|
return error instanceof Error ? error.message : String(error);
|
|
235
267
|
}
|
|
@@ -250,4 +282,4 @@ export {
|
|
|
250
282
|
createExecutorFactory
|
|
251
283
|
};
|
|
252
284
|
|
|
253
|
-
//# debugId=
|
|
285
|
+
//# debugId=B5488306CD7E73AE64756E2164756E21
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readProjectIdentity2,
|
|
3
3
|
ApiWorkflowToolFactory2
|
|
4
|
-
} from "./packager-tool-
|
|
5
|
-
import"./packager-tool-
|
|
4
|
+
} from "./packager-tool-f5s12jc4.js";
|
|
5
|
+
import"./packager-tool-3krn4ar5.js";
|
|
6
6
|
export {
|
|
7
7
|
ApiWorkflowToolFactory2 as ApiWorkflowToolFactory,
|
|
8
8
|
readProjectIdentity2 as readProjectIdentity
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import"./packager-tool-
|
|
1
|
+
import"./packager-tool-3krn4ar5.js";
|
|
2
2
|
import {
|
|
3
3
|
ProjectPackOptions2
|
|
4
|
-
} from "./packager-tool-
|
|
5
|
-
import"./packager-tool-
|
|
4
|
+
} from "./packager-tool-wytzpk0s.js";
|
|
5
|
+
import"./packager-tool-y9sda1br.js";
|
|
6
6
|
export {
|
|
7
7
|
ProjectPackOptions2 as ProjectPackOptions
|
|
8
8
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
Command
|
|
4
|
-
} from "./packager-tool-
|
|
5
|
-
import"./packager-tool-
|
|
4
|
+
} from "./packager-tool-pyp8tym0.js";
|
|
5
|
+
import"./packager-tool-y9sda1br.js";
|
|
6
6
|
import {
|
|
7
7
|
metadata2,
|
|
8
8
|
registerCommands2
|
|
9
|
-
} from "./packager-tool-
|
|
10
|
-
import"./packager-tool-
|
|
11
|
-
import"./packager-tool-
|
|
12
|
-
import"./packager-tool-
|
|
13
|
-
import"./packager-tool-
|
|
9
|
+
} from "./packager-tool-jdrbc2pk.js";
|
|
10
|
+
import"./packager-tool-bwfnc2ak.js";
|
|
11
|
+
import"./packager-tool-3krn4ar5.js";
|
|
12
|
+
import"./packager-tool-f5s12jc4.js";
|
|
13
|
+
import"./packager-tool-ryk871db.js";
|
|
14
14
|
import"./packager-tool-5gce5wfd.js";
|
|
15
15
|
|
|
16
16
|
// src/index.ts
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
translate,
|
|
3
3
|
ToolResult
|
|
4
|
-
} from "./packager-tool-
|
|
4
|
+
} from "./packager-tool-3krn4ar5.js";
|
|
5
5
|
import {
|
|
6
6
|
setGlobalLogHandler,
|
|
7
7
|
ToolLogger,
|
|
8
8
|
ProjectPackager
|
|
9
|
-
} from "./packager-tool-
|
|
9
|
+
} from "./packager-tool-wytzpk0s.js";
|
|
10
10
|
import {
|
|
11
11
|
NodeFileSystem,
|
|
12
12
|
DebugTelemetryProvider,
|
|
13
13
|
NodeContextStorage
|
|
14
|
-
} from "./packager-tool-
|
|
14
|
+
} from "./packager-tool-pyp8tym0.js";
|
|
15
15
|
import {
|
|
16
16
|
TelemetryService
|
|
17
|
-
} from "./packager-tool-
|
|
17
|
+
} from "./packager-tool-y9sda1br.js";
|
|
18
18
|
// ../packager/project-packager/src/base-node-packager-factory.ts
|
|
19
19
|
class BaseNodePackagerFactory {
|
|
20
20
|
dotnetDiscovery;
|
|
@@ -113,12 +113,15 @@ var NugetConstants = {
|
|
|
113
113
|
};
|
|
114
114
|
|
|
115
115
|
// ../packager/packager-core/src/services/json-object.ts
|
|
116
|
+
function isJsonObject(value) {
|
|
117
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
118
|
+
}
|
|
116
119
|
function parseJsonObject(text) {
|
|
117
120
|
if (!text)
|
|
118
121
|
return;
|
|
119
122
|
try {
|
|
120
123
|
const value = JSON.parse(text);
|
|
121
|
-
return
|
|
124
|
+
return isJsonObject(value) ? value : undefined;
|
|
122
125
|
} catch {
|
|
123
126
|
return;
|
|
124
127
|
}
|
|
@@ -1311,23 +1314,28 @@ class NugetPackager {
|
|
|
1311
1314
|
}
|
|
1312
1315
|
}
|
|
1313
1316
|
// ../packager/packager-core/src/services/project-identity.ts
|
|
1317
|
+
function declaredProjectType(project) {
|
|
1318
|
+
const design = project.designOptions;
|
|
1319
|
+
return (isJsonObject(design) ? design.outputType : undefined) ?? project.ProjectType ?? project.type;
|
|
1320
|
+
}
|
|
1321
|
+
var MAX_IDENTITY_FILE_BYTES = 1024 * 1024;
|
|
1314
1322
|
async function readIdentityJson(fs, path) {
|
|
1315
1323
|
const stat = await fs.stat(path);
|
|
1316
1324
|
if (!stat)
|
|
1317
1325
|
return;
|
|
1318
|
-
if (!stat.isFile() || stat.size >
|
|
1326
|
+
if (!stat.isFile() || stat.size > MAX_IDENTITY_FILE_BYTES)
|
|
1319
1327
|
throw new Error("Invalid identity metadata");
|
|
1320
1328
|
const text = await fs.readFile(path, "utf-8");
|
|
1321
1329
|
if (text === null)
|
|
1322
1330
|
return;
|
|
1323
|
-
const value = JSON.parse(text);
|
|
1331
|
+
const value = JSON.parse(text.replace(/^/, ""));
|
|
1324
1332
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
1325
1333
|
throw new Error("Invalid identity metadata");
|
|
1326
1334
|
}
|
|
1327
1335
|
return value;
|
|
1328
1336
|
}
|
|
1329
|
-
|
|
1330
|
-
let value =
|
|
1337
|
+
function identityFieldValue(source, fields) {
|
|
1338
|
+
let value = source;
|
|
1331
1339
|
for (const field of fields) {
|
|
1332
1340
|
if (!value || typeof value !== "object")
|
|
1333
1341
|
return;
|
|
@@ -1339,6 +1347,9 @@ async function readIdentityField(fs, file, fields) {
|
|
|
1339
1347
|
throw new Error("Invalid project identity");
|
|
1340
1348
|
return value;
|
|
1341
1349
|
}
|
|
1350
|
+
async function readIdentityField(fs, file, fields) {
|
|
1351
|
+
return identityFieldValue(await readIdentityJson(fs, file), fields);
|
|
1352
|
+
}
|
|
1342
1353
|
// ../packager/packager-core/src/models/tool-result.ts
|
|
1343
1354
|
class ToolResult {
|
|
1344
1355
|
errorCode;
|
|
@@ -2425,6 +2436,6 @@ class LogMessage {
|
|
|
2425
2436
|
return parts.join(" ");
|
|
2426
2437
|
}
|
|
2427
2438
|
}
|
|
2428
|
-
export { Path, TemporaryStorageService, ZipService, I18nManager, translate, normalizeIgnoredRules, LogMessage, NugetConstants, ToolResult, ensureContentOperateFile, NugetPackager, readIdentityJson, readIdentityField, ProjectTool, toolsFactoryRepository };
|
|
2439
|
+
export { Path, TemporaryStorageService, ZipService, I18nManager, translate, normalizeIgnoredRules, LogMessage, NugetConstants, ToolResult, isJsonObject, ensureContentOperateFile, NugetPackager, declaredProjectType, MAX_IDENTITY_FILE_BYTES, readIdentityJson, readIdentityField, ProjectTool, toolsFactoryRepository };
|
|
2429
2440
|
|
|
2430
|
-
//# debugId=
|
|
2441
|
+
//# debugId=A82EB30B40A0FB9564756E2164756E21
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getFileSystem,
|
|
3
|
-
RESULTS,
|
|
4
3
|
logger,
|
|
5
4
|
SuccessOutput,
|
|
6
5
|
FailureOutput,
|
|
7
6
|
OutputFormatter
|
|
8
|
-
} from "./packager-tool-
|
|
7
|
+
} from "./packager-tool-pyp8tym0.js";
|
|
9
8
|
import {
|
|
10
|
-
catchError
|
|
11
|
-
|
|
9
|
+
catchError,
|
|
10
|
+
RESULTS
|
|
11
|
+
} from "./packager-tool-y9sda1br.js";
|
|
12
12
|
import {
|
|
13
13
|
require_cjs
|
|
14
14
|
} from "./packager-tool-5b6vjjp3.js";
|
|
@@ -16631,6 +16631,8 @@ function settlePromiseLike(thenable) {
|
|
|
16631
16631
|
// ../auth/src/constants.ts
|
|
16632
16632
|
var UIPATH_HOME_DIR = ".uipath";
|
|
16633
16633
|
var AUTH_FILENAME = ".auth";
|
|
16634
|
+
var AUTH_FILE_MODE = 384;
|
|
16635
|
+
var AUTH_DIR_MODE = 448;
|
|
16634
16636
|
var DEFAULT_BASE_URL = "https://cloud.uipath.com";
|
|
16635
16637
|
var DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
|
|
16636
16638
|
|
|
@@ -17454,6 +17456,38 @@ var loadEnvFileAsync = async ({ envPath }) => {
|
|
|
17454
17456
|
}
|
|
17455
17457
|
return parseEnvContent(content);
|
|
17456
17458
|
};
|
|
17459
|
+
var findAuthHomeDir = (fs, dir) => {
|
|
17460
|
+
let current = dir;
|
|
17461
|
+
for (;; ) {
|
|
17462
|
+
if (fs.path.basename(current) === UIPATH_HOME_DIR)
|
|
17463
|
+
return current;
|
|
17464
|
+
const parent = fs.path.dirname(current);
|
|
17465
|
+
if (parent === current)
|
|
17466
|
+
return;
|
|
17467
|
+
current = parent;
|
|
17468
|
+
}
|
|
17469
|
+
};
|
|
17470
|
+
var TEMP_FILE_ATTEMPTS = 5;
|
|
17471
|
+
var isFileExists = (error) => error instanceof Error && error.code === "EEXIST";
|
|
17472
|
+
var writeTempFile = async (fs, targetPath, content) => {
|
|
17473
|
+
for (let attempt = 1;; attempt++) {
|
|
17474
|
+
const tempPath = `${targetPath}.${crypto.randomUUID()}.tmp`;
|
|
17475
|
+
try {
|
|
17476
|
+
await fs.writeFile(tempPath, content, {
|
|
17477
|
+
mode: AUTH_FILE_MODE,
|
|
17478
|
+
exclusive: true
|
|
17479
|
+
});
|
|
17480
|
+
return tempPath;
|
|
17481
|
+
} catch (error) {
|
|
17482
|
+
if (!isFileExists(error)) {
|
|
17483
|
+
await fs.rm(tempPath).catch(() => {});
|
|
17484
|
+
throw error;
|
|
17485
|
+
}
|
|
17486
|
+
if (attempt === TEMP_FILE_ATTEMPTS)
|
|
17487
|
+
throw error;
|
|
17488
|
+
}
|
|
17489
|
+
}
|
|
17490
|
+
};
|
|
17457
17491
|
var saveEnvFileAsync = async ({
|
|
17458
17492
|
envPath,
|
|
17459
17493
|
data,
|
|
@@ -17481,10 +17515,18 @@ var saveEnvFileAsync = async ({
|
|
|
17481
17515
|
`)}
|
|
17482
17516
|
`;
|
|
17483
17517
|
const dir = fs.path.dirname(absolutePath);
|
|
17484
|
-
await fs.mkdir(dir);
|
|
17485
|
-
const
|
|
17486
|
-
|
|
17487
|
-
|
|
17518
|
+
await fs.mkdir(dir, { mode: AUTH_DIR_MODE });
|
|
17519
|
+
const authHomeDir = findAuthHomeDir(fs, dir);
|
|
17520
|
+
if (authHomeDir !== undefined) {
|
|
17521
|
+
await fs.chmod?.(authHomeDir, AUTH_DIR_MODE);
|
|
17522
|
+
}
|
|
17523
|
+
const tempPath = await writeTempFile(fs, absolutePath, content);
|
|
17524
|
+
try {
|
|
17525
|
+
await fs.rename(tempPath, absolutePath);
|
|
17526
|
+
} catch (error) {
|
|
17527
|
+
await fs.rm(tempPath).catch(() => {});
|
|
17528
|
+
throw error;
|
|
17529
|
+
}
|
|
17488
17530
|
};
|
|
17489
17531
|
|
|
17490
17532
|
// ../auth/src/loginStatus.ts
|
|
@@ -18443,6 +18485,25 @@ class WorkflowFilesService {
|
|
|
18443
18485
|
}
|
|
18444
18486
|
|
|
18445
18487
|
// src/services/workflow-run-service.ts
|
|
18488
|
+
var NO_OUTPUT_INSTRUCTIONS = `The workflow returned no data. Only a Response task ({"response": ...}) sets a workflow's output; values from set, output.as or export.as are not returned. Add a Response task, or check that the one you have runs and returns a value.`;
|
|
18489
|
+
function hasWorkflowData(data) {
|
|
18490
|
+
return data !== undefined && data !== null;
|
|
18491
|
+
}
|
|
18492
|
+
function succeeded({
|
|
18493
|
+
status,
|
|
18494
|
+
data,
|
|
18495
|
+
workflowPath,
|
|
18496
|
+
downloadedFiles
|
|
18497
|
+
}) {
|
|
18498
|
+
return {
|
|
18499
|
+
success: true,
|
|
18500
|
+
status,
|
|
18501
|
+
data,
|
|
18502
|
+
workflowPath,
|
|
18503
|
+
...downloadedFiles ? { downloadedFiles } : {},
|
|
18504
|
+
...hasWorkflowData(data) ? {} : { instructions: NO_OUTPUT_INSTRUCTIONS }
|
|
18505
|
+
};
|
|
18506
|
+
}
|
|
18446
18507
|
var NEEDS_SESSION = "File inputs, file outputs and the File to Base64 / Base64 to File activities use Orchestrator blob storage, so they need a signed-in session: run 'uip login' and drop --no-auth.";
|
|
18447
18508
|
function fileFeatureRefusal(inputFileCount, outputDir, workflow) {
|
|
18448
18509
|
if (inputFileCount > 0) {
|
|
@@ -18509,7 +18570,11 @@ class WorkflowRunService {
|
|
|
18509
18570
|
if (outcome.downloadedFiles && outcome.downloadedFiles.length > 0) {
|
|
18510
18571
|
logger.info(`Downloaded ${outcome.downloadedFiles.length} output file(s) to ${options.outputDir}`);
|
|
18511
18572
|
}
|
|
18512
|
-
|
|
18573
|
+
const success = new SuccessOutput("WorkflowRun", hasWorkflowData(outcome.data) ? outcome.data : { Message: "(no output)" });
|
|
18574
|
+
if (outcome.instructions) {
|
|
18575
|
+
success.Instructions = outcome.instructions;
|
|
18576
|
+
}
|
|
18577
|
+
OutputFormatter.success(success, { preserveDataKeys: true });
|
|
18513
18578
|
return;
|
|
18514
18579
|
}
|
|
18515
18580
|
const failure = new FailureOutput(RESULTS.Failure, outcome.errorMessage ?? "Unknown error", outcome.instructions ?? instructionsFor(outcome.failedStage));
|
|
@@ -18600,12 +18665,11 @@ Running workflow: ${fs.path.basename(resolvedPath)}`);
|
|
|
18600
18665
|
logger.debug(`Raw response: ${JSON.stringify(result, null, 2)}`);
|
|
18601
18666
|
if (result.status === "Successful") {
|
|
18602
18667
|
if (!request.outputDir) {
|
|
18603
|
-
return {
|
|
18604
|
-
success: true,
|
|
18668
|
+
return succeeded({
|
|
18605
18669
|
status: result.status,
|
|
18606
18670
|
data: result.data,
|
|
18607
18671
|
workflowPath: resolvedPath
|
|
18608
|
-
};
|
|
18672
|
+
});
|
|
18609
18673
|
}
|
|
18610
18674
|
const [downloadError, localized] = await catchError(filesService.downloadOutputFiles(result.data, request.outputDir, blobConnection));
|
|
18611
18675
|
if (downloadError) {
|
|
@@ -18615,13 +18679,12 @@ Running workflow: ${fs.path.basename(resolvedPath)}`);
|
|
|
18615
18679
|
data: result.data
|
|
18616
18680
|
};
|
|
18617
18681
|
}
|
|
18618
|
-
return {
|
|
18619
|
-
success: true,
|
|
18682
|
+
return succeeded({
|
|
18620
18683
|
status: result.status,
|
|
18621
18684
|
data: localized.data,
|
|
18622
18685
|
workflowPath: resolvedPath,
|
|
18623
18686
|
downloadedFiles: localized.downloaded
|
|
18624
|
-
};
|
|
18687
|
+
});
|
|
18625
18688
|
}
|
|
18626
18689
|
return {
|
|
18627
18690
|
...failed(result.errorMessage ?? "Unknown error", "execute"),
|
|
@@ -18680,6 +18743,6 @@ Running workflow: ${fs.path.basename(resolvedPath)}`);
|
|
|
18680
18743
|
}
|
|
18681
18744
|
}
|
|
18682
18745
|
|
|
18683
|
-
export { getAuthContext, WorkflowRunService };
|
|
18746
|
+
export { getAuthContext, hasWorkflowData, WorkflowRunService };
|
|
18684
18747
|
|
|
18685
|
-
//# debugId=
|
|
18748
|
+
//# debugId=0B963C41D7AA602164756E2164756E21
|
|
@@ -5,12 +5,15 @@ import {
|
|
|
5
5
|
translate,
|
|
6
6
|
NugetConstants,
|
|
7
7
|
ToolResult,
|
|
8
|
+
isJsonObject,
|
|
8
9
|
ensureContentOperateFile,
|
|
9
10
|
NugetPackager,
|
|
11
|
+
declaredProjectType,
|
|
12
|
+
MAX_IDENTITY_FILE_BYTES,
|
|
10
13
|
readIdentityJson,
|
|
11
14
|
readIdentityField,
|
|
12
15
|
ProjectTool
|
|
13
|
-
} from "./packager-tool-
|
|
16
|
+
} from "./packager-tool-3krn4ar5.js";
|
|
14
17
|
// ../packager/packager-tool-apiworkflow/src/i18n/locales/de.json
|
|
15
18
|
var de_default = {
|
|
16
19
|
toolApiworkflow: {
|
|
@@ -519,12 +522,6 @@ class ApiWorkflowsTool extends ProjectTool {
|
|
|
519
522
|
// ../packager/packager-tool-apiworkflow/src/project-identity.ts
|
|
520
523
|
var MANIFEST_FILES = ["project.uiproj", "project.json"];
|
|
521
524
|
var PROJECT_ID_PATH = ["document", "tags", "projectId"];
|
|
522
|
-
function isRecord(value) {
|
|
523
|
-
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
524
|
-
}
|
|
525
|
-
function asRecord(value) {
|
|
526
|
-
return isRecord(value) ? value : undefined;
|
|
527
|
-
}
|
|
528
525
|
function declaredType(value) {
|
|
529
526
|
return value === undefined ? undefined : String(value);
|
|
530
527
|
}
|
|
@@ -537,9 +534,8 @@ async function sourceManifest(root, fs) {
|
|
|
537
534
|
main: typeof modern.MainFile === "string" ? modern.MainFile : undefined
|
|
538
535
|
};
|
|
539
536
|
const classic = await readIdentityJson(fs, fs.path.join(root, classicFile));
|
|
540
|
-
const design = asRecord(classic?.designOptions);
|
|
541
537
|
return {
|
|
542
|
-
type: declaredType(
|
|
538
|
+
type: declaredType(classic ? declaredProjectType(classic) : undefined),
|
|
543
539
|
main: typeof classic?.main === "string" ? classic.main : undefined
|
|
544
540
|
};
|
|
545
541
|
}
|
|
@@ -617,12 +613,12 @@ async function readYamlIdentity(path, fs) {
|
|
|
617
613
|
const stat = await fs.stat(path);
|
|
618
614
|
if (!stat)
|
|
619
615
|
return unresolved("missing");
|
|
620
|
-
if (!stat.isFile() || stat.size >
|
|
616
|
+
if (!stat.isFile() || stat.size > MAX_IDENTITY_FILE_BYTES)
|
|
621
617
|
return unresolved("invalid");
|
|
622
618
|
const { load } = await import("./js-yaml-0c4svjwq.js");
|
|
623
619
|
let value = load(await fs.readFile(path, "utf-8") ?? "");
|
|
624
620
|
for (const field of PROJECT_ID_PATH)
|
|
625
|
-
value =
|
|
621
|
+
value = isJsonObject(value) ? value[field] : undefined;
|
|
626
622
|
if (value === undefined || value === null || value === "")
|
|
627
623
|
return unresolved("missing");
|
|
628
624
|
return typeof value === "string" && value.trim() ? {
|
|
@@ -642,4 +638,4 @@ class ApiWorkflowToolFactory2 {
|
|
|
642
638
|
}
|
|
643
639
|
export { readProjectIdentity2, ApiWorkflowToolFactory2 };
|
|
644
640
|
|
|
645
|
-
//# debugId=
|
|
641
|
+
//# debugId=413B37228951C3BF64756E2164756E21
|