@accelbyte/codegen 0.0.0-dev-20240911051006 → 0.0.0-dev-20240912075533
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.
|
@@ -1438,7 +1438,7 @@ var SwaggerReaderHelpers = class _SwaggerReaderHelpers {
|
|
|
1438
1438
|
};
|
|
1439
1439
|
|
|
1440
1440
|
// src/templates/template-api-index.ts
|
|
1441
|
-
var templateApiIndex = (
|
|
1441
|
+
var templateApiIndex = (serviceNameTitle, apiList) => {
|
|
1442
1442
|
let imports = "";
|
|
1443
1443
|
let returnStatement = "";
|
|
1444
1444
|
for (const cl of apiList) {
|
|
@@ -1452,9 +1452,17 @@ ${cl}, `;
|
|
|
1452
1452
|
* AUTO GENERATED
|
|
1453
1453
|
*/
|
|
1454
1454
|
${imports}
|
|
1455
|
+
import { author, name, version } from '../package.json'
|
|
1456
|
+
|
|
1457
|
+
console.log(\`\${name}@\${version}\`)
|
|
1455
1458
|
|
|
1456
1459
|
const apis = {
|
|
1457
1460
|
${returnStatement}
|
|
1461
|
+
version: () => console.log({
|
|
1462
|
+
version,
|
|
1463
|
+
name,
|
|
1464
|
+
author
|
|
1465
|
+
})
|
|
1458
1466
|
}
|
|
1459
1467
|
|
|
1460
1468
|
export const ${serviceNameTitle} = apis
|
|
@@ -1854,7 +1862,7 @@ var CodeGenerator = class _CodeGenerator {
|
|
|
1854
1862
|
};
|
|
1855
1863
|
generatePublicOrAdmin(true);
|
|
1856
1864
|
generatePublicOrAdmin(false);
|
|
1857
|
-
const apiIndexBuff = templateApiIndex(
|
|
1865
|
+
const apiIndexBuff = templateApiIndex(serviceNameTitle, mainApiList);
|
|
1858
1866
|
ParserUtils.writeApiMainFile(_CodeGenerator.srcFolder(), serviceNameTitle, apiIndexBuff);
|
|
1859
1867
|
console.log("\nCOMPLETED\n----------\n\n");
|
|
1860
1868
|
return { indexImports: indexImportsSet, queryImports: queryImportsSet };
|