generated from ApeWorX/project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from unparalleled-js/fix/env-var
fix: issue preventing scoped environment variables from working correctly
- Loading branch information
Showing
18 changed files
with
380 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
from pathlib import Path | ||
|
||
from ape import plugins | ||
import ape.plugins | ||
|
||
from ._secrets import get_secret_manager | ||
from ._secrets import Scope, get_secret_manager | ||
from .accounts import KeyringAccount, KeyringAccountContainer | ||
from .config import KeyringConfig | ||
|
||
|
||
@plugins.register(plugins.Config) | ||
@ape.plugins.register(ape.plugins.Config) | ||
def config_class(): | ||
return KeyringConfig | ||
|
||
|
||
@plugins.register(plugins.AccountPlugin) | ||
@ape.plugins.register(ape.plugins.AccountPlugin) | ||
def account_types(): | ||
return KeyringAccountContainer, KeyringAccount | ||
|
||
|
||
# Sync environment variables if configured to do so. | ||
get_secret_manager(Path.cwd()).set_environment_variables() | ||
secret_manager = get_secret_manager(Path.cwd()) | ||
secret_manager.set_environment_variables() | ||
|
||
__all__ = ["Scope", "secret_manager"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.