@accelbyte/codegen 0.0.0-dev-20260422072053 → 0.0.0-rc-20260511021900

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.
@@ -93,7 +93,7 @@ var CodegenConfig = class _CodegenConfig {
93
93
  return _CodegenConfig.config.overrideAsAny;
94
94
  }
95
95
  static splitOutputByServiceName() {
96
- return _CodegenConfig.config.unstable_splitOutputByServiceName ?? false;
96
+ return _CodegenConfig.config.splitOutputByServiceName ?? false;
97
97
  }
98
98
  /** Reset to defaults — used for testing */
99
99
  static reset() {
@@ -2028,8 +2028,8 @@ var CodeGenerator = class _CodeGenerator {
2028
2028
 
2029
2029
  // src/SwaggerDownloader.ts
2030
2030
  import * as fs6 from "fs";
2031
- import * as https from "https";
2032
2031
  import * as path6 from "path";
2032
+ import axios from "axios";
2033
2033
  var SwaggerDownloader = class _SwaggerDownloader {
2034
2034
  static getDestFile = (targetFileName) => {
2035
2035
  const destPath = CliParser.getResolvedSwaggersOutputPath();
@@ -2058,27 +2058,14 @@ var SwaggerDownloader = class _SwaggerDownloader {
2058
2058
  };
2059
2059
  static downloadFile = async (targetFileName, url) => {
2060
2060
  const destFile = _SwaggerDownloader.getDestFile(targetFileName);
2061
- let data = "";
2062
- return new Promise((resolve2) => {
2063
- const request = https.get(url, function(response) {
2064
- response.on("data", (chunk) => {
2065
- data += chunk;
2066
- });
2067
- response.on("end", () => {
2068
- if (response.statusCode !== 200) {
2069
- console.log(`SwaggerDownload error with status code: ${response.statusCode}`);
2070
- } else {
2071
- fs6.writeFileSync(destFile, JSON.stringify(JSON.parse(data), null, 2), "utf-8");
2072
- _SwaggerDownloader.postSanitizeDownloadedFile(destFile);
2073
- console.log(`SwaggerDownload ${url} completed with status code: ${response.statusCode}`);
2074
- }
2075
- resolve2(void 0);
2076
- });
2077
- });
2078
- request.on("error", (err) => {
2079
- console.log(`SwaggerDownloader failed for "${targetFileName}" and "${url}"`, err);
2080
- });
2081
- });
2061
+ try {
2062
+ const response = await axios.get(url);
2063
+ fs6.writeFileSync(destFile, JSON.stringify(response.data, null, 2), "utf-8");
2064
+ _SwaggerDownloader.postSanitizeDownloadedFile(destFile);
2065
+ console.log(`SwaggerDownload ${url} completed with status code: ${response.status}`);
2066
+ } catch (err) {
2067
+ console.log(`SwaggerDownloader failed for "${targetFileName}" and "${url}"`, err);
2068
+ }
2082
2069
  };
2083
2070
  static main = async () => {
2084
2071
  const swaggers = CliParser.getConfigFile();