@itentialopensource/adapter-meraki 1.0.3 → 1.0.4

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.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,12 @@
1
1
 
2
+ ## 1.0.4 [08-01-2023]
3
+
4
+ * Update adapter base and import order
5
+
6
+ See merge request itentialopensource/adapters/sd-wan/adapter-meraki!27
7
+
8
+ ---
9
+
2
10
  ## 1.0.3 [07-10-2023]
3
11
 
4
12
  * Migrate adapter base to have broker changes
package/adapterBase.js CHANGED
@@ -11,11 +11,11 @@
11
11
  /* eslint prefer-destructuring: warn */
12
12
 
13
13
  /* Required libraries. */
14
- const fs = require('fs-extra');
14
+ const { execSync } = require('child_process');
15
15
  const path = require('path');
16
- const jsonQuery = require('json-query');
17
16
  const EventEmitterCl = require('events').EventEmitter;
18
- const { execSync } = require('child_process');
17
+ const fs = require('fs-extra');
18
+ const jsonQuery = require('json-query');
19
19
 
20
20
  const sampleProperties = require(`${__dirname}/sampleProperties.json`).properties;
21
21
 
@@ -26,14 +26,11 @@ const AjvCl = require('ajv');
26
26
  const PropUtilCl = require('@itentialopensource/adapter-utils').PropertyUtility;
27
27
  const RequestHandlerCl = require('@itentialopensource/adapter-utils').RequestHandler;
28
28
 
29
- const TransUtilCl = require(path.join(__dirname, 'node_modules/@itentialopensource/adapter-utils/lib/translatorUtil.js'));
30
-
31
29
  const entitiesToDB = require(path.join(__dirname, 'utils/entitiesToDB'));
32
30
  const troubleshootingAdapter = require(path.join(__dirname, 'utils/troubleshootingAdapter'));
33
31
  const tbUtils = require(path.join(__dirname, 'utils/tbUtils'));
34
32
 
35
33
  let propUtil = null;
36
- let transUtil = null;
37
34
  let choosepath = null;
38
35
 
39
36
  /*
@@ -217,10 +214,6 @@ class AdapterBase extends EventEmitterCl {
217
214
  this.id = prongid;
218
215
  this.propUtilInst = new PropUtilCl(prongid, __dirname);
219
216
  propUtil = this.propUtilInst;
220
- this.transUtilInst = new TransUtilCl(prongid, this.propUtilInst);
221
- transUtil = this.transUtilInst;
222
- this.transUtilInst = new TransUtilCl(prongid, this.propUtilInst);
223
- transUtil = this.transUtilInst;
224
217
  this.initProps = properties;
225
218
  this.alive = false;
226
219
  this.healthy = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-meraki",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "This adapter integrates with system described as: merakiDashboardApi.",
5
5
  "main": "adapter.js",
6
6
  "systemName": "Meraki",
Binary file
@@ -7,9 +7,9 @@
7
7
  /* eslint import/no-dynamic-require: warn */
8
8
  /* eslint import/no-unresolved: warn */
9
9
 
10
- const mocha = require('mocha');
11
10
  const path = require('path');
12
11
  const assert = require('assert');
12
+ const mocha = require('mocha');
13
13
  const itParam = require('mocha-param');
14
14
 
15
15
  const utils = require('../../utils/tbUtils');
@@ -3,8 +3,8 @@
3
3
  /* global describe it context before after */
4
4
  /* eslint no-unused-vars: warn */
5
5
 
6
- const mocha = require('mocha');
7
6
  const assert = require('assert');
7
+ const mocha = require('mocha');
8
8
  const diagnostics = require('network-diagnostics');
9
9
 
10
10
  let host;
@@ -8,14 +8,14 @@
8
8
 
9
9
  // include required items for testing & logging
10
10
  const assert = require('assert');
11
+ const path = require('path');
11
12
  const fs = require('fs');
13
+ const util = require('util');
12
14
  const mocha = require('mocha');
13
- const path = require('path');
14
15
  const winston = require('winston');
15
16
  const { expect } = require('chai');
16
17
  const { use } = require('chai');
17
18
  const td = require('testdouble');
18
- const util = require('util');
19
19
 
20
20
  const anything = td.matchers.anything();
21
21
 
@@ -5,9 +5,9 @@
5
5
 
6
6
  // include required items for testing & logging
7
7
  const assert = require('assert');
8
+ const path = require('path');
8
9
  const fs = require('fs-extra');
