@salesforce/packaging 3.5.19 → 3.5.21
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.
|
@@ -134,6 +134,14 @@ async function waitForPublish(connection, subscriberPackageVersionId, frequency,
|
|
|
134
134
|
await pollingClient.subscribe();
|
|
135
135
|
}
|
|
136
136
|
catch (e) {
|
|
137
|
+
// For installation key problems throw that error.
|
|
138
|
+
if (e instanceof Error && e.name.includes('INSTALL_KEY')) {
|
|
139
|
+
throw core_1.SfError.create({
|
|
140
|
+
name: e.name,
|
|
141
|
+
message: e.message,
|
|
142
|
+
cause: e,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
137
145
|
// if polling timed out
|
|
138
146
|
const error = installMsgs.createError('subscriberPackageVersionNotPublished');
|
|
139
147
|
if (queryResult?.records[0]) {
|
|
@@ -3,6 +3,7 @@ import { Duration } from '@salesforce/kit';
|
|
|
3
3
|
import { Nullable, Optional } from '@salesforce/ts-types';
|
|
4
4
|
import { InstalledPackages, PackageDescriptorJson, PackageInstallCreateRequest, PackageInstallOptions, PackageType, PackagingSObjects, SubscriberPackageVersionOptions } from '../interfaces';
|
|
5
5
|
import { VersionNumber } from './versionNumber';
|
|
6
|
+
type SPV = PackagingSObjects.SubscriberPackageVersion;
|
|
6
7
|
export declare const SubscriberPackageVersionFields: string[];
|
|
7
8
|
/**
|
|
8
9
|
* Provides the ability to get, list, install, and uninstall 2nd
|
|
@@ -147,7 +148,7 @@ export declare class SubscriberPackageVersion {
|
|
|
147
148
|
getData(options?: {
|
|
148
149
|
force?: boolean;
|
|
149
150
|
includeHighCostFields?: boolean;
|
|
150
|
-
}): Promise<
|
|
151
|
+
}): Promise<SPV | undefined>;
|
|
151
152
|
/**
|
|
152
153
|
* Wait for the subscriber package version to be replicated across instances and available to be queried against
|
|
153
154
|
*
|
|
@@ -201,3 +202,4 @@ export declare class SubscriberPackageVersion {
|
|
|
201
202
|
getField<T>(field: string): Promise<T>;
|
|
202
203
|
private getFieldsForQuery;
|
|
203
204
|
}
|
|
205
|
+
export {};
|
|
@@ -313,22 +313,28 @@ class SubscriberPackageVersion {
|
|
|
313
313
|
return this.data;
|
|
314
314
|
}
|
|
315
315
|
try {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
});
|
|
316
|
+
let query = `SELECT ${queryFields.toString()} FROM SubscriberPackageVersion WHERE Id ='${await this.getId()}'`;
|
|
317
|
+
if (this.password) {
|
|
318
|
+
query = `${query} AND InstallationKey ='${(0, packageUtils_1.escapeInstallationKey)(this.password)}'`;
|
|
319
|
+
}
|
|
320
|
+
this.data = await this.connection.singleRecordQuery(query, { tooling: true });
|
|
322
321
|
}
|
|
323
322
|
catch (err) {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
323
|
+
if (err instanceof Error) {
|
|
324
|
+
if (err.message === 'Request failed') {
|
|
325
|
+
// Use a better error message. This is typically a bad ID.
|
|
326
|
+
const errMsg = messages.getMessage('errorInvalidIdNoRecordFound', [this.options.aliasOrId]);
|
|
327
|
+
err.message = `${errMsg} - (${err.message})`;
|
|
328
|
+
}
|
|
329
|
+
throw core_1.SfError.create({
|
|
330
|
+
name: err.name,
|
|
331
|
+
message: err.message,
|
|
332
|
+
cause: err,
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
else {
|
|
336
|
+
throw core_1.SfError.wrap(err);
|
|
337
|
+
}
|
|
332
338
|
}
|
|
333
339
|
}
|
|
334
340
|
return this.data;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/packaging",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.21",
|
|
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.2.0",
|
|
45
|
-
"@salesforce/core": "^7.3.
|
|
46
|
-
"@salesforce/kit": "^3.1.
|
|
45
|
+
"@salesforce/core": "^7.3.9",
|
|
46
|
+
"@salesforce/kit": "^3.1.2",
|
|
47
47
|
"@salesforce/schemas": "^1.9.0",
|
|
48
|
-
"@salesforce/source-deploy-retrieve": "^11.
|
|
48
|
+
"@salesforce/source-deploy-retrieve": "^11.6.3",
|
|
49
49
|
"@salesforce/ts-types": "^2.0.9",
|
|
50
50
|
"@salesforce/types": "^1.1.0",
|
|
51
51
|
"fast-xml-parser": "^4.3.6",
|