bruce-models 4.3.8 → 4.3.9

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.
@@ -1334,18 +1334,20 @@
1334
1334
  this.loadCancelled = false;
1335
1335
  // Indicates if loading the regional configuration was already called.
1336
1336
  this.configLoadAttempted = false;
1337
- let { accountId, env, guardian, loadRegionalBaseUrl, loadConfig, loadWebSocket } = params;
1337
+ let { accountId, env, guardian, loadRegionalBaseUrl, loadConfig, loadWebSocket, dummy } = params;
1338
1338
  this.accountId = accountId;
1339
1339
  this.env = env !== null && env !== void 0 ? env : exports.Api.EEnv.PROD;
1340
- // Backwards compatibility.
1341
- if (loadRegionalBaseUrl) {
1342
- loadConfig = true;
1343
- }
1344
- if (loadConfig) {
1345
- // Mark it as attempted right away because we don't want any external calls while it gets to that async point.
1346
- this.configLoadAttempted = true;
1340
+ if (!dummy) {
1341
+ // Backwards compatibility.
1342
+ if (loadRegionalBaseUrl) {
1343
+ loadConfig = true;
1344
+ }
1345
+ if (loadConfig) {
1346
+ // Mark it as attempted right away because we don't want any external calls while it gets to that async point.
1347
+ this.configLoadAttempted = true;
1348
+ }
1349
+ this.loadProm = this.init(guardian, loadConfig, loadWebSocket);
1347
1350
  }
1348
- this.loadProm = this.init(guardian, loadConfig, loadWebSocket);
1349
1351
  }
1350
1352
  /**
1351
1353
  * Loads regional base url and sets up message broker.
@@ -8009,7 +8011,14 @@
8009
8011
  if (!api) {
8010
8012
  api = exports.ENVIRONMENT.Api().GetBruceApi();
8011
8013
  }
8012
- const urlSuffix = file.FileExt ? `file/${file.ID}${file.FileExt}` : `file/${file.ID}`;
8014
+ let ext = file.FileExt;
8015
+ if (!ext && file.OriginalFileName && file.OriginalFileName.includes(".")) {
8016
+ ext = file.OriginalFileName.split(".").pop();
8017
+ }
8018
+ if (ext && !ext.startsWith(".")) {
8019
+ ext = "." + ext;
8020
+ }
8021
+ const urlSuffix = ext ? `file/${file.ID}${ext}` : `file/${file.ID}`;
8013
8022
  const cdnUrl = viaCdn ? api.ConstructCdnUrl(urlSuffix) : null;
8014
8023
  if (cdnUrl) {
8015
8024
  return cdnUrl;
@@ -13079,7 +13088,7 @@
13079
13088
  })(exports.DataSource || (exports.DataSource = {}));
13080
13089
 
13081
13090
  // This is updated with the package.json version on build.
13082
- const VERSION = "4.3.8";
13091
+ const VERSION = "4.3.9";
13083
13092
 
13084
13093
  exports.VERSION = VERSION;
13085
13094
  exports.AbstractApi = AbstractApi;