@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/PluginSchema.js
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
// PluginSchema.ts
|
|
27
|
+
var PluginSchema_exports = {};
|
|
28
|
+
__export(PluginSchema_exports, {
|
|
29
|
+
create: () => create,
|
|
30
|
+
factory: () => factory,
|
|
31
|
+
generatedSchemas: () => generatedSchemas,
|
|
32
|
+
make: () => make,
|
|
33
|
+
of: () => of,
|
|
34
|
+
rawSchema: () => rawSchema4,
|
|
35
|
+
schemas: () => schemas6
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(PluginSchema_exports);
|
|
38
|
+
var Alias = __toESM(require("@taqueria/protocol/Alias"));
|
|
39
|
+
var import_Base = __toESM(require("@taqueria/protocol/Base"));
|
|
40
|
+
var Operation = __toESM(require("@taqueria/protocol/Operation"));
|
|
41
|
+
var PluginDependenciesResponse = __toESM(require("@taqueria/protocol/PluginDependenciesResponse"));
|
|
42
|
+
var PluginInfo = __toESM(require("@taqueria/protocol/PluginInfo"));
|
|
43
|
+
var PluginProxyResponse = __toESM(require("@taqueria/protocol/PluginProxyResponse"));
|
|
44
|
+
var RequestArgs = __toESM(require("@taqueria/protocol/RequestArgs"));
|
|
45
|
+
var Template = __toESM(require("@taqueria/protocol/Template"));
|
|
46
|
+
var import_zod = require("zod");
|
|
47
|
+
var proxyFnSchema = import_zod.z.function().args(RequestArgs.proxySchemas.schema).returns(import_zod.z.promise(PluginProxyResponse.schemas.schema));
|
|
48
|
+
var runtimeDependenciesFn = import_zod.z.function().args(RequestArgs.schemas.schema).returns(import_zod.z.promise(PluginDependenciesResponse.schemas.schema));
|
|
49
|
+
var internalSchema2 = PluginInfo.internalSchema.extend({
|
|
50
|
+
operations: import_zod.z.preprocess(
|
|
51
|
+
(val) => val ?? [],
|
|
52
|
+
import_zod.z.array(
|
|
53
|
+
Operation.schemas.schema,
|
|
54
|
+
{ description: "ParsedOperations" }
|
|
55
|
+
).optional()
|
|
56
|
+
),
|
|
57
|
+
templates: import_zod.z.preprocess(
|
|
58
|
+
(val) => val ?? [],
|
|
59
|
+
import_zod.z.array(
|
|
60
|
+
Template.schemas.schema
|
|
61
|
+
).optional()
|
|
62
|
+
),
|
|
63
|
+
proxy: proxyFnSchema.optional(),
|
|
64
|
+
checkRuntimeDependencies: runtimeDependenciesFn.optional(),
|
|
65
|
+
installRuntimeDependencies: runtimeDependenciesFn.optional()
|
|
66
|
+
}).describe("ParsedPluginInfo");
|
|
67
|
+
var rawSchema4 = PluginInfo.rawSchema.extend({
|
|
68
|
+
name: Alias.rawSchema.optional(),
|
|
69
|
+
operations: import_zod.z.preprocess(
|
|
70
|
+
(val) => val ?? [],
|
|
71
|
+
import_zod.z.array(
|
|
72
|
+
Operation.rawSchema,
|
|
73
|
+
{ description: "ParsedOperation" }
|
|
74
|
+
)
|
|
75
|
+
).optional(),
|
|
76
|
+
templates: import_zod.z.preprocess(
|
|
77
|
+
(val) => val ?? [],
|
|
78
|
+
import_zod.z.array(
|
|
79
|
+
Template.schemas.schema
|
|
80
|
+
).optional()
|
|
81
|
+
),
|
|
82
|
+
proxy: proxyFnSchema.optional(),
|
|
83
|
+
checkRuntimeDependencies: runtimeDependenciesFn.optional(),
|
|
84
|
+
installRuntimeDependencies: runtimeDependenciesFn.optional()
|
|
85
|
+
}).describe("ParsedPluginInfo");
|
|
86
|
+
var { schemas: generatedSchemas, factory } = (0, import_Base.default)({
|
|
87
|
+
rawSchema: rawSchema4,
|
|
88
|
+
internalSchema: internalSchema2,
|
|
89
|
+
parseErrMsg: (value) => `The following plugin info gave us trouble when parsing the following plugin information: ${value}`,
|
|
90
|
+
unknownErrMsg: "Something went wrong trying to parse the plugin information"
|
|
91
|
+
});
|
|
92
|
+
var { create, of, make } = factory;
|
|
93
|
+
var schemas6 = {
|
|
94
|
+
...generatedSchemas,
|
|
95
|
+
schema: generatedSchemas.schema.transform((val) => val)
|
|
96
|
+
};
|
|
97
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
98
|
+
0 && (module.exports = {
|
|
99
|
+
create,
|
|
100
|
+
factory,
|
|
101
|
+
generatedSchemas,
|
|
102
|
+
make,
|
|
103
|
+
of,
|
|
104
|
+
rawSchema,
|
|
105
|
+
schemas
|
|
106
|
+
});
|
|
107
|
+
//# sourceMappingURL=PluginSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["PluginSchema.ts"],"sourcesContent":["import * as Alias from '@taqueria/protocol/Alias';\nimport createType from '@taqueria/protocol/Base';\nimport * as Operation from '@taqueria/protocol/Operation';\nimport * as PluginDependenciesResponse from '@taqueria/protocol/PluginDependenciesResponse';\nimport * as PluginInfo from '@taqueria/protocol/PluginInfo';\nimport * as PluginProxyResponse from '@taqueria/protocol/PluginProxyResponse';\nimport * as RequestArgs from '@taqueria/protocol/RequestArgs';\nimport * as Template from '@taqueria/protocol/Template';\nimport { z } from 'zod';\n\nconst proxyFnSchema = z\n\t.function()\n\t.args(RequestArgs.proxySchemas.schema)\n\t.returns(z.promise(PluginProxyResponse.schemas.schema));\n\nconst runtimeDependenciesFn = z\n\t.function()\n\t.args(RequestArgs.schemas.schema)\n\t.returns(z.promise(PluginDependenciesResponse.schemas.schema));\n\nconst internalSchema = PluginInfo.internalSchema.extend({\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tOperation.schemas.schema,\n\t\t\t{ description: 'ParsedOperations' },\n\t\t)\n\t\t\t.optional(),\n\t),\n\ttemplates: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tTemplate.schemas.schema,\n\t\t).optional(),\n\t),\n\tproxy: proxyFnSchema.optional(),\n\tcheckRuntimeDependencies: runtimeDependenciesFn.optional(),\n\tinstallRuntimeDependencies: runtimeDependenciesFn.optional(),\n}).describe('ParsedPluginInfo');\n\nexport const rawSchema = PluginInfo.rawSchema.extend({\n\tname: Alias.rawSchema.optional(),\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tOperation.rawSchema,\n\t\t\t{ description: 'ParsedOperation' },\n\t\t),\n\t)\n\t\t.optional(),\n\ttemplates: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tTemplate.schemas.schema,\n\t\t).optional(),\n\t),\n\tproxy: proxyFnSchema.optional(),\n\tcheckRuntimeDependencies: runtimeDependenciesFn.optional(),\n\tinstallRuntimeDependencies: runtimeDependenciesFn.optional(),\n}).describe('ParsedPluginInfo');\n\ntype Input = z.infer<typeof internalSchema>;\n\nexport type RawPluginSchema = z.infer<typeof rawSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawPluginSchema, Input>({\n\trawSchema,\n\tinternalSchema,\n\tparseErrMsg: (value: unknown) =>\n\t\t`The following plugin info gave us trouble when parsing the following plugin information: ${value}`,\n\tunknownErrMsg: 'Something went wrong trying to parse the plugin information',\n});\n\nexport type ParsedPluginInfo = z.infer<typeof generatedSchemas.schema>;\nexport type t = ParsedPluginInfo;\nexport const { create, of, make } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as ParsedPluginInfo),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAAA;AAAA,EAAA,eAAAC;AAAA;AAAA;AAAA,YAAuB;AACvB,kBAAuB;AACvB,gBAA2B;AAC3B,iCAA4C;AAC5C,iBAA4B;AAC5B,0BAAqC;AACrC,kBAA6B;AAC7B,eAA0B;AAC1B,iBAAkB;AAElB,IAAM,gBAAgB,aACpB,SAAS,EACT,KAAiB,yBAAa,MAAM,EACpC,QAAQ,aAAE,QAA4B,4BAAQ,MAAM,CAAC;AAEvD,IAAM,wBAAwB,aAC5B,SAAS,EACT,KAAiB,oBAAQ,MAAM,EAC/B,QAAQ,aAAE,QAAmC,mCAAQ,MAAM,CAAC;AAE9D,IAAMC,kBAA4B,0BAAe,OAAO;AAAA,EACvD,YAAY,aAAE;AAAA,IACb,SAAO,OAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACS,kBAAQ;AAAA,MAClB,EAAE,aAAa,mBAAmB;AAAA,IACnC,EACE,SAAS;AAAA,EACZ;AAAA,EACA,WAAW,aAAE;AAAA,IACZ,SAAO,OAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACQ,iBAAQ;AAAA,IAClB,EAAE,SAAS;AAAA,EACZ;AAAA,EACA,OAAO,cAAc,SAAS;AAAA,EAC9B,0BAA0B,sBAAsB,SAAS;AAAA,EACzD,4BAA4B,sBAAsB,SAAS;AAC5D,CAAC,EAAE,SAAS,kBAAkB;AAEvB,IAAMF,aAAuB,qBAAU,OAAO;AAAA,EACpD,MAAY,gBAAU,SAAS;AAAA,EAC/B,YAAY,aAAE;AAAA,IACb,SAAO,OAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACS;AAAA,MACV,EAAE,aAAa,kBAAkB;AAAA,IAClC;AAAA,EACD,EACE,SAAS;AAAA,EACX,WAAW,aAAE;AAAA,IACZ,SAAO,OAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACQ,iBAAQ;AAAA,IAClB,EAAE,SAAS;AAAA,EACZ;AAAA,EACA,OAAO,cAAc,SAAS;AAAA,EAC9B,0BAA0B,sBAAsB,SAAS;AAAA,EACzD,4BAA4B,sBAAsB,SAAS;AAC5D,CAAC,EAAE,SAAS,kBAAkB;AAMvB,IAAM,EAAE,SAAS,kBAAkB,QAAQ,QAAI,YAAAG,SAAmC;AAAA,EACxF,WAAAH;AAAA,EACA,gBAAAE;AAAA,EACA,aAAa,CAAC,UACb,4FAA4F;AAAA,EAC7F,eAAe;AAChB,CAAC;AAIM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAE7B,IAAMD,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAuB;AACzE;","names":["rawSchema","schemas","internalSchema","createType"]}
|
package/PluginSchema.mjs
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// PluginSchema.ts
|
|
2
|
+
import * as Alias from "@taqueria/protocol/Alias";
|
|
3
|
+
import createType from "@taqueria/protocol/Base";
|
|
4
|
+
import * as Operation from "@taqueria/protocol/Operation";
|
|
5
|
+
import * as PluginDependenciesResponse from "@taqueria/protocol/PluginDependenciesResponse";
|
|
6
|
+
import * as PluginInfo from "@taqueria/protocol/PluginInfo";
|
|
7
|
+
import * as PluginProxyResponse from "@taqueria/protocol/PluginProxyResponse";
|
|
8
|
+
import * as RequestArgs from "@taqueria/protocol/RequestArgs";
|
|
9
|
+
import * as Template from "@taqueria/protocol/Template";
|
|
10
|
+
import { z } from "zod";
|
|
11
|
+
var proxyFnSchema = z.function().args(RequestArgs.proxySchemas.schema).returns(z.promise(PluginProxyResponse.schemas.schema));
|
|
12
|
+
var runtimeDependenciesFn = z.function().args(RequestArgs.schemas.schema).returns(z.promise(PluginDependenciesResponse.schemas.schema));
|
|
13
|
+
var internalSchema2 = PluginInfo.internalSchema.extend({
|
|
14
|
+
operations: z.preprocess(
|
|
15
|
+
(val) => val ?? [],
|
|
16
|
+
z.array(
|
|
17
|
+
Operation.schemas.schema,
|
|
18
|
+
{ description: "ParsedOperations" }
|
|
19
|
+
).optional()
|
|
20
|
+
),
|
|
21
|
+
templates: z.preprocess(
|
|
22
|
+
(val) => val ?? [],
|
|
23
|
+
z.array(
|
|
24
|
+
Template.schemas.schema
|
|
25
|
+
).optional()
|
|
26
|
+
),
|
|
27
|
+
proxy: proxyFnSchema.optional(),
|
|
28
|
+
checkRuntimeDependencies: runtimeDependenciesFn.optional(),
|
|
29
|
+
installRuntimeDependencies: runtimeDependenciesFn.optional()
|
|
30
|
+
}).describe("ParsedPluginInfo");
|
|
31
|
+
var rawSchema4 = PluginInfo.rawSchema.extend({
|
|
32
|
+
name: Alias.rawSchema.optional(),
|
|
33
|
+
operations: z.preprocess(
|
|
34
|
+
(val) => val ?? [],
|
|
35
|
+
z.array(
|
|
36
|
+
Operation.rawSchema,
|
|
37
|
+
{ description: "ParsedOperation" }
|
|
38
|
+
)
|
|
39
|
+
).optional(),
|
|
40
|
+
templates: z.preprocess(
|
|
41
|
+
(val) => val ?? [],
|
|
42
|
+
z.array(
|
|
43
|
+
Template.schemas.schema
|
|
44
|
+
).optional()
|
|
45
|
+
),
|
|
46
|
+
proxy: proxyFnSchema.optional(),
|
|
47
|
+
checkRuntimeDependencies: runtimeDependenciesFn.optional(),
|
|
48
|
+
installRuntimeDependencies: runtimeDependenciesFn.optional()
|
|
49
|
+
}).describe("ParsedPluginInfo");
|
|
50
|
+
var { schemas: generatedSchemas, factory } = createType({
|
|
51
|
+
rawSchema: rawSchema4,
|
|
52
|
+
internalSchema: internalSchema2,
|
|
53
|
+
parseErrMsg: (value) => `The following plugin info gave us trouble when parsing the following plugin information: ${value}`,
|
|
54
|
+
unknownErrMsg: "Something went wrong trying to parse the plugin information"
|
|
55
|
+
});
|
|
56
|
+
var { create, of, make } = factory;
|
|
57
|
+
var schemas6 = {
|
|
58
|
+
...generatedSchemas,
|
|
59
|
+
schema: generatedSchemas.schema.transform((val) => val)
|
|
60
|
+
};
|
|
61
|
+
export {
|
|
62
|
+
create,
|
|
63
|
+
factory,
|
|
64
|
+
generatedSchemas,
|
|
65
|
+
make,
|
|
66
|
+
of,
|
|
67
|
+
rawSchema4 as rawSchema,
|
|
68
|
+
schemas6 as schemas
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=PluginSchema.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["PluginSchema.ts"],"sourcesContent":["import * as Alias from '@taqueria/protocol/Alias';\nimport createType from '@taqueria/protocol/Base';\nimport * as Operation from '@taqueria/protocol/Operation';\nimport * as PluginDependenciesResponse from '@taqueria/protocol/PluginDependenciesResponse';\nimport * as PluginInfo from '@taqueria/protocol/PluginInfo';\nimport * as PluginProxyResponse from '@taqueria/protocol/PluginProxyResponse';\nimport * as RequestArgs from '@taqueria/protocol/RequestArgs';\nimport * as Template from '@taqueria/protocol/Template';\nimport { z } from 'zod';\n\nconst proxyFnSchema = z\n\t.function()\n\t.args(RequestArgs.proxySchemas.schema)\n\t.returns(z.promise(PluginProxyResponse.schemas.schema));\n\nconst runtimeDependenciesFn = z\n\t.function()\n\t.args(RequestArgs.schemas.schema)\n\t.returns(z.promise(PluginDependenciesResponse.schemas.schema));\n\nconst internalSchema = PluginInfo.internalSchema.extend({\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tOperation.schemas.schema,\n\t\t\t{ description: 'ParsedOperations' },\n\t\t)\n\t\t\t.optional(),\n\t),\n\ttemplates: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tTemplate.schemas.schema,\n\t\t).optional(),\n\t),\n\tproxy: proxyFnSchema.optional(),\n\tcheckRuntimeDependencies: runtimeDependenciesFn.optional(),\n\tinstallRuntimeDependencies: runtimeDependenciesFn.optional(),\n}).describe('ParsedPluginInfo');\n\nexport const rawSchema = PluginInfo.rawSchema.extend({\n\tname: Alias.rawSchema.optional(),\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tOperation.rawSchema,\n\t\t\t{ description: 'ParsedOperation' },\n\t\t),\n\t)\n\t\t.optional(),\n\ttemplates: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tTemplate.schemas.schema,\n\t\t).optional(),\n\t),\n\tproxy: proxyFnSchema.optional(),\n\tcheckRuntimeDependencies: runtimeDependenciesFn.optional(),\n\tinstallRuntimeDependencies: runtimeDependenciesFn.optional(),\n}).describe('ParsedPluginInfo');\n\ntype Input = z.infer<typeof internalSchema>;\n\nexport type RawPluginSchema = z.infer<typeof rawSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawPluginSchema, Input>({\n\trawSchema,\n\tinternalSchema,\n\tparseErrMsg: (value: unknown) =>\n\t\t`The following plugin info gave us trouble when parsing the following plugin information: ${value}`,\n\tunknownErrMsg: 'Something went wrong trying to parse the plugin information',\n});\n\nexport type ParsedPluginInfo = z.infer<typeof generatedSchemas.schema>;\nexport type t = ParsedPluginInfo;\nexport const { create, of, make } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as ParsedPluginInfo),\n};\n"],"mappings":";AAAA,YAAY,WAAW;AACvB,OAAO,gBAAgB;AACvB,YAAY,eAAe;AAC3B,YAAY,gCAAgC;AAC5C,YAAY,gBAAgB;AAC5B,YAAY,yBAAyB;AACrC,YAAY,iBAAiB;AAC7B,YAAY,cAAc;AAC1B,SAAS,SAAS;AAElB,IAAM,gBAAgB,EACpB,SAAS,EACT,KAAiB,yBAAa,MAAM,EACpC,QAAQ,EAAE,QAA4B,4BAAQ,MAAM,CAAC;AAEvD,IAAM,wBAAwB,EAC5B,SAAS,EACT,KAAiB,oBAAQ,MAAM,EAC/B,QAAQ,EAAE,QAAmC,mCAAQ,MAAM,CAAC;AAE9D,IAAMA,kBAA4B,0BAAe,OAAO;AAAA,EACvD,YAAY,EAAE;AAAA,IACb,SAAO,OAAO,CAAC;AAAA,IACf,EAAE;AAAA,MACS,kBAAQ;AAAA,MAClB,EAAE,aAAa,mBAAmB;AAAA,IACnC,EACE,SAAS;AAAA,EACZ;AAAA,EACA,WAAW,EAAE;AAAA,IACZ,SAAO,OAAO,CAAC;AAAA,IACf,EAAE;AAAA,MACQ,iBAAQ;AAAA,IAClB,EAAE,SAAS;AAAA,EACZ;AAAA,EACA,OAAO,cAAc,SAAS;AAAA,EAC9B,0BAA0B,sBAAsB,SAAS;AAAA,EACzD,4BAA4B,sBAAsB,SAAS;AAC5D,CAAC,EAAE,SAAS,kBAAkB;AAEvB,IAAMC,aAAuB,qBAAU,OAAO;AAAA,EACpD,MAAY,gBAAU,SAAS;AAAA,EAC/B,YAAY,EAAE;AAAA,IACb,SAAO,OAAO,CAAC;AAAA,IACf,EAAE;AAAA,MACS;AAAA,MACV,EAAE,aAAa,kBAAkB;AAAA,IAClC;AAAA,EACD,EACE,SAAS;AAAA,EACX,WAAW,EAAE;AAAA,IACZ,SAAO,OAAO,CAAC;AAAA,IACf,EAAE;AAAA,MACQ,iBAAQ;AAAA,IAClB,EAAE,SAAS;AAAA,EACZ;AAAA,EACA,OAAO,cAAc,SAAS;AAAA,EAC9B,0BAA0B,sBAAsB,SAAS;AAAA,EACzD,4BAA4B,sBAAsB,SAAS;AAC5D,CAAC,EAAE,SAAS,kBAAkB;AAMvB,IAAM,EAAE,SAAS,kBAAkB,QAAQ,IAAI,WAAmC;AAAA,EACxF,WAAAA;AAAA,EACA,gBAAAD;AAAA,EACA,aAAa,CAAC,UACb,4FAA4F;AAAA,EAC7F,eAAe;AAChB,CAAC;AAIM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAE7B,IAAME,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAuB;AACzE;","names":["internalSchema","rawSchema","schemas"]}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import * as fluture from 'fluture';
|
|
2
|
+
import { TaqError } from './TaqError.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
declare const rawSchema: z.ZodObject<{
|
|
6
|
+
placeholder: z.ZodString;
|
|
7
|
+
description: z.ZodString;
|
|
8
|
+
defaultValue: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
9
|
+
type: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"string">, z.ZodLiteral<"number">, z.ZodLiteral<"boolean">]>>;
|
|
10
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
13
|
+
defaultValue?: string | number | boolean | undefined;
|
|
14
|
+
required?: boolean | undefined;
|
|
15
|
+
description: string;
|
|
16
|
+
placeholder: string;
|
|
17
|
+
}, {
|
|
18
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
19
|
+
defaultValue?: string | number | boolean | undefined;
|
|
20
|
+
required?: boolean | undefined;
|
|
21
|
+
description: string;
|
|
22
|
+
placeholder: string;
|
|
23
|
+
}>;
|
|
24
|
+
declare const generatedSchemas: {
|
|
25
|
+
rawSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
26
|
+
internalSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
27
|
+
schema: z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, {
|
|
28
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
29
|
+
defaultValue?: string | number | boolean | undefined;
|
|
30
|
+
required?: boolean | undefined;
|
|
31
|
+
description: string;
|
|
32
|
+
placeholder: string & {
|
|
33
|
+
readonly __kind: any;
|
|
34
|
+
};
|
|
35
|
+
} & {
|
|
36
|
+
readonly __kind: any;
|
|
37
|
+
}, any>;
|
|
38
|
+
};
|
|
39
|
+
declare const factory: {
|
|
40
|
+
make: (input: {
|
|
41
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
42
|
+
defaultValue?: string | number | boolean | undefined;
|
|
43
|
+
required?: boolean | undefined;
|
|
44
|
+
description: string;
|
|
45
|
+
placeholder: string & {
|
|
46
|
+
readonly __kind: any;
|
|
47
|
+
};
|
|
48
|
+
}) => fluture.FutureInstance<TaqError, {
|
|
49
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
50
|
+
defaultValue?: string | number | boolean | undefined;
|
|
51
|
+
required?: boolean | undefined;
|
|
52
|
+
description: string;
|
|
53
|
+
placeholder: string & {
|
|
54
|
+
readonly __kind: any;
|
|
55
|
+
};
|
|
56
|
+
} & {
|
|
57
|
+
readonly __kind: any;
|
|
58
|
+
}>;
|
|
59
|
+
of: (input: unknown) => fluture.FutureInstance<TaqError, {
|
|
60
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
61
|
+
defaultValue?: string | number | boolean | undefined;
|
|
62
|
+
required?: boolean | undefined;
|
|
63
|
+
description: string;
|
|
64
|
+
placeholder: string & {
|
|
65
|
+
readonly __kind: any;
|
|
66
|
+
};
|
|
67
|
+
} & {
|
|
68
|
+
readonly __kind: any;
|
|
69
|
+
}>;
|
|
70
|
+
create: (input: {
|
|
71
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
72
|
+
defaultValue?: string | number | boolean | undefined;
|
|
73
|
+
required?: boolean | undefined;
|
|
74
|
+
description: string;
|
|
75
|
+
placeholder: string;
|
|
76
|
+
} | {
|
|
77
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
78
|
+
defaultValue?: string | number | boolean | undefined;
|
|
79
|
+
required?: boolean | undefined;
|
|
80
|
+
description: string;
|
|
81
|
+
placeholder: string & {
|
|
82
|
+
readonly __kind: any;
|
|
83
|
+
};
|
|
84
|
+
}) => {
|
|
85
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
86
|
+
defaultValue?: string | number | boolean | undefined;
|
|
87
|
+
required?: boolean | undefined;
|
|
88
|
+
description: string;
|
|
89
|
+
placeholder: string & {
|
|
90
|
+
readonly __kind: any;
|
|
91
|
+
};
|
|
92
|
+
} & {
|
|
93
|
+
readonly __kind: any;
|
|
94
|
+
};
|
|
95
|
+
from: (input: unknown) => {
|
|
96
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
97
|
+
defaultValue?: string | number | boolean | undefined;
|
|
98
|
+
required?: boolean | undefined;
|
|
99
|
+
description: string;
|
|
100
|
+
placeholder: string & {
|
|
101
|
+
readonly __kind: any;
|
|
102
|
+
};
|
|
103
|
+
} & {
|
|
104
|
+
readonly __kind: any;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
declare type PositionalArg = z.infer<typeof generatedSchemas.schema>;
|
|
108
|
+
declare type t = PositionalArg;
|
|
109
|
+
declare const create: (input: {
|
|
110
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
111
|
+
defaultValue?: string | number | boolean | undefined;
|
|
112
|
+
required?: boolean | undefined;
|
|
113
|
+
description: string;
|
|
114
|
+
placeholder: string;
|
|
115
|
+
} | {
|
|
116
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
117
|
+
defaultValue?: string | number | boolean | undefined;
|
|
118
|
+
required?: boolean | undefined;
|
|
119
|
+
description: string;
|
|
120
|
+
placeholder: string & {
|
|
121
|
+
readonly __kind: any;
|
|
122
|
+
};
|
|
123
|
+
}) => {
|
|
124
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
125
|
+
defaultValue?: string | number | boolean | undefined;
|
|
126
|
+
required?: boolean | undefined;
|
|
127
|
+
description: string;
|
|
128
|
+
placeholder: string & {
|
|
129
|
+
readonly __kind: any;
|
|
130
|
+
};
|
|
131
|
+
} & {
|
|
132
|
+
readonly __kind: any;
|
|
133
|
+
};
|
|
134
|
+
declare const of: (input: unknown) => fluture.FutureInstance<TaqError, {
|
|
135
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
136
|
+
defaultValue?: string | number | boolean | undefined;
|
|
137
|
+
required?: boolean | undefined;
|
|
138
|
+
description: string;
|
|
139
|
+
placeholder: string & {
|
|
140
|
+
readonly __kind: any;
|
|
141
|
+
};
|
|
142
|
+
} & {
|
|
143
|
+
readonly __kind: any;
|
|
144
|
+
}>;
|
|
145
|
+
declare const make: (input: {
|
|
146
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
147
|
+
defaultValue?: string | number | boolean | undefined;
|
|
148
|
+
required?: boolean | undefined;
|
|
149
|
+
description: string;
|
|
150
|
+
placeholder: string & {
|
|
151
|
+
readonly __kind: any;
|
|
152
|
+
};
|
|
153
|
+
}) => fluture.FutureInstance<TaqError, {
|
|
154
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
155
|
+
defaultValue?: string | number | boolean | undefined;
|
|
156
|
+
required?: boolean | undefined;
|
|
157
|
+
description: string;
|
|
158
|
+
placeholder: string & {
|
|
159
|
+
readonly __kind: any;
|
|
160
|
+
};
|
|
161
|
+
} & {
|
|
162
|
+
readonly __kind: any;
|
|
163
|
+
}>;
|
|
164
|
+
declare const schemas: {
|
|
165
|
+
schema: z.ZodEffects<z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, {
|
|
166
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
167
|
+
defaultValue?: string | number | boolean | undefined;
|
|
168
|
+
required?: boolean | undefined;
|
|
169
|
+
description: string;
|
|
170
|
+
placeholder: string & {
|
|
171
|
+
readonly __kind: any;
|
|
172
|
+
};
|
|
173
|
+
} & {
|
|
174
|
+
readonly __kind: any;
|
|
175
|
+
}, any>, {
|
|
176
|
+
type?: "string" | "number" | "boolean" | undefined;
|
|
177
|
+
defaultValue?: string | number | boolean | undefined;
|
|
178
|
+
required?: boolean | undefined;
|
|
179
|
+
description: string;
|
|
180
|
+
placeholder: string & {
|
|
181
|
+
readonly __kind: any;
|
|
182
|
+
};
|
|
183
|
+
} & {
|
|
184
|
+
readonly __kind: any;
|
|
185
|
+
}, any>;
|
|
186
|
+
rawSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
187
|
+
internalSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
export { PositionalArg, create, factory, generatedSchemas, make, of, rawSchema, schemas, t };
|
package/PositionalArg.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
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
|
+
// PositionalArg.ts
|
|
27
|
+
var PositionalArg_exports = {};
|
|
28
|
+
__export(PositionalArg_exports, {
|
|
29
|
+
create: () => create,
|
|
30
|
+
factory: () => factory,
|
|
31
|
+
generatedSchemas: () => generatedSchemas,
|
|
32
|
+
make: () => make,
|
|
33
|
+
of: () => of,
|
|
34
|
+
rawSchema: () => rawSchema2,
|
|
35
|
+
schemas: () => schemas2
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(PositionalArg_exports);
|
|
38
|
+
var import_Base = __toESM(require("@taqueria/protocol/Base"));
|
|
39
|
+
var HumanReadableIdentifier = __toESM(require("@taqueria/protocol/HumanReadableIdentifier"));
|
|
40
|
+
var import_zod = require("zod");
|
|
41
|
+
var rawSchema2 = import_zod.z.object({
|
|
42
|
+
placeholder: HumanReadableIdentifier.rawSchema.describe("Positional Arg Placeholder"),
|
|
43
|
+
description: import_zod.z.string({ description: "Positional Arg Description" }).min(1),
|
|
44
|
+
defaultValue: import_zod.z.union(
|
|
45
|
+
[import_zod.z.string(), import_zod.z.number(), import_zod.z.boolean()],
|
|
46
|
+
{ description: "Positional Arg Default Value" }
|
|
47
|
+
).optional(),
|
|
48
|
+
type: import_zod.z.union(
|
|
49
|
+
[import_zod.z.literal("string"), import_zod.z.literal("number"), import_zod.z.literal("boolean")],
|
|
50
|
+
{ description: "Positional Arg Datatype" }
|
|
51
|
+
).optional(),
|
|
52
|
+
required: import_zod.z.boolean().optional()
|
|
53
|
+
}).describe("Positional Arg");
|
|
54
|
+
var internalSchema = rawSchema2.extend({
|
|
55
|
+
placeholder: HumanReadableIdentifier.schemas.schema.describe("Positional Arg Placeholder")
|
|
56
|
+
}).describe("Positional Arg");
|
|
57
|
+
var { schemas: generatedSchemas, factory } = (0, import_Base.default)({
|
|
58
|
+
rawSchema: rawSchema2,
|
|
59
|
+
internalSchema,
|
|
60
|
+
parseErrMsg: (value) => `The following positional argument is invalid: ${value}`,
|
|
61
|
+
unknownErrMsg: "Something went wrong parsing the positional argument"
|
|
62
|
+
});
|
|
63
|
+
var { create, of, make } = factory;
|
|
64
|
+
var schemas2 = {
|
|
65
|
+
...generatedSchemas,
|
|
66
|
+
schema: generatedSchemas.schema.transform((val) => val)
|
|
67
|
+
};
|
|
68
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
+
0 && (module.exports = {
|
|
70
|
+
create,
|
|
71
|
+
factory,
|
|
72
|
+
generatedSchemas,
|
|
73
|
+
make,
|
|
74
|
+
of,
|
|
75
|
+
rawSchema,
|
|
76
|
+
schemas
|
|
77
|
+
});
|
|
78
|
+
//# sourceMappingURL=PositionalArg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["PositionalArg.ts"],"sourcesContent":["import createType from '@taqueria/protocol/Base';\nimport * as HumanReadableIdentifier from '@taqueria/protocol/HumanReadableIdentifier';\nimport { z } from 'zod';\n\nexport const rawSchema = z.object({\n\tplaceholder: HumanReadableIdentifier.rawSchema.describe('Positional Arg Placeholder'),\n\tdescription: z.string({ description: 'Positional Arg Description' }).min(1),\n\tdefaultValue: z.union(\n\t\t[z.string(), z.number(), z.boolean()],\n\t\t{ description: 'Positional Arg Default Value' },\n\t).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\trequired: z.boolean().optional(),\n}).describe('Positional Arg');\n\nconst internalSchema = rawSchema.extend({\n\tplaceholder: HumanReadableIdentifier.schemas.schema.describe('Positional Arg Placeholder'),\n}).describe('Positional Arg');\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 positional argument is invalid: ${value}`,\n\tunknownErrMsg: 'Something went wrong parsing the positional argument',\n});\n\nexport type PositionalArg = z.infer<typeof generatedSchemas.schema>;\nexport type t = PositionalArg;\n\nexport const { create, of, make } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as unknown as PositionalArg),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAAA;AAAA,EAAA,eAAAC;AAAA;AAAA;AAAA,kBAAuB;AACvB,8BAAyC;AACzC,iBAAkB;AAEX,IAAMD,aAAY,aAAE,OAAO;AAAA,EACjC,aAAqC,kCAAU,SAAS,4BAA4B;AAAA,EACpF,aAAa,aAAE,OAAO,EAAE,aAAa,6BAA6B,CAAC,EAAE,IAAI,CAAC;AAAA,EAC1E,cAAc,aAAE;AAAA,IACf,CAAC,aAAE,OAAO,GAAG,aAAE,OAAO,GAAG,aAAE,QAAQ,CAAC;AAAA,IACpC,EAAE,aAAa,+BAA+B;AAAA,EAC/C,EAAE,SAAS;AAAA,EACX,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;AAAA,EACX,UAAU,aAAE,QAAQ,EAAE,SAAS;AAChC,CAAC,EAAE,SAAS,gBAAgB;AAE5B,IAAM,iBAAiBA,WAAU,OAAO;AAAA,EACvC,aAAqC,gCAAQ,OAAO,SAAS,4BAA4B;AAC1F,CAAC,EAAE,SAAS,gBAAgB;AAKrB,IAAM,EAAE,SAAS,kBAAkB,QAAQ,QAAI,YAAAE,SAA4B;AAAA,EACjF,WAAAF;AAAA,EACA;AAAA,EACA,aAAa,CAAC,UAAmB,iDAAiD;AAAA,EAClF,eAAe;AAChB,CAAC;AAKM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAE7B,IAAMC,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAA+B;AACjF;","names":["rawSchema","schemas","createType"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// PositionalArg.ts
|
|
2
|
+
import createType from "@taqueria/protocol/Base";
|
|
3
|
+
import * as HumanReadableIdentifier from "@taqueria/protocol/HumanReadableIdentifier";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
var rawSchema2 = z.object({
|
|
6
|
+
placeholder: HumanReadableIdentifier.rawSchema.describe("Positional Arg Placeholder"),
|
|
7
|
+
description: z.string({ description: "Positional Arg Description" }).min(1),
|
|
8
|
+
defaultValue: z.union(
|
|
9
|
+
[z.string(), z.number(), z.boolean()],
|
|
10
|
+
{ description: "Positional Arg Default Value" }
|
|
11
|
+
).optional(),
|
|
12
|
+
type: z.union(
|
|
13
|
+
[z.literal("string"), z.literal("number"), z.literal("boolean")],
|
|
14
|
+
{ description: "Positional Arg Datatype" }
|
|
15
|
+
).optional(),
|
|
16
|
+
required: z.boolean().optional()
|
|
17
|
+
}).describe("Positional Arg");
|
|
18
|
+
var internalSchema = rawSchema2.extend({
|
|
19
|
+
placeholder: HumanReadableIdentifier.schemas.schema.describe("Positional Arg Placeholder")
|
|
20
|
+
}).describe("Positional Arg");
|
|
21
|
+
var { schemas: generatedSchemas, factory } = createType({
|
|
22
|
+
rawSchema: rawSchema2,
|
|
23
|
+
internalSchema,
|
|
24
|
+
parseErrMsg: (value) => `The following positional argument is invalid: ${value}`,
|
|
25
|
+
unknownErrMsg: "Something went wrong parsing the positional argument"
|
|
26
|
+
});
|
|
27
|
+
var { create, of, make } = factory;
|
|
28
|
+
var schemas2 = {
|
|
29
|
+
...generatedSchemas,
|
|
30
|
+
schema: generatedSchemas.schema.transform((val) => val)
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
create,
|
|
34
|
+
factory,
|
|
35
|
+
generatedSchemas,
|
|
36
|
+
make,
|
|
37
|
+
of,
|
|
38
|
+
rawSchema2 as rawSchema,
|
|
39
|
+
schemas2 as schemas
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=PositionalArg.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["PositionalArg.ts"],"sourcesContent":["import createType from '@taqueria/protocol/Base';\nimport * as HumanReadableIdentifier from '@taqueria/protocol/HumanReadableIdentifier';\nimport { z } from 'zod';\n\nexport const rawSchema = z.object({\n\tplaceholder: HumanReadableIdentifier.rawSchema.describe('Positional Arg Placeholder'),\n\tdescription: z.string({ description: 'Positional Arg Description' }).min(1),\n\tdefaultValue: z.union(\n\t\t[z.string(), z.number(), z.boolean()],\n\t\t{ description: 'Positional Arg Default Value' },\n\t).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\trequired: z.boolean().optional(),\n}).describe('Positional Arg');\n\nconst internalSchema = rawSchema.extend({\n\tplaceholder: HumanReadableIdentifier.schemas.schema.describe('Positional Arg Placeholder'),\n}).describe('Positional Arg');\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 positional argument is invalid: ${value}`,\n\tunknownErrMsg: 'Something went wrong parsing the positional argument',\n});\n\nexport type PositionalArg = z.infer<typeof generatedSchemas.schema>;\nexport type t = PositionalArg;\n\nexport const { create, of, make } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as unknown as PositionalArg),\n};\n"],"mappings":";AAAA,OAAO,gBAAgB;AACvB,YAAY,6BAA6B;AACzC,SAAS,SAAS;AAEX,IAAMA,aAAY,EAAE,OAAO;AAAA,EACjC,aAAqC,kCAAU,SAAS,4BAA4B;AAAA,EACpF,aAAa,EAAE,OAAO,EAAE,aAAa,6BAA6B,CAAC,EAAE,IAAI,CAAC;AAAA,EAC1E,cAAc,EAAE;AAAA,IACf,CAAC,EAAE,OAAO,GAAG,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC;AAAA,IACpC,EAAE,aAAa,+BAA+B;AAAA,EAC/C,EAAE,SAAS;AAAA,EACX,MAAM,EAAE;AAAA,IACP,CAAC,EAAE,QAAQ,QAAQ,GAAG,EAAE,QAAQ,QAAQ,GAAG,EAAE,QAAQ,SAAS,CAAC;AAAA,IAC/D,EAAE,aAAa,0BAA0B;AAAA,EAC1C,EAAE,SAAS;AAAA,EACX,UAAU,EAAE,QAAQ,EAAE,SAAS;AAChC,CAAC,EAAE,SAAS,gBAAgB;AAE5B,IAAM,iBAAiBA,WAAU,OAAO;AAAA,EACvC,aAAqC,gCAAQ,OAAO,SAAS,4BAA4B;AAC1F,CAAC,EAAE,SAAS,gBAAgB;AAKrB,IAAM,EAAE,SAAS,kBAAkB,QAAQ,IAAI,WAA4B;AAAA,EACjF,WAAAA;AAAA,EACA;AAAA,EACA,aAAa,CAAC,UAAmB,iDAAiD;AAAA,EAClF,eAAe;AAChB,CAAC;AAKM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAE7B,IAAMC,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAA+B;AACjF;","names":["rawSchema","schemas"]}
|