workos 0.18.0 → 0.20.1

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 (835) hide show
  1. package/README.md +4 -783
  2. package/bin/workos.js +44 -0
  3. package/package.json +18 -107
  4. package/LICENSE +0 -47
  5. package/dist/bin.d.ts +0 -2
  6. package/dist/bin.js +0 -1711
  7. package/dist/bin.js.map +0 -1
  8. package/dist/check-coverage.ts +0 -237
  9. package/dist/cli.config.d.ts +0 -88
  10. package/dist/cli.config.js +0 -110
  11. package/dist/cli.config.js.map +0 -1
  12. package/dist/commands/api/catalog.d.ts +0 -23
  13. package/dist/commands/api/catalog.js +0 -97
  14. package/dist/commands/api/catalog.js.map +0 -1
  15. package/dist/commands/api/format.d.ts +0 -5
  16. package/dist/commands/api/format.js +0 -46
  17. package/dist/commands/api/format.js.map +0 -1
  18. package/dist/commands/api/index.d.ts +0 -15
  19. package/dist/commands/api/index.js +0 -205
  20. package/dist/commands/api/index.js.map +0 -1
  21. package/dist/commands/api/interactive.d.ts +0 -3
  22. package/dist/commands/api/interactive.js +0 -133
  23. package/dist/commands/api/interactive.js.map +0 -1
  24. package/dist/commands/api/request.d.ts +0 -14
  25. package/dist/commands/api/request.js +0 -38
  26. package/dist/commands/api/request.js.map +0 -1
  27. package/dist/commands/api-key-mgmt.d.ts +0 -16
  28. package/dist/commands/api-key-mgmt.js +0 -96
  29. package/dist/commands/api-key-mgmt.js.map +0 -1
  30. package/dist/commands/audit-log.d.ts +0 -26
  31. package/dist/commands/audit-log.js +0 -155
  32. package/dist/commands/audit-log.js.map +0 -1
  33. package/dist/commands/auth-status.d.ts +0 -1
  34. package/dist/commands/auth-status.js +0 -57
  35. package/dist/commands/auth-status.js.map +0 -1
  36. package/dist/commands/claim.d.ts +0 -11
  37. package/dist/commands/claim.js +0 -131
  38. package/dist/commands/claim.js.map +0 -1
  39. package/dist/commands/config.d.ts +0 -3
  40. package/dist/commands/config.js +0 -54
  41. package/dist/commands/config.js.map +0 -1
  42. package/dist/commands/connection.d.ts +0 -13
  43. package/dist/commands/connection.js +0 -96
  44. package/dist/commands/connection.js.map +0 -1
  45. package/dist/commands/debug-sso.d.ts +0 -1
  46. package/dist/commands/debug-sso.js +0 -78
  47. package/dist/commands/debug-sso.js.map +0 -1
  48. package/dist/commands/debug-sync.d.ts +0 -1
  49. package/dist/commands/debug-sync.js +0 -102
  50. package/dist/commands/debug-sync.js.map +0 -1
  51. package/dist/commands/debug.d.ts +0 -28
  52. package/dist/commands/debug.js +0 -406
  53. package/dist/commands/debug.js.map +0 -1
  54. package/dist/commands/dev.d.ts +0 -23
  55. package/dist/commands/dev.js +0 -145
  56. package/dist/commands/dev.js.map +0 -1
  57. package/dist/commands/directory.d.ts +0 -27
  58. package/dist/commands/directory.js +0 -176
  59. package/dist/commands/directory.js.map +0 -1
  60. package/dist/commands/doctor.d.ts +0 -12
  61. package/dist/commands/doctor.js +0 -41
  62. package/dist/commands/doctor.js.map +0 -1
  63. package/dist/commands/emulate.d.ts +0 -6
  64. package/dist/commands/emulate.js +0 -68
  65. package/dist/commands/emulate.js.map +0 -1
  66. package/dist/commands/env.d.ts +0 -9
  67. package/dist/commands/env.js +0 -227
  68. package/dist/commands/env.js.map +0 -1
  69. package/dist/commands/event.d.ts +0 -9
  70. package/dist/commands/event.js +0 -43
  71. package/dist/commands/event.js.map +0 -1
  72. package/dist/commands/feature-flag.d.ts +0 -12
  73. package/dist/commands/feature-flag.js +0 -96
  74. package/dist/commands/feature-flag.js.map +0 -1
  75. package/dist/commands/install-skill.d.ts +0 -85
  76. package/dist/commands/install-skill.js +0 -332
  77. package/dist/commands/install-skill.js.map +0 -1
  78. package/dist/commands/install.d.ts +0 -6
  79. package/dist/commands/install.js +0 -56
  80. package/dist/commands/install.js.map +0 -1
  81. package/dist/commands/invitation.d.ts +0 -19
  82. package/dist/commands/invitation.js +0 -94
  83. package/dist/commands/invitation.js.map +0 -1
  84. package/dist/commands/list-skills.d.ts +0 -4
  85. package/dist/commands/list-skills.js +0 -52
  86. package/dist/commands/list-skills.js.map +0 -1
  87. package/dist/commands/login.d.ts +0 -22
  88. package/dist/commands/login.js +0 -184
  89. package/dist/commands/login.js.map +0 -1
  90. package/dist/commands/logout.d.ts +0 -1
  91. package/dist/commands/logout.js +0 -17
  92. package/dist/commands/logout.js.map +0 -1
  93. package/dist/commands/mcp.d.ts +0 -14
  94. package/dist/commands/mcp.js +0 -108
  95. package/dist/commands/mcp.js.map +0 -1
  96. package/dist/commands/membership.d.ts +0 -20
  97. package/dist/commands/membership.js +0 -129
  98. package/dist/commands/membership.js.map +0 -1
  99. package/dist/commands/migrations.d.ts +0 -2
  100. package/dist/commands/migrations.js +0 -49
  101. package/dist/commands/migrations.js.map +0 -1
  102. package/dist/commands/onboard-user.d.ts +0 -7
  103. package/dist/commands/onboard-user.js +0 -61
  104. package/dist/commands/onboard-user.js.map +0 -1
  105. package/dist/commands/org-domain.d.ts +0 -4
  106. package/dist/commands/org-domain.js +0 -45
  107. package/dist/commands/org-domain.js.map +0 -1
  108. package/dist/commands/organization.d.ts +0 -14
  109. package/dist/commands/organization.js +0 -103
  110. package/dist/commands/organization.js.map +0 -1
  111. package/dist/commands/permission.d.ts +0 -20
  112. package/dist/commands/permission.js +0 -93
  113. package/dist/commands/permission.js.map +0 -1
  114. package/dist/commands/portal.d.ts +0 -7
  115. package/dist/commands/portal.js +0 -26
  116. package/dist/commands/portal.js.map +0 -1
  117. package/dist/commands/role.d.ts +0 -17
  118. package/dist/commands/role.js +0 -122
  119. package/dist/commands/role.js.map +0 -1
  120. package/dist/commands/seed.d.ts +0 -6
  121. package/dist/commands/seed.js +0 -297
  122. package/dist/commands/seed.js.map +0 -1
  123. package/dist/commands/session.d.ts +0 -8
  124. package/dist/commands/session.js +0 -63
  125. package/dist/commands/session.js.map +0 -1
  126. package/dist/commands/setup-org.d.ts +0 -6
  127. package/dist/commands/setup-org.js +0 -99
  128. package/dist/commands/setup-org.js.map +0 -1
  129. package/dist/commands/telemetry.d.ts +0 -3
  130. package/dist/commands/telemetry.js +0 -88
  131. package/dist/commands/telemetry.js.map +0 -1
  132. package/dist/commands/uninstall-skill.d.ts +0 -11
  133. package/dist/commands/uninstall-skill.js +0 -117
  134. package/dist/commands/uninstall-skill.js.map +0 -1
  135. package/dist/commands/user.d.ts +0 -19
  136. package/dist/commands/user.js +0 -92
  137. package/dist/commands/user.js.map +0 -1
  138. package/dist/commands/vault-run.d.ts +0 -13
  139. package/dist/commands/vault-run.js +0 -194
  140. package/dist/commands/vault-run.js.map +0 -1
  141. package/dist/commands/vault.d.ts +0 -25
  142. package/dist/commands/vault.js +0 -153
  143. package/dist/commands/vault.js.map +0 -1
  144. package/dist/commands/webhook.d.ts +0 -3
  145. package/dist/commands/webhook.js +0 -92
  146. package/dist/commands/webhook.js.map +0 -1
  147. package/dist/craft-pre-release.sh +0 -10
  148. package/dist/dashboard/components/AnimatedLogo.d.ts +0 -8
  149. package/dist/dashboard/components/AnimatedLogo.js +0 -16
  150. package/dist/dashboard/components/AnimatedLogo.js.map +0 -1
  151. package/dist/dashboard/components/CompletionView.d.ts +0 -13
  152. package/dist/dashboard/components/CompletionView.js +0 -25
  153. package/dist/dashboard/components/CompletionView.js.map +0 -1
  154. package/dist/dashboard/components/ConfirmPrompt.d.ts +0 -9
  155. package/dist/dashboard/components/ConfirmPrompt.js +0 -25
  156. package/dist/dashboard/components/ConfirmPrompt.js.map +0 -1
  157. package/dist/dashboard/components/CredentialsForm.d.ts +0 -10
  158. package/dist/dashboard/components/CredentialsForm.js +0 -47
  159. package/dist/dashboard/components/CredentialsForm.js.map +0 -1
  160. package/dist/dashboard/components/Dashboard.d.ts +0 -3
  161. package/dist/dashboard/components/Dashboard.js +0 -100
  162. package/dist/dashboard/components/Dashboard.js.map +0 -1
  163. package/dist/dashboard/components/DashboardLayout.d.ts +0 -24
  164. package/dist/dashboard/components/DashboardLayout.js +0 -25
  165. package/dist/dashboard/components/DashboardLayout.js.map +0 -1
  166. package/dist/dashboard/components/DiffPanel.d.ts +0 -9
  167. package/dist/dashboard/components/DiffPanel.js +0 -136
  168. package/dist/dashboard/components/DiffPanel.js.map +0 -1
  169. package/dist/dashboard/components/InlinePrompt.d.ts +0 -8
  170. package/dist/dashboard/components/InlinePrompt.js +0 -19
  171. package/dist/dashboard/components/InlinePrompt.js.map +0 -1
  172. package/dist/dashboard/components/OutputPanel.d.ts +0 -10
  173. package/dist/dashboard/components/OutputPanel.js +0 -100
  174. package/dist/dashboard/components/OutputPanel.js.map +0 -1
  175. package/dist/dashboard/components/Panel.d.ts +0 -12
  176. package/dist/dashboard/components/Panel.js +0 -6
  177. package/dist/dashboard/components/Panel.js.map +0 -1
  178. package/dist/dashboard/components/TextInput.d.ts +0 -13
  179. package/dist/dashboard/components/TextInput.js +0 -57
  180. package/dist/dashboard/components/TextInput.js.map +0 -1
  181. package/dist/dashboard/components/WelcomeArt.d.ts +0 -2
  182. package/dist/dashboard/components/WelcomeArt.js +0 -9
  183. package/dist/dashboard/components/WelcomeArt.js.map +0 -1
  184. package/dist/dashboard/hooks/useAnimation.d.ts +0 -7
  185. package/dist/dashboard/hooks/useAnimation.js +0 -24
  186. package/dist/dashboard/hooks/useAnimation.js.map +0 -1
  187. package/dist/dashboard/hooks/useKeyboard.d.ts +0 -8
  188. package/dist/dashboard/hooks/useKeyboard.js +0 -18
  189. package/dist/dashboard/hooks/useKeyboard.js.map +0 -1
  190. package/dist/dashboard/hooks/useTerminalSize.d.ts +0 -8
  191. package/dist/dashboard/hooks/useTerminalSize.js +0 -23
  192. package/dist/dashboard/hooks/useTerminalSize.js.map +0 -1
  193. package/dist/dashboard/index.d.ts +0 -6
  194. package/dist/dashboard/index.js +0 -36
  195. package/dist/dashboard/index.js.map +0 -1
  196. package/dist/dashboard/lib/diff-utils.d.ts +0 -21
  197. package/dist/dashboard/lib/diff-utils.js +0 -271
  198. package/dist/dashboard/lib/diff-utils.js.map +0 -1
  199. package/dist/dashboard/lib/logo-frames.d.ts +0 -20
  200. package/dist/dashboard/lib/logo-frames.js +0 -109
  201. package/dist/dashboard/lib/logo-frames.js.map +0 -1
  202. package/dist/dashboard/lib/welcome-art.d.ts +0 -1
  203. package/dist/dashboard/lib/welcome-art.js +0 -5
  204. package/dist/dashboard/lib/welcome-art.js.map +0 -1
  205. package/dist/dashboard/types.d.ts +0 -5
  206. package/dist/dashboard/types.js +0 -2
  207. package/dist/dashboard/types.js.map +0 -1
  208. package/dist/doctor/agent-prompt.d.ts +0 -10
  209. package/dist/doctor/agent-prompt.js +0 -190
  210. package/dist/doctor/agent-prompt.js.map +0 -1
  211. package/dist/doctor/checks/ai-analysis.d.ts +0 -9
  212. package/dist/doctor/checks/ai-analysis.js +0 -124
  213. package/dist/doctor/checks/ai-analysis.js.map +0 -1
  214. package/dist/doctor/checks/auth-patterns.d.ts +0 -2
  215. package/dist/doctor/checks/auth-patterns.js +0 -569
  216. package/dist/doctor/checks/auth-patterns.js.map +0 -1
  217. package/dist/doctor/checks/connectivity.d.ts +0 -2
  218. package/dist/doctor/checks/connectivity.js +0 -35
  219. package/dist/doctor/checks/connectivity.js.map +0 -1
  220. package/dist/doctor/checks/dashboard.d.ts +0 -3
  221. package/dist/doctor/checks/dashboard.js +0 -123
  222. package/dist/doctor/checks/dashboard.js.map +0 -1
  223. package/dist/doctor/checks/environment.d.ts +0 -2
  224. package/dist/doctor/checks/environment.js +0 -86
  225. package/dist/doctor/checks/environment.js.map +0 -1
  226. package/dist/doctor/checks/framework.d.ts +0 -2
  227. package/dist/doctor/checks/framework.js +0 -94
  228. package/dist/doctor/checks/framework.js.map +0 -1
  229. package/dist/doctor/checks/host-execution.d.ts +0 -2
  230. package/dist/doctor/checks/host-execution.js +0 -21
  231. package/dist/doctor/checks/host-execution.js.map +0 -1
  232. package/dist/doctor/checks/language.d.ts +0 -6
  233. package/dist/doctor/checks/language.js +0 -104
  234. package/dist/doctor/checks/language.js.map +0 -1
  235. package/dist/doctor/checks/mcp.d.ts +0 -15
  236. package/dist/doctor/checks/mcp.js +0 -34
  237. package/dist/doctor/checks/mcp.js.map +0 -1
  238. package/dist/doctor/checks/runtime.d.ts +0 -2
  239. package/dist/doctor/checks/runtime.js +0 -20
  240. package/dist/doctor/checks/runtime.js.map +0 -1
  241. package/dist/doctor/checks/sdk.d.ts +0 -2
  242. package/dist/doctor/checks/sdk.js +0 -192
  243. package/dist/doctor/checks/sdk.js.map +0 -1
  244. package/dist/doctor/checks/skills.d.ts +0 -9
  245. package/dist/doctor/checks/skills.js +0 -84
  246. package/dist/doctor/checks/skills.js.map +0 -1
  247. package/dist/doctor/clipboard.d.ts +0 -1
  248. package/dist/doctor/clipboard.js +0 -43
  249. package/dist/doctor/clipboard.js.map +0 -1
  250. package/dist/doctor/index.d.ts +0 -26
  251. package/dist/doctor/index.js +0 -182
  252. package/dist/doctor/index.js.map +0 -1
  253. package/dist/doctor/issues.d.ts +0 -63
  254. package/dist/doctor/issues.js +0 -198
  255. package/dist/doctor/issues.js.map +0 -1
  256. package/dist/doctor/json-output.d.ts +0 -2
  257. package/dist/doctor/json-output.js +0 -4
  258. package/dist/doctor/json-output.js.map +0 -1
  259. package/dist/doctor/output.d.ts +0 -7
  260. package/dist/doctor/output.js +0 -288
  261. package/dist/doctor/output.js.map +0 -1
  262. package/dist/doctor/types.d.ts +0 -203
  263. package/dist/doctor/types.js +0 -2
  264. package/dist/doctor/types.js.map +0 -1
  265. package/dist/emulate/core/id.d.ts +0 -48
  266. package/dist/emulate/core/id.js +0 -73
  267. package/dist/emulate/core/id.js.map +0 -1
  268. package/dist/emulate/core/index.d.ts +0 -8
  269. package/dist/emulate/core/index.js +0 -8
  270. package/dist/emulate/core/index.js.map +0 -1
  271. package/dist/emulate/core/jwt.d.ts +0 -28
  272. package/dist/emulate/core/jwt.js +0 -78
  273. package/dist/emulate/core/jwt.js.map +0 -1
  274. package/dist/emulate/core/middleware/auth.d.ts +0 -15
  275. package/dist/emulate/core/middleware/auth.js +0 -17
  276. package/dist/emulate/core/middleware/auth.js.map +0 -1
  277. package/dist/emulate/core/middleware/error-handler.d.ts +0 -22
  278. package/dist/emulate/core/middleware/error-handler.js +0 -72
  279. package/dist/emulate/core/middleware/error-handler.js.map +0 -1
  280. package/dist/emulate/core/pagination.d.ts +0 -27
  281. package/dist/emulate/core/pagination.js +0 -43
  282. package/dist/emulate/core/pagination.js.map +0 -1
  283. package/dist/emulate/core/plugin.d.ts +0 -15
  284. package/dist/emulate/core/plugin.js +0 -2
  285. package/dist/emulate/core/plugin.js.map +0 -1
  286. package/dist/emulate/core/server.d.ts +0 -17
  287. package/dist/emulate/core/server.js +0 -90
  288. package/dist/emulate/core/server.js.map +0 -1
  289. package/dist/emulate/core/store.d.ts +0 -44
  290. package/dist/emulate/core/store.js +0 -169
  291. package/dist/emulate/core/store.js.map +0 -1
  292. package/dist/emulate/index.d.ts +0 -25
  293. package/dist/emulate/index.js +0 -47
  294. package/dist/emulate/index.js.map +0 -1
  295. package/dist/emulate/workos/constants.d.ts +0 -56
  296. package/dist/emulate/workos/constants.js +0 -56
  297. package/dist/emulate/workos/constants.js.map +0 -1
  298. package/dist/emulate/workos/entities.d.ts +0 -360
  299. package/dist/emulate/workos/entities.js +0 -2
  300. package/dist/emulate/workos/entities.js.map +0 -1
  301. package/dist/emulate/workos/event-bus.d.ts +0 -17
  302. package/dist/emulate/workos/event-bus.js +0 -70
  303. package/dist/emulate/workos/event-bus.js.map +0 -1
  304. package/dist/emulate/workos/helpers.d.ts +0 -72
  305. package/dist/emulate/workos/helpers.js +0 -211
  306. package/dist/emulate/workos/helpers.js.map +0 -1
  307. package/dist/emulate/workos/index.d.ts +0 -93
  308. package/dist/emulate/workos/index.js +0 -326
  309. package/dist/emulate/workos/index.js.map +0 -1
  310. package/dist/emulate/workos/role-helpers.d.ts +0 -21
  311. package/dist/emulate/workos/role-helpers.js +0 -130
  312. package/dist/emulate/workos/role-helpers.js.map +0 -1
  313. package/dist/emulate/workos/routes/api-keys.d.ts +0 -2
  314. package/dist/emulate/workos/routes/api-keys.js +0 -32
  315. package/dist/emulate/workos/routes/api-keys.js.map +0 -1
  316. package/dist/emulate/workos/routes/audit-logs.d.ts +0 -2
  317. package/dist/emulate/workos/routes/audit-logs.js +0 -104
  318. package/dist/emulate/workos/routes/audit-logs.js.map +0 -1
  319. package/dist/emulate/workos/routes/auth-challenges.d.ts +0 -2
  320. package/dist/emulate/workos/routes/auth-challenges.js +0 -51
  321. package/dist/emulate/workos/routes/auth-challenges.js.map +0 -1
  322. package/dist/emulate/workos/routes/auth-factors.d.ts +0 -2
  323. package/dist/emulate/workos/routes/auth-factors.js +0 -51
  324. package/dist/emulate/workos/routes/auth-factors.js.map +0 -1
  325. package/dist/emulate/workos/routes/auth.d.ts +0 -2
  326. package/dist/emulate/workos/routes/auth.js +0 -350
  327. package/dist/emulate/workos/routes/auth.js.map +0 -1
  328. package/dist/emulate/workos/routes/authorization-checks.d.ts +0 -10
  329. package/dist/emulate/workos/routes/authorization-checks.js +0 -123
  330. package/dist/emulate/workos/routes/authorization-checks.js.map +0 -1
  331. package/dist/emulate/workos/routes/authorization-org-roles.d.ts +0 -2
  332. package/dist/emulate/workos/routes/authorization-org-roles.js +0 -64
  333. package/dist/emulate/workos/routes/authorization-org-roles.js.map +0 -1
  334. package/dist/emulate/workos/routes/authorization-permissions.d.ts +0 -2
  335. package/dist/emulate/workos/routes/authorization-permissions.js +0 -67
  336. package/dist/emulate/workos/routes/authorization-permissions.js.map +0 -1
  337. package/dist/emulate/workos/routes/authorization-resources.d.ts +0 -2
  338. package/dist/emulate/workos/routes/authorization-resources.js +0 -117
  339. package/dist/emulate/workos/routes/authorization-resources.js.map +0 -1
  340. package/dist/emulate/workos/routes/authorization-roles.d.ts +0 -2
  341. package/dist/emulate/workos/routes/authorization-roles.js +0 -13
  342. package/dist/emulate/workos/routes/authorization-roles.js.map +0 -1
  343. package/dist/emulate/workos/routes/config.d.ts +0 -2
  344. package/dist/emulate/workos/routes/config.js +0 -57
  345. package/dist/emulate/workos/routes/config.js.map +0 -1
  346. package/dist/emulate/workos/routes/connect.d.ts +0 -2
  347. package/dist/emulate/workos/routes/connect.js +0 -65
  348. package/dist/emulate/workos/routes/connect.js.map +0 -1
  349. package/dist/emulate/workos/routes/connections.d.ts +0 -2
  350. package/dist/emulate/workos/routes/connections.js +0 -73
  351. package/dist/emulate/workos/routes/connections.js.map +0 -1
  352. package/dist/emulate/workos/routes/data-integrations.d.ts +0 -2
  353. package/dist/emulate/workos/routes/data-integrations.js +0 -55
  354. package/dist/emulate/workos/routes/data-integrations.js.map +0 -1
  355. package/dist/emulate/workos/routes/directories.d.ts +0 -2
  356. package/dist/emulate/workos/routes/directories.js +0 -90
  357. package/dist/emulate/workos/routes/directories.js.map +0 -1
  358. package/dist/emulate/workos/routes/email-verification.d.ts +0 -2
  359. package/dist/emulate/workos/routes/email-verification.js +0 -49
  360. package/dist/emulate/workos/routes/email-verification.js.map +0 -1
  361. package/dist/emulate/workos/routes/events.d.ts +0 -2
  362. package/dist/emulate/workos/routes/events.js +0 -18
  363. package/dist/emulate/workos/routes/events.js.map +0 -1
  364. package/dist/emulate/workos/routes/feature-flags.d.ts +0 -2
  365. package/dist/emulate/workos/routes/feature-flags.js +0 -103
  366. package/dist/emulate/workos/routes/feature-flags.js.map +0 -1
  367. package/dist/emulate/workos/routes/invitations.d.ts +0 -2
  368. package/dist/emulate/workos/routes/invitations.js +0 -122
  369. package/dist/emulate/workos/routes/invitations.js.map +0 -1
  370. package/dist/emulate/workos/routes/legacy-mfa.d.ts +0 -2
  371. package/dist/emulate/workos/routes/legacy-mfa.js +0 -75
  372. package/dist/emulate/workos/routes/legacy-mfa.js.map +0 -1
  373. package/dist/emulate/workos/routes/magic-auth.d.ts +0 -2
  374. package/dist/emulate/workos/routes/magic-auth.js +0 -32
  375. package/dist/emulate/workos/routes/magic-auth.js.map +0 -1
  376. package/dist/emulate/workos/routes/memberships.d.ts +0 -2
  377. package/dist/emulate/workos/routes/memberships.js +0 -114
  378. package/dist/emulate/workos/routes/memberships.js.map +0 -1
  379. package/dist/emulate/workos/routes/organization-domains.d.ts +0 -2
  380. package/dist/emulate/workos/routes/organization-domains.js +0 -58
  381. package/dist/emulate/workos/routes/organization-domains.js.map +0 -1
  382. package/dist/emulate/workos/routes/organizations.d.ts +0 -2
  383. package/dist/emulate/workos/routes/organizations.js +0 -131
  384. package/dist/emulate/workos/routes/organizations.js.map +0 -1
  385. package/dist/emulate/workos/routes/password-reset.d.ts +0 -2
  386. package/dist/emulate/workos/routes/password-reset.js +0 -61
  387. package/dist/emulate/workos/routes/password-reset.js.map +0 -1
  388. package/dist/emulate/workos/routes/pipes.d.ts +0 -2
  389. package/dist/emulate/workos/routes/pipes.js +0 -82
  390. package/dist/emulate/workos/routes/pipes.js.map +0 -1
  391. package/dist/emulate/workos/routes/portal.d.ts +0 -2
  392. package/dist/emulate/workos/routes/portal.js +0 -18
  393. package/dist/emulate/workos/routes/portal.js.map +0 -1
  394. package/dist/emulate/workos/routes/radar.d.ts +0 -2
  395. package/dist/emulate/workos/routes/radar.js +0 -41
  396. package/dist/emulate/workos/routes/radar.js.map +0 -1
  397. package/dist/emulate/workos/routes/sessions.d.ts +0 -2
  398. package/dist/emulate/workos/routes/sessions.js +0 -51
  399. package/dist/emulate/workos/routes/sessions.js.map +0 -1
  400. package/dist/emulate/workos/routes/sso.d.ts +0 -2
  401. package/dist/emulate/workos/routes/sso.js +0 -161
  402. package/dist/emulate/workos/routes/sso.js.map +0 -1
  403. package/dist/emulate/workos/routes/user-features.d.ts +0 -2
  404. package/dist/emulate/workos/routes/user-features.js +0 -50
  405. package/dist/emulate/workos/routes/user-features.js.map +0 -1
  406. package/dist/emulate/workos/routes/users.d.ts +0 -2
  407. package/dist/emulate/workos/routes/users.js +0 -129
  408. package/dist/emulate/workos/routes/users.js.map +0 -1
  409. package/dist/emulate/workos/routes/webhook-endpoints.d.ts +0 -2
  410. package/dist/emulate/workos/routes/webhook-endpoints.js +0 -67
  411. package/dist/emulate/workos/routes/webhook-endpoints.js.map +0 -1
  412. package/dist/emulate/workos/routes/widgets.d.ts +0 -2
  413. package/dist/emulate/workos/routes/widgets.js +0 -27
  414. package/dist/emulate/workos/routes/widgets.js.map +0 -1
  415. package/dist/emulate/workos/store.d.ts +0 -48
  416. package/dist/emulate/workos/store.js +0 -102
  417. package/dist/emulate/workos/store.js.map +0 -1
  418. package/dist/emulate/workos/webhook-signer.d.ts +0 -1
  419. package/dist/emulate/workos/webhook-signer.js +0 -8
  420. package/dist/emulate/workos/webhook-signer.js.map +0 -1
  421. package/dist/gen-routes-lib.spec.ts +0 -659
  422. package/dist/gen-routes-lib.ts +0 -647
  423. package/dist/gen-routes.ts +0 -96
  424. package/dist/integrations/dotnet/index.d.ts +0 -8
  425. package/dist/integrations/dotnet/index.js +0 -170
  426. package/dist/integrations/dotnet/index.js.map +0 -1
  427. package/dist/integrations/elixir/index.d.ts +0 -8
  428. package/dist/integrations/elixir/index.js +0 -146
  429. package/dist/integrations/elixir/index.js.map +0 -1
  430. package/dist/integrations/go/index.d.ts +0 -11
  431. package/dist/integrations/go/index.js +0 -212
  432. package/dist/integrations/go/index.js.map +0 -1
  433. package/dist/integrations/kotlin/index.d.ts +0 -4
  434. package/dist/integrations/kotlin/index.js +0 -78
  435. package/dist/integrations/kotlin/index.js.map +0 -1
  436. package/dist/integrations/nextjs/index.d.ts +0 -4
  437. package/dist/integrations/nextjs/index.js +0 -90
  438. package/dist/integrations/nextjs/index.js.map +0 -1
  439. package/dist/integrations/nextjs/utils.d.ts +0 -8
  440. package/dist/integrations/nextjs/utils.js +0 -53
  441. package/dist/integrations/nextjs/utils.js.map +0 -1
  442. package/dist/integrations/node/index.d.ts +0 -4
  443. package/dist/integrations/node/index.js +0 -52
  444. package/dist/integrations/node/index.js.map +0 -1
  445. package/dist/integrations/php/index.d.ts +0 -4
  446. package/dist/integrations/php/index.js +0 -51
  447. package/dist/integrations/php/index.js.map +0 -1
  448. package/dist/integrations/php-laravel/index.d.ts +0 -4
  449. package/dist/integrations/php-laravel/index.js +0 -51
  450. package/dist/integrations/php-laravel/index.js.map +0 -1
  451. package/dist/integrations/python/index.d.ts +0 -9
  452. package/dist/integrations/python/index.js +0 -249
  453. package/dist/integrations/python/index.js.map +0 -1
  454. package/dist/integrations/react/index.d.ts +0 -4
  455. package/dist/integrations/react/index.js +0 -49
  456. package/dist/integrations/react/index.js.map +0 -1
  457. package/dist/integrations/react-router/index.d.ts +0 -4
  458. package/dist/integrations/react-router/index.js +0 -94
  459. package/dist/integrations/react-router/index.js.map +0 -1
  460. package/dist/integrations/react-router/utils.d.ts +0 -10
  461. package/dist/integrations/react-router/utils.js +0 -146
  462. package/dist/integrations/react-router/utils.js.map +0 -1
  463. package/dist/integrations/ruby/index.d.ts +0 -8
  464. package/dist/integrations/ruby/index.js +0 -137
  465. package/dist/integrations/ruby/index.js.map +0 -1
  466. package/dist/integrations/sveltekit/index.d.ts +0 -4
  467. package/dist/integrations/sveltekit/index.js +0 -50
  468. package/dist/integrations/sveltekit/index.js.map +0 -1
  469. package/dist/integrations/tanstack-start/index.d.ts +0 -4
  470. package/dist/integrations/tanstack-start/index.js +0 -51
  471. package/dist/integrations/tanstack-start/index.js.map +0 -1
  472. package/dist/integrations/vanilla-js/index.d.ts +0 -4
  473. package/dist/integrations/vanilla-js/index.js +0 -49
  474. package/dist/integrations/vanilla-js/index.js.map +0 -1
  475. package/dist/lib/__test-helpers__/mock-unclaimed-env-api-error.d.ts +0 -7
  476. package/dist/lib/__test-helpers__/mock-unclaimed-env-api-error.js +0 -12
  477. package/dist/lib/__test-helpers__/mock-unclaimed-env-api-error.js.map +0 -1
  478. package/dist/lib/adapters/cli-adapter.d.ts +0 -84
  479. package/dist/lib/adapters/cli-adapter.js +0 -525
  480. package/dist/lib/adapters/cli-adapter.js.map +0 -1
  481. package/dist/lib/adapters/dashboard-adapter.d.ts +0 -34
  482. package/dist/lib/adapters/dashboard-adapter.js +0 -121
  483. package/dist/lib/adapters/dashboard-adapter.js.map +0 -1
  484. package/dist/lib/adapters/headless-adapter.d.ts +0 -73
  485. package/dist/lib/adapters/headless-adapter.js +0 -310
  486. package/dist/lib/adapters/headless-adapter.js.map +0 -1
  487. package/dist/lib/adapters/index.d.ts +0 -4
  488. package/dist/lib/adapters/index.js +0 -4
  489. package/dist/lib/adapters/index.js.map +0 -1
  490. package/dist/lib/adapters/types.d.ts +0 -41
  491. package/dist/lib/adapters/types.js +0 -2
  492. package/dist/lib/adapters/types.js.map +0 -1
  493. package/dist/lib/agent-interface.d.ts +0 -84
  494. package/dist/lib/agent-interface.js +0 -826
  495. package/dist/lib/agent-interface.js.map +0 -1
  496. package/dist/lib/agent-runner.d.ts +0 -9
  497. package/dist/lib/agent-runner.js +0 -261
  498. package/dist/lib/agent-runner.js.map +0 -1
  499. package/dist/lib/ai-content.d.ts +0 -14
  500. package/dist/lib/ai-content.js +0 -131
  501. package/dist/lib/ai-content.js.map +0 -1
  502. package/dist/lib/api-error-handler.d.ts +0 -18
  503. package/dist/lib/api-error-handler.js +0 -76
  504. package/dist/lib/api-error-handler.js.map +0 -1
  505. package/dist/lib/api-key.d.ts +0 -14
  506. package/dist/lib/api-key.js +0 -36
  507. package/dist/lib/api-key.js.map +0 -1
  508. package/dist/lib/api.d.ts +0 -25
  509. package/dist/lib/api.js +0 -120
  510. package/dist/lib/api.js.map +0 -1
  511. package/dist/lib/background-refresh.d.ts +0 -29
  512. package/dist/lib/background-refresh.js +0 -95
  513. package/dist/lib/background-refresh.js.map +0 -1
  514. package/dist/lib/command-aliases.d.ts +0 -8
  515. package/dist/lib/command-aliases.js +0 -12
  516. package/dist/lib/command-aliases.js.map +0 -1
  517. package/dist/lib/config-store.d.ts +0 -50
  518. package/dist/lib/config-store.js +0 -269
  519. package/dist/lib/config-store.js.map +0 -1
  520. package/dist/lib/config.d.ts +0 -34
  521. package/dist/lib/config.js +0 -37
  522. package/dist/lib/config.js.map +0 -1
  523. package/dist/lib/constants.d.ts +0 -43
  524. package/dist/lib/constants.js +0 -42
  525. package/dist/lib/constants.js.map +0 -1
  526. package/dist/lib/credential-discovery.d.ts +0 -42
  527. package/dist/lib/credential-discovery.js +0 -100
  528. package/dist/lib/credential-discovery.js.map +0 -1
  529. package/dist/lib/credential-proxy.d.ts +0 -45
  530. package/dist/lib/credential-proxy.js +0 -364
  531. package/dist/lib/credential-proxy.js.map +0 -1
  532. package/dist/lib/credential-store.d.ts +0 -32
  533. package/dist/lib/credential-store.js +0 -236
  534. package/dist/lib/credential-store.js.map +0 -1
  535. package/dist/lib/credentials.d.ts +0 -13
  536. package/dist/lib/credentials.js +0 -34
  537. package/dist/lib/credentials.js.map +0 -1
  538. package/dist/lib/dev-command.d.ts +0 -26
  539. package/dist/lib/dev-command.js +0 -129
  540. package/dist/lib/dev-command.js.map +0 -1
  541. package/dist/lib/device-auth.d.ts +0 -48
  542. package/dist/lib/device-auth.js +0 -176
  543. package/dist/lib/device-auth.js.map +0 -1
  544. package/dist/lib/device-id.d.ts +0 -25
  545. package/dist/lib/device-id.js +0 -102
  546. package/dist/lib/device-id.js.map +0 -1
  547. package/dist/lib/ensure-auth.d.ts +0 -12
  548. package/dist/lib/ensure-auth.js +0 -111
  549. package/dist/lib/ensure-auth.js.map +0 -1
  550. package/dist/lib/env-writer.d.ts +0 -25
  551. package/dist/lib/env-writer.js +0 -90
  552. package/dist/lib/env-writer.js.map +0 -1
  553. package/dist/lib/events.d.ts +0 -215
  554. package/dist/lib/events.js +0 -19
  555. package/dist/lib/events.js.map +0 -1
  556. package/dist/lib/framework-config.d.ts +0 -127
  557. package/dist/lib/framework-config.js +0 -11
  558. package/dist/lib/framework-config.js.map +0 -1
  559. package/dist/lib/helper-functions.d.ts +0 -1
  560. package/dist/lib/helper-functions.js +0 -2
  561. package/dist/lib/helper-functions.js.map +0 -1
  562. package/dist/lib/host-probe.d.ts +0 -28
  563. package/dist/lib/host-probe.js +0 -154
  564. package/dist/lib/host-probe.js.map +0 -1
  565. package/dist/lib/installer-core.d.ts +0 -556
  566. package/dist/lib/installer-core.js +0 -1115
  567. package/dist/lib/installer-core.js.map +0 -1
  568. package/dist/lib/installer-core.types.d.ts +0 -160
  569. package/dist/lib/installer-core.types.js +0 -2
  570. package/dist/lib/installer-core.types.js.map +0 -1
  571. package/dist/lib/mcp-clients.d.ts +0 -39
  572. package/dist/lib/mcp-clients.js +0 -284
  573. package/dist/lib/mcp-clients.js.map +0 -1
  574. package/dist/lib/mcp-notice.d.ts +0 -72
  575. package/dist/lib/mcp-notice.js +0 -275
  576. package/dist/lib/mcp-notice.js.map +0 -1
  577. package/dist/lib/port-detection.d.ts +0 -7
  578. package/dist/lib/port-detection.js +0 -238
  579. package/dist/lib/port-detection.js.map +0 -1
  580. package/dist/lib/post-install.d.ts +0 -8
  581. package/dist/lib/post-install.js +0 -51
  582. package/dist/lib/post-install.js.map +0 -1
  583. package/dist/lib/preferences.d.ts +0 -115
  584. package/dist/lib/preferences.js +0 -201
  585. package/dist/lib/preferences.js.map +0 -1
  586. package/dist/lib/progress-tracker.d.ts +0 -22
  587. package/dist/lib/progress-tracker.js +0 -47
  588. package/dist/lib/progress-tracker.js.map +0 -1
  589. package/dist/lib/registry.d.ts +0 -42
  590. package/dist/lib/registry.js +0 -96
  591. package/dist/lib/registry.js.map +0 -1
  592. package/dist/lib/resolve-install-credentials.d.ts +0 -11
  593. package/dist/lib/resolve-install-credentials.js +0 -53
  594. package/dist/lib/resolve-install-credentials.js.map +0 -1
  595. package/dist/lib/run-with-core.d.ts +0 -7
  596. package/dist/lib/run-with-core.js +0 -522
  597. package/dist/lib/run-with-core.js.map +0 -1
  598. package/dist/lib/safe-tools.d.ts +0 -2
  599. package/dist/lib/safe-tools.js +0 -212
  600. package/dist/lib/safe-tools.js.map +0 -1
  601. package/dist/lib/scaffold/index.d.ts +0 -1
  602. package/dist/lib/scaffold/index.js +0 -2
  603. package/dist/lib/scaffold/index.js.map +0 -1
  604. package/dist/lib/scaffold/scaffold.d.ts +0 -66
  605. package/dist/lib/scaffold/scaffold.js +0 -156
  606. package/dist/lib/scaffold/scaffold.js.map +0 -1
  607. package/dist/lib/settings.d.ts +0 -60
  608. package/dist/lib/settings.js +0 -31
  609. package/dist/lib/settings.js.map +0 -1
  610. package/dist/lib/staging-api.d.ts +0 -22
  611. package/dist/lib/staging-api.js +0 -74
  612. package/dist/lib/staging-api.js.map +0 -1
  613. package/dist/lib/startup-notice-gate.d.ts +0 -21
  614. package/dist/lib/startup-notice-gate.js +0 -29
  615. package/dist/lib/startup-notice-gate.js.map +0 -1
  616. package/dist/lib/telemetry-notice.d.ts +0 -25
  617. package/dist/lib/telemetry-notice.js +0 -59
  618. package/dist/lib/telemetry-notice.js.map +0 -1
  619. package/dist/lib/token-refresh-client.d.ts +0 -23
  620. package/dist/lib/token-refresh-client.js +0 -89
  621. package/dist/lib/token-refresh-client.js.map +0 -1
  622. package/dist/lib/token-refresh.d.ts +0 -12
  623. package/dist/lib/token-refresh.js +0 -27
  624. package/dist/lib/token-refresh.js.map +0 -1
  625. package/dist/lib/unclaimed-env-api.d.ts +0 -42
  626. package/dist/lib/unclaimed-env-api.js +0 -139
  627. package/dist/lib/unclaimed-env-api.js.map +0 -1
  628. package/dist/lib/unclaimed-env-provision.d.ts +0 -24
  629. package/dist/lib/unclaimed-env-provision.js +0 -77
  630. package/dist/lib/unclaimed-env-provision.js.map +0 -1
  631. package/dist/lib/unclaimed-warning.d.ts +0 -15
  632. package/dist/lib/unclaimed-warning.js +0 -77
  633. package/dist/lib/unclaimed-warning.js.map +0 -1
  634. package/dist/lib/validation/build-validator.d.ts +0 -21
  635. package/dist/lib/validation/build-validator.js +0 -153
  636. package/dist/lib/validation/build-validator.js.map +0 -1
  637. package/dist/lib/validation/index.d.ts +0 -4
  638. package/dist/lib/validation/index.js +0 -4
  639. package/dist/lib/validation/index.js.map +0 -1
  640. package/dist/lib/validation/quick-checks.d.ts +0 -19
  641. package/dist/lib/validation/quick-checks.js +0 -192
  642. package/dist/lib/validation/quick-checks.js.map +0 -1
  643. package/dist/lib/validation/security-checks.d.ts +0 -35
  644. package/dist/lib/validation/security-checks.js +0 -105
  645. package/dist/lib/validation/security-checks.js.map +0 -1
  646. package/dist/lib/validation/types.d.ts +0 -56
  647. package/dist/lib/validation/types.js +0 -2
  648. package/dist/lib/validation/types.js.map +0 -1
  649. package/dist/lib/validation/validator.d.ts +0 -13
  650. package/dist/lib/validation/validator.js +0 -684
  651. package/dist/lib/validation/validator.js.map +0 -1
  652. package/dist/lib/version-check.d.ts +0 -6
  653. package/dist/lib/version-check.js +0 -46
  654. package/dist/lib/version-check.js.map +0 -1
  655. package/dist/lib/workos-api.d.ts +0 -30
  656. package/dist/lib/workos-api.js +0 -69
  657. package/dist/lib/workos-api.js.map +0 -1
  658. package/dist/lib/workos-client.d.ts +0 -58
  659. package/dist/lib/workos-client.js +0 -140
  660. package/dist/lib/workos-client.js.map +0 -1
  661. package/dist/lib/workos-management.d.ts +0 -32
  662. package/dist/lib/workos-management.js +0 -142
  663. package/dist/lib/workos-management.js.map +0 -1
  664. package/dist/nextjs/nextjs-installer-agent.d.ts +0 -5
  665. package/dist/nextjs/nextjs-installer-agent.js +0 -6
  666. package/dist/nextjs/nextjs-installer-agent.js.map +0 -1
  667. package/dist/nextjs/utils.d.ts +0 -4
  668. package/dist/nextjs/utils.js +0 -5
  669. package/dist/nextjs/utils.js.map +0 -1
  670. package/dist/react/react-installer-agent.d.ts +0 -4
  671. package/dist/react/react-installer-agent.js +0 -5
  672. package/dist/react/react-installer-agent.js.map +0 -1
  673. package/dist/react-router/react-router-installer-agent.d.ts +0 -4
  674. package/dist/react-router/react-router-installer-agent.js +0 -5
  675. package/dist/react-router/react-router-installer-agent.js.map +0 -1
  676. package/dist/react-router/utils.d.ts +0 -4
  677. package/dist/react-router/utils.js +0 -5
  678. package/dist/react-router/utils.js.map +0 -1
  679. package/dist/run.d.ts +0 -32
  680. package/dist/run.js +0 -54
  681. package/dist/run.js.map +0 -1
  682. package/dist/smoke-test.ts +0 -881
  683. package/dist/steps/add-or-update-environment-variables.d.ts +0 -10
  684. package/dist/steps/add-or-update-environment-variables.js +0 -155
  685. package/dist/steps/add-or-update-environment-variables.js.map +0 -1
  686. package/dist/steps/index.d.ts +0 -3
  687. package/dist/steps/index.js +0 -4
  688. package/dist/steps/index.js.map +0 -1
  689. package/dist/steps/run-prettier.d.ts +0 -5
  690. package/dist/steps/run-prettier.js +0 -50
  691. package/dist/steps/run-prettier.js.map +0 -1
  692. package/dist/steps/upload-environment-variables/EnvironmentProvider.d.ts +0 -8
  693. package/dist/steps/upload-environment-variables/EnvironmentProvider.js +0 -7
  694. package/dist/steps/upload-environment-variables/EnvironmentProvider.js.map +0 -1
  695. package/dist/steps/upload-environment-variables/index.d.ts +0 -6
  696. package/dist/steps/upload-environment-variables/index.js +0 -57
  697. package/dist/steps/upload-environment-variables/index.js.map +0 -1
  698. package/dist/steps/upload-environment-variables/providers/vercel.d.ts +0 -14
  699. package/dist/steps/upload-environment-variables/providers/vercel.js +0 -107
  700. package/dist/steps/upload-environment-variables/providers/vercel.js.map +0 -1
  701. package/dist/tanstack-start/tanstack-start-installer-agent.d.ts +0 -4
  702. package/dist/tanstack-start/tanstack-start-installer-agent.js +0 -5
  703. package/dist/tanstack-start/tanstack-start-installer-agent.js.map +0 -1
  704. package/dist/telemetry.d.ts +0 -2
  705. package/dist/telemetry.js +0 -29
  706. package/dist/telemetry.js.map +0 -1
  707. package/dist/test/force-insecure-storage.d.ts +0 -1
  708. package/dist/test/force-insecure-storage.js +0 -9
  709. package/dist/test/force-insecure-storage.js.map +0 -1
  710. package/dist/test/setup.d.ts +0 -1
  711. package/dist/test/setup.js +0 -38
  712. package/dist/test/setup.js.map +0 -1
  713. package/dist/utils/analytics.d.ts +0 -66
  714. package/dist/utils/analytics.js +0 -330
  715. package/dist/utils/analytics.js.map +0 -1
  716. package/dist/utils/bash.d.ts +0 -2
  717. package/dist/utils/bash.js +0 -17
  718. package/dist/utils/bash.js.map +0 -1
  719. package/dist/utils/box.d.ts +0 -33
  720. package/dist/utils/box.js +0 -102
  721. package/dist/utils/box.js.map +0 -1
  722. package/dist/utils/clack-utils.d.ts +0 -97
  723. package/dist/utils/clack-utils.js +0 -422
  724. package/dist/utils/clack-utils.js.map +0 -1
  725. package/dist/utils/clack.d.ts +0 -5
  726. package/dist/utils/clack.js +0 -34
  727. package/dist/utils/clack.js.map +0 -1
  728. package/dist/utils/cli-exit.d.ts +0 -15
  729. package/dist/utils/cli-exit.js +0 -11
  730. package/dist/utils/cli-exit.js.map +0 -1
  731. package/dist/utils/cli-symbols.d.ts +0 -32
  732. package/dist/utils/cli-symbols.js +0 -46
  733. package/dist/utils/cli-symbols.js.map +0 -1
  734. package/dist/utils/command-invocation.d.ts +0 -10
  735. package/dist/utils/command-invocation.js +0 -26
  736. package/dist/utils/command-invocation.js.map +0 -1
  737. package/dist/utils/command-telemetry.d.ts +0 -17
  738. package/dist/utils/command-telemetry.js +0 -67
  739. package/dist/utils/command-telemetry.js.map +0 -1
  740. package/dist/utils/crash-reporter.d.ts +0 -13
  741. package/dist/utils/crash-reporter.js +0 -91
  742. package/dist/utils/crash-reporter.js.map +0 -1
  743. package/dist/utils/debug.d.ts +0 -9
  744. package/dist/utils/debug.js +0 -105
  745. package/dist/utils/debug.js.map +0 -1
  746. package/dist/utils/env-parser.d.ts +0 -5
  747. package/dist/utils/env-parser.js +0 -18
  748. package/dist/utils/env-parser.js.map +0 -1
  749. package/dist/utils/environment.d.ts +0 -10
  750. package/dist/utils/environment.js +0 -69
  751. package/dist/utils/environment.js.map +0 -1
  752. package/dist/utils/errors.d.ts +0 -3
  753. package/dist/utils/errors.js +0 -7
  754. package/dist/utils/errors.js.map +0 -1
  755. package/dist/utils/exec-file.d.ts +0 -15
  756. package/dist/utils/exec-file.js +0 -39
  757. package/dist/utils/exec-file.js.map +0 -1
  758. package/dist/utils/exit-codes.d.ts +0 -31
  759. package/dist/utils/exit-codes.js +0 -69
  760. package/dist/utils/exit-codes.js.map +0 -1
  761. package/dist/utils/git-utils.d.ts +0 -23
  762. package/dist/utils/git-utils.js +0 -86
  763. package/dist/utils/git-utils.js.map +0 -1
  764. package/dist/utils/help-json.d.ts +0 -58
  765. package/dist/utils/help-json.js +0 -1466
  766. package/dist/utils/help-json.js.map +0 -1
  767. package/dist/utils/interaction-mode.d.ts +0 -25
  768. package/dist/utils/interaction-mode.js +0 -99
  769. package/dist/utils/interaction-mode.js.map +0 -1
  770. package/dist/utils/lock-art.d.ts +0 -4
  771. package/dist/utils/lock-art.js +0 -73
  772. package/dist/utils/lock-art.js.map +0 -1
  773. package/dist/utils/logging.d.ts +0 -9
  774. package/dist/utils/logging.js +0 -36
  775. package/dist/utils/logging.js.map +0 -1
  776. package/dist/utils/ndjson.d.ts +0 -16
  777. package/dist/utils/ndjson.js +0 -18
  778. package/dist/utils/ndjson.js.map +0 -1
  779. package/dist/utils/output.d.ts +0 -60
  780. package/dist/utils/output.js +0 -124
  781. package/dist/utils/output.js.map +0 -1
  782. package/dist/utils/package-json.d.ts +0 -26
  783. package/dist/utils/package-json.js +0 -32
  784. package/dist/utils/package-json.js.map +0 -1
  785. package/dist/utils/package-manager.d.ts +0 -21
  786. package/dist/utils/package-manager.js +0 -166
  787. package/dist/utils/package-manager.js.map +0 -1
  788. package/dist/utils/paths.d.ts +0 -5
  789. package/dist/utils/paths.js +0 -18
  790. package/dist/utils/paths.js.map +0 -1
  791. package/dist/utils/platform.d.ts +0 -8
  792. package/dist/utils/platform.js +0 -7
  793. package/dist/utils/platform.js.map +0 -1
  794. package/dist/utils/recovery-hints.d.ts +0 -37
  795. package/dist/utils/recovery-hints.js +0 -80
  796. package/dist/utils/recovery-hints.js.map +0 -1
  797. package/dist/utils/redact.d.ts +0 -5
  798. package/dist/utils/redact.js +0 -29
  799. package/dist/utils/redact.js.map +0 -1
  800. package/dist/utils/register-subcommand.d.ts +0 -10
  801. package/dist/utils/register-subcommand.js +0 -33
  802. package/dist/utils/register-subcommand.js.map +0 -1
  803. package/dist/utils/semver.d.ts +0 -10
  804. package/dist/utils/semver.js +0 -43
  805. package/dist/utils/semver.js.map +0 -1
  806. package/dist/utils/string.d.ts +0 -1
  807. package/dist/utils/string.js +0 -6
  808. package/dist/utils/string.js.map +0 -1
  809. package/dist/utils/summary-box.d.ts +0 -18
  810. package/dist/utils/summary-box.js +0 -148
  811. package/dist/utils/summary-box.js.map +0 -1
  812. package/dist/utils/table.d.ts +0 -5
  813. package/dist/utils/table.js +0 -18
  814. package/dist/utils/table.js.map +0 -1
  815. package/dist/utils/telemetry-client.d.ts +0 -43
  816. package/dist/utils/telemetry-client.js +0 -171
  817. package/dist/utils/telemetry-client.js.map +0 -1
  818. package/dist/utils/telemetry-store-forward.d.ts +0 -11
  819. package/dist/utils/telemetry-store-forward.js +0 -94
  820. package/dist/utils/telemetry-store-forward.js.map +0 -1
  821. package/dist/utils/telemetry-types.d.ts +0 -100
  822. package/dist/utils/telemetry-types.js +0 -6
  823. package/dist/utils/telemetry-types.js.map +0 -1
  824. package/dist/utils/types.d.ts +0 -113
  825. package/dist/utils/types.js +0 -2
  826. package/dist/utils/types.js.map +0 -1
  827. package/dist/utils/urls.d.ts +0 -13
  828. package/dist/utils/urls.js +0 -14
  829. package/dist/utils/urls.js.map +0 -1
  830. package/dist/utils/vendor/is-unicorn-supported.d.ts +0 -1
  831. package/dist/utils/vendor/is-unicorn-supported.js +0 -21
  832. package/dist/utils/vendor/is-unicorn-supported.js.map +0 -1
  833. package/dist/vanilla-js/vanilla-js-installer-agent.d.ts +0 -4
  834. package/dist/vanilla-js/vanilla-js-installer-agent.js +0 -5
  835. package/dist/vanilla-js/vanilla-js-installer-agent.js.map +0 -1
