@signalk/charts-plugin 2.3.0 → 2.3.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.
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: Publish to npm
|
|
2
|
+
on:
|
|
3
|
+
workflow_run:
|
|
4
|
+
workflows: ["Release on tag"]
|
|
5
|
+
types: [completed]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
build:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v2
|
|
12
|
+
- uses: actions/setup-node@v1
|
|
13
|
+
with:
|
|
14
|
+
node-version: '16.x'
|
|
15
|
+
registry-url: 'https://registry.npmjs.org'
|
|
16
|
+
- run: npm publish --access public
|
|
17
|
+
env:
|
|
18
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: 'Release on tag'
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
tags:
|
|
5
|
+
- '*'
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
release:
|
|
9
|
+
permissions:
|
|
10
|
+
contents: write
|
|
11
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- name: Build Changelog
|
|
15
|
+
id: github_release
|
|
16
|
+
uses: mikepenz/release-changelog-builder-action@v1
|
|
17
|
+
env:
|
|
18
|
+
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}
|
|
19
|
+
|
|
20
|
+
- name: Create Release
|
|
21
|
+
uses: actions/create-release@v1
|
|
22
|
+
with:
|
|
23
|
+
tag_name: ${{ github.ref }}
|
|
24
|
+
release_name: ${{ github.ref }}
|
|
25
|
+
body: ${{steps.github_release.outputs.changelog}}
|
|
26
|
+
env:
|
|
27
|
+
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: Pull Request Labels
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
types: [opened, labeled, unlabeled, synchronize]
|
|
5
|
+
jobs:
|
|
6
|
+
label:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- uses: mheap/github-action-required-labels@v1
|
|
10
|
+
with:
|
|
11
|
+
mode: exactly
|
|
12
|
+
count: 1
|
|
13
|
+
labels: "fix, feature, doc, chore, test, ignore, other, dependencies"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: CI test
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
|
|
9
|
+
strategy:
|
|
10
|
+
matrix:
|
|
11
|
+
node-version: [10.x, 16.x]
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v2
|
|
15
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
16
|
+
uses: actions/setup-node@v1
|
|
17
|
+
with:
|
|
18
|
+
node-version: ${{ matrix.node-version }}
|
|
19
|
+
- run: npm install
|
|
20
|
+
- run: npm test
|
|
21
|
+
env:
|
|
22
|
+
CI: true
|
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ Plugin adds support for `/resources/charts` endpoints described in [Signal K spe
|
|
|
43
43
|
|
|
44
44
|
- `GET /signalk/v1/api/resources/charts/` returns metadata for all available charts
|
|
45
45
|
- `GET /signalk/v1/api/resources/charts/${identifier}/` returns metadata for selected chart
|
|
46
|
-
- `GET /signalk/v1/api/resources/charts/${identifier}/${z}/${x}/${y}` returns a single tile for selected chart
|
|
46
|
+
- `GET /signalk/v1/api/resources/charts/${identifier}/${z}/${x}/${y}` returns a single tile for selected offline chart. As charts-plugin isn't proxy, online charts is not available via this request. You should look the metadata to find proper request.
|
|
47
47
|
|
|
48
48
|
License
|
|
49
49
|
-------
|
|
@@ -59,4 +59,4 @@ Unless required by applicable law or agreed to in writing, software
|
|
|
59
59
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
60
60
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
61
61
|
See the License for the specific language governing permissions and
|
|
62
|
-
limitations under the License.
|
|
62
|
+
limitations under the License.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signalk/charts-plugin",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "Signal K plugin to provide chart support for Signal K server",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,10 +21,9 @@
|
|
|
21
21
|
"email": "mikko.vesikkala@iki.fi"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@mapbox/mbtiles": "0.
|
|
24
|
+
"@mapbox/mbtiles": "^0.12.1",
|
|
25
25
|
"baconjs": "1.0.1",
|
|
26
26
|
"bluebird": "3.5.1",
|
|
27
|
-
"debug": "3.1.0",
|
|
28
27
|
"lodash": "^4.17.11",
|
|
29
28
|
"xml2js": "0.4.19"
|
|
30
29
|
},
|
package/src/plugin.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const debug = require('debug')('signalk-charts-plugin')
|
|
2
1
|
const Promise = require('bluebird')
|
|
3
2
|
const _ = require('lodash')
|
|
4
3
|
const path = require('path')
|
|
@@ -25,12 +24,12 @@ module.exports = function(app) {
|
|
|
25
24
|
result[provider.identifier] = provider
|
|
26
25
|
return result
|
|
27
26
|
}, {})
|
|
28
|
-
debug(`Start charts plugin. Chart paths: ${chartPaths.join(', ')}, online charts: ${onlineProviders.length}`)
|
|
27
|
+
app.debug(`Start charts plugin. Chart paths: ${chartPaths.join(', ')}, online charts: ${onlineProviders.length}`)
|
|
29
28
|
|
|
30
29
|
const loadProviders = Promise.mapSeries(chartPaths, chartPath => Charts.findCharts(chartPath))
|
|
31
30
|
.then(list => _.reduce(list, (result, charts) => _.merge({}, result, charts), {}))
|
|
32
31
|
return loadProviders.then(charts => {
|
|
33
|
-
|
|
32
|
+
app.debug(`Chart plugin: Found ${_.keys(charts).length} charts from ${chartPaths.join(', ')}`)
|
|
34
33
|
chartProviders = _.merge({}, charts, onlineProviders)
|
|
35
34
|
// Do not register routes if plugin has been started once already
|
|
36
35
|
pluginStarted === false && registerRoutes()
|
|
@@ -42,7 +41,6 @@ module.exports = function(app) {
|
|
|
42
41
|
}
|
|
43
42
|
|
|
44
43
|
function stop() {
|
|
45
|
-
debug("Chart plugin stopped")
|
|
46
44
|
}
|
|
47
45
|
|
|
48
46
|
function registerRoutes() {
|