Compare commits

...

4 Commits

Author SHA1 Message Date
f80ec7ddfe 3.1.2
Some checks failed
Default (tags) / security (push) Successful in 44s
Default (tags) / test (push) Failing after 1m5s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2025-05-16 15:01:57 +00:00
f2823c2645 fix(tests): Update test imports and devDependencies to use @git.zone/tstest/tapbundle 2025-05-16 15:01:56 +00:00
75783b0e87 3.1.1
Some checks failed
Default (tags) / security (push) Successful in 45s
Default (tags) / test (push) Failing after 1m6s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2025-05-15 20:00:38 +00:00
13e1582732 fix(source-interactive): Fix import path in receiver tests and rename progress bar property for clarity; update SmartlogSourceOra getter for improved backward compatibility. 2025-05-15 20:00:38 +00:00
17 changed files with 604 additions and 1222 deletions

View File

@ -1,5 +1,18 @@
# Changelog
## 2025-05-16 - 3.1.2 - fix(tests)
Update test imports and devDependencies to use @git.zone/tstest/tapbundle
- Changed import statements in test files from '@push.rocks/tapbundle' to '@git.zone/tstest/tapbundle'
- Updated devDependency '@git.zone/tstest' to version ^1.7.0 and removed dependency on '@push.rocks/tapbundle'
## 2025-05-15 - 3.1.1 - fix(source-interactive)
Fix import path in receiver tests and rename progress bar property for clarity; update SmartlogSourceOra getter for improved backward compatibility.
- Changed test file import from '../ts/index.js' to '../dist_ts/index.js' in test.receiver.node.ts to resolve module path issues
- Renamed property 'complete' to 'completeChar' in SmartlogProgressBar and updated its usage accordingly
- Modified SmartlogSourceOra getter to use public methods for starting and stopping the spinner, ensuring backward compatibility
## 2025-05-15 - 3.1.0 - feat(interactive)
Add interactive console features and refactor spinner module by renaming source-ora to source-interactive and removing ora dependency

View File

