@salesforce/packaging 4.14.0 → 4.15.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.
|
@@ -36,6 +36,7 @@ export type PackageUpdateOptions = {
|
|
|
36
36
|
Description?: string;
|
|
37
37
|
PackageErrorUsername?: string;
|
|
38
38
|
AppAnalyticsEnabled?: boolean;
|
|
39
|
+
RecommendedVersionId?: string;
|
|
39
40
|
};
|
|
40
41
|
export type PackageIdType = 'PackageId' | 'SubscriberPackageVersionId' | 'PackageInstallRequestId' | 'PackageUninstallRequestId';
|
|
41
42
|
export type PackageVersionOptions1GP = Record<string, unknown>;
|
package/lib/package/package.js
CHANGED
|
@@ -36,6 +36,7 @@ exports.Package2Fields = [
|
|
|
36
36
|
'ConvertedFromPackageId',
|
|
37
37
|
'PackageErrorUsername',
|
|
38
38
|
'AppAnalyticsEnabled',
|
|
39
|
+
'RecommendedVersionId',
|
|
39
40
|
];
|
|
40
41
|
/**
|
|
41
42
|
* Provides the ability to list, create, update, delete, convert, and get version
|
|
@@ -179,7 +180,7 @@ class Package {
|
|
|
179
180
|
}
|
|
180
181
|
static getPackage2Fields(connection) {
|
|
181
182
|
const apiVersion = connection.getApiVersion();
|
|
182
|
-
return exports.Package2Fields.filter((field) => (apiVersion >= '59.0' ? true : field !== 'AppAnalyticsEnabled'));
|
|
183
|
+
return exports.Package2Fields.filter((field) => (apiVersion >= '59.0' ? true : field !== 'AppAnalyticsEnabled')).filter((field) => (apiVersion >= '66.0' ? true : field !== 'RecommendedVersionId'));
|
|
183
184
|
}
|
|
184
185
|
/**
|
|
185
186
|
* Returns the package ID of the package.
|
|
@@ -240,6 +241,9 @@ class Package {
|
|
|
240
241
|
if (opts.AppAnalyticsEnabled !== undefined && this.options.connection.getApiVersion() < '59.0') {
|
|
241
242
|
throw messages.createError('appAnalyticsEnabledApiPriorTo59Error');
|
|
242
243
|
}
|
|
244
|
+
if (opts.RecommendedVersionId !== undefined && this.options.connection.getApiVersion() < '66.0') {
|
|
245
|
+
throw messages.createError('recommendedVersionIdApiPriorTo66Error');
|
|
246
|
+
}
|
|
243
247
|
const result = await this.options.connection.tooling.update('Package2', opts);
|
|
244
248
|
if (!result.success) {
|
|
245
249
|
throw new core_1.SfError(result.errors.join(', '));
|
package/messages/package.md
CHANGED
|
@@ -45,3 +45,7 @@ Can't retrieve package metadata. We're unable to retrieve metadata for the packa
|
|
|
45
45
|
# packagingNotEnabledOnOrg
|
|
46
46
|
|
|
47
47
|
Can't retrieve package metadata. The org you specified doesn't have the required second-generation packaging permission enabled. Enable this permission on your Dev Hub org, and try again.
|
|
48
|
+
|
|
49
|
+
# recommendedVersionIdApiPriorTo66Error
|
|
50
|
+
|
|
51
|
+
To enable Recommended Version, use API version 66.0 or higher.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/packaging",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.15.0",
|
|
4
4
|
"description": "Packaging library for the Salesforce packaging platform",
|
|
5
5
|
"main": "lib/exported",
|
|
6
6
|
"types": "lib/exported.d.ts",
|
|
@@ -63,7 +63,6 @@
|
|
|
63
63
|
"@types/globby": "^9.1.0",
|
|
64
64
|
"@types/jszip": "^3.4.1",
|
|
65
65
|
"eslint-plugin-sf-plugin": "^1.20.8",
|
|
66
|
-
"shelljs": "0.8.5",
|
|
67
66
|
"ts-node": "^10.9.2",
|
|
68
67
|
"typescript": "^5.5.4"
|
|
69
68
|
},
|