Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
0e8b250
feat: Complete Vite frontend refactor
devin-ai-integration[bot] Sep 27, 2025
8311377
fix: Update API endpoints to use correct backend routing structure
devin-ai-integration[bot] Sep 27, 2025
ba67690
fix: Complete UI improvements and API routing fixes
devin-ai-integration[bot] Sep 27, 2025
663ce0f
fix: Update ProtectedFileRoute component
devin-ai-integration[bot] Sep 27, 2025
e79c4eb
fix: Display table headers in empty folders and serve index.html content
devin-ai-integration[bot] Sep 27, 2025
ffc4ce9
fix: Remove artificial delays from SSE pipeline for real-time updates
devin-ai-integration[bot] Sep 27, 2025
96f6c1c
fix: Remove card borders, set Armor icon to login_primary_color, and …
devin-ai-integration[bot] Sep 27, 2025
3e1ab24
fix: Remove all artificial delays from database operations and fix ac…
devin-ai-integration[bot] Sep 27, 2025
0632c5c
fix: Complete SSE performance optimization and UI improvements
devin-ai-integration[bot] Sep 27, 2025
d4a495c
fix: Remove HTML generation from fileServer.js and fix SSE routing
devin-ai-integration[bot] Sep 27, 2025
9e640e2
fix: Fix SSE endpoint compression middleware and routing for real-tim…
devin-ai-integration[bot] Sep 27, 2025
ae85c76
fix: Restore SSE real-time updates while preserving custom index.html…
MarkProminic Sep 27, 2025
cd7ddbc
fix: Complete SSE routing and custom index.html integration
MarkProminic Sep 27, 2025
a2916e2
fix: Restore custom index.html functionality by removing problematic …
MarkProminic Sep 27, 2025
aa6c709
fix: Complete remaining changes from Vite frontend refactor session
MarkProminic Sep 27, 2025
6aefc02
feat: Implement multi-select functionality with drag/drop navigation …
MarkProminic Sep 27, 2025
d990233
fix: Correct checkbox column width and implement landing page functio…
MarkProminic Sep 27, 2025
53a28a7
fix: Update breadcrumb navigation for ?view=index parameter
MarkProminic Sep 27, 2025
a31e2ff
feat: Add multi-select drag/drop navigation and upload testing
MarkProminic Sep 27, 2025
dc9c19d
fix: Resolve all linting errors in routes/fileServer.js
MarkProminic Sep 27, 2025
d1a400a
fix: Resolve all remaining linting warnings in frontend components
MarkProminic Sep 27, 2025
0fd5761
fix: Make no-unused-vars ESLint rule more strict and set as error
MarkProminic Sep 27, 2025
cd50b21
fix: Enhance ApiKeysPage with modal improvements and server-side feat…
MarkProminic Sep 27, 2025
daaafb2
fix: Adjust table column widths, fix search functionality, and implem…
MarkProminic Sep 27, 2025
56c865b
fix: Update bulk delete button to show only icon and count, adjust co…
MarkProminic Sep 27, 2025
c457618
fix: Resolve linting errors in ApiKeysPage and Header components
MarkProminic Sep 27, 2025
963e495
fix: Final column width adjustments for API keys table
MarkProminic Sep 27, 2025
75edc43
fix: Resolve infinite redirect loop and restore dual logout functiona…
MarkProminic Sep 27, 2025
17bc6e7
fix: Handle root directory access in isAllowedDirectory function
MarkProminic Sep 27, 2025
6311502
fix: Update login page UI styling to match design requirements
MarkProminic Sep 27, 2025
dedcccb
fix: Resolve Swagger API docs static asset path conflicts
MarkProminic Sep 28, 2025
790acba
feat: Implement swagger-ui-react migration
MarkProminic Sep 28, 2025
2fd94ac
fix: Complete swagger-ui-react migration with linting fixes
MarkProminic Sep 28, 2025
567a0dd
fix: swagger documentation
Makr91 Sep 29, 2025
e5e9a2a
fix: file manager table when no contents and fix api keys table when …
Makr91 Sep 29, 2025
f7c4e20
fix: swagger documentation and prepare for testing
Makr91 Sep 29, 2025
02ca122
fix: stricter linting
Makr91 Sep 30, 2025
4447b33
fix: linting, licensing and security auditing, documentation and pwa …
Makr91 Sep 30, 2025
d458abb
feat: updated CI/CD
Makr91 Sep 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ jobs:
- name: Install dependencies
run: npm run cinstall:all

