@siredvin/typed-peripheral-create 0.1.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.
@@ -0,0 +1,9 @@
1
+ local function __TS__New(target, ...)
2
+ local instance = setmetatable({}, target.prototype)
3
+ instance:____constructor(...)
4
+ return instance
5
+ end
6
+
7
+ return {
8
+ __TS__New = __TS__New
9
+ }
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@siredvin/typed-peripheral-create",
3
+ "version": "0.1.0",
4
+ "description": "Typed peripheral library for Create peripherals",
5
+ "files": [
6
+ "./*.ts",
7
+ "./*.lua"
8
+ ],
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "author": "SirEdvin",
13
+ "license": "MIT",
14
+ "scripts": {
15
+ "test": "echo \"Error: no test specified\" && exit 1",
16
+ "build": "tstl",
17
+ "clean": "rm -f *.lua",
18
+ "lint": "eslint . --ext .ts,.js",
19
+ "depcheck": "depcheck"
20
+ },
21
+ "dependencies": {
22
+ "@siredvin/cc-types": "1.1.0",
23
+ "@siredvin/craftos-types": "1.2.0",
24
+ "@siredvin/api-types": "1.1.0",
25
+ "@jackmacwindows/lua-types": "^2.13.1",
26
+ "@siredvin/typed-peripheral-base": "0.4.0"
27
+ },
28
+ "devDependencies": {
29
+ "typescript-to-lua": "*",
30
+ "typescript": "*"
31
+ },
32
+ "nx": {
33
+ "targets": {
34
+ "lint": {
35
+ "executor": "@nx/linter:eslint",
36
+ "outputs": [
37
+ "{options.outputFile}"
38
+ ],
39
+ "options": {
40
+ "lintFilePatterns": [
41
+ "packages/typed-peripheral/**/*.{ts,tsx,js,jsx}"
42
+ ]
43
+ }
44
+ },
45
+ "depcheck": {
46
+ "executor": "nx:run-commands",
47
+ "options": {
48
+ "command": "depcheck",
49
+ "cwd": "packages/typed-peripheral"
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
package/packager.lua ADDED
@@ -0,0 +1,11 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local __TS__New = ____lualib.__TS__New
3
+ local ____exports = {}
4
+ local ____typed_2Dperipheral_2Dbase = require("@siredvin/typed-peripheral-base")
5
+ local IPeripheralProvider = ____typed_2Dperipheral_2Dbase.IPeripheralProvider
6
+ ____exports.packagerProvider = __TS__New(
7
+ IPeripheralProvider,
8
+ "Create_Packager",
9
+ function() return nil end
10
+ )
11
+ return ____exports
package/packager.ts ADDED
@@ -0,0 +1,13 @@
1
+ import { IPeripheralProvider } from "@siredvin/typed-peripheral-base";
2
+
3
+ /** @noSelf **/
4
+ export interface CreatePackager {
5
+ makePackage();
6
+ setAddress(address?: string);
7
+ getAddress(): string;
8
+ }
9
+
10
+ export const packagerProvider = new IPeripheralProvider<CreatePackager>(
11
+ "Create_Packager",
12
+ () => null
13
+ );