Skip to content

Commit

Permalink
Update abstra-lib
Browse files Browse the repository at this point in the history
  • Loading branch information
abstra-bot committed Feb 28, 2024
1 parent 3d721e0 commit f92c980
Show file tree
Hide file tree
Showing 199 changed files with 372 additions and 363 deletions.
3 changes: 3 additions & 0 deletions abstra_internals/interface/cli/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from .version import check_latest_version
from ...server.controller import MainController
from ...server.fs_watcher import watch_py_root_files
from ...repositories.project.project import ProjectRepository


def serve(
Expand All @@ -25,6 +26,8 @@ def serve(
os.environ["ABSTRA_SERVER"] = "true"

override_stdio(print_exceptions=False)
ProjectRepository().migrate_config_file()

controller = MainController()

watch_py_root_files()
Expand Down
10 changes: 7 additions & 3 deletions abstra_internals/repositories/project/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -1146,10 +1146,10 @@ def save(cls, project: Project):
Path.rmdir(temp_file.parent)

@classmethod
def load(cls) -> Project:
def migrate_config_file(cls):
data = json.loads(cls.get_file_path().read_text(encoding="utf-8"))

initial_version = data.get("version")

migrated_data = json_migrations.migrate(
data,
Settings.root_path,
Expand All @@ -1158,4 +1158,8 @@ def load(cls) -> Project:
if migrated_data["version"] != initial_version:
cls.save(Project.from_dict(migrated_data))

return Project.from_dict(migrated_data)
@classmethod
def load(cls) -> Project:
data = json.loads(cls.get_file_path().read_text(encoding="utf-8"))

return Project.from_dict(data)
2 changes: 1 addition & 1 deletion abstra_internals/server/fs_watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ def __files_changed_polling_loop():


def watch_py_root_files():
threading.Thread(target=lambda: __files_changed_polling_loop()).start()
threading.Thread(target=lambda: __files_changed_polling_loop(), daemon=True).start()
2 changes: 2 additions & 0 deletions abstra_statics/dist/assets/ApiKeys.3f7e2c66.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions abstra_statics/dist/assets/ApiKeys.4abb95b2.js

This file was deleted.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions abstra_statics/dist/assets/Billing.846ae009.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions abstra_statics/dist/assets/Billing.9f25c0f5.js

This file was deleted.

Loading

0 comments on commit f92c980

Please sign in to comment.