-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App: use dynamic inputs #18
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
cf1b441
Improve local development
10260dd
Add new component format-version-input
5430e12
Fix format
1b49045
Use string instead of enum for format-versions in pruefi endpoint
756ae08
Add pruefi-input
0bd889a
Remove another enum
94600d0
update openapi
bb8f858
Add individual pruefi inputs
71cbf31
Cleanup
f11e379
Add github actions
bd956b8
sort
5353068
Fix lint
4cef9f9
Add more github action steps
8eaf607
Fix lint
6addefb
Exclude auto generated code from prettier
46c759e
Merge branch 'main' into feature/dynamic-inputs
TommyBom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"root": true, | ||
"ignorePatterns": ["projects/**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts"], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@angular-eslint/recommended", | ||
"plugin:@angular-eslint/template/process-inline-templates" | ||
], | ||
"rules": { | ||
"@angular-eslint/directive-selector": [ | ||
"error", | ||
{ | ||
"type": "attribute", | ||
"prefix": "app", | ||
"style": "camelCase" | ||
} | ||
], | ||
"@angular-eslint/component-selector": [ | ||
"error", | ||
{ | ||
"type": "element", | ||
"prefix": "app", | ||
"style": "kebab-case" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["*.html"], | ||
"extends": [ | ||
"plugin:@angular-eslint/template/recommended", | ||
"plugin:@angular-eslint/template/accessibility" | ||
], | ||
"rules": {} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
ENABLE_CORS=true | ||
|
||
AHB_CONTAINER_NAME='uploaded-files' | ||
AZURE_BLOB_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol='http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;' | ||
AZURE_BLOB_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol='http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;' | ||
FORMAT_VERSION_CONTAINER_NAME=format-versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: "Pull Request" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: "20.13" | ||
cache: "npm" | ||
|
||
- name: Install modules | ||
run: npm ci | ||
|
||
- name: Prettier | ||
run: npm run format:check | ||
|
||
- name: Lint frontend | ||
run: npm run ng:lint | ||
|
||
- name: Lint server | ||
run: exit 0 # todo: add stuff | ||
|
||
- name: Test frontend | ||
run: exit 0 # todo: add stuff | ||
|
||
- name: Test server | ||
run: exit 0 # todo: add stuff | ||
|
||
- name: Build frontend | ||
run: npm run ng:build | ||
|
||
- name: Build server | ||
run: npm run server:build | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,3 +41,6 @@ testem.log | |
# System files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
.nx/cache | ||
.nx/workspace-data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
src/app/core/api | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we ignore them? Are these autogenerated files? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,60 @@ | ||
import { BlobServiceClient, ContainerClient } from "@azure/storage-blob"; | ||
import * as fs from "fs"; | ||
import * as path from "path"; | ||
import { BlobServiceClient, ContainerClient } from '@azure/storage-blob'; | ||
import * as fs from 'fs'; | ||
import * as path from 'path'; | ||
|
||
// Function to create a BlobServiceClient | ||
const createBlobServiceClient = () => { | ||
const azureHost = process.env["AZURE_STORAGE_HOST"] || "http://127.0.0.1"; | ||
const connectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=${azureHost}:10000/devstoreaccount1;`; | ||
return BlobServiceClient.fromConnectionString(connectionString); | ||
const azureHost = process.env['AZURE_STORAGE_HOST'] || 'http://127.0.0.1'; | ||
const connectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=${azureHost}:10000/devstoreaccount1;`; | ||
return BlobServiceClient.fromConnectionString(connectionString); | ||
}; | ||
|
||
// Recursive function to upload files | ||
const uploadFiles = async (folderPath: string, containerClient: ContainerClient) => { | ||
const files = fs.readdirSync(folderPath); | ||
|
||
for (const file of files) { | ||
const filePath = path.join(folderPath, file); | ||
const stat = fs.statSync(filePath); | ||
|
||
if (stat.isDirectory()) { | ||
await uploadFiles(filePath, containerClient); | ||
} else { | ||
const blobName = path.relative(process.argv[2], filePath).replace(/\\/g, "/"); | ||
const blockBlobClient = containerClient.getBlockBlobClient(blobName); | ||
console.log(`Uploading ${filePath} as ${blobName}`); | ||
await blockBlobClient.uploadFile(filePath); | ||
} | ||
const uploadFiles = async ( | ||
folderPath: string, | ||
containerClient: ContainerClient, | ||
) => { | ||
const files = fs.readdirSync(folderPath); | ||
|
||
for (const file of files) { | ||
const filePath = path.join(folderPath, file); | ||
const stat = fs.statSync(filePath); | ||
|
||
if (stat.isDirectory()) { | ||
await uploadFiles(filePath, containerClient); | ||
} else { | ||
const blobName = path | ||
.relative(process.argv[2], filePath) | ||
.replace(/\\/g, '/'); | ||
const blockBlobClient = containerClient.getBlockBlobClient(blobName); | ||
console.log(`Uploading ${filePath} as ${blobName}`); | ||
await blockBlobClient.uploadFile(filePath); | ||
} | ||
} | ||
}; | ||
|
||
// Main function to handle the upload process | ||
const main = async () => { | ||
if (process.argv.length < 3) { | ||
console.log("Usage: node dist/uploadFilesToAzurite.js <folderPath>"); | ||
return; | ||
} | ||
|
||
const folderPath = process.argv[2]; | ||
const containerName = "uploaded-files"; | ||
const blobServiceClient = createBlobServiceClient(); | ||
const containerClient = blobServiceClient.getContainerClient(containerName); | ||
|
||
try { | ||
await containerClient.createIfNotExists(); | ||
console.log(`Starting upload of files from ${folderPath} to container '${containerName}'`); | ||
await uploadFiles(folderPath, containerClient); | ||
console.log("All files uploaded successfully."); | ||
} catch (error) { | ||
console.error("Error uploading files:", error); | ||
} | ||
if (process.argv.length < 3) { | ||
console.log('Usage: node dist/uploadFilesToAzurite.js <folderPath>'); | ||
return; | ||
} | ||
|
||
const folderPath = process.argv[2]; | ||
const containerName = 'uploaded-files'; | ||
const blobServiceClient = createBlobServiceClient(); | ||
const containerClient = blobServiceClient.getContainerClient(containerName); | ||
|
||
try { | ||
await containerClient.createIfNotExists(); | ||
console.log( | ||
`Starting upload of files from ${folderPath} to container '${containerName}'`, | ||
); | ||
await uploadFiles(folderPath, containerClient); | ||
console.log('All files uploaded successfully.'); | ||
} catch (error) { | ||
console.error('Error uploading files:', error); | ||
} | ||
}; | ||
|
||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these steps just test if the build process is working?