@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
|
@@ -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
|
+
// PersistentState.ts
|
|
27
|
+
var PersistentState_exports = {};
|
|
28
|
+
__export(PersistentState_exports, {
|
|
29
|
+
create: () => create,
|
|
30
|
+
factory: () => factory,
|
|
31
|
+
generatedSchemas: () => generatedSchemas,
|
|
32
|
+
internalSchema: () => internalSchema,
|
|
33
|
+
make: () => make,
|
|
34
|
+
of: () => of,
|
|
35
|
+
rawSchema: () => rawSchema3,
|
|
36
|
+
schemas: () => schemas4
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(PersistentState_exports);
|
|
39
|
+
var import_Base = __toESM(require("@taqueria/protocol/Base"));
|
|
40
|
+
var SHA256 = __toESM(require("@taqueria/protocol/SHA256"));
|
|
41
|
+
var Timestamp = __toESM(require("@taqueria/protocol/Timestamp"));
|
|
42
|
+
var Verb = __toESM(require("@taqueria/protocol/Verb"));
|
|
43
|
+
var import_zod = require("zod");
|
|
44
|
+
var rawOpSchema = import_zod.z.object({
|
|
45
|
+
hash: SHA256.rawSchema.describe("state.op.hash"),
|
|
46
|
+
time: Timestamp.rawSchema.describe("state.op.time"),
|
|
47
|
+
output: import_zod.z.unknown().describe("state.op.output")
|
|
48
|
+
}).describe("Persistent State Operation");
|
|
49
|
+
var rawTaskSchema = import_zod.z.object({
|
|
50
|
+
task: Verb.schemas.rawSchema,
|
|
51
|
+
plugin: import_zod.z.string().min(1),
|
|
52
|
+
time: Timestamp.rawSchema.describe("state.task.time"),
|
|
53
|
+
output: import_zod.z.unknown().describe("state.task.output")
|
|
54
|
+
});
|
|
55
|
+
var internalOpSchema = import_zod.z.object({
|
|
56
|
+
hash: SHA256.schemas.schema.describe("state.op.hash"),
|
|
57
|
+
time: Timestamp.schemas.schema.describe("state.op.time"),
|
|
58
|
+
output: import_zod.z.unknown().describe("state.op.output")
|
|
59
|
+
});
|
|
60
|
+
var internalTaskSchema = import_zod.z.object({
|
|
61
|
+
task: Verb.schemas.schema,
|
|
62
|
+
plugin: import_zod.z.string().min(1),
|
|
63
|
+
time: Timestamp.schemas.schema.describe("state.task.time"),
|
|
64
|
+
output: import_zod.z.unknown().describe("state.op.output")
|
|
65
|
+
});
|
|
66
|
+
var rawSchema3 = import_zod.z.object({
|
|
67
|
+
operations: import_zod.z.record(rawOpSchema),
|
|
68
|
+
tasks: import_zod.z.record(rawTaskSchema)
|
|
69
|
+
});
|
|
70
|
+
var internalSchema = import_zod.z.object({
|
|
71
|
+
operations: import_zod.z.record(internalOpSchema),
|
|
72
|
+
tasks: import_zod.z.record(internalTaskSchema)
|
|
73
|
+
}).transform((val) => ({
|
|
74
|
+
operations: val.operations,
|
|
75
|
+
tasks: val.tasks
|
|
76
|
+
}));
|
|
77
|
+
var { schemas: generatedSchemas, factory } = (0, import_Base.default)({
|
|
78
|
+
rawSchema: rawSchema3,
|
|
79
|
+
parseErrMsg: `The persistent state is invalid`,
|
|
80
|
+
unknownErrMsg: `Something went wrong trying to parse the persistent state`
|
|
81
|
+
});
|
|
82
|
+
var { create, of, make } = factory;
|
|
83
|
+
var schemas4 = {
|
|
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=PersistentState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["PersistentState.ts"],"sourcesContent":["import createType from '@taqueria/protocol/Base';\nimport * as SHA256 from '@taqueria/protocol/SHA256';\nimport * as Timestamp from '@taqueria/protocol/Timestamp';\nimport * as Verb from '@taqueria/protocol/Verb';\nimport { z } from 'zod';\n\nconst rawOpSchema = z.object({\n\thash: SHA256.rawSchema.describe('state.op.hash'),\n\ttime: Timestamp.rawSchema.describe('state.op.time'),\n\toutput: z.unknown().describe('state.op.output'),\n}).describe('Persistent State Operation');\n\nconst rawTaskSchema = z.object({\n\ttask: Verb.schemas.rawSchema,\n\tplugin: z.string().min(1),\n\ttime: Timestamp.rawSchema.describe('state.task.time'),\n\toutput: z.unknown().describe('state.task.output'),\n});\n\nconst internalOpSchema = z.object({\n\thash: SHA256.schemas.schema.describe('state.op.hash'),\n\ttime: Timestamp.schemas.schema.describe('state.op.time'),\n\toutput: z.unknown().describe('state.op.output'),\n});\n\nconst internalTaskSchema = z.object({\n\ttask: Verb.schemas.schema,\n\tplugin: z.string().min(1),\n\ttime: Timestamp.schemas.schema.describe('state.task.time'),\n\toutput: z.unknown().describe('state.op.output'),\n});\n\nexport type PersistedTask = z.infer<typeof internalTaskSchema>;\n\nexport type PersistedOperation = z.infer<typeof internalOpSchema>;\n\nexport const rawSchema = z.object({\n\toperations: z.record(rawOpSchema),\n\ttasks: z.record(rawTaskSchema),\n});\n\nexport const internalSchema = z.object({\n\toperations: z.record(internalOpSchema),\n\ttasks: z.record(internalTaskSchema),\n}).transform(val => ({\n\toperations: val.operations as unknown as Record<string, PersistedOperation>,\n\ttasks: val.tasks as unknown as Record<string, PersistedTask>,\n}));\n\ntype RawInput = z.infer<typeof rawSchema>;\n\ntype Input = z.infer<typeof internalSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, Input>({\n\trawSchema,\n\tparseErrMsg: `The persistent state is invalid`,\n\tunknownErrMsg: `Something went wrong trying to parse the persistent state`,\n});\n\nexport type PersistentState = z.infer<typeof generatedSchemas.schema>;\nexport type t = PersistentState;\nexport type State = PersistentState;\n\nexport const { create, of, make } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as unknown as PersistentState),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAAA;AAAA,EAAA,eAAAC;AAAA;AAAA;AAAA,kBAAuB;AACvB,aAAwB;AACxB,gBAA2B;AAC3B,WAAsB;AACtB,iBAAkB;AAElB,IAAM,cAAc,aAAE,OAAO;AAAA,EAC5B,MAAa,iBAAU,SAAS,eAAe;AAAA,EAC/C,MAAgB,oBAAU,SAAS,eAAe;AAAA,EAClD,QAAQ,aAAE,QAAQ,EAAE,SAAS,iBAAiB;AAC/C,CAAC,EAAE,SAAS,4BAA4B;AAExC,IAAM,gBAAgB,aAAE,OAAO;AAAA,EAC9B,MAAW,aAAQ;AAAA,EACnB,QAAQ,aAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACxB,MAAgB,oBAAU,SAAS,iBAAiB;AAAA,EACpD,QAAQ,aAAE,QAAQ,EAAE,SAAS,mBAAmB;AACjD,CAAC;AAED,IAAM,mBAAmB,aAAE,OAAO;AAAA,EACjC,MAAa,eAAQ,OAAO,SAAS,eAAe;AAAA,EACpD,MAAgB,kBAAQ,OAAO,SAAS,eAAe;AAAA,EACvD,QAAQ,aAAE,QAAQ,EAAE,SAAS,iBAAiB;AAC/C,CAAC;AAED,IAAM,qBAAqB,aAAE,OAAO;AAAA,EACnC,MAAW,aAAQ;AAAA,EACnB,QAAQ,aAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACxB,MAAgB,kBAAQ,OAAO,SAAS,iBAAiB;AAAA,EACzD,QAAQ,aAAE,QAAQ,EAAE,SAAS,iBAAiB;AAC/C,CAAC;AAMM,IAAMD,aAAY,aAAE,OAAO;AAAA,EACjC,YAAY,aAAE,OAAO,WAAW;AAAA,EAChC,OAAO,aAAE,OAAO,aAAa;AAC9B,CAAC;AAEM,IAAM,iBAAiB,aAAE,OAAO;AAAA,EACtC,YAAY,aAAE,OAAO,gBAAgB;AAAA,EACrC,OAAO,aAAE,OAAO,kBAAkB;AACnC,CAAC,EAAE,UAAU,UAAQ;AAAA,EACpB,YAAY,IAAI;AAAA,EAChB,OAAO,IAAI;AACZ,EAAE;AAMK,IAAM,EAAE,SAAS,kBAAkB,QAAQ,QAAI,YAAAE,SAA4B;AAAA,EACjF,WAAAF;AAAA,EACA,aAAa;AAAA,EACb,eAAe;AAChB,CAAC;AAMM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAE7B,IAAMC,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAiC;AACnF;","names":["rawSchema","schemas","createType"]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// PersistentState.ts
|
|
2
|
+
import createType from "@taqueria/protocol/Base";
|
|
3
|
+
import * as SHA256 from "@taqueria/protocol/SHA256";
|
|
4
|
+
import * as Timestamp from "@taqueria/protocol/Timestamp";
|
|
5
|
+
import * as Verb from "@taqueria/protocol/Verb";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
var rawOpSchema = z.object({
|
|
8
|
+
hash: SHA256.rawSchema.describe("state.op.hash"),
|
|
9
|
+
time: Timestamp.rawSchema.describe("state.op.time"),
|
|
10
|
+
output: z.unknown().describe("state.op.output")
|
|
11
|
+
}).describe("Persistent State Operation");
|
|
12
|
+
var rawTaskSchema = z.object({
|
|
13
|
+
task: Verb.schemas.rawSchema,
|
|
14
|
+
plugin: z.string().min(1),
|
|
15
|
+
time: Timestamp.rawSchema.describe("state.task.time"),
|
|
16
|
+
output: z.unknown().describe("state.task.output")
|
|
17
|
+
});
|
|
18
|
+
var internalOpSchema = z.object({
|
|
19
|
+
hash: SHA256.schemas.schema.describe("state.op.hash"),
|
|
20
|
+
time: Timestamp.schemas.schema.describe("state.op.time"),
|
|
21
|
+
output: z.unknown().describe("state.op.output")
|
|
22
|
+
});
|
|
23
|
+
var internalTaskSchema = z.object({
|
|
24
|
+
task: Verb.schemas.schema,
|
|
25
|
+
plugin: z.string().min(1),
|
|
26
|
+
time: Timestamp.schemas.schema.describe("state.task.time"),
|
|
27
|
+
output: z.unknown().describe("state.op.output")
|
|
28
|
+
});
|
|
29
|
+
var rawSchema3 = z.object({
|
|
30
|
+
operations: z.record(rawOpSchema),
|
|
31
|
+
tasks: z.record(rawTaskSchema)
|
|
32
|
+
});
|
|
33
|
+
var internalSchema = z.object({
|
|
34
|
+
operations: z.record(internalOpSchema),
|
|
35
|
+
tasks: z.record(internalTaskSchema)
|
|
36
|
+
}).transform((val) => ({
|
|
37
|
+
operations: val.operations,
|
|
38
|
+
tasks: val.tasks
|
|
39
|
+
}));
|
|
40
|
+
var { schemas: generatedSchemas, factory } = createType({
|
|
41
|
+
rawSchema: rawSchema3,
|
|
42
|
+
parseErrMsg: `The persistent state is invalid`,
|
|
43
|
+
unknownErrMsg: `Something went wrong trying to parse the persistent state`
|
|
44
|
+
});
|
|
45
|
+
var { create, of, make } = factory;
|
|
46
|
+
var schemas4 = {
|
|
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
|
+
rawSchema3 as rawSchema,
|
|
58
|
+
schemas4 as schemas
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=PersistentState.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["PersistentState.ts"],"sourcesContent":["import createType from '@taqueria/protocol/Base';\nimport * as SHA256 from '@taqueria/protocol/SHA256';\nimport * as Timestamp from '@taqueria/protocol/Timestamp';\nimport * as Verb from '@taqueria/protocol/Verb';\nimport { z } from 'zod';\n\nconst rawOpSchema = z.object({\n\thash: SHA256.rawSchema.describe('state.op.hash'),\n\ttime: Timestamp.rawSchema.describe('state.op.time'),\n\toutput: z.unknown().describe('state.op.output'),\n}).describe('Persistent State Operation');\n\nconst rawTaskSchema = z.object({\n\ttask: Verb.schemas.rawSchema,\n\tplugin: z.string().min(1),\n\ttime: Timestamp.rawSchema.describe('state.task.time'),\n\toutput: z.unknown().describe('state.task.output'),\n});\n\nconst internalOpSchema = z.object({\n\thash: SHA256.schemas.schema.describe('state.op.hash'),\n\ttime: Timestamp.schemas.schema.describe('state.op.time'),\n\toutput: z.unknown().describe('state.op.output'),\n});\n\nconst internalTaskSchema = z.object({\n\ttask: Verb.schemas.schema,\n\tplugin: z.string().min(1),\n\ttime: Timestamp.schemas.schema.describe('state.task.time'),\n\toutput: z.unknown().describe('state.op.output'),\n});\n\nexport type PersistedTask = z.infer<typeof internalTaskSchema>;\n\nexport type PersistedOperation = z.infer<typeof internalOpSchema>;\n\nexport const rawSchema = z.object({\n\toperations: z.record(rawOpSchema),\n\ttasks: z.record(rawTaskSchema),\n});\n\nexport const internalSchema = z.object({\n\toperations: z.record(internalOpSchema),\n\ttasks: z.record(internalTaskSchema),\n}).transform(val => ({\n\toperations: val.operations as unknown as Record<string, PersistedOperation>,\n\ttasks: val.tasks as unknown as Record<string, PersistedTask>,\n}));\n\ntype RawInput = z.infer<typeof rawSchema>;\n\ntype Input = z.infer<typeof internalSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, Input>({\n\trawSchema,\n\tparseErrMsg: `The persistent state is invalid`,\n\tunknownErrMsg: `Something went wrong trying to parse the persistent state`,\n});\n\nexport type PersistentState = z.infer<typeof generatedSchemas.schema>;\nexport type t = PersistentState;\nexport type State = PersistentState;\n\nexport const { create, of, make } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as unknown as PersistentState),\n};\n"],"mappings":";AAAA,OAAO,gBAAgB;AACvB,YAAY,YAAY;AACxB,YAAY,eAAe;AAC3B,YAAY,UAAU;AACtB,SAAS,SAAS;AAElB,IAAM,cAAc,EAAE,OAAO;AAAA,EAC5B,MAAa,iBAAU,SAAS,eAAe;AAAA,EAC/C,MAAgB,oBAAU,SAAS,eAAe;AAAA,EAClD,QAAQ,EAAE,QAAQ,EAAE,SAAS,iBAAiB;AAC/C,CAAC,EAAE,SAAS,4BAA4B;AAExC,IAAM,gBAAgB,EAAE,OAAO;AAAA,EAC9B,MAAW,aAAQ;AAAA,EACnB,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACxB,MAAgB,oBAAU,SAAS,iBAAiB;AAAA,EACpD,QAAQ,EAAE,QAAQ,EAAE,SAAS,mBAAmB;AACjD,CAAC;AAED,IAAM,mBAAmB,EAAE,OAAO;AAAA,EACjC,MAAa,eAAQ,OAAO,SAAS,eAAe;AAAA,EACpD,MAAgB,kBAAQ,OAAO,SAAS,eAAe;AAAA,EACvD,QAAQ,EAAE,QAAQ,EAAE,SAAS,iBAAiB;AAC/C,CAAC;AAED,IAAM,qBAAqB,EAAE,OAAO;AAAA,EACnC,MAAW,aAAQ;AAAA,EACnB,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACxB,MAAgB,kBAAQ,OAAO,SAAS,iBAAiB;AAAA,EACzD,QAAQ,EAAE,QAAQ,EAAE,SAAS,iBAAiB;AAC/C,CAAC;AAMM,IAAMA,aAAY,EAAE,OAAO;AAAA,EACjC,YAAY,EAAE,OAAO,WAAW;AAAA,EAChC,OAAO,EAAE,OAAO,aAAa;AAC9B,CAAC;AAEM,IAAM,iBAAiB,EAAE,OAAO;AAAA,EACtC,YAAY,EAAE,OAAO,gBAAgB;AAAA,EACrC,OAAO,EAAE,OAAO,kBAAkB;AACnC,CAAC,EAAE,UAAU,UAAQ;AAAA,EACpB,YAAY,IAAI;AAAA,EAChB,OAAO,IAAI;AACZ,EAAE;AAMK,IAAM,EAAE,SAAS,kBAAkB,QAAQ,IAAI,WAA4B;AAAA,EACjF,WAAAA;AAAA,EACA,aAAa;AAAA,EACb,eAAe;AAChB,CAAC;AAMM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAE7B,IAAMC,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAiC;AACnF;","names":["rawSchema","schemas"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const rawSchema: z.ZodUnion<[z.ZodLiteral<"checkRuntimeDependencies">, z.ZodLiteral<"installRuntimeDependencies">, z.ZodLiteral<"proxy">, z.ZodLiteral<"proxyTemplate">, z.ZodLiteral<"pluginInfo">]>;
|
|
4
|
+
declare type PluginActionName = z.infer<typeof rawSchema>;
|
|
5
|
+
declare type t = PluginActionName;
|
|
6
|
+
declare const pluginActionNotSupportedSchema: z.ZodObject<{
|
|
7
|
+
status: z.ZodLiteral<"notSupported">;
|
|
8
|
+
msg: z.ZodString;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
status: "notSupported";
|
|
11
|
+
msg: string;
|
|
12
|
+
}, {
|
|
13
|
+
status: "notSupported";
|
|
14
|
+
msg: string;
|
|
15
|
+
}>;
|
|
16
|
+
declare type PluginActionNotSupportedResponse = z.infer<typeof pluginActionNotSupportedSchema>;
|
|
17
|
+
declare const schemas: {
|
|
18
|
+
schema: z.ZodUnion<[z.ZodLiteral<"checkRuntimeDependencies">, z.ZodLiteral<"installRuntimeDependencies">, z.ZodLiteral<"proxy">, z.ZodLiteral<"proxyTemplate">, z.ZodLiteral<"pluginInfo">]>;
|
|
19
|
+
internalSchema: z.ZodUnion<[z.ZodLiteral<"checkRuntimeDependencies">, z.ZodLiteral<"installRuntimeDependencies">, z.ZodLiteral<"proxy">, z.ZodLiteral<"proxyTemplate">, z.ZodLiteral<"pluginInfo">]>;
|
|
20
|
+
rawSchema: z.ZodUnion<[z.ZodLiteral<"checkRuntimeDependencies">, z.ZodLiteral<"installRuntimeDependencies">, z.ZodLiteral<"proxy">, z.ZodLiteral<"proxyTemplate">, z.ZodLiteral<"pluginInfo">]>;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { PluginActionName, PluginActionNotSupportedResponse, schemas, t };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// PluginActionName.ts
|
|
21
|
+
var PluginActionName_exports = {};
|
|
22
|
+
__export(PluginActionName_exports, {
|
|
23
|
+
schemas: () => schemas
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(PluginActionName_exports);
|
|
26
|
+
var import_zod = require("zod");
|
|
27
|
+
var rawSchema = import_zod.z.union([
|
|
28
|
+
import_zod.z.literal("checkRuntimeDependencies"),
|
|
29
|
+
import_zod.z.literal("installRuntimeDependencies"),
|
|
30
|
+
import_zod.z.literal("proxy"),
|
|
31
|
+
import_zod.z.literal("proxyTemplate"),
|
|
32
|
+
import_zod.z.literal("pluginInfo")
|
|
33
|
+
]);
|
|
34
|
+
var internalSchema = rawSchema;
|
|
35
|
+
var pluginActionNotSupportedSchema = import_zod.z.object({
|
|
36
|
+
status: import_zod.z.literal("notSupported"),
|
|
37
|
+
msg: import_zod.z.string()
|
|
38
|
+
});
|
|
39
|
+
var schemas = {
|
|
40
|
+
schema: internalSchema,
|
|
41
|
+
internalSchema,
|
|
42
|
+
rawSchema
|
|
43
|
+
};
|
|
44
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
45
|
+
0 && (module.exports = {
|
|
46
|
+
schemas
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=PluginActionName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["PluginActionName.ts"],"sourcesContent":["import createType from '@taqueria/protocol/Base';\nimport { z } from 'zod';\n\nconst rawSchema = z.union([\n\tz.literal('checkRuntimeDependencies'),\n\tz.literal('installRuntimeDependencies'),\n\tz.literal('proxy'),\n\tz.literal('proxyTemplate'),\n\tz.literal('pluginInfo'),\n]);\n\nconst internalSchema = rawSchema;\n\nexport type PluginActionName = z.infer<typeof rawSchema>;\nexport type t = PluginActionName;\n\nconst pluginActionNotSupportedSchema = z.object({\n\tstatus: z.literal('notSupported'),\n\tmsg: z.string(),\n});\n\nexport type PluginActionNotSupportedResponse = z.infer<typeof pluginActionNotSupportedSchema>;\n\nexport const schemas = {\n\tschema: internalSchema,\n\tinternalSchema,\n\trawSchema,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,iBAAkB;AAElB,IAAM,YAAY,aAAE,MAAM;AAAA,EACzB,aAAE,QAAQ,0BAA0B;AAAA,EACpC,aAAE,QAAQ,4BAA4B;AAAA,EACtC,aAAE,QAAQ,OAAO;AAAA,EACjB,aAAE,QAAQ,eAAe;AAAA,EACzB,aAAE,QAAQ,YAAY;AACvB,CAAC;AAED,IAAM,iBAAiB;AAKvB,IAAM,iCAAiC,aAAE,OAAO;AAAA,EAC/C,QAAQ,aAAE,QAAQ,cAAc;AAAA,EAChC,KAAK,aAAE,OAAO;AACf,CAAC;AAIM,IAAM,UAAU;AAAA,EACtB,QAAQ;AAAA,EACR;AAAA,EACA;AACD;","names":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// PluginActionName.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
var rawSchema = z.union([
|
|
4
|
+
z.literal("checkRuntimeDependencies"),
|
|
5
|
+
z.literal("installRuntimeDependencies"),
|
|
6
|
+
z.literal("proxy"),
|
|
7
|
+
z.literal("proxyTemplate"),
|
|
8
|
+
z.literal("pluginInfo")
|
|
9
|
+
]);
|
|
10
|
+
var internalSchema = rawSchema;
|
|
11
|
+
var pluginActionNotSupportedSchema = z.object({
|
|
12
|
+
status: z.literal("notSupported"),
|
|
13
|
+
msg: z.string()
|
|
14
|
+
});
|
|
15
|
+
var schemas = {
|
|
16
|
+
schema: internalSchema,
|
|
17
|
+
internalSchema,
|
|
18
|
+
rawSchema
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
schemas
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=PluginActionName.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["PluginActionName.ts"],"sourcesContent":["import createType from '@taqueria/protocol/Base';\nimport { z } from 'zod';\n\nconst rawSchema = z.union([\n\tz.literal('checkRuntimeDependencies'),\n\tz.literal('installRuntimeDependencies'),\n\tz.literal('proxy'),\n\tz.literal('proxyTemplate'),\n\tz.literal('pluginInfo'),\n]);\n\nconst internalSchema = rawSchema;\n\nexport type PluginActionName = z.infer<typeof rawSchema>;\nexport type t = PluginActionName;\n\nconst pluginActionNotSupportedSchema = z.object({\n\tstatus: z.literal('notSupported'),\n\tmsg: z.string(),\n});\n\nexport type PluginActionNotSupportedResponse = z.infer<typeof pluginActionNotSupportedSchema>;\n\nexport const schemas = {\n\tschema: internalSchema,\n\tinternalSchema,\n\trawSchema,\n};\n"],"mappings":";AACA,SAAS,SAAS;AAElB,IAAM,YAAY,EAAE,MAAM;AAAA,EACzB,EAAE,QAAQ,0BAA0B;AAAA,EACpC,EAAE,QAAQ,4BAA4B;AAAA,EACtC,EAAE,QAAQ,OAAO;AAAA,EACjB,EAAE,QAAQ,eAAe;AAAA,EACzB,EAAE,QAAQ,YAAY;AACvB,CAAC;AAED,IAAM,iBAAiB;AAKvB,IAAM,iCAAiC,EAAE,OAAO;AAAA,EAC/C,QAAQ,EAAE,QAAQ,cAAc;AAAA,EAChC,KAAK,EAAE,OAAO;AACf,CAAC;AAIM,IAAM,UAAU;AAAA,EACtB,QAAQ;AAAA,EACR;AAAA,EACA;AACD;","names":[]}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import * as fluture from 'fluture';
|
|
2
|
+
import { TaqError } from './TaqError.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
declare const schemas: {
|
|
6
|
+
rawSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
7
|
+
internalSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
8
|
+
schema: z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, {
|
|
9
|
+
path: string;
|
|
10
|
+
name: string;
|
|
11
|
+
version: string;
|
|
12
|
+
kind: "required" | "optional";
|
|
13
|
+
} & {
|
|
14
|
+
readonly __kind: any;
|
|
15
|
+
}, any>;
|
|
16
|
+
};
|
|
17
|
+
declare const factory: {
|
|
18
|
+
make: (input: {
|
|
19
|
+
path: string;
|
|
20
|
+
name: string;
|
|
21
|
+
version: string;
|
|
22
|
+
kind: "required" | "optional";
|
|
23
|
+
}) => fluture.FutureInstance<TaqError, {
|
|
24
|
+
path: string;
|
|
25
|
+
name: string;
|
|
26
|
+
version: string;
|
|
27
|
+
kind: "required" | "optional";
|
|
28
|
+
} & {
|
|
29
|
+
readonly __kind: any;
|
|
30
|
+
}>;
|
|
31
|
+
of: (input: unknown) => fluture.FutureInstance<TaqError, {
|
|
32
|
+
path: string;
|
|
33
|
+
name: string;
|
|
34
|
+
version: string;
|
|
35
|
+
kind: "required" | "optional";
|
|
36
|
+
} & {
|
|
37
|
+
readonly __kind: any;
|
|
38
|
+
}>;
|
|
39
|
+
create: (input: {
|
|
40
|
+
path: string;
|
|
41
|
+
name: string;
|
|
42
|
+
version: string;
|
|
43
|
+
kind: "required" | "optional";
|
|
44
|
+
}) => {
|
|
45
|
+
path: string;
|
|
46
|
+
name: string;
|
|
47
|
+
version: string;
|
|
48
|
+
kind: "required" | "optional";
|
|
49
|
+
} & {
|
|
50
|
+
readonly __kind: any;
|
|
51
|
+
};
|
|
52
|
+
from: (input: unknown) => {
|
|
53
|
+
path: string;
|
|
54
|
+
name: string;
|
|
55
|
+
version: string;
|
|
56
|
+
kind: "required" | "optional";
|
|
57
|
+
} & {
|
|
58
|
+
readonly __kind: any;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
declare type RuntimeDependency = z.infer<typeof schemas.schema>;
|
|
62
|
+
declare const runtimeDependencyReport: z.ZodObject<z.extendShape<{
|
|
63
|
+
name: z.ZodString;
|
|
64
|
+
path: z.ZodString;
|
|
65
|
+
version: z.ZodString;
|
|
66
|
+
kind: z.ZodUnion<[z.ZodLiteral<"required">, z.ZodLiteral<"optional">]>;
|
|
67
|
+
}, {
|
|
68
|
+
met: z.ZodBoolean;
|
|
69
|
+
}>, "strip", z.ZodTypeAny, {
|
|
70
|
+
path: string;
|
|
71
|
+
name: string;
|
|
72
|
+
version: string;
|
|
73
|
+
kind: "required" | "optional";
|
|
74
|
+
met: boolean;
|
|
75
|
+
}, {
|
|
76
|
+
path: string;
|
|
77
|
+
name: string;
|
|
78
|
+
version: string;
|
|
79
|
+
kind: "required" | "optional";
|
|
80
|
+
met: boolean;
|
|
81
|
+
}>;
|
|
82
|
+
declare type RuntimeDependencyReport = z.infer<typeof runtimeDependencyReport>;
|
|
83
|
+
declare const dependenciesResponseSchema: z.ZodObject<{
|
|
84
|
+
report: z.ZodArray<z.ZodObject<z.extendShape<{
|
|
85
|
+
name: z.ZodString;
|
|
86
|
+
path: z.ZodString;
|
|
87
|
+
version: z.ZodString;
|
|
88
|
+
kind: z.ZodUnion<[z.ZodLiteral<"required">, z.ZodLiteral<"optional">]>;
|
|
89
|
+
}, {
|
|
90
|
+
met: z.ZodBoolean;
|
|
91
|
+
}>, "strip", z.ZodTypeAny, {
|
|
92
|
+
path: string;
|
|
93
|
+
name: string;
|
|
94
|
+
version: string;
|
|
95
|
+
kind: "required" | "optional";
|
|
96
|
+
met: boolean;
|
|
97
|
+
}, {
|
|
98
|
+
path: string;
|
|
99
|
+
name: string;
|
|
100
|
+
version: string;
|
|
101
|
+
kind: "required" | "optional";
|
|
102
|
+
met: boolean;
|
|
103
|
+
}>, "many">;
|
|
104
|
+
}, "strip", z.ZodTypeAny, {
|
|
105
|
+
report: {
|
|
106
|
+
path: string;
|
|
107
|
+
name: string;
|
|
108
|
+
version: string;
|
|
109
|
+
kind: "required" | "optional";
|
|
110
|
+
met: boolean;
|
|
111
|
+
}[];
|
|
112
|
+
}, {
|
|
113
|
+
report: {
|
|
114
|
+
path: string;
|
|
115
|
+
name: string;
|
|
116
|
+
version: string;
|
|
117
|
+
kind: "required" | "optional";
|
|
118
|
+
met: boolean;
|
|
119
|
+
}[];
|
|
120
|
+
}>;
|
|
121
|
+
declare type PluginDependenciesResponse = z.infer<typeof dependenciesResponseSchema>;
|
|
122
|
+
declare type t = PluginDependenciesResponse;
|
|
123
|
+
declare const of: (input: unknown) => fluture.FutureInstance<TaqError, {
|
|
124
|
+
path: string;
|
|
125
|
+
name: string;
|
|
126
|
+
version: string;
|
|
127
|
+
kind: "required" | "optional";
|
|
128
|
+
} & {
|
|
129
|
+
readonly __kind: any;
|
|
130
|
+
}>;
|
|
131
|
+
declare const make: (input: {
|
|
132
|
+
path: string;
|
|
133
|
+
name: string;
|
|
134
|
+
version: string;
|
|
135
|
+
kind: "required" | "optional";
|
|
136
|
+
}) => fluture.FutureInstance<TaqError, {
|
|
137
|
+
path: string;
|
|
138
|
+
name: string;
|
|
139
|
+
version: string;
|
|
140
|
+
kind: "required" | "optional";
|
|
141
|
+
} & {
|
|
142
|
+
readonly __kind: any;
|
|
143
|
+
}>;
|
|
144
|
+
declare const create: (input: {
|
|
145
|
+
path: string;
|
|
146
|
+
name: string;
|
|
147
|
+
version: string;
|
|
148
|
+
kind: "required" | "optional";
|
|
149
|
+
}) => {
|
|
150
|
+
path: string;
|
|
151
|
+
name: string;
|
|
152
|
+
version: string;
|
|
153
|
+
kind: "required" | "optional";
|
|
154
|
+
} & {
|
|
155
|
+
readonly __kind: any;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
export { PluginDependenciesResponse, RuntimeDependency, RuntimeDependencyReport, create, factory, make, of, schemas, t };
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
// PluginDependenciesResponse.ts
|
|
27
|
+
var PluginDependenciesResponse_exports = {};
|
|
28
|
+
__export(PluginDependenciesResponse_exports, {
|
|
29
|
+
create: () => create,
|
|
30
|
+
factory: () => factory,
|
|
31
|
+
make: () => make,
|
|
32
|
+
of: () => of,
|
|
33
|
+
schemas: () => schemas
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(PluginDependenciesResponse_exports);
|
|
36
|
+
var import_Base = __toESM(require("@taqueria/protocol/Base"));
|
|
37
|
+
var import_zod = require("zod");
|
|
38
|
+
var rawRuntimeDependency = import_zod.z.object({
|
|
39
|
+
name: import_zod.z.string(),
|
|
40
|
+
path: import_zod.z.string(),
|
|
41
|
+
version: import_zod.z.string(),
|
|
42
|
+
kind: import_zod.z.union([import_zod.z.literal("required"), import_zod.z.literal("optional")])
|
|
43
|
+
});
|
|
44
|
+
var { schemas, factory } = (0, import_Base.default)({
|
|
45
|
+
rawSchema: rawRuntimeDependency,
|
|
46
|
+
internalSchema: rawRuntimeDependency,
|
|
47
|
+
parseErrMsg: (value) => `The following runtime dependency is invalid: ${value}`,
|
|
48
|
+
unknownErrMsg: "Something went wrong trying to parse the template"
|
|
49
|
+
});
|
|
50
|
+
var runtimeDependencyReport = rawRuntimeDependency.extend({ met: import_zod.z.boolean() });
|
|
51
|
+
var dependenciesResponseSchema = import_zod.z.object({
|
|
52
|
+
report: import_zod.z.array(runtimeDependencyReport)
|
|
53
|
+
});
|
|
54
|
+
var { of, make, create } = factory;
|
|
55
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
56
|
+
0 && (module.exports = {
|
|
57
|
+
create,
|
|
58
|
+
factory,
|
|
59
|
+
make,
|
|
60
|
+
of,
|
|
61
|
+
schemas
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=PluginDependenciesResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["PluginDependenciesResponse.ts"],"sourcesContent":["import createType from '@taqueria/protocol/Base';\nimport { z } from 'zod';\n\nconst rawRuntimeDependency = z.object({\n\tname: z.string(),\n\tpath: z.string(),\n\tversion: z.string(),\n\tkind: z.union([z.literal('required'), z.literal('optional')]),\n});\n\ntype RawRuntimeDependencyInput = z.infer<typeof rawRuntimeDependency>;\n\nexport const { schemas, factory } = createType<RawRuntimeDependencyInput, RawRuntimeDependencyInput>({\n\trawSchema: rawRuntimeDependency,\n\tinternalSchema: rawRuntimeDependency,\n\tparseErrMsg: (value: unknown) => `The following runtime dependency is invalid: ${value}`,\n\tunknownErrMsg: 'Something went wrong trying to parse the template',\n});\n\nexport type RuntimeDependency = z.infer<typeof schemas.schema>;\n\nconst runtimeDependencyReport = rawRuntimeDependency.extend({ met: z.boolean() });\n\nexport type RuntimeDependencyReport = z.infer<typeof runtimeDependencyReport>;\n\nconst dependenciesResponseSchema = z.object({\n\treport: z.array(runtimeDependencyReport),\n});\n\nexport type PluginDependenciesResponse = z.infer<typeof dependenciesResponseSchema>;\nexport type t = PluginDependenciesResponse;\n\nexport const { of, make, create } = factory;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuB;AACvB,iBAAkB;AAElB,IAAM,uBAAuB,aAAE,OAAO;AAAA,EACrC,MAAM,aAAE,OAAO;AAAA,EACf,MAAM,aAAE,OAAO;AAAA,EACf,SAAS,aAAE,OAAO;AAAA,EAClB,MAAM,aAAE,MAAM,CAAC,aAAE,QAAQ,UAAU,GAAG,aAAE,QAAQ,UAAU,CAAC,CAAC;AAC7D,CAAC;AAIM,IAAM,EAAE,SAAS,QAAQ,QAAI,YAAAA,SAAiE;AAAA,EACpG,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,aAAa,CAAC,UAAmB,gDAAgD;AAAA,EACjF,eAAe;AAChB,CAAC;AAID,IAAM,0BAA0B,qBAAqB,OAAO,EAAE,KAAK,aAAE,QAAQ,EAAE,CAAC;AAIhF,IAAM,6BAA6B,aAAE,OAAO;AAAA,EAC3C,QAAQ,aAAE,MAAM,uBAAuB;AACxC,CAAC;AAKM,IAAM,EAAE,IAAI,MAAM,OAAO,IAAI;","names":["createType"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// PluginDependenciesResponse.ts
|
|
2
|
+
import createType from "@taqueria/protocol/Base";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
var rawRuntimeDependency = z.object({
|
|
5
|
+
name: z.string(),
|
|
6
|
+
path: z.string(),
|
|
7
|
+
version: z.string(),
|
|
8
|
+
kind: z.union([z.literal("required"), z.literal("optional")])
|
|
9
|
+
});
|
|
10
|
+
var { schemas, factory } = createType({
|
|
11
|
+
rawSchema: rawRuntimeDependency,
|
|
12
|
+
internalSchema: rawRuntimeDependency,
|
|
13
|
+
parseErrMsg: (value) => `The following runtime dependency is invalid: ${value}`,
|
|
14
|
+
unknownErrMsg: "Something went wrong trying to parse the template"
|
|
15
|
+
});
|
|
16
|
+
var runtimeDependencyReport = rawRuntimeDependency.extend({ met: z.boolean() });
|
|
17
|
+
var dependenciesResponseSchema = z.object({
|
|
18
|
+
report: z.array(runtimeDependencyReport)
|
|
19
|
+
});
|
|
20
|
+
var { of, make, create } = factory;
|
|
21
|
+
export {
|
|
22
|
+
create,
|
|
23
|
+
factory,
|
|
24
|
+
make,
|
|
25
|
+
of,
|
|
26
|
+
schemas
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=PluginDependenciesResponse.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["PluginDependenciesResponse.ts"],"sourcesContent":["import createType from '@taqueria/protocol/Base';\nimport { z } from 'zod';\n\nconst rawRuntimeDependency = z.object({\n\tname: z.string(),\n\tpath: z.string(),\n\tversion: z.string(),\n\tkind: z.union([z.literal('required'), z.literal('optional')]),\n});\n\ntype RawRuntimeDependencyInput = z.infer<typeof rawRuntimeDependency>;\n\nexport const { schemas, factory } = createType<RawRuntimeDependencyInput, RawRuntimeDependencyInput>({\n\trawSchema: rawRuntimeDependency,\n\tinternalSchema: rawRuntimeDependency,\n\tparseErrMsg: (value: unknown) => `The following runtime dependency is invalid: ${value}`,\n\tunknownErrMsg: 'Something went wrong trying to parse the template',\n});\n\nexport type RuntimeDependency = z.infer<typeof schemas.schema>;\n\nconst runtimeDependencyReport = rawRuntimeDependency.extend({ met: z.boolean() });\n\nexport type RuntimeDependencyReport = z.infer<typeof runtimeDependencyReport>;\n\nconst dependenciesResponseSchema = z.object({\n\treport: z.array(runtimeDependencyReport),\n});\n\nexport type PluginDependenciesResponse = z.infer<typeof dependenciesResponseSchema>;\nexport type t = PluginDependenciesResponse;\n\nexport const { of, make, create } = factory;\n"],"mappings":";AAAA,OAAO,gBAAgB;AACvB,SAAS,SAAS;AAElB,IAAM,uBAAuB,EAAE,OAAO;AAAA,EACrC,MAAM,EAAE,OAAO;AAAA,EACf,MAAM,EAAE,OAAO;AAAA,EACf,SAAS,EAAE,OAAO;AAAA,EAClB,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,UAAU,GAAG,EAAE,QAAQ,UAAU,CAAC,CAAC;AAC7D,CAAC;AAIM,IAAM,EAAE,SAAS,QAAQ,IAAI,WAAiE;AAAA,EACpG,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,aAAa,CAAC,UAAmB,gDAAgD;AAAA,EACjF,eAAe;AAChB,CAAC;AAID,IAAM,0BAA0B,qBAAqB,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AAIhF,IAAM,6BAA6B,EAAE,OAAO;AAAA,EAC3C,QAAQ,EAAE,MAAM,uBAAuB;AACxC,CAAC;AAKM,IAAM,EAAE,IAAI,MAAM,OAAO,IAAI;","names":[]}
|