@taqueria/protocol 0.78.0 → 0.78.10

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.
Files changed (128) hide show
  1. package/Base.d.ts.map +1 -1
  2. package/EphemeralState.d.ts +35 -35
  3. package/EphemeralState.d.ts.map +1 -1
  4. package/EphemeralState.js +7 -2
  5. package/EphemeralState.js.map +1 -1
  6. package/ParsedPluginInfo.d.ts +130 -4059
  7. package/ParsedPluginInfo.d.ts.map +1 -1
  8. package/PersistentState.d.ts.map +1 -1
  9. package/PersistentState.js +0 -1
  10. package/PersistentState.js.map +1 -1
  11. package/PluginInfo.d.ts +88 -2757
  12. package/PluginInfo.d.ts.map +1 -1
  13. package/PluginSchema.d.ts +1403 -24602
  14. package/PluginSchema.d.ts.map +1 -1
  15. package/SHA256.d.js.map +1 -1
  16. package/SHA256.d.ts.map +1 -1
  17. package/SHA256.js +7 -2
  18. package/SHA256.js.map +1 -1
  19. package/SanitizedAbsPath.d.ts.map +1 -1
  20. package/SanitizedArgs.d.ts +111 -111
  21. package/SanitizedArgs.d.ts.map +1 -1
  22. package/TaqError.d.ts.map +1 -1
  23. package/TaqError.js +5 -0
  24. package/TaqError.js.map +1 -1
  25. package/helpers.d.ts.map +1 -1
  26. package/index.d.js +7 -2
  27. package/index.d.js.map +1 -1
  28. package/index.js +7 -2
  29. package/index.js.map +1 -1
  30. package/out/types/Alias.d.ts.map +1 -1
  31. package/out/types/BuildNumber.d.ts.map +1 -1
  32. package/out/types/Command.d.ts.map +1 -1
  33. package/out/types/Config.d.ts.map +1 -1
  34. package/out/types/ConfigAccount.d.ts.map +1 -1
  35. package/out/types/ConfigArtifactsDir.d.ts.map +1 -1
  36. package/out/types/ConfigContractsDir.d.ts.map +1 -1
  37. package/out/types/ConfigEnvironmentFileV2.d.ts.map +1 -1
  38. package/out/types/ConfigFileV1.d.ts.map +1 -1
  39. package/out/types/ConfigFileV2.d.ts.map +1 -1
  40. package/out/types/Contract.d.ts.map +1 -1
  41. package/out/types/CurrencyAmountV2.d.ts.map +1 -1
  42. package/out/types/EconomicalProtocolHash.d.ts.map +1 -1
  43. package/out/types/Environment.d.ts.map +1 -1
  44. package/out/types/EphemeralState.d.ts +292 -292
  45. package/out/types/EphemeralState.d.ts.map +1 -1
  46. package/out/types/Faucet.d.ts.map +1 -1
  47. package/out/types/HumanReadableIdentifier.d.ts.map +1 -1
  48. package/out/types/InstalledPlugin.d.ts.map +1 -1
  49. package/out/types/LoadedConfig.d.ts +12 -12
  50. package/out/types/LoadedConfig.d.ts.map +1 -1
  51. package/out/types/MetadataConfig.d.ts.map +1 -1
  52. package/out/types/NetworkAccountConfig.d.ts.map +1 -1
  53. package/out/types/NetworkConfig.d.ts.map +1 -1
  54. package/out/types/NonEmptyString.d.ts.map +1 -1
  55. package/out/types/Operation.d.ts +118 -118
  56. package/out/types/Operation.d.ts.map +1 -1
  57. package/out/types/Option.d.ts.map +1 -1
  58. package/out/types/ParsedConfig.d.ts +12 -12
  59. package/out/types/ParsedConfig.d.ts.map +1 -1
  60. package/out/types/ParsedOperation.d.ts +64 -64
  61. package/out/types/ParsedOperation.d.ts.map +1 -1
  62. package/out/types/ParsedTemplate.d.ts +76 -76
  63. package/out/types/ParsedTemplate.d.ts.map +1 -1
  64. package/out/types/PersistedOperation.d.ts.map +1 -1
  65. package/out/types/PersistedTask.d.ts.map +1 -1
  66. package/out/types/PersistentState.d.ts.map +1 -1
  67. package/out/types/PluginActionName.d.ts.map +1 -1
  68. package/out/types/PluginDependenciesResponse.d.ts +12 -12
  69. package/out/types/PluginDependenciesResponse.d.ts.map +1 -1
  70. package/out/types/PluginInfo.d.ts +152 -152
  71. package/out/types/PluginInfo.d.ts.map +1 -1
  72. package/out/types/PluginJsonResponse.d.ts.map +1 -1
  73. package/out/types/PluginProxyResponse.d.ts.map +1 -1
  74. package/out/types/PluginResponseEncoding.d.ts.map +1 -1
  75. package/out/types/PluginSchema.d.ts +722 -722
  76. package/out/types/PluginSchema.d.ts.map +1 -1
  77. package/out/types/PositionalArg.d.ts.map +1 -1
  78. package/out/types/Provisioner.d.ts.map +1 -1
  79. package/out/types/ProvisionerID.d.ts.map +1 -1
  80. package/out/types/Provisions.d.ts.map +1 -1
  81. package/out/types/ProxyTaskArgs.d.ts +82 -82
  82. package/out/types/ProxyTaskArgs.d.ts.map +1 -1
  83. package/out/types/ProxyTemplateArgs.d.ts +82 -82
  84. package/out/types/ProxyTemplateArgs.d.ts.map +1 -1
  85. package/out/types/PublicKeyHash.d.ts.map +1 -1
  86. package/out/types/RequestArgs.d.ts +69 -69
  87. package/out/types/RequestArgs.d.ts.map +1 -1
  88. package/out/types/RuntimeDependency.d.ts.map +1 -1
  89. package/out/types/RuntimeDependencyReport.d.ts +12 -12
  90. package/out/types/RuntimeDependencyReport.d.ts.map +1 -1
  91. package/out/types/SHA256.d.ts.map +1 -1
  92. package/out/types/SandboxAccount.d.ts.map +1 -1
  93. package/out/types/SandboxAccountConfig.d.ts.map +1 -1
  94. package/out/types/SandboxAccounts.d.ts.map +1 -1
  95. package/out/types/SandboxConfig.d.ts.map +1 -1
  96. package/out/types/SanitizedAbsPath.d.ts.map +1 -1
  97. package/out/types/SanitizedArgs.d.ts.map +1 -1
  98. package/out/types/SanitizedPath.d.ts.map +1 -1
  99. package/out/types/ScaffoldConfig.d.ts.map +1 -1
  100. package/out/types/Settings.d.ts.map +1 -1
  101. package/out/types/SingleChar.d.ts.map +1 -1
  102. package/out/types/Task.d.ts.map +1 -1
  103. package/out/types/Template.d.ts +118 -118
  104. package/out/types/Template.d.ts.map +1 -1
  105. package/out/types/Timestamp.d.ts.map +1 -1
  106. package/out/types/Tz.d.ts.map +1 -1
  107. package/out/types/TzKtConfig.d.ts.map +1 -1
  108. package/out/types/Url.d.ts.map +1 -1
  109. package/out/types/Verb.d.ts.map +1 -1
  110. package/out/types/VersionNumber.d.ts.map +1 -1
  111. package/out/types-strict.d.js.map +1 -1
  112. package/out/types-strict.d.ts +1 -1
  113. package/out/types-strict.js.map +1 -1
  114. package/out/types-zod.d.ts +441 -441
  115. package/out/types-zod.d.ts.map +1 -1
  116. package/package.json +17 -17
  117. package/taqueria-protocol-types.d.js +7 -2
  118. package/taqueria-protocol-types.d.js.map +1 -1
  119. package/taqueria-protocol-types.js +7 -2
  120. package/taqueria-protocol-types.js.map +1 -1
  121. package/tsconfig.tsbuildinfo +1 -1
  122. package/types-config-files.d.ts.map +1 -1
  123. package/types-config-files.js +2 -2
  124. package/types-config-files.js.map +1 -1
  125. package/types.d.js.map +1 -1
  126. package/types.d.ts +1 -1
  127. package/types.js.map +1 -1
  128. package/tzkt-config.d.ts.map +1 -1