9
10
  const mocha = require('mocha');
10
- const path = require('path');
11
11
  const winston = require('winston');
12
12
  const { expect } = require('chai');
13
13
  const { use } = require('chai');
@@ -8,12 +8,12 @@
8
8
 
9
9
  // include required items for testing & logging
10
10
  const assert = require('assert');
11
- const fs = require('fs-extra');
12
- const mocha = require('mocha');
11
+ const execute = require('child_process').execSync;
13
12
  const path = require('path');
14
13
  const util = require('util');
14
+ const fs = require('fs-extra');
15
+ const mocha = require('mocha');
15
16
  const winston = require('winston');
16
- const execute = require('child_process').execSync;
17
17
  const { expect } = require('chai');
18
18
  const { use } = require('chai');
19
19
  const td = require('testdouble');
@@ -4,8 +4,8 @@
4
4
  /* eslint import/no-dynamic-require:warn */
5
5
  /* eslint prefer-destructuring:warn */
6
6
 
7
- const fs = require('fs-extra');
8
7
  const path = require('path');
8
+ const fs = require('fs-extra');
9
9
 
10
10
  /**
11
11
  * This script will determine the information about the adapter and store
package/utils/addAuth.js CHANGED
@@ -2,9 +2,9 @@
2
2
  /* eslint global-require: warn */
3
3
  /* eslint import/no-dynamic-require: warn */
4
4
 
5
- const rls = require('readline-sync');
6
5
  const path = require('path');
7
6
  const fs = require('fs');
7
+ const rls = require('readline-sync');
8
8
 
9
9
  function getQuestions(props, obj) {
10
10
  const questions = props.map((p) => `${p}: ${(obj[p] !== undefined) ? `(${obj[p]})` : ''} `);
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  /* @copyright Itential, LLC 2019 */
3
3
 
4
- const fs = require('fs-extra');
5
4
  const path = require('path');
5
+ const fs = require('fs-extra');
6
6
 
7
7
  async function createBundle(adapterOldDir) {
8
8
  // set directories
@@ -1,7 +1,7 @@
1
1
  const { execSync } = require('child_process');
2
+ const fs = require('fs');
2
3
  const semver = require('semver');
3
4
  const axios = require('axios');
4
- const fs = require('fs');
5
5
  const packageJson = require('../package.json');
6
6
 
7
7
  const localEngineVer = packageJson.engineVersion;
package/utils/findPath.js CHANGED
@@ -4,8 +4,8 @@
4
4
  /* eslint import/no-dynamic-require:warn */
5
5
  /* eslint prefer-destructuring:warn */
6
6
 
7
- const fs = require('fs-extra');
8
7
  const path = require('path');
8
+ const fs = require('fs-extra');
9
9
  const rls = require('readline-sync');
10
10
 
11
11
  /**
package/utils/modify.js CHANGED
@@ -1,7 +1,7 @@
1
+ const { execSync } = require('child_process');
1
2
  const fs = require('fs-extra');
2
3
  const Ajv = require('ajv');
3
4
  const rls = require('readline-sync');
4
- const { execSync } = require('child_process');
5
5
  const { existsSync } = require('fs-extra');
6
6
  const { getAdapterConfig } = require('./tbUtils');
7
7
  const { name } = require('../package.json');
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  /* @copyright Itential, LLC 2019 */
3
3
 
4
- const fs = require('fs-extra');
5
- const path = require('path');
6
4
  const { spawnSync } = require('child_process');
5
+ const path = require('path');
6
+ const fs = require('fs-extra');
7
7
  const { createBundle } = require('./artifactize');
8
8
 
9
9
  const nodeEntryPath = path.resolve('.');
package/utils/tbUtils.js CHANGED
@@ -5,9 +5,9 @@
5
5
  /* eslint import/no-dynamic-require: warn */
6
6
  /* eslint-disable no-console */
7
7
 
8
+ const cp = require('child_process');
8
9
  const path = require('path');
9
10
  const fs = require('fs-extra');
10
- const cp = require('child_process');
11
11
 
12
12
  module.exports = {
13
13
  SERVICE_CONFIGS_COLLECTION: 'service_configs',
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  /* @copyright Itential, LLC 2019 */
3
3
 
4
+ const execute = require('child_process').exec;
4
5
  const fs = require('fs-extra');
5
6
  const rl = require('readline-sync');
6
- const execute = require('child_process').exec;
7
7
 
8
8
  /**
9
9
  * This script will determine the type of integration test to run