diff --git a/package-lock.json b/package-lock.json index 72dd523e..d2a46dfd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -484,8 +484,8 @@ } }, "node_modules/@architect/spellcheck-dictionary": { - "version": "0.1.15", - "resolved": "git+ssh://git@github.com/architect/spellcheck-dictionary.git#60ca3f0c4cf9d4616f36fae4e718e3d6be7c08f0", + "version": "0.1.16", + "resolved": "git+ssh://git@github.com/architect/spellcheck-dictionary.git#c5050b8f0045fdb687401afb2b810d7041a36622", "dev": true, "license": "Apache-2.0" }, diff --git a/src/views/docs/en/reference/cli/sandbox.md b/src/views/docs/en/reference/cli/sandbox.md index f83828fa..cbda67ea 100644 --- a/src/views/docs/en/reference/cli/sandbox.md +++ b/src/views/docs/en/reference/cli/sandbox.md @@ -136,7 +136,7 @@ templates ### `@env` -Architect Sandbox will load variables for Sandbox's current environment (`testing`, `staging`, or `production`) from a [local preferences file with `@env`](../configuration/local-preferences#%40env). If a project contains a `.env` file, Architect will load those variables _instead_. +Architect Sandbox will load variables for Sandbox's current environment (`testing`, `staging`, or `production`) from a [local preferences file with `@env`](../configuration/local-preferences#%40env). If a project contains a `.env` file, Architect will load those variables _instead_, and only for the `testing` environment. Variables from local preference files and `.env` will **not** be merged. Further details, including the variable load-strategy are [outlined below](#environment-variables). @@ -161,7 +161,7 @@ Using a [local preferences file with `@env`](../configuration/local-preferences# ### Example scenario -If `.env` is found, Sandbox will not load any variables from any Arc preferences. Given the following case with 3 environment variable sources: +If `.env` is found, Sandbox will only use the variables for the `testing` environment, and not load any variables from any Arc preferences files. Given the following case with 3 environment variable sources: ```bash # ./.env diff --git a/src/views/docs/en/reference/configuration/function-config.md b/src/views/docs/en/reference/configuration/function-config.md index 77a91401..9fe868f7 100644 --- a/src/views/docs/en/reference/configuration/function-config.md +++ b/src/views/docs/en/reference/configuration/function-config.md @@ -4,7 +4,7 @@ category: Configuration description: Lambda function configuration sections: - 'env' - - 'ignoredDependencies' + - 'ignoreDependencies' - 'shared' - 'views' - 'architecture' @@ -25,7 +25,7 @@ Configure individual Lambda function properties (e.g. `src/http/get-index/config Use the `@arc` pragma to disable Architect features for a specific function: - [`env`](#env) - boolean, `true` (default) or `false` to disable loading environment variables -- [`ignoredDependencies`](#ignoredDependencies) - array, specific dependency names to ignore during Lambda treeshaking +- [`ignoreDependencies`](#ignoreDependencies) - array, specific dependency names to ignore during Lambda treeshaking - [`shared`](#shared) - boolean, `true` (default) or `false` to skip hydrating project code from `@shared`. - [`views`](#views) - boolean, `true` (default) or `false` to skip hydrating project code from `@views`. @@ -35,7 +35,7 @@ Use the `@arc` pragma to disable Architect features for a specific function: # src/function/dir/config.arc @arc env false -ignoredDependencies +ignoreDependencies some-special-dependency shared false views false @@ -48,10 +48,12 @@ Sometimes it's necessary to have an even more isolated, locked down Lambda withi Note: even with `env` set to false, your function still has access to credentials with whatever IAM privileges the Lambda has been granted. To isolate permissions further, please see [`policies`](#policies). -### `ignoredDependencies` +### `ignoreDependencies` Disable specific dependencies from being installed in Lambdas that rely on [automated dependency treeshaking](/docs/en/guides/developer-experience/dependency-management#automated-dependency-treeshaking). This setting is currently only supported in Node.js Lambdas. +The alternate spelling of `ignoredDependencies` may also be used, although `ignoreDependencies` is preferred. + ### `shared` diff --git a/src/views/docs/en/reference/configuration/local-preferences.md b/src/views/docs/en/reference/configuration/local-preferences.md index bd9514d2..c74bee3e 100644 --- a/src/views/docs/en/reference/configuration/local-preferences.md +++ b/src/views/docs/en/reference/configuration/local-preferences.md @@ -67,9 +67,9 @@ production ### `.env` file support -Architect sandbox supports loading environment variables from a `.env` file. The `.env` will override your `preferences.arc` or `prefs.arc` and environment variables it defines will be loaded for whichever environment the sandbox is running (`testing`, `staging`, or `production`). +Architect Sandbox supports loading environment variables from a `.env` file. The `.env` will override your `preferences.arc` or `prefs.arc`, and environment variables it defines are only loaded for the `testing` environment. If you require locally configured env vars for `staging` or `production` environments, you must use `pref[erence]s.arc`. -(NB: Recall that key/value pairs in `.env` files are separated by the `=` symbol) +Note: as a friendly reminder, key / value pairs in `.env` files are separated by the `=` symbol. ### Example `.env` file @@ -78,6 +78,7 @@ A_TESTING_ENV_VAR=something-for-testing ANOTHER_VAR=only-for-testing ``` + ## `@sandbox` Define [Sandbox](../cli/sandbox) preferences. If you are not using a `.env` file then any environment variables set using the [`arc env` CLI](../cli/env) will be stored in the preferences file. In this scenario it is best _not_ to revision the preferences file in source control.