@taqueria/protocol 0.25.23-rc → 0.25.29-rc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (515) hide show
  1. package/Base.js +3 -7
  2. package/Base.js.map +1 -1
  3. package/ConfigEnvironmentFileV2.d.ts +2 -0
  4. package/ConfigEnvironmentFileV2.d.ts.map +1 -0
  5. package/ConfigEnvironmentFileV2.js +21 -0
  6. package/ConfigEnvironmentFileV2.js.map +1 -0
  7. package/ConfigFileV2.d.ts +2 -0
  8. package/ConfigFileV2.d.ts.map +1 -0
  9. package/ConfigFileV2.js +21 -0
  10. package/ConfigFileV2.js.map +1 -0
  11. package/EphemeralState.js +4 -14
  12. package/EphemeralState.js.map +1 -1
  13. package/ParsedPluginInfo.js +2 -12
  14. package/ParsedPluginInfo.js.map +1 -1
  15. package/PersistentState.js +0 -11
  16. package/PersistentState.js.map +1 -1
  17. package/PluginInfo.js +6 -16
  18. package/PluginInfo.js.map +1 -1
  19. package/PluginSchema.js +4 -14
  20. package/PluginSchema.js.map +1 -1
  21. package/SHA256.js +0 -11
  22. package/SanitizedAbsPath.js +0 -10
  23. package/SanitizedArgs.js +0 -46
  24. package/SanitizedArgs.js.map +1 -1
  25. package/TaqError.js +0 -9
  26. package/Template.js +0 -4
  27. package/helpers.js +0 -4
  28. package/i18n.js +0 -2
  29. package/index.d.ts +4 -3
  30. package/index.d.ts.map +1 -1
  31. package/index.js +5 -58
  32. package/index.js.map +1 -1
  33. package/out/types/Alias.js +0 -10
  34. package/out/types/BuildNumber.js +0 -10
  35. package/out/types/Command.js +0 -10
  36. package/out/types/Config.js +0 -10
  37. package/out/types/ConfigAccount.js +0 -10
  38. package/out/types/ConfigArtifactsDir.js +0 -10
  39. package/out/types/ConfigContractsDir.js +0 -10
  40. package/out/types/ConfigEnvironmentFileV2.js +0 -10
  41. package/out/types/ConfigFileV1.js +0 -10
  42. package/out/types/ConfigFileV2.js +0 -10
  43. package/out/types/Contract.js +0 -10
  44. package/out/types/CurrencyAmountV2.js +0 -10
  45. package/out/types/EconomicalProtocolHash.js +0 -10
  46. package/out/types/Environment.js +0 -10
  47. package/out/types/EphemeralState.js +0 -10
  48. package/out/types/Faucet.js +0 -10
  49. package/out/types/HumanReadableIdentifier.js +0 -10
  50. package/out/types/InstalledPlugin.js +0 -10
  51. package/out/types/LoadedConfig.js +0 -10
  52. package/out/types/MetadataConfig.js +0 -10
  53. package/out/types/NetworkAccountConfig.js +0 -10
  54. package/out/types/NetworkConfig.js +0 -10
  55. package/out/types/NonEmptyString.js +0 -10
  56. package/out/types/Operation.js +0 -10
  57. package/out/types/Option.js +0 -10
  58. package/out/types/ParsedConfig.js +0 -10
  59. package/out/types/ParsedOperation.js +0 -10
  60. package/out/types/ParsedTemplate.js +0 -10
  61. package/out/types/PersistedOperation.js +0 -10
  62. package/out/types/PersistedTask.js +0 -10
  63. package/out/types/PersistentState.js +0 -10
  64. package/out/types/PluginActionName.js +0 -10
  65. package/out/types/PluginDependenciesResponse.js +0 -10
  66. package/out/types/PluginInfo.js +0 -10
  67. package/out/types/PluginJsonResponse.js +0 -10
  68. package/out/types/PluginProxyResponse.js +0 -10
  69. package/out/types/PluginResponseEncoding.js +0 -10
  70. package/out/types/PluginSchema.js +0 -10
  71. package/out/types/PositionalArg.js +0 -10
  72. package/out/types/Provisioner.js +0 -10
  73. package/out/types/ProvisionerID.js +0 -10
  74. package/out/types/Provisions.js +0 -10
  75. package/out/types/ProxyTaskArgs.js +0 -10
  76. package/out/types/ProxyTemplateArgs.js +0 -10
  77. package/out/types/PublicKeyHash.js +0 -10
  78. package/out/types/RequestArgs.js +0 -10
  79. package/out/types/RuntimeDependency.js +0 -10
  80. package/out/types/RuntimeDependencyReport.js +0 -10
  81. package/out/types/SHA256.js +0 -10
  82. package/out/types/SandboxAccountConfig.js +0 -10
  83. package/out/types/SandboxConfig.js +0 -10
  84. package/out/types/SanitizedAbsPath.js +0 -10
  85. package/out/types/SanitizedArgs.js +0 -10
  86. package/out/types/SanitizedPath.js +0 -10
  87. package/out/types/ScaffoldConfig.js +0 -10
  88. package/out/types/Settings.d.ts +13 -13
  89. package/out/types/Settings.js +0 -10
  90. package/out/types/SingleChar.js +0 -10
  91. package/out/types/Task.js +0 -10
  92. package/out/types/Template.js +0 -10
  93. package/out/types/Timestamp.js +0 -10
  94. package/out/types/Tz.js +0 -10
  95. package/out/types/TzKtConfig.js +0 -10
  96. package/out/types/Url.js +0 -10
  97. package/out/types/Verb.js +0 -10
  98. package/out/types/VersionNumber.js +0 -10
  99. package/out/types-strict.d.js.map +1 -1
  100. package/out/types-strict.d.ts +1 -1
  101. package/out/types-strict.d.ts.map +1 -1
  102. package/out/types-strict.js.map +1 -1
  103. package/out/types-zod.d.js.map +1 -1
  104. package/out/types-zod.d.ts +3 -3
  105. package/out/types-zod.d.ts.map +1 -1
  106. package/out/types-zod.js +5 -69
  107. package/out/types-zod.js.map +1 -1
  108. package/package.json +4 -26
  109. package/taqueria-protocol-types.js +0 -39
  110. package/tsup.config.d.ts +4 -0
  111. package/tsup.config.d.ts.map +1 -0
  112. package/types-config-files.d.ts +2 -1
  113. package/types-config-files.d.ts.map +1 -1
  114. package/types-config-files.js +67 -48
  115. package/types-config-files.js.map +1 -1
  116. package/types.d.ts +1 -1
  117. package/types.d.ts.map +1 -1
  118. package/types.js.map +1 -1
  119. package/tzkt-config.js +0 -10
  120. package/Alias.mjs +0 -3
  121. package/Alias.mjs.map +0 -1
  122. package/Base.mjs +0 -57
  123. package/Base.mjs.map +0 -1
  124. package/Command.mjs +0 -3
  125. package/Command.mjs.map +0 -1
  126. package/Config.mjs +0 -3
  127. package/Config.mjs.map +0 -1
  128. package/ConfigArtifactsDir.mjs +0 -3
  129. package/ConfigArtifactsDir.mjs.map +0 -1
  130. package/ConfigContractsDir.mjs +0 -3
  131. package/ConfigContractsDir.mjs.map +0 -1
  132. package/Contract.mjs +0 -3
  133. package/Contract.mjs.map +0 -1
  134. package/Crypto.mjs +0 -1
  135. package/Crypto.mjs.map +0 -1
  136. package/EconomicalProtocolHash.mjs +0 -3
  137. package/EconomicalProtocolHash.mjs.map +0 -1
  138. package/Environment.mjs +0 -3
  139. package/Environment.mjs.map +0 -1
  140. package/EphemeralState.mjs +0 -238
  141. package/EphemeralState.mjs.map +0 -1
  142. package/Faucet.mjs +0 -3
  143. package/Faucet.mjs.map +0 -1
  144. package/HumanReadableIdentifier.mjs +0 -3
  145. package/HumanReadableIdentifier.mjs.map +0 -1
  146. package/InstalledPlugin.mjs +0 -3
  147. package/InstalledPlugin.mjs.map +0 -1
  148. package/LoadedConfig.mjs +0 -3
  149. package/LoadedConfig.mjs.map +0 -1
  150. package/MetadataConfig.mjs +0 -3
  151. package/MetadataConfig.mjs.map +0 -1
  152. package/NetworkAccountConfig.mjs +0 -3
  153. package/NetworkAccountConfig.mjs.map +0 -1
  154. package/NetworkConfig.mjs +0 -3
  155. package/NetworkConfig.mjs.map +0 -1
  156. package/NonEmptyString.mjs +0 -3
  157. package/NonEmptyString.mjs.map +0 -1
  158. package/Operation.mjs +0 -3
  159. package/Operation.mjs.map +0 -1
  160. package/Option.mjs +0 -3
  161. package/Option.mjs.map +0 -1
  162. package/ParsedOperation.mjs +0 -3
  163. package/ParsedOperation.mjs.map +0 -1
  164. package/ParsedPluginInfo.mjs +0 -44
  165. package/ParsedPluginInfo.mjs.map +0 -1
  166. package/ParsedTemplate.mjs +0 -3
  167. package/ParsedTemplate.mjs.map +0 -1
  168. package/PersistentState.mjs +0 -60
  169. package/PersistentState.mjs.map +0 -1
  170. package/PluginActionName.mjs +0 -3
  171. package/PluginActionName.mjs.map +0 -1
  172. package/PluginDependenciesResponse.mjs +0 -3
  173. package/PluginDependenciesResponse.mjs.map +0 -1
  174. package/PluginInfo.mjs +0 -76
  175. package/PluginInfo.mjs.map +0 -1
  176. package/PluginJsonResponse.mjs +0 -3
  177. package/PluginJsonResponse.mjs.map +0 -1
  178. package/PluginProxyResponse.mjs +0 -3
  179. package/PluginProxyResponse.mjs.map +0 -1
  180. package/PluginResponseEncoding.mjs +0 -3
  181. package/PluginResponseEncoding.mjs.map +0 -1
  182. package/PluginSchema.mjs +0 -59
  183. package/PluginSchema.mjs.map +0 -1
  184. package/PositionalArg.mjs +0 -3
  185. package/PositionalArg.mjs.map +0 -1
  186. package/Provisioner.mjs +0 -3
  187. package/Provisioner.mjs.map +0 -1
  188. package/ProvisionerID.mjs +0 -3
  189. package/ProvisionerID.mjs.map +0 -1
  190. package/Provisions.mjs +0 -3
  191. package/Provisions.mjs.map +0 -1
  192. package/ProxyTaskArgs.mjs +0 -3
  193. package/ProxyTaskArgs.mjs.map +0 -1
  194. package/ProxyTemplateArgs.mjs +0 -3
  195. package/ProxyTemplateArgs.mjs.map +0 -1
  196. package/PublicKeyHash.mjs +0 -3
  197. package/PublicKeyHash.mjs.map +0 -1
  198. package/RequestArgs.mjs +0 -3
  199. package/RequestArgs.mjs.map +0 -1
  200. package/SHA256.mjs +0 -59
  201. package/SHA256.mjs.map +0 -1
  202. package/SandboxAccountConfig.mjs +0 -3
  203. package/SandboxAccountConfig.mjs.map +0 -1
  204. package/SandboxConfig.mjs +0 -3
  205. package/SandboxConfig.mjs.map +0 -1
  206. package/SanitizedAbsPath.mjs +0 -27
  207. package/SanitizedAbsPath.mjs.map +0 -1
  208. package/SanitizedArgs.mjs +0 -203
  209. package/SanitizedArgs.mjs.map +0 -1
  210. package/SanitizedPath.mjs +0 -3
  211. package/SanitizedPath.mjs.map +0 -1
  212. package/ScaffoldConfig.mjs +0 -3
  213. package/ScaffoldConfig.mjs.map +0 -1
  214. package/Settings.mjs +0 -3
  215. package/Settings.mjs.map +0 -1
  216. package/SingleChar.mjs +0 -3
  217. package/SingleChar.mjs.map +0 -1
  218. package/TaqError.mjs +0 -35
  219. package/TaqError.mjs.map +0 -1
  220. package/Task.mjs +0 -3
  221. package/Task.mjs.map +0 -1
  222. package/Template.mjs +0 -10
  223. package/Template.mjs.map +0 -1
  224. package/Timestamp.mjs +0 -3
  225. package/Timestamp.mjs.map +0 -1
  226. package/Tz.mjs +0 -3
  227. package/Tz.mjs.map +0 -1
  228. package/Url.mjs +0 -3
  229. package/Url.mjs.map +0 -1
  230. package/Verb.mjs +0 -3
  231. package/Verb.mjs.map +0 -1
  232. package/VersionNumber.mjs +0 -3
  233. package/VersionNumber.mjs.map +0 -1
  234. package/helpers.mjs +0 -28
  235. package/helpers.mjs.map +0 -1
  236. package/i18n.mjs +0 -68
  237. package/i18n.mjs.map +0 -1
  238. package/index.mjs +0 -108
  239. package/index.mjs.map +0 -1
  240. package/out/types/Alias.d.mjs +0 -1
  241. package/out/types/Alias.d.mjs.map +0 -1
  242. package/out/types/Alias.mjs +0 -49
  243. package/out/types/Alias.mjs.map +0 -1
  244. package/out/types/BuildNumber.d.mjs +0 -1
  245. package/out/types/BuildNumber.d.mjs.map +0 -1
  246. package/out/types/BuildNumber.mjs +0 -49
  247. package/out/types/BuildNumber.mjs.map +0 -1
  248. package/out/types/Command.d.mjs +0 -1
  249. package/out/types/Command.d.mjs.map +0 -1
  250. package/out/types/Command.mjs +0 -49
  251. package/out/types/Command.mjs.map +0 -1
  252. package/out/types/Config.d.mjs +0 -1
  253. package/out/types/Config.d.mjs.map +0 -1
  254. package/out/types/Config.mjs +0 -49
  255. package/out/types/Config.mjs.map +0 -1
  256. package/out/types/ConfigAccount.d.mjs +0 -1
  257. package/out/types/ConfigAccount.d.mjs.map +0 -1
  258. package/out/types/ConfigAccount.mjs +0 -49
  259. package/out/types/ConfigAccount.mjs.map +0 -1
  260. package/out/types/ConfigArtifactsDir.d.mjs +0 -1
  261. package/out/types/ConfigArtifactsDir.d.mjs.map +0 -1
  262. package/out/types/ConfigArtifactsDir.mjs +0 -49
  263. package/out/types/ConfigArtifactsDir.mjs.map +0 -1
  264. package/out/types/ConfigContractsDir.d.mjs +0 -1
  265. package/out/types/ConfigContractsDir.d.mjs.map +0 -1
  266. package/out/types/ConfigContractsDir.mjs +0 -49
  267. package/out/types/ConfigContractsDir.mjs.map +0 -1
  268. package/out/types/ConfigEnvironmentFileV2.d.mjs +0 -1
  269. package/out/types/ConfigEnvironmentFileV2.d.mjs.map +0 -1
  270. package/out/types/ConfigEnvironmentFileV2.mjs +0 -49
  271. package/out/types/ConfigEnvironmentFileV2.mjs.map +0 -1
  272. package/out/types/ConfigFileV1.d.mjs +0 -1
  273. package/out/types/ConfigFileV1.d.mjs.map +0 -1
  274. package/out/types/ConfigFileV1.mjs +0 -49
  275. package/out/types/ConfigFileV1.mjs.map +0 -1
  276. package/out/types/ConfigFileV2.d.mjs +0 -1
  277. package/out/types/ConfigFileV2.d.mjs.map +0 -1
  278. package/out/types/ConfigFileV2.mjs +0 -49
  279. package/out/types/ConfigFileV2.mjs.map +0 -1
  280. package/out/types/Contract.d.mjs +0 -1
  281. package/out/types/Contract.d.mjs.map +0 -1
  282. package/out/types/Contract.mjs +0 -49
  283. package/out/types/Contract.mjs.map +0 -1
  284. package/out/types/CurrencyAmountV2.d.mjs +0 -1
  285. package/out/types/CurrencyAmountV2.d.mjs.map +0 -1
  286. package/out/types/CurrencyAmountV2.mjs +0 -49
  287. package/out/types/CurrencyAmountV2.mjs.map +0 -1
  288. package/out/types/EconomicalProtocolHash.d.mjs +0 -1
  289. package/out/types/EconomicalProtocolHash.d.mjs.map +0 -1
  290. package/out/types/EconomicalProtocolHash.mjs +0 -49
  291. package/out/types/EconomicalProtocolHash.mjs.map +0 -1
  292. package/out/types/Environment.d.mjs +0 -1
  293. package/out/types/Environment.d.mjs.map +0 -1
  294. package/out/types/Environment.mjs +0 -49
  295. package/out/types/Environment.mjs.map +0 -1
  296. package/out/types/EphemeralState.d.mjs +0 -1
  297. package/out/types/EphemeralState.d.mjs.map +0 -1
  298. package/out/types/EphemeralState.mjs +0 -49
  299. package/out/types/EphemeralState.mjs.map +0 -1
  300. package/out/types/Faucet.d.mjs +0 -1
  301. package/out/types/Faucet.d.mjs.map +0 -1
  302. package/out/types/Faucet.mjs +0 -49
  303. package/out/types/Faucet.mjs.map +0 -1
  304. package/out/types/HumanReadableIdentifier.d.mjs +0 -1
  305. package/out/types/HumanReadableIdentifier.d.mjs.map +0 -1
  306. package/out/types/HumanReadableIdentifier.mjs +0 -49
  307. package/out/types/HumanReadableIdentifier.mjs.map +0 -1
  308. package/out/types/InstalledPlugin.d.mjs +0 -1
  309. package/out/types/InstalledPlugin.d.mjs.map +0 -1
  310. package/out/types/InstalledPlugin.mjs +0 -49
  311. package/out/types/InstalledPlugin.mjs.map +0 -1
  312. package/out/types/LoadedConfig.d.mjs +0 -1
  313. package/out/types/LoadedConfig.d.mjs.map +0 -1
  314. package/out/types/LoadedConfig.mjs +0 -49
  315. package/out/types/LoadedConfig.mjs.map +0 -1
  316. package/out/types/MetadataConfig.d.mjs +0 -1
  317. package/out/types/MetadataConfig.d.mjs.map +0 -1
  318. package/out/types/MetadataConfig.mjs +0 -49
  319. package/out/types/MetadataConfig.mjs.map +0 -1
  320. package/out/types/NetworkAccountConfig.d.mjs +0 -1
  321. package/out/types/NetworkAccountConfig.d.mjs.map +0 -1
  322. package/out/types/NetworkAccountConfig.mjs +0 -49
  323. package/out/types/NetworkAccountConfig.mjs.map +0 -1
  324. package/out/types/NetworkConfig.d.mjs +0 -1
  325. package/out/types/NetworkConfig.d.mjs.map +0 -1
  326. package/out/types/NetworkConfig.mjs +0 -49
  327. package/out/types/NetworkConfig.mjs.map +0 -1
  328. package/out/types/NonEmptyString.d.mjs +0 -1
  329. package/out/types/NonEmptyString.d.mjs.map +0 -1
  330. package/out/types/NonEmptyString.mjs +0 -49
  331. package/out/types/NonEmptyString.mjs.map +0 -1
  332. package/out/types/Operation.d.mjs +0 -1
  333. package/out/types/Operation.d.mjs.map +0 -1
  334. package/out/types/Operation.mjs +0 -49
  335. package/out/types/Operation.mjs.map +0 -1
  336. package/out/types/Option.d.mjs +0 -1
  337. package/out/types/Option.d.mjs.map +0 -1
  338. package/out/types/Option.mjs +0 -49
  339. package/out/types/Option.mjs.map +0 -1
  340. package/out/types/ParsedConfig.d.mjs +0 -1
  341. package/out/types/ParsedConfig.d.mjs.map +0 -1
  342. package/out/types/ParsedConfig.mjs +0 -49
  343. package/out/types/ParsedConfig.mjs.map +0 -1
  344. package/out/types/ParsedOperation.d.mjs +0 -1
  345. package/out/types/ParsedOperation.d.mjs.map +0 -1
  346. package/out/types/ParsedOperation.mjs +0 -49
  347. package/out/types/ParsedOperation.mjs.map +0 -1
  348. package/out/types/ParsedTemplate.d.mjs +0 -1
  349. package/out/types/ParsedTemplate.d.mjs.map +0 -1
  350. package/out/types/ParsedTemplate.mjs +0 -49
  351. package/out/types/ParsedTemplate.mjs.map +0 -1
  352. package/out/types/PersistedOperation.d.mjs +0 -1
  353. package/out/types/PersistedOperation.d.mjs.map +0 -1
  354. package/out/types/PersistedOperation.mjs +0 -49
  355. package/out/types/PersistedOperation.mjs.map +0 -1
  356. package/out/types/PersistedTask.d.mjs +0 -1
  357. package/out/types/PersistedTask.d.mjs.map +0 -1
  358. package/out/types/PersistedTask.mjs +0 -49
  359. package/out/types/PersistedTask.mjs.map +0 -1
  360. package/out/types/PersistentState.d.mjs +0 -1
  361. package/out/types/PersistentState.d.mjs.map +0 -1
  362. package/out/types/PersistentState.mjs +0 -49
  363. package/out/types/PersistentState.mjs.map +0 -1
  364. package/out/types/PluginActionName.d.mjs +0 -1
  365. package/out/types/PluginActionName.d.mjs.map +0 -1
  366. package/out/types/PluginActionName.mjs +0 -49
  367. package/out/types/PluginActionName.mjs.map +0 -1
  368. package/out/types/PluginDependenciesResponse.d.mjs +0 -1
  369. package/out/types/PluginDependenciesResponse.d.mjs.map +0 -1
  370. package/out/types/PluginDependenciesResponse.mjs +0 -49
  371. package/out/types/PluginDependenciesResponse.mjs.map +0 -1
  372. package/out/types/PluginInfo.d.mjs +0 -1
  373. package/out/types/PluginInfo.d.mjs.map +0 -1
  374. package/out/types/PluginInfo.mjs +0 -49
  375. package/out/types/PluginInfo.mjs.map +0 -1
  376. package/out/types/PluginJsonResponse.d.mjs +0 -1
  377. package/out/types/PluginJsonResponse.d.mjs.map +0 -1
  378. package/out/types/PluginJsonResponse.mjs +0 -49
  379. package/out/types/PluginJsonResponse.mjs.map +0 -1
  380. package/out/types/PluginProxyResponse.d.mjs +0 -1
  381. package/out/types/PluginProxyResponse.d.mjs.map +0 -1
  382. package/out/types/PluginProxyResponse.mjs +0 -49
  383. package/out/types/PluginProxyResponse.mjs.map +0 -1
  384. package/out/types/PluginResponseEncoding.d.mjs +0 -1
  385. package/out/types/PluginResponseEncoding.d.mjs.map +0 -1
  386. package/out/types/PluginResponseEncoding.mjs +0 -49
  387. package/out/types/PluginResponseEncoding.mjs.map +0 -1
  388. package/out/types/PluginSchema.d.mjs +0 -1
  389. package/out/types/PluginSchema.d.mjs.map +0 -1
  390. package/out/types/PluginSchema.mjs +0 -49
  391. package/out/types/PluginSchema.mjs.map +0 -1
  392. package/out/types/PositionalArg.d.mjs +0 -1
  393. package/out/types/PositionalArg.d.mjs.map +0 -1
  394. package/out/types/PositionalArg.mjs +0 -49
  395. package/out/types/PositionalArg.mjs.map +0 -1
  396. package/out/types/Provisioner.d.mjs +0 -1
  397. package/out/types/Provisioner.d.mjs.map +0 -1
  398. package/out/types/Provisioner.mjs +0 -49
  399. package/out/types/Provisioner.mjs.map +0 -1
  400. package/out/types/ProvisionerID.d.mjs +0 -1
  401. package/out/types/ProvisionerID.d.mjs.map +0 -1
  402. package/out/types/ProvisionerID.mjs +0 -49
  403. package/out/types/ProvisionerID.mjs.map +0 -1
  404. package/out/types/Provisions.d.mjs +0 -1
  405. package/out/types/Provisions.d.mjs.map +0 -1
  406. package/out/types/Provisions.mjs +0 -49
  407. package/out/types/Provisions.mjs.map +0 -1
  408. package/out/types/ProxyTaskArgs.d.mjs +0 -1
  409. package/out/types/ProxyTaskArgs.d.mjs.map +0 -1
  410. package/out/types/ProxyTaskArgs.mjs +0 -49
  411. package/out/types/ProxyTaskArgs.mjs.map +0 -1
  412. package/out/types/ProxyTemplateArgs.d.mjs +0 -1
  413. package/out/types/ProxyTemplateArgs.d.mjs.map +0 -1
  414. package/out/types/ProxyTemplateArgs.mjs +0 -49
  415. package/out/types/ProxyTemplateArgs.mjs.map +0 -1
  416. package/out/types/PublicKeyHash.d.mjs +0 -1
  417. package/out/types/PublicKeyHash.d.mjs.map +0 -1
  418. package/out/types/PublicKeyHash.mjs +0 -49
  419. package/out/types/PublicKeyHash.mjs.map +0 -1
  420. package/out/types/RequestArgs.d.mjs +0 -1
  421. package/out/types/RequestArgs.d.mjs.map +0 -1
  422. package/out/types/RequestArgs.mjs +0 -49
  423. package/out/types/RequestArgs.mjs.map +0 -1
  424. package/out/types/RuntimeDependency.d.mjs +0 -1
  425. package/out/types/RuntimeDependency.d.mjs.map +0 -1
  426. package/out/types/RuntimeDependency.mjs +0 -49
  427. package/out/types/RuntimeDependency.mjs.map +0 -1
  428. package/out/types/RuntimeDependencyReport.d.mjs +0 -1
  429. package/out/types/RuntimeDependencyReport.d.mjs.map +0 -1
  430. package/out/types/RuntimeDependencyReport.mjs +0 -49
  431. package/out/types/RuntimeDependencyReport.mjs.map +0 -1
  432. package/out/types/SHA256.d.mjs +0 -1
  433. package/out/types/SHA256.d.mjs.map +0 -1
  434. package/out/types/SHA256.mjs +0 -49
  435. package/out/types/SHA256.mjs.map +0 -1
  436. package/out/types/SandboxAccountConfig.d.mjs +0 -1
  437. package/out/types/SandboxAccountConfig.d.mjs.map +0 -1
  438. package/out/types/SandboxAccountConfig.mjs +0 -49
  439. package/out/types/SandboxAccountConfig.mjs.map +0 -1
  440. package/out/types/SandboxConfig.d.mjs +0 -1
  441. package/out/types/SandboxConfig.d.mjs.map +0 -1
  442. package/out/types/SandboxConfig.mjs +0 -49
  443. package/out/types/SandboxConfig.mjs.map +0 -1
  444. package/out/types/SanitizedAbsPath.d.mjs +0 -1
  445. package/out/types/SanitizedAbsPath.d.mjs.map +0 -1
  446. package/out/types/SanitizedAbsPath.mjs +0 -49
  447. package/out/types/SanitizedAbsPath.mjs.map +0 -1
  448. package/out/types/SanitizedArgs.d.mjs +0 -1
  449. package/out/types/SanitizedArgs.d.mjs.map +0 -1
  450. package/out/types/SanitizedArgs.mjs +0 -49
  451. package/out/types/SanitizedArgs.mjs.map +0 -1
  452. package/out/types/SanitizedPath.d.mjs +0 -1
  453. package/out/types/SanitizedPath.d.mjs.map +0 -1
  454. package/out/types/SanitizedPath.mjs +0 -49
  455. package/out/types/SanitizedPath.mjs.map +0 -1
  456. package/out/types/ScaffoldConfig.d.mjs +0 -1
  457. package/out/types/ScaffoldConfig.d.mjs.map +0 -1
  458. package/out/types/ScaffoldConfig.mjs +0 -49
  459. package/out/types/ScaffoldConfig.mjs.map +0 -1
  460. package/out/types/Settings.d.mjs +0 -1
  461. package/out/types/Settings.d.mjs.map +0 -1
  462. package/out/types/Settings.mjs +0 -49
  463. package/out/types/Settings.mjs.map +0 -1
  464. package/out/types/SingleChar.d.mjs +0 -1
  465. package/out/types/SingleChar.d.mjs.map +0 -1
  466. package/out/types/SingleChar.mjs +0 -49
  467. package/out/types/SingleChar.mjs.map +0 -1
  468. package/out/types/Task.d.mjs +0 -1
  469. package/out/types/Task.d.mjs.map +0 -1
  470. package/out/types/Task.mjs +0 -49
  471. package/out/types/Task.mjs.map +0 -1
  472. package/out/types/Template.d.mjs +0 -1
  473. package/out/types/Template.d.mjs.map +0 -1
  474. package/out/types/Template.mjs +0 -49
  475. package/out/types/Template.mjs.map +0 -1
  476. package/out/types/Timestamp.d.mjs +0 -1
  477. package/out/types/Timestamp.d.mjs.map +0 -1
  478. package/out/types/Timestamp.mjs +0 -49
  479. package/out/types/Timestamp.mjs.map +0 -1
  480. package/out/types/Tz.d.mjs +0 -1
  481. package/out/types/Tz.d.mjs.map +0 -1
  482. package/out/types/Tz.mjs +0 -49
  483. package/out/types/Tz.mjs.map +0 -1
  484. package/out/types/TzKtConfig.d.mjs +0 -1
  485. package/out/types/TzKtConfig.d.mjs.map +0 -1
  486. package/out/types/TzKtConfig.mjs +0 -49
  487. package/out/types/TzKtConfig.mjs.map +0 -1
  488. package/out/types/Url.d.mjs +0 -1
  489. package/out/types/Url.d.mjs.map +0 -1
  490. package/out/types/Url.mjs +0 -49
  491. package/out/types/Url.mjs.map +0 -1
  492. package/out/types/Verb.d.mjs +0 -1
  493. package/out/types/Verb.d.mjs.map +0 -1
  494. package/out/types/Verb.mjs +0 -49
  495. package/out/types/Verb.mjs.map +0 -1
  496. package/out/types/VersionNumber.d.mjs +0 -1
  497. package/out/types/VersionNumber.d.mjs.map +0 -1
  498. package/out/types/VersionNumber.mjs +0 -49
  499. package/out/types/VersionNumber.mjs.map +0 -1
  500. package/out/types-strict.d.mjs +0 -1
  501. package/out/types-strict.d.mjs.map +0 -1
  502. package/out/types-strict.mjs +0 -1
  503. package/out/types-strict.mjs.map +0 -1
  504. package/out/types-zod.d.mjs +0 -1
  505. package/out/types-zod.d.mjs.map +0 -1
  506. package/out/types-zod.mjs +0 -416
  507. package/out/types-zod.mjs.map +0 -1
  508. package/taqueria-protocol-types.mjs +0 -76
  509. package/taqueria-protocol-types.mjs.map +0 -1
  510. package/types-config-files.mjs +0 -239
  511. package/types-config-files.mjs.map +0 -1
  512. package/types.mjs +0 -1
  513. package/types.mjs.map +0 -1
  514. package/tzkt-config.mjs +0 -28
  515. package/tzkt-config.mjs.map +0 -1
