ahqstore-types 3.17.3 → 3.18.0

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/README.md CHANGED
@@ -1,7 +1,6 @@
1
- # ahqstore-types
1
+ # AHQ Store Types
2
2
 
3
- Types used by AHQ Store app
3
+ This is an internal crate and does not follow **SemVer** and any release is likely
4
+ to break.
4
5
 
5
- **NOTE:** This crate is used internally by AHQ Store Organisation projects for sharing the unified app schema and protocol signatures
6
-
7
- THIS CRATE DOES NOT FOLLOW SEMANTIC VERSIONING
6
+ > For internal use only
@@ -52,20 +52,6 @@ export enum WindowsInstallScope {
52
52
  }
53
53
  export type MapData = string[];
54
54
 
55
- export type AppId = string;
56
-
57
- export type RefId = number;
58
-
59
- export type AppStatus = "Pending" | "Downloading" | "AVScanning" | "Installing" | "Uninstalling" | "InstallSuccessful" | "UninstallSuccessful" | "NotSuccessful" | "AVFlagged";
60
-
61
- export type Str = string;
62
-
63
- export type AppData = [string, string];
64
-
65
- export type UpdateStatusReport = "Disabled" | "UpToDate" | "Checking" | "Updating";
66
-
67
- export type Success = boolean;
68
-
69
55
  /**
70
56
  *Use the official ahqstore (<https://crates.io/crates/ahqstore_cli_rs>) cli\nšŸŽÆ Introduced in v1, Revamped in v2
71
57
  */
