@uipath/solution-tool 1.206.0-preview.301 → 1.207.0-preview.305
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/{archive-extract-ma0gy822.js → archive-extract-afgwacbg.js} +3 -3
- package/dist/{cleanup-command-service-8whhrsvy.js → cleanup-command-service-j9kawew9.js} +20 -15
- package/dist/deploy-delete-service-1erqap9a.js +23 -0
- package/dist/deploy-run-service-jbs6dxye.js +24 -0
- package/dist/{deploy-status-service-at6cxp1a.js → deploy-status-service-4zn90vds.js} +49 -25
- package/dist/deploy.js +21 -20
- package/dist/{deployment-search-40dknsk1.js → deployment-search-dwzahe4v.js} +9 -9
- package/dist/feed-resolver-d14rdjss.js +31 -0
- package/dist/feed-scope-failure-w16mze3z.js +20 -0
- package/dist/{feed-session-dvyfw5k7.js → feed-session-f2sby6t8.js} +6 -6
- package/dist/{first-party-service-6gf3n6d8.js → first-party-service-7cggb17y.js} +1 -1
- package/dist/folder-runtime-check-586c41dq.js +25 -0
- package/dist/{governance-options-am1hfj5b.js → governance-options-y2xsv7ff.js} +7 -7
- package/dist/{packager-tool-5vf0v538.js → index-6ma58k47.js} +33 -708
- package/dist/{index-p3x7ztdr.js → index-795rsz0e.js} +1 -1
- package/dist/{index-yjvmjpdn.js → index-pzkzbqbs.js} +12 -11
- package/dist/{index-1cfw8mj0.js → index-wfqzwh7k.js} +9 -7
- package/dist/index.js +26 -26
- package/dist/init.js +10 -10
- package/dist/{list-vsecskj1.js → list-6pe1nab5.js} +11 -11
- package/dist/models/pack-command-types.d.ts +12 -0
- package/dist/{node-vndr59bc.js → node-13wj5mzd.js} +6 -6
- package/dist/pack-command-service-j9bqnsn1.js +32 -0
- package/dist/{pack-project-re7s480k.js → pack-project-3sdddc42.js} +21 -18
- package/dist/pack.js +25 -22
- package/dist/{package-id-rx8gq6y2.js → package-id-5j4q232a.js} +3 -3
- package/dist/{packager-tool-vgrswa8p.js → packager-tool-1db1wqdy.js} +30 -8
- package/dist/{packager-tool-vx2c68sb.js → packager-tool-1dsxhz1r.js} +2 -2
- package/dist/{packager-tool-t2r6z24f.js → packager-tool-1tvhgac9.js} +15 -6
- package/dist/{packager-tool-4pt71nf1.js → packager-tool-2atxqqgd.js} +49 -24
- package/dist/packager-tool-3ft8hywr.js +449 -0
- package/dist/{packager-tool-g1c0xdh2.js → packager-tool-46x80z85.js} +8 -4
- package/dist/{packager-tool-gjfb0wcy.js → packager-tool-4hm40a32.js} +8 -74
- package/dist/{packager-tool-f15an17m.js → packager-tool-5p1vy335.js} +1 -1
- package/dist/packager-tool-612prgtc.js +140 -0
- package/dist/packager-tool-7gqn5apd.js +72 -0
- package/dist/{packager-tool-aws5w512.js → packager-tool-887bkh9y.js} +1 -1
- package/dist/{packager-tool-vj88gh5b.js → packager-tool-8tckw03n.js} +28 -9
- package/dist/{packager-tool-9vtp28fb.js → packager-tool-93qy1v8m.js} +52 -15
- package/dist/{packager-tool-fx4ws49n.js → packager-tool-cenfraf4.js} +2 -2
- package/dist/{packager-tool-chff74yz.js → packager-tool-cr1khqtm.js} +103 -166
- package/dist/{packager-tool-6tn79r1b.js → packager-tool-da3hvfyn.js} +528 -202
- package/dist/{packager-tool-2zn98p5r.js → packager-tool-dd937g7k.js} +4 -4
- package/dist/{packager-tool-a7s0gbxs.js → packager-tool-devc4w73.js} +7 -2
- package/dist/{packager-tool-v7h8s6yj.js → packager-tool-ewbkaecg.js} +18 -11
- package/dist/{packager-tool-d7v4083a.js → packager-tool-g08b669a.js} +22 -18
- package/dist/{packager-tool-m07vyk89.js → packager-tool-gb3dq79g.js} +36 -9
- package/dist/{packager-tool-395kmy70.js → packager-tool-gmbcn83x.js} +3 -3
- package/dist/{packager-tool-btz44ase.js → packager-tool-jhtsana2.js} +119 -52
- package/dist/{packager-tool-4rvfxkyh.js → packager-tool-jtg2arr8.js} +20 -8
- package/dist/{packager-tool-t39pjz7n.js → packager-tool-jtvhkavz.js} +48 -6
- package/dist/packager-tool-kffz64hn.js +279 -0
- package/dist/{packager-tool-p5322gew.js → packager-tool-kmwjscby.js} +88 -10
- package/dist/{packager-tool-ppj5f4y7.js → packager-tool-n1zrk6zv.js} +4 -2
- package/dist/{packager-tool-avrdp2za.js → packager-tool-pmc5txbm.js} +4 -6
- package/dist/{packager-tool-egc54x78.js → packager-tool-qhht1tc9.js} +2408 -771
- package/dist/{packager-tool-zcqfq3vc.js → packager-tool-qm876ezh.js} +84 -29
- package/dist/{packager-tool-resolver-30hxk8vm.js → packager-tool-resolver-y52kztnx.js} +6 -6
- package/dist/{packager-tool-3ejz0af8.js → packager-tool-rhg3mwkn.js} +14 -8
- package/dist/{packager-tool-ckrt4gyr.js → packager-tool-t9zked1m.js} +3 -3
- package/dist/{packager-tool-36w7az7k.js → packager-tool-tat0qs6z.js} +26 -10
- package/dist/packager-tool-tf0rn1tp.js +741 -0
- package/dist/{packager-tool-p5aar2k0.js → packager-tool-tmba5jv0.js} +140 -10
- package/dist/{packager-tool-vk3e239z.js → packager-tool-tqe3m1xp.js} +6 -6
- package/dist/{packager-tool-1ctvbx0h.js → packager-tool-tr3ttz5c.js} +1 -1
- package/dist/{packager-tool-k9dk39tg.js → packager-tool-txygqgb2.js} +3 -3
- package/dist/packager-tool-v6jcys3s.js +46 -0
- package/dist/packager-tool-w35s60sx.js +179 -0
- package/dist/{packager-tool-axqk17xw.js → packager-tool-xbfr6y2x.js} +142 -34
- package/dist/{packager-tool-2qsbh4kd.js → packager-tool-yfcscjfp.js} +50 -12
- package/dist/{packager-tool-ay4j9x92.js → packager-tool-ykq6gmhc.js} +19 -8
- package/dist/packager-tool.js +2 -2
- package/dist/prepare-solution-resources-sk3tyy8b.js +26 -0
- package/dist/{project-command-utils-82tja3k0.js → project-command-utils-7ygs8xq0.js} +20 -13
- package/dist/project-contributions-nzh06q0y.js +31 -0
- package/dist/project-identity-telemetry-47k2g7nq.js +18 -0
- package/dist/publish.js +14 -14
- package/dist/{resource-mutations-h6wfdqr4.js → resource-mutations-qcz2vcxe.js} +9 -9
- package/dist/{resource-version-lookup-xzgnvr48.js → resource-version-lookup-w3kzh4z9.js} +9 -9
- package/dist/resource.js +9 -9
- package/dist/{restore-command-service-wgqxp5tb.js → restore-command-service-m6c8fb7q.js} +20 -15
- package/dist/run-service-cmrzccnm.js +1055 -0
- package/dist/services/deploy-activate-service.d.ts +5 -2
- package/dist/services/deploy-config-file.d.ts +24 -0
- package/dist/services/deploy-delete-service.d.ts +1 -1
- package/dist/services/deploy-run-service.d.ts +8 -1
- package/dist/services/deploy-uninstall-service.d.ts +4 -2
- package/dist/services/deploy-upgrade-service.d.ts +23 -2
- package/dist/services/deployment-feed-locator.d.ts +19 -6
- package/dist/services/deployment-links.d.ts +16 -0
- package/dist/services/deployment-progress.d.ts +10 -0
- package/dist/services/deployment-search.d.ts +15 -2
- package/dist/services/deployment-state.d.ts +9 -0
- package/dist/services/feed-resolver.d.ts +17 -0
- package/dist/services/feed-selection.d.ts +59 -0
- package/dist/services/folder-runtime-check.d.ts +107 -0
- package/dist/services/incomplete-feed-sweep.d.ts +6 -0
- package/dist/services/pack-command-service.d.ts +6 -0
- package/dist/services/pack-project.d.ts +1 -1
- package/dist/services/package-metadata-rewrite.d.ts +13 -0
- package/dist/services/personal-workspace-resolver.d.ts +4 -1
- package/dist/services/prepare-solution-resources.d.ts +11 -6
- package/dist/services/project-contributions.d.ts +26 -2
- package/dist/services/project-identity-telemetry.d.ts +31 -0
- package/dist/services/solution-members.d.ts +31 -0
- package/dist/{ship-telemetry-19gx83af.js → ship-telemetry-9djqndmy.js} +4 -4
- package/dist/{solution-auth-jxcgd2m0.js → solution-auth-0e3qm74f.js} +3 -3
- package/dist/{solution-definition-helper-tqwd6cxn.js → solution-definition-helper-bkyhs1bd.js} +1 -1
- package/dist/{solution-identity-c23d9bfv.js → solution-identity-j63p6n81.js} +4 -4
- package/dist/templates/AGENTS.md +131 -24
- package/dist/tool.js +26 -26
- package/package.json +2 -2
- package/dist/deploy-delete-service-dwd4qb1m.js +0 -23
- package/dist/deploy-run-service-0kzfrvnn.js +0 -23
- package/dist/feed-resolver-w4y5aspe.js +0 -27
- package/dist/feed-scope-failure-4ef9zxcx.js +0 -20
- package/dist/pack-command-service-k7ebbfya.js +0 -29
- package/dist/packager-tool-vrqbbh01.js +0 -182
- package/dist/packager-tool-wwzg88qy.js +0 -74
- package/dist/prepare-solution-resources-h7zvnncd.js +0 -26
- package/dist/project-contributions-xx560n8y.js +0 -27
- package/dist/run-service-2rc4we5q.js +0 -506
|
@@ -1,29 +1,37 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getFileSystem
|
|
3
|
-
} from "./packager-tool-
|
|
3
|
+
} from "./packager-tool-1db1wqdy.js";
|
|
4
4
|
import {
|
|
5
5
|
catchError,
|
|
6
6
|
extractErrorMessage
|
|
7
|
-
} from "./packager-tool-
|
|
7
|
+
} from "./packager-tool-gb3dq79g.js";
|
|
8
8
|
import {
|
|
9
9
|
logger,
|
|
10
10
|
isGuid
|
|
11
|
-
} from "./packager-tool-
|
|
11
|
+
} from "./packager-tool-xbfr6y2x.js";
|
|
12
12
|
import {
|
|
13
13
|
getLoginStatusAsync
|
|
14
|
-
} from "./packager-tool-
|
|
14
|
+
} from "./packager-tool-jtvhkavz.js";
|
|
15
15
|
import {
|
|
16
16
|
UsersApi,
|
|
17
17
|
createApiClient
|
|
18
|
-
} from "./packager-tool-
|
|
18
|
+
} from "./packager-tool-qhht1tc9.js";
|
|
19
19
|
import {
|
|
20
20
|
getSolutionAuthContext2
|
|
21
|
-
} from "./packager-tool-
|
|
21
|
+
} from "./packager-tool-n1zrk6zv.js";
|
|
22
22
|
import {
|
|
23
|
+
ErrorCodes
|
|
24
|
+
} from "./packager-tool-7gqn5apd.js";
|
|
25
|
+
import {
|
|
26
|
+
mapResourceToSolutionSubtype,
|
|
27
|
+
mapSolutionToResourceSubtype
|
|
28
|
+
} from "./packager-tool-v6jcys3s.js";
|
|
29
|
+
import {
|
|
30
|
+
SolutionFileError,
|
|
23
31
|
normalizeProjectType,
|
|
24
32
|
toPortableRelativePath2,
|
|
25
33
|
findSolutionFileUpward
|
|
26
|
-
} from "./packager-tool-
|
|
34
|
+
} from "./packager-tool-kmwjscby.js";
|
|
27
35
|
import {
|
|
28
36
|
__toESM,
|
|
29
37
|
__commonJS
|
|
@@ -2736,75 +2744,6 @@ class StreamSerializer2 {
|
|
|
2736
2744
|
this.disposeStream = disposeStream;
|
|
2737
2745
|
}
|
|
2738
2746
|
}
|
|
2739
|
-
// ../../node_modules/@uipath/resource-builder-sdk/dist/exceptions/error-codes.js
|
|
2740
|
-
var ErrorCodes = {
|
|
2741
|
-
UnknownException: "0000",
|
|
2742
|
-
AuthorizationException: "0004",
|
|
2743
|
-
AuthenticationFailed: "0004",
|
|
2744
|
-
ResourceNotFound: "1000",
|
|
2745
|
-
FolderNotFound: "1001",
|
|
2746
|
-
ResourcesNotFound: "1002",
|
|
2747
|
-
ResourceLinkRemovedFromSource: "1003",
|
|
2748
|
-
ImportCancelled: "1005",
|
|
2749
|
-
InvalidBindings: "1006",
|
|
2750
|
-
FileNotFound: "1008",
|
|
2751
|
-
BindingsFileNotFound: "1010",
|
|
2752
|
-
BindingsResourceCannotBeOverridden: "1011",
|
|
2753
|
-
BindingsResourceNotFound: "1012",
|
|
2754
|
-
NullOrEmptyAccessToken: "1013",
|
|
2755
|
-
InvalidInput: "InvalidInput",
|
|
2756
|
-
InvalidConfiguration: "InvalidConfiguration",
|
|
2757
|
-
Resources: {
|
|
2758
|
-
InvalidApiVersion: "2001",
|
|
2759
|
-
InvalidName: "2002",
|
|
2760
|
-
DuplicateProperties: "2003",
|
|
2761
|
-
DuplicateResourceName: "2004",
|
|
2762
|
-
PropertyIsRequired: "2005",
|
|
2763
|
-
ChoiceTypeMissingOrInvalid: "2006",
|
|
2764
|
-
InvalidPropertyType: "2007",
|
|
2765
|
-
InvalidEnumValue: "2008",
|
|
2766
|
-
InvalidChoiceValue: "2009",
|
|
2767
|
-
RegularExpressionDoesNotMatch: "2010",
|
|
2768
|
-
InvalidMultiselectValue: "2011",
|
|
2769
|
-
ValueOutOfRange: "2012",
|
|
2770
|
-
DeletingHiddenResourceIsNotAllowed: "2013",
|
|
2771
|
-
InvalidResourceMetadataIdentifier: "2014",
|
|
2772
|
-
DeletingProjectArtefactResourceIsNotAllowed: "2015",
|
|
2773
|
-
ResourceHasNoFile: "2017",
|
|
2774
|
-
InvalidResourceType: "2018",
|
|
2775
|
-
DeletingResourceThatIsReferencedByOtherResourcesIsNotAllowed: "2019",
|
|
2776
|
-
SyncingProcessArtefactResourceIsNotAllowed: "2020",
|
|
2777
|
-
MissingDependencies: "2021",
|
|
2778
|
-
MissingFileDependencies: "2022",
|
|
2779
|
-
ResourceAttributeMismatch: "2023",
|
|
2780
|
-
AppSystemNameConflict: "2024",
|
|
2781
|
-
InvalidResourceFile: "2025",
|
|
2782
|
-
DuplicatePackageName: "2026",
|
|
2783
|
-
TooManySearchKinds: "2027",
|
|
2784
|
-
SearchTypesWithSeveralKinds: "2028",
|
|
2785
|
-
ResourceNotFound: "1000",
|
|
2786
|
-
ResourceAlreadyExists: "Resources.ResourceAlreadyExists",
|
|
2787
|
-
ResourceDependencyNotFound: "Resources.ResourceDependencyNotFound",
|
|
2788
|
-
FileDependencyNotFound: "Resources.FileDependencyNotFound",
|
|
2789
|
-
PropertyInvalidFormat: "Resources.PropertyInvalidFormat",
|
|
2790
|
-
PropertyInvalidValue: "Resources.PropertyInvalidValue"
|
|
2791
|
-
},
|
|
2792
|
-
Solutions: {
|
|
2793
|
-
ConfigurationNotFound: "3002",
|
|
2794
|
-
SolutionNotFound: "3001",
|
|
2795
|
-
SolutionInvalidState: "Solution.SolutionInvalidState",
|
|
2796
|
-
SolutionReadOnly: "Solution.SolutionReadOnly"
|
|
2797
|
-
},
|
|
2798
|
-
Metadata: {
|
|
2799
|
-
ResourceMetadataNotFound: "5001"
|
|
2800
|
-
},
|
|
2801
|
-
Project: {
|
|
2802
|
-
ProjectNotFound: "Project.ProjectNotFound",
|
|
2803
|
-
ProjectAlreadyExists: "Project.ProjectAlreadyExists",
|
|
2804
|
-
ProjectInvalidType: "Project.ProjectInvalidType"
|
|
2805
|
-
}
|
|
2806
|
-
};
|
|
2807
|
-
|
|
2808
2747
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/exceptions/bad-request-exception.js
|
|
2809
2748
|
class BadRequestException extends Error {
|
|
2810
2749
|
static create(errorCode, message, ...params) {
|
|
@@ -5339,7 +5278,7 @@ class MultiFileSolutionDefinitionProvider {
|
|
|
5339
5278
|
const metadataReader = this.metadataReaderAccessor?.();
|
|
5340
5279
|
if (!metadataReader)
|
|
5341
5280
|
return void this.logger.warn("Solution %s has resources sharing a key, and no metadata reader is available to resolve them; they are left in place and this read will not agree with one that can resolve them", solution.key);
|
|
5342
|
-
const { SolutionDefinitionHelper } = await import("./solution-definition-helper-
|
|
5281
|
+
const { SolutionDefinitionHelper } = await import("./solution-definition-helper-bkyhs1bd.js");
|
|
5343
5282
|
await new SolutionDefinitionHelper(metadataReader, this.logger).replaceDuplicateKeysAsync(solution, cancellationToken);
|
|
5344
5283
|
}
|
|
5345
5284
|
getSolutionKey(context) {
|
|
@@ -5663,7 +5602,7 @@ var service_tokens_ServiceLifetime = /* @__PURE__ */ function(ServiceLifetime) {
|
|
|
5663
5602
|
async function createDefaultEmbeddedFileReaderAsync() {
|
|
5664
5603
|
const [{ EmbeddedFileReader }, { JsonSerializerFactory }] = await Promise.all([
|
|
5665
5604
|
import("./embedded-file-reader-pxpwcq3n.js"),
|
|
5666
|
-
import("./index-
|
|
5605
|
+
import("./index-795rsz0e.js")
|
|
5667
5606
|
]);
|
|
5668
5607
|
return new EmbeddedFileReader(new JsonSerializerFactory);
|
|
5669
5608
|
}
|
|
@@ -8268,50 +8207,6 @@ async function mapWithConcurrency(items, limit, work) {
|
|
|
8268
8207
|
return results;
|
|
8269
8208
|
}
|
|
8270
8209
|
|
|
8271
|
-
// ../../node_modules/@uipath/resource-builder-sdk/dist/mappings/resource-subtype-mapper.js
|
|
8272
|
-
var solutionsSubtypesMap = {
|
|
8273
|
-
Text: "stringAsset",
|
|
8274
|
-
Integer: "integerAsset",
|
|
8275
|
-
Bool: "booleanAsset",
|
|
8276
|
-
Credential: "credentialAsset",
|
|
8277
|
-
Secret: "secretAsset",
|
|
8278
|
-
Json: "jsonAsset",
|
|
8279
|
-
Amazon: "amazonBucket",
|
|
8280
|
-
Azure: "azureBucket",
|
|
8281
|
-
Orchestrator: "orchestratorBucket",
|
|
8282
|
-
Time: "timeTrigger",
|
|
8283
|
-
Queue: "queueTrigger",
|
|
8284
|
-
Event: "connectedEventTrigger",
|
|
8285
|
-
Process: "process",
|
|
8286
|
-
ProcessOrchestration: "processOrchestration",
|
|
8287
|
-
WebApp: "webApp",
|
|
8288
|
-
Agent: "agent",
|
|
8289
|
-
TestAutomationProcess: "testAutomationProcess",
|
|
8290
|
-
Api: "api",
|
|
8291
|
-
Function: "function",
|
|
8292
|
-
McpServer: "mcpserver",
|
|
8293
|
-
BusinessRule: "businessRule",
|
|
8294
|
-
Native: "native",
|
|
8295
|
-
Federated: "federated",
|
|
8296
|
-
Case: "case",
|
|
8297
|
-
CaseMain: "caseMain",
|
|
8298
|
-
CaseComment: "caseComment",
|
|
8299
|
-
CaseDocument: "caseDocument"
|
|
8300
|
-
};
|
|
8301
|
-
function mapResourceToSolutionSubtype(entitySubtype) {
|
|
8302
|
-
if (!entitySubtype)
|
|
8303
|
-
return;
|
|
8304
|
-
return solutionsSubtypesMap[entitySubtype] ?? entitySubtype;
|
|
8305
|
-
}
|
|
8306
|
-
function mapSolutionToResourceSubtype(solutionSubtype) {
|
|
8307
|
-
if (!solutionSubtype)
|
|
8308
|
-
return;
|
|
8309
|
-
for (const [key, value] of Object.entries(solutionsSubtypesMap))
|
|
8310
|
-
if (value.toLowerCase() === solutionSubtype.toLowerCase())
|
|
8311
|
-
return key;
|
|
8312
|
-
return solutionSubtype;
|
|
8313
|
-
}
|
|
8314
|
-
|
|
8315
8210
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/mappings/mapper.js
|
|
8316
8211
|
function mapToSolutionResource(source) {
|
|
8317
8212
|
return {
|
|
@@ -13451,7 +13346,7 @@ class FirstPartyServiceClientProxy {
|
|
|
13451
13346
|
const tenantKey = await this.accessProvider.getTenantKeyAsync(cancellationToken);
|
|
13452
13347
|
if (!accountKey)
|
|
13453
13348
|
throw new BadRequestException(ErrorCodes.AuthenticationFailed, "Unable to obtain account key");
|
|
13454
|
-
const client = new (await import("./first-party-service-
|
|
13349
|
+
const client = new (await import("./first-party-service-7cggb17y.js")).FirstPartyServiceApi({
|
|
13455
13350
|
baseUrl: fullBaseUrl,
|
|
13456
13351
|
customFetch: fetchWithTimeout(LONG_RUNNING_TIMEOUT_MS),
|
|
13457
13352
|
baseApiParams: {
|
|
@@ -19157,7 +19052,7 @@ async function readSolutionFile2(filePath) {
|
|
|
19157
19052
|
const [parseError, solution] = catchError(() => JSON.parse(rawContent));
|
|
19158
19053
|
if (parseError) {
|
|
19159
19054
|
return [
|
|
19160
|
-
new
|
|
19055
|
+
new SolutionFileError(`Invalid JSON in solution file: ${parseError.message}`, "invalid_argument"),
|
|
19161
19056
|
null
|
|
19162
19057
|
];
|
|
19163
19058
|
}
|
|
@@ -19169,7 +19064,10 @@ async function resolveSolutionFilePath2(solutionFileOption, searchStartDir) {
|
|
|
19169
19064
|
const resolved = fs.path.resolve(fs.env.cwd(), solutionFileOption);
|
|
19170
19065
|
const exists = await fs.exists(resolved);
|
|
19171
19066
|
if (!exists) {
|
|
19172
|
-
return [
|
|
19067
|
+
return [
|
|
19068
|
+
new SolutionFileError(`Solution file not found: ${resolved}`, "not_found"),
|
|
19069
|
+
null
|
|
19070
|
+
];
|
|
19173
19071
|
}
|
|
19174
19072
|
return [null, resolved];
|
|
19175
19073
|
}
|
|
@@ -19369,6 +19267,24 @@ function findMemberCloneResources(resources, memberProjectKeys) {
|
|
|
19369
19267
|
function hasPackageDependency(resource) {
|
|
19370
19268
|
return (resource.dependencies ?? []).some((dependency) => (dependency.kind ?? "").toLowerCase() === "package");
|
|
19371
19269
|
}
|
|
19270
|
+
var ORPHAN_CHECKED_KINDS = new Set(["process", "app"]);
|
|
19271
|
+
function findOrphanedDeclarations(resources, bound, boundKeys = new Set) {
|
|
19272
|
+
const depended = new Set(resources.flatMap((r) => (r.dependencies ?? []).map((d) => `${d.kind ?? ""}:${d.name ?? ""}`.toLowerCase())));
|
|
19273
|
+
return resources.filter((candidate) => {
|
|
19274
|
+
const kind = (candidate.kind ?? "").toLowerCase();
|
|
19275
|
+
if (!ORPHAN_CHECKED_KINDS.has(kind))
|
|
19276
|
+
return false;
|
|
19277
|
+
if (candidate.isArtefactResource === true || candidate.projectKey) {
|
|
19278
|
+
return false;
|
|
19279
|
+
}
|
|
19280
|
+
if (boundKeys.has((candidate.key ?? "").toLowerCase()))
|
|
19281
|
+
return false;
|
|
19282
|
+
const name = candidate.name ?? "";
|
|
19283
|
+
if (depended.has(`${kind}:${name}`.toLowerCase()))
|
|
19284
|
+
return false;
|
|
19285
|
+
return !bound.some((b) => b.kind.toLowerCase() === kind && nameSuffixRegex(b.name, false).test(name));
|
|
19286
|
+
});
|
|
19287
|
+
}
|
|
19372
19288
|
// ../solution-sdk/src/resources/services/project-artifacts-service.ts
|
|
19373
19289
|
async function addProjectArtifactsToSolutionAsync2(options) {
|
|
19374
19290
|
const error = await createProjectInSolutionBuilder2(options.solutionDir, options.projectId, options.projectName, normalizeProjectType(options.projectType), options.projectSubType);
|
|
@@ -19433,9 +19349,30 @@ function toCatalogReference(reference) {
|
|
|
19433
19349
|
};
|
|
19434
19350
|
}
|
|
19435
19351
|
async function exportResourceDefinitionAsync2(importer, reference) {
|
|
19436
|
-
const payload = await importer.exportResourceAsync(reference);
|
|
19352
|
+
const [error, payload] = await catchError(importer.exportResourceAsync(reference));
|
|
19353
|
+
if (error) {
|
|
19354
|
+
throw withExportStatus(error);
|
|
19355
|
+
}
|
|
19437
19356
|
return payload.resourceDefinitions.find((d) => d.key === reference.key);
|
|
19438
19357
|
}
|
|
19358
|
+
|
|
19359
|
+
class ResourceExportError extends Error {
|
|
19360
|
+
status;
|
|
19361
|
+
constructor(message, status, cause) {
|
|
19362
|
+
super(message, { cause });
|
|
19363
|
+
this.status = status;
|
|
19364
|
+
this.name = "ResourceExportError";
|
|
19365
|
+
}
|
|
19366
|
+
}
|
|
19367
|
+
function withExportStatus(error) {
|
|
19368
|
+
if (!(error instanceof Error) || !("exceptionData" in error)) {
|
|
19369
|
+
return error;
|
|
19370
|
+
}
|
|
19371
|
+
const data = error.exceptionData;
|
|
19372
|
+
const text = typeof data === "object" && data !== null ? data.errorMessage : undefined;
|
|
19373
|
+
const match = typeof text === "string" ? /^HTTP (\d{3})\b/.exec(text) : null;
|
|
19374
|
+
return match ? new ResourceExportError(error.message, Number(match[1]), error) : error;
|
|
19375
|
+
}
|
|
19439
19376
|
function readSpecProperty2(spec, name) {
|
|
19440
19377
|
if (!spec) {
|
|
19441
19378
|
return;
|
|
@@ -19697,41 +19634,6 @@ async function readResourceConfigurationAsync2(services, builder, resourceKey) {
|
|
|
19697
19634
|
const { key, spec, locks, apiVersion, isOverridable } = primary;
|
|
19698
19635
|
return { configuration: { key, spec, locks, apiVersion, isOverridable } };
|
|
19699
19636
|
}
|
|
19700
|
-
// ../solution-sdk/src/resources/services/resource-name.ts
|
|
19701
|
-
var MAX_RESOURCE_NAME_LENGTH = 256;
|
|
19702
|
-
var UNSAFE_NAME_CHARS = /[\\/:*?"<>|]/;
|
|
19703
|
-
function hasControlChar(value) {
|
|
19704
|
-
for (let i = 0;i < value.length; i++) {
|
|
19705
|
-
if (value.charCodeAt(i) < 32)
|
|
19706
|
-
return true;
|
|
19707
|
-
}
|
|
19708
|
-
return false;
|
|
19709
|
-
}
|
|
19710
|
-
function validateResourceName2(name, options = {}) {
|
|
19711
|
-
const optionName = options.optionName ?? "--name";
|
|
19712
|
-
if (name.trim() === "") {
|
|
19713
|
-
return {
|
|
19714
|
-
ok: false,
|
|
19715
|
-
message: `${optionName} must not be blank`,
|
|
19716
|
-
instructions: "Pass a non-empty resource name."
|
|
19717
|
-
};
|
|
19718
|
-
}
|
|
19719
|
-
if (name.length > MAX_RESOURCE_NAME_LENGTH) {
|
|
19720
|
-
return {
|
|
19721
|
-
ok: false,
|
|
19722
|
-
message: `${optionName} exceeds the ${MAX_RESOURCE_NAME_LENGTH}-character limit (got ${name.length})`,
|
|
19723
|
-
instructions: "Shorten the resource name. Orchestrator name limits are kind-specific (queues cap at 50, assets at 256)."
|
|
19724
|
-
};
|
|
19725
|
-
}
|
|
19726
|
-
if (UNSAFE_NAME_CHARS.test(name) || hasControlChar(name)) {
|
|
19727
|
-
return {
|
|
19728
|
-
ok: false,
|
|
19729
|
-
message: `${optionName} contains unsafe characters`,
|
|
19730
|
-
instructions: 'Resource names cannot contain path separators (/, \\), control characters, or any of: : * ? " < > |'
|
|
19731
|
-
};
|
|
19732
|
-
}
|
|
19733
|
-
return { ok: true };
|
|
19734
|
-
}
|
|
19735
19637
|
// ../solution-sdk/src/resources/services/sync-resources-from-bindings.ts
|
|
19736
19638
|
var TYPE_IS_IDENTITY_REPLACE_OPTIONS = new Set([
|
|
19737
19639
|
"SameType",
|
|
@@ -19846,7 +19748,7 @@ function resolveBindingResourceIdentity(binding) {
|
|
|
19846
19748
|
};
|
|
19847
19749
|
}
|
|
19848
19750
|
}
|
|
19849
|
-
async function syncResourcesFromBindings2(solutionDir, projectPaths, projectSubTypes, projectBindings, selfProvisioned) {
|
|
19751
|
+
async function syncResourcesFromBindings2(solutionDir, projectPaths, projectSubTypes, projectBindings, selfProvisioned, options = {}) {
|
|
19850
19752
|
const result = {
|
|
19851
19753
|
created: 0,
|
|
19852
19754
|
imported: 0,
|
|
@@ -19858,7 +19760,7 @@ async function syncResourcesFromBindings2(solutionDir, projectPaths, projectSubT
|
|
|
19858
19760
|
};
|
|
19859
19761
|
const uipxProjects = await readUipxProjects2(solutionDir);
|
|
19860
19762
|
const paths = projectPaths ?? uipxProjects.map((p) => p.path);
|
|
19861
|
-
if (paths.length === 0) {
|
|
19763
|
+
if (paths.length === 0 && projectPaths !== undefined) {
|
|
19862
19764
|
return result;
|
|
19863
19765
|
}
|
|
19864
19766
|
const bindingsJsonFallbackDirs = new Set(uipxProjects.filter((p) => BINDINGS_JSON_FALLBACK_TYPES.has(p.type.toLowerCase())).map((p) => p.path));
|
|
@@ -19886,7 +19788,11 @@ async function syncResourcesFromBindings2(solutionDir, projectPaths, projectSubT
|
|
|
19886
19788
|
result.projectResourcesCreated = reconcileOutcome.resourcesAdded;
|
|
19887
19789
|
const memberProjectKeys = new Set(uipxProjects.map((project) => project.id.toLowerCase()));
|
|
19888
19790
|
await pruneMemberClones(builder, memberProjectKeys, result);
|
|
19791
|
+
const reportUnbound = projectPaths === undefined && options.bindingsComplete !== false;
|
|
19889
19792
|
if (allBindings.length === 0) {
|
|
19793
|
+
if (reportUnbound) {
|
|
19794
|
+
await reportOrphanedDeclarations(services, builder, allBindings, result);
|
|
19795
|
+
}
|
|
19890
19796
|
const saveError = await saveAndDisposeBuilder(builder, solutionDir);
|
|
19891
19797
|
if (saveError) {
|
|
19892
19798
|
throw new Error(`Failed to save solution changes: ${saveError.message}`);
|
|
@@ -20071,6 +19977,9 @@ async function syncResourcesFromBindings2(solutionDir, projectPaths, projectSubT
|
|
|
20071
19977
|
});
|
|
20072
19978
|
result.warnings.push(catalogLookupWarning(result.catalogLookupFailure, keptUnchecked, result.unresolved));
|
|
20073
19979
|
}
|
|
19980
|
+
if (reportUnbound) {
|
|
19981
|
+
await reportOrphanedDeclarations(services, builder, allBindings, result);
|
|
19982
|
+
}
|
|
20074
19983
|
const saveError = await saveAndDisposeBuilder(builder, solutionDir);
|
|
20075
19984
|
if (saveError) {
|
|
20076
19985
|
throw new Error(`Failed to save solution changes: ${saveError.message}`);
|
|
@@ -20098,6 +20007,32 @@ async function pruneMemberClones(builder, memberProjectKeys, result) {
|
|
|
20098
20007
|
logger.info(`Removed duplicate ${clone.kind} "${clone.name}" (key: ${clone.key}) — the solution provisions this project itself`);
|
|
20099
20008
|
}
|
|
20100
20009
|
}
|
|
20010
|
+
async function reportOrphanedDeclarations(services, builder, bindings, result) {
|
|
20011
|
+
const [loadError, solution] = await catchError(builder.context.loadAsync());
|
|
20012
|
+
if (loadError || !solution) {
|
|
20013
|
+
logger.warn(`Skipping the unbound declaration check; failed to load solution: ${loadError?.message ?? "unknown"}`);
|
|
20014
|
+
return;
|
|
20015
|
+
}
|
|
20016
|
+
const [overwritesError, overwrites] = await catchError((async () => services.container.resolve(Tokens.IResourceOverwritesService).getTenantResourceOverwritesAsync(builder.context))());
|
|
20017
|
+
if (overwritesError) {
|
|
20018
|
+
logger.warn(`Skipping the unbound declaration check; failed to read resource overwrites: ${overwritesError.message}`);
|
|
20019
|
+
return;
|
|
20020
|
+
}
|
|
20021
|
+
const bound = bindings.flatMap((binding) => {
|
|
20022
|
+
const name = getResourceName(binding);
|
|
20023
|
+
return name ? [{ kind: resolveBindingResourceIdentity(binding).kind, name }] : [];
|
|
20024
|
+
});
|
|
20025
|
+
const boundKeys = new Set((overwrites ?? []).filter((o) => {
|
|
20026
|
+
const name = o.overwrite?.resourceName?.toLowerCase();
|
|
20027
|
+
const kind = o.overwrite?.kind?.toLowerCase();
|
|
20028
|
+
return bound.some((b) => b.name.toLowerCase() === name && (!kind || b.kind.toLowerCase() === kind));
|
|
20029
|
+
}).flatMap((o) => o.solutionResourceKey ? [o.solutionResourceKey.toLowerCase()] : []));
|
|
20030
|
+
for (const orphan of findOrphanedDeclarations(solution.resources ?? [], bound, boundKeys)) {
|
|
20031
|
+
const warning = `${orphan.kind} "${orphan.name}" is declared in the solution but no project binds it, and deploy still provisions it. If nothing needs it, remove it: uip solution resources remove ${orphan.key}`;
|
|
20032
|
+
result.warnings.push(warning);
|
|
20033
|
+
logger.warn(warning);
|
|
20034
|
+
}
|
|
20035
|
+
}
|
|
20101
20036
|
async function isUncheckedBindingCovered(builder, knownResourceKeys, kind, name, directCloudKey) {
|
|
20102
20037
|
if (directCloudKey) {
|
|
20103
20038
|
return knownResourceKeys.has(directCloudKey.toLowerCase());
|
|
@@ -20624,7 +20559,9 @@ async function resourceRefreshAsync2(solutionPath = ".", options = {}) {
|
|
|
20624
20559
|
if (bindingsError) {
|
|
20625
20560
|
resolverWarnings.push(`Could not read the bindings projects contribute: ${bindingsError.message}. Those projects were synced from any bindings_v2.json on disk instead; fix the tool install and re-run 'uip solution resources refresh'.`);
|
|
20626
20561
|
}
|
|
20627
|
-
const [syncError, result] = await catchError(syncResourcesFromBindings2(resolvedPath, undefined, projectSubTypes ?? new Map, projectBindings ?? new Map
|
|
20562
|
+
const [syncError, result] = await catchError(syncResourcesFromBindings2(resolvedPath, undefined, projectSubTypes ?? new Map, projectBindings ?? new Map, undefined, {
|
|
20563
|
+
bindingsComplete: !bindingsError && (options.isProjectBindingsComplete?.() ?? true)
|
|
20564
|
+
}));
|
|
20628
20565
|
if (syncError) {
|
|
20629
20566
|
return {
|
|
20630
20567
|
ok: false,
|
|
@@ -20819,6 +20756,6 @@ function sortKeysDeep2(value) {
|
|
|
20819
20756
|
}
|
|
20820
20757
|
return sorted;
|
|
20821
20758
|
}
|
|
20822
|
-
export { JsonSerializerNames2, JsonSerializer2, CAMEL_CASE_ENUM_PROPERTIES2, SHARED_CORE_ABSTRACTIONS_PASCAL_CASE_PROPERTIES2, RESOURCE_BUILDER_PASCAL_CASE_PROPERTIES2, PASCAL_CASE_ENUM_PROPERTIES2, JsonSerializerFactory2, JsonSerializerProxy2, StreamSerializer2, SolutionDefinitionHelper2, Tokens, models_BindingsResourceType, getResourceName, getFolderPathProperty, getResourceKindForBinding, FirstPartyServiceApi2, assertSolutionManifest2, computeEntryPointSpec2, createResourceBuilderServices2, findProjectFile2, isProjectManifestError2, isMissingProjectTypeError2, readProjectFile2, readSolutionFile2, resolveSolutionFilePath2, writeSolutionFile2, restoreSolutionFile2, createProjectInSolutionBuilder2, normalizeFolderPath2, findMatchingLocalResource2, addProjectArtifactsToSolutionAsync2, hasBareTemplateRow2, hasAnyTemplateRow2, getRemoteResourceClients2, exportResourceDefinitionAsync2, readSpecProperty2, saveCasingNormalized2, normalizeResourceFileCasing2, readResourceConfigurationsAsync2, readResourceConfigurationAsync2,
|
|
20759
|
+
export { JsonSerializerNames2, JsonSerializer2, CAMEL_CASE_ENUM_PROPERTIES2, SHARED_CORE_ABSTRACTIONS_PASCAL_CASE_PROPERTIES2, RESOURCE_BUILDER_PASCAL_CASE_PROPERTIES2, PASCAL_CASE_ENUM_PROPERTIES2, JsonSerializerFactory2, JsonSerializerProxy2, StreamSerializer2, SolutionDefinitionHelper2, Tokens, models_BindingsResourceType, getResourceName, getFolderPathProperty, getResourceKindForBinding, FirstPartyServiceApi2, assertSolutionManifest2, computeEntryPointSpec2, createResourceBuilderServices2, findProjectFile2, isProjectManifestError2, isMissingProjectTypeError2, readProjectFile2, readSolutionFile2, resolveSolutionFilePath2, writeSolutionFile2, restoreSolutionFile2, createProjectInSolutionBuilder2, normalizeFolderPath2, findMatchingLocalResource2, addProjectArtifactsToSolutionAsync2, hasBareTemplateRow2, hasAnyTemplateRow2, getRemoteResourceClients2, exportResourceDefinitionAsync2, readSpecProperty2, saveCasingNormalized2, normalizeResourceFileCasing2, readResourceConfigurationsAsync2, readResourceConfigurationAsync2, formatResourceSubtypes2, sameResourceSubtype2, syncResourcesFromBindings2, uniqueNameForResource2, findResourceByKeyInRcs2, searchRcsResources2, findResourceInRcs2, createResourceKindMetadataResolver2, resolveResourceKindMetadata2, createLocalResource2, readUipxProjects2, syncAndLog2, resourceRefreshAsync2, resourceRemoteSyncAsync2 };
|
|
20823
20760
|
|
|
20824
|
-
//# debugId=
|
|
20761
|
+
//# debugId=754D4F21D99FA95164756E2164756E21
|