@beauraines/toggl-cli 0.10.5 → 0.10.7

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/.eslintrc.json CHANGED
@@ -12,5 +12,6 @@
12
12
  "sourceType": "module"
13
13
  },
14
14
  "rules": {
15
+ "allowTernary": true
15
16
  }
16
17
  }
package/CHANGELOG.md CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.10.7](https://github.com/beauraines/toggl-cli/compare/v0.10.6...v0.10.7) (2023-03-12)
6
+
7
+
8
+ ### Features
9
+
10
+ * updates app name sent with API requests ([9cf9a2b](https://github.com/beauraines/toggl-cli/commit/9cf9a2b4f6c1e638e2e3d8e251d0f15469627181))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * can edit time entries ([36cd1aa](https://github.com/beauraines/toggl-cli/commit/36cd1aa7519becda6abddee0e4e3fad37730822e))
16
+
17
+ ### [0.10.6](https://github.com/beauraines/toggl-cli/compare/v0.10.5...v0.10.6) (2023-03-12)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * update git links in npm registry ([b9e1a9e](https://github.com/beauraines/toggl-cli/commit/b9e1a9e0554ba7f677effd38c7475a87ea6f4c37))
23
+
5
24
  ### [0.10.5](https://github.com/beauraines/toggl-cli-node/compare/v0.10.4...v0.10.5) (2023-03-04)
6
25
 
7
26
 
package/cmds/edit.mjs CHANGED
@@ -9,13 +9,14 @@ dayjs.extend(timezone)
9
9
 
10
10
  export const command = 'edit'
11
11
  // FIXME editing not working
12
- export const desc = 'SOMETHING IS NOT RIGHT Edits the current running time entry'
12
+ export const desc = `Edits the current running time entry. Only updating the time is supported `+
13
+ `and the time must be parsable by dayjs, e.g. 4:50PM or '12:00 AM'.`
13
14
 
14
15
  export const builder = {
15
16
  d: { alias: ['description'], describe: 'Time entry name', type: 'string:' },
16
17
  p: { alias: ['projectId', 'project'], describe: 'The case insensitive project name or project id.', type: 'string', demandOption: false },
17
- s: { alias: ['start', 'startTime'], describe: 'The case insensitive project name or project id.', type: 'string', demandOption: false },
18
- e: { alias: ['end', 'endTime'], describe: 'The case insensitive project name or project id.', type: 'string', demandOption: false }
18
+ s: { alias: ['start', 'startTime'], describe: 'The start time for the task, e.g. 13:00 12:45AM.', type: 'string', demandOption: false },
19
+ e: { alias: ['end', 'endTime'], describe: 'The end time for the task, e.g. 13:00 12:45AM.', type: 'string', demandOption: false }
19
20
  }
20
21
 
21
22
  export const handler = async function (argv) {
@@ -59,8 +60,8 @@ export const handler = async function (argv) {
59
60
  project ? params.project_id = +project.id : undefined
60
61
  startTime ? params.start = startTime.toISOString() : undefined
61
62
  endTime ? params.stop = endTime.toISOString() : undefined
62
- endTime ? params.duration = endTime.diff(startTime, 'seconds') : undefined
63
63
  argv.description ? params.description = argv.description : undefined
64
+ debug(params)
64
65
  const timeEntry = await client.timeEntries.update(currentTimeEntry.id, params)
65
66
  await displayTimeEntry(timeEntry)
66
67
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beauraines/toggl-cli",
3
- "version": "0.10.5",
3
+ "version": "0.10.7",
4
4
  "description": "",
5
5
  "main": "cli.js",
6
6
  "bin": {
@@ -23,14 +23,15 @@
23
23
  "author": "Beau Raines <beau.raines@gmail.com>",
24
24
  "repository": {
25
25
  "type": "git",
26
- "url": "git+https://github.com/beauraines/toggl-cli-node.git"
26
+ "url": "git+https://github.com/beauraines/toggl-cli.git"
27
27
  },
28
28
  "bugs": {
29
- "url": "https://github.com/beauraines/toggl-cli-node/issues"
29
+ "url": "https://github.com/beauraines/toggl-cli/issues"
30
30
  },
31
31
  "license": "MIT",
32
32
  "dependencies": {
33
33
  "dayjs": "^1.11.6",
34
+ "debug": "^4.3.4",
34
35
  "dotenv": "^16.0.3",
35
36
  "open": "^8.4.0",
36
37
  "toggl-client": "^3.1.1",
package/utils.js CHANGED
@@ -93,7 +93,7 @@ export const convertUtcTime = function (dateTime) {
93
93
  return dayjs(dateTime).tz(tz).format('YYYY-MM-DD HH:mm')
94
94
  }
95
95
 
96
- export const appName = 'toggl-cli-node'
96
+ export const appName = '@beauraines/toggl-cli'
97
97
 
98
98
  /**
99
99
  * Displays a time entry on the console