@etsoo/appscript 1.2.45 → 1.2.46

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.
@@ -121,7 +121,7 @@ class CoreApp {
121
121
  CoreApp.deviceIdField,
122
122
  this.addIdentifier(CoreApp.devicePassphraseField),
123
123
  CoreApp.serversideDeviceIdField,
124
- CoreApp.headerTokenField
124
+ this.addIdentifier(CoreApp.headerTokenField)
125
125
  ];
126
126
  }
127
127
  getDeviceId() {
@@ -130,7 +130,7 @@ class CoreApp {
130
130
  resetKeys() {
131
131
  this.storage.clear([
132
132
  this.addIdentifier(CoreApp.devicePassphraseField),
133
- CoreApp.headerTokenField,
133
+ this.addIdentifier(CoreApp.headerTokenField),
134
134
  CoreApp.serversideDeviceIdField
135
135
  ], false);
136
136
  this.passphrase = '';
@@ -354,7 +354,7 @@ class CoreApp {
354
354
  * @returns Fields
355
355
  */
356
356
  initCallEncryptedUpdateFields() {
357
- return [CoreApp.headerTokenField];
357
+ return [this.addIdentifier(CoreApp.headerTokenField)];
358
358
  }
359
359
  /**
360
360
  * Alert action result
@@ -379,7 +379,7 @@ class CoreApp {
379
379
  if (refreshToken !== '') {
380
380
  if (refreshToken != null)
381
381
  refreshToken = this.encrypt(refreshToken);
382
- this.storage.setData(CoreApp.headerTokenField, refreshToken);
382
+ this.storage.setData(this.addIdentifier(CoreApp.headerTokenField), refreshToken);
383
383
  }
384
384
  // Reset tryLogin state
385
385
  this._isTryingLogin = false;
@@ -459,7 +459,7 @@ class CoreApp {
459
459
  */
460
460
  clearCacheToken() {
461
461
  this.cachedRefreshToken = undefined;
462
- this.storage.setPersistedData(CoreApp.headerTokenField, undefined);
462
+ this.storage.setPersistedData(this.addIdentifier(CoreApp.headerTokenField), undefined);
463
463
  }
464
464
  /**
465
465
  * Decrypt message
@@ -714,7 +714,7 @@ class CoreApp {
714
714
  // Temp refresh token
715
715
  if (this.cachedRefreshToken)
716
716
  return this.cachedRefreshToken;
717
- return this.storage.getData(CoreApp.headerTokenField);
717
+ return this.storage.getData(this.addIdentifier(CoreApp.headerTokenField));
718
718
  }
719
719
  /**
720
720
  * Get all regions
@@ -118,7 +118,7 @@ export class CoreApp {
118
118
  CoreApp.deviceIdField,
119
119
  this.addIdentifier(CoreApp.devicePassphraseField),
120
120
  CoreApp.serversideDeviceIdField,
121
- CoreApp.headerTokenField
121
+ this.addIdentifier(CoreApp.headerTokenField)
122
122
  ];
123
123
  }
124
124
  getDeviceId() {
@@ -127,7 +127,7 @@ export class CoreApp {
127
127
  resetKeys() {
128
128
  this.storage.clear([
129
129
  this.addIdentifier(CoreApp.devicePassphraseField),
130
- CoreApp.headerTokenField,
130
+ this.addIdentifier(CoreApp.headerTokenField),
131
131
  CoreApp.serversideDeviceIdField
132
132
  ], false);
133
133
  this.passphrase = '';
@@ -351,7 +351,7 @@ export class CoreApp {
351
351
  * @returns Fields
352
352
  */
353
353
  initCallEncryptedUpdateFields() {
354
- return [CoreApp.headerTokenField];
354
+ return [this.addIdentifier(CoreApp.headerTokenField)];
355
355
  }
356
356
  /**
357
357
  * Alert action result
@@ -376,7 +376,7 @@ export class CoreApp {
376
376
  if (refreshToken !== '') {
377
377
  if (refreshToken != null)
378
378
  refreshToken = this.encrypt(refreshToken);
379
- this.storage.setData(CoreApp.headerTokenField, refreshToken);
379
+ this.storage.setData(this.addIdentifier(CoreApp.headerTokenField), refreshToken);
380
380
  }
381
381
  // Reset tryLogin state
382
382
  this._isTryingLogin = false;
@@ -456,7 +456,7 @@ export class CoreApp {
456
456
  */
457
457
  clearCacheToken() {
458
458
  this.cachedRefreshToken = undefined;
459
- this.storage.setPersistedData(CoreApp.headerTokenField, undefined);
459
+ this.storage.setPersistedData(this.addIdentifier(CoreApp.headerTokenField), undefined);
460
460
  }
461
461
  /**
462
462
  * Decrypt message
@@ -711,7 +711,7 @@ export class CoreApp {
711
711
  // Temp refresh token
712
712
  if (this.cachedRefreshToken)
713
713
  return this.cachedRefreshToken;
714
- return this.storage.getData(CoreApp.headerTokenField);
714
+ return this.storage.getData(this.addIdentifier(CoreApp.headerTokenField));
715
715
  }
716
716
  /**
717
717
  * Get all regions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.2.45",
3
+ "version": "1.2.46",
4
4
  "description": "Applications shared TypeScript framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -635,7 +635,7 @@ export abstract class CoreApp<
635
635
  CoreApp.deviceIdField,
636
636
  this.addIdentifier(CoreApp.devicePassphraseField),
637
637
  CoreApp.serversideDeviceIdField,
638
- CoreApp.headerTokenField
638
+ this.addIdentifier(CoreApp.headerTokenField)
639
639
  ];
640
640
  }
641
641
 
@@ -685,7 +685,7 @@ export abstract class CoreApp<
685
685
  this.storage.clear(
686
686
  [
687
687
  this.addIdentifier(CoreApp.devicePassphraseField),
688
- CoreApp.headerTokenField,
688
+ this.addIdentifier(CoreApp.headerTokenField),
689
689
  CoreApp.serversideDeviceIdField
690
690
  ],
691
691
  false
@@ -969,7 +969,7 @@ export abstract class CoreApp<
969
969
  * @returns Fields
970
970
  */
971
971
  protected initCallEncryptedUpdateFields(): string[] {
972
- return [CoreApp.headerTokenField];
972
+ return [this.addIdentifier(CoreApp.headerTokenField)];
973
973
  }
974
974
 
975
975
  /**
@@ -997,7 +997,10 @@ export abstract class CoreApp<
997
997
  // Cover the current value
998
998
  if (refreshToken !== '') {
999
999
  if (refreshToken != null) refreshToken = this.encrypt(refreshToken);
1000
- this.storage.setData(CoreApp.headerTokenField, refreshToken);
1000
+ this.storage.setData(
1001
+ this.addIdentifier(CoreApp.headerTokenField),
1002
+ refreshToken
1003
+ );
1001
1004
  }
1002
1005
 
1003
1006
  // Reset tryLogin state
@@ -1096,7 +1099,10 @@ export abstract class CoreApp<
1096
1099
  */
1097
1100
  clearCacheToken() {
1098
1101
  this.cachedRefreshToken = undefined;
1099
- this.storage.setPersistedData(CoreApp.headerTokenField, undefined);
1102
+ this.storage.setPersistedData(
1103
+ this.addIdentifier(CoreApp.headerTokenField),
1104
+ undefined
1105
+ );
1100
1106
  }
1101
1107
 
1102
1108
  /**
@@ -1408,7 +1414,9 @@ export abstract class CoreApp<
1408
1414
  getCacheToken(): string | undefined {
1409
1415
  // Temp refresh token
1410
1416
  if (this.cachedRefreshToken) return this.cachedRefreshToken;
1411
- return this.storage.getData<string>(CoreApp.headerTokenField);
1417
+ return this.storage.getData<string>(
1418
+ this.addIdentifier(CoreApp.headerTokenField)
1419
+ );
1412
1420
  }
1413
1421
 
1414
1422
  /**