@salesforce/packaging 4.1.14-dev.1 → 4.2.0
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.
|
@@ -536,9 +536,24 @@ class PackageVersion {
|
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
538
|
resolveId() {
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
539
|
+
let packageId = this.options.idOrAlias;
|
|
540
|
+
if (packageId.startsWith('04t') || packageId.startsWith('05i')) {
|
|
541
|
+
return packageId;
|
|
542
|
+
}
|
|
543
|
+
if (!this.options.project) {
|
|
544
|
+
throw messages.createError('errorInvalidPackageVersionIdNoProject', [this.options.idOrAlias]);
|
|
545
|
+
}
|
|
546
|
+
packageId = this.options.project.getPackageIdFromAlias(this.options.idOrAlias) ?? this.options.idOrAlias;
|
|
547
|
+
if (packageId === this.options.idOrAlias) {
|
|
548
|
+
throw messages.createError('packageAliasNotFound', [this.options.idOrAlias]);
|
|
549
|
+
}
|
|
550
|
+
// validate the resolved alias value from sfdx-project is a valid ID
|
|
551
|
+
if (packageId.startsWith('04t') || packageId.startsWith('05i')) {
|
|
552
|
+
return packageId;
|
|
553
|
+
}
|
|
554
|
+
else {
|
|
555
|
+
throw messages.createError('errorInvalidPackageVersionId', [this.options.idOrAlias]);
|
|
556
|
+
}
|
|
542
557
|
}
|
|
543
558
|
}
|
|
544
559
|
exports.PackageVersion = PackageVersion;
|
|
@@ -6,9 +6,17 @@ The %s %s is invalid, as a corresponding %s was not found
|
|
|
6
6
|
|
|
7
7
|
The provided alias or ID: [%s] could not be resolved to a valid package version ID (05i) or subscriber package version ID (04t).
|
|
8
8
|
|
|
9
|
+
# errorInvalidPackageVersionIdNoProject
|
|
10
|
+
|
|
11
|
+
The provided alias or ID: [%s] could not be resolved to a valid package version ID (05i) or subscriber package version ID (04t).
|
|
12
|
+
|
|
13
|
+
# errorInvalidPackageVersionIdNoProject.actions
|
|
14
|
+
|
|
15
|
+
If you are using a package alias, make sure you are inside your sfdx project and it's defined in the `packageDirectories` section in `sfdx-project.json`
|
|
16
|
+
|
|
9
17
|
# packageAliasNotFound
|
|
10
18
|
|
|
11
|
-
The provided package
|
|
19
|
+
The provided package ID: [%s] could not be resolved to an alias.
|
|
12
20
|
|
|
13
21
|
# createResultIdCannotBeEmpty
|
|
14
22
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/packaging",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "Packaging library for the Salesforce packaging platform",
|
|
5
5
|
"main": "lib/exported",
|
|
6
6
|
"types": "lib/exported.d.ts",
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@jsforce/jsforce-node": "^3.4.1",
|
|
45
|
-
"@salesforce/core": "^8.
|
|
45
|
+
"@salesforce/core": "^8.4.0",
|
|
46
46
|
"@salesforce/kit": "^3.2.1",
|
|
47
47
|
"@salesforce/schemas": "^1.9.0",
|
|
48
|
-
"@salesforce/source-deploy-retrieve": "^12.
|
|
48
|
+
"@salesforce/source-deploy-retrieve": "^12.4.0",
|
|
49
49
|
"@salesforce/ts-types": "^2.0.11",
|
|
50
50
|
"@salesforce/types": "^1.2.0",
|
|
51
51
|
"fast-xml-parser": "^4.4.1",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@salesforce/dev-scripts": "^10.2.9",
|
|
62
62
|
"@types/globby": "^9.1.0",
|
|
63
63
|
"@types/jszip": "^3.4.1",
|
|
64
|
-
"eslint-plugin-sf-plugin": "^1.20.
|
|
64
|
+
"eslint-plugin-sf-plugin": "^1.20.4",
|
|
65
65
|
"shelljs": "0.8.5",
|
|
66
66
|
"ts-node": "^10.9.2",
|
|
67
67
|
"typescript": "^5.5.4"
|