harvest-worklog 0.13.5 → 0.13.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b51d6d0a5441984dbfefb62ad1d2968448d05f8ff2bfaa876431d2ed86c1115
4
- data.tar.gz: 3156fc8a3aedaa63322871ce93d6e7bd5ab1ed447c0ae6068ddc0047b6769faa
3
+ metadata.gz: 0a708820ff730ffb80a21aa3320aeacb947a63042abc757ed91f7eff3c5312e1
4
+ data.tar.gz: 219d9844973f026ab97b501e978f6c0f4e041bf96ca5d2d36474be6c61a0529d
5
5
  SHA512:
6
- metadata.gz: 9296b71f3ae2a6eb97a723e5096670c31a0bada76e70b3842802a0581ffaa06a65b49b9c610e2c80fc4d2826bc788186a7f4997d8432fbfad1c575961bec2e9f
7
- data.tar.gz: c5cb75fb5318bfe07304ec8771b5f4154cd55bb252d757daa7cf6d1e5652dcbc4bf02df3f817761dbc3c4334cc8d0e2b645042caa5cd791cf918f5fadb83b015
6
+ metadata.gz: 7b88ca5e82c85c34000e6d83b249ab5cce20239dee4841009a137d7637f2c6e33e5685ac897edda5e0071c828b930171c90fd3fcdfb1627b54df909ee06bddf1
7
+ data.tar.gz: 5823b577d1d6a446116515bf9d2be49698cf5399f601a46a9a3df5844f3960b8bc5563ec8e56ab11a0c0d99f1d65172f68838a26e48998f734b0f22913749a25
data/README.md CHANGED
@@ -97,6 +97,8 @@ Configure `projectTimeMappings` with the recorded OMP Project Time project name
97
97
 
98
98
  `harvest_preview_project_time_entries` reads only `human_active` sessions from the configured time log, splits them across local dates, reports that source policy, generates descriptions from the project and repository, and checks Harvest for existing or locked entries without writing. `harvest_record_project_time_entries` performs the same preflight then creates only new entries; OMP treats it as a write requiring approval. Unmapped sessions are reported and never written.
99
99
 
100
+ `harvest_preview_project_time_drafts` produces one deterministic, copyable Date/Project/Task/Duration block per mapped local day and Harvest destination from automatic `human_active` evidence. It requires a factual note before manual entry and keeps unmapped and excluded evidence visible. It reads the local log only; it never calls or mutates Harvest.
101
+
100
102
  ### Activity transforms
101
103
 
102
104
  `harvest_preview_project_time_transforms` emits deterministic JSON for local raw intervals. It accepts an inclusive date range and optional exact `repositoryId`, `project`, and `sourceKind` filters; each matching interval is split by local date and grouped by activity, with missing labels reported as `unlabelled`. It defaults to `human_active` and returns the effective top-level `sourceKind`; selecting `agent_turn_elapsed` requires an explicit source-kind request. Set `applyMappings` to include configured Harvest project/task mappings. The output reports `groups`, proposed mapped `entries`, and any `unmapped` or `excluded` rows.
@@ -145,4 +147,4 @@ npm run verify:release
145
147
  harvest-worklog --help
146
148
  ```
147
149
 
148
- `npm run release` owns the uninstall/force-install mutation. `npm run verify:release` never changes the installation: it checks the exact installed version and runs a deterministic slash-command smoke test against the installed plugin. It exits after verification. Existing OMP sessions retain startup-loaded extension code; restart them before optional manual autocomplete and slash-command QA.
150
+ `npm run release` owns the uninstall/force-install mutation. `npm run verify:release` never changes the installation: it checks the installed package version, resolved Git revision, and plugin path before running a deterministic slash-command smoke test against the installed plugin. It exits after verification. Existing OMP sessions retain startup-loaded extension code; restart them before optional manual autocomplete and slash-command QA.
@@ -4,12 +4,22 @@ set -euo pipefail
4
4
  root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5
5
  cd "$root"
6
6
  version="$(node -p 'require("./package.json").version')"
7
-
7
+ expected_revision="$(git rev-parse HEAD)"
8
+ plugin_root="$HOME/.omp/plugins"
9
+ installed_path="$plugin_root/node_modules/harvest-worklog/package.json"
8
10
  installed_version="$(node -p 'require(process.env.HOME + "/.omp/plugins/node_modules/harvest-worklog/package.json").version')"
9
- if [[ "$installed_version" != "$version" ]]; then
10
- printf 'Expected installed harvest-worklog@%s, found %s.\n' "$version" "$installed_version" >&2
11
+ resolved_revision="$(node -e '
12
+ const lock = require("node:fs").readFileSync(process.argv[1], "utf8")
13
+ const match = /"harvest-worklog"\s*:\s*\[\s*"harvest-worklog@github:klondikemarlen\/harvest-worklog#([0-9a-f]+)/.exec(lock)
14
+ if (!match) process.exit(1)
15
+ process.stdout.write(match[1])
16
+ ' "$plugin_root/bun.lock")" || {
17
+ printf 'Could not resolve the installed harvest-worklog Git revision from %s.\n' "$plugin_root/bun.lock" >&2
18
+ exit 1
19
+ }
20
+ if [[ "$installed_version" != "$version" || "${expected_revision:0:${#resolved_revision}}" != "$resolved_revision" ]]; then
21
+ printf 'Expected installed harvest-worklog@%s from Git revision %s; found harvest-worklog@%s at %s resolved from Git revision %s.\n' "$version" "$expected_revision" "$installed_version" "$installed_path" "$resolved_revision" >&2
11
22
  exit 1
12
23
  fi
13
- node --test "$HOME/.omp/plugins/node_modules/harvest-worklog/test/"*.test.js
14
- printf 'Verified harvest-worklog@%s.\n' "$version"
15
- printf 'Existing OMP sessions must be restarted before manual QA.\n'
24
+ node --test "$plugin_root/node_modules/harvest-worklog/test/"*.test.js
25
+ printf 'Verified harvest-worklog@%s from Git revision %s at %s.\n' "$version" "$resolved_revision" "$installed_path"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HarvestWorklog
4
- VERSION = "0.13.5"
4
+ VERSION = "0.13.7"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: harvest-worklog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.5
4
+ version: 0.13.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marlen Brunner