Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,13 @@ services:
- 3306:3306
volumes:
- dbdata:/var/lib/mysql
- ../data/database/mariadb-ddl-init.sh:/docker-entrypoint-initdb.d/1.sh
- ../data/database/mariadb-ddl-tables.sql:/docker-entrypoint-initdb.d/2.sql
- ../data/database/mariadb-ddl-procedures.sql:/docker-entrypoint-initdb.d/3.sql
- ../data/database/mariadb-ddl-privileges.sql:/docker-entrypoint-initdb.d/4.sql
- ../data/database:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "mariadb-admin -u root --password=$DB_ROOT_PASSWORD ping -h localhost"]
timeout: 20s
retries: 10
interval: 5s
start_period: 30s
networks:
- backend

Expand Down
8 changes: 4 additions & 4 deletions docs/localsetup.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ Title: Getting Started
#### MariaDB Setup
- **Installation**: Use Homebrew on macOS (`brew install mariadb`) or a similar package manager on other platforms to install and manage MariaDB. By default, MariaDB sets up the service on port 3306.
- **Database Creation**:
- Create databases and users using `data/database/mariadb-ddl-init.sh` or equivalent scripts.
- Create databases and users using `data/database/001-mariadb-ddl-init.sh` or equivalent scripts.
- Then, navigate to the command line, change directory to `data/database`, and run the following SQL files using the `mariadb` CLI tool:
```sh
source mariadb-ddl-tables.sql
source mariadb-ddl-procedures.sql
source mariadb-ddl-privileges.sql
source 002-mariadb-ddl-tables.sql
source 003-mariadb-ddl-procedures.sql
source 004-mariadb-ddl-privileges.sql
```

#### Authorizer.dev Setup
Expand Down
503 changes: 277 additions & 226 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jam-build",
"version": "2.8.5",
"version": "2.8.6",
"description": "An adventurous, scalable, fullstack web application reference project",
"main": "index.js",
"type": "module",
Expand Down Expand Up @@ -101,7 +101,7 @@
"express-version-request": "^1.7.0",
"express-version-route": "^1.2.4",
"mariadb": "^3.4.5",
"pino": "^10.1.0"
"pino": "^10.1.1"
},
"devDependencies": {
"@eslint/js": "^9.39.2",
Expand All @@ -114,7 +114,7 @@
"@localnerve/fast-is-equal": "^2.0.3",
"@localnerve/gulp-responsive": "^7.6.2",
"@localnerve/gulp-rev-delete-original": "^1.0.2",
"@localnerve/sass-asset-functions": "^7.8.1",
"@localnerve/sass-asset-functions": "^7.8.2",
"@playwright/test": "^1.57.0",
"@rollup/plugin-alias": "^6.0.0",
"@rollup/plugin-dynamic-import-vars": "^2.1.5",
Expand All @@ -127,9 +127,9 @@
"cross-env": "^10.1.0",
"eslint": "^9.39.2",
"eslint-plugin-compat": "^6.0.2",
"eslint-plugin-playwright": "^2.4.0",
"eslint-plugin-playwright": "^2.5.0",
"glob": "^13.0.0",
"globals": "^16.5.0",
"globals": "^17.0.0",
"gulp": "^5.0.1",
"gulp-filter": "^9.0.1",
"gulp-html-minifier-terser": "^7.1.0",
Expand All @@ -147,14 +147,14 @@
"modern-normalize": "^3.0.1",
"pino-pretty": "^13.1.3",
"plugin-error": "^2.0.1",
"puppeteer": "^24.34.0",
"puppeteer": "^24.35.0",
"rimraf": "^6.1.2",
"rollup": "^4.54.0",
"rollup": "^4.55.1",
"rollup-plugin-istanbul": "^5.0.0",
"rollup-plugin-output-manifest": "^2.0.0",
"rollup-plugin-polyfill-node": "^0.13.0",
"rollup-plugin-visualizer": "^6.0.5",
"sass": "^1.97.1",
"sass": "^1.97.2",
"sitemap": "^9.0.0",
"stylelint": "^16.26.1",
"stylelint-config-standard": "^39.0.1",
Expand Down
22 changes: 20 additions & 2 deletions src/test/pages/lighthouse.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ test.describe('performance audits', () => {
output: 'html',
onlyCategories: ['performance', 'accessibility', 'best-practices', 'seo'],
// Use existing browser context
skipAudits: ['uses-http2']
skipAudits: ['uses-http2'],
chromeFlags: [
'--headless=new'
],
skipAutolaunch: true
});

// Assert performance thresholds
Expand Down Expand Up @@ -100,7 +104,10 @@ test.describe('performance audits', () => {
test.setTimeout(testInfo.timeout + 10000);

const debugPort = 9222;
const args = [`--remote-debugging-port=${debugPort}`];
const args = [
`--remote-debugging-port=${debugPort}`,
'--headless=new'
];

// eslint-disable-next-line playwright/no-conditional-in-test
if (puppeteerLaunch.args) {
Expand Down Expand Up @@ -129,6 +136,17 @@ test.describe('performance audits', () => {
await adminPage.goto(baseUrl);
const cookies = await adminPage.context().cookies();

const args = [
'--headless=new'
];

// eslint-disable-next-line playwright/no-conditional-in-test
if (puppeteerLaunch.args) {
puppeteerLaunch.args.push(...args);
} else {
puppeteerLaunch.args = args;
}

const browser = await puppeteer.launch({
...puppeteerLaunch,
headless: true
Expand Down
6 changes: 3 additions & 3 deletions src/test/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ export async function createDatabaseAndAuthorizer () {

debug('Creating jam_build database tables...');
await client.importFile({
file: path.resolve(thisDir, toRoot, './data/database/mariadb-ddl-tables.sql')
file: path.resolve(thisDir, toRoot, './data/database/002-mariadb-ddl-tables.sql')
});

debug('Creating jam_build database procedures...');
const procText = await fs.readFile(
path.resolve(thisDir, toRoot, './data/database/mariadb-ddl-procedures.sql'),
path.resolve(thisDir, toRoot, './data/database/003-mariadb-ddl-procedures.sql'),
{ encoding: 'utf8' }
);
const procs = procText.split('$$').filter(text => !text.includes('DELIMITER'));
Expand All @@ -182,7 +182,7 @@ export async function createDatabaseAndAuthorizer () {

debug('Creating jam_build database privileges...');
await client.importFile({
file: path.resolve(thisDir, toRoot, './data/database/mariadb-ddl-privileges.sql')
file: path.resolve(thisDir, toRoot, './data/database/004-mariadb-ddl-privileges.sql')
});

// sanity check - procs should exist and be granted to jbuser and jbadmin
Expand Down