Skip to content

Commit

Permalink
Merge pull request #765 from joshunrau/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
joshunrau authored Apr 11, 2024
2 parents a235bcb + 5fdcd61 commit ed921c8
Show file tree
Hide file tree
Showing 74 changed files with 2,963 additions and 3,243 deletions.
2 changes: 2 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,5 @@ VITE_DEV_NETWORK_LATENCY=0
# Plausable analytics config (optional, see vite.config.js for implementation)
# PLAUSIBLE_BASE_URL=/analytics
# PLAUSIBLE_DATA_DOMAIN=demo.opendatacapture.org

TURBO_CACHE_DIR=".turbo"
25 changes: 12 additions & 13 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,23 @@
"dev": "NODE_ENV=development env-cmd -f ../../.env node scripts/dev.js",
"format": "prettier --write src",
"lint": "tsc && eslint --fix src",
"preview": "env-cmd -f ../../.env --use-shell 'NODE_OPTIONS=\"--enable-source-maps\" API_PROD_SERVER_PORT=$API_DEV_SERVER_PORT NODE_ENV=production ESBUILD_BINARY_PATH=dist/bin/esbuild GATEWAY_SITE_ADDRESS=http://localhost:$GATEWAY_DEV_SERVER_PORT node dist/app.mjs'",
"test": "env-cmd -f ../../.env vitest run"
"preview": "env-cmd -f ../../.env --use-shell 'NODE_OPTIONS=\"--enable-source-maps\" API_PROD_SERVER_PORT=$API_DEV_SERVER_PORT NODE_ENV=production ESBUILD_BINARY_PATH=dist/bin/esbuild GATEWAY_SITE_ADDRESS=http://localhost:$GATEWAY_DEV_SERVER_PORT node dist/app.mjs'"
},
"dependencies": {
"@casl/ability": "^6.7.0",
"@casl/ability": "^6.7.1",
"@casl/prisma": "^1.4.1",
"@douglasneuroinformatics/libjs": "^0.3.0",
"@douglasneuroinformatics/libnest": "^0.0.2",
"@faker-js/faker": "^8.4.1",
"@nestjs/axios": "^3.0.2",
"@nestjs/common": "^10.3.3",
"@nestjs/config": "^3.2.0",
"@nestjs/core": "^10.3.3",
"@nestjs/common": "^10.3.7",
"@nestjs/config": "^3.2.2",
"@nestjs/core": "^10.3.7",
"@nestjs/jwt": "^10.2.0",
"@nestjs/mapped-types": "2.0.4",
"@nestjs/mapped-types": "2.0.5",
"@nestjs/passport": "^10.0.3",
"@nestjs/platform-express": "^10.3.3",
"@nestjs/swagger": "^7.3.0",
"@nestjs/platform-express": "^10.3.7",
"@nestjs/swagger": "^7.3.1",
"@nestjs/throttler": "^5.1.2",
"@opendatacapture/crypto": "workspace:*",
"@opendatacapture/database": "workspace:*",
Expand All @@ -37,22 +36,22 @@
"@opendatacapture/runtime-v1": "workspace:*",
"@opendatacapture/schemas": "workspace:*",
"@opendatacapture/stats": "workspace:*",
"axios": "^1.6.7",
"axios": "^1.6.8",
"express": "^4.19.2",
"lodash-es": "^4.17.21",
"mongodb": "^6.5.0",
"passport": "^0.7.0",
"passport-jwt": "4.0.1",
"reflect-metadata": "^0.1.14",
"rxjs": "^7.8.1",
"ts-pattern": "^5.0.8",
"ts-pattern": "^5.1.1",
"unidecode": "^0.1.8",
"zod": "^3.22.4"
},
"devDependencies": {
"@douglasneuroinformatics/esbuild-plugin-native-modules": "^0.0.2",
"@douglasneuroinformatics/esbuild-plugin-prisma": "^0.0.2",
"@nestjs/testing": "^10.3.3",
"@nestjs/testing": "^10.3.7",
"@opendatacapture/esbuild-plugin-runtime": "workspace:*",
"@types/express": "^4.17.21",
"@types/lodash-es": "^4.17.12",
Expand All @@ -62,7 +61,7 @@
"@types/supertest": "^6.0.2",
"@types/unidecode": "^0.1.3",
"concurrently": "^8.2.2",
"esbuild": "^0.20.1",
"esbuild": "^0.20.2",
"esbuild-plugin-tsc": "^0.4.0",
"nodemon": "^3.1.0",
"supertest": "^6.3.4"
Expand Down
2 changes: 1 addition & 1 deletion apps/api/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
},
"strictPropertyInitialization": false
},
"include": ["scripts/*", "src/**/*"]
"include": ["scripts/*", "src/**/*", "*.js", "*.cjs"]
}
11 changes: 5 additions & 6 deletions apps/api/vitest.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import path from 'path';
import url from 'url';

