@@ -29,8 +29,8 @@ run_restrict_mode: ## Start in restrict mode
2929 @echo " Starting buildcage in RESTRICT mode..."
3030 @COMPOSE_FILE=$(COMPOSE_FILE ) \
3131 PROXY_MODE=restrict \
32- ALLOWED_HTTP_RULES=" $$ (node setup/convert-rules.mjs " $$ {ALLOWED_HTTP_RULES:-}" ) " \
33- ALLOWED_HTTPS_RULES=" $$ (node setup/convert-rules.mjs " $$ {ALLOWED_HTTPS_RULES:-github.com:443 registry.npmjs.org:443 api.github.com:443 objects.githubusercontent.com:443 httpbin.org:443 deb.debian.org:80 * .githubusercontent.com:443}" ) " \
32+ ALLOWED_HTTP_RULES=" $$ {ALLOWED_HTTP_RULES:-}" \
33+ ALLOWED_HTTPS_RULES=" $$ {ALLOWED_HTTPS_RULES:-github.com:443 registry.npmjs.org:443 api.github.com:443 objects.githubusercontent.com:443 httpbin.org:443 deb.debian.org:80 *.githubusercontent.com:443}" \
3434 docker compose up -d --wait --build
3535 @docker buildx rm buildcage 2> /dev/null || true
3636 @echo " Creating buildx builder..."
@@ -67,8 +67,17 @@ test_audit_mode: ## Run audit mode tests
6767 @$(MAKE ) clean
6868
6969.PHONY : test_unit
70- test_unit : # # Run unit tests
71- @node --test setup/lib/rules.test.mjs
70+ test_unit : test_legacy test_qjs # # Run unit tests
71+
72+ .PHONY : test_legacy
73+ test_legacy : # # Run legacy rules unit tests
74+ @node --test setup/lib/legacy-rules.test.mjs
75+
76+ .PHONY : test_qjs
77+ test_qjs : # # Run unit tests in Docker
78+ @docker build -t buildcage-qjs-test docker
79+ @docker run --rm --entrypoint qjs buildcage-qjs-test /opt/buildcage/tools/lib/rules.test.mjs
80+ @docker run --rm --entrypoint qjs buildcage-qjs-test /opt/buildcage/tools/lib/log-parser.test.mjs
7281
7382.PHONY : test_audit_example
7483run_audit_example : # # Run audit mode example tests
0 commit comments