@@ -111,9 +97,13 @@ export interface AHQStoreApplication {
111
97
  */
112
98
  repo: AppRepo;
113
99
  /**
114
- * Will be generated by the cli, it is the unique-version-hash of your app
100
+ * A version provided by the user, like AHQ Store CLI
101
+ */
102
+ usrVersion: string | null;
103
+ /**
104
+ * Will be automatically overriden
115
105
  */
116
- version: string;
106
+ version: number;
117
107
  /**
118
108
  * The Site to your app
119
109
  */
@@ -129,7 +119,7 @@ export interface AHQStoreApplication {
129
119
  */
130
120
  license_or_tos: string | null;
131
121
  /**
132
- * These Resources will be passed to the installer, the size of all the `Vec<u8>` must not be more than 5 * 1024 * 1024 * 1024 bytes (~5MB)
122
+ * These Resources will be passed to the installer, the size of all the `Vec<u8>` must not be more than 5 * 1024 * 1024 bytes (~5MiB)
133
123
  */
134
124
  resources: Record<number, number[]> | null;
135
125
  /**
@@ -138,6 +128,20 @@ export interface AHQStoreApplication {
138
128
  verified: boolean;
139
129
  }
140
130
 
131
+ export type AppId = string;
132
+
133
+ export type Str = string;
134
+
135
+ export type AppData = [string, string];
136
+
137
+ export type Success = boolean;
138
+
139
+ export type AppStatus = "Pending" | "Downloading" | "AVScanning" | "Installing" | "Uninstalling" | "InstallSuccessful" | "UninstallSuccessful" | "NotSuccessful" | "AVFlagged";
140
+
141
+ export type UpdateStatusReport = "Disabled" | "UpToDate" | "Checking" | "Updating";
142
+
143
+ export type RefId = number;
144
+
141
145
  export interface Commits {
142
146
  ahqstore: string;
143
147
  alt: string;
@@ -146,6 +150,7 @@ export interface Commits {
146
150
  export class AppRepo {
147
151
  private constructor();
148
152
  free(): void;
153
+ [Symbol.dispose](): void;
149
154
  /**
150
155
  * author must be your GitHub username or username of an org where you're a "visible" member
151
156
  */
@@ -155,6 +160,7 @@ export class AppRepo {
155
160
  export class DevData {
156
161
  private constructor();
157
162
  free(): void;
163
+ [Symbol.dispose](): void;
158
164
  get name(): string | undefined;
159
165
  set name(value: string | null | undefined);
160
166
  id: string;
@@ -166,6 +172,7 @@ export class DevData {
166
172
  export class DownloadUrl {
167
173
  private constructor();
168
174
  free(): void;
175
+ [Symbol.dispose](): void;
169
176
  installerType: InstallerFormat;
170
177
  asset: string;
171
178
  /**
@@ -176,11 +183,13 @@ export class DownloadUrl {
176
183
  export class GHRepoCommit {
177
184
  private constructor();
178
185
  free(): void;
186
+ [Symbol.dispose](): void;
179
187
  sha: string;
180
188
  }
181
189
  export class Hero {
182
190
  private constructor();
183
191
  free(): void;
192
+ [Symbol.dispose](): void;
184
193
  title: string;
185
194
  description: string;
186
195
  button: string;
@@ -191,6 +200,7 @@ export class Hero {
191
200
  export class Home {
192
201
  private constructor();
193
202
  free(): void;
203
+ [Symbol.dispose](): void;
194
204
  get splash(): Splash | undefined;
195
205
  set splash(value: Splash | null | undefined);
196
206
  home: HomeMapData;
@@ -200,12 +210,14 @@ export class Home {
200
210
  */
201
211
  export class HomeMapData {
202
212
  free(): void;
213
+ [Symbol.dispose](): void;
203
214
  constructor();
204
215
  readonly inner: any;
205
216
  }
206
217
  export class InstallerOptions {
207
218
  private constructor();
208
219
  free(): void;
220
+ [Symbol.dispose](): void;
209
221
  /**
210
222
  * šŸŽÆ Introduced in v1
211
223
  *
@@ -276,6 +288,7 @@ export class InstallerOptions {
276
288
  export class InstallerOptionsAndroid {
277
289
  private constructor();
278
290
  free(): void;
291
+ [Symbol.dispose](): void;
279
292
  /**
280
293
  * šŸŽÆ Introduced in v2
281
294
  *
@@ -291,6 +304,7 @@ export class InstallerOptionsAndroid {
291
304
  export class InstallerOptionsLinux {
292
305
  private constructor();
293
306
  free(): void;
307
+ [Symbol.dispose](): void;
294
308
  /**
295
309
  * šŸŽÆ Introduced in v2
296
310
  *
@@ -300,6 +314,7 @@ export class InstallerOptionsLinux {
300
314
  export class InstallerOptionsWindows {
301
315
  private constructor();
302
316
  free(): void;
317
+ [Symbol.dispose](): void;
303
318
  /**
304
319
  * šŸŽÆ Introduced in v2
305
320
  *
@@ -367,6 +382,7 @@ export class InstallerOptionsWindows {
367
382
  export class Prefs {
368
383
  private constructor();
369
384
  free(): void;
385
+ [Symbol.dispose](): void;
370
386
  static get(path: string): Uint8Array | undefined;
371
387
  static str_to(s: string): Prefs | undefined;
372
388
  convert(): string | undefined;
@@ -378,6 +394,7 @@ export class Prefs {
378
394
  export class SearchEntry {
379
395
  private constructor();
380
396
  free(): void;
397
+ [Symbol.dispose](): void;
381
398
  name: string;
382
399
  title: string;
383
400
  id: string;
@@ -385,6 +402,7 @@ export class SearchEntry {
385
402
  export class Semi {
386
403
  private constructor();
387
404
  free(): void;
405
+ [Symbol.dispose](): void;
388
406
  title: string;
389
407
  background: string;
390
408
  appId: string;
@@ -394,6 +412,7 @@ export class Semi {
394
412
  export class Splash {
395
413
  private constructor();
396
414
  free(): void;
415
+ [Symbol.dispose](): void;
397
416
  hero: Hero;
398
417
  subhero: SubHero;
399
418
  third: Semi;
@@ -402,6 +421,7 @@ export class Splash {
402
421
  export class SubHero {
403
422
  private constructor();
404
423
  free(): void;
424
+ [Symbol.dispose](): void;
405
425
  title: string;
406
426
  background: string;
407
427
  appId: string;
@@ -80,22 +80,18 @@ function getUint8ArrayMemory0() {
80
80
  return cachedUint8ArrayMemory0;
81
81
  }
82
82
 
83
- const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
83
+ const cachedTextEncoder = new TextEncoder();
84
84
 
85
- const cachedTextEncoder = new lTextEncoder('utf-8');
86
-
87
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
88
- ? function (arg, view) {
89
- return cachedTextEncoder.encodeInto(arg, view);
85
+ if (!('encodeInto' in cachedTextEncoder)) {
86
+ cachedTextEncoder.encodeInto = function (arg, view) {
87
+ const buf = cachedTextEncoder.encode(arg);
88
+ view.set(buf);
89
+ return {
90
+ read: arg.length,
91
+ written: buf.length
92
+ };
93
+ }
90
94
  }
91
- : function (arg, view) {
92
- const buf = cachedTextEncoder.encode(arg);
93
- view.set(buf);
94
- return {
95
- read: arg.length,
96
- written: buf.length
97
- };
98
- });
99
95
 
100
96
  function passStringToWasm0(arg, malloc, realloc) {
101
97
 
@@ -126,7 +122,7 @@ function passStringToWasm0(arg, malloc, realloc) {
126
122
  }
127
123
  ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
128
124
  const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
129
- const ret = encodeString(arg, view);
125
+ const ret = cachedTextEncoder.encodeInto(arg, view);
130
126
 
131
127
  offset += ret.written;
132
128
  ptr = realloc(ptr, len, offset, 1) >>> 0;
@@ -149,9 +145,7 @@ function isLikeNone(x) {
149
145
  return x === undefined || x === null;
150
146
  }
151
147
 
152
- const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
153
-
154
- let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
148
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
155
149
 
156
150
  cachedTextDecoder.decode();
157
151
 
@@ -160,7 +154,7 @@ let numBytesDecoded = 0;
160
154
  function decodeText(ptr, len) {
161
155
  numBytesDecoded += len;
162
156
  if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
163
- cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
157
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
164
158
  cachedTextDecoder.decode();
165
159
  numBytesDecoded = len;
166
160
  }
@@ -333,6 +327,7 @@ export class AppRepo {
333
327
  wasm.__wbg_set_apprepo_repo(this.__wbg_ptr, ptr0, len0);
334
328
  }
335
329
  }
330
+ if (Symbol.dispose) AppRepo.prototype[Symbol.dispose] = AppRepo.prototype.free;
336
331
 
337
332
  const DevDataFinalization = (typeof FinalizationRegistry === 'undefined')
338
333
  ? { register: () => {}, unregister: () => {} }
@@ -451,6 +446,7 @@ export class DevData {
451
446
  wasm.__wbg_set_devdata_verified(this.__wbg_ptr, arg0);
452
447
  }
453
448
  }
449
+ if (Symbol.dispose) DevData.prototype[Symbol.dispose] = DevData.prototype.free;
454
450
 
455
451
  const DownloadUrlFinalization = (typeof FinalizationRegistry === 'undefined')
456
452
  ? { register: () => {}, unregister: () => {} }
@@ -531,6 +527,7 @@ export class DownloadUrl {
531
527
  wasm.__wbg_set_apprepo_repo(this.__wbg_ptr, ptr0, len0);
532
528
  }
533
529
  }
530
+ if (Symbol.dispose) DownloadUrl.prototype[Symbol.dispose] = DownloadUrl.prototype.free;
534
531
 
535
532
  const GHRepoCommitFinalization = (typeof FinalizationRegistry === 'undefined')
536
533
  ? { register: () => {}, unregister: () => {} }
@@ -573,6 +570,7 @@ export class GHRepoCommit {
573
570
  wasm.__wbg_set_ghrepocommit_sha(this.__wbg_ptr, ptr0, len0);
574
571
  }
575
572
  }
573
+ if (Symbol.dispose) GHRepoCommit.prototype[Symbol.dispose] = GHRepoCommit.prototype.free;
576
574
 
577
575
  const HeroFinalization = (typeof FinalizationRegistry === 'undefined')
578
576
  ? { register: () => {}, unregister: () => {} }
@@ -738,6 +736,7 @@ export class Hero {
738
736
  wasm.__wbg_set_hero_appId(this.__wbg_ptr, ptr0, len0);
739
737
  }
740
738
  }
739
+ if (Symbol.dispose) Hero.prototype[Symbol.dispose] = Hero.prototype.free;
741
740
 
742
741
  const HomeFinalization = (typeof FinalizationRegistry === 'undefined')
743
742
  ? { register: () => {}, unregister: () => {} }
@@ -790,6 +789,7 @@ export class Home {
790
789
  wasm.__wbg_set_home_home(this.__wbg_ptr, ptr0);
791
790
  }
792
791
  }
792
+ if (Symbol.dispose) Home.prototype[Symbol.dispose] = Home.prototype.free;
793
793
 
794
794
  const HomeMapDataFinalization = (typeof FinalizationRegistry === 'undefined')
795
795
  ? { register: () => {}, unregister: () => {} }
@@ -832,6 +832,7 @@ export class HomeMapData {
832
832
  return ret;
833
833
  }
834
834
  }
835
+ if (Symbol.dispose) HomeMapData.prototype[Symbol.dispose] = HomeMapData.prototype.free;
835
836
 
836
837
  const InstallerOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
837
838
  ? { register: () => {}, unregister: () => {} }
@@ -985,6 +986,7 @@ export class InstallerOptions {
985
986
  wasm.__wbg_set_installeroptions_android(this.__wbg_ptr, ptr0);
986
987
  }
987
988
  }
989
+ if (Symbol.dispose) InstallerOptions.prototype[Symbol.dispose] = InstallerOptions.prototype.free;
988
990
 
989
991
  const InstallerOptionsAndroidFinalization = (typeof FinalizationRegistry === 'undefined')
990
992
  ? { register: () => {}, unregister: () => {} }
@@ -1062,6 +1064,7 @@ export class InstallerOptionsAndroid {
1062
1064
  wasm.__wbg_set_installeroptionsandroid_abi(this.__wbg_ptr, ptr0, len0);
1063
1065
  }
1064
1066
  }
1067
+ if (Symbol.dispose) InstallerOptionsAndroid.prototype[Symbol.dispose] = InstallerOptionsAndroid.prototype.free;
1065
1068
 
1066
1069
  const InstallerOptionsLinuxFinalization = (typeof FinalizationRegistry === 'undefined')
1067
1070
  ? { register: () => {}, unregister: () => {} }
@@ -1109,6 +1112,7 @@ export class InstallerOptionsLinux {
1109
1112
  wasm.__wbg_set_installeroptionslinux_assetId(this.__wbg_ptr, arg0);
1110
1113
  }
1111
1114
  }
1115
+ if (Symbol.dispose) InstallerOptionsLinux.prototype[Symbol.dispose] = InstallerOptionsLinux.prototype.free;
1112
1116
 
1113
1117
  const InstallerOptionsWindowsFinalization = (typeof FinalizationRegistry === 'undefined')
1114
1118
  ? { register: () => {}, unregister: () => {} }
@@ -1236,6 +1240,7 @@ export class InstallerOptionsWindows {
1236
1240
  wasm.__wbg_set_installeroptionswindows_installerArgs(this.__wbg_ptr, ptr0, len0);
1237
1241
  }
1238
1242
  }
1243
+ if (Symbol.dispose) InstallerOptionsWindows.prototype[Symbol.dispose] = InstallerOptionsWindows.prototype.free;
1239
1244
 
1240
1245
  const PrefsFinalization = (typeof FinalizationRegistry === 'undefined')
1241
1246
  ? { register: () => {}, unregister: () => {} }
@@ -1355,6 +1360,7 @@ export class Prefs {
1355
1360
  return Prefs.__wrap(ret);
1356
1361
  }
1357
1362
  }
1363
+ if (Symbol.dispose) Prefs.prototype[Symbol.dispose] = Prefs.prototype.free;
1358
1364
 
1359
1365
  const SearchEntryFinalization = (typeof FinalizationRegistry === 'undefined')
1360
1366
  ? { register: () => {}, unregister: () => {} }
@@ -1443,6 +1449,7 @@ export class SearchEntry {
1443
1449
  wasm.__wbg_set_hero_button(this.__wbg_ptr, ptr0, len0);
1444
1450
  }
1445
1451
  }
1452
+ if (Symbol.dispose) SearchEntry.prototype[Symbol.dispose] = SearchEntry.prototype.free;
1446
1453
 
1447
1454
  const SemiFinalization = (typeof FinalizationRegistry === 'undefined')
1448
1455
  ? { register: () => {}, unregister: () => {} }
@@ -1559,6 +1566,7 @@ export class Semi {
1559
1566
  wasm.__wbg_set_devdata_avatar_url(this.__wbg_ptr, ptr0, len0);
1560
1567
  }
1561
1568
  }
1569
+ if (Symbol.dispose) Semi.prototype[Symbol.dispose] = Semi.prototype.free;
1562
1570
 
1563
1571
  const SplashFinalization = (typeof FinalizationRegistry === 'undefined')
1564
1572
  ? { register: () => {}, unregister: () => {} }
@@ -1646,6 +1654,7 @@ export class Splash {
1646
1654
  wasm.__wbg_set_splash_fourth(this.__wbg_ptr, ptr0);
1647
1655
  }
1648
1656
  }
1657
+ if (Symbol.dispose) Splash.prototype[Symbol.dispose] = Splash.prototype.free;
1649
1658
 
1650
1659
  const SubHeroFinalization = (typeof FinalizationRegistry === 'undefined')
1651
1660
  ? { register: () => {}, unregister: () => {} }
@@ -1762,17 +1771,18 @@ export class SubHero {
1762
1771
  wasm.__wbg_set_devdata_avatar_url(this.__wbg_ptr, ptr0, len0);
1763
1772
  }
1764
1773
  }
1774
+ if (Symbol.dispose) SubHero.prototype[Symbol.dispose] = SubHero.prototype.free;
1765
1775
 
1766
- export function __wbg_new_e969dc3f68d25093() {
1776
+ export function __wbg_new_1f3a344cf3123716() {
1767
1777
  const ret = new Array();
1768
1778
  return ret;
1769
1779
  };
1770
1780
 
1771
- export function __wbg_set_d636a0463acf1dbc(arg0, arg1, arg2) {
1781
+ export function __wbg_set_90f6c0f7bd8c0415(arg0, arg1, arg2) {
1772
1782
  arg0[arg1 >>> 0] = arg2;
1773
1783
  };
1774
1784
 
1775
- export function __wbg_wbindgendebugstring_bb652b1bc2061b6d(arg0, arg1) {
1785
+ export function __wbg_wbindgendebugstring_99ef257a3ddda34d(arg0, arg1) {
1776
1786
  const ret = debugString(arg1);
1777
1787
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1778
1788
  const len1 = WASM_VECTOR_LEN;
@@ -1780,14 +1790,14 @@ export function __wbg_wbindgendebugstring_bb652b1bc2061b6d(arg0, arg1) {
1780
1790
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1781
1791
  };
1782
1792
 
1783
- export function __wbg_wbindgennumberget_d855f947247a3fbc(arg0, arg1) {
1793
+ export function __wbg_wbindgennumberget_f74b4c7525ac05cb(arg0, arg1) {
1784
1794
  const obj = arg1;
1785
1795
  const ret = typeof(obj) === 'number' ? obj : undefined;
1786
1796
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1787
1797
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1788
1798
  };
1789
1799
 
1790
- export function __wbg_wbindgenstringget_43fe05afe34b0cb1(arg0, arg1) {
1800
+ export function __wbg_wbindgenstringget_0f16a6ddddef376f(arg0, arg1) {
1791
1801
  const obj = arg1;
1792
1802
  const ret = typeof(obj) === 'string' ? obj : undefined;
1793
1803
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -1796,11 +1806,11 @@ export function __wbg_wbindgenstringget_43fe05afe34b0cb1(arg0, arg1) {
1796
1806
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1797
1807
  };
1798
1808
 
1799
- export function __wbg_wbindgenthrow_4c11a24fca429ccf(arg0, arg1) {
1809
+ export function __wbg_wbindgenthrow_451ec1a8469d7eb6(arg0, arg1) {
1800
1810
  throw new Error(getStringFromWasm0(arg0, arg1));
1801
1811
  };
1802
1812
 
1803
- export function __wbg_wbindgentryintonumber_c9e75d941453b6d7(arg0) {
1813
+ export function __wbg_wbindgentryintonumber_aef53fe1d23c5fd4(arg0) {
1804
1814
  let result;
1805
1815
  try { result = +arg0 } catch (e) { result = e }
1806
1816
  const ret = result;
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "ahqstore-types",
3
3
  "type": "module",
4
4
  "description": "Standard types used by AHQ Store",
5
- "version": "3.17.3",
5
+ "version": "3.18.0",
6
6
  "license": "SEE LICENSE IN ../LICENSE.md",
7
7
  "repository": {
8
8
  "type": "git",