package/Base.js CHANGED
@@ -29,10 +29,11 @@ var import_TaqError = require("@taqueria/protocol/TaqError");
29
29
  var import_fluture = require("fluture");
30
30
  var import_zod = require("zod");
31
31
  var createSchema = (params) => {
32
+ var _a, _b;
32
33
  const { rawSchema, isStringLike } = params;
33
- const internalSchema = params.internalSchema ?? params.rawSchema;
34
+ const internalSchema = (_a = params.internalSchema) != null ? _a : params.rawSchema;
34
35
  const noop = (val) => val;
35
- const transformer = params.transformer ?? noop;
36
+ const transformer = (_b = params.transformer) != null ? _b : noop;
36
37
  const schema = isStringLike ? internalSchema.transform(
37
38
  (val) => transformer(val)
38
39
  ) : internalSchema.transform(
@@ -75,9 +76,4 @@ var createType = (params) => {
75
76
  };
76
77
  };
77
78
  var Base_default = createType;
78
- // Annotate the CommonJS export names for ESM import in node:
79
- 0 && (module.exports = {
80
- createSchema,
81
- createType
82
- });
83
79
  //# sourceMappingURL=Base.js.map
package/Base.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["Base.ts"],"sourcesContent":["import { toFutureParseErr, toFutureParseUnknownErr } from '@taqueria/protocol/TaqError';\nimport { FutureInstance, resolve } from 'fluture';\nimport { z, ZodError, ZodSchema } from 'zod';\n\ntype Future<L, R> = FutureInstance<L, R>;\n\ntype ErrMsg = string | ((value: unknown, previous?: unknown) => string);\n\ninterface CreateSchemaParams {\n\trawSchema: ZodSchema;\n\tinternalSchema?: ZodSchema;\n\ttransformer?: (value: unknown) => unknown;\n\tisStringLike?: boolean;\n}\n\ninterface CreateTypeParams extends CreateSchemaParams {\n\tparseErrMsg: ErrMsg;\n\tunknownErrMsg: ErrMsg;\n}\nexport type Flatten<T> = { [k in keyof T]: T[k] };\n\nexport const createSchema = <I>(params: CreateSchemaParams) => {\n\tconst { rawSchema, isStringLike } = params;\n\tconst internalSchema = params.internalSchema ?? params.rawSchema;\n\tconst noop = (val: unknown) => val;\n\tconst transformer = params.transformer ?? noop;\n\n\tconst schema = isStringLike\n\t\t? internalSchema\n\t\t\t.transform((val: unknown) =>\n\t\t\t\ttransformer(val) as I & {\n\t\t\t\t\treadonly __type: 'generated' & z.infer<typeof internalSchema>;\n\t\t\t\t}\n\t\t\t)\n\t\t: internalSchema\n\t\t\t.transform((val: unknown) =>\n\t\t\t\ttransformer(val) as Flatten<\n\t\t\t\t\tI & {\n\t\t\t\t\t\treadonly __type: 'generated' & z.infer<typeof internalSchema>;\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t);\n\n\ttype GeneratedSchema = typeof schema;\n\n\treturn {\n\t\trawSchema,\n\t\tinternalSchema,\n\t\tschema,\n\t};\n};\n\n// TODO:\n// TypeScript appears to have a bug with default generic values\n// For instance, I'd like to use this:\n// export const createType = <R, I = R>(params: CreateTypeParams) => {\n//\n// However, I == unknown when having I default to R if no I was given.\n// So, we need to require R and I explicitly\nexport const createType = <R, I>(params: CreateTypeParams) => {\n\tconst schemas = createSchema<I>(params);\n\tconst { parseErrMsg, unknownErrMsg } = params;\n\n\ttype T = z.infer<typeof schemas.schema>;\n\n\tconst internalOf = (input: unknown) => {\n\t\ttry {\n\t\t\treturn resolve<T>(schemas.schema.parse(input));\n\t\t} catch (previous) {\n\t\t\tconst parseMsg = typeof parseErrMsg === 'string'\n\t\t\t\t? parseErrMsg\n\t\t\t\t: parseErrMsg(input, previous);\n\n\t\t\tconst unknownMsg = typeof unknownErrMsg === 'string'\n\t\t\t\t? unknownErrMsg\n\t\t\t\t: unknownErrMsg(input);\n\n\t\t\tif (previous instanceof ZodError) {\n\t\t\t\treturn toFutureParseErr<T>(previous, parseMsg, input);\n\t\t\t}\n\t\t\treturn toFutureParseUnknownErr<T>(previous, unknownMsg, input);\n\t\t}\n\t};\n\tconst of = internalOf;\n\n\tconst make = (input: I) => internalOf(input);\n\n\tconst create = (input: R | I) => schemas.schema.parse(input) as T;\n\n\tconst from = (input: unknown) => schemas.schema.parse(input) as T;\n\n\tconst factory = {\n\t\tmake,\n\t\tof,\n\t\tcreate,\n\t\tfrom,\n\t};\n\n\treturn {\n\t\tschemas,\n\t\tfactory,\n\t};\n};\n\nexport default createType;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA0D;AAC1D,qBAAwC;AACxC,iBAAuC;AAmBhC,IAAM,eAAe,CAAI,WAA+B;AAC9D,QAAM,EAAE,WAAW,aAAa,IAAI;AACpC,QAAM,iBAAiB,OAAO,kBAAkB,OAAO;AACvD,QAAM,OAAO,CAAC,QAAiB;AAC/B,QAAM,cAAc,OAAO,eAAe;AAE1C,QAAM,SAAS,eACZ,eACA;AAAA,IAAU,CAAC,QACX,YAAY,GAAG;AAAA,EAGhB,IACC,eACA;AAAA,IAAU,CAAC,QACX,YAAY,GAAG;AAAA,EAKhB;AAIF,SAAO;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD;AASO,IAAM,aAAa,CAAO,WAA6B;AAC7D,QAAM,UAAU,aAAgB,MAAM;AACtC,QAAM,EAAE,aAAa,cAAc,IAAI;AAIvC,QAAM,aAAa,CAAC,UAAmB;AACtC,QAAI;AACH,iBAAO,wBAAW,QAAQ,OAAO,MAAM,KAAK,CAAC;AAAA,IAC9C,SAAS,UAAP;AACD,YAAM,WAAW,OAAO,gBAAgB,WACrC,cACA,YAAY,OAAO,QAAQ;AAE9B,YAAM,aAAa,OAAO,kBAAkB,WACzC,gBACA,cAAc,KAAK;AAEtB,UAAI,oBAAoB,qBAAU;AACjC,mBAAO,kCAAoB,UAAU,UAAU,KAAK;AAAA,MACrD;AACA,iBAAO,yCAA2B,UAAU,YAAY,KAAK;AAAA,IAC9D;AAAA,EACD;AACA,QAAM,KAAK;AAEX,QAAM,OAAO,CAAC,UAAa,WAAW,KAAK;AAE3C,QAAM,SAAS,CAAC,UAAiB,QAAQ,OAAO,MAAM,KAAK;AAE3D,QAAM,OAAO,CAAC,UAAmB,QAAQ,OAAO,MAAM,KAAK;AAE3D,QAAM,UAAU;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAEA,SAAO;AAAA,IACN;AAAA,IACA;AAAA,EACD;AACD;AAEA,IAAO,eAAQ;","names":[]}
1
+ {"version":3,"sources":["Base.ts"],"sourcesContent":["import { toFutureParseErr, toFutureParseUnknownErr } from '@taqueria/protocol/TaqError';\nimport { FutureInstance, resolve } from 'fluture';\nimport { z, ZodError, ZodSchema } from 'zod';\n\ntype Future<L, R> = FutureInstance<L, R>;\n\ntype ErrMsg = string | ((value: unknown, previous?: unknown) => string);\n\ninterface CreateSchemaParams {\n\trawSchema: ZodSchema;\n\tinternalSchema?: ZodSchema;\n\ttransformer?: (value: unknown) => unknown;\n\tisStringLike?: boolean;\n}\n\ninterface CreateTypeParams extends CreateSchemaParams {\n\tparseErrMsg: ErrMsg;\n\tunknownErrMsg: ErrMsg;\n}\nexport type Flatten<T> = { [k in keyof T]: T[k] };\n\nexport const createSchema = <I>(params: CreateSchemaParams) => {\n\tconst { rawSchema, isStringLike } = params;\n\tconst internalSchema = params.internalSchema ?? params.rawSchema;\n\tconst noop = (val: unknown) => val;\n\tconst transformer = params.transformer ?? noop;\n\n\tconst schema = isStringLike\n\t\t? internalSchema\n\t\t\t.transform((val: unknown) =>\n\t\t\t\ttransformer(val) as I & {\n\t\t\t\t\treadonly __type: 'generated' & z.infer<typeof internalSchema>;\n\t\t\t\t}\n\t\t\t)\n\t\t: internalSchema\n\t\t\t.transform((val: unknown) =>\n\t\t\t\ttransformer(val) as Flatten<\n\t\t\t\t\tI & {\n\t\t\t\t\t\treadonly __type: 'generated' & z.infer<typeof internalSchema>;\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t);\n\n\ttype GeneratedSchema = typeof schema;\n\n\treturn {\n\t\trawSchema,\n\t\tinternalSchema,\n\t\tschema,\n\t};\n};\n\n// TODO:\n// TypeScript appears to have a bug with default generic values\n// For instance, I'd like to use this:\n// export const createType = <R, I = R>(params: CreateTypeParams) => {\n//\n// However, I == unknown when having I default to R if no I was given.\n// So, we need to require R and I explicitly\nexport const createType = <R, I>(params: CreateTypeParams) => {\n\tconst schemas = createSchema<I>(params);\n\tconst { parseErrMsg, unknownErrMsg } = params;\n\n\ttype T = z.infer<typeof schemas.schema>;\n\n\tconst internalOf = (input: unknown) => {\n\t\ttry {\n\t\t\treturn resolve<T>(schemas.schema.parse(input));\n\t\t} catch (previous) {\n\t\t\tconst parseMsg = typeof parseErrMsg === 'string'\n\t\t\t\t? parseErrMsg\n\t\t\t\t: parseErrMsg(input, previous);\n\n\t\t\tconst unknownMsg = typeof unknownErrMsg === 'string'\n\t\t\t\t? unknownErrMsg\n\t\t\t\t: unknownErrMsg(input);\n\n\t\t\tif (previous instanceof ZodError) {\n\t\t\t\treturn toFutureParseErr<T>(previous, parseMsg, input);\n\t\t\t}\n\t\t\treturn toFutureParseUnknownErr<T>(previous, unknownMsg, input);\n\t\t}\n\t};\n\tconst of = internalOf;\n\n\tconst make = (input: I) => internalOf(input);\n\n\tconst create = (input: R | I) => schemas.schema.parse(input) as T;\n\n\tconst from = (input: unknown) => schemas.schema.parse(input) as T;\n\n\tconst factory = {\n\t\tmake,\n\t\tof,\n\t\tcreate,\n\t\tfrom,\n\t};\n\n\treturn {\n\t\tschemas,\n\t\tfactory,\n\t};\n};\n\nexport default createType;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA0D;AAC1D,qBAAwC;AACxC,iBAAuC;AAmBhC,IAAM,eAAe,CAAI,WAA+B;AArB/D;AAsBC,QAAM,EAAE,WAAW,aAAa,IAAI;AACpC,QAAM,kBAAiB,YAAO,mBAAP,YAAyB,OAAO;AACvD,QAAM,OAAO,CAAC,QAAiB;AAC/B,QAAM,eAAc,YAAO,gBAAP,YAAsB;AAE1C,QAAM,SAAS,eACZ,eACA;AAAA,IAAU,CAAC,QACX,YAAY,GAAG;AAAA,EAGhB,IACC,eACA;AAAA,IAAU,CAAC,QACX,YAAY,GAAG;AAAA,EAKhB;AAIF,SAAO;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD;AASO,IAAM,aAAa,CAAO,WAA6B;AAC7D,QAAM,UAAU,aAAgB,MAAM;AACtC,QAAM,EAAE,aAAa,cAAc,IAAI;AAIvC,QAAM,aAAa,CAAC,UAAmB;AACtC,QAAI;AACH,iBAAO,wBAAW,QAAQ,OAAO,MAAM,KAAK,CAAC;AAAA,IAC9C,SAAS,UAAP;AACD,YAAM,WAAW,OAAO,gBAAgB,WACrC,cACA,YAAY,OAAO,QAAQ;AAE9B,YAAM,aAAa,OAAO,kBAAkB,WACzC,gBACA,cAAc,KAAK;AAEtB,UAAI,oBAAoB,qBAAU;AACjC,mBAAO,kCAAoB,UAAU,UAAU,KAAK;AAAA,MACrD;AACA,iBAAO,yCAA2B,UAAU,YAAY,KAAK;AAAA,IAC9D;AAAA,EACD;AACA,QAAM,KAAK;AAEX,QAAM,OAAO,CAAC,UAAa,WAAW,KAAK;AAE3C,QAAM,SAAS,CAAC,UAAiB,QAAQ,OAAO,MAAM,KAAK;AAE3D,QAAM,OAAO,CAAC,UAAmB,QAAQ,OAAO,MAAM,KAAK;AAE3D,QAAM,UAAU;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAEA,SAAO;AAAA,IACN;AAAA,IACA;AAAA,EACD;AACD;AAEA,IAAO,eAAQ;","names":[]}
@@ -0,0 +1,2 @@
1
+ export * from '@taqueria/protocol/out/types/ConfigEnvironmentFileV2';
2
+ //# sourceMappingURL=ConfigEnvironmentFileV2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfigEnvironmentFileV2.d.ts","sourceRoot":"","sources":["ConfigEnvironmentFileV2.ts"],"names":[],"mappings":"AAAA,cAAc,sDAAsD,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+
17
+ // ConfigEnvironmentFileV2.ts
18
+ var ConfigEnvironmentFileV2_exports = {};
19
+ module.exports = __toCommonJS(ConfigEnvironmentFileV2_exports);
20
+ __reExport(ConfigEnvironmentFileV2_exports, require("@taqueria/protocol/out/types/ConfigEnvironmentFileV2"), module.exports);
21
+ //# sourceMappingURL=ConfigEnvironmentFileV2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ConfigEnvironmentFileV2.ts"],"sourcesContent":["export * from '@taqueria/protocol/out/types/ConfigEnvironmentFileV2';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,4CAAc,iEAAd;","names":[]}
@@ -0,0 +1,2 @@
1
+ export * from '@taqueria/protocol/out/types/ConfigFileV2';
2
+ //# sourceMappingURL=ConfigFileV2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfigFileV2.d.ts","sourceRoot":"","sources":["ConfigFileV2.ts"],"names":[],"mappings":"AAAA,cAAc,2CAA2C,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+
17
+ // ConfigFileV2.ts
18
+ var ConfigFileV2_exports = {};
19
+ module.exports = __toCommonJS(ConfigFileV2_exports);
20
+ __reExport(ConfigFileV2_exports, require("@taqueria/protocol/out/types/ConfigFileV2"), module.exports);
21
+ //# sourceMappingURL=ConfigFileV2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ConfigFileV2.ts"],"sourcesContent":["export * from '@taqueria/protocol/out/types/ConfigFileV2';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,iCAAc,sDAAd;","names":[]}
package/EphemeralState.js CHANGED
@@ -248,20 +248,10 @@ var mapTemplatesToPlugins = (config, pluginInfo, i18n) => {
248
248
  ).pipe((0, import_fluture.mapRej)((rej) => rej));
249
249
  };
250
250
  var getTasks = (pluginInfo) => pluginInfo.reduce(
251
- (retval, pluginInfo2) => [...retval, ...pluginInfo2.tasks ?? []],
251
+ (retval, pluginInfo2) => {
252
+ var _a;
253
+ return [...retval, ...(_a = pluginInfo2.tasks) != null ? _a : []];
254
+ },
252
255
  []
253
256
  );
254
- // Annotate the CommonJS export names for ESM import in node:
255
- 0 && (module.exports = {
256
- create,
257
- factory,
258
- generatedSchemas,
259
- getTasks,
260
- make,
261
- mapOperationsToPlugins,
262
- mapTasksToPlugins,
263
- mapTemplatesToPlugins,
264
- of,
265
- schemas
266
- });
267
257
  //# sourceMappingURL=EphemeralState.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["EphemeralState.ts"],"sourcesContent":["import {\n\tCommand,\n\tConfig,\n\tInstalledPlugin,\n\tNonEmptyString,\n\tOption,\n\tParsedOperation,\n\tParsedTemplate,\n\tPluginInfo,\n\tPluginResponseEncoding,\n\tTask,\n\tVerb,\n} from '@taqueria/protocol';\nimport createType from '@taqueria/protocol/Base';\nimport type { i18n } from '@taqueria/protocol/i18n';\nimport { E_TaqError, TaqError } from '@taqueria/protocol/TaqError';\nimport { attemptP, FutureInstance as Future, mapRej, promise } from 'fluture';\nimport { z } from 'zod';\n\nconst eager = <T>(f: Future<TaqError, T>) =>\n\tpromise(\n\t\tmapRej((err: TaqError) => new E_TaqError(err))(f),\n\t);\n\nconst taskToPluginMap = z.record(\n\tz.union([\n\t\tInstalledPlugin.schemas.schema,\n\t\tTask.schemas.schema,\n\t], { description: 'Task/Plugin Mapping' }),\n);\nconst operationToPluginMap = z.record(\n\tz.union([\n\t\tInstalledPlugin.schemas.schema,\n\t\tParsedOperation.schemas.schema,\n\t], { description: 'Operation/Plugin Mapping' }),\n);\n\nconst templateToPluginMap = z.record(\n\tz.union([\n\t\tInstalledPlugin.schemas.schema,\n\t\tParsedTemplate.schemas.schema,\n\t]),\n);\n\nconst rawSchema = z.object({\n\tbuild: z.string({ description: 'cache.build' }),\n\tconfigHash: z.string({ description: 'cache.configHash' }),\n\ttasks: taskToPluginMap,\n\toperations: operationToPluginMap,\n\ttemplates: templateToPluginMap,\n\tplugins: z.array(PluginInfo.schemas.schema, { description: 'cache.plugins' }),\n}).describe('Ephemeral State');\n\ntype RawInput = z.infer<typeof rawSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, RawInput>({\n\trawSchema,\n\tparseErrMsg: (value: unknown) => `${value} is not a valid representation of ephemeral state`,\n\tunknownErrMsg: 'Something went wrong when parsing the ephemeral state',\n});\n\nexport type EphemeralState = z.infer<typeof generatedSchemas.schema>;\nexport type t = EphemeralState;\nexport type TaskToPluginMap = z.infer<typeof taskToPluginMap>;\nexport type OpToPluginMap = z.infer<typeof operationToPluginMap>;\nexport type TemplateToPluginMap = z.infer<typeof templateToPluginMap>;\n\nexport const { create, of, make } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as EphemeralState),\n};\n\n/**\n * Private functions\n */\ntype Counts = Record<Verb.t, PluginInfo.t[]>;\nconst getTaskCounts = (pluginInfo: PluginInfo.t[]): Counts => {\n\treturn pluginInfo.reduce(\n\t\t(retval, pluginInfo) =>\n\t\t\tpluginInfo.tasks === undefined\n\t\t\t\t? {}\n\t\t\t\t: pluginInfo.tasks.reduce(\n\t\t\t\t\t(retval: Counts, task: Task.t) => {\n\t\t\t\t\t\tconst taskName = task.task;\n\t\t\t\t\t\tconst providers: PluginInfo.t[] = retval[taskName]\n\t\t\t\t\t\t\t? [...retval[taskName], pluginInfo]\n\t\t\t\t\t\t\t: [pluginInfo];\n\t\t\t\t\t\tconst mapping: Counts = {};\n\t\t\t\t\t\tmapping[taskName] = providers.filter(provider => provider !== undefined);\n\t\t\t\t\t\treturn { ...retval, ...mapping };\n\t\t\t\t\t},\n\t\t\t\t\tretval,\n\t\t\t\t),\n\t\t{} as Counts,\n\t);\n};\n\nconst getTemplateCounts = (pluginInfo: PluginInfo.t[]): Counts => {\n\treturn pluginInfo.reduce(\n\t\t(retval, pluginInfo) =>\n\t\t\t!pluginInfo.templates\n\t\t\t\t? retval\n\t\t\t\t: pluginInfo.templates.reduce(\n\t\t\t\t\t(retval: Counts, template: ParsedTemplate.t) => {\n\t\t\t\t\t\tconst templateName = template.template;\n\t\t\t\t\t\tconst providers = retval[templateName]\n\t\t\t\t\t\t\t? [...retval[templateName], pluginInfo]\n\t\t\t\t\t\t\t: [pluginInfo];\n\t\t\t\t\t\tconst mapping: Counts = {};\n\t\t\t\t\t\tmapping[templateName] = providers.filter(provider => provider !== undefined);\n\t\t\t\t\t\treturn { ...retval, ...mapping };\n\t\t\t\t\t},\n\t\t\t\t\tretval,\n\t\t\t\t),\n\t\t{} as Counts,\n\t);\n};\n\nconst getOperationCounts = (pluginInfo: PluginInfo.t[]): Counts => {\n\treturn pluginInfo.reduce(\n\t\t(retval, pluginInfo) =>\n\t\t\tpluginInfo.operations === undefined\n\t\t\t\t? retval\n\t\t\t\t: pluginInfo.operations.reduce(\n\t\t\t\t\t(retval: Counts, operation: ParsedOperation.t) => {\n\t\t\t\t\t\tconst operationName = operation.operation;\n\t\t\t\t\t\tconst providers = retval[operationName]\n\t\t\t\t\t\t\t? [...retval[operationName], pluginInfo]\n\t\t\t\t\t\t\t: [pluginInfo];\n\t\t\t\t\t\tconst mapping: Counts = {};\n\t\t\t\t\t\tmapping[operationName] = providers.filter(provider => provider !== undefined);\n\t\t\t\t\t\treturn { ...retval, ...mapping };\n\t\t\t\t\t},\n\t\t\t\t\tretval,\n\t\t\t\t),\n\t\t{} as Counts,\n\t);\n};\n\nconst toChoices = (plugins: PluginInfo.t[]) =>\n\tplugins.reduce(\n\t\t(retval, pluginInfo) => {\n\t\t\treturn [...retval, pluginInfo.name as NonEmptyString.t, pluginInfo.alias as NonEmptyString.t];\n\t\t},\n\t\t[] as NonEmptyString.t[],\n\t);\n\nconst isComposite = (name: Verb.t, counts: Counts) => counts[name] && counts[name].length > 1;\n\nconst getInstalledPlugin = (config: Config.t, name: string) =>\n\tconfig.plugins?.find(\n\t\t(plugin: InstalledPlugin.t) => [`taqueria-plugin-${name}`, name].includes(plugin.name),\n\t);\n\nexport const mapTasksToPlugins = (config: Config.t, pluginInfo: PluginInfo.t[], i18n: i18n) => {\n\tconst taskCounts = getTaskCounts(pluginInfo);\n\treturn attemptP<TaqError, TaskToPluginMap>(async () =>\n\t\tawait pluginInfo.reduce(\n\t\t\tasync (retval, pluginInfo) =>\n\t\t\t\t!pluginInfo.tasks\n\t\t\t\t\t? Promise.resolve({} as TaskToPluginMap)\n\t\t\t\t\t: await pluginInfo.tasks.reduce(\n\t\t\t\t\t\tasync (retval, { task, hidden }) => {\n\t\t\t\t\t\t\tif (isComposite(task, taskCounts)) {\n\t\t\t\t\t\t\t\tconst command = await eager(Command.make(task));\n\t\t\t\t\t\t\t\tconst compositeTask = await eager(Task.make({\n\t\t\t\t\t\t\t\t\ttask,\n\t\t\t\t\t\t\t\t\tcommand,\n\t\t\t\t\t\t\t\t\tdescription: await eager(NonEmptyString.make(i18n.__('providedByMany'))),\n\t\t\t\t\t\t\t\t\thidden,\n\t\t\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t\t\tawait eager(Option.make({\n\t\t\t\t\t\t\t\t\t\t\tflag: await eager(Verb.make('plugin')),\n\t\t\t\t\t\t\t\t\t\t\tdescription: await eager(\n\t\t\t\t\t\t\t\t\t\t\t\tNonEmptyString.make('Specify which plugin should be used to execute this task'),\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tchoices: toChoices(taskCounts[task]),\n\t\t\t\t\t\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\thandler: 'proxy',\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\treturn { ...await retval, [task]: compositeTask };\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Task is provided by just a single plugin\n\t\t\t\t\t\t\tconst installedPlugin = getInstalledPlugin(config, pluginInfo.name);\n\t\t\t\t\t\t\treturn installedPlugin\n\t\t\t\t\t\t\t\t? { ...await retval, [task]: installedPlugin }\n\t\t\t\t\t\t\t\t: retval;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tretval,\n\t\t\t\t\t),\n\t\t\tPromise.resolve({} as TaskToPluginMap),\n\t\t)\n\t).pipe(mapRej(rej => rej as TaqError));\n};\n\nexport const mapOperationsToPlugins = (config: Config.t, pluginInfo: PluginInfo.t[], i18n: i18n) => {\n\tconst opCounts = getOperationCounts(pluginInfo);\n\treturn attemptP(async () =>\n\t\tawait pluginInfo.reduce(\n\t\t\tasync (retval, pluginInfo) =>\n\t\t\t\t!pluginInfo.operations\n\t\t\t\t\t? Promise.resolve({} as OpToPluginMap)\n\t\t\t\t\t: await pluginInfo.operations.reduce(\n\t\t\t\t\t\tasync (retval, { operation }) => {\n\t\t\t\t\t\t\tif (isComposite(operation, opCounts)) {\n\t\t\t\t\t\t\t\tconst command = await eager(Command.make(operation));\n\t\t\t\t\t\t\t\tconst compositeOp = await eager(ParsedOperation.make({\n\t\t\t\t\t\t\t\t\toperation,\n\t\t\t\t\t\t\t\t\tcommand,\n\t\t\t\t\t\t\t\t\tdescription: await eager(NonEmptyString.make(i18n.__('providedByMany'))),\n\t\t\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t\t\tawait eager(Option.make({\n\t\t\t\t\t\t\t\t\t\t\tflag: await eager(Verb.make('plugin')),\n\t\t\t\t\t\t\t\t\t\t\tdescription: await eager(\n\t\t\t\t\t\t\t\t\t\t\t\tNonEmptyString.make('Specify which plugin should be used to execute this operation'),\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tchoices: toChoices(opCounts[operation]),\n\t\t\t\t\t\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\treturn { ...await retval, [operation]: compositeOp };\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Operation is provided by just a single plugin\n\t\t\t\t\t\t\tconst installedPlugin = getInstalledPlugin(config, pluginInfo.name);\n\t\t\t\t\t\t\treturn installedPlugin\n\t\t\t\t\t\t\t\t? { ...await retval, [operation]: installedPlugin }\n\t\t\t\t\t\t\t\t: retval;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tretval,\n\t\t\t\t\t),\n\t\t\tPromise.resolve({} as OpToPluginMap),\n\t\t)\n\t).pipe(mapRej(rej => rej as TaqError));\n};\n\nexport const mapTemplatesToPlugins = (config: Config.t, pluginInfo: PluginInfo.t[], i18n: i18n) => {\n\tconst tmplCounts = getTemplateCounts(pluginInfo);\n\treturn attemptP<TaqError, TemplateToPluginMap>(async () =>\n\t\tawait pluginInfo.reduce(\n\t\t\tasync (retval, pluginInfo) =>\n\t\t\t\t!pluginInfo.templates\n\t\t\t\t\t? Promise.resolve({} as TemplateToPluginMap)\n\t\t\t\t\t: await pluginInfo.templates!.reduce(\n\t\t\t\t\t\tasync (retval, { template, hidden }) => {\n\t\t\t\t\t\t\tif (isComposite(template, tmplCounts)) {\n\t\t\t\t\t\t\t\tconst command = await eager(Command.make(template));\n\t\t\t\t\t\t\t\tconst description = await eager(NonEmptyString.of(i18n.__('providedByMany')));\n\t\t\t\t\t\t\t\tconst compositeTmpl = await eager(ParsedTemplate.make({\n\t\t\t\t\t\t\t\t\ttemplate,\n\t\t\t\t\t\t\t\t\tcommand,\n\t\t\t\t\t\t\t\t\tdescription,\n\t\t\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t\t\tawait eager(Option.make({\n\t\t\t\t\t\t\t\t\t\t\tflag: await eager(Verb.make('plugin')),\n\t\t\t\t\t\t\t\t\t\t\tdescription: await eager(\n\t\t\t\t\t\t\t\t\t\t\t\tNonEmptyString.make('Specify which plugin should be used to execute this task'),\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tchoices: toChoices(tmplCounts[template]),\n\t\t\t\t\t\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\thandler: 'proxy',\n\t\t\t\t\t\t\t\t\tencoding: PluginResponseEncoding.create('none'),\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\treturn { ...await retval, [template]: compositeTmpl };\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Template is provided by just a single plugin\n\t\t\t\t\t\t\tconst installedPlugin = getInstalledPlugin(config, pluginInfo.name);\n\t\t\t\t\t\t\treturn installedPlugin\n\t\t\t\t\t\t\t\t? { ...await retval, [template]: installedPlugin }\n\t\t\t\t\t\t\t\t: retval;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tretval,\n\t\t\t\t\t),\n\t\t\tPromise.resolve({} as TemplateToPluginMap),\n\t\t)\n\t).pipe(mapRej(rej => rej as TaqError));\n};\n\nexport const getTasks = (pluginInfo: PluginInfo.t[]) =>\n\tpluginInfo.reduce(\n\t\t(retval: Task.t[], pluginInfo) => [...retval, ...(pluginInfo.tasks ?? [])],\n\t\t[],\n\t);\n"],"mappings":";;;;;;;;;;;;;;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AAAA,cACH;AAAA,cACA,SAAS;AAAA,cACT,UAAU,uCAAuB,OAAO,MAAM;AAAA,YAC/C,CAAC,CAAC;AACF,mBAAO,EAAE,GAAG,MAAMA,SAAQ,CAAC,WAAW,cAAc;AAAA,UACrD;AAGA,gBAAM,kBAAkB,mBAAmB,QAAQD,YAAW,IAAI;AAClE,iBAAO,kBACJ,EAAE,GAAG,MAAMC,SAAQ,CAAC,WAAW,gBAAgB,IAC/CA;AAAA,QACJ;AAAA,QACA;AAAA,MACD;AAAA,MACF,QAAQ,QAAQ,CAAC,CAAwB;AAAA,IAC1C;AAAA,EACD,EAAE,SAAK,uBAAO,SAAO,GAAe,CAAC;AACtC;AAEO,IAAM,WAAW,CAAC,eACxB,WAAW;AAAA,EACV,CAAC,QAAkBD,gBAAe,CAAC,GAAG,QAAQ,GAAIA,YAAW,SAAS,CAAC,CAAE;AAAA,EACzE,CAAC;AACF;","names":["createType","pluginInfo","retval"]}
1
+ {"version":3,"sources":["EphemeralState.ts"],"sourcesContent":["import {\n\tCommand,\n\tConfig,\n\tInstalledPlugin,\n\tNonEmptyString,\n\tOption,\n\tParsedOperation,\n\tParsedTemplate,\n\tPluginInfo,\n\tPluginResponseEncoding,\n\tTask,\n\tVerb,\n} from '@taqueria/protocol';\nimport createType from '@taqueria/protocol/Base';\nimport type { i18n } from '@taqueria/protocol/i18n';\nimport { E_TaqError, TaqError } from '@taqueria/protocol/TaqError';\nimport { attemptP, FutureInstance as Future, mapRej, promise } from 'fluture';\nimport { z } from 'zod';\n\nconst eager = <T>(f: Future<TaqError, T>) =>\n\tpromise(\n\t\tmapRej((err: TaqError) => new E_TaqError(err))(f),\n\t);\n\nconst taskToPluginMap = z.record(\n\tz.union([\n\t\tInstalledPlugin.schemas.schema,\n\t\tTask.schemas.schema,\n\t], { description: 'Task/Plugin Mapping' }),\n);\nconst operationToPluginMap = z.record(\n\tz.union([\n\t\tInstalledPlugin.schemas.schema,\n\t\tParsedOperation.schemas.schema,\n\t], { description: 'Operation/Plugin Mapping' }),\n);\n\nconst templateToPluginMap = z.record(\n\tz.union([\n\t\tInstalledPlugin.schemas.schema,\n\t\tParsedTemplate.schemas.schema,\n\t]),\n);\n\nconst rawSchema = z.object({\n\tbuild: z.string({ description: 'cache.build' }),\n\tconfigHash: z.string({ description: 'cache.configHash' }),\n\ttasks: taskToPluginMap,\n\toperations: operationToPluginMap,\n\ttemplates: templateToPluginMap,\n\tplugins: z.array(PluginInfo.schemas.schema, { description: 'cache.plugins' }),\n}).describe('Ephemeral State');\n\ntype RawInput = z.infer<typeof rawSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, RawInput>({\n\trawSchema,\n\tparseErrMsg: (value: unknown) => `${value} is not a valid representation of ephemeral state`,\n\tunknownErrMsg: 'Something went wrong when parsing the ephemeral state',\n});\n\nexport type EphemeralState = z.infer<typeof generatedSchemas.schema>;\nexport type t = EphemeralState;\nexport type TaskToPluginMap = z.infer<typeof taskToPluginMap>;\nexport type OpToPluginMap = z.infer<typeof operationToPluginMap>;\nexport type TemplateToPluginMap = z.infer<typeof templateToPluginMap>;\n\nexport const { create, of, make } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as EphemeralState),\n};\n\n/**\n * Private functions\n */\ntype Counts = Record<Verb.t, PluginInfo.t[]>;\nconst getTaskCounts = (pluginInfo: PluginInfo.t[]): Counts => {\n\treturn pluginInfo.reduce(\n\t\t(retval, pluginInfo) =>\n\t\t\tpluginInfo.tasks === undefined\n\t\t\t\t? {}\n\t\t\t\t: pluginInfo.tasks.reduce(\n\t\t\t\t\t(retval: Counts, task: Task.t) => {\n\t\t\t\t\t\tconst taskName = task.task;\n\t\t\t\t\t\tconst providers: PluginInfo.t[] = retval[taskName]\n\t\t\t\t\t\t\t? [...retval[taskName], pluginInfo]\n\t\t\t\t\t\t\t: [pluginInfo];\n\t\t\t\t\t\tconst mapping: Counts = {};\n\t\t\t\t\t\tmapping[taskName] = providers.filter(provider => provider !== undefined);\n\t\t\t\t\t\treturn { ...retval, ...mapping };\n\t\t\t\t\t},\n\t\t\t\t\tretval,\n\t\t\t\t),\n\t\t{} as Counts,\n\t);\n};\n\nconst getTemplateCounts = (pluginInfo: PluginInfo.t[]): Counts => {\n\treturn pluginInfo.reduce(\n\t\t(retval, pluginInfo) =>\n\t\t\t!pluginInfo.templates\n\t\t\t\t? retval\n\t\t\t\t: pluginInfo.templates.reduce(\n\t\t\t\t\t(retval: Counts, template: ParsedTemplate.t) => {\n\t\t\t\t\t\tconst templateName = template.template;\n\t\t\t\t\t\tconst providers = retval[templateName]\n\t\t\t\t\t\t\t? [...retval[templateName], pluginInfo]\n\t\t\t\t\t\t\t: [pluginInfo];\n\t\t\t\t\t\tconst mapping: Counts = {};\n\t\t\t\t\t\tmapping[templateName] = providers.filter(provider => provider !== undefined);\n\t\t\t\t\t\treturn { ...retval, ...mapping };\n\t\t\t\t\t},\n\t\t\t\t\tretval,\n\t\t\t\t),\n\t\t{} as Counts,\n\t);\n};\n\nconst getOperationCounts = (pluginInfo: PluginInfo.t[]): Counts => {\n\treturn pluginInfo.reduce(\n\t\t(retval, pluginInfo) =>\n\t\t\tpluginInfo.operations === undefined\n\t\t\t\t? retval\n\t\t\t\t: pluginInfo.operations.reduce(\n\t\t\t\t\t(retval: Counts, operation: ParsedOperation.t) => {\n\t\t\t\t\t\tconst operationName = operation.operation;\n\t\t\t\t\t\tconst providers = retval[operationName]\n\t\t\t\t\t\t\t? [...retval[operationName], pluginInfo]\n\t\t\t\t\t\t\t: [pluginInfo];\n\t\t\t\t\t\tconst mapping: Counts = {};\n\t\t\t\t\t\tmapping[operationName] = providers.filter(provider => provider !== undefined);\n\t\t\t\t\t\treturn { ...retval, ...mapping };\n\t\t\t\t\t},\n\t\t\t\t\tretval,\n\t\t\t\t),\n\t\t{} as Counts,\n\t);\n};\n\nconst toChoices = (plugins: PluginInfo.t[]) =>\n\tplugins.reduce(\n\t\t(retval, pluginInfo) => {\n\t\t\treturn [...retval, pluginInfo.name as NonEmptyString.t, pluginInfo.alias as NonEmptyString.t];\n\t\t},\n\t\t[] as NonEmptyString.t[],\n\t);\n\nconst isComposite = (name: Verb.t, counts: Counts) => counts[name] && counts[name].length > 1;\n\nconst getInstalledPlugin = (config: Config.t, name: string) =>\n\tconfig.plugins?.find(\n\t\t(plugin: InstalledPlugin.t) => [`taqueria-plugin-${name}`, name].includes(plugin.name),\n\t);\n\nexport const mapTasksToPlugins = (config: Config.t, pluginInfo: PluginInfo.t[], i18n: i18n) => {\n\tconst taskCounts = getTaskCounts(pluginInfo);\n\treturn attemptP<TaqError, TaskToPluginMap>(async () =>\n\t\tawait pluginInfo.reduce(\n\t\t\tasync (retval, pluginInfo) =>\n\t\t\t\t!pluginInfo.tasks\n\t\t\t\t\t? Promise.resolve({} as TaskToPluginMap)\n\t\t\t\t\t: await pluginInfo.tasks.reduce(\n\t\t\t\t\t\tasync (retval, { task, hidden }) => {\n\t\t\t\t\t\t\tif (isComposite(task, taskCounts)) {\n\t\t\t\t\t\t\t\tconst command = await eager(Command.make(task));\n\t\t\t\t\t\t\t\tconst compositeTask = await eager(Task.make({\n\t\t\t\t\t\t\t\t\ttask,\n\t\t\t\t\t\t\t\t\tcommand,\n\t\t\t\t\t\t\t\t\tdescription: await eager(NonEmptyString.make(i18n.__('providedByMany'))),\n\t\t\t\t\t\t\t\t\thidden,\n\t\t\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t\t\tawait eager(Option.make({\n\t\t\t\t\t\t\t\t\t\t\tflag: await eager(Verb.make('plugin')),\n\t\t\t\t\t\t\t\t\t\t\tdescription: await eager(\n\t\t\t\t\t\t\t\t\t\t\t\tNonEmptyString.make('Specify which plugin should be used to execute this task'),\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tchoices: toChoices(taskCounts[task]),\n\t\t\t\t\t\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\thandler: 'proxy',\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\treturn { ...await retval, [task]: compositeTask };\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Task is provided by just a single plugin\n\t\t\t\t\t\t\tconst installedPlugin = getInstalledPlugin(config, pluginInfo.name);\n\t\t\t\t\t\t\treturn installedPlugin\n\t\t\t\t\t\t\t\t? { ...await retval, [task]: installedPlugin }\n\t\t\t\t\t\t\t\t: retval;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tretval,\n\t\t\t\t\t),\n\t\t\tPromise.resolve({} as TaskToPluginMap),\n\t\t)\n\t).pipe(mapRej(rej => rej as TaqError));\n};\n\nexport const mapOperationsToPlugins = (config: Config.t, pluginInfo: PluginInfo.t[], i18n: i18n) => {\n\tconst opCounts = getOperationCounts(pluginInfo);\n\treturn attemptP(async () =>\n\t\tawait pluginInfo.reduce(\n\t\t\tasync (retval, pluginInfo) =>\n\t\t\t\t!pluginInfo.operations\n\t\t\t\t\t? Promise.resolve({} as OpToPluginMap)\n\t\t\t\t\t: await pluginInfo.operations.reduce(\n\t\t\t\t\t\tasync (retval, { operation }) => {\n\t\t\t\t\t\t\tif (isComposite(operation, opCounts)) {\n\t\t\t\t\t\t\t\tconst command = await eager(Command.make(operation));\n\t\t\t\t\t\t\t\tconst compositeOp = await eager(ParsedOperation.make({\n\t\t\t\t\t\t\t\t\toperation,\n\t\t\t\t\t\t\t\t\tcommand,\n\t\t\t\t\t\t\t\t\tdescription: await eager(NonEmptyString.make(i18n.__('providedByMany'))),\n\t\t\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t\t\tawait eager(Option.make({\n\t\t\t\t\t\t\t\t\t\t\tflag: await eager(Verb.make('plugin')),\n\t\t\t\t\t\t\t\t\t\t\tdescription: await eager(\n\t\t\t\t\t\t\t\t\t\t\t\tNonEmptyString.make('Specify which plugin should be used to execute this operation'),\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tchoices: toChoices(opCounts[operation]),\n\t\t\t\t\t\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\treturn { ...await retval, [operation]: compositeOp };\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Operation is provided by just a single plugin\n\t\t\t\t\t\t\tconst installedPlugin = getInstalledPlugin(config, pluginInfo.name);\n\t\t\t\t\t\t\treturn installedPlugin\n\t\t\t\t\t\t\t\t? { ...await retval, [operation]: installedPlugin }\n\t\t\t\t\t\t\t\t: retval;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tretval,\n\t\t\t\t\t),\n\t\t\tPromise.resolve({} as OpToPluginMap),\n\t\t)\n\t).pipe(mapRej(rej => rej as TaqError));\n};\n\nexport const mapTemplatesToPlugins = (config: Config.t, pluginInfo: PluginInfo.t[], i18n: i18n) => {\n\tconst tmplCounts = getTemplateCounts(pluginInfo);\n\treturn attemptP<TaqError, TemplateToPluginMap>(async () =>\n\t\tawait pluginInfo.reduce(\n\t\t\tasync (retval, pluginInfo) =>\n\t\t\t\t!pluginInfo.templates\n\t\t\t\t\t? Promise.resolve({} as TemplateToPluginMap)\n\t\t\t\t\t: await pluginInfo.templates!.reduce(\n\t\t\t\t\t\tasync (retval, { template, hidden }) => {\n\t\t\t\t\t\t\tif (isComposite(template, tmplCounts)) {\n\t\t\t\t\t\t\t\tconst command = await eager(Command.make(template));\n\t\t\t\t\t\t\t\tconst description = await eager(NonEmptyString.of(i18n.__('providedByMany')));\n\t\t\t\t\t\t\t\tconst compositeTmpl = await eager(ParsedTemplate.make({\n\t\t\t\t\t\t\t\t\ttemplate,\n\t\t\t\t\t\t\t\t\tcommand,\n\t\t\t\t\t\t\t\t\tdescription,\n\t\t\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t\t\tawait eager(Option.make({\n\t\t\t\t\t\t\t\t\t\t\tflag: await eager(Verb.make('plugin')),\n\t\t\t\t\t\t\t\t\t\t\tdescription: await eager(\n\t\t\t\t\t\t\t\t\t\t\t\tNonEmptyString.make('Specify which plugin should be used to execute this task'),\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tchoices: toChoices(tmplCounts[template]),\n\t\t\t\t\t\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\thandler: 'proxy',\n\t\t\t\t\t\t\t\t\tencoding: PluginResponseEncoding.create('none'),\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\treturn { ...await retval, [template]: compositeTmpl };\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Template is provided by just a single plugin\n\t\t\t\t\t\t\tconst installedPlugin = getInstalledPlugin(config, pluginInfo.name);\n\t\t\t\t\t\t\treturn installedPlugin\n\t\t\t\t\t\t\t\t? { ...await retval, [template]: installedPlugin }\n\t\t\t\t\t\t\t\t: retval;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tretval,\n\t\t\t\t\t),\n\t\t\tPromise.resolve({} as TemplateToPluginMap),\n\t\t)\n\t).pipe(mapRej(rej => rej as TaqError));\n};\n\nexport const getTasks = (pluginInfo: PluginInfo.t[]) =>\n\tpluginInfo.reduce(\n\t\t(retval: Task.t[], pluginInfo) => [...retval, ...(pluginInfo.tasks ?? [])],\n\t\t[],\n\t);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAYO;AACP,kBAAuB;AAEvB,sBAAqC;AACrC,qBAAoE;AACpE,iBAAkB;AAElB,IAAM,QAAQ,CAAI,UACjB;AAAA,MACC,uBAAO,CAAC,QAAk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AAE,GAAG,MAAMC,SAAQ,CAAC,WAAW,gBAAgB,IAC/CA;AAAA,QACJ;AAAA,QACA;AAAA,MACD;AAAA,MACF,QAAQ,QAAQ,CAAC,CAAwB;AAAA,IAC1C;AAAA,EACD,EAAE,SAAK,uBAAO,SAAO,GAAe,CAAC;AACtC;AAEO,IAAM,WAAW,CAAC,eACxB,WAAW;AAAA,EACV,CAAC,QAAkBD,gBAAY;AAjSjC;AAiSoC,YAAC,GAAG,QAAQ,IAAI,KAAAA,YAAW,UAAX,YAAoB,CAAC,CAAE;AAAA;AAAA,EACzE,CAAC;AACF;","names":["createType","pluginInfo","retval"]}
@@ -41,7 +41,7 @@ var PluginInfo = __toESM(require("@taqueria/protocol/PluginInfo"));
41
41
  var import_zod = require("zod");
42
42
  var internalSchema2 = PluginInfo.internalSchema.extend({
43
43
  operations: import_zod.z.preprocess(
44
- (val) => val ?? [],
44
+ (val) => val != null ? val : [],
45
45
  import_zod.z.array(
46
46
  ParsedOperation.schemas.schema,
47
47
  { description: "ParsedOperations" }
@@ -50,7 +50,7 @@ var internalSchema2 = PluginInfo.internalSchema.extend({
50
50
  }).describe("ParsedPluginInfo");
51
51
  var rawSchema2 = PluginInfo.internalSchema.extend({
52
52
  operations: import_zod.z.preprocess(
53
- (val) => val ?? [],
53
+ (val) => val != null ? val : [],
54
54
  import_zod.z.array(
55
55
  ParsedOperation.rawSchema,
56
56
  { description: "ParsedOperation" }
@@ -68,14 +68,4 @@ var schemas2 = {
68
68
  ...generatedSchemas,
69
69
  schema: generatedSchemas.schema.transform((val) => val)
70
70
  };
71
- // Annotate the CommonJS export names for ESM import in node:
72
- 0 && (module.exports = {
73
- create,
74
- factory,
75
- generatedSchemas,
76
- make,
77
- of,
78
- rawSchema,
79
- schemas
80
- });
81
71
  //# sourceMappingURL=ParsedPluginInfo.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["ParsedPluginInfo.ts"],"sourcesContent":["import createType from '@taqueria/protocol/Base';\nimport * as ParsedOperation from '@taqueria/protocol/ParsedOperation';\nimport * as PluginInfo from '@taqueria/protocol/PluginInfo';\nimport { z } from 'zod';\n\nconst internalSchema = PluginInfo.internalSchema.extend({\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedOperation.schemas.schema,\n\t\t\t{ description: 'ParsedOperations' },\n\t\t)\n\t\t\t.optional(),\n\t),\n}).describe('ParsedPluginInfo');\n\nexport const rawSchema = PluginInfo.internalSchema.extend({\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedOperation.rawSchema,\n\t\t\t{ description: 'ParsedOperation' },\n\t\t),\n\t)\n\t\t.optional(),\n}).describe('ParsedPluginInfo');\n\ntype Input = z.infer<typeof internalSchema>;\n\ntype RawInput = z.infer<typeof rawSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, Input>({\n\trawSchema,\n\tinternalSchema,\n\tparseErrMsg: (value: unknown) =>\n\t\t`The following plugin info gave us trouble when parsing the following plugin information: ${value}`,\n\tunknownErrMsg: 'Something went wrong trying to parse the plugin information',\n});\n\nexport type ParsedPluginInfo = z.infer<typeof generatedSchemas.schema>;\nexport type t = ParsedPluginInfo;\nexport const { create, of, make } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as ParsedPluginInfo),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAAA;AAAA,EAAA,eAAAC;AAAA;AAAA;AAAA,kBAAuB;AACvB,sBAAiC;AACjC,iBAA4B;AAC5B,iBAAkB;AAElB,IAAMC,kBAA4B,0BAAe,OAAO;AAAA,EACvD,YAAY,aAAE;AAAA,IACb,SAAO,OAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACe,wBAAQ;AAAA,MACxB,EAAE,aAAa,mBAAmB;AAAA,IACnC,EACE,SAAS;AAAA,EACZ;AACD,CAAC,EAAE,SAAS,kBAAkB;AAEvB,IAAMF,aAAuB,0BAAe,OAAO;AAAA,EACzD,YAAY,aAAE;AAAA,IACb,SAAO,OAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACe;AAAA,MAChB,EAAE,aAAa,kBAAkB;AAAA,IAClC;AAAA,EACD,EACE,SAAS;AACZ,CAAC,EAAE,SAAS,kBAAkB;AAMvB,IAAM,EAAE,SAAS,kBAAkB,QAAQ,QAAI,YAAAG,SAA4B;AAAA,EACjF,WAAAH;AAAA,EACA,gBAAAE;AAAA,EACA,aAAa,CAAC,UACb,4FAA4F;AAAA,EAC7F,eAAe;AAChB,CAAC;AAIM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAE7B,IAAMD,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAuB;AACzE;","names":["rawSchema","schemas","internalSchema","createType"]}
1
+ {"version":3,"sources":["ParsedPluginInfo.ts"],"sourcesContent":["import createType from '@taqueria/protocol/Base';\nimport * as ParsedOperation from '@taqueria/protocol/ParsedOperation';\nimport * as PluginInfo from '@taqueria/protocol/PluginInfo';\nimport { z } from 'zod';\n\nconst internalSchema = PluginInfo.internalSchema.extend({\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedOperation.schemas.schema,\n\t\t\t{ description: 'ParsedOperations' },\n\t\t)\n\t\t\t.optional(),\n\t),\n}).describe('ParsedPluginInfo');\n\nexport const rawSchema = PluginInfo.internalSchema.extend({\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedOperation.rawSchema,\n\t\t\t{ description: 'ParsedOperation' },\n\t\t),\n\t)\n\t\t.optional(),\n}).describe('ParsedPluginInfo');\n\ntype Input = z.infer<typeof internalSchema>;\n\ntype RawInput = z.infer<typeof rawSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, Input>({\n\trawSchema,\n\tinternalSchema,\n\tparseErrMsg: (value: unknown) =>\n\t\t`The following plugin info gave us trouble when parsing the following plugin information: ${value}`,\n\tunknownErrMsg: 'Something went wrong trying to parse the plugin information',\n});\n\nexport type ParsedPluginInfo = z.infer<typeof generatedSchemas.schema>;\nexport type t = ParsedPluginInfo;\nexport const { create, of, make } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as ParsedPluginInfo),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAAA;AAAA,EAAA,eAAAC;AAAA;AAAA;AAAA,kBAAuB;AACvB,sBAAiC;AACjC,iBAA4B;AAC5B,iBAAkB;AAElB,IAAMC,kBAA4B,0BAAe,OAAO;AAAA,EACvD,YAAY,aAAE;AAAA,IACb,SAAO,oBAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACe,wBAAQ;AAAA,MACxB,EAAE,aAAa,mBAAmB;AAAA,IACnC,EACE,SAAS;AAAA,EACZ;AACD,CAAC,EAAE,SAAS,kBAAkB;AAEvB,IAAMC,aAAuB,0BAAe,OAAO;AAAA,EACzD,YAAY,aAAE;AAAA,IACb,SAAO,oBAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACe;AAAA,MAChB,EAAE,aAAa,kBAAkB;AAAA,IAClC;AAAA,EACD,EACE,SAAS;AACZ,CAAC,EAAE,SAAS,kBAAkB;AAMvB,IAAM,EAAE,SAAS,kBAAkB,QAAQ,QAAI,YAAAC,SAA4B;AAAA,EACjF,WAAAD;AAAA,EACA,gBAAAD;AAAA,EACA,aAAa,CAAC,UACb,4FAA4F;AAAA,EAC7F,eAAe;AAChB,CAAC;AAIM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAE7B,IAAMG,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAuB;AACzE;","names":["rawSchema","schemas","internalSchema","rawSchema","createType","schemas"]}
@@ -84,15 +84,4 @@ var schemas4 = {
84
84
  ...generatedSchemas,
85
85
  schema: generatedSchemas.schema.transform((val) => val)
86
86
  };
87
- // Annotate the CommonJS export names for ESM import in node:
88
- 0 && (module.exports = {
89
- create,
90
- factory,
91
- generatedSchemas,
92
- internalSchema,
93
- make,
94
- of,
95
- rawSchema,
96
- schemas
97
- });
98
87
  //# sourceMappingURL=PersistentState.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["PersistentState.ts"],"sourcesContent":["import createType from '@taqueria/protocol/Base';\nimport * as SHA256 from '@taqueria/protocol/SHA256';\nimport * as Timestamp from '@taqueria/protocol/Timestamp';\nimport * as Verb from '@taqueria/protocol/Verb';\nimport { z } from 'zod';\n\nconst rawOpSchema = z.object({\n\thash: SHA256.rawSchema.describe('state.op.hash'),\n\ttime: Timestamp.rawSchema.describe('state.op.time'),\n\toutput: z.unknown().describe('state.op.output'),\n}).describe('Persistent State Operation');\n\nconst rawTaskSchema = z.object({\n\ttask: Verb.schemas.rawSchema,\n\tplugin: z.string().min(1),\n\ttime: Timestamp.rawSchema.describe('state.task.time'),\n\toutput: z.unknown().describe('state.task.output'),\n});\n\nconst internalOpSchema = z.object({\n\thash: SHA256.schemas.schema.describe('state.op.hash'),\n\ttime: Timestamp.schemas.schema.describe('state.op.time'),\n\toutput: z.unknown().describe('state.op.output'),\n});\n\nconst internalTaskSchema = z.object({\n\ttask: Verb.schemas.schema,\n\tplugin: z.string().min(1),\n\ttime: Timestamp.schemas.schema.describe('state.task.time'),\n\toutput: z.unknown().describe('state.op.output'),\n});\n\nexport type PersistedTask = z.infer<typeof internalTaskSchema>;\n\nexport type PersistedOperation = z.infer<typeof internalOpSchema>;\n\nexport const rawSchema = z.object({\n\toperations: z.record(rawOpSchema),\n\ttasks: z.record(rawTaskSchema),\n});\n\nexport const internalSchema = z.object({\n\toperations: z.record(internalOpSchema),\n\ttasks: z.record(internalTaskSchema),\n}).transform(val => ({\n\toperations: val.operations as unknown as Record<string, PersistedOperation>,\n\ttasks: val.tasks as unknown as Record<string, PersistedTask>,\n}));\n\ntype RawInput = z.infer<typeof rawSchema>;\n\ntype Input = z.infer<typeof internalSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, Input>({\n\trawSchema,\n\tparseErrMsg: `The persistent state is invalid`,\n\tunknownErrMsg: `Something went wrong trying to parse the persistent state`,\n});\n\nexport type PersistentState = z.infer<typeof generatedSchemas.schema>;\nexport type t = PersistentState;\nexport type State = PersistentState;\n\nexport const { create, of, make } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as unknown as PersistentState),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAAA;AAAA,EAAA,eAAAC;AAAA;AAAA;AAAA,kBAAuB;AACvB,aAAwB;AACxB,gBAA2B;AAC3B,WAAsB;AACtB,iBAAkB;AAElB,IAAM,cAAc,aAAE,OAAO;AAAA,EAC5B,MAAa,iBAAU,SAAS,eAAe;AAAA,EAC/C,MAAgB,oBAAU,SAAS,eAAe;AAAA,EAClD,QAAQ,aAAE,QAAQ,EAAE,SAAS,iBAAiB;AAC/C,CAAC,EAAE,SAAS,4BAA4B;AAExC,IAAM,gBAAgB,aAAE,OAAO;AAAA,EAC9B,MAAW,aAAQ;AAAA,EACnB,QAAQ,aAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACxB,MAAgB,oBAAU,SAAS,iBAAiB;AAAA,EACpD,QAAQ,aAAE,QAAQ,EAAE,SAAS,mBAAmB;AACjD,CAAC;AAED,IAAM,mBAAmB,aAAE,OAAO;AAAA,EACjC,MAAa,eAAQ,OAAO,SAAS,eAAe;AAAA,EACpD,MAAgB,kBAAQ,OAAO,SAAS,eAAe;AAAA,EACvD,QAAQ,aAAE,QAAQ,EAAE,SAAS,iBAAiB;AAC/C,CAAC;AAED,IAAM,qBAAqB,aAAE,OAAO;AAAA,EACnC,MAAW,aAAQ;AAAA,EACnB,QAAQ,aAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACxB,MAAgB,kBAAQ,OAAO,SAAS,iBAAiB;AAAA,EACzD,QAAQ,aAAE,QAAQ,EAAE,SAAS,iBAAiB;AAC/C,CAAC;AAMM,IAAMD,aAAY,aAAE,OAAO;AAAA,EACjC,YAAY,aAAE,OAAO,WAAW;AAAA,EAChC,OAAO,aAAE,OAAO,aAAa;AAC9B,CAAC;AAEM,IAAM,iBAAiB,aAAE,OAAO;AAAA,EACtC,YAAY,aAAE,OAAO,gBAAgB;AAAA,EACrC,OAAO,aAAE,OAAO,kBAAkB;AACnC,CAAC,EAAE,UAAU,UAAQ;AAAA,EACpB,YAAY,IAAI;AAAA,EAChB,OAAO,IAAI;AACZ,EAAE;AAMK,IAAM,EAAE,SAAS,kBAAkB,QAAQ,QAAI,YAAAE,SAA4B;AAAA,EACjF,WAAAF;AAAA,EACA,aAAa;AAAA,EACb,eAAe;AAChB,CAAC;AAMM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAE7B,IAAMC,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAiC;AACnF;","names":["rawSchema","schemas","createType"]}
1
+ {"version":3,"sources":["PersistentState.ts"],"sourcesContent":["import createType from '@taqueria/protocol/Base';\nimport * as SHA256 from '@taqueria/protocol/SHA256';\nimport * as Timestamp from '@taqueria/protocol/Timestamp';\nimport * as Verb from '@taqueria/protocol/Verb';\nimport { z } from 'zod';\n\nconst rawOpSchema = z.object({\n\thash: SHA256.rawSchema.describe('state.op.hash'),\n\ttime: Timestamp.rawSchema.describe('state.op.time'),\n\toutput: z.unknown().describe('state.op.output'),\n}).describe('Persistent State Operation');\n\nconst rawTaskSchema = z.object({\n\ttask: Verb.schemas.rawSchema,\n\tplugin: z.string().min(1),\n\ttime: Timestamp.rawSchema.describe('state.task.time'),\n\toutput: z.unknown().describe('state.task.output'),\n});\n\nconst internalOpSchema = z.object({\n\thash: SHA256.schemas.schema.describe('state.op.hash'),\n\ttime: Timestamp.schemas.schema.describe('state.op.time'),\n\toutput: z.unknown().describe('state.op.output'),\n});\n\nconst internalTaskSchema = z.object({\n\ttask: Verb.schemas.schema,\n\tplugin: z.string().min(1),\n\ttime: Timestamp.schemas.schema.describe('state.task.time'),\n\toutput: z.unknown().describe('state.op.output'),\n});\n\nexport type PersistedTask = z.infer<typeof internalTaskSchema>;\n\nexport type PersistedOperation = z.infer<typeof internalOpSchema>;\n\nexport const rawSchema = z.object({\n\toperations: z.record(rawOpSchema),\n\ttasks: z.record(rawTaskSchema),\n});\n\nexport const internalSchema = z.object({\n\toperations: z.record(internalOpSchema),\n\ttasks: z.record(internalTaskSchema),\n}).transform(val => ({\n\toperations: val.operations as unknown as Record<string, PersistedOperation>,\n\ttasks: val.tasks as unknown as Record<string, PersistedTask>,\n}));\n\ntype RawInput = z.infer<typeof rawSchema>;\n\ntype Input = z.infer<typeof internalSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, Input>({\n\trawSchema,\n\tparseErrMsg: `The persistent state is invalid`,\n\tunknownErrMsg: `Something went wrong trying to parse the persistent state`,\n});\n\nexport type PersistentState = z.infer<typeof generatedSchemas.schema>;\nexport type t = PersistentState;\nexport type State = PersistentState;\n\nexport const { create, of, make } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as unknown as PersistentState),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAAA;AAAA,EAAA,eAAAC;AAAA;AAAA;AAAA,kBAAuB;AACvB,aAAwB;AACxB,gBAA2B;AAC3B,WAAsB;AACtB,iBAAkB;AAElB,IAAM,cAAc,aAAE,OAAO;AAAA,EAC5B,MAAa,iBAAU,SAAS,eAAe;A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AAE7B,IAAME,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAiC;AACnF;","names":["rawSchema","schemas","rawSchema","createType","schemas"]}
package/PluginInfo.js CHANGED
@@ -48,21 +48,21 @@ var rawSchema3 = import_zod.z.object({
48
48
  schema: VersionNumber.rawSchema.describe("Plugin Schema Version #"),
49
49
  alias: Alias.rawSchema.describe("Plugin Alias"),
50
50
  tasks: import_zod.z.preprocess(
51
- (val) => val ?? [],
51
+ (val) => val != null ? val : [],
52
52
  import_zod.z.array(
53
53
  Task.schemas.schema.describe("Plugin Task"),
54
54
  { description: "Plugin Tasks" }
55
55
  )
56
56
  ).optional(),
57
57
  operations: import_zod.z.preprocess(
58
- (val) => val ?? [],
58
+ (val) => val != null ? val : [],
59
59
  import_zod.z.array(
60
60
  ParsedOperation.schemas.schema.describe("Plugin Operation"),
61
61
  { description: "Plugin Operations" }
62
62
  )
63
63
  ).optional(),
64
64
  templates: import_zod.z.preprocess(
65
- (val) => val ?? [],
65
+ (val) => val != null ? val : [],
66
66
  import_zod.z.array(
67
67
  ParsedTemplate.schemas.schema.describe("Plugin Template")
68
68
  )
@@ -73,21 +73,21 @@ var internalSchema = rawSchema3.extend({
73
73
  schema: VersionNumber.schemas.schema.describe("Plugin Schema Version #"),
74
74
  alias: Alias.schemas.schema.describe("Plugin Alias"),
75
75
  tasks: import_zod.z.preprocess(
76
- (val) => val ?? [],
76
+ (val) => val != null ? val : [],
77
77
  import_zod.z.array(
78
78
  Task.schemas.schema.describe("Plugin Task"),
79
79
  { description: "Plugin Tasks" }
80
80
  )
81
81
  ).optional(),
82
82
  operations: import_zod.z.preprocess(
83
- (val) => val ?? [],
83
+ (val) => val != null ? val : [],
84
84
  import_zod.z.array(
85
85
  ParsedOperation.schemas.schema.describe("Plugin Operation"),
86
86
  { description: "Plugin Operations" }
87
87
  )
88
88
  ).optional(),
89
89
  templates: import_zod.z.preprocess(
90
- (val) => val ?? [],
90
+ (val) => val != null ? val : [],
91
91
  import_zod.z.array(
92
92
  ParsedTemplate.schemas.schema.describe("Plugin Template")
93
93
  )
@@ -100,14 +100,4 @@ var { schemas: schemas6, factory } = (0, import_Base.default)({
100
100
  unknownErrMsg: "Something went wrong parsing the schema from a plugin"
101
101
  });
102
102
  var { create, of, make } = factory;
103
- // Annotate the CommonJS export names for ESM import in node:
104
- 0 && (module.exports = {
105
- create,
106
- factory,
107
- internalSchema,
108
- make,
109
- of,
110
- rawSchema,
111
- schemas
112
- });
113
103
  //# sourceMappingURL=PluginInfo.js.map
package/PluginInfo.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["PluginInfo.ts"],"sourcesContent":["import * as Alias from '@taqueria/protocol/Alias';\nimport createType, { Flatten } from '@taqueria/protocol/Base';\nimport * as ParsedOperation from '@taqueria/protocol/ParsedOperation';\nimport * as ParsedTemplate from '@taqueria/protocol/ParsedTemplate';\nimport * as Task from '@taqueria/protocol/Task';\nimport * as VersionNumber from '@taqueria/protocol/VersionNumber';\nimport { z } from 'zod';\n\nexport const rawSchema = z.object({\n\tname: z.string({ description: 'Plugin Name' }).min(1),\n\tversion: VersionNumber.rawSchema.describe('Plugin Version #'),\n\tschema: VersionNumber.rawSchema.describe('Plugin Schema Version #'),\n\talias: Alias.rawSchema.describe('Plugin Alias'),\n\ttasks: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tTask.schemas.schema.describe('Plugin Task'),\n\t\t\t{ description: 'Plugin Tasks' },\n\t\t),\n\t).optional(),\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedOperation.schemas.schema.describe('Plugin Operation'),\n\t\t\t{ description: 'Plugin Operations' },\n\t\t),\n\t).optional(),\n\ttemplates: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedTemplate.schemas.schema.describe('Plugin Template'),\n\t\t),\n\t).optional(),\n});\n\nexport const internalSchema = rawSchema.extend({\n\tversion: VersionNumber.schemas.schema.describe('Plugin Version #'),\n\tschema: VersionNumber.schemas.schema.describe('Plugin Schema Version #'),\n\talias: Alias.schemas.schema.describe('Plugin Alias'),\n\ttasks: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tTask.schemas.schema.describe('Plugin Task'),\n\t\t\t{ description: 'Plugin Tasks' },\n\t\t),\n\t).optional(),\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedOperation.schemas.schema.describe('Plugin Operation'),\n\t\t\t{ description: 'Plugin Operations' },\n\t\t),\n\t).optional(),\n\ttemplates: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedTemplate.schemas.schema.describe('Plugin Template'),\n\t\t),\n\t).optional(),\n}).describe('Plugin Schema');\n\n// export const rawSchema = internalSchema;\n\ntype RawInput = z.infer<typeof rawSchema>;\ntype Input = Flatten<z.infer<typeof internalSchema>>;\n\nexport const { schemas, factory } = createType<RawInput, Input>({\n\trawSchema,\n\tinternalSchema,\n\tparseErrMsg: 'The schema returned from the plugin is invalid',\n\tunknownErrMsg: 'Something went wrong parsing the schema from a plugin',\n});\n\nexport type PluginInfo = Flatten<z.infer<typeof schemas.schema>>;\nexport type t = PluginInfo;\nexport const { create, of, make } = factory;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAAA;AAAA,EAAA,eAAAC;AAAA;AAAA;AAAA,YAAuB;AACvB,kBAAoC;AACpC,sBAAiC;AACjC,qBAAgC;AAChC,WAAsB;AACtB,oBAA+B;AAC/B,iBAAkB;AAEX,IAAMD,aAAY,aAAE,OAAO;AAAA,EACjC,MAAM,aAAE,OAAO,EAAE,aAAa,cAAc,CAAC,EAAE,IAAI,CAAC;AAAA,EACpD,SAAuB,wBAAU,SAAS,kBAAkB;AAAA,EAC5D,QAAsB,wBAAU,SAAS,yBAAyB;AAAA,EAClE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;AAOpB,IAAM,EAAE,SAAAC,UAAS,QAAQ,QAAI,YAAAC,SAA4B;AAAA,EAC/D,WAAAF;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,eAAe;AAChB,CAAC;AAIM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;","names":["rawSchema","schemas","createType"]}
1
+ {"version":3,"sources":["PluginInfo.ts"],"sourcesContent":["import * as Alias from '@taqueria/protocol/Alias';\nimport createType, { Flatten } from '@taqueria/protocol/Base';\nimport * as ParsedOperation from '@taqueria/protocol/ParsedOperation';\nimport * as ParsedTemplate from '@taqueria/protocol/ParsedTemplate';\nimport * as Task from '@taqueria/protocol/Task';\nimport * as VersionNumber from '@taqueria/protocol/VersionNumber';\nimport { z } from 'zod';\n\nexport const rawSchema = z.object({\n\tname: z.string({ description: 'Plugin Name' }).min(1),\n\tversion: VersionNumber.rawSchema.describe('Plugin Version #'),\n\tschema: VersionNumber.rawSchema.describe('Plugin Schema Version #'),\n\talias: Alias.rawSchema.describe('Plugin Alias'),\n\ttasks: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tTask.schemas.schema.describe('Plugin Task'),\n\t\t\t{ description: 'Plugin Tasks' },\n\t\t),\n\t).optional(),\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedOperation.schemas.schema.describe('Plugin Operation'),\n\t\t\t{ description: 'Plugin Operations' },\n\t\t),\n\t).optional(),\n\ttemplates: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedTemplate.schemas.schema.describe('Plugin Template'),\n\t\t),\n\t).optional(),\n});\n\nexport const internalSchema = rawSchema.extend({\n\tversion: VersionNumber.schemas.schema.describe('Plugin Version #'),\n\tschema: VersionNumber.schemas.schema.describe('Plugin Schema Version #'),\n\talias: Alias.schemas.schema.describe('Plugin Alias'),\n\ttasks: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tTask.schemas.schema.describe('Plugin Task'),\n\t\t\t{ description: 'Plugin Tasks' },\n\t\t),\n\t).optional(),\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedOperation.schemas.schema.describe('Plugin Operation'),\n\t\t\t{ description: 'Plugin Operations' },\n\t\t),\n\t).optional(),\n\ttemplates: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tParsedTemplate.schemas.schema.describe('Plugin Template'),\n\t\t),\n\t).optional(),\n}).describe('Plugin Schema');\n\n// export const rawSchema = internalSchema;\n\ntype RawInput = z.infer<typeof rawSchema>;\ntype Input = Flatten<z.infer<typeof internalSchema>>;\n\nexport const { schemas, factory } = createType<RawInput, Input>({\n\trawSchema,\n\tinternalSchema,\n\tparseErrMsg: 'The schema returned from the plugin is invalid',\n\tunknownErrMsg: 'Something went wrong parsing the schema from a plugin',\n});\n\nexport type PluginInfo = Flatten<z.infer<typeof schemas.schema>>;\nexport type t = PluginInfo;\nexport const { create, of, make } = factory;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAAA;AAAA,EAAA,eAAAC;AAAA;AAAA;AAAA,YAAuB;AACvB,kBAAoC;AACpC,sBAAiC;AACjC,qBAAgC;AAChC,WAAsB;AACtB,oBAA+B;AAC/B,iBAAkB;AAEX,IAAMC,aAAY,aAAE,OAAO;AAAA,EACjC,MAAM,aAAE,OAAO,EAAE,aAAa,cAAc,CAAC,EAAE,IAAI,CAAC;AAAA,EACpD,SAAuB,wBAAU,SAAS,kBAAkB;AAAA,EAC5D,QAAsB,wBAAU,SAAS,yBAAyB;AAAA,EAClE,OAAa,gBAAU,SAAS,cAAc;AAAA,EAC9C,OAAO,aAAE;AAAA,IACR,SAAO,oBAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACI,aAAQ,OAAO,SAAS,aAAa;AAAA,MAC1C,EAAE,aAAa,eAAe;AAAA,IAC/B;AAAA,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AI;","names":["rawSchema","schemas","rawSchema","schemas","createType"]}
package/PluginSchema.js CHANGED
@@ -43,14 +43,14 @@ var Template = __toESM(require("@taqueria/protocol/Template"));
43
43
  var import_zod = require("zod");
44
44
  var internalSchema2 = PluginInfo.internalSchema.extend({
45
45
  operations: import_zod.z.preprocess(
46
- (val) => val ?? [],
46
+ (val) => val != null ? val : [],
47
47
  import_zod.z.array(
48
48
  Operation.schemas.schema,
49
49
  { description: "ParsedOperations" }
50
50
  ).optional()
51
51
  ),
52
52
  templates: import_zod.z.preprocess(
53
- (val) => val ?? [],
53
+ (val) => val != null ? val : [],
54
54
  import_zod.z.array(
55
55
  Template.schemas.schema
56
56
  ).optional()
@@ -59,14 +59,14 @@ var internalSchema2 = PluginInfo.internalSchema.extend({
59
59
  var rawSchema4 = PluginInfo.rawSchema.extend({
60
60
  name: Alias.rawSchema.optional(),
61
61
  operations: import_zod.z.preprocess(
62
- (val) => val ?? [],
62
+ (val) => val != null ? val : [],
63
63
  import_zod.z.array(
64
64
  Operation.rawSchema,
65
65
  { description: "ParsedOperation" }
66
66
  )
67
67
  ).optional(),
68
68
  templates: import_zod.z.preprocess(
69
- (val) => val ?? [],
69
+ (val) => val != null ? val : [],
70
70
  import_zod.z.array(
71
71
  Template.schemas.schema
72
72
  ).optional()
@@ -83,14 +83,4 @@ var schemas3 = {
83
83
  ...generatedSchemas,
84
84
  schema: generatedSchemas.schema.transform((val) => val)
85
85
  };
86
- // Annotate the CommonJS export names for ESM import in node:
87
- 0 && (module.exports = {
88
- create,
89
- factory,
90
- generatedSchemas,
91
- make,
92
- of,
93
- rawSchema,
94
- schemas
95
- });
96
86
  //# sourceMappingURL=PluginSchema.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["PluginSchema.ts"],"sourcesContent":["import { RequestArgs } from '@taqueria/protocol';\nimport * as Alias from '@taqueria/protocol/Alias';\nimport createType from '@taqueria/protocol/Base';\nimport * as Operation from '@taqueria/protocol/Operation';\nimport * as PluginInfo from '@taqueria/protocol/PluginInfo';\nimport * as Template from '@taqueria/protocol/Template';\nimport { PluginDependenciesResponse, PluginProxyResponse } from '@taqueria/protocol/types';\nimport { z } from 'zod';\n\nconst internalSchema = PluginInfo.internalSchema.extend({\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tOperation.schemas.schema,\n\t\t\t{ description: 'ParsedOperations' },\n\t\t)\n\t\t\t.optional(),\n\t),\n\ttemplates: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tTemplate.schemas.schema,\n\t\t).optional(),\n\t),\n}).passthrough().describe('ParsedPluginInfo');\n\nexport const rawSchema = PluginInfo.rawSchema.extend({\n\tname: Alias.rawSchema.optional(),\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tOperation.rawSchema,\n\t\t\t{ description: 'ParsedOperation' },\n\t\t),\n\t)\n\t\t.optional(),\n\ttemplates: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tTemplate.schemas.schema,\n\t\t).optional(),\n\t),\n}).passthrough().describe('ParsedPluginInfo');\n\ntype Input = z.infer<typeof internalSchema> & {\n\tproxy: <T extends RequestArgs.t>(\n\t\targs: T,\n\t) => PluginProxyResponse | Promise<PluginProxyResponse> | Promise<void> | void;\n\tcheckRuntimeDependencies?: <T extends RequestArgs.t>(args: T) => PluginDependenciesResponse;\n\tinstallRuntimeDependencies?: <T extends RequestArgs.t>(args: T) => PluginDependenciesResponse;\n};\n\nexport type RawPluginSchema = z.infer<typeof rawSchema> & {\n\tproxy: <T extends RequestArgs.t>(\n\t\targs: T,\n\t) => PluginProxyResponse | Promise<PluginProxyResponse> | Promise<void> | void;\n\tcheckRuntimeDependencies?: <T extends RequestArgs.t>(args: T) => PluginDependenciesResponse;\n\tinstallRuntimeDependencies?: <T extends RequestArgs.t>(args: T) => PluginDependenciesResponse;\n};\n\nexport const { schemas: generatedSchemas, factory } = createType<RawPluginSchema, Input>({\n\trawSchema,\n\tinternalSchema,\n\tparseErrMsg: (value: unknown) =>\n\t\t`The following plugin info gave us trouble when parsing the following plugin information: ${value}`,\n\tunknownErrMsg: 'Something went wrong trying to parse the plugin information',\n});\n\nexport type ParsedPluginInfo = z.infer<typeof generatedSchemas.schema>;\nexport type t = ParsedPluginInfo;\nexport const { create, of, make } = factory;\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as ParsedPluginInfo),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAAA;AAAA,EAAA,eAAAC;AAAA;AAAA;AACA,YAAuB;AACvB,kBAAuB;AACvB,gBAA2B;AAC3B,iBAA4B;AAC5B,eAA0B;AAE1B,iBAAkB;AAElB,IAAMC,kBAA4B,0BAAe,OAAO;AAAA,EACvD,YAAY,aAAE;AAAA,IACb,SAAO,OAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACS,kBAAQ;AAAA,MAClB,EAAE,aAAa,mBAAmB;AAAA,IACnC,EACE,SAAS;AAAA,EACZ;AAAA,EACA,WAAW,aAAE;AAAA,IACZ,SAAO,OAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACQ,iBAAQ;AAAA,IAClB,EAAE,SAAS;AAAA,EACZ;AACD,CAAC,EAAE,YAAY,EAAE,SAAS,kBAAkB;AAErC,IAAMF,aAAuB,qBAAU,OAAO;AAAA,EACpD,MAAY,gBAAU,SAAS;AAAA,EAC/B,YAAY,aAAE;AAAA,IACb,SAAO,OAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACS;AAAA,MACV,EAAE,aAAa,kBAAkB;AAAA,IAClC;AAAA,EACD,EACE,SAAS;AAAA,EACX,WAAW,aAAE;AAAA,IACZ,SAAO,OAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACQ,iBAAQ;AAAA,IAClB,EAAE,SAAS;AAAA,EACZ;AACD,CAAC,EAAE,YAAY,EAAE,SAAS,kBAAkB;AAkBrC,IAAM,EAAE,SAAS,kBAAkB,QAAQ,QAAI,YAAAG,SAAmC;AAAA,EACxF,WAAAH;AAAA,EACA,gBAAAE;AAAA,EACA,aAAa,CAAC,UACb,4FAA4F;AAAA,EAC7F,eAAe;AAChB,CAAC;AAIM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAC7B,IAAMD,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAuB;AACzE;","names":["rawSchema","schemas","internalSchema","createType"]}
1
+ {"version":3,"sources":["PluginSchema.ts"],"sourcesContent":["import { RequestArgs } from '@taqueria/protocol';\nimport * as Alias from '@taqueria/protocol/Alias';\nimport createType from '@taqueria/protocol/Base';\nimport * as Operation from '@taqueria/protocol/Operation';\nimport * as PluginInfo from '@taqueria/protocol/PluginInfo';\nimport * as Template from '@taqueria/protocol/Template';\nimport { PluginDependenciesResponse, PluginProxyResponse } from '@taqueria/protocol/types';\nimport { z } from 'zod';\n\nconst internalSchema = PluginInfo.internalSchema.extend({\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tOperation.schemas.schema,\n\t\t\t{ description: 'ParsedOperations' },\n\t\t)\n\t\t\t.optional(),\n\t),\n\ttemplates: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tTemplate.schemas.schema,\n\t\t).optional(),\n\t),\n}).passthrough().describe('ParsedPluginInfo');\n\nexport const rawSchema = PluginInfo.rawSchema.extend({\n\tname: Alias.rawSchema.optional(),\n\toperations: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tOperation.rawSchema,\n\t\t\t{ description: 'ParsedOperation' },\n\t\t),\n\t)\n\t\t.optional(),\n\ttemplates: z.preprocess(\n\t\tval => val ?? [],\n\t\tz.array(\n\t\t\tTemplate.schemas.schema,\n\t\t).optional(),\n\t),\n}).passthrough().describe('ParsedPluginInfo');\n\ntype Input = z.infer<typeof internalSchema> & {\n\tproxy: <T extends RequestArgs.t>(\n\t\targs: T,\n\t) => PluginProxyResponse | Promise<PluginProxyResponse> | Promise<void> | void;\n\tcheckRuntimeDependencies?: <T extends RequestArgs.t>(args: T) => PluginDependenciesResponse;\n\tinstallRuntimeDependencies?: <T extends RequestArgs.t>(args: T) => PluginDependenciesResponse;\n};\n\nexport type RawPluginSchema = z.infer<typeof rawSchema> & {\n\tproxy: <T extends RequestArgs.t>(\n\t\targs: T,\n\t) => PluginProxyResponse | Promise<PluginProxyResponse> | Promise<void> | void;\n\tcheckRuntimeDependencies?: <T extends RequestArgs.t>(args: T) => PluginDependenciesResponse;\n\tinstallRuntimeDependencies?: <T extends RequestArgs.t>(args: T) => PluginDependenciesResponse;\n};\n\nexport const { schemas: generatedSchemas, factory } = createType<RawPluginSchema, Input>({\n\trawSchema,\n\tinternalSchema,\n\tparseErrMsg: (value: unknown) =>\n\t\t`The following plugin info gave us trouble when parsing the following plugin information: ${value}`,\n\tunknownErrMsg: 'Something went wrong trying to parse the plugin information',\n});\n\nexport type ParsedPluginInfo = z.infer<typeof generatedSchemas.schema>;\nexport type t = ParsedPluginInfo;\nexport const { create, of, make } = factory;\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as ParsedPluginInfo),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAAA;AAAA,EAAA,eAAAC;AAAA;AAAA;AACA,YAAuB;AACvB,kBAAuB;AACvB,gBAA2B;AAC3B,iBAA4B;AAC5B,eAA0B;AAE1B,iBAAkB;AAElB,IAAMC,kBAA4B,0BAAe,OAAO;AAAA,EACvD,YAAY,aAAE;AAAA,IACb,SAAO,oBAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACS,kBAAQ;AAAA,MAClB,EAAE,aAAa,mBAAmB;AAAA,IACnC,EACE,SAAS;AAAA,EACZ;AAAA,EACA,WAAW,aAAE;AAAA,IACZ,SAAO,oBAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACQ,iBAAQ;AAAA,IAClB,EAAE,SAAS;AAAA,EACZ;AACD,CAAC,EAAE,YAAY,EAAE,SAAS,kBAAkB;AAErC,IAAMC,aAAuB,qBAAU,OAAO;AAAA,EACpD,MAAY,gBAAU,SAAS;AAAA,EAC/B,YAAY,aAAE;AAAA,IACb,SAAO,oBAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACS;AAAA,MACV,EAAE,aAAa,kBAAkB;AAAA,IAClC;AAAA,EACD,EACE,SAAS;AAAA,EACX,WAAW,aAAE;AAAA,IACZ,SAAO,oBAAO,CAAC;AAAA,IACf,aAAE;AAAA,MACQ,iBAAQ;AAAA,IAClB,EAAE,SAAS;AAAA,EACZ;AACD,CAAC,EAAE,YAAY,EAAE,SAAS,kBAAkB;AAkBrC,IAAM,EAAE,SAAS,kBAAkB,QAAQ,QAAI,YAAAC,SAAmC;AAAA,EACxF,WAAAD;AAAA,EACA,gBAAAD;AAAA,EACA,aAAa,CAAC,UACb,4FAA4F;AAAA,EAC7F,eAAe;AAChB,CAAC;AAIM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAC7B,IAAMG,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAuB;AACzE;","names":["rawSchema","schemas","internalSchema","rawSchema","createType","schemas"]}
package/SHA256.js CHANGED
@@ -83,15 +83,4 @@ var schemas = {
83
83
  ...generatedSchemas,
84
84
  schema: generatedSchemas.schema.transform((val) => val)
85
85
  };
86
- // Annotate the CommonJS export names for ESM import in node:
87
- 0 && (module.exports = {
88
- Crypto,
89
- create,
90
- internalSchema,
91
- make,
92
- of,
93
- rawSchema,
94
- schemas,
95
- toSHA256
96
- });
97
86
  //# sourceMappingURL=SHA256.js.map
@@ -51,14 +51,4 @@ var schemas = {
51
51
  ...generatedSchemas,
52
52
  schema: generatedSchemas.schema.transform((val) => val)
53
53
  };
54
- // Annotate the CommonJS export names for ESM import in node:
55
- 0 && (module.exports = {
56
- create,
57
- factory,
58
- generatedSchemas,
59
- make,
60
- of,
61
- rawSchema,
62
- schemas
63
- });
64
54
  //# sourceMappingURL=SanitizedAbsPath.js.map
package/SanitizedArgs.js CHANGED
@@ -227,50 +227,4 @@ var ofAddContractArgs = addContractArgs.factory.of;
227
227
  var createRemoveContractsArgs = removeContractsArgs.factory.create;
228
228
  var makeRemoveContractsArgs = removeContractsArgs.factory.make;
229
229
  var ofRemoveContractsArgs = removeContractsArgs.factory.of;
230
- // Annotate the CommonJS export names for ESM import in node:
231
- 0 && (module.exports = {
232
- addContractArgs,
233
- addContractsRawSchema,
234
- create,
235
- createAddContractArgs,
236
- createCreateTaskArgs,
237
- createInstallTaskArgs,
238
- createProvisionTaskArgs,
239
- createRemoveContractsArgs,
240
- createScaffoldTaskArgs,
241
- createTaskArgs,
242
- createUninstallTaskArgs,
243
- factory,
244
- generatedSchemas,
245
- initRawSchema,
246
- installTaskArgs,
247
- make,
248
- makeAddContractArgs,
249
- makeCreateTaskArgs,
250
- makeInstallTaskArgs,
251
- makeProvisionTaskArgs,
252
- makeRemoveContractsArgs,
253
- makeScaffoldTaskArgs,
254
- makeUninstallTaskArgs,
255
- managePluginRawSchema,
256
- of,
257
- ofAddContractArgs,
258
- ofCreateTaskArgs,
259
- ofInstallTaskArgs,
260
- ofProvisionTaskArgs,
261
- ofRemoveContractsArgs,
262
- ofScaffoldTaskArgs,
263
- ofUninstallTaskArgs,
264
- provisionRawSchema,
265
- provisionTaskArgs,
266
- rawSchema,
267
- removeContractsArgs,
268
- removeContractsRawSchema,
269
- scaffoldRawSchema,
270
- scaffoldTaskArgs,
271
- schemas,
272
- templateRawSchema,
273
- uninstallTaskArgs,
274
- versionRawSchema
275
- });
276
230
  //# sourceMappingURL=SanitizedArgs.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["SanitizedArgs.ts"],"sourcesContent":["import { Url } from '@taqueria/protocol';\nimport createType from '@taqueria/protocol/Base';\nimport * as NonEmptyString from '@taqueria/protocol/NonEmptyString';\nimport * as PluginResponseEncoding from '@taqueria/protocol/PluginResponseEncoding';\nimport * as SanitizedAbsPath from '@taqueria/protocol/SanitizedAbsPath';\nimport { z } from 'zod';\n\nexport const rawSchema = z.object({\n\t_: z.array(z.union([z.string().min(1), z.number()])),\n\tprojectDir: SanitizedAbsPath.schemas.schema,\n\tmaxConcurrency: z.preprocess(\n\t\tval => typeof val === 'string' ? parseInt(val) : Number(val),\n\t\tz.number().int().min(1).default(10),\n\t),\n\tdebug: z.preprocess(\n\t\tval => Boolean(val),\n\t\tz.boolean().default(false),\n\t),\n\tdisableState: z.preprocess(\n\t\tval => Boolean(val),\n\t\tz.boolean().default(false),\n\t),\n\tlogPluginRequests: z.preprocess(\n\t\tval => Boolean(val),\n\t\tz.boolean().default(false),\n\t),\n\tfromVsCode: z.preprocess(\n\t\tval => Boolean(val),\n\t\tz.boolean().default(false),\n\t),\n\tversion: z.preprocess(\n\t\tval => Boolean(val),\n\t\tz.boolean().optional(),\n\t),\n\tbuild: z.preprocess(\n\t\tval => Boolean(val),\n\t\tz.boolean().optional(),\n\t),\n\thelp: z.preprocess(\n\t\tval => Boolean(val),\n\t\tz.boolean().optional(),\n\t),\n\tyes: z.preprocess(\n\t\tval => Boolean(val),\n\t\tz.boolean().optional(),\n\t),\n\tplugin: NonEmptyString.schemas.schema.optional(),\n\tenv: z.string().optional(),\n\tquickstart: z.string().min(1).optional(),\n\tsetBuild: z.preprocess(\n\t\tval => String(val),\n\t\tz.string().min(3),\n\t),\n\tsetVersion: z.string().min(3),\n\tpluginName: z.string().min(1).optional(),\n}, { description: 'Sanitizied Args' }).passthrough();\n\nexport const scaffoldRawSchema = rawSchema.extend({\n\tscaffoldProjectDir: z.string().min(1).transform((val: unknown) => val as SanitizedAbsPath.t),\n\tscaffoldUrl: z.string().min(1).url().transform((val: unknown) => val as Url.t),\n\tbranch: z.string().min(1).optional(),\n});\n\nexport const initRawSchema = rawSchema.extend({\n\tworkflow: z.string().refine(val => val === 'ligo' || val === 'smartpy' || val === 'archetype' || val === 'michelson')\n\t\t.optional(),\n});\n\nexport type rawInitSchemaInput = z.infer<typeof initRawSchema>;\n\nexport const provisionRawSchema = rawSchema\n\t.extend({\n\t\toperation: z\n\t\t\t.string()\n\t\t\t.min(1)\n\t\t\t.describe('Operation name'),\n\t\tname: z\n\t\t\t.string()\n\t\t\t.min(1)\n\t\t\t.regex(\n\t\t\t\t/^[a-z0-9]+[a-z0-9-_]$/,\n\t\t\t\t'Provisioner name must consist of one or more letters/numbers and may not start with an underscore or dash.',\n\t\t\t)\n\t\t\t.describe('Provisioner name')\n\t\t\t.optional(),\n\t})\n\t.passthrough();\n\nexport const templateRawSchema = rawSchema.extend({\n\ttemplate: z.string().min(1),\n}).passthrough();\n\nexport const managePluginRawSchema = rawSchema.omit({ pluginName: true }).extend({\n\tpluginName: z.string().min(1),\n});\n\nexport const versionRawSchema = rawSchema.extend({\n\tversion: z.boolean().default(true),\n});\n\nexport const addContractsRawSchema = z.preprocess(\n\tval => {\n\t\tconst obj: {\n\t\t\tcontractName?: string;\n\t\t\tsourceFile?: string;\n\t\t} = typeof val === 'object' ? Object(val) : ({ contractName: '', sourceFile: '' });\n\t\treturn !obj.contractName && obj.sourceFile\n\t\t\t? { ...obj, contractName: obj['sourceFile'] }\n\t\t\t: obj;\n\t},\n\trawSchema.extend({\n\t\tsourceFile: z.string().min(1),\n\t\tcontractName: z.string().min(1),\n\t}),\n);\n\nexport const removeContractsRawSchema = rawSchema.extend({\n\tcontractName: z.string().min(1),\n});\n\ntype RawInput = z.infer<typeof rawSchema>;\ntype RawScaffoldInput = z.infer<typeof scaffoldRawSchema>;\ntype RawProvisionInput = z.infer<typeof provisionRawSchema>;\ntype RawManagePluginInput = z.infer<typeof managePluginRawSchema>;\ntype RawVersionInput = z.infer<typeof versionRawSchema>;\ntype RawTemplateInput = z.infer<typeof templateRawSchema>;\ntype RawAddContractsInput = z.infer<typeof addContractsRawSchema>;\ntype RawRemoveContractsInput = z.infer<typeof removeContractsRawSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, RawInput>({\n\trawSchema,\n\tparseErrMsg: 'The arguments provided are invalid',\n\tunknownErrMsg: 'Something went wrong parsing the command-line arguments',\n});\n\nexport const { create, of, make } = factory;\n\nexport type SanitizedArgs = z.infer<typeof generatedSchemas.schema>;\nexport type t = SanitizedArgs;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as SanitizedArgs),\n};\n\nexport const scaffoldTaskArgs = createType<RawScaffoldInput, RawScaffoldInput>({\n\trawSchema: scaffoldRawSchema,\n\tparseErrMsg: 'The arguments provided are invalid for the scaffold task',\n\tunknownErrMsg: 'Something went wrong parsing the arguments for the scaffold task',\n});\n\nexport const provisionTaskArgs = createType<RawProvisionInput, RawProvisionInput>({\n\trawSchema: provisionRawSchema,\n\tparseErrMsg: 'The arguments provided are invalid for the provision task',\n\tunknownErrMsg: 'Something went wrong parsing the arguments for the provision task',\n});\n\nexport const installTaskArgs = createType<RawManagePluginInput, RawManagePluginInput>({\n\trawSchema: managePluginRawSchema,\n\tparseErrMsg: 'The arguments provided are invalid for the install task',\n\tunknownErrMsg: 'Something went wrong parsing the arguments for the install task',\n});\n\nexport const uninstallTaskArgs = createType<RawManagePluginInput, RawManagePluginInput>({\n\trawSchema: managePluginRawSchema,\n\tparseErrMsg: 'The arguments provided are invalid for the uninstall task',\n\tunknownErrMsg: 'Something went wrong parsing the arguments for the uninstall task',\n});\n\nexport const createTaskArgs = createType<RawTemplateInput, RawTemplateInput>({\n\trawSchema: templateRawSchema,\n\tparseErrMsg: 'The arguments provided are invalid for the create task',\n\tunknownErrMsg: 'Something went wrong parsing the arguments for the create task',\n});\n\nexport const addContractArgs = createType<RawAddContractsInput, RawAddContractsInput>({\n\trawSchema: addContractsRawSchema,\n\tparseErrMsg: 'Please specify the source file to register.',\n\tunknownErrMsg: 'Something went wrong parsing the arguments for registering a contract.',\n});\n\nexport const removeContractsArgs = createType<RawRemoveContractsInput, RawRemoveContractsInput>({\n\trawSchema: removeContractsRawSchema,\n\tparseErrMsg: 'Please specify the contract name to unregister.',\n\tunknownErrMsg: 'Something went wrong parsing the arguments to unregister a contract.',\n});\n\nexport type ScaffoldTaskArgs = z.infer<typeof scaffoldTaskArgs.schemas.schema>;\nexport type ProvisionTaskArgs = z.infer<typeof provisionTaskArgs.schemas.schema>;\nexport type InstallTaskArgs = z.infer<typeof installTaskArgs.schemas.schema>;\nexport type UninstallTaskArgs = z.infer<typeof uninstallTaskArgs.schemas.schema>;\nexport type CreateTaskArgs = z.infer<typeof createTaskArgs.schemas.schema>;\nexport type AddContractArgs = z.infer<typeof addContractArgs.schemas.schema>;\nexport type RemoveContractArgs = z.infer<typeof removeContractsArgs.schemas.schema>;\n\nexport const createScaffoldTaskArgs = scaffoldTaskArgs.factory.from;\nexport const makeScaffoldTaskArgs = scaffoldTaskArgs.factory.make;\nexport const ofScaffoldTaskArgs = scaffoldTaskArgs.factory.of;\n\nexport const createProvisionTaskArgs = provisionTaskArgs.factory.create;\nexport const makeProvisionTaskArgs = provisionTaskArgs.factory.make;\nexport const ofProvisionTaskArgs = provisionTaskArgs.factory.of;\n\nexport const createInstallTaskArgs = installTaskArgs.factory.create;\nexport const makeInstallTaskArgs = installTaskArgs.factory.make;\nexport const ofInstallTaskArgs = installTaskArgs.factory.of;\n\nexport const createUninstallTaskArgs = uninstallTaskArgs.factory.create;\nexport const makeUninstallTaskArgs = uninstallTaskArgs.factory.make;\nexport const ofUninstallTaskArgs = uninstallTaskArgs.factory.of;\n\nexport const createCreateTaskArgs = createTaskArgs.factory.create;\nexport const makeCreateTaskArgs = createTaskArgs.factory.make;\nexport const ofCreateTaskArgs = createTaskArgs.factory.of;\nexport const createAddContractArgs = addContractArgs.factory.create;\nexport const makeAddContractArgs = addContractArgs.factory.make;\nexport const ofAddContractArgs = addContractArgs.factory.of;\n\nexport const createRemoveContractsArgs = removeContractsArgs.factory.create;\nexport const makeRemoveContractsArgs = removeContractsArgs.factory.make;\nexport const ofRemoveContractsArgs = removeContractsArgs.factory.of;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAAuB;AACvB,qBAAgC;AAEhC,uBAAkC;AAClC,iBAAkB;AAEX,IAAM,YAAY,aAAE,OAAO;AAAA,EACjC,GAAG,aAAE,MAAM,aAAE,MAAM,CAAC,aAAE,OAAO,EAAE,IAAI,CAAC,GAAG,aAAE,OAAO,CAAC,CAAC,CAAC;AAAA,EACnD,YAA6B,yBAAQ;AAAA,EACrC,gBAAgB,aAAE;AAAA,IACjB,SAAO,OAAO,QAAQ,WAAW,SAAS,GAAG,IAAI,OAAO,GAAG;AAAA,IAC3D,aAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,QAAQ,EAAE;AAAA,EACnC;AAAA,EACA,OAAO,aAAE;AAAA,IACR,SAAO,QAAQ,GAAG;AAAA,IAClB,aAAE,QAAQ,EAAE,QAAQ,KAAK;AAAA,EAC1B;AAAA,EACA,cAAc,aAAE;AAAA,IACf,SAAO,QAAQ,GAAG;AAAA,IAClB,aAAE,QAAQ,EAAE,QAAQ,KAAK;AAAA,EAC1B;AAAA,EACA,mBAAmB,aAAE;AAAA,IACpB,SAAO,QAAQ,GAAG;AAAA,IAClB,aAAE,QAAQ,EAAE,QAAQ,KAAK;AAAA,EAC1B;AAAA,EACA,YAAY,aA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AAQ;AAC1D,IAAM,wBAAwB,kBAAkB,QAAQ;AACxD,IAAM,sBAAsB,kBAAkB,QAAQ;AAEtD,IAAM,uBAAuB,eAAe,QAAQ;AACpD,IAAM,qBAAqB,eAAe,QAAQ;AAClD,IAAM,mBAAmB,eAAe,QAAQ;AAChD,IAAM,wBAAwB,gBAAgB,QAAQ;AACtD,IAAM,sBAAsB,gBAAgB,QAAQ;AACpD,IAAM,oBAAoB,gBAAgB,QAAQ;AAElD,IAAM,4BAA4B,oBAAoB,QAAQ;AAC9D,IAAM,0BAA0B,oBAAoB,QAAQ;AAC5D,IAAM,wBAAwB,oBAAoB,QAAQ;","names":["schemas","createType"]}
1
+ {"version":3,"sources":["SanitizedArgs.ts"],"sourcesContent":["import { Url } from '@taqueria/protocol';\nimport createType from '@taqueria/protocol/Base';\nimport * as NonEmptyString from '@taqueria/protocol/NonEmptyString';\nimport * as PluginResponseEncoding from '@taqueria/protocol/PluginResponseEncoding';\nimport * as SanitizedAbsPath from '@taqueria/protocol/SanitizedAbsPath';\nimport { z } from 'zod';\n\nexport const rawSchema = z.object({\n\t_: z.array(z.union([z.string().min(1), z.number()])),\n\tprojectDir: SanitizedAbsPath.schemas.schema,\n\tmaxConcurrency: z.preprocess(\n\t\tval => typeof val === 'string' ? parseInt(val) : Number(val),\n\t\tz.number().int().min(1).default(10),\n\t),\n\tdebug: z.preprocess(\n\t\tval => Boolean(val),\n\t\tz.boolean().default(false),\n\t),\n\tdisableState: z.preprocess(\n\t\tval => Boolean(val),\n\t\tz.boolean().default(false),\n\t),\n\tlogPluginRequests: z.preprocess(\n\t\tval => Boolean(val),\n\t\tz.boolean().default(false),\n\t),\n\tfromVsCode: z.preprocess(\n\t\tval => Boolean(val),\n\t\tz.boolean().default(false),\n\t),\n\tversion: z.preprocess(\n\t\tval => Boolean(val),\n\t\tz.boolean().optional(),\n\t),\n\tbuild: z.preprocess(\n\t\tval => Boolean(val),\n\t\tz.boolean().optional(),\n\t),\n\thelp: z.preprocess(\n\t\tval => Boolean(val),\n\t\tz.boolean().optional(),\n\t),\n\tyes: z.preprocess(\n\t\tval => Boolean(val),\n\t\tz.boolean().optional(),\n\t),\n\tplugin: NonEmptyString.schemas.schema.optional(),\n\tenv: z.string().optional(),\n\tquickstart: z.string().min(1).optional(),\n\tsetBuild: z.preprocess(\n\t\tval => String(val),\n\t\tz.string().min(3),\n\t),\n\tsetVersion: z.string().min(3),\n\tpluginName: z.string().min(1).optional(),\n}, { description: 'Sanitizied Args' }).passthrough();\n\nexport const scaffoldRawSchema = rawSchema.extend({\n\tscaffoldProjectDir: z.string().min(1).transform((val: unknown) => val as SanitizedAbsPath.t),\n\tscaffoldUrl: z.string().min(1).url().transform((val: unknown) => val as Url.t),\n\tbranch: z.string().min(1).optional(),\n});\n\nexport const initRawSchema = rawSchema.extend({\n\tworkflow: z.string().refine(val => val === 'ligo' || val === 'smartpy' || val === 'archetype' || val === 'michelson')\n\t\t.optional(),\n});\n\nexport type rawInitSchemaInput = z.infer<typeof initRawSchema>;\n\nexport const provisionRawSchema = rawSchema\n\t.extend({\n\t\toperation: z\n\t\t\t.string()\n\t\t\t.min(1)\n\t\t\t.describe('Operation name'),\n\t\tname: z\n\t\t\t.string()\n\t\t\t.min(1)\n\t\t\t.regex(\n\t\t\t\t/^[a-z0-9]+[a-z0-9-_]$/,\n\t\t\t\t'Provisioner name must consist of one or more letters/numbers and may not start with an underscore or dash.',\n\t\t\t)\n\t\t\t.describe('Provisioner name')\n\t\t\t.optional(),\n\t})\n\t.passthrough();\n\nexport const templateRawSchema = rawSchema.extend({\n\ttemplate: z.string().min(1),\n}).passthrough();\n\nexport const managePluginRawSchema = rawSchema.omit({ pluginName: true }).extend({\n\tpluginName: z.string().min(1),\n});\n\nexport const versionRawSchema = rawSchema.extend({\n\tversion: z.boolean().default(true),\n});\n\nexport const addContractsRawSchema = z.preprocess(\n\tval => {\n\t\tconst obj: {\n\t\t\tcontractName?: string;\n\t\t\tsourceFile?: string;\n\t\t} = typeof val === 'object' ? Object(val) : ({ contractName: '', sourceFile: '' });\n\t\treturn !obj.contractName && obj.sourceFile\n\t\t\t? { ...obj, contractName: obj['sourceFile'] }\n\t\t\t: obj;\n\t},\n\trawSchema.extend({\n\t\tsourceFile: z.string().min(1),\n\t\tcontractName: z.string().min(1),\n\t}),\n);\n\nexport const removeContractsRawSchema = rawSchema.extend({\n\tcontractName: z.string().min(1),\n});\n\ntype RawInput = z.infer<typeof rawSchema>;\ntype RawScaffoldInput = z.infer<typeof scaffoldRawSchema>;\ntype RawProvisionInput = z.infer<typeof provisionRawSchema>;\ntype RawManagePluginInput = z.infer<typeof managePluginRawSchema>;\ntype RawVersionInput = z.infer<typeof versionRawSchema>;\ntype RawTemplateInput = z.infer<typeof templateRawSchema>;\ntype RawAddContractsInput = z.infer<typeof addContractsRawSchema>;\ntype RawRemoveContractsInput = z.infer<typeof removeContractsRawSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, RawInput>({\n\trawSchema,\n\tparseErrMsg: 'The arguments provided are invalid',\n\tunknownErrMsg: 'Something went wrong parsing the command-line arguments',\n});\n\nexport const { create, of, make } = factory;\n\nexport type SanitizedArgs = z.infer<typeof generatedSchemas.schema>;\nexport type t = SanitizedArgs;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as SanitizedArgs),\n};\n\nexport const scaffoldTaskArgs = createType<RawScaffoldInput, RawScaffoldInput>({\n\trawSchema: scaffoldRawSchema,\n\tparseErrMsg: 'The arguments provided are invalid for the scaffold task',\n\tunknownErrMsg: 'Something went wrong parsing the arguments for the scaffold task',\n});\n\nexport const provisionTaskArgs = createType<RawProvisionInput, RawProvisionInput>({\n\trawSchema: provisionRawSchema,\n\tparseErrMsg: 'The arguments provided are invalid for the provision task',\n\tunknownErrMsg: 'Something went wrong parsing the arguments for the provision task',\n});\n\nexport const installTaskArgs = createType<RawManagePluginInput, RawManagePluginInput>({\n\trawSchema: managePluginRawSchema,\n\tparseErrMsg: 'The arguments provided are invalid for the install task',\n\tunknownErrMsg: 'Something went wrong parsing the arguments for the install task',\n});\n\nexport const uninstallTaskArgs = createType<RawManagePluginInput, RawManagePluginInput>({\n\trawSchema: managePluginRawSchema,\n\tparseErrMsg: 'The arguments provided are invalid for the uninstall task',\n\tunknownErrMsg: 'Something went wrong parsing the arguments for the uninstall task',\n});\n\nexport const createTaskArgs = createType<RawTemplateInput, RawTemplateInput>({\n\trawSchema: templateRawSchema,\n\tparseErrMsg: 'The arguments provided are invalid for the create task',\n\tunknownErrMsg: 'Something went wrong parsing the arguments for the create task',\n});\n\nexport const addContractArgs = createType<RawAddContractsInput, RawAddContractsInput>({\n\trawSchema: addContractsRawSchema,\n\tparseErrMsg: 'Please specify the source file to register.',\n\tunknownErrMsg: 'Something went wrong parsing the arguments for registering a contract.',\n});\n\nexport const removeContractsArgs = createType<RawRemoveContractsInput, RawRemoveContractsInput>({\n\trawSchema: removeContractsRawSchema,\n\tparseErrMsg: 'Please specify the contract name to unregister.',\n\tunknownErrMsg: 'Something went wrong parsing the arguments to unregister a contract.',\n});\n\nexport type ScaffoldTaskArgs = z.infer<typeof scaffoldTaskArgs.schemas.schema>;\nexport type ProvisionTaskArgs = z.infer<typeof provisionTaskArgs.schemas.schema>;\nexport type InstallTaskArgs = z.infer<typeof installTaskArgs.schemas.schema>;\nexport type UninstallTaskArgs = z.infer<typeof uninstallTaskArgs.schemas.schema>;\nexport type CreateTaskArgs = z.infer<typeof createTaskArgs.schemas.schema>;\nexport type AddContractArgs = z.infer<typeof addContractArgs.schemas.schema>;\nexport type RemoveContractArgs = z.infer<typeof removeContractsArgs.schemas.schema>;\n\nexport const createScaffoldTaskArgs = scaffoldTaskArgs.factory.from;\nexport const makeScaffoldTaskArgs = scaffoldTaskArgs.factory.make;\nexport const ofScaffoldTaskArgs = scaffoldTaskArgs.factory.of;\n\nexport const createProvisionTaskArgs = provisionTaskArgs.factory.create;\nexport const makeProvisionTaskArgs = provisionTaskArgs.factory.make;\nexport const ofProvisionTaskArgs = provisionTaskArgs.factory.of;\n\nexport const createInstallTaskArgs = installTaskArgs.factory.create;\nexport const makeInstallTaskArgs = installTaskArgs.factory.make;\nexport const ofInstallTaskArgs = installTaskArgs.factory.of;\n\nexport const createUninstallTaskArgs = uninstallTaskArgs.factory.create;\nexport const makeUninstallTaskArgs = uninstallTaskArgs.factory.make;\nexport const ofUninstallTaskArgs = uninstallTaskArgs.factory.of;\n\nexport const createCreateTaskArgs = createTaskArgs.factory.create;\nexport const makeCreateTaskArgs = createTaskArgs.factory.make;\nexport const ofCreateTaskArgs = createTaskArgs.factory.of;\nexport const createAddContractArgs = addContractArgs.factory.create;\nexport const makeAddContractArgs = addContractArgs.factory.make;\nexport const ofAddContractArgs = addContractArgs.factory.of;\n\nexport const createRemoveContractsArgs = removeContractsArgs.factory.create;\nexport const makeRemoveContractsArgs = removeContractsArgs.factory.make;\nexport const ofRemoveContractsArgs = removeContractsArgs.factory.of;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAAuB;AACvB,qBAAgC;AAEhC,uBAAkC;AAClC,iBAAkB;AAEX,IAAM,YAAY,aAAE,OAAO;AAAA,EACjC,GAAG,aAAE,MAAM,aAAE,MAAM,CAAC,aAAE,OAAO,EAAE,IAAI,CAAC,GAAG,aAAE,OAAO,CAAC,CAAC,CAAC;AAAA,EACnD,YAA6B,yBAAQ;AAAA,EACrC,gBAAgB,aAAE;AAAA,IACjB,SAAO,OAAO,QAAQ,WAAW,SA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