bdy 1.23.7-dev-target-commands → 1.23.7-dev

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 (252) hide show
  1. package/distTs/README.md +181 -0
  2. package/distTs/package.json +10 -4
  3. package/distTs/src/agent/linux.js +53 -3
  4. package/distTs/src/agent/manager.js +3 -6
  5. package/distTs/src/agent/osx.js +51 -3
  6. package/distTs/src/agent/system.js +400 -21
  7. package/distTs/src/agent/windows.js +4 -7
  8. package/distTs/src/api/client.js +0 -156
  9. package/distTs/src/cliIndex.js +0 -4
  10. package/distTs/src/command/agent/debug.js +2 -2
  11. package/distTs/src/command/agent/install.js +37 -10
  12. package/distTs/src/command/agent/restart.js +2 -2
  13. package/distTs/src/command/agent/run.js +3 -0
  14. package/distTs/src/command/agent/start.js +2 -2
  15. package/distTs/src/command/agent/status.js +19 -0
  16. package/distTs/src/command/agent/stop.js +2 -2
  17. package/distTs/src/command/agent/uninstall.js +5 -8
  18. package/distTs/src/command/agent/update.js +2 -2
  19. package/distTs/src/command/artifact/list.js +6 -1
  20. package/distTs/src/command/artifact/publish.js +3 -1
  21. package/distTs/src/command/distro/route/update.js +1 -1
  22. package/distTs/src/command/distro/update.js +9 -9
  23. package/distTs/src/command/project/get.js +18 -0
  24. package/distTs/src/command/project/set.js +31 -0
  25. package/distTs/src/command/sandbox/get/yaml.js +30 -0
  26. package/distTs/src/command/version.js +13 -5
  27. package/distTs/src/command/vt/scrape.js +193 -0
  28. package/distTs/src/input.js +0 -54
  29. package/distTs/src/logger.js +40 -4
  30. package/distTs/src/texts.js +36 -210
  31. package/distTs/src/utils.js +99 -18
  32. package/node_modules/asn1/Jenkinsfile +65 -0
  33. package/node_modules/asn1/LICENSE +19 -0
  34. package/node_modules/asn1/README.md +50 -0
  35. package/node_modules/asn1/lib/ber/errors.js +13 -0
  36. package/node_modules/asn1/lib/ber/index.js +27 -0
  37. package/node_modules/asn1/lib/ber/reader.js +262 -0
  38. package/node_modules/asn1/lib/ber/types.js +36 -0
  39. package/node_modules/asn1/lib/ber/writer.js +317 -0
  40. package/node_modules/asn1/lib/index.js +20 -0
  41. package/node_modules/asn1/package.json +31 -0
  42. package/node_modules/bcrypt-pbkdf/CONTRIBUTING.md +13 -0
  43. package/node_modules/bcrypt-pbkdf/LICENSE +66 -0
  44. package/node_modules/bcrypt-pbkdf/README.md +45 -0
  45. package/node_modules/bcrypt-pbkdf/index.js +556 -0
  46. package/node_modules/bcrypt-pbkdf/package.json +15 -0
  47. package/node_modules/safer-buffer/LICENSE +21 -0
  48. package/node_modules/safer-buffer/Porting-Buffer.md +268 -0
  49. package/node_modules/safer-buffer/Readme.md +156 -0
  50. package/node_modules/safer-buffer/dangerous.js +58 -0
  51. package/node_modules/safer-buffer/package.json +34 -0
  52. package/node_modules/safer-buffer/safer.js +77 -0
  53. package/node_modules/safer-buffer/tests.js +406 -0
  54. package/node_modules/ssh2/.eslintignore +4 -0
  55. package/node_modules/ssh2/.eslintrc.js +5 -0
  56. package/node_modules/ssh2/.github/workflows/ci.yml +110 -0
  57. package/node_modules/ssh2/.github/workflows/lint.yml +27 -0
  58. package/node_modules/ssh2/LICENSE +19 -0
  59. package/node_modules/ssh2/README.md +1529 -0
  60. package/node_modules/ssh2/SFTP.md +413 -0
  61. package/node_modules/ssh2/examples/server-chat.js +238 -0
  62. package/node_modules/ssh2/examples/sftp-server-download-only.js +134 -0
  63. package/node_modules/ssh2/install.js +27 -0
  64. package/node_modules/ssh2/lib/Channel.js +295 -0
  65. package/node_modules/ssh2/lib/agent.js +1123 -0
  66. package/node_modules/ssh2/lib/client.js +2176 -0
  67. package/node_modules/ssh2/lib/http-agents.js +84 -0
  68. package/node_modules/ssh2/lib/index.js +44 -0
  69. package/node_modules/ssh2/lib/keygen.js +582 -0
  70. package/node_modules/ssh2/lib/protocol/Protocol.js +2136 -0
  71. package/node_modules/ssh2/lib/protocol/SFTP.js +4052 -0
  72. package/node_modules/ssh2/lib/protocol/constants.js +356 -0
  73. package/node_modules/ssh2/lib/protocol/crypto/binding.gyp +23 -0
  74. package/node_modules/ssh2/lib/protocol/crypto/poly1305.js +43 -0
  75. package/node_modules/ssh2/lib/protocol/crypto/src/binding.cc +2300 -0
  76. package/node_modules/ssh2/lib/protocol/crypto.js +1602 -0
  77. package/node_modules/ssh2/lib/protocol/handlers.js +16 -0
  78. package/node_modules/ssh2/lib/protocol/handlers.misc.js +1285 -0
  79. package/node_modules/ssh2/lib/protocol/kex.js +1908 -0
  80. package/node_modules/ssh2/lib/protocol/keyParser.js +1484 -0
  81. package/node_modules/ssh2/lib/protocol/node-fs-compat.js +115 -0
  82. package/node_modules/ssh2/lib/protocol/utils.js +356 -0
  83. package/node_modules/ssh2/lib/protocol/zlib.js +255 -0
  84. package/node_modules/ssh2/lib/server.js +1380 -0
  85. package/node_modules/ssh2/lib/utils.js +336 -0
  86. package/node_modules/ssh2/package.json +49 -0
  87. package/node_modules/ssh2/test/common.js +316 -0
  88. package/node_modules/ssh2/test/fixtures/bad_rsa_private_key +26 -0
  89. package/node_modules/ssh2/test/fixtures/https_cert.pem +33 -0
  90. package/node_modules/ssh2/test/fixtures/https_key.pem +52 -0
  91. package/node_modules/ssh2/test/fixtures/id_dsa +12 -0
  92. package/node_modules/ssh2/test/fixtures/id_ecdsa +5 -0
  93. package/node_modules/ssh2/test/fixtures/id_rsa +15 -0
  94. package/node_modules/ssh2/test/fixtures/id_rsa.ppk +26 -0
  95. package/node_modules/ssh2/test/fixtures/id_rsa_enc +30 -0
  96. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa +21 -0
  97. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa.pub +1 -0
  98. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa.pub.result +7 -0
  99. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa.result +7 -0
  100. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc +22 -0
  101. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc.pub +1 -0
  102. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc.pub.result +7 -0
  103. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc.result +7 -0
  104. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc_gcm +23 -0
  105. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc_gcm.pub +1 -0
  106. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc_gcm.pub.result +7 -0
  107. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc_gcm.result +7 -0
  108. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa +9 -0
  109. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa.pub +1 -0
  110. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa.pub.result +7 -0
  111. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa.result +7 -0
  112. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc +10 -0
  113. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc.pub +1 -0
  114. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc.pub.result +8 -0
  115. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc.result +7 -0
  116. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc_gcm +10 -0
  117. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc_gcm.pub +1 -0
  118. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc_gcm.pub.result +8 -0
  119. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc_gcm.result +7 -0
  120. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ed25519 +7 -0
  121. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ed25519.pub +1 -0
  122. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ed25519.pub.result +7 -0
  123. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ed25519.result +7 -0
  124. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa +27 -0
  125. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa.pub +1 -0
  126. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa.pub.result +7 -0
  127. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa.result +7 -0
  128. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc +28 -0
  129. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc.pub +1 -0
  130. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc.pub.result +8 -0
  131. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc.result +7 -0
  132. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc_gcm +29 -0
  133. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc_gcm.pub +1 -0
  134. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc_gcm.pub.result +8 -0
  135. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc_gcm.result +7 -0
  136. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa +12 -0
  137. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa.pub +1 -0
  138. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa.pub.result +7 -0
  139. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa.result +7 -0
  140. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa_enc +15 -0
  141. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa_enc.pub +1 -0
  142. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa_enc.pub.result +8 -0
  143. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa_enc.result +7 -0
  144. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa +5 -0
  145. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa.pub +1 -0
  146. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa.pub.result +7 -0
  147. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa.result +7 -0
  148. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa_enc +8 -0
  149. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa_enc.pub +1 -0
  150. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa_enc.pub.result +8 -0
  151. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa_enc.result +7 -0
  152. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa +27 -0
  153. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa.pub +1 -0
  154. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa.pub.result +7 -0
  155. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa.result +7 -0
  156. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc +30 -0
  157. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc.pub +1 -0
  158. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc.pub.result +8 -0
  159. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc.result +7 -0
  160. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc_aes256 +54 -0
  161. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc_aes256.pub +1 -0
  162. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc_aes256.pub.result +6 -0
  163. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc_aes256.result +6 -0
  164. package/node_modules/ssh2/test/fixtures/keyParser/ppk_dsa_enc +17 -0
  165. package/node_modules/ssh2/test/fixtures/keyParser/ppk_dsa_enc.result +7 -0
  166. package/node_modules/ssh2/test/fixtures/keyParser/ppk_rsa +26 -0
  167. package/node_modules/ssh2/test/fixtures/keyParser/ppk_rsa.result +7 -0
  168. package/node_modules/ssh2/test/fixtures/keyParser/ppk_rsa_enc +18 -0
  169. package/node_modules/ssh2/test/fixtures/keyParser/ppk_rsa_enc.result +7 -0
  170. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa.pub +9 -0
  171. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa.pub.result +7 -0
  172. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa2.pub +10 -0
  173. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa2.pub.result +7 -0
  174. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa3.pub +11 -0
  175. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa3.pub.result +7 -0
  176. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa4.pub +11 -0
  177. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa4.pub.result +7 -0
  178. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa5.pub +8 -0
  179. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa5.pub.result +7 -0
  180. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa6.pub +13 -0
  181. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa6.pub.result +7 -0
  182. package/node_modules/ssh2/test/fixtures/openssh_new_rsa +27 -0
  183. package/node_modules/ssh2/test/fixtures/ssh_host_dsa_key +12 -0
  184. package/node_modules/ssh2/test/fixtures/ssh_host_ecdsa_key +5 -0
  185. package/node_modules/ssh2/test/fixtures/ssh_host_rsa_key +15 -0
  186. package/node_modules/ssh2/test/test-exec.js +578 -0
  187. package/node_modules/ssh2/test/test-integration-openssh.js +486 -0
  188. package/node_modules/ssh2/test/test-keygen.js +60 -0
  189. package/node_modules/ssh2/test/test-misc-client-server.js +1460 -0
  190. package/node_modules/ssh2/test/test-openssh.js +261 -0
  191. package/node_modules/ssh2/test/test-protocol-crypto.js +631 -0
  192. package/node_modules/ssh2/test/test-protocol-keyparser.js +177 -0
  193. package/node_modules/ssh2/test/test-server-hostkeys.js +138 -0
  194. package/node_modules/ssh2/test/test-sftp.js +842 -0
  195. package/node_modules/ssh2/test/test-shell.js +109 -0
  196. package/node_modules/ssh2/test/test-userauth-agent-openssh.js +110 -0
  197. package/node_modules/ssh2/test/test-userauth-agent.js +171 -0
  198. package/node_modules/ssh2/test/test-userauth.js +611 -0
  199. package/node_modules/ssh2/test/test-worker-imports.js +25 -0
  200. package/node_modules/ssh2/test/test.js +20 -0
  201. package/node_modules/ssh2/util/build_pagent.bat +2 -0
  202. package/node_modules/ssh2/util/pagent.c +88 -0
  203. package/node_modules/ssh2/util/pagent.exe +0 -0
  204. package/node_modules/tweetnacl/.npmignore +4 -0
  205. package/node_modules/tweetnacl/AUTHORS.md +28 -0
  206. package/node_modules/tweetnacl/CHANGELOG.md +221 -0
  207. package/node_modules/tweetnacl/LICENSE +24 -0
  208. package/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md +20 -0
  209. package/node_modules/tweetnacl/README.md +459 -0
  210. package/node_modules/tweetnacl/nacl-fast.js +2388 -0
  211. package/node_modules/tweetnacl/nacl-fast.min.js +2 -0
  212. package/node_modules/tweetnacl/nacl.d.ts +98 -0
  213. package/node_modules/tweetnacl/nacl.js +1175 -0
  214. package/node_modules/tweetnacl/nacl.min.js +1 -0
  215. package/node_modules/tweetnacl/package.json +58 -0
  216. package/package.json +10 -4
  217. package/distTs/detect-rules.json +0 -351
  218. package/distTs/src/command/environment/create.js +0 -70
  219. package/distTs/src/command/environment/delete.js +0 -29
  220. package/distTs/src/command/environment/get.js +0 -48
  221. package/distTs/src/command/environment/list.js +0 -44
  222. package/distTs/src/command/environment/resolve.js +0 -22
  223. package/distTs/src/command/environment/update.js +0 -59
  224. package/distTs/src/command/environment.js +0 -20
  225. package/distTs/src/command/pipeline/run/apply.js +0 -62
  226. package/distTs/src/command/target/create.js +0 -33
  227. package/distTs/src/command/target/delete.js +0 -30
  228. package/distTs/src/command/target/exec/command.js +0 -65
  229. package/distTs/src/command/target/exec/kill.js +0 -25
  230. package/distTs/src/command/target/exec/list.js +0 -54
  231. package/distTs/src/command/target/exec/logs.js +0 -25
  232. package/distTs/src/command/target/exec/status.js +0 -41
  233. package/distTs/src/command/target/exec.js +0 -24
  234. package/distTs/src/command/target/get.js +0 -62
  235. package/distTs/src/command/target/list.js +0 -48
  236. package/distTs/src/command/target/scope.js +0 -60
  237. package/distTs/src/command/target/update.js +0 -31
  238. package/distTs/src/command/target.js +0 -22
  239. package/distTs/src/command/yaml/actions/detect.js +0 -268
  240. package/distTs/src/command/yaml/actions/info.js +0 -56
  241. package/distTs/src/command/yaml/actions/list.js +0 -70
  242. package/distTs/src/command/yaml/actions/schema.js +0 -104
  243. package/distTs/src/command/yaml/actions.js +0 -13
  244. package/distTs/src/command/yaml/agents.js +0 -88
  245. package/distTs/src/command/yaml/cache.js +0 -98
  246. package/distTs/src/command/yaml/init.js +0 -110
  247. package/distTs/src/command/yaml/pipeline.js +0 -42
  248. package/distTs/src/command/yaml/render.js +0 -83
  249. package/distTs/src/command/yaml/schemaUtils.js +0 -139
  250. package/distTs/src/command/yaml/validate.js +0 -259
  251. package/distTs/src/command/yaml.js +0 -18
  252. package/distTs/src/diskCache.js +0 -82
