Skip to content

Commit

Permalink
feat: rename localEnvironmentVariables flag to localEnvironment
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Jul 27, 2022
1 parent f7ff427 commit b041577
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ All CLI options are optional:
--ignoreJWTSignature When using HttpApi with a JWT authorizer, don't check the signature of the JWT token. This should only be used for local development.
--lambdaPort Lambda http port to listen on. Default: 3002
--layersDir The directory layers should be stored in. Default: ${codeDir}/.serverless-offline/layers'
--localEnvironmentVariables Copy local environment variables. Default: false
--localEnvironment Copy local environment variables. Default: false
--noAuth Turns off all authorizers
--noPrependStageInUrl Don't prepend http routes with the stage.
--noStripTrailingSlashInUrl Don't strip trailing slash from http routes.
Expand Down
2 changes: 1 addition & 1 deletion src/config/commandOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default {
usage:
'The directory layers should be stored in. Default: {codeDir}/.serverless-offline/layers',
},
localEnvironmentVariables: {
localEnvironment: {
type: 'boolean',
usage: 'Copy local environment variables. Default: false',
},
Expand Down
2 changes: 1 addition & 1 deletion src/config/defaultOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default {
httpsProtocol: '',
lambdaPort: 3002,
layersDir: null,
localEnvironmentVariables: false,
localEnvironment: false,
noAuth: false,
noPrependStageInUrl: false,
noStripTrailingSlashInUrl: false,
Expand Down
2 changes: 1 addition & 1 deletion src/lambda/LambdaFunction.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default class LambdaFunction {
this.#verifySupportedRuntime()

const env = {
...(options.localEnvironmentVariables
...(options.localEnvironment
? process.env
: // we always copy all AWS_xxxx environment variables over from local env
fromEntries(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins:

custom:
serverless-offline:
localEnvironmentVariables: true
localEnvironment: true

provider:
environment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { setup, teardown } from '../../../integration/_testHelpers/index.js'

const __dirname = dirname(fileURLToPath(import.meta.url))

describe('run mode with worker threads and --localEnvironmentVariables flag', function desc() {
describe('run mode with worker threads and --localEnvironment flag', function desc() {
beforeEach(() =>
setup({
env: {
Expand Down

0 comments on commit b041577

Please sign in to comment.