@candlerip/shared-devops 0.0.9 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,4 +3,14 @@ set -e
3
3
 
4
4
  PARAMS=$(aws ssm get-parameters --names ${1//,/ } --output text --query "Parameters[*].{Name:Name,Value:Value}" --with-decryption | sed -E 's/\s+/=/g')
5
5
 
6
- printf "%s\n" "${PARAMS[@]}" > .env
6
+ PARAMS1="${PARAMS[@]//_DEVELOPMENT/}"
7
+ PARAMS2="${PARAMS1[@]//_PRODUCTION/}"
8
+
9
+ if [[ $2 ]]
10
+ then
11
+ FILENAME=".env.$2"
12
+ else
13
+ FILENAME=".env"
14
+ fi
15
+
16
+ printf "%s\n" "${PARAMS2[@]}" > $FILENAME
@@ -0,0 +1,26 @@
1
+ import js from '@eslint/js';
2
+ import ts from 'typescript-eslint';
3
+ import globals from 'globals';
4
+
5
+ export default (projectConfig) =>
6
+ ts.config(
7
+ js.configs.recommended,
8
+ ...ts.configs.recommended,
9
+ {
10
+ ignores: ['temp'],
11
+ },
12
+ {
13
+ languageOptions: {
14
+ globals: {
15
+ ...globals.browser,
16
+ ...globals.node,
17
+ },
18
+ },
19
+ },
20
+ {
21
+ rules: {
22
+ 'no-console': [2, { allow: ['error', 'info'] }],
23
+ },
24
+ },
25
+ ...(projectConfig ?? []),
26
+ );
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/bash
2
+ set -e
3
+
4
+ npx eslint .
@@ -1,13 +1,18 @@
1
1
  #!/bin/bash
2
2
  set -e
3
3
 
4
- mkdir -p temp/dist
4
+ PUBLISH_PATH=./temp/npm
5
5
 
6
- cp ./package.json temp/dist
6
+ mkdir -p $PUBLISH_PATH
7
+
8
+ cp ./package.json $PUBLISH_PATH
7
9
  if [ -d ./_devops ]; then
8
- cp -r ./_devops temp/dist
10
+ cp -r ./_devops $PUBLISH_PATH
11
+ fi
12
+ if [ -d ./dist ]; then
13
+ cp -r ./_devops $PUBLISH_PATH
9
14
  fi
10
15
 
11
16
  npm config set //registry.npmjs.org/:_authToken ${NPM_ACCESS_TOKEN}
12
17
 
13
- npm publish ./temp/dist --access=public
18
+ npm publish $PUBLISH_PATH --access=public
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/bash
2
2
  set -e
3
3
 
4
- rm -rf temp/dist
4
+ rm -rf dist
5
5
  npx tsc
6
6
  npx tsc-alias
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/bash
2
2
  set -e
3
3
 
4
- rm -rf temp/dist
4
+ rm -rf dist
5
5
  npx tsc --watch
@@ -4,7 +4,7 @@
4
4
  "esModuleInterop": true,
5
5
  "module": "ES2022",
6
6
  "moduleResolution": "bundler",
7
- "outDir": "temp/dist",
7
+ "outDir": "dist",
8
8
  "rootDir": ".",
9
9
  "skipLibCheck": true,
10
10
  "strict": true,
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@candlerip/shared-devops",
3
- "version": "0.0.9",
3
+ "version": "0.0.13",
4
4
  "bin": {
5
5
  "crsd-create-env-file": "./_devops/environment/create-env-file.sh",
6
6
  "crsd-build-publish-to-docker": "./_devops/docker/build-publish-to-docker.sh",
7
+ "crsd-eslint": "./_devops/eslint/eslint.sh",
7
8
  "crsd-publish-to-npm": "./_devops/npm/publish-to-npm.sh",
8
9
  "crsd-update-shared-packages": "./_devops/npm/update-shared-packages.sh",
9
10
  "crsd-tsc-compile": "./_devops/typescript/tsc-compile.sh",
@@ -11,5 +12,12 @@
11
12
  },
12
13
  "scripts": {
13
14
  "publish-gitlab-image": "sh ./_devops/gitlab/publish-gitlab-image.sh"
15
+ },
16
+ "dependencies": {
17
+ "eslint": "^9.20.1",
18
+ "globals": "^15.14.0",
19
+ "tsc-alias": "^1.8.10",
20
+ "typescript": "^5.7.3",
21
+ "typescript-eslint": "^8.24.0"
14
22
  }
15
23
  }