ApiLogicServer 15.0.25__py3-none-any.whl → 15.0.27__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.
Files changed (57) hide show
  1. api_logic_server_cli/api_logic_server.py +2 -2
  2. api_logic_server_cli/api_logic_server_info.yaml +3 -3
  3. api_logic_server_cli/genai/genai_admin_app.py +29 -19
  4. api_logic_server_cli/prototypes/.DS_Store +0 -0
  5. api_logic_server_cli/prototypes/basic_demo/.DS_Store +0 -0
  6. api_logic_server_cli/prototypes/basic_demo/customizations/.DS_Store +0 -0
  7. api_logic_server_cli/prototypes/basic_demo/customizations/ui/.DS_Store +0 -0
  8. api_logic_server_cli/prototypes/basic_demo/customizations/ui/admin/.DS_Store +0 -0
  9. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/.DS_Store +0 -0
  10. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/README.md +17 -0
  11. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/README_create_react_app.md +70 -0
  12. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/package-lock.json +18469 -0
  13. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/package.json +47 -0
  14. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/public/favicon.ico +0 -0
  15. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/public/index.html +43 -0
  16. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/public/logo192.png +0 -0
  17. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/public/logo512.png +0 -0
  18. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/public/manifest.json +25 -0
  19. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/public/robots.txt +3 -0
  20. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/App.css +38 -0
  21. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/App.js +61 -0
  22. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/App.test.js +8 -0
  23. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/Config-reference.js +527 -0
  24. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/Config.js +527 -0
  25. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/Customer-reference.js +216 -0
  26. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/Customer.js +230 -0
  27. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/Item.js +170 -0
  28. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/Order.js +207 -0
  29. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/Product.js +140 -0
  30. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/SysEmail.js +157 -0
  31. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/SysMcp.js +110 -0
  32. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/app_loader.js +24 -0
  33. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/index.css +13 -0
  34. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/index.js +17 -0
  35. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/logo.svg +1 -0
  36. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/.eslintrc +5 -0
  37. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/.yarnrc.yml +4 -0
  38. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/default-settings.js +25 -0
  39. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/default-settings.ts +25 -0
  40. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/errors.js +116 -0
  41. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/errors.ts +116 -0
  42. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/index.test.tsx +7 -0
  43. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/index.tsx +11 -0
  44. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/ra-jsonapi-client.js +577 -0
  45. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/ra-jsonapi-client.ts +577 -0
  46. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/resourceLookup.js +124 -0
  47. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/resourceLookup.ts +124 -0
  48. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/styles.module.css +9 -0
  49. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/reportWebVitals.js +13 -0
  50. api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/setupTests.js +5 -0
  51. api_logic_server_cli/prototypes/manager/system/genai/app_templates/app_learning/Admin-App-Resource-Learning-Prompt.md +37 -3
  52. {apilogicserver-15.0.25.dist-info → apilogicserver-15.0.27.dist-info}/METADATA +1 -1
  53. {apilogicserver-15.0.25.dist-info → apilogicserver-15.0.27.dist-info}/RECORD +57 -11
  54. {apilogicserver-15.0.25.dist-info → apilogicserver-15.0.27.dist-info}/WHEEL +0 -0
  55. {apilogicserver-15.0.25.dist-info → apilogicserver-15.0.27.dist-info}/entry_points.txt +0 -0
  56. {apilogicserver-15.0.25.dist-info → apilogicserver-15.0.27.dist-info}/licenses/LICENSE +0 -0
  57. {apilogicserver-15.0.25.dist-info → apilogicserver-15.0.27.dist-info}/top_level.txt +0 -0
@@ -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.25" # last public release: 15.00.22 (15.00.12)
15
+ __version__ = "15.00.27" # last public release: 15.00.25 (15.00.12)
16
16
  recent_changes = \
17
17
  f'\n\nRecent Changes:\n' +\
18
- "\t06/24/2024 - 15.00.25: Tech Preview: als genai-app w/ sra provider+model+grid, import fix, bug [96] \n"\
18
+ "\t06/26/2024 - 15.00.27: Tech Preview: als genai-app w/ sra provider+model+grid_cascadeAdd, imports, bug [96] \n"\
19
19
  "\t06/10/2024 - 15.00.12: MCP Security, win fixes for readme, graphics quotes \n"\
20
20
  "\t06/08/2024 - 15.00.10: MCP, optional shortening of stacktrace lines, bugfix[92] \n"\
21
21
  "\t05/16/2024 - 14.05.00: safrs 3.1.7, running mcp preview \n"\
@@ -1,3 +1,3 @@
1
- last_created_date: June 23, 2025 06:19:07
2
- last_created_project_name: ../../../servers/basic_demo
3
- last_created_version: 15.00.22
1
+ last_created_date: June 26, 2025 08:44:28
2
+ last_created_project_name: ../../../servers/mycircles
3
+ last_created_version: 15.00.26
@@ -38,7 +38,7 @@ class JSResponseFormat(BaseModel): # must match system/genai/prompt_inserts/res
38
38
 
39
39
  class GenAIAdminApp:
40
40
 
41
- def __init__(self, project: Project, app_name: str, schema: str, genai_version: OpenAI): # TODO: type??
41
+ def __init__(self, project: Project, app_name: str, schema: str, genai_version: str):
42
42
  self.start_time = time.time()
43
43
 
44
44
  self.api_version = genai_version
@@ -82,6 +82,7 @@ class GenAIAdminApp:
82
82
  shutil.copytree(self.react_admin_template_path, self.ui_project_path, dirs_exist_ok=True)
83
83
 
84
84
  # self.parse_resources()
85
+ self.standard_imports = self.read_standard_imports()
85
86
  self.a_generate_resource_files()
86
87
  self.b_generate_app_js()
