forked from nutshimit/mashin_provider_starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmod.ts
76 lines (68 loc) · 3.02 KB
/
mod.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/* -------------------------------------------------------- *\
* *
* ███╗░░░███╗░█████╗░░██████╗██╗░░██╗██╗███╗░░██╗ *
* ████╗░████║██╔══██╗██╔════╝██║░░██║██║████╗░██║ *
* ██╔████╔██║███████║╚█████╗░███████║██║██╔██╗██║ *
* ██║╚██╔╝██║██╔══██║░╚═══██╗██╔══██║██║██║╚████║ *
* ██║░╚═╝░██║██║░░██║██████╔╝██║░░██║██║██║░╚███║ *
* ╚═╝░░░░░╚═╝╚═╝░░╚═╝╚═════╝░╚═╝░░╚═╝╚═╝╚═╝░░╚══╝ *
* by Nutshimit *
* -------------------------------------------------------- *
* *
* This file is generated automatically by mashin. *
* Do not edit manually. *
* *
\* ---------------------------------------------------------*/
import * as resource from "https://mashin.land/sdk/resource.ts";
import { Inputs, Outputs } from "https://mashin.land/sdk/output.ts";
import { getFileName } from "https://mashin.land/sdk/download.ts";
export const VERSION = "0.1.0";
const LOCAL_PATH = Deno.env.get("LOCAL_PLUGIN")
? "./target/debug/libmashin_provider_starter.dylib"
: await globalThis.__mashin.downloadProvider(
"github",
new URL(
getFileName("mashin_provider_starter"),
`https://github.com/nutshimit/mashin_provider_starter/releases/download/v${VERSION}/`
).toString()
);
export interface MyResourceConfig extends Inputs {
myKey: string | undefined | null;
}
export interface MyResourceOutputs extends Outputs {
myKey: string | undefined | null;
mySensitiveKey: string | undefined | null;
}
export class MyResource<T extends Lowercase<string>> extends resource.Resource<
MyResourceOutputs,
T
> {
#props: MyResourceConfig;
constructor(
name: resource.ResourceName<T>,
props: MyResourceConfig,
opts: resource.ResourceOptions
) {
super(name, "my_module:my_resource", props, opts);
this.#props = props;
}
get props() {
return this.#props;
}
}
/**
* This is my provider config
**/
export interface Config extends Inputs {
/**
* This is my key
**/
myKey: string | undefined | null;
}
export class Provider extends resource.Provider {
constructor(name: string, args?: Config) {
// FIXME: have dynamic provider path for each OS
super(name, LOCAL_PATH, args);
}
}
// 15819527346317364072