@taqueria/protocol 0.26.28-rc → 0.27.0-rc
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/Base.js +3 -7
- package/Base.js.map +1 -1
- package/ConfigEnvironmentFileV2.d.ts +2 -0
- package/ConfigEnvironmentFileV2.d.ts.map +1 -0
- package/ConfigEnvironmentFileV2.js +21 -0
- package/ConfigEnvironmentFileV2.js.map +1 -0
- package/ConfigFileV2.d.ts +2 -0
- package/ConfigFileV2.d.ts.map +1 -0
- package/ConfigFileV2.js +21 -0
- package/ConfigFileV2.js.map +1 -0
- package/EphemeralState.js +4 -14
- package/EphemeralState.js.map +1 -1
- package/ParsedPluginInfo.js +2 -12
- package/ParsedPluginInfo.js.map +1 -1
- package/PersistentState.js +0 -11
- package/PersistentState.js.map +1 -1
- package/PluginInfo.js +6 -16
- package/PluginInfo.js.map +1 -1
- package/PluginSchema.js +4 -14
- package/PluginSchema.js.map +1 -1
- package/SHA256.js +0 -11
- package/SanitizedAbsPath.js +0 -10
- package/SanitizedArgs.d.ts +37 -487
- package/SanitizedArgs.d.ts.map +1 -1
- package/SanitizedArgs.js +16 -89
- package/SanitizedArgs.js.map +1 -1
- package/TaqError.d.ts +1 -1
- package/TaqError.d.ts.map +1 -1
- package/TaqError.js +0 -9
- package/TaqError.js.map +1 -1
- package/Template.js +0 -4
- package/helpers.js +0 -4
- package/i18n.d.ts.map +1 -1
- package/i18n.js +1 -9
- package/i18n.js.map +1 -1
- package/index.d.ts +4 -3
- package/index.d.ts.map +1 -1
- package/index.js +5 -58
- package/index.js.map +1 -1
- package/out/types/Alias.js +0 -10
- package/out/types/BuildNumber.js +0 -10
- package/out/types/Command.js +0 -10
- package/out/types/Config.js +0 -10
- package/out/types/ConfigAccount.js +0 -10
- package/out/types/ConfigArtifactsDir.js +0 -10
- package/out/types/ConfigContractsDir.js +0 -10
- package/out/types/ConfigEnvironmentFileV2.d.ts +17 -4
- package/out/types/ConfigEnvironmentFileV2.d.ts.map +1 -1
- package/out/types/ConfigEnvironmentFileV2.js +0 -10
- package/out/types/ConfigFileV1.js +0 -10
- package/out/types/ConfigFileV2.d.ts +25 -4
- package/out/types/ConfigFileV2.d.ts.map +1 -1
- package/out/types/ConfigFileV2.js +0 -10
- package/out/types/Contract.js +0 -10
- package/out/types/CurrencyAmountV2.js +0 -10
- package/out/types/EconomicalProtocolHash.js +0 -10
- package/out/types/Environment.js +0 -10
- package/out/types/EphemeralState.js +0 -10
- package/out/types/Faucet.js +0 -10
- package/out/types/HumanReadableIdentifier.js +0 -10
- package/out/types/InstalledPlugin.js +0 -10
- package/out/types/LoadedConfig.js +0 -10
- package/out/types/MetadataConfig.js +0 -10
- package/out/types/NetworkAccountConfig.js +0 -10
- package/out/types/NetworkConfig.js +0 -10
- package/out/types/NonEmptyString.js +0 -10
- package/out/types/Operation.js +0 -10
- package/out/types/Option.js +0 -10
- package/out/types/ParsedConfig.js +0 -10
- package/out/types/ParsedOperation.js +0 -10
- package/out/types/ParsedTemplate.js +0 -10
- package/out/types/PersistedOperation.js +0 -10
- package/out/types/PersistedTask.js +0 -10
- package/out/types/PersistentState.js +0 -10
- package/out/types/PluginActionName.js +0 -10
- package/out/types/PluginDependenciesResponse.js +0 -10
- package/out/types/PluginInfo.js +0 -10
- package/out/types/PluginJsonResponse.js +0 -10
- package/out/types/PluginProxyResponse.js +0 -10
- package/out/types/PluginResponseEncoding.js +0 -10
- package/out/types/PluginSchema.js +0 -10
- package/out/types/PositionalArg.js +0 -10
- package/out/types/Provisioner.js +0 -10
- package/out/types/ProvisionerID.js +0 -10
- package/out/types/Provisions.js +0 -10
- package/out/types/ProxyTaskArgs.js +0 -10
- package/out/types/ProxyTemplateArgs.js +0 -10
- package/out/types/PublicKeyHash.js +0 -10
- package/out/types/RequestArgs.js +0 -10
- package/out/types/RuntimeDependency.js +0 -10
- package/out/types/RuntimeDependencyReport.js +0 -10
- package/out/types/SHA256.js +0 -10
- package/out/types/SandboxAccountConfig.js +0 -10
- package/out/types/SandboxAccounts.d.js +19 -0
- package/out/types/SandboxAccounts.d.js.map +1 -0
- package/out/types/SandboxAccounts.d.ts +43 -0
- package/out/types/SandboxAccounts.d.ts.map +1 -0
- package/out/types/SandboxAccounts.js +70 -0
- package/out/types/SandboxAccounts.js.map +1 -0
- package/out/types/SandboxConfig.js +0 -10
- package/out/types/SanitizedAbsPath.js +0 -10
- package/out/types/SanitizedArgs.js +0 -10
- package/out/types/SanitizedPath.js +0 -10
- package/out/types/ScaffoldConfig.js +0 -10
- package/out/types/Settings.js +0 -10
- package/out/types/SingleChar.js +0 -10
- package/out/types/Task.js +0 -10
- package/out/types/Template.js +0 -10
- package/out/types/Timestamp.js +0 -10
- package/out/types/Tz.js +0 -10
- package/out/types/TzKtConfig.js +0 -10
- package/out/types/Url.js +0 -10
- package/out/types/Verb.js +0 -10
- package/out/types/VersionNumber.js +0 -10
- package/out/types-strict.d.js.map +1 -1
- package/out/types-strict.d.ts +9 -4
- package/out/types-strict.d.ts.map +1 -1
- package/out/types-strict.js.map +1 -1
- package/out/types-zod.d.js.map +1 -1
- package/out/types-zod.d.ts +17 -2
- package/out/types-zod.d.ts.map +1 -1
- package/out/types-zod.js +9 -74
- package/out/types-zod.js.map +1 -1
- package/package.json +4 -26
- package/taqueria-protocol-types.js +0 -39
- package/tsup.config.d.ts +4 -0
- package/tsup.config.d.ts.map +1 -0
- package/types-config-files.d.ts +10 -1
- package/types-config-files.d.ts.map +1 -1
- package/types-config-files.js +144 -65
- package/types-config-files.js.map +1 -1
- package/types.d.ts +6 -4
- package/types.d.ts.map +1 -1
- package/types.js.map +1 -1
- package/tzkt-config.js +0 -10
- package/Alias.mjs +0 -3
- package/Alias.mjs.map +0 -1
- package/Base.mjs +0 -57
- package/Base.mjs.map +0 -1
- package/Command.mjs +0 -3
- package/Command.mjs.map +0 -1
- package/Config.mjs +0 -3
- package/Config.mjs.map +0 -1
- package/ConfigArtifactsDir.mjs +0 -3
- package/ConfigArtifactsDir.mjs.map +0 -1
- package/ConfigContractsDir.mjs +0 -3
- package/ConfigContractsDir.mjs.map +0 -1
- package/Contract.mjs +0 -3
- package/Contract.mjs.map +0 -1
- package/Crypto.mjs +0 -1
- package/Crypto.mjs.map +0 -1
- package/EconomicalProtocolHash.mjs +0 -3
- package/EconomicalProtocolHash.mjs.map +0 -1
- package/Environment.mjs +0 -3
- package/Environment.mjs.map +0 -1
- package/EphemeralState.mjs +0 -238
- package/EphemeralState.mjs.map +0 -1
- package/Faucet.mjs +0 -3
- package/Faucet.mjs.map +0 -1
- package/HumanReadableIdentifier.mjs +0 -3
- package/HumanReadableIdentifier.mjs.map +0 -1
- package/InstalledPlugin.mjs +0 -3
- package/InstalledPlugin.mjs.map +0 -1
- package/LoadedConfig.mjs +0 -3
- package/LoadedConfig.mjs.map +0 -1
- package/MetadataConfig.mjs +0 -3
- package/MetadataConfig.mjs.map +0 -1
- package/NetworkAccountConfig.mjs +0 -3
- package/NetworkAccountConfig.mjs.map +0 -1
- package/NetworkConfig.mjs +0 -3
- package/NetworkConfig.mjs.map +0 -1
- package/NonEmptyString.mjs +0 -3
- package/NonEmptyString.mjs.map +0 -1
- package/Operation.mjs +0 -3
- package/Operation.mjs.map +0 -1
- package/Option.mjs +0 -3
- package/Option.mjs.map +0 -1
- package/ParsedOperation.mjs +0 -3
- package/ParsedOperation.mjs.map +0 -1
- package/ParsedPluginInfo.mjs +0 -44
- package/ParsedPluginInfo.mjs.map +0 -1
- package/ParsedTemplate.mjs +0 -3
- package/ParsedTemplate.mjs.map +0 -1
- package/PersistentState.mjs +0 -60
- package/PersistentState.mjs.map +0 -1
- package/PluginActionName.mjs +0 -3
- package/PluginActionName.mjs.map +0 -1
- package/PluginDependenciesResponse.mjs +0 -3
- package/PluginDependenciesResponse.mjs.map +0 -1
- package/PluginInfo.mjs +0 -76
- package/PluginInfo.mjs.map +0 -1
- package/PluginJsonResponse.mjs +0 -3
- package/PluginJsonResponse.mjs.map +0 -1
- package/PluginProxyResponse.mjs +0 -3
- package/PluginProxyResponse.mjs.map +0 -1
- package/PluginResponseEncoding.mjs +0 -3
- package/PluginResponseEncoding.mjs.map +0 -1
- package/PluginSchema.mjs +0 -59
- package/PluginSchema.mjs.map +0 -1
- package/PositionalArg.mjs +0 -3
- package/PositionalArg.mjs.map +0 -1
- package/Provisioner.mjs +0 -3
- package/Provisioner.mjs.map +0 -1
- package/ProvisionerID.mjs +0 -3
- package/ProvisionerID.mjs.map +0 -1
- package/Provisions.mjs +0 -3
- package/Provisions.mjs.map +0 -1
- package/ProxyTaskArgs.mjs +0 -3
- package/ProxyTaskArgs.mjs.map +0 -1
- package/ProxyTemplateArgs.mjs +0 -3
- package/ProxyTemplateArgs.mjs.map +0 -1
- package/PublicKeyHash.mjs +0 -3
- package/PublicKeyHash.mjs.map +0 -1
- package/RequestArgs.mjs +0 -3
- package/RequestArgs.mjs.map +0 -1
- package/SHA256.mjs +0 -59
- package/SHA256.mjs.map +0 -1
- package/SandboxAccountConfig.mjs +0 -3
- package/SandboxAccountConfig.mjs.map +0 -1
- package/SandboxConfig.mjs +0 -3
- package/SandboxConfig.mjs.map +0 -1
- package/SanitizedAbsPath.mjs +0 -27
- package/SanitizedAbsPath.mjs.map +0 -1
- package/SanitizedArgs.mjs +0 -203
- package/SanitizedArgs.mjs.map +0 -1
- package/SanitizedPath.mjs +0 -3
- package/SanitizedPath.mjs.map +0 -1
- package/ScaffoldConfig.mjs +0 -3
- package/ScaffoldConfig.mjs.map +0 -1
- package/Settings.mjs +0 -3
- package/Settings.mjs.map +0 -1
- package/SingleChar.mjs +0 -3
- package/SingleChar.mjs.map +0 -1
- package/TaqError.mjs +0 -35
- package/TaqError.mjs.map +0 -1
- package/Task.mjs +0 -3
- package/Task.mjs.map +0 -1
- package/Template.mjs +0 -10
- package/Template.mjs.map +0 -1
- package/Timestamp.mjs +0 -3
- package/Timestamp.mjs.map +0 -1
- package/Tz.mjs +0 -3
- package/Tz.mjs.map +0 -1
- package/Url.mjs +0 -3
- package/Url.mjs.map +0 -1
- package/Verb.mjs +0 -3
- package/Verb.mjs.map +0 -1
- package/VersionNumber.mjs +0 -3
- package/VersionNumber.mjs.map +0 -1
- package/helpers.mjs +0 -28
- package/helpers.mjs.map +0 -1
- package/i18n.mjs +0 -68
- package/i18n.mjs.map +0 -1
- package/index.mjs +0 -108
- package/index.mjs.map +0 -1
- package/out/types/Alias.d.mjs +0 -1
- package/out/types/Alias.d.mjs.map +0 -1
- package/out/types/Alias.mjs +0 -49
- package/out/types/Alias.mjs.map +0 -1
- package/out/types/BuildNumber.d.mjs +0 -1
- package/out/types/BuildNumber.d.mjs.map +0 -1
- package/out/types/BuildNumber.mjs +0 -49
- package/out/types/BuildNumber.mjs.map +0 -1
- package/out/types/Command.d.mjs +0 -1
- package/out/types/Command.d.mjs.map +0 -1
- package/out/types/Command.mjs +0 -49
- package/out/types/Command.mjs.map +0 -1
- package/out/types/Config.d.mjs +0 -1
- package/out/types/Config.d.mjs.map +0 -1
- package/out/types/Config.mjs +0 -49
- package/out/types/Config.mjs.map +0 -1
- package/out/types/ConfigAccount.d.mjs +0 -1
- package/out/types/ConfigAccount.d.mjs.map +0 -1
- package/out/types/ConfigAccount.mjs +0 -49
- package/out/types/ConfigAccount.mjs.map +0 -1
- package/out/types/ConfigArtifactsDir.d.mjs +0 -1
- package/out/types/ConfigArtifactsDir.d.mjs.map +0 -1
- package/out/types/ConfigArtifactsDir.mjs +0 -49
- package/out/types/ConfigArtifactsDir.mjs.map +0 -1
- package/out/types/ConfigContractsDir.d.mjs +0 -1
- package/out/types/ConfigContractsDir.d.mjs.map +0 -1
- package/out/types/ConfigContractsDir.mjs +0 -49
- package/out/types/ConfigContractsDir.mjs.map +0 -1
- package/out/types/ConfigEnvironmentFileV2.d.mjs +0 -1
- package/out/types/ConfigEnvironmentFileV2.d.mjs.map +0 -1
- package/out/types/ConfigEnvironmentFileV2.mjs +0 -49
- package/out/types/ConfigEnvironmentFileV2.mjs.map +0 -1
- package/out/types/ConfigFileV1.d.mjs +0 -1
- package/out/types/ConfigFileV1.d.mjs.map +0 -1
- package/out/types/ConfigFileV1.mjs +0 -49
- package/out/types/ConfigFileV1.mjs.map +0 -1
- package/out/types/ConfigFileV2.d.mjs +0 -1
- package/out/types/ConfigFileV2.d.mjs.map +0 -1
- package/out/types/ConfigFileV2.mjs +0 -49
- package/out/types/ConfigFileV2.mjs.map +0 -1
- package/out/types/Contract.d.mjs +0 -1
- package/out/types/Contract.d.mjs.map +0 -1
- package/out/types/Contract.mjs +0 -49
- package/out/types/Contract.mjs.map +0 -1
- package/out/types/CurrencyAmountV2.d.mjs +0 -1
- package/out/types/CurrencyAmountV2.d.mjs.map +0 -1
- package/out/types/CurrencyAmountV2.mjs +0 -49
- package/out/types/CurrencyAmountV2.mjs.map +0 -1
- package/out/types/EconomicalProtocolHash.d.mjs +0 -1
- package/out/types/EconomicalProtocolHash.d.mjs.map +0 -1
- package/out/types/EconomicalProtocolHash.mjs +0 -49
- package/out/types/EconomicalProtocolHash.mjs.map +0 -1
- package/out/types/Environment.d.mjs +0 -1
- package/out/types/Environment.d.mjs.map +0 -1
- package/out/types/Environment.mjs +0 -49
- package/out/types/Environment.mjs.map +0 -1
- package/out/types/EphemeralState.d.mjs +0 -1
- package/out/types/EphemeralState.d.mjs.map +0 -1
- package/out/types/EphemeralState.mjs +0 -49
- package/out/types/EphemeralState.mjs.map +0 -1
- package/out/types/Faucet.d.mjs +0 -1
- package/out/types/Faucet.d.mjs.map +0 -1
- package/out/types/Faucet.mjs +0 -49
- package/out/types/Faucet.mjs.map +0 -1
- package/out/types/HumanReadableIdentifier.d.mjs +0 -1
- package/out/types/HumanReadableIdentifier.d.mjs.map +0 -1
- package/out/types/HumanReadableIdentifier.mjs +0 -49
- package/out/types/HumanReadableIdentifier.mjs.map +0 -1
- package/out/types/InstalledPlugin.d.mjs +0 -1
- package/out/types/InstalledPlugin.d.mjs.map +0 -1
- package/out/types/InstalledPlugin.mjs +0 -49
- package/out/types/InstalledPlugin.mjs.map +0 -1
- package/out/types/LoadedConfig.d.mjs +0 -1
- package/out/types/LoadedConfig.d.mjs.map +0 -1
- package/out/types/LoadedConfig.mjs +0 -49
- package/out/types/LoadedConfig.mjs.map +0 -1
- package/out/types/MetadataConfig.d.mjs +0 -1
- package/out/types/MetadataConfig.d.mjs.map +0 -1
- package/out/types/MetadataConfig.mjs +0 -49
- package/out/types/MetadataConfig.mjs.map +0 -1
- package/out/types/NetworkAccountConfig.d.mjs +0 -1
- package/out/types/NetworkAccountConfig.d.mjs.map +0 -1
- package/out/types/NetworkAccountConfig.mjs +0 -49
- package/out/types/NetworkAccountConfig.mjs.map +0 -1
- package/out/types/NetworkConfig.d.mjs +0 -1
- package/out/types/NetworkConfig.d.mjs.map +0 -1
- package/out/types/NetworkConfig.mjs +0 -49
- package/out/types/NetworkConfig.mjs.map +0 -1
- package/out/types/NonEmptyString.d.mjs +0 -1
- package/out/types/NonEmptyString.d.mjs.map +0 -1
- package/out/types/NonEmptyString.mjs +0 -49
- package/out/types/NonEmptyString.mjs.map +0 -1
- package/out/types/Operation.d.mjs +0 -1
- package/out/types/Operation.d.mjs.map +0 -1
- package/out/types/Operation.mjs +0 -49
- package/out/types/Operation.mjs.map +0 -1
- package/out/types/Option.d.mjs +0 -1
- package/out/types/Option.d.mjs.map +0 -1
- package/out/types/Option.mjs +0 -49
- package/out/types/Option.mjs.map +0 -1
- package/out/types/ParsedConfig.d.mjs +0 -1
- package/out/types/ParsedConfig.d.mjs.map +0 -1
- package/out/types/ParsedConfig.mjs +0 -49
- package/out/types/ParsedConfig.mjs.map +0 -1
- package/out/types/ParsedOperation.d.mjs +0 -1
- package/out/types/ParsedOperation.d.mjs.map +0 -1
- package/out/types/ParsedOperation.mjs +0 -49
- package/out/types/ParsedOperation.mjs.map +0 -1
- package/out/types/ParsedTemplate.d.mjs +0 -1
- package/out/types/ParsedTemplate.d.mjs.map +0 -1
- package/out/types/ParsedTemplate.mjs +0 -49
- package/out/types/ParsedTemplate.mjs.map +0 -1
- package/out/types/PersistedOperation.d.mjs +0 -1
- package/out/types/PersistedOperation.d.mjs.map +0 -1
- package/out/types/PersistedOperation.mjs +0 -49
- package/out/types/PersistedOperation.mjs.map +0 -1
- package/out/types/PersistedTask.d.mjs +0 -1
- package/out/types/PersistedTask.d.mjs.map +0 -1
- package/out/types/PersistedTask.mjs +0 -49
- package/out/types/PersistedTask.mjs.map +0 -1
- package/out/types/PersistentState.d.mjs +0 -1
- package/out/types/PersistentState.d.mjs.map +0 -1
- package/out/types/PersistentState.mjs +0 -49
- package/out/types/PersistentState.mjs.map +0 -1
- package/out/types/PluginActionName.d.mjs +0 -1
- package/out/types/PluginActionName.d.mjs.map +0 -1
- package/out/types/PluginActionName.mjs +0 -49
- package/out/types/PluginActionName.mjs.map +0 -1
- package/out/types/PluginDependenciesResponse.d.mjs +0 -1
- package/out/types/PluginDependenciesResponse.d.mjs.map +0 -1
- package/out/types/PluginDependenciesResponse.mjs +0 -49
- package/out/types/PluginDependenciesResponse.mjs.map +0 -1
- package/out/types/PluginInfo.d.mjs +0 -1
- package/out/types/PluginInfo.d.mjs.map +0 -1
- package/out/types/PluginInfo.mjs +0 -49
- package/out/types/PluginInfo.mjs.map +0 -1
- package/out/types/PluginJsonResponse.d.mjs +0 -1
- package/out/types/PluginJsonResponse.d.mjs.map +0 -1
- package/out/types/PluginJsonResponse.mjs +0 -49
- package/out/types/PluginJsonResponse.mjs.map +0 -1
- package/out/types/PluginProxyResponse.d.mjs +0 -1
- package/out/types/PluginProxyResponse.d.mjs.map +0 -1
- package/out/types/PluginProxyResponse.mjs +0 -49
- package/out/types/PluginProxyResponse.mjs.map +0 -1
- package/out/types/PluginResponseEncoding.d.mjs +0 -1
- package/out/types/PluginResponseEncoding.d.mjs.map +0 -1
- package/out/types/PluginResponseEncoding.mjs +0 -49
- package/out/types/PluginResponseEncoding.mjs.map +0 -1
- package/out/types/PluginSchema.d.mjs +0 -1
- package/out/types/PluginSchema.d.mjs.map +0 -1
- package/out/types/PluginSchema.mjs +0 -49
- package/out/types/PluginSchema.mjs.map +0 -1
- package/out/types/PositionalArg.d.mjs +0 -1
- package/out/types/PositionalArg.d.mjs.map +0 -1
- package/out/types/PositionalArg.mjs +0 -49
- package/out/types/PositionalArg.mjs.map +0 -1
- package/out/types/Provisioner.d.mjs +0 -1
- package/out/types/Provisioner.d.mjs.map +0 -1
- package/out/types/Provisioner.mjs +0 -49
- package/out/types/Provisioner.mjs.map +0 -1
- package/out/types/ProvisionerID.d.mjs +0 -1
- package/out/types/ProvisionerID.d.mjs.map +0 -1
- package/out/types/ProvisionerID.mjs +0 -49
- package/out/types/ProvisionerID.mjs.map +0 -1
- package/out/types/Provisions.d.mjs +0 -1
- package/out/types/Provisions.d.mjs.map +0 -1
- package/out/types/Provisions.mjs +0 -49
- package/out/types/Provisions.mjs.map +0 -1
- package/out/types/ProxyTaskArgs.d.mjs +0 -1
- package/out/types/ProxyTaskArgs.d.mjs.map +0 -1
- package/out/types/ProxyTaskArgs.mjs +0 -49
- package/out/types/ProxyTaskArgs.mjs.map +0 -1
- package/out/types/ProxyTemplateArgs.d.mjs +0 -1
- package/out/types/ProxyTemplateArgs.d.mjs.map +0 -1
- package/out/types/ProxyTemplateArgs.mjs +0 -49
- package/out/types/ProxyTemplateArgs.mjs.map +0 -1
- package/out/types/PublicKeyHash.d.mjs +0 -1
- package/out/types/PublicKeyHash.d.mjs.map +0 -1
- package/out/types/PublicKeyHash.mjs +0 -49
- package/out/types/PublicKeyHash.mjs.map +0 -1
- package/out/types/RequestArgs.d.mjs +0 -1
- package/out/types/RequestArgs.d.mjs.map +0 -1
- package/out/types/RequestArgs.mjs +0 -49
- package/out/types/RequestArgs.mjs.map +0 -1
- package/out/types/RuntimeDependency.d.mjs +0 -1
- package/out/types/RuntimeDependency.d.mjs.map +0 -1
- package/out/types/RuntimeDependency.mjs +0 -49
- package/out/types/RuntimeDependency.mjs.map +0 -1
- package/out/types/RuntimeDependencyReport.d.mjs +0 -1
- package/out/types/RuntimeDependencyReport.d.mjs.map +0 -1
- package/out/types/RuntimeDependencyReport.mjs +0 -49
- package/out/types/RuntimeDependencyReport.mjs.map +0 -1
- package/out/types/SHA256.d.mjs +0 -1
- package/out/types/SHA256.d.mjs.map +0 -1
- package/out/types/SHA256.mjs +0 -49
- package/out/types/SHA256.mjs.map +0 -1
- package/out/types/SandboxAccountConfig.d.mjs +0 -1
- package/out/types/SandboxAccountConfig.d.mjs.map +0 -1
- package/out/types/SandboxAccountConfig.mjs +0 -49
- package/out/types/SandboxAccountConfig.mjs.map +0 -1
- package/out/types/SandboxConfig.d.mjs +0 -1
- package/out/types/SandboxConfig.d.mjs.map +0 -1
- package/out/types/SandboxConfig.mjs +0 -49
- package/out/types/SandboxConfig.mjs.map +0 -1
- package/out/types/SanitizedAbsPath.d.mjs +0 -1
- package/out/types/SanitizedAbsPath.d.mjs.map +0 -1
- package/out/types/SanitizedAbsPath.mjs +0 -49
- package/out/types/SanitizedAbsPath.mjs.map +0 -1
- package/out/types/SanitizedArgs.d.mjs +0 -1
- package/out/types/SanitizedArgs.d.mjs.map +0 -1
- package/out/types/SanitizedArgs.mjs +0 -49
- package/out/types/SanitizedArgs.mjs.map +0 -1
- package/out/types/SanitizedPath.d.mjs +0 -1
- package/out/types/SanitizedPath.d.mjs.map +0 -1
- package/out/types/SanitizedPath.mjs +0 -49
- package/out/types/SanitizedPath.mjs.map +0 -1
- package/out/types/ScaffoldConfig.d.mjs +0 -1
- package/out/types/ScaffoldConfig.d.mjs.map +0 -1
- package/out/types/ScaffoldConfig.mjs +0 -49
- package/out/types/ScaffoldConfig.mjs.map +0 -1
- package/out/types/Settings.d.mjs +0 -1
- package/out/types/Settings.d.mjs.map +0 -1
- package/out/types/Settings.mjs +0 -49
- package/out/types/Settings.mjs.map +0 -1
- package/out/types/SingleChar.d.mjs +0 -1
- package/out/types/SingleChar.d.mjs.map +0 -1
- package/out/types/SingleChar.mjs +0 -49
- package/out/types/SingleChar.mjs.map +0 -1
- package/out/types/Task.d.mjs +0 -1
- package/out/types/Task.d.mjs.map +0 -1
- package/out/types/Task.mjs +0 -49
- package/out/types/Task.mjs.map +0 -1
- package/out/types/Template.d.mjs +0 -1
- package/out/types/Template.d.mjs.map +0 -1
- package/out/types/Template.mjs +0 -49
- package/out/types/Template.mjs.map +0 -1
- package/out/types/Timestamp.d.mjs +0 -1
- package/out/types/Timestamp.d.mjs.map +0 -1
- package/out/types/Timestamp.mjs +0 -49
- package/out/types/Timestamp.mjs.map +0 -1
- package/out/types/Tz.d.mjs +0 -1
- package/out/types/Tz.d.mjs.map +0 -1
- package/out/types/Tz.mjs +0 -49
- package/out/types/Tz.mjs.map +0 -1
- package/out/types/TzKtConfig.d.mjs +0 -1
- package/out/types/TzKtConfig.d.mjs.map +0 -1
- package/out/types/TzKtConfig.mjs +0 -49
- package/out/types/TzKtConfig.mjs.map +0 -1
- package/out/types/Url.d.mjs +0 -1
- package/out/types/Url.d.mjs.map +0 -1
- package/out/types/Url.mjs +0 -49
- package/out/types/Url.mjs.map +0 -1
- package/out/types/Verb.d.mjs +0 -1
- package/out/types/Verb.d.mjs.map +0 -1
- package/out/types/Verb.mjs +0 -49
- package/out/types/Verb.mjs.map +0 -1
- package/out/types/VersionNumber.d.mjs +0 -1
- package/out/types/VersionNumber.d.mjs.map +0 -1
- package/out/types/VersionNumber.mjs +0 -49
- package/out/types/VersionNumber.mjs.map +0 -1
- package/out/types-strict.d.mjs +0 -1
- package/out/types-strict.d.mjs.map +0 -1
- package/out/types-strict.mjs +0 -1
- package/out/types-strict.mjs.map +0 -1
- package/out/types-zod.d.mjs +0 -1
- package/out/types-zod.d.mjs.map +0 -1
- package/out/types-zod.mjs +0 -420
- package/out/types-zod.mjs.map +0 -1
- package/taqueria-protocol-types.mjs +0 -76
- package/taqueria-protocol-types.mjs.map +0 -1
- package/types-config-files.mjs +0 -236
- package/types-config-files.mjs.map +0 -1
- package/types.mjs +0 -1
- package/types.mjs.map +0 -1
- package/tzkt-config.mjs +0 -28
- package/tzkt-config.mjs.map +0 -1
package/Base.js
CHANGED
|
@@ -29,10 +29,11 @@ var import_TaqError = require("@taqueria/protocol/TaqError");
|
|
|
29
29
|
var import_fluture = require("fluture");
|
|
30
30
|
var import_zod = require("zod");
|
|
31
31
|
var createSchema = (params) => {
|
|
32
|
+
var _a, _b;
|
|
32
33
|
const { rawSchema, isStringLike } = params;
|
|
33
|
-
const internalSchema = params.internalSchema
|
|
34
|
+
const internalSchema = (_a = params.internalSchema) != null ? _a : params.rawSchema;
|
|
34
35
|
const noop = (val) => val;
|
|
35
|
-
const transformer = params.transformer
|
|
36
|
+
const transformer = (_b = params.transformer) != null ? _b : noop;
|
|
36
37
|
const schema = isStringLike ? internalSchema.transform(
|
|
37
38
|
(val) => transformer(val)
|
|
38
39
|
) : internalSchema.transform(
|
|
@@ -75,9 +76,4 @@ var createType = (params) => {
|
|
|
75
76
|
};
|
|
76
77
|
};
|
|
77
78
|
var Base_default = createType;
|
|
78
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
79
|
-
0 && (module.exports = {
|
|
80
|
-
createSchema,
|
|
81
|
-
createType
|
|
82
|
-
});
|
|
83
79
|
//# sourceMappingURL=Base.js.map
|
package/Base.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Base.ts"],"sourcesContent":["import { toFutureParseErr, toFutureParseUnknownErr } from '@taqueria/protocol/TaqError';\nimport { FutureInstance, resolve } from 'fluture';\nimport { z, ZodError, ZodSchema } from 'zod';\n\ntype Future<L, R> = FutureInstance<L, R>;\n\ntype ErrMsg = string | ((value: unknown, previous?: unknown) => string);\n\ninterface CreateSchemaParams {\n\trawSchema: ZodSchema;\n\tinternalSchema?: ZodSchema;\n\ttransformer?: (value: unknown) => unknown;\n\tisStringLike?: boolean;\n}\n\ninterface CreateTypeParams extends CreateSchemaParams {\n\tparseErrMsg: ErrMsg;\n\tunknownErrMsg: ErrMsg;\n}\nexport type Flatten<T> = { [k in keyof T]: T[k] };\n\nexport const createSchema = <I>(params: CreateSchemaParams) => {\n\tconst { rawSchema, isStringLike } = params;\n\tconst internalSchema = params.internalSchema ?? params.rawSchema;\n\tconst noop = (val: unknown) => val;\n\tconst transformer = params.transformer ?? noop;\n\n\tconst schema = isStringLike\n\t\t? internalSchema\n\t\t\t.transform((val: unknown) =>\n\t\t\t\ttransformer(val) as I & {\n\t\t\t\t\treadonly __type: 'generated' & z.infer<typeof internalSchema>;\n\t\t\t\t}\n\t\t\t)\n\t\t: internalSchema\n\t\t\t.transform((val: unknown) =>\n\t\t\t\ttransformer(val) as Flatten<\n\t\t\t\t\tI & {\n\t\t\t\t\t\treadonly __type: 'generated' & z.infer<typeof internalSchema>;\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t);\n\n\ttype GeneratedSchema = typeof schema;\n\n\treturn {\n\t\trawSchema,\n\t\tinternalSchema,\n\t\tschema,\n\t};\n};\n\n// TODO:\n// TypeScript appears to have a bug with default generic values\n// For instance, I'd like to use this:\n// export const createType = <R, I = R>(params: CreateTypeParams) => {\n//\n// However, I == unknown when having I default to R if no I was given.\n// So, we need to require R and I explicitly\nexport const createType = <R, I>(params: CreateTypeParams) => {\n\tconst schemas = createSchema<I>(params);\n\tconst { parseErrMsg, unknownErrMsg } = params;\n\n\ttype T = z.infer<typeof schemas.schema>;\n\n\tconst internalOf = (input: unknown) => {\n\t\ttry {\n\t\t\treturn resolve<T>(schemas.schema.parse(input));\n\t\t} catch (previous) {\n\t\t\tconst parseMsg = typeof parseErrMsg === 'string'\n\t\t\t\t? parseErrMsg\n\t\t\t\t: parseErrMsg(input, previous);\n\n\t\t\tconst unknownMsg = typeof unknownErrMsg === 'string'\n\t\t\t\t? unknownErrMsg\n\t\t\t\t: unknownErrMsg(input);\n\n\t\t\tif (previous instanceof ZodError) {\n\t\t\t\treturn toFutureParseErr<T>(previous, parseMsg, input);\n\t\t\t}\n\t\t\treturn toFutureParseUnknownErr<T>(previous, unknownMsg, input);\n\t\t}\n\t};\n\tconst of = internalOf;\n\n\tconst make = (input: I) => internalOf(input);\n\n\tconst create = (input: R | I) => schemas.schema.parse(input) as T;\n\n\tconst from = (input: unknown) => schemas.schema.parse(input) as T;\n\n\tconst factory = {\n\t\tmake,\n\t\tof,\n\t\tcreate,\n\t\tfrom,\n\t};\n\n\treturn {\n\t\tschemas,\n\t\tfactory,\n\t};\n};\n\nexport default createType;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA0D;AAC1D,qBAAwC;AACxC,iBAAuC;AAmBhC,IAAM,eAAe,CAAI,WAA+B;
|
|
1
|
+
{"version":3,"sources":["Base.ts"],"sourcesContent":["import { toFutureParseErr, toFutureParseUnknownErr } from '@taqueria/protocol/TaqError';\nimport { FutureInstance, resolve } from 'fluture';\nimport { z, ZodError, ZodSchema } from 'zod';\n\ntype Future<L, R> = FutureInstance<L, R>;\n\ntype ErrMsg = string | ((value: unknown, previous?: unknown) => string);\n\ninterface CreateSchemaParams {\n\trawSchema: ZodSchema;\n\tinternalSchema?: ZodSchema;\n\ttransformer?: (value: unknown) => unknown;\n\tisStringLike?: boolean;\n}\n\ninterface CreateTypeParams extends CreateSchemaParams {\n\tparseErrMsg: ErrMsg;\n\tunknownErrMsg: ErrMsg;\n}\nexport type Flatten<T> = { [k in keyof T]: T[k] };\n\nexport const createSchema = <I>(params: CreateSchemaParams) => {\n\tconst { rawSchema, isStringLike } = params;\n\tconst internalSchema = params.internalSchema ?? params.rawSchema;\n\tconst noop = (val: unknown) => val;\n\tconst transformer = params.transformer ?? noop;\n\n\tconst schema = isStringLike\n\t\t? internalSchema\n\t\t\t.transform((val: unknown) =>\n\t\t\t\ttransformer(val) as I & {\n\t\t\t\t\treadonly __type: 'generated' & z.infer<typeof internalSchema>;\n\t\t\t\t}\n\t\t\t)\n\t\t: internalSchema\n\t\t\t.transform((val: unknown) =>\n\t\t\t\ttransformer(val) as Flatten<\n\t\t\t\t\tI & {\n\t\t\t\t\t\treadonly __type: 'generated' & z.infer<typeof internalSchema>;\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t);\n\n\ttype GeneratedSchema = typeof schema;\n\n\treturn {\n\t\trawSchema,\n\t\tinternalSchema,\n\t\tschema,\n\t};\n};\n\n// TODO:\n// TypeScript appears to have a bug with default generic values\n// For instance, I'd like to use this:\n// export const createType = <R, I = R>(params: CreateTypeParams) => {\n//\n// However, I == unknown when having I default to R if no I was given.\n// So, we need to require R and I explicitly\nexport const createType = <R, I>(params: CreateTypeParams) => {\n\tconst schemas = createSchema<I>(params);\n\tconst { parseErrMsg, unknownErrMsg } = params;\n\n\ttype T = z.infer<typeof schemas.schema>;\n\n\tconst internalOf = (input: unknown) => {\n\t\ttry {\n\t\t\treturn resolve<T>(schemas.schema.parse(input));\n\t\t} catch (previous) {\n\t\t\tconst parseMsg = typeof parseErrMsg === 'string'\n\t\t\t\t? parseErrMsg\n\t\t\t\t: parseErrMsg(input, previous);\n\n\t\t\tconst unknownMsg = typeof unknownErrMsg === 'string'\n\t\t\t\t? unknownErrMsg\n\t\t\t\t: unknownErrMsg(input);\n\n\t\t\tif (previous instanceof ZodError) {\n\t\t\t\treturn toFutureParseErr<T>(previous, parseMsg, input);\n\t\t\t}\n\t\t\treturn toFutureParseUnknownErr<T>(previous, unknownMsg, input);\n\t\t}\n\t};\n\tconst of = internalOf;\n\n\tconst make = (input: I) => internalOf(input);\n\n\tconst create = (input: R | I) => schemas.schema.parse(input) as T;\n\n\tconst from = (input: unknown) => schemas.schema.parse(input) as T;\n\n\tconst factory = {\n\t\tmake,\n\t\tof,\n\t\tcreate,\n\t\tfrom,\n\t};\n\n\treturn {\n\t\tschemas,\n\t\tfactory,\n\t};\n};\n\nexport default createType;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA0D;AAC1D,qBAAwC;AACxC,iBAAuC;AAmBhC,I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"file":"ConfigEnvironmentFileV2.d.ts","sourceRoot":"","sources":["ConfigEnvironmentFileV2.ts"],"names":[],"mappings":"AAAA,cAAc,sDAAsD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
|
|
17
|
+
// ConfigEnvironmentFileV2.ts
|
|
18
|
+
var ConfigEnvironmentFileV2_exports = {};
|
|
19
|
+
module.exports = __toCommonJS(ConfigEnvironmentFileV2_exports);
|
|
20
|
+
__reExport(ConfigEnvironmentFileV2_exports, require("@taqueria/protocol/out/types/ConfigEnvironmentFileV2"), module.exports);
|
|
21
|
+
//# sourceMappingURL=ConfigEnvironmentFileV2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["ConfigEnvironmentFileV2.ts"],"sourcesContent":["export * from '@taqueria/protocol/out/types/ConfigEnvironmentFileV2';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,4CAAc,iEAAd;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigFileV2.d.ts","sourceRoot":"","sources":["ConfigFileV2.ts"],"names":[],"mappings":"AAAA,cAAc,2CAA2C,CAAC"}
|
package/ConfigFileV2.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
|
|
17
|
+
// ConfigFileV2.ts
|
|
18
|
+
var ConfigFileV2_exports = {};
|
|
19
|
+
module.exports = __toCommonJS(ConfigFileV2_exports);
|
|
20
|
+
__reExport(ConfigFileV2_exports, require("@taqueria/protocol/out/types/ConfigFileV2"), module.exports);
|
|
21
|
+
//# sourceMappingURL=ConfigFileV2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["ConfigFileV2.ts"],"sourcesContent":["export * from '@taqueria/protocol/out/types/ConfigFileV2';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,iCAAc,sDAAd;","names":[]}
|
package/EphemeralState.js
CHANGED
|
@@ -248,20 +248,10 @@ var mapTemplatesToPlugins = (config, pluginInfo, i18n) => {
|
|
|
248
248
|
).pipe((0, import_fluture.mapRej)((rej) => rej));
|
|
249
249
|
};
|
|
250
250
|
var getTasks = (pluginInfo) => pluginInfo.reduce(
|
|
251
|
-
(retval, pluginInfo2) =>
|
|
251
|
+
(retval, pluginInfo2) => {
|
|
252
|
+
var _a;
|
|
253
|
+
return [...retval, ...(_a = pluginInfo2.tasks) != null ? _a : []];
|
|
254
|
+
},
|
|
252
255
|
[]
|
|
253
256
|
);
|
|
254
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
255
|
-
0 && (module.exports = {
|
|
256
|
-
create,
|
|
257
|
-
factory,
|
|
258
|
-
generatedSchemas,
|
|
259
|
-
getTasks,
|
|
260
|
-
make,
|
|
261
|
-
mapOperationsToPlugins,
|
|
262
|
-
mapTasksToPlugins,
|
|
263
|
-
mapTemplatesToPlugins,
|
|
264
|
-
of,
|
|
265
|
-
schemas
|
|
266
|
-
});
|
|
267
257
|
//# sourceMappingURL=EphemeralState.js.map
|
package/EphemeralState.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["EphemeralState.ts"],"sourcesContent":["import {\n\tCommand,\n\tConfig,\n\tInstalledPlugin,\n\tNonEmptyString,\n\tOption,\n\tParsedOperation,\n\tParsedTemplate,\n\tPluginInfo,\n\tPluginResponseEncoding,\n\tTask,\n\tVerb,\n} from '@taqueria/protocol';\nimport createType from '@taqueria/protocol/Base';\nimport type { i18n } from '@taqueria/protocol/i18n';\nimport { E_TaqError, TaqError } from '@taqueria/protocol/TaqError';\nimport { attemptP, FutureInstance as Future, mapRej, promise } from 'fluture';\nimport { z } from 'zod';\n\nconst eager = <T>(f: Future<TaqError, T>) =>\n\tpromise(\n\t\tmapRej((err: TaqError) => new E_TaqError(err))(f),\n\t);\n\nconst taskToPluginMap = z.record(\n\tz.union([\n\t\tInstalledPlugin.schemas.schema,\n\t\tTask.schemas.schema,\n\t], { description: 'Task/Plugin Mapping' }),\n);\nconst operationToPluginMap = z.record(\n\tz.union([\n\t\tInstalledPlugin.schemas.schema,\n\t\tParsedOperation.schemas.schema,\n\t], { description: 'Operation/Plugin Mapping' }),\n);\n\nconst templateToPluginMap = z.record(\n\tz.union([\n\t\tInstalledPlugin.schemas.schema,\n\t\tParsedTemplate.schemas.schema,\n\t]),\n);\n\nconst rawSchema = z.object({\n\tbuild: z.string({ description: 'cache.build' }),\n\tconfigHash: z.string({ description: 'cache.configHash' }),\n\ttasks: taskToPluginMap,\n\toperations: operationToPluginMap,\n\ttemplates: templateToPluginMap,\n\tplugins: z.array(PluginInfo.schemas.schema, { description: 'cache.plugins' }),\n}).describe('Ephemeral State');\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 representation of ephemeral state`,\n\tunknownErrMsg: 'Something went wrong when parsing the ephemeral state',\n});\n\nexport type EphemeralState = z.infer<typeof generatedSchemas.schema>;\nexport type t = EphemeralState;\nexport type TaskToPluginMap = z.infer<typeof taskToPluginMap>;\nexport type OpToPluginMap = z.infer<typeof operationToPluginMap>;\nexport type TemplateToPluginMap = z.infer<typeof templateToPluginMap>;\n\nexport const { create, of, make } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as EphemeralState),\n};\n\n/**\n * Private functions\n */\ntype Counts = Record<Verb.t, PluginInfo.t[]>;\nconst getTaskCounts = (pluginInfo: PluginInfo.t[]): Counts => {\n\treturn pluginInfo.reduce(\n\t\t(retval, pluginInfo) =>\n\t\t\tpluginInfo.tasks === undefined\n\t\t\t\t? {}\n\t\t\t\t: pluginInfo.tasks.reduce(\n\t\t\t\t\t(retval: Counts, task: Task.t) => {\n\t\t\t\t\t\tconst taskName = task.task;\n\t\t\t\t\t\tconst providers: PluginInfo.t[] = retval[taskName]\n\t\t\t\t\t\t\t? [...retval[taskName], pluginInfo]\n\t\t\t\t\t\t\t: [pluginInfo];\n\t\t\t\t\t\tconst mapping: Counts = {};\n\t\t\t\t\t\tmapping[taskName] = providers.filter(provider => provider !== undefined);\n\t\t\t\t\t\treturn { ...retval, ...mapping };\n\t\t\t\t\t},\n\t\t\t\t\tretval,\n\t\t\t\t),\n\t\t{} as Counts,\n\t);\n};\n\nconst getTemplateCounts = (pluginInfo: PluginInfo.t[]): Counts => {\n\treturn pluginInfo.reduce(\n\t\t(retval, pluginInfo) =>\n\t\t\t!pluginInfo.templates\n\t\t\t\t? retval\n\t\t\t\t: pluginInfo.templates.reduce(\n\t\t\t\t\t(retval: Counts, template: ParsedTemplate.t) => {\n\t\t\t\t\t\tconst templateName = template.template;\n\t\t\t\t\t\tconst providers = retval[templateName]\n\t\t\t\t\t\t\t? [...retval[templateName], pluginInfo]\n\t\t\t\t\t\t\t: [pluginInfo];\n\t\t\t\t\t\tconst mapping: Counts = {};\n\t\t\t\t\t\tmapping[templateName] = providers.filter(provider => provider !== undefined);\n\t\t\t\t\t\treturn { ...retval, ...mapping };\n\t\t\t\t\t},\n\t\t\t\t\tretval,\n\t\t\t\t),\n\t\t{} as Counts,\n\t);\n};\n\nconst getOperationCounts = (pluginInfo: PluginInfo.t[]): Counts => {\n\treturn pluginInfo.reduce(\n\t\t(retval, pluginInfo) =>\n\t\t\tpluginInfo.operations === undefined\n\t\t\t\t? retval\n\t\t\t\t: pluginInfo.operations.reduce(\n\t\t\t\t\t(retval: Counts, operation: ParsedOperation.t) => {\n\t\t\t\t\t\tconst operationName = operation.operation;\n\t\t\t\t\t\tconst providers = retval[operationName]\n\t\t\t\t\t\t\t? [...retval[operationName], pluginInfo]\n\t\t\t\t\t\t\t: [pluginInfo];\n\t\t\t\t\t\tconst mapping: Counts = {};\n\t\t\t\t\t\tmapping[operationName] = providers.filter(provider => provider !== undefined);\n\t\t\t\t\t\treturn { ...retval, ...mapping };\n\t\t\t\t\t},\n\t\t\t\t\tretval,\n\t\t\t\t),\n\t\t{} as Counts,\n\t);\n};\n\nconst toChoices = (plugins: PluginInfo.t[]) =>\n\tplugins.reduce(\n\t\t(retval, pluginInfo) => {\n\t\t\treturn [...retval, pluginInfo.name as NonEmptyString.t, pluginInfo.alias as NonEmptyString.t];\n\t\t},\n\t\t[] as NonEmptyString.t[],\n\t);\n\nconst isComposite = (name: Verb.t, counts: Counts) => counts[name] && counts[name].length > 1;\n\nconst getInstalledPlugin = (config: Config.t, name: string) =>\n\tconfig.plugins?.find(\n\t\t(plugin: InstalledPlugin.t) => [`taqueria-plugin-${name}`, name].includes(plugin.name),\n\t);\n\nexport const mapTasksToPlugins = (config: Config.t, pluginInfo: PluginInfo.t[], i18n: i18n) => {\n\tconst taskCounts = getTaskCounts(pluginInfo);\n\treturn attemptP<TaqError, TaskToPluginMap>(async () =>\n\t\tawait pluginInfo.reduce(\n\t\t\tasync (retval, pluginInfo) =>\n\t\t\t\t!pluginInfo.tasks\n\t\t\t\t\t? Promise.resolve({} as TaskToPluginMap)\n\t\t\t\t\t: await pluginInfo.tasks.reduce(\n\t\t\t\t\t\tasync (retval, { task, hidden }) => {\n\t\t\t\t\t\t\tif (isComposite(task, taskCounts)) {\n\t\t\t\t\t\t\t\tconst command = await eager(Command.make(task));\n\t\t\t\t\t\t\t\tconst compositeTask = await eager(Task.make({\n\t\t\t\t\t\t\t\t\ttask,\n\t\t\t\t\t\t\t\t\tcommand,\n\t\t\t\t\t\t\t\t\tdescription: await eager(NonEmptyString.make(i18n.__('providedByMany'))),\n\t\t\t\t\t\t\t\t\thidden,\n\t\t\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t\t\tawait eager(Option.make({\n\t\t\t\t\t\t\t\t\t\t\tflag: await eager(Verb.make('plugin')),\n\t\t\t\t\t\t\t\t\t\t\tdescription: await eager(\n\t\t\t\t\t\t\t\t\t\t\t\tNonEmptyString.make('Specify which plugin should be used to execute this task'),\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tchoices: toChoices(taskCounts[task]),\n\t\t\t\t\t\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\thandler: 'proxy',\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\treturn { ...await retval, [task]: compositeTask };\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Task is provided by just a single plugin\n\t\t\t\t\t\t\tconst installedPlugin = getInstalledPlugin(config, pluginInfo.name);\n\t\t\t\t\t\t\treturn installedPlugin\n\t\t\t\t\t\t\t\t? { ...await retval, [task]: installedPlugin }\n\t\t\t\t\t\t\t\t: retval;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tretval,\n\t\t\t\t\t),\n\t\t\tPromise.resolve({} as TaskToPluginMap),\n\t\t)\n\t).pipe(mapRej(rej => rej as TaqError));\n};\n\nexport const mapOperationsToPlugins = (config: Config.t, pluginInfo: PluginInfo.t[], i18n: i18n) => {\n\tconst opCounts = getOperationCounts(pluginInfo);\n\treturn attemptP(async () =>\n\t\tawait pluginInfo.reduce(\n\t\t\tasync (retval, pluginInfo) =>\n\t\t\t\t!pluginInfo.operations\n\t\t\t\t\t? Promise.resolve({} as OpToPluginMap)\n\t\t\t\t\t: await pluginInfo.operations.reduce(\n\t\t\t\t\t\tasync (retval, { operation }) => {\n\t\t\t\t\t\t\tif (isComposite(operation, opCounts)) {\n\t\t\t\t\t\t\t\tconst command = await eager(Command.make(operation));\n\t\t\t\t\t\t\t\tconst compositeOp = await eager(ParsedOperation.make({\n\t\t\t\t\t\t\t\t\toperation,\n\t\t\t\t\t\t\t\t\tcommand,\n\t\t\t\t\t\t\t\t\tdescription: await eager(NonEmptyString.make(i18n.__('providedByMany'))),\n\t\t\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t\t\tawait eager(Option.make({\n\t\t\t\t\t\t\t\t\t\t\tflag: await eager(Verb.make('plugin')),\n\t\t\t\t\t\t\t\t\t\t\tdescription: await eager(\n\t\t\t\t\t\t\t\t\t\t\t\tNonEmptyString.make('Specify which plugin should be used to execute this operation'),\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tchoices: toChoices(opCounts[operation]),\n\t\t\t\t\t\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\treturn { ...await retval, [operation]: compositeOp };\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Operation is provided by just a single plugin\n\t\t\t\t\t\t\tconst installedPlugin = getInstalledPlugin(config, pluginInfo.name);\n\t\t\t\t\t\t\treturn installedPlugin\n\t\t\t\t\t\t\t\t? { ...await retval, [operation]: installedPlugin }\n\t\t\t\t\t\t\t\t: retval;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tretval,\n\t\t\t\t\t),\n\t\t\tPromise.resolve({} as OpToPluginMap),\n\t\t)\n\t).pipe(mapRej(rej => rej as TaqError));\n};\n\nexport const mapTemplatesToPlugins = (config: Config.t, pluginInfo: PluginInfo.t[], i18n: i18n) => {\n\tconst tmplCounts = getTemplateCounts(pluginInfo);\n\treturn attemptP<TaqError, TemplateToPluginMap>(async () =>\n\t\tawait pluginInfo.reduce(\n\t\t\tasync (retval, pluginInfo) =>\n\t\t\t\t!pluginInfo.templates\n\t\t\t\t\t? Promise.resolve({} as TemplateToPluginMap)\n\t\t\t\t\t: await pluginInfo.templates!.reduce(\n\t\t\t\t\t\tasync (retval, { template, hidden }) => {\n\t\t\t\t\t\t\tif (isComposite(template, tmplCounts)) {\n\t\t\t\t\t\t\t\tconst command = await eager(Command.make(template));\n\t\t\t\t\t\t\t\tconst description = await eager(NonEmptyString.of(i18n.__('providedByMany')));\n\t\t\t\t\t\t\t\tconst compositeTmpl = await eager(ParsedTemplate.make({\n\t\t\t\t\t\t\t\t\ttemplate,\n\t\t\t\t\t\t\t\t\tcommand,\n\t\t\t\t\t\t\t\t\tdescription,\n\t\t\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t\t\tawait eager(Option.make({\n\t\t\t\t\t\t\t\t\t\t\tflag: await eager(Verb.make('plugin')),\n\t\t\t\t\t\t\t\t\t\t\tdescription: await eager(\n\t\t\t\t\t\t\t\t\t\t\t\tNonEmptyString.make('Specify which plugin should be used to execute this task'),\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tchoices: toChoices(tmplCounts[template]),\n\t\t\t\t\t\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\thandler: 'proxy',\n\t\t\t\t\t\t\t\t\tencoding: PluginResponseEncoding.create('none'),\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\treturn { ...await retval, [template]: compositeTmpl };\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Template is provided by just a single plugin\n\t\t\t\t\t\t\tconst installedPlugin = getInstalledPlugin(config, pluginInfo.name);\n\t\t\t\t\t\t\treturn installedPlugin\n\t\t\t\t\t\t\t\t? { ...await retval, [template]: installedPlugin }\n\t\t\t\t\t\t\t\t: retval;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tretval,\n\t\t\t\t\t),\n\t\t\tPromise.resolve({} as TemplateToPluginMap),\n\t\t)\n\t).pipe(mapRej(rej => rej as TaqError));\n};\n\nexport const getTasks = (pluginInfo: PluginInfo.t[]) =>\n\tpluginInfo.reduce(\n\t\t(retval: Task.t[], pluginInfo) => [...retval, ...(pluginInfo.tasks ?? [])],\n\t\t[],\n\t);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAYO;AACP,kBAAuB;AAEvB,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C,WAAW,cAAc;AAAA,UACrD;AAGA,gBAAM,kBAAkB,mBAAmB,QAAQD,YAAW,IAAI;AAClE,iBAAO,kBACJ,EAAE,GAAG,MAAMC,SAAQ,CAAC,WAAW,gBAAgB,IAC/CA;AAAA,QACJ;AAAA,QACA;AAAA,MACD;AAAA,MACF,QAAQ,QAAQ,CAAC,CAAwB;AAAA,IAC1C;AAAA,EACD,EAAE,SAAK,uBAAO,SAAO,GAAe,CAAC;AACtC;AAEO,IAAM,WAAW,CAAC,eACxB,WAAW;AAAA,EACV,CAAC,QAAkBD,gBAAe,CAAC,GAAG,QAAQ,GAAIA,YAAW,SAAS,CAAC,CAAE;AAAA,EACzE,CAAC;AACF;","names":["createType","pluginInfo","retval"]}
|
|
1
|
+
{"version":3,"sources":["EphemeralState.ts"],"sourcesContent":["import {\n\tCommand,\n\tConfig,\n\tInstalledPlugin,\n\tNonEmptyString,\n\tOption,\n\tParsedOperation,\n\tParsedTemplate,\n\tPluginInfo,\n\tPluginResponseEncoding,\n\tTask,\n\tVerb,\n} from '@taqueria/protocol';\nimport createType from '@taqueria/protocol/Base';\nimport type { i18n } from '@taqueria/protocol/i18n';\nimport { E_TaqError, TaqError } from '@taqueria/protocol/TaqError';\nimport { attemptP, FutureInstance as Future, mapRej, promise } from 'fluture';\nimport { z } from 'zod';\n\nconst eager = <T>(f: Future<TaqError, T>) =>\n\tpromise(\n\t\tmapRej((err: TaqError) => new E_TaqError(err))(f),\n\t);\n\nconst taskToPluginMap = z.record(\n\tz.union([\n\t\tInstalledPlugin.schemas.schema,\n\t\tTask.schemas.schema,\n\t], { description: 'Task/Plugin Mapping' }),\n);\nconst operationToPluginMap = z.record(\n\tz.union([\n\t\tInstalledPlugin.schemas.schema,\n\t\tParsedOperation.schemas.schema,\n\t], { description: 'Operation/Plugin Mapping' }),\n);\n\nconst templateToPluginMap = z.record(\n\tz.union([\n\t\tInstalledPlugin.schemas.schema,\n\t\tParsedTemplate.schemas.schema,\n\t]),\n);\n\nconst rawSchema = z.object({\n\tbuild: z.string({ description: 'cache.build' }),\n\tconfigHash: z.string({ description: 'cache.configHash' }),\n\ttasks: taskToPluginMap,\n\toperations: operationToPluginMap,\n\ttemplates: templateToPluginMap,\n\tplugins: z.array(PluginInfo.schemas.schema, { description: 'cache.plugins' }),\n}).describe('Ephemeral State');\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 representation of ephemeral state`,\n\tunknownErrMsg: 'Something went wrong when parsing the ephemeral state',\n});\n\nexport type EphemeralState = z.infer<typeof generatedSchemas.schema>;\nexport type t = EphemeralState;\nexport type TaskToPluginMap = z.infer<typeof taskToPluginMap>;\nexport type OpToPluginMap = z.infer<typeof operationToPluginMap>;\nexport type TemplateToPluginMap = z.infer<typeof templateToPluginMap>;\n\nexport const { create, of, make } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as EphemeralState),\n};\n\n/**\n * Private functions\n */\ntype Counts = Record<Verb.t, PluginInfo.t[]>;\nconst getTaskCounts = (pluginInfo: PluginInfo.t[]): Counts => {\n\treturn pluginInfo.reduce(\n\t\t(retval, pluginInfo) =>\n\t\t\tpluginInfo.tasks === undefined\n\t\t\t\t? {}\n\t\t\t\t: pluginInfo.tasks.reduce(\n\t\t\t\t\t(retval: Counts, task: Task.t) => {\n\t\t\t\t\t\tconst taskName = task.task;\n\t\t\t\t\t\tconst providers: PluginInfo.t[] = retval[taskName]\n\t\t\t\t\t\t\t? [...retval[taskName], pluginInfo]\n\t\t\t\t\t\t\t: [pluginInfo];\n\t\t\t\t\t\tconst mapping: Counts = {};\n\t\t\t\t\t\tmapping[taskName] = providers.filter(provider => provider !== undefined);\n\t\t\t\t\t\treturn { ...retval, ...mapping };\n\t\t\t\t\t},\n\t\t\t\t\tretval,\n\t\t\t\t),\n\t\t{} as Counts,\n\t);\n};\n\nconst getTemplateCounts = (pluginInfo: PluginInfo.t[]): Counts => {\n\treturn pluginInfo.reduce(\n\t\t(retval, pluginInfo) =>\n\t\t\t!pluginInfo.templates\n\t\t\t\t? retval\n\t\t\t\t: pluginInfo.templates.reduce(\n\t\t\t\t\t(retval: Counts, template: ParsedTemplate.t) => {\n\t\t\t\t\t\tconst templateName = template.template;\n\t\t\t\t\t\tconst providers = retval[templateName]\n\t\t\t\t\t\t\t? [...retval[templateName], pluginInfo]\n\t\t\t\t\t\t\t: [pluginInfo];\n\t\t\t\t\t\tconst mapping: Counts = {};\n\t\t\t\t\t\tmapping[templateName] = providers.filter(provider => provider !== undefined);\n\t\t\t\t\t\treturn { ...retval, ...mapping };\n\t\t\t\t\t},\n\t\t\t\t\tretval,\n\t\t\t\t),\n\t\t{} as Counts,\n\t);\n};\n\nconst getOperationCounts = (pluginInfo: PluginInfo.t[]): Counts => {\n\treturn pluginInfo.reduce(\n\t\t(retval, pluginInfo) =>\n\t\t\tpluginInfo.operations === undefined\n\t\t\t\t? retval\n\t\t\t\t: pluginInfo.operations.reduce(\n\t\t\t\t\t(retval: Counts, operation: ParsedOperation.t) => {\n\t\t\t\t\t\tconst operationName = operation.operation;\n\t\t\t\t\t\tconst providers = retval[operationName]\n\t\t\t\t\t\t\t? [...retval[operationName], pluginInfo]\n\t\t\t\t\t\t\t: [pluginInfo];\n\t\t\t\t\t\tconst mapping: Counts = {};\n\t\t\t\t\t\tmapping[operationName] = providers.filter(provider => provider !== undefined);\n\t\t\t\t\t\treturn { ...retval, ...mapping };\n\t\t\t\t\t},\n\t\t\t\t\tretval,\n\t\t\t\t),\n\t\t{} as Counts,\n\t);\n};\n\nconst toChoices = (plugins: PluginInfo.t[]) =>\n\tplugins.reduce(\n\t\t(retval, pluginInfo) => {\n\t\t\treturn [...retval, pluginInfo.name as NonEmptyString.t, pluginInfo.alias as NonEmptyString.t];\n\t\t},\n\t\t[] as NonEmptyString.t[],\n\t);\n\nconst isComposite = (name: Verb.t, counts: Counts) => counts[name] && counts[name].length > 1;\n\nconst getInstalledPlugin = (config: Config.t, name: string) =>\n\tconfig.plugins?.find(\n\t\t(plugin: InstalledPlugin.t) => [`taqueria-plugin-${name}`, name].includes(plugin.name),\n\t);\n\nexport const mapTasksToPlugins = (config: Config.t, pluginInfo: PluginInfo.t[], i18n: i18n) => {\n\tconst taskCounts = getTaskCounts(pluginInfo);\n\treturn attemptP<TaqError, TaskToPluginMap>(async () =>\n\t\tawait pluginInfo.reduce(\n\t\t\tasync (retval, pluginInfo) =>\n\t\t\t\t!pluginInfo.tasks\n\t\t\t\t\t? Promise.resolve({} as TaskToPluginMap)\n\t\t\t\t\t: await pluginInfo.tasks.reduce(\n\t\t\t\t\t\tasync (retval, { task, hidden }) => {\n\t\t\t\t\t\t\tif (isComposite(task, taskCounts)) {\n\t\t\t\t\t\t\t\tconst command = await eager(Command.make(task));\n\t\t\t\t\t\t\t\tconst compositeTask = await eager(Task.make({\n\t\t\t\t\t\t\t\t\ttask,\n\t\t\t\t\t\t\t\t\tcommand,\n\t\t\t\t\t\t\t\t\tdescription: await eager(NonEmptyString.make(i18n.__('providedByMany'))),\n\t\t\t\t\t\t\t\t\thidden,\n\t\t\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t\t\tawait eager(Option.make({\n\t\t\t\t\t\t\t\t\t\t\tflag: await eager(Verb.make('plugin')),\n\t\t\t\t\t\t\t\t\t\t\tdescription: await eager(\n\t\t\t\t\t\t\t\t\t\t\t\tNonEmptyString.make('Specify which plugin should be used to execute this task'),\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tchoices: toChoices(taskCounts[task]),\n\t\t\t\t\t\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\thandler: 'proxy',\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\treturn { ...await retval, [task]: compositeTask };\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Task is provided by just a single plugin\n\t\t\t\t\t\t\tconst installedPlugin = getInstalledPlugin(config, pluginInfo.name);\n\t\t\t\t\t\t\treturn installedPlugin\n\t\t\t\t\t\t\t\t? { ...await retval, [task]: installedPlugin }\n\t\t\t\t\t\t\t\t: retval;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tretval,\n\t\t\t\t\t),\n\t\t\tPromise.resolve({} as TaskToPluginMap),\n\t\t)\n\t).pipe(mapRej(rej => rej as TaqError));\n};\n\nexport const mapOperationsToPlugins = (config: Config.t, pluginInfo: PluginInfo.t[], i18n: i18n) => {\n\tconst opCounts = getOperationCounts(pluginInfo);\n\treturn attemptP(async () =>\n\t\tawait pluginInfo.reduce(\n\t\t\tasync (retval, pluginInfo) =>\n\t\t\t\t!pluginInfo.operations\n\t\t\t\t\t? Promise.resolve({} as OpToPluginMap)\n\t\t\t\t\t: await pluginInfo.operations.reduce(\n\t\t\t\t\t\tasync (retval, { operation }) => {\n\t\t\t\t\t\t\tif (isComposite(operation, opCounts)) {\n\t\t\t\t\t\t\t\tconst command = await eager(Command.make(operation));\n\t\t\t\t\t\t\t\tconst compositeOp = await eager(ParsedOperation.make({\n\t\t\t\t\t\t\t\t\toperation,\n\t\t\t\t\t\t\t\t\tcommand,\n\t\t\t\t\t\t\t\t\tdescription: await eager(NonEmptyString.make(i18n.__('providedByMany'))),\n\t\t\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t\t\tawait eager(Option.make({\n\t\t\t\t\t\t\t\t\t\t\tflag: await eager(Verb.make('plugin')),\n\t\t\t\t\t\t\t\t\t\t\tdescription: await eager(\n\t\t\t\t\t\t\t\t\t\t\t\tNonEmptyString.make('Specify which plugin should be used to execute this operation'),\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tchoices: toChoices(opCounts[operation]),\n\t\t\t\t\t\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\treturn { ...await retval, [operation]: compositeOp };\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Operation is provided by just a single plugin\n\t\t\t\t\t\t\tconst installedPlugin = getInstalledPlugin(config, pluginInfo.name);\n\t\t\t\t\t\t\treturn installedPlugin\n\t\t\t\t\t\t\t\t? { ...await retval, [operation]: installedPlugin }\n\t\t\t\t\t\t\t\t: retval;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tretval,\n\t\t\t\t\t),\n\t\t\tPromise.resolve({} as OpToPluginMap),\n\t\t)\n\t).pipe(mapRej(rej => rej as TaqError));\n};\n\nexport const mapTemplatesToPlugins = (config: Config.t, pluginInfo: PluginInfo.t[], i18n: i18n) => {\n\tconst tmplCounts = getTemplateCounts(pluginInfo);\n\treturn attemptP<TaqError, TemplateToPluginMap>(async () =>\n\t\tawait pluginInfo.reduce(\n\t\t\tasync (retval, pluginInfo) =>\n\t\t\t\t!pluginInfo.templates\n\t\t\t\t\t? Promise.resolve({} as TemplateToPluginMap)\n\t\t\t\t\t: await pluginInfo.templates!.reduce(\n\t\t\t\t\t\tasync (retval, { template, hidden }) => {\n\t\t\t\t\t\t\tif (isComposite(template, tmplCounts)) {\n\t\t\t\t\t\t\t\tconst command = await eager(Command.make(template));\n\t\t\t\t\t\t\t\tconst description = await eager(NonEmptyString.of(i18n.__('providedByMany')));\n\t\t\t\t\t\t\t\tconst compositeTmpl = await eager(ParsedTemplate.make({\n\t\t\t\t\t\t\t\t\ttemplate,\n\t\t\t\t\t\t\t\t\tcommand,\n\t\t\t\t\t\t\t\t\tdescription,\n\t\t\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t\t\tawait eager(Option.make({\n\t\t\t\t\t\t\t\t\t\t\tflag: await eager(Verb.make('plugin')),\n\t\t\t\t\t\t\t\t\t\t\tdescription: await eager(\n\t\t\t\t\t\t\t\t\t\t\t\tNonEmptyString.make('Specify which plugin should be used to execute this task'),\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tchoices: toChoices(tmplCounts[template]),\n\t\t\t\t\t\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\thandler: 'proxy',\n\t\t\t\t\t\t\t\t\tencoding: PluginResponseEncoding.create('none'),\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\treturn { ...await retval, [template]: compositeTmpl };\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Template is provided by just a single plugin\n\t\t\t\t\t\t\tconst installedPlugin = getInstalledPlugin(config, pluginInfo.name);\n\t\t\t\t\t\t\treturn installedPlugin\n\t\t\t\t\t\t\t\t? { ...await retval, [template]: installedPlugin }\n\t\t\t\t\t\t\t\t: retval;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tretval,\n\t\t\t\t\t),\n\t\t\tPromise.resolve({} as TemplateToPluginMap),\n\t\t)\n\t).pipe(mapRej(rej => rej as TaqError));\n};\n\nexport const getTasks = (pluginInfo: PluginInfo.t[]) =>\n\tpluginInfo.reduce(\n\t\t(retval: Task.t[], pluginInfo) => [...retval, ...(pluginInfo.tasks ?? [])],\n\t\t[],\n\t);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAYO;AACP,kBAAuB;AAEvB,sBAAqC;AACrC,qBAAoE;AACpE,iBAAkB;AAElB,IAAM,QAAQ,CAAI,UACjB;AAAA,MACC,uBAAO,CAAC,QAAkB,IAAI,2BAAW,GAAG,CAAC,EAAE,CAAC;AACjD;AAED,IAAM,kBAAkB,aAAE;AAAA,EACzB,aAAE,MAAM;AAAA,IACP,gCAAgB,QAAQ;AAA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;AAAA,IAC1C;AAAA,EACD,EAAE,SAAK,uBAAO,SAAO,GAAe,CAAC;AACtC;AAEO,IAAM,WAAW,CAAC,eACxB,WAAW;AAAA,EACV,CAAC,QAAkBD,gBAAY;AAjSjC;AAiSoC,YAAC,GAAG,QAAQ,IAAI,KAAAA,YAAW,UAAX,YAAoB,CAAC,CAAE;AAAA;AAAA,EACzE,CAAC;AACF;","names":["createType","pluginInfo","retval"]}
|
package/ParsedPluginInfo.js
CHANGED
|
@@ -41,7 +41,7 @@ var PluginInfo = __toESM(require("@taqueria/protocol/PluginInfo"));
|
|
|
41
41
|
var import_zod = require("zod");
|
|
42
42
|
var internalSchema2 = PluginInfo.internalSchema.extend({
|
|
43
43
|
operations: import_zod.z.preprocess(
|
|
44
|
-
(val) => val
|
|
44
|
+
(val) => val != null ? val : [],
|
|
45
45
|
import_zod.z.array(
|
|
46
46
|
ParsedOperation.schemas.schema,
|
|
47
47
|
{ description: "ParsedOperations" }
|
|
@@ -50,7 +50,7 @@ var internalSchema2 = PluginInfo.internalSchema.extend({
|
|
|
50
50
|
}).describe("ParsedPluginInfo");
|
|
51
51
|
var rawSchema2 = PluginInfo.internalSchema.extend({
|
|
52
52
|
operations: import_zod.z.preprocess(
|
|
53
|
-
(val) => val
|
|
53
|
+
(val) => val != null ? val : [],
|
|
54
54
|
import_zod.z.array(
|
|
55
55
|
ParsedOperation.rawSchema,
|
|
56
56
|
{ description: "ParsedOperation" }
|
|
@@ -68,14 +68,4 @@ var schemas2 = {
|
|
|
68
68
|
...generatedSchemas,
|
|
69
69
|
schema: generatedSchemas.schema.transform((val) => val)
|
|
70
70
|
};
|
|
71
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
72
|
-
0 && (module.exports = {
|
|
73
|
-
create,
|
|
74
|
-
factory,
|
|
75
|
-
generatedSchemas,
|
|
76
|
-
make,
|
|
77
|
-
of,
|
|
78
|
-
rawSchema,
|
|
79
|
-
schemas
|
|
80
|
-
});
|
|
81
71
|
//# sourceMappingURL=ParsedPluginInfo.js.map
|
package/ParsedPluginInfo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ParsedPluginInfo.ts"],"sourcesContent":["import createType from '@taqueria/protocol/Base';\nimport * as ParsedOperation from '@taqueria/protocol/ParsedOperation';\nimport * as PluginInfo from '@taqueria/protocol/PluginInfo';\nimport { z } from 'zod';\n\nconst internalSchema = PluginInfo.internalSchema.extend({\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedOperation.schemas.schema,\n\t\t\t{ description: 'ParsedOperations' },\n\t\t)\n\t\t\t.optional(),\n\t),\n}).describe('ParsedPluginInfo');\n\nexport const rawSchema = PluginInfo.internalSchema.extend({\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedOperation.rawSchema,\n\t\t\t{ description: 'ParsedOperation' },\n\t\t),\n\t)\n\t\t.optional(),\n}).describe('ParsedPluginInfo');\n\ntype Input = z.infer<typeof internalSchema>;\n\ntype RawInput = z.infer<typeof rawSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, 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,kBAAuB;AACvB,sBAAiC;AACjC,iBAA4B;AAC5B,iBAAkB;AAElB,IAAMC,kBAA4B,0BAAe,OAAO;AAAA,EACvD,YAAY,aAAE;AAAA,IACb,SAAO,
|
|
1
|
+
{"version":3,"sources":["ParsedPluginInfo.ts"],"sourcesContent":["import createType from '@taqueria/protocol/Base';\nimport * as ParsedOperation from '@taqueria/protocol/ParsedOperation';\nimport * as PluginInfo from '@taqueria/protocol/PluginInfo';\nimport { z } from 'zod';\n\nconst internalSchema = PluginInfo.internalSchema.extend({\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedOperation.schemas.schema,\n\t\t\t{ description: 'ParsedOperations' },\n\t\t)\n\t\t\t.optional(),\n\t),\n}).describe('ParsedPluginInfo');\n\nexport const rawSchema = PluginInfo.internalSchema.extend({\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedOperation.rawSchema,\n\t\t\t{ description: 'ParsedOperation' },\n\t\t),\n\t)\n\t\t.optional(),\n}).describe('ParsedPluginInfo');\n\ntype Input = z.infer<typeof internalSchema>;\n\ntype RawInput = z.infer<typeof rawSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, 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,kBAAuB;AACvB,sBAAiC;AACjC,iBAA4B;AAC5B,iBAAkB;AAElB,IAAMC,kBAA4B,0BAAe,OAAO;AAAA,EACvD,YAAY,aAAE;AAAA,IACb,SAAO,oBAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACe,wBAAQ;AAAA,MACxB,EAAE,aAAa,mBAAmB;AAAA,IACnC,EACE,SAAS;AAAA,EACZ;AACD,CAAC,EAAE,SAAS,kBAAkB;AAEvB,IAAMC,aAAuB,0BAAe,OAAO;AAAA,EACzD,YAAY,aAAE;AAAA,IACb,SAAO,oBAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACe;AAAA,MAChB,EAAE,aAAa,kBAAkB;AAAA,IAClC;AAAA,EACD,EACE,SAAS;AACZ,CAAC,EAAE,SAAS,kBAAkB;AAMvB,IAAM,EAAE,SAAS,kBAAkB,QAAQ,QAAI,YAAAC,SAA4B;AAAA,EACjF,WAAAD;AAAA,EACA,gBAAAD;AAAA,EACA,aAAa,CAAC,UACb,4FAA4F;AAAA,EAC7F,eAAe;AAChB,CAAC;AAIM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAE7B,IAAMG,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAuB;AACzE;","names":["rawSchema","schemas","internalSchema","rawSchema","createType","schemas"]}
|
package/PersistentState.js
CHANGED
|
@@ -84,15 +84,4 @@ var schemas4 = {
|
|
|
84
84
|
...generatedSchemas,
|
|
85
85
|
schema: generatedSchemas.schema.transform((val) => val)
|
|
86
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
87
|
//# sourceMappingURL=PersistentState.js.map
|
package/PersistentState.js.map
CHANGED
|
@@ -1 +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,
|
|
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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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,YAAAC,SAA4B;AAAA,EACjF,WAAAD;AAAA,EACA,aAAa;AAAA,EACb,eAAe;AAChB,CAAC;AAMM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAE7B,IAAME,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAiC;AACnF;","names":["rawSchema","schemas","rawSchema","createType","schemas"]}
|
package/PluginInfo.js
CHANGED
|
@@ -48,21 +48,21 @@ var rawSchema3 = import_zod.z.object({
|
|
|
48
48
|
schema: VersionNumber.rawSchema.describe("Plugin Schema Version #"),
|
|
49
49
|
alias: Alias.rawSchema.describe("Plugin Alias"),
|
|
50
50
|
tasks: import_zod.z.preprocess(
|
|
51
|
-
(val) => val
|
|
51
|
+
(val) => val != null ? val : [],
|
|
52
52
|
import_zod.z.array(
|
|
53
53
|
Task.schemas.schema.describe("Plugin Task"),
|
|
54
54
|
{ description: "Plugin Tasks" }
|
|
55
55
|
)
|
|
56
56
|
).optional(),
|
|
57
57
|
operations: import_zod.z.preprocess(
|
|
58
|
-
(val) => val
|
|
58
|
+
(val) => val != null ? val : [],
|
|
59
59
|
import_zod.z.array(
|
|
60
60
|
ParsedOperation.schemas.schema.describe("Plugin Operation"),
|
|
61
61
|
{ description: "Plugin Operations" }
|
|
62
62
|
)
|
|
63
63
|
).optional(),
|
|
64
64
|
templates: import_zod.z.preprocess(
|
|
65
|
-
(val) => val
|
|
65
|
+
(val) => val != null ? val : [],
|
|
66
66
|
import_zod.z.array(
|
|
67
67
|
ParsedTemplate.schemas.schema.describe("Plugin Template")
|
|
68
68
|
)
|
|
@@ -73,21 +73,21 @@ var internalSchema = rawSchema3.extend({
|
|
|
73
73
|
schema: VersionNumber.schemas.schema.describe("Plugin Schema Version #"),
|
|
74
74
|
alias: Alias.schemas.schema.describe("Plugin Alias"),
|
|
75
75
|
tasks: import_zod.z.preprocess(
|
|
76
|
-
(val) => val
|
|
76
|
+
(val) => val != null ? val : [],
|
|
77
77
|
import_zod.z.array(
|
|
78
78
|
Task.schemas.schema.describe("Plugin Task"),
|
|
79
79
|
{ description: "Plugin Tasks" }
|
|
80
80
|
)
|
|
81
81
|
).optional(),
|
|
82
82
|
operations: import_zod.z.preprocess(
|
|
83
|
-
(val) => val
|
|
83
|
+
(val) => val != null ? val : [],
|
|
84
84
|
import_zod.z.array(
|
|
85
85
|
ParsedOperation.schemas.schema.describe("Plugin Operation"),
|
|
86
86
|
{ description: "Plugin Operations" }
|
|
87
87
|
)
|
|
88
88
|
).optional(),
|
|
89
89
|
templates: import_zod.z.preprocess(
|
|
90
|
-
(val) => val
|
|
90
|
+
(val) => val != null ? val : [],
|
|
91
91
|
import_zod.z.array(
|
|
92
92
|
ParsedTemplate.schemas.schema.describe("Plugin Template")
|
|
93
93
|
)
|
|
@@ -100,14 +100,4 @@ var { schemas: schemas6, factory } = (0, import_Base.default)({
|
|
|
100
100
|
unknownErrMsg: "Something went wrong parsing the schema from a plugin"
|
|
101
101
|
});
|
|
102
102
|
var { create, of, make } = factory;
|
|
103
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
104
|
-
0 && (module.exports = {
|
|
105
|
-
create,
|
|
106
|
-
factory,
|
|
107
|
-
internalSchema,
|
|
108
|
-
make,
|
|
109
|
-
of,
|
|
110
|
-
rawSchema,
|
|
111
|
-
schemas
|
|
112
|
-
});
|
|
113
103
|
//# sourceMappingURL=PluginInfo.js.map
|
package/PluginInfo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["PluginInfo.ts"],"sourcesContent":["import * as Alias from '@taqueria/protocol/Alias';\nimport createType, { Flatten } from '@taqueria/protocol/Base';\nimport * as ParsedOperation from '@taqueria/protocol/ParsedOperation';\nimport * as ParsedTemplate from '@taqueria/protocol/ParsedTemplate';\nimport * as Task from '@taqueria/protocol/Task';\nimport * as VersionNumber from '@taqueria/protocol/VersionNumber';\nimport { z } from 'zod';\n\nexport const rawSchema = z.object({\n\tname: z.string({ description: 'Plugin Name' }).min(1),\n\tversion: VersionNumber.rawSchema.describe('Plugin Version #'),\n\tschema: VersionNumber.rawSchema.describe('Plugin Schema Version #'),\n\talias: Alias.rawSchema.describe('Plugin Alias'),\n\ttasks: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tTask.schemas.schema.describe('Plugin Task'),\n\t\t\t{ description: 'Plugin Tasks' },\n\t\t),\n\t).optional(),\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedOperation.schemas.schema.describe('Plugin Operation'),\n\t\t\t{ description: 'Plugin Operations' },\n\t\t),\n\t).optional(),\n\ttemplates: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedTemplate.schemas.schema.describe('Plugin Template'),\n\t\t),\n\t).optional(),\n});\n\nexport const internalSchema = rawSchema.extend({\n\tversion: VersionNumber.schemas.schema.describe('Plugin Version #'),\n\tschema: VersionNumber.schemas.schema.describe('Plugin Schema Version #'),\n\talias: Alias.schemas.schema.describe('Plugin Alias'),\n\ttasks: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tTask.schemas.schema.describe('Plugin Task'),\n\t\t\t{ description: 'Plugin Tasks' },\n\t\t),\n\t).optional(),\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedOperation.schemas.schema.describe('Plugin Operation'),\n\t\t\t{ description: 'Plugin Operations' },\n\t\t),\n\t).optional(),\n\ttemplates: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedTemplate.schemas.schema.describe('Plugin Template'),\n\t\t),\n\t).optional(),\n}).describe('Plugin Schema');\n\n// export const rawSchema = internalSchema;\n\ntype RawInput = z.infer<typeof rawSchema>;\ntype Input = Flatten<z.infer<typeof internalSchema>>;\n\nexport const { schemas, factory } = createType<RawInput, Input>({\n\trawSchema,\n\tinternalSchema,\n\tparseErrMsg: 'The schema returned from the plugin is invalid',\n\tunknownErrMsg: 'Something went wrong parsing the schema from a plugin',\n});\n\nexport type PluginInfo = Flatten<z.infer<typeof schemas.schema>>;\nexport type t = PluginInfo;\nexport const { create, of, make } = factory;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAAA;AAAA,EAAA,eAAAC;AAAA;AAAA;AAAA,YAAuB;AACvB,kBAAoC;AACpC,sBAAiC;AACjC,qBAAgC;AAChC,WAAsB;AACtB,oBAA+B;AAC/B,iBAAkB;AAEX,
|
|
1
|
+
{"version":3,"sources":["PluginInfo.ts"],"sourcesContent":["import * as Alias from '@taqueria/protocol/Alias';\nimport createType, { Flatten } from '@taqueria/protocol/Base';\nimport * as ParsedOperation from '@taqueria/protocol/ParsedOperation';\nimport * as ParsedTemplate from '@taqueria/protocol/ParsedTemplate';\nimport * as Task from '@taqueria/protocol/Task';\nimport * as VersionNumber from '@taqueria/protocol/VersionNumber';\nimport { z } from 'zod';\n\nexport const rawSchema = z.object({\n\tname: z.string({ description: 'Plugin Name' }).min(1),\n\tversion: VersionNumber.rawSchema.describe('Plugin Version #'),\n\tschema: VersionNumber.rawSchema.describe('Plugin Schema Version #'),\n\talias: Alias.rawSchema.describe('Plugin Alias'),\n\ttasks: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tTask.schemas.schema.describe('Plugin Task'),\n\t\t\t{ description: 'Plugin Tasks' },\n\t\t),\n\t).optional(),\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedOperation.schemas.schema.describe('Plugin Operation'),\n\t\t\t{ description: 'Plugin Operations' },\n\t\t),\n\t).optional(),\n\ttemplates: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedTemplate.schemas.schema.describe('Plugin Template'),\n\t\t),\n\t).optional(),\n});\n\nexport const internalSchema = rawSchema.extend({\n\tversion: VersionNumber.schemas.schema.describe('Plugin Version #'),\n\tschema: VersionNumber.schemas.schema.describe('Plugin Schema Version #'),\n\talias: Alias.schemas.schema.describe('Plugin Alias'),\n\ttasks: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tTask.schemas.schema.describe('Plugin Task'),\n\t\t\t{ description: 'Plugin Tasks' },\n\t\t),\n\t).optional(),\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedOperation.schemas.schema.describe('Plugin Operation'),\n\t\t\t{ description: 'Plugin Operations' },\n\t\t),\n\t).optional(),\n\ttemplates: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedTemplate.schemas.schema.describe('Plugin Template'),\n\t\t),\n\t).optional(),\n}).describe('Plugin Schema');\n\n// export const rawSchema = internalSchema;\n\ntype RawInput = z.infer<typeof rawSchema>;\ntype Input = Flatten<z.infer<typeof internalSchema>>;\n\nexport const { schemas, factory } = createType<RawInput, Input>({\n\trawSchema,\n\tinternalSchema,\n\tparseErrMsg: 'The schema returned from the plugin is invalid',\n\tunknownErrMsg: 'Something went wrong parsing the schema from a plugin',\n});\n\nexport type PluginInfo = Flatten<z.infer<typeof schemas.schema>>;\nexport type t = PluginInfo;\nexport const { create, of, make } = factory;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAAA;AAAA,EAAA,eAAAC;AAAA;AAAA;AAAA,YAAuB;AACvB,kBAAoC;AACpC,sBAAiC;AACjC,qBAAgC;AAChC,WAAsB;AACtB,oBAA+B;AAC/B,iBAAkB;AAEX,IAAMC,aAAY,aAAE,OAAO;AAAA,EACjC,MAAM,aAAE,OA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,IACZ,SAAO,oBAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACc,uBAAQ,OAAO,SAAS,iBAAiB;AAAA,IACzD;AAAA,EACD,EAAE,SAAS;AACZ,CAAC,EAAE,SAAS,eAAe;AAOpB,IAAM,EAAE,SAAAC,UAAS,QAAQ,QAAI,YAAAC,SAA4B;AAAA,EAC/D,WAAAF;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,eAAe;AAChB,CAAC;AAIM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;","names":["rawSchema","schemas","rawSchema","schemas","createType"]}
|
package/PluginSchema.js
CHANGED
|
@@ -43,14 +43,14 @@ var Template = __toESM(require("@taqueria/protocol/Template"));
|
|
|
43
43
|
var import_zod = require("zod");
|
|
44
44
|
var internalSchema2 = PluginInfo.internalSchema.extend({
|
|
45
45
|
operations: import_zod.z.preprocess(
|
|
46
|
-
(val) => val
|
|
46
|
+
(val) => val != null ? val : [],
|
|
47
47
|
import_zod.z.array(
|
|
48
48
|
Operation.schemas.schema,
|
|
49
49
|
{ description: "ParsedOperations" }
|
|
50
50
|
).optional()
|
|
51
51
|
),
|
|
52
52
|
templates: import_zod.z.preprocess(
|
|
53
|
-
(val) => val
|
|
53
|
+
(val) => val != null ? val : [],
|
|
54
54
|
import_zod.z.array(
|
|
55
55
|
Template.schemas.schema
|
|
56
56
|
).optional()
|
|
@@ -59,14 +59,14 @@ var internalSchema2 = PluginInfo.internalSchema.extend({
|
|
|
59
59
|
var rawSchema4 = PluginInfo.rawSchema.extend({
|
|
60
60
|
name: Alias.rawSchema.optional(),
|
|
61
61
|
operations: import_zod.z.preprocess(
|
|
62
|
-
(val) => val
|
|
62
|
+
(val) => val != null ? val : [],
|
|
63
63
|
import_zod.z.array(
|
|
64
64
|
Operation.rawSchema,
|
|
65
65
|
{ description: "ParsedOperation" }
|
|
66
66
|
)
|
|
67
67
|
).optional(),
|
|
68
68
|
templates: import_zod.z.preprocess(
|
|
69
|
-
(val) => val
|
|
69
|
+
(val) => val != null ? val : [],
|
|
70
70
|
import_zod.z.array(
|
|
71
71
|
Template.schemas.schema
|
|
72
72
|
).optional()
|
|
@@ -83,14 +83,4 @@ var schemas3 = {
|
|
|
83
83
|
...generatedSchemas,
|
|
84
84
|
schema: generatedSchemas.schema.transform((val) => val)
|
|
85
85
|
};
|
|
86
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
87
|
-
0 && (module.exports = {
|
|
88
|
-
create,
|
|
89
|
-
factory,
|
|
90
|
-
generatedSchemas,
|
|
91
|
-
make,
|
|
92
|
-
of,
|
|
93
|
-
rawSchema,
|
|
94
|
-
schemas
|
|
95
|
-
});
|
|
96
86
|
//# sourceMappingURL=PluginSchema.js.map
|
package/PluginSchema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["PluginSchema.ts"],"sourcesContent":["import { RequestArgs } from '@taqueria/protocol';\nimport * as Alias from '@taqueria/protocol/Alias';\nimport createType from '@taqueria/protocol/Base';\nimport * as Operation from '@taqueria/protocol/Operation';\nimport * as PluginInfo from '@taqueria/protocol/PluginInfo';\nimport * as Template from '@taqueria/protocol/Template';\nimport { PluginDependenciesResponse, PluginProxyResponse } from '@taqueria/protocol/types';\nimport { z } from 'zod';\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}).passthrough().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}).passthrough().describe('ParsedPluginInfo');\n\ntype Input = z.infer<typeof internalSchema> & {\n\tproxy: <T extends RequestArgs.t>(\n\t\targs: T,\n\t) => PluginProxyResponse | Promise<PluginProxyResponse> | Promise<void> | void;\n\tcheckRuntimeDependencies?: <T extends RequestArgs.t>(args: T) => PluginDependenciesResponse;\n\tinstallRuntimeDependencies?: <T extends RequestArgs.t>(args: T) => PluginDependenciesResponse;\n};\n\nexport type RawPluginSchema = z.infer<typeof rawSchema> & {\n\tproxy: <T extends RequestArgs.t>(\n\t\targs: T,\n\t) => PluginProxyResponse | Promise<PluginProxyResponse> | Promise<void> | void;\n\tcheckRuntimeDependencies?: <T extends RequestArgs.t>(args: T) => PluginDependenciesResponse;\n\tinstallRuntimeDependencies?: <T extends RequestArgs.t>(args: T) => PluginDependenciesResponse;\n};\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;\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;AACA,YAAuB;AACvB,kBAAuB;AACvB,gBAA2B;AAC3B,iBAA4B;AAC5B,eAA0B;AAE1B,iBAAkB;AAElB,IAAMC,kBAA4B,0BAAe,OAAO;AAAA,EACvD,YAAY,aAAE;AAAA,IACb,SAAO,
|
|
1
|
+
{"version":3,"sources":["PluginSchema.ts"],"sourcesContent":["import { RequestArgs } from '@taqueria/protocol';\nimport * as Alias from '@taqueria/protocol/Alias';\nimport createType from '@taqueria/protocol/Base';\nimport * as Operation from '@taqueria/protocol/Operation';\nimport * as PluginInfo from '@taqueria/protocol/PluginInfo';\nimport * as Template from '@taqueria/protocol/Template';\nimport { PluginDependenciesResponse, PluginProxyResponse } from '@taqueria/protocol/types';\nimport { z } from 'zod';\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}).passthrough().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}).passthrough().describe('ParsedPluginInfo');\n\ntype Input = z.infer<typeof internalSchema> & {\n\tproxy: <T extends RequestArgs.t>(\n\t\targs: T,\n\t) => PluginProxyResponse | Promise<PluginProxyResponse> | Promise<void> | void;\n\tcheckRuntimeDependencies?: <T extends RequestArgs.t>(args: T) => PluginDependenciesResponse;\n\tinstallRuntimeDependencies?: <T extends RequestArgs.t>(args: T) => PluginDependenciesResponse;\n};\n\nexport type RawPluginSchema = z.infer<typeof rawSchema> & {\n\tproxy: <T extends RequestArgs.t>(\n\t\targs: T,\n\t) => PluginProxyResponse | Promise<PluginProxyResponse> | Promise<void> | void;\n\tcheckRuntimeDependencies?: <T extends RequestArgs.t>(args: T) => PluginDependenciesResponse;\n\tinstallRuntimeDependencies?: <T extends RequestArgs.t>(args: T) => PluginDependenciesResponse;\n};\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;\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;AACA,YAAuB;AACvB,kBAAuB;AACvB,gBAA2B;AAC3B,iBAA4B;AAC5B,eAA0B;AAE1B,iBAAkB;AAElB,IAAMC,kBAA4B,0BAAe,OAAO;AAAA,EACvD,YAAY,aAAE;AAAA,IACb,SAAO,oBAAO,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,oBAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACQ,iBAAQ;AAAA,IAClB,EAAE,SAAS;AAAA,EACZ;AACD,CAAC,EAAE,YAAY,EAAE,SAAS,kBAAkB;AAErC,IAAMC,aAAuB,qBAAU,OAAO;AAAA,EACpD,MAAY,gBAAU,SAAS;AAAA,EAC/B,YAAY,aAAE;AAAA,IACb,SAAO,oBAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACS;AAAA,MACV,EAAE,aAAa,kBAAkB;AAAA,IAClC;AAAA,EACD,EACE,SAAS;AAAA,EACX,WAAW,aAAE;AAAA,IACZ,SAAO,oBAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACQ,iBAAQ;AAAA,IAClB,EAAE,SAAS;AAAA,EACZ;AACD,CAAC,EAAE,YAAY,EAAE,SAAS,kBAAkB;AAkBrC,IAAM,EAAE,SAAS,kBAAkB,QAAQ,QAAI,YAAAC,SAAmC;AAAA,EACxF,WAAAD;AAAA,EACA,gBAAAD;AAAA,EACA,aAAa,CAAC,UACb,4FAA4F;AAAA,EAC7F,eAAe;AAChB,CAAC;AAIM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAC7B,IAAMG,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAuB;AACzE;","names":["rawSchema","schemas","internalSchema","rawSchema","createType","schemas"]}
|
package/SHA256.js
CHANGED
|
@@ -83,15 +83,4 @@ var schemas = {
|
|
|
83
83
|
...generatedSchemas,
|
|
84
84
|
schema: generatedSchemas.schema.transform((val) => val)
|
|
85
85
|
};
|
|
86
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
87
|
-
0 && (module.exports = {
|
|
88
|
-
Crypto,
|
|
89
|
-
create,
|
|
90
|
-
internalSchema,
|
|
91
|
-
make,
|
|
92
|
-
of,
|
|
93
|
-
rawSchema,
|
|
94
|
-
schemas,
|
|
95
|
-
toSHA256
|
|
96
|
-
});
|
|
97
86
|
//# sourceMappingURL=SHA256.js.map
|
package/SanitizedAbsPath.js
CHANGED
|
@@ -51,14 +51,4 @@ var schemas = {
|
|
|
51
51
|
...generatedSchemas,
|
|
52
52
|
schema: generatedSchemas.schema.transform((val) => val)
|
|
53
53
|
};
|
|
54
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
-
0 && (module.exports = {
|
|
56
|
-
create,
|
|
57
|
-
factory,
|
|
58
|
-
generatedSchemas,
|
|
59
|
-
make,
|
|
60
|
-
of,
|
|
61
|
-
rawSchema,
|
|
62
|
-
schemas
|
|
63
|
-
});
|
|
64
54
|
//# sourceMappingURL=SanitizedAbsPath.js.map
|