@nordicsemiconductor/firmware-ci-runner-azure 1.7.24 → 2.0.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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  BSD 3-Clause License
2
2
 
3
- Copyright (c) 2019-2021, Nordic Semiconductor ASA | nordicsemi.no
3
+ Copyright (c) 2019-2022, Nordic Semiconductor ASA | nordicsemi.no
4
4
  All rights reserved.
5
5
 
6
6
  Redistribution and use in source and binary forms, with or without
package/cli/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  const fs = require('fs')
4
+ const { run } = require('../dist/run')
4
5
 
5
6
  const die = (err, origin) => {
6
7
  console.error(`An unhandled exception occured!`)
@@ -12,11 +13,11 @@ const die = (err, origin) => {
12
13
  process.on('uncaughtException', die)
13
14
  process.on('unhandledRejection', die)
14
15
 
15
- const { run } = require('../dist/run')
16
+ const input = JSON.parse(fs.readFileSync(0, 'utf-8'))
16
17
  run({
17
- target: process.env.RUN_TARGET ?? 'nrf9160dk_nrf9160ns',
18
+ target: process.env.RUN_TARGET ?? 'nrf9160dk_nrf9160_ns',
18
19
  port: process.env.RUN_PORT ?? '/dev/ttyACM0',
19
- })(JSON.parse(fs.readFileSync(0, 'utf-8')))
20
+ })(input)
20
21
  .then((res) => {
21
22
  if (res.timeout) {
22
23
  console.error(`Timed out.`)
package/dist/run.d.ts CHANGED
@@ -2,8 +2,8 @@ declare type Result = Promise<{
2
2
  connected: boolean;
3
3
  timeout: boolean;
4
4
  abort: boolean;
5
- deviceLog: string[];
6
- flashLog: string[];
5
+ deviceLog?: string[];
6
+ flashLog?: string[];
7
7
  }>;
8
8
  declare type Args = {
9
9
  deviceId: string;
@@ -35,6 +35,6 @@ declare type Args = {
35
35
  };
36
36
  export declare const run: ({ port, target, }: {
37
37
  port: string;
38
- target: 'thingy91_nrf9160ns' | 'nrf9160dk_nrf9160ns';
38
+ target: 'thingy91_nrf9160_ns' | 'nrf9160dk_nrf9160_ns';
39
39
  }) => (args: Args) => Result;
40
40
  export {};
package/dist/run.js CHANGED
@@ -16,6 +16,7 @@ const run = ({ port, target, }) => {
16
16
  debug('port', port);
17
17
  debug('target', target);
18
18
  return async ({ deviceId, appVersion, network, secTag, timeoutInMinutes, hexFile, fotaFile, abortOn, endOn, endOnWaitSeconds, testEnv, certDir, powerCycle, flashLogLocation, deviceLogLocation, }) => {
19
+ var _a, _b, _c, _d;
19
20
  debug('appVersion', appVersion);
20
21
  debug('network', network);
21
22
  debug('secTag', secTag);
@@ -30,7 +31,7 @@ const run = ({ port, target, }) => {
30
31
  debug('powerCycle', powerCycle);
31
32
  debug('flashLogLocation', flashLogLocation);
32
33
  debug('deviceLogLocation', deviceLogLocation);
33
- const atHost = target === 'thingy91_nrf9160ns'
34
+ const atHost = target === 'thingy91_nrf9160_ns'
34
35
  ? firmware_ci_device_helpers_1.atHostHexfile.thingy91
35
36
  : firmware_ci_device_helpers_1.atHostHexfile['9160dk'];
36
37
  const { clientId, clientSecret, tenantId } = JSON.parse(testEnv.credentials);
@@ -219,8 +220,8 @@ const run = ({ port, target, }) => {
219
220
  await containerClient.deleteBlob(fotaFileName);
220
221
  }
221
222
  await Promise.all([
222
- fs_1.promises.writeFile(flashLogLocation, res.flashLog.join('\n'), 'utf-8'),
223
- fs_1.promises.writeFile(deviceLogLocation, res.deviceLog.join('\n'), 'utf-8'),
223
+ fs_1.promises.writeFile(flashLogLocation, (_b = (_a = res.flashLog) === null || _a === void 0 ? void 0 : _a.join('\n')) !== null && _b !== void 0 ? _b : '', 'utf-8'),
224
+ fs_1.promises.writeFile(deviceLogLocation, (_d = (_c = res.deviceLog) === null || _c === void 0 ? void 0 : _c.join('\n')) !== null && _d !== void 0 ? _d : '', 'utf-8'),
224
225
  ]);
225
226
  return res;
226
227
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nordicsemiconductor/firmware-ci-runner-azure",
3
- "version": "1.7.24",
3
+ "version": "2.0.1",
4
4
  "description": "Runs firmware on a real device connected to Azure IoT hub.",
5
5
  "main": "./dist/export.js",
6
6
  "bin": "./cli/index.js",
@@ -16,10 +16,11 @@
16
16
  "url": "git+https://github.com/NordicSemiconductor/cloud-azure-firmware-ci-runner-js.git"
17
17
  },
18
18
  "keywords": [
19
- "Cloud",
20
- "IoT",
21
- "AssetTracker",
22
- "Nordic Semiconductor"
19
+ "nrf-asset-tracker",
20
+ "iot",
21
+ "firmware",
22
+ "end-to-end-testing",
23
+ "azure"
23
24
  ],
24
25
  "author": "Nordic Semiconductor ASA | nordicsemi.no",
25
26
  "license": "BSD-3-Clause",
@@ -30,7 +31,7 @@
30
31
  "dependencies": {
31
32
  "@azure/identity": "2.0.1",
32
33
  "@azure/storage-blob": "12.8.0",
33
- "@nordicsemiconductor/firmware-ci-device-helpers": "11.1.26",
34
+ "@nordicsemiconductor/firmware-ci-device-helpers": "11.1.27",
34
35
  "@serialport/parser-readline": "9.2.4",
35
36
  "azure-iothub": "1.14.6",
36
37
  "semver": "7.3.5",
@@ -38,9 +39,9 @@
38
39
  "uuid": "8.3.2"
39
40
  },
40
41
  "devDependencies": {
41
- "@nordicsemiconductor/asset-tracker-cloud-code-style": "9.2.31",
42
+ "@nordicsemiconductor/asset-tracker-cloud-code-style": "9.2.33",
42
43
  "@types/jest": "27.0.3",
43
- "@types/node": "16.11.12",
44
+ "@types/node": "16.11.13",
44
45
  "@types/semver": "7.3.9",
45
46
  "@types/serialport": "8.0.2",
46
47
  "@types/uuid": "8.3.3",
@@ -58,8 +59,8 @@
58
59
  ]
59
60
  },
60
61
  "engines": {
61
- "node": ">=14",
62
- "npm": ">=7"
62
+ "node": ">=16",
63
+ "npm": ">=8"
63
64
  },
64
65
  "release": {
65
66
  "branches": [