package/types.d.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' | 'count';\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\tpostInstall?: string;\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\tmessages?: {\n\t\theader?: string;\n\t\tfooter?: string;\n\t};\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| 'runPostInstall'\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 SandboxAccount = {\n\ttype?: string;\n};\n\nexport type SandboxAccounts = Record<string, SandboxAccount>;\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; // should this be optional?\n\tprotocol?: EconomicalProtocolHash;\n\tplugin?: Verb;\n\tblockTime?: number;\n\tbaking?: 'enabled' | 'disabled';\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":";;;;;;;;;;;;;;;;AAEA;;","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' | 'count';\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\tpostInstall?: string;\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\tmessages?: {\n\t\theader?: string;\n\t\tfooter?: string;\n\t};\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| 'runPostInstall'\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.com (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 SandboxAccount = {\n\ttype?: string;\n};\n\nexport type SandboxAccounts = Record<string, SandboxAccount>;\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; // should this be optional?\n\tprotocol?: EconomicalProtocolHash;\n\tplugin?: Verb;\n\tblockTime?: number;\n\tbaking?: 'enabled' | 'disabled';\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":";;;;;;;;;;;;;;;;AAEA;;","names":[]}
package/types.d.ts CHANGED
@@ -312,7 +312,7 @@ export type ConfigFileV2 = {
312
312
  * Example environment types:
313
313
  *
314
314
  * - a sandbox running locally (using flextesa and taquito plugin)
315
- * - teztnets.xyz (using taquito plugin)
315
+ * - teztnets.com (using taquito plugin)
316
316
  * - mainnet (using taquito plugin with a custom rpcUrl)
317
317
  *
318
318
  * The environment implementation also implements the account types that are supported by that environmentType:
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' | 'count';\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\tpostInstall?: string;\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\tmessages?: {\n\t\theader?: string;\n\t\tfooter?: string;\n\t};\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| 'runPostInstall'\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 SandboxAccount = {\n\ttype?: string;\n};\n\nexport type SandboxAccounts = Record<string, SandboxAccount>;\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; // should this be optional?\n\tprotocol?: EconomicalProtocolHash;\n\tplugin?: Verb;\n\tblockTime?: number;\n\tbaking?: 'enabled' | 'disabled';\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' | 'count';\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\tpostInstall?: string;\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\tmessages?: {\n\t\theader?: string;\n\t\tfooter?: string;\n\t};\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| 'runPostInstall'\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.com (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 SandboxAccount = {\n\ttype?: string;\n};\n\nexport type SandboxAccounts = Record<string, SandboxAccount>;\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; // should this be optional?\n\tprotocol?: EconomicalProtocolHash;\n\tplugin?: Verb;\n\tblockTime?: number;\n\tbaking?: 'enabled' | 'disabled';\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 +1 @@
1
- {"version":3,"file":"tzkt-config.d.ts","sourceRoot":"","sources":["tzkt-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,SAAS;;;;;;;;;;;;EAIpB,CAAC;AAIH,eAAO,MAAiB,gBAAgB;;;;;;;;uCAgBe,EAAG,KAAK;;GAhBrB,OAAO;;;;;;;;;;uCAgBM,EAAG,KAAK;;;;;;;uCAAR,EAAG,KAAK;;;;;;;;;;;uCAAR,EAAG,KAAK;;;;;;;uCAAR,EAAG,KAAK;;CAZ7D,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAEjE,MAAM,MAAM,CAAC,GAAG,UAAU,CAAC;AAE3B,eAAO,MAAQ,MAAM;;;;;;;;;mCAMkC,EAAG,KAAK;GANxC,EAAE;;;;;mCAM8B,EAAG,KAAK;IANpC,IAAI;;;;;;;;;mCAMwB,EAAG,KAAK;EANpB,CAAC;AAE5C,eAAO,MAAM,OAAO;;;;;;yCAIsC,KAAK;;;;;;yCAAL,KAAK;;;;CAD9D,CAAC"}
1
+ {"version":3,"file":"tzkt-config.d.ts","sourceRoot":"","sources":["tzkt-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,SAAS;;;;;;;;;;;;EAIpB,CAAC;AAIH,eAAO,MAAiB,gBAAgB;;;;;;;;;;GAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI/C,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAEjE,MAAM,MAAM,CAAC,GAAG,UAAU,CAAC;AAE3B,eAAO,MAAQ,MAAM;;;;;;;;;;GAAE,EAAE;;;;;;IAAE,IAAI;;;;;;;;;;EAAY,CAAC;AAE5C,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;CAGnB,CAAC"}