# TODO: Enable when ready for Vite builds
# - name: Build frontend
# run: npm run build
- name: Build frontend
run: npm run build

- name: Create package structure
run: |
Expand All @@ -66,9 +65,8 @@ jobs:

# Web assets
mkdir -p "${PACKAGE_NAME}_${VERSION}_${ARCH}/opt/armor/web/"
# TODO: Enable when Vite builds are ready
#cp -r web/dist "${PACKAGE_NAME}_${VERSION}_${ARCH}/opt/armor/web/dist"
# Temporary: Copy public assets directly
cp -r web/dist "${PACKAGE_NAME}_${VERSION}_${ARCH}/opt/armor/web/dist"
# Keep public assets for Swagger theming
cp -r web/public "${PACKAGE_NAME}_${VERSION}_${ARCH}/opt/armor/web/public"

# Systemd service
Expand Down
68 changes: 66 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@ permissions:
contents: read

jobs:
lint-and-test:
name: Lint & Format Check
security-checks:
name: Security Checks
uses: ./.github/workflows/reusable/security-checks.yml
with:
fail-on-error: false

lint-and-format:
name: Lint & Format
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -32,6 +38,64 @@ jobs:
- name: Check Prettier formatting
run: npm run format:check

backend-tests:
name: Backend Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: '22'
cache: 'npm'

- name: Install backend dependencies
run: npm run cinstall:backend

- name: Run backend tests
run: npm run test:run

frontend-tests:
name: Frontend Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: '22'
cache: 'npm'

- name: Install frontend dependencies
run: npm run cinstall:frontend

- name: Run frontend tests
run: npm run test:frontend

build-frontend:
name: Build Frontend
uses: ./.github/workflows/reusable/build-frontend.yml

verify-scripts:
name: Verify Scripts
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies
run: npm run cinstall:backend

- name: Verify scripts exist
run: |
echo "Checking sync-versions script..."
Expand Down
272 changes: 272 additions & 0 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,272 @@
name: Development Build

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read

jobs:
check-trigger:
name: Check if triggered by Release Please
runs-on: ubuntu-latest
outputs:
should_build: ${{ steps.check.outputs.should_build }}
dev_version: ${{ steps.version.outputs.dev_version }}
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 2

- name: Check if triggered by Release Please
id: check
run: |
# Get the commit message and author
COMMIT_MESSAGE=$(git log -1 --pretty=format:"%s")
COMMIT_AUTHOR=$(git log -1 --pretty=format:"%an")

echo "Commit message: $COMMIT_MESSAGE"
echo "Commit author: $COMMIT_AUTHOR"

# Skip if this is a release-please commit
if [[ "$COMMIT_MESSAGE" =~ ^chore\(main\): ]] || [[ "$COMMIT_AUTHOR" == "github-actions[bot]" ]]; then
echo "Skipping development build - triggered by Release Please"
echo "should_build=false" >> $GITHUB_OUTPUT
else
echo "Proceeding with development build"
echo "should_build=true" >> $GITHUB_OUTPUT
fi

- name: Calculate development version
id: version
if: steps.check.outputs.should_build == 'true'
run: |
# Get current version from package.json
CURRENT_VERSION=$(node -p "require('./package.json').version")

# Split version into parts
IFS='.' read -ra VERSION_PARTS <<< "$CURRENT_VERSION"
MAJOR=${VERSION_PARTS[0]}
MINOR=${VERSION_PARTS[1]}
PATCH=${VERSION_PARTS[2]}

# Increment patch version for development
NEW_PATCH=$((PATCH + 1))
DEV_VERSION="${MAJOR}.${MINOR}.${NEW_PATCH}-dev"

