@taqueria/protocol 0.14.4 → 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 -63
- 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/Operation.js
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
// Operation.ts
|
|
27
|
+
var Operation_exports = {};
|
|
28
|
+
__export(Operation_exports, {
|
|
29
|
+
create: () => create,
|
|
30
|
+
factory: () => factory,
|
|
31
|
+
generatedSchemas: () => generatedSchemas,
|
|
32
|
+
internalSchema: () => internalSchema,
|
|
33
|
+
make: () => make,
|
|
34
|
+
of: () => of,
|
|
35
|
+
rawSchema: () => rawSchema6,
|
|
36
|
+
schemas: () => schemas6
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(Operation_exports);
|
|
39
|
+
var import_Base = __toESM(require("@taqueria/protocol/Base"));
|
|
40
|
+
var Command = __toESM(require("@taqueria/protocol/Command"));
|
|
41
|
+
var Option = __toESM(require("@taqueria/protocol/Option"));
|
|
42
|
+
var PersistentState = __toESM(require("@taqueria/protocol/PersistentState"));
|
|
43
|
+
var PositionalArg = __toESM(require("@taqueria/protocol/PositionalArg"));
|
|
44
|
+
var RequestArgs = __toESM(require("@taqueria/protocol/RequestArgs"));
|
|
45
|
+
var Verb = __toESM(require("@taqueria/protocol/Verb"));
|
|
46
|
+
var import_zod = require("zod");
|
|
47
|
+
var rawSchema6 = import_zod.z.object({
|
|
48
|
+
operation: Verb.rawSchema.describe("Operation Name"),
|
|
49
|
+
command: Command.rawSchema.describe("Operation Command"),
|
|
50
|
+
description: import_zod.z.string({ description: "Operation Description" }).optional(),
|
|
51
|
+
positionals: import_zod.z.array(PositionalArg.rawSchema).default([]).describe("Operation Positional Args").optional(),
|
|
52
|
+
options: import_zod.z.preprocess(
|
|
53
|
+
(val) => val ?? [],
|
|
54
|
+
import_zod.z.array(
|
|
55
|
+
Option.rawSchema.describe("Operation Option"),
|
|
56
|
+
{ description: "Operation Options" }
|
|
57
|
+
).optional()
|
|
58
|
+
),
|
|
59
|
+
handler: import_zod.z.function().args(PersistentState.rawSchema).returns(
|
|
60
|
+
import_zod.z.function().args(RequestArgs.schemas.internalSchema)
|
|
61
|
+
).describe("Operation Handler").transform((val) => val)
|
|
62
|
+
}).describe("Operation");
|
|
63
|
+
var internalSchema = import_zod.z.object({
|
|
64
|
+
operation: Verb.schemas.schema.describe("Operation Name"),
|
|
65
|
+
command: Command.schemas.schema.describe("Operation Command"),
|
|
66
|
+
description: import_zod.z.string({ description: "Optionation Description" }).optional(),
|
|
67
|
+
positionals: import_zod.z.array(PositionalArg.schemas.schema).default([]).describe("Operation Positional Args").optional(),
|
|
68
|
+
options: import_zod.z.preprocess(
|
|
69
|
+
(val) => val ?? [],
|
|
70
|
+
import_zod.z.array(Option.schemas.schema.describe("Operation Option"), { description: "Operation Options" }).optional()
|
|
71
|
+
),
|
|
72
|
+
handler: import_zod.z.function().args(PersistentState.rawSchema).returns(
|
|
73
|
+
import_zod.z.function().args(RequestArgs.schemas.schema)
|
|
74
|
+
).describe("Operation Handler").transform((val) => val)
|
|
75
|
+
}).describe("Operation");
|
|
76
|
+
var { schemas: generatedSchemas, factory } = (0, import_Base.default)({
|
|
77
|
+
rawSchema: rawSchema6,
|
|
78
|
+
internalSchema,
|
|
79
|
+
parseErrMsg: (value) => `The following operation is invalid: ${value}`,
|
|
80
|
+
unknownErrMsg: "Something went wrong trying to parse the operation"
|
|
81
|
+
});
|
|
82
|
+
var { make, of, create } = factory;
|
|
83
|
+
var schemas6 = {
|
|
84
|
+
...generatedSchemas,
|
|
85
|
+
schema: generatedSchemas.schema.transform((val) => val)
|
|
86
|
+
};
|
|
87
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
88
|
+
0 && (module.exports = {
|
|
89
|
+
create,
|
|
90
|
+
factory,
|
|
91
|
+
generatedSchemas,
|
|
92
|
+
internalSchema,
|
|
93
|
+
make,
|
|
94
|
+
of,
|
|
95
|
+
rawSchema,
|
|
96
|
+
schemas
|
|
97
|
+
});
|
|
98
|
+
//# sourceMappingURL=Operation.js.map
|
package/Operation.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["Operation.ts"],"sourcesContent":["import createType, { Flatten } from '@taqueria/protocol/Base';\nimport * as Command from '@taqueria/protocol/Command';\nimport * as Option from '@taqueria/protocol/Option';\nimport * as PersistentState from '@taqueria/protocol/PersistentState';\nimport * as PositionalArg from '@taqueria/protocol/PositionalArg';\nimport * as RequestArgs from '@taqueria/protocol/RequestArgs';\nimport * as Verb from '@taqueria/protocol/Verb';\nimport { z } from 'zod';\n\ntype Handler = (state: PersistentState.t) => <T extends RequestArgs.t>(opts: T) => unknown;\n\nexport const rawSchema = z.object({\n\toperation: Verb.rawSchema.describe('Operation Name'),\n\tcommand: Command.rawSchema.describe('Operation Command'),\n\tdescription: z.string({ description: 'Operation Description' }).optional(),\n\tpositionals: z.array(PositionalArg.rawSchema).default([]).describe('Operation Positional Args').optional(),\n\toptions: z.preprocess(\n\t\t(val: unknown) => val ?? [],\n\t\tz.array(\n\t\t\tOption.rawSchema.describe('Operation Option'),\n\t\t\t{ description: 'Operation Options' },\n\t\t).optional(),\n\t),\n\thandler: z.function()\n\t\t.args(PersistentState.rawSchema)\n\t\t.returns(\n\t\t\tz.function()\n\t\t\t\t.args(RequestArgs.schemas.internalSchema),\n\t\t)\n\t\t.describe('Operation Handler')\n\t\t.transform((val: unknown) => val as Handler),\n}).describe('Operation');\n\nexport const internalSchema = z.object({\n\toperation: Verb.schemas.schema.describe('Operation Name'),\n\tcommand: Command.schemas.schema.describe('Operation Command'),\n\tdescription: z.string({ description: 'Optionation Description' }).optional(),\n\tpositionals: z.array(PositionalArg.schemas.schema).default([]).describe('Operation Positional Args').optional(),\n\toptions: z.preprocess(\n\t\t(val: unknown) => val ?? [] as Option.t[],\n\t\tz.array(Option.schemas.schema.describe('Operation Option'), { description: 'Operation Options' }).optional(),\n\t),\n\thandler: z.function()\n\t\t.args(PersistentState.rawSchema)\n\t\t.returns(\n\t\t\tz.function()\n\t\t\t\t.args(RequestArgs.schemas.schema),\n\t\t)\n\t\t.describe('Operation Handler')\n\t\t.transform((val: unknown) => val as Handler),\n}).describe('Operation');\n\ntype Input = Flatten<z.infer<typeof internalSchema>>;\ntype RawInput = z.infer<typeof rawSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, Input>({\n\trawSchema,\n\tinternalSchema,\n\tparseErrMsg: (value: unknown) => `The following operation is invalid: ${value}`,\n\tunknownErrMsg: 'Something went wrong trying to parse the operation',\n});\n\nexport type Operation = Flatten<z.infer<typeof generatedSchemas.schema>>;\nexport type t = Operation;\nexport const { make, of, create } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as Operation),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAAA;AAAA,EAAA,eAAAC;AAAA;AAAA;AAAA,kBAAoC;AACpC,cAAyB;AACzB,aAAwB;AACxB,sBAAiC;AACjC,oBAA+B;AAC/B,kBAA6B;AAC7B,WAAsB;AACtB,iBAAkB;AAIX,IAAMD,aAAY,aAAE,OAAO;AAAA,EACjC,WAAgB,eAAU,SAAS,gBAAgB;AAAA,EACnD,SAAiB,kBAAU,SAAS,mBAAmB;AAAA,EACvD,aAAa,aAAE,OAAO,EAAE,aAAa,wBAAwB,CAAC,EAAE,SAAS;AAAA,EACzE,aAAa,aAAE,MAAoB,uBAAS,EAAE,QAAQ,CAAC,CAAC,EAAE,SAAS,2BAA2B,EAAE,SAAS;AAAA,EACzG,SAAS,aAAE;AAAA,IACV,CAAC,QAAiB,OAAO,CAAC;AAAA,IAC1B,aAAE;AAAA,MACM,iBAAU,SAAS,kBAAkB;AAAA,MAC5C,EAAE,aAAa,oBAAoB;AAAA,IACpC,EAAE,SAAS;AAAA,EACZ;AAAA,EACA,SAAS,aAAE,SAAS,EAClB,KAAqB,yBAAS,EAC9B;AAAA,IACA,aAAE,SAAS,EACT,KAAiB,oBAAQ,cAAc;AAAA,EAC1C,EACC,SAAS,mBAAmB,EAC5B,UAAU,CAAC,QAAiB,GAAc;AAC7C,CAAC,EAAE,SAAS,WAAW;AAEhB,IAAM,iBAAiB,aAAE,OAAO;AAAA,EACtC,WAAgB,aAAQ,OAAO,SAAS,gBAAgB;AAAA,EACxD,SAAiB,gBAAQ,OAAO,SAAS,mBAAmB;AAAA,EAC5D,aAAa,aAAE,OAAO,EAAE,aAAa,0BAA0B,CAAC,EAAE,SAAS;AAAA,EAC3E,aAAa,aAAE,MAAoB,sBAAQ,MAAM,EAAE,QAAQ,CAAC,CAAC,EAAE,SAAS,2BAA2B,EAAE,SAAS;AAAA,EAC9G,SAAS,aAAE;AAAA,IACV,CAAC,QAAiB,OAAO,CAAC;AAAA,IAC1B,aAAE,MAAa,eAAQ,OAAO,SAAS,kBAAkB,GAAG,EAAE,aAAa,oBAAoB,CAAC,EAAE,SAAS;AAAA,EAC5G;AAAA,EACA,SAAS,aAAE,SAAS,EAClB,KAAqB,yBAAS,EAC9B;AAAA,IACA,aAAE,SAAS,EACT,KAAiB,oBAAQ,MAAM;AAAA,EAClC,EACC,SAAS,mBAAmB,EAC5B,UAAU,CAAC,QAAiB,GAAc;AAC7C,CAAC,EAAE,SAAS,WAAW;AAKhB,IAAM,EAAE,SAAS,kBAAkB,QAAQ,QAAI,YAAAE,SAA4B;AAAA,EACjF,WAAAF;AAAA,EACA;AAAA,EACA,aAAa,CAAC,UAAmB,uCAAuC;AAAA,EACxE,eAAe;AAChB,CAAC;AAIM,IAAM,EAAE,MAAM,IAAI,OAAO,IAAI;AAE7B,IAAMC,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAgB;AAClE;","names":["rawSchema","schemas","createType"]}
|
package/Operation.mjs
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// Operation.ts
|
|
2
|
+
import createType from "@taqueria/protocol/Base";
|
|
3
|
+
import * as Command from "@taqueria/protocol/Command";
|
|
4
|
+
import * as Option from "@taqueria/protocol/Option";
|
|
5
|
+
import * as PersistentState from "@taqueria/protocol/PersistentState";
|
|
6
|
+
import * as PositionalArg from "@taqueria/protocol/PositionalArg";
|
|
7
|
+
import * as RequestArgs from "@taqueria/protocol/RequestArgs";
|
|
8
|
+
import * as Verb from "@taqueria/protocol/Verb";
|
|
9
|
+
import { z } from "zod";
|
|
10
|
+
var rawSchema6 = z.object({
|
|
11
|
+
operation: Verb.rawSchema.describe("Operation Name"),
|
|
12
|
+
command: Command.rawSchema.describe("Operation Command"),
|
|
13
|
+
description: z.string({ description: "Operation Description" }).optional(),
|
|
14
|
+
positionals: z.array(PositionalArg.rawSchema).default([]).describe("Operation Positional Args").optional(),
|
|
15
|
+
options: z.preprocess(
|
|
16
|
+
(val) => val ?? [],
|
|
17
|
+
z.array(
|
|
18
|
+
Option.rawSchema.describe("Operation Option"),
|
|
19
|
+
{ description: "Operation Options" }
|
|
20
|
+
).optional()
|
|
21
|
+
),
|
|
22
|
+
handler: z.function().args(PersistentState.rawSchema).returns(
|
|
23
|
+
z.function().args(RequestArgs.schemas.internalSchema)
|
|
24
|
+
).describe("Operation Handler").transform((val) => val)
|
|
25
|
+
}).describe("Operation");
|
|
26
|
+
var internalSchema = z.object({
|
|
27
|
+
operation: Verb.schemas.schema.describe("Operation Name"),
|
|
28
|
+
command: Command.schemas.schema.describe("Operation Command"),
|
|
29
|
+
description: z.string({ description: "Optionation Description" }).optional(),
|
|
30
|
+
positionals: z.array(PositionalArg.schemas.schema).default([]).describe("Operation Positional Args").optional(),
|
|
31
|
+
options: z.preprocess(
|
|
32
|
+
(val) => val ?? [],
|
|
33
|
+
z.array(Option.schemas.schema.describe("Operation Option"), { description: "Operation Options" }).optional()
|
|
34
|
+
),
|
|
35
|
+
handler: z.function().args(PersistentState.rawSchema).returns(
|
|
36
|
+
z.function().args(RequestArgs.schemas.schema)
|
|
37
|
+
).describe("Operation Handler").transform((val) => val)
|
|
38
|
+
}).describe("Operation");
|
|
39
|
+
var { schemas: generatedSchemas, factory } = createType({
|
|
40
|
+
rawSchema: rawSchema6,
|
|
41
|
+
internalSchema,
|
|
42
|
+
parseErrMsg: (value) => `The following operation is invalid: ${value}`,
|
|
43
|
+
unknownErrMsg: "Something went wrong trying to parse the operation"
|
|
44
|
+
});
|
|
45
|
+
var { make, of, create } = factory;
|
|
46
|
+
var schemas6 = {
|
|
47
|
+
...generatedSchemas,
|
|
48
|
+
schema: generatedSchemas.schema.transform((val) => val)
|
|
49
|
+
};
|
|
50
|
+
export {
|
|
51
|
+
create,
|
|
52
|
+
factory,
|
|
53
|
+
generatedSchemas,
|
|
54
|
+
internalSchema,
|
|
55
|
+
make,
|
|
56
|
+
of,
|
|
57
|
+
rawSchema6 as rawSchema,
|
|
58
|
+
schemas6 as schemas
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=Operation.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["Operation.ts"],"sourcesContent":["import createType, { Flatten } from '@taqueria/protocol/Base';\nimport * as Command from '@taqueria/protocol/Command';\nimport * as Option from '@taqueria/protocol/Option';\nimport * as PersistentState from '@taqueria/protocol/PersistentState';\nimport * as PositionalArg from '@taqueria/protocol/PositionalArg';\nimport * as RequestArgs from '@taqueria/protocol/RequestArgs';\nimport * as Verb from '@taqueria/protocol/Verb';\nimport { z } from 'zod';\n\ntype Handler = (state: PersistentState.t) => <T extends RequestArgs.t>(opts: T) => unknown;\n\nexport const rawSchema = z.object({\n\toperation: Verb.rawSchema.describe('Operation Name'),\n\tcommand: Command.rawSchema.describe('Operation Command'),\n\tdescription: z.string({ description: 'Operation Description' }).optional(),\n\tpositionals: z.array(PositionalArg.rawSchema).default([]).describe('Operation Positional Args').optional(),\n\toptions: z.preprocess(\n\t\t(val: unknown) => val ?? [],\n\t\tz.array(\n\t\t\tOption.rawSchema.describe('Operation Option'),\n\t\t\t{ description: 'Operation Options' },\n\t\t).optional(),\n\t),\n\thandler: z.function()\n\t\t.args(PersistentState.rawSchema)\n\t\t.returns(\n\t\t\tz.function()\n\t\t\t\t.args(RequestArgs.schemas.internalSchema),\n\t\t)\n\t\t.describe('Operation Handler')\n\t\t.transform((val: unknown) => val as Handler),\n}).describe('Operation');\n\nexport const internalSchema = z.object({\n\toperation: Verb.schemas.schema.describe('Operation Name'),\n\tcommand: Command.schemas.schema.describe('Operation Command'),\n\tdescription: z.string({ description: 'Optionation Description' }).optional(),\n\tpositionals: z.array(PositionalArg.schemas.schema).default([]).describe('Operation Positional Args').optional(),\n\toptions: z.preprocess(\n\t\t(val: unknown) => val ?? [] as Option.t[],\n\t\tz.array(Option.schemas.schema.describe('Operation Option'), { description: 'Operation Options' }).optional(),\n\t),\n\thandler: z.function()\n\t\t.args(PersistentState.rawSchema)\n\t\t.returns(\n\t\t\tz.function()\n\t\t\t\t.args(RequestArgs.schemas.schema),\n\t\t)\n\t\t.describe('Operation Handler')\n\t\t.transform((val: unknown) => val as Handler),\n}).describe('Operation');\n\ntype Input = Flatten<z.infer<typeof internalSchema>>;\ntype RawInput = z.infer<typeof rawSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, Input>({\n\trawSchema,\n\tinternalSchema,\n\tparseErrMsg: (value: unknown) => `The following operation is invalid: ${value}`,\n\tunknownErrMsg: 'Something went wrong trying to parse the operation',\n});\n\nexport type Operation = Flatten<z.infer<typeof generatedSchemas.schema>>;\nexport type t = Operation;\nexport const { make, of, create } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as Operation),\n};\n"],"mappings":";AAAA,OAAO,gBAA6B;AACpC,YAAY,aAAa;AACzB,YAAY,YAAY;AACxB,YAAY,qBAAqB;AACjC,YAAY,mBAAmB;AAC/B,YAAY,iBAAiB;AAC7B,YAAY,UAAU;AACtB,SAAS,SAAS;AAIX,IAAMA,aAAY,EAAE,OAAO;AAAA,EACjC,WAAgB,eAAU,SAAS,gBAAgB;AAAA,EACnD,SAAiB,kBAAU,SAAS,mBAAmB;AAAA,EACvD,aAAa,EAAE,OAAO,EAAE,aAAa,wBAAwB,CAAC,EAAE,SAAS;AAAA,EACzE,aAAa,EAAE,MAAoB,uBAAS,EAAE,QAAQ,CAAC,CAAC,EAAE,SAAS,2BAA2B,EAAE,SAAS;AAAA,EACzG,SAAS,EAAE;AAAA,IACV,CAAC,QAAiB,OAAO,CAAC;AAAA,IAC1B,EAAE;AAAA,MACM,iBAAU,SAAS,kBAAkB;AAAA,MAC5C,EAAE,aAAa,oBAAoB;AAAA,IACpC,EAAE,SAAS;AAAA,EACZ;AAAA,EACA,SAAS,EAAE,SAAS,EAClB,KAAqB,yBAAS,EAC9B;AAAA,IACA,EAAE,SAAS,EACT,KAAiB,oBAAQ,cAAc;AAAA,EAC1C,EACC,SAAS,mBAAmB,EAC5B,UAAU,CAAC,QAAiB,GAAc;AAC7C,CAAC,EAAE,SAAS,WAAW;AAEhB,IAAM,iBAAiB,EAAE,OAAO;AAAA,EACtC,WAAgB,aAAQ,OAAO,SAAS,gBAAgB;AAAA,EACxD,SAAiB,gBAAQ,OAAO,SAAS,mBAAmB;AAAA,EAC5D,aAAa,EAAE,OAAO,EAAE,aAAa,0BAA0B,CAAC,EAAE,SAAS;AAAA,EAC3E,aAAa,EAAE,MAAoB,sBAAQ,MAAM,EAAE,QAAQ,CAAC,CAAC,EAAE,SAAS,2BAA2B,EAAE,SAAS;AAAA,EAC9G,SAAS,EAAE;AAAA,IACV,CAAC,QAAiB,OAAO,CAAC;AAAA,IAC1B,EAAE,MAAa,eAAQ,OAAO,SAAS,kBAAkB,GAAG,EAAE,aAAa,oBAAoB,CAAC,EAAE,SAAS;AAAA,EAC5G;AAAA,EACA,SAAS,EAAE,SAAS,EAClB,KAAqB,yBAAS,EAC9B;AAAA,IACA,EAAE,SAAS,EACT,KAAiB,oBAAQ,MAAM;AAAA,EAClC,EACC,SAAS,mBAAmB,EAC5B,UAAU,CAAC,QAAiB,GAAc;AAC7C,CAAC,EAAE,SAAS,WAAW;AAKhB,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,MAAM,IAAI,OAAO,IAAI;AAE7B,IAAMC,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAgB;AAClE;","names":["rawSchema","schemas"]}
|
package/Option.d.ts
ADDED
|
@@ -0,0 +1,316 @@
|
|
|
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 internalSchema: z.ZodObject<{
|
|
7
|
+
shortFlag: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, string & {
|
|
8
|
+
readonly __kind: any;
|
|
9
|
+
}, any>, string & {
|
|
10
|
+
readonly __kind: any;
|
|
11
|
+
}, any>>;
|
|
12
|
+
flag: z.ZodEffects<z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, string & {
|
|
13
|
+
readonly __kind: any;
|
|
14
|
+
}, any>, string & {
|
|
15
|
+
readonly __kind: any;
|
|
16
|
+
}, any>;
|
|
17
|
+
description: z.ZodString;
|
|
18
|
+
defaultValue: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
19
|
+
choices: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
20
|
+
required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
21
|
+
boolean: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
22
|
+
type: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"string">, z.ZodLiteral<"number">, z.ZodLiteral<"boolean">]>>;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
boolean?: boolean | undefined;
|
|
25
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
26
|
+
shortFlag?: (string & {
|
|
27
|
+
readonly __kind: any;
|
|
28
|
+
}) | undefined;
|
|
29
|
+
defaultValue?: string | number | boolean | undefined;
|
|
30
|
+
choices?: string[] | undefined;
|
|
31
|
+
required?: boolean | undefined;
|
|
32
|
+
description: string;
|
|
33
|
+
flag: string & {
|
|
34
|
+
readonly __kind: any;
|
|
35
|
+
};
|
|
36
|
+
}, {
|
|
37
|
+
boolean?: boolean | undefined;
|
|
38
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
39
|
+
shortFlag?: any;
|
|
40
|
+
flag?: any;
|
|
41
|
+
defaultValue?: string | number | boolean | undefined;
|
|
42
|
+
choices?: string[] | undefined;
|
|
43
|
+
required?: boolean | undefined;
|
|
44
|
+
description: string;
|
|
45
|
+
}>;
|
|
46
|
+
declare const rawSchema: z.ZodObject<{
|
|
47
|
+
shortFlag: z.ZodOptional<z.ZodString>;
|
|
48
|
+
flag: z.ZodString;
|
|
49
|
+
description: z.ZodString;
|
|
50
|
+
defaultValue: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
51
|
+
choices: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
52
|
+
required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
53
|
+
boolean: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
54
|
+
type: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"string">, z.ZodLiteral<"number">, z.ZodLiteral<"boolean">]>>;
|
|
55
|
+
}, "strip", z.ZodTypeAny, {
|
|
56
|
+
boolean?: boolean | undefined;
|
|
57
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
58
|
+
shortFlag?: string | undefined;
|
|
59
|
+
defaultValue?: string | number | boolean | undefined;
|
|
60
|
+
choices?: string[] | undefined;
|
|
61
|
+
required?: boolean | undefined;
|
|
62
|
+
description: string;
|
|
63
|
+
flag: string;
|
|
64
|
+
}, {
|
|
65
|
+
boolean?: boolean | undefined;
|
|
66
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
67
|
+
shortFlag?: string | undefined;
|
|
68
|
+
defaultValue?: string | number | boolean | undefined;
|
|
69
|
+
choices?: string[] | undefined;
|
|
70
|
+
required?: boolean | undefined;
|
|
71
|
+
description: string;
|
|
72
|
+
flag: string;
|
|
73
|
+
}>;
|
|
74
|
+
declare const generatedSchemas: {
|
|
75
|
+
rawSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
76
|
+
internalSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
77
|
+
schema: z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, {
|
|
78
|
+
boolean?: boolean | undefined;
|
|
79
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
80
|
+
shortFlag?: (string & {
|
|
81
|
+
readonly __kind: any;
|
|
82
|
+
}) | undefined;
|
|
83
|
+
defaultValue?: string | number | boolean | undefined;
|
|
84
|
+
choices?: string[] | undefined;
|
|
85
|
+
required?: boolean | undefined;
|
|
86
|
+
description: string;
|
|
87
|
+
flag: string & {
|
|
88
|
+
readonly __kind: any;
|
|
89
|
+
};
|
|
90
|
+
} & {
|
|
91
|
+
readonly __kind: any;
|
|
92
|
+
}, any>;
|
|
93
|
+
};
|
|
94
|
+
declare const factory: {
|
|
95
|
+
make: (input: {
|
|
96
|
+
boolean?: boolean | undefined;
|
|
97
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
98
|
+
shortFlag?: (string & {
|
|
99
|
+
readonly __kind: any;
|
|
100
|
+
}) | undefined;
|
|
101
|
+
defaultValue?: string | number | boolean | undefined;
|
|
102
|
+
choices?: string[] | undefined;
|
|
103
|
+
required?: boolean | undefined;
|
|
104
|
+
description: string;
|
|
105
|
+
flag: string & {
|
|
106
|
+
readonly __kind: any;
|
|
107
|
+
};
|
|
108
|
+
}) => fluture.FutureInstance<TaqError, {
|
|
109
|
+
boolean?: boolean | undefined;
|
|
110
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
111
|
+
shortFlag?: (string & {
|
|
112
|
+
readonly __kind: any;
|
|
113
|
+
}) | undefined;
|
|
114
|
+
defaultValue?: string | number | boolean | undefined;
|
|
115
|
+
choices?: string[] | undefined;
|
|
116
|
+
required?: boolean | undefined;
|
|
117
|
+
description: string;
|
|
118
|
+
flag: string & {
|
|
119
|
+
readonly __kind: any;
|
|
120
|
+
};
|
|
121
|
+
} & {
|
|
122
|
+
readonly __kind: any;
|
|
123
|
+
}>;
|
|
124
|
+
of: (input: unknown) => fluture.FutureInstance<TaqError, {
|
|
125
|
+
boolean?: boolean | undefined;
|
|
126
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
127
|
+
shortFlag?: (string & {
|
|
128
|
+
readonly __kind: any;
|
|
129
|
+
}) | undefined;
|
|
130
|
+
defaultValue?: string | number | boolean | undefined;
|
|
131
|
+
choices?: string[] | undefined;
|
|
132
|
+
required?: boolean | undefined;
|
|
133
|
+
description: string;
|
|
134
|
+
flag: string & {
|
|
135
|
+
readonly __kind: any;
|
|
136
|
+
};
|
|
137
|
+
} & {
|
|
138
|
+
readonly __kind: any;
|
|
139
|
+
}>;
|
|
140
|
+
create: (input: {
|
|
141
|
+
boolean?: boolean | undefined;
|
|
142
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
143
|
+
shortFlag?: (string & {
|
|
144
|
+
readonly __kind: any;
|
|
145
|
+
}) | undefined;
|
|
146
|
+
defaultValue?: string | number | boolean | undefined;
|
|
147
|
+
choices?: string[] | undefined;
|
|
148
|
+
required?: boolean | undefined;
|
|
149
|
+
description: string;
|
|
150
|
+
flag: string & {
|
|
151
|
+
readonly __kind: any;
|
|
152
|
+
};
|
|
153
|
+
} | {
|
|
154
|
+
boolean?: boolean | undefined;
|
|
155
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
156
|
+
shortFlag?: string | undefined;
|
|
157
|
+
defaultValue?: string | number | boolean | undefined;
|
|
158
|
+
choices?: string[] | undefined;
|
|
159
|
+
required?: boolean | undefined;
|
|
160
|
+
description: string;
|
|
161
|
+
flag: string;
|
|
162
|
+
}) => {
|
|
163
|
+
boolean?: boolean | undefined;
|
|
164
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
165
|
+
shortFlag?: (string & {
|
|
166
|
+
readonly __kind: any;
|
|
167
|
+
}) | undefined;
|
|
168
|
+
defaultValue?: string | number | boolean | undefined;
|
|
169
|
+
choices?: string[] | undefined;
|
|
170
|
+
required?: boolean | undefined;
|
|
171
|
+
description: string;
|
|
172
|
+
flag: string & {
|
|
173
|
+
readonly __kind: any;
|
|
174
|
+
};
|
|
175
|
+
} & {
|
|
176
|
+
readonly __kind: any;
|
|
177
|
+
};
|
|
178
|
+
from: (input: unknown) => {
|
|
179
|
+
boolean?: boolean | undefined;
|
|
180
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
181
|
+
shortFlag?: (string & {
|
|
182
|
+
readonly __kind: any;
|
|
183
|
+
}) | undefined;
|
|
184
|
+
defaultValue?: string | number | boolean | undefined;
|
|
185
|
+
choices?: string[] | undefined;
|
|
186
|
+
required?: boolean | undefined;
|
|
187
|
+
description: string;
|
|
188
|
+
flag: string & {
|
|
189
|
+
readonly __kind: any;
|
|
190
|
+
};
|
|
191
|
+
} & {
|
|
192
|
+
readonly __kind: any;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
declare type Option = Flatten<z.infer<typeof generatedSchemas.schema>>;
|
|
196
|
+
declare type t = Option;
|
|
197
|
+
declare const make: (input: {
|
|
198
|
+
boolean?: boolean | undefined;
|
|
199
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
200
|
+
shortFlag?: (string & {
|
|
201
|
+
readonly __kind: any;
|
|
202
|
+
}) | undefined;
|
|
203
|
+
defaultValue?: string | number | boolean | undefined;
|
|
204
|
+
choices?: string[] | undefined;
|
|
205
|
+
required?: boolean | undefined;
|
|
206
|
+
description: string;
|
|
207
|
+
flag: string & {
|
|
208
|
+
readonly __kind: any;
|
|
209
|
+
};
|
|
210
|
+
}) => fluture.FutureInstance<TaqError, {
|
|
211
|
+
boolean?: boolean | undefined;
|
|
212
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
213
|
+
shortFlag?: (string & {
|
|
214
|
+
readonly __kind: any;
|
|
215
|
+
}) | undefined;
|
|
216
|
+
defaultValue?: string | number | boolean | undefined;
|
|
217
|
+
choices?: string[] | undefined;
|
|
218
|
+
required?: boolean | undefined;
|
|
219
|
+
description: string;
|
|
220
|
+
flag: string & {
|
|
221
|
+
readonly __kind: any;
|
|
222
|
+
};
|
|
223
|
+
} & {
|
|
224
|
+
readonly __kind: any;
|
|
225
|
+
}>;
|
|
226
|
+
declare const create: (input: {
|
|
227
|
+
boolean?: boolean | undefined;
|
|
228
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
229
|
+
shortFlag?: (string & {
|
|
230
|
+
readonly __kind: any;
|
|
231
|
+
}) | undefined;
|
|
232
|
+
defaultValue?: string | number | boolean | undefined;
|
|
233
|
+
choices?: string[] | undefined;
|
|
234
|
+
required?: boolean | undefined;
|
|
235
|
+
description: string;
|
|
236
|
+
flag: string & {
|
|
237
|
+
readonly __kind: any;
|
|
238
|
+
};
|
|
239
|
+
} | {
|
|
240
|
+
boolean?: boolean | undefined;
|
|
241
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
242
|
+
shortFlag?: string | undefined;
|
|
243
|
+
defaultValue?: string | number | boolean | undefined;
|
|
244
|
+
choices?: string[] | undefined;
|
|
245
|
+
required?: boolean | undefined;
|
|
246
|
+
description: string;
|
|
247
|
+
flag: string;
|
|
248
|
+
}) => {
|
|
249
|
+
boolean?: boolean | undefined;
|
|
250
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
251
|
+
shortFlag?: (string & {
|
|
252
|
+
readonly __kind: any;
|
|
253
|
+
}) | undefined;
|
|
254
|
+
defaultValue?: string | number | boolean | undefined;
|
|
255
|
+
choices?: string[] | undefined;
|
|
256
|
+
required?: boolean | undefined;
|
|
257
|
+
description: string;
|
|
258
|
+
flag: string & {
|
|
259
|
+
readonly __kind: any;
|
|
260
|
+
};
|
|
261
|
+
} & {
|
|
262
|
+
readonly __kind: any;
|
|
263
|
+
};
|
|
264
|
+
declare const of: (input: unknown) => fluture.FutureInstance<TaqError, {
|
|
265
|
+
boolean?: boolean | undefined;
|
|
266
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
267
|
+
shortFlag?: (string & {
|
|
268
|
+
readonly __kind: any;
|
|
269
|
+
}) | undefined;
|
|
270
|
+
defaultValue?: string | number | boolean | undefined;
|
|
271
|
+
choices?: string[] | undefined;
|
|
272
|
+
required?: boolean | undefined;
|
|
273
|
+
description: string;
|
|
274
|
+
flag: string & {
|
|
275
|
+
readonly __kind: any;
|
|
276
|
+
};
|
|
277
|
+
} & {
|
|
278
|
+
readonly __kind: any;
|
|
279
|
+
}>;
|
|
280
|
+
declare const schemas: {
|
|
281
|
+
schema: z.ZodEffects<z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, {
|
|
282
|
+
boolean?: boolean | undefined;
|
|
283
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
284
|
+
shortFlag?: (string & {
|
|
285
|
+
readonly __kind: any;
|
|
286
|
+
}) | undefined;
|
|
287
|
+
defaultValue?: string | number | boolean | undefined;
|
|
288
|
+
choices?: string[] | undefined;
|
|
289
|
+
required?: boolean | undefined;
|
|
290
|
+
description: string;
|
|
291
|
+
flag: string & {
|
|
292
|
+
readonly __kind: any;
|
|
293
|
+
};
|
|
294
|
+
} & {
|
|
295
|
+
readonly __kind: any;
|
|
296
|
+
}, any>, Flatten<{
|
|
297
|
+
boolean?: boolean | undefined;
|
|
298
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
299
|
+
shortFlag?: (string & {
|
|
300
|
+
readonly __kind: any;
|
|
301
|
+
}) | undefined;
|
|
302
|
+
defaultValue?: string | number | boolean | undefined;
|
|
303
|
+
choices?: string[] | undefined;
|
|
304
|
+
required?: boolean | undefined;
|
|
305
|
+
description: string;
|
|
306
|
+
flag: string & {
|
|
307
|
+
readonly __kind: any;
|
|
308
|
+
};
|
|
309
|
+
} & {
|
|
310
|
+
readonly __kind: any;
|
|
311
|
+
}>, any>;
|
|
312
|
+
rawSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
313
|
+
internalSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
export { Option, create, factory, generatedSchemas, internalSchema, make, of, rawSchema, schemas, t };
|
package/Option.js
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
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
|
+
// Option.ts
|
|
27
|
+
var Option_exports = {};
|
|
28
|
+
__export(Option_exports, {
|
|
29
|
+
create: () => create,
|
|
30
|
+
factory: () => factory,
|
|
31
|
+
generatedSchemas: () => generatedSchemas,
|
|
32
|
+
internalSchema: () => internalSchema,
|
|
33
|
+
make: () => make,
|
|
34
|
+
of: () => of,
|
|
35
|
+
rawSchema: () => rawSchema3,
|
|
36
|
+
schemas: () => schemas3
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(Option_exports);
|
|
39
|
+
var import_Base = __toESM(require("@taqueria/protocol/Base"));
|
|
40
|
+
var SingleChar = __toESM(require("@taqueria/protocol/SingleChar"));
|
|
41
|
+
var Verb = __toESM(require("@taqueria/protocol/Verb"));
|
|
42
|
+
var import_zod = require("zod");
|
|
43
|
+
var internalSchema = import_zod.z.object({
|
|
44
|
+
shortFlag: SingleChar.schemas.schema.describe("Option Short Flag").optional(),
|
|
45
|
+
flag: Verb.schemas.schema.describe("Option Long Flag"),
|
|
46
|
+
description: import_zod.z.string({ description: "Option Description" }).min(1),
|
|
47
|
+
defaultValue: import_zod.z.union(
|
|
48
|
+
[import_zod.z.string(), import_zod.z.number(), import_zod.z.boolean()],
|
|
49
|
+
{ description: "Option Default Value" }
|
|
50
|
+
).optional(),
|
|
51
|
+
choices: import_zod.z.array(
|
|
52
|
+
import_zod.z.string({ description: "Option Choice" }),
|
|
53
|
+
{ description: "Option Choices" }
|
|
54
|
+
).optional(),
|
|
55
|
+
required: import_zod.z.boolean({ description: "Option Is Required" }).default(false).optional(),
|
|
56
|
+
boolean: import_zod.z.boolean({ description: "Option Is Boolean" }).default(false).optional(),
|
|
57
|
+
type: import_zod.z.union(
|
|
58
|
+
[import_zod.z.literal("string"), import_zod.z.literal("number"), import_zod.z.literal("boolean")],
|
|
59
|
+
{ description: "Positional Arg Datatype" }
|
|
60
|
+
).optional()
|
|
61
|
+
}).describe("Option");
|
|
62
|
+
var rawSchema3 = import_zod.z.object({
|
|
63
|
+
shortFlag: SingleChar.rawSchema.describe("Option Short Flag").optional(),
|
|
64
|
+
flag: Verb.rawSchema.describe("Option Long Flag"),
|
|
65
|
+
description: import_zod.z.string({ description: "Option Description" }).min(1),
|
|
66
|
+
defaultValue: import_zod.z.union(
|
|
67
|
+
[import_zod.z.string(), import_zod.z.number(), import_zod.z.boolean()],
|
|
68
|
+
{ description: "Option Default Value" }
|
|
69
|
+
).optional(),
|
|
70
|
+
choices: import_zod.z.array(
|
|
71
|
+
import_zod.z.string({ description: "Option Choice" }),
|
|
72
|
+
{ description: "Option Choices" }
|
|
73
|
+
).optional(),
|
|
74
|
+
required: import_zod.z.boolean({ description: "Option Is Required" }).default(false).optional(),
|
|
75
|
+
boolean: import_zod.z.boolean({ description: "Option Is Boolean" }).default(false).optional(),
|
|
76
|
+
type: import_zod.z.union(
|
|
77
|
+
[import_zod.z.literal("string"), import_zod.z.literal("number"), import_zod.z.literal("boolean")],
|
|
78
|
+
{ description: "Positional Arg Datatype" }
|
|
79
|
+
).optional()
|
|
80
|
+
}).describe("Option");
|
|
81
|
+
var { schemas: generatedSchemas, factory } = (0, import_Base.default)({
|
|
82
|
+
rawSchema: rawSchema3,
|
|
83
|
+
internalSchema,
|
|
84
|
+
parseErrMsg: (value) => `The following option is invalid: ${value}`,
|
|
85
|
+
unknownErrMsg: "Something went wrong trying to parse the option"
|
|
86
|
+
});
|
|
87
|
+
var { make, create, of } = factory;
|
|
88
|
+
var schemas3 = {
|
|
89
|
+
...generatedSchemas,
|
|
90
|
+
schema: generatedSchemas.schema.transform((val) => val)
|
|
91
|
+
};
|
|
92
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
93
|
+
0 && (module.exports = {
|
|
94
|
+
create,
|
|
95
|
+
factory,
|
|
96
|
+
generatedSchemas,
|
|
97
|
+
internalSchema,
|
|
98
|
+
make,
|
|
99
|
+
of,
|
|
100
|
+
rawSchema,
|
|
101
|
+
schemas
|
|
102
|
+
});
|
|
103
|
+
//# sourceMappingURL=Option.js.map
|
package/Option.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["Option.ts"],"sourcesContent":["import createType, { Flatten } from '@taqueria/protocol/Base';\nimport * as SingleChar from '@taqueria/protocol/SingleChar';\nimport * as Verb from '@taqueria/protocol/Verb';\nimport { z } from 'zod';\n\nexport const internalSchema = z.object({\n\tshortFlag: SingleChar.schemas.schema.describe('Option Short Flag').optional(),\n\tflag: Verb.schemas.schema.describe('Option Long Flag'),\n\tdescription: z.string({ description: 'Option Description' }).min(1),\n\tdefaultValue: z.union(\n\t\t[z.string(), z.number(), z.boolean()],\n\t\t{ description: 'Option Default Value' },\n\t).optional(),\n\tchoices: z.array(\n\t\tz.string({ description: 'Option Choice' }),\n\t\t{ description: 'Option Choices' },\n\t).optional(),\n\trequired: z.boolean({ description: 'Option Is Required' }).default(false).optional(),\n\tboolean: z.boolean({ description: 'Option Is Boolean' }).default(false).optional(),\n\ttype: z.union(\n\t\t[z.literal('string'), z.literal('number'), z.literal('boolean')],\n\t\t{ description: 'Positional Arg Datatype' },\n\t).optional(),\n}).describe('Option');\n\nexport const rawSchema = z.object({\n\tshortFlag: SingleChar.rawSchema.describe('Option Short Flag').optional(),\n\tflag: Verb.rawSchema.describe('Option Long Flag'),\n\tdescription: z.string({ description: 'Option Description' }).min(1),\n\tdefaultValue: z.union(\n\t\t[z.string(), z.number(), z.boolean()],\n\t\t{ description: 'Option Default Value' },\n\t).optional(),\n\tchoices: z.array(\n\t\tz.string({ description: 'Option Choice' }),\n\t\t{ description: 'Option Choices' },\n\t).optional(),\n\trequired: z.boolean({ description: 'Option Is Required' }).default(false).optional(),\n\tboolean: z.boolean({ description: 'Option Is Boolean' }).default(false).optional(),\n\ttype: z.union(\n\t\t[z.literal('string'), z.literal('number'), z.literal('boolean')],\n\t\t{ description: 'Positional Arg Datatype' },\n\t).optional(),\n}).describe('Option');\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: unknown) => `The following option is invalid: ${value}`,\n\tunknownErrMsg: 'Something went wrong trying to parse the option',\n});\n\nexport type Option = Flatten<z.infer<typeof generatedSchemas.schema>>;\nexport type t = Option;\n\nexport const { make, create, of } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as Option),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAAA;AAAA,EAAA,eAAAC;AAAA;AAAA;AAAA,kBAAoC;AACpC,iBAA4B;AAC5B,WAAsB;AACtB,iBAAkB;AAEX,IAAM,iBAAiB,aAAE,OAAO;AAAA,EACtC,WAAsB,mBAAQ,OAAO,SAAS,mBAAmB,EAAE,SAAS;AAAA,EAC5E,MAAW,aAAQ,OAAO,SAAS,kBAAkB;AAAA,EACrD,aAAa,aAAE,OAAO,EAAE,aAAa,qBAAqB,CAAC,EAAE,IAAI,CAAC;AAAA,EAClE,cAAc,aAAE;AAAA,IACf,CAAC,aAAE,OAAO,GAAG,aAAE,OAAO,GAAG,aAAE,QAAQ,CAAC;AAAA,IACpC,EAAE,aAAa,uBAAuB;AAAA,EACvC,EAAE,SAAS;AAAA,EACX,SAAS,aAAE;AAAA,IACV,aAAE,OAAO,EAAE,aAAa,gBAAgB,CAAC;AAAA,IACzC,EAAE,aAAa,iBAAiB;AAAA,EACjC,EAAE,SAAS;AAAA,EACX,UAAU,aAAE,QAAQ,EAAE,aAAa,qBAAqB,CAAC,EAAE,QAAQ,KAAK,EAAE,SAAS;AAAA,EACnF,SAAS,aAAE,QAAQ,EAAE,aAAa,oBAAoB,CAAC,EAAE,QAAQ,KAAK,EAAE,SAAS;AAAA,EACjF,MAAM,aAAE;AAAA,IACP,CAAC,aAAE,QAAQ,QAAQ,GAAG,aAAE,QAAQ,QAAQ,GAAG,aAAE,QAAQ,SAAS,CAAC;AAAA,IAC/D,EAAE,aAAa,0BAA0B;AAAA,EAC1C,EAAE,SAAS;AACZ,CAAC,EAAE,SAAS,QAAQ;AAEb,IAAMD,aAAY,aAAE,OAAO;AAAA,EACjC,WAAsB,qBAAU,SAAS,mBAAmB,EAAE,SAAS;AAAA,EACvE,MAAW,eAAU,SAAS,kBAAkB;AAAA,EAChD,aAAa,aAAE,OAAO,EAAE,aAAa,qBAAqB,CAAC,EAAE,IAAI,CAAC;AAAA,EAClE,cAAc,aAAE;AAAA,IACf,CAAC,aAAE,OAAO,GAAG,aAAE,OAAO,GAAG,aAAE,QAAQ,CAAC;AAAA,IACpC,EAAE,aAAa,uBAAuB;AAAA,EACvC,EAAE,SAAS;AAAA,EACX,SAAS,aAAE;AAAA,IACV,aAAE,OAAO,EAAE,aAAa,gBAAgB,CAAC;AAAA,IACzC,EAAE,aAAa,iBAAiB;AAAA,EACjC,EAAE,SAAS;AAAA,EACX,UAAU,aAAE,QAAQ,EAAE,aAAa,qBAAqB,CAAC,EAAE,QAAQ,KAAK,EAAE,SAAS;AAAA,EACnF,SAAS,aAAE,QAAQ,EAAE,aAAa,oBAAoB,CAAC,EAAE,QAAQ,KAAK,EAAE,SAAS;AAAA,EACjF,MAAM,aAAE;AAAA,IACP,CAAC,aAAE,QAAQ,QAAQ,GAAG,aAAE,QAAQ,QAAQ,GAAG,aAAE,QAAQ,SAAS,CAAC;AAAA,IAC/D,EAAE,aAAa,0BAA0B;AAAA,EAC1C,EAAE,SAAS;AACZ,CAAC,EAAE,SAAS,QAAQ;AAKb,IAAM,EAAE,SAAS,kBAAkB,QAAQ,QAAI,YAAAE,SAA4B;AAAA,EACjF,WAAAF;AAAA,EACA;AAAA,EACA,aAAa,CAAC,UAAmB,oCAAoC;AAAA,EACrE,eAAe;AAChB,CAAC;AAKM,IAAM,EAAE,MAAM,QAAQ,GAAG,IAAI;AAE7B,IAAMC,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAa;AAC/D;","names":["rawSchema","schemas","createType"]}
|
package/Option.mjs
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// Option.ts
|
|
2
|
+
import createType from "@taqueria/protocol/Base";
|
|
3
|
+
import * as SingleChar from "@taqueria/protocol/SingleChar";
|
|
4
|
+
import * as Verb from "@taqueria/protocol/Verb";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
var internalSchema = z.object({
|
|
7
|
+
shortFlag: SingleChar.schemas.schema.describe("Option Short Flag").optional(),
|
|
8
|
+
flag: Verb.schemas.schema.describe("Option Long Flag"),
|
|
9
|
+
description: z.string({ description: "Option Description" }).min(1),
|
|
10
|
+
defaultValue: z.union(
|
|
11
|
+
[z.string(), z.number(), z.boolean()],
|
|
12
|
+
{ description: "Option Default Value" }
|
|
13
|
+
).optional(),
|
|
14
|
+
choices: z.array(
|
|
15
|
+
z.string({ description: "Option Choice" }),
|
|
16
|
+
{ description: "Option Choices" }
|
|
17
|
+
).optional(),
|
|
18
|
+
required: z.boolean({ description: "Option Is Required" }).default(false).optional(),
|
|
19
|
+
boolean: z.boolean({ description: "Option Is Boolean" }).default(false).optional(),
|
|
20
|
+
type: z.union(
|
|
21
|
+
[z.literal("string"), z.literal("number"), z.literal("boolean")],
|
|
22
|
+
{ description: "Positional Arg Datatype" }
|
|
23
|
+
).optional()
|
|
24
|
+
}).describe("Option");
|
|
25
|
+
var rawSchema3 = z.object({
|
|
26
|
+
shortFlag: SingleChar.rawSchema.describe("Option Short Flag").optional(),
|
|
27
|
+
flag: Verb.rawSchema.describe("Option Long Flag"),
|
|
28
|
+
description: z.string({ description: "Option Description" }).min(1),
|
|
29
|
+
defaultValue: z.union(
|
|
30
|
+
[z.string(), z.number(), z.boolean()],
|
|
31
|
+
{ description: "Option Default Value" }
|
|
32
|
+
).optional(),
|
|
33
|
+
choices: z.array(
|
|
34
|
+
z.string({ description: "Option Choice" }),
|
|
35
|
+
{ description: "Option Choices" }
|
|
36
|
+
).optional(),
|
|
37
|
+
required: z.boolean({ description: "Option Is Required" }).default(false).optional(),
|
|
38
|
+
boolean: z.boolean({ description: "Option Is Boolean" }).default(false).optional(),
|
|
39
|
+
type: z.union(
|
|
40
|
+
[z.literal("string"), z.literal("number"), z.literal("boolean")],
|
|
41
|
+
{ description: "Positional Arg Datatype" }
|
|
42
|
+
).optional()
|
|
43
|
+
}).describe("Option");
|
|
44
|
+
var { schemas: generatedSchemas, factory } = createType({
|
|
45
|
+
rawSchema: rawSchema3,
|
|
46
|
+
internalSchema,
|
|
47
|
+
parseErrMsg: (value) => `The following option is invalid: ${value}`,
|
|
48
|
+
unknownErrMsg: "Something went wrong trying to parse the option"
|
|
49
|
+
});
|
|
50
|
+
var { make, create, of } = factory;
|
|
51
|
+
var schemas3 = {
|
|
52
|
+
...generatedSchemas,
|
|
53
|
+
schema: generatedSchemas.schema.transform((val) => val)
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
create,
|
|
57
|
+
factory,
|
|
58
|
+
generatedSchemas,
|
|
59
|
+
internalSchema,
|
|
60
|
+
make,
|
|
61
|
+
of,
|
|
62
|
+
rawSchema3 as rawSchema,
|
|
63
|
+
schemas3 as schemas
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=Option.mjs.map
|