@salesforce/source-tracking 2.2.16-dev.1 → 2.2.16-dev.2

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.
@@ -11,6 +11,7 @@ const path = require("path");
11
11
  const os = require("os");
12
12
  const fs = require("graceful-fs");
13
13
  const core_1 = require("@salesforce/core");
14
+ const kit_1 = require("@salesforce/kit");
14
15
  const git = require("isomorphic-git");
15
16
  const functions_1 = require("./functions");
16
17
  /** returns the full path to where we store the shadow repo */
@@ -27,7 +28,8 @@ class ShadowRepo {
27
28
  this.projectPath = options.projectPath;
28
29
  this.packageDirs = options.packageDirs;
29
30
  this.isWindows = os.type() === 'Windows_NT';
30
- this.maxFileAdd = 8000;
31
+ const batchSize = kit_1.env.getNumber('SFDX_SOURCE_TRACKING_BATCH_SIZE');
32
+ this.maxFileAdd = batchSize ? batchSize : this.isWindows ? 8000 : 15000;
31
33
  }
32
34
  // think of singleton behavior but unique to the projectPath
33
35
  static async getInstance(options) {
@@ -189,7 +191,9 @@ class ShadowRepo {
189
191
  catch (e) {
190
192
  if (e instanceof git.Errors.MultipleGitError) {
191
193
  this.logger.error('multiple errors on git.add', e.errors.slice(0, 5));
192
- const error = new core_1.SfError(e.message, e.name, [], 1);
194
+ const error = new core_1.SfError(e.message, e.name, [
195
+ `This error may be thrown because the number of files that source tracking is batching is exceeding your user specific file limits. Either increase your hard file limit in the same session with 'ulimit -Hn ${this.maxFileAdd}', or set the 'SFDX_SOURCE_TRACKING_BATCH_SIZE' environment variable to a value lower than the output of 'ulimit -Hn'`,
196
+ ], 1);
193
197
  error.setData(e.errors);
194
198
  throw error;
195
199
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/source-tracking",
3
3
  "description": "API for tracking local and remote Salesforce metadata changes",
4
- "version": "2.2.16-dev.1",
4
+ "version": "2.2.16-dev.2",
5
5
  "author": "Salesforce",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "lib/index.js",