@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,19 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// ScaffoldConfig.ts
|
|
17
|
+
var ScaffoldConfig_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(ScaffoldConfig_exports);
|
|
19
|
+
//# sourceMappingURL=ScaffoldConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["ScaffoldConfig.ts"],"sourcesContent":["// TODO - use zod schema\nexport interface ScaffoldType {\n\tpostInit?: string;\n}\n\nexport type t = ScaffoldType;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=ScaffoldConfig.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/Settings.d.ts
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
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
|
+
consent: z.ZodUnion<[z.ZodLiteral<"opt_in">, z.ZodLiteral<"opt_out">]>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
consent: "opt_in" | "opt_out";
|
|
9
|
+
}, {
|
|
10
|
+
consent: "opt_in" | "opt_out";
|
|
11
|
+
}>;
|
|
12
|
+
declare const generatedSchemas: {
|
|
13
|
+
rawSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
14
|
+
internalSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
15
|
+
schema: z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, {
|
|
16
|
+
consent: "opt_in" | "opt_out";
|
|
17
|
+
} & {
|
|
18
|
+
readonly __kind: any;
|
|
19
|
+
}, any>;
|
|
20
|
+
};
|
|
21
|
+
declare const factory: {
|
|
22
|
+
make: (input: {
|
|
23
|
+
consent: "opt_in" | "opt_out";
|
|
24
|
+
}) => fluture.FutureInstance<TaqError, {
|
|
25
|
+
consent: "opt_in" | "opt_out";
|
|
26
|
+
} & {
|
|
27
|
+
readonly __kind: any;
|
|
28
|
+
}>;
|
|
29
|
+
of: (input: unknown) => fluture.FutureInstance<TaqError, {
|
|
30
|
+
consent: "opt_in" | "opt_out";
|
|
31
|
+
} & {
|
|
32
|
+
readonly __kind: any;
|
|
33
|
+
}>;
|
|
34
|
+
create: (input: {
|
|
35
|
+
consent: "opt_in" | "opt_out";
|
|
36
|
+
}) => {
|
|
37
|
+
consent: "opt_in" | "opt_out";
|
|
38
|
+
} & {
|
|
39
|
+
readonly __kind: any;
|
|
40
|
+
};
|
|
41
|
+
from: (input: unknown) => {
|
|
42
|
+
consent: "opt_in" | "opt_out";
|
|
43
|
+
} & {
|
|
44
|
+
readonly __kind: any;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
declare type Settings = z.infer<typeof generatedSchemas.schema>;
|
|
48
|
+
declare type t = Settings;
|
|
49
|
+
declare const create: (input: {
|
|
50
|
+
consent: "opt_in" | "opt_out";
|
|
51
|
+
}) => {
|
|
52
|
+
consent: "opt_in" | "opt_out";
|
|
53
|
+
} & {
|
|
54
|
+
readonly __kind: any;
|
|
55
|
+
};
|
|
56
|
+
declare const of: (input: unknown) => fluture.FutureInstance<TaqError, {
|
|
57
|
+
consent: "opt_in" | "opt_out";
|
|
58
|
+
} & {
|
|
59
|
+
readonly __kind: any;
|
|
60
|
+
}>;
|
|
61
|
+
declare const make: (input: {
|
|
62
|
+
consent: "opt_in" | "opt_out";
|
|
63
|
+
}) => fluture.FutureInstance<TaqError, {
|
|
64
|
+
consent: "opt_in" | "opt_out";
|
|
65
|
+
} & {
|
|
66
|
+
readonly __kind: any;
|
|
67
|
+
}>;
|
|
68
|
+
declare const schemas: {
|
|
69
|
+
schema: z.ZodEffects<z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, {
|
|
70
|
+
consent: "opt_in" | "opt_out";
|
|
71
|
+
} & {
|
|
72
|
+
readonly __kind: any;
|
|
73
|
+
}, any>, {
|
|
74
|
+
consent: "opt_in" | "opt_out";
|
|
75
|
+
} & {
|
|
76
|
+
readonly __kind: any;
|
|
77
|
+
}, any>;
|
|
78
|
+
rawSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
79
|
+
internalSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export { Settings, create, factory, generatedSchemas, make, of, rawSchema, schemas, t };
|
package/Settings.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
// Settings.ts
|
|
27
|
+
var Settings_exports = {};
|
|
28
|
+
__export(Settings_exports, {
|
|
29
|
+
create: () => create,
|
|
30
|
+
factory: () => factory,
|
|
31
|
+
generatedSchemas: () => generatedSchemas,
|
|
32
|
+
make: () => make,
|
|
33
|
+
of: () => of,
|
|
34
|
+
rawSchema: () => rawSchema,
|
|
35
|
+
schemas: () => schemas
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(Settings_exports);
|
|
38
|
+
var import_Base = __toESM(require("@taqueria/protocol/Base"));
|
|
39
|
+
var import_zod = require("zod");
|
|
40
|
+
var rawSchema = import_zod.z.object({
|
|
41
|
+
consent: import_zod.z.union(
|
|
42
|
+
[import_zod.z.literal("opt_in"), import_zod.z.literal("opt_out")],
|
|
43
|
+
{ description: "Consent" }
|
|
44
|
+
)
|
|
45
|
+
}).describe("Setting");
|
|
46
|
+
var { schemas: generatedSchemas, factory } = (0, import_Base.default)({
|
|
47
|
+
rawSchema,
|
|
48
|
+
parseErrMsg: (value) => `${value} is not a valid settings type`,
|
|
49
|
+
unknownErrMsg: "Something went wrong when parsing the settings file"
|
|
50
|
+
});
|
|
51
|
+
var { create, of, make } = factory;
|
|
52
|
+
var schemas = {
|
|
53
|
+
...generatedSchemas,
|
|
54
|
+
schema: generatedSchemas.schema.transform((val) => val)
|
|
55
|
+
};
|
|
56
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
57
|
+
0 && (module.exports = {
|
|
58
|
+
create,
|
|
59
|
+
factory,
|
|
60
|
+
generatedSchemas,
|
|
61
|
+
make,
|
|
62
|
+
of,
|
|
63
|
+
rawSchema,
|
|
64
|
+
schemas
|
|
65
|
+
});
|
|
66
|
+
//# sourceMappingURL=Settings.js.map
|
package/Settings.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["Settings.ts"],"sourcesContent":["import createType from '@taqueria/protocol/Base';\nimport { z } from 'zod';\n\nexport const rawSchema = z.object({\n\tconsent: z.union(\n\t\t[z.literal('opt_in'), z.literal('opt_out')],\n\t\t{ description: 'Consent' },\n\t),\n}).describe('Setting');\n\ntype RawInput = z.infer<typeof rawSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, RawInput>({\n\trawSchema,\n\tparseErrMsg: (value: unknown) => `${value} is not a valid settings type`,\n\tunknownErrMsg: 'Something went wrong when parsing the settings file',\n});\n\nexport type Settings = z.infer<typeof generatedSchemas.schema>;\nexport type t = Settings;\n\nexport const { create, of, make } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as Settings),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuB;AACvB,iBAAkB;AAEX,IAAM,YAAY,aAAE,OAAO;AAAA,EACjC,SAAS,aAAE;AAAA,IACV,CAAC,aAAE,QAAQ,QAAQ,GAAG,aAAE,QAAQ,SAAS,CAAC;AAAA,IAC1C,EAAE,aAAa,UAAU;AAAA,EAC1B;AACD,CAAC,EAAE,SAAS,SAAS;AAId,IAAM,EAAE,SAAS,kBAAkB,QAAQ,QAAI,YAAAA,SAA+B;AAAA,EACpF;AAAA,EACA,aAAa,CAAC,UAAmB,GAAG;AAAA,EACpC,eAAe;AAChB,CAAC;AAKM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAE7B,IAAM,UAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAe;AACjE;","names":["createType"]}
|
package/Settings.mjs
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Settings.ts
|
|
2
|
+
import createType from "@taqueria/protocol/Base";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
var rawSchema = z.object({
|
|
5
|
+
consent: z.union(
|
|
6
|
+
[z.literal("opt_in"), z.literal("opt_out")],
|
|
7
|
+
{ description: "Consent" }
|
|
8
|
+
)
|
|
9
|
+
}).describe("Setting");
|
|
10
|
+
var { schemas: generatedSchemas, factory } = createType({
|
|
11
|
+
rawSchema,
|
|
12
|
+
parseErrMsg: (value) => `${value} is not a valid settings type`,
|
|
13
|
+
unknownErrMsg: "Something went wrong when parsing the settings file"
|
|
14
|
+
});
|
|
15
|
+
var { create, of, make } = factory;
|
|
16
|
+
var schemas = {
|
|
17
|
+
...generatedSchemas,
|
|
18
|
+
schema: generatedSchemas.schema.transform((val) => val)
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
create,
|
|
22
|
+
factory,
|
|
23
|
+
generatedSchemas,
|
|
24
|
+
make,
|
|
25
|
+
of,
|
|
26
|
+
rawSchema,
|
|
27
|
+
schemas
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=Settings.mjs.map
|
package/Settings.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["Settings.ts"],"sourcesContent":["import createType from '@taqueria/protocol/Base';\nimport { z } from 'zod';\n\nexport const rawSchema = z.object({\n\tconsent: z.union(\n\t\t[z.literal('opt_in'), z.literal('opt_out')],\n\t\t{ description: 'Consent' },\n\t),\n}).describe('Setting');\n\ntype RawInput = z.infer<typeof rawSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, RawInput>({\n\trawSchema,\n\tparseErrMsg: (value: unknown) => `${value} is not a valid settings type`,\n\tunknownErrMsg: 'Something went wrong when parsing the settings file',\n});\n\nexport type Settings = z.infer<typeof generatedSchemas.schema>;\nexport type t = Settings;\n\nexport const { create, of, make } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as Settings),\n};\n"],"mappings":";AAAA,OAAO,gBAAgB;AACvB,SAAS,SAAS;AAEX,IAAM,YAAY,EAAE,OAAO;AAAA,EACjC,SAAS,EAAE;AAAA,IACV,CAAC,EAAE,QAAQ,QAAQ,GAAG,EAAE,QAAQ,SAAS,CAAC;AAAA,IAC1C,EAAE,aAAa,UAAU;AAAA,EAC1B;AACD,CAAC,EAAE,SAAS,SAAS;AAId,IAAM,EAAE,SAAS,kBAAkB,QAAQ,IAAI,WAA+B;AAAA,EACpF;AAAA,EACA,aAAa,CAAC,UAAmB,GAAG;AAAA,EACpC,eAAe;AAChB,CAAC;AAKM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAE7B,IAAM,UAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAe;AACjE;","names":[]}
|
package/SingleChar.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as fluture from 'fluture';
|
|
2
|
+
import { TaqError } from './TaqError.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
declare const rawSchema: z.ZodString;
|
|
6
|
+
declare const factory: {
|
|
7
|
+
make: (input: string) => fluture.FutureInstance<TaqError, string & {
|
|
8
|
+
readonly __kind: any;
|
|
9
|
+
}>;
|
|
10
|
+
of: (input: unknown) => fluture.FutureInstance<TaqError, string & {
|
|
11
|
+
readonly __kind: any;
|
|
12
|
+
}>;
|
|
13
|
+
create: (input: string) => string & {
|
|
14
|
+
readonly __kind: any;
|
|
15
|
+
};
|
|
16
|
+
from: (input: unknown) => string & {
|
|
17
|
+
readonly __kind: any;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
declare const generatedSchemas: {
|
|
21
|
+
rawSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
22
|
+
internalSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
23
|
+
schema: z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, string & {
|
|
24
|
+
readonly __kind: any;
|
|
25
|
+
}, any>;
|
|
26
|
+
};
|
|
27
|
+
declare type SingleChar = z.infer<typeof generatedSchemas.schema>;
|
|
28
|
+
declare type t = SingleChar;
|
|
29
|
+
declare const create: (input: string) => string & {
|
|
30
|
+
readonly __kind: any;
|
|
31
|
+
};
|
|
32
|
+
declare const of: (input: unknown) => fluture.FutureInstance<TaqError, string & {
|
|
33
|
+
readonly __kind: any;
|
|
34
|
+
}>;
|
|
35
|
+
declare const make: (input: string) => fluture.FutureInstance<TaqError, string & {
|
|
36
|
+
readonly __kind: any;
|
|
37
|
+
}>;
|
|
38
|
+
declare const schemas: {
|
|
39
|
+
schema: z.ZodEffects<z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, string & {
|
|
40
|
+
readonly __kind: any;
|
|
41
|
+
}, any>, string & {
|
|
42
|
+
readonly __kind: any;
|
|
43
|
+
}, any>;
|
|
44
|
+
rawSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
45
|
+
internalSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export { SingleChar, create, factory, generatedSchemas, make, of, rawSchema, schemas, t };
|
package/SingleChar.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
// SingleChar.ts
|
|
27
|
+
var SingleChar_exports = {};
|
|
28
|
+
__export(SingleChar_exports, {
|
|
29
|
+
create: () => create,
|
|
30
|
+
factory: () => factory,
|
|
31
|
+
generatedSchemas: () => generatedSchemas,
|
|
32
|
+
make: () => make,
|
|
33
|
+
of: () => of,
|
|
34
|
+
rawSchema: () => rawSchema,
|
|
35
|
+
schemas: () => schemas
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(SingleChar_exports);
|
|
38
|
+
var import_Base = __toESM(require("@taqueria/protocol/Base"));
|
|
39
|
+
var import_zod = require("zod");
|
|
40
|
+
var rawSchema = import_zod.z.string({ description: "Single character" }).regex(/^[A-Za-z]$/, "Must be a single character");
|
|
41
|
+
var { factory, schemas: generatedSchemas } = (0, import_Base.default)({
|
|
42
|
+
isStringLike: true,
|
|
43
|
+
rawSchema,
|
|
44
|
+
parseErrMsg: (value) => `${value} is not a single character`,
|
|
45
|
+
unknownErrMsg: `Something went wrong trying to parse a single character`
|
|
46
|
+
});
|
|
47
|
+
var { create, of, make } = factory;
|
|
48
|
+
var schemas = {
|
|
49
|
+
...generatedSchemas,
|
|
50
|
+
schema: generatedSchemas.schema.transform((val) => val)
|
|
51
|
+
};
|
|
52
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
53
|
+
0 && (module.exports = {
|
|
54
|
+
create,
|
|
55
|
+
factory,
|
|
56
|
+
generatedSchemas,
|
|
57
|
+
make,
|
|
58
|
+
of,
|
|
59
|
+
rawSchema,
|
|
60
|
+
schemas
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=SingleChar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["SingleChar.ts"],"sourcesContent":["import createType from '@taqueria/protocol/Base';\nimport { z } from 'zod';\n\nexport const rawSchema = z\n\t.string({ description: 'Single character' })\n\t.regex(/^[A-Za-z]$/, 'Must be a single character');\n\ntype RawInput = z.infer<typeof rawSchema>;\n\nexport const { factory, schemas: generatedSchemas } = createType<RawInput, RawInput>({\n\tisStringLike: true,\n\trawSchema,\n\tparseErrMsg: (value: unknown) => `${value} is not a single character`,\n\tunknownErrMsg: `Something went wrong trying to parse a single character`,\n});\n\nexport type SingleChar = z.infer<typeof generatedSchemas.schema>;\nexport type t = SingleChar;\nexport const { create, of, make } = factory;\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as SingleChar),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuB;AACvB,iBAAkB;AAEX,IAAM,YAAY,aACvB,OAAO,EAAE,aAAa,mBAAmB,CAAC,EAC1C,MAAM,cAAc,4BAA4B;AAI3C,IAAM,EAAE,SAAS,SAAS,iBAAiB,QAAI,YAAAA,SAA+B;AAAA,EACpF,cAAc;AAAA,EACd;AAAA,EACA,aAAa,CAAC,UAAmB,GAAG;AAAA,EACpC,eAAe;AAChB,CAAC;AAIM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAC7B,IAAM,UAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAiB;AACnE;","names":["createType"]}
|
package/SingleChar.mjs
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// SingleChar.ts
|
|
2
|
+
import createType from "@taqueria/protocol/Base";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
var rawSchema = z.string({ description: "Single character" }).regex(/^[A-Za-z]$/, "Must be a single character");
|
|
5
|
+
var { factory, schemas: generatedSchemas } = createType({
|
|
6
|
+
isStringLike: true,
|
|
7
|
+
rawSchema,
|
|
8
|
+
parseErrMsg: (value) => `${value} is not a single character`,
|
|
9
|
+
unknownErrMsg: `Something went wrong trying to parse a single character`
|
|
10
|
+
});
|
|
11
|
+
var { create, of, make } = factory;
|
|
12
|
+
var schemas = {
|
|
13
|
+
...generatedSchemas,
|
|
14
|
+
schema: generatedSchemas.schema.transform((val) => val)
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
create,
|
|
18
|
+
factory,
|
|
19
|
+
generatedSchemas,
|
|
20
|
+
make,
|
|
21
|
+
of,
|
|
22
|
+
rawSchema,
|
|
23
|
+
schemas
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=SingleChar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["SingleChar.ts"],"sourcesContent":["import createType from '@taqueria/protocol/Base';\nimport { z } from 'zod';\n\nexport const rawSchema = z\n\t.string({ description: 'Single character' })\n\t.regex(/^[A-Za-z]$/, 'Must be a single character');\n\ntype RawInput = z.infer<typeof rawSchema>;\n\nexport const { factory, schemas: generatedSchemas } = createType<RawInput, RawInput>({\n\tisStringLike: true,\n\trawSchema,\n\tparseErrMsg: (value: unknown) => `${value} is not a single character`,\n\tunknownErrMsg: `Something went wrong trying to parse a single character`,\n});\n\nexport type SingleChar = z.infer<typeof generatedSchemas.schema>;\nexport type t = SingleChar;\nexport const { create, of, make } = factory;\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as SingleChar),\n};\n"],"mappings":";AAAA,OAAO,gBAAgB;AACvB,SAAS,SAAS;AAEX,IAAM,YAAY,EACvB,OAAO,EAAE,aAAa,mBAAmB,CAAC,EAC1C,MAAM,cAAc,4BAA4B;AAI3C,IAAM,EAAE,SAAS,SAAS,iBAAiB,IAAI,WAA+B;AAAA,EACpF,cAAc;AAAA,EACd;AAAA,EACA,aAAa,CAAC,UAAmB,GAAG;AAAA,EACpC,eAAe;AAChB,CAAC;AAIM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAC7B,IAAM,UAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAiB;AACnE;","names":[]}
|
package/TaqError.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as fluture from 'fluture';
|
|
2
|
+
import { ZodError } from 'zod';
|
|
3
|
+
|
|
4
|
+
declare type ErrorType = 'E_INVALID_PATH_DOES_NOT_EXIST' | 'E_INVALID_PATH_EXISTS_AND_NOT_AN_EMPTY_DIR' | 'E_INVALID_PATH_ALREADY_EXISTS' | 'E_INVALID_CONFIG' | 'E_INVALID_JSON' | 'E_FORK' | 'E_INVALID_TASK' | 'E_READFILE' | 'E_NPM_INIT' | 'E_INVALID_PLUGIN_RESPONSE' | 'E_INVALID_ARGS' | 'E_MKDIR_FAILED' | 'E_GIT_CLONE_FAILED' | 'E_PROVISION' | 'E_PARSE' | 'E_PARSE_UNKNOWN' | 'E_INVALID_ARCH' | 'E_CONTRACT_REGISTERED' | 'E_CONTRACT_NOT_REGISTERED' | 'E_NO_PROVISIONS' | 'E_INTERNAL_LOGICAL_VALIDATION_FAILURE' | 'E_EXEC';
|
|
5
|
+
interface TaqError {
|
|
6
|
+
readonly kind: ErrorType;
|
|
7
|
+
msg: string;
|
|
8
|
+
previous?: TaqError | Error | unknown;
|
|
9
|
+
context?: unknown;
|
|
10
|
+
}
|
|
11
|
+
declare type t = TaqError;
|
|
12
|
+
declare class E_TaqError extends Error {
|
|
13
|
+
readonly context: unknown;
|
|
14
|
+
readonly kind: ErrorType;
|
|
15
|
+
readonly previous: unknown;
|
|
16
|
+
constructor(taqErr: TaqError);
|
|
17
|
+
}
|
|
18
|
+
declare const toFutureParseErr: <T>(previous: ZodError, msg: string, context?: unknown) => fluture.FutureInstance<TaqError, T>;
|
|
19
|
+
declare const toParseErr: (previous: ZodError, msg: string, context?: unknown) => TaqError;
|
|
20
|
+
declare const toParseUnknownErr: (previous: Error | TaqError | E_TaqError | unknown, msg: string, context?: unknown) => TaqError;
|
|
21
|
+
declare const toFutureParseUnknownErr: <T>(previous: Error | TaqError | E_TaqError | unknown, msg: string, context?: unknown) => fluture.FutureInstance<TaqError, T>;
|
|
22
|
+
declare const create: (err: TaqError) => TaqError;
|
|
23
|
+
|
|
24
|
+
export { E_TaqError, ErrorType, TaqError, create, t, toFutureParseErr, toFutureParseUnknownErr, toParseErr, toParseUnknownErr };
|
package/TaqError.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
// TaqError.ts
|
|
21
|
+
var TaqError_exports = {};
|
|
22
|
+
__export(TaqError_exports, {
|
|
23
|
+
E_TaqError: () => E_TaqError,
|
|
24
|
+
create: () => create,
|
|
25
|
+
toFutureParseErr: () => toFutureParseErr,
|
|
26
|
+
toFutureParseUnknownErr: () => toFutureParseUnknownErr,
|
|
27
|
+
toParseErr: () => toParseErr,
|
|
28
|
+
toParseUnknownErr: () => toParseUnknownErr
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(TaqError_exports);
|
|
31
|
+
var import_fluture = require("fluture");
|
|
32
|
+
var E_TaqError = class extends Error {
|
|
33
|
+
constructor(taqErr) {
|
|
34
|
+
super(taqErr.msg);
|
|
35
|
+
this.context = taqErr.context;
|
|
36
|
+
this.kind = taqErr.kind;
|
|
37
|
+
this.name = this.kind;
|
|
38
|
+
this.previous = taqErr.previous;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
var toFutureParseErr = (previous, msg, context) => (0, import_fluture.reject)(toParseErr(previous, msg, context)).pipe((0, import_fluture.map)((val) => val));
|
|
42
|
+
var toParseErr = (previous, msg, context) => create({
|
|
43
|
+
kind: "E_PARSE",
|
|
44
|
+
msg,
|
|
45
|
+
context,
|
|
46
|
+
previous
|
|
47
|
+
});
|
|
48
|
+
var toParseUnknownErr = (previous, msg, context) => create({
|
|
49
|
+
kind: "E_PARSE_UNKNOWN",
|
|
50
|
+
msg,
|
|
51
|
+
context,
|
|
52
|
+
previous
|
|
53
|
+
});
|
|
54
|
+
var toFutureParseUnknownErr = (previous, msg, context) => (0, import_fluture.reject)(toParseUnknownErr(previous, msg, context)).pipe((0, import_fluture.map)((val) => val));
|
|
55
|
+
var create = (err) => err;
|
|
56
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
57
|
+
0 && (module.exports = {
|
|
58
|
+
E_TaqError,
|
|
59
|
+
create,
|
|
60
|
+
toFutureParseErr,
|
|
61
|
+
toFutureParseUnknownErr,
|
|
62
|
+
toParseErr,
|
|
63
|
+
toParseUnknownErr
|
|
64
|
+
});
|
|
65
|
+
//# sourceMappingURL=TaqError.js.map
|
package/TaqError.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["TaqError.ts"],"sourcesContent":["import { map, reject } from 'fluture';\nimport { ZodError } from 'zod';\n\nexport type ErrorType =\n\t| 'E_INVALID_PATH_DOES_NOT_EXIST'\n\t| 'E_INVALID_PATH_EXISTS_AND_NOT_AN_EMPTY_DIR'\n\t| 'E_INVALID_PATH_ALREADY_EXISTS'\n\t| 'E_INVALID_CONFIG'\n\t| 'E_INVALID_JSON'\n\t| 'E_FORK'\n\t| 'E_INVALID_TASK'\n\t| 'E_READFILE'\n\t| 'E_NPM_INIT'\n\t| 'E_INVALID_PLUGIN_RESPONSE'\n\t| 'E_INVALID_ARGS'\n\t| 'E_MKDIR_FAILED'\n\t| 'E_GIT_CLONE_FAILED'\n\t| 'E_PROVISION'\n\t| 'E_PARSE'\n\t| 'E_PARSE_UNKNOWN'\n\t| 'E_INVALID_ARCH'\n\t| 'E_CONTRACT_REGISTERED'\n\t| 'E_CONTRACT_NOT_REGISTERED'\n\t| 'E_NO_PROVISIONS'\n\t| 'E_INTERNAL_LOGICAL_VALIDATION_FAILURE'\n\t| 'E_EXEC';\n\nexport interface TaqError {\n\treadonly kind: ErrorType;\n\tmsg: string;\n\tprevious?: TaqError | Error | unknown;\n\tcontext?: unknown;\n}\n\nexport type t = TaqError;\n\nexport class E_TaqError extends Error {\n\treadonly context;\n\treadonly kind;\n\treadonly previous;\n\tconstructor(taqErr: TaqError) {\n\t\tsuper(taqErr.msg);\n\t\tthis.context = taqErr.context;\n\t\tthis.kind = taqErr.kind;\n\t\tthis.name = this.kind;\n\t\tthis.previous = taqErr.previous;\n\t}\n}\n\nexport const toFutureParseErr = <T>(previous: ZodError, msg: string, context?: unknown) =>\n\treject(toParseErr(previous, msg, context))\n\t\t.pipe(map((val: unknown) => val as T));\n\nexport const toParseErr = (previous: ZodError, msg: string, context?: unknown) =>\n\tcreate({\n\t\tkind: 'E_PARSE',\n\t\tmsg: msg,\n\t\tcontext,\n\t\tprevious,\n\t});\n\nexport const toParseUnknownErr = (previous: Error | TaqError | E_TaqError | unknown, msg: string, context?: unknown) =>\n\tcreate({\n\t\tkind: 'E_PARSE_UNKNOWN',\n\t\tmsg: msg,\n\t\tcontext,\n\t\tprevious,\n\t});\n\nexport const toFutureParseUnknownErr = <T>(\n\tprevious: Error | TaqError | E_TaqError | unknown,\n\tmsg: string,\n\tcontext?: unknown,\n) =>\n\treject(toParseUnknownErr(previous, msg, context))\n\t\t.pipe(map((val: unknown) => val as T));\n\nexport const create = (err: TaqError) => err;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAA4B;AAoCrB,IAAM,aAAN,cAAyB,MAAM;AAAA,EAIrC,YAAY,QAAkB;AAC7B,UAAM,OAAO,GAAG;AAChB,SAAK,UAAU,OAAO;AACtB,SAAK,OAAO,OAAO;AACnB,SAAK,OAAO,KAAK;AACjB,SAAK,WAAW,OAAO;AAAA,EACxB;AACD;AAEO,IAAM,mBAAmB,CAAI,UAAoB,KAAa,gBACpE,uBAAO,WAAW,UAAU,KAAK,OAAO,CAAC,EACvC,SAAK,oBAAI,CAAC,QAAiB,GAAQ,CAAC;AAEhC,IAAM,aAAa,CAAC,UAAoB,KAAa,YAC3D,OAAO;AAAA,EACN,MAAM;AAAA,EACN;AAAA,EACA;AAAA,EACA;AACD,CAAC;AAEK,IAAM,oBAAoB,CAAC,UAAmD,KAAa,YACjG,OAAO;AAAA,EACN,MAAM;AAAA,EACN;AAAA,EACA;AAAA,EACA;AACD,CAAC;AAEK,IAAM,0BAA0B,CACtC,UACA,KACA,gBAEA,uBAAO,kBAAkB,UAAU,KAAK,OAAO,CAAC,EAC9C,SAAK,oBAAI,CAAC,QAAiB,GAAQ,CAAC;AAEhC,IAAM,SAAS,CAAC,QAAkB;","names":[]}
|
package/TaqError.mjs
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// TaqError.ts
|
|
2
|
+
import { map, reject } from "fluture";
|
|
3
|
+
var E_TaqError = class extends Error {
|
|
4
|
+
constructor(taqErr) {
|
|
5
|
+
super(taqErr.msg);
|
|
6
|
+
this.context = taqErr.context;
|
|
7
|
+
this.kind = taqErr.kind;
|
|
8
|
+
this.name = this.kind;
|
|
9
|
+
this.previous = taqErr.previous;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
var toFutureParseErr = (previous, msg, context) => reject(toParseErr(previous, msg, context)).pipe(map((val) => val));
|
|
13
|
+
var toParseErr = (previous, msg, context) => create({
|
|
14
|
+
kind: "E_PARSE",
|
|
15
|
+
msg,
|
|
16
|
+
context,
|
|
17
|
+
previous
|
|
18
|
+
});
|
|
19
|
+
var toParseUnknownErr = (previous, msg, context) => create({
|
|
20
|
+
kind: "E_PARSE_UNKNOWN",
|
|
21
|
+
msg,
|
|
22
|
+
context,
|
|
23
|
+
previous
|
|
24
|
+
});
|
|
25
|
+
var toFutureParseUnknownErr = (previous, msg, context) => reject(toParseUnknownErr(previous, msg, context)).pipe(map((val) => val));
|
|
26
|
+
var create = (err) => err;
|
|
27
|
+
export {
|
|
28
|
+
E_TaqError,
|
|
29
|
+
create,
|
|
30
|
+
toFutureParseErr,
|
|
31
|
+
toFutureParseUnknownErr,
|
|
32
|
+
toParseErr,
|
|
33
|
+
toParseUnknownErr
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=TaqError.mjs.map
|
package/TaqError.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["TaqError.ts"],"sourcesContent":["import { map, reject } from 'fluture';\nimport { ZodError } from 'zod';\n\nexport type ErrorType =\n\t| 'E_INVALID_PATH_DOES_NOT_EXIST'\n\t| 'E_INVALID_PATH_EXISTS_AND_NOT_AN_EMPTY_DIR'\n\t| 'E_INVALID_PATH_ALREADY_EXISTS'\n\t| 'E_INVALID_CONFIG'\n\t| 'E_INVALID_JSON'\n\t| 'E_FORK'\n\t| 'E_INVALID_TASK'\n\t| 'E_READFILE'\n\t| 'E_NPM_INIT'\n\t| 'E_INVALID_PLUGIN_RESPONSE'\n\t| 'E_INVALID_ARGS'\n\t| 'E_MKDIR_FAILED'\n\t| 'E_GIT_CLONE_FAILED'\n\t| 'E_PROVISION'\n\t| 'E_PARSE'\n\t| 'E_PARSE_UNKNOWN'\n\t| 'E_INVALID_ARCH'\n\t| 'E_CONTRACT_REGISTERED'\n\t| 'E_CONTRACT_NOT_REGISTERED'\n\t| 'E_NO_PROVISIONS'\n\t| 'E_INTERNAL_LOGICAL_VALIDATION_FAILURE'\n\t| 'E_EXEC';\n\nexport interface TaqError {\n\treadonly kind: ErrorType;\n\tmsg: string;\n\tprevious?: TaqError | Error | unknown;\n\tcontext?: unknown;\n}\n\nexport type t = TaqError;\n\nexport class E_TaqError extends Error {\n\treadonly context;\n\treadonly kind;\n\treadonly previous;\n\tconstructor(taqErr: TaqError) {\n\t\tsuper(taqErr.msg);\n\t\tthis.context = taqErr.context;\n\t\tthis.kind = taqErr.kind;\n\t\tthis.name = this.kind;\n\t\tthis.previous = taqErr.previous;\n\t}\n}\n\nexport const toFutureParseErr = <T>(previous: ZodError, msg: string, context?: unknown) =>\n\treject(toParseErr(previous, msg, context))\n\t\t.pipe(map((val: unknown) => val as T));\n\nexport const toParseErr = (previous: ZodError, msg: string, context?: unknown) =>\n\tcreate({\n\t\tkind: 'E_PARSE',\n\t\tmsg: msg,\n\t\tcontext,\n\t\tprevious,\n\t});\n\nexport const toParseUnknownErr = (previous: Error | TaqError | E_TaqError | unknown, msg: string, context?: unknown) =>\n\tcreate({\n\t\tkind: 'E_PARSE_UNKNOWN',\n\t\tmsg: msg,\n\t\tcontext,\n\t\tprevious,\n\t});\n\nexport const toFutureParseUnknownErr = <T>(\n\tprevious: Error | TaqError | E_TaqError | unknown,\n\tmsg: string,\n\tcontext?: unknown,\n) =>\n\treject(toParseUnknownErr(previous, msg, context))\n\t\t.pipe(map((val: unknown) => val as T));\n\nexport const create = (err: TaqError) => err;\n"],"mappings":";AAAA,SAAS,KAAK,cAAc;AAoCrB,IAAM,aAAN,cAAyB,MAAM;AAAA,EAIrC,YAAY,QAAkB;AAC7B,UAAM,OAAO,GAAG;AAChB,SAAK,UAAU,OAAO;AACtB,SAAK,OAAO,OAAO;AACnB,SAAK,OAAO,KAAK;AACjB,SAAK,WAAW,OAAO;AAAA,EACxB;AACD;AAEO,IAAM,mBAAmB,CAAI,UAAoB,KAAa,YACpE,OAAO,WAAW,UAAU,KAAK,OAAO,CAAC,EACvC,KAAK,IAAI,CAAC,QAAiB,GAAQ,CAAC;AAEhC,IAAM,aAAa,CAAC,UAAoB,KAAa,YAC3D,OAAO;AAAA,EACN,MAAM;AAAA,EACN;AAAA,EACA;AAAA,EACA;AACD,CAAC;AAEK,IAAM,oBAAoB,CAAC,UAAmD,KAAa,YACjG,OAAO;AAAA,EACN,MAAM;AAAA,EACN;AAAA,EACA;AAAA,EACA;AACD,CAAC;AAEK,IAAM,0BAA0B,CACtC,UACA,KACA,YAEA,OAAO,kBAAkB,UAAU,KAAK,OAAO,CAAC,EAC9C,KAAK,IAAI,CAAC,QAAiB,GAAQ,CAAC;AAEhC,IAAM,SAAS,CAAC,QAAkB;","names":[]}
|