@@ -1,1115 +0,0 @@
1
- import { setup, assign, fromPromise } from 'xstate';
2
- import { getManualPrInstructions } from './post-install.js';
3
- import { hasGhCli } from '../utils/git-utils.js';
4
- export const installerMachine = setup({
5
- types: {
6
- context: {},
7
- input: {},
8
- events: {},
9
- },
10
- actions: {
11
- emitStateEnter: ({ context }, params) => {
12
- context.emitter.emit('state:enter', { state: params.state });
13
- },
14
- emitStateExit: ({ context }, params) => {
15
- context.emitter.emit('state:exit', { state: params.state });
16
- },
17
- emitAuthChecking: ({ context }) => {
18
- context.emitter.emit('auth:checking', {});
19
- },
20
- emitAuthRequired: ({ context }) => {
21
- context.emitter.emit('auth:required', {});
22
- },
23
- emitAuthSuccess: ({ context }) => {
24
- context.emitter.emit('auth:success', {});
25
- },
26
- emitAuthFailure: ({ context }) => {
27
- const message = context.error?.message ?? 'Authentication failed';
28
- context.emitter.emit('auth:failure', { message });
29
- },
30
- emitDetectionStart: ({ context }) => {
31
- context.emitter.emit('detection:start', {});
32
- },
33
- emitDetectionComplete: ({ context }) => {
34
- if (context.integration) {
35
- context.emitter.emit('detection:complete', { integration: context.integration });
36
- }
37
- else {
38
- context.emitter.emit('detection:none', {});
39
- }
40
- },
41
- emitGitChecking: ({ context }) => {
42
- context.emitter.emit('git:checking', {});
43
- },
44
- emitGitClean: ({ context }) => {
45
- context.emitter.emit('git:clean', {});
46
- },
47
- emitGitDirty: ({ context }) => {
48
- context.emitter.emit('git:dirty', { files: context.gitDirtyFiles });
49
- },
50
- emitGitConfirmed: ({ context }) => {
51
- context.emitter.emit('git:dirty:confirmed', {});
52
- },
53
- emitGitCancelled: ({ context }) => {
54
- context.emitter.emit('git:dirty:cancelled', {});
55
- },
56
- emitScaffoldChecking: ({ context }) => {
57
- context.emitter.emit('scaffold:checking', {});
58
- },
59
- emitScaffoldPrompt: ({ context }) => {
60
- context.emitter.emit('scaffold:prompt', { packageManager: context.packageManager ?? 'npm' });
61
- },
62
- emitScaffoldStart: ({ context }) => {
63
- context.emitter.emit('scaffold:start', { packageManager: context.packageManager ?? 'npm' });
64
- },
65
- emitScaffoldComplete: ({ context }) => {
66
- context.emitter.emit('scaffold:complete', {});
67
- },
68
- emitScaffoldFailed: ({ context }) => {
69
- const message = context.error?.message ?? 'Scaffold failed';
70
- context.emitter.emit('scaffold:failed', { error: message });
71
- },
72
- emitScaffoldSkipped: ({ context }) => {
73
- context.emitter.emit('scaffold:skipped', {});
74
- },
75
- assignWorkspaceResult: assign({
76
- scaffoldable: ({ event }) => event.output?.scaffoldable ?? false,
77
- packageManager: ({ event }) => event.output?.packageManager ?? 'npm',
78
- autoScaffold: ({ event }) => event.output?.autoScaffold ?? false,
79
- }),
80
- assignScaffolded: assign({
81
- scaffolded: () => true,
82
- }),
83
- emitBranchChecking: ({ context }) => {
84
- context.emitter.emit('branch:checking', {});
85
- },
86
- emitBranchProtected: ({ context }) => {
87
- if (context.currentBranch) {
88
- context.emitter.emit('branch:protected', { branch: context.currentBranch });
89
- context.emitter.emit('branch:prompt', { branch: context.currentBranch });
90
- }
91
- },
92
- emitBranchCreated: ({ context }, params) => {
93
- context.emitter.emit('branch:created', { branch: params.branch });
94
- },
95
- emitBranchCreateFailed: ({ context }) => {
96
- const message = context.error?.message ?? 'Failed to create branch';
97
- context.emitter.emit('branch:create:failed', { error: message });
98
- },
99
- assignBranchResult: assign({
100
- currentBranch: ({ event }) => {
101
- const doneEvent = event;
102
- return doneEvent.output?.branch ?? undefined;
103
- },
104
- isProtectedBranch: ({ event }) => {
105
- const doneEvent = event;
106
- return doneEvent.output?.isProtected ?? false;
107
- },
108
- }),
109
- emitCredentialsGathering: ({ context }) => {
110
- const requiresApiKey = ['nextjs', 'tanstack-start', 'react-router'].includes(context.integration ?? '');
111
- context.emitter.emit('credentials:gathering', { requiresApiKey });
112
- context.emitter.emit('credentials:request', { requiresApiKey });
113
- },
114
- emitCredentialsFound: ({ context }) => {
115
- context.emitter.emit('credentials:found', {});
116
- },
117
- emitEnvDetected: ({ context }) => {
118
- context.emitter.emit('credentials:env:detected', { files: context.envFilesDetected ?? [] });
119
- },
120
- emitEnvScanPrompt: ({ context }) => {
121
- context.emitter.emit('credentials:env:prompt', { files: context.envFilesDetected ?? [] });
122
- },
123
- emitEnvScanning: ({ context }) => {
124
- context.emitter.emit('credentials:env:scanning', {});
125
- },
126
- emitEnvCredentialsFound: ({ context }) => {
127
- context.emitter.emit('credentials:env:found', { sourcePath: context.envCredentialPath ?? '.env' });
128
- },
129
- emitEnvNotFound: ({ context }) => {
130
- context.emitter.emit('credentials:env:notfound', {});
131
- },
132
- emitDeviceAuthStart: () => {
133
- // Emitted by actor when it has verification URL
134
- },
135
- emitDeviceAuthSuccess: ({ context }) => {
136
- context.emitter.emit('device:success', { email: undefined });
137
- },
138
- emitDeviceAuthError: ({ context }) => {
139
- const message = context.error?.message ?? 'Device authorization failed';
140
- context.emitter.emit('device:error', { message });
141
- },
142
- emitDeviceTimeout: ({ context }) => {
143
- context.emitter.emit('device:timeout', {});
144
- },
145
- emitStagingFetching: ({ context }) => {
146
- context.emitter.emit('staging:fetching', {});
147
- },
148
- emitStagingSuccess: ({ context }) => {
149
- context.emitter.emit('staging:success', {});
150
- },
151
- emitStagingError: ({ context }) => {
152
- const message = context.error?.message ?? 'Failed to fetch staging credentials';
153
- context.emitter.emit('staging:error', { message });
154
- },
155
- emitConfigStart: ({ context }) => {
156
- context.emitter.emit('config:start', {});
157
- },
158
- emitConfigComplete: ({ context }) => {
159
- context.emitter.emit('config:complete', {});
160
- },
161
- emitAgentStart: ({ context }) => {
162
- context.emitter.emit('agent:start', {});
163
- },
164
- emitAgentSuccess: ({ context }, params) => {
165
- context.emitter.emit('agent:success', { summary: params.summary });
166
- context.emitter.emit('complete', { success: true, summary: params.summary });
167
- },
168
- emitAgentFailure: ({ context }) => {
169
- const message = context.error?.message ?? 'Agent execution failed';
170
- const stack = context.error?.stack;
171
- context.emitter.emit('agent:failure', { message, stack });
172
- context.emitter.emit('complete', { success: false });
173
- },
174
- assignDetectionResult: assign({
175
- integration: ({ event }) => {
176
- const doneEvent = event;
177
- return doneEvent.output?.integration;
178
- },
179
- }),
180
- assignGitResult: assign({
181
- gitIsClean: ({ event }) => {
182
- const doneEvent = event;
183
- return doneEvent.output?.isClean ?? true;
184
- },
185
- gitDirtyFiles: ({ event }) => {
186
- const doneEvent = event;
187
- return doneEvent.output?.files ?? [];
188
- },
189
- }),
190
- assignCredentials: assign({
191
- credentials: ({ event }) => {
192
- if (event.type === 'CREDENTIALS_SUBMITTED') {
193
- return { apiKey: event.apiKey, clientId: event.clientId };
194
- }
195
- return undefined;
196
- },
197
- }),
198
- assignError: assign({
199
- error: ({ event }) => {
200
- if ('error' in event && event.error instanceof Error) {
201
- return event.error;
202
- }
203
- if ('error' in event && typeof event.error === 'object' && event.error !== null) {
204
- return new Error(String(event.error.message ?? event.error));
205
- }
206
- return new Error('Unknown error');
207
- },
208
- }),
209
- emitCancelled: ({ context }) => {
210
- context.emitter.emit('complete', { success: false, summary: 'Installer cancelled by user' });
211
- },
212
- emitError: ({ context }) => {
213
- const message = context.error?.message ?? 'An unexpected error occurred';
214
- context.emitter.emit('error', { message, stack: context.error?.stack });
215
- context.emitter.emit('complete', { success: false });
216
- },
217
- // Post-install actions
218
- assignChangedFiles: assign({
219
- changedFiles: ({ event }) => {
220
- const doneEvent = event;
221
- return doneEvent.output?.files ?? [];
222
- },
223
- }),
224
- emitChangesDetected: ({ context }) => {
225
- context.emitter.emit('postinstall:changes', { files: context.changedFiles ?? [] });
226
- },
227
- emitNoChanges: ({ context }) => {
228
- context.emitter.emit('postinstall:nochanges', {});
229
- },
230
- emitCommitPrompt: ({ context }) => {
231
- context.emitter.emit('postinstall:commit:prompt', {});
232
- },
233
- emitGeneratingCommitMessage: ({ context }) => {
234
- context.emitter.emit('postinstall:commit:generating', {});
235
- },
236
- assignCommitMessage: assign({
237
- commitMessage: ({ event }) => {
238
- const doneEvent = event;
239
- return doneEvent.output;
240
- },
241
- }),
242
- emitCommitting: ({ context }) => {
243
- context.emitter.emit('postinstall:commit:committing', { message: context.commitMessage ?? '' });
244
- },
245
- emitCommitSuccess: ({ context }) => {
246
- context.emitter.emit('postinstall:commit:success', { message: context.commitMessage ?? '' });
247
- },
248
- emitCommitFailed: ({ context }) => {
249
- const message = context.error?.message ?? 'Commit failed';
250
- context.emitter.emit('postinstall:commit:failed', { error: message });
251
- },
252
- emitPrPrompt: ({ context }) => {
253
- context.emitter.emit('postinstall:pr:prompt', {});
254
- },
255
- emitGeneratingPrDescription: ({ context }) => {
256
- context.emitter.emit('postinstall:pr:generating', {});
257
- },
258
- assignPrDescription: assign({
259
- prDescription: ({ event }) => {
260
- const doneEvent = event;
261
- return doneEvent.output;
262
- },
263
- }),
264
- emitPushing: ({ context }) => {
265
- context.emitter.emit('postinstall:pr:pushing', {});
266
- },
267
- emitPushFailed: ({ context }) => {
268
- const message = context.error?.message ?? 'Push failed';
269
- context.emitter.emit('postinstall:push:failed', { error: message });
270
- },
271
- emitCreatingPr: ({ context }) => {
272
- context.emitter.emit('postinstall:pr:creating', {});
273
- },
274
- assignPrUrl: assign({
275
- prUrl: ({ event }) => {
276
- const doneEvent = event;
277
- return doneEvent.output;
278
- },
279
- }),
280
- emitPrCreated: ({ context }) => {
281
- context.emitter.emit('postinstall:pr:success', { url: context.prUrl ?? '' });
282
- },
283
- emitPrFailed: ({ context }) => {
284
- const message = context.error?.message ?? 'PR creation failed';
285
- context.emitter.emit('postinstall:pr:failed', { error: message });
286
- },
287
- emitManualInstructions: ({ context }) => {
288
- const branch = context.currentBranch ?? 'HEAD';
289
- const instructions = getManualPrInstructions(branch);
290
- context.emitter.emit('postinstall:manual', { instructions });
291
- },
292
- emitComplete: ({ context }) => {
293
- const summary = context.agentSummary ?? 'WorkOS AuthKit installed successfully!';
294
- context.emitter.emit('complete', { success: true, summary });
295
- },
296
- },
297
- guards: {
298
- shouldSkipAuth: ({ context }) => context.options.skipAuth === true,
299
- gitIsClean: ({ context }) => context.gitIsClean === true,
300
- hasCredentials: ({ context }) => context.options.apiKey !== undefined && context.options.clientId !== undefined,
301
- hasIntegration: ({ context }) => context.integration !== undefined,
302
- shouldSkipPostInstall: ({ context }) => context.options.noCommit === true,
303
- hasGhCli: () => hasGhCli(),
304
- // Read from the actor's done event (output), not context: the
305
- // assignWorkspaceResult action has not run yet when guards are evaluated.
306
- notScaffoldable: ({ event }) => !event.output?.scaffoldable,
307
- shouldAutoScaffold: ({ event }) => {
308
- const output = event.output;
309
- return !!output?.scaffoldable && !!output?.autoScaffold;
310
- },
311
- },
312
- actors: {
313
- checkAuthentication: fromPromise(async () => {
314
- throw new Error('checkAuthentication not implemented - provide via machine.provide()');
315
- }),
316
- checkWorkspace: fromPromise(async () => {
317
- throw new Error('checkWorkspace not implemented - provide via machine.provide()');
318
- }),
319
- runScaffold: fromPromise(async () => {
320
- throw new Error('runScaffold not implemented - provide via machine.provide()');
321
- }),
322
- detectIntegration: fromPromise(async () => {
323
- throw new Error('detectIntegration not implemented - provide via machine.provide()');
324
- }),
325
- checkGitStatus: fromPromise(async () => {
326
- throw new Error('checkGitStatus not implemented - provide via machine.provide()');
327
- }),
328
- configureEnvironment: fromPromise(async () => {
329
- throw new Error('configureEnvironment not implemented - provide via machine.provide()');
330
- }),
331
- runAgent: fromPromise(async () => {
332
- throw new Error('runAgent not implemented - provide via machine.provide()');
333
- }),
334
- // Credential discovery actors
335
- detectEnvFiles: fromPromise(async () => {
336
- throw new Error('detectEnvFiles not implemented - provide via machine.provide()');
337
- }),
338
- scanEnvFiles: fromPromise(async () => {
339
- throw new Error('scanEnvFiles not implemented - provide via machine.provide()');
340
- }),
341
- checkStoredAuth: fromPromise(async () => {
342
- throw new Error('checkStoredAuth not implemented - provide via machine.provide()');
343
- }),
344
- runDeviceAuth: fromPromise(async () => {
345
- throw new Error('runDeviceAuth not implemented - provide via machine.provide()');
346
- }),
347
- fetchStagingCredentials: fromPromise(async () => {
348
- throw new Error('fetchStagingCredentials not implemented - provide via machine.provide()');
349
- }),
350
- // Branch check actors
351
- checkBranch: fromPromise(async () => {
352
- throw new Error('checkBranch not implemented - provide via machine.provide()');
353
- }),
354
- createBranch: fromPromise(async () => {
355
- throw new Error('createBranch not implemented - provide via machine.provide()');
356
- }),
357
- // Post-install actors
358
- detectChanges: fromPromise(async () => {
359
- throw new Error('detectChanges not implemented - provide via machine.provide()');
360
- }),
361
- generateCommitMessage: fromPromise(async () => {
362
- throw new Error('generateCommitMessage not implemented - provide via machine.provide()');
363
- }),
364
- commitChanges: fromPromise(async () => {
365
- throw new Error('commitChanges not implemented - provide via machine.provide()');
366
- }),
367
- generatePrDescription: fromPromise(async () => {
368
- throw new Error('generatePrDescription not implemented - provide via machine.provide()');
369
- }),
370
- pushBranch: fromPromise(async () => {
371
- throw new Error('pushBranch not implemented - provide via machine.provide()');
372
- }),
373
- createPr: fromPromise(async () => {
374
- throw new Error('createPr not implemented - provide via machine.provide()');
375
- }),
376
- },
377
- }).createMachine({
378
- id: 'installer',
379
- initial: 'idle',
380
- context: ({ input }) => ({
381
- emitter: input.emitter,
382
- options: input.options,
383
- // Set by the detection actor; no pre-seeding (the --integration flag is gone).
384
- integration: undefined,
385
- credentials: input.options.apiKey && input.options.clientId
386
- ? { apiKey: input.options.apiKey, clientId: input.options.clientId }
387
- : undefined,
388
- gitIsClean: true,
389
- gitDirtyFiles: [],
390
- error: undefined,
391
- }),
392
- // Global event handlers - CANCEL can be sent from any state
393
- on: {
394
- CANCEL: {
395
- target: '.cancelled',
396
- },
397
- },
398
- states: {
399
- idle: {
400
- on: {
401
- START: [
402
- {
403
- target: 'scaffold',
404
- guard: 'shouldSkipAuth',
405
- actions: { type: 'emitStateEnter', params: { state: 'scaffold' } },
406
- },
407
- {
408
- target: 'authenticating',
409
- actions: { type: 'emitStateEnter', params: { state: 'authenticating' } },
410
- },
411
- ],
412
- },
413
- },
414
- authenticating: {
415
- entry: ['emitAuthChecking'],
416
- invoke: {
417
- id: 'checkAuthentication',
418
- src: 'checkAuthentication',
419
- input: ({ context }) => ({ options: context.options }),
420
- onDone: {
421
- target: 'scaffold',
422
- actions: [
423
- 'emitAuthSuccess',
424
- { type: 'emitStateExit', params: { state: 'authenticating' } },
425
- { type: 'emitStateEnter', params: { state: 'scaffold' } },
426
- ],
427
- },
428
- onError: {
429
- target: 'error',
430
- actions: ['assignError', 'emitAuthFailure', { type: 'emitStateExit', params: { state: 'authenticating' } }],
431
- },
432
- },
433
- },
434
- scaffold: {
435
- initial: 'checking',
436
- states: {
437
- checking: {
438
- entry: ['emitScaffoldChecking'],
439
- invoke: {
440
- id: 'checkWorkspace',
441
- src: 'checkWorkspace',
442
- input: ({ context }) => ({ options: context.options }),
443
- onDone: [
444
- {
445
- // Not an empty dir: fall through to today's behavior.
446
- target: 'done',
447
- guard: 'notScaffoldable',
448
- actions: ['assignWorkspaceResult'],
449
- },
450
- {
451
- // Headless or --scaffold: skip the prompt.
452
- target: 'running',
453
- guard: 'shouldAutoScaffold',
454
- actions: ['assignWorkspaceResult'],
455
- },
456
- {
457
- // Interactive empty dir: ask first.
458
- target: 'prompting',
459
- actions: ['assignWorkspaceResult'],
460
- },
461
- ],
462
- onError: {
463
- // Workspace check failure is non-fatal: proceed to preparing,
464
- // which errors on no-integration exactly as before this feature.
465
- target: 'done',
466
- },
467
- },
468
- },
469
- prompting: {
470
- entry: ['emitScaffoldPrompt'],
471
- on: {
472
- SCAFFOLD_CONFIRMED: {
473
- target: 'running',
474
- },
475
- SCAFFOLD_CANCELLED: {
476
- target: '#installer.cancelled',
477
- actions: ['emitScaffoldSkipped', { type: 'emitStateExit', params: { state: 'scaffold' } }],
478
- },
479
- },
480
- },
481
- running: {
482
- entry: ['emitScaffoldStart'],
483
- invoke: {
484
- id: 'runScaffold',
485
- src: 'runScaffold',
486
- input: ({ context }) => ({ context }),
487
- onDone: {
488
- target: 'done',
489
- actions: ['assignScaffolded', 'emitScaffoldComplete'],
490
- },
491
- onError: {
492
- target: '#installer.error',
493
- actions: ['assignError', 'emitScaffoldFailed', { type: 'emitStateExit', params: { state: 'scaffold' } }],
494
- },
495
- },
496
- },
497
- done: {
498
- type: 'final',
499
- },
500
- },
501
- onDone: {
502
- target: 'preparing',
503
- actions: [
504
- { type: 'emitStateExit', params: { state: 'scaffold' } },
505
- { type: 'emitStateEnter', params: { state: 'preparing' } },
506
- ],
507
- },
508
- },
509
- preparing: {
510
- type: 'parallel',
511
- states: {
512
- detection: {
513
- initial: 'running',
514
- states: {
515
- running: {
516
- entry: ['emitDetectionStart'],
517
- invoke: {
518
- id: 'detectIntegration',
519
- src: 'detectIntegration',
520
- input: ({ context }) => ({ options: context.options }),
521
- onDone: {
522
- target: 'done',
523
- actions: ['assignDetectionResult', 'emitDetectionComplete'],
524
- },
525
- onError: {
526
- // Detection failure is non-fatal - user can select manually
527
- target: 'done',
528
- actions: ['emitDetectionComplete'],
529
- },
530
- },
531
- },
532
- done: {
533
- type: 'final',
534
- },
535
- },
536
- },
537
- gitCheck: {
538
- initial: 'running',
539
- states: {
540
- running: {
541
- entry: ['emitGitChecking'],
542
- invoke: {
543
- id: 'checkGitStatus',
544
- src: 'checkGitStatus',
545
- input: ({ context }) => ({ installDir: context.options.installDir }),
546
- onDone: {
547
- target: 'evaluating',
548
- actions: ['assignGitResult'],
549
- },
550
- onError: {
551
- // Git check failure is non-fatal - treat as clean
552
- target: 'done',
553
- },
554
- },
555
- },
556
- evaluating: {
557
- always: [
558
- {
559
- target: 'done',
560
- guard: 'gitIsClean',
561
- actions: ['emitGitClean'],
562
- },
563
- {
564
- target: 'awaitingConfirmation',
565
- actions: ['emitGitDirty'],
566
- },
567
- ],
568
- },
569
- awaitingConfirmation: {
570
- on: {
571
- GIT_CONFIRMED: {
572
- target: 'done',
573
- actions: ['emitGitConfirmed'],
574
- },
575
- GIT_CANCELLED: {
576
- target: '#installer.cancelled',
577
- actions: ['emitGitCancelled'],
578
- },
579
- },
580
- },
581
- done: {
582
- type: 'final',
583
- },
584
- },
585
- },
586
- branchCheck: {
587
- initial: 'running',
588
- states: {
589
- running: {
590
- entry: ['emitBranchChecking'],
591
- invoke: {
592
- id: 'checkBranch',
593
- src: 'checkBranch',
594
- onDone: [
595
- {
596
- target: 'awaitingConfirmation',
597
- guard: ({ event }) => event.output.isProtected,
598
- actions: ['assignBranchResult', 'emitBranchProtected'],
599
- },
600
- {
601
- target: 'done',
602
- actions: ['assignBranchResult'],
603
- },
604
- ],
605
- onError: {
606
- // Branch check failure is non-fatal
607
- target: 'done',
608
- },
609
- },
610
- },
611
- awaitingConfirmation: {
612
- on: {
613
- BRANCH_CREATE: {
614
- target: 'creating',
615
- },
616
- BRANCH_CONTINUE: {
617
- target: 'done',
618
- },
619
- BRANCH_CANCEL: {
620
- target: '#installer.cancelled',
621
- },
622
- },
623
- },
624
- creating: {
625
- invoke: {
626
- id: 'createBranch',
627
- src: 'createBranch',
628
- input: () => ({
629
- name: 'feat/add-workos-authkit',
630
- fallbackName: `feat/add-workos-authkit-${Date.now()}`,
631
- }),
632
- onDone: {
633
- target: 'done',
634
- actions: [
635
- {
636
- type: 'emitBranchCreated',
637
- params: ({ event }) => ({ branch: event.output.branch }),
638
- },
639
- ],
640
- },
641
- onError: {
642
- // Branch creation failure is non-fatal
643
- target: 'done',
644
- actions: ['assignError', 'emitBranchCreateFailed'],
645
- },
646
- },
647
- },
648
- done: {
649
- type: 'final',
650
- },
651
- },
652
- },
653
- },
654
- onDone: [
655
- {
656
- target: 'gatheringCredentials',
657
- guard: 'hasIntegration',
658
- actions: { type: 'emitStateExit', params: { state: 'preparing' } },
659
- },
660
- {
661
- target: 'error',
662
- actions: [
663
- assign({
664
- error: ({ context }) => {
665
- const dir = context.options.installDir;
666
- return new Error(`No supported framework was detected in ${dir}.\n` +
667
- `Because this directory isn't empty, a new app wasn't scaffolded, and no recognized ` +
668
- `framework (such as a package.json with Next.js) was found to install into.\n\n` +
669
- `Next steps:\n` +
670
- ` - New app: run \`workos install\` in an empty directory to scaffold Next.js + AuthKit.\n` +
671
- ` - Existing project: run from the directory that contains your package.json, or pass --install-dir <path>.`);
672
- },
673
- }),
674
- { type: 'emitStateExit', params: { state: 'preparing' } },
675
- ],
676
- },
677
- ],
678
- },
679
- gatheringCredentials: {
680
- entry: [{ type: 'emitStateEnter', params: { state: 'gatheringCredentials' } }],
681
- initial: 'checkingCliFlags',
682
- states: {
683
- // Step 1: Check CLI flags (highest priority)
684
- checkingCliFlags: {
685
- always: [
686
- {
687
- target: '#installer.configuring',
688
- guard: 'hasCredentials',
689
- actions: [
690
- assign({ credentialSource: () => 'cli' }),
691
- 'emitCredentialsFound',
692
- { type: 'emitStateExit', params: { state: 'gatheringCredentials' } },
693
- ],
694
- },
695
- { target: 'detectingEnvFiles' },
696
- ],
697
- },
698
- // Step 2: Check if env files exist (don't read yet)
699
- detectingEnvFiles: {
700
- invoke: {
701
- id: 'detectEnvFiles',
702
- src: 'detectEnvFiles',
703
- input: ({ context }) => ({ installDir: context.options.installDir }),
704
- onDone: [
705
- {
706
- target: 'promptingEnvScan',
707
- guard: ({ event }) => {
708
- const output = event.output;
709
- return output.exists;
710
- },
711
- actions: [
712
- assign({
713
- envFilesDetected: ({ event }) => {
714
- const output = event.output;
715
- return output.files;
716
- },
717
- }),
718
- 'emitEnvDetected',
719
- ],
720
- },
721
- { target: 'checkingStoredAuth' },
722
- ],
723
- onError: {
724
- target: 'checkingStoredAuth', // Non-fatal, continue
725
- },
726
- },
727
- },
728
- // Step 3: Ask user for consent to scan env files
729
- promptingEnvScan: {
730
- entry: ['emitEnvScanPrompt'],
731
- on: {
732
- ENV_SCAN_APPROVED: {
733
- target: 'scanningEnvFiles',
734
- actions: assign({ envScanConsent: () => true }),
735
- },
736
- ENV_SCAN_DECLINED: {
737
- target: 'checkingStoredAuth',
738
- actions: assign({ envScanConsent: () => false }),
739
- },
740
- CANCEL: {
741
- target: '#installer.cancelled',
742
- actions: { type: 'emitStateExit', params: { state: 'gatheringCredentials' } },
743
- },
744
- },
745
- },
746
- // Step 4: Scan env files for credentials (with consent)
747
- scanningEnvFiles: {
748
- entry: ['emitEnvScanning'],
749
- invoke: {
750
- id: 'scanEnvFiles',
751
- src: 'scanEnvFiles',
752
- input: ({ context }) => ({ installDir: context.options.installDir }),
753
- onDone: [
754
- {
755
- target: '#installer.configuring',
756
- guard: ({ event }) => {
757
- const result = event.output;
758
- return result.found && !!result.clientId;
759
- },
760
- actions: [
761
- assign({
762
- credentials: ({ event }) => {
763
- const result = event.output;
764
- return { clientId: result.clientId, apiKey: result.apiKey };
765
- },
766
- credentialSource: () => 'env',
767
- envCredentialPath: ({ event }) => event.output.sourcePath,
768
- }),
769
- 'emitEnvCredentialsFound',
770
- { type: 'emitStateExit', params: { state: 'gatheringCredentials' } },
771
- ],
772
- },
773
- {
774
- target: 'checkingStoredAuth',
775
- actions: ['emitEnvNotFound'],
776
- },
777
- ],
778
- onError: {
779
- target: 'checkingStoredAuth',
780
- },
781
- },
782
- },
783
- // Step 5: Check for stored auth token
784
- checkingStoredAuth: {
785
- invoke: {
786
- id: 'checkStoredAuth',
787
- src: 'checkStoredAuth',
788
- onDone: [
789
- {
790
- target: 'fetchingStagingCredentials',
791
- guard: ({ event }) => event.output === true,
792
- },
793
- { target: 'runningDeviceAuth' },
794
- ],
795
- onError: {
796
- target: 'runningDeviceAuth',
797
- },
798
- },
799
- },
800
- // Step 6: Run device authorization flow
801
- runningDeviceAuth: {
802
- entry: ['emitDeviceAuthStart'],
803
- invoke: {
804
- id: 'runDeviceAuth',
805
- src: 'runDeviceAuth',
806
- input: ({ context }) => ({ emitter: context.emitter }),
807
- onDone: {
808
- target: 'fetchingStagingCredentials',
809
- actions: [
810
- 'emitDeviceAuthSuccess',
811
- assign({
812
- deviceAuth: ({ event }) => {
813
- const output = event.output;
814
- return {
815
- verificationUri: output.deviceAuth.verification_uri,
816
- verificationUriComplete: output.deviceAuth.verification_uri_complete,
817
- userCode: output.deviceAuth.user_code,
818
- };
819
- },
820
- }),
821
- ],
822
- },
823
- onError: {
824
- target: 'promptingManual',
825
- actions: ['assignError', 'emitDeviceAuthError'],
826
- },
827
- },
828
- },
829
- // Step 7: Fetch staging credentials from API
830
- fetchingStagingCredentials: {
831
- entry: ['emitStagingFetching'],
832
- invoke: {
833
- id: 'fetchStagingCredentials',
834
- src: 'fetchStagingCredentials',
835
- onDone: {
836
- target: '#installer.configuring',
837
- actions: [
838
- assign({
839
- credentials: ({ event }) => {
840
- const staging = event.output;
841
- return { clientId: staging.clientId, apiKey: staging.apiKey };
842
- },
843
- credentialSource: ({ context }) => context.deviceAuth ? 'device' : 'stored',
844
- }),
845
- 'emitStagingSuccess',
846
- { type: 'emitStateExit', params: { state: 'gatheringCredentials' } },
847
- ],
848
- },
849
- onError: {
850
- target: 'promptingManual',
851
- actions: ['assignError', 'emitStagingError'],
852
- },
853
- },
854
- },
855
- // Step 8: Manual fallback
856
- promptingManual: {
857
- entry: ['emitCredentialsGathering'],
858
- on: {
859
- CREDENTIALS_SUBMITTED: {
860
- target: '#installer.configuring',
861
- actions: [
862
- 'assignCredentials',
863
- assign({ credentialSource: () => 'manual' }),
864
- { type: 'emitStateExit', params: { state: 'gatheringCredentials' } },
865
- ],
866
- },
867
- RETRY_AUTH: {
868
- target: 'runningDeviceAuth',
869
- },
870
- CANCEL: {
871
- target: '#installer.cancelled',
872
- actions: { type: 'emitStateExit', params: { state: 'gatheringCredentials' } },
873
- },
874
- },
875
- },
876
- },
877
- },
878
- configuring: {
879
- entry: [{ type: 'emitStateEnter', params: { state: 'configuring' } }, 'emitConfigStart'],
880
- invoke: {
881
- id: 'configureEnvironment',
882
- src: 'configureEnvironment',
883
- input: ({ context }) => ({ context }),
884
- onDone: {
885
- target: 'runningAgent',
886
- actions: ['emitConfigComplete', { type: 'emitStateExit', params: { state: 'configuring' } }],
887
- },
888
- onError: {
889
- target: 'error',
890
- actions: ['assignError', { type: 'emitStateExit', params: { state: 'configuring' } }],
891
- },
892
- },
893
- },
894
- runningAgent: {
895
- entry: [{ type: 'emitStateEnter', params: { state: 'runningAgent' } }, 'emitAgentStart'],
896
- invoke: {
897
- id: 'runAgent',
898
- src: 'runAgent',
899
- input: ({ context }) => ({ context }),
900
- onDone: [
901
- {
902
- target: 'error',
903
- guard: ({ event }) => {
904
- const output = event.output;
905
- return !output.success;
906
- },
907
- actions: [
908
- ({ context, event }) => {
909
- const output = event.output;
910
- context.emitter.emit('agent:failure', {
911
- message: output.error?.message ?? 'Agent failed',
912
- });
913
- },
914
- assign({
915
- error: ({ event }) => {
916
- const output = event.output;
917
- return output.error ?? new Error('Agent failed');
918
- },
919
- }),
920
- { type: 'emitStateExit', params: { state: 'runningAgent' } },
921
- ],
922
- },
923
- {
924
- target: 'postInstall',
925
- actions: [
926
- assign({
927
- agentSummary: ({ event }) => {
928
- const output = event.output;
929
- return output.summary;
930
- },
931
- }),
932
- ({ context, event }) => {
933
- const output = event.output;
934
- context.emitter.emit('agent:success', { summary: output.summary });
935
- },
936
- { type: 'emitStateExit', params: { state: 'runningAgent' } },
937
- ],
938
- },
939
- ],
940
- onError: {
941
- target: 'error',
942
- actions: ['assignError', 'emitAgentFailure', { type: 'emitStateExit', params: { state: 'runningAgent' } }],
943
- },
944
- },
945
- },
946
- postInstall: {
947
- initial: 'checking',
948
- entry: [{ type: 'emitStateEnter', params: { state: 'postInstall' } }],
949
- states: {
950
- checking: {
951
- always: [
952
- {
953
- target: '#installer.complete',
954
- guard: 'shouldSkipPostInstall',
955
- },
956
- { target: 'detectingChanges' },
957
- ],
958
- },
959
- detectingChanges: {
960
- invoke: {
961
- id: 'detectChanges',
962
- src: 'detectChanges',
963
- onDone: [
964
- {
965
- target: 'promptingCommit',
966
- guard: ({ event }) => event.output.hasChanges,
967
- actions: ['assignChangedFiles', 'emitChangesDetected'],
968
- },
969
- {
970
- target: 'done',
971
- actions: ['emitNoChanges'],
972
- },
973
- ],
974
- onError: { target: 'done' },
975
- },
976
- },
977
- promptingCommit: {
978
- entry: ['emitCommitPrompt'],
979
- on: {
980
- COMMIT_APPROVED: { target: 'generatingCommitMessage' },
981
- COMMIT_DECLINED: { target: 'done' },
982
- CANCEL: { target: '#installer.cancelled' },
983
- },
984
- },
985
- generatingCommitMessage: {
986
- entry: ['emitGeneratingCommitMessage'],
987
- invoke: {
988
- id: 'generateCommitMessage',
989
- src: 'generateCommitMessage',
990
- input: ({ context }) => ({
991
- integration: context.integration ?? 'project',
992
- files: context.changedFiles ?? [],
993
- direct: context.options.direct,
994
- }),
995
- onDone: {
996
- target: 'committing',
997
- actions: ['assignCommitMessage'],
998
- },
999
- },
1000
- },
1001
- committing: {
1002
- entry: ['emitCommitting'],
1003
- invoke: {
1004
- id: 'commitChanges',
1005
- src: 'commitChanges',
1006
- input: ({ context }) => ({
1007
- message: context.commitMessage ?? '',
1008
- cwd: context.options.installDir,
1009
- }),
1010
- onDone: {
1011
- target: 'checkingGhCli',
1012
- actions: ['emitCommitSuccess'],
1013
- },
1014
- onError: {
1015
- target: 'done',
1016
- actions: ['assignError', 'emitCommitFailed'],
1017
- },
1018
- },
1019
- },
1020
- checkingGhCli: {
1021
- always: [
1022
- {
1023
- target: 'promptingPr',
1024
- guard: 'hasGhCli',
1025
- },
1026
- {
1027
- target: 'showingManualInstructions',
1028
- },
1029
- ],
1030
- },
1031
- promptingPr: {
1032
- entry: ['emitPrPrompt'],
1033
- on: {
1034
- PR_APPROVED: { target: 'generatingPrDescription' },
1035
- PR_DECLINED: { target: 'done' },
1036
- CANCEL: { target: '#installer.cancelled' },
1037
- },
1038
- },
1039
- generatingPrDescription: {
1040
- entry: ['emitGeneratingPrDescription'],
1041
- invoke: {
1042
- id: 'generatePrDescription',
1043
- src: 'generatePrDescription',
1044
- input: ({ context }) => ({
1045
- integration: context.integration ?? 'project',
1046
- files: context.changedFiles ?? [],
1047
- commitMessage: context.commitMessage ?? '',
1048
- direct: context.options.direct,
1049
- }),
1050
- onDone: {
1051
- target: 'pushing',
1052
- actions: ['assignPrDescription'],
1053
- },
1054
- },
1055
- },
1056
- pushing: {
1057
- entry: ['emitPushing'],
1058
- invoke: {
1059
- id: 'pushBranch',
1060
- src: 'pushBranch',
1061
- input: ({ context }) => ({ cwd: context.options.installDir }),
1062
- onDone: { target: 'creatingPr' },
1063
- onError: {
1064
- target: 'showingManualInstructions',
1065
- actions: ['assignError', 'emitPushFailed'],
1066
- },
1067
- },
1068
- },
1069
- creatingPr: {
1070
- entry: ['emitCreatingPr'],
1071
- invoke: {
1072
- id: 'createPr',
1073
- src: 'createPr',
1074
- input: ({ context }) => ({
1075
- title: context.commitMessage ?? '',
1076
- body: context.prDescription ?? '',
1077
- cwd: context.options.installDir,
1078
- }),
1079
- onDone: {
1080
- target: 'done',
1081
- actions: ['assignPrUrl', 'emitPrCreated'],
1082
- },
1083
- onError: {
1084
- target: 'done',
1085
- actions: ['assignError', 'emitPrFailed'],
1086
- },
1087
- },
1088
- },
1089
- showingManualInstructions: {
1090
- entry: ['emitManualInstructions'],
1091
- always: { target: 'done' },
1092
- },
1093
- done: {
1094
- type: 'final',
1095
- },
1096
- },
1097
- onDone: {
1098
- target: 'complete',
1099
- },
1100
- },
1101
- complete: {
1102
- type: 'final',
1103
- entry: [{ type: 'emitStateEnter', params: { state: 'complete' } }, 'emitComplete'],
1104
- },
1105
- cancelled: {
1106
- type: 'final',
1107
- entry: [{ type: 'emitStateEnter', params: { state: 'cancelled' } }, 'emitCancelled'],
1108
- },
1109
- error: {
1110
- type: 'final',
1111
- entry: [{ type: 'emitStateEnter', params: { state: 'error' } }, 'emitError'],
1112
- },
1113
- },
1114
- });
1115
- //# sourceMappingURL=installer-core.js.map