Skip to content

Commit 9a31709

Browse files
authored
Switched to spawn/execFile for Lagoon CLI command execution (#18)
Security Enhancement: Switch to spawn/execFile for Lagoon CLI command execution
2 parents 7699480 + e81561f commit 9a31709

File tree

14 files changed

+5157
-924
lines changed

14 files changed

+5157
-924
lines changed

.github/workflows/tests.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
unit-tests:
13+
name: Unit Tests
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: '22'
24+
cache: 'npm'
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Run unit tests
30+
run: npm run test
31+
32+
- name: Test Summary
33+
if: always()
34+
run: echo "Unit tests completed"

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Lagoon CLI Wrapper
22

3+
[![Tests](https://github.com/richardgaunt/lagoon-cli-wrapper/actions/workflows/tests.yml/badge.svg)](https://github.com/richardgaunt/lagoon-cli-wrapper/actions/workflows/tests.yml)
4+
[![Linting](https://github.com/richardgaunt/lagoon-cli-wrapper/actions/workflows/lint.yml/badge.svg)](https://github.com/richardgaunt/lagoon-cli-wrapper/actions/workflows/lint.yml)
5+
36
A Node.js CLI wrapper for the Lagoon CLI that provides an interactive interface for common operations.
47

58
## Prerequisites

jest.config.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export default {
2+
transform: {},
3+
moduleNameMapper: {
4+
'^(\\.{1,2}/.*)\\.js$': '$1',
5+
},
6+
testEnvironment: 'node',
7+
testMatch: ['**/__tests__/**/*.mjs', '**/?(*.)+(spec|test).mjs'],
8+
};

0 commit comments

Comments
 (0)