Skip to content

Commit

Permalink
Merge branch 'develop' into 79_add_loading_animation_on_actions
Browse files Browse the repository at this point in the history
  • Loading branch information
royscheeren authored Feb 28, 2024
2 parents 5ad0f82 + 8c4c0e9 commit b270391
Show file tree
Hide file tree
Showing 15 changed files with 117 additions and 54 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,19 @@ jobs:
- name: Deploy app
run: |
npm ci --force && npx nx deploy:staging envited.ascs.digital
DeployOIDCClient:
runs-on: ubuntu-latest
environment: staging
if: contains(github.ref, 'oidc-client')
steps:
- name: Git clone the repository
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::597778497612:role/GitHub-Actions
role-duration-seconds: 900
aws-region: eu-central-1
- name: Deploy OIDC client
run: |
npm ci --force && npx nx deploy:staging oidc-client.ascs.digital
23 changes: 0 additions & 23 deletions apps/oidc-client/.eslintrc.js

This file was deleted.

18 changes: 18 additions & 0 deletions apps/oidc-client/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}
15 changes: 15 additions & 0 deletions apps/oidc-client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# dependencies
node_modules

# sst
.sst
.build

# opennext
.open-next

# misc
.DS_Store

# local env files
.env*.local
15 changes: 15 additions & 0 deletions apps/oidc-client/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug SST Start",
"type": "node",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/sst",
"runtimeArgs": ["start", "--increase-timeout"],
"console": "integratedTerminal",
"skipFiles": ["<node_internals>/**"],
"env": {}
}
]
}
5 changes: 5 additions & 0 deletions apps/oidc-client/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"search.exclude": {
"**/.sst": true
}
}
4 changes: 2 additions & 2 deletions apps/oidc-client/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "oidc-client",
"version": "0.0.1",
"description": "Nx Preact oidc-client app"
"version": "0.0.0",
"private": true
}
2 changes: 2 additions & 0 deletions apps/oidc-client/pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
packages:
- 'packages/**/*'
8 changes: 8 additions & 0 deletions apps/oidc-client/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@
"passWithNoTests": true,
"reportsDirectory": "../../coverage/apps/oidc-client"
}
},
"deploy:staging": {
"executor": "nx:run-commands",
"options": {
"cwd": "apps/oidc-client",
"commands": ["sst deploy OIDCClient --stage staging"],
"parallel": false
}
}
}
}
2 changes: 1 addition & 1 deletion apps/oidc-client/src/utils/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('src/utils', () => {

const result = () => SUT.getOpenIdConnectUrl(params)

expect(result).toThrowError('Missing required parameters')
expect(result).toThrow('Missing required parameters')
})
})
})
15 changes: 15 additions & 0 deletions apps/oidc-client/sst.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { SSTConfig } from 'sst'

import { OIDCClient } from './stacks/OIDCClient'

export default {
config() {
return {
name: 'oidc-client',
region: 'eu-central-1',
}
},
stacks(app) {
app.stack(OIDCClient)
},
} satisfies SSTConfig
10 changes: 10 additions & 0 deletions apps/oidc-client/stacks/OIDCClient.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { StackContext, StaticSite } from 'sst/constructs'

export function OIDCClient({ stack }: StackContext) {
new StaticSite(stack, 'oidc-client', {
path: './',
buildOutput: '../../dist/apps/oidc-client',
buildCommand: 'cd ../../ && npx nx build oidc-client --prod',
environment: {},
})
}
10 changes: 5 additions & 5 deletions apps/oidc-client/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"extends": "./tsconfig.json",

"compilerOptions": {
"outDir": "../../dist/out-tsc"
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["node"]
},

"include": ["src/**/*"],
"exclude": ["**/*.spec.ts", "**/*_spec.ts", "**/*.spec.tsx", "**/*_spec.tsx", "public/*"]
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"],
"include": ["src/**/*.ts", "stacks/**/*.ts"]
}
26 changes: 4 additions & 22 deletions apps/oidc-client/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["packages"],
"compilerOptions": {
"strict": true,
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"jsx": "preserve",
"jsxFactory": "h",
"jsxFragmentFactory": "Fragment",
"jsxImportSource": "preact",
"types": ["vite/client"]
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.spec.json"
}
]
"module": "esnext",
"moduleResolution": "node"
}
}
2 changes: 1 addition & 1 deletion apps/oidc-client/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference types='vitest' />
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin'
import preact from '@preact/preset-vite'
import { defineConfig, searchForWorkspaceRoot } from 'vite'
import { defineConfig } from 'vite'

export default defineConfig({
cacheDir: '../../node_modules/.vite/oidc-client',
Expand Down

0 comments on commit b270391

Please sign in to comment.