@canboat/canboatjs 2.11.0 → 3.0.0-beta.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/.github/workflows/publish.yml +3 -3
- package/bin/analyzerjs +8 -2
- package/bin/to-pgn +3 -4
- package/index.js +0 -3
- package/ios_canboat.js/main.js +2 -0
- package/ios_canboat.js/main.js.LICENSE.txt +17 -0
- package/ios_canboat.js/main.js.map +1 -0
- package/lib/candevice.js +330 -8
- package/lib/fromPgn.js +32 -9
- package/lib/pgns.js +3 -2
- package/lib/simpleCan.js +1 -5
- package/lib/stringMsg.js +0 -12
- package/lib/toPgn.js +14 -13
- package/lib/ydgw02.js +2 -19
- package/package.json +2 -2
- package/examples/signalk-device-emulator/dist/index.d.ts +0 -11
- package/examples/signalk-device-emulator/dist/index.js +0 -129
- package/examples/signalk-device-emulator/index.js +0 -1
- package/examples/signalk-device-emulator/package.json +0 -24
- package/examples/signalk-device-emulator/signalk-device-emulator-1.0.0.tgz +0 -0
- package/lib/n2kDevice.js +0 -365
- package/lib/yddevice.js +0 -47
|
@@ -11,13 +11,13 @@ jobs:
|
|
|
11
11
|
with:
|
|
12
12
|
node-version: '18.x'
|
|
13
13
|
registry-url: 'https://registry.npmjs.org'
|
|
14
|
-
|
|
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
|
|
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,
|
|
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,
|
|
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
|
-
|