@siredvin/typed-peripheral-ap 0.1.0 → 0.2.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/meBridge.d.ts ADDED
@@ -0,0 +1,24 @@
1
+ import { IPeripheralProvider } from "@siredvin/typed-peripheral-base";
2
+ export type APAE2Item = {
3
+ components: Array<any>;
4
+ count: number;
5
+ displayName: string;
6
+ fingerprint: string;
7
+ isCraftable: boolean;
8
+ maxStackSize: number;
9
+ name: string;
10
+ tags: Array<string>;
11
+ };
12
+ export type AE2Filter = {
13
+ name?: string;
14
+ components?: string | Map<String, any>;
15
+ fingerprint?: string;
16
+ count?: number;
17
+ };
18
+ /** @noSelf **/
19
+ export interface MEBridge extends IPeripheral {
20
+ getItem(filter: AE2Filter): LuaMultiReturn<[APAE2Item, null]> | LuaMultiReturn<[null, string]>;
21
+ getItems(filter?: AE2Filter): LuaMultiReturn<[Array<APAE2Item>, null]> | LuaMultiReturn<[null, string]>;
22
+ exportItem(filter: AE2Filter, target: string): LuaMultiReturn<[number, null]> | LuaMultiReturn<[null, string]>;
23
+ }
24
+ export declare const meBridgePeripheralProvider: IPeripheralProvider<MEBridge>;
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@siredvin/typed-peripheral-ap",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Typed peripheral library for Advanced Peripherals",
5
5
  "files": [
6
- "./*.ts",
6
+ "./*.d.ts",
7
7
  "./*.lua"
8
8
  ],
9
9
  "publishConfig": {
@@ -19,9 +19,9 @@
19
19
  "depcheck": "depcheck"
20
20
  },
21
21
  "dependencies": {
22
- "@siredvin/cc-types": "1.1.0",
23
- "@siredvin/craftos-types": "1.2.0",
24
- "@siredvin/api-types": "1.1.0",
22
+ "@siredvin/cc-types": "1.2.0",
23
+ "@siredvin/craftos-types": "1.3.0",
24
+ "@siredvin/api-types": "1.2.0",
25
25
  "@jackmacwindows/lua-types": "^2.13.1",
26
26
  "@siredvin/typed-peripheral-base": "0.4.0"
27
27
  },
package/meBridge.ts DELETED
@@ -1,40 +0,0 @@
1
- import { IPeripheralProvider } from "@siredvin/typed-peripheral-base";
2
-
3
- export type APAE2Item = {
4
- components: Array<any>;
5
- count: number;
6
- displayName: string;
7
- fingerprint: string;
8
- isCraftable: boolean;
9
- maxStackSize: number;
10
- name: string;
11
- tags: Array<string>;
12
- };
13
-
14
- export type AE2Filter = {
15
- name?: string;
16
- components?: string | Map<String, any>;
17
- fingerprint?: string;
18
- count?: number;
19
- };
20
-
21
- /** @noSelf **/
22
- export interface MEBridge extends IPeripheral {
23
- getItem(
24
- filter: AE2Filter
25
- ): LuaMultiReturn<[APAE2Item, null]> | LuaMultiReturn<[null, string]>;
26
- getItems(
27
- filter?: AE2Filter
28
- ):
29
- | LuaMultiReturn<[Array<APAE2Item>, null]>
30
- | LuaMultiReturn<[null, string]>;
31
- exportItem(
32
- filter: AE2Filter,
33
- target: string
34
- ): LuaMultiReturn<[number, null]> | LuaMultiReturn<[null, string]>;
35
- }
36
-
37
- export const meBridgePeripheralProvider = new IPeripheralProvider<MEBridge>(
38
- "me_bridge",
39
- () => null
40
- );