@mongodb-js/compass-utils 0.5.10 → 0.6.1

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.
@@ -4,6 +4,7 @@ export default mod;
4
4
  export const cancellableWait = mod.cancellableWait;
5
5
  export const createCancelError = mod.createCancelError;
6
6
  export const getAppName = mod.getAppName;
7
+ export const getAppVersion = mod.getAppVersion;
7
8
  export const getStoragePath = mod.getStoragePath;
8
9
  export const isCancelError = mod.isCancelError;
9
10
  export const promisifyAmpersandMethod = mod.promisifyAmpersandMethod;
@@ -1,3 +1,4 @@
1
1
  export declare function getAppName(): string | undefined;
2
+ export declare function getAppVersion(): string | undefined;
2
3
  export declare function getStoragePath(): string;
3
4
  //# sourceMappingURL=electron.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"electron.d.ts","sourceRoot":"","sources":["../src/electron.ts"],"names":[],"mappings":"AAmBA,wBAAgB,UAAU,IAAI,MAAM,GAAG,SAAS,CAE/C;AAED,wBAAgB,cAAc,WAM7B"}
1
+ {"version":3,"file":"electron.d.ts","sourceRoot":"","sources":["../src/electron.ts"],"names":[],"mappings":"AAmBA,wBAAgB,UAAU,IAAI,MAAM,GAAG,SAAS,CAE/C;AAED,wBAAgB,aAAa,IAAI,MAAM,GAAG,SAAS,CAElD;AAED,wBAAgB,cAAc,WAM7B"}
package/dist/electron.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getStoragePath = exports.getAppName = void 0;
3
+ exports.getStoragePath = exports.getAppVersion = exports.getAppName = void 0;
4
4
  function getElectronApp() {
5
5
  let app;
6
6
  try {
@@ -20,6 +20,10 @@ function getAppName() {
20
20
  return getElectronApp()?.getName();
21
21
  }
22
22
  exports.getAppName = getAppName;
23
+ function getAppVersion() {
24
+ return getElectronApp()?.getVersion();
25
+ }
26
+ exports.getAppVersion = getAppVersion;
23
27
  function getStoragePath() {
24
28
  const basepath = getElectronApp()?.getPath('userData');
25
29
  if (!basepath) {
@@ -1 +1 @@
1
- {"version":3,"file":"electron.js","sourceRoot":"","sources":["../src/electron.ts"],"names":[],"mappings":";;;AAEA,SAAS,cAAc;IACrB,IAAI,GAAG,CAAC;IAER,IAAI;QACF,GAAG,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC,GAAG,CAAC;KACvC;IAAC,OAAO,EAAO,EAAE;QAChB,IAAI;YACF,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC;SAC/B;QAAC,OAAO,EAAO,EAAE;YAEhB,OAAO,CAAC,GAAG,CAAC,iCAAiC,EAAE,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC;SACxE;KACF;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAgB,UAAU;IACxB,OAAO,cAAc,EAAE,EAAE,OAAO,EAAE,CAAC;AACrC,CAAC;AAFD,gCAEC;AAED,SAAgB,cAAc;IAC5B,MAAM,QAAQ,GAAG,cAAc,EAAE,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACvD,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;KACrD;IACD,OAAO,QAAkB,CAAC;AAC5B,CAAC;AAND,wCAMC"}
1
+ {"version":3,"file":"electron.js","sourceRoot":"","sources":["../src/electron.ts"],"names":[],"mappings":";;;AAEA,SAAS,cAAc;IACrB,IAAI,GAAG,CAAC;IAER,IAAI;QACF,GAAG,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC,GAAG,CAAC;KACvC;IAAC,OAAO,EAAO,EAAE;QAChB,IAAI;YACF,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC;SAC/B;QAAC,OAAO,EAAO,EAAE;YAEhB,OAAO,CAAC,GAAG,CAAC,iCAAiC,EAAE,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC;SACxE;KACF;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAgB,UAAU;IACxB,OAAO,cAAc,EAAE,EAAE,OAAO,EAAE,CAAC;AACrC,CAAC;AAFD,gCAEC;AAED,SAAgB,aAAa;IAC3B,OAAO,cAAc,EAAE,EAAE,UAAU,EAAE,CAAC;AACxC,CAAC;AAFD,sCAEC;AAED,SAAgB,cAAc;IAC5B,MAAM,QAAQ,GAAG,cAAc,EAAE,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACvD,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;KACrD;IACD,OAAO,QAAkB,CAAC;AAC5B,CAAC;AAND,wCAMC"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export type { AmpersandMethodOptions } from './promisify-ampersand-method';
2
2
  export { promisifyAmpersandMethod } from './promisify-ampersand-method';
3
- export { getAppName, getStoragePath } from './electron';
3
+ export { getAppName, getStoragePath, getAppVersion } from './electron';
4
4
  export { raceWithAbort, cancellableWait, createCancelError, isCancelError, throwIfAborted, } from './cancellable-promise';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EACL,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,cAAc,GACf,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACvE,OAAO,EACL,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,cAAc,GACf,MAAM,uBAAuB,CAAC"}
package/dist/index.js CHANGED
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.throwIfAborted = exports.isCancelError = exports.createCancelError = exports.cancellableWait = exports.raceWithAbort = exports.getStoragePath = exports.getAppName = exports.promisifyAmpersandMethod = void 0;
3
+ exports.throwIfAborted = exports.isCancelError = exports.createCancelError = exports.cancellableWait = exports.raceWithAbort = exports.getAppVersion = exports.getStoragePath = exports.getAppName = exports.promisifyAmpersandMethod = void 0;
4
4
  var promisify_ampersand_method_1 = require("./promisify-ampersand-method");
5
5
  Object.defineProperty(exports, "promisifyAmpersandMethod", { enumerable: true, get: function () { return promisify_ampersand_method_1.promisifyAmpersandMethod; } });
6
6
  var electron_1 = require("./electron");
7
7
  Object.defineProperty(exports, "getAppName", { enumerable: true, get: function () { return electron_1.getAppName; } });
8
8
  Object.defineProperty(exports, "getStoragePath", { enumerable: true, get: function () { return electron_1.getStoragePath; } });
9
+ Object.defineProperty(exports, "getAppVersion", { enumerable: true, get: function () { return electron_1.getAppVersion; } });
9
10
  var cancellable_promise_1 = require("./cancellable-promise");
10
11
  Object.defineProperty(exports, "raceWithAbort", { enumerable: true, get: function () { return cancellable_promise_1.raceWithAbort; } });
11
12
  Object.defineProperty(exports, "cancellableWait", { enumerable: true, get: function () { return cancellable_promise_1.cancellableWait; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,2EAAwE;AAA/D,sIAAA,wBAAwB,OAAA;AACjC,uCAAwD;AAA/C,sGAAA,UAAU,OAAA;AAAE,0GAAA,cAAc,OAAA;AACnC,6DAM+B;AAL7B,oHAAA,aAAa,OAAA;AACb,sHAAA,eAAe,OAAA;AACf,wHAAA,iBAAiB,OAAA;AACjB,oHAAA,aAAa,OAAA;AACb,qHAAA,cAAc,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,2EAAwE;AAA/D,sIAAA,wBAAwB,OAAA;AACjC,uCAAuE;AAA9D,sGAAA,UAAU,OAAA;AAAE,0GAAA,cAAc,OAAA;AAAE,yGAAA,aAAa,OAAA;AAClD,6DAM+B;AAL7B,oHAAA,aAAa,OAAA;AACb,sHAAA,eAAe,OAAA;AACf,wHAAA,iBAAiB,OAAA;AACjB,oHAAA,aAAa,OAAA;AACb,qHAAA,cAAc,OAAA"}
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "email": "compass@mongodb.com"
14
14
  },
15
15
  "homepage": "https://github.com/mongodb-js/compass",
16
- "version": "0.5.10",
16
+ "version": "0.6.1",
17
17
  "repository": {
18
18
  "type": "git",
19
19
  "url": "https://github.com/mongodb-js/compass.git"
@@ -50,12 +50,12 @@
50
50
  "reformat": "npm run eslint . -- --fix && npm run prettier -- --write ."
51
51
  },
52
52
  "optionalDependencies": {
53
- "@electron/remote": "^2.1.1",
54
- "electron": "^28.1.0"
53
+ "@electron/remote": "^2.1.2",
54
+ "electron": "^28.2.5"
55
55
  },
56
56
  "devDependencies": {
57
- "@mongodb-js/eslint-config-compass": "^1.0.15",
58
- "@mongodb-js/mocha-config-compass": "^1.3.6",
57
+ "@mongodb-js/eslint-config-compass": "^1.0.17",
58
+ "@mongodb-js/mocha-config-compass": "^1.3.7",
59
59
  "@mongodb-js/prettier-config-compass": "^1.0.1",
60
60
  "@mongodb-js/tsconfig-compass": "^1.0.3",
61
61
  "@types/chai": "^4.2.21",
@@ -71,5 +71,11 @@
71
71
  "sinon": "^9.2.3",
72
72
  "typescript": "^5.0.4"
73
73
  },
74
- "gitHead": "806203e749dea63ec3ac450f39b3687f41350681"
74
+ "dependencies": {
75
+ "@mongodb-js/compass-logging": "^1.2.14"
76
+ },
77
+ "peerDependencies": {
78
+ "@mongodb-js/compass-logging": "^1.2.14"
79
+ },
80
+ "gitHead": "aabc5be9049177a56c831354535e073bf77cb16f"
75
81
  }