@salesforce/packaging 1.1.1 → 1.1.3

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.
@@ -94,7 +94,10 @@ class Package {
94
94
  * @param connection
95
95
  */
96
96
  static async list(connection) {
97
- return (await connection.tooling.query(`select ${exports.Package2Fields.toString()} from Package2`))?.records;
97
+ return (await connection.tooling.query(`select ${exports.Package2Fields.toString()} from Package2 ORDER BY NamespacePrefix, Name`, {
98
+ autoFetch: true,
99
+ maxFetch: 10000,
100
+ }))?.records;
98
101
  }
99
102
  /**
100
103
  * Returns the package versions in the org.
@@ -114,7 +117,7 @@ class Package {
114
117
  return id;
115
118
  }
116
119
  else {
117
- throw messages.createError('errorInvalidPackageVersionId', [id]);
120
+ throw messages.createError('invalidPackageId', [id, '0Ho']);
118
121
  }
119
122
  });
120
123
  const opts = options || {};
@@ -15,6 +15,7 @@ const packageUninstall_1 = require("./packageUninstall");
15
15
  const versionNumber_1 = require("./versionNumber");
16
16
  core_1.Messages.importMessagesDirectory(__dirname);
17
17
  const messages = core_1.Messages.loadMessages('@salesforce/packaging', 'subscriber_package_version');
18
+ const pkgMessages = core_1.Messages.load('@salesforce/packaging', 'package', ['action', 'defaultErrorMessage']);
18
19
  // these fields have been identified as requiring additional serverside resources in order to calculate their values
19
20
  // and are therefore not returned by default
20
21
  // these will require additional queries to retrieve
@@ -161,8 +162,8 @@ class SubscriberPackageVersion {
161
162
  const errorDetails = await (0, packageUninstall_1.getUninstallErrors)(connection, id);
162
163
  const errors = errorDetails.map((record, index) => `(${index + 1}) ${record.Message}`);
163
164
  const errHeader = errors.length > 0 ? `\n=== Errors\n${errors.join('\n')}` : '';
164
- const err = messages.getMessage('defaultErrorMessage', [id, result.Id]);
165
- throw new core_1.SfError(`${err}${errHeader}`, 'UNINSTALL_ERROR', [messages.getMessage('action')]);
165
+ const err = pkgMessages.getMessage('defaultErrorMessage', [id, result.Id]);
166
+ throw new core_1.SfError(`${err}${errHeader}`, 'UNINSTALL_ERROR', [pkgMessages.getMessage('action')]);
166
167
  }
167
168
  return result;
168
169
  }
@@ -6,18 +6,6 @@ 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
- # packageVersionInstallRequestIdInvalid
10
-
11
- The provided package install request ID: [%s] is invalid. It must be a 15 or 18 character package install request ID (0Hf).
12
-
13
- # packageVersionUninstallRequestIdInvalid
14
-
15
- The provided package uninstall request ID: [%s] is invalid. It must be a 15 or 18 character package install request ID (06y).
16
-
17
- # packageVersionInstallRequestNotFound
18
-
19
- The provided package install request ID: [%s] could not be found.
20
-
21
9
  # packageAliasNotFound
22
10
 
23
11
  The provided package id: [%s] could not be resolved to an alias.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/packaging",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "Packaging library for the Salesforce packaging platform",
5
5
  "main": "lib/exported",
6
6
  "types": "lib/exported.d.ts",
@@ -80,9 +80,9 @@
80
80
  "eslint-plugin-import": "^2.26.0",
81
81
  "eslint-plugin-jsdoc": "^39.3.25",
82
82
  "husky": "^8.0.1",
83
- "mocha": "^10.0.0",
83
+ "mocha": "^10.2.0",
84
84
  "nyc": "^15.1.0",
85
- "prettier": "^2.8.0",
85
+ "prettier": "^2.8.1",
86
86
  "pretty-quick": "^3.1.3",
87
87
  "shelljs": "0.8.5",
88
88
  "sinon": "14.0.2",