aviation-chart 2.0.27 → 2.0.28

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/dist/nav-sdk.d.ts CHANGED
@@ -49,7 +49,7 @@ declare class GlobalConfigManager {
49
49
  reset(): void;
50
50
  setPeriod(period: string): void;
51
51
  getPeriod(): string | undefined;
52
- generateCurrentPeriod(): Promise<string>;
52
+ generateCurrentPeriod(apiUrl?: string): Promise<string>;
53
53
  setMapReinitCallback(callback: (() => void | Promise<void>) | null): void;
54
54
  destroy(): void;
55
55
  }
@@ -3458,8 +3458,8 @@ class GlobalConfigManager {
3458
3458
  getPeriod() {
3459
3459
  return this.config.period;
3460
3460
  }
3461
- async generateCurrentPeriod() {
3462
- const base = (this.config.apiUrl || "https://aips.siniswift.com").replace(/\/$/, "");
3461
+ async generateCurrentPeriod(apiUrl) {
3462
+ const base = (apiUrl || this.config.apiUrl || "https://aips.siniswift.com").replace(/\/$/, "");
3463
3463
  const headers = this.config.apiKey
3464
3464
  ? { "X-Api-Key": this.config.apiKey }
3465
3465
  : {};
@@ -10524,7 +10524,7 @@ class MapSDK {
10524
10524
  this.setPeriod(options.period);
10525
10525
  }
10526
10526
  else {
10527
- const calculatedPeriod = await this.globalConfig.generateCurrentPeriod();
10527
+ const calculatedPeriod = await this.globalConfig.generateCurrentPeriod(this._chartApiUrl);
10528
10528
  this.setPeriod(calculatedPeriod);
10529
10529
  }
10530
10530
  this.initializeManagers();
@@ -10963,7 +10963,7 @@ class MapSDK {
10963
10963
  return this.globalConfig.getPeriod();
10964
10964
  }
10965
10965
  async generateCurrentPeriod() {
10966
- return await this.globalConfig.generateCurrentPeriod();
10966
+ return await this.globalConfig.generateCurrentPeriod(this._chartApiUrl);
10967
10967
  }
10968
10968
  async search(params) {
10969
10969
  const auth = await this._apiAuth();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aviation-chart",
3
- "version": "2.0.27",
3
+ "version": "2.0.28",
4
4
  "description": "KunYu aviation map SDK",
5
5
  "main": "dist/nav-sdk.esm.js",
6
6
  "module": "dist/nav-sdk.esm.js",