@fleetbase/ember-core 0.0.6 → 0.0.7

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.
Files changed (2) hide show
  1. package/index.js +6 -7
  2. package/package.json +2 -1
package/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
  const path = require('path');
3
+ const resolve = require('resolve');
3
4
 
4
5
  module.exports = {
5
6
  name: require('./package').name,
@@ -20,14 +21,12 @@ module.exports = {
20
21
  };
21
22
  }
22
23
 
23
- const importJs = (module, file, options) => {
24
- const modulePath = path.dirname(require.resolve(module));
25
- this.import(`${modulePath}/${file}`, options);
26
- };
27
-
28
24
  // import socketcluster for use in all fleetbase engines
29
25
  // this will become globally available as socketClusterClient
30
- importJs('socketcluster-client', 'socketcluster-client.min.js');
31
- // app.import('node_modules/socketcluster-client/socketcluster-client.min.js');
26
+ let socketClusterMainPath = resolve.sync('socketcluster-client', { basedir: app.project.root });
27
+ let socketClusterDir = path.dirname(socketClusterMainPath);
28
+ let socketClusterMinPath = path.join(socketClusterDir, 'socketcluster-client.min.js');
29
+
30
+ app.import(socketClusterMinPath);
32
31
  },
33
32
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fleetbase/ember-core",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Provides all the core services, decorators and utilities for building a Fleetbase extension for the Console.",
5
5
  "keywords": [
6
6
  "fleetbase-extension",
@@ -85,6 +85,7 @@
85
85
  "prettier": "^2.7.1",
86
86
  "qunit": "^2.19.1",
87
87
  "qunit-dom": "^2.0.0",
88
+ "resolve": "^1.22.2",
88
89
  "webpack": "^5.74.0"
89
90
  },
90
91
  "overrides": {