zet-x 1.0.5 → 1.0.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/README.md CHANGED
@@ -308,6 +308,19 @@ x <command> --help # command-specific help
308
308
 
309
309
  When `autoPublishIde()` is called in your config, `x` regenerates `.x/index.d.ts` with TypeScript declarations for IDE support on every run. This happens silently and never breaks normal operation. You can also generate types on demand with `x cli publish ide`.
310
310
 
311
+ ### Update Check
312
+
313
+ Once a day `x` asks the npm registry, in the background, whether a newer version of `zet-x` has been published. When there is one, a note is printed after your command finishes:
314
+
315
+ ```
316
+ x: an update is available: 1.0.6 → 1.0.7
317
+ Please run "npm install -g zet-x" to update.
318
+ ```
319
+
320
+ It is only a note — nothing is installed for you and nothing is blocked. The check never slows down or fails a command: if npm is unreachable or you are offline it is skipped silently and tried again on the next run.
321
+
322
+ The check is skipped entirely when stderr is not a terminal (pipes, scripts), in CI, and when the `NO_UPDATE_NOTIFIER` environment variable is set. The last result is cached in `~/.cache/zet-x/update-check.json` (or under `$XDG_CACHE_HOME`).
323
+
311
324
  ## Full Example
312
325
 
313
326
  ```js
package/bin/x.mjs CHANGED
@@ -130,6 +130,17 @@ if (major > 20 || (major === 20 && minor >= 6) || (major === 18 && minor >= 19))
130
130
  const runnerPath = join(pkgRoot, "dist", "runner.js");
131
131
  const projectRoot = dirname(configPath);
132
132
 
133
+ // Daily update check: the note (if any) is printed once the command has finished
134
+ let printUpdateNotice = () => {};
135
+ try {
136
+ const { startUpdateCheck } = await import(
137
+ pathToFileURL(join(pkgRoot, "dist", "update-check.js")).href
138
+ );
139
+ printUpdateNotice = startUpdateCheck(cliArgs);
140
+ } catch {
141
+ // Best-effort: never get in the way of the command
142
+ }
143
+
133
144
  const child = spawn(
134
145
  process.execPath,
135
146
  [...nodeArgs, runnerPath, configPath, ...process.argv.slice(2)],
@@ -146,6 +157,7 @@ process.on("SIGTERM", () => child.kill("SIGTERM"));
146
157
  process.on("SIGINT", () => child.kill("SIGINT"));
147
158
 
148
159
  child.on("close", (code, signal) => {
160
+ printUpdateNotice();
149
161
  if (signal) {
150
162
  process.kill(process.pid, signal);
151
163
  } else {
package/dist/register.js CHANGED
@@ -1,3 +1,12 @@
1
- import { register } from "node:module";
2
- register("./loader.js", import.meta.url);
1
+ import module from "node:module";
2
+ import { resolve } from "./loader.js";
3
+ // Node 26 runtime-deprecates module.register() (DEP0205). Use the synchronous
4
+ // in-thread hooks where they exist (Node >=22.15 / >=23.5) and fall back to the
5
+ // asynchronous off-thread loader on older versions.
6
+ if (typeof module.registerHooks === "function") {
7
+ module.registerHooks({ resolve });
8
+ }
9
+ else {
10
+ module.register("./loader.js", import.meta.url);
11
+ }
3
12
  //# sourceMappingURL=register.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"register.js","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC"}
1
+ {"version":3,"file":"register.js","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,8EAA8E;AAC9E,gFAAgF;AAChF,oDAAoD;AACpD,IAAI,OAAO,MAAM,CAAC,aAAa,KAAK,UAAU,EAAE,CAAC;IAC/C,MAAM,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;AACpC,CAAC;KAAM,CAAC;IACN,MAAM,CAAC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,CAAC"}
@@ -0,0 +1,17 @@
1
+ export declare const REGISTRY_URL = "https://registry.npmjs.org/zet-x/latest";
2
+ export interface UpdateState {
3
+ lastCheck: number;
4
+ latest: string | null;
5
+ pending: number;
6
+ }
7
+ export declare function stateFilePath(env?: NodeJS.ProcessEnv): string;
8
+ export declare function readState(file: string): UpdateState;
9
+ export declare function isNewerVersion(latest: string, current: string): boolean;
10
+ export declare function isCheckDue(state: UpdateState, now: number): boolean;
11
+ export declare function isUpdateCheckEnabled(argv: string[], env?: NodeJS.ProcessEnv, isTTY?: boolean): boolean;
12
+ export declare function fetchLatestVersion(url: string, timeoutMs?: number): Promise<string | null>;
13
+ export declare function refreshUpdateState(file: string, url?: string): Promise<void>;
14
+ export declare function requestUpdateCheck(file: string, url?: string): boolean;
15
+ export declare function getUpdateNotice(file: string, current: string): string;
16
+ export declare function startUpdateCheck(argv: string[]): () => void;
17
+ //# sourceMappingURL=update-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-check.d.ts","sourceRoot":"","sources":["../src/update-check.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY,4CAA4C,CAAC;AAOtE,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,aAAa,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAI1E;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAWnD;AASD,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAUvE;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAMnE;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,KAAK,GAAE,OAAgC,GACtC,OAAO,CAST;AAED,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,GAAE,MAAyB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAiBlH;AAGD,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,MAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAahG;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,MAAqB,GAAG,OAAO,CAoBpF;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAWrE;AASD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,IAAI,CAgB3D"}
@@ -0,0 +1,168 @@
1
+ import { spawn } from "node:child_process";
2
+ import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
3
+ import { homedir } from "node:os";
4
+ import { dirname, isAbsolute, join } from "node:path";
5
+ import { fileURLToPath } from "node:url";
6
+ import { errAnsi } from "./util.js";
7
+ export const REGISTRY_URL = "https://registry.npmjs.org/zet-x/latest";
8
+ const CHECK_INTERVAL_MS = 24 * 60 * 60 * 1000;
9
+ const FETCH_TIMEOUT_MS = 5000;
10
+ // A background check that has not reported back after this long is assumed dead
11
+ const PENDING_TTL_MS = 10000;
12
+ export function stateFilePath(env = process.env) {
13
+ const xdg = env.XDG_CACHE_HOME;
14
+ const base = xdg && isAbsolute(xdg) ? xdg : join(homedir(), ".cache");
15
+ return join(base, "zet-x", "update-check.json");
16
+ }
17
+ export function readState(file) {
18
+ const state = { lastCheck: 0, latest: null, pending: 0 };
19
+ try {
20
+ const raw = JSON.parse(readFileSync(file, "utf8"));
21
+ if (typeof raw.lastCheck === "number")
22
+ state.lastCheck = raw.lastCheck;
23
+ if (typeof raw.latest === "string")
24
+ state.latest = raw.latest;
25
+ if (typeof raw.pending === "number")
26
+ state.pending = raw.pending;
27
+ }
28
+ catch {
29
+ // Missing or unreadable state means "never checked"
30
+ }
31
+ return state;
32
+ }
33
+ function writeState(file, state) {
34
+ mkdirSync(dirname(file), { recursive: true });
35
+ writeFileSync(file, JSON.stringify(state));
36
+ }
37
+ const VERSION_RE = /^(\d+)\.(\d+)\.(\d+)(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$/;
38
+ export function isNewerVersion(latest, current) {
39
+ const a = VERSION_RE.exec(latest);
40
+ const b = VERSION_RE.exec(current);
41
+ if (!a || !b)
42
+ return false;
43
+ for (let i = 1; i <= 3; i++) {
44
+ const diff = Number(a[i]) - Number(b[i]);
45
+ if (diff !== 0)
46
+ return diff > 0;
47
+ }
48
+ // Same x.y.z: a release is newer than its own pre-releases
49
+ return !a[4] && !!b[4];
50
+ }
51
+ export function isCheckDue(state, now) {
52
+ const sinceCheck = now - state.lastCheck;
53
+ const sincePending = now - state.pending;
54
+ const stale = sinceCheck < 0 || sinceCheck >= CHECK_INTERVAL_MS;
55
+ const inFlight = sincePending >= 0 && sincePending < PENDING_TTL_MS;
56
+ return stale && !inFlight;
57
+ }
58
+ export function isUpdateCheckEnabled(argv, env = process.env, isTTY = !!process.stderr.isTTY) {
59
+ // The note goes to stderr; without a terminal (pipes, CI logs) nobody reads it
60
+ if (!isTTY)
61
+ return false;
62
+ if ((env.CI && env.CI !== "false") || env.NO_UPDATE_NOTIFIER)
63
+ return false;
64
+ // Nested `x` inside a command: the outermost invocation reports
65
+ if (env.X_ROOT_DIR)
66
+ return false;
67
+ // Runs on every <tab>
68
+ if (argv[0] === "--completions")
69
+ return false;
70
+ return true;
71
+ }
72
+ export async function fetchLatestVersion(url, timeoutMs = FETCH_TIMEOUT_MS) {
73
+ try {
74
+ // Loaded here so only the background worker pays for the HTTP stack
75
+ const { get } = url.startsWith("http:") ? await import("node:http") : await import("node:https");
76
+ const res = await new Promise((resolve, reject) => {
77
+ get(url, { headers: { accept: "application/json" }, signal: AbortSignal.timeout(timeoutMs) }, resolve)
78
+ .on("error", reject);
79
+ });
80
+ res.setEncoding("utf8");
81
+ let body = "";
82
+ for await (const chunk of res)
83
+ body += chunk;
84
+ if (res.statusCode !== 200)
85
+ return null;
86
+ const version = JSON.parse(body).version;
87
+ return typeof version === "string" && VERSION_RE.test(version) ? version : null;
88
+ }
89
+ catch {
90
+ return null;
91
+ }
92
+ }
93
+ // Runs in the detached worker (update-worker.ts)
94
+ export async function refreshUpdateState(file, url = REGISTRY_URL) {
95
+ const latest = await fetchLatestVersion(url);
96
+ const state = readState(file);
97
+ try {
98
+ if (latest === null) {
99
+ // Registry unreachable: keep lastCheck as is so the next run checks again
100
+ writeState(file, { ...state, pending: 0 });
101
+ }
102
+ else {
103
+ writeState(file, { lastCheck: Date.now(), latest, pending: 0 });
104
+ }
105
+ }
106
+ catch {
107
+ // Best-effort
108
+ }
109
+ }
110
+ export function requestUpdateCheck(file, url = REGISTRY_URL) {
111
+ try {
112
+ const state = readState(file);
113
+ const now = Date.now();
114
+ if (!isCheckDue(state, now))
115
+ return false;
116
+ // Stamped first: if the cache is not writable a check could never be recorded, so none is started
117
+ writeState(file, { ...state, pending: now });
118
+ const worker = fileURLToPath(new URL("./update-worker.js", import.meta.url));
119
+ const child = spawn(process.execPath, [worker, file, url], {
120
+ detached: true,
121
+ stdio: "ignore",
122
+ windowsHide: true,
123
+ });
124
+ child.on("error", () => { });
125
+ child.unref();
126
+ return true;
127
+ }
128
+ catch {
129
+ return false;
130
+ }
131
+ }
132
+ export function getUpdateNotice(file, current) {
133
+ const { latest } = readState(file);
134
+ if (!latest || !isNewerVersion(latest, current))
135
+ return "";
136
+ const yellow = errAnsi("33");
137
+ const dim = errAnsi("2");
138
+ const reset = errAnsi("0");
139
+ return (`\n${yellow}x: an update is available: ${current} → ${latest}${reset}\n` +
140
+ `${dim}Please run "npm install -g zet-x" to update.${reset}\n`);
141
+ }
142
+ function installedVersion() {
143
+ return JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
144
+ }
145
+ // Called by bin/x.mjs before the command runs. Kicks off the daily background
146
+ // check when it is due and returns a function that prints the update note (if
147
+ // any) once the command has finished. Never throws: updates are best-effort.
148
+ export function startUpdateCheck(argv) {
149
+ const noop = () => { };
150
+ try {
151
+ if (!isUpdateCheckEnabled(argv))
152
+ return noop;
153
+ const file = stateFilePath();
154
+ requestUpdateCheck(file);
155
+ return () => {
156
+ try {
157
+ process.stderr.write(getUpdateNotice(file, installedVersion()));
158
+ }
159
+ catch {
160
+ // Best-effort
161
+ }
162
+ };
163
+ }
164
+ catch {
165
+ return noop;
166
+ }
167
+ }
168
+ //# sourceMappingURL=update-check.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-check.js","sourceRoot":"","sources":["../src/update-check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEjE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,YAAY,GAAG,yCAAyC,CAAC;AAEtE,MAAM,iBAAiB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAC9C,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B,gFAAgF;AAChF,MAAM,cAAc,GAAG,KAAK,CAAC;AAQ7B,MAAM,UAAU,aAAa,CAAC,MAAyB,OAAO,CAAC,GAAG;IAChE,MAAM,GAAG,GAAG,GAAG,CAAC,cAAc,CAAC;IAC/B,MAAM,IAAI,GAAG,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAC;IACtE,OAAO,IAA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,IAAI,CAAC;gBACH,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;YAClE,CAAC;YAAC,MAAM,CAAC;gBACP,cAAc;YAChB,CAAC;QACH,CAAC,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=update-worker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-worker.d.ts","sourceRoot":"","sources":["../src/update-worker.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import { refreshUpdateState } from "./update-check.js";
2
+ // Detached process spawned by requestUpdateCheck(): <stateFile> <registryUrl>
3
+ await refreshUpdateState(process.argv[2], process.argv[3]);
4
+ //# sourceMappingURL=update-worker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-worker.js","sourceRoot":"","sources":["../src/update-worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,8EAA8E;AAC9E,MAAM,kBAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zet-x",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "type": "module",
5
5
  "description": "A project-level task runner for teams. Define dev commands in a config file, run them with x <command>.",
6
6
  "bin": {