@canboat/canboatjs 2.11.1 → 3.0.0-beta.2

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.
@@ -11,13 +11,13 @@ jobs:
11
11
  with:
12
12
  node-version: '18.x'
13
13
  registry-url: 'https://registry.npmjs.org'
14
- - run: |
14
+ run: |
15
15
  npm ci && npm cache clean --force
16
16
  if [[ "$tag" == *beta* ]];
17
17
  then
18
18
  npm publish --tag beta
19
19
  else
20
- npm publish --access public
20
+ npm publish
21
21
  fi
22
22
  env:
23
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
23
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/bin/analyzerjs CHANGED
@@ -3,7 +3,9 @@
3
3
  const argv = require('minimist')(process.argv.slice(2), {
4
4
  alias: { h: 'help' },
5
5
  boolean: ['n'],
6
- boolean: ['r']
6
+ boolean: ['r'],
7
+ boolean: ['camel'],
8
+ boolean: ['camel-compat']
7
9
  })
8
10
 
9
11
  if ( argv['help'] ) {
@@ -13,6 +15,8 @@ Options:
13
15
  -c don't check for invalid values
14
16
  -n output null values
15
17
  -r parse $MXPGN as little endian
18
+ --camel output field names in camelCase
19
+ --camel-compat output field names in camelCase and regular
16
20
  -h, --help output usage information`)
17
21
  process.exit(1)
18
22
  }
@@ -21,7 +25,9 @@ const Parser = require('../index').FromPgn
21
25
  var parser = new Parser( {
22
26
  returnNulls: argv['n'] === true,
23
27
  littleEndianMXPGN: argv['r'] === true,
24
- checkForInvalidFields: argv['c'] !== true
28
+ checkForInvalidFields: argv['c'] !== true,
29
+ useCamel: argv['camel'],
30
+ useCamelCompat: argv['camel-compat']
25
31
  })
26
32
 
27
33
  parser.on('error', (pgn, error) => {
package/bin/to-pgn CHANGED
@@ -4,14 +4,14 @@ const argv = require('minimist')(process.argv.slice(2), {
4
4
  string: ['format'],
5
5
  alias: { h: 'help' }
6
6
  })
7
- const { pgnToActisenseSerialFormat, pgnToActisenseN2KAsciiFormat, pgnToiKonvertSerialFormat, pgnToYdgwRawFormat, pgnToYdgwFullRawFormat, pgnToPCDIN, pgnToMXPGN } = require('../index')
7
+ const { pgnToActisenseSerialFormat, pgnToActisenseN2KAsciiFormat, pgnToiKonvertSerialFormat, pgnToYdgwRawFormat, pgnToPCDIN, pgnToMXPGN } = require('../index')
8
8
  const { toActisenseSerialFormat } = require('../lib/stringMsg')
9
9
 
10
10
  if ( argv['help'] ) {
11
11
  console.error(`Usage: ${process.argv[0]} [options]
12
12
 
13
13
  Options:
14
- --format <format> actisense, actisensen2kascii, ikconvert, ydgw, yd-full, pcdin, mxpgn
14
+ --format <format> actisense, actisensen2kascii, ikconvert, ydgw, pcdin, mxpgn
15
15
  -h, --help output usage information`)
16
16
  process.exit(1)
17
17
  }
@@ -23,8 +23,7 @@ const formatters = {
23
23
  ikconvert: pgnToiKonvertSerialFormat,
24
24
  ydgw: pgnToYdgwRawFormat,
25
25
  'pcdin': pgnToPCDIN,
26
- 'mxpgn': pgnToMXPGN,
27
- 'yd-full': pgnToYdgwFullRawFormat
26
+ 'mxpgn': pgnToMXPGN
28
27
  }
29
28
 
30
29
  const format = argv['format'] || 'actisense'
package/index.js CHANGED
@@ -28,7 +28,6 @@ module.exports = {
28
28
  pgnToActisenseN2KAsciiFormat: require('./lib/toPgn').pgnToActisenseN2KAsciiFormat,
29
29
  pgnToiKonvertSerialFormat: require('./lib/toPgn').pgnToiKonvertSerialFormat,
30
30
  pgnToYdgwRawFormat: require('./lib/toPgn').pgnToYdgwRawFormat,
31
- pgnToYdgwFullRawFormat: require('./lib/toPgn').pgnToYdgwFullRawFormat,
32
31
  pgnToPCDIN: require('./lib/toPgn').pgnToPCDIN,
33
32
  pgnToMXPGN: require('./lib/toPgn').pgnToMXPGN,
34
33
  canbus: require('./lib/canbus'),
@@ -40,7 +39,6 @@ module.exports = {
40
39
  VenusMQTT: require('./lib/venus-mqtt'),
41
40
  discover: require('./lib/discovery'),
42
41
  SimpleCan: require('./lib/simpleCan'),
43
- YdDevice: require('./lib/yddevice'),
44
42
  addCustomPgns: pgns.addCustomPgns,
45
43
  lookupEnumerationValue: pgns.lookupEnumerationValue,
46
44
  lookupEnumerationName: pgns.lookupEnumerationName
@@ -50,4 +48,3 @@ try {
50
48
  module.exports.serial = require('./lib/serial')
51
49
  } catch ( ex ) {
52
50
  }
53
-