biz-a-cli 2.3.39 → 2.3.40
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/package.json +1 -1
- package/scheduler/datalib.js +1 -1
- package/tests/data.test.js +3 -3
- package/tests/mockData/mockApp/a.js +0 -1
- package/tests/mockData/mockApp/b.js +0 -2
- package/tests/mockData/mockApp/c.js +0 -4
- package/tests/mockData/mockApp/d.js +0 -2
- package/tests/mockData/mockApp/menu.json +0 -49
package/package.json
CHANGED
package/scheduler/datalib.js
CHANGED
|
@@ -47,7 +47,7 @@ export function mapData2Key(res, cols) {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export function getUrlApi(config, methodName, isPost = true) {
|
|
50
|
-
return `${config.url}/fina/rest
|
|
50
|
+
return `${config.url}/fina/rest/${config.methodClass ?? 'TOrmMethod'}/` +
|
|
51
51
|
`${isPost ? '%22' : ''}${methodName}${isPost ? '%22' : ''}`
|
|
52
52
|
}
|
|
53
53
|
|
package/tests/data.test.js
CHANGED
|
@@ -237,11 +237,11 @@ describe('data test', () => {
|
|
|
237
237
|
expect(getUrlApi(config, methodName, isPost)).toBe(expectedUrl);
|
|
238
238
|
});
|
|
239
239
|
|
|
240
|
-
test('should return the correct URL for GET requests', () => {
|
|
241
|
-
const config = { url: 'http://example.com' };
|
|
240
|
+
test('should return the correct URL for GET requests with custom class', () => {
|
|
241
|
+
const config = { url: 'http://example.com', methodClass: 'TFinaMethod' };
|
|
242
242
|
const methodName = 'testMethod';
|
|
243
243
|
const isPost = false;
|
|
244
|
-
const expectedUrl = 'http://example.com/fina/rest/
|
|
244
|
+
const expectedUrl = 'http://example.com/fina/rest/TFinaMethod/testMethod';
|
|
245
245
|
|
|
246
246
|
expect(getUrlApi(config, methodName, isPost)).toBe(expectedUrl);
|
|
247
247
|
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
get = function () {return {modelA: {}}}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{"menuName": "", "caption": "Home", "link": ["./main"],"subMenu": []},
|
|
3
|
-
{"menuName": "", "caption": "Personalia","link": [], "subMenu": [
|
|
4
|
-
{"menuName": "","caption": "Data Master","link": [], "subMenu": []},
|
|
5
|
-
{
|
|
6
|
-
"menuName": "",
|
|
7
|
-
"caption": "Gaji",
|
|
8
|
-
"link": [],
|
|
9
|
-
"subMenu": [
|
|
10
|
-
{
|
|
11
|
-
"menuName": "",
|
|
12
|
-
"caption": "Parameter",
|
|
13
|
-
"link": [
|
|
14
|
-
"./form",
|
|
15
|
-
"gajiparam",
|
|
16
|
-
null
|
|
17
|
-
],
|
|
18
|
-
"subMenu": []
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"menuName": "",
|
|
22
|
-
"caption": "Perubahan",
|
|
23
|
-
"link": [],
|
|
24
|
-
"subMenu": [
|
|
25
|
-
{
|
|
26
|
-
"menuName": "",
|
|
27
|
-
"caption": "Form Perubahan Gaji",
|
|
28
|
-
"link": [
|
|
29
|
-
"./form",
|
|
30
|
-
"gajiubah",
|
|
31
|
-
null
|
|
32
|
-
],
|
|
33
|
-
"subMenu": []
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"menuName": "",
|
|
37
|
-
"caption": "Daftar Perubahan Gaji",
|
|
38
|
-
"link": [
|
|
39
|
-
"./list",
|
|
40
|
-
"gajiubahdaftar"
|
|
41
|
-
],
|
|
42
|
-
"subMenu": []
|
|
43
|
-
}
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
]
|
|
47
|
-
}
|
|
48
|
-
]}
|
|
49
|
-
]
|