@candlerip/shared3 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/_devops/cdk/cdk.sh +17 -0
- package/_devops/docker/.dockerignore.sample +2 -0
- package/_devops/docker/docker.sh +12 -0
- package/_devops/ec2/ec2.sh +10 -0
- package/_devops/eslint/eslint.config.js +18 -0
- package/_devops/eslint/eslint.sh +4 -0
- package/_devops/git/.gitignore.sample +15 -0
- package/_devops/git/git.sh +15 -0
- package/_devops/npm/npm.sh +19 -0
- package/_devops/prettier/prettier.config.js +7 -0
- package/_devops/prettier/prettier.sh +4 -0
- package/_devops/typescript/tsconfig.json +15 -0
- package/_devops/typescript/typescript.sh +13 -0
- package/package.json +34 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/project/index.d.ts +1 -0
- package/src/project/index.js +1 -0
- package/src/project/stack/index.d.ts +1 -0
- package/src/project/stack/index.js +1 -0
- package/src/project/stack/stack-name/configs/index.d.ts +1 -0
- package/src/project/stack/stack-name/configs/index.js +1 -0
- package/src/project/stack/stack-name/domains/index.d.ts +2 -0
- package/src/project/stack/stack-name/domains/index.js +1 -0
- package/src/project/stack/stack-name/index.d.ts +2 -0
- package/src/project/stack/stack-name/index.js +2 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/bash
|
2
|
+
set -e
|
3
|
+
|
4
|
+
if [[ $1 = 'deploy' ]]; then
|
5
|
+
cdk deploy --require-approval never
|
6
|
+
|
7
|
+
success=$?
|
8
|
+
if [ $success != 0 ]; then
|
9
|
+
exit $success
|
10
|
+
fi
|
11
|
+
if [ -f "./dist/post-deploy/index.js" ]; then
|
12
|
+
node ./dist/post-deploy/index.js
|
13
|
+
fi
|
14
|
+
if [ -f "./dist/bin/post-deploy/index.js" ]; then
|
15
|
+
node ./dist/bin/post-deploy/index.js
|
16
|
+
fi
|
17
|
+
fi
|
@@ -0,0 +1,10 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
set -e
|
3
|
+
|
4
|
+
if [[ $1 = 'deploy' ]]; then
|
5
|
+
EC2_IP=$(aws ec2 describe-instances \
|
6
|
+
--filters "Name=tag:Name,Values=backend" \
|
7
|
+
--query 'Reservations[*].Instances[*].[PublicIpAddress]' \
|
8
|
+
--output text)
|
9
|
+
ssh -o StrictHostKeyChecking=no ubuntu@$EC2_IP "npm run prod $2"
|
10
|
+
fi
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import js from '@eslint/js';
|
2
|
+
import ts from 'typescript-eslint';
|
3
|
+
|
4
|
+
export default ts.config(
|
5
|
+
js.configs.recommended,
|
6
|
+
...ts.configs.recommended,
|
7
|
+
{
|
8
|
+
files: ['**/*.ts'],
|
9
|
+
},
|
10
|
+
{
|
11
|
+
ignores: ['temp'],
|
12
|
+
},
|
13
|
+
{
|
14
|
+
rules: {
|
15
|
+
'no-console': [2, { allow: ['error', 'info'] }],
|
16
|
+
},
|
17
|
+
},
|
18
|
+
);
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/bash
|
2
|
+
set -e
|
3
|
+
|
4
|
+
CURR_DIR=$(dirname $(realpath "$0"))
|
5
|
+
|
6
|
+
if [[ $1 = 'init' ]]; then
|
7
|
+
cp $CURR_DIR/.gitignore.sample .gitignore
|
8
|
+
git init
|
9
|
+
fi
|
10
|
+
|
11
|
+
if [[ $1 = 'push' ]]; then
|
12
|
+
git add .
|
13
|
+
git commit -m "$(node -p "require('./package.json').version")"
|
14
|
+
git push
|
15
|
+
fi
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#!/usr/bin/bash
|
2
|
+
set -e
|
3
|
+
|
4
|
+
if [[ $1 = 'patch-version' ]]; then
|
5
|
+
npm version patch --no-git-tag-version
|
6
|
+
fi
|
7
|
+
|
8
|
+
if [[ $1 = 'publish' ]]; then
|
9
|
+
cp ./package.json temp/dist
|
10
|
+
if [ -d ./_devops ]; then
|
11
|
+
cp -r ./_devops temp/dist
|
12
|
+
fi
|
13
|
+
|
14
|
+
npm publish ./temp/dist --access=public
|
15
|
+
fi
|
16
|
+
|
17
|
+
if [[ $1 = 'update-shared' ]]; then
|
18
|
+
npm i @candlerip/shared3@latest @candlerip/shared-aws3@latest @candlerip/shared-backend3@latest
|
19
|
+
fi
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
"declaration": true,
|
4
|
+
"esModuleInterop": true,
|
5
|
+
"module": "ES2022",
|
6
|
+
"moduleResolution": "node",
|
7
|
+
"skipLibCheck": true,
|
8
|
+
"strict": true,
|
9
|
+
"target": "ES2022"
|
10
|
+
},
|
11
|
+
"tsc-alias": {
|
12
|
+
"verbose": false,
|
13
|
+
"resolveFullPaths": true
|
14
|
+
}
|
15
|
+
}
|
package/package.json
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
{
|
2
|
+
"name": "@candlerip/shared3",
|
3
|
+
"version": "0.0.2",
|
4
|
+
"type": "module",
|
5
|
+
"main": "index.js",
|
6
|
+
"bin": {
|
7
|
+
"crs-cdk": "./_devops/cdk/cdk.sh",
|
8
|
+
"crs-docker": "./_devops/docker/docker.sh",
|
9
|
+
"crs-ec2": "./_devops/ec2/ec2.sh",
|
10
|
+
"crs-eslint": "./_devops/eslint/eslint.sh",
|
11
|
+
"crs-git": "./_devops/git/git.sh",
|
12
|
+
"crs-npm": "./_devops/npm/npm.sh",
|
13
|
+
"crs-prettier": "./_devops/prettier/prettier.sh",
|
14
|
+
"crs-typescript": "./_devops/typescript/typescript.sh"
|
15
|
+
},
|
16
|
+
"scripts": {
|
17
|
+
"pub": "./devops/publish.sh",
|
18
|
+
"start": "./devops/start.sh"
|
19
|
+
},
|
20
|
+
"dependencies": {
|
21
|
+
"depcheck": "^1.4.7",
|
22
|
+
"eslint": "^8.57.0",
|
23
|
+
"globals": "^15.9.0",
|
24
|
+
"lodash": "^4.17.21",
|
25
|
+
"prettier": "^3.3.2",
|
26
|
+
"ts-prune": "^0.10.3",
|
27
|
+
"tsc-alias": "^1.8.10",
|
28
|
+
"typescript": "^5.5.2",
|
29
|
+
"typescript-eslint": "^7.13.1"
|
30
|
+
},
|
31
|
+
"devDependencies": {
|
32
|
+
"@types/lodash": "^4.17.6"
|
33
|
+
}
|
34
|
+
}
|
package/src/index.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export * from './project/index.js';
|
package/src/index.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export * from './project/index.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './stack/index.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './stack/index.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './stack-name/index.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './stack-name/index.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const STACK_NAMES: readonly ["app-config", "backend-init", "dictionary-service"];
|
@@ -0,0 +1 @@
|
|
1
|
+
export const STACK_NAMES = ['app-config', 'backend-init', 'dictionary-service'];
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|