@taqueria/protocol 0.67.3 → 0.68.4

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 (380) hide show
  1. package/Alias.d.js +1 -1
  2. package/Alias.d.js.map +1 -1
  3. package/Alias.js +1 -1
  4. package/Alias.js.map +1 -1
  5. package/Command.d.js +1 -1
  6. package/Command.d.js.map +1 -1
  7. package/Command.js +1 -1
  8. package/Command.js.map +1 -1
  9. package/Config.d.js +1 -1
  10. package/Config.d.js.map +1 -1
  11. package/Config.js +1 -1
  12. package/Config.js.map +1 -1
  13. package/ConfigContractsDir.d.js +1 -1
  14. package/ConfigContractsDir.d.js.map +1 -1
  15. package/ConfigContractsDir.js +1 -1
  16. package/ConfigContractsDir.js.map +1 -1
  17. package/ConfigEnvironmentFileV2.d.js +1 -1
  18. package/ConfigEnvironmentFileV2.d.js.map +1 -1
  19. package/ConfigEnvironmentFileV2.js +1 -1
  20. package/ConfigEnvironmentFileV2.js.map +1 -1
  21. package/ConfigFileV2.d.js +1 -1
  22. package/ConfigFileV2.d.js.map +1 -1
  23. package/ConfigFileV2.js +1 -1
  24. package/ConfigFileV2.js.map +1 -1
  25. package/Contract.d.js +1 -1
  26. package/Contract.d.js.map +1 -1
  27. package/Contract.js +1 -1
  28. package/Contract.js.map +1 -1
  29. package/EconomicalProtocolHash.d.js +1 -1
  30. package/EconomicalProtocolHash.d.js.map +1 -1
  31. package/EconomicalProtocolHash.js +1 -1
  32. package/EconomicalProtocolHash.js.map +1 -1
  33. package/Environment.d.js +1 -1
  34. package/Environment.d.js.map +1 -1
  35. package/Environment.js +1 -1
  36. package/Environment.js.map +1 -1
  37. package/EphemeralState.d.ts +42 -42
  38. package/EphemeralState.js +1 -1
  39. package/EphemeralState.js.map +1 -1
  40. package/Faucet.d.js +1 -1
  41. package/Faucet.d.js.map +1 -1
  42. package/Faucet.js +1 -1
  43. package/Faucet.js.map +1 -1
  44. package/HumanReadableIdentifier.d.js +1 -1
  45. package/HumanReadableIdentifier.d.js.map +1 -1
  46. package/HumanReadableIdentifier.js +1 -1
  47. package/HumanReadableIdentifier.js.map +1 -1
  48. package/InstalledPlugin.d.js +1 -1
  49. package/InstalledPlugin.d.js.map +1 -1
  50. package/InstalledPlugin.js +1 -1
  51. package/InstalledPlugin.js.map +1 -1
  52. package/LoadedConfig.d.js +1 -1
  53. package/LoadedConfig.d.js.map +1 -1
  54. package/LoadedConfig.js +1 -1
  55. package/LoadedConfig.js.map +1 -1
  56. package/MetadataConfig.d.js +1 -1
  57. package/MetadataConfig.d.js.map +1 -1
  58. package/MetadataConfig.js +1 -1
  59. package/MetadataConfig.js.map +1 -1
  60. package/NetworkAccountConfig.d.js +1 -1
  61. package/NetworkAccountConfig.d.js.map +1 -1
  62. package/NetworkAccountConfig.js +1 -1
  63. package/NetworkAccountConfig.js.map +1 -1
  64. package/NetworkConfig.d.js +1 -1
  65. package/NetworkConfig.d.js.map +1 -1
  66. package/NetworkConfig.js +1 -1
  67. package/NetworkConfig.js.map +1 -1
  68. package/NonEmptyString.d.js +1 -1
  69. package/NonEmptyString.d.js.map +1 -1
  70. package/NonEmptyString.js +1 -1
  71. package/NonEmptyString.js.map +1 -1
  72. package/Operation.d.js +1 -1
  73. package/Operation.d.js.map +1 -1
  74. package/Operation.js +1 -1
  75. package/Operation.js.map +1 -1
  76. package/Option.d.js +1 -1
  77. package/Option.d.js.map +1 -1
  78. package/Option.js +1 -1
  79. package/Option.js.map +1 -1
  80. package/ParsedOperation.d.js +1 -1
  81. package/ParsedOperation.d.js.map +1 -1
  82. package/ParsedOperation.js +1 -1
  83. package/ParsedOperation.js.map +1 -1
  84. package/ParsedPluginInfo.d.ts +105 -105
  85. package/ParsedPluginInfo.js +1 -1
  86. package/ParsedPluginInfo.js.map +1 -1
  87. package/ParsedTemplate.d.js +1 -1
  88. package/ParsedTemplate.d.js.map +1 -1
  89. package/ParsedTemplate.js +1 -1
  90. package/ParsedTemplate.js.map +1 -1
  91. package/PersistentState.js +1 -1
  92. package/PersistentState.js.map +1 -1
  93. package/PluginActionName.d.js +1 -1
  94. package/PluginActionName.d.js.map +1 -1
  95. package/PluginActionName.js +1 -1
  96. package/PluginActionName.js.map +1 -1
  97. package/PluginDependenciesResponse.d.js +1 -1
  98. package/PluginDependenciesResponse.d.js.map +1 -1
  99. package/PluginDependenciesResponse.js +1 -1
  100. package/PluginDependenciesResponse.js.map +1 -1
  101. package/PluginInfo.d.ts +126 -126
  102. package/PluginInfo.js +1 -1
  103. package/PluginInfo.js.map +1 -1
  104. package/PluginJsonResponse.d.js +1 -1
  105. package/PluginJsonResponse.d.js.map +1 -1
  106. package/PluginJsonResponse.js +1 -1
  107. package/PluginJsonResponse.js.map +1 -1
  108. package/PluginProxyResponse.d.js +1 -1
  109. package/PluginProxyResponse.d.js.map +1 -1
  110. package/PluginProxyResponse.js +1 -1
  111. package/PluginProxyResponse.js.map +1 -1
  112. package/PluginResponseEncoding.d.js +1 -1
  113. package/PluginResponseEncoding.d.js.map +1 -1
  114. package/PluginResponseEncoding.js +1 -1
  115. package/PluginResponseEncoding.js.map +1 -1
  116. package/PluginSchema.d.ts +882 -882
  117. package/PluginSchema.js +1 -1
  118. package/PluginSchema.js.map +1 -1
  119. package/PositionalArg.d.js +1 -1
  120. package/PositionalArg.d.js.map +1 -1
  121. package/PositionalArg.js +1 -1
  122. package/PositionalArg.js.map +1 -1
  123. package/Provisioner.d.js +1 -1
  124. package/Provisioner.d.js.map +1 -1
  125. package/Provisioner.js +1 -1
  126. package/Provisioner.js.map +1 -1
  127. package/ProvisionerID.d.js +1 -1
  128. package/ProvisionerID.d.js.map +1 -1
  129. package/ProvisionerID.js +1 -1
  130. package/ProvisionerID.js.map +1 -1
  131. package/Provisions.d.js +1 -1
  132. package/Provisions.d.js.map +1 -1
  133. package/Provisions.js +1 -1
  134. package/Provisions.js.map +1 -1
  135. package/ProxyTaskArgs.d.js +1 -1
  136. package/ProxyTaskArgs.d.js.map +1 -1
  137. package/ProxyTaskArgs.js +1 -1
  138. package/ProxyTaskArgs.js.map +1 -1
  139. package/ProxyTemplateArgs.d.js +1 -1
  140. package/ProxyTemplateArgs.d.js.map +1 -1
  141. package/ProxyTemplateArgs.js +1 -1
  142. package/ProxyTemplateArgs.js.map +1 -1
  143. package/PublicKeyHash.d.js +1 -1
  144. package/PublicKeyHash.d.js.map +1 -1
  145. package/PublicKeyHash.js +1 -1
  146. package/PublicKeyHash.js.map +1 -1
  147. package/RequestArgs.d.js +1 -1
  148. package/RequestArgs.d.js.map +1 -1
  149. package/RequestArgs.js +1 -1
  150. package/RequestArgs.js.map +1 -1
  151. package/SandboxAccountConfig.d.js +1 -1
  152. package/SandboxAccountConfig.d.js.map +1 -1
  153. package/SandboxAccountConfig.js +1 -1
  154. package/SandboxAccountConfig.js.map +1 -1
  155. package/SandboxConfig.d.js +1 -1
  156. package/SandboxConfig.d.js.map +1 -1
  157. package/SandboxConfig.js +1 -1
  158. package/SandboxConfig.js.map +1 -1
  159. package/SanitizedArgs.js +1 -1
  160. package/SanitizedArgs.js.map +1 -1
  161. package/SanitizedPath.d.js +1 -1
  162. package/SanitizedPath.d.js.map +1 -1
  163. package/SanitizedPath.js +1 -1
  164. package/SanitizedPath.js.map +1 -1
  165. package/ScaffoldConfig.d.js +1 -1
  166. package/ScaffoldConfig.d.js.map +1 -1
  167. package/ScaffoldConfig.js +1 -1
  168. package/ScaffoldConfig.js.map +1 -1
  169. package/Settings.d.js +1 -1
  170. package/Settings.d.js.map +1 -1
  171. package/Settings.js +1 -1
  172. package/Settings.js.map +1 -1
  173. package/SingleChar.d.js +1 -1
  174. package/SingleChar.d.js.map +1 -1
  175. package/SingleChar.js +1 -1
  176. package/SingleChar.js.map +1 -1
  177. package/Task.d.js +1 -1
  178. package/Task.d.js.map +1 -1
  179. package/Task.js +1 -1
  180. package/Task.js.map +1 -1
  181. package/Template.d.js +1 -1
  182. package/Template.d.js.map +1 -1
  183. package/Template.js +1 -1
  184. package/Template.js.map +1 -1
  185. package/Timestamp.d.js +1 -1
  186. package/Timestamp.d.js.map +1 -1
  187. package/Timestamp.js +1 -1
  188. package/Timestamp.js.map +1 -1
  189. package/Tz.d.js +1 -1
  190. package/Tz.d.js.map +1 -1
  191. package/Tz.js +1 -1
  192. package/Tz.js.map +1 -1
  193. package/Url.d.js +1 -1
  194. package/Url.d.js.map +1 -1
  195. package/Url.js +1 -1
  196. package/Url.js.map +1 -1
  197. package/Verb.d.js +1 -1
  198. package/Verb.d.js.map +1 -1
  199. package/Verb.js +1 -1
  200. package/Verb.js.map +1 -1
  201. package/VersionNumber.d.js +1 -1
  202. package/VersionNumber.d.js.map +1 -1
  203. package/VersionNumber.js +1 -1
  204. package/VersionNumber.js.map +1 -1
  205. package/index.d.js +1 -1
  206. package/index.d.js.map +1 -1
  207. package/index.js +1 -1
  208. package/index.js.map +1 -1
  209. package/out/types/Alias.js +1 -1
  210. package/out/types/Alias.js.map +1 -1
  211. package/out/types/BuildNumber.js +1 -1
  212. package/out/types/BuildNumber.js.map +1 -1
  213. package/out/types/Command.js +1 -1
  214. package/out/types/Command.js.map +1 -1
  215. package/out/types/Config.d.ts +29 -29
  216. package/out/types/Config.js +1 -1
  217. package/out/types/Config.js.map +1 -1
  218. package/out/types/ConfigAccount.js +1 -1
  219. package/out/types/ConfigAccount.js.map +1 -1
  220. package/out/types/ConfigArtifactsDir.js +1 -1
  221. package/out/types/ConfigArtifactsDir.js.map +1 -1
  222. package/out/types/ConfigContractsDir.js +1 -1
  223. package/out/types/ConfigContractsDir.js.map +1 -1
  224. package/out/types/ConfigEnvironmentFileV2.js +1 -1
  225. package/out/types/ConfigEnvironmentFileV2.js.map +1 -1
  226. package/out/types/ConfigFileV1.d.ts +29 -29
  227. package/out/types/ConfigFileV1.js +1 -1
  228. package/out/types/ConfigFileV1.js.map +1 -1
  229. package/out/types/ConfigFileV2.js +1 -1
  230. package/out/types/ConfigFileV2.js.map +1 -1
  231. package/out/types/Contract.js +1 -1
  232. package/out/types/Contract.js.map +1 -1
  233. package/out/types/CurrencyAmountV2.js +1 -1
  234. package/out/types/CurrencyAmountV2.js.map +1 -1
  235. package/out/types/EconomicalProtocolHash.js +1 -1
  236. package/out/types/EconomicalProtocolHash.js.map +1 -1
  237. package/out/types/Environment.js +1 -1
  238. package/out/types/Environment.js.map +1 -1
  239. package/out/types/EphemeralState.d.ts +336 -336
  240. package/out/types/EphemeralState.js +1 -1
  241. package/out/types/EphemeralState.js.map +1 -1
  242. package/out/types/Faucet.js +1 -1
  243. package/out/types/Faucet.js.map +1 -1
  244. package/out/types/HumanReadableIdentifier.js +1 -1
  245. package/out/types/HumanReadableIdentifier.js.map +1 -1
  246. package/out/types/InstalledPlugin.js +1 -1
  247. package/out/types/InstalledPlugin.js.map +1 -1
  248. package/out/types/LoadedConfig.d.ts +29 -29
  249. package/out/types/LoadedConfig.js +1 -1
  250. package/out/types/LoadedConfig.js.map +1 -1
  251. package/out/types/MetadataConfig.js +1 -1
  252. package/out/types/MetadataConfig.js.map +1 -1
  253. package/out/types/NetworkAccountConfig.js +1 -1
  254. package/out/types/NetworkAccountConfig.js.map +1 -1
  255. package/out/types/NetworkConfig.js +1 -1
  256. package/out/types/NetworkConfig.js.map +1 -1
  257. package/out/types/NonEmptyString.js +1 -1
  258. package/out/types/NonEmptyString.js.map +1 -1
  259. package/out/types/Operation.d.ts +147 -147
  260. package/out/types/Operation.js +1 -1
  261. package/out/types/Operation.js.map +1 -1
  262. package/out/types/Option.js +1 -1
  263. package/out/types/Option.js.map +1 -1
  264. package/out/types/ParsedConfig.d.ts +49 -49
  265. package/out/types/ParsedConfig.js +1 -1
  266. package/out/types/ParsedConfig.js.map +1 -1
  267. package/out/types/ParsedOperation.d.ts +84 -84
  268. package/out/types/ParsedOperation.js +1 -1
  269. package/out/types/ParsedOperation.js.map +1 -1
  270. package/out/types/ParsedTemplate.d.ts +84 -84
  271. package/out/types/ParsedTemplate.js +1 -1
  272. package/out/types/ParsedTemplate.js.map +1 -1
  273. package/out/types/PersistedOperation.js +1 -1
  274. package/out/types/PersistedOperation.js.map +1 -1
  275. package/out/types/PersistedTask.js +1 -1
  276. package/out/types/PersistedTask.js.map +1 -1
  277. package/out/types/PersistentState.js +1 -1
  278. package/out/types/PersistentState.js.map +1 -1
  279. package/out/types/PluginActionName.js +1 -1
  280. package/out/types/PluginActionName.js.map +1 -1
  281. package/out/types/PluginDependenciesResponse.js +1 -1
  282. package/out/types/PluginDependenciesResponse.js.map +1 -1
  283. package/out/types/PluginInfo.d.ts +168 -168
  284. package/out/types/PluginInfo.js +1 -1
  285. package/out/types/PluginInfo.js.map +1 -1
  286. package/out/types/PluginJsonResponse.js +1 -1
  287. package/out/types/PluginJsonResponse.js.map +1 -1
  288. package/out/types/PluginProxyResponse.js +1 -1
  289. package/out/types/PluginProxyResponse.js.map +1 -1
  290. package/out/types/PluginResponseEncoding.js +1 -1
  291. package/out/types/PluginResponseEncoding.js.map +1 -1
  292. package/out/types/PluginSchema.d.ts +847 -847
  293. package/out/types/PluginSchema.js +1 -1
  294. package/out/types/PluginSchema.js.map +1 -1
  295. package/out/types/PositionalArg.js +1 -1
  296. package/out/types/PositionalArg.js.map +1 -1
  297. package/out/types/Provisioner.js +1 -1
  298. package/out/types/Provisioner.js.map +1 -1
  299. package/out/types/ProvisionerID.js +1 -1
  300. package/out/types/ProvisionerID.js.map +1 -1
  301. package/out/types/Provisions.js +1 -1
  302. package/out/types/Provisions.js.map +1 -1
  303. package/out/types/ProxyTaskArgs.d.ts +91 -91
  304. package/out/types/ProxyTaskArgs.js +1 -1
  305. package/out/types/ProxyTaskArgs.js.map +1 -1
  306. package/out/types/ProxyTemplateArgs.d.ts +91 -91
  307. package/out/types/ProxyTemplateArgs.js +1 -1
  308. package/out/types/ProxyTemplateArgs.js.map +1 -1
  309. package/out/types/PublicKeyHash.js +1 -1
  310. package/out/types/PublicKeyHash.js.map +1 -1
  311. package/out/types/RequestArgs.d.ts +91 -91
  312. package/out/types/RequestArgs.js +1 -1
  313. package/out/types/RequestArgs.js.map +1 -1
  314. package/out/types/RuntimeDependency.js +1 -1
  315. package/out/types/RuntimeDependency.js.map +1 -1
  316. package/out/types/RuntimeDependencyReport.js +1 -1
  317. package/out/types/RuntimeDependencyReport.js.map +1 -1
  318. package/out/types/SHA256.js +1 -1
  319. package/out/types/SHA256.js.map +1 -1
  320. package/out/types/SandboxAccount.js +1 -1
  321. package/out/types/SandboxAccount.js.map +1 -1
  322. package/out/types/SandboxAccountConfig.d.ts +13 -13
  323. package/out/types/SandboxAccountConfig.js +1 -1
  324. package/out/types/SandboxAccountConfig.js.map +1 -1
  325. package/out/types/SandboxAccounts.js +1 -1
  326. package/out/types/SandboxAccounts.js.map +1 -1
  327. package/out/types/SandboxConfig.d.ts +21 -21
  328. package/out/types/SandboxConfig.js +1 -1
  329. package/out/types/SandboxConfig.js.map +1 -1
  330. package/out/types/SanitizedAbsPath.js +1 -1
  331. package/out/types/SanitizedAbsPath.js.map +1 -1
  332. package/out/types/SanitizedArgs.js +1 -1
  333. package/out/types/SanitizedArgs.js.map +1 -1
  334. package/out/types/SanitizedPath.js +1 -1
  335. package/out/types/SanitizedPath.js.map +1 -1
  336. package/out/types/ScaffoldConfig.js +1 -1
  337. package/out/types/ScaffoldConfig.js.map +1 -1
  338. package/out/types/Settings.js +1 -1
  339. package/out/types/Settings.js.map +1 -1
  340. package/out/types/SingleChar.js +1 -1
  341. package/out/types/SingleChar.js.map +1 -1
  342. package/out/types/Task.js +1 -1
  343. package/out/types/Task.js.map +1 -1
  344. package/out/types/Template.d.ts +147 -147
  345. package/out/types/Template.js +1 -1
  346. package/out/types/Template.js.map +1 -1
  347. package/out/types/Timestamp.js +1 -1
  348. package/out/types/Timestamp.js.map +1 -1
  349. package/out/types/Tz.js +1 -1
  350. package/out/types/Tz.js.map +1 -1
  351. package/out/types/TzKtConfig.js +1 -1
  352. package/out/types/TzKtConfig.js.map +1 -1
  353. package/out/types/Url.js +1 -1
  354. package/out/types/Url.js.map +1 -1
  355. package/out/types/Verb.js +1 -1
  356. package/out/types/Verb.js.map +1 -1
  357. package/out/types/VersionNumber.js +1 -1
  358. package/out/types/VersionNumber.js.map +1 -1
  359. package/out/types-strict.d.js.map +1 -1
  360. package/out/types-strict.d.ts +1 -1
  361. package/out/types-strict.d.ts.map +1 -1
  362. package/out/types-strict.js.map +1 -1
  363. package/out/types-zod.d.js.map +1 -1
  364. package/out/types-zod.d.ts +545 -545
  365. package/out/types-zod.js +1 -1
  366. package/out/types-zod.js.map +1 -1
  367. package/package.json +4 -4
  368. package/taqueria-protocol-types.d.js +1 -1
  369. package/taqueria-protocol-types.d.js.map +1 -1
  370. package/taqueria-protocol-types.js +1 -1
  371. package/taqueria-protocol-types.js.map +1 -1
  372. package/tsconfig.tsbuildinfo +1 -1
  373. package/types-config-files.d.js.map +1 -1
  374. package/types-config-files.d.ts.map +1 -1
  375. package/types-config-files.js +4 -1
  376. package/types-config-files.js.map +1 -1
  377. package/types.d.js.map +1 -1
  378. package/types.d.ts +1 -1
  379. package/types.d.ts.map +1 -1
  380. package/types.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["types-config-files.ts"],"sourcesContent":["// TODO: Remove this\n// We should separate what the in-memory configuration model is from the file format\n// We should also have schema migrations\nimport 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 =\n\t(readJsonFile: <T>(filePath: string) => Promise<T>) => async <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 =\n\t(readJsonFile: <T>(filePath: string) => Promise<T>) => async (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 =\n\t(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 =\n\t(writeJsonFile: (filePath: string) => (data: unknown) => Promise<string>) =>\n\t(configFilePath: string) =>\n\tasync (configFileSetV2: ConfigFileSetV2) => {\n\t\tconst configFileResult = await writeJsonFile(configFilePath)(configFileSetV2.config);\n\n\t\t// write the env files\n\t\tawait Promise.all(\n\t\t\tObject.entries(configFileSetV2.environments).map(async ([envName, value]) => {\n\t\t\t\tawait writeJsonFile(configFilePath.replace(`config.json`, `config.local.${envName}.json`))(value);\n\t\t\t}),\n\t\t);\n\n\t\treturn configFileResult;\n\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 !== 'simple');\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...['accounts', 'contracts'].reduce(\n\t\t\t\t\t(retval, fieldName) => {\n\t\t\t\t\t\tif (fieldName === 'accounts') {\n\t\t\t\t\t\t\treturn x.value.accounts\n\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t...retval,\n\t\t\t\t\t\t\t\t\taccounts: x.value.accounts,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t: retval;\n\t\t\t\t\t\t} else if (fieldName === 'contracts') {\n\t\t\t\t\t\t\treturn x.value.aliases\n\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t...retval,\n\t\t\t\t\t\t\t\t\tcontracts: x.value.aliases,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t: retval;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn retval;\n\t\t\t\t\t},\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// Add the following lines to preserve blockTime and baking\n\t\t\t\t// @ts-ignore\n\t\t\t\t...(x.value.blockTime ? { blockTime: x.value.blockTime } : {}),\n\t\t\t\t// @ts-ignore\n\t\t\t\t...(x.value.baking ? { baking: x.value.baking } : {}),\n\t\t\t\t// ... rest of the existing code ...\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;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBO,IAAM,8BACZ,CAAC,iBAAsD,OAAU,aAAiC;AACjG,MAAI,SAAS,SAAS,kBAAkB,GAAG;AAC1C,WAAO,8BAA8B,MAAM,gBAAgB,YAAY,EAAE,QAAQ,CAAC;AAAA,EACnF;AAEA,SAAO,aAAgB,QAAQ;AAChC;AAEM,IAAM,kBACZ,CAAC,iBAAsD,OAAO,mBAAqD;AA7BpH;AA8BE,QAAM,gBAAgB,MAAM,aAAa,cAAc;AAEvD,MAAK,cAA+B,YAAY,MAAM;AAErD,UAAM,kBAAkB,uCAAuC,aAA6B;AAC5F,WAAO;AAAA,EACR;AAGA,QAAM,eAAe;AACrB,QAAM,WAAW,MAAM,QAAQ;AAAA,IAC9B,OAAO,MAAK,kBAAa,iBAAb,YAA6B,CAAC,CAAC,EAAE,IAAI,OAAM,YAAW;AACjE,UAAI;AACH,eAAO;AAAA,UACN,KAAK;AAAA,UACL,OAAO,MAAM;AAAA,YACZ,eAAe,QAAQ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AAE;AApalD,UAAAJ,KAAAC,KAAAG;AAoaqD,eAACJ,MAAA,EAAE,MAAM,gBAAR,OAAAA,MAAuB,GAAG,EAAE,GAAG,IAAI;AAAA,QACrF,QAAOC,MAAA,EAAE,MAAM,UAAR,OAAAA,MAAiB;AAAA,QACxB,SAAQG,MAAA,EAAE,MAAM,WAAR,OAAAA,MAAkB;AAAA;AAAA;AAAA,QAG1B,GAAI,EAAE,MAAM,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,IAAI,CAAC;AAAA;AAAA,QAE5D,GAAI,EAAE,MAAM,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,IAAI,CAAC;AAAA;AAAA;AAAA,QAGnD,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,CAAC;AAAA,cAC7C;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"]}
