@olenbetong/appframe-vite 6.3.1 → 6.3.2
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.
- package/README.md +12 -1
- package/lib/devtoolsServer.js +7 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -148,6 +148,16 @@ dataObjects:
|
|
|
148
148
|
permissions: IUD
|
|
149
149
|
output: src/data/dsSubsidiaryLedger.ts
|
|
150
150
|
|
|
151
|
+
- id: dsProjectLocations
|
|
152
|
+
resource: aviw_Accounting_ProjectsLocations
|
|
153
|
+
global: true
|
|
154
|
+
types: true
|
|
155
|
+
master: dsProjects
|
|
156
|
+
linkFields:
|
|
157
|
+
- Domain
|
|
158
|
+
- ProjectID
|
|
159
|
+
output: src/data/dsProjectLocations.ts
|
|
160
|
+
|
|
151
161
|
procedures:
|
|
152
162
|
- id: procCreateCustomer
|
|
153
163
|
resource: astp_Accounting_SubsidiaryLedger_Create
|
|
@@ -183,6 +193,8 @@ procedures:
|
|
|
183
193
|
|
|
184
194
|
A top-level `server` key can override the hostname (defaults to `appframe.proxy.hostname` from `package.json`).
|
|
185
195
|
|
|
196
|
+
**Master/child relationships:** set both `master` and `linkFields` on the child object. The generated data object will include `masterDataObject` and `linkFields` in the `generateApiDataObject(...)` options.
|
|
197
|
+
|
|
186
198
|
## `@olenbetong/appframe-vite/resources` export
|
|
187
199
|
|
|
188
200
|
Shared code generation utilities for Node.js consumers:
|
|
@@ -198,4 +210,3 @@ import {
|
|
|
198
210
|
} from "@olenbetong/appframe-vite/resources";
|
|
199
211
|
```
|
|
200
212
|
|
|
201
|
-
|
package/lib/devtoolsServer.js
CHANGED
|
@@ -140,12 +140,18 @@ async function handleApi(req, res, apiPath, hostname, next) {
|
|
|
140
140
|
}
|
|
141
141
|
if (method === "PUT" && id) {
|
|
142
142
|
const updates = req.body;
|
|
143
|
+
if (!updates.id || !updates.resource || !updates.output) {
|
|
144
|
+
return sendJson(res, 400, { error: "id, resource, and output are required for updates" });
|
|
145
|
+
}
|
|
146
|
+
if (updates.id !== id) {
|
|
147
|
+
return sendJson(res, 400, { error: "Renaming resource id is not supported" });
|
|
148
|
+
}
|
|
143
149
|
const config = await readResourcesConfig();
|
|
144
150
|
let found = false;
|
|
145
151
|
for (const list of [config.dataObjects ?? [], config.procedures ?? []]) {
|
|
146
152
|
const idx = list.findIndex((e) => e.id === id);
|
|
147
153
|
if (idx !== -1) {
|
|
148
|
-
list[idx] =
|
|
154
|
+
list[idx] = updates;
|
|
149
155
|
found = true;
|
|
150
156
|
break;
|
|
151
157
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olenbetong/appframe-vite",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.2",
|
|
4
4
|
"description": "Tools to use and deploy Vite applications to Appframe",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"jsdom": "29.1.1",
|
|
42
42
|
"rollup-plugin-visualizer": "^7.0.1",
|
|
43
43
|
"yaml": "^2.9.0",
|
|
44
|
-
"@olenbetong/appframe-devtools": "0.
|
|
44
|
+
"@olenbetong/appframe-devtools": "0.3.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/jsdom": "^27.0.0",
|