-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscreenshots.config.mjs
More file actions
91 lines (88 loc) · 2.73 KB
/
Copy pathscreenshots.config.mjs
File metadata and controls
91 lines (88 loc) · 2.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
const repositoryRoot = dirname(fileURLToPath(import.meta.url))
const appUrl = 'http://127.0.0.1:8145'
// Absolute URLs the app renders end up visible in captures — Filament shows one
// in the page URL badge and the slug field — and a localhost URL reads as
// unfinished in published documentation. The app is told it lives at this
// domain; the runner serves every request for it from appUrl and aborts rather
// than ever contacting the real host.
const displayUrl =
process.env.CAPELL_SCREENSHOT_DISPLAY_ORIGIN ?? 'https://capell.app'
export default {
schemaVersion: 1,
repoRoots: ['.'],
outputRoots: [
'docs/images',
'packages/admin/docs/images',
'packages/core/docs/images',
'packages/frontend/docs/images',
'packages/installer/docs/images',
'packages/marketplace/docs/images',
],
app: {
cwd: '.',
serve: {
command: 'php',
args: [
'-d',
'memory_limit=-1',
'-d',
'display_errors=0',
'-d',
'log_errors=1',
'vendor/bin/testbench',
'serve',
'--host=127.0.0.1',
'--port=8145',
'--no-reload',
'--no-interaction',
],
readyUrl: `${appUrl}/__ping`,
environment: {
PHPRC: join(repositoryRoot, 'workbench/php'),
},
},
},
urls: {
frontend: appUrl,
admin: `${appUrl}/admin`,
},
environment: {
APP_URL: displayUrl,
CAPELL_SCREENSHOT_DISPLAY_ORIGIN: displayUrl,
APP_KEY: 'base64:/MjiNkPfjAngJBfuMDsnFBxDynZGOKk3O6P0u0MhvJE=',
DB_CONNECTION: 'sqlite',
DB_DATABASE: join(
repositoryRoot,
'workbench/database/screenshots.sqlite',
),
CAPELL_SCREENSHOT_DATABASE: join(
repositoryRoot,
'workbench/database/screenshots.sqlite',
),
CACHE_STORE: 'array',
SESSION_DRIVER: 'file',
QUEUE_CONNECTION: 'sync',
DEBUGBAR_ENABLED: 'false',
CAPELL_FRONTEND_PUBLIC_VIEW_QUERY_GUARD_ENABLED: 'false',
CAPELL_MARKETPLACE_URL: `${appUrl}/api/v1`,
CAPELL_MARKETPLACE_WEB_URL: appUrl,
},
authentication: {
defaultUser: 'admin',
profiles: {
admin: {
email: 'admin@example.com',
password: 'password',
},
},
},
capture: {
concurrency: 3,
serverWorkers: 4,
},
report: {
path: 'storage/framework/testing/core-screenshot-report.json',
},
}