1
+ {"version":3,"sources":["types-config-files.ts"],"sourcesContent":["// TODO: Remove this\n// We should separate what the in-memory configuration model is from the file format\n// We should also have schema migrations\nimport 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 =\n\t(readJsonFile: <T>(filePath: string) => Promise<T>) => async <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 =\n\t(readJsonFile: <T>(filePath: string) => Promise<T>) => async (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 =\n\t(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 =\n\t(writeJsonFile: (filePath: string) => (data: unknown) => Promise<string>) =>\n\t(configFilePath: string) =>\n\tasync (configFileSetV2: ConfigFileSetV2) => {\n\t\tconst configFileResult = await writeJsonFile(configFilePath)(configFileSetV2.config);\n\n\t\t// write the env files\n\t\tawait Promise.all(\n\t\t\tObject.entries(configFileSetV2.environments).map(async ([envName, value]) => {\n\t\t\t\tawait writeJsonFile(configFilePath.replace(`config.json`, `config.local.${envName}.json`))(value);\n\t\t\t}),\n\t\t);\n\n\t\treturn configFileResult;\n\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' || eMain.type === 'tezbox') {\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\t// For flextesa/tezbox, keep rpcUrl in both files\n\t\t\t\tif (k === 'rpcUrl') {\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 !== 'simple');\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...['accounts', 'contracts'].reduce(\n\t\t\t\t\t(retval, fieldName) => {\n\t\t\t\t\t\tif (fieldName === 'accounts') {\n\t\t\t\t\t\t\treturn x.value.accounts\n\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t...retval,\n\t\t\t\t\t\t\t\t\taccounts: x.value.accounts,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t: retval;\n\t\t\t\t\t\t} else if (fieldName === 'contracts') {\n\t\t\t\t\t\t\treturn x.value.aliases\n\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t...retval,\n\t\t\t\t\t\t\t\t\tcontracts: x.value.aliases,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t: retval;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn retval;\n\t\t\t\t\t},\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// Add the following lines to preserve blockTime and baking\n\t\t\t\t// @ts-ignore\n\t\t\t\t...(x.value.blockTime ? { blockTime: x.value.blockTime } : {}),\n\t\t\t\t// @ts-ignore\n\t\t\t\t...(x.value.baking ? { baking: x.value.baking } : {}),\n\t\t\t\t// ... rest of the existing code ...\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;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBO,IAAM,8BACZ,CAAC,iBAAsD,OAAU,aAAiC;AACjG,MAAI,SAAS,SAAS,kBAAkB,GAAG;AAC1C,WAAO,8BAA8B,MAAM,gBAAgB,YAAY,EAAE,QAAQ,CAAC;AAAA,EACnF;AAEA,SAAO,aAAgB,QAAQ;AAChC;AAEM,IAAM,kBACZ,CAAC,iBAAsD,OAAO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;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.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.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":[]}
package/types.d.ts CHANGED
@@ -374,7 +374,7 @@ export type NetworkAccountConfig = {
374
374
  mnemonic?: NonEmptyString;
375
375
  };
376
376
  export type SandboxAccountConfig = {
377
- encryptedKey: NonEmptyString;
377
+ encryptedKey?: NonEmptyString;
378
378
  publicKeyHash: PublicKeyHash;
379
379
  secretKey: NonEmptyString;
380
380
  };
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,IAAI,GAAG,UAAU,CAAC;AAEtC,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;AAE3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AAG,UAAU,CAAC;IAKhC,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' | '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.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":[]}