-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to package and new migrate command
- APP-4439 - [PACKAGE] Changed appId creation logic to used UUID4 instead of UUID5 for App Builder - APP-4440 - [MIGRATE] Added new command to assist in migration of TcEx 3 Apps to TcEx 4
- Loading branch information
1 parent
b714a1c
commit 5fb6c55
Showing
17 changed files
with
491 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""TcEx Framework Module""" |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
"""TcEx Framework Module""" | ||
|
||
# standard library | ||
from typing import Optional | ||
|
||
# third-party | ||
import typer | ||
|
||
# first-party | ||
from tcex_cli.cli.migrate.migrate_cli import MigrateCli | ||
from tcex_cli.render.render import Render | ||
|
||
# typer does not yet support PEP 604, but pyupgrade will enforce | ||
# PEP 604. this is a temporary workaround until support is added. | ||
IntOrNone = Optional[int] | ||
StrOrNone = Optional[str] | ||
|
||
|
||
def command( | ||
forward_ref: bool = typer.Option( | ||
True, help='If true, show typing forward lookup reference that require updates.' | ||
), | ||
update_code: bool = typer.Option(True, help='If true, apply code replacements.'), | ||
): | ||
"""Migrate App to TcEx 4 from TcEx 2/3.""" | ||
cli = MigrateCli( | ||
forward_ref, | ||
update_code, | ||
) | ||
try: | ||
cli.walk_code() | ||
except Exception as ex: | ||
cli.log.exception('Failed to run "tcex deps" command.') | ||
Render.panel.failure(f'Exception: {ex}') |
Oops, something went wrong.