@jsforce/jsforce-node 3.6.5 → 3.7.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.
- package/lib/VERSION.d.ts +1 -1
- package/lib/VERSION.js +1 -1
- package/lib/api/metadata.d.ts +3 -2
- package/lib/api/metadata.js +13 -6
- package/lib/request.js +2 -6
- package/package.json +1 -1
package/lib/VERSION.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "3.
|
|
1
|
+
declare const _default: "3.7.0";
|
|
2
2
|
export default _default;
|
package/lib/VERSION.js
CHANGED
package/lib/api/metadata.d.ts
CHANGED
|
@@ -121,9 +121,10 @@ export declare class MetadataApi<S extends Schema> {
|
|
|
121
121
|
*/
|
|
122
122
|
deploy(zipInput: Readable | Buffer | string, options?: Partial<DeployOptions>): DeployResultLocator<S>;
|
|
123
123
|
/**
|
|
124
|
-
* Checks the status of declarative metadata call deploy()
|
|
124
|
+
* Checks the status of declarative metadata call deploy(), using either
|
|
125
|
+
* SOAP or REST APIs. SOAP is the default.
|
|
125
126
|
*/
|
|
126
|
-
checkDeployStatus(asyncProcessId: string, includeDetails?: boolean): Promise<DeployResult>;
|
|
127
|
+
checkDeployStatus(asyncProcessId: string, includeDetails?: boolean, rest?: boolean): Promise<DeployResult>;
|
|
127
128
|
cancelDeploy(id: string): Promise<CancelDeployResult>;
|
|
128
129
|
}
|
|
129
130
|
/**
|
package/lib/api/metadata.js
CHANGED
|
@@ -254,13 +254,20 @@ class MetadataApi {
|
|
|
254
254
|
return new DeployResultLocator(this, res);
|
|
255
255
|
}
|
|
256
256
|
/**
|
|
257
|
-
* Checks the status of declarative metadata call deploy()
|
|
257
|
+
* Checks the status of declarative metadata call deploy(), using either
|
|
258
|
+
* SOAP or REST APIs. SOAP is the default.
|
|
258
259
|
*/
|
|
259
|
-
checkDeployStatus(asyncProcessId, includeDetails = false) {
|
|
260
|
-
|
|
261
|
-
asyncProcessId
|
|
262
|
-
|
|
263
|
-
}
|
|
260
|
+
async checkDeployStatus(asyncProcessId, includeDetails = false, rest = false) {
|
|
261
|
+
if (rest) {
|
|
262
|
+
const url = `/metadata/deployRequest/${asyncProcessId}${includeDetails ? '?includeDetails=true' : ''}`;
|
|
263
|
+
return (await this._conn.requestGet(url)).deployResult;
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
return this._invoke('checkDeployStatus', {
|
|
267
|
+
asyncProcessId,
|
|
268
|
+
includeDetails,
|
|
269
|
+
}, schema_1.ApiSchemas.DeployResult);
|
|
270
|
+
}
|
|
264
271
|
}
|
|
265
272
|
async cancelDeploy(id) {
|
|
266
273
|
return this._invoke('cancelDeploy', { id });
|
package/lib/request.js
CHANGED
|
@@ -84,9 +84,7 @@ async function startFetchRequest(request, options, input, output, emitter, count
|
|
|
84
84
|
if (resOrErr instanceof node_fetch_1.Response) {
|
|
85
85
|
if (retryOpts.statusCodes.includes(resOrErr.status)) {
|
|
86
86
|
if (maxRetry === retryCount) {
|
|
87
|
-
|
|
88
|
-
err.name = 'RequestRetryError';
|
|
89
|
-
throw err;
|
|
87
|
+
return false;
|
|
90
88
|
}
|
|
91
89
|
else {
|
|
92
90
|
return true;
|
|
@@ -160,9 +158,7 @@ async function startFetchRequest(request, options, input, output, emitter, count
|
|
|
160
158
|
}
|
|
161
159
|
logger.debug('Skipping retry...');
|
|
162
160
|
if (maxRetry === retryCount) {
|
|
163
|
-
|
|
164
|
-
error.name = 'RequestRetryError';
|
|
165
|
-
throw error;
|
|
161
|
+
throw err;
|
|
166
162
|
}
|
|
167
163
|
else {
|
|
168
164
|
throw err;
|