@salesforce/packaging 3.5.15 → 3.5.16
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.
|
@@ -4,7 +4,7 @@ import type { SaveResult } from '@jsforce/jsforce-node';
|
|
|
4
4
|
import { Attributes } from 'graphology-types';
|
|
5
5
|
import { Optional } from '@salesforce/ts-types';
|
|
6
6
|
import { ConvertResult } from '@salesforce/source-deploy-retrieve';
|
|
7
|
-
import { Package } from '@
|
|
7
|
+
import type { Package } from '@salesforce/types/metadata';
|
|
8
8
|
import { PackageProfileApi } from '../package/packageProfileApi';
|
|
9
9
|
import { PackageAncestryNode } from '../package/packageAncestry';
|
|
10
10
|
import { PackagingSObjects } from './packagingSObjects';
|
|
@@ -138,7 +138,7 @@ export declare namespace PackagingSObjects {
|
|
|
138
138
|
type SubscriberPackageCspTrustedSites = {
|
|
139
139
|
settings: SubscriberPackageCspTrustedSite[];
|
|
140
140
|
};
|
|
141
|
-
type InstallValidationStatus = 'NO_ERRORS_DETECTED' | 'BETA_INSTALL_INTO_PRODUCTION_ORG' | 'CANNOT_INSTALL_EARLIER_VERSION' | 'CANNOT_UPGRADE_BETA' | 'CANNOT_UPGRADE_UNMANAGED' | 'DEPRECATED_INSTALL_PACKAGE' | 'EXTENSIONS_ON_LOCAL_PACKAGES' | 'PACKAGE_NOT_INSTALLED' | 'PACKAGE_HAS_IN_DEV_EXTENSIONS' | 'INSTALL_INTO_DEV_ORG' | 'NO_ACCESS' | 'PACKAGING_DISABLED' | 'PACKAGING_NO_ACCESS' | 'PACKAGE_UNAVAILABLE' | 'UNINSTALL_IN_PROGRESS' | 'UNKNOWN_ERROR' | 'NAMESPACE_COLLISION';
|
|
141
|
+
type InstallValidationStatus = 'NO_ERRORS_DETECTED' | 'BETA_INSTALL_INTO_PRODUCTION_ORG' | 'CANNOT_INSTALL_EARLIER_VERSION' | 'CANNOT_UPGRADE_BETA' | 'CANNOT_UPGRADE_UNMANAGED' | 'DEPRECATED_INSTALL_PACKAGE' | 'EXTENSIONS_ON_LOCAL_PACKAGES' | 'PACKAGE_NOT_INSTALLED' | 'PACKAGE_HAS_IN_DEV_EXTENSIONS' | 'INSTALL_INTO_DEV_ORG' | 'NO_ACCESS' | 'PACKAGING_DISABLED' | 'PACKAGING_NO_ACCESS' | 'PACKAGE_UNAVAILABLE' | 'PACKAGE_UNAVAILABLE_CRC' | 'PACKAGE_UNAVAILABLE_ZIP' | 'UNINSTALL_IN_PROGRESS' | 'UNKNOWN_ERROR' | 'NAMESPACE_COLLISION';
|
|
142
142
|
type SubscriberPackageVersion = {
|
|
143
143
|
Id: string;
|
|
144
144
|
SubscriberPackageId: string;
|
|
@@ -73,7 +73,7 @@ function isErrorFromSPVQueryRestriction(err) {
|
|
|
73
73
|
}
|
|
74
74
|
exports.isErrorFromSPVQueryRestriction = isErrorFromSPVQueryRestriction;
|
|
75
75
|
function isErrorPackageNotAvailable(err) {
|
|
76
|
-
return
|
|
76
|
+
return ['UNKNOWN_EXCEPTION', 'PACKAGE_UNAVAILABLE', 'PACKAGE_UNAVAILABLE_CRC', 'PACKAGE_UNAVAILABLE_ZIP'].includes(err.name);
|
|
77
77
|
}
|
|
78
78
|
exports.isErrorPackageNotAvailable = isErrorPackageNotAvailable;
|
|
79
79
|
async function getInstallationStatus(subscriberPackageVersionId, installationKey, connection) {
|
|
@@ -109,12 +109,18 @@ async function waitForPublish(connection, subscriberPackageVersionId, frequency,
|
|
|
109
109
|
// Continue retrying if there is no record
|
|
110
110
|
// or for an InstallValidationStatus of PACKAGE_UNAVAILABLE (replication to the subscriber's instance has not completed)
|
|
111
111
|
// or for an InstallValidationStatus of UNINSTALL_IN_PROGRESS
|
|
112
|
+
// or PACKAGE_UNAVAILABLE_ZIP or PACKAGE_UNAVAILABLE_CRC
|
|
112
113
|
if (queryResult?.records?.length) {
|
|
113
114
|
installValidationStatus = queryResult.records[0].InstallValidationStatus;
|
|
114
115
|
}
|
|
115
116
|
getLogger().debug(installMsgs.getMessage('publishWaitProgress', [` Status = ${installValidationStatus}`]));
|
|
116
117
|
await core_1.Lifecycle.getInstance().emit(interfaces_1.PackageEvents.install['subscriber-status'], installValidationStatus);
|
|
117
|
-
if (![
|
|
118
|
+
if (![
|
|
119
|
+
'PACKAGE_UNAVAILABLE',
|
|
120
|
+
'PACKAGE_UNAVAILABLE_CRC',
|
|
121
|
+
'PACKAGE_UNAVAILABLE_ZIP',
|
|
122
|
+
'UNINSTALL_IN_PROGRESS',
|
|
123
|
+
].includes(installValidationStatus)) {
|
|
118
124
|
return { completed: true, payload: installValidationStatus };
|
|
119
125
|
}
|
|
120
126
|
return { completed: false, payload: installValidationStatus };
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import type { Profile } from '@
|
|
1
|
+
import type { Profile } from '@salesforce/types/metadata';
|
|
2
2
|
import { PackageXml } from '../interfaces';
|
|
3
|
-
type
|
|
4
|
-
name: string;
|
|
5
|
-
enabled: boolean;
|
|
6
|
-
};
|
|
7
|
-
export type CorrectedProfile = Profile & {
|
|
8
|
-
customSettingAccesses: ProfileCustomSettingAccess[];
|
|
9
|
-
};
|
|
3
|
+
export type CorrectedProfile = Profile;
|
|
10
4
|
/**
|
|
11
5
|
*
|
|
12
6
|
* Takes a Profile that's been converted from package.xml to json.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/packaging",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.16",
|
|
4
4
|
"description": "Packaging library for the Salesforce packaging platform",
|
|
5
5
|
"main": "lib/exported",
|
|
6
6
|
"types": "lib/exported.d.ts",
|
|
@@ -42,11 +42,12 @@
|
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@jsforce/jsforce-node": "^3.2.0",
|
|
45
|
-
"@salesforce/core": "^7.3.
|
|
45
|
+
"@salesforce/core": "^7.3.6",
|
|
46
46
|
"@salesforce/kit": "^3.1.1",
|
|
47
47
|
"@salesforce/schemas": "^1.7.0",
|
|
48
48
|
"@salesforce/source-deploy-retrieve": "^11.4.3",
|
|
49
49
|
"@salesforce/ts-types": "^2.0.9",
|
|
50
|
+
"@salesforce/types": "^1.1.0",
|
|
50
51
|
"fast-xml-parser": "^4.3.6",
|
|
51
52
|
"globby": "^11",
|
|
52
53
|
"graphology": "^0.25.4",
|