@@ -0,0 +1 @@
1
+ !function(r){"use strict";function n(r,n){return r<<n|r>>>32-n}function e(r,n){var e=255&r[n+3];return e=e<<8|255&r[n+2],e=e<<8|255&r[n+1],e<<8|255&r[n+0]}function t(r,n){var e=r[n]<<24|r[n+1]<<16|r[n+2]<<8|r[n+3],t=r[n+4]<<24|r[n+5]<<16|r[n+6]<<8|r[n+7];return new sr(e,t)}function o(r,n,e){var t;for(t=0;t<4;t++)r[n+t]=255&e,e>>>=8}function i(r,n,e){r[n]=e.hi>>24&255,r[n+1]=e.hi>>16&255,r[n+2]=e.hi>>8&255,r[n+3]=255&e.hi,r[n+4]=e.lo>>24&255,r[n+5]=e.lo>>16&255,r[n+6]=e.lo>>8&255,r[n+7]=255&e.lo}function a(r,n,e,t,o){var i,a=0;for(i=0;i<o;i++)a|=r[n+i]^e[t+i];return(1&a-1>>>8)-1}function f(r,n,e,t){return a(r,n,e,t,16)}function u(r,n,e,t){return a(r,n,e,t,32)}function c(r,t,i,a,f){var u,c,w,y=new Uint32Array(16),l=new Uint32Array(16),s=new Uint32Array(16),h=new Uint32Array(4);for(u=0;u<4;u++)l[5*u]=e(a,4*u),l[1+u]=e(i,4*u),l[6+u]=e(t,4*u),l[11+u]=e(i,16+4*u);for(u=0;u<16;u++)s[u]=l[u];for(u=0;u<20;u++){for(c=0;c<4;c++){for(w=0;w<4;w++)h[w]=l[(5*c+4*w)%16];for(h[1]^=n(h[0]+h[3]|0,7),h[2]^=n(h[1]+h[0]|0,9),h[3]^=n(h[2]+h[1]|0,13),h[0]^=n(h[3]+h[2]|0,18),w=0;w<4;w++)y[4*c+(c+w)%4]=h[w]}for(w=0;w<16;w++)l[w]=y[w]}if(f){for(u=0;u<16;u++)l[u]=l[u]+s[u]|0;for(u=0;u<4;u++)l[5*u]=l[5*u]-e(a,4*u)|0,l[6+u]=l[6+u]-e(t,4*u)|0;for(u=0;u<4;u++)o(r,4*u,l[5*u]),o(r,16+4*u,l[6+u])}else for(u=0;u<16;u++)o(r,4*u,l[u]+s[u]|0)}function w(r,n,e,t){return c(r,n,e,t,!1),0}function y(r,n,e,t){return c(r,n,e,t,!0),0}function l(r,n,e,t,o,i,a){var f,u,c=new Uint8Array(16),y=new Uint8Array(64);if(!o)return 0;for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=i[u];for(;o>=64;){for(w(y,c,a,Br),u=0;u<64;u++)r[n+u]=(e?e[t+u]:0)^y[u];for(f=1,u=8;u<16;u++)f=f+(255&c[u])|0,c[u]=255&f,f>>>=8;o-=64,n+=64,e&&(t+=64)}if(o>0)for(w(y,c,a,Br),u=0;u<o;u++)r[n+u]=(e?e[t+u]:0)^y[u];return 0}function s(r,n,e,t,o){return l(r,n,null,0,e,t,o)}function h(r,n,e,t,o){var i=new Uint8Array(32);return y(i,t,o,Br),s(r,n,e,t.subarray(16),i)}function g(r,n,e,t,o,i,a){var f=new Uint8Array(32);return y(f,i,a,Br),l(r,n,e,t,o,i.subarray(16),f)}function v(r,n){var e,t=0;for(e=0;e<17;e++)t=t+(r[e]+n[e]|0)|0,r[e]=255&t,t>>>=8}function b(r,n,e,t,o,i){var a,f,u,c,w=new Uint32Array(17),y=new Uint32Array(17),l=new Uint32Array(17),s=new Uint32Array(17),h=new Uint32Array(17);for(u=0;u<17;u++)y[u]=l[u]=0;for(u=0;u<16;u++)y[u]=i[u];for(y[3]&=15,y[4]&=252,y[7]&=15,y[8]&=252,y[11]&=15,y[12]&=252,y[15]&=15;o>0;){for(u=0;u<17;u++)s[u]=0;for(u=0;u<16&&u<o;++u)s[u]=e[t+u];for(s[u]=1,t+=u,o-=u,v(l,s),f=0;f<17;f++)for(w[f]=0,u=0;u<17;u++)w[f]=w[f]+l[u]*(u<=f?y[f-u]:320*y[f+17-u]|0)|0|0;for(f=0;f<17;f++)l[f]=w[f];for(c=0,u=0;u<16;u++)c=c+l[u]|0,l[u]=255&c,c>>>=8;for(c=c+l[16]|0,l[16]=3&c,c=5*(c>>>2)|0,u=0;u<16;u++)c=c+l[u]|0,l[u]=255&c,c>>>=8;c=c+l[16]|0,l[16]=c}for(u=0;u<17;u++)h[u]=l[u];for(v(l,Sr),a=0|-(l[16]>>>7),u=0;u<17;u++)l[u]^=a&(h[u]^l[u]);for(u=0;u<16;u++)s[u]=i[u+16];for(s[16]=0,v(l,s),u=0;u<16;u++)r[n+u]=l[u];return 0}function p(r,n,e,t,o,i){var a=new Uint8Array(16);return b(a,0,e,t,o,i),f(r,n,a,0)}function _(r,n,e,t,o){var i;if(e<32)return-1;for(g(r,0,n,0,e,t,o),b(r,16,r,32,e-32,r),i=0;i<16;i++)r[i]=0;return 0}function A(r,n,e,t,o){var i,a=new Uint8Array(32);if(e<32)return-1;if(h(a,0,32,t,o),0!==p(n,16,n,32,e-32,a))return-1;for(g(r,0,n,0,e,t,o),i=0;i<32;i++)r[i]=0;return 0}function U(r,n){var e;for(e=0;e<16;e++)r[e]=0|n[e]}function E(r){var n,e;for(e=0;e<16;e++)r[e]+=65536,n=Math.floor(r[e]/65536),r[(e+1)*(e<15?1:0)]+=n-1+37*(n-1)*(15===e?1:0),r[e]-=65536*n}function d(r,n,e){for(var t,o=~(e-1),i=0;i<16;i++)t=o&(r[i]^n[i]),r[i]^=t,n[i]^=t}function x(r,n){var e,t,o,i=hr(),a=hr();for(e=0;e<16;e++)a[e]=n[e];for(E(a),E(a),E(a),t=0;t<2;t++){for(i[0]=a[0]-65517,e=1;e<15;e++)i[e]=a[e]-65535-(i[e-1]>>16&1),i[e-1]&=65535;i[15]=a[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,d(a,i,1-o)}for(e=0;e<16;e++)r[2*e]=255&a[e],r[2*e+1]=a[e]>>8}function m(r,n){var e=new Uint8Array(32),t=new Uint8Array(32);return x(e,r),x(t,n),u(e,0,t,0)}function B(r){var n=new Uint8Array(32);return x(n,r),1&n[0]}function S(r,n){var e;for(e=0;e<16;e++)r[e]=n[2*e]+(n[2*e+1]<<8);r[15]&=32767}function K(r,n,e){var t;for(t=0;t<16;t++)r[t]=n[t]+e[t]|0}function T(r,n,e){var t;for(t=0;t<16;t++)r[t]=n[t]-e[t]|0}function Y(r,n,e){var t,o,i=new Float64Array(31);for(t=0;t<31;t++)i[t]=0;for(t=0;t<16;t++)for(o=0;o<16;o++)i[t+o]+=n[t]*e[o];for(t=0;t<15;t++)i[t]+=38*i[t+16];for(t=0;t<16;t++)r[t]=i[t];E(r),E(r)}function L(r,n){Y(r,n,n)}function k(r,n){var e,t=hr();for(e=0;e<16;e++)t[e]=n[e];for(e=253;e>=0;e--)L(t,t),2!==e&&4!==e&&Y(t,t,n);for(e=0;e<16;e++)r[e]=t[e]}function z(r,n){var e,t=hr();for(e=0;e<16;e++)t[e]=n[e];for(e=250;e>=0;e--)L(t,t),1!==e&&Y(t,t,n);for(e=0;e<16;e++)r[e]=t[e]}function R(r,n,e){var t,o,i=new Uint8Array(32),a=new Float64Array(80),f=hr(),u=hr(),c=hr(),w=hr(),y=hr(),l=hr();for(o=0;o<31;o++)i[o]=n[o];for(i[31]=127&n[31]|64,i[0]&=248,S(a,e),o=0;o<16;o++)u[o]=a[o],w[o]=f[o]=c[o]=0;for(f[0]=w[0]=1,o=254;o>=0;--o)t=i[o>>>3]>>>(7&o)&1,d(f,u,t),d(c,w,t),K(y,f,c),T(f,f,c),K(c,u,w),T(u,u,w),L(w,y),L(l,f),Y(f,c,f),Y(c,u,y),K(y,f,c),T(f,f,c),L(u,f),T(c,w,l),Y(f,c,Ar),K(f,f,w),Y(c,c,f),Y(f,w,l),Y(w,u,a),L(u,y),d(f,u,t),d(c,w,t);for(o=0;o<16;o++)a[o+16]=f[o],a[o+32]=c[o],a[o+48]=u[o],a[o+64]=w[o];var s=a.subarray(32),h=a.subarray(16);return k(s,s),Y(h,h,s),x(r,h),0}function P(r,n){return R(r,n,br)}function O(r,n){return gr(n,32),P(r,n)}function F(r,n,e){var t=new Uint8Array(32);return R(t,e,n),y(r,vr,t,Br)}function N(r,n,e,t,o,i){var a=new Uint8Array(32);return F(a,o,i),Kr(r,n,e,t,a)}function C(r,n,e,t,o,i){var a=new Uint8Array(32);return F(a,o,i),Tr(r,n,e,t,a)}function M(){var r,n,e,t=0,o=0,i=0,a=0,f=65535;for(e=0;e<arguments.length;e++)r=arguments[e].lo,n=arguments[e].hi,t+=r&f,o+=r>>>16,i+=n&f,a+=n>>>16;return o+=t>>>16,i+=o>>>16,a+=i>>>16,new sr(i&f|a<<16,t&f|o<<16)}function G(r,n){return new sr(r.hi>>>n,r.lo>>>n|r.hi<<32-n)}function Z(){var r,n=0,e=0;for(r=0;r<arguments.length;r++)n^=arguments[r].lo,e^=arguments[r].hi;return new sr(e,n)}function j(r,n){var e,t,o=32-n;return n<32?(e=r.hi>>>n|r.lo<<o,t=r.lo>>>n|r.hi<<o):n<64&&(e=r.lo>>>n|r.hi<<o,t=r.hi>>>n|r.lo<<o),new sr(e,t)}function q(r,n,e){var t=r.hi&n.hi^~r.hi&e.hi,o=r.lo&n.lo^~r.lo&e.lo;return new sr(t,o)}function I(r,n,e){var t=r.hi&n.hi^r.hi&e.hi^n.hi&e.hi,o=r.lo&n.lo^r.lo&e.lo^n.lo&e.lo;return new sr(t,o)}function V(r){return Z(j(r,28),j(r,34),j(r,39))}function X(r){return Z(j(r,14),j(r,18),j(r,41))}function D(r){return Z(j(r,1),j(r,8),G(r,7))}function H(r){return Z(j(r,19),j(r,61),G(r,6))}function J(r,n,e){var o,a,f,u=[],c=[],w=[],y=[];for(a=0;a<8;a++)u[a]=w[a]=t(r,8*a);for(var l=0;e>=128;){for(a=0;a<16;a++)y[a]=t(n,8*a+l);for(a=0;a<80;a++){for(f=0;f<8;f++)c[f]=w[f];for(o=M(w[7],X(w[4]),q(w[4],w[5],w[6]),Yr[a],y[a%16]),c[7]=M(o,V(w[0]),I(w[0],w[1],w[2])),c[3]=M(c[3],o),f=0;f<8;f++)w[(f+1)%8]=c[f];if(a%16===15)for(f=0;f<16;f++)y[f]=M(y[f],y[(f+9)%16],D(y[(f+1)%16]),H(y[(f+14)%16]))}for(a=0;a<8;a++)w[a]=M(w[a],u[a]),u[a]=w[a];l+=128,e-=128}for(a=0;a<8;a++)i(r,8*a,u[a]);return e}function Q(r,n,e){var t,o=new Uint8Array(64),a=new Uint8Array(256),f=e;for(t=0;t<64;t++)o[t]=Lr[t];for(J(o,n,e),e%=128,t=0;t<256;t++)a[t]=0;for(t=0;t<e;t++)a[t]=n[f-e+t];for(a[e]=128,e=256-128*(e<112?1:0),a[e-9]=0,i(a,e-8,new sr(f/536870912|0,f<<3)),J(o,a,e),t=0;t<64;t++)r[t]=o[t];return 0}function W(r,n){var e=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr(),c=hr(),w=hr();T(e,r[1],r[0]),T(w,n[1],n[0]),Y(e,e,w),K(t,r[0],r[1]),K(w,n[0],n[1]),Y(t,t,w),Y(o,r[3],n[3]),Y(o,o,Er),Y(i,r[2],n[2]),K(i,i,i),T(a,t,e),T(f,i,o),K(u,i,o),K(c,t,e),Y(r[0],a,f),Y(r[1],c,u),Y(r[2],u,f),Y(r[3],a,c)}function $(r,n,e){var t;for(t=0;t<4;t++)d(r[t],n[t],e)}function rr(r,n){var e=hr(),t=hr(),o=hr();k(o,n[2]),Y(e,n[0],o),Y(t,n[1],o),x(r,t),r[31]^=B(e)<<7}function nr(r,n,e){var t,o;for(U(r[0],pr),U(r[1],_r),U(r[2],_r),U(r[3],pr),o=255;o>=0;--o)t=e[o/8|0]>>(7&o)&1,$(r,n,t),W(n,r),W(r,r),$(r,n,t)}function er(r,n){var e=[hr(),hr(),hr(),hr()];U(e[0],dr),U(e[1],xr),U(e[2],_r),Y(e[3],dr,xr),nr(r,e,n)}function tr(r,n,e){var t,o=new Uint8Array(64),i=[hr(),hr(),hr(),hr()];for(e||gr(n,32),Q(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,er(i,o),rr(r,i),t=0;t<32;t++)n[t+32]=r[t];return 0}function or(r,n){var e,t,o,i;for(t=63;t>=32;--t){for(e=0,o=t-32,i=t-12;o<i;++o)n[o]+=e-16*n[t]*kr[o-(t-32)],e=n[o]+128>>8,n[o]-=256*e;n[o]+=e,n[t]=0}for(e=0,o=0;o<32;o++)n[o]+=e-(n[31]>>4)*kr[o],e=n[o]>>8,n[o]&=255;for(o=0;o<32;o++)n[o]-=e*kr[o];for(t=0;t<32;t++)n[t+1]+=n[t]>>8,r[t]=255&n[t]}function ir(r){var n,e=new Float64Array(64);for(n=0;n<64;n++)e[n]=r[n];for(n=0;n<64;n++)r[n]=0;or(r,e)}function ar(r,n,e,t){var o,i,a=new Uint8Array(64),f=new Uint8Array(64),u=new Uint8Array(64),c=new Float64Array(64),w=[hr(),hr(),hr(),hr()];Q(a,t,32),a[0]&=248,a[31]&=127,a[31]|=64;var y=e+64;for(o=0;o<e;o++)r[64+o]=n[o];for(o=0;o<32;o++)r[32+o]=a[32+o];for(Q(u,r.subarray(32),e+32),ir(u),er(w,u),rr(r,w),o=32;o<64;o++)r[o]=t[o];for(Q(f,r,e+64),ir(f),o=0;o<64;o++)c[o]=0;for(o=0;o<32;o++)c[o]=u[o];for(o=0;o<32;o++)for(i=0;i<32;i++)c[o+i]+=f[o]*a[i];return or(r.subarray(32),c),y}function fr(r,n){var e=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr();return U(r[2],_r),S(r[1],n),L(o,r[1]),Y(i,o,Ur),T(o,o,r[2]),K(i,r[2],i),L(a,i),L(f,a),Y(u,f,a),Y(e,u,o),Y(e,e,i),z(e,e),Y(e,e,o),Y(e,e,i),Y(e,e,i),Y(r[0],e,i),L(t,r[0]),Y(t,t,i),m(t,o)&&Y(r[0],r[0],mr),L(t,r[0]),Y(t,t,i),m(t,o)?-1:(B(r[0])===n[31]>>7&&T(r[0],pr,r[0]),Y(r[3],r[0],r[1]),0)}function ur(r,n,e,t){var o,i,a=new Uint8Array(32),f=new Uint8Array(64),c=[hr(),hr(),hr(),hr()],w=[hr(),hr(),hr(),hr()];if(i=-1,e<64)return-1;if(fr(w,t))return-1;for(o=0;o<e;o++)r[o]=n[o];for(o=0;o<32;o++)r[o+32]=t[o];if(Q(f,r,e),ir(f),nr(c,w,f),er(w,n.subarray(32)),W(c,w),rr(a,c),e-=64,u(n,0,a,0)){for(o=0;o<e;o++)r[o]=0;return-1}for(o=0;o<e;o++)r[o]=n[o+64];return i=e}function cr(r,n){if(r.length!==zr)throw new Error("bad key size");if(n.length!==Rr)throw new Error("bad nonce size")}function wr(r,n){if(r.length!==Cr)throw new Error("bad public key size");if(n.length!==Mr)throw new Error("bad secret key size")}function yr(){var r,n;for(n=0;n<arguments.length;n++)if("[object Uint8Array]"!==(r=Object.prototype.toString.call(arguments[n])))throw new TypeError("unexpected type "+r+", use Uint8Array")}function lr(r){for(var n=0;n<r.length;n++)r[n]=0}var sr=function(r,n){this.hi=0|r,this.lo=0|n},hr=function(r){var n,e=new Float64Array(16);if(r)for(n=0;n<r.length;n++)e[n]=r[n];return e},gr=function(){throw new Error("no PRNG")},vr=new Uint8Array(16),br=new Uint8Array(32);br[0]=9;var pr=hr(),_r=hr([1]),Ar=hr([56129,1]),Ur=hr([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),Er=hr([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),dr=hr([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),xr=hr([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),mr=hr([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]),Br=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]),Sr=new Uint32Array([5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252]),Kr=_,Tr=A,Yr=[new sr(1116352408,3609767458),new sr(1899447441,602891725),new sr(3049323471,3964484399),new sr(3921009573,2173295548),new sr(961987163,4081628472),new sr(1508970993,3053834265),new sr(2453635748,2937671579),new sr(2870763221,3664609560),new sr(3624381080,2734883394),new sr(310598401,1164996542),new sr(607225278,1323610764),new sr(1426881987,3590304994),new sr(1925078388,4068182383),new sr(2162078206,991336113),new sr(2614888103,633803317),new sr(3248222580,3479774868),new sr(3835390401,2666613458),new sr(4022224774,944711139),new sr(264347078,2341262773),new sr(604807628,2007800933),new sr(770255983,1495990901),new sr(1249150122,1856431235),new sr(1555081692,3175218132),new sr(1996064986,2198950837),new sr(2554220882,3999719339),new sr(2821834349,766784016),new sr(2952996808,2566594879),new sr(3210313671,3203337956),new sr(3336571891,1034457026),new sr(3584528711,2466948901),new sr(113926993,3758326383),new sr(338241895,168717936),new sr(666307205,1188179964),new sr(773529912,1546045734),new sr(1294757372,1522805485),new sr(1396182291,2643833823),new sr(1695183700,2343527390),new sr(1986661051,1014477480),new sr(2177026350,1206759142),new sr(2456956037,344077627),new sr(2730485921,1290863460),new sr(2820302411,3158454273),new sr(3259730800,3505952657),new sr(3345764771,106217008),new sr(3516065817,3606008344),new sr(3600352804,1432725776),new sr(4094571909,1467031594),new sr(275423344,851169720),new sr(430227734,3100823752),new sr(506948616,1363258195),new sr(659060556,3750685593),new sr(883997877,3785050280),new sr(958139571,3318307427),new sr(1322822218,3812723403),new sr(1537002063,2003034995),new sr(1747873779,3602036899),new sr(1955562222,1575990012),new sr(2024104815,1125592928),new sr(2227730452,2716904306),new sr(2361852424,442776044),new sr(2428436474,593698344),new sr(2756734187,3733110249),new sr(3204031479,2999351573),new sr(3329325298,3815920427),new sr(3391569614,3928383900),new sr(3515267271,566280711),new sr(3940187606,3454069534),new sr(4118630271,4000239992),new sr(116418474,1914138554),new sr(174292421,2731055270),new sr(289380356,3203993006),new sr(460393269,320620315),new sr(685471733,587496836),new sr(852142971,1086792851),new sr(1017036298,365543100),new sr(1126000580,2618297676),new sr(1288033470,3409855158),new sr(1501505948,4234509866),new sr(1607167915,987167468),new sr(1816402316,1246189591)],Lr=new Uint8Array([106,9,230,103,243,188,201,8,187,103,174,133,132,202,167,59,60,110,243,114,254,148,248,43,165,79,245,58,95,29,54,241,81,14,82,127,173,230,130,209,155,5,104,140,43,62,108,31,31,131,217,171,251,65,189,107,91,224,205,25,19,126,33,121]),kr=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),zr=32,Rr=24,Pr=32,Or=16,Fr=32,Nr=32,Cr=32,Mr=32,Gr=32,Zr=Rr,jr=Pr,qr=Or,Ir=64,Vr=32,Xr=64,Dr=32,Hr=64;r.lowlevel={crypto_core_hsalsa20:y,crypto_stream_xor:g,crypto_stream:h,crypto_stream_salsa20_xor:l,crypto_stream_salsa20:s,crypto_onetimeauth:b,crypto_onetimeauth_verify:p,crypto_verify_16:f,crypto_verify_32:u,crypto_secretbox:_,crypto_secretbox_open:A,crypto_scalarmult:R,crypto_scalarmult_base:P,crypto_box_beforenm:F,crypto_box_afternm:Kr,crypto_box:N,crypto_box_open:C,crypto_box_keypair:O,crypto_hash:Q,crypto_sign:ar,crypto_sign_keypair:tr,crypto_sign_open:ur,crypto_secretbox_KEYBYTES:zr,crypto_secretbox_NONCEBYTES:Rr,crypto_secretbox_ZEROBYTES:Pr,crypto_secretbox_BOXZEROBYTES:Or,crypto_scalarmult_BYTES:Fr,crypto_scalarmult_SCALARBYTES:Nr,crypto_box_PUBLICKEYBYTES:Cr,crypto_box_SECRETKEYBYTES:Mr,crypto_box_BEFORENMBYTES:Gr,crypto_box_NONCEBYTES:Zr,crypto_box_ZEROBYTES:jr,crypto_box_BOXZEROBYTES:qr,crypto_sign_BYTES:Ir,crypto_sign_PUBLICKEYBYTES:Vr,crypto_sign_SECRETKEYBYTES:Xr,crypto_sign_SEEDBYTES:Dr,crypto_hash_BYTES:Hr},r.util||(r.util={},r.util.decodeUTF8=r.util.encodeUTF8=r.util.encodeBase64=r.util.decodeBase64=function(){throw new Error("nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js")}),r.randomBytes=function(r){var n=new Uint8Array(r);return gr(n,r),n},r.secretbox=function(r,n,e){yr(r,n,e),cr(e,n);for(var t=new Uint8Array(Pr+r.length),o=new Uint8Array(t.length),i=0;i<r.length;i++)t[i+Pr]=r[i];return _(o,t,t.length,n,e),o.subarray(Or)},r.secretbox.open=function(r,n,e){yr(r,n,e),cr(e,n);for(var t=new Uint8Array(Or+r.length),o=new Uint8Array(t.length),i=0;i<r.length;i++)t[i+Or]=r[i];return!(t.length<32)&&(0===A(o,t,t.length,n,e)&&o.subarray(Pr))},r.secretbox.keyLength=zr,r.secretbox.nonceLength=Rr,r.secretbox.overheadLength=Or,r.scalarMult=function(r,n){if(yr(r,n),r.length!==Nr)throw new Error("bad n size");if(n.length!==Fr)throw new Error("bad p size");var e=new Uint8Array(Fr);return R(e,r,n),e},r.scalarMult.base=function(r){if(yr(r),r.length!==Nr)throw new Error("bad n size");var n=new Uint8Array(Fr);return P(n,r),n},r.scalarMult.scalarLength=Nr,r.scalarMult.groupElementLength=Fr,r.box=function(n,e,t,o){var i=r.box.before(t,o);return r.secretbox(n,e,i)},r.box.before=function(r,n){yr(r,n),wr(r,n);var e=new Uint8Array(Gr);return F(e,r,n),e},r.box.after=r.secretbox,r.box.open=function(n,e,t,o){var i=r.box.before(t,o);return r.secretbox.open(n,e,i)},r.box.open.after=r.secretbox.open,r.box.keyPair=function(){var r=new Uint8Array(Cr),n=new Uint8Array(Mr);return O(r,n),{publicKey:r,secretKey:n}},r.box.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Mr)throw new Error("bad secret key size");var n=new Uint8Array(Cr);return P(n,r),{publicKey:n,secretKey:new Uint8Array(r)}},r.box.publicKeyLength=Cr,r.box.secretKeyLength=Mr,r.box.sharedKeyLength=Gr,r.box.nonceLength=Zr,r.box.overheadLength=r.secretbox.overheadLength,r.sign=function(r,n){if(yr(r,n),n.length!==Xr)throw new Error("bad secret key size");var e=new Uint8Array(Ir+r.length);return ar(e,r,r.length,n),e},r.sign.open=function(r,n){if(2!==arguments.length)throw new Error("nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?");if(yr(r,n),n.length!==Vr)throw new Error("bad public key size");var e=new Uint8Array(r.length),t=ur(e,r,r.length,n);if(t<0)return null;for(var o=new Uint8Array(t),i=0;i<o.length;i++)o[i]=e[i];return o},r.sign.detached=function(n,e){for(var t=r.sign(n,e),o=new Uint8Array(Ir),i=0;i<o.length;i++)o[i]=t[i];return o},r.sign.detached.verify=function(r,n,e){if(yr(r,n,e),n.length!==Ir)throw new Error("bad signature size");if(e.length!==Vr)throw new Error("bad public key size");var t,o=new Uint8Array(Ir+r.length),i=new Uint8Array(Ir+r.length);for(t=0;t<Ir;t++)o[t]=n[t];for(t=0;t<r.length;t++)o[t+Ir]=r[t];return ur(i,o,o.length,e)>=0},r.sign.keyPair=function(){var r=new Uint8Array(Vr),n=new Uint8Array(Xr);return tr(r,n),{publicKey:r,secretKey:n}},r.sign.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Xr)throw new Error("bad secret key size");for(var n=new Uint8Array(Vr),e=0;e<n.length;e++)n[e]=r[32+e];return{publicKey:n,secretKey:new Uint8Array(r)}},r.sign.keyPair.fromSeed=function(r){if(yr(r),r.length!==Dr)throw new Error("bad seed size");for(var n=new Uint8Array(Vr),e=new Uint8Array(Xr),t=0;t<32;t++)e[t]=r[t];return tr(n,e,!0),{publicKey:n,secretKey:e}},r.sign.publicKeyLength=Vr,r.sign.secretKeyLength=Xr,r.sign.seedLength=Dr,r.sign.signatureLength=Ir,r.hash=function(r){yr(r);var n=new Uint8Array(Hr);return Q(n,r,r.length),n},r.hash.hashLength=Hr,r.verify=function(r,n){return yr(r,n),0!==r.length&&0!==n.length&&(r.length===n.length&&0===a(r,0,n,0,r.length))},r.setPRNG=function(r){gr=r},function(){var n="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(n&&n.getRandomValues){var e=65536;r.setPRNG(function(r,t){var o,i=new Uint8Array(t);for(o=0;o<t;o+=e)n.getRandomValues(i.subarray(o,o+Math.min(t-o,e)));for(o=0;o<t;o++)r[o]=i[o];lr(i)})}else"undefined"!=typeof require&&(n=require("crypto"),n&&n.randomBytes&&r.setPRNG(function(r,e){var t,o=n.randomBytes(e);for(t=0;t<e;t++)r[t]=o[t];lr(o)}))}()}("undefined"!=typeof module&&module.exports?module.exports:self.nacl=self.nacl||{});
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "tweetnacl",
3
+ "version": "0.14.5",
4
+ "description": "Port of TweetNaCl cryptographic library to JavaScript",
5
+ "main": "nacl-fast.js",
6
+ "types": "nacl.d.ts",
7
+ "directories": {
8
+ "test": "test"
9
+ },
10
+ "scripts": {
11
+ "build": "uglifyjs nacl.js -c -m -o nacl.min.js && uglifyjs nacl-fast.js -c -m -o nacl-fast.min.js",
12
+ "test-node": "tape test/*.js | faucet",
13
+ "test-node-all": "make -C test/c && tape test/*.js test/c/*.js | faucet",
14
+ "test-browser": "NACL_SRC=${NACL_SRC:='nacl.min.js'} && npm run build-test-browser && cat $NACL_SRC test/browser/_bundle.js | tape-run | faucet",
15
+ "build-test-browser": "browserify test/browser/init.js test/*.js | uglifyjs -c -m -o test/browser/_bundle.js 2>/dev/null && browserify test/browser/init.js test/*.quick.js | uglifyjs -c -m -o test/browser/_bundle-quick.js 2>/dev/null",
16
+ "test": "npm run test-node-all && npm run test-browser",
17
+ "bench": "node test/benchmark/bench.js",
18
+ "lint": "eslint nacl.js nacl-fast.js test/*.js test/benchmark/*.js"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "https://github.com/dchest/tweetnacl-js.git"
23
+ },
24
+ "keywords": [
25
+ "crypto",
26
+ "cryptography",
27
+ "curve25519",
28
+ "ed25519",
29
+ "encrypt",
30
+ "hash",
31
+ "key",
32
+ "nacl",
33
+ "poly1305",
34
+ "public",
35
+ "salsa20",
36
+ "signatures"
37
+ ],
38
+ "author": "TweetNaCl-js contributors",
39
+ "license": "Unlicense",
40
+ "bugs": {
41
+ "url": "https://github.com/dchest/tweetnacl-js/issues"
42
+ },
43
+ "homepage": "https://tweetnacl.js.org",
44
+ "devDependencies": {
45
+ "browserify": "^13.0.0",
46
+ "eslint": "^2.2.0",
47
+ "faucet": "^0.0.1",
48
+ "tap-browser-color": "^0.1.2",
49
+ "tape": "^4.4.0",
50
+ "tape-run": "^2.1.3",
51
+ "tweetnacl-util": "^0.13.3",
52
+ "uglify-js": "^2.6.1"
53
+ },
54
+ "browser": {
55
+ "buffer": false,
56
+ "crypto": false
57
+ }
58
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.23.7-dev-target-commands",
4
+ "version": "1.23.7-dev",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "homepage": "https://buddy.works/docs/cli",
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "scripts": {
12
12
  "lint": "eslint \"*/**\"",
13
- "lint:types": "tsc --skipLibCheck --noEmit --project tsconfig.json",
13
+ "lint:types": "tsc --skipLibCheck --noEmit --project tsconfig.json && tsc --skipLibCheck --project test/tsconfig.json && tsc --skipLibCheck --project e2e/tsconfig.json",
14
14
  "watch": "tsc --watch --project tsconfig.json & tsc --watch --project src/visualTest/utils/tsconfig.json",
15
15
  "buildTs": "(tsc --project tsconfig.json & tsc --project src/visualTest/utils/tsconfig.json & wait) && cp package.json distTs/package.json && curl -fsSL https://raw.githubusercontent.com/buddy/cli/main/README.md -o README.md",
16
16
  "e2e": "npm run buildTs && vitest run --config e2e/vitest.config.ts",
@@ -27,8 +27,6 @@
27
27
  "e2e:tunnel": "vitest run --config e2e/vitest.config.ts e2e/modules/tunnel/",
28
28
  "e2e:agent": "vitest run --config e2e/vitest.config.ts e2e/modules/agent/",
29
29
  "e2e:distro": "vitest run --config e2e/vitest.config.ts e2e/modules/distro/",
30
- "e2e:target": "vitest run --config e2e/vitest.config.ts e2e/modules/target/",
31
- "e2e:environment": "vitest run --config e2e/vitest.config.ts e2e/modules/environment/",
32
30
  "unit": "vitest run --config vitest.config.ts"
33
31
  },
34
32
  "files": [
@@ -40,6 +38,13 @@
40
38
  "engines": {
41
39
  "node": ">=24.14"
42
40
  },
41
+ "bundleDependencies": [
42
+ "ssh2",
43
+ "asn1",
44
+ "safer-buffer",
45
+ "bcrypt-pbkdf",
46
+ "tweetnacl"
47
+ ],
43
48
  "dependencies": {
44
49
  "@buddy-works/ci-info": "1.1.7",
45
50
  "@fastify/accept-negotiator": "2.0.1",
@@ -102,6 +107,7 @@
102
107
  "@types/mime-db": "1.43.6",
103
108
  "@types/mime-types": "3.0.1",
104
109
  "@types/netmask": "2.0.6",
110
+ "@types/node": "24.13.3",
105
111
  "@types/node-forge": "1.3.14",
106
112
  "@types/path-is-inside": "1.0.3",
107
113
  "@types/picomatch": "4.0.3",
@@ -1,351 +0,0 @@
1
- {
2
- "BUILD": {
3
- "files": ["package.json", "requirements.txt", "pyproject.toml", "go.mod", "Gemfile", "pom.xml", "build.gradle", "build.gradle.kts", "Cargo.toml", "composer.json", "pubspec.yaml", "Makefile", "CMakeLists.txt"],
4
- "packages": ["eslint", "oxlint", "@oxlint/cli", "@biomejs/biome", "prettier", "stylelint", "xo", "standard", "typescript"]
5
- },
6
- "DOCKERFILE": {
7
- "files": ["Dockerfile", "Containerfile", "compose.yaml", "compose.yml", "docker-compose.yml", "docker-compose.yaml"]
8
- },
9
- "DOCKER_PUSH": {
10
- "files": ["Dockerfile", "Containerfile"]
11
- },
12
- "RUN_DOCKER_CONTAINER": {
13
- "files": ["Dockerfile", "Containerfile", "compose.yaml", "compose.yml", "docker-compose.yml"]
14
- },
15
- "DOCKERFILE_LINTER": {
16
- "files": ["Dockerfile", "Containerfile"]
17
- },
18
- "DOCKER": {
19
- "files": ["Dockerfile", "Containerfile", "compose.yaml", "compose.yml", "docker-compose.yml"]
20
- },
21
- "DOCKER_BUILD_MULTI_ARCH": {
22
- "files": ["Dockerfile", "Containerfile"]
23
- },
24
- "NATIVE_BUILD_DOCKER_CLI": {
25
- "files": ["Dockerfile", "Containerfile"]
26
- },
27
- "PROMOTE_IMAGE": {
28
- "files": ["Dockerfile", "Containerfile"]
29
- },
30
- "KUBERNETES_APPLY": {
31
- "files": ["k8s/", "kubernetes/", "kustomization.yaml", "kustomization.yml", "Kustomization"],
32
- "packages": ["@aws-sdk/client-eks", "@google-cloud/container", "@azure/arm-containerservice"]
33
- },
34
- "KUBERNETES_SET_IMAGE": {
35
- "files": ["k8s/", "kubernetes/"]
36
- },
37
- "KUBERNETES_RUN_POD": {
38
- "files": ["k8s/", "kubernetes/"]
39
- },
40
- "KUBERNETES_RUN_JOB": {
41
- "files": ["k8s/", "kubernetes/"]
42
- },
43
- "KUBERNETES_CLI": {
44
- "files": ["k8s/", "kubernetes/", "kustomization.yaml", "kustomization.yml", "Kustomization"],
45
- "packages": ["@kubernetes/client-node", "@aws-sdk/client-eks", "@google-cloud/container", "@azure/arm-containerservice"]
46
- },
47
- "HELM": {
48
- "files": ["Chart.yaml", "helm/", "charts/"]
49
- },
50
- "WAIT_FOR_APPLY": {
51
- "files": ["k8s/", "kubernetes/"]
52
- },
53
- "AMAZON_S3": {
54
- "packages": ["aws-sdk", "@aws-sdk/client-s3"]
55
- },
56
- "AWS_CLI": {
57
- "files": ["buildspec.yml"],
58
- "packages": ["aws-sdk", "@aws-sdk/*"]
59
- },
60
- "AWS_CLI_2": {
61
- "files": ["buildspec.yml"],
62
- "packages": ["aws-sdk", "@aws-sdk/*"]
63
- },
64
- "AWS_LAMBDA_DEPLOY": {
65
- "files": ["serverless.yml", "serverless.yaml", "samconfig.toml", "sam-template.yaml"],
66
- "packages": ["aws-sdk", "@aws-sdk/client-lambda"]
67
- },
68
- "LAMBDA": {
69
- "files": ["serverless.yml", "samconfig.toml"],
70
- "packages": ["@aws-sdk/client-lambda"]
71
- },
72
- "AWS_ECS": {
73
- "files": ["ecs-task-definition.json", "task-definition.json"],
74
- "packages": ["@aws-sdk/client-ecs"]
75
- },
76
- "CODE_DEPLOY": {
77
- "files": ["appspec.yml", "appspec.yaml"]
78
- },
79
- "ELASTIC_BEANSTALK": {
80
- "files": [".elasticbeanstalk/"]
81
- },
82
- "MONITOR": {
83
- "files": [".elasticbeanstalk/"]
84
- },
85
- "AWS_CLOUD_FORMATION": {
86
- "files": ["cloudformation/"]
87
- },
88
- "CLOUD_FRONT": {
89
- "packages": ["aws-sdk", "@aws-sdk/client-cloudfront"]
90
- },
91
- "CODE_PIPELINE": {
92
- "files": ["buildspec.yml"]
93
- },
94
- "AWS_APP_RUNNER_DEPLOY": {
95
- "packages": ["@aws-sdk/client-apprunner"]
96
- },
97
- "AWS_APP_RUNNER_MONITOR": {
98
- "packages": ["@aws-sdk/client-apprunner"]
99
- },
100
- "AWS_CDK_CLI": {
101
- "files": ["cdk.json"],
102
- "packages": ["aws-cdk-lib", "aws-cdk"]
103
- },
104
- "DOWNLOAD_S3": {
105
- "packages": ["aws-sdk", "@aws-sdk/client-s3"]
106
- },
107
- "GOOGLE_CLOUD_STORAGE": {
108
- "packages": ["@google-cloud/storage"]
109
- },
110
- "GOOGLE_CLOUD_CLI": {
111
- "packages": ["@google-cloud/*"]
112
- },
113
- "GOOGLE_APP_DEPLOY": {
114
- "files": ["app.yaml"]
115
- },
116
- "GOOGLE_FUNCTION_DEPLOY": {
117
- "files": ["firebase.json"],
118
- "packages": ["@google-cloud/functions-framework"]
119
- },
120
- "GOOGLE_FUNCTION_INVOKE": {
121
- "packages": ["@google-cloud/functions-framework"]
122
- },
123
- "GOOGLE_CLOUD_RUN_DEPLOY": {
124
- "files": ["Dockerfile", "Containerfile"]
125
- },
126
- "GOOGLE_CDN_INVALIDATE": {
127
- "packages": ["@google-cloud/compute"]
128
- },
129
- "FIREBASE": {
130
- "files": ["firebase.json", ".firebaserc"],
131
- "packages": ["firebase", "firebase-admin"]
132
- },
133
- "DOWNLOAD_GCS": {
134
- "packages": ["@google-cloud/storage"]
135
- },
136
- "AZURE": {
137
- "files": ["azure-pipelines.yml"]
138
- },
139
- "AZURE_CLI": {
140
- "files": ["azure-pipelines.yml"],
141
- "packages": ["@azure/*"]
142
- },
143
- "AZURE_STORAGE": {
144
- "packages": ["@azure/storage-blob"]
145
- },
146
- "HEROKU": {
147
- "files": ["Procfile"]
148
- },
149
- "HEROKU_CLI": {
150
- "files": ["Procfile"]
151
- },
152
- "NETLIFY": {
153
- "files": ["netlify.toml"]
154
- },
155
- "TERRAFORM": {
156
- "files": ["*.tf", "*.tofu", "terraform/", ".terraform/"]
157
- },
158
- "ANDROID_SIGN": {
159
- "files": ["android/", "app/src/main/AndroidManifest.xml"]
160
- },
161
- "ANDROID_SIGN_BUNDLE": {
162
- "files": ["android/", "app/src/main/AndroidManifest.xml"]
163
- },
164
- "ANDROID_PUBLISH_APK": {
165
- "files": ["android/", "app/src/main/AndroidManifest.xml"]
166
- },
167
- "ANDROID_PUBLISH_APP_BUNDLE": {
168
- "files": ["android/", "app/src/main/AndroidManifest.xml"]
169
- },
170
- "FASTLANE_ANDROID": {
171
- "files": ["fastlane/", "android/"]
172
- },
173
- "NATIVE_BUILD_MAC": {
174
- "files": ["*.xcodeproj", "*.xcworkspace"]
175
- },
176
- "NATIVE_BUILD_MAC_VM": {
177
- "files": ["*.xcodeproj", "*.xcworkspace"]
178
- },
179
- "NATIVE_BUILD_MAC_SIGN": {
180
- "files": ["*.xcodeproj", "*.xcworkspace"]
181
- },
182
- "NATIVE_BUILD_MAC_DEPLOY": {
183
- "files": ["*.xcodeproj", "*.xcworkspace"]
184
- },
185
- "NATIVE_BUILD_MAC_REACT": {
186
- "files": ["ios/"],
187
- "packages": ["react-native"]
188
- },
189
- "NATIVE_BUILD_MAC_CORDOVA": {
190
- "packages": ["cordova"]
191
- },
192
- "NATIVE_BUILD_MAC_FASTLANE": {
193
- "files": ["fastlane/Fastfile"]
194
- },
195
- "NATIVE_BUILD_MAC_FLUTTER": {
196
- "files": ["pubspec.yaml", "ios/"]
197
- },
198
- "PLAYWRIGHT": {
199
- "files": ["playwright.config.*"],
200
- "packages": ["@playwright/test", "playwright"]
201
- },
202
- "CYPRESS": {
203
- "files": ["cypress.config.*", "cypress/"],
204
- "packages": ["cypress"]
205
- },
206
- "STORYBOOK": {
207
- "files": [".storybook/"],
208
- "packages": ["storybook", "@storybook/react"]
209
- },
210
- "LIGHTHOUSE": {
211
- "packages": ["lighthouse"]
212
- },
213
- "JMETER_CLI": {
214
- "files": ["*.jmx"]
215
- },
216
- "SNYK_CLI": {
217
- "files": [".snyk"],
218
- "packages": ["snyk"]
219
- },
220
- "STACK_HAWK_CLI": {
221
- "files": ["stackhawk.yml"]
222
- },
223
- "BLACKFIRE_PHP": {
224
- "packages": ["blackfire/php-sdk"]
225
- },
226
- "BLACKFIRE_PYTHON": {
227
- "packages": ["blackfire"]
228
- },
229
- "BLACKFIRE_GO": {
230
- "packages": ["github.com/blackfireio/go-blackfire"]
231
- },
232
- "SENTRY": {
233
- "packages": ["@sentry/node", "@sentry/browser", "@sentry/react"]
234
- },
235
- "SENTRY_ENTERPRISE": {
236
- "packages": ["@sentry/node", "@sentry/browser"]
237
- },
238
- "NEW_RELIC": {
239
- "packages": ["newrelic"]
240
- },
241
- "NEW_RELIC_CLI": {
242
- "packages": ["newrelic"]
243
- },
244
- "DATADOG": {
245
- "packages": ["dd-trace", "datadog-metrics"]
246
- },
247
- "DATADOG_STATUS_CHECK": {
248
- "packages": ["dd-trace"]
249
- },
250
- "ROLLBAR": {
251
- "packages": ["rollbar"]
252
- },
253
- "HONEYBADGER": {
254
- "packages": ["@honeybadger-io/js"]
255
- },
256
- "BUGSNAG": {
257
- "packages": ["@bugsnag/js", "@bugsnag/node"]
258
- },
259
- "RAYGUN": {
260
- "packages": ["raygun"]
261
- },
262
- "LOGGLY": {
263
- "packages": ["node-loggly-bulk", "winston-loggly-bulk"]
264
- },
265
- "DO_SPACES": {
266
- "packages": ["aws-sdk", "@aws-sdk/client-s3"]
267
- },
268
- "GIT_HUB_RELEASE": {
269
- "files": [".github/workflows/"]
270
- },
271
- "GIT_HUB_CLI": {
272
- "files": [".github/workflows/"]
273
- },
274
- "GIT_LAB_CLI": {
275
- "files": [".gitlab-ci.yml"]
276
- },
277
- "SHOPIFY": {
278
- "files": ["shopify.app.toml"],
279
- "packages": ["@shopify/shopify-api"]
280
- },
281
- "SHOPIFY_CLI": {
282
- "files": ["shopify.app.toml"],
283
- "packages": ["@shopify/cli"]
284
- },
285
- "SHOPIFY_THEMEKIT_CLI": {
286
- "files": ["shopify.app.toml"]
287
- },
288
- "WP_CLI": {
289
- "files": ["wp-config.php", "wp-content/"]
290
- },
291
- "CONTENTFUL_CLI": {
292
- "packages": ["contentful", "contentful-management"]
293
- },
294
- "MYSQL_CLI": {
295
- "packages": ["mysql", "mysql2", "sequelize", "typeorm", "prisma", "drizzle-orm"]
296
- },
297
- "CLOUDFLARE": {
298
- "files": ["wrangler.toml", "wrangler.json", "wrangler.jsonc"],
299
- "packages": ["wrangler"]
300
- },
301
- "NATIVE_BUILD_WINDOWS": {
302
- "files": ["*.sln", "*.slnx", "*.csproj"]
303
- },
304
- "GIT_CRYPT_UNLOCK": {
305
- "files": [".git-crypt/"]
306
- },
307
- "GIT_CRYPT_LOCK": {
308
- "files": [".git-crypt/"]
309
- },
310
- "JIRA_BUILD": {
311
- "files": [".jira/"]
312
- },
313
- "JIRA_DEPLOYMENT": {
314
- "files": [".jira/"]
315
- },
316
- "NPM_PUBLISH": {
317
- "files": ["package.json"]
318
- },
319
- "DOCTL": {
320
- "files": [".do/"],
321
- "packages": ["digitalocean", "do-wrapper"]
322
- },
323
- "DIGITAL_OCEAN_CDN": {
324
- "files": [".do/"],
325
- "packages": ["digitalocean", "do-wrapper"]
326
- },
327
- "SLACK": {
328
- "packages": ["@slack/web-api", "@slack/bolt", "@slack/webhook"]
329
- },
330
- "DISCORD2": {
331
- "packages": ["discord.js", "discord-webhook-node"]
332
- },
333
- "MICROSOFT_TEAMS": {
334
- "packages": ["botbuilder", "@microsoft/teams-js"]
335
- },
336
- "TELEGRAM": {
337
- "packages": ["telegraf", "node-telegram-bot-api", "grammy"]
338
- },
339
- "EMAIL": {
340
- "packages": ["nodemailer", "@sendgrid/mail", "postmark", "mailgun-js"]
341
- },
342
- "POWERSHELL": {
343
- "files": ["*.ps1", "*.psm1"]
344
- },
345
- "GHOST_INSPECTOR_CLI": {
346
- "packages": ["ghost-inspector"]
347
- },
348
- "BACKBLAZE_B2": {
349
- "packages": ["backblaze-b2"]
350
- }
351
- }
@@ -1,70 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const utils_1 = require("../../utils");
7
- const texts_1 = require("../../texts");
8
- const input_1 = __importDefault(require("../../input"));
9
- const output_1 = __importDefault(require("../../output"));
10
- const distro_1 = require("../../types/distro");
11
- const commandEnvironmentCreate = (0, utils_1.newCommand)('create', texts_1.DESC_COMMAND_ENVIRONMENT_CREATE);
12
- commandEnvironmentCreate.alias('add');
13
- commandEnvironmentCreate.option('-i, --identifier <identifier>', texts_1.OPTION_ENVIRONMENT_CREATE_IDENTIFIER);
14
- commandEnvironmentCreate.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
15
- commandEnvironmentCreate.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
16
- commandEnvironmentCreate.option('--scope <scope>', texts_1.OPT_COMMAND_SCOPE);
17
- commandEnvironmentCreate.option('--tags <tags>', texts_1.OPTION_ENVIRONMENT_TAGS);
18
- commandEnvironmentCreate.option('--public-url <url>', texts_1.OPTION_ENVIRONMENT_PUBLIC_URL);
19
- commandEnvironmentCreate.option('--icon <icon>', texts_1.OPTION_ENVIRONMENT_ICON);
20
- commandEnvironmentCreate.option('--note <note>', texts_1.OPT_COMMAND_NOTE);
21
- commandEnvironmentCreate.option('--agent-note <note>', texts_1.OPT_COMMAND_AGENT_NOTE);
22
- commandEnvironmentCreate.argument('[name]', texts_1.OPTION_ENVIRONMENT_NAME);
23
- commandEnvironmentCreate.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_ENVIRONMENT_CREATE}`);
24
- commandEnvironmentCreate.action(async (name, options) => {
25
- const humanId = require('human-id').default;
26
- const workspace = input_1.default.restApiWorkspace(options.workspace);
27
- const project = input_1.default.restApiProject(options.project, true);
28
- const scope = input_1.default.scope(project, options.scope);
29
- if (!name) {
30
- if (options.identifier)
31
- name = options.identifier;
32
- else
33
- name = humanId({ separator: '-', capitalize: false });
34
- }
35
- // identifier is required by the API; derive a slug from the name when
36
- // -i is not given (hyphens cannot appear at the start or end)
37
- const slug = name
38
- .toLowerCase()
39
- .replace(/[^a-z0-9_-]+/g, '-')
40
- .replace(/^-+|-+$/g, '');
41
- const data = {
42
- name,
43
- identifier: options.identifier || slug,
44
- scope,
45
- };
46
- if (project && scope === distro_1.SCOPE.PROJECT) {
47
- data.project = {
48
- name: project,
49
- };
50
- }
51
- if (options.tags) {
52
- data.tags = input_1.default.tags(options.tags);
53
- }
54
- if (options.publicUrl) {
55
- data.public_url = options.publicUrl;
56
- }
57
- if (options.icon) {
58
- data.icon = options.icon;
59
- }
60
- if (options.note) {
61
- data.note = options.note;
62
- }
63
- if (options.agentNote) {
64
- data.agent_note = options.agentNote;
65
- }
66
- const client = input_1.default.restApiTokenClient();
67
- const result = await client.createEnvironment(workspace, data);
68
- output_1.default.exitSuccess((0, texts_1.TXT_ENVIRONMENT_CREATED)(result.identifier, result.html_url));
69
- });
70
- exports.default = commandEnvironmentCreate;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const utils_1 = require("../../utils");
7
- const texts_1 = require("../../texts");
8
- const output_1 = __importDefault(require("../../output"));
9
- const input_1 = __importDefault(require("../../input"));
10
- const resolve_1 = require("./resolve");
11
- const commandEnvironmentDelete = (0, utils_1.newCommand)('delete', texts_1.DESC_COMMAND_ENVIRONMENT_DELETE);
12
- commandEnvironmentDelete.alias('rm');
13
- commandEnvironmentDelete.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
14
- commandEnvironmentDelete.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
15
- commandEnvironmentDelete.option('-f, --force', texts_1.OPTION_CONFIRM_FORCE);
16
- commandEnvironmentDelete.argument('<identifier>', texts_1.OPTION_ENVIRONMENT_IDENTIFIER);
17
- commandEnvironmentDelete.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_ENVIRONMENT_DELETE}`);
18
- commandEnvironmentDelete.action(async (identifier, options) => {
19
- const workspace = input_1.default.restApiWorkspace(options.workspace);
20
- const client = input_1.default.restApiTokenClient();
21
- const environment_id = await (0, resolve_1.resolveEnvironmentId)(client, workspace, identifier, options);
22
- const confirmed = options.force ||
23
- (await output_1.default.confirm((0, texts_1.TXT_ENVIRONMENT_DELETE_CONFIRM)(identifier)));
24
- if (!confirmed)
25
- output_1.default.exitNormal();
26
- await client.deleteEnvironment(workspace, environment_id);
27
- output_1.default.exitSuccess((0, texts_1.TXT_ENVIRONMENT_DELETED)(identifier));
28
- });
29
- exports.default = commandEnvironmentDelete;
@@ -1,48 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const utils_1 = require("../../utils");
7
- const texts_1 = require("../../texts");
8
- const output_1 = __importDefault(require("../../output"));
9
- const input_1 = __importDefault(require("../../input"));
10
- const resolve_1 = require("./resolve");
11
- const commandEnvironmentGet = (0, utils_1.newCommand)('get', texts_1.DESC_COMMAND_ENVIRONMENT_GET);
12
- commandEnvironmentGet.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
13
- commandEnvironmentGet.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
14
- commandEnvironmentGet.option('--format <text|json>', texts_1.OPTION_FORMAT);
15
- commandEnvironmentGet.argument('<identifier>', texts_1.OPTION_ENVIRONMENT_IDENTIFIER);
16
- commandEnvironmentGet.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_ENVIRONMENT_GET}`);
17
- commandEnvironmentGet.action(async (identifier, options) => {
18
- const workspace = input_1.default.restApiWorkspace(options.workspace);
19
- const client = input_1.default.restApiTokenClient();
20
- const environment_id = await (0, resolve_1.resolveEnvironmentId)(client, workspace, identifier, options);
21
- const environment = await client.getEnvironment(workspace, environment_id);
22
- if (options.format === 'json') {
23
- output_1.default.json(environment);
24
- }
25
- else {
26
- const data = [
27
- ['Field', 'Value'],
28
- ['ID', environment.id || '-'],
29
- ['Identifier', environment.identifier || '-'],
30
- ['Name', environment.name || '-'],
31
- ['Scope', environment.scope || '-'],
32
- ['Tags', (environment.tags || []).join(', ') || '-'],
33
- ['Public URL', environment.public_url || '-'],
34
- ['Icon', environment.icon || '-'],
35
- ['Note', environment.note || '-'],
36
- ['Agent note', environment.agent_note || '-'],
37
- ];
38
- if (environment.project) {
39
- data.push(['Project', environment.project.name || '-']);
40
- }
41
- if (environment.html_url) {
42
- data.push(['URL', environment.html_url]);
43
- }
44
- output_1.default.table(data);
45
- }
46
- output_1.default.exitNormal();
47
- });
48
- exports.default = commandEnvironmentGet;