@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/types-config-files.js
CHANGED
|
@@ -22,6 +22,9 @@ var types_config_files_exports = {};
|
|
|
22
22
|
__export(types_config_files_exports, {
|
|
23
23
|
readConfigFiles: () => readConfigFiles,
|
|
24
24
|
readJsonFileInterceptConfig: () => readJsonFileInterceptConfig,
|
|
25
|
+
transformConfigFileV1ToConfigFileSetV2: () => transformConfigFileV1ToConfigFileSetV2,
|
|
26
|
+
transformConfigFileV2ToConfig: () => transformConfigFileV2ToConfig,
|
|
27
|
+
transformConfigToConfigFileV2: () => transformConfigToConfigFileV2,
|
|
25
28
|
writeConfigFiles: () => writeConfigFiles,
|
|
26
29
|
writeJsonFileInterceptConfig: () => writeJsonFileInterceptConfig
|
|
27
30
|
});
|
|
@@ -33,6 +36,7 @@ var readJsonFileInterceptConfig = (readJsonFile) => async (filePath) => {
|
|
|
33
36
|
return readJsonFile(filePath);
|
|
34
37
|
};
|
|
35
38
|
var readConfigFiles = (readJsonFile) => async (configFilePath) => {
|
|
39
|
+
var _a;
|
|
36
40
|
const configFileObj = await readJsonFile(configFilePath);
|
|
37
41
|
if (configFileObj.version !== `v2`) {
|
|
38
42
|
const configFileSetV2 = transformConfigFileV1ToConfigFileSetV2(configFileObj);
|
|
@@ -40,7 +44,7 @@ var readConfigFiles = (readJsonFile) => async (configFilePath) => {
|
|
|
40
44
|
}
|
|
41
45
|
const configFileV2 = configFileObj;
|
|
42
46
|
const envFiles = await Promise.all(
|
|
43
|
-
Object.keys(configFileV2.environments
|
|
47
|
+
Object.keys((_a = configFileV2.environments) != null ? _a : {}).map(async (envName) => {
|
|
44
48
|
try {
|
|
45
49
|
return {
|
|
46
50
|
key: envName,
|
|
@@ -79,7 +83,7 @@ var removeUndefinedFields = (x) => {
|
|
|
79
83
|
return JSON.parse(JSON.stringify(x));
|
|
80
84
|
};
|
|
81
85
|
var transformConfigFileV1ToConfigFileSetV2 = (configFileV1) => {
|
|
82
|
-
var _a;
|
|
86
|
+
var _a, _b;
|
|
83
87
|
const config = configFileV1;
|
|
84
88
|
const configFileV2 = {
|
|
85
89
|
version: `v2`,
|
|
@@ -93,12 +97,27 @@ var transformConfigFileV1ToConfigFileSetV2 = (configFileV1) => {
|
|
|
93
97
|
contracts: config.contracts,
|
|
94
98
|
environmentDefault: (_a = config.environment) == null ? void 0 : _a.default,
|
|
95
99
|
environments: Object.fromEntries(
|
|
96
|
-
Object.entries(config.environment
|
|
100
|
+
Object.entries((_b = config.environment) != null ? _b : {}).filter(([k, v]) => k !== `default`).map(([k, v]) => [k, v]).map(([k, v]) => [k, {
|
|
97
101
|
type: v.sandboxes.length ? `flextesa` : `simple`,
|
|
98
102
|
...(() => {
|
|
103
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h;
|
|
99
104
|
const vClone = { ...v };
|
|
100
105
|
delete vClone.networks;
|
|
101
106
|
delete vClone.sandboxes;
|
|
107
|
+
delete vClone.aliases;
|
|
108
|
+
if (v.aliases)
|
|
109
|
+
vClone.contracts = v.aliases;
|
|
110
|
+
if ((_a2 = v.sandboxes) == null ? void 0 : _a2[0]) {
|
|
111
|
+
const sandboxName = v.sandboxes[0];
|
|
112
|
+
if ((_b2 = config.sandbox) == null ? void 0 : _b2[sandboxName].accounts) {
|
|
113
|
+
const accountsClone = { ...config.sandbox[sandboxName].accounts };
|
|
114
|
+
delete accountsClone["default"];
|
|
115
|
+
vClone.accounts = accountsClone;
|
|
116
|
+
if ((_e = (_d = (_c = config.sandbox) == null ? void 0 : _c[sandboxName]) == null ? void 0 : _d.accounts) == null ? void 0 : _e["default"]) {
|
|
117
|
+
vClone.accountDefault = (_h = (_g = (_f = config.sandbox) == null ? void 0 : _f[sandboxName]) == null ? void 0 : _g.accounts) == null ? void 0 : _h["default"];
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
102
121
|
return vClone;
|
|
103
122
|
})(),
|
|
104
123
|
networkName: v.networks[0],
|
|
@@ -110,7 +129,9 @@ var transformConfigFileV1ToConfigFileSetV2 = (configFileV1) => {
|
|
|
110
129
|
}),
|
|
111
130
|
...v.sandboxes.map((k2) => {
|
|
112
131
|
var _a2;
|
|
113
|
-
|
|
132
|
+
const retval = { ...(_a2 = config.sandbox) == null ? void 0 : _a2[k2] };
|
|
133
|
+
delete retval["accounts"];
|
|
134
|
+
return retval;
|
|
114
135
|
})
|
|
115
136
|
][0]
|
|
116
137
|
}])
|
|
@@ -121,6 +142,47 @@ var transformConfigFileV1ToConfigFileSetV2 = (configFileV1) => {
|
|
|
121
142
|
return removeUndefinedFields({ config: configFileV2, environments: environmentsV2 });
|
|
122
143
|
};
|
|
123
144
|
var transformConfigToConfigFileV2 = (config) => {
|
|
145
|
+
var _a, _b;
|
|
146
|
+
const environmentsV2Raw = Object.fromEntries(
|
|
147
|
+
Object.entries(config.environment).filter(([k]) => k !== `default`).map(([k, v]) => [k, v]).map(([k, v]) => [k, {
|
|
148
|
+
type: v.sandboxes.length ? `flextesa` : `simple`,
|
|
149
|
+
...(() => {
|
|
150
|
+
var _a2, _b2, _c, _d, _e;
|
|
151
|
+
const vClone = { ...v };
|
|
152
|
+
delete vClone.networks;
|
|
153
|
+
delete vClone.sandboxes;
|
|
154
|
+
delete vClone.aliases;
|
|
155
|
+
if (v.aliases)
|
|
156
|
+
vClone.contracts = v.aliases;
|
|
157
|
+
if ((_a2 = v.sandboxes) == null ? void 0 : _a2[0]) {
|
|
158
|
+
const sandboxName = v.sandboxes[0];
|
|
159
|
+
if ((_c = (_b2 = config.sandbox) == null ? void 0 : _b2[sandboxName]) == null ? void 0 : _c.accounts) {
|
|
160
|
+
const accountsClone = { ...config.sandbox[sandboxName].accounts };
|
|
161
|
+
delete accountsClone["default"];
|
|
162
|
+
vClone.accounts = accountsClone;
|
|
163
|
+
if ((_d = config.sandbox[sandboxName].accounts) == null ? void 0 : _d["default"]) {
|
|
164
|
+
vClone.accountDefault = (_e = config.sandbox[sandboxName].accounts) == null ? void 0 : _e["default"];
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return vClone;
|
|
169
|
+
})(),
|
|
170
|
+
networkName: v.networks[0],
|
|
171
|
+
sandboxName: v.sandboxes[0],
|
|
172
|
+
...[
|
|
173
|
+
...v.networks.map((k2) => {
|
|
174
|
+
var _a2;
|
|
175
|
+
return (_a2 = config.network) == null ? void 0 : _a2[k2];
|
|
176
|
+
}),
|
|
177
|
+
...v.sandboxes.map((k2) => {
|
|
178
|
+
var _a2;
|
|
179
|
+
const retval = { ...(_a2 = config.sandbox) == null ? void 0 : _a2[k2] };
|
|
180
|
+
delete retval["accounts"];
|
|
181
|
+
return retval;
|
|
182
|
+
})
|
|
183
|
+
][0]
|
|
184
|
+
}])
|
|
185
|
+
);
|
|
124
186
|
const configFileV2 = {
|
|
125
187
|
version: `v2`,
|
|
126
188
|
language: config.language,
|
|
@@ -132,33 +194,11 @@ var transformConfigToConfigFileV2 = (config) => {
|
|
|
132
194
|
),
|
|
133
195
|
contracts: config.contracts,
|
|
134
196
|
environmentDefault: config.environment.default,
|
|
135
|
-
environments:
|
|
136
|
-
Object.entries(config.environment).filter(([k, v]) => k !== `default`).map(([k, v]) => [k, v]).map(([k, v]) => [k, {
|
|
137
|
-
type: v.sandboxes.length ? `flextesa` : `simple`,
|
|
138
|
-
...(() => {
|
|
139
|
-
const vClone = { ...v };
|
|
140
|
-
delete vClone.networks;
|
|
141
|
-
delete vClone.sandboxes;
|
|
142
|
-
return vClone;
|
|
143
|
-
})(),
|
|
144
|
-
networkName: v.networks[0],
|
|
145
|
-
sandboxName: v.sandboxes[0],
|
|
146
|
-
...[
|
|
147
|
-
...v.networks.map((k2) => {
|
|
148
|
-
var _a;
|
|
149
|
-
return (_a = config.network) == null ? void 0 : _a[k2];
|
|
150
|
-
}),
|
|
151
|
-
...v.sandboxes.map((k2) => {
|
|
152
|
-
var _a;
|
|
153
|
-
return (_a = config.sandbox) == null ? void 0 : _a[k2];
|
|
154
|
-
})
|
|
155
|
-
][0]
|
|
156
|
-
}])
|
|
157
|
-
),
|
|
197
|
+
environments: environmentsV2Raw,
|
|
158
198
|
plugins: config.plugins
|
|
159
199
|
};
|
|
160
200
|
const environmentsV2 = {};
|
|
161
|
-
for (const [envName, eMain] of Object.entries(configFileV2.environments
|
|
201
|
+
for (const [envName, eMain] of Object.entries((_a = configFileV2.environments) != null ? _a : {})) {
|
|
162
202
|
const eLocal = environmentsV2[envName] = { ...eMain };
|
|
163
203
|
for (const k of Object.keys(eMain)) {
|
|
164
204
|
const key = k;
|
|
@@ -178,6 +218,16 @@ var transformConfigToConfigFileV2 = (config) => {
|
|
|
178
218
|
continue;
|
|
179
219
|
}
|
|
180
220
|
}
|
|
221
|
+
if (k == "aliases") {
|
|
222
|
+
eLocal["contracts"] = Object.entries((_b = eLocal[key]) != null ? _b : {}).reduce(
|
|
223
|
+
(retval, [key2, value]) => ({
|
|
224
|
+
...retval,
|
|
225
|
+
[key2]: value
|
|
226
|
+
}),
|
|
227
|
+
{}
|
|
228
|
+
);
|
|
229
|
+
delete eLocal[key];
|
|
230
|
+
}
|
|
181
231
|
delete eMain[key];
|
|
182
232
|
}
|
|
183
233
|
continue;
|
|
@@ -185,18 +235,21 @@ var transformConfigToConfigFileV2 = (config) => {
|
|
|
185
235
|
return removeUndefinedFields({ config: configFileV2, environments: environmentsV2 });
|
|
186
236
|
};
|
|
187
237
|
var transformConfigFileV2ToConfig = (configFileSetV2) => {
|
|
188
|
-
var _a;
|
|
238
|
+
var _a, _b, _c;
|
|
189
239
|
const {
|
|
190
240
|
config: configFileV2,
|
|
191
241
|
environments: environmentFilesV2
|
|
192
242
|
} = configFileSetV2;
|
|
193
|
-
const environments = Object.entries(configFileV2.environments
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
243
|
+
const environments = Object.entries((_a = configFileV2.environments) != null ? _a : {}).map(([k, v]) => {
|
|
244
|
+
var _a2;
|
|
245
|
+
return {
|
|
246
|
+
key: k,
|
|
247
|
+
value: {
|
|
248
|
+
...v,
|
|
249
|
+
...(_a2 = environmentFilesV2[k]) != null ? _a2 : {}
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
});
|
|
200
253
|
const getUnknownFields = (x, structure) => {
|
|
201
254
|
if (structure === "environment") {
|
|
202
255
|
return {};
|
|
@@ -210,6 +263,8 @@ var transformConfigFileV2ToConfig = (configFileSetV2) => {
|
|
|
210
263
|
delete vClone.rpcUrl;
|
|
211
264
|
delete vClone.storage;
|
|
212
265
|
delete vClone.aliases;
|
|
266
|
+
delete vClone.contracts;
|
|
267
|
+
delete vClone.accounts;
|
|
213
268
|
return vClone;
|
|
214
269
|
})();
|
|
215
270
|
return unknownFields;
|
|
@@ -228,37 +283,61 @@ var transformConfigFileV2ToConfig = (configFileSetV2) => {
|
|
|
228
283
|
Object.entries(configFileV2.accounts).map(([k, v]) => [k, `${v.balance.amount}`])
|
|
229
284
|
),
|
|
230
285
|
environment: {
|
|
231
|
-
default: configFileV2.environmentDefault
|
|
232
|
-
...Object.fromEntries(environments.map((x) =>
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
286
|
+
default: (_c = configFileV2.environmentDefault) != null ? _c : (_b = environments[0]) == null ? void 0 : _b.key,
|
|
287
|
+
...Object.fromEntries(environments.map((x) => {
|
|
288
|
+
var _a2, _b2;
|
|
289
|
+
return [x.key, {
|
|
290
|
+
networks: x.value.type !== `simple` ? [] : [
|
|
291
|
+
(_a2 = x.value.networkName) != null ? _a2 : `${x.key}`
|
|
292
|
+
],
|
|
293
|
+
sandboxes: x.value.type !== `flextesa` ? [] : [
|
|
294
|
+
(_b2 = x.value.sandboxName) != null ? _b2 : `${x.key}`
|
|
295
|
+
],
|
|
296
|
+
storage: x.value.storage,
|
|
297
|
+
aliases: x.value.contracts,
|
|
298
|
+
...getUnknownFields(x, "environment")
|
|
299
|
+
}];
|
|
300
|
+
}))
|
|
243
301
|
},
|
|
244
|
-
network: !simpleEnvironments.length ? void 0 : Object.fromEntries(simpleEnvironments.map((x) =>
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
302
|
+
network: !simpleEnvironments.length ? void 0 : Object.fromEntries(simpleEnvironments.map((x) => {
|
|
303
|
+
var _a2, _b2, _c2;
|
|
304
|
+
return [(_a2 = x.value.networkName) != null ? _a2 : `${x.key}`, {
|
|
305
|
+
label: (_b2 = x.value.label) != null ? _b2 : ``,
|
|
306
|
+
rpcUrl: (_c2 = x.value.rpcUrl) != null ? _c2 : ``,
|
|
307
|
+
...getUnknownFields(x, "network"),
|
|
308
|
+
...(() => {
|
|
309
|
+
return {
|
|
310
|
+
accounts: x.value.accounts
|
|
311
|
+
};
|
|
312
|
+
})()
|
|
313
|
+
}];
|
|
314
|
+
})),
|
|
315
|
+
sandbox: !sandboxEnvironments.length ? void 0 : Object.fromEntries(sandboxEnvironments.map((x) => {
|
|
316
|
+
var _a2, _b2, _c2;
|
|
317
|
+
return [(_a2 = x.value.sandboxName) != null ? _a2 : `${x.key}`, {
|
|
318
|
+
label: (_b2 = x.value.label) != null ? _b2 : ``,
|
|
319
|
+
rpcUrl: (_c2 = x.value.rpcUrl) != null ? _c2 : ``,
|
|
320
|
+
...getUnknownFields(x, "sandbox"),
|
|
321
|
+
...(() => {
|
|
322
|
+
const environment = x.value;
|
|
323
|
+
if (environment && environment.accounts) {
|
|
324
|
+
return environment.accountDefault ? {
|
|
325
|
+
accounts: {
|
|
326
|
+
...environment.accounts,
|
|
327
|
+
default: environment.accountDefault
|
|
328
|
+
}
|
|
329
|
+
} : {
|
|
330
|
+
accounts: {
|
|
331
|
+
...environment.accounts,
|
|
332
|
+
default: Object.keys(environment.accounts)[0]
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
return {};
|
|
337
|
+
})()
|
|
338
|
+
}];
|
|
339
|
+
}))
|
|
254
340
|
};
|
|
255
341
|
return removeUndefinedFields(config);
|
|
256
342
|
};
|
|
257
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
258
|
-
0 && (module.exports = {
|
|
259
|
-
readConfigFiles,
|
|
260
|
-
readJsonFileInterceptConfig,
|
|
261
|
-
writeConfigFiles,
|
|
262
|
-
writeJsonFileInterceptConfig
|
|
263
|
-
});
|
|
264
343
|
//# sourceMappingURL=types-config-files.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["types-config-files.ts"],"sourcesContent":["import type {\n\tConfig,\n\tConfigEnvironmentFileV2,\n\tConfigFileV1,\n\tConfigFileV2,\n\tEnvironment,\n} from '@taqueria/protocol/types';\n\nexport type ConfigFileSetV2 = {\n\tconfig: ConfigFileV2;\n\tenvironments: { [name: string]: ConfigEnvironmentFileV2 };\n};\n\nexport const readJsonFileInterceptConfig = (readJsonFile: <T>(filePath: string) => Promise<T>) =>\n\tasync <T>(filePath: string): Promise<T> => {\n\t\tif (filePath.endsWith(`.taq/config.json`)) {\n\t\t\treturn transformConfigFileV2ToConfig(await readConfigFiles(readJsonFile)(filePath)) as unknown as Promise<T>;\n\t\t}\n\n\t\treturn readJsonFile<T>(filePath);\n\t};\n\nexport const readConfigFiles = (readJsonFile: <T>(filePath: string) => Promise<T>) =>\n\tasync (configFilePath: string): Promise<ConfigFileSetV2> => {\n\t\tconst configFileObj = await readJsonFile(configFilePath);\n\n\t\tif ((configFileObj as ConfigFileV2).version !== `v2`) {\n\t\t\t// v1 - only file to load\n\t\t\tconst configFileSetV2 = transformConfigFileV1ToConfigFileSetV2(configFileObj as ConfigFileV1);\n\t\t\treturn configFileSetV2;\n\t\t}\n\n\t\t// Load env files\n\t\tconst configFileV2 = configFileObj as ConfigFileV2;\n\t\tconst envFiles = await Promise.all(\n\t\t\tObject.keys(configFileV2.environments ?? {}).map(async envName => {\n\t\t\t\ttry {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tkey: envName,\n\t\t\t\t\t\tvalue: await readJsonFile(\n\t\t\t\t\t\t\tconfigFilePath.replace(`config.json`, `config.local.${envName}.json`),\n\t\t\t\t\t\t) as ConfigEnvironmentFileV2,\n\t\t\t\t\t};\n\t\t\t\t} catch {\n\t\t\t\t\t// ignore if file could not be read (no env file)\n\t\t\t\t\treturn {};\n\t\t\t\t}\n\t\t\t}),\n\t\t);\n\n\t\treturn {\n\t\t\tconfig: configFileV2,\n\t\t\tenvironments: Object.fromEntries(envFiles.filter(x => x.value).map(x => [x.key, x.value])),\n\t\t};\n\t};\n\nexport const writeJsonFileInterceptConfig = (writeJsonFile: (filePath: string) => (data: unknown) => Promise<string>) =>\n\t(filePath: string): ((data: unknown) => Promise<string>) => {\n\t\tif (filePath.endsWith(`.taq/config.json`)) {\n\t\t\treturn (async (config: Config) => {\n\t\t\t\t// DEBUG: write original file\n\t\t\t\t// await writeJsonFile(filePath.replace(`config.json`, `config.original-${Date.now()}.json`))(config);\n\n\t\t\t\treturn await writeConfigFiles(writeJsonFile)(filePath)(transformConfigToConfigFileV2(config));\n\t\t\t}) as (data: unknown) => Promise<string>;\n\t\t}\n\n\t\treturn writeJsonFile(filePath);\n\t};\n\nexport const writeConfigFiles = (writeJsonFile: (filePath: string) => (data: unknown) => Promise<string>) =>\n\t(configFilePath: string) =>\n\t\tasync (configFileSetV2: ConfigFileSetV2) => {\n\t\t\tconst configFileResult = await writeJsonFile(configFilePath)(configFileSetV2.config);\n\n\t\t\t// write the env files\n\t\t\tawait Promise.all(\n\t\t\t\tObject.entries(configFileSetV2.environments).map(async ([envName, value]) => {\n\t\t\t\t\tawait writeJsonFile(configFilePath.replace(`config.json`, `config.local.${envName}.json`))(value);\n\t\t\t\t}),\n\t\t\t);\n\n\t\t\treturn configFileResult;\n\t\t};\n\nconst removeUndefinedFields = <T>(x: T): T => {\n\treturn JSON.parse(JSON.stringify(x)) as T;\n};\n\n/** Migrate FileV1 to FileV2\n *\n * NOTE: Although this is nearly identical to transformConfigToConfigFileV2\n * This function should be sealed while the transformConfigToConfigFileV2\n * will change interatively to become move like V2\n */\nconst transformConfigFileV1ToConfigFileSetV2 = (configFileV1: ConfigFileV1): ConfigFileSetV2 => {\n\tconst config = configFileV1;\n\tconst configFileV2: ConfigFileV2 = {\n\t\tversion: `v2`,\n\t\tlanguage: config.language,\n\t\tmetadata: config.metadata,\n\t\tartifactsDir: config.artifactsDir,\n\t\tcontractsDir: config.contractsDir,\n\t\taccounts: !config.accounts\n\t\t\t? undefined\n\t\t\t: Object.fromEntries(\n\t\t\t\tObject.entries(config.accounts)\n\t\t\t\t\t.map(([k, v]) => [k, { balance: { amount: v, units: `mutez` } }]),\n\t\t\t),\n\t\tcontracts: config.contracts,\n\t\tenvironmentDefault: config.environment?.default as string,\n\t\tenvironments: Object.fromEntries(\n\t\t\tObject.entries(config.environment ?? {})\n\t\t\t\t.filter(([k, v]) => k !== `default`)\n\t\t\t\t.map(([k, v]) => [k, v] as [string, Environment])\n\t\t\t\t.map(([k, v]) => [k, {\n\t\t\t\t\t// Known fields\n\t\t\t\t\ttype: v.sandboxes.length ? `flextesa` : `simple`,\n\t\t\t\t\t// Unknown fields\n\t\t\t\t\t...((() => {\n\t\t\t\t\t\tconst vClone = { ...v } as Partial<typeof v>;\n\t\t\t\t\t\tdelete vClone.networks;\n\t\t\t\t\t\tdelete vClone.sandboxes;\n\t\t\t\t\t\treturn vClone;\n\t\t\t\t\t})()),\n\t\t\t\t\t// Preserve sandbox or network name\n\t\t\t\t\tnetworkName: v.networks[0],\n\t\t\t\t\tsandboxName: v.sandboxes[0],\n\t\t\t\t\t// Fields from the first sandbox or network (there should be only 1)\n\t\t\t\t\t// These overwrite fields in environment\n\t\t\t\t\t...[\n\t\t\t\t\t\t...v.networks.map(k => config.network?.[k]),\n\t\t\t\t\t\t...v.sandboxes.map(k => config.sandbox?.[k]),\n\t\t\t\t\t][0] as {},\n\t\t\t\t}]),\n\t\t),\n\t\tplugins: config.plugins,\n\t};\n\n\t// It is fine to leave everything in the main config V2 file since it will be parsed either way\n\tconst environmentsV2 = {};\n\treturn removeUndefinedFields({ config: configFileV2, environments: environmentsV2 });\n};\n\n// Object to FileV2\nconst transformConfigToConfigFileV2 = (config: Config): ConfigFileSetV2 => {\n\tconst configFileV2: ConfigFileV2 = {\n\t\tversion: `v2`,\n\t\tlanguage: config.language,\n\t\tmetadata: config.metadata,\n\t\tartifactsDir: config.artifactsDir,\n\t\tcontractsDir: config.contractsDir,\n\t\taccounts: !config.accounts\n\t\t\t? undefined\n\t\t\t: Object.fromEntries(\n\t\t\t\tObject.entries(config.accounts)\n\t\t\t\t\t.map(([k, v]) => [k, { balance: { amount: v, units: `mutez` } }]),\n\t\t\t),\n\t\tcontracts: config.contracts,\n\t\tenvironmentDefault: config.environment.default as string,\n\t\tenvironments: Object.fromEntries(\n\t\t\tObject.entries(config.environment)\n\t\t\t\t.filter(([k, v]) => k !== `default`)\n\t\t\t\t.map(([k, v]) => [k, v] as [string, Environment])\n\t\t\t\t.map(([k, v]) => [k, {\n\t\t\t\t\t// Known fields\n\t\t\t\t\ttype: v.sandboxes.length ? `flextesa` : `simple`,\n\t\t\t\t\t// Unknown fields\n\t\t\t\t\t...((() => {\n\t\t\t\t\t\tconst vClone = { ...v } as Partial<typeof v>;\n\t\t\t\t\t\tdelete vClone.networks;\n\t\t\t\t\t\tdelete vClone.sandboxes;\n\t\t\t\t\t\treturn vClone;\n\t\t\t\t\t})()),\n\t\t\t\t\t// Preserve sandbox or network name\n\t\t\t\t\tnetworkName: v.networks[0],\n\t\t\t\t\tsandboxName: v.sandboxes[0],\n\t\t\t\t\t// Fields from the first sandbox or network (there should be only 1)\n\t\t\t\t\t// These overwrite fields in environment\n\t\t\t\t\t...[\n\t\t\t\t\t\t...v.networks.map(k => config.network?.[k]),\n\t\t\t\t\t\t...v.sandboxes.map(k => config.sandbox?.[k]),\n\t\t\t\t\t][0] as {},\n\t\t\t\t}]),\n\t\t),\n\t\tplugins: config.plugins,\n\t};\n\n\t// extract local only fields to environment specific files\n\t// This should only include fields that the environment plugin will replace if missing\n\t// This is providing a default implementation for a few known environments\n\tconst environmentsV2 = {} as ConfigFileSetV2['environments'];\n\n\tfor (const [envName, eMain] of Object.entries(configFileV2.environments ?? {})) {\n\t\t// clone eMain and delete fields from either main config or local env config\n\t\tconst eLocal = environmentsV2[envName] = { ...eMain };\n\n\t\tfor (const k of Object.keys(eMain)) {\n\t\t\tconst key = k as keyof typeof eMain;\n\n\t\t\tif (key === `type`) {\n\t\t\t\tdelete eLocal[key];\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Everything except label and protocol is local for sandbox\n\t\t\tif (eMain.type === 'flextesa') {\n\t\t\t\tif (\n\t\t\t\t\tk === 'label'\n\t\t\t\t\t|| k === 'protocol'\n\t\t\t\t) {\n\t\t\t\t\tdelete eLocal[key];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// For simple networks, keep the rpcUrl also\n\t\t\tif (eMain.type === 'simple') {\n\t\t\t\tif (\n\t\t\t\t\tk === 'label'\n\t\t\t\t\t|| k === 'protocol'\n\t\t\t\t\t|| k === 'rpcUrl'\n\t\t\t\t) {\n\t\t\t\t\tdelete eLocal[key];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove from main by default\n\t\t\tdelete eMain[key];\n\t\t}\n\t\tcontinue;\n\t}\n\n\treturn removeUndefinedFields({ config: configFileV2, environments: environmentsV2 });\n};\n\n// FileV2 to Object\nconst transformConfigFileV2ToConfig = (configFileSetV2: ConfigFileSetV2): Config => {\n\tconst {\n\t\tconfig: configFileV2,\n\t\tenvironments: environmentFilesV2,\n\t} = configFileSetV2;\n\n\tconst environments = Object.entries(configFileV2.environments ?? {})\n\t\t.map(([k, v]) => ({\n\t\t\tkey: k,\n\t\t\tvalue: {\n\t\t\t\t...v,\n\t\t\t\t// merge in the fields from the envFile\n\t\t\t\t...environmentFilesV2[k] ?? {},\n\t\t\t} as typeof v & {\n\t\t\t\t// custom named network or sandbox\n\t\t\t\tnetworkName?: string;\n\t\t\t\tsandboxName?: string;\n\t\t\t\t// Known network/sandbox fields\n\t\t\t\tlabel?: string;\n\t\t\t\tprotocol?: string;\n\t\t\t\trpcUrl?: string;\n\t\t\t\t// Known environment fields\n\t\t\t\tstorage?: unknown;\n\t\t\t\taliases?: unknown;\n\t\t\t},\n\t\t}));\n\n\tconst getUnknownFields = (x: typeof environments[number], structure: 'environment' | 'network' | 'sandbox') => {\n\t\tif (structure === 'environment') {\n\t\t\t// environment should only have known fields\n\t\t\treturn {};\n\t\t}\n\n\t\t// Let all the unknown fields be placed in the network or sandbox\n\t\tconst unknownFields = ((() => {\n\t\t\tconst vClone = { ...x.value } as Partial<typeof x.value>;\n\t\t\t// Remove known fields that have a known structure\n\t\t\tdelete vClone.type;\n\t\t\tdelete vClone.networkName;\n\t\t\tdelete vClone.sandboxName;\n\t\t\tdelete vClone.label;\n\t\t\tdelete vClone.rpcUrl;\n\t\t\tdelete vClone.storage;\n\t\t\tdelete vClone.aliases;\n\t\t\treturn vClone;\n\t\t})());\n\n\t\treturn unknownFields;\n\t};\n\n\tconst simpleEnvironments = environments.filter(x => x.value.type === `simple`);\n\tconst sandboxEnvironments = environments.filter(x => x.value.type === `flextesa`);\n\n\tconst config: Config = {\n\t\t// Common fields\n\t\t...((() => {\n\t\t\tconst vClone = { ...configFileV2 } as Partial<typeof configFileV2>;\n\t\t\tdelete vClone.version;\n\t\t\tdelete vClone.environmentDefault;\n\t\t\tdelete vClone.environments;\n\t\t\treturn vClone;\n\t\t})()),\n\t\t// Transformed fields\n\t\taccounts: !configFileV2.accounts\n\t\t\t? undefined\n\t\t\t: Object.fromEntries(\n\t\t\t\tObject.entries(configFileV2.accounts)\n\t\t\t\t\t.map(([k, v]) => [k, `${v.balance.amount}`]),\n\t\t\t),\n\t\tenvironment: {\n\t\t\tdefault: configFileV2.environmentDefault ?? environments[0]?.key,\n\t\t\t...Object.fromEntries(environments.map(x => [x.key, {\n\t\t\t\t// Network and sandbox\n\t\t\t\tnetworks: x.value.type !== `simple` ? [] : [\n\t\t\t\t\t// use same name as enviroment by default\n\t\t\t\t\tx.value.networkName ?? `${x.key}`,\n\t\t\t\t],\n\t\t\t\tsandboxes: x.value.type !== `flextesa` ? [] : [\n\t\t\t\t\t// use same name as enviroment by default\n\t\t\t\t\tx.value.sandboxName ?? `${x.key}`,\n\t\t\t\t],\n\t\t\t\t// Known environment fields\n\t\t\t\tstorage: x.value.storage,\n\t\t\t\taliases: x.value.aliases,\n\t\t\t\t// Unknown fields might need to be in the environment\n\t\t\t\t...getUnknownFields(x, 'environment'),\n\t\t\t}])),\n\t\t},\n\t\tnetwork: !simpleEnvironments.length\n\t\t\t? undefined\n\t\t\t: Object.fromEntries(simpleEnvironments.map(x => [x.value.networkName ?? `${x.key}`, {\n\t\t\t\tlabel: x.value.label ?? ``,\n\t\t\t\trpcUrl: x.value.rpcUrl ?? ``,\n\t\t\t\t// Unknown fields might need to be in the network or sandbox\n\t\t\t\t...getUnknownFields(x, 'network') as {},\n\t\t\t}])),\n\t\tsandbox: !sandboxEnvironments.length\n\t\t\t? undefined\n\t\t\t: Object.fromEntries(sandboxEnvironments.map(x => [x.value.sandboxName ?? `${x.key}`, {\n\t\t\t\tlabel: x.value.label ?? ``,\n\t\t\t\trpcUrl: x.value.rpcUrl ?? ``,\n\t\t\t\t// Unknown fields might need to be in the network or sandbox\n\t\t\t\t...getUnknownFields(x, 'sandbox') as {},\n\t\t\t}])),\n\t};\n\n\treturn removeUndefinedFields(config);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAaO,IAAM,8BAA8B,CAAC,iBAC3C,OAAU,aAAiC;AAC1C,MAAI,SAAS,SAAS,kBAAkB,GAAG;AA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Ae,GAAG,EAAE;AAAA,QAC7B;AAAA,QAEA,SAAS,EAAE,MAAM;AAAA,QACjB,SAAS,EAAE,MAAM;AAAA,QAEjB,GAAG,iBAAiB,GAAG,aAAa;AAAA,MACrC,CAAC,CAAC,CAAC;AAAA,IACJ;AAAA,IACA,SAAS,CAAC,mBAAmB,SAC1B,SACA,OAAO,YAAY,mBAAmB,IAAI,OAAK,CAAC,EAAE,MAAM,eAAe,GAAG,EAAE,OAAO;AAAA,MACpF,OAAO,EAAE,MAAM,SAAS;AAAA,MACxB,QAAQ,EAAE,MAAM,UAAU;AAAA,MAE1B,GAAG,iBAAiB,GAAG,SAAS;AAAA,IACjC,CAAC,CAAC,CAAC;AAAA,IACJ,SAAS,CAAC,oBAAoB,SAC3B,SACA,OAAO,YAAY,oBAAoB,IAAI,OAAK,CAAC,EAAE,MAAM,eAAe,GAAG,EAAE,OAAO;AAAA,MACrF,OAAO,EAAE,MAAM,SAAS;AAAA,MACxB,QAAQ,EAAE,MAAM,UAAU;AAAA,MAE1B,GAAG,iBAAiB,GAAG,SAAS;AAAA,IACjC,CAAC,CAAC,CAAC;AAAA,EACL;AAEA,SAAO,sBAAsB,MAAM;AACpC;","names":["k","_a"]}
|
|
1
|
+
{"version":3,"sources":["types-config-files.ts"],"sourcesContent":["import type {\n\tConfig,\n\tConfigEnvironmentFileV2,\n\tConfigFileV1,\n\tConfigFileV2,\n\tEnvironment,\n\tNetworkConfig,\n\tSandboxAccounts,\n\tSandboxConfig,\n} from '@taqueria/protocol/types';\n\nexport type ConfigFileSetV2 = {\n\tconfig: ConfigFileV2;\n\tenvironments: { [name: string]: ConfigEnvironmentFileV2 };\n};\n\nexport const readJsonFileInterceptConfig = (readJsonFile: <T>(filePath: string) => Promise<T>) =>\n\tasync <T>(filePath: string): Promise<T> => {\n\t\tif (filePath.endsWith(`.taq/config.json`)) {\n\t\t\treturn transformConfigFileV2ToConfig(await readConfigFiles(readJsonFile)(filePath)) as unknown as Promise<T>;\n\t\t}\n\n\t\treturn readJsonFile<T>(filePath);\n\t};\n\nexport const readConfigFiles = (readJsonFile: <T>(filePath: string) => Promise<T>) =>\n\tasync (configFilePath: string): Promise<ConfigFileSetV2> => {\n\t\tconst configFileObj = await readJsonFile(configFilePath);\n\n\t\tif ((configFileObj as ConfigFileV2).version !== `v2`) {\n\t\t\t// v1 - only file to load\n\t\t\tconst configFileSetV2 = transformConfigFileV1ToConfigFileSetV2(configFileObj as ConfigFileV1);\n\t\t\treturn configFileSetV2;\n\t\t}\n\n\t\t// Load env files\n\t\tconst configFileV2 = configFileObj as ConfigFileV2;\n\t\tconst envFiles = await Promise.all(\n\t\t\tObject.keys(configFileV2.environments ?? {}).map(async envName => {\n\t\t\t\ttry {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tkey: envName,\n\t\t\t\t\t\tvalue: await readJsonFile(\n\t\t\t\t\t\t\tconfigFilePath.replace(`config.json`, `config.local.${envName}.json`),\n\t\t\t\t\t\t) as ConfigEnvironmentFileV2,\n\t\t\t\t\t};\n\t\t\t\t} catch {\n\t\t\t\t\t// ignore if file could not be read (no env file)\n\t\t\t\t\treturn {};\n\t\t\t\t}\n\t\t\t}),\n\t\t);\n\n\t\treturn {\n\t\t\tconfig: configFileV2,\n\t\t\tenvironments: Object.fromEntries(envFiles.filter(x => x.value).map(x => [x.key, x.value])),\n\t\t};\n\t};\n\nexport const writeJsonFileInterceptConfig = (writeJsonFile: (filePath: string) => (data: unknown) => Promise<string>) =>\n\t(filePath: string): ((data: unknown) => Promise<string>) => {\n\t\tif (filePath.endsWith(`.taq/config.json`)) {\n\t\t\treturn (async (config: Config) => {\n\t\t\t\t// DEBUG: write original file\n\t\t\t\t// await writeJsonFile(filePath.replace(`config.json`, `config.original-${Date.now()}.json`))(config);\n\n\t\t\t\treturn await writeConfigFiles(writeJsonFile)(filePath)(transformConfigToConfigFileV2(config));\n\t\t\t}) as (data: unknown) => Promise<string>;\n\t\t}\n\n\t\treturn writeJsonFile(filePath);\n\t};\n\nexport const writeConfigFiles = (writeJsonFile: (filePath: string) => (data: unknown) => Promise<string>) =>\n\t(configFilePath: string) =>\n\t\tasync (configFileSetV2: ConfigFileSetV2) => {\n\t\t\tconst configFileResult = await writeJsonFile(configFilePath)(configFileSetV2.config);\n\n\t\t\t// write the env files\n\t\t\tawait Promise.all(\n\t\t\t\tObject.entries(configFileSetV2.environments).map(async ([envName, value]) => {\n\t\t\t\t\tawait writeJsonFile(configFilePath.replace(`config.json`, `config.local.${envName}.json`))(value);\n\t\t\t\t}),\n\t\t\t);\n\n\t\t\treturn configFileResult;\n\t\t};\n\nconst removeUndefinedFields = <T>(x: T): T => {\n\treturn JSON.parse(JSON.stringify(x)) as T;\n};\n\n/** Migrate FileV1 to FileV2\n *\n * NOTE: Although this is nearly identical to transformConfigToConfigFileV2\n * This function should be sealed while the transformConfigToConfigFileV2\n * will change iteratively to become more like V2\n */\nexport const transformConfigFileV1ToConfigFileSetV2 = (configFileV1: ConfigFileV1): ConfigFileSetV2 => {\n\tconst config = configFileV1;\n\tconst configFileV2: ConfigFileV2 = {\n\t\tversion: `v2`,\n\t\tlanguage: config.language,\n\t\tmetadata: config.metadata,\n\t\tartifactsDir: config.artifactsDir,\n\t\tcontractsDir: config.contractsDir,\n\t\taccounts: !config.accounts\n\t\t\t? undefined\n\t\t\t: Object.fromEntries(\n\t\t\t\tObject.entries(config.accounts)\n\t\t\t\t\t.map(([k, v]) => [k, { balance: { amount: v, units: `mutez` } }]),\n\t\t\t),\n\t\tcontracts: config.contracts,\n\t\tenvironmentDefault: config.environment?.default as string,\n\t\tenvironments: Object.fromEntries(\n\t\t\tObject.entries(config.environment ?? {})\n\t\t\t\t.filter(([k, v]) => k !== `default`)\n\t\t\t\t.map(([k, v]) => [k, v] as [string, Environment])\n\t\t\t\t.map(([k, v]) => [k, {\n\t\t\t\t\t// Known fields\n\t\t\t\t\ttype: v.sandboxes.length ? `flextesa` : `simple`,\n\t\t\t\t\t// Unknown fields\n\t\t\t\t\t...((() => {\n\t\t\t\t\t\tconst vClone = { ...v } as Partial<typeof v> & ConfigEnvironmentFileV2;\n\t\t\t\t\t\tdelete vClone.networks;\n\t\t\t\t\t\tdelete vClone.sandboxes;\n\t\t\t\t\t\tdelete vClone.aliases;\n\t\t\t\t\t\tif (v.aliases) vClone.contracts = v.aliases;\n\n\t\t\t\t\t\tif (v.sandboxes?.[0]) {\n\t\t\t\t\t\t\tconst sandboxName = v.sandboxes[0];\n\t\t\t\t\t\t\tif (config.sandbox?.[sandboxName].accounts) {\n\t\t\t\t\t\t\t\tconst accountsClone = { ...config.sandbox[sandboxName].accounts };\n\t\t\t\t\t\t\t\tdelete accountsClone['default'];\n\t\t\t\t\t\t\t\tvClone.accounts = accountsClone as SandboxAccounts;\n\n\t\t\t\t\t\t\t\tif (config.sandbox?.[sandboxName]?.accounts?.['default']) {\n\t\t\t\t\t\t\t\t\tvClone.accountDefault = config.sandbox?.[sandboxName]?.accounts?.['default'] as string;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn vClone;\n\t\t\t\t\t})()),\n\t\t\t\t\t// Preserve sandbox or network name\n\t\t\t\t\tnetworkName: v.networks[0],\n\t\t\t\t\tsandboxName: v.sandboxes[0],\n\t\t\t\t\t// Fields from the first sandbox or network (there should be only 1)\n\t\t\t\t\t// These overwrite fields in environment\n\t\t\t\t\t...[\n\t\t\t\t\t\t...v.networks.map(k => config.network?.[k]),\n\t\t\t\t\t\t...v.sandboxes.map(k => {\n\t\t\t\t\t\t\tconst retval = { ...config.sandbox?.[k] };\n\t\t\t\t\t\t\tdelete retval['accounts'];\n\t\t\t\t\t\t\treturn retval;\n\t\t\t\t\t\t}),\n\t\t\t\t\t][0] as {},\n\t\t\t\t}]),\n\t\t),\n\t\tplugins: config.plugins,\n\t};\n\n\t// It is fine to leave everything in the main config V2 file since it will be parsed either way\n\tconst environmentsV2 = {};\n\treturn removeUndefinedFields({ config: configFileV2, environments: environmentsV2 });\n};\n\n// Object to FileV2\nexport const transformConfigToConfigFileV2 = (config: Config): ConfigFileSetV2 => {\n\tconst environmentsV2Raw = Object.fromEntries(\n\t\tObject.entries(config.environment)\n\t\t\t.filter(([k]) => k !== `default`)\n\t\t\t.map(([k, v]) => [k, v] as [string, Environment])\n\t\t\t.map(([k, v]) => [k, {\n\t\t\t\t// Known fields\n\t\t\t\ttype: v.sandboxes.length ? `flextesa` : `simple`,\n\t\t\t\t// Unknown fields\n\t\t\t\t...((() => {\n\t\t\t\t\tconst vClone = { ...v } as Partial<typeof v> & ConfigEnvironmentFileV2;\n\t\t\t\t\tdelete vClone.networks;\n\t\t\t\t\tdelete vClone.sandboxes;\n\t\t\t\t\tdelete vClone.aliases;\n\t\t\t\t\tif (v.aliases) vClone.contracts = v.aliases;\n\n\t\t\t\t\tif (v.sandboxes?.[0]) {\n\t\t\t\t\t\tconst sandboxName = v.sandboxes[0];\n\t\t\t\t\t\tif (config.sandbox?.[sandboxName]?.accounts) {\n\t\t\t\t\t\t\tconst accountsClone = { ...config.sandbox[sandboxName].accounts };\n\t\t\t\t\t\t\tdelete accountsClone['default'];\n\t\t\t\t\t\t\tvClone.accounts = accountsClone as SandboxAccounts;\n\n\t\t\t\t\t\t\tif (config.sandbox[sandboxName].accounts?.['default']) {\n\t\t\t\t\t\t\t\tvClone.accountDefault = config.sandbox[sandboxName].accounts?.['default'] as string;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn vClone;\n\t\t\t\t})()),\n\t\t\t\t// Preserve sandbox or network name\n\t\t\t\tnetworkName: v.networks[0],\n\t\t\t\tsandboxName: v.sandboxes[0],\n\t\t\t\t// Fields from the first sandbox or network (there should be only 1)\n\t\t\t\t// These overwrite fields in environment\n\t\t\t\t...[\n\t\t\t\t\t...v.networks.map(k => config.network?.[k]),\n\t\t\t\t\t...v.sandboxes.map(k => {\n\t\t\t\t\t\tconst retval = { ...config.sandbox?.[k] };\n\t\t\t\t\t\tdelete retval['accounts'];\n\t\t\t\t\t\treturn retval;\n\t\t\t\t\t}),\n\t\t\t\t][0] as {},\n\t\t\t}]),\n\t);\n\n\tconst configFileV2: ConfigFileV2 = {\n\t\tversion: `v2`,\n\t\tlanguage: config.language,\n\t\tmetadata: config.metadata,\n\t\tartifactsDir: config.artifactsDir,\n\t\tcontractsDir: config.contractsDir,\n\t\taccounts: !config.accounts\n\t\t\t? undefined\n\t\t\t: Object.fromEntries(\n\t\t\t\tObject.entries(config.accounts)\n\t\t\t\t\t.map(([k, v]) => [k, { balance: { amount: v, units: `mutez` } }]),\n\t\t\t),\n\t\tcontracts: config.contracts,\n\t\tenvironmentDefault: config.environment.default as string,\n\t\tenvironments: environmentsV2Raw,\n\t\tplugins: config.plugins,\n\t};\n\n\t// extract local only fields to environment specific files\n\t// This should only include fields that the environment plugin will replace if missing\n\t// This is providing a default implementation for a few known environments\n\tconst environmentsV2 = {} as ConfigFileSetV2['environments'];\n\n\tfor (const [envName, eMain] of Object.entries(configFileV2.environments ?? {})) {\n\t\t// clone eMain and delete fields from either main config or local env config\n\t\tconst eLocal = environmentsV2[envName] = { ...eMain };\n\n\t\tfor (const k of Object.keys(eMain)) {\n\t\t\tconst key = k as keyof typeof eMain;\n\n\t\t\tif (key === `type`) {\n\t\t\t\tdelete eLocal[key];\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Everything except label and protocol is local for sandbox\n\t\t\tif (eMain.type === 'flextesa') {\n\t\t\t\tif (\n\t\t\t\t\tk === 'label'\n\t\t\t\t\t|| k === 'protocol'\n\t\t\t\t) {\n\t\t\t\t\tdelete eLocal[key];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// For simple networks, keep the rpcUrl also\n\t\t\tif (eMain.type === 'simple') {\n\t\t\t\tif (\n\t\t\t\t\tk === 'label'\n\t\t\t\t\t|| k === 'protocol'\n\t\t\t\t\t|| k === 'rpcUrl'\n\t\t\t\t) {\n\t\t\t\t\tdelete eLocal[key];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (k == 'aliases') {\n\t\t\t\teLocal['contracts'] = Object.entries(eLocal[key] ?? {}).reduce(\n\t\t\t\t\t(retval, [key, value]) => ({\n\t\t\t\t\t\t...retval,\n\t\t\t\t\t\t[key]: value,\n\t\t\t\t\t}),\n\t\t\t\t\t{},\n\t\t\t\t);\n\t\t\t\tdelete eLocal[key];\n\t\t\t}\n\n\t\t\t// Remove from main by default\n\t\t\tdelete eMain[key];\n\t\t}\n\t\tcontinue;\n\t}\n\n\treturn removeUndefinedFields({ config: configFileV2, environments: environmentsV2 });\n};\n\n// FileV2 to Object\nexport const transformConfigFileV2ToConfig = (configFileSetV2: ConfigFileSetV2): Config => {\n\tconst {\n\t\tconfig: configFileV2,\n\t\tenvironments: environmentFilesV2,\n\t} = configFileSetV2;\n\n\tconst environments = Object.entries(configFileV2.environments ?? {})\n\t\t.map(([k, v]) => ({\n\t\t\tkey: k,\n\t\t\tvalue: {\n\t\t\t\t...v,\n\t\t\t\t// merge in the fields from the envFile\n\t\t\t\t...environmentFilesV2[k] ?? {},\n\t\t\t} as typeof v & {\n\t\t\t\t// custom named network or sandbox\n\t\t\t\tnetworkName?: string;\n\t\t\t\tsandboxName?: string;\n\t\t\t\t// Known network/sandbox fields\n\t\t\t\tlabel?: string;\n\t\t\t\tprotocol?: string;\n\t\t\t\trpcUrl?: string;\n\t\t\t\t// Known environment fields\n\t\t\t\tstorage?: unknown;\n\t\t\t\taliases?: unknown;\n\t\t\t},\n\t\t}));\n\n\tconst getUnknownFields = (x: typeof environments[number], structure: 'environment' | 'network' | 'sandbox') => {\n\t\tif (structure === 'environment') {\n\t\t\t// environment should only have known fields\n\t\t\treturn {};\n\t\t}\n\n\t\t// Let all the unknown fields be placed in the network or sandbox\n\t\tconst unknownFields = ((() => {\n\t\t\tconst vClone = { ...x.value } as Partial<typeof x.value>;\n\t\t\t// Remove known fields that have a known structure\n\t\t\tdelete vClone.type;\n\t\t\tdelete vClone.networkName;\n\t\t\tdelete vClone.sandboxName;\n\t\t\tdelete vClone.label;\n\t\t\tdelete vClone.rpcUrl;\n\t\t\tdelete vClone.storage;\n\t\t\tdelete vClone.aliases;\n\t\t\tdelete vClone.contracts;\n\t\t\tdelete vClone.accounts;\n\t\t\treturn vClone;\n\t\t})());\n\n\t\treturn unknownFields;\n\t};\n\n\tconst simpleEnvironments = environments.filter(x => x.value.type === `simple`);\n\tconst sandboxEnvironments = environments.filter(x => x.value.type === `flextesa`);\n\n\tconst config: Config = {\n\t\t// Common fields\n\t\t...((() => {\n\t\t\tconst vClone = { ...configFileV2 } as Partial<typeof configFileV2>;\n\t\t\tdelete vClone.version;\n\t\t\tdelete vClone.environmentDefault;\n\t\t\tdelete vClone.environments;\n\t\t\treturn vClone;\n\t\t})()),\n\t\t// Transformed fields\n\t\taccounts: !configFileV2.accounts\n\t\t\t? undefined\n\t\t\t: Object.fromEntries(\n\t\t\t\tObject.entries(configFileV2.accounts)\n\t\t\t\t\t.map(([k, v]) => [k, `${v.balance.amount}`]),\n\t\t\t),\n\t\tenvironment: {\n\t\t\tdefault: configFileV2.environmentDefault ?? environments[0]?.key,\n\t\t\t...Object.fromEntries(environments.map(x => [x.key, {\n\t\t\t\t// Network and sandbox\n\t\t\t\tnetworks: x.value.type !== `simple` ? [] : [\n\t\t\t\t\t// use same name as enviroment by default\n\t\t\t\t\tx.value.networkName ?? `${x.key}`,\n\t\t\t\t],\n\t\t\t\tsandboxes: x.value.type !== `flextesa` ? [] : [\n\t\t\t\t\t// use same name as enviroment by default\n\t\t\t\t\tx.value.sandboxName ?? `${x.key}`,\n\t\t\t\t],\n\t\t\t\t// Known environment fields\n\t\t\t\tstorage: x.value.storage,\n\t\t\t\taliases: x.value.contracts,\n\t\t\t\t// Unknown fields might need to be in the environment\n\t\t\t\t...getUnknownFields(x, 'environment'),\n\t\t\t}])),\n\t\t},\n\t\tnetwork: !simpleEnvironments.length\n\t\t\t? undefined\n\t\t\t: Object.fromEntries(simpleEnvironments.map(x => [x.value.networkName ?? `${x.key}`, {\n\t\t\t\tlabel: x.value.label ?? ``,\n\t\t\t\trpcUrl: x.value.rpcUrl ?? ``,\n\t\t\t\t// Unknown fields might need to be in the network or sandbox\n\t\t\t\t...getUnknownFields(x, 'network') as {},\n\t\t\t\t...(() => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\taccounts: x.value.accounts,\n\t\t\t\t\t};\n\t\t\t\t})(),\n\t\t\t}])) as Record<string, NetworkConfig>,\n\t\tsandbox: !sandboxEnvironments.length\n\t\t\t? undefined\n\t\t\t: Object.fromEntries(sandboxEnvironments.map(x => [x.value.sandboxName ?? `${x.key}`, {\n\t\t\t\tlabel: x.value.label ?? ``,\n\t\t\t\trpcUrl: x.value.rpcUrl ?? ``,\n\t\t\t\t// Unknown fields might need to be in the network or sandbox\n\t\t\t\t...getUnknownFields(x, 'sandbox') as {},\n\t\t\t\t...(() => {\n\t\t\t\t\tconst environment = x.value;\n\t\t\t\t\tif (environment && environment.accounts) {\n\t\t\t\t\t\treturn environment.accountDefault\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\taccounts: {\n\t\t\t\t\t\t\t\t\t...environment.accounts,\n\t\t\t\t\t\t\t\t\tdefault: environment.accountDefault,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\taccounts: {\n\t\t\t\t\t\t\t\t\t...environment.accounts,\n\t\t\t\t\t\t\t\t\tdefault: Object.keys(environment.accounts)[0],\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\treturn {};\n\t\t\t\t})(),\n\t\t\t}])) as Record<string, SandboxConfig>,\n\t};\n\n\treturn removeUndefinedFields(config);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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,SACA,OAAO,YAAY,oBAAoB,IAAI,OAAE;AA/YlD,UAAAJ,KAAAC,KAAAG;AA+YqD,eAACJ,MAAA,EAAE,MAAM,gBAAR,OAAAA,MAAuB,GAAG,EAAE,OAAO;AAAA,QACrF,QAAOC,MAAA,EAAE,MAAM,UAAR,OAAAA,MAAiB;AAAA,QACxB,SAAQG,MAAA,EAAE,MAAM,WAAR,OAAAA,MAAkB;AAAA,QAE1B,GAAG,iBAAiB,GAAG,SAAS;AAAA,QAChC,IAAI,MAAM;AACT,gBAAM,cAAc,EAAE;AACtB,cAAI,eAAe,YAAY,UAAU;AACxC,mBAAO,YAAY,iBAChB;AAAA,cACD,UAAU;AAAA,gBACT,GAAG,YAAY;AAAA,gBACf,SAAS,YAAY;AAAA,cACtB;AAAA,YACD,IACE;AAAA,cACD,UAAU;AAAA,gBACT,GAAG,YAAY;AAAA,gBACf,SAAS,OAAO,KAAK,YAAY,QAAQ,EAAE;AAAA,cAC5C;AAAA,YACD;AAAA,UACF;AACA,iBAAO,CAAC;AAAA,QACT,GAAG;AAAA,MACJ,CAAC;AAAA,KAAC,CAAC;AAAA,EACL;AAEA,SAAO,sBAAsB,MAAM;AACpC;","names":["_a","_b","k","key","_c"]}
|
package/types.d.ts
CHANGED
|
@@ -324,6 +324,10 @@ export type ConfigFileV2 = {
|
|
|
324
324
|
environments?: Record<string, ConfigEnvironmentFileV2>;
|
|
325
325
|
plugins?: InstalledPlugin[];
|
|
326
326
|
};
|
|
327
|
+
/** Account overrides for this environment */
|
|
328
|
+
export type SandboxAccounts = Record<string, {
|
|
329
|
+
type?: string;
|
|
330
|
+
}>;
|
|
327
331
|
export type ConfigEnvironmentFileV2 = {
|
|
328
332
|
/** environment types provided by plugins
|
|
329
333
|
*
|
|
@@ -332,10 +336,8 @@ export type ConfigEnvironmentFileV2 = {
|
|
|
332
336
|
* annotations provides plugin specific data like rpcUrl
|
|
333
337
|
*/
|
|
334
338
|
type?: string;
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
type?: string;
|
|
338
|
-
}>;
|
|
339
|
+
accounts?: SandboxAccounts;
|
|
340
|
+
accountDefault?: keyof SandboxAccounts;
|
|
339
341
|
/** Contract deployment data for this environment */
|
|
340
342
|
contracts?: Record<string, {
|
|
341
343
|
address?: string;
|
package/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAEA,mBAAmB;AACnB,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC;AAEpC,0BAA0B;AAC1B,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC;AAExC,8BAA8B;AAC9B,MAAM,MAAM,IAAI,GAAG,cAAc,CAAC;AAElC,MAAM,MAAM,KAAK,GAAG,CAAC,IAAI,GAAG,UAAU,CAAC,CAAC;AAExC,0CAA0C;AAC1C,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC;AAErD,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAE9C,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC;AAE3C,MAAM,MAAM,QAAQ,GAAG;IACtB,OAAO,EAAE,QAAQ,GAAG,SAAS,GAAG,aAAa,CAAC;CAC9C,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B;;8BAE8B;AAC9B,MAAM,MAAM,EAAE,GAAG,cAAc,CAAC;AAEhC;;iCAEiC;AACjC,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC;AAE3C,kBAAkB;AAClB,MAAM,MAAM,GAAG,GAAG,cAAc,CAAC;AAIjC,kFAAkF;AAClF,MAAM,MAAM,OAAO,GAAG,cAAc,CAAC;AAErC,MAAM,MAAM,MAAM,GAAG;IACpB,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,IAAI,CAAC;IACX,WAAW,EAAE,cAAc,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM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F,MAAM,MAAM,oBAAoB,GAAG;IAClC,YAAY,EAAE,cAAc,CAAC;IAC7B,aAAa,EAAE,aAAa,CAAC;IAC7B,SAAS,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC3B,KAAK,EAAE,cAAc,CAAC;IACtB,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,MAAM,CAAC,EAAE,IAAI,CAAC;IAMd,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,GAAG,cAAc,CAAC,CAAC;IAEjE,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG;IACpD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,GAAG,cAAc,CAAC,CAAC;CACxD,CAAC"}
|
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["types.ts"],"sourcesContent":["// ---- Simple Types & Type Fragments ----\n\n/** @minLength 1 */\nexport type NonEmptyString = string;\n\n/** @pattern ^[A-Za-z]$ */\nexport type SingleChar = NonEmptyString;\n\n/** @pattern ^[A-Za-z\\-\\ ]+ */\nexport type Verb = NonEmptyString;\n\nexport type Alias = (Verb | SingleChar);\n\n/** @pattern ^[A-Za-z]+[A-Za-z0-9-_ ]*$ */\nexport type HumanReadableIdentifier = NonEmptyString;\n\nexport type SanitizedAbsPath = NonEmptyString;\n\nexport type SanitizedPath = NonEmptyString;\n\nexport type Settings = {\n\tconsent: 'opt_in' | 'opt_out' | 'unspecified';\n};\n\n/**\n * @minimum 1651846877\n * @integer\n */\nexport type Timestamp = number;\n\n/**\n * @minLength 1\n * @pattern ^\\d([\\d_]+\\d)?$ */\nexport type Tz = NonEmptyString;\n\n/**\n * @minLength 1\n * @pattern ^\\d+\\.\\d+(\\.\\d+)*$ */\nexport type VersionNumber = NonEmptyString;\n\n/** @format url */\nexport type Url = NonEmptyString;\n\n// ---- Plugin Definition Types ----\n\n/** interpreted using yargs @pattern ^([A-Za-z-_ ]+ ?)((\\[.+\\] ?)|(\\<.+\\>) ?)*$ */\nexport type Command = NonEmptyString;\n\nexport type Option = {\n\tshortFlag?: SingleChar;\n\tflag: Verb;\n\tdescription: NonEmptyString;\n\tdefaultValue?: string | number | boolean;\n\ttype?: 'string' | 'number' | 'boolean';\n\trequired?: boolean;\n\tboolean?: boolean;\n\tchoices?: NonEmptyString[];\n};\n\nexport type PositionalArg = {\n\tplaceholder: HumanReadableIdentifier;\n\tdescription: NonEmptyString;\n\tdefaultValue?: string | number | boolean;\n\ttype?: 'string' | 'number' | 'boolean';\n\trequired?: boolean;\n};\n\nexport type InstalledPlugin = {\n\ttype: 'npm' | 'binary' | 'deno';\n\tname: NonEmptyString;\n};\n\nexport type Operation = {\n\toperation: Verb;\n\tcommand: Command;\n\tdescription?: NonEmptyString;\n\tpositionals?: PositionalArg[];\n\toptions?: Option[];\n\thandler?: (args: PersistentState) => (args: RequestArgs) => void;\n};\n\nexport type ParsedOperation = Omit<Operation, 'handler'>;\n\nexport type Template = {\n\ttemplate: Verb;\n\tcommand: Command;\n\tdescription: NonEmptyString;\n\thidden?: boolean;\n\toptions?: Option[];\n\tpositionals?: PositionalArg[];\n\thandler: TemplateHandler;\n\tencoding?: PluginResponseEncoding;\n};\n\ntype TemplateHandler =\n\t| NonEmptyString // TODO: should this be Verb?\n\t| ((args: RequestArgs) =>\n\t\t| PluginJsonResponse\n\t\t| Promise<PluginJsonResponse>)\n\t| Promise<void>;\n\nexport type ParsedTemplate = Omit<Template, 'handler'> & {\n\thandler: string;\n};\n\ntype PluginSchemaBase = {\n\tname: NonEmptyString;\n\tversion: VersionNumber;\n\tschema: VersionNumber;\n\talias: Alias;\n\ttasks?: Task[];\n};\n\nexport type PluginInfo = PluginSchemaBase & {\n\toperations?: ParsedOperation[];\n\ttemplates?: ParsedTemplate[];\n};\n\nexport type PluginSchema = PluginSchemaBase & {\n\toperations?: Operation[];\n\ttemplates?: Template[];\n\tproxy?: (args: RequestArgs) => Promise<PluginProxyResponse>;\n\tcheckRuntimeDependencies?: (args: RequestArgs) => Promise<PluginDependenciesResponse>;\n\tinstallRuntimeDependencies?: (args: RequestArgs) => Promise<PluginDependenciesResponse>;\n};\n\nexport type Task = {\n\ttask: Verb;\n\tcommand: Command;\n\taliases?: Alias[];\n\t/** @minLength 3 */\n\tdescription?: NonEmptyString;\n\texample?: NonEmptyString;\n\thidden?: boolean;\n\tencoding?: PluginResponseEncoding;\n\thandler: 'proxy' | NonEmptyString;\n\toptions?: Option[];\n\tpositionals?: PositionalArg[];\n};\n\n// ---- Process Interop ----\n\nexport type RuntimeDependency = {\n\tname: HumanReadableIdentifier;\n\tpath: string;\n\tversion: string;\n\tkind: 'required' | 'optional';\n};\n\nexport type RuntimeDependencyReport = RuntimeDependency & {\n\tmet: boolean;\n};\n\nexport type PluginDependenciesResponse = {\n\treport: RuntimeDependencyReport[];\n};\n\nexport type PluginJsonResponse = {\n\tdata?: unknown;\n\n\t/** @default none */\n\trender: 'none' | 'table' | 'string';\n} | void;\n\nexport type PluginProxyResponse = void | PluginJsonResponse;\n\n/** @default none */\nexport type PluginResponseEncoding = 'none' | 'json' | 'application/json';\n\n/**\n * @min 100\n */\nexport type BuildNumber = number;\n\nexport type SanitizedArgs = {\n\t_: string[];\n\tprojectDir: SanitizedPath;\n\tmaxConcurrency: number;\n\tdebug: boolean;\n\tdisableState: boolean;\n\tlogPluginRequests: boolean;\n\tfromVsCode: boolean;\n\tversion: boolean;\n\tbuild: boolean;\n\thelp: boolean;\n\tyes: boolean;\n\tplugin?: NonEmptyString;\n\tenv: NonEmptyString;\n\tquickstart: NonEmptyString;\n\tsetBuild: NonEmptyString | BuildNumber;\n\tsetVersion: NonEmptyString;\n};\n\nexport type PluginActionName =\n\t| 'proxy'\n\t| 'pluginInfo'\n\t| 'checkRuntimeDependencies'\n\t| 'installRuntimeDependencies'\n\t| 'proxyTemplate';\n\nexport type RequestArgs = Omit<SanitizedArgs, 'quickstart'> & {\n\ttaqRun: PluginActionName;\n\t// TODO: JSON.parse if string\n\tconfig: LoadedConfig;\n};\n\nexport type ProxyTaskArgs = RequestArgs & {\n\ttask: NonEmptyString;\n};\n\nexport type ProxyTemplateArgs = RequestArgs & {\n\ttemplate: NonEmptyString;\n};\n\n// ---- Hash Types ----\n\n/** @min 1 */\nexport type EconomicalProtocolHash = string;\n\n/** @pattern ^tz\\d[A-Za-z0-9]{33}$ */\nexport type PublicKeyHash = string;\n\n/** @pattern ^[A-Fa-f0-9]{64}$ */\nexport type SHA256 = string;\n\n// ---- Contract Objects ----\n\nexport type Contract = {\n\tsourceFile: NonEmptyString;\n\thash: SHA256;\n};\n\nexport type Faucet = {\n\tpkh: PublicKeyHash;\n\tmnemonic: string[];\n\t/** @format email */\n\temail: string;\n\tpassword: string;\n\t/** @pattern ^\\d+$ */\n\tamount: string;\n\tactivation_code: string;\n};\n\n// ---- External ----\n\n/** Port number for postgresql container\n * @default 5432\n */\ntype TzKtConfigPostgresqlPort = number;\n\n/** Port number for TzKt API\n * @default 5000\n */\ntype TzKtConfigApiPort = number;\n\nexport type TzKtConfig = {\n\t/** Do not start TzKt when sandbox starts */\n\tdisableAutostartWithSandbox?: boolean;\n\tpostgresqlPort?: TzKtConfigPostgresqlPort;\n\tapiPort?: TzKtConfigApiPort;\n};\n\n// ---- Project Files ----\n\nexport type EphemeralState = {\n\tbuild: string;\n\tconfigHash: string;\n\n\t// Note: these were changed from a union(either type) to intersection(both types): i.e. InstalledPlugin | Task is not correct\n\n\t/** Task/Plugin Mapping */\n\ttasks: Record<string, InstalledPlugin & Task>;\n\t/** Operation/Plugin Mapping */\n\toperations: Record<string, InstalledPlugin & ParsedOperation>;\n\t/** Templates/Plugin Mapping */\n\ttemplates: Record<string, InstalledPlugin & ParsedTemplate>;\n\n\tplugins: PluginInfo[];\n};\n\nexport type PersistentState = {\n\toperations: Record<string, PersistedOperation>;\n\ttasks: Record<string, PersistedTask>;\n};\n\nexport type PersistedTask = {\n\ttask: Verb;\n\tplugin: NonEmptyString;\n\ttime: Timestamp;\n\toutput?: unknown;\n};\n\nexport type PersistedOperation = {\n\thash: SHA256;\n\ttime: Timestamp;\n\toutput?: unknown;\n};\n\n/**\n * @minLength 1\n * @pattern ^[A-Za-z0-9]+[A-Za-z0-9-_]+\\.[A-Za-z0-9]+[A-Za-z0-9-_]+\\.[A-Za-z0-9]+[A-Za-z0-9-_]+$\n */\nexport type ProvisionerID = string;\n\nexport type Provisioner = {\n\tid: ProvisionerID;\n\tplugin: NonEmptyString;\n\toperation: NonEmptyString | 'custom';\n\tcommand?: string;\n\tlabel?: string;\n\tdepends_on?: ProvisionerID[];\n};\n\nexport type Provisions = Provisioner[];\n\n// ---- Project Files: Config ----\n\nexport type Environment = {\n\tnetworks: NonEmptyString[];\n\tsandboxes: NonEmptyString[];\n\tstorage?: Record<string, NonEmptyString>;\n\taliases?: Record<string, Record<string, NonEmptyString>>;\n};\n\n/** @minLength 1 Default environment must reference the name of an existing environment.*/\ntype EnvironmentName = NonEmptyString;\n\n/** @default en */\ntype HumanLanguage = 'en' | 'fr';\n\n/**\n * @default contracts\n * @minLength 1\n */\nexport type ConfigContractsDir = string;\n\n/**\n * @default artifacts\n * @minLength 1\n */\nexport type ConfigArtifactsDir = string;\n\nexport type ConfigAccount = {\n\tbalance: CurrencyAmountV2;\n};\n\n// Incrementally Convert from ConfigFileV1 to ConfigFileV2\n// 1. A wrapper will load/save the ConfigFileV2 and convert it to this Config runtime type (which is initially the same as ConfigFileV1)\n// 2. This type will be modified incrementally as the implementation uses the new type structure\n// - The new schema definitions will be used immediately in the file system\n// - Current implementation works the same\n// - This decouples the schema change from implementation changes and unblocks the development team\nexport type Config = {\n\t// same\n\tlanguage?: HumanLanguage;\n\tmetadata?: MetadataConfig;\n\tartifactsDir?: ConfigArtifactsDir;\n\tcontractsDir?: ConfigContractsDir;\n\tcontracts?: Record<string, Contract>;\n\tplugins?: InstalledPlugin[];\n\n\t// to change\n\taccounts?: Record<string, Tz>;\n\t// accounts?: Record<string, ConfigAccount>;\n\n\t// to change\n\tenvironment: Record<string, Environment | EnvironmentName>;\n\t// environments?: Record<string, ConfigFileEnvironmentV2>;\n\n\t// to remove\n\tnetwork?: Record<string, NetworkConfig>;\n\t// to remove\n\tsandbox?: Record<string, SandboxConfig>;\n};\n\n// This is the original Config and is retained to support auto migration of files\nexport type ConfigFileV1 = {\n\tlanguage?: HumanLanguage;\n\tplugins?: InstalledPlugin[];\n\tcontractsDir?: ConfigContractsDir;\n\tartifactsDir?: ConfigArtifactsDir;\n\tnetwork?: Record<string, NetworkConfig>;\n\tsandbox?: Record<string, SandboxConfig>;\n\n\t// TODO: This causes a type conflict and is not supported\n\t// accounts?: {\n\t// \tdefault: EnvironmentName;\n\t// } & Record<string, Environment>;\n\tenvironment?: Record<string, Environment | EnvironmentName>;\n\taccounts?: Record<string, Tz>;\n\tcontracts?: Record<string, Contract>;\n\tmetadata?: MetadataConfig;\n};\n\nexport type CurrencyAmountV2 = {\n\tamount: string;\n\tunits: string;\n};\n\n/**\n * Workaround: zod won`t support VersionV2 = `v2`\n * @pattern ^v2$\n */\ntype VersionV2 = string;\n\nexport type ConfigFileV2 = {\n\tversion: VersionV2;\n\tlanguage?: HumanLanguage;\n\tmetadata?: MetadataConfig;\n\tartifactsDir?: ConfigArtifactsDir;\n\tcontractsDir?: ConfigContractsDir;\n\n\t/** Declared accounts */\n\taccounts?: Record<string, ConfigAccount>;\n\n\tcontracts?: Record<string, Contract>;\n\n\t/** The default environment key */\n\tenvironmentDefault?: EnvironmentName;\n\n\t/** Environments\n\t *\n\t * An environment represents a unique context on a network with its own account instances and contracts.\n\t *\n\t * The environment implementation is provided by a plugin which enables network control, account management, and contract interaction.\n\t *\n\t * Example environment types:\n\t *\n\t * - a sandbox running locally (using flextesa and taquito plugin)\n\t * - teztnets.xyz (using taquito plugin)\n\t * - mainnet (using taquito plugin with a custom rpcUrl)\n\t *\n\t * The environment implementation also implements the account types that are supported by that environmentType:\n\t *\n\t * - flextesa\n\t * - in-memory signer\n\t * - mainnet\n\t * - beacon wallet\n\t * - multi-sig\n\t *\n\t * Using the above as an example, the flextesa sandbox only needs an in-memory signer since it generates it's own accounts,\n\t * but mainnet might support something like a beacon wallet or a multi-sig account.\n\t */\n\tenvironments?: Record<string, ConfigEnvironmentFileV2>;\n\n\tplugins?: InstalledPlugin[];\n};\n\nexport type ConfigEnvironmentFileV2 = {\n\t/** environment types provided by plugins\n\t *\n\t * Examples: flextesa, teztnet, mainnet\n\t *\n\t * annotations provides plugin specific data like rpcUrl\n\t */\n\ttype?: string;\n\n\t/** Account overrides for this environment */\n\taccounts?: Record<string, {\n\t\ttype?: string;\n\t}>;\n\n\t/** Contract deployment data for this environment */\n\tcontracts?: Record<string, {\n\t\taddress?: string;\n\t}>;\n\t// Other fields may exist, but they are not type checked here\n\t// It is expected that this will be cast to a more specific type\n\t// by the plugin to access the additional fields\n};\n\n// TODO: sandbox breaks ts-to-zod\nexport type LoadedConfig = Config & {\n\tprojectDir: SanitizedAbsPath;\n\tconfigFile: SanitizedAbsPath;\n\thash: SHA256;\n};\n\nexport type MetadataConfig = {\n\tname?: string;\n\tprojectDescription?: string;\n\tauthors?: string[];\n\tlicense?: string;\n\thomepage?: string;\n};\n\nexport type NetworkConfig = {\n\tlabel: HumanReadableIdentifier;\n\trpcUrl: Url;\n\taccounts?: Record<string, NetworkAccountConfig>;\n\tfaucet?: Faucet;\n};\n\nexport type NetworkAccountConfig = {\n\tpublicKey?: NonEmptyString;\n\tpublicKeyHash?: PublicKeyHash;\n\tprivateKey?: NonEmptyString; /** TODO: Should this be secretKey: @see {SandboxAccountConfig} */\n\tmnemonic?: NonEmptyString;\n};\n\nexport type SandboxAccountConfig = {\n\tencryptedKey: NonEmptyString;\n\tpublicKeyHash: PublicKeyHash;\n\tsecretKey: NonEmptyString;\n};\n\nexport type SandboxConfig = {\n\tlabel: NonEmptyString;\n\trpcUrl: Url;\n\tprotocol?: EconomicalProtocolHash;\n\tplugin?: Verb;\n\n\t// TODO: This causes a type conflict and is not supported\n\t// accounts?: {\n\t// \tdefault: NonEmptyString;\n\t// } & Record<string, SandboxAccountConfig>;\n\taccounts?: Record<string, SandboxAccountConfig | NonEmptyString>;\n\n\ttzkt?: TzKtConfig;\n\tannotations?: Record<string, unknown>;\n};\n\nexport type ScaffoldConfig = {\n\tpostInit?: string;\n};\n\nexport type ParsedConfig = Omit<Config, 'sandbox'> & {\n\tsandbox: Record<string, SandboxConfig | NonEmptyString>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["types.ts"],"sourcesContent":["// ---- Simple Types & Type Fragments ----\n\n/** @minLength 1 */\nexport type NonEmptyString = string;\n\n/** @pattern ^[A-Za-z]$ */\nexport type SingleChar = NonEmptyString;\n\n/** @pattern ^[A-Za-z\\-\\ ]+ */\nexport type Verb = NonEmptyString;\n\nexport type Alias = (Verb | SingleChar);\n\n/** @pattern ^[A-Za-z]+[A-Za-z0-9-_ ]*$ */\nexport type HumanReadableIdentifier = NonEmptyString;\n\nexport type SanitizedAbsPath = NonEmptyString;\n\nexport type SanitizedPath = NonEmptyString;\n\nexport type Settings = {\n\tconsent: 'opt_in' | 'opt_out' | 'unspecified';\n};\n\n/**\n * @minimum 1651846877\n * @integer\n */\nexport type Timestamp = number;\n\n/**\n * @minLength 1\n * @pattern ^\\d([\\d_]+\\d)?$ */\nexport type Tz = NonEmptyString;\n\n/**\n * @minLength 1\n * @pattern ^\\d+\\.\\d+(\\.\\d+)*$ */\nexport type VersionNumber = NonEmptyString;\n\n/** @format url */\nexport type Url = NonEmptyString;\n\n// ---- Plugin Definition Types ----\n\n/** interpreted using yargs @pattern ^([A-Za-z-_ ]+ ?)((\\[.+\\] ?)|(\\<.+\\>) ?)*$ */\nexport type Command = NonEmptyString;\n\nexport type Option = {\n\tshortFlag?: SingleChar;\n\tflag: Verb;\n\tdescription: NonEmptyString;\n\tdefaultValue?: string | number | boolean;\n\ttype?: 'string' | 'number' | 'boolean';\n\trequired?: boolean;\n\tboolean?: boolean;\n\tchoices?: NonEmptyString[];\n};\n\nexport type PositionalArg = {\n\tplaceholder: HumanReadableIdentifier;\n\tdescription: NonEmptyString;\n\tdefaultValue?: string | number | boolean;\n\ttype?: 'string' | 'number' | 'boolean';\n\trequired?: boolean;\n};\n\nexport type InstalledPlugin = {\n\ttype: 'npm' | 'binary' | 'deno';\n\tname: NonEmptyString;\n};\n\nexport type Operation = {\n\toperation: Verb;\n\tcommand: Command;\n\tdescription?: NonEmptyString;\n\tpositionals?: PositionalArg[];\n\toptions?: Option[];\n\thandler?: (args: PersistentState) => (args: RequestArgs) => void;\n};\n\nexport type ParsedOperation = Omit<Operation, 'handler'>;\n\nexport type Template = {\n\ttemplate: Verb;\n\tcommand: Command;\n\tdescription: NonEmptyString;\n\thidden?: boolean;\n\toptions?: Option[];\n\tpositionals?: PositionalArg[];\n\thandler: TemplateHandler;\n\tencoding?: PluginResponseEncoding;\n};\n\ntype TemplateHandler =\n\t| NonEmptyString // TODO: should this be Verb?\n\t| ((args: RequestArgs) =>\n\t\t| PluginJsonResponse\n\t\t| Promise<PluginJsonResponse>)\n\t| Promise<void>;\n\nexport type ParsedTemplate = Omit<Template, 'handler'> & {\n\thandler: string;\n};\n\ntype PluginSchemaBase = {\n\tname: NonEmptyString;\n\tversion: VersionNumber;\n\tschema: VersionNumber;\n\talias: Alias;\n\ttasks?: Task[];\n};\n\nexport type PluginInfo = PluginSchemaBase & {\n\toperations?: ParsedOperation[];\n\ttemplates?: ParsedTemplate[];\n};\n\nexport type PluginSchema = PluginSchemaBase & {\n\toperations?: Operation[];\n\ttemplates?: Template[];\n\tproxy?: (args: RequestArgs) => Promise<PluginProxyResponse>;\n\tcheckRuntimeDependencies?: (args: RequestArgs) => Promise<PluginDependenciesResponse>;\n\tinstallRuntimeDependencies?: (args: RequestArgs) => Promise<PluginDependenciesResponse>;\n};\n\nexport type Task = {\n\ttask: Verb;\n\tcommand: Command;\n\taliases?: Alias[];\n\t/** @minLength 3 */\n\tdescription?: NonEmptyString;\n\texample?: NonEmptyString;\n\thidden?: boolean;\n\tencoding?: PluginResponseEncoding;\n\thandler: 'proxy' | NonEmptyString;\n\toptions?: Option[];\n\tpositionals?: PositionalArg[];\n};\n\n// ---- Process Interop ----\n\nexport type RuntimeDependency = {\n\tname: HumanReadableIdentifier;\n\tpath: string;\n\tversion: string;\n\tkind: 'required' | 'optional';\n};\n\nexport type RuntimeDependencyReport = RuntimeDependency & {\n\tmet: boolean;\n};\n\nexport type PluginDependenciesResponse = {\n\treport: RuntimeDependencyReport[];\n};\n\nexport type PluginJsonResponse = {\n\tdata?: unknown;\n\n\t/** @default none */\n\trender: 'none' | 'table' | 'string';\n} | void;\n\nexport type PluginProxyResponse = void | PluginJsonResponse;\n\n/** @default none */\nexport type PluginResponseEncoding = 'none' | 'json' | 'application/json';\n\n/**\n * @min 100\n */\nexport type BuildNumber = number;\n\nexport type SanitizedArgs = {\n\t_: string[];\n\tprojectDir: SanitizedPath;\n\tmaxConcurrency: number;\n\tdebug: boolean;\n\tdisableState: boolean;\n\tlogPluginRequests: boolean;\n\tfromVsCode: boolean;\n\tversion: boolean;\n\tbuild: boolean;\n\thelp: boolean;\n\tyes: boolean;\n\tplugin?: NonEmptyString;\n\tenv: NonEmptyString;\n\tquickstart: NonEmptyString;\n\tsetBuild: NonEmptyString | BuildNumber;\n\tsetVersion: NonEmptyString;\n};\n\nexport type PluginActionName =\n\t| 'proxy'\n\t| 'pluginInfo'\n\t| 'checkRuntimeDependencies'\n\t| 'installRuntimeDependencies'\n\t| 'proxyTemplate';\n\nexport type RequestArgs = Omit<SanitizedArgs, 'quickstart'> & {\n\ttaqRun: PluginActionName;\n\t// TODO: JSON.parse if string\n\tconfig: LoadedConfig;\n};\n\nexport type ProxyTaskArgs = RequestArgs & {\n\ttask: NonEmptyString;\n};\n\nexport type ProxyTemplateArgs = RequestArgs & {\n\ttemplate: NonEmptyString;\n};\n\n// ---- Hash Types ----\n\n/** @min 1 */\nexport type EconomicalProtocolHash = string;\n\n/** @pattern ^tz\\d[A-Za-z0-9]{33}$ */\nexport type PublicKeyHash = string;\n\n/** @pattern ^[A-Fa-f0-9]{64}$ */\nexport type SHA256 = string;\n\n// ---- Contract Objects ----\n\nexport type Contract = {\n\tsourceFile: NonEmptyString;\n\thash: SHA256;\n};\n\nexport type Faucet = {\n\tpkh: PublicKeyHash;\n\tmnemonic: string[];\n\t/** @format email */\n\temail: string;\n\tpassword: string;\n\t/** @pattern ^\\d+$ */\n\tamount: string;\n\tactivation_code: string;\n};\n\n// ---- External ----\n\n/** Port number for postgresql container\n * @default 5432\n */\ntype TzKtConfigPostgresqlPort = number;\n\n/** Port number for TzKt API\n * @default 5000\n */\ntype TzKtConfigApiPort = number;\n\nexport type TzKtConfig = {\n\t/** Do not start TzKt when sandbox starts */\n\tdisableAutostartWithSandbox?: boolean;\n\tpostgresqlPort?: TzKtConfigPostgresqlPort;\n\tapiPort?: TzKtConfigApiPort;\n};\n\n// ---- Project Files ----\n\nexport type EphemeralState = {\n\tbuild: string;\n\tconfigHash: string;\n\n\t// Note: these were changed from a union(either type) to intersection(both types): i.e. InstalledPlugin | Task is not correct\n\n\t/** Task/Plugin Mapping */\n\ttasks: Record<string, InstalledPlugin & Task>;\n\t/** Operation/Plugin Mapping */\n\toperations: Record<string, InstalledPlugin & ParsedOperation>;\n\t/** Templates/Plugin Mapping */\n\ttemplates: Record<string, InstalledPlugin & ParsedTemplate>;\n\n\tplugins: PluginInfo[];\n};\n\nexport type PersistentState = {\n\toperations: Record<string, PersistedOperation>;\n\ttasks: Record<string, PersistedTask>;\n};\n\nexport type PersistedTask = {\n\ttask: Verb;\n\tplugin: NonEmptyString;\n\ttime: Timestamp;\n\toutput?: unknown;\n};\n\nexport type PersistedOperation = {\n\thash: SHA256;\n\ttime: Timestamp;\n\toutput?: unknown;\n};\n\n/**\n * @minLength 1\n * @pattern ^[A-Za-z0-9]+[A-Za-z0-9-_]+\\.[A-Za-z0-9]+[A-Za-z0-9-_]+\\.[A-Za-z0-9]+[A-Za-z0-9-_]+$\n */\nexport type ProvisionerID = string;\n\nexport type Provisioner = {\n\tid: ProvisionerID;\n\tplugin: NonEmptyString;\n\toperation: NonEmptyString | 'custom';\n\tcommand?: string;\n\tlabel?: string;\n\tdepends_on?: ProvisionerID[];\n};\n\nexport type Provisions = Provisioner[];\n\n// ---- Project Files: Config ----\n\nexport type Environment = {\n\tnetworks: NonEmptyString[];\n\tsandboxes: NonEmptyString[];\n\tstorage?: Record<string, NonEmptyString>;\n\taliases?: Record<string, Record<string, NonEmptyString>>;\n};\n\n/** @minLength 1 Default environment must reference the name of an existing environment.*/\ntype EnvironmentName = NonEmptyString;\n\n/** @default en */\ntype HumanLanguage = 'en' | 'fr';\n\n/**\n * @default contracts\n * @minLength 1\n */\nexport type ConfigContractsDir = string;\n\n/**\n * @default artifacts\n * @minLength 1\n */\nexport type ConfigArtifactsDir = string;\n\nexport type ConfigAccount = {\n\tbalance: CurrencyAmountV2;\n};\n\n// Incrementally Convert from ConfigFileV1 to ConfigFileV2\n// 1. A wrapper will load/save the ConfigFileV2 and convert it to this Config runtime type (which is initially the same as ConfigFileV1)\n// 2. This type will be modified incrementally as the implementation uses the new type structure\n// - The new schema definitions will be used immediately in the file system\n// - Current implementation works the same\n// - This decouples the schema change from implementation changes and unblocks the development team\nexport type Config = {\n\t// same\n\tlanguage?: HumanLanguage;\n\tmetadata?: MetadataConfig;\n\tartifactsDir?: ConfigArtifactsDir;\n\tcontractsDir?: ConfigContractsDir;\n\tcontracts?: Record<string, Contract>;\n\tplugins?: InstalledPlugin[];\n\n\t// to change\n\taccounts?: Record<string, Tz>;\n\t// accounts?: Record<string, ConfigAccount>;\n\n\t// to change\n\tenvironment: Record<string, Environment | EnvironmentName>;\n\t// environments?: Record<string, ConfigFileEnvironmentV2>;\n\n\t// to remove\n\tnetwork?: Record<string, NetworkConfig>;\n\t// to remove\n\tsandbox?: Record<string, SandboxConfig>;\n};\n\n// This is the original Config and is retained to support auto migration of files\nexport type ConfigFileV1 = {\n\tlanguage?: HumanLanguage;\n\tplugins?: InstalledPlugin[];\n\tcontractsDir?: ConfigContractsDir;\n\tartifactsDir?: ConfigArtifactsDir;\n\tnetwork?: Record<string, NetworkConfig>;\n\tsandbox?: Record<string, SandboxConfig>;\n\n\t// TODO: This causes a type conflict and is not supported\n\t// accounts?: {\n\t// \tdefault: EnvironmentName;\n\t// } & Record<string, Environment>;\n\tenvironment?: Record<string, Environment | EnvironmentName>;\n\taccounts?: Record<string, Tz>;\n\tcontracts?: Record<string, Contract>;\n\tmetadata?: MetadataConfig;\n};\n\nexport type CurrencyAmountV2 = {\n\tamount: string;\n\tunits: string;\n};\n\n/**\n * Workaround: zod won`t support VersionV2 = `v2`\n * @pattern ^v2$\n */\ntype VersionV2 = string;\n\nexport type ConfigFileV2 = {\n\tversion: VersionV2;\n\tlanguage?: HumanLanguage;\n\tmetadata?: MetadataConfig;\n\tartifactsDir?: ConfigArtifactsDir;\n\tcontractsDir?: ConfigContractsDir;\n\n\t/** Declared accounts */\n\taccounts?: Record<string, ConfigAccount>;\n\n\tcontracts?: Record<string, Contract>;\n\n\t/** The default environment key */\n\tenvironmentDefault?: EnvironmentName;\n\n\t/** Environments\n\t *\n\t * An environment represents a unique context on a network with its own account instances and contracts.\n\t *\n\t * The environment implementation is provided by a plugin which enables network control, account management, and contract interaction.\n\t *\n\t * Example environment types:\n\t *\n\t * - a sandbox running locally (using flextesa and taquito plugin)\n\t * - teztnets.xyz (using taquito plugin)\n\t * - mainnet (using taquito plugin with a custom rpcUrl)\n\t *\n\t * The environment implementation also implements the account types that are supported by that environmentType:\n\t *\n\t * - flextesa\n\t * - in-memory signer\n\t * - mainnet\n\t * - beacon wallet\n\t * - multi-sig\n\t *\n\t * Using the above as an example, the flextesa sandbox only needs an in-memory signer since it generates it's own accounts,\n\t * but mainnet might support something like a beacon wallet or a multi-sig account.\n\t */\n\tenvironments?: Record<string, ConfigEnvironmentFileV2>;\n\n\tplugins?: InstalledPlugin[];\n};\n\n/** Account overrides for this environment */\nexport type SandboxAccounts = Record<string, {\n\ttype?: string;\n}>;\n\nexport type ConfigEnvironmentFileV2 = {\n\t/** environment types provided by plugins\n\t *\n\t * Examples: flextesa, teztnet, mainnet\n\t *\n\t * annotations provides plugin specific data like rpcUrl\n\t */\n\ttype?: string;\n\n\t// Account overrides for the environment\n\taccounts?: SandboxAccounts;\n\n\t// Default account to use for this environment\n\taccountDefault?: keyof SandboxAccounts;\n\n\t/** Contract deployment data for this environment */\n\tcontracts?: Record<string, {\n\t\taddress?: string;\n\t}>;\n\t// Other fields may exist, but they are not type checked here\n\t// It is expected that this will be cast to a more specific type\n\t// by the plugin to access the additional fields\n};\n\n// TODO: sandbox breaks ts-to-zod\nexport type LoadedConfig = Config & {\n\tprojectDir: SanitizedAbsPath;\n\tconfigFile: SanitizedAbsPath;\n\thash: SHA256;\n};\n\nexport type MetadataConfig = {\n\tname?: string;\n\tprojectDescription?: string;\n\tauthors?: string[];\n\tlicense?: string;\n\thomepage?: string;\n};\n\nexport type NetworkConfig = {\n\tlabel: HumanReadableIdentifier;\n\trpcUrl: Url;\n\taccounts?: Record<string, NetworkAccountConfig>;\n\tfaucet?: Faucet;\n};\n\nexport type NetworkAccountConfig = {\n\tpublicKey?: NonEmptyString;\n\tpublicKeyHash?: PublicKeyHash;\n\tprivateKey?: NonEmptyString; /** TODO: Should this be secretKey: @see {SandboxAccountConfig} */\n\tmnemonic?: NonEmptyString;\n};\n\nexport type SandboxAccountConfig = {\n\tencryptedKey: NonEmptyString;\n\tpublicKeyHash: PublicKeyHash;\n\tsecretKey: NonEmptyString;\n};\n\nexport type SandboxConfig = {\n\tlabel: NonEmptyString;\n\trpcUrl: Url;\n\tprotocol?: EconomicalProtocolHash;\n\tplugin?: Verb;\n\n\t// TODO: This causes a type conflict and is not supported\n\t// accounts?: {\n\t// \tdefault: NonEmptyString;\n\t// } & Record<string, SandboxAccountConfig>;\n\taccounts?: Record<string, SandboxAccountConfig | NonEmptyString>;\n\n\ttzkt?: TzKtConfig;\n\tannotations?: Record<string, unknown>;\n};\n\nexport type ScaffoldConfig = {\n\tpostInit?: string;\n};\n\nexport type ParsedConfig = Omit<Config, 'sandbox'> & {\n\tsandbox: Record<string, SandboxConfig | NonEmptyString>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/tzkt-config.js
CHANGED
|
@@ -52,14 +52,4 @@ var schemas = {
|
|
|
52
52
|
...generatedSchemas,
|
|
53
53
|
schema: generatedSchemas.schema.transform((val) => val)
|
|
54
54
|
};
|
|
55
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
56
|
-
0 && (module.exports = {
|
|
57
|
-
create,
|
|
58
|
-
factory,
|
|
59
|
-
generatedSchemas,
|
|
60
|
-
make,
|
|
61
|
-
of,
|
|
62
|
-
rawSchema,
|
|
63
|
-
schemas
|
|
64
|
-
});
|
|
65
55
|
//# sourceMappingURL=tzkt-config.js.map
|
package/Alias.mjs
DELETED
package/Alias.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["Alias.ts"],"sourcesContent":["export * from '@taqueria/protocol/out/types/Alias';\n"],"mappings":";AAAA,cAAc;","names":[]}
|
package/Base.mjs
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
// Base.ts
|
|
2
|
-
import { toFutureParseErr, toFutureParseUnknownErr } from "@taqueria/protocol/TaqError";
|
|
3
|
-
import { resolve } from "fluture";
|
|
4
|
-
import { ZodError } from "zod";
|
|
5
|
-
var createSchema = (params) => {
|
|
6
|
-
const { rawSchema, isStringLike } = params;
|
|
7
|
-
const internalSchema = params.internalSchema ?? params.rawSchema;
|
|
8
|
-
const noop = (val) => val;
|
|
9
|
-
const transformer = params.transformer ?? noop;
|
|
10
|
-
const schema = isStringLike ? internalSchema.transform(
|
|
11
|
-
(val) => transformer(val)
|
|
12
|
-
) : internalSchema.transform(
|
|
13
|
-
(val) => transformer(val)
|
|
14
|
-
);
|
|
15
|
-
return {
|
|
16
|
-
rawSchema,
|
|
17
|
-
internalSchema,
|
|
18
|
-
schema
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
var createType = (params) => {
|
|
22
|
-
const schemas = createSchema(params);
|
|
23
|
-
const { parseErrMsg, unknownErrMsg } = params;
|
|
24
|
-
const internalOf = (input) => {
|
|
25
|
-
try {
|
|
26
|
-
return resolve(schemas.schema.parse(input));
|
|
27
|
-
} catch (previous) {
|
|
28
|
-
const parseMsg = typeof parseErrMsg === "string" ? parseErrMsg : parseErrMsg(input, previous);
|
|
29
|
-
const unknownMsg = typeof unknownErrMsg === "string" ? unknownErrMsg : unknownErrMsg(input);
|
|
30
|
-
if (previous instanceof ZodError) {
|
|
31
|
-
return toFutureParseErr(previous, parseMsg, input);
|
|
32
|
-
}
|
|
33
|
-
return toFutureParseUnknownErr(previous, unknownMsg, input);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
const of = internalOf;
|
|
37
|
-
const make = (input) => internalOf(input);
|
|
38
|
-
const create = (input) => schemas.schema.parse(input);
|
|
39
|
-
const from = (input) => schemas.schema.parse(input);
|
|
40
|
-
const factory = {
|
|
41
|
-
make,
|
|
42
|
-
of,
|
|
43
|
-
create,
|
|
44
|
-
from
|
|
45
|
-
};
|
|
46
|
-
return {
|
|
47
|
-
schemas,
|
|
48
|
-
factory
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
var Base_default = createType;
|
|
52
|
-
export {
|
|
53
|
-
createSchema,
|
|
54
|
-
createType,
|
|
55
|
-
Base_default as default
|
|
56
|
-
};
|
|
57
|
-
//# sourceMappingURL=Base.mjs.map
|