From b79ca87653a27d6951b6c108fcf7df896084aefa Mon Sep 17 00:00:00 2001 From: Tim Holm Date: Thu, 6 Mar 2025 11:29:00 +1100 Subject: [PATCH 01/12] feat: Add lifecycle hooks for nitric runs. --- src/environment/environment.ts | 83 ++++++++++++++++++++++++++++++++++ src/environment/index.ts | 1 + src/index.ts | 1 + 3 files changed, 85 insertions(+) create mode 100644 src/environment/environment.ts create mode 100644 src/environment/index.ts diff --git a/src/environment/environment.ts b/src/environment/environment.ts new file mode 100644 index 0000000..18c2779 --- /dev/null +++ b/src/environment/environment.ts @@ -0,0 +1,83 @@ +// Copyright 2021, Nitric Technologies Pty Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// The environment variable key that will be used to determine the current Nitric lifecycle/executing environment +const NITRIC_ENVIRONMENT = "NITRIC_ENVIRONMENT"; + +// Possible nitric execution environments +enum EnvironmentStage { + // Local development run (using nitric run/start) + LocalRun = "run", + // Local development requirements building/collection (using nitric up) + Build = "build", + // When the code is running in a deployed environment + Cloud = "cloud", +} + +const getCurrentEnvironment = (): EnvironmentStage => { + const lifecycle = process.env[NITRIC_ENVIRONMENT]; + if (!lifecycle || !Object.values(EnvironmentStage).includes(lifecycle as EnvironmentStage)) { + throw new Error(`Unable to determine the current Nitric lifecycle, please ensure the ${NITRIC_ENVIRONMENT} environment variable is set`); + } + return lifecycle as EnvironmentStage; +} + +// Check if the current environment is one of the provided stages +const isInEnvironment = (stage: EnvironmentStage[]) => { + const currentStage = getCurrentEnvironment(); + return stage.includes(currentStage);; +} + +// If the current environment is one of the provided stages, execute the provided callback +const whenInEnvironments = (stage: EnvironmentStage[], callback: EnvCallback) => { + if (isInEnvironment(stage)) { + return callback(); + } +} + +const whenLocalRun = (callback: EnvCallback) => { + whenInEnvironments([EnvironmentStage.LocalRun], callback); +} + +const whenBuild = (callback: EnvCallback) => { + whenInEnvironments([EnvironmentStage.Build], callback); +} + +const whenCloud = (callback: EnvCallback) => { + whenInEnvironments([EnvironmentStage.Cloud], callback); +} + +type EnvCallback = () => void; + +export const Environment = { + // Check if the current environment is one of the provided stages + is: isInEnvironment, + // Check if the current environment is a local run + isLocalRun: () => isInEnvironment([EnvironmentStage.LocalRun]), + // Check if the current environment is a build + isBuild: () => isInEnvironment([EnvironmentStage.Build]), + // Check if the current environment is a cloud environment + isCloud: () => isInEnvironment([EnvironmentStage.Cloud]), + // If the current environment is one of the provided stages, execute the provided callback + when: whenInEnvironments, + // If the current environment is a local run, execute the provided callback + whenLocalRun, + // If the current environment is a build, execute the provided callback + whenBuild, + // If the current environment is a cloud environment, execute the provided callback + whenCloud, +} + + + diff --git a/src/environment/index.ts b/src/environment/index.ts new file mode 100644 index 0000000..8c08d0d --- /dev/null +++ b/src/environment/index.ts @@ -0,0 +1 @@ +export * from "./environment"; \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index ef898d5..8b04873 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,3 +16,4 @@ export * from './resources'; export * from './types'; export * from './context'; export * from './handlers'; +export * from './environment'; From 0bde205ca71076e1ce5b2fee16facd6ee07725fe Mon Sep 17 00:00:00 2001 From: Tim Holm Date: Thu, 6 Mar 2025 11:55:18 +1100 Subject: [PATCH 02/12] passthrough return value of callback. --- src/environment/environment.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/environment/environment.ts b/src/environment/environment.ts index 18c2779..3d697fd 100644 --- a/src/environment/environment.ts +++ b/src/environment/environment.ts @@ -36,29 +36,29 @@ const getCurrentEnvironment = (): EnvironmentStage => { // Check if the current environment is one of the provided stages const isInEnvironment = (stage: EnvironmentStage[]) => { const currentStage = getCurrentEnvironment(); - return stage.includes(currentStage);; + return stage.includes(currentStage); } // If the current environment is one of the provided stages, execute the provided callback -const whenInEnvironments = (stage: EnvironmentStage[], callback: EnvCallback) => { +const whenInEnvironments = (stage: EnvironmentStage[], callback: EnvCallback) => { if (isInEnvironment(stage)) { return callback(); } } -const whenLocalRun = (callback: EnvCallback) => { +const whenLocalRun = (callback: EnvCallback) => { whenInEnvironments([EnvironmentStage.LocalRun], callback); } -const whenBuild = (callback: EnvCallback) => { +const whenBuild = (callback: EnvCallback) => { whenInEnvironments([EnvironmentStage.Build], callback); } -const whenCloud = (callback: EnvCallback) => { +const whenCloud = (callback: EnvCallback) => { whenInEnvironments([EnvironmentStage.Cloud], callback); } -type EnvCallback = () => void; +type EnvCallback = () => T; export const Environment = { // Check if the current environment is one of the provided stages From d5854accbdddd57445013fd8c246039651db2f6a Mon Sep 17 00:00:00 2001 From: Tim Holm Date: Thu, 6 Mar 2025 11:54:16 +1100 Subject: [PATCH 03/12] correct return type of whenInEnvironments. --- src/environment/environment.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/environment/environment.ts b/src/environment/environment.ts index 3d697fd..734a5d5 100644 --- a/src/environment/environment.ts +++ b/src/environment/environment.ts @@ -40,7 +40,7 @@ const isInEnvironment = (stage: EnvironmentStage[]) => { } // If the current environment is one of the provided stages, execute the provided callback -const whenInEnvironments = (stage: EnvironmentStage[], callback: EnvCallback) => { +const whenInEnvironments = (stage: EnvironmentStage[], callback: EnvCallback): T | undefined => { if (isInEnvironment(stage)) { return callback(); } From 6705621bdd76d2650ddf8d56d8f903d20633e88d Mon Sep 17 00:00:00 2001 From: Tim Holm Date: Thu, 6 Mar 2025 11:58:41 +1100 Subject: [PATCH 04/12] additional passthrough fixes --- src/environment/environment.ts | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/environment/environment.ts b/src/environment/environment.ts index 734a5d5..af1c740 100644 --- a/src/environment/environment.ts +++ b/src/environment/environment.ts @@ -46,17 +46,12 @@ const whenInEnvironments = (stage: EnvironmentStage[], callback: EnvCallback< } } -const whenLocalRun = (callback: EnvCallback) => { - whenInEnvironments([EnvironmentStage.LocalRun], callback); -} +const whenLocalRun = (callback: EnvCallback) => whenInEnvironments([EnvironmentStage.LocalRun], callback); -const whenBuild = (callback: EnvCallback) => { - whenInEnvironments([EnvironmentStage.Build], callback); -} -const whenCloud = (callback: EnvCallback) => { - whenInEnvironments([EnvironmentStage.Cloud], callback); -} +const whenBuild = (callback: EnvCallback) => whenInEnvironments([EnvironmentStage.Build], callback); + +const whenCloud = (callback: EnvCallback) => whenInEnvironments([EnvironmentStage.Cloud], callback); type EnvCallback = () => T; @@ -78,6 +73,3 @@ export const Environment = { // If the current environment is a cloud environment, execute the provided callback whenCloud, } - - - From 79bd2120b77a144a2ff141da41be419737363162 Mon Sep 17 00:00:00 2001 From: Tim Holm Date: Thu, 6 Mar 2025 12:39:34 +1100 Subject: [PATCH 05/12] chore: add missing license header. --- src/environment/index.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/environment/index.ts b/src/environment/index.ts index 8c08d0d..8aa655e 100644 --- a/src/environment/index.ts +++ b/src/environment/index.ts @@ -1 +1,15 @@ +// Copyright 2021, Nitric Technologies Pty Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + export * from "./environment"; \ No newline at end of file From 7de2c35af35b16204a5bda4583889f57587b2be6 Mon Sep 17 00:00:00 2001 From: Tim Holm Date: Thu, 6 Mar 2025 14:04:01 +1100 Subject: [PATCH 06/12] Apply suggestions from code review Co-authored-by: Ryan Cartwright <39504851+HomelessDinosaur@users.noreply.github.com> --- src/environment/environment.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/environment/environment.ts b/src/environment/environment.ts index af1c740..cdf707e 100644 --- a/src/environment/environment.ts +++ b/src/environment/environment.ts @@ -46,12 +46,12 @@ const whenInEnvironments = (stage: EnvironmentStage[], callback: EnvCallback< } } -const whenLocalRun = (callback: EnvCallback) => whenInEnvironments([EnvironmentStage.LocalRun], callback); +const whenLocallyRunning = (callback: EnvCallback) => whenInEnvironments([EnvironmentStage.LocalRun], callback); -const whenBuild = (callback: EnvCallback) => whenInEnvironments([EnvironmentStage.Build], callback); +const whenBuilding = (callback: EnvCallback) => whenInEnvironments([EnvironmentStage.Build], callback); -const whenCloud = (callback: EnvCallback) => whenInEnvironments([EnvironmentStage.Cloud], callback); +const whenInCloud = (callback: EnvCallback) => whenInEnvironments([EnvironmentStage.Cloud], callback); type EnvCallback = () => T; From 0b44a169143e84bc7c0214e5ff40509e8842b24f Mon Sep 17 00:00:00 2001 From: Tim Holm Date: Thu, 6 Mar 2025 14:04:10 +1100 Subject: [PATCH 07/12] Update src/environment/environment.ts Co-authored-by: Ryan Cartwright <39504851+HomelessDinosaur@users.noreply.github.com> --- src/environment/environment.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/environment/environment.ts b/src/environment/environment.ts index cdf707e..22271dc 100644 --- a/src/environment/environment.ts +++ b/src/environment/environment.ts @@ -48,7 +48,6 @@ const whenInEnvironments = (stage: EnvironmentStage[], callback: EnvCallback< const whenLocallyRunning = (callback: EnvCallback) => whenInEnvironments([EnvironmentStage.LocalRun], callback); - const whenBuilding = (callback: EnvCallback) => whenInEnvironments([EnvironmentStage.Build], callback); const whenInCloud = (callback: EnvCallback) => whenInEnvironments([EnvironmentStage.Cloud], callback); From dce59969bcf958f59fa6fc5ad46cbb1038740a4f Mon Sep 17 00:00:00 2001 From: Tim Holm Date: Thu, 6 Mar 2025 15:00:12 +1100 Subject: [PATCH 08/12] fix exports --- src/environment/environment.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/environment/environment.ts b/src/environment/environment.ts index 22271dc..9a5e632 100644 --- a/src/environment/environment.ts +++ b/src/environment/environment.ts @@ -66,9 +66,9 @@ export const Environment = { // If the current environment is one of the provided stages, execute the provided callback when: whenInEnvironments, // If the current environment is a local run, execute the provided callback - whenLocalRun, + whenLocallyRunning, // If the current environment is a build, execute the provided callback - whenBuild, + whenBuilding, // If the current environment is a cloud environment, execute the provided callback - whenCloud, + whenInCloud, } From 019fb554658c11794e909263de036f1a90454fd2 Mon Sep 17 00:00:00 2001 From: Tim Holm Date: Thu, 6 Mar 2025 15:01:55 +1100 Subject: [PATCH 09/12] prettier --- src/environment/environment.ts | 93 +++++++++++++++++++--------------- src/environment/index.ts | 2 +- 2 files changed, 53 insertions(+), 42 deletions(-) diff --git a/src/environment/environment.ts b/src/environment/environment.ts index 9a5e632..8162ffe 100644 --- a/src/environment/environment.ts +++ b/src/environment/environment.ts @@ -13,62 +13,73 @@ // limitations under the License. // The environment variable key that will be used to determine the current Nitric lifecycle/executing environment -const NITRIC_ENVIRONMENT = "NITRIC_ENVIRONMENT"; +const NITRIC_ENVIRONMENT = 'NITRIC_ENVIRONMENT'; // Possible nitric execution environments enum EnvironmentStage { - // Local development run (using nitric run/start) - LocalRun = "run", - // Local development requirements building/collection (using nitric up) - Build = "build", - // When the code is running in a deployed environment - Cloud = "cloud", + // Local development run (using nitric run/start) + LocalRun = 'run', + // Local development requirements building/collection (using nitric up) + Build = 'build', + // When the code is running in a deployed environment + Cloud = 'cloud', } const getCurrentEnvironment = (): EnvironmentStage => { - const lifecycle = process.env[NITRIC_ENVIRONMENT]; - if (!lifecycle || !Object.values(EnvironmentStage).includes(lifecycle as EnvironmentStage)) { - throw new Error(`Unable to determine the current Nitric lifecycle, please ensure the ${NITRIC_ENVIRONMENT} environment variable is set`); - } - return lifecycle as EnvironmentStage; -} + const lifecycle = process.env[NITRIC_ENVIRONMENT]; + if ( + !lifecycle || + !Object.values(EnvironmentStage).includes(lifecycle as EnvironmentStage) + ) { + throw new Error( + `Unable to determine the current Nitric lifecycle, please ensure the ${NITRIC_ENVIRONMENT} environment variable is set` + ); + } + return lifecycle as EnvironmentStage; +}; // Check if the current environment is one of the provided stages const isInEnvironment = (stage: EnvironmentStage[]) => { - const currentStage = getCurrentEnvironment(); - return stage.includes(currentStage); -} + const currentStage = getCurrentEnvironment(); + return stage.includes(currentStage); +}; // If the current environment is one of the provided stages, execute the provided callback -const whenInEnvironments = (stage: EnvironmentStage[], callback: EnvCallback): T | undefined => { - if (isInEnvironment(stage)) { - return callback(); - } -} +const whenInEnvironments = ( + stage: EnvironmentStage[], + callback: EnvCallback +): T | undefined => { + if (isInEnvironment(stage)) { + return callback(); + } +}; -const whenLocallyRunning = (callback: EnvCallback) => whenInEnvironments([EnvironmentStage.LocalRun], callback); +const whenLocallyRunning = (callback: EnvCallback) => + whenInEnvironments([EnvironmentStage.LocalRun], callback); -const whenBuilding = (callback: EnvCallback) => whenInEnvironments([EnvironmentStage.Build], callback); +const whenBuilding = (callback: EnvCallback) => + whenInEnvironments([EnvironmentStage.Build], callback); -const whenInCloud = (callback: EnvCallback) => whenInEnvironments([EnvironmentStage.Cloud], callback); +const whenInCloud = (callback: EnvCallback) => + whenInEnvironments([EnvironmentStage.Cloud], callback); type EnvCallback = () => T; export const Environment = { - // Check if the current environment is one of the provided stages - is: isInEnvironment, - // Check if the current environment is a local run - isLocalRun: () => isInEnvironment([EnvironmentStage.LocalRun]), - // Check if the current environment is a build - isBuild: () => isInEnvironment([EnvironmentStage.Build]), - // Check if the current environment is a cloud environment - isCloud: () => isInEnvironment([EnvironmentStage.Cloud]), - // If the current environment is one of the provided stages, execute the provided callback - when: whenInEnvironments, - // If the current environment is a local run, execute the provided callback - whenLocallyRunning, - // If the current environment is a build, execute the provided callback - whenBuilding, - // If the current environment is a cloud environment, execute the provided callback - whenInCloud, -} + // Check if the current environment is one of the provided stages + is: isInEnvironment, + // Check if the current environment is a local run + isLocalRun: () => isInEnvironment([EnvironmentStage.LocalRun]), + // Check if the current environment is a build + isBuild: () => isInEnvironment([EnvironmentStage.Build]), + // Check if the current environment is a cloud environment + isCloud: () => isInEnvironment([EnvironmentStage.Cloud]), + // If the current environment is one of the provided stages, execute the provided callback + when: whenInEnvironments, + // If the current environment is a local run, execute the provided callback + whenLocallyRunning, + // If the current environment is a build, execute the provided callback + whenBuilding, + // If the current environment is a cloud environment, execute the provided callback + whenInCloud, +}; diff --git a/src/environment/index.ts b/src/environment/index.ts index 8aa655e..9316daf 100644 --- a/src/environment/index.ts +++ b/src/environment/index.ts @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -export * from "./environment"; \ No newline at end of file +export * from './environment'; From 37cc6b0fdea597be04c905e2ff5be9bb0d9eeaf2 Mon Sep 17 00:00:00 2001 From: Tim Holm Date: Thu, 6 Mar 2025 15:34:36 +1100 Subject: [PATCH 10/12] update naming. --- src/{environment => lifecycle}/index.ts | 0 .../environment.ts => lifecycle/lifecycle.ts} | 60 +++++++++---------- 2 files changed, 29 insertions(+), 31 deletions(-) rename src/{environment => lifecycle}/index.ts (100%) rename src/{environment/environment.ts => lifecycle/lifecycle.ts} (55%) diff --git a/src/environment/index.ts b/src/lifecycle/index.ts similarity index 100% rename from src/environment/index.ts rename to src/lifecycle/index.ts diff --git a/src/environment/environment.ts b/src/lifecycle/lifecycle.ts similarity index 55% rename from src/environment/environment.ts rename to src/lifecycle/lifecycle.ts index 8162ffe..2b90b0b 100644 --- a/src/environment/environment.ts +++ b/src/lifecycle/lifecycle.ts @@ -16,7 +16,7 @@ const NITRIC_ENVIRONMENT = 'NITRIC_ENVIRONMENT'; // Possible nitric execution environments -enum EnvironmentStage { +enum LifecycleStage { // Local development run (using nitric run/start) LocalRun = 'run', // Local development requirements building/collection (using nitric up) @@ -25,61 +25,59 @@ enum EnvironmentStage { Cloud = 'cloud', } -const getCurrentEnvironment = (): EnvironmentStage => { +const getCurrentLifecycle = (): LifecycleStage => { const lifecycle = process.env[NITRIC_ENVIRONMENT]; if ( !lifecycle || - !Object.values(EnvironmentStage).includes(lifecycle as EnvironmentStage) + !Object.values(LifecycleStage).includes(lifecycle as LifecycleStage) ) { throw new Error( `Unable to determine the current Nitric lifecycle, please ensure the ${NITRIC_ENVIRONMENT} environment variable is set` ); } - return lifecycle as EnvironmentStage; + return lifecycle as LifecycleStage; }; // Check if the current environment is one of the provided stages -const isInEnvironment = (stage: EnvironmentStage[]) => { - const currentStage = getCurrentEnvironment(); +const isInLifecycle = (stage: LifecycleStage[]) => { + const currentStage = getCurrentLifecycle(); return stage.includes(currentStage); }; // If the current environment is one of the provided stages, execute the provided callback -const whenInEnvironments = ( - stage: EnvironmentStage[], - callback: EnvCallback +const whenInLifecycles = ( + stage: LifecycleStage[], + callback: Lifecycle ): T | undefined => { - if (isInEnvironment(stage)) { + if (isInLifecycle(stage)) { return callback(); } }; -const whenLocallyRunning = (callback: EnvCallback) => - whenInEnvironments([EnvironmentStage.LocalRun], callback); +const whenRunning = (callback: Lifecycle) => + whenInLifecycles([LifecycleStage.LocalRun, LifecycleStage.Cloud], callback); -const whenBuilding = (callback: EnvCallback) => - whenInEnvironments([EnvironmentStage.Build], callback); +const whenCollecting = (callback: Lifecycle) => + whenInLifecycles([LifecycleStage.Build], callback); -const whenInCloud = (callback: EnvCallback) => - whenInEnvironments([EnvironmentStage.Cloud], callback); +const isRunning = () => isInLifecycle([LifecycleStage.LocalRun, LifecycleStage.Cloud]); -type EnvCallback = () => T; +const isCollecting = () => isInLifecycle([LifecycleStage.Build]); -export const Environment = { + +type Lifecycle = () => T; + +export const Lifecycle = { // Check if the current environment is one of the provided stages - is: isInEnvironment, - // Check if the current environment is a local run - isLocalRun: () => isInEnvironment([EnvironmentStage.LocalRun]), - // Check if the current environment is a build - isBuild: () => isInEnvironment([EnvironmentStage.Build]), - // Check if the current environment is a cloud environment - isCloud: () => isInEnvironment([EnvironmentStage.Cloud]), + is: isInLifecycle, + // Check if the current lifecycle is collecting application requirements + isCollecting, + // Check if the current lifecycle is running the app + isRunning, // If the current environment is one of the provided stages, execute the provided callback - when: whenInEnvironments, - // If the current environment is a local run, execute the provided callback - whenLocallyRunning, - // If the current environment is a build, execute the provided callback - whenBuilding, + when: whenInLifecycles, + // If the current environment is collecting application requirements + whenCollecting, // If the current environment is a cloud environment, execute the provided callback - whenInCloud, + whenRunning, }; From fb98af0d8248c33db20b5586450b8c45fba937c9 Mon Sep 17 00:00:00 2001 From: Tim Holm Date: Thu, 6 Mar 2025 15:37:11 +1100 Subject: [PATCH 11/12] lint. --- src/lifecycle/lifecycle.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lifecycle/lifecycle.ts b/src/lifecycle/lifecycle.ts index 2b90b0b..584f7e1 100644 --- a/src/lifecycle/lifecycle.ts +++ b/src/lifecycle/lifecycle.ts @@ -60,17 +60,17 @@ const whenRunning = (callback: Lifecycle) => const whenCollecting = (callback: Lifecycle) => whenInLifecycles([LifecycleStage.Build], callback); -const isRunning = () => isInLifecycle([LifecycleStage.LocalRun, LifecycleStage.Cloud]); +const isRunning = () => + isInLifecycle([LifecycleStage.LocalRun, LifecycleStage.Cloud]); const isCollecting = () => isInLifecycle([LifecycleStage.Build]); - type Lifecycle = () => T; export const Lifecycle = { // Check if the current environment is one of the provided stages is: isInLifecycle, - // Check if the current lifecycle is collecting application requirements + // Check if the current lifecycle is collecting application requirements isCollecting, // Check if the current lifecycle is running the app isRunning, From 97898e70a7a0af1533b11555d2430a49e66875af Mon Sep 17 00:00:00 2001 From: Tim Holm Date: Thu, 6 Mar 2025 15:38:28 +1100 Subject: [PATCH 12/12] update naming. --- src/index.ts | 2 +- src/lifecycle/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 8b04873..c28f5d7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,4 +16,4 @@ export * from './resources'; export * from './types'; export * from './context'; export * from './handlers'; -export * from './environment'; +export * from './lifecycle'; diff --git a/src/lifecycle/index.ts b/src/lifecycle/index.ts index 9316daf..c79db7c 100644 --- a/src/lifecycle/index.ts +++ b/src/lifecycle/index.ts @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -export * from './environment'; +export * from './lifecycle';