echo "Current version: $CURRENT_VERSION"
echo "Development version: $DEV_VERSION"
echo "dev_version=$DEV_VERSION" >> $GITHUB_OUTPUT

security-pre-check:
name: Security Pre-Check
needs: check-trigger
if: needs.check-trigger.outputs.should_build == 'true'
uses: ./.github/workflows/reusable/security-checks.yml
with:
fail-on-error: true

build-development-packages:
name: Build Development Packages
needs: [check-trigger, security-pre-check]
if: needs.check-trigger.outputs.should_build == 'true'
runs-on: self-hosted
env:
VERSION: ${{ needs.check-trigger.outputs.dev_version }}
PACKAGE_NAME: armor-dev
ARCH: amd64
steps:
# Debian Build Steps
- name: Checkout for Debian build
uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies
run: npm run cinstall:all:nodev

- name: Build frontend
run: npm run build

- name: Create Debian package structure
run: |
mkdir -p "${PACKAGE_NAME}_${VERSION}_${ARCH}"/{opt/armor/web,opt/armor,etc/systemd/system,var/lib/armor,var/log/armor,usr/share/man/man8,usr/share/man/man5,DEBIAN}

- name: Copy application files to Debian package
run: |
cp -r models routes middleware config utils services packaging app.js package.json "${PACKAGE_NAME}_${VERSION}_${ARCH}/opt/armor/"
cp -r node_modules "${PACKAGE_NAME}_${VERSION}_${ARCH}/opt/armor/"
cp -r web/dist "${PACKAGE_NAME}_${VERSION}_${ARCH}/opt/armor/web/dist"
# Keep public assets for Swagger theming
cp -r web/public "${PACKAGE_NAME}_${VERSION}_${ARCH}/opt/armor/web/public"

- name: Copy configuration files to Debian package
run: |
cp packaging/DEBIAN/systemd/armor.service "${PACKAGE_NAME}_${VERSION}_${ARCH}/etc/systemd/system/"
cp packaging/DEBIAN/postinst packaging/DEBIAN/prerm packaging/DEBIAN/postrm "${PACKAGE_NAME}_${VERSION}_${ARCH}/DEBIAN/"

- name: Install man pages
run: |
# Copy and compress man pages following Debian Policy
gzip -9 -c packaging/DEBIAN/man/armor.8 > "${PACKAGE_NAME}_${VERSION}_${ARCH}/usr/share/man/man8/armor.8.gz"
gzip -9 -c packaging/DEBIAN/man/armor.yaml.5 > "${PACKAGE_NAME}_${VERSION}_${ARCH}/usr/share/man/man5/armor.yaml.5.gz"

- name: Create Debian control file
run: |
cat > "${PACKAGE_NAME}_${VERSION}_${ARCH}/DEBIAN/control" << EOF
Package: armor-dev
Version: ${VERSION}
Section: misc
Priority: optional
Architecture: ${ARCH}
Maintainer: MarkProminic <MarkProminic@users.noreply.github.com>
Depends: nodejs (>= 22.0.0), sqlite3, openssl
Conflicts: armor
Description: Armor (Development) - Armor Reliably Manages Online Resources
A secure Node.js file server that provides directory listings with SHA256 checksums and authenticated file upload capabilities over HTTPS.
This is a development version.
Homepage: https://github.com/STARTcloud/armor_private
EOF

- name: Set Debian package permissions
run: |
find "${PACKAGE_NAME}_${VERSION}_${ARCH}" -type d -exec chmod 755 {} \;
find "${PACKAGE_NAME}_${VERSION}_${ARCH}" -type f -exec chmod 644 {} \;
chmod 755 "${PACKAGE_NAME}_${VERSION}_${ARCH}/DEBIAN"/{postinst,prerm,postrm}

- name: Build Debian package
run: |
dpkg-deb --build "${PACKAGE_NAME}_${VERSION}_${ARCH}" "${PACKAGE_NAME}_${VERSION}_${ARCH}.deb"

# OmniOS Build Steps
- name: Fresh checkout for OmniOS build
uses: actions/checkout@v5
with:
path: omnios-source
clean: true

