serverless-plugin-env-stage-config 1.2.1 → 1.3.1

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.
Files changed (2) hide show
  1. package/README.md +14 -6
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,9 +1,17 @@
1
1
  # serverless-plugin-env-stage-config
2
2
 
3
+ [![npm version](https://badgen.net/npm/v/serverless-plugin-env-stage-config)](https://www.npmjs.com/package/serverless-plugin-env-stage-config)
4
+ [![XO code style](https://badgen.net/badge/code%20style/XO/cyan)](https://github.com/xojs/xo)
5
+
3
6
  This [Serverless](http://www.serverless.com/) plugin allows to define environment variable configuration files for stages.
4
7
  It exposes a new variable resolver (`$esc`) that automatically picks the correct value based on the selected stage.
5
8
  For development stages (`local`, `dev`, `development`), the variables will default to the system’s environment variables.
6
9
 
10
+ ## CI
11
+
12
+ [![Tests](https://github.com/bizon/serverless-plugin-env-stage-config/actions/workflows/tests.yml/badge.svg)](https://github.com/bizon/serverless-plugin-env-stage-config/actions/workflows/tests.yml)
13
+ [![Release](https://github.com/bizon/serverless-plugin-env-stage-config/actions/workflows/release.yml/badge.svg)](https://github.com/bizon/serverless-plugin-env-stage-config/actions/workflows/release.yml)
14
+
7
15
  ## Installation
8
16
 
9
17
  ```sh
@@ -52,10 +60,10 @@ functions:
52
60
 
53
61
  In a local environment, the variables resolved with the `esc:` prefix will be equivalent to using `env:`. Using `useDotenv: true` alongside a `.env` file will alow you to define your environement variables.
54
62
 
55
- The support local stages are:
56
- - local
57
- - dev
58
- - development
63
+ The supported local stages are:
64
+ - `local`
65
+ - `dev`
66
+ - `development`
59
67
 
60
68
  ## Other stages
61
69
 
@@ -64,9 +72,9 @@ If you need to define a different source for the environement variables for your
64
72
  For example, if you’re using AWS SSM Parameter Store, you could create the following file:
65
73
 
66
74
  ```yaml
67
- MYSQL_HOST: ${ssm:/my-service/prod/MYSQL_HOST~true}
75
+ MYSQL_HOST: ${ssm:/my-service/prod/MYSQL_HOST}
68
76
  QUEUE_URL: !Ref MyQueue
69
- SECRET_TOKEN: ${ssm:/my-service/prod/SECRET_TOKEN~true}
77
+ SECRET_TOKEN: ${ssm:/my-service/prod/SECRET_TOKEN}
70
78
  ```
71
79
 
72
80
  Any variable that is not included in the `serverless.env.prod.yml` file will produce a warning and fallback to using `env:`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "serverless-plugin-env-stage-config",
3
- "version": "1.2.1",
3
+ "version": "1.3.1",
4
4
  "author": "Bertrand Marron <bertrand.marron@gmail.com>",
5
5
  "description": "Serverless plugin to define environment variables files for stages",
6
6
  "main": "index.js",
@@ -8,7 +8,7 @@
8
8
  "index.js"
9
9
  ],
10
10
  "engines": {
11
- "node": "14.x"
11
+ "node": ">=14"
12
12
  },
13
13
  "scripts": {
14
14
  "lint": "xo --version && xo"
@@ -24,9 +24,9 @@
24
24
  "js-yaml": "^4.1.0"
25
25
  },
26
26
  "devDependencies": {
27
- "@bizon/semantic-release-config": "^1.0.1",
27
+ "@bizon/semantic-release-config": "^1.2.0",
28
28
  "semantic-release": "^19.0.2",
29
- "xo": "^0.47.0"
29
+ "xo": "^0.50.0"
30
30
  },
31
31
  "xo": {
32
32
  "semicolon": false,