ApiLogicServer 15.0.46__py3-none-any.whl → 15.0.47__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,10 +12,10 @@ ApiLogicServer CLI: given a database url, create [and run] customizable ApiLogic
12
12
  Called from api_logic_server_cli.py, by instantiating the ProjectRun object.
13
13
  '''
14
14
 
15
- __version__ = "15.00.46" # last public release: 15.00.41 (15.00.12)
15
+ __version__ = "15.00.47" # last public release: 15.00.41 (15.00.12)
16
16
  recent_changes = \
17
17
  f'\n\nRecent Changes:\n' +\
18
- "\t07/14/2024 - 15.00.46: venv fix, copilot vibe tweaks - creation, mcp logic, basic_demo autonums \n"\
18
+ "\t07/14/2024 - 15.00.47: venv fix, copilot vibe tweaks - creation, mcp logic, basic_demo autonums \n"\
19
19
  "\t07/10/2024 - 15.00.41: copilot vibe support for logic, UI, MCP, bug[98] \n"\
20
20
  "\t06/30/2024 - 15.00.33: Tech Preview: genai-logic genai-add-app --vibe, bug [96, 97] \n"\
21
21
  "\t06/10/2024 - 15.00.12: MCP Security, win fixes for readme, graphics quotes \n"\
@@ -744,7 +744,14 @@ fi
744
744
  env_file_path = project.project_directory_path.joinpath('.env')
745
745
  venv_dir = str(Path(defaultInterpreterPath_str).parent.parent) # Get the venv directory
746
746
 
747
- env_content = f"""# Virtual Environment Configuration
747
+ # Platform-specific .env file content
748
+ if os.name == "nt": # Windows
749
+ env_content = f"""# Virtual Environment Configuration
750
+ VIRTUAL_ENV={venv_dir}
751
+ PYTHONPATH={venv_site_packages}
752
+ """
753
+ else: # Unix/Linux/macOS
754
+ env_content = f"""# Virtual Environment Configuration
748
755
  VIRTUAL_ENV={venv_dir}
749
756
  PATH={Path(defaultInterpreterPath_str).parent}:$PATH
750
757
  PYTHONPATH={venv_site_packages}
@@ -778,7 +785,7 @@ def update_api_logic_server_run(project):
778
785
  """
779
786
  api_logic_server_run_py = f'{project.project_directory}/api_logic_server_run.py'
780
787
  config_py = f'{project.project_directory}/config/config.py'
781
- create_utils.replace_string_in_file(search_for="\"api_logic_server_project_name\"", # fix logic_bank_utils.add_python_path
788
+ create_utils.replace_string_in_file(search_for="api_logic_server_project_name", # fix logic_bank_utils.add_python_path
782
789
  replace_with='"' + os.path.basename(project.project_name) + '"',
783
790
  in_file=api_logic_server_run_py)
784
791
  create_utils.replace_string_in_file(search_for="ApiLogicServer hello",
@@ -1186,6 +1193,9 @@ class ProjectRun(Project):
1186
1193
  """
1187
1194
  log.debug(f'.. .. ..Copying sqlite database to: database/{self.bind_key}_db.sqlite')
1188
1195
  db_loc = self.abs_db_url.replace("sqlite:///", "")
1196
+ if os.name == "nt":
1197
+ if db_loc.startswith("C:\C:"): # windows
1198
+ db_loc = db_loc.replace("C:\C:", "C:") # remove unk junk
1189
1199
  target_db_loc_actual = str(self.project_directory_path.joinpath(f'database/{self.bind_key}_db.sqlite'))
1190
1200
  # target: /Users/val/dev/ApiLogicServer/ApiLogicServer-dev/org_git/servers/NW_NoCust/database/Todo_db.sqlite
1191
1201
  # e.g., /Users/val/dev/ApiLogicServer/ApiLogicServer-dev/servers/NW_NoCust/database
@@ -405,10 +405,10 @@ def does_file_contain(search_for: str, in_file: str) -> bool:
405
405
  return found
406
406
 
407
407
  def replace_string_in_file(search_for: str, replace_with: str, in_file: str):
408
- with open(Path(in_file), 'r') as file:
408
+ with open(Path(in_file), 'r', encoding="utf-8") as file:
409
409
  file_data = file.read()
410
410
  file_data = file_data.replace(search_for, replace_with)
411
- with open(in_file, 'w') as file:
411
+ with open(in_file, 'w', encoding="utf-8") as file:
412
412
  file.write(file_data)
413
413
 
414
414
  def assign_value_to_key_in_file(key: str, value: any, in_file: str):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ApiLogicServer
3
- Version: 15.0.46
3
+ Version: 15.0.47
4
4
  Author-email: Val Huber <apilogicserver@gmail.com>
5
5
  License: BSD-3-Clause
6
6
  Project-URL: Homepage, https://www.genai-logic.com
@@ -1,5 +1,5 @@
1
1
  api_logic_server_cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- api_logic_server_cli/api_logic_server.py,sha256=WhjT58VTUme0W5AGKHsMQ6MK8wXljPLfZRnklz9DYt4,102085
2
+ api_logic_server_cli/api_logic_server.py,sha256=kePMIf99KMKZ6L-aCUeuwIH1WX0Oda92WXjQM6At1wU,102497
3
3
  api_logic_server_cli/api_logic_server_info.yaml,sha256=bxWwh2nBezkJJo-fbplOuxTyDWZzzaB4UI5js47mPRQ,116
4
4
  api_logic_server_cli/cli.py,sha256=3GdpAcaXsMeuMnWa-jx7tpi0x6OjIRoau4BeVT-Pw3A,87286
5
5
  api_logic_server_cli/cli_args_base.py,sha256=7cVM6BeizwttYAwUu1FUyuLuvWufvgt0TFeA8FI6tu0,3304
@@ -11,7 +11,7 @@ api_logic_server_cli/add_cust/add_cust.py,sha256=yi_6qoiBm19K1u5VNhDW-KaTVcnsU-u
11
11
  api_logic_server_cli/create_from_model/.DS_Store,sha256=1lFlJ5EFymdzGAUAaI30vcaaLHt3F1LwpG7xILf9jsM,6148
12
12
  api_logic_server_cli/create_from_model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  api_logic_server_cli/create_from_model/api_expose_api_models_creator.py,sha256=V-u3Hm404doztw66YuD2A043RCFmtw5QF5tMioC_1b0,7900
14
- api_logic_server_cli/create_from_model/api_logic_server_utils.py,sha256=GKT890JgHivkhUtamb2nJO-hvnlLE5_bIhSjMgETmeo,27715
14
+ api_logic_server_cli/create_from_model/api_logic_server_utils.py,sha256=V4DAoywawXWa5kWXIMKsmlhM_wcyKU4BiAUsbpYXKQQ,27751
15
15
  api_logic_server_cli/create_from_model/create_db_from_model.py,sha256=2H7slGnk39XOSnvL7vxrg6Ewx4bxeBJBgLo8fcXHTB4,4382
16
16
  api_logic_server_cli/create_from_model/dbml.py,sha256=m1yRnes5DXPMQrFBFJM2CuDhIfVFywSM6nDX7k19BLU,11573
17
17
  api_logic_server_cli/create_from_model/meta_model.py,sha256=ERf7tSgnSJSeRMVyggkdg-lvORQZSbfK0KMpL63qSEY,5837
@@ -2369,9 +2369,9 @@ api_logic_server_cli/tools/mini_skel/database/system/SAFRSBaseX.py,sha256=p8C7AF
2369
2369
  api_logic_server_cli/tools/mini_skel/database/system/TestDataBase.py,sha256=U02SYqThsbY5g3DX7XGaiMxjZBuOpzvtPS6RfI1WQFg,371
2370
2370
  api_logic_server_cli/tools/mini_skel/logic/declare_logic.py,sha256=fTrlHyqMeZsw_TyEXFa1VlYBL7fzjZab5ONSXO7aApo,175
2371
2371
  api_logic_server_cli/tools/mini_skel/logic/load_verify_rules.py,sha256=Rr5bySJpYCZmNPF2h-phcPJ53nAOPcT_ohZpCD93-a0,7530
2372
- apilogicserver-15.0.46.dist-info/licenses/LICENSE,sha256=67BS7VC-Z8GpaR3wijngQJkHWV04qJrwQArVgn9ldoI,1485
2373
- apilogicserver-15.0.46.dist-info/METADATA,sha256=WBnaifKa0KlFsycWrSa28J7W_11JlRPOFXVWzs1EDvU,6553
2374
- apilogicserver-15.0.46.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
2375
- apilogicserver-15.0.46.dist-info/entry_points.txt,sha256=W9EVNvf09h8n6rJChmVj2gzxVQ6BXXZa2x3wri0lFGc,259
2376
- apilogicserver-15.0.46.dist-info/top_level.txt,sha256=-r0AT_GEApleihg-jIh0OMvzzc0BO1RuhhOpE91H5qI,21
2377
- apilogicserver-15.0.46.dist-info/RECORD,,
2372
+ apilogicserver-15.0.47.dist-info/licenses/LICENSE,sha256=67BS7VC-Z8GpaR3wijngQJkHWV04qJrwQArVgn9ldoI,1485
2373
+ apilogicserver-15.0.47.dist-info/METADATA,sha256=s9JvCKls5k4-n5_kHBM22CVWXnICf3D3E9lYzFr9wf8,6553
2374
+ apilogicserver-15.0.47.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
2375
+ apilogicserver-15.0.47.dist-info/entry_points.txt,sha256=W9EVNvf09h8n6rJChmVj2gzxVQ6BXXZa2x3wri0lFGc,259
2376
+ apilogicserver-15.0.47.dist-info/top_level.txt,sha256=-r0AT_GEApleihg-jIh0OMvzzc0BO1RuhhOpE91H5qI,21
2377
+ apilogicserver-15.0.47.dist-info/RECORD,,