@swydo/byol 2.2.31 → 3.0.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,30 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 3.0.1 (2023-09-27)
7
+
8
+ **Note:** Version bump only for package @swydo/byol
9
+
10
+
11
+
12
+
13
+
14
+ # 3.0.0 (2023-09-27)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * remove setting "default" profile by default ([#589](https://github.com/Swydo/byol/issues/589)) ([c497be3](https://github.com/Swydo/byol/commit/c497be3070fab331f8b4e60330802d038a0af68a))
20
+
21
+
22
+ ### BREAKING CHANGES
23
+
24
+ * The default for "profile" has been removed. Specify `--profile default` to restore previous functionality, or set `AWS_PROFILE` in your env.json.
25
+
26
+
27
+
28
+
29
+
6
30
  ## 2.2.31 (2023-09-27)
7
31
 
8
32
  **Note:** Version bump only for package @swydo/byol
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swydo/byol",
3
- "version": "2.2.31",
3
+ "version": "3.0.1",
4
4
  "description": "Bring Your Own Lambda",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -27,5 +27,5 @@
27
27
  "peerDependencies": {
28
28
  "aws-xray-sdk-core": "^3.0.0"
29
29
  },
30
- "gitHead": "8c18b2acd6d72475edbed7233f2cb4f49949af24"
30
+ "gitHead": "1a0eaa6c4c563d17e379cac3ccce0d62159057f5"
31
31
  }
@@ -32,10 +32,17 @@ function getFunctionEnvironment(envPath, functionName) {
32
32
  }
33
33
 
34
34
  function getAwsEnvironment({ profile, region }) {
35
- return {
36
- AWS_PROFILE: profile,
37
- AWS_REGION: region,
38
- };
35
+ const awsEnvironment = {};
36
+
37
+ if (region) {
38
+ awsEnvironment.AWS_REGION = region;
39
+ }
40
+
41
+ if (profile) {
42
+ awsEnvironment.AWS_PROFILE = profile;
43
+ }
44
+
45
+ return awsEnvironment;
39
46
  }
40
47
 
41
48
  async function invokeFunction(functionName, event, {
@@ -45,7 +52,7 @@ async function invokeFunction(functionName, event, {
45
52
  region,
46
53
  requestId,
47
54
  keepAlive = false,
48
- profile = 'default',
55
+ profile,
49
56
  invocationType = 'RequestResponse',
50
57
  } = {}) {
51
58
  const resource = getFunctionResource(templatePath, functionName);