import swc from 'unplugin-swc';
import { defineConfig } from 'vitest/config';
import { mergeConfig } from 'vitest/config';

const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
import baseConfig from '../../vitest.config';

export default defineConfig({
export default mergeConfig(baseConfig, {
plugins: [
swc.vite({
jsc: {
baseUrl: path.resolve(__dirname, 'src'),
baseUrl: path.resolve(import.meta.dirname, 'src'),
externalHelpers: true,
keepClassNames: true,
parser: {
Expand All @@ -36,6 +35,6 @@ export default defineConfig({
],
test: {
globals: true,
root: './'
root: import.meta.dirname
}
});
14 changes: 0 additions & 14 deletions apps/gateway/cypress.config.js

This file was deleted.

5 changes: 0 additions & 5 deletions apps/gateway/cypress/e2e/index.cy.ts

This file was deleted.

5 changes: 0 additions & 5 deletions apps/gateway/cypress/fixtures/example.json

This file was deleted.

25 changes: 0 additions & 25 deletions apps/gateway/cypress/support/commands.ts

This file was deleted.

1 change: 0 additions & 1 deletion apps/gateway/cypress/support/e2e.ts

This file was deleted.

7 changes: 0 additions & 7 deletions apps/gateway/cypress/tsconfig.json

This file was deleted.

24 changes: 10 additions & 14 deletions apps/gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,10 @@
"build:client": "vite build --ssrManifest --outDir dist/client",
"build:main": "esbuild --bundle --format=esm --outfile=dist/main.js --platform=node --external:lightningcss src/main.ts",
"build:server": "vite build --ssr src/entry-server.tsx --outDir dist/server",
"cy:open": "cypress open",
"cy:run": "cypress run",
"dev": "NODE_ENV=development env-cmd -f ../../.env tsx src/main.ts",
"format": "prettier --write src",
"lint": "tsc && eslint --fix src",
"preview": "NODE_ENV=production GATEWAY_PROD_SERVER_PORT=$GATEWAY_DEV_SERVER_PORT env-cmd -f ../../.env node dist/main.mjs",
"test": "env-cmd -f ../../.env --use-shell 'start-server-and-test --expect 404 \"pnpm dev\" \"http://localhost:${GATEWAY_DEV_SERVER_PORT}\" cy:run'",
"test:dev": "env-cmd -f ../../.env --use-shell 'start-server-and-test --expect 404 \"pnpm dev\" \"http://localhost:${GATEWAY_DEV_SERVER_PORT}\" cy:open'"
"preview": "NODE_ENV=production GATEWAY_PROD_SERVER_PORT=$GATEWAY_DEV_SERVER_PORT env-cmd -f ../../.env node dist/main.mjs"
},
"dependencies": {
"@douglasneuroinformatics/libui": "^2.0.1",
Expand All @@ -27,10 +23,10 @@
"@opendatacapture/react-core": "workspace:*",
"@opendatacapture/runtime-v1": "workspace:*",
"@opendatacapture/schemas": "workspace:*",
"axios": "^1.6.7",
"axios": "^1.6.8",
"compression": "^1.7.4",
"express": "^4.19.2",
"i18next": "^23.10.1",
"i18next": "^23.11.1",
"lodash-es": "^4.17.21",
"pino-http": "^9.0.0",
"pino-pretty": "^10.3.1",
Expand All @@ -49,14 +45,14 @@
"@types/compression": "^1.7.5",
"@types/express": "^4.17.21",
"@types/lodash-es": "^4.17.12",
"@types/react": "^18.2.65",
"@types/react-dom": "^18.2.21",
"@types/react": "^18.2.75",
"@types/react-dom": "^18.2.24",
"@vitejs/plugin-react-swc": "^3.6.0",
"autoprefixer": "^10.4.18",
"esbuild": "^0.20.1",
"postcss": "^8.4.35",
"tailwindcss": "^3.4.1",
"vite": "^5.1.7"
"autoprefixer": "^10.4.19",
"esbuild": "^0.20.2",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.3",
"vite": "^5.2.8"
},
"trustedDependencies": [
"sqlite3"
Expand Down
2 changes: 0 additions & 2 deletions apps/gateway/scripts/build.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// @ts-check

import { existsSync } from 'fs';
import fs from 'fs/promises';
import path from 'path';
Expand Down
3 changes: 1 addition & 2 deletions apps/gateway/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@
},
"resolveJsonModule": true
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["**/dist", "**/node_modules"]
"include": ["scripts/*", "src/**/*", "*.js", "*.cjs"]
}
11 changes: 8 additions & 3 deletions apps/gateway/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { defineConfig } from 'vite';

const __dirname = path.dirname(url.fileURLToPath(import.meta.url));

export default defineConfig({
export default defineConfig(({ mode }) => ({
build: {
chunkSizeWarningLimit: 1000,
emptyOutDir: false,
Expand All @@ -25,10 +25,15 @@ export default defineConfig({
target: 'es2022'
}
},
plugins: [react(), runtime()],
plugins: [
react(),
runtime({
disabled: mode === 'test'
})
],
resolve: {
alias: {
'@': path.resolve(__dirname, 'src')
}
}
});
}));
16 changes: 8 additions & 8 deletions apps/outreach/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@
"lodash-es": "^4.17.21",
"mdast-util-to-string": "^4.0.0",
"reading-time": "^1.5.0",
"tailwind-merge": "^2.2.1",
"tailwind-merge": "^2.2.2",
"zod": "^3.22.4"
},
"devDependencies": {
"@astrojs/check": "^0.5.8",
"@astrojs/sitemap": "^3.1.1",
"@astrojs/starlight": "^0.18.1",
"@astrojs/check": "^0.5.10",
"@astrojs/sitemap": "^3.1.2",
"@astrojs/starlight": "^0.21.5",
"@astrojs/tailwind": "^5.1.0",
"@opendatacapture/tailwindcss": "workspace:*",
"@tailwindcss/typography": "^0.5.10",
"@tailwindcss/typography": "^0.5.12",
"@types/lodash-es": "^4.17.12",
"astro": "^4.5.2",
"sharp": "^0.33.2",
"tailwindcss": "^3.4.1"
"astro": "^4.5.18",
"sharp": "^0.33.3",
"tailwindcss": "^3.4.3"
}
}
2 changes: 1 addition & 1 deletion apps/outreach/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"resolveJsonModule": true,
"verbatimModuleSyntax": true
},
"include": ["astro.config.js", "tailwind.config.cjs", "src/**/*"]
"include": ["src/**/*", "*.js", "*.cjs"]
}
15 changes: 0 additions & 15 deletions apps/playground/cypress.config.js

This file was deleted.

6 changes: 0 additions & 6 deletions apps/playground/cypress/e2e/index.cy.ts

This file was deleted.

5 changes: 0 additions & 5 deletions apps/playground/cypress/fixtures/example.json

This file was deleted.

29 changes: 0 additions & 29 deletions apps/playground/cypress/support/commands.ts

This file was deleted.

1 change: 0 additions & 1 deletion apps/playground/cypress/support/e2e.ts

This file was deleted.

7 changes: 0 additions & 7 deletions apps/playground/cypress/tsconfig.json

This file was deleted.

Loading

0 comments on commit ed921c8

Please sign in to comment.