@workscribe/cli 1.14.1 → 1.14.2
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/dist/index.js +14 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2103,7 +2103,7 @@ ${commandList}
|
|
|
2103
2103
|
;;
|
|
2104
2104
|
esac
|
|
2105
2105
|
}
|
|
2106
|
-
_workscribe`;
|
|
2106
|
+
compdef _workscribe workscribe`;
|
|
2107
2107
|
}
|
|
2108
2108
|
function fishCompletion(commands) {
|
|
2109
2109
|
const lines = [
|
|
@@ -2188,7 +2188,7 @@ function isCompletionsInstalled(shell) {
|
|
|
2188
2188
|
return import_fs12.default.existsSync(import_path8.default.join(FISH_COMPLETIONS_DIR, "workscribe.fish"));
|
|
2189
2189
|
}
|
|
2190
2190
|
try {
|
|
2191
|
-
return import_fs12.default.readFileSync(shell.rcFile, "utf-8").includes(
|
|
2191
|
+
return import_fs12.default.readFileSync(shell.rcFile, "utf-8").includes(COMPLETIONS_MARKER);
|
|
2192
2192
|
} catch {
|
|
2193
2193
|
return false;
|
|
2194
2194
|
}
|
|
@@ -2203,18 +2203,20 @@ function installCompletions(shell, commands) {
|
|
|
2203
2203
|
const script = shell.name === "zsh" ? zshCompletion(commands) : bashCompletion(commands);
|
|
2204
2204
|
const cacheFile = import_path8.default.join(WORKSCRIBE_DIR, `completion.${shell.name}`);
|
|
2205
2205
|
import_fs12.default.writeFileSync(cacheFile, script, { mode: 420 });
|
|
2206
|
-
|
|
2207
|
-
|
|
2206
|
+
if (!isCompletionsInstalled(shell)) {
|
|
2207
|
+
const sourceLine = shell.name === "zsh" ? `
|
|
2208
|
+
${COMPLETIONS_MARKER}
|
|
2208
2209
|
autoload -Uz compinit && compinit
|
|
2209
2210
|
source "${cacheFile}"
|
|
2210
2211
|
` : `
|
|
2211
|
-
|
|
2212
|
+
${COMPLETIONS_MARKER}
|
|
2212
2213
|
source "${cacheFile}"
|
|
2213
2214
|
`;
|
|
2214
|
-
|
|
2215
|
+
import_fs12.default.appendFileSync(shell.rcFile, sourceLine);
|
|
2216
|
+
}
|
|
2215
2217
|
}
|
|
2216
2218
|
}
|
|
2217
|
-
var import_fs12, import_path8, import_os3, import_child_process3, FISH_COMPLETIONS_DIR, HOOK_START, HOOK_END, HOOK_PREAMBLE;
|
|
2219
|
+
var import_fs12, import_path8, import_os3, import_child_process3, FISH_COMPLETIONS_DIR, HOOK_START, HOOK_END, HOOK_PREAMBLE, COMPLETIONS_MARKER;
|
|
2218
2220
|
var init_shell_hook = __esm({
|
|
2219
2221
|
"src/capture/shell-hook.ts"() {
|
|
2220
2222
|
"use strict";
|
|
@@ -2229,6 +2231,7 @@ var init_shell_hook = __esm({
|
|
|
2229
2231
|
HOOK_START = "# workscribe:hook:start";
|
|
2230
2232
|
HOOK_END = "# workscribe:hook:end";
|
|
2231
2233
|
HOOK_PREAMBLE = "# Workscribe \u2014 developer work journal";
|
|
2234
|
+
COMPLETIONS_MARKER = "# Workscribe completions";
|
|
2232
2235
|
}
|
|
2233
2236
|
});
|
|
2234
2237
|
|
|
@@ -4047,7 +4050,7 @@ function registerBugReport(program) {
|
|
|
4047
4050
|
const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
4048
4051
|
const reportPath = import_path16.default.join(WORKSCRIBE_DIR, `bug-report-${timestamp}.txt`);
|
|
4049
4052
|
const systemInfo = [
|
|
4050
|
-
`Workscribe version : ${"1.14.
|
|
4053
|
+
`Workscribe version : ${"1.14.2"}`,
|
|
4051
4054
|
`Node.js version : ${process.version}`,
|
|
4052
4055
|
`Platform : ${process.platform}`,
|
|
4053
4056
|
`Architecture : ${process.arch}`,
|
|
@@ -4078,7 +4081,7 @@ function registerBugReport(program) {
|
|
|
4078
4081
|
process.exit(1);
|
|
4079
4082
|
}
|
|
4080
4083
|
const params = new URLSearchParams({
|
|
4081
|
-
title: `Bug report \u2014 workscribe ${"1.14.
|
|
4084
|
+
title: `Bug report \u2014 workscribe ${"1.14.2"}`,
|
|
4082
4085
|
body: `<!-- Attach ${import_path16.default.basename(reportPath)} or paste the relevant sections below -->
|
|
4083
4086
|
|
|
4084
4087
|
**Describe the issue:**
|
|
@@ -4277,7 +4280,7 @@ function isNewer(latest, current) {
|
|
|
4277
4280
|
return latestPatch > currentPatch;
|
|
4278
4281
|
}
|
|
4279
4282
|
function checkForUpdate() {
|
|
4280
|
-
const current = "1.14.
|
|
4283
|
+
const current = "1.14.2";
|
|
4281
4284
|
const cache = readCache();
|
|
4282
4285
|
if (cache && isNewer(cache.latestVersion, current)) {
|
|
4283
4286
|
process.stderr.write(
|
|
@@ -4335,7 +4338,7 @@ var require_main = __commonJS({
|
|
|
4335
4338
|
init_update_check();
|
|
4336
4339
|
checkForUpdate();
|
|
4337
4340
|
var program = new import_commander.Command();
|
|
4338
|
-
program.name("workscribe").description("Automatic developer work journal").version("1.14.
|
|
4341
|
+
program.name("workscribe").description("Automatic developer work journal").version("1.14.2");
|
|
4339
4342
|
registerCapture(program);
|
|
4340
4343
|
registerHook(program);
|
|
4341
4344
|
registerInit(program);
|