Skip to content

Commit a44f9da

Browse files
committed
update for api 2.0; align to template-ts
1 parent ac5aa59 commit a44f9da

21 files changed

Lines changed: 857 additions & 1796 deletions

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/workflows/companion-module-checks.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ jobs:
1515
uses: bitfocus/actions/.github/workflows/module-checks.yaml@main
1616
# with:
1717
# upload-artifact: true # uncomment this to upload the built package as an artifact to this workflow that you can download and share with others
18+

.github/workflows/node.yaml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Node CI
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
tags:
8+
- 'v[0-9]+.[0-9]+.[0-9]+*'
9+
pull_request:
10+
11+
jobs:
12+
lint:
13+
name: Lint
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 15
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Use Node.js 22.x
20+
# This should match the version of Node.js you have defined in the manifest.json runtime field
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 22.x
24+
- name: Prepare Environment
25+
run: |
26+
corepack enable
27+
- name: Prepare Environment (For template repository)
28+
29+
- name: Prepare module
30+
run: |
31+
yarn install
32+
env:
33+
CI: true
34+
35+
# Runs a set of commands using the runners shell
36+
- name: Prettier Action
37+
uses: creyD/prettier_action@8c18391fdc98ed0d884c6345f03975edac71b8f0 # v4.6
38+
39+
- name: Build and check types
40+
run: |
41+
yarn build
42+
env:
43+
CI: true
44+
- name: Run lint
45+
run: |
46+
yarn lint
47+
env:
48+
CI: true
49+
50+
# Uncomment this to enable running unit tests
51+
# test:
52+
# name: Test
53+
# runs-on: ubuntu-latest
54+
# timeout-minutes: 15
55+
56+
# steps:
57+
# - uses: actions/checkout@v4
58+
# - name: Use Node.js 22.x
59+
# uses: actions/setup-node@v4
60+
# with:
61+
# node-version: 22.x
62+
# - name: Prepare Environment
63+
# run: |
64+
# corepack enable
65+
# yarn install
66+
# env:
67+
# CI: true
68+
# - name: Run tests
69+
# run: |
70+
# yarn test
71+
# env:
72+
# CI: true
73+
# - name: Send coverage
74+
# uses: codecov/codecov-action@v5

.github/workflows/prettier.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ node_modules/
22
package-lock.json
33
.DS_Store
44
/pkg
5-
/pkg.tgz
5+
/*.tgz
66
/dist
77
DEBUG-*
8-
/.yarn
8+
/.yarn
9+
/.vscode

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lint-staged
1+
lint-staged

.prettierrc

Lines changed: 0 additions & 9 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 Bitfocus AS - Open Source
3+
Copyright (c) 2022 Bitfocus AS - Open Source
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

companion/HELP.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,7 @@ Presets are available for **Start Timer** and **Stop Timer**.
8484

8585
- update dependencies (fix CVE-2025-58754)
8686
- handle rate limiting of toggl
87+
88+
### Version 2.2.0
89+
90+
- update to companion api 2.0

companion/manifest.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
"$schema": "../node_modules/@companion-module/base/assets/manifest.schema.json",
3+
"type": "connection",
24
"id": "toggl-track",
35
"name": "toggl-track",
46
"shortname": "toggl-track",
@@ -15,13 +17,13 @@
1517
"name": "Matthias Kesler"
1618
}
1719
],
18-
"legacyIds": [],
1920
"runtime": {
2021
"type": "node22",
2122
"api": "nodejs-ipc",
2223
"apiVersion": "0.0.0",
2324
"entrypoint": "../dist/main.js"
2425
},
26+
"legacyIds": [],
2527
"manufacturer": "Toggl",
2628
"products": ["Track"],
2729
"keywords": ["Logging", "Timer", "Task Tracking", "Time Tracking", "Project Management"]

0 commit comments

Comments
 (0)