@taqueria/protocol 0.16.0 → 0.18.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/Alias.d.ts +48 -0
- package/Alias.js +70 -0
- package/Alias.js.map +1 -0
- package/Alias.mjs +34 -0
- package/Alias.mjs.map +1 -0
- package/Base.d.ts +50 -0
- package/Base.js +83 -0
- package/Base.js.map +1 -0
- package/Base.mjs +57 -0
- package/Base.mjs.map +1 -0
- package/Command.d.ts +30 -0
- package/Command.js +61 -0
- package/Command.js.map +1 -0
- package/Command.mjs +25 -0
- package/Command.mjs.map +1 -0
- package/Config.d.ts +2062 -0
- package/Config.js +175 -0
- package/Config.js.map +1 -0
- package/Config.mjs +135 -0
- package/Config.mjs.map +1 -0
- package/Contract.d.ts +88 -0
- package/Contract.js +68 -0
- package/Contract.js.map +1 -0
- package/Contract.mjs +32 -0
- package/Contract.mjs.map +1 -0
- package/Crypto.d.ts +5 -0
- package/Crypto.js +35 -0
- package/Crypto.js.map +1 -0
- package/Crypto.mjs +10 -0
- package/Crypto.mjs.map +1 -0
- package/EconomicalProtocolHash.d.ts +48 -0
- package/EconomicalProtocolHash.js +64 -0
- package/EconomicalProtocolHash.js.map +1 -0
- package/EconomicalProtocolHash.mjs +27 -0
- package/EconomicalProtocolHash.mjs.map +1 -0
- package/Environment.d.ts +142 -0
- package/Environment.js +78 -0
- package/Environment.js.map +1 -0
- package/Environment.mjs +40 -0
- package/Environment.mjs.map +1 -0
- package/EphemeralState.d.ts +4561 -0
- package/EphemeralState.js +268 -0
- package/EphemeralState.js.map +1 -0
- package/EphemeralState.mjs +228 -0
- package/EphemeralState.mjs.map +1 -0
- package/Faucet.d.ts +210 -0
- package/Faucet.js +84 -0
- package/Faucet.js.map +1 -0
- package/Faucet.mjs +47 -0
- package/Faucet.mjs.map +1 -0
- package/HumanReadableIdentifier.d.ts +30 -0
- package/HumanReadableIdentifier.js +61 -0
- package/HumanReadableIdentifier.js.map +1 -0
- package/HumanReadableIdentifier.mjs +25 -0
- package/HumanReadableIdentifier.mjs.map +1 -0
- package/InstalledPlugin.d.ts +99 -0
- package/InstalledPlugin.js +67 -0
- package/InstalledPlugin.js.map +1 -0
- package/InstalledPlugin.mjs +30 -0
- package/InstalledPlugin.mjs.map +1 -0
- package/LoadedConfig.d.ts +2325 -0
- package/LoadedConfig.js +80 -0
- package/LoadedConfig.js.map +1 -0
- package/LoadedConfig.mjs +41 -0
- package/LoadedConfig.mjs.map +1 -0
- package/MetadataConfig.d.ts +162 -0
- package/MetadataConfig.js +75 -0
- package/MetadataConfig.js.map +1 -0
- package/MetadataConfig.mjs +38 -0
- package/MetadataConfig.mjs.map +1 -0
- package/NetworkConfig.d.ts +431 -0
- package/NetworkConfig.js +77 -0
- package/NetworkConfig.js.map +1 -0
- package/NetworkConfig.mjs +40 -0
- package/NetworkConfig.mjs.map +1 -0
- package/Operation.d.ts +1476 -0
- package/Operation.js +98 -0
- package/Operation.js.map +1 -0
- package/Operation.mjs +60 -0
- package/Operation.mjs.map +1 -0
- package/Option.d.ts +316 -0
- package/Option.js +103 -0
- package/Option.js.map +1 -0
- package/Option.mjs +65 -0
- package/Option.mjs.map +1 -0
- package/ParsedOperation.d.ts +888 -0
- package/ParsedOperation.js +63 -0
- package/ParsedOperation.js.map +1 -0
- package/ParsedOperation.mjs +26 -0
- package/ParsedOperation.mjs.map +1 -0
- package/ParsedTemplate.d.ts +1032 -0
- package/ParsedTemplate.js +71 -0
- package/ParsedTemplate.js.map +1 -0
- package/ParsedTemplate.mjs +34 -0
- package/ParsedTemplate.mjs.map +1 -0
- package/PersistentState.d.ts +581 -0
- package/PersistentState.js +98 -0
- package/PersistentState.js.map +1 -0
- package/PersistentState.mjs +60 -0
- package/PersistentState.mjs.map +1 -0
- package/PluginActionName.d.ts +23 -0
- package/PluginActionName.js +48 -0
- package/PluginActionName.js.map +1 -0
- package/PluginActionName.mjs +23 -0
- package/PluginActionName.mjs.map +1 -0
- package/PluginDependenciesResponse.d.ts +158 -0
- package/PluginDependenciesResponse.js +63 -0
- package/PluginDependenciesResponse.js.map +1 -0
- package/PluginDependenciesResponse.mjs +28 -0
- package/PluginDependenciesResponse.mjs.map +1 -0
- package/PluginInfo.d.ts +3425 -0
- package/PluginInfo.js +113 -0
- package/PluginInfo.js.map +1 -0
- package/PluginInfo.mjs +76 -0
- package/PluginInfo.mjs.map +1 -0
- package/PluginJsonResponse.d.ts +104 -0
- package/PluginJsonResponse.js +59 -0
- package/PluginJsonResponse.js.map +1 -0
- package/PluginJsonResponse.mjs +25 -0
- package/PluginJsonResponse.mjs.map +1 -0
- package/PluginProxyResponse.d.ts +23 -0
- package/PluginProxyResponse.js +61 -0
- package/PluginProxyResponse.js.map +1 -0
- package/PluginProxyResponse.mjs +25 -0
- package/PluginProxyResponse.mjs.map +1 -0
- package/PluginResponseEncoding.d.ts +39 -0
- package/PluginResponseEncoding.js +63 -0
- package/PluginResponseEncoding.js.map +1 -0
- package/PluginResponseEncoding.mjs +27 -0
- package/PluginResponseEncoding.mjs.map +1 -0
- package/PluginSchema.d.ts +7332 -0
- package/PluginSchema.js +107 -0
- package/PluginSchema.js.map +1 -0
- package/PluginSchema.mjs +70 -0
- package/PluginSchema.mjs.map +1 -0
- package/PositionalArg.d.ts +190 -0
- package/PositionalArg.js +78 -0
- package/PositionalArg.js.map +1 -0
- package/PositionalArg.mjs +41 -0
- package/PositionalArg.mjs.map +1 -0
- package/Provisioner.d.ts +276 -0
- package/Provisioner.js +86 -0
- package/Provisioner.js.map +1 -0
- package/Provisioner.mjs +48 -0
- package/Provisioner.mjs.map +1 -0
- package/ProvisionerID.d.ts +48 -0
- package/ProvisionerID.js +61 -0
- package/ProvisionerID.js.map +1 -0
- package/ProvisionerID.mjs +24 -0
- package/ProvisionerID.mjs.map +1 -0
- package/Provisions.d.ts +244 -0
- package/Provisions.js +93 -0
- package/Provisions.js.map +1 -0
- package/Provisions.mjs +57 -0
- package/Provisions.mjs.map +1 -0
- package/PublicKeyHash.d.ts +49 -0
- package/PublicKeyHash.js +65 -0
- package/PublicKeyHash.js.map +1 -0
- package/PublicKeyHash.mjs +28 -0
- package/PublicKeyHash.mjs.map +1 -0
- package/RequestArgs.d.ts +5557 -0
- package/RequestArgs.js +136 -0
- package/RequestArgs.js.map +1 -0
- package/RequestArgs.mjs +89 -0
- package/RequestArgs.mjs.map +1 -0
- package/SHA256.d.ts +33 -0
- package/SHA256.js +79 -0
- package/SHA256.js.map +1 -0
- package/SHA256.mjs +42 -0
- package/SHA256.mjs.map +1 -0
- package/SandboxAccountConfig.d.ts +152 -0
- package/SandboxAccountConfig.js +72 -0
- package/SandboxAccountConfig.js.map +1 -0
- package/SandboxAccountConfig.mjs +35 -0
- package/SandboxAccountConfig.mjs.map +1 -0
- package/SandboxConfig.d.ts +550 -0
- package/SandboxConfig.js +103 -0
- package/SandboxConfig.js.map +1 -0
- package/SandboxConfig.mjs +66 -0
- package/SandboxConfig.mjs.map +1 -0
- package/SanitizedAbsPath.d.ts +48 -0
- package/SanitizedAbsPath.js +64 -0
- package/SanitizedAbsPath.js.map +1 -0
- package/SanitizedAbsPath.mjs +27 -0
- package/SanitizedAbsPath.mjs.map +1 -0
- package/SanitizedArgs.d.ts +2907 -0
- package/SanitizedArgs.js +269 -0
- package/SanitizedArgs.js.map +1 -0
- package/SanitizedArgs.mjs +197 -0
- package/SanitizedArgs.mjs.map +1 -0
- package/SanitizedPath.d.ts +30 -0
- package/SanitizedPath.js +64 -0
- package/SanitizedPath.js.map +1 -0
- package/SanitizedPath.mjs +28 -0
- package/SanitizedPath.mjs.map +1 -0
- package/ScaffoldConfig.d.ts +6 -0
- package/ScaffoldConfig.js +19 -0
- package/ScaffoldConfig.js.map +1 -0
- package/ScaffoldConfig.mjs +1 -0
- package/ScaffoldConfig.mjs.map +1 -0
- package/Settings.d.ts +82 -0
- package/Settings.js +66 -0
- package/Settings.js.map +1 -0
- package/Settings.mjs +29 -0
- package/Settings.mjs.map +1 -0
- package/SingleChar.d.ts +48 -0
- package/SingleChar.js +62 -0
- package/SingleChar.js.map +1 -0
- package/SingleChar.mjs +25 -0
- package/SingleChar.mjs.map +1 -0
- package/TaqError.d.ts +24 -0
- package/TaqError.js +65 -0
- package/TaqError.js.map +1 -0
- package/TaqError.mjs +35 -0
- package/TaqError.mjs.map +1 -0
- package/Task.d.ts +825 -0
- package/Task.js +95 -0
- package/Task.js.map +1 -0
- package/Task.mjs +58 -0
- package/Task.mjs.map +1 -0
- package/Template.d.ts +1746 -0
- package/Template.js +117 -0
- package/Template.js.map +1 -0
- package/Template.mjs +79 -0
- package/Template.mjs.map +1 -0
- package/Timestamp.d.ts +51 -0
- package/Timestamp.js +65 -0
- package/Timestamp.js.map +1 -0
- package/Timestamp.mjs +27 -0
- package/Timestamp.mjs.map +1 -0
- package/Tz.d.ts +47 -0
- package/Tz.js +62 -0
- package/Tz.js.map +1 -0
- package/Tz.mjs +25 -0
- package/Tz.mjs.map +1 -0
- package/Url.d.ts +49 -0
- package/Url.js +68 -0
- package/Url.js.map +1 -0
- package/Url.mjs +30 -0
- package/Url.mjs.map +1 -0
- package/Verb.d.ts +48 -0
- package/Verb.js +62 -0
- package/Verb.js.map +1 -0
- package/Verb.mjs +25 -0
- package/Verb.mjs.map +1 -0
- package/VersionNumber.d.ts +30 -0
- package/VersionNumber.js +61 -0
- package/VersionNumber.js.map +1 -0
- package/VersionNumber.mjs +25 -0
- package/VersionNumber.mjs.map +1 -0
- package/i18n.d.ts +7 -0
- package/i18n.js +96 -0
- package/i18n.js.map +1 -0
- package/i18n.mjs +67 -0
- package/i18n.mjs.map +1 -0
- package/package.json +31 -3
- package/taqueria-protocol-types.d.ts +72 -0
- package/taqueria-protocol-types.js +142 -0
- package/taqueria-protocol-types.js.map +1 -0
- package/taqueria-protocol-types.mjs +76 -0
- package/taqueria-protocol-types.mjs.map +1 -0
- package/tzkt-config.d.ts +116 -0
- package/tzkt-config.js +65 -0
- package/tzkt-config.js.map +1 -0
- package/tzkt-config.mjs +28 -0
- package/tzkt-config.mjs.map +1 -0
- package/Alias.ts +0 -38
- package/Base.ts +0 -105
- package/Command.ts +0 -26
- package/Config.ts +0 -163
- package/Contract.ts +0 -35
- package/Crypto.ts +0 -3
- package/EconomicalProtocolHash.ts +0 -26
- package/Environment.ts +0 -40
- package/EphemeralState.ts +0 -282
- package/Faucet.ts +0 -46
- package/HumanReadableIdentifier.ts +0 -26
- package/InstalledPlugin.ts +0 -28
- package/LoadedConfig.ts +0 -45
- package/MetadataConfig.ts +0 -37
- package/NetworkConfig.ts +0 -39
- package/Operation.ts +0 -70
- package/Option.ts +0 -64
- package/ParsedOperation.ts +0 -33
- package/ParsedTemplate.ts +0 -40
- package/PersistentState.ts +0 -69
- package/PluginActionName.ts +0 -28
- package/PluginDependenciesResponse.ts +0 -33
- package/PluginInfo.ts +0 -76
- package/PluginJsonResponse.ts +0 -26
- package/PluginProxyResponse.ts +0 -24
- package/PluginResponseEncoding.ts +0 -27
- package/PluginSchema.ts +0 -81
- package/PositionalArg.ts +0 -41
- package/Provisioner.ts +0 -61
- package/ProvisionerID.ts +0 -25
- package/Provisions.ts +0 -70
- package/PublicKeyHash.ts +0 -28
- package/RequestArgs.ts +0 -97
- package/SHA256.ts +0 -42
- package/SandboxAccountConfig.ts +0 -35
- package/SandboxConfig.ts +0 -66
- package/SanitizedAbsPath.ts +0 -23
- package/SanitizedArgs.ts +0 -213
- package/SanitizedPath.ts +0 -28
- package/ScaffoldConfig.ts +0 -6
- package/Settings.ts +0 -27
- package/SingleChar.ts +0 -23
- package/TaqError.ts +0 -78
- package/Task.ts +0 -57
- package/Template.ts +0 -77
- package/Timestamp.ts +0 -25
- package/Tz.ts +0 -22
- package/Url.ts +0 -28
- package/Verb.ts +0 -23
- package/VersionNumber.ts +0 -25
- package/i18n.ts +0 -74
- package/taqueria-protocol-types.ts +0 -36
- package/tzkt-config.ts +0 -27
package/Provisions.d.ts
ADDED
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import * as fluture from 'fluture';
|
|
2
|
+
import { TaqError } from './TaqError.js';
|
|
3
|
+
import { Flatten } from '@taqueria/protocol/Base';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
|
|
6
|
+
declare const generatedSchemas: {
|
|
7
|
+
rawSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
8
|
+
internalSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
9
|
+
schema: z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, ({
|
|
10
|
+
label?: string | undefined;
|
|
11
|
+
plugin?: string | undefined;
|
|
12
|
+
command?: string | undefined;
|
|
13
|
+
depends_on?: (string & {
|
|
14
|
+
readonly __kind: any;
|
|
15
|
+
})[] | undefined;
|
|
16
|
+
operation: string;
|
|
17
|
+
id: string & {
|
|
18
|
+
readonly __kind: any;
|
|
19
|
+
};
|
|
20
|
+
} & {
|
|
21
|
+
readonly __kind: any;
|
|
22
|
+
})[] & {
|
|
23
|
+
readonly __kind: any;
|
|
24
|
+
}, any>;
|
|
25
|
+
};
|
|
26
|
+
declare const factory: {
|
|
27
|
+
make: (input: ({
|
|
28
|
+
label?: string | undefined;
|
|
29
|
+
plugin?: string | undefined;
|
|
30
|
+
command?: string | undefined;
|
|
31
|
+
depends_on?: (string & {
|
|
32
|
+
readonly __kind: any;
|
|
33
|
+
})[] | undefined;
|
|
34
|
+
operation: string;
|
|
35
|
+
id: string & {
|
|
36
|
+
readonly __kind: any;
|
|
37
|
+
};
|
|
38
|
+
} & {
|
|
39
|
+
readonly __kind: any;
|
|
40
|
+
})[]) => fluture.FutureInstance<TaqError, ({
|
|
41
|
+
label?: string | undefined;
|
|
42
|
+
plugin?: string | undefined;
|
|
43
|
+
command?: string | undefined;
|
|
44
|
+
depends_on?: (string & {
|
|
45
|
+
readonly __kind: any;
|
|
46
|
+
})[] | undefined;
|
|
47
|
+
operation: string;
|
|
48
|
+
id: string & {
|
|
49
|
+
readonly __kind: any;
|
|
50
|
+
};
|
|
51
|
+
} & {
|
|
52
|
+
readonly __kind: any;
|
|
53
|
+
})[] & {
|
|
54
|
+
readonly __kind: any;
|
|
55
|
+
}>;
|
|
56
|
+
of: (input: unknown) => fluture.FutureInstance<TaqError, ({
|
|
57
|
+
label?: string | undefined;
|
|
58
|
+
plugin?: string | undefined;
|
|
59
|
+
command?: string | undefined;
|
|
60
|
+
depends_on?: (string & {
|
|
61
|
+
readonly __kind: any;
|
|
62
|
+
})[] | undefined;
|
|
63
|
+
operation: string;
|
|
64
|
+
id: string & {
|
|
65
|
+
readonly __kind: any;
|
|
66
|
+
};
|
|
67
|
+
} & {
|
|
68
|
+
readonly __kind: any;
|
|
69
|
+
})[] & {
|
|
70
|
+
readonly __kind: any;
|
|
71
|
+
}>;
|
|
72
|
+
create: (input: {
|
|
73
|
+
label?: string | undefined;
|
|
74
|
+
plugin?: string | undefined;
|
|
75
|
+
command?: string | undefined;
|
|
76
|
+
depends_on?: string[] | undefined;
|
|
77
|
+
operation: string;
|
|
78
|
+
id: string;
|
|
79
|
+
}[] | ({
|
|
80
|
+
label?: string | undefined;
|
|
81
|
+
plugin?: string | undefined;
|
|
82
|
+
command?: string | undefined;
|
|
83
|
+
depends_on?: (string & {
|
|
84
|
+
readonly __kind: any;
|
|
85
|
+
})[] | undefined;
|
|
86
|
+
operation: string;
|
|
87
|
+
id: string & {
|
|
88
|
+
readonly __kind: any;
|
|
89
|
+
};
|
|
90
|
+
} & {
|
|
91
|
+
readonly __kind: any;
|
|
92
|
+
})[]) => ({
|
|
93
|
+
label?: string | undefined;
|
|
94
|
+
plugin?: string | undefined;
|
|
95
|
+
command?: string | undefined;
|
|
96
|
+
depends_on?: (string & {
|
|
97
|
+
readonly __kind: any;
|
|
98
|
+
})[] | undefined;
|
|
99
|
+
operation: string;
|
|
100
|
+
id: string & {
|
|
101
|
+
readonly __kind: any;
|
|
102
|
+
};
|
|
103
|
+
} & {
|
|
104
|
+
readonly __kind: any;
|
|
105
|
+
})[] & {
|
|
106
|
+
readonly __kind: any;
|
|
107
|
+
};
|
|
108
|
+
from: (input: unknown) => ({
|
|
109
|
+
label?: string | undefined;
|
|
110
|
+
plugin?: string | undefined;
|
|
111
|
+
command?: string | undefined;
|
|
112
|
+
depends_on?: (string & {
|
|
113
|
+
readonly __kind: any;
|
|
114
|
+
})[] | undefined;
|
|
115
|
+
operation: string;
|
|
116
|
+
id: string & {
|
|
117
|
+
readonly __kind: any;
|
|
118
|
+
};
|
|
119
|
+
} & {
|
|
120
|
+
readonly __kind: any;
|
|
121
|
+
})[] & {
|
|
122
|
+
readonly __kind: any;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
declare type Provisions = Flatten<z.infer<typeof generatedSchemas.schema>>;
|
|
126
|
+
declare type t = Provisions;
|
|
127
|
+
declare const create: (input: {
|
|
128
|
+
label?: string | undefined;
|
|
129
|
+
plugin?: string | undefined;
|
|
130
|
+
command?: string | undefined;
|
|
131
|
+
depends_on?: string[] | undefined;
|
|
132
|
+
operation: string;
|
|
133
|
+
id: string;
|
|
134
|
+
}[] | ({
|
|
135
|
+
label?: string | undefined;
|
|
136
|
+
plugin?: string | undefined;
|
|
137
|
+
command?: string | undefined;
|
|
138
|
+
depends_on?: (string & {
|
|
139
|
+
readonly __kind: any;
|
|
140
|
+
})[] | undefined;
|
|
141
|
+
operation: string;
|
|
142
|
+
id: string & {
|
|
143
|
+
readonly __kind: any;
|
|
144
|
+
};
|
|
145
|
+
} & {
|
|
146
|
+
readonly __kind: any;
|
|
147
|
+
})[]) => ({
|
|
148
|
+
label?: string | undefined;
|
|
149
|
+
plugin?: string | undefined;
|
|
150
|
+
command?: string | undefined;
|
|
151
|
+
depends_on?: (string & {
|
|
152
|
+
readonly __kind: any;
|
|
153
|
+
})[] | undefined;
|
|
154
|
+
operation: string;
|
|
155
|
+
id: string & {
|
|
156
|
+
readonly __kind: any;
|
|
157
|
+
};
|
|
158
|
+
} & {
|
|
159
|
+
readonly __kind: any;
|
|
160
|
+
})[] & {
|
|
161
|
+
readonly __kind: any;
|
|
162
|
+
};
|
|
163
|
+
declare const of: (input: unknown) => fluture.FutureInstance<TaqError, ({
|
|
164
|
+
label?: string | undefined;
|
|
165
|
+
plugin?: string | undefined;
|
|
166
|
+
command?: string | undefined;
|
|
167
|
+
depends_on?: (string & {
|
|
168
|
+
readonly __kind: any;
|
|
169
|
+
})[] | undefined;
|
|
170
|
+
operation: string;
|
|
171
|
+
id: string & {
|
|
172
|
+
readonly __kind: any;
|
|
173
|
+
};
|
|
174
|
+
} & {
|
|
175
|
+
readonly __kind: any;
|
|
176
|
+
})[] & {
|
|
177
|
+
readonly __kind: any;
|
|
178
|
+
}>;
|
|
179
|
+
declare const make: (input: ({
|
|
180
|
+
label?: string | undefined;
|
|
181
|
+
plugin?: string | undefined;
|
|
182
|
+
command?: string | undefined;
|
|
183
|
+
depends_on?: (string & {
|
|
184
|
+
readonly __kind: any;
|
|
185
|
+
})[] | undefined;
|
|
186
|
+
operation: string;
|
|
187
|
+
id: string & {
|
|
188
|
+
readonly __kind: any;
|
|
189
|
+
};
|
|
190
|
+
} & {
|
|
191
|
+
readonly __kind: any;
|
|
192
|
+
})[]) => fluture.FutureInstance<TaqError, ({
|
|
193
|
+
label?: string | undefined;
|
|
194
|
+
plugin?: string | undefined;
|
|
195
|
+
command?: string | undefined;
|
|
196
|
+
depends_on?: (string & {
|
|
197
|
+
readonly __kind: any;
|
|
198
|
+
})[] | undefined;
|
|
199
|
+
operation: string;
|
|
200
|
+
id: string & {
|
|
201
|
+
readonly __kind: any;
|
|
202
|
+
};
|
|
203
|
+
} & {
|
|
204
|
+
readonly __kind: any;
|
|
205
|
+
})[] & {
|
|
206
|
+
readonly __kind: any;
|
|
207
|
+
}>;
|
|
208
|
+
declare const schemas: {
|
|
209
|
+
schema: z.ZodEffects<z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, ({
|
|
210
|
+
label?: string | undefined;
|
|
211
|
+
plugin?: string | undefined;
|
|
212
|
+
command?: string | undefined;
|
|
213
|
+
depends_on?: (string & {
|
|
214
|
+
readonly __kind: any;
|
|
215
|
+
})[] | undefined;
|
|
216
|
+
operation: string;
|
|
217
|
+
id: string & {
|
|
218
|
+
readonly __kind: any;
|
|
219
|
+
};
|
|
220
|
+
} & {
|
|
221
|
+
readonly __kind: any;
|
|
222
|
+
})[] & {
|
|
223
|
+
readonly __kind: any;
|
|
224
|
+
}, any>, Flatten<({
|
|
225
|
+
label?: string | undefined;
|
|
226
|
+
plugin?: string | undefined;
|
|
227
|
+
command?: string | undefined;
|
|
228
|
+
depends_on?: (string & {
|
|
229
|
+
readonly __kind: any;
|
|
230
|
+
})[] | undefined;
|
|
231
|
+
operation: string;
|
|
232
|
+
id: string & {
|
|
233
|
+
readonly __kind: any;
|
|
234
|
+
};
|
|
235
|
+
} & {
|
|
236
|
+
readonly __kind: any;
|
|
237
|
+
})[] & {
|
|
238
|
+
readonly __kind: any;
|
|
239
|
+
}>, any>;
|
|
240
|
+
rawSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
241
|
+
internalSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
export { Provisions, create, factory, generatedSchemas, make, of, schemas, t };
|
package/Provisions.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
|
|
26
|
+
// Provisions.ts
|
|
27
|
+
var Provisions_exports = {};
|
|
28
|
+
__export(Provisions_exports, {
|
|
29
|
+
create: () => create,
|
|
30
|
+
factory: () => factory,
|
|
31
|
+
generatedSchemas: () => generatedSchemas,
|
|
32
|
+
make: () => make,
|
|
33
|
+
of: () => of,
|
|
34
|
+
schemas: () => schemas2
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(Provisions_exports);
|
|
37
|
+
var import_Base = __toESM(require("@taqueria/protocol/Base"));
|
|
38
|
+
var Provisioner = __toESM(require("@taqueria/protocol/Provisioner"));
|
|
39
|
+
var import_rambda = require("rambda");
|
|
40
|
+
var import_rambdax = require("rambdax");
|
|
41
|
+
var import_zod = require("zod");
|
|
42
|
+
var getInvalidIds = (0, import_rambdax.memoize)(
|
|
43
|
+
(provisions) => {
|
|
44
|
+
const ids = provisions.map((p) => p.id);
|
|
45
|
+
return provisions.reduce(
|
|
46
|
+
(retval, provision) => {
|
|
47
|
+
const depends_on = provision.depends_on ?? [];
|
|
48
|
+
const results = (0, import_rambdax.partition)(
|
|
49
|
+
(id) => ids.includes(id),
|
|
50
|
+
depends_on
|
|
51
|
+
);
|
|
52
|
+
const invalid = results.pop();
|
|
53
|
+
return (0, import_rambda.uniq)([...retval, ...invalid]);
|
|
54
|
+
},
|
|
55
|
+
[]
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
var rawSchema2 = import_zod.z.array(
|
|
60
|
+
Provisioner.rawSchema
|
|
61
|
+
).refine(
|
|
62
|
+
(provisions) => getInvalidIds(provisions).length === 0,
|
|
63
|
+
(provisions) => ({
|
|
64
|
+
message: `One or more of your provisioners depends on an invalid provisioner. The following provisioner ids were referenced that do not exist: ${getInvalidIds(provisions).join(", ")}`
|
|
65
|
+
})
|
|
66
|
+
).describe("Provisions");
|
|
67
|
+
var internalSchema = import_zod.z.array(Provisioner.schemas.schema).refine(
|
|
68
|
+
(provisions) => getInvalidIds(provisions).length === 0,
|
|
69
|
+
(provisions) => ({
|
|
70
|
+
message: `One or more of your provisioners depends on an invalid provisioner. The following provisioner ids were referenced that do not exist: ${getInvalidIds(provisions).join(", ")}`
|
|
71
|
+
})
|
|
72
|
+
).describe("Provisions");
|
|
73
|
+
var { schemas: generatedSchemas, factory } = (0, import_Base.default)({
|
|
74
|
+
rawSchema: rawSchema2,
|
|
75
|
+
internalSchema,
|
|
76
|
+
parseErrMsg: (value) => `The following provision is invalid: ${value}`,
|
|
77
|
+
unknownErrMsg: "Something went wrong parsing the list of provisioners"
|
|
78
|
+
});
|
|
79
|
+
var { create, of, make } = factory;
|
|
80
|
+
var schemas2 = {
|
|
81
|
+
...generatedSchemas,
|
|
82
|
+
schema: generatedSchemas.schema.transform((val) => val)
|
|
83
|
+
};
|
|
84
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
85
|
+
0 && (module.exports = {
|
|
86
|
+
create,
|
|
87
|
+
factory,
|
|
88
|
+
generatedSchemas,
|
|
89
|
+
make,
|
|
90
|
+
of,
|
|
91
|
+
schemas
|
|
92
|
+
});
|
|
93
|
+
//# sourceMappingURL=Provisions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["Provisions.ts"],"sourcesContent":["import createType, { Flatten } from '@taqueria/protocol/Base';\nimport * as Provisioner from '@taqueria/protocol/Provisioner';\nimport * as ProvisionerID from '@taqueria/protocol/ProvisionerID';\nimport { uniq } from 'rambda';\nimport { memoize, partition } from 'rambdax';\nimport { z } from 'zod';\n\nconst getInvalidIds = memoize(\n\t(provisions: (Provisioner.t | Provisioner.Input | Provisioner.RawInput)[]): ProvisionerID.t[] => {\n\t\tconst ids = provisions.map(p => p.id);\n\t\treturn provisions.reduce(\n\t\t\t(retval, provision) => {\n\t\t\t\tconst depends_on = (provision.depends_on ?? []) as unknown as ProvisionerID.t[];\n\t\t\t\tconst results = partition(\n\t\t\t\t\t(id: ProvisionerID.t) => ids.includes(id),\n\t\t\t\t\tdepends_on,\n\t\t\t\t) as unknown[][];\n\t\t\t\tconst invalid = results.pop() as ProvisionerID.t[];\n\n\t\t\t\treturn uniq([...retval, ...invalid]);\n\t\t\t},\n\t\t\t[] as ProvisionerID.t[],\n\t\t);\n\t},\n);\n\nconst rawSchema = z\n\t.array(\n\t\tProvisioner.rawSchema,\n\t)\n\t.refine(\n\t\tprovisions => getInvalidIds(provisions).length === 0,\n\t\tprovisions => ({\n\t\t\tmessage:\n\t\t\t\t`One or more of your provisioners depends on an invalid provisioner. The following provisioner ids were referenced that do not exist: ${\n\t\t\t\t\tgetInvalidIds(provisions).join(', ')\n\t\t\t\t}`,\n\t\t}),\n\t)\n\t.describe('Provisions');\n\ntype RawInput = z.infer<typeof rawSchema>;\n\nconst internalSchema = z\n\t.array(Provisioner.schemas.schema)\n\t.refine(\n\t\tprovisions => getInvalidIds(provisions).length === 0,\n\t\tprovisions => ({\n\t\t\tmessage:\n\t\t\t\t`One or more of your provisioners depends on an invalid provisioner. The following provisioner ids were referenced that do not exist: ${\n\t\t\t\t\tgetInvalidIds(provisions).join(', ')\n\t\t\t\t}`,\n\t\t}),\n\t)\n\t.describe('Provisions');\n\ntype Input = z.infer<typeof internalSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, Input>({\n\trawSchema,\n\tinternalSchema,\n\tparseErrMsg: (value: unknown) => `The following provision is invalid: ${value}`,\n\tunknownErrMsg: 'Something went wrong parsing the list of provisioners',\n});\n\nexport type Provisions = Flatten<z.infer<typeof generatedSchemas.schema>>;\nexport type t = Provisions;\nexport const { create, of, make } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as Provisions),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAAA;AAAA;AAAA;AAAA,kBAAoC;AACpC,kBAA6B;AAE7B,oBAAqB;AACrB,qBAAmC;AACnC,iBAAkB;AAElB,IAAM,oBAAgB;AAAA,EACrB,CAAC,eAAgG;AAChG,UAAM,MAAM,WAAW,IAAI,OAAK,EAAE,EAAE;AACpC,WAAO,WAAW;AAAA,MACjB,CAAC,QAAQ,cAAc;AACtB,cAAM,aAAc,UAAU,cAAc,CAAC;AAC7C,cAAM,cAAU;AAAA,UACf,CAAC,OAAwB,IAAI,SAAS,EAAE;AAAA,UACxC;AAAA,QACD;AACA,cAAM,UAAU,QAAQ,IAAI;AAE5B,mBAAO,oBAAK,CAAC,GAAG,QAAQ,GAAG,OAAO,CAAC;AAAA,MACpC;AAAA,MACA,CAAC;AAAA,IACF;AAAA,EACD;AACD;AAEA,IAAMC,aAAY,aAChB;AAAA,EACY;AACb,EACC;AAAA,EACA,gBAAc,cAAc,UAAU,EAAE,WAAW;AAAA,EACnD,iBAAe;AAAA,IACd,SACC,wIACC,cAAc,UAAU,EAAE,KAAK,IAAI;AAAA,EAEtC;AACD,EACC,SAAS,YAAY;AAIvB,IAAM,iBAAiB,aACrB,MAAkB,oBAAQ,MAAM,EAChC;AAAA,EACA,gBAAc,cAAc,UAAU,EAAE,WAAW;AAAA,EACnD,iBAAe;AAAA,IACd,SACC,wIACC,cAAc,UAAU,EAAE,KAAK,IAAI;AAAA,EAEtC;AACD,EACC,SAAS,YAAY;AAIhB,IAAM,EAAE,SAAS,kBAAkB,QAAQ,QAAI,YAAAC,SAA4B;AAAA,EACjF,WAAAD;AAAA,EACA;AAAA,EACA,aAAa,CAAC,UAAmB,uCAAuC;AAAA,EACxE,eAAe;AAChB,CAAC;AAIM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAE7B,IAAMD,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAiB;AACnE;","names":["schemas","rawSchema","createType"]}
|
package/Provisions.mjs
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// Provisions.ts
|
|
2
|
+
import createType from "@taqueria/protocol/Base";
|
|
3
|
+
import * as Provisioner from "@taqueria/protocol/Provisioner";
|
|
4
|
+
import { uniq } from "rambda";
|
|
5
|
+
import { memoize, partition } from "rambdax";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
var getInvalidIds = memoize(
|
|
8
|
+
(provisions) => {
|
|
9
|
+
const ids = provisions.map((p) => p.id);
|
|
10
|
+
return provisions.reduce(
|
|
11
|
+
(retval, provision) => {
|
|
12
|
+
const depends_on = provision.depends_on ?? [];
|
|
13
|
+
const results = partition(
|
|
14
|
+
(id) => ids.includes(id),
|
|
15
|
+
depends_on
|
|
16
|
+
);
|
|
17
|
+
const invalid = results.pop();
|
|
18
|
+
return uniq([...retval, ...invalid]);
|
|
19
|
+
},
|
|
20
|
+
[]
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
var rawSchema2 = z.array(
|
|
25
|
+
Provisioner.rawSchema
|
|
26
|
+
).refine(
|
|
27
|
+
(provisions) => getInvalidIds(provisions).length === 0,
|
|
28
|
+
(provisions) => ({
|
|
29
|
+
message: `One or more of your provisioners depends on an invalid provisioner. The following provisioner ids were referenced that do not exist: ${getInvalidIds(provisions).join(", ")}`
|
|
30
|
+
})
|
|
31
|
+
).describe("Provisions");
|
|
32
|
+
var internalSchema = z.array(Provisioner.schemas.schema).refine(
|
|
33
|
+
(provisions) => getInvalidIds(provisions).length === 0,
|
|
34
|
+
(provisions) => ({
|
|
35
|
+
message: `One or more of your provisioners depends on an invalid provisioner. The following provisioner ids were referenced that do not exist: ${getInvalidIds(provisions).join(", ")}`
|
|
36
|
+
})
|
|
37
|
+
).describe("Provisions");
|
|
38
|
+
var { schemas: generatedSchemas, factory } = createType({
|
|
39
|
+
rawSchema: rawSchema2,
|
|
40
|
+
internalSchema,
|
|
41
|
+
parseErrMsg: (value) => `The following provision is invalid: ${value}`,
|
|
42
|
+
unknownErrMsg: "Something went wrong parsing the list of provisioners"
|
|
43
|
+
});
|
|
44
|
+
var { create, of, make } = factory;
|
|
45
|
+
var schemas2 = {
|
|
46
|
+
...generatedSchemas,
|
|
47
|
+
schema: generatedSchemas.schema.transform((val) => val)
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
create,
|
|
51
|
+
factory,
|
|
52
|
+
generatedSchemas,
|
|
53
|
+
make,
|
|
54
|
+
of,
|
|
55
|
+
schemas2 as schemas
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=Provisions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["Provisions.ts"],"sourcesContent":["import createType, { Flatten } from '@taqueria/protocol/Base';\nimport * as Provisioner from '@taqueria/protocol/Provisioner';\nimport * as ProvisionerID from '@taqueria/protocol/ProvisionerID';\nimport { uniq } from 'rambda';\nimport { memoize, partition } from 'rambdax';\nimport { z } from 'zod';\n\nconst getInvalidIds = memoize(\n\t(provisions: (Provisioner.t | Provisioner.Input | Provisioner.RawInput)[]): ProvisionerID.t[] => {\n\t\tconst ids = provisions.map(p => p.id);\n\t\treturn provisions.reduce(\n\t\t\t(retval, provision) => {\n\t\t\t\tconst depends_on = (provision.depends_on ?? []) as unknown as ProvisionerID.t[];\n\t\t\t\tconst results = partition(\n\t\t\t\t\t(id: ProvisionerID.t) => ids.includes(id),\n\t\t\t\t\tdepends_on,\n\t\t\t\t) as unknown[][];\n\t\t\t\tconst invalid = results.pop() as ProvisionerID.t[];\n\n\t\t\t\treturn uniq([...retval, ...invalid]);\n\t\t\t},\n\t\t\t[] as ProvisionerID.t[],\n\t\t);\n\t},\n);\n\nconst rawSchema = z\n\t.array(\n\t\tProvisioner.rawSchema,\n\t)\n\t.refine(\n\t\tprovisions => getInvalidIds(provisions).length === 0,\n\t\tprovisions => ({\n\t\t\tmessage:\n\t\t\t\t`One or more of your provisioners depends on an invalid provisioner. The following provisioner ids were referenced that do not exist: ${\n\t\t\t\t\tgetInvalidIds(provisions).join(', ')\n\t\t\t\t}`,\n\t\t}),\n\t)\n\t.describe('Provisions');\n\ntype RawInput = z.infer<typeof rawSchema>;\n\nconst internalSchema = z\n\t.array(Provisioner.schemas.schema)\n\t.refine(\n\t\tprovisions => getInvalidIds(provisions).length === 0,\n\t\tprovisions => ({\n\t\t\tmessage:\n\t\t\t\t`One or more of your provisioners depends on an invalid provisioner. The following provisioner ids were referenced that do not exist: ${\n\t\t\t\t\tgetInvalidIds(provisions).join(', ')\n\t\t\t\t}`,\n\t\t}),\n\t)\n\t.describe('Provisions');\n\ntype Input = z.infer<typeof internalSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, Input>({\n\trawSchema,\n\tinternalSchema,\n\tparseErrMsg: (value: unknown) => `The following provision is invalid: ${value}`,\n\tunknownErrMsg: 'Something went wrong parsing the list of provisioners',\n});\n\nexport type Provisions = Flatten<z.infer<typeof generatedSchemas.schema>>;\nexport type t = Provisions;\nexport const { create, of, make } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as Provisions),\n};\n"],"mappings":";AAAA,OAAO,gBAA6B;AACpC,YAAY,iBAAiB;AAE7B,SAAS,YAAY;AACrB,SAAS,SAAS,iBAAiB;AACnC,SAAS,SAAS;AAElB,IAAM,gBAAgB;AAAA,EACrB,CAAC,eAAgG;AAChG,UAAM,MAAM,WAAW,IAAI,OAAK,EAAE,EAAE;AACpC,WAAO,WAAW;AAAA,MACjB,CAAC,QAAQ,cAAc;AACtB,cAAM,aAAc,UAAU,cAAc,CAAC;AAC7C,cAAM,UAAU;AAAA,UACf,CAAC,OAAwB,IAAI,SAAS,EAAE;AAAA,UACxC;AAAA,QACD;AACA,cAAM,UAAU,QAAQ,IAAI;AAE5B,eAAO,KAAK,CAAC,GAAG,QAAQ,GAAG,OAAO,CAAC;AAAA,MACpC;AAAA,MACA,CAAC;AAAA,IACF;AAAA,EACD;AACD;AAEA,IAAMA,aAAY,EAChB;AAAA,EACY;AACb,EACC;AAAA,EACA,gBAAc,cAAc,UAAU,EAAE,WAAW;AAAA,EACnD,iBAAe;AAAA,IACd,SACC,wIACC,cAAc,UAAU,EAAE,KAAK,IAAI;AAAA,EAEtC;AACD,EACC,SAAS,YAAY;AAIvB,IAAM,iBAAiB,EACrB,MAAkB,oBAAQ,MAAM,EAChC;AAAA,EACA,gBAAc,cAAc,UAAU,EAAE,WAAW;AAAA,EACnD,iBAAe;AAAA,IACd,SACC,wIACC,cAAc,UAAU,EAAE,KAAK,IAAI;AAAA,EAEtC;AACD,EACC,SAAS,YAAY;AAIhB,IAAM,EAAE,SAAS,kBAAkB,QAAQ,IAAI,WAA4B;AAAA,EACjF,WAAAA;AAAA,EACA;AAAA,EACA,aAAa,CAAC,UAAmB,uCAAuC;AAAA,EACxE,eAAe;AAChB,CAAC;AAIM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAE7B,IAAMC,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAiB;AACnE;","names":["rawSchema","schemas"]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as fluture from 'fluture';
|
|
2
|
+
import { TaqError } from './TaqError.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
declare const rawSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
6
|
+
declare const generatedSchemas: {
|
|
7
|
+
rawSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
8
|
+
internalSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
9
|
+
schema: z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, string & {
|
|
10
|
+
readonly __kind: any;
|
|
11
|
+
}, any>;
|
|
12
|
+
};
|
|
13
|
+
declare const factory: {
|
|
14
|
+
make: (input: string) => fluture.FutureInstance<TaqError, string & {
|
|
15
|
+
readonly __kind: any;
|
|
16
|
+
}>;
|
|
17
|
+
of: (input: unknown) => fluture.FutureInstance<TaqError, string & {
|
|
18
|
+
readonly __kind: any;
|
|
19
|
+
}>;
|
|
20
|
+
create: (input: string) => string & {
|
|
21
|
+
readonly __kind: any;
|
|
22
|
+
};
|
|
23
|
+
from: (input: unknown) => string & {
|
|
24
|
+
readonly __kind: any;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
declare type PublicKeyHash = z.infer<typeof generatedSchemas.schema>;
|
|
28
|
+
declare type t = PublicKeyHash;
|
|
29
|
+
declare type PKH = PublicKeyHash;
|
|
30
|
+
declare const create: (input: string) => string & {
|
|
31
|
+
readonly __kind: any;
|
|
32
|
+
};
|
|
33
|
+
declare const of: (input: unknown) => fluture.FutureInstance<TaqError, string & {
|
|
34
|
+
readonly __kind: any;
|
|
35
|
+
}>;
|
|
36
|
+
declare const make: (input: string) => fluture.FutureInstance<TaqError, string & {
|
|
37
|
+
readonly __kind: any;
|
|
38
|
+
}>;
|
|
39
|
+
declare const schemas: {
|
|
40
|
+
schema: z.ZodEffects<z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, string & {
|
|
41
|
+
readonly __kind: any;
|
|
42
|
+
}, any>, string & {
|
|
43
|
+
readonly __kind: any;
|
|
44
|
+
}, any>;
|
|
45
|
+
rawSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
46
|
+
internalSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export { PKH, PublicKeyHash, create, factory, generatedSchemas, make, of, rawSchema, schemas, t };
|
package/PublicKeyHash.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
|
|
26
|
+
// PublicKeyHash.ts
|
|
27
|
+
var PublicKeyHash_exports = {};
|
|
28
|
+
__export(PublicKeyHash_exports, {
|
|
29
|
+
create: () => create,
|
|
30
|
+
factory: () => factory,
|
|
31
|
+
generatedSchemas: () => generatedSchemas,
|
|
32
|
+
make: () => make,
|
|
33
|
+
of: () => of,
|
|
34
|
+
rawSchema: () => rawSchema,
|
|
35
|
+
schemas: () => schemas
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(PublicKeyHash_exports);
|
|
38
|
+
var import_Base = __toESM(require("@taqueria/protocol/Base"));
|
|
39
|
+
var import_zod = require("zod");
|
|
40
|
+
var rawSchema = import_zod.z.string({ description: "Public Key Hash" }).min(1).refine(
|
|
41
|
+
(val) => val.startsWith("tz1"),
|
|
42
|
+
(val) => ({ message: `${val} is not a valid public key hash` })
|
|
43
|
+
);
|
|
44
|
+
var { schemas: generatedSchemas, factory } = (0, import_Base.default)({
|
|
45
|
+
isStringLike: true,
|
|
46
|
+
rawSchema,
|
|
47
|
+
parseErrMsg: (value) => `${value} is an invalid public key hash`,
|
|
48
|
+
unknownErrMsg: "Something went wrong parsing the public key hash"
|
|
49
|
+
});
|
|
50
|
+
var { create, of, make } = factory;
|
|
51
|
+
var schemas = {
|
|
52
|
+
...generatedSchemas,
|
|
53
|
+
schema: generatedSchemas.schema.transform((val) => val)
|
|
54
|
+
};
|
|
55
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
56
|
+
0 && (module.exports = {
|
|
57
|
+
create,
|
|
58
|
+
factory,
|
|
59
|
+
generatedSchemas,
|
|
60
|
+
make,
|
|
61
|
+
of,
|
|
62
|
+
rawSchema,
|
|
63
|
+
schemas
|
|
64
|
+
});
|
|
65
|
+
//# sourceMappingURL=PublicKeyHash.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["PublicKeyHash.ts"],"sourcesContent":["import createType from '@taqueria/protocol/Base';\nimport { z } from 'zod';\n\nexport const rawSchema = z\n\t.string({ description: 'Public Key Hash' })\n\t.min(1) // TODO: what's the actual minimum length here?\n\t.refine(\n\t\tval => val.startsWith('tz1'),\n\t\tval => ({ message: `${val} is not a valid public key hash` }),\n\t);\n\ntype RawInput = z.infer<typeof rawSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, RawInput>({\n\tisStringLike: true,\n\trawSchema,\n\tparseErrMsg: (value: unknown) => `${value} is an invalid public key hash`,\n\tunknownErrMsg: 'Something went wrong parsing the public key hash',\n});\n\nexport type PublicKeyHash = z.infer<typeof generatedSchemas.schema>;\nexport type t = PublicKeyHash;\nexport type PKH = PublicKeyHash;\nexport const { create, of, make } = factory;\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as PublicKeyHash),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuB;AACvB,iBAAkB;AAEX,IAAM,YAAY,aACvB,OAAO,EAAE,aAAa,kBAAkB,CAAC,EACzC,IAAI,CAAC,EACL;AAAA,EACA,SAAO,IAAI,WAAW,KAAK;AAAA,EAC3B,UAAQ,EAAE,SAAS,GAAG,qCAAqC;AAC5D;AAIM,IAAM,EAAE,SAAS,kBAAkB,QAAQ,QAAI,YAAAA,SAA+B;AAAA,EACpF,cAAc;AAAA,EACd;AAAA,EACA,aAAa,CAAC,UAAmB,GAAG;AAAA,EACpC,eAAe;AAChB,CAAC;AAKM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAC7B,IAAM,UAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAoB;AACtE;","names":["createType"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// PublicKeyHash.ts
|
|
2
|
+
import createType from "@taqueria/protocol/Base";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
var rawSchema = z.string({ description: "Public Key Hash" }).min(1).refine(
|
|
5
|
+
(val) => val.startsWith("tz1"),
|
|
6
|
+
(val) => ({ message: `${val} is not a valid public key hash` })
|
|
7
|
+
);
|
|
8
|
+
var { schemas: generatedSchemas, factory } = createType({
|
|
9
|
+
isStringLike: true,
|
|
10
|
+
rawSchema,
|
|
11
|
+
parseErrMsg: (value) => `${value} is an invalid public key hash`,
|
|
12
|
+
unknownErrMsg: "Something went wrong parsing the public key hash"
|
|
13
|
+
});
|
|
14
|
+
var { create, of, make } = factory;
|
|
15
|
+
var schemas = {
|
|
16
|
+
...generatedSchemas,
|
|
17
|
+
schema: generatedSchemas.schema.transform((val) => val)
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
create,
|
|
21
|
+
factory,
|
|
22
|
+
generatedSchemas,
|
|
23
|
+
make,
|
|
24
|
+
of,
|
|
25
|
+
rawSchema,
|
|
26
|
+
schemas
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=PublicKeyHash.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["PublicKeyHash.ts"],"sourcesContent":["import createType from '@taqueria/protocol/Base';\nimport { z } from 'zod';\n\nexport const rawSchema = z\n\t.string({ description: 'Public Key Hash' })\n\t.min(1) // TODO: what's the actual minimum length here?\n\t.refine(\n\t\tval => val.startsWith('tz1'),\n\t\tval => ({ message: `${val} is not a valid public key hash` }),\n\t);\n\ntype RawInput = z.infer<typeof rawSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, RawInput>({\n\tisStringLike: true,\n\trawSchema,\n\tparseErrMsg: (value: unknown) => `${value} is an invalid public key hash`,\n\tunknownErrMsg: 'Something went wrong parsing the public key hash',\n});\n\nexport type PublicKeyHash = z.infer<typeof generatedSchemas.schema>;\nexport type t = PublicKeyHash;\nexport type PKH = PublicKeyHash;\nexport const { create, of, make } = factory;\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as PublicKeyHash),\n};\n"],"mappings":";AAAA,OAAO,gBAAgB;AACvB,SAAS,SAAS;AAEX,IAAM,YAAY,EACvB,OAAO,EAAE,aAAa,kBAAkB,CAAC,EACzC,IAAI,CAAC,EACL;AAAA,EACA,SAAO,IAAI,WAAW,KAAK;AAAA,EAC3B,UAAQ,EAAE,SAAS,GAAG,qCAAqC;AAC5D;AAIM,IAAM,EAAE,SAAS,kBAAkB,QAAQ,IAAI,WAA+B;AAAA,EACpF,cAAc;AAAA,EACd;AAAA,EACA,aAAa,CAAC,UAAmB,GAAG;AAAA,EACpC,eAAe;AAChB,CAAC;AAKM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAC7B,IAAM,UAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAoB;AACtE;","names":[]}
|