@oalacea/daemon 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -38
- package/LICENSE +23 -23
- package/README.md +147 -141
- package/agents/deps-analyzer.js +366 -366
- package/agents/detector.js +570 -570
- package/agents/fix-engine.js +305 -305
- package/agents/lighthouse-scanner.js +405 -405
- package/agents/perf-analyzer.js +294 -294
- package/agents/perf-front-analyzer.js +229 -229
- package/agents/test-generator.js +387 -387
- package/agents/test-runner.js +318 -318
- package/bin/Dockerfile +75 -74
- package/bin/cli.js +449 -449
- package/lib/config.js +250 -250
- package/lib/docker.js +207 -207
- package/lib/reporter.js +297 -297
- package/package.json +34 -34
- package/prompts/DEPS_EFFICIENCY.md +558 -558
- package/prompts/E2E.md +491 -491
- package/prompts/EXECUTE.md +1060 -1060
- package/prompts/INTEGRATION_API.md +484 -484
- package/prompts/INTEGRATION_DB.md +425 -425
- package/prompts/PERF_API.md +433 -433
- package/prompts/PERF_DB.md +430 -430
- package/prompts/PERF_FRONT.md +357 -357
- package/prompts/REMEDIATION.md +482 -482
- package/prompts/UNIT.md +260 -260
- package/scripts/dev.js +106 -106
- package/templates/README.md +38 -38
- package/templates/k6/load-test.js +54 -54
- package/templates/playwright/e2e.spec.ts +61 -61
- package/templates/vitest/angular-component.test.ts +38 -38
- package/templates/vitest/api.test.ts +51 -51
- package/templates/vitest/component.test.ts +27 -27
- package/templates/vitest/hook.test.ts +36 -36
- package/templates/vitest/solid-component.test.ts +34 -34
- package/templates/vitest/svelte-component.test.ts +33 -33
- package/templates/vitest/vue-component.test.ts +39 -39
package/bin/Dockerfile
CHANGED
|
@@ -1,74 +1,75 @@
|
|
|
1
|
-
# Daemon - Testing Tools Container
|
|
2
|
-
FROM node:20-slim
|
|
3
|
-
|
|
4
|
-
LABEL maintainer="Yanis"
|
|
5
|
-
LABEL description="Daemon - Automated testing tools for web applications"
|
|
6
|
-
|
|
7
|
-
# Install system dependencies for Playwright and wget with SSL
|
|
8
|
-
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
9
|
-
ca-certificates \
|
|
10
|
-
libnss3 \
|
|
11
|
-
libnspr4 \
|
|
12
|
-
libatk1.0-0 \
|
|
13
|
-
libatk-bridge2.0-0 \
|
|
14
|
-
libcups2 \
|
|
15
|
-
libdrm2 \
|
|
16
|
-
libxkbcommon0 \
|
|
17
|
-
libxcomposite1 \
|
|
18
|
-
libxdamage1 \
|
|
19
|
-
libxfixes3 \
|
|
20
|
-
libxrandr2 \
|
|
21
|
-
libgbm1 \
|
|
22
|
-
libpango-1.0-0 \
|
|
23
|
-
libcairo2 \
|
|
24
|
-
libasound2 \
|
|
25
|
-
libatspi2.0-0 \
|
|
26
|
-
libxshmfence1 \
|
|
27
|
-
wget \
|
|
28
|
-
&& rm -rf /var/lib/apt/lists/*
|
|
29
|
-
|
|
30
|
-
# Install Playwright browsers
|
|
31
|
-
RUN npx playwright install --with-deps chromium
|
|
32
|
-
|
|
33
|
-
# Install testing tools globally
|
|
34
|
-
RUN npm install -g \
|
|
35
|
-
vitest \
|
|
36
|
-
@vitest/ui \
|
|
37
|
-
@playwright/test \
|
|
38
|
-
@vitejs/plugin-react \
|
|
39
|
-
@testing-library/react \
|
|
40
|
-
@testing-library/jest-dom \
|
|
41
|
-
@testing-library/user-event \
|
|
42
|
-
@testing-library/vue \
|
|
43
|
-
@testing-library/svelte \
|
|
44
|
-
@solidjs/testing-library \
|
|
45
|
-
@vue/test-utils \
|
|
46
|
-
happy-dom
|
|
47
|
-
|
|
48
|
-
# Install k6 for performance testing
|
|
49
|
-
ARG TARGETARCH=amd64
|
|
50
|
-
RUN ARCH=$([ "$TARGETARCH" = "arm64" ] && echo "arm64" || echo "amd64") && \
|
|
51
|
-
wget -q "https://github.com/grafana/k6/releases/download/v1.5.0/k6-v1.5.0-linux-${ARCH}.tar.gz" -O /tmp/k6.tar.gz && \
|
|
52
|
-
tar -xzf /tmp/k6.tar.gz -C /tmp && \
|
|
53
|
-
mv /tmp/k6-v1.5.0-linux-${ARCH}/k6 /usr/local/bin/ && \
|
|
54
|
-
rm -rf /tmp/k6.tar.gz /tmp/k6-v1.5.0-linux-${ARCH}
|
|
55
|
-
|
|
56
|
-
# Install additional tools
|
|
57
|
-
RUN npm install -g \
|
|
58
|
-
supertest \
|
|
59
|
-
msw \
|
|
60
|
-
prisma \
|
|
61
|
-
lighthouse
|
|
62
|
-
|
|
63
|
-
# Create non-root user for security
|
|
64
|
-
# Use UID 1001 to avoid conflict with existing node user (UID 1000)
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
1
|
+
# Daemon - Testing Tools Container
|
|
2
|
+
FROM node:20-slim
|
|
3
|
+
|
|
4
|
+
LABEL maintainer="Yanis"
|
|
5
|
+
LABEL description="Daemon - Automated testing tools for web applications"
|
|
6
|
+
|
|
7
|
+
# Install system dependencies for Playwright and wget with SSL
|
|
8
|
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
9
|
+
ca-certificates \
|
|
10
|
+
libnss3 \
|
|
11
|
+
libnspr4 \
|
|
12
|
+
libatk1.0-0 \
|
|
13
|
+
libatk-bridge2.0-0 \
|
|
14
|
+
libcups2 \
|
|
15
|
+
libdrm2 \
|
|
16
|
+
libxkbcommon0 \
|
|
17
|
+
libxcomposite1 \
|
|
18
|
+
libxdamage1 \
|
|
19
|
+
libxfixes3 \
|
|
20
|
+
libxrandr2 \
|
|
21
|
+
libgbm1 \
|
|
22
|
+
libpango-1.0-0 \
|
|
23
|
+
libcairo2 \
|
|
24
|
+
libasound2 \
|
|
25
|
+
libatspi2.0-0 \
|
|
26
|
+
libxshmfence1 \
|
|
27
|
+
wget \
|
|
28
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
29
|
+
|
|
30
|
+
# Install Playwright browsers
|
|
31
|
+
RUN npx playwright install --with-deps chromium
|
|
32
|
+
|
|
33
|
+
# Install testing tools globally
|
|
34
|
+
RUN npm install -g \
|
|
35
|
+
vitest \
|
|
36
|
+
@vitest/ui \
|
|
37
|
+
@playwright/test \
|
|
38
|
+
@vitejs/plugin-react \
|
|
39
|
+
@testing-library/react \
|
|
40
|
+
@testing-library/jest-dom \
|
|
41
|
+
@testing-library/user-event \
|
|
42
|
+
@testing-library/vue \
|
|
43
|
+
@testing-library/svelte \
|
|
44
|
+
@solidjs/testing-library \
|
|
45
|
+
@vue/test-utils \
|
|
46
|
+
happy-dom
|
|
47
|
+
|
|
48
|
+
# Install k6 for performance testing
|
|
49
|
+
ARG TARGETARCH=amd64
|
|
50
|
+
RUN ARCH=$([ "$TARGETARCH" = "arm64" ] && echo "arm64" || echo "amd64") && \
|
|
51
|
+
wget -q "https://github.com/grafana/k6/releases/download/v1.5.0/k6-v1.5.0-linux-${ARCH}.tar.gz" -O /tmp/k6.tar.gz && \
|
|
52
|
+
tar -xzf /tmp/k6.tar.gz -C /tmp && \
|
|
53
|
+
mv /tmp/k6-v1.5.0-linux-${ARCH}/k6 /usr/local/bin/ && \
|
|
54
|
+
rm -rf /tmp/k6.tar.gz /tmp/k6-v1.5.0-linux-${ARCH}
|
|
55
|
+
|
|
56
|
+
# Install additional tools
|
|
57
|
+
RUN npm install -g \
|
|
58
|
+
supertest \
|
|
59
|
+
msw \
|
|
60
|
+
prisma \
|
|
61
|
+
lighthouse
|
|
62
|
+
|
|
63
|
+
# Create non-root user for security
|
|
64
|
+
# Use UID 1001 to avoid conflict with existing node user (UID 1000)
|
|
65
|
+
# Check if 'daemon' user exists first (node:20-slim already has it)
|
|
66
|
+
RUN id -u daemon >/dev/null 2>&1 || useradd -m -u 1001 -s /bin/bash daemon && \
|
|
67
|
+
mkdir -p /app && \
|
|
68
|
+
chown -R daemon:daemon /app
|
|
69
|
+
|
|
70
|
+
# Switch to non-root user
|
|
71
|
+
USER daemon
|
|
72
|
+
WORKDIR /app
|
|
73
|
+
|
|
74
|
+
# Keep container alive for docker exec
|
|
75
|
+
CMD ["sleep", "infinity"]
|