@thi.ng/wasm-api-schedule 0.3.0 → 0.3.2

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2022-11-24T17:24:36Z
3
+ - **Last updated**: 2022-11-30T22:27:37Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -9,6 +9,15 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ### [0.3.2](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api-schedule@0.3.2) (2022-11-30)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - rename types/imports ([#368](https://github.com/thi-ng/umbrella/issues/368)) ([78d5795](https://github.com/thi-ng/umbrella/commit/78d5795))
17
+ - rename exports/imports interfaces => WasmScheduleExports/Imports
18
+ - update/rename zig imports
19
+ - update readme
20
+
12
21
  ## [0.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api-schedule@0.3.0) (2022-11-24)
13
22
 
14
23
  #### 🚀 Features
package/README.md CHANGED
@@ -36,8 +36,8 @@ cancelled via `cancel()`...
36
36
  Zig example:
37
37
 
38
38
  ```zig
39
- const wasm = @import("wasmapi");
40
- const schedule = @import("schedule");
39
+ const wasm = @import("wasm-api");
40
+ const schedule = @import("wasm-api-schedule");
41
41
 
42
42
  // ...
43
43
 
@@ -102,7 +102,7 @@ node --experimental-repl-await
102
102
  > const wasmApiSchedule = await import("@thi.ng/wasm-api-schedule");
103
103
  ```
104
104
 
105
- Package sizes (gzipped, pre-treeshake): ESM: 437 bytes
105
+ Package sizes (brotli'd, pre-treeshake): ESM: 400 bytes
106
106
 
107
107
  ## Dependencies
108
108
 
package/api.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import type { WasmExports } from "@thi.ng/wasm-api";
2
2
  import type { ScheduleType } from "./generated/api.js";
3
3
  export * from "./generated/api.js";
4
- export interface ScheduleExports extends WasmExports {
4
+ export interface WasmScheduleExports extends WasmExports {
5
5
  _schedule_init(): void;
6
6
  _schedule_callback(timerID: number, type: ScheduleType): void;
7
7
  }
8
- export interface ScheduleImports extends WebAssembly.ModuleImports {
8
+ export interface WasmScheduleImports extends WebAssembly.ModuleImports {
9
9
  /**
10
10
  * Schedules given callback of given kind.
11
11
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by @thi.ng/wasm-api-bindgen at 2022-11-23T12:10:08.505Z
2
+ * Generated by @thi.ng/wasm-api-bindgen at 2022-11-30T15:23:27.746Z
3
3
  * DO NOT EDIT!
4
4
  */
5
5
  export declare enum ScheduleType {
package/generated/api.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by @thi.ng/wasm-api-bindgen at 2022-11-23T12:10:08.505Z
2
+ * Generated by @thi.ng/wasm-api-bindgen at 2022-11-30T15:23:27.746Z
3
3
  * DO NOT EDIT!
4
4
  */
5
5
  // @ts-ignore possibly includes unused imports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/wasm-api-schedule",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Delayed & scheduled function execution (via setTimeout() etc.) for hybrid WASM apps",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -35,13 +35,13 @@
35
35
  "test": "testament test"
36
36
  },
37
37
  "dependencies": {
38
- "@thi.ng/api": "^8.4.6",
39
- "@thi.ng/wasm-api": "^1.0.1",
40
- "@thi.ng/wasm-api-bindgen": "^0.2.0"
38
+ "@thi.ng/api": "^8.5.1",
39
+ "@thi.ng/wasm-api": "^1.1.1",
40
+ "@thi.ng/wasm-api-bindgen": "^0.2.2"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@microsoft/api-extractor": "^7.33.5",
44
- "@thi.ng/testament": "^0.3.5",
44
+ "@thi.ng/testament": "^0.3.6",
45
45
  "rimraf": "^3.0.2",
46
46
  "tools": "^0.0.1",
47
47
  "typedoc": "^0.23.20",
@@ -92,5 +92,5 @@
92
92
  "status": "alpha",
93
93
  "year": 2022
94
94
  },
95
- "gitHead": "75263a53b4601b62163253b11deabfd304bcc67d\n"
95
+ "gitHead": "1fe40da507070653f420156d91e6b27cf682004f\n"
96
96
  }
package/schedule.d.ts CHANGED
@@ -1,18 +1,18 @@
1
1
  import type { IWasmAPI, WasmBridge } from "@thi.ng/wasm-api";
2
- import { ScheduleExports, ScheduleImports, ScheduleType } from "./api.js";
2
+ import { ScheduleType, WasmScheduleExports, WasmScheduleImports } from "./api.js";
3
3
  /** @internal */
4
4
  interface ScheduledCall {
5
5
  id: number;
6
6
  timeout: any;
7
7
  kind: ScheduleType;
8
8
  }
9
- export declare class WasmSchedule implements IWasmAPI<ScheduleExports> {
9
+ export declare class WasmSchedule implements IWasmAPI<WasmScheduleExports> {
10
10
  static readonly id = "schedule";
11
- parent: WasmBridge<ScheduleExports>;
11
+ parent: WasmBridge<WasmScheduleExports>;
12
12
  listeners: Record<number, ScheduledCall>;
13
13
  get id(): string;
14
- init(parent: WasmBridge<ScheduleExports>): Promise<boolean>;
15
- getImports(): ScheduleImports;
14
+ init(parent: WasmBridge<WasmScheduleExports>): Promise<boolean>;
15
+ getImports(): WasmScheduleImports;
16
16
  }
17
17
  export {};
18
18
  //# sourceMappingURL=schedule.d.ts.map
package/schedule.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ScheduleType } from "./api.js";
1
+ import { ScheduleType, } from "./api.js";
2
2
  const START = {
3
3
  [ScheduleType.ONCE]: setTimeout,
4
4
  [ScheduleType.INTERVAL]: setInterval,
package/zig/api.zig CHANGED
@@ -1,8 +1,8 @@
1
- //! Generated by @thi.ng/wasm-api-bindgen at 2022-11-23T12:10:08.507Z
1
+ //! Generated by @thi.ng/wasm-api-bindgen at 2022-11-30T15:23:27.748Z
2
2
  //! DO NOT EDIT!
3
3
 
4
4
  const std = @import("std");
5
- const wasm = @import("wasmapi");
5
+ const bindgen = @import("wasm-api-bindgen");
6
6
 
7
7
  pub const ScheduleType = enum(i32) {
8
8
  /// One-off execution in the future
package/zig/lib.zig CHANGED
@@ -1,7 +1,6 @@
1
1
  const std = @import("std");
2
- const wasm = @import("wasmapi");
2
+ const wasm = @import("wasm-api");
3
3
  const api = @import("api.zig");
4
- const ManagedIndex = @import("wasmapi").ManagedIndex;
5
4
 
6
5
  pub usingnamespace api;
7
6
 
@@ -19,12 +18,12 @@ pub const ScheduledCall = struct {
19
18
  ctx: ?*anyopaque = null,
20
19
  };
21
20
 
22
- var calls: ManagedIndex(ScheduledCall, u16) = undefined;
21
+ var calls: wasm.ManagedIndex(ScheduledCall, u16) = undefined;
23
22
 
24
23
  /// Initializes the API module. MUST be called before using any of the other
25
24
  /// functions provided here.
26
25
  pub fn init(allocator: std.mem.Allocator) void {
27
- calls = ManagedIndex(ScheduledCall, u16).init(allocator);
26
+ calls = wasm.ManagedIndex(ScheduledCall, u16).init(allocator);
28
27
  }
29
28
 
30
29
  /// Auto-initialization hook called from JS when the module initializes