@ceschiatti/redistail 0.0.9 → 0.0.11
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ceschiatti/redistail",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "CLI tool for monitoring Redis streams and PubSub",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@effect/experimental": "^0.58.0",
|
|
24
24
|
"@effect/platform-bun": "^0.87.0",
|
|
25
25
|
"effect": "3.19.14",
|
|
26
|
-
"effect-redis": "^0.0.
|
|
26
|
+
"effect-redis": "^0.0.22"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@biomejs/biome": "^2.3.11",
|
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { Context, Effect, Layer, Config, Console } from 'effect';
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
BUILD_COMMIT,
|
|
12
|
+
BUILD_VERSION,
|
|
13
|
+
getVersionInfo,
|
|
14
|
+
} from './version-generated.js';
|
|
11
15
|
import {
|
|
12
16
|
CLIConfig,
|
|
13
17
|
RedistailConfig,
|
|
@@ -321,15 +325,38 @@ ENVIRONMENT VARIABLES:
|
|
|
321
325
|
EXAMPLES:
|
|
322
326
|
redistail pubsub my-channel
|
|
323
327
|
redistail stream my-stream
|
|
324
|
-
|
|
328
|
+
REDIS_HOST=redis.example.com redistail pubsub notifications
|
|
325
329
|
REDIS_URL=redis://user:pass@redis.example.com:6380 redistail stream events
|
|
326
330
|
`);
|
|
327
331
|
|
|
332
|
+
/**
|
|
333
|
+
* Get Effect library version at runtime
|
|
334
|
+
*/
|
|
335
|
+
const getEffectVersion = (): string => {
|
|
336
|
+
try {
|
|
337
|
+
// Import effect package.json to get version
|
|
338
|
+
// Using require since we need synchronous access
|
|
339
|
+
const effectPackage = require('effect/package.json');
|
|
340
|
+
return effectPackage.version || 'unknown';
|
|
341
|
+
} catch {
|
|
342
|
+
return 'unknown';
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
|
|
328
346
|
/**
|
|
329
347
|
* Display version information
|
|
330
348
|
*/
|
|
331
|
-
const showVersion = (): Effect.Effect<void, never> =>
|
|
332
|
-
|
|
349
|
+
const showVersion = (): Effect.Effect<void, never> => {
|
|
350
|
+
const info = getVersionInfo();
|
|
351
|
+
const effectVersion = getEffectVersion();
|
|
352
|
+
const timestampLine = info.isDevTimestamp
|
|
353
|
+
? 'Compiled: (development build)'
|
|
354
|
+
: `Compiled: ${info.timestamp} (UTC)`;
|
|
355
|
+
|
|
356
|
+
return Console.log(
|
|
357
|
+
`redistail ${BUILD_VERSION}\nBuild: ${BUILD_COMMIT}\n${timestampLine}\nEffect: ${effectVersion}`,
|
|
358
|
+
);
|
|
359
|
+
};
|
|
333
360
|
|
|
334
361
|
// ============================================================================
|
|
335
362
|
// Service Implementation
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
// These values are replaced at build time by build-cli.js
|
|
9
|
-
export const BUILD_COMMIT: string = '
|
|
10
|
-
export const BUILD_VERSION: string = '0.0.
|
|
9
|
+
export const BUILD_COMMIT: string = '3910676';
|
|
10
|
+
export const BUILD_VERSION: string = '0.0.10';
|
|
11
|
+
export const BUILD_TIMESTAMP: string = '2026-01-09T22:27:43.904Z';
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Get formatted version information for display
|
|
@@ -15,7 +16,9 @@ export const BUILD_VERSION: string = '0.0.6';
|
|
|
15
16
|
export const getVersionInfo = () => ({
|
|
16
17
|
version: BUILD_VERSION,
|
|
17
18
|
commit: BUILD_COMMIT,
|
|
19
|
+
timestamp: BUILD_TIMESTAMP,
|
|
18
20
|
isDev: BUILD_VERSION === '__BUILD_VERSION__',
|
|
21
|
+
isDevTimestamp: BUILD_TIMESTAMP === '__BUILD_TIMESTAMP__',
|
|
19
22
|
});
|
|
20
23
|
|
|
21
24
|
/**
|
package/src/cli/version.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
// These values are replaced at build time by build-cli.js
|
|
9
9
|
export const BUILD_COMMIT: string = '__BUILD_COMMIT__';
|
|
10
10
|
export const BUILD_VERSION: string = '__BUILD_VERSION__';
|
|
11
|
+
export const BUILD_TIMESTAMP: string = '__BUILD_TIMESTAMP__';
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Get formatted version information for display
|
|
@@ -15,7 +16,9 @@ export const BUILD_VERSION: string = '__BUILD_VERSION__';
|
|
|
15
16
|
export const getVersionInfo = () => ({
|
|
16
17
|
version: BUILD_VERSION,
|
|
17
18
|
commit: BUILD_COMMIT,
|
|
19
|
+
timestamp: BUILD_TIMESTAMP,
|
|
18
20
|
isDev: BUILD_VERSION === '__BUILD_VERSION__',
|
|
21
|
+
isDevTimestamp: BUILD_TIMESTAMP === '__BUILD_TIMESTAMP__',
|
|
19
22
|
});
|
|
20
23
|
|
|
21
24
|
/**
|