Skip to content

Commit d3a93f5

Browse files
committed
Improve Codeception Coverage
The rate limit has been increased for test compatibility. Update Codeception failing tests to accomodate recent changes. m.bat accomodates php codesniffer which will be used to identify lines exceeding 85 characters for linting.
1 parent 8f70b28 commit d3a93f5

File tree

15 files changed

+1353
-710
lines changed

15 files changed

+1353
-710
lines changed

Makefile

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ menu: ## Show the Invoice SYSTEM MENU (Make targets)
2929
@echo "make ccl - Composer clear-cache & update --lock"
3030
@echo "make cv - Composer validate"
3131
@echo "make cda - Composer dump-autoload"
32+
@echo "make ca - Composer audit"
3233
@echo "make cu - Composer update"
3334
@echo "make nu - Update Node modules"
3435
@echo "make nco - npm: Check Outdated"
@@ -45,7 +46,13 @@ menu: ## Show the Invoice SYSTEM MENU (Make targets)
4546
@echo "make tsl - TypeScript Lint"
4647
@echo "make tsf - TypeScript Format"
4748
@echo "make nb - npm run build"
49+
@echo "make ai - Angular: Install Dependencies"
50+
@echo "make as - Angular: Serve Development"
51+
@echo "make ab - Angular: Build Production"
52+
@echo "make ag COMPONENT=name - Angular: Generate Component"
53+
@echo "make al - Angular: Lint Check"
4854
@echo "make crc - Composer Require Checker"
55+
@echo "make sda - Shipmonk Composer Dependency Analyser"
4956
@echo "make ct - Codeception Tests"
5057
@echo "make cb - Codeception Build"
5158
@echo "make rdr - Rector Dry Run"
@@ -221,6 +228,11 @@ cda: ## Composer dump-autoload
221228
composer dump-autoload -o
222229
endif
223230

231+
ifeq ($(PRIMARY_GOAL),ca)
232+
ca: ## Composer audit
233+
composer audit --ansi
234+
endif
235+
224236
ifeq ($(PRIMARY_GOAL),cu)
225237
cu: ## Composer update
226238
composer update
@@ -314,6 +326,60 @@ nb: ## npm run build
314326
npm run build
315327
endif
316328

329+
#
330+
# Angular Commands
331+
#
332+
333+
ifeq ($(PRIMARY_GOAL),ai)
334+
ai: ## Angular: Install Dependencies
335+
@echo "======== ANGULAR DEPENDENCY INSTALLATION WARNING ========"
336+
@echo "⚠️ WARNING: This will install Angular dependencies!"
337+
@echo "📝 This may modify existing TypeScript/ESLint configuration"
338+
@echo "🔄 Ensure you have reviewed package.json and tsconfig files"
339+
@echo "🚨 BACKUP your current setup before proceeding!"
340+
@echo "========================================================="
341+
@read -p "Continue with Angular dependency installation? (Y/N): " confirm; \
342+
if [ "$$confirm" = "Y" ] || [ "$$confirm" = "y" ]; then \
343+
echo "Installing Angular dependencies..."; \
344+
npm install; \
345+
echo "Angular dependencies installed. Check for any conflicts."; \
346+
else \
347+
echo "Angular installation cancelled."; \
348+
fi
349+
endif
350+
351+
ifeq ($(PRIMARY_GOAL),as)
352+
as: ## Angular: Serve Development
353+
@echo "Starting Angular development server..."
354+
@echo "⚠️ This runs Angular in development mode"
355+
@echo "📝 Angular components will be available at http://localhost:4200"
356+
@echo "🔄 In production, Angular integrates with Yii3 PHP layout"
357+
npm run ng:serve
358+
endif
359+
360+
ifeq ($(PRIMARY_GOAL),ab)
361+
ab: ## Angular: Build Production
362+
@echo "Building Angular for production..."
363+
@echo "📝 This builds Angular components for integration with Yii3"
364+
npm run ng:build
365+
endif
366+
367+
ifeq ($(PRIMARY_GOAL),ag)
368+
ag: ## Angular: Generate Component (usage: make ag COMPONENT=dashboard)
369+
ifndef COMPONENT
370+
$(error Please provide COMPONENT, e.g. 'make ag COMPONENT=user-profile')
371+
endif
372+
@echo "Generating Angular component: $(COMPONENT)"
373+
npm run angular:generate-component $(COMPONENT)
374+
endif
375+
376+
ifeq ($(PRIMARY_GOAL),al)
377+
al: ## Angular: Lint Check
378+
@echo "Running Angular-specific linting..."
379+
@echo "📝 This checks Angular components and templates"
380+
npm run lint:angular
381+
endif
382+
317383
#
318384
# Composer Tools
319385
#
@@ -323,6 +389,13 @@ crc: ## Composer Require Checker
323389
php -d memory_limit=512M vendor/bin/composer-require-checker
324390
endif
325391

392+
ifeq ($(PRIMARY_GOAL),sda)
393+
sda: ## Shipmonk Composer Dependency Analyser
394+
@echo "Running Shipmonk Composer Dependency Analyser..."
395+
@echo "(https://github.com/shipmonk-rnd/composer-dependency-analyser)"
396+
php vendor/bin/composer-dependency-analyser
397+
endif
398+
326399
#
327400
# Codeception
328401
#
@@ -606,4 +679,4 @@ pcsr: ## Run PHP CodeSniffer with detailed report
606679
php -d memory_limit=1024M vendor/bin/phpcs --standard=phpcs.xml.dist --report=full --report-width=120
607680
endif
608681

609-
.PHONY: menu help install p pf pd pc pi cas co cwn ccl cv cda cu nu nco nsu nmu nma nes2024 nvm na crc ct cb rdr rmc csd csf sq sf sd sc ss sj sh ghi gha ghc serve ucr uar rl tt ii ist igt iit1 iqt2 ist3 int4 iut5 iait6 info tsb tsd tsw tst tsl tsf nb pcs pcsf pcsd pcsr
682+
.PHONY: menu help install ext-check ext-json ext-silent p pf pd pc pi cas co cwn ccl cv cda ca cu nu nco nsu nmu nma nes2024 nvm na crc sda ct cb rdr rmc csd csf sq sf sd sc ss sj sh ghi gha ghc serve ucr uar rl tt ii ist igt iit1 iqt2 ist3 int4 iut5 iait6 info tsb tsd tsw tst tsl tsf nb ai as ab ag al pcs pcsf pcsd pcsr

0 commit comments

Comments
 (0)