AmberDB
view release on metacpan or search on metacpan
* Enforced direct .slg table access and recs_get key lookups without legacy .rwt fallbacks.
- [GROUP-LEVEL SCHEMA INHERITANCE (.dbase -> .table)]
* Database group schema files (.dbase) now cascade common operational flags to all member tables in the group.
* Added %INHERITABLE_DBASE_KEYS whitelist in AmberDB::Base::Schema (use_ramdisk, keep_deleted, use_counter, log_owner, table_dir, use_section, etc.) preventing table-specific blocks and rules from leaking.
* Granular overrides: attributes explicitly defined in a .table file take precedence over .dbase defaults.
* Upgraded version string to 5.26.0 across all modules in lib/.
5.25.2 2026-09-11
- [CONNECTION PROFILES & LOCAL USER SESSIONS]
* Centralized connection profile management ($adb->{_connect}) for database, username, credentials, and session tokens.
* Automated config/connect.pl profile configuration with support for hashed credentials for local CLI/daemon access.
* Added user management API (user_add, user_passwd, user_del, user_list, user_verify) and CLI console.
* Added CLI session token generation, persistence, and cleanup.
* Enforced actor username as 'cli' for isolated CLI sessions.
- [RAM-DISK ARCHITECTURE & MOUNT MANAGEMENT REFACTORING]
* Centralized candidate RAM-disk directory resolution and OS detection inside ramdisk_is_mounted().
* Standardized platform detection across AmberDB::Base::Ramdisk to canonical 'windows', 'macos', or 'linux'.
* Generalized macOS APFS/HFS+ volume detection to match any mounted volume under /Volumes/ (e.g. /Volumes/AmberDB_RAM, /Volumes/eticaretim, /Volumes/<User>).
* Implemented encapsulated RAM-disk mount status caching with get_cache()/set_cache('ramdisk', 'mount') and support for force => 1 re-verification.
* Cleaned up ramdisk_setup() to cleanly fall back to dbase_dir and physical directories when unmounted, while dynamically repointing and creating table_rdir, schema_rdir, conf_rdir, lock_dir, and session_dir on the RAM-disk when mounted.
bin/push_wiki.pl view on Meta::CPAN
print "No changes detected. Wiki is already up-to-date!\n";
} else {
my $commit_msg = "Wiki Sync: " . scalar(gmtime()) . " UTC [automated]";
system("git -C \"$temp_clone_dir\" commit -m \"$commit_msg\"");
my $push_rc = system("git -C \"$temp_clone_dir\" push origin master") == 0
|| system("git -C \"$temp_clone_dir\" push origin main") == 0;
if ($push_rc) {
print "Successfully synchronized AmberDB Wiki to GitHub!\n";
} else {
warn "Warning: git push returned an error. Check credentials/permissions.\n";
}
}
print "4. Cleaning up temporary workspace...\n";
remove_tree($temp_clone_dir);
print "Done.\n";
lib/AmberDB/Base.pm view on Meta::CPAN
$self->{_connect}->{token} = $token;
$self->{_connect}->{database} = $sess->{connect}->{database} // $sess->{database} // $self->{_connect}->{database} // '';
$self->{_connect}->{username} = $sess->{connect}->{username} // $sess->{username} // $self->{_connect}->{username} // 'user_system';
$self->{_connect}->{password} = $sess->{connect}->{password} // $sess->{password} // '';
$self->{_cfg}->{user} = $self->{_connect}->{username};
return $token;
}
return undef;
}
# Sub-case B: Authenticate credentials & generate session token
my $connect_cfg = $self->_load_connect_config();
# Database default if not specified in connect
if ( !defined $database || !length $database ) {
if ( $connect_cfg && $connect_cfg->{database} ) {
$database = $connect_cfg->{database};
}
else {
$database = 'amberdb';
}
t/amberdb_connect_lifecycle.t view on Meta::CPAN
ok( $adb->disconnect($token), "disconnect() successfully clears session" );
ok( ! -f $sess_file, "Session file deleted upon disconnect" );
}
# 4. User Management API (user_add, user_passwd, user_list, user_del)
{
my $adb = AmberDB->new( path => { dbase_dir => $db_dir } );
# user_add
ok( $adb->user_add( 'new_operator', 'operator123', role => 'cli' ), "user_add adds new user" );
ok( $adb->user_verify( 'new_operator', 'operator123' ), "user_verify confirms new user credentials" );
ok( !$adb->user_verify( 'new_operator', 'badpass' ), "user_verify rejects bad password" );
# user_list
my @users = $adb->user_list();
my ($op) = grep { $_->{username} eq 'new_operator' } @users;
ok( $op, "user_list includes new user" );
is( $op->{role}, 'cli', "user_list provides user role" );
is( $op->{has_password}, 1, "user_list indicates password is set" );
ok( !exists $op->{shadow}, "user_list does not expose shadow hash" );
( run in 1.020 second using v1.01-cache-2.11-cpan-3f962061493 )