@pulsesync/yamusic-types 0.2.0 → 0.3.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.
@@ -49,15 +49,14 @@ export interface AddonModuleResolution {
49
49
  readonly descriptors: Readonly<Record<string, AddonModuleDescriptor>>;
50
50
  readonly errors: Readonly<Record<string, AddonModuleErrorCode>>;
51
51
  }
52
- export interface AddonModuleChallenge {
53
- readonly challenge: string;
54
- readonly moduleVersionId: string;
55
- readonly expiresAt: number;
52
+ export interface AddonModuleFetchContext {
53
+ readonly descriptor: AddonModuleDescriptor;
54
+ readonly signal: AbortSignal;
56
55
  }
57
56
  export interface AddonModuleLoadOptions {
58
- readonly authorize?: (challenge: AddonModuleChallenge) => Promise<string>;
57
+ fetch: (context: AddonModuleFetchContext) => Promise<Uint8Array>;
59
58
  }
60
59
  export interface AddonModules {
61
- load<T = unknown>(alias: string, options?: AddonModuleLoadOptions): Promise<T>;
62
- instantiateWasm<T = Readonly<Record<string, (...args: never[]) => unknown>>>(alias: string, options?: AddonModuleLoadOptions): Promise<T>;
60
+ load<T = unknown>(alias: string, options: AddonModuleLoadOptions): Promise<T>;
61
+ instantiateWasm<T = Readonly<Record<string, (...args: never[]) => unknown>>>(alias: string, options: AddonModuleLoadOptions): Promise<T>;
63
62
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulsesync/yamusic-types",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "TypeScript declaration package for PulseSync YaMusic addon development",
5
5
  "repository": {
6
6
  "type": "git",