@ayasofyazilim/saas 0.0.13 → 0.0.14
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/AccountService/schemas.gen.ts +11 -4
- package/AccountService/types.gen.ts +8 -0
- package/AdministrationService/schemas.gen.ts +11 -7
- package/AdministrationService/types.gen.ts +5 -0
- package/BackerService/BackerServiceClient.ts +44 -0
- package/BackerService/core/ApiError.ts +21 -0
- package/BackerService/core/ApiRequestOptions.ts +13 -0
- package/BackerService/core/ApiResult.ts +7 -0
- package/BackerService/core/BaseHttpRequest.ts +10 -0
- package/BackerService/core/CancelablePromise.ts +126 -0
- package/BackerService/core/FetchHttpRequest.ts +22 -0
- package/BackerService/core/OpenAPI.ts +56 -0
- package/BackerService/core/request.ts +341 -0
- package/BackerService/index.ts +9 -0
- package/BackerService/schemas.gen.ts +8991 -0
- package/BackerService/services.gen.ts +270 -0
- package/BackerService/types.gen.ts +6611 -0
- package/IdentityService/schemas.gen.ts +28 -10
- package/IdentityService/types.gen.ts +30 -0
- package/ProjectService/ProjectServiceClient.ts +3 -9
- package/ProjectService/schemas.gen.ts +26 -723
- package/ProjectService/services.gen.ts +8 -348
- package/ProjectService/types.gen.ts +36 -2252
- package/ProjectService.json +2937 -2937
- package/SaasService/schemas.gen.ts +5 -5
- package/SettingService/SettingServiceClient.ts +53 -53
- package/SettingService/core/ApiError.ts +20 -20
- package/SettingService/core/ApiRequestOptions.ts +12 -12
- package/SettingService/core/ApiResult.ts +6 -6
- package/SettingService/core/BaseHttpRequest.ts +9 -9
- package/SettingService/core/CancelablePromise.ts +125 -125
- package/SettingService/core/FetchHttpRequest.ts +21 -21
- package/SettingService/core/OpenAPI.ts +55 -55
- package/SettingService/core/request.ts +340 -340
- package/SettingService/index.ts +8 -8
- package/SettingService/schemas.gen.ts +1521 -1524
- package/SettingService/services.gen.ts +316 -316
- package/SettingService/types.gen.ts +980 -981
- package/generator.mjs +26 -2
- package/package.json +3 -2
- package/swagger.json +4794 -4794
package/generator.mjs
CHANGED
|
@@ -13,7 +13,12 @@ const api_list = [
|
|
|
13
13
|
{
|
|
14
14
|
input: "",
|
|
15
15
|
output: 'Project',
|
|
16
|
-
port:
|
|
16
|
+
port: 44325,
|
|
17
|
+
dereference: true
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
input: "swagger-json/Backer",
|
|
21
|
+
output: 'Backer',
|
|
17
22
|
dereference: true
|
|
18
23
|
},
|
|
19
24
|
{
|
|
@@ -43,6 +48,25 @@ function clean_URL(url) {
|
|
|
43
48
|
return url.replace(/\/\//g, '/').replace(/:\//g, '://');
|
|
44
49
|
}
|
|
45
50
|
|
|
51
|
+
function getCircularReplacer() {
|
|
52
|
+
const ancestors = [];
|
|
53
|
+
return function (key, value) {
|
|
54
|
+
if (typeof value !== "object" || value === null) {
|
|
55
|
+
return value;
|
|
56
|
+
}
|
|
57
|
+
// `this` is the object that value is contained in,
|
|
58
|
+
// i.e., its direct parent.
|
|
59
|
+
while (ancestors.length > 0 && ancestors.at(-1) !== this) {
|
|
60
|
+
ancestors.pop();
|
|
61
|
+
}
|
|
62
|
+
if (ancestors.includes(value)) {
|
|
63
|
+
return "[Circular]";
|
|
64
|
+
}
|
|
65
|
+
ancestors.push(value);
|
|
66
|
+
return value;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
46
70
|
for (const api of api_list) {
|
|
47
71
|
console.log(`✨ Processing ${api.output}...`);
|
|
48
72
|
const port = api?.port ? api.port : WEBGATEWAY_PORT;
|
|
@@ -53,7 +77,7 @@ for (const api of api_list) {
|
|
|
53
77
|
console.log(typeof swaggerText)
|
|
54
78
|
console.log(`🎁 Dereferencing ${api.output} is from ${apiURL} done.`);
|
|
55
79
|
temp_swagger = `temp_${api.output}_swagger.json`;
|
|
56
|
-
fs.writeFileSync(temp_swagger, JSON.stringify(swaggerText));
|
|
80
|
+
fs.writeFileSync(temp_swagger, JSON.stringify(swaggerText, getCircularReplacer()));
|
|
57
81
|
}
|
|
58
82
|
await createClient({
|
|
59
83
|
input: temp_swagger,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ayasofyazilim/saas",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"description": "Ayasofyazılım SAAS",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./AccountService": "./AccountService/index.ts",
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"./AdministrationService": "./AdministrationService/index.ts",
|
|
9
9
|
"./IdentityService": "./IdentityService/index.ts",
|
|
10
10
|
"./SaasService": "./SaasService/index.ts",
|
|
11
|
-
"./SettingService": "./SettingService/index.ts"
|
|
11
|
+
"./SettingService": "./SettingService/index.ts",
|
|
12
|
+
"./BackerService": "./BackerService/index.ts"
|
|
12
13
|
},
|
|
13
14
|
"scripts": {
|
|
14
15
|
"gen:all": "node generator.mjs",
|