omp-worklog 0.14.4 → 0.14.5
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 +4 -4
- data/README.md +7 -0
- data/bin/release-plugin +64 -15
- data/lib/omp_worklog/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e13d4863a853283acc2fbefdd433c6fa6dd38e5180f483fe647a29067621dfab
|
|
4
|
+
data.tar.gz: bdb0edda46245581f6ee7e68c71f3bac263eb6f78996f8dd3ccca7d135985f2a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e74327cb9ef7e26c41f34bbc4ffa59d6727373694885a527202d87b0bb2ed2bb36b09767f19d1069856a64770508d91d0430239a9fd9d3568e0ad2f875bdd62c
|
|
7
|
+
data.tar.gz: f1b50e45029fc37e59801742120a24608f413c2f78f7ae63a6526774692a6038f4479a05be2514a09165444e480bea34a1d31aa5e1e4f189b10ebab0faade03b
|
data/README.md
CHANGED
|
@@ -121,6 +121,11 @@ Version `0.14.0` is a clean identity cutover. Uninstall the retired `harvest-wor
|
|
|
121
121
|
|
|
122
122
|
Version `0.14.3` renames the OMP slash command from `/omp-worklog` to `/worklog`; the `omp-worklog` package identity and CLI executable are unchanged.
|
|
123
123
|
|
|
124
|
+
## Changes in 0.14.5
|
|
125
|
+
|
|
126
|
+
- Preserve saved user settings across the required clean plugin reinstall, without copying project overrides or manifest defaults into user configuration.
|
|
127
|
+
- Retain an owner-only recovery snapshot and report its path; abort before uninstalling when settings cannot be exported.
|
|
128
|
+
|
|
124
129
|
## Changes in 0.14.4
|
|
125
130
|
|
|
126
131
|
- Preserve short positive durations in mapped and review-required drafts.
|
|
@@ -148,4 +153,6 @@ omp-worklog --help
|
|
|
148
153
|
|
|
149
154
|
`npm run release` owns the plugin uninstall/force-install mutation, including removal of the retired plugin when present. `npm run verify:release` never changes the installation: it checks the installed package version, resolved Git revision, and plugin path, then runs the installed JavaScript test suite. It exits after verification; tests alone do not exercise a fresh OMP host.
|
|
150
155
|
|
|
156
|
+
The release wrapper exports explicit user settings through OMP's configuration CLI from an isolated temporary directory before uninstalling. It saves `settings.json` in an owner-only recovery directory, prints that path without values, restores settings through the CLI, and verifies equality after installation. Project overrides remain project-scoped; unset defaults stay unset. Keep the reported backup until the release is confirmed. If installation or restoration fails, recover from that private snapshot after resolving the reported phase; do not paste its contents into an issue.
|
|
157
|
+
|
|
151
158
|
After installation, start a new OMP process and exercise `/worklog` completion and a timesheet against synthetic local evidence. Verify that a newly committed SQLite project appears without restarting that process. Existing sessions retain startup-loaded extension code and cannot prove the released artifact. Use explicit factory options for a mapped smoke until #134 is resolved; do not claim persisted-setting activation from that smoke.
|
data/bin/release-plugin
CHANGED
|
@@ -1,19 +1,68 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { execFileSync } from "node:child_process"
|
|
3
|
+
import { mkdtempSync, rmSync, writeFileSync } from "node:fs"
|
|
4
|
+
import { tmpdir } from "node:os"
|
|
5
|
+
import { join } from "node:path"
|
|
6
|
+
import { isDeepStrictEqual } from "node:util"
|
|
7
|
+
|
|
8
|
+
// The CLI resolves settings against cwd; an isolated directory excludes project overrides.
|
|
9
|
+
const directory = mkdtempSync(join(tmpdir(), "omp-worklog-release-"))
|
|
10
|
+
let phase = "listing installed plugins"
|
|
11
|
+
let snapshotPath
|
|
12
|
+
|
|
13
|
+
function run(description, args) {
|
|
14
|
+
phase = description
|
|
15
|
+
return execFileSync("omp", args, {
|
|
16
|
+
cwd: directory,
|
|
17
|
+
encoding: "utf8",
|
|
18
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
19
|
+
})
|
|
9
20
|
}
|
|
10
21
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
22
|
+
function userSettings() {
|
|
23
|
+
const { settings } = JSON.parse(run("exporting user settings", ["plugin", "config", "list", "omp-worklog", "--json"]))
|
|
24
|
+
if (!settings || typeof settings !== "object" || Array.isArray(settings)) {
|
|
25
|
+
throw new Error("Invalid settings export")
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return settings
|
|
29
|
+
}
|
|
14
30
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
31
|
+
try {
|
|
32
|
+
const plugins = JSON.parse(run("listing installed plugins", ["plugin", "list", "--json"])).npm ?? []
|
|
33
|
+
const installed = new Set(plugins.map(plugin => plugin.name))
|
|
34
|
+
let settings
|
|
35
|
+
if (installed.has("omp-worklog")) {
|
|
36
|
+
settings = userSettings()
|
|
37
|
+
const backupPath = join(directory, "settings.json")
|
|
38
|
+
phase = "saving the private settings snapshot"
|
|
39
|
+
writeFileSync(backupPath, JSON.stringify(settings), { mode: 0o600, flag: "wx" })
|
|
40
|
+
snapshotPath = backupPath
|
|
41
|
+
console.log(`Saved private Worklog settings backup: ${snapshotPath}`)
|
|
42
|
+
run("uninstalling omp-worklog", ["plugin", "uninstall", "omp-worklog"])
|
|
43
|
+
}
|
|
18
44
|
|
|
19
|
-
|
|
45
|
+
if (installed.has("harvest-worklog")) {
|
|
46
|
+
run("uninstalling harvest-worklog", ["plugin", "uninstall", "harvest-worklog"])
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
run("installing omp-worklog", ["plugin", "install", "--force", "github:klondikemarlen/omp-worklog"])
|
|
50
|
+
if (settings) {
|
|
51
|
+
for (const [key, value] of Object.entries(settings)) {
|
|
52
|
+
const argument = typeof value === "string" ? value : JSON.stringify(value)
|
|
53
|
+
run("restoring user settings", ["plugin", "config", "set", "omp-worklog", key, argument])
|
|
54
|
+
}
|
|
55
|
+
if (!isDeepStrictEqual(userSettings(), settings)) {
|
|
56
|
+
phase = "verifying restored user settings"
|
|
57
|
+
throw new Error("Settings changed")
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
console.log("Installed omp-worklog; user settings preserved.")
|
|
62
|
+
} catch {
|
|
63
|
+
console.error(`Worklog release failed while ${phase}.`)
|
|
64
|
+
if (snapshotPath) console.error(`Recover saved user settings from ${snapshotPath}.`)
|
|
65
|
+
process.exitCode = 1
|
|
66
|
+
} finally {
|
|
67
|
+
if (!snapshotPath) rmSync(directory, { recursive: true, force: true })
|
|
68
|
+
}
|
data/lib/omp_worklog/version.rb
CHANGED