@accelbyte/codegen 0.0.0-dev-20240911051006 → 0.0.0-dev-20240917090947
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.
|
@@ -1416,7 +1416,7 @@ var SwaggerReaderHelpers = class _SwaggerReaderHelpers {
|
|
|
1416
1416
|
};
|
|
1417
1417
|
|
|
1418
1418
|
// src/templates/template-api-index.ts
|
|
1419
|
-
var templateApiIndex = (
|
|
1419
|
+
var templateApiIndex = (serviceNameTitle, apiList) => {
|
|
1420
1420
|
let imports = "";
|
|
1421
1421
|
let returnStatement = "";
|
|
1422
1422
|
for (const cl of apiList) {
|
|
@@ -1430,9 +1430,17 @@ ${cl}, `;
|
|
|
1430
1430
|
* AUTO GENERATED
|
|
1431
1431
|
*/
|
|
1432
1432
|
${imports}
|
|
1433
|
+
import { author, name, version } from '../package.json'
|
|
1434
|
+
|
|
1435
|
+
console.log(\`\${name}@\${version}\`)
|
|
1433
1436
|
|
|
1434
1437
|
const apis = {
|
|
1435
1438
|
${returnStatement}
|
|
1439
|
+
version: () => console.log({
|
|
1440
|
+
version,
|
|
1441
|
+
name,
|
|
1442
|
+
author
|
|
1443
|
+
})
|
|
1436
1444
|
}
|
|
1437
1445
|
|
|
1438
1446
|
export const ${serviceNameTitle} = apis
|
|
@@ -1832,7 +1840,7 @@ var CodeGenerator = class _CodeGenerator {
|
|
|
1832
1840
|
};
|
|
1833
1841
|
generatePublicOrAdmin(true);
|
|
1834
1842
|
generatePublicOrAdmin(false);
|
|
1835
|
-
const apiIndexBuff = templateApiIndex(
|
|
1843
|
+
const apiIndexBuff = templateApiIndex(serviceNameTitle, mainApiList);
|
|
1836
1844
|
ParserUtils.writeApiMainFile(_CodeGenerator.srcFolder(), serviceNameTitle, apiIndexBuff);
|
|
1837
1845
|
console.log("\nCOMPLETED\n----------\n\n");
|
|
1838
1846
|
return { indexImports: indexImportsSet, queryImports: queryImportsSet };
|