- name: Clean OmniOS build directory
run: |
ssh ghrunner@omnios.packages.startcloud.com "rm -rf /local/builds/armor-dev/* /local/builds/armor-dev/.*" || true

- name: Sync source code to OmniOS
run: |
rsync -av \
--exclude='.git' \
--exclude='node_modules' \
--exclude='web/node_modules' \
--exclude='web/dist' \
--exclude='*.deb' \
omnios-source/ ghrunner@omnios.packages.startcloud.com:/local/builds/armor-dev/

- name: Build package on OmniOS
run: |
ssh ghrunner@omnios.packages.startcloud.com "
cd /local/builds/armor-dev &&
export PATH=/opt/ooce/bin:/opt/ooce/node-22/bin:\$PATH &&
export MAKE=gmake &&
export DEV_VERSION=${VERSION} &&
chmod +x packaging/omnios/build.sh &&
./packaging/omnios/build.sh
"

- name: Transfer OmniOS package back
run: |
rsync -av ghrunner@omnios.packages.startcloud.com:/local/builds/armor-dev/*.p5p ./ || echo "No .p5p files found"

- name: Upload Debian package to repository server
run: |
rsync -av ${PACKAGE_NAME}_*.deb startcloud@172.17.204.177:/tmp/

- name: Add package to repository pool
run: |
ssh startcloud@172.17.204.177 "
mkdir -p /local/public/debian/pool/main/z/armor-dev
cp /tmp/${PACKAGE_NAME}_*.deb /local/public/debian/pool/main/z/armor-dev/
"

- name: Update repository Packages files for all suites
run: |
ssh startcloud@172.17.204.177 "
cd /local/public/debian
# Generate Packages files for each suite
for suite in bookworm trixie; do
dpkg-scanpackages --arch amd64 pool/ > dists/\$suite/main/binary-amd64/Packages
gzip -c dists/\$suite/main/binary-amd64/Packages > dists/\$suite/main/binary-amd64/Packages.gz
done
"

- name: Generate Release files for all suites
run: |
ssh startcloud@172.17.204.177 "
cd /local/public/debian
# Generate Release files for each suite
for suite in bookworm trixie; do
cd dists/\$suite
/local/generate-release.sh \$suite > Release
cd ../..
done
"

- name: Create stable distribution with proper Release file
run: |
ssh startcloud@172.17.204.177 "
cd /local/public/debian/dists
rm -rf stable 2>/dev/null || true
cp -r trixie stable
cd stable
/local/generate-release.sh stable > Release
"

- name: Sign repository for all suites including stable
run: |
ssh startcloud@172.17.204.177 "
cd /local/public/debian
# Sign each suite including stable
for suite in bookworm trixie stable; do
cd dists/\$suite
export GNUPGHOME=\$(mktemp -d /local/pgp/pgpkeys-XXXXXX)
cat /local/pgp/pgp-key.private | gpg --import
cat Release | gpg --default-key startcloud -abs > Release.gpg
cat Release | gpg --default-key startcloud -abs --clearsign > InRelease
rm -rf \$GNUPGHOME
cd ../..
done
"

- name: Publish OmniOS package to repository
run: |
ssh ghrunner@omnios.packages.startcloud.com "
cd /local/builds/armor-dev &&
pfexec pkgsend publish -d proto -s file:///local/public/r151054/pkg armor.p5m.final &&
pfexec pkgrepo refresh -s /local/public/r151054/pkg &&
pfexec svcadm restart pkg/server:r151054_STARTcloud
"

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: 'development-packages'
path: |
*.deb
*.p5p
retention-days: 30

- name: Clean up
run: |
ssh ghrunner@omnios.packages.startcloud.com "rm -rf /local/builds/armor-dev/*"
ssh startcloud@172.17.204.177 "rm -f /tmp/${PACKAGE_NAME}_*.deb"

- name: Summary
run: |
echo "Development packages built and published:"
echo "- Version: ${VERSION}"
echo "- Debian package: ${PACKAGE_NAME}_${VERSION}_${ARCH}.deb"
echo "- Packages published to repositories"
Loading