87
88
  # comes from copytree, above -- self.c_generate_data_provider()
@@ -94,27 +95,36 @@ class GenAIAdminApp:
94
95
  log.info('> npm install')
95
96
  log.info('> npm start')
96
97
 
98
+ def read_standard_imports(self) -> List[str]:
99
+ '''grr
100
+
101
+ openAI very often ignores the EXACTLY imports,<br>
102
+ so read them manually for later resource creation
103
+ '''
104
+ learning = self.admin_app_resource_learning.splitlines()
105
+ result_lines = []
106
+ preamble_done = False
107
+ for each_line in learning:
108
+ if '<sample-code' in each_line:
109
+ preamble_done = True
110
+ continue
111
+ if 'end mandatory imports' in each_line:
112
+ result_lines.append(each_line)
113
+ result_lines.append("")
114
+ break
115
+ if preamble_done:
116
+ result_lines.append(each_line)
117
+ return result_lines
118
+
97
119
 
98
120
  def a_generate_resource_files(self):
99
121
 
100
- def fix_resource(raw_source: str) -> str:
101
- ''' Remove code occasional begin/end code markers <br>
102
- And horrific override of ChatGPT refusal to generate imports AS DIRECTED!
122
+ def fix_resource(genai_app: GenAIAdminApp, raw_source: str) -> str:
123
+ ''' Remove occasional begin/end code markers <br>
124
+ And horrific override of ChatGPT refusal to generate imports AS DIRECTED!<br>
103
125
  ToDo: lint, and repeat generation if errors detected
104
126
  '''
105
- mandatory_imports = '''
106
- // begin MANDATORY imports (always generated EXACTLY)
107
- import React from 'react';
108
- import { List, FunctionField, Datagrid, TextField, DateField, NumberField } from 'react-admin';
109
- import { ReferenceField, ReferenceManyField } from 'react-admin';
110
- import { TabbedShowLayout, Tab, SimpleShowLayout, TextInput, NumberInput, DateTimeInput } from 'react-admin';
111
- import { ReferenceInput, SelectInput, SimpleForm, Show, Edit, Create } from 'react-admin';
112
- import { Filter, Pagination, BooleanField, BooleanInput, Labeled } from 'react-admin';
113
- import { Grid, Typography, Box, Divider } from '@mui/material';
114
- // end mandatory imports
115
-
116
- // generate pages and components...
117
- '''
127
+
118
128
  source_lines = raw_source.splitlines()
119
129
  result_lines = []
120
130
  imports_done = False
@@ -126,7 +136,7 @@ import { Grid, Typography, Box, Divider } from '@mui/material';
126
136
  else:
127
137
  break
128
138
  if do_mandatory_imports := True and not imports_done and '= (props) =>' in each_line:
129
- result_lines = mandatory_imports.split('\n')
139
+ result_lines = list(genai_app.standard_imports)
130
140
  imports_done = True
131
141
  result_lines.append(each_line)
132
142
  # return source_lines as a string
@@ -150,7 +160,7 @@ import { Grid, Typography, Box, Divider } from '@mui/material';
150
160
  response_as=JSResponseFormat)
151
161
  response_dict = json.loads(output)
152
162
  target_file = self.ui_src_path / f"{each_resource_name}.js"
153
- source_code = fix_resource(response_dict['code'])
163
+ source_code = fix_resource(self, response_dict['code'])
154
164
  utils.write_file(target_file, source_code)
155
165
  log.info(f"\n✅ Wrote: {target_file}")
156
166
 
Binary file
@@ -0,0 +1,17 @@
1
+ # Getting Started with Genai-Logic react-admin
2
+
3
+ This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). For more information, see [README_create_react_app](README_create_react_app.md).
4
+
5
+ GenAI-Logic (`als genai-app`) then [created this project](https://apilogicserver.github.io/Docs/Admin-Vibe/).
6
+
7
+ <br>
8
+
9
+ # To run the app:
10
+
11
+ ```bash
12
+ cd ui/react-admin
13
+ npm install
14
+ npm start
15
+ ```
16
+
17
+ Open your browser at [http://localhost:3000](http://localhost:3000).
@@ -0,0 +1,70 @@
1
+ # Getting Started with Create React App
2
+
3
+ This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4
+
5
+ ## Available Scripts
6
+
7
+ In the project directory, you can run:
8
+
9
+ ### `npm start`
10
+
11
+ Runs the app in the development mode.\
12
+ Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
13
+
14
+ The page will reload when you make changes.\
15
+ You may also see any lint errors in the console.
16
+
17
+ ### `npm test`
18
+
19
+ Launches the test runner in the interactive watch mode.\
20
+ See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21
+
22
+ ### `npm run build`
23
+
24
+ Builds the app for production to the `build` folder.\
25
+ It correctly bundles React in production mode and optimizes the build for the best performance.
26
+
27
+ The build is minified and the filenames include the hashes.\
28
+ Your app is ready to be deployed!
29
+
30
+ See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31
+
32
+ ### `npm run eject`
33
+
34
+ **Note: this is a one-way operation. Once you `eject`, you can't go back!**
35
+
36
+ If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37
+
38
+ Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
39
+
40
+ You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
41
+
42
+ ## Learn More
43
+
44
+ You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45
+
46
+ To learn React, check out the [React documentation](https://reactjs.org/).
47
+
48
+ ### Code Splitting
49
+
50
+ This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
51
+
52
+ ### Analyzing the Bundle Size
53
+
54
+ This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
55
+
56
+ ### Making a Progressive Web App
57
+
58
+ This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
59
+
60
+ ### Advanced Configuration
61
+
62
+ This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
63
+
64
+ ### Deployment
65
+
66
+ This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
67
+
68
+ ### `npm run build` fails to minify
69
+
70
+ This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)