@salesforce/core 7.3.2 → 7.3.3-dev.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.
@@ -243,6 +243,10 @@ class ConfigFile extends configStore_1.BaseConfigStore {
243
243
  */
244
244
  async write() {
245
245
  const lockResponse = await (0, fileLocking_1.lockInit)(this.getPath());
246
+ if (this.getPath().endsWith('sandbox-create-cache.json')) {
247
+ // eslint-disable-next-line no-console
248
+ console.log('(async) time before write:', performance.now());
249
+ }
246
250
  // lock the file. Returns an unlock function to call when done.
247
251
  try {
248
252
  const fileTimestamp = (await fs.promises.stat(this.getPath(), { bigint: true })).mtimeNs;
@@ -254,6 +258,13 @@ class ConfigFile extends configStore_1.BaseConfigStore {
254
258
  }
255
259
  // write the merged LWWMap to file
256
260
  await lockResponse.writeAndUnlock(JSON.stringify(this.getContents(), null, 2));
261
+ if (this.getPath().endsWith('sandbox-create-cache.json')) {
262
+ /* eslint-disable no-console */
263
+ console.log('(async) time after write:', performance.now());
264
+ console.dir(this.getContents(), { depth: 8 });
265
+ console.log('--------------------------------------');
266
+ /* eslint-enable no-console */
267
+ }
257
268
  return this.getContents();
258
269
  }
259
270
  /**
@@ -264,6 +275,10 @@ class ConfigFile extends configStore_1.BaseConfigStore {
264
275
  */
265
276
  writeSync() {
266
277
  const lockResponse = (0, fileLocking_1.lockInitSync)(this.getPath());
278
+ if (this.getPath().endsWith('sandbox-create-cache.json')) {
279
+ // eslint-disable-next-line no-console
280
+ console.log('(sync) time before write:', performance.now());
281
+ }
267
282
  try {
268
283
  // get the file modstamp. Do this after the lock acquisition in case the file is being written to.
269
284
  const fileTimestamp = fs.statSync(this.getPath(), { bigint: true }).mtimeNs;
@@ -275,6 +290,13 @@ class ConfigFile extends configStore_1.BaseConfigStore {
275
290
  }
276
291
  // write the merged LWWMap to file
277
292
  lockResponse.writeAndUnlock(JSON.stringify(this.getContents(), null, 2));
293
+ if (this.getPath().endsWith('sandbox-create-cache.json')) {
294
+ /* eslint-disable no-console */
295
+ console.log('(sync) time after write:', performance.now());
296
+ console.dir(this.getContents(), { depth: 8 });
297
+ console.log('--------------------------------------');
298
+ /* eslint-enable no-console */
299
+ }
278
300
  return this.getContents();
279
301
  }
280
302
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/core",
3
- "version": "7.3.2",
3
+ "version": "7.3.3-dev.0",
4
4
  "description": "Core libraries to interact with SFDX projects, orgs, and APIs.",
5
5
  "main": "lib/index",
6
6
  "types": "lib/index.d.ts",