@ -1,6 +1,6 @@
{
"name": "@push.rocks/smartlog",
"version": "3.1.0",
"version": "3.1.2",
"private": false,
"description": "A minimalistic, distributed, and extensible logging tool supporting centralized log management.",
"keywords": [
@ -45,8 +45,7 @@
"@git.zone/tsbuild": "^2.5.1",
"@git.zone/tsbundle": "^2.2.5",
"@git.zone/tsrun": "^1.3.3",
"@git.zone/tstest": "^1.4.0",
"@push.rocks/tapbundle": "^6.0.3",
"@git.zone/tstest": "^1.7.0",
"@types/node": "^22.15.18"
},
"dependencies": {

1762
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
import { expect, tap } from '@push.rocks/tapbundle';
import { expect, tap } from '@git.zone/tstest/tapbundle';
import * as smartlog from '../ts/index.js';
let testConsoleLog: smartlog.ConsoleLog;

View File

@ -1,4 +1,4 @@
import { expect, tap } from '@push.rocks/tapbundle';
import { expect, tap } from '@git.zone/tstest/tapbundle';
import * as smartlogContext from '../ts_context/index.js';
tap.test('should correctly export strings from context module', async () => {

View File

@ -1,4 +1,4 @@
import { expect, tap } from '@push.rocks/tapbundle';
import { expect, tap } from '@git.zone/tstest/tapbundle';
import { SmartlogDestinationClickhouse } from '../ts_destination_clickhouse/index.js';
import * as smartclickhouse from '@push.rocks/smartclickhouse';

View File

@ -1,4 +1,4 @@
import { expect, tap } from '@push.rocks/tapbundle';
import { expect, tap } from '@git.zone/tstest/tapbundle';
import { SmartlogDestinationDevtools } from '../ts_destination_devtools/index.js';
export const run = async function() {

View File

@ -1,4 +1,4 @@
import { expect, tap } from '@push.rocks/tapbundle';
import { expect, tap } from '@git.zone/tstest/tapbundle';
import { SmartlogDestinationDevtools } from '../ts_destination_devtools/index.js';
// Test we can create a destination instance

View File

@ -1,4 +1,4 @@
import { expect, tap } from '@push.rocks/tapbundle';
import { expect, tap } from '@git.zone/tstest/tapbundle';
import { SmartlogDestinationFile } from '../ts_destination_file/index.js';
import * as fs from 'fs';
import * as path from 'path';

View File

@ -1,4 +1,4 @@
import { expect, tap } from '@push.rocks/tapbundle';
import { expect, tap } from '@git.zone/tstest/tapbundle';
import { DestinationLocal } from '../ts_destination_local/index.js';
import * as smartlogInterfaces from '../ts_interfaces/index.js';

View File

@ -1,4 +1,4 @@
import { expect, tap } from '@push.rocks/tapbundle';
import { expect, tap } from '@git.zone/tstest/tapbundle';
import { SmartlogDestinationReceiver } from '../ts_destination_receiver/index.js';
import { Smartlog } from '../ts/index.js';
import * as smartlogInterfaces from '../ts_interfaces/index.js';

View File

@ -1,4 +1,4 @@
import { expect, tap } from '@push.rocks/tapbundle';
import { expect, tap } from '@git.zone/tstest/tapbundle';
import { SmartlogSourceInteractive, SmartlogProgressBar } from '../ts_source_interactive/index.js';
// Test instances

View File

@ -1,6 +1,6 @@
import { expect, tap } from '@push.rocks/tapbundle';
import { expect, tap } from '@git.zone/tstest/tapbundle';
import { SmartlogReceiver } from '../ts_receiver/index.js';
import { Smartlog } from '../ts/index.js';
import { Smartlog } from '../dist_ts/index.js';
import * as smartlogInterfaces from '../ts_interfaces/index.js';
import * as smarthash from '@push.rocks/smarthash';

View File

@ -1,4 +1,4 @@
import { expect, tap } from '@push.rocks/tapbundle';
import { expect, tap } from '@git.zone/tstest/tapbundle';
import { SmartlogSourceInteractive, SmartlogProgressBar, SmartlogSourceOra } from '../ts_source_interactive/index.js';
// Test spinner functionality

View File

@ -1,4 +1,4 @@
import { expect, tap } from '@push.rocks/tapbundle';
import { expect, tap } from '@git.zone/tstest/tapbundle';
import * as smartlog from '../ts/index.js';
let testConsoleLog: smartlog.ConsoleLog;

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartlog',
version: '3.1.0',
version: '3.1.2',
description: 'A minimalistic, distributed, and extensible logging tool supporting centralized log management.'
}

View File

@ -259,7 +259,7 @@ export class SmartlogProgressBar {
private total: number;
private current: number = 0;
private width: number;
private complete: string;
private completeChar: string;
private incomplete: string;
private renderThrottle: number;
private clear: boolean;
@ -276,7 +276,7 @@ export class SmartlogProgressBar {
constructor(options: IProgressBarOptions) {
this.total = options.total;
this.width = options.width || 30;
this.complete = options.complete || '█';
this.completeChar = options.complete || '█';
this.incomplete = options.incomplete || '░';
this.renderThrottle = options.renderThrottle || 16;
this.clear = options.clear !== undefined ? options.clear : false;
@ -369,7 +369,7 @@ export class SmartlogProgressBar {
const incompleteLength = this.width - completeLength;
// Build the progress bar
const completePart = colors[this.color] + this.complete.repeat(completeLength) + colors.reset;
const completePart = colors[this.color] + this.completeChar.repeat(completeLength) + colors.reset;
const incompletePart = this.incomplete.repeat(incompleteLength);
const progressBar = `[${completePart}${incompletePart}]`;
@ -400,12 +400,14 @@ export class SmartlogProgressBar {
export class SmartlogSourceOra extends SmartlogSourceInteractive {
// Add a stub for the oraInstance property for backward compatibility
public get oraInstance() {
// Use public methods instead of accessing private properties
const instance = this;
return {
text: this.textContent,
start: () => this.start(),
stop: () => this.stop(),
succeed: (text?: string) => this.finishSuccess(text),
fail: (text?: string) => this.finishFail(text)
get text() { return ''; }, // We can't access private textContent directly
start: () => instance.text(''), // This starts the spinner
stop: () => instance.stop(),
succeed: (text?: string) => instance.finishSuccess(text),
fail: (text?: string) => instance.finishFail(text)
};
}