@mongodb-js/compass-utils 0.2.3 → 0.3.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.
@@ -1 +1 @@
1
- {"version":3,"file":"get-storage-paths.d.ts","sourceRoot":"","sources":["../src/get-storage-paths.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,eAAe,IAAI,YAAY,GAAG,SAAS,CAmB1D"}
1
+ {"version":3,"file":"get-storage-paths.d.ts","sourceRoot":"","sources":["../src/get-storage-paths.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAkBD,wBAAgB,eAAe,IAAI,YAAY,GAAG,SAAS,CAQ1D"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getStoragePaths = void 0;
4
- function getStoragePaths() {
4
+ function getElectronApp() {
5
5
  let app;
6
6
  try {
7
7
  app = require('@electron/remote').app;
@@ -14,6 +14,10 @@ function getStoragePaths() {
14
14
  console.log('Could not load @electron/remote', e1.message, e2.message);
15
15
  }
16
16
  }
17
+ return app;
18
+ }
19
+ function getStoragePaths() {
20
+ const app = getElectronApp();
17
21
  if (!app)
18
22
  return undefined;
19
23
  const appName = app.getName();
@@ -1 +1 @@
1
- {"version":3,"file":"get-storage-paths.js","sourceRoot":"","sources":["../src/get-storage-paths.ts"],"names":[],"mappings":";;;AAMA,SAAgB,eAAe;IAC7B,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;YAChB,OAAO,CAAC,GAAG,CAAC,iCAAiC,EAAE,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC;SACxE;KACF;IAED,IAAI,CAAC,GAAG;QAAE,OAAO,SAAS,CAAC;IAE3B,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;IAC9B,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAEzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAC/B,CAAC;AAnBD,0CAmBC"}
1
+ {"version":3,"file":"get-storage-paths.js","sourceRoot":"","sources":["../src/get-storage-paths.ts"],"names":[],"mappings":";;;AAMA,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;YAChB,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,eAAe;IAC7B,MAAM,GAAG,GAAG,cAAc,EAAE,CAAC;IAC7B,IAAI,CAAC,GAAG;QAAE,OAAO,SAAS,CAAC;IAE3B,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;IAC9B,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAEzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAC/B,CAAC;AARD,0CAQC"}
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "email": "compass@mongodb.com"
15
15
  },
16
16
  "homepage": "https://github.com/mongodb-js/compass",
17
- "version": "0.2.3",
17
+ "version": "0.3.1",
18
18
  "repository": {
19
19
  "type": "git",
20
20
  "url": "https://github.com/mongodb-js/compass.git"
@@ -45,7 +45,7 @@
45
45
  "check": "npm run typecheck && npm run lint && npm run depcheck",
46
46
  "check-ci": "npm run check",
47
47
  "test": "mocha",
48
- "test-cov": "nyc -x \"**/*.spec.*\" --reporter=lcov --reporter=text --reporter=html npm run test",
48
+ "test-cov": "nyc --compact=false --produce-source-map=false -x \"**/*.spec.*\" --reporter=lcov --reporter=text --reporter=html npm run test",
49
49
  "test-watch": "npm run test -- --watch",
50
50
  "test-ci": "npm run test-cov",
51
51
  "reformat": "npm run prettier -- --write . && npm run eslint . --fix"
@@ -54,10 +54,10 @@
54
54
  "@electron/remote": "^2.0.9"
55
55
  },
56
56
  "devDependencies": {
57
- "@mongodb-js/eslint-config-compass": "^1.0.4",
58
- "@mongodb-js/mocha-config-compass": "^1.1.0",
57
+ "@mongodb-js/eslint-config-compass": "^1.0.6",
58
+ "@mongodb-js/mocha-config-compass": "^1.2.0",
59
59
  "@mongodb-js/prettier-config-compass": "^1.0.0",
60
- "@mongodb-js/tsconfig-compass": "^1.0.1",
60
+ "@mongodb-js/tsconfig-compass": "^1.0.2",
61
61
  "@types/chai": "^4.2.21",
62
62
  "@types/mocha": "^9.0.0",
63
63
  "@types/sinon-chai": "^3.2.5",
@@ -65,11 +65,11 @@
65
65
  "depcheck": "^1.4.1",
66
66
  "eslint": "^7.25.0",
67
67
  "gen-esm-wrapper": "^1.1.0",
68
- "mocha": "^8.4.0",
68
+ "mocha": "^10.2.0",
69
69
  "nyc": "^15.1.0",
70
70
  "prettier": "^2.7.1",
71
71
  "sinon": "^9.2.3",
72
- "typescript": "^4.8.3"
72
+ "typescript": "^5.0.4"
73
73
  },
74
- "gitHead": "fe181eedfcb07251b9b9a3dce8254a4941d74e42"
74
+ "gitHead": "129d5d5375a2815408e12ee15e1b6bd566f52600"
75
75
  }