refactor: Reorganize repository structure for better maintainability
Major structural improvements: - Created organized directory structure with logical separation - bin/ directory for legacy scripts (poc.sh, prod.sh) - config/ directory for configuration templates - tests/ directory for test framework - docs/ directory for documentation (ADRs) Enhanced build system: - Comprehensive Makefile with 20+ commands for development workflow - Full CI/CD pipeline support (test, lint, security-check) - Vendor integration testing for git vendor inclusion scenarios - Development environment setup and configuration management Updated test framework: - Smart path resolution for both organized and vendored structures - Improved vendor compatibility testing - Enhanced error handling and timeout protection Documentation updates: - Updated README with new directory structure - Comprehensive command reference and usage examples - Clear vendor integration guidelines - Architecture Decision Record for Node.js version management Files moved: - poc.sh, prod.sh → bin/ (legacy scripts) - bitwarden-config.conf.sample → config/ - test-secrets-manager.sh → tests/ - ADR-Node.md → docs/ All path references updated to maintain full functionality. This reorganization improves maintainability while preserving compatibility for git vendor inclusion scenarios. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
39
bin/poc.sh
Normal file
39
bin/poc.sh
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
# A quick and dirty proof of concept to capture bitwarden cli workflow
|
||||
# A reduction to practice of the data From https://bitwarden.com/help/cli/
|
||||
|
||||
clear
|
||||
|
||||
####################################
|
||||
## Step 0: Set to use tsys server
|
||||
####################################
|
||||
echo "Setting cli to use tsys bitwarden server..."
|
||||
|
||||
bw config server https://pwvault.turnsys.com
|
||||
|
||||
####################################
|
||||
## Step 1: login to bitwarden
|
||||
####################################
|
||||
|
||||
# From: https://bitwarden.com/help/cli/#using-an-api-key
|
||||
|
||||
### Set apikey environment varaible
|
||||
|
||||
echo "Sourcing clientid/apikey data..."
|
||||
source D:/tsys/secrets/bitwarden/data/apikey-bitwarden-reachableceo
|
||||
|
||||
### Login to vault using apikey...
|
||||
|
||||
echo "Logging in..."
|
||||
bw login --apikey $BW_CLIENTID $BW_CLIENTSECRET
|
||||
|
||||
### Step 1.1: unlock / save session id
|
||||
|
||||
echo "Unlocking..."
|
||||
export BW_SESSION="$(bw unlock --passwordenv TSYS_BW_PASSWORD_REACHABLECEO --raw)"
|
||||
|
||||
|
||||
### Step 2: retrive a value into an environment variable
|
||||
|
||||
export PUSHOVER_APIKEY="$(bw get password APIKEY-pushover)"
|
Reference in New Issue
Block a user