Skip to content

Commit

Permalink
Merge pull request #620 from particle-iot/feature/sc-100154/esom-x
Browse files Browse the repository at this point in the history
feature/sc-100154/esom-x
  • Loading branch information
busticated authored Jun 7, 2022
2 parents 555debd + 1fd9ac7 commit cf849ac
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 39 deletions.
70 changes: 50 additions & 20 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
}
],
"dependencies": {
"@particle/device-constants": "^1.3.0",
"@particle/device-constants": "^1.5.0",
"binary-version-reader": "^1.1.1",
"chalk": "^2.4.2",
"cli-spinner": "^0.2.10",
Expand Down
26 changes: 9 additions & 17 deletions src/cmd/constants.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
const deviceConstants = require('@particle/device-constants');


module.exports.MAX_FILE_SIZE = 1024 * 1024 * 2;

module.exports.platformsById = {
0: 'Core',
6: 'Photon',
8: 'P1',
10: 'Electron',
12: 'Argon',
13: 'Boron',
14: 'Xenon',
22: 'A SoM',
23: 'B SoM',
24: 'X SoM',
25: 'B5 SoM',
26: 'Asset Tracker',
31: 'Raspberry Pi',
88: 'Duo',
103: 'Bluz'
};
module.exports.platformsById = Object.values(deviceConstants)
.filter(p => p.public)
.reduce((out, p) => {
out[p.id] = p.displayName;
return out;
}, {});

module.exports.notSourceExtensions = [
'.ds_store',
Expand Down
3 changes: 2 additions & 1 deletion src/lib/device-specs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ describe('Device Specs', () => {
'argon',
'boron',
'xenon',
'esomx',
'bsom',
'b5som',
'tracker',
Expand Down Expand Up @@ -71,7 +72,7 @@ describe('Device Specs', () => {

describe('knownApps', () => {
it('includes `tinker` in `known apps` for offical platforms', async () => {
const unsupported = ['Asset Tracker', 'P2'];
const unsupported = ['Asset Tracker', 'P2', 'E SoM X'];

for (const specs of Object.values(deviceSpecs)){
const { productName, knownApps } = specs;
Expand Down
2 changes: 2 additions & 0 deletions src/lib/utilities.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ describe('Utilities', () => {
'argon': 12,
'boron': 13,
'xenon': 14,
'esomx': 15,
'asom': 22,
'bsom': 23,
'xsom': 24,
Expand All @@ -37,6 +38,7 @@ describe('Utilities', () => {
12: 'Argon',
13: 'Boron',
14: 'Xenon',
15: 'E SoM X',
22: 'A SoM',
23: 'B SoM',
24: 'X SoM',
Expand Down

0 comments on commit cf849ac

Please sign in to comment.