@taqueria/protocol 0.18.0 → 0.19.3
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 +10 -16
- package/Alias.d.ts.map +1 -0
- package/Base.d.ts +8 -10
- package/Base.d.ts.map +1 -0
- package/Base.js +1 -1
- package/Base.js.map +1 -1
- package/Base.mjs +1 -1
- package/Base.mjs.map +1 -1
- package/Command.d.ts +9 -15
- package/Command.d.ts.map +1 -0
- package/Config.d.ts +210 -216
- package/Config.d.ts.map +1 -0
- package/Config.js +18 -21
- package/Config.js.map +1 -1
- package/Config.mjs +19 -22
- package/Config.mjs.map +1 -1
- package/Contract.d.ts +10 -16
- package/Contract.d.ts.map +1 -0
- package/Crypto.d.ts +2 -3
- package/Crypto.d.ts.map +1 -0
- package/EconomicalProtocolHash.d.ts +12 -19
- package/EconomicalProtocolHash.d.ts.map +1 -0
- package/Environment.d.ts +14 -22
- package/Environment.d.ts.map +1 -0
- package/EphemeralState.d.ts +162 -169
- package/EphemeralState.d.ts.map +1 -0
- package/Faucet.d.ts +108 -114
- package/Faucet.d.ts.map +1 -0
- package/Faucet.js +32 -20
- package/Faucet.js.map +1 -1
- package/Faucet.mjs +32 -20
- package/Faucet.mjs.map +1 -1
- package/HumanReadableIdentifier.d.ts +9 -15
- package/HumanReadableIdentifier.d.ts.map +1 -0
- package/InstalledPlugin.d.ts +13 -20
- package/InstalledPlugin.d.ts.map +1 -0
- package/LoadedConfig.d.ts +217 -223
- package/LoadedConfig.d.ts.map +1 -0
- package/MetadataConfig.d.ts +13 -20
- package/MetadataConfig.d.ts.map +1 -0
- package/NetworkConfig.d.ts +121 -127
- package/NetworkConfig.d.ts.map +1 -0
- package/Operation.d.ts +67 -73
- package/Operation.d.ts.map +1 -0
- package/Option.d.ts +14 -21
- package/Option.d.ts.map +1 -0
- package/ParsedOperation.d.ts +56 -64
- package/ParsedOperation.d.ts.map +1 -0
- package/ParsedTemplate.d.ts +49 -57
- package/ParsedTemplate.d.ts.map +1 -0
- package/PersistentState.d.ts +18 -24
- package/PersistentState.d.ts.map +1 -0
- package/PluginActionName.d.ts +6 -7
- package/PluginActionName.d.ts.map +1 -0
- package/PluginDependenciesResponse.d.ts +14 -20
- package/PluginDependenciesResponse.d.ts.map +1 -0
- package/PluginInfo.d.ts +38 -45
- package/PluginInfo.d.ts.map +1 -0
- package/PluginJsonResponse.d.ts +11 -16
- package/PluginJsonResponse.d.ts.map +1 -0
- package/PluginProxyResponse.d.ts +9 -16
- package/PluginProxyResponse.d.ts.map +1 -0
- package/PluginResponseEncoding.d.ts +11 -18
- package/PluginResponseEncoding.d.ts.map +1 -0
- package/PluginSchema.d.ts +419 -427
- package/PluginSchema.d.ts.map +1 -0
- package/PositionalArg.d.ts +13 -20
- package/PositionalArg.d.ts.map +1 -0
- package/Provisioner.d.ts +16 -23
- package/Provisioner.d.ts.map +1 -0
- package/ProvisionerID.d.ts +12 -19
- package/ProvisionerID.d.ts.map +1 -0
- package/Provisions.d.ts +12 -19
- package/Provisions.d.ts.map +1 -0
- package/PublicKeyHash.d.ts +13 -20
- package/PublicKeyHash.d.ts.map +1 -0
- package/RequestArgs.d.ts +508 -517
- package/RequestArgs.d.ts.map +1 -0
- package/SHA256.d.ts +11 -15
- package/SHA256.d.ts.map +1 -0
- package/SandboxAccountConfig.d.ts +13 -20
- package/SandboxAccountConfig.d.ts.map +1 -0
- package/SandboxConfig.d.ts +13 -20
- package/SandboxConfig.d.ts.map +1 -0
- package/SanitizedAbsPath.d.ts +12 -19
- package/SanitizedAbsPath.d.ts.map +1 -0
- package/SanitizedArgs.d.ts +76 -83
- package/SanitizedArgs.d.ts.map +1 -0
- package/SanitizedPath.d.ts +9 -15
- package/SanitizedPath.d.ts.map +1 -0
- package/ScaffoldConfig.d.ts +3 -4
- package/ScaffoldConfig.d.ts.map +1 -0
- package/Settings.d.ts +13 -20
- package/Settings.d.ts.map +1 -0
- package/SingleChar.d.ts +12 -19
- package/SingleChar.d.ts.map +1 -0
- package/TaqError.d.ts +10 -13
- package/TaqError.d.ts.map +1 -0
- package/Task.d.ts +13 -20
- package/Task.d.ts.map +1 -0
- package/Template.d.ts +97 -105
- package/Template.d.ts.map +1 -0
- package/Timestamp.d.ts +13 -20
- package/Timestamp.d.ts.map +1 -0
- package/Tz.d.ts +11 -18
- package/Tz.d.ts.map +1 -0
- package/Url.d.ts +13 -20
- package/Url.d.ts.map +1 -0
- package/Verb.d.ts +12 -19
- package/Verb.d.ts.map +1 -0
- package/VersionNumber.d.ts +9 -15
- package/VersionNumber.d.ts.map +1 -0
- package/i18n.d.ts +4 -4
- package/i18n.d.ts.map +1 -0
- package/package.json +3 -3
- package/taqueria-protocol-types.d.ts +37 -72
- package/taqueria-protocol-types.d.ts.map +1 -0
- package/tzkt-config.d.ts +13 -20
- package/tzkt-config.d.ts.map +1 -0
package/Config.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["Config.ts"],"names":[],"mappings":"AAAA,OAAmB,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAQ9D,OAAO,EAAE,CAAC,EAAY,MAAM,KAAK,CAAC;AAElC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;aAM5B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;cAMjC,CAAC;AAkEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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= import_zod.z.preprocess(
|
|
|
62
62
|
)
|
|
63
63
|
);
|
|
64
64
|
var networkMap = import_zod.z.record(
|
|
65
|
-
|
|
66
|
-
NetworkConfig.schemas.schema,
|
|
67
|
-
import_zod.z.string({ description: "config.network" }).nonempty("Default network must reference the name of an existing network configuration.")
|
|
68
|
-
]),
|
|
65
|
+
NetworkConfig.schemas.schema,
|
|
69
66
|
{ description: "Network configurations" }
|
|
70
67
|
).optional();
|
|
71
68
|
var sandboxMap = import_zod.z.record(
|
|
72
|
-
|
|
73
|
-
SandboxConfig.schemas.schema,
|
|
74
|
-
import_zod.z.string({ description: "config.sandbox" }).min(1, "Default sandbox must reference the name of an existing sandbox configuration.")
|
|
75
|
-
]),
|
|
69
|
+
SandboxConfig.schemas.schema,
|
|
76
70
|
{ description: "Sandbox configurations" }
|
|
77
71
|
).optional();
|
|
78
72
|
var environmentMap = import_zod.z.record(
|
|
@@ -124,18 +118,8 @@ var internalSchema = commonSchema.extend({
|
|
|
124
118
|
});
|
|
125
119
|
var rawSchema8 = commonSchema.extend({
|
|
126
120
|
plugins: pluginsRawSchema.optional(),
|
|
127
|
-
network: import_zod.z.record(
|
|
128
|
-
|
|
129
|
-
NetworkConfig.rawSchema,
|
|
130
|
-
import_zod.z.string({ description: "config.network" }).min(1, "Default network must reference the name of an existing network configuration.")
|
|
131
|
-
])
|
|
132
|
-
).optional(),
|
|
133
|
-
sandbox: import_zod.z.record(
|
|
134
|
-
import_zod.z.union([
|
|
135
|
-
SandboxConfig.rawSchema,
|
|
136
|
-
import_zod.z.string({ description: "config.sandbox" }).min(1, "Default sandbox must reference the name of an existing sandbox configuration.")
|
|
137
|
-
])
|
|
138
|
-
).optional(),
|
|
121
|
+
network: import_zod.z.record(NetworkConfig.rawSchema).optional(),
|
|
122
|
+
sandbox: import_zod.z.record(SandboxConfig.rawSchema).optional(),
|
|
139
123
|
environment: import_zod.z.record(
|
|
140
124
|
import_zod.z.union([
|
|
141
125
|
Environment.rawSchema,
|
|
@@ -151,7 +135,20 @@ var rawSchema8 = commonSchema.extend({
|
|
|
151
135
|
var { schemas: generatedSchemas, factory } = (0, import_Base.default)({
|
|
152
136
|
rawSchema: rawSchema8,
|
|
153
137
|
internalSchema,
|
|
154
|
-
parseErrMsg: (
|
|
138
|
+
parseErrMsg: (_value, previous) => {
|
|
139
|
+
if (previous instanceof import_zod.ZodError) {
|
|
140
|
+
const msgs = previous.errors.reduce(
|
|
141
|
+
(retval, issue) => {
|
|
142
|
+
const path = issue.path.join(" \u2192 ");
|
|
143
|
+
const msg = ` ${path}: ${issue.message}`;
|
|
144
|
+
return [...retval, msg];
|
|
145
|
+
},
|
|
146
|
+
[`Your .taq/config.json file is invalid:`]
|
|
147
|
+
);
|
|
148
|
+
return msgs.join("\n") + "\n";
|
|
149
|
+
}
|
|
150
|
+
return `Your .taq/config.json file is invalid.`;
|
|
151
|
+
},
|
|
155
152
|
unknownErrMsg: "Something went wrong trying to parse your configuration"
|
|
156
153
|
});
|
|
157
154
|
var { create, of, make } = factory;
|
package/Config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Config.ts"],"sourcesContent":["import createType, { Flatten } from '@taqueria/protocol/Base';\nimport * as Contract from '@taqueria/protocol/Contract';\nimport * as Environment from '@taqueria/protocol/Environment';\nimport * as InstalledPlugin from '@taqueria/protocol/InstalledPlugin';\nimport * as MetadataConfig from '@taqueria/protocol/MetadataConfig';\nimport * as NetworkConfig from '@taqueria/protocol/NetworkConfig';\nimport * as SandboxConfig from '@taqueria/protocol/SandboxConfig';\nimport * as Tz from '@taqueria/protocol/Tz';\nimport { z } from 'zod';\n\nexport const pluginsRawSchema = z.preprocess(\n\tval => val ?? [],\n\tz.array(\n\t\tInstalledPlugin.rawSchema,\n\t\t{ description: 'config.plugins' },\n\t),\n);\n\nexport const pluginsInternalSchema = z.preprocess(\n\tval => val ?? [],\n\tz.array(\n\t\tInstalledPlugin.schemas.schema,\n\t\t{ description: 'config.plugins' },\n\t),\n);\n\nconst networkMap = z\n\t.record(\n\t\
|
|
1
|
+
{"version":3,"sources":["Config.ts"],"sourcesContent":["import createType, { Flatten } from '@taqueria/protocol/Base';\nimport * as Contract from '@taqueria/protocol/Contract';\nimport * as Environment from '@taqueria/protocol/Environment';\nimport * as InstalledPlugin from '@taqueria/protocol/InstalledPlugin';\nimport * as MetadataConfig from '@taqueria/protocol/MetadataConfig';\nimport * as NetworkConfig from '@taqueria/protocol/NetworkConfig';\nimport * as SandboxConfig from '@taqueria/protocol/SandboxConfig';\nimport * as Tz from '@taqueria/protocol/Tz';\nimport { z, ZodError } from 'zod';\n\nexport const pluginsRawSchema = z.preprocess(\n\tval => val ?? [],\n\tz.array(\n\t\tInstalledPlugin.rawSchema,\n\t\t{ description: 'config.plugins' },\n\t),\n);\n\nexport const pluginsInternalSchema = z.preprocess(\n\tval => val ?? [],\n\tz.array(\n\t\tInstalledPlugin.schemas.schema,\n\t\t{ description: 'config.plugins' },\n\t),\n);\n\nconst networkMap = z\n\t.record(\n\t\tNetworkConfig.schemas.schema,\n\t\t{ description: 'Network configurations' },\n\t)\n\t.optional();\n\nconst sandboxMap = z\n\t.record(\n\t\tSandboxConfig.schemas.schema,\n\t\t{ description: 'Sandbox configurations' },\n\t)\n\t.optional();\n\nconst environmentMap = z\n\t.record(\n\t\tz.union([\n\t\t\tEnvironment.schemas.schema,\n\t\t\tz.string().min(1, 'Default environment must reference the name of an existing environment.'),\n\t\t]),\n\t\t{ description: 'Environment configurations' },\n\t)\n\t.optional();\n\nconst accountsMap = z.preprocess(\n\t(val: unknown) =>\n\t\tval ?? {\n\t\t\t'bob': '5_000_000_000',\n\t\t\t'alice': '5_000_000_000',\n\t\t\t'john': '5_000_000_000',\n\t\t},\n\tz.record(\n\t\tz.union([Tz.rawSchema, z.number()]),\n\t\t{ description: 'config.accounts' },\n\t),\n);\n\nconst commonSchema = z.object({\n\tlanguage: z.preprocess(\n\t\tval => val ?? 'en',\n\t\tz.union([\n\t\t\tz.literal('en'),\n\t\t\tz.literal('fr'),\n\t\t], { description: 'config.language' })\n\t\t\t.optional(),\n\t),\n\tplugins: pluginsInternalSchema.optional(),\n\tcontractsDir: z\n\t\t.preprocess(\n\t\t\t(val: unknown) => val ?? 'contracts',\n\t\t\tz.string({ description: 'config.contractsDir' })\n\t\t\t\t.min(1, 'config.contractsDir must have a value'),\n\t\t),\n\tartifactsDir: z\n\t\t.preprocess(\n\t\t\t(val: unknown) => val ?? 'artifacts',\n\t\t\tz.string({ description: 'config.artifactsDir' })\n\t\t\t\t.min(1, 'config.artifactsDir must have a value'),\n\t\t),\n\tcontracts: z.record(\n\t\tContract.rawSchema,\n\t).optional(),\n}).describe('config');\n\nexport const internalSchema = commonSchema.extend({\n\tnetwork: networkMap,\n\tsandbox: sandboxMap,\n\tenvironment: environmentMap,\n\taccounts: accountsMap,\n\tcontracts: z.record(Contract.schemas.schema).optional(),\n\tmetadata: MetadataConfig.schemas.schema.optional(),\n});\n\nexport const rawSchema = commonSchema.extend({\n\tplugins: pluginsRawSchema.optional(),\n\tnetwork: z\n\t\t.record(NetworkConfig.rawSchema)\n\t\t.optional(),\n\tsandbox: z\n\t\t.record(SandboxConfig.rawSchema)\n\t\t.optional(),\n\tenvironment: z\n\t\t.record(\n\t\t\tz.union([\n\t\t\t\tEnvironment.rawSchema,\n\t\t\t\tz.string({ description: 'config.environment' })\n\t\t\t\t\t.min(1, 'Default environment must reference the name of an existing environment.'),\n\t\t\t]),\n\t\t)\n\t\t.optional(),\n\taccounts: z\n\t\t.record(\n\t\t\tz.union([Tz.rawSchema, z.number()]),\n\t\t\t{ description: 'config.accounts' },\n\t\t)\n\t\t.optional(),\n\tmetadata: MetadataConfig.rawSchema.optional(),\n}).describe('config');\n\ntype RawInput = z.infer<typeof rawSchema>;\ntype Input = z.infer<typeof internalSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, Input>({\n\trawSchema,\n\tinternalSchema,\n\tparseErrMsg: (_value, previous) => {\n\t\tif (previous instanceof ZodError) {\n\t\t\tconst msgs: string[] = previous.errors.reduce(\n\t\t\t\t(retval, issue) => {\n\t\t\t\t\tconst path = issue.path.join(' → ');\n\t\t\t\t\tconst msg = ` ${path}: ${issue.message}`;\n\t\t\t\t\treturn [...retval, msg];\n\t\t\t\t},\n\t\t\t\t[`Your .taq/config.json file is invalid:`],\n\t\t\t);\n\t\t\treturn msgs.join('\\n') + '\\n';\n\t\t}\n\t\treturn `Your .taq/config.json file is invalid.`;\n\t},\n\tunknownErrMsg: 'Something went wrong trying to parse your configuration',\n});\n\nexport const { create, of, make } = factory;\nexport type Config = z.infer<typeof generatedSchemas.schema>;\nexport type t = Config;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as Config),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAAA;AAAA,EAAA,eAAAC;AAAA;AAAA;AAAA,kBAAoC;AACpC,eAA0B;AAC1B,kBAA6B;AAC7B,sBAAiC;AACjC,qBAAgC;AAChC,oBAA+B;AAC/B,oBAA+B;AAC/B,SAAoB;AACpB,iBAA4B;AAErB,IAAM,mBAAmB,aAAE;AAAA,EACjC,SAAO,OAAO,CAAC;AAAA,EACf,aAAE;AAAA,IACe;AAAA,IAChB,EAAE,aAAa,iBAAiB;AAAA,EACjC;AACD;AAEO,IAAM,wBAAwB,aAAE;AAAA,EACtC,SAAO,OAAO,CAAC;AAAA,EACf,aAAE;AAAA,IACe,wBAAQ;AAAA,IACxB,EAAE,aAAa,iBAAiB;AAAA,EACjC;AACD;AAEA,IAAM,aAAa,aACjB;AAAA,EACc,sBAAQ;AAAA,EACtB,EAAE,aAAa,yBAAyB;AACzC,EACC,SAAS;AAEX,IAAM,aAAa,aACjB;AAAA,EACc,sBAAQ;AAAA,EACtB,EAAE,aAAa,yBAAyB;AACzC,EACC,SAAS;AAEX,IA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CHANGED
|
@@ -7,7 +7,7 @@ import * as MetadataConfig from "@taqueria/protocol/MetadataConfig";
|
|
|
7
7
|
import * as NetworkConfig from "@taqueria/protocol/NetworkConfig";
|
|
8
8
|
import * as SandboxConfig from "@taqueria/protocol/SandboxConfig";
|
|
9
9
|
import * as Tz from "@taqueria/protocol/Tz";
|
|
10
|
-
import { z } from "zod";
|
|
10
|
+
import { z, ZodError } from "zod";
|
|
11
11
|
var pluginsRawSchema = z.preprocess(
|
|
12
12
|
(val) => val ?? [],
|
|
13
13
|
z.array(
|
|
@@ -23,17 +23,11 @@ var pluginsInternalSchema = z.preprocess(
|
|
|
23
23
|
)
|
|
24
24
|
);
|
|
25
25
|
var networkMap = z.record(
|
|
26
|
-
|
|
27
|
-
NetworkConfig.schemas.schema,
|
|
28
|
-
z.string({ description: "config.network" }).nonempty("Default network must reference the name of an existing network configuration.")
|
|
29
|
-
]),
|
|
26
|
+
NetworkConfig.schemas.schema,
|
|
30
27
|
{ description: "Network configurations" }
|
|
31
28
|
).optional();
|
|
32
29
|
var sandboxMap = z.record(
|
|
33
|
-
|
|
34
|
-
SandboxConfig.schemas.schema,
|
|
35
|
-
z.string({ description: "config.sandbox" }).min(1, "Default sandbox must reference the name of an existing sandbox configuration.")
|
|
36
|
-
]),
|
|
30
|
+
SandboxConfig.schemas.schema,
|
|
37
31
|
{ description: "Sandbox configurations" }
|
|
38
32
|
).optional();
|
|
39
33
|
var environmentMap = z.record(
|
|
@@ -85,18 +79,8 @@ var internalSchema = commonSchema.extend({
|
|
|
85
79
|
});
|
|
86
80
|
var rawSchema8 = commonSchema.extend({
|
|
87
81
|
plugins: pluginsRawSchema.optional(),
|
|
88
|
-
network: z.record(
|
|
89
|
-
|
|
90
|
-
NetworkConfig.rawSchema,
|
|
91
|
-
z.string({ description: "config.network" }).min(1, "Default network must reference the name of an existing network configuration.")
|
|
92
|
-
])
|
|
93
|
-
).optional(),
|
|
94
|
-
sandbox: z.record(
|
|
95
|
-
z.union([
|
|
96
|
-
SandboxConfig.rawSchema,
|
|
97
|
-
z.string({ description: "config.sandbox" }).min(1, "Default sandbox must reference the name of an existing sandbox configuration.")
|
|
98
|
-
])
|
|
99
|
-
).optional(),
|
|
82
|
+
network: z.record(NetworkConfig.rawSchema).optional(),
|
|
83
|
+
sandbox: z.record(SandboxConfig.rawSchema).optional(),
|
|
100
84
|
environment: z.record(
|
|
101
85
|
z.union([
|
|
102
86
|
Environment.rawSchema,
|
|
@@ -112,7 +96,20 @@ var rawSchema8 = commonSchema.extend({
|
|
|
112
96
|
var { schemas: generatedSchemas, factory } = createType({
|
|
113
97
|
rawSchema: rawSchema8,
|
|
114
98
|
internalSchema,
|
|
115
|
-
parseErrMsg: (
|
|
99
|
+
parseErrMsg: (_value, previous) => {
|
|
100
|
+
if (previous instanceof ZodError) {
|
|
101
|
+
const msgs = previous.errors.reduce(
|
|
102
|
+
(retval, issue) => {
|
|
103
|
+
const path = issue.path.join(" \u2192 ");
|
|
104
|
+
const msg = ` ${path}: ${issue.message}`;
|
|
105
|
+
return [...retval, msg];
|
|
106
|
+
},
|
|
107
|
+
[`Your .taq/config.json file is invalid:`]
|
|
108
|
+
);
|
|
109
|
+
return msgs.join("\n") + "\n";
|
|
110
|
+
}
|
|
111
|
+
return `Your .taq/config.json file is invalid.`;
|
|
112
|
+
},
|
|
116
113
|
unknownErrMsg: "Something went wrong trying to parse your configuration"
|
|
117
114
|
});
|
|
118
115
|
var { create, of, make } = factory;
|
package/Config.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Config.ts"],"sourcesContent":["import createType, { Flatten } from '@taqueria/protocol/Base';\nimport * as Contract from '@taqueria/protocol/Contract';\nimport * as Environment from '@taqueria/protocol/Environment';\nimport * as InstalledPlugin from '@taqueria/protocol/InstalledPlugin';\nimport * as MetadataConfig from '@taqueria/protocol/MetadataConfig';\nimport * as NetworkConfig from '@taqueria/protocol/NetworkConfig';\nimport * as SandboxConfig from '@taqueria/protocol/SandboxConfig';\nimport * as Tz from '@taqueria/protocol/Tz';\nimport { z } from 'zod';\n\nexport const pluginsRawSchema = z.preprocess(\n\tval => val ?? [],\n\tz.array(\n\t\tInstalledPlugin.rawSchema,\n\t\t{ description: 'config.plugins' },\n\t),\n);\n\nexport const pluginsInternalSchema = z.preprocess(\n\tval => val ?? [],\n\tz.array(\n\t\tInstalledPlugin.schemas.schema,\n\t\t{ description: 'config.plugins' },\n\t),\n);\n\nconst networkMap = z\n\t.record(\n\t\
|
|
1
|
+
{"version":3,"sources":["Config.ts"],"sourcesContent":["import createType, { Flatten } from '@taqueria/protocol/Base';\nimport * as Contract from '@taqueria/protocol/Contract';\nimport * as Environment from '@taqueria/protocol/Environment';\nimport * as InstalledPlugin from '@taqueria/protocol/InstalledPlugin';\nimport * as MetadataConfig from '@taqueria/protocol/MetadataConfig';\nimport * as NetworkConfig from '@taqueria/protocol/NetworkConfig';\nimport * as SandboxConfig from '@taqueria/protocol/SandboxConfig';\nimport * as Tz from '@taqueria/protocol/Tz';\nimport { z, ZodError } from 'zod';\n\nexport const pluginsRawSchema = z.preprocess(\n\tval => val ?? [],\n\tz.array(\n\t\tInstalledPlugin.rawSchema,\n\t\t{ description: 'config.plugins' },\n\t),\n);\n\nexport const pluginsInternalSchema = z.preprocess(\n\tval => val ?? [],\n\tz.array(\n\t\tInstalledPlugin.schemas.schema,\n\t\t{ description: 'config.plugins' },\n\t),\n);\n\nconst networkMap = z\n\t.record(\n\t\tNetworkConfig.schemas.schema,\n\t\t{ description: 'Network configurations' },\n\t)\n\t.optional();\n\nconst sandboxMap = z\n\t.record(\n\t\tSandboxConfig.schemas.schema,\n\t\t{ description: 'Sandbox configurations' },\n\t)\n\t.optional();\n\nconst environmentMap = z\n\t.record(\n\t\tz.union([\n\t\t\tEnvironment.schemas.schema,\n\t\t\tz.string().min(1, 'Default environment must reference the name of an existing environment.'),\n\t\t]),\n\t\t{ description: 'Environment configurations' },\n\t)\n\t.optional();\n\nconst accountsMap = z.preprocess(\n\t(val: unknown) =>\n\t\tval ?? {\n\t\t\t'bob': '5_000_000_000',\n\t\t\t'alice': '5_000_000_000',\n\t\t\t'john': '5_000_000_000',\n\t\t},\n\tz.record(\n\t\tz.union([Tz.rawSchema, z.number()]),\n\t\t{ description: 'config.accounts' },\n\t),\n);\n\nconst commonSchema = z.object({\n\tlanguage: z.preprocess(\n\t\tval => val ?? 'en',\n\t\tz.union([\n\t\t\tz.literal('en'),\n\t\t\tz.literal('fr'),\n\t\t], { description: 'config.language' })\n\t\t\t.optional(),\n\t),\n\tplugins: pluginsInternalSchema.optional(),\n\tcontractsDir: z\n\t\t.preprocess(\n\t\t\t(val: unknown) => val ?? 'contracts',\n\t\t\tz.string({ description: 'config.contractsDir' })\n\t\t\t\t.min(1, 'config.contractsDir must have a value'),\n\t\t),\n\tartifactsDir: z\n\t\t.preprocess(\n\t\t\t(val: unknown) => val ?? 'artifacts',\n\t\t\tz.string({ description: 'config.artifactsDir' })\n\t\t\t\t.min(1, 'config.artifactsDir must have a value'),\n\t\t),\n\tcontracts: z.record(\n\t\tContract.rawSchema,\n\t).optional(),\n}).describe('config');\n\nexport const internalSchema = commonSchema.extend({\n\tnetwork: networkMap,\n\tsandbox: sandboxMap,\n\tenvironment: environmentMap,\n\taccounts: accountsMap,\n\tcontracts: z.record(Contract.schemas.schema).optional(),\n\tmetadata: MetadataConfig.schemas.schema.optional(),\n});\n\nexport const rawSchema = commonSchema.extend({\n\tplugins: pluginsRawSchema.optional(),\n\tnetwork: z\n\t\t.record(NetworkConfig.rawSchema)\n\t\t.optional(),\n\tsandbox: z\n\t\t.record(SandboxConfig.rawSchema)\n\t\t.optional(),\n\tenvironment: z\n\t\t.record(\n\t\t\tz.union([\n\t\t\t\tEnvironment.rawSchema,\n\t\t\t\tz.string({ description: 'config.environment' })\n\t\t\t\t\t.min(1, 'Default environment must reference the name of an existing environment.'),\n\t\t\t]),\n\t\t)\n\t\t.optional(),\n\taccounts: z\n\t\t.record(\n\t\t\tz.union([Tz.rawSchema, z.number()]),\n\t\t\t{ description: 'config.accounts' },\n\t\t)\n\t\t.optional(),\n\tmetadata: MetadataConfig.rawSchema.optional(),\n}).describe('config');\n\ntype RawInput = z.infer<typeof rawSchema>;\ntype Input = z.infer<typeof internalSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, Input>({\n\trawSchema,\n\tinternalSchema,\n\tparseErrMsg: (_value, previous) => {\n\t\tif (previous instanceof ZodError) {\n\t\t\tconst msgs: string[] = previous.errors.reduce(\n\t\t\t\t(retval, issue) => {\n\t\t\t\t\tconst path = issue.path.join(' → ');\n\t\t\t\t\tconst msg = ` ${path}: ${issue.message}`;\n\t\t\t\t\treturn [...retval, msg];\n\t\t\t\t},\n\t\t\t\t[`Your .taq/config.json file is invalid:`],\n\t\t\t);\n\t\t\treturn msgs.join('\\n') + '\\n';\n\t\t}\n\t\treturn `Your .taq/config.json file is invalid.`;\n\t},\n\tunknownErrMsg: 'Something went wrong trying to parse your configuration',\n});\n\nexport const { create, of, make } = factory;\nexport type Config = z.infer<typeof generatedSchemas.schema>;\nexport type t = Config;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as Config),\n};\n"],"mappings":";AAAA,OAAO,gBAA6B;AACpC,YAAY,cAAc;AAC1B,YAAY,iBAAiB;AAC7B,YAAY,qBAAqB;AACjC,YAAY,oBAAoB;AAChC,YAAY,mBAAmB;AAC/B,YAAY,mBAAmB;AAC/B,YAAY,QAAQ;AACpB,SAAS,GAAG,gBAAgB;AAErB,IAAM,mBAAmB,EAAE;AAAA,EACjC,SAAO,OAAO,CAAC;AAAA,EACf,EAAE;AAAA,IACe;AAAA,IAChB,EAAE,aAAa,iBAAiB;AAAA,EACjC;AACD;AAEO,IAAM,wBAAwB,EAAE;AAAA,EACtC,SAAO,OAAO,CAAC;AAAA,EACf,EAAE;AAAA,IACe,wBAAQ;AAAA,IACxB,EAAE,aAAa,iBAAiB;AAAA,EACjC;AAC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AChB,CAAC;AAEM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAI7B,IAAMC,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAa;AAC/D;","names":["rawSchema","schemas"]}
|
package/Contract.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import * as fluture from 'fluture';
|
|
2
|
-
import { TaqError } from './TaqError.js';
|
|
3
1
|
import { z } from 'zod';
|
|
4
|
-
|
|
5
|
-
declare const rawSchema: z.ZodObject<{
|
|
2
|
+
export declare const rawSchema: z.ZodObject<{
|
|
6
3
|
sourceFile: z.ZodString;
|
|
7
4
|
hash: z.ZodString;
|
|
8
5
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -12,7 +9,7 @@ declare const rawSchema: z.ZodObject<{
|
|
|
12
9
|
sourceFile: string;
|
|
13
10
|
hash: string;
|
|
14
11
|
}>;
|
|
15
|
-
declare const internalSchema: z.ZodObject<{
|
|
12
|
+
export declare const internalSchema: z.ZodObject<{
|
|
16
13
|
sourceFile: z.ZodString;
|
|
17
14
|
hash: z.ZodEffects<z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, string & {
|
|
18
15
|
readonly __kind: any;
|
|
@@ -28,9 +25,9 @@ declare const internalSchema: z.ZodObject<{
|
|
|
28
25
|
hash?: any;
|
|
29
26
|
sourceFile: string;
|
|
30
27
|
}>;
|
|
31
|
-
declare type Contract = z.infer<typeof internalSchema>;
|
|
32
|
-
declare type t = Contract;
|
|
33
|
-
declare const create: (input: {
|
|
28
|
+
export declare type Contract = z.infer<typeof internalSchema>;
|
|
29
|
+
export declare type t = Contract;
|
|
30
|
+
export declare const create: (input: {
|
|
34
31
|
sourceFile: string;
|
|
35
32
|
hash: string;
|
|
36
33
|
} | {
|
|
@@ -45,21 +42,19 @@ declare const create: (input: {
|
|
|
45
42
|
};
|
|
46
43
|
} & {
|
|
47
44
|
readonly __kind: any;
|
|
48
|
-
}
|
|
49
|
-
declare const of: (input: unknown) => fluture.FutureInstance<TaqError, {
|
|
45
|
+
}, of: (input: unknown) => import("fluture").FutureInstance<import("./TaqError").TaqError, {
|
|
50
46
|
sourceFile: string;
|
|
51
47
|
hash: string & {
|
|
52
48
|
readonly __kind: any;
|
|
53
49
|
};
|
|
54
50
|
} & {
|
|
55
51
|
readonly __kind: any;
|
|
56
|
-
}
|
|
57
|
-
declare const make: (input: {
|
|
52
|
+
}>, make: (input: {
|
|
58
53
|
sourceFile: string;
|
|
59
54
|
hash: string & {
|
|
60
55
|
readonly __kind: any;
|
|
61
56
|
};
|
|
62
|
-
}) => fluture.FutureInstance<TaqError, {
|
|
57
|
+
}) => import("fluture").FutureInstance<import("./TaqError").TaqError, {
|
|
63
58
|
sourceFile: string;
|
|
64
59
|
hash: string & {
|
|
65
60
|
readonly __kind: any;
|
|
@@ -67,7 +62,7 @@ declare const make: (input: {
|
|
|
67
62
|
} & {
|
|
68
63
|
readonly __kind: any;
|
|
69
64
|
}>;
|
|
70
|
-
declare const schemas: {
|
|
65
|
+
export declare const schemas: {
|
|
71
66
|
schema: z.ZodEffects<z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, {
|
|
72
67
|
sourceFile: string;
|
|
73
68
|
hash: string & {
|
|
@@ -84,5 +79,4 @@ declare const schemas: {
|
|
|
84
79
|
rawSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
85
80
|
internalSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
86
81
|
};
|
|
87
|
-
|
|
88
|
-
export { Contract, create, internalSchema, make, of, rawSchema, schemas, t };
|
|
82
|
+
//# sourceMappingURL=Contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Contract.d.ts","sourceRoot":"","sources":["Contract.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,SAAS;;;;;;;;;EAIpB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;EAGzB,CAAC;AAYH,oBAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,oBAAY,CAAC,GAAG,QAAQ,CAAC;AAEzB,eAAO,MAAQ,MAAM;;;;;;;;;;;;;;;GAAE,EAAE;;;;;;;IAAE,IAAI;;;;;;;;;;;;EAAY,CAAC;AAE5C,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;CAGnB,CAAC"}
|
package/Crypto.d.ts
CHANGED
package/Crypto.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Crypto.d.ts","sourceRoot":"","sources":["Crypto.ts"],"names":[],"mappings":"AAAA,qBAAa,MAAM;IAClB,MAAM,EAAE,YAAY,CAAiB;CACrC"}
|
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
import * as fluture from 'fluture';
|
|
2
|
-
import { TaqError } from './TaqError.js';
|
|
3
1
|
import { z } from 'zod';
|
|
4
|
-
|
|
5
|
-
declare const
|
|
6
|
-
declare const generatedSchemas: {
|
|
2
|
+
export declare const rawSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
3
|
+
export declare const generatedSchemas: {
|
|
7
4
|
rawSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
8
5
|
internalSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
9
6
|
schema: z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, string & {
|
|
10
7
|
readonly __kind: any;
|
|
11
8
|
}, any>;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
make: (input: string) => fluture.FutureInstance<TaqError, string & {
|
|
9
|
+
}, factory: {
|
|
10
|
+
make: (input: string) => import("fluture").FutureInstance<import("./TaqError").TaqError, string & {
|
|
15
11
|
readonly __kind: any;
|
|
16
12
|
}>;
|
|
17
|
-
of: (input: unknown) => fluture.FutureInstance<TaqError, string & {
|
|
13
|
+
of: (input: unknown) => import("fluture").FutureInstance<import("./TaqError").TaqError, string & {
|
|
18
14
|
readonly __kind: any;
|
|
19
15
|
}>;
|
|
20
16
|
create: (input: string) => string & {
|
|
@@ -24,18 +20,16 @@ declare const factory: {
|
|
|
24
20
|
readonly __kind: any;
|
|
25
21
|
};
|
|
26
22
|
};
|
|
27
|
-
declare type EconomicalPrototypeHash = z.infer<typeof generatedSchemas.schema>;
|
|
28
|
-
declare type t = EconomicalPrototypeHash;
|
|
29
|
-
declare const create: (input: string) => string & {
|
|
23
|
+
export declare type EconomicalPrototypeHash = z.infer<typeof generatedSchemas.schema>;
|
|
24
|
+
export declare type t = EconomicalPrototypeHash;
|
|
25
|
+
export declare const create: (input: string) => string & {
|
|
30
26
|
readonly __kind: any;
|
|
31
|
-
}
|
|
32
|
-
declare const of: (input: unknown) => fluture.FutureInstance<TaqError, string & {
|
|
27
|
+
}, of: (input: unknown) => import("fluture").FutureInstance<import("./TaqError").TaqError, string & {
|
|
33
28
|
readonly __kind: any;
|
|
34
|
-
}
|
|
35
|
-
declare const make: (input: string) => fluture.FutureInstance<TaqError, string & {
|
|
29
|
+
}>, make: (input: string) => import("fluture").FutureInstance<import("./TaqError").TaqError, string & {
|
|
36
30
|
readonly __kind: any;
|
|
37
31
|
}>;
|
|
38
|
-
declare const schemas: {
|
|
32
|
+
export declare const schemas: {
|
|
39
33
|
schema: z.ZodEffects<z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, string & {
|
|
40
34
|
readonly __kind: any;
|
|
41
35
|
}, any>, string & {
|
|
@@ -44,5 +38,4 @@ declare const schemas: {
|
|
|
44
38
|
rawSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
45
39
|
internalSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
46
40
|
};
|
|
47
|
-
|
|
48
|
-
export { EconomicalPrototypeHash, create, factory, generatedSchemas, make, of, rawSchema, schemas, t };
|
|
41
|
+
//# sourceMappingURL=EconomicalProtocolHash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EconomicalProtocolHash.d.ts","sourceRoot":"","sources":["EconomicalProtocolHash.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,SAAS,2CAKpB,CAAC;AAIH,eAAO,MAAiB,gBAAgB;;;;;;GAAE,OAAO;;;;;;;;;;;;;CAI/C,CAAC;AAEH,oBAAY,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAC9E,oBAAY,CAAC,GAAG,uBAAuB,CAAC;AAExC,eAAO,MAAQ,MAAM;;GAAE,EAAE;;IAAE,IAAI;;EAAY,CAAC;AAC5C,eAAO,MAAM,OAAO;;;;;;;;CAGnB,CAAC"}
|
package/Environment.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import * as fluture from 'fluture';
|
|
2
|
-
import { TaqError } from './TaqError.js';
|
|
3
1
|
import { Flatten } from '@taqueria/protocol/Base';
|
|
4
2
|
import { z } from 'zod';
|
|
5
|
-
|
|
6
|
-
declare const rawSchema: z.ZodObject<{
|
|
3
|
+
export declare const rawSchema: z.ZodObject<{
|
|
7
4
|
networks: z.ZodArray<z.ZodString, "many">;
|
|
8
5
|
sandboxes: z.ZodArray<z.ZodString, "many">;
|
|
9
6
|
storage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
@@ -19,7 +16,7 @@ declare const rawSchema: z.ZodObject<{
|
|
|
19
16
|
networks: string[];
|
|
20
17
|
sandboxes: string[];
|
|
21
18
|
}>;
|
|
22
|
-
declare const generatedSchemas: {
|
|
19
|
+
export declare const generatedSchemas: {
|
|
23
20
|
rawSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
24
21
|
internalSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
25
22
|
schema: z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, {
|
|
@@ -30,14 +27,13 @@ declare const generatedSchemas: {
|
|
|
30
27
|
} & {
|
|
31
28
|
readonly __kind: any;
|
|
32
29
|
}, any>;
|
|
33
|
-
}
|
|
34
|
-
declare const factory: {
|
|
30
|
+
}, factory: {
|
|
35
31
|
make: (input: {
|
|
36
32
|
storage?: Record<string, any> | undefined;
|
|
37
33
|
aliases?: Record<string, any> | undefined;
|
|
38
34
|
networks: string[];
|
|
39
35
|
sandboxes: string[];
|
|
40
|
-
}) => fluture.FutureInstance<TaqError, {
|
|
36
|
+
}) => import("fluture").FutureInstance<import("./TaqError").TaqError, {
|
|
41
37
|
storage?: Record<string, any> | undefined;
|
|
42
38
|
aliases?: Record<string, any> | undefined;
|
|
43
39
|
networks: string[];
|
|
@@ -45,7 +41,7 @@ declare const factory: {
|
|
|
45
41
|
} & {
|
|
46
42
|
readonly __kind: any;
|
|
47
43
|
}>;
|
|
48
|
-
of: (input: unknown) => fluture.FutureInstance<TaqError, {
|
|
44
|
+
of: (input: unknown) => import("fluture").FutureInstance<import("./TaqError").TaqError, {
|
|
49
45
|
storage?: Record<string, any> | undefined;
|
|
50
46
|
aliases?: Record<string, any> | undefined;
|
|
51
47
|
networks: string[];
|
|
@@ -75,9 +71,9 @@ declare const factory: {
|
|
|
75
71
|
readonly __kind: any;
|
|
76
72
|
};
|
|
77
73
|
};
|
|
78
|
-
declare type Environment = Flatten<z.infer<typeof generatedSchemas.schema>>;
|
|
79
|
-
declare type t = Environment;
|
|
80
|
-
declare const create: (input: {
|
|
74
|
+
export declare type Environment = Flatten<z.infer<typeof generatedSchemas.schema>>;
|
|
75
|
+
export declare type t = Environment;
|
|
76
|
+
export declare const create: (input: {
|
|
81
77
|
storage?: Record<string, any> | undefined;
|
|
82
78
|
aliases?: Record<string, any> | undefined;
|
|
83
79
|
networks: string[];
|
|
@@ -89,29 +85,26 @@ declare const create: (input: {
|
|
|
89
85
|
sandboxes: string[];
|
|
90
86
|
} & {
|
|
91
87
|
readonly __kind: any;
|
|
92
|
-
}
|
|
93
|
-
declare const make: (input: {
|
|
88
|
+
}, make: (input: {
|
|
94
89
|
storage?: Record<string, any> | undefined;
|
|
95
90
|
aliases?: Record<string, any> | undefined;
|
|
96
91
|
networks: string[];
|
|
97
92
|
sandboxes: string[];
|
|
98
|
-
}) => fluture.FutureInstance<TaqError, {
|
|
93
|
+
}) => import("fluture").FutureInstance<import("./TaqError").TaqError, {
|
|
99
94
|
storage?: Record<string, any> | undefined;
|
|
100
95
|
aliases?: Record<string, any> | undefined;
|
|
101
96
|
networks: string[];
|
|
102
97
|
sandboxes: string[];
|
|
103
98
|
} & {
|
|
104
99
|
readonly __kind: any;
|
|
105
|
-
}
|
|
106
|
-
declare const of: (input: unknown) => fluture.FutureInstance<TaqError, {
|
|
100
|
+
}>, of: (input: unknown) => import("fluture").FutureInstance<import("./TaqError").TaqError, {
|
|
107
101
|
storage?: Record<string, any> | undefined;
|
|
108
102
|
aliases?: Record<string, any> | undefined;
|
|
109
103
|
networks: string[];
|
|
110
104
|
sandboxes: string[];
|
|
111
105
|
} & {
|
|
112
106
|
readonly __kind: any;
|
|
113
|
-
}
|
|
114
|
-
declare const from: (input: unknown) => {
|
|
107
|
+
}>, from: (input: unknown) => {
|
|
115
108
|
storage?: Record<string, any> | undefined;
|
|
116
109
|
aliases?: Record<string, any> | undefined;
|
|
117
110
|
networks: string[];
|
|
@@ -119,7 +112,7 @@ declare const from: (input: unknown) => {
|
|
|
119
112
|
} & {
|
|
120
113
|
readonly __kind: any;
|
|
121
114
|
};
|
|
122
|
-
declare const schemas: {
|
|
115
|
+
export declare const schemas: {
|
|
123
116
|
schema: z.ZodEffects<z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, {
|
|
124
117
|
storage?: Record<string, any> | undefined;
|
|
125
118
|
aliases?: Record<string, any> | undefined;
|
|
@@ -138,5 +131,4 @@ declare const schemas: {
|
|
|
138
131
|
rawSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
139
132
|
internalSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
140
133
|
};
|
|
141
|
-
|
|
142
|
-
export { Environment, create, factory, from, generatedSchemas, make, of, rawSchema, schemas, t };
|
|
134
|
+
//# sourceMappingURL=Environment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Environment.d.ts","sourceRoot":"","sources":["Environment.ts"],"names":[],"mappings":"AAAA,OAAmB,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;EAkBW,CAAC;AAIlC,eAAO,MAAiB,gBAAgB;;;;;;;;;;;GAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI/C,CAAC;AAEH,oBAAY,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;AAC3E,oBAAY,CAAC,GAAG,WAAW,CAAC;AAE5B,eAAO,MAAQ,MAAM;;;;;;;;;;;;GAAE,IAAI;;;;;;;;;;;;IAAE,EAAE;;;;;;;IAAE,IAAI;;;;;;;CAAY,CAAC;AAElD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;CAGnB,CAAC"}
|