-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5bd54ea
commit 83b8047
Showing
11 changed files
with
101 additions
and
45 deletions.
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,17 @@ | ||
{ | ||
"name": "form-designer-adapter", | ||
"dockerComposeFile": [ | ||
"../docker-compose.yml" | ||
], | ||
"settings": { | ||
"terminal.integrated.shell.linux": "/bin/bash" | ||
}, | ||
"service": "fsd-self-serve", | ||
"shutdownAction": "none", | ||
"extensions": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode" | ||
], | ||
"workspaceFolder": "/self-serve", | ||
"initializeCommand": "sh delete_node_dir.sh && sh .devcontainer/setup.sh" | ||
} |
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,14 @@ | ||
#!/bin/bash | ||
apt install git-all | ||
git pull --recurse-submodules | ||
# shellcheck disable=SC2164 | ||
cd digital-form-builder | ||
yarn | ||
# shellcheck disable=SC2103 | ||
cd .. | ||
pwd | ||
cp -r digital-form-builder/node_modules . | ||
cp -r digital-form-builder/designer/node_modules . | ||
cp -r digital-form-builder/model/node_modules . | ||
cp -r digital-form-builder/runner/node_modules . | ||
pwd |
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,7 @@ | ||
############################################################################### | ||
# | ||
# Self Service Dev Image | ||
# | ||
############################################################################### | ||
|
||
FROM node:20-alpine3.20 as self-serve-dev |
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,4 @@ | ||
# services: | ||
# fund-store-db: | ||
# ports: | ||
# - 5433:5432 |
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,17 @@ | ||
#!/bin/bash | ||
# Function to recursively find and delete node_modules directories | ||
delete_node_modules() { | ||
local dir="$1" | ||
local node_modules_dirs=$(find "$dir" -type d -name "node_modules") | ||
for dir_to_delete in $node_modules_dirs; do | ||
echo "Deleting $dir_to_delete" | ||
rm -rf "$dir_to_delete" | ||
done | ||
} | ||
# Check if a directory is provided as an argument, otherwise use the current directory | ||
if [ $# -eq 1 ]; then | ||
directory="$1" | ||
else | ||
directory="." | ||
fi | ||
delete_node_modules "$directory" |
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
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,8 @@ | ||
services: | ||
fsd-self-serve: | ||
build: | ||
context: . | ||
target: self-serve-dev | ||
volumes: | ||
- .:/self-serve:cached | ||
command: sleep infinity |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const fs = require('fs'); | ||
const packagePath = 'digital-form-builder/runner/package.json'; | ||
// Read package.json | ||
const packageJson = JSON.parse(fs.readFileSync(packagePath, 'utf8')); | ||
// Modify package.json | ||
packageJson.devDependencies = { | ||
...packageJson.devDependencies, | ||
'@xgovformbuilder/model': 'workspace:model', | ||
'@xgovformbuilder/queue-model': 'workspace:queue-model' | ||
}; | ||
// Write package.json back to file | ||
fs.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2)); | ||
console.log('package.json updated successfully'); |
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,13 @@ | ||
const fs = require('fs'); | ||
const packagePath = 'digital-form-builder/runner/package.json'; | ||
// Read package.json | ||
const packageJson = JSON.parse(fs.readFileSync(packagePath, 'utf8')); | ||
// Modify package.json | ||
packageJson.devDependencies = { | ||
...packageJson.devDependencies, | ||
'@xgovformbuilder/model': 'workspace:digital-form-builder/model', | ||
'@xgovformbuilder/queue-model': 'workspace:digital-form-builder/queue-model' | ||
}; | ||
// Write package.json back to file | ||
fs.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2)); | ||
console.log('package.json updated successfully'); |