ekwo-os 0.4.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 (361) hide show
  1. package/README.md +873 -0
  2. package/dist/args.d.ts +57 -0
  3. package/dist/args.d.ts.map +1 -0
  4. package/dist/args.js +134 -0
  5. package/dist/args.js.map +1 -0
  6. package/dist/assets/expected-objects.json +9432 -0
  7. package/dist/assets/migrations/20260911120000_core_companies.sql +260 -0
  8. package/dist/assets/migrations/20260911120100_accounts_journals.sql +211 -0
  9. package/dist/assets/migrations/20260911120200_contacts.sql +90 -0
  10. package/dist/assets/migrations/20260911120300_taxes.sql +146 -0
  11. package/dist/assets/migrations/20260911120400_entries.sql +338 -0
  12. package/dist/assets/migrations/20260911120500_documents.sql +279 -0
  13. package/dist/assets/migrations/20260911120600_payments_reconciliation.sql +251 -0
  14. package/dist/assets/migrations/20260911120700_bank.sql +178 -0
  15. package/dist/assets/migrations/20260911120800_analytics_attachments.sql +128 -0
  16. package/dist/assets/migrations/20260911120900_post_document.sql +279 -0
  17. package/dist/assets/migrations/20260911121000_reporting.sql +235 -0
  18. package/dist/assets/migrations/20260911121100_country_templates.sql +226 -0
  19. package/dist/assets/migrations/20260911121200_fec.sql +71 -0
  20. package/dist/assets/migrations/20260911130000_instance.sql +77 -0
  21. package/dist/assets/migrations/20260911130100_instance_members.sql +224 -0
  22. package/dist/assets/migrations/20260911140000_instance_admins.sql +112 -0
  23. package/dist/assets/migrations/20260911160000_tax_posting_templates_unique.sql +17 -0
  24. package/dist/assets/migrations/20260911170000_document_amount_paid.sql +82 -0
  25. package/dist/assets/migrations/20260911173000_post_payment.sql +122 -0
  26. package/dist/assets/migrations/20260911173100_sequence_counters_under_rls.sql +84 -0
  27. package/dist/assets/migrations/20260911183000_country_journal_defaults.sql +143 -0
  28. package/dist/assets/migrations/20260911193853_line_account_defaults.sql +274 -0
  29. package/dist/assets/migrations/20260911195054_products.sql +221 -0
  30. package/dist/assets/migrations/20260911210131_anon_surface.sql +85 -0
  31. package/dist/assets/migrations/20260912074712_country_packs.sql +318 -0
  32. package/dist/assets/migrations/20260912080311_report_code_and_region.sql +198 -0
  33. package/dist/assets/migrations/20260912081014_pack_certification_maintained.sql +31 -0
  34. package/dist/assets/migrations/20260912081015_pack_certification_backfill.sql +16 -0
  35. package/dist/assets/migrations/20260912090407_tax_report_boxes.sql +329 -0
  36. package/dist/assets/migrations/20260912091917_tax_on_base_value.sql +25 -0
  37. package/dist/assets/migrations/20260912091918_tax_engine_columns.sql +776 -0
  38. package/dist/assets/migrations/20260912094412_opening_and_closing.sql +759 -0
  39. package/dist/assets/migrations/20260912095825_charts_of_accounts.sql +326 -0
  40. package/dist/assets/migrations/20260912100412_financial_statements.sql +632 -0
  41. package/dist/assets/migrations/20260912104719_one_formula_evaluator.sql +209 -0
  42. package/dist/assets/migrations/20260912105720_entry_kind_appropriation.sql +26 -0
  43. package/dist/assets/migrations/20260912105721_appropriation_entry_kind.sql +444 -0
  44. package/dist/assets/migrations/20260912111751_document_rules.sql +274 -0
  45. package/dist/assets/migrations/20260912112132_cash_basis_vat_and_fx.sql +1189 -0
  46. package/dist/assets/migrations/20260913074512_modules.sql +493 -0
  47. package/dist/assets/migrations/20260913075903_asset_disposal_roles.sql +47 -0
  48. package/dist/assets/migrations/20260913083216_capabilities.sql +637 -0
  49. package/dist/assets/migrations/20260913083901_company_invitations.sql +262 -0
  50. package/dist/assets/migrations/20260913084402_user_preferences.sql +376 -0
  51. package/dist/assets/migrations/20260913084847_company_profile.sql +261 -0
  52. package/dist/assets/migrations/20260913085436_numbering_reads_the_pack.sql +235 -0
  53. package/dist/assets/migrations/20260913085932_api_keys.sql +303 -0
  54. package/dist/assets/migrations/20260913090216_fiscal_year_bounds.sql +159 -0
  55. package/dist/assets/migrations/20260913092527_entries_import.sql +219 -0
  56. package/dist/assets/migrations/20260913101536_null_safe_guards.sql +188 -0
  57. package/dist/assets/migrations/20260913102115_installer_is_named.sql +462 -0
  58. package/dist/assets/migrations/20260913102758_no_currency_default.sql +138 -0
  59. package/dist/assets/migrations/20260913103355_cash_basis_needs_a_box.sql +453 -0
  60. package/dist/assets/migrations/20260913104014_aged_balance_named_group.sql +79 -0
  61. package/dist/assets/migrations/20260913104232_foreign_key_indexes.sql +144 -0
  62. package/dist/assets/migrations/20260913105120_declared_no_reader.sql +41 -0
  63. package/dist/assets/migrations/20260913111407_pack_languages.sql +223 -0
  64. package/dist/assets/migrations/20260913112233_schema_comments_for_a_reader.sql +27 -0
  65. package/dist/assets/migrations/20260913114535_fec_opening_balances.sql +307 -0
  66. package/dist/assets/migrations/20260914103412_audit_log.sql +509 -0
  67. package/dist/assets/migrations/20260914111907_pack_upgrade.sql +428 -0
  68. package/dist/assets/migrations/20260914120500_rounding_reads_the_currency.sql +206 -0
  69. package/dist/assets/migrations/20260914121200_amounts_round_at_the_currency.sql +2403 -0
  70. package/dist/assets/migrations/20260914134325_schema_version_0_2_0.sql +36 -0
  71. package/dist/assets/migrations/20260914143915_accounts_in_use.sql +428 -0
  72. package/dist/assets/migrations/20260914144731_account_code_frozen.sql +99 -0
  73. package/dist/assets/migrations/20260914151207_schema_grants_its_own_rights.sql +284 -0
  74. package/dist/assets/migrations/20260914152840_pack_upgrade_records_its_own_line.sql +237 -0
  75. package/dist/assets/migrations/20260914163943_declaration_periodicity.sql +349 -0
  76. package/dist/assets/migrations/20260915094000_foreign_services_received.sql +37 -0
  77. package/dist/assets/migrations/20260915094500_mentions_read_a_foreign_service.sql +72 -0
  78. package/dist/assets/migrations/20260915153000_document_shares.sql +568 -0
  79. package/dist/assets/migrations/20260915160000_ec_sales_list.sql +181 -0
  80. package/dist/assets/migrations/20260915161842_pack_sources.sql +56 -0
  81. package/dist/assets/migrations/20260915170500_schema_version_0_3_0.sql +45 -0
  82. package/dist/assets/migrations/20260915174500_a_vat_category_is_a_code.sql +177 -0
  83. package/dist/assets/migrations/20260915180000_document_rule_references.sql +85 -0
  84. package/dist/assets/migrations/20260915181000_territories.sql +342 -0
  85. package/dist/assets/migrations/20260915181500_ec_sales_list_reads_the_territories.sql +222 -0
  86. package/dist/assets/migrations/20260915182000_intracom_triangular.sql +53 -0
  87. package/dist/assets/migrations/20260915182500_a_triangular_supply_says_reverse_charge.sql +99 -0
  88. package/dist/assets/migrations/20260915191200_a_document_knows_its_language.sql +633 -0
  89. package/dist/assets/migrations/20260915195000_a_price_that_holds_its_tax.sql +649 -0
  90. package/dist/assets/migrations/20260915200000_a_posting_names_its_boxes.sql +1004 -0
  91. package/dist/assets/migrations/20260916094500_a_company_files_more_than_one_declaration.sql +795 -0
  92. package/dist/assets/migrations/20260916103000_a_ledger_line_names_its_posting.sql +902 -0
  93. package/dist/assets/migrations/20260916123000_a_vocabulary_for_a_tax_that_is_not_a_vat.sql +144 -0
  94. package/dist/assets/migrations/20260916124000_a_box_can_be_a_rate_of_a_box.sql +525 -0
  95. package/dist/assets/migrations/20260916125000_a_tax_follows_the_territory.sql +1318 -0
  96. package/dist/assets/migrations/20260916126000_a_tax_point_and_its_exception.sql +1211 -0
  97. package/dist/assets/migrations/20260917090000_a_counterparty_that_learns.sql +561 -0
  98. package/dist/assets/migrations/20260917120000_what_the_money_pays.sql +545 -0
  99. package/dist/assets/migrations/20260917150000_a_filing_is_a_row.sql +488 -0
  100. package/dist/assets/migrations/20260917170000_when_it_is_due.sql +194 -0
  101. package/dist/assets/migrations/20260917180000_a_box_is_a_number_and_a_kind.sql +213 -0
  102. package/dist/assets/migrations/20260917190000_what_a_declaration_owes.sql +486 -0
  103. package/dist/assets/migrations/20260917200000_what_moved_after_it_went.sql +227 -0
  104. package/dist/assets/migrations/20260918090000_a_form_names_its_file.sql +27 -0
  105. package/dist/assets/migrations/20260918110000_a_deposit_and_what_came_back.sql +286 -0
  106. package/dist/assets/migrations/20260918113741_a_fourth_preset_is_named.sql +9 -0
  107. package/dist/assets/migrations/20260918113807_a_client_reads_and_hands_over.sql +96 -0
  108. package/dist/assets/migrations/20260918114322_two_definer_functions_check_their_caller.sql +75 -0
  109. package/dist/assets/migrations/20260918130000_every_company_somebody_keeps.sql +177 -0
  110. package/dist/assets/migrations/20260918140000_a_session_nobody_prepared.sql +40 -0
  111. package/dist/assets/migrations/20260918141107_a_line_keeps_the_tax_it_was_posted_with.sql +256 -0
  112. package/dist/assets/migrations/20260918141342_a_company_has_an_electronic_address.sql +66 -0
  113. package/dist/assets/migrations/20260918141605_an_invoice_reads_whole_from_the_views.sql +313 -0
  114. package/dist/assets/migrations/20260918141627_a_policy_asks_once.sql +132 -0
  115. package/dist/assets/migrations/20260918143352_a_suggestion_reads_the_words_once.sql +204 -0
  116. package/dist/assets/migrations/20260918143417_a_reference_of_the_caller_and_a_rehearsal.sql +115 -0
  117. package/dist/assets/migrations/20260918150712_a_company_leaves_with_its_books.sql +1119 -0
  118. package/dist/assets/migrations/20260918150931_a_statement_is_imported_once.sql +654 -0
  119. package/dist/assets/migrations/20260918161204_a_posted_document_does_not_move.sql +437 -0
  120. package/dist/assets/migrations/20260918161538_a_posted_entry_does_not_move.sql +252 -0
  121. package/dist/assets/migrations/20260918171946_an_entry_is_posted_by_post_entry.sql +289 -0
  122. package/dist/assets/migrations/20260918174312_schema_version_0_4_0.sql +53 -0
  123. package/dist/assets/modules/assets/module.json +13 -0
  124. package/dist/assets/modules/assets/supabase/migrations/20260913081447_assets.sql +1190 -0
  125. package/dist/assets/modules/assets/supabase/migrations/20260913104234_foreign_key_indexes.sql +47 -0
  126. package/dist/assets/modules/assets/supabase/migrations/20260913104500_assets_capabilities.sql +145 -0
  127. package/dist/assets/modules/assets/supabase/migrations/20260914122100_assets_round_at_the_currency.sql +564 -0
  128. package/dist/assets/modules/assets/supabase/migrations/20260914145012_assets_accounts_in_use.sql +37 -0
  129. package/dist/assets/modules/assets/supabase/migrations/20260914151530_assets_grants_its_own_rights.sql +63 -0
  130. package/dist/assets/modules/assets/supabase/migrations/20260918113912_assets_client_reads.sql +20 -0
  131. package/dist/assets/modules/assets/supabase/migrations/20260918150801_assets_leave_with_the_company.sql +41 -0
  132. package/dist/assets/modules/budgets/module.json +12 -0
  133. package/dist/assets/modules/budgets/supabase/migrations/20260913083012_budgets.sql +210 -0
  134. package/dist/assets/modules/budgets/supabase/migrations/20260913104233_foreign_key_indexes.sql +37 -0
  135. package/dist/assets/modules/budgets/supabase/migrations/20260913104501_budgets_capabilities.sql +72 -0
  136. package/dist/assets/modules/budgets/supabase/migrations/20260914122400_budgets_round_at_the_currency.sql +68 -0
  137. package/dist/assets/modules/budgets/supabase/migrations/20260914145048_budgets_accounts_in_use.sql +30 -0
  138. package/dist/assets/modules/budgets/supabase/migrations/20260914151812_budgets_grants_its_own_rights.sql +31 -0
  139. package/dist/assets/modules/budgets/supabase/migrations/20260918113954_budgets_client_reads.sql +20 -0
  140. package/dist/assets/modules/budgets/supabase/migrations/20260918150823_budgets_leave_with_the_company.sql +37 -0
  141. package/dist/assets/modules/schema/module.1.json +69 -0
  142. package/dist/assets/seed/00_currencies.sql +15 -0
  143. package/dist/assets/seed/00_territories.sql +280 -0
  144. package/dist/assets/seed/05_framework_generic.sql +110 -0
  145. package/dist/assets/seed/10_pack_be.sql +1284 -0
  146. package/dist/assets/seed/11_pack_fr.sql +1112 -0
  147. package/dist/assets/seed/12_pack_lu.sql +2484 -0
  148. package/dist/assets/seed/13_pack_ee.sql +733 -0
  149. package/dist/assets/seed/14_pack_gb.sql +796 -0
  150. package/dist/assets/seed/15_pack_us.sql +751 -0
  151. package/dist/assets/seed/90_demo_company.sql +368 -0
  152. package/dist/assets/seed/modules/assets/10_pack_be.sql +58 -0
  153. package/dist/assets/seed/modules/assets/11_pack_fr.sql +57 -0
  154. package/dist/assets/seed/modules/assets/14_pack_gb.sql +58 -0
  155. package/dist/assets/seed/modules/assets/15_pack_us.sql +60 -0
  156. package/dist/auth.d.ts +59 -0
  157. package/dist/auth.d.ts.map +1 -0
  158. package/dist/auth.js +134 -0
  159. package/dist/auth.js.map +1 -0
  160. package/dist/bin.d.ts +6 -0
  161. package/dist/bin.d.ts.map +1 -0
  162. package/dist/bin.js +8 -0
  163. package/dist/bin.js.map +1 -0
  164. package/dist/books.d.ts +60 -0
  165. package/dist/books.d.ts.map +1 -0
  166. package/dist/books.js +168 -0
  167. package/dist/books.js.map +1 -0
  168. package/dist/bootstrap.d.ts +236 -0
  169. package/dist/bootstrap.d.ts.map +1 -0
  170. package/dist/bootstrap.js +459 -0
  171. package/dist/bootstrap.js.map +1 -0
  172. package/dist/bundle.d.ts +27 -0
  173. package/dist/bundle.d.ts.map +1 -0
  174. package/dist/bundle.js +47 -0
  175. package/dist/bundle.js.map +1 -0
  176. package/dist/checklist.d.ts +35 -0
  177. package/dist/checklist.d.ts.map +1 -0
  178. package/dist/checklist.js +64 -0
  179. package/dist/checklist.js.map +1 -0
  180. package/dist/cli.d.ts +14 -0
  181. package/dist/cli.d.ts.map +1 -0
  182. package/dist/cli.js +318 -0
  183. package/dist/cli.js.map +1 -0
  184. package/dist/commands/company.d.ts +59 -0
  185. package/dist/commands/company.d.ts.map +1 -0
  186. package/dist/commands/company.js +287 -0
  187. package/dist/commands/company.js.map +1 -0
  188. package/dist/commands/contact.d.ts +9 -0
  189. package/dist/commands/contact.d.ts.map +1 -0
  190. package/dist/commands/contact.js +82 -0
  191. package/dist/commands/contact.js.map +1 -0
  192. package/dist/commands/demo.d.ts +19 -0
  193. package/dist/commands/demo.d.ts.map +1 -0
  194. package/dist/commands/demo.js +72 -0
  195. package/dist/commands/demo.js.map +1 -0
  196. package/dist/commands/doctor.d.ts +12 -0
  197. package/dist/commands/doctor.d.ts.map +1 -0
  198. package/dist/commands/doctor.js +68 -0
  199. package/dist/commands/doctor.js.map +1 -0
  200. package/dist/commands/document.d.ts +17 -0
  201. package/dist/commands/document.d.ts.map +1 -0
  202. package/dist/commands/document.js +217 -0
  203. package/dist/commands/document.js.map +1 -0
  204. package/dist/commands/init.d.ts +31 -0
  205. package/dist/commands/init.d.ts.map +1 -0
  206. package/dist/commands/init.js +535 -0
  207. package/dist/commands/init.js.map +1 -0
  208. package/dist/commands/login.d.ts +24 -0
  209. package/dist/commands/login.d.ts.map +1 -0
  210. package/dist/commands/login.js +128 -0
  211. package/dist/commands/login.js.map +1 -0
  212. package/dist/commands/migrate.d.ts +30 -0
  213. package/dist/commands/migrate.d.ts.map +1 -0
  214. package/dist/commands/migrate.js +115 -0
  215. package/dist/commands/migrate.js.map +1 -0
  216. package/dist/commands/module.d.ts +32 -0
  217. package/dist/commands/module.d.ts.map +1 -0
  218. package/dist/commands/module.js +285 -0
  219. package/dist/commands/module.js.map +1 -0
  220. package/dist/commands/pack.d.ts +22 -0
  221. package/dist/commands/pack.d.ts.map +1 -0
  222. package/dist/commands/pack.js +481 -0
  223. package/dist/commands/pack.js.map +1 -0
  224. package/dist/commands/payment.d.ts +15 -0
  225. package/dist/commands/payment.d.ts.map +1 -0
  226. package/dist/commands/payment.js +97 -0
  227. package/dist/commands/payment.js.map +1 -0
  228. package/dist/commands/register.d.ts +20 -0
  229. package/dist/commands/register.d.ts.map +1 -0
  230. package/dist/commands/register.js +134 -0
  231. package/dist/commands/register.js.map +1 -0
  232. package/dist/commands/status.d.ts +8 -0
  233. package/dist/commands/status.d.ts.map +1 -0
  234. package/dist/commands/status.js +134 -0
  235. package/dist/commands/status.js.map +1 -0
  236. package/dist/commands/whoami.d.ts +21 -0
  237. package/dist/commands/whoami.d.ts.map +1 -0
  238. package/dist/commands/whoami.js +133 -0
  239. package/dist/commands/whoami.js.map +1 -0
  240. package/dist/company.d.ts +16 -0
  241. package/dist/company.d.ts.map +1 -0
  242. package/dist/company.js +26 -0
  243. package/dist/company.js.map +1 -0
  244. package/dist/config.d.ts +24 -0
  245. package/dist/config.d.ts.map +1 -0
  246. package/dist/config.js +50 -0
  247. package/dist/config.js.map +1 -0
  248. package/dist/connection.d.ts +79 -0
  249. package/dist/connection.d.ts.map +1 -0
  250. package/dist/connection.js +116 -0
  251. package/dist/connection.js.map +1 -0
  252. package/dist/context.d.ts +47 -0
  253. package/dist/context.d.ts.map +1 -0
  254. package/dist/context.js +93 -0
  255. package/dist/context.js.map +1 -0
  256. package/dist/doctor.d.ts +45 -0
  257. package/dist/doctor.d.ts.map +1 -0
  258. package/dist/doctor.js +448 -0
  259. package/dist/doctor.js.map +1 -0
  260. package/dist/grants.d.ts +88 -0
  261. package/dist/grants.d.ts.map +1 -0
  262. package/dist/grants.js +174 -0
  263. package/dist/grants.js.map +1 -0
  264. package/dist/identity.d.ts +54 -0
  265. package/dist/identity.d.ts.map +1 -0
  266. package/dist/identity.js +132 -0
  267. package/dist/identity.js.map +1 -0
  268. package/dist/index.d.ts +44 -0
  269. package/dist/index.d.ts.map +1 -0
  270. package/dist/index.js +43 -0
  271. package/dist/index.js.map +1 -0
  272. package/dist/inventory.d.ts +155 -0
  273. package/dist/inventory.d.ts.map +1 -0
  274. package/dist/inventory.js +303 -0
  275. package/dist/inventory.js.map +1 -0
  276. package/dist/migrations.d.ts +76 -0
  277. package/dist/migrations.d.ts.map +1 -0
  278. package/dist/migrations.js +226 -0
  279. package/dist/migrations.js.map +1 -0
  280. package/dist/module/read.d.ts +91 -0
  281. package/dist/module/read.d.ts.map +1 -0
  282. package/dist/module/read.js +172 -0
  283. package/dist/module/read.js.map +1 -0
  284. package/dist/output.d.ts +110 -0
  285. package/dist/output.d.ts.map +1 -0
  286. package/dist/output.js +173 -0
  287. package/dist/output.js.map +1 -0
  288. package/dist/pack/certification.d.ts +27 -0
  289. package/dist/pack/certification.d.ts.map +1 -0
  290. package/dist/pack/certification.js +38 -0
  291. package/dist/pack/certification.js.map +1 -0
  292. package/dist/pack/compile.d.ts +75 -0
  293. package/dist/pack/compile.d.ts.map +1 -0
  294. package/dist/pack/compile.js +801 -0
  295. package/dist/pack/compile.js.map +1 -0
  296. package/dist/pack/filing.d.ts +48 -0
  297. package/dist/pack/filing.d.ts.map +1 -0
  298. package/dist/pack/filing.js +56 -0
  299. package/dist/pack/filing.js.map +1 -0
  300. package/dist/pack/read.d.ts +766 -0
  301. package/dist/pack/read.d.ts.map +1 -0
  302. package/dist/pack/read.js +2336 -0
  303. package/dist/pack/read.js.map +1 -0
  304. package/dist/pack/schema.d.ts +26 -0
  305. package/dist/pack/schema.d.ts.map +1 -0
  306. package/dist/pack/schema.js +181 -0
  307. package/dist/pack/schema.js.map +1 -0
  308. package/dist/pack/territories.d.ts +98 -0
  309. package/dist/pack/territories.d.ts.map +1 -0
  310. package/dist/pack/territories.js +0 -0
  311. package/dist/pack/territories.js.map +1 -0
  312. package/dist/pack/upgrade.d.ts +86 -0
  313. package/dist/pack/upgrade.d.ts.map +1 -0
  314. package/dist/pack/upgrade.js +76 -0
  315. package/dist/pack/upgrade.js.map +1 -0
  316. package/dist/pack/vat-codes.d.ts +273 -0
  317. package/dist/pack/vat-codes.d.ts.map +1 -0
  318. package/dist/pack/vat-codes.js +513 -0
  319. package/dist/pack/vat-codes.js.map +1 -0
  320. package/dist/profiles.d.ts +67 -0
  321. package/dist/profiles.d.ts.map +1 -0
  322. package/dist/profiles.js +187 -0
  323. package/dist/profiles.js.map +1 -0
  324. package/dist/prompt.d.ts +40 -0
  325. package/dist/prompt.d.ts.map +1 -0
  326. package/dist/prompt.js +120 -0
  327. package/dist/prompt.js.map +1 -0
  328. package/dist/registry.d.ts +84 -0
  329. package/dist/registry.d.ts.map +1 -0
  330. package/dist/registry.js +104 -0
  331. package/dist/registry.js.map +1 -0
  332. package/dist/rest.d.ts +81 -0
  333. package/dist/rest.d.ts.map +1 -0
  334. package/dist/rest.js +245 -0
  335. package/dist/rest.js.map +1 -0
  336. package/dist/schema.d.ts +15 -0
  337. package/dist/schema.d.ts.map +1 -0
  338. package/dist/schema.js +15 -0
  339. package/dist/schema.js.map +1 -0
  340. package/dist/seeds.d.ts +27 -0
  341. package/dist/seeds.d.ts.map +1 -0
  342. package/dist/seeds.js +47 -0
  343. package/dist/seeds.js.map +1 -0
  344. package/dist/session.d.ts +39 -0
  345. package/dist/session.d.ts.map +1 -0
  346. package/dist/session.js +92 -0
  347. package/dist/session.js.map +1 -0
  348. package/dist/sql.d.ts +48 -0
  349. package/dist/sql.d.ts.map +1 -0
  350. package/dist/sql.js +112 -0
  351. package/dist/sql.js.map +1 -0
  352. package/dist/status.d.ts +94 -0
  353. package/dist/status.d.ts.map +1 -0
  354. package/dist/status.js +120 -0
  355. package/dist/status.js.map +1 -0
  356. package/dist/ui.d.ts +55 -0
  357. package/dist/ui.d.ts.map +1 -0
  358. package/dist/ui.js +114 -0
  359. package/dist/ui.js.map +1 -0
  360. package/package.json +29 -0
  361. package/schema/output.1.json +613 -0
package/dist/grants.js ADDED
@@ -0,0 +1,174 @@
1
+ /**
2
+ * The privileges the schema declares, and how a live database is compared to
3
+ * them.
4
+ *
5
+ * Since `20260914151207` every table, view and function of Ekwo names the
6
+ * roles that may reach it, in the migration that creates it. Before that the
7
+ * privileges came from a Supabase project's default privileges on `public`,
8
+ * which gave `anon` — the role behind the publishable key — `all` on every
9
+ * table of the ledger, and which vanish the day somebody recreates the schema.
10
+ *
11
+ * The declaration travels in `packages/cli/assets/expected-objects.json`,
12
+ * under `grants` in each schema's section: the same inventory that carries the
13
+ * tables, the policies and the triggers a release defines, generated by
14
+ * `scripts/generate-expected-objects.mjs` from a freshly migrated database and
15
+ * committed. One file, because the privileges of an object and the object are
16
+ * the same release. This module reads the same catalogue out of a live
17
+ * installation and says where the two differ:
18
+ *
19
+ * - a **missing** grant is a problem. It is the failure PostgREST reports as
20
+ * "permission denied for table companies" to the first user, and it passes
21
+ * every other check there is.
22
+ * - an **extra** grant to `anon` is a problem. The anonymous role reaches
23
+ * the policy helpers and nothing else; anything more is a surface somebody
24
+ * opened by hand or a default privilege that was never taken away.
25
+ * - an **extra** grant to `authenticated` or `service_role` is a warning. It
26
+ * is usually a local customisation and it is never nothing: row level
27
+ * security is then the only thing refusing a verb the schema meant to
28
+ * withhold.
29
+ *
30
+ * The SQL that describes a schema lives here rather than in the generator, so
31
+ * that the file and the check can never read the catalogue two different ways.
32
+ * `inventory.ts` calls `describeGrants` to fill the section, and `doctor.ts`
33
+ * calls it again on the live database and hands both to `compareSection`.
34
+ */
35
+ /** The three roles a Supabase project exposes to a client. */
36
+ export const GRANT_ROLES = ['anon', 'authenticated', 'service_role'];
37
+ const KINDS = `'r', 'p', 'v', 'm', 'S'`;
38
+ /**
39
+ * Every privilege one schema hands to the three roles, object by object.
40
+ *
41
+ * `aclexplode` turns an `aclitem[]` into one row per grantee and privilege,
42
+ * which is the only shape worth comparing: the text form of an ACL depends on
43
+ * the owner's name and on the order the privileges happen to sit in. The
44
+ * owner's own grants are dropped — they are not a declaration, they are what
45
+ * owning a table means.
46
+ */
47
+ export async function describeGrants(rows, schema) {
48
+ const q = (sql) => rows(sql, [schema]);
49
+ const relations = await q(`select c.relname as key,
50
+ pg_get_userbyid((aclexplode(c.relacl)).grantee) as grantee,
51
+ lower((aclexplode(c.relacl)).privilege_type) as privilege
52
+ from pg_class c
53
+ join pg_namespace n on n.oid = c.relnamespace
54
+ where n.nspname = $1 and c.relkind in (${KINDS})`);
55
+ const names = await q(`select c.relname as name, c.relkind as kind
56
+ from pg_class c
57
+ join pg_namespace n on n.oid = c.relnamespace
58
+ where n.nspname = $1 and c.relkind in (${KINDS})
59
+ order by c.relname`);
60
+ const functions = await q(`select p.proname as name,
61
+ pg_get_function_identity_arguments(p.oid) as arguments,
62
+ p.prorettype::regtype::text = 'trigger' as is_trigger
63
+ from pg_proc p
64
+ join pg_namespace n on n.oid = p.pronamespace
65
+ where n.nspname = $1
66
+ order by p.proname, pg_get_function_identity_arguments(p.oid)`);
67
+ const functionAcl = await q(`select p.proname || '(' || pg_get_function_identity_arguments(p.oid) || ')' as key,
68
+ pg_get_userbyid((aclexplode(p.proacl)).grantee) as grantee,
69
+ lower((aclexplode(p.proacl)).privilege_type) as privilege
70
+ from pg_proc p
71
+ join pg_namespace n on n.oid = p.pronamespace
72
+ where n.nspname = $1`);
73
+ // `create` on the schema is not a client privilege and is not Ekwo's to
74
+ // declare: a Supabase project gives it to `postgres` and `service_role`, and
75
+ // a self-hosted one may give it to whoever runs the migrations.
76
+ const schemaAcl = (await q(`select n.nspname as key,
77
+ pg_get_userbyid((aclexplode(n.nspacl)).grantee) as grantee,
78
+ lower((aclexplode(n.nspacl)).privilege_type) as privilege
79
+ from pg_namespace n
80
+ where n.nspname = $1`)).filter((r) => r.privilege !== 'create');
81
+ const defaults = (await q(`select pg_get_userbyid(d.defaclrole) as owner,
82
+ d.defaclobjtype as object,
83
+ pg_get_userbyid((aclexplode(d.defaclacl)).grantee) as grantee,
84
+ lower((aclexplode(d.defaclacl)).privilege_type) as privilege
85
+ from pg_default_acl d
86
+ join pg_namespace n on n.oid = d.defaclnamespace
87
+ where n.nspname = $1`))
88
+ .filter((r) => GRANT_ROLES.includes(r.grantee))
89
+ .map((r) => `${r.owner}:${r.object}:${r.grantee}:${r.privilege}`)
90
+ .sort();
91
+ const held = (acl, key) => {
92
+ const out = {};
93
+ for (const role of GRANT_ROLES) {
94
+ out[role] = acl
95
+ .filter((r) => r.grantee === role && r.key === key)
96
+ .map((r) => r.privilege)
97
+ .sort();
98
+ }
99
+ return out;
100
+ };
101
+ const section = (kinds) => names
102
+ .filter((n) => kinds.includes(n.kind))
103
+ .map((n) => ({ name: n.name, ...held(relations, n.name) }));
104
+ return {
105
+ schema,
106
+ usage: held(schemaAcl, schema),
107
+ tables: section(['r', 'p']),
108
+ views: section(['v', 'm']),
109
+ sequences: section(['S']),
110
+ functions: functions.map((f) => ({
111
+ name: f.name,
112
+ arguments: f.arguments,
113
+ ...(f.is_trigger ? { trigger: true } : {}),
114
+ ...held(functionAcl, `${f.name}(${f.arguments})`),
115
+ })),
116
+ defaultPrivileges: defaults,
117
+ };
118
+ }
119
+ /** One object, expected against actual, for the three roles. */
120
+ function compareObject(schema, label, expected, actual, found) {
121
+ for (const role of GRANT_ROLES) {
122
+ const want = new Set(expected?.[role] ?? []);
123
+ const have = new Set(actual?.[role] ?? []);
124
+ const missing = [...want].filter((p) => !have.has(p)).sort();
125
+ const extra = [...have].filter((p) => !want.has(p)).sort();
126
+ if (missing.length > 0) {
127
+ found.push({ schema, object: label, role, difference: 'missing', privileges: missing });
128
+ }
129
+ if (extra.length > 0) {
130
+ found.push({ schema, object: label, role, difference: 'extra', privileges: extra });
131
+ }
132
+ }
133
+ }
134
+ const label = (o, kind) => kind === 'function' ? `function ${o.name}(${o.arguments ?? ''})` : `${kind} ${o.name}`;
135
+ /** Every difference between what a schema declares and what it holds. */
136
+ export function compareSection(expected, actual) {
137
+ const found = [];
138
+ compareObject(expected.schema, `schema ${expected.schema}`, expected.usage, actual.usage, found);
139
+ for (const [kind, key] of [
140
+ ['table', 'tables'],
141
+ ['view', 'views'],
142
+ ['sequence', 'sequences'],
143
+ ['function', 'functions'],
144
+ ]) {
145
+ const wanted = expected[key];
146
+ const held = actual[key];
147
+ const byKey = new Map(held.map((o) => [label(o, kind), o]));
148
+ for (const object of wanted) {
149
+ const name = label(object, kind);
150
+ // An object that is not there at all is the inventory of objects'
151
+ // business — `ekwo doctor` reports a pending migration for that. Here it
152
+ // would only produce a second, noisier way of saying the same thing.
153
+ const counterpart = byKey.get(name);
154
+ if (counterpart === undefined)
155
+ continue;
156
+ compareObject(expected.schema, name, object, counterpart, found);
157
+ byKey.delete(name);
158
+ }
159
+ // What is left is an object this release never declared. Its grants are
160
+ // still worth reporting when they reach `anon`: a table somebody added by
161
+ // hand, readable without signing in, is the shape of the hole this whole
162
+ // change is about.
163
+ for (const [name, object] of byKey) {
164
+ compareObject(expected.schema, name, undefined, object, found);
165
+ }
166
+ }
167
+ return found;
168
+ }
169
+ /** A finding as one line of the doctor's output. */
170
+ export function describeFinding(finding) {
171
+ const verb = finding.difference === 'missing' ? 'is missing' : 'holds an extra';
172
+ return `${finding.schema}.${finding.object}: ${finding.role} ${verb} ${finding.privileges.join(', ')}`;
173
+ }
174
+ //# sourceMappingURL=grants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grants.js","sourceRoot":"","sources":["../src/grants.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AM,IAAI,GAAG,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YACjC,kEAAkE;YAClE,yEAAyE;YACzE,qEAAqE;YACrE,MAAM,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACpC,IAAI,WAAW,KAAK,SAAS;gBAAE,SAAS;YACxC,aAAa,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;YACjE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC;QACD,wEAAwE;QACxE,0EAA0E;QAC1E,yEAAyE;QACzE,mBAAmB;QACnB,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;YACnC,aAAa,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,oDAAoD;AACpD,MAAM,UAAU,eAAe,CAAC,OAAqB;IACnD,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,gBAAgB,CAAC;IAChF,OAAO,GAAG,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,KAAK,OAAO,CAAC,IAAI,IAAI,IAAI,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AACzG,CAAC"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Who a bookkeeping command acts as, on which instance, for which company.
3
+ *
4
+ * Three places can say, and the order is the card's: **the environment first**
5
+ * — a CI job sets `SUPABASE_URL`, `SUPABASE_ANON_KEY` and either
6
+ * `EKWO_ACCESS_TOKEN` or `EKWO_EMAIL` with `EKWO_PASSWORD`, the variables the
7
+ * MCP server reads, and then nothing is read from or written to the disk —
8
+ * and otherwise **a profile**: `--profile`, else `EKWO_PROFILE`, else the one
9
+ * the last `ekwo login` made current.
10
+ *
11
+ * The environment is taken whole or not at all. Credentials in the
12
+ * environment with the instance in a profile would send a token to a host
13
+ * nobody named next to it, so that is a wrong call and not a fallback.
14
+ *
15
+ * A `service_role` key is refused at every door it can arrive by: the
16
+ * publishable-key slot, the token slot, a session file somebody edited, and
17
+ * the `--service-role-key` flag that `ekwo init` takes — typed out of habit
18
+ * on a command that keeps books. `init` and `migrate` remain the exception,
19
+ * and say so when they connect.
20
+ */
21
+ import { type KeySlot } from '@ekwo-ai/core';
22
+ import { type ParsedArgs } from './args.js';
23
+ import { type CompanyRef } from './profiles.js';
24
+ import { UserClient } from './rest.js';
25
+ import { type FetchLike } from './session.js';
26
+ /** The flags every command that acts as a person accepts. */
27
+ export declare const IDENTITY_FLAGS: readonly ["profile", "company", "supabase-url", "anon-key"];
28
+ export interface UserDeps {
29
+ fetchImpl?: FetchLike | undefined;
30
+ env?: NodeJS.ProcessEnv | undefined;
31
+ }
32
+ export interface Acting {
33
+ client: UserClient;
34
+ /** Absent when the environment said who: no profile was read. */
35
+ profile: string | undefined;
36
+ source: 'environment' | 'profile';
37
+ /** The company the profile holds. `--company` is resolved by the caller, against the instance. */
38
+ storedCompany: CompanyRef | undefined;
39
+ configDir: string;
40
+ }
41
+ export declare function refuseServiceRole(key: string | undefined, where: string, slot: KeySlot): void;
42
+ /** `--service-role-key` on a command that keeps books: refused by name, not as an unknown option. */
43
+ export declare function refuseInstallerKey(args: ParsedArgs): void;
44
+ export declare function profileName(args: ParsedArgs, env: NodeJS.ProcessEnv): string | undefined;
45
+ /**
46
+ * `fetch`, saying where it could not get to.
47
+ *
48
+ * Node's own failure is "fetch failed" and the reason is in `cause`; a caller
49
+ * with a shell deserves the host and the reason in the one line it reads.
50
+ */
51
+ export declare function fetchOf(deps: UserDeps): FetchLike;
52
+ /** Opens the instance as whoever the environment or the profile says. */
53
+ export declare function actAsUser(args: ParsedArgs, deps?: UserDeps): Promise<Acting>;
54
+ //# sourceMappingURL=identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAsD,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAA0B,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AACpE,OAAO,EAQL,KAAK,UAAU,EAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAU,KAAK,SAAS,EAAiB,MAAM,cAAc,CAAC;AAGrE,6DAA6D;AAC7D,eAAO,MAAM,cAAc,6DAA8D,CAAC;AAK1F,MAAM,WAAW,QAAQ;IACvB,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAClC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,GAAG,SAAS,CAAC;CACrC;AAED,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,UAAU,CAAC;IACnB,iEAAiE;IACjE,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,MAAM,EAAE,aAAa,GAAG,SAAS,CAAC;IAClC,kGAAkG;IAClG,aAAa,EAAE,UAAU,GAAG,SAAS,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAI7F;AAED,qGAAqG;AACrG,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAMzD;AAOD,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,GAAG,SAAS,CAGxF;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,CAWjD;AAED,yEAAyE;AACzE,wBAAsB,SAAS,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,GAAE,QAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAsEtF"}
@@ -0,0 +1,132 @@
1
+ /**
2
+ * Who a bookkeeping command acts as, on which instance, for which company.
3
+ *
4
+ * Three places can say, and the order is the card's: **the environment first**
5
+ * — a CI job sets `SUPABASE_URL`, `SUPABASE_ANON_KEY` and either
6
+ * `EKWO_ACCESS_TOKEN` or `EKWO_EMAIL` with `EKWO_PASSWORD`, the variables the
7
+ * MCP server reads, and then nothing is read from or written to the disk —
8
+ * and otherwise **a profile**: `--profile`, else `EKWO_PROFILE`, else the one
9
+ * the last `ekwo login` made current.
10
+ *
11
+ * The environment is taken whole or not at all. Credentials in the
12
+ * environment with the instance in a profile would send a token to a host
13
+ * nobody named next to it, so that is a wrong call and not a fallback.
14
+ *
15
+ * A `service_role` key is refused at every door it can arrive by: the
16
+ * publishable-key slot, the token slot, a session file somebody edited, and
17
+ * the `--service-role-key` flag that `ekwo init` takes — typed out of habit
18
+ * on a command that keeps books. `init` and `migrate` remain the exception,
19
+ * and say so when they connect.
20
+ */
21
+ import { IDENTITY_ENV, isServiceRoleKey, serviceRoleRefusal } from '@ekwo-ai/core';
22
+ import { UsageError, stringFlag } from './args.js';
23
+ import { ENV_PROFILE, assertProfileName, configDir, credentialsAreExposed, readProfiles, readSession, writeSession, } from './profiles.js';
24
+ import { UserClient } from './rest.js';
25
+ import { signIn } from './session.js';
26
+ import { warn } from './ui.js';
27
+ /** The flags every command that acts as a person accepts. */
28
+ export const IDENTITY_FLAGS = ['profile', 'company', 'supabase-url', 'anon-key'];
29
+ const SURFACE = 'this command line';
30
+ const SIGN_IN = 'run `ekwo login`';
31
+ export function refuseServiceRole(key, where, slot) {
32
+ if (key !== undefined && isServiceRoleKey(key)) {
33
+ throw new UsageError(serviceRoleRefusal(where, slot, SURFACE, SIGN_IN));
34
+ }
35
+ }
36
+ /** `--service-role-key` on a command that keeps books: refused by name, not as an unknown option. */
37
+ export function refuseInstallerKey(args) {
38
+ if (args.flags.has('service-role-key')) {
39
+ throw new UsageError(`service_role_refused: --service-role-key is for \`ekwo init\`, which installs. A command that keeps books acts as a person, under row level security, and never takes that key. Run \`ekwo login\` instead.`);
40
+ }
41
+ }
42
+ function trimmed(env, name) {
43
+ const value = env[name]?.trim();
44
+ return value === undefined || value.length === 0 ? undefined : value;
45
+ }
46
+ export function profileName(args, env) {
47
+ const named = stringFlag(args, 'profile') ?? trimmed(env, ENV_PROFILE);
48
+ return named === undefined ? undefined : assertProfileName(named);
49
+ }
50
+ /**
51
+ * `fetch`, saying where it could not get to.
52
+ *
53
+ * Node's own failure is "fetch failed" and the reason is in `cause`; a caller
54
+ * with a shell deserves the host and the reason in the one line it reads.
55
+ */
56
+ export function fetchOf(deps) {
57
+ const fetchImpl = deps.fetchImpl ?? ((url, init) => globalThis.fetch(url, init));
58
+ return async (url, init) => {
59
+ try {
60
+ return await fetchImpl(url, init);
61
+ }
62
+ catch (error) {
63
+ const cause = error.cause;
64
+ const why = cause?.code ?? cause?.message ?? error.message;
65
+ throw new Error(`instance_unreachable: ${new URL(url).origin} did not answer (${why})`);
66
+ }
67
+ };
68
+ }
69
+ /** Opens the instance as whoever the environment or the profile says. */
70
+ export async function actAsUser(args, deps = {}) {
71
+ refuseInstallerKey(args);
72
+ const env = deps.env ?? process.env;
73
+ const fetchImpl = fetchOf(deps);
74
+ const dir = configDir(env);
75
+ const accessToken = trimmed(env, IDENTITY_ENV.accessToken);
76
+ const email = trimmed(env, IDENTITY_ENV.email);
77
+ const password = trimmed(env, IDENTITY_ENV.password);
78
+ if (accessToken !== undefined || (email !== undefined && password !== undefined)) {
79
+ const supabaseUrl = stringFlag(args, 'supabase-url') ?? trimmed(env, IDENTITY_ENV.supabaseUrl);
80
+ const anonKey = stringFlag(args, 'anon-key') ?? trimmed(env, IDENTITY_ENV.anonKey);
81
+ if (supabaseUrl === undefined || anonKey === undefined) {
82
+ throw new UsageError(`missing_configuration: the environment names a user and not the instance. Set ${IDENTITY_ENV.supabaseUrl} and ${IDENTITY_ENV.anonKey} beside it, or unset ${IDENTITY_ENV.accessToken}, ${IDENTITY_ENV.email} and ${IDENTITY_ENV.password} to use a profile.`);
83
+ }
84
+ refuseServiceRole(anonKey, IDENTITY_ENV.anonKey, 'apikey');
85
+ refuseServiceRole(accessToken, IDENTITY_ENV.accessToken, 'authorization');
86
+ const instance = { supabaseUrl, anonKey };
87
+ const signInAgain = `Set a fresh ${IDENTITY_ENV.accessToken}.`;
88
+ if (accessToken !== undefined) {
89
+ const client = new UserClient({ instance, fetchImpl, accessToken, signInAgain });
90
+ return { client, profile: undefined, source: 'environment', storedCompany: undefined, configDir: dir };
91
+ }
92
+ // Signed in for this one command, in memory. Nothing is written.
93
+ const { session } = await signIn(fetchImpl, instance, email, password);
94
+ const client = new UserClient({
95
+ instance,
96
+ fetchImpl,
97
+ accessToken: session.access_token,
98
+ refreshToken: session.refresh_token,
99
+ expiresAt: session.expires_at,
100
+ signInAgain,
101
+ });
102
+ return { client, profile: undefined, source: 'environment', storedCompany: undefined, configDir: dir };
103
+ }
104
+ const file = await readProfiles(dir);
105
+ const name = profileName(args, env) ?? file.current;
106
+ const profile = name === undefined ? undefined : file.profiles[name];
107
+ if (name === undefined || profile === undefined) {
108
+ throw new UsageError(name === undefined
109
+ ? 'not_signed_in: nobody is signed in. Run `ekwo login`, or set the environment variables `ekwo --help` lists under "Acting as a person".'
110
+ : `unknown_profile: there is no profile called ${name}. Run \`ekwo login --profile ${name}\`. Known: ${Object.keys(file.profiles).sort().join(', ') || 'none'}.`);
111
+ }
112
+ const session = await readSession(dir, name);
113
+ if (session === undefined) {
114
+ throw new UsageError(`not_signed_in: the profile ${name} holds no session. Run \`ekwo login --profile ${name}\`.`);
115
+ }
116
+ refuseServiceRole(profile.anon_key, `the profile ${name}`, 'apikey');
117
+ refuseServiceRole(session.access_token, `the session of the profile ${name}`, 'authorization');
118
+ if (await credentialsAreExposed(dir)) {
119
+ warn(`the session file in ${dir} can be read by other users of this machine. \`chmod 600\` it.`);
120
+ }
121
+ const client = new UserClient({
122
+ instance: { supabaseUrl: profile.supabase_url, anonKey: profile.anon_key },
123
+ fetchImpl,
124
+ accessToken: session.access_token,
125
+ refreshToken: session.refresh_token,
126
+ expiresAt: session.expires_at,
127
+ onRenewed: (renewed) => writeSession(dir, name, renewed),
128
+ signInAgain: `Run \`ekwo login --profile ${name}\`.`,
129
+ });
130
+ return { client, profile: name, source: 'profile', storedCompany: profile.company, configDir: dir };
131
+ }
132
+ //# sourceMappingURL=identity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.js","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAgB,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,UAAU,EAAE,UAAU,EAAmB,MAAM,WAAW,CAAC;AACpE,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,SAAS,EACT,qBAAqB,EACrB,YAAY,EACZ,WAAW,EACX,YAAY,GAEb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,MAAM,EAAiC,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,6DAA6D;AAC7D,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,CAAU,CAAC;AAE1F,MAAM,OAAO,GAAG,mBAAmB,CAAC;AACpC,MAAM,OAAO,GAAG,kBAAkB,CAAC;AAiBnC,MAAM,UAAU,iBAAiB,CAAC,GAAuB,EAAE,KAAa,EAAE,IAAa;IACrF,I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G,IAAI,UAAU,CAAC;QAC5B,QAAQ,EAAE,EAAE,WAAW,EAAE,OAAO,CAAC,YAAY,EAAE,OAAO,EAAE,OAAO,CAAC,QAAQ,EAAE;QAC1E,SAAS;QACT,WAAW,EAAE,OAAO,CAAC,YAAY;QACjC,YAAY,EAAE,OAAO,CAAC,aAAa;QACnC,SAAS,EAAE,OAAO,CAAC,UAAU;QAC7B,SAAS,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC;QACxD,WAAW,EAAE,8BAA8B,IAAI,KAAK;KACrD,CAAC,CAAC;IACH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;AACtG,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * The CLI as a library.
3
+ *
4
+ * Exported so the tests can drive the same code paths a terminal would, and
5
+ * so another tool can reuse the migration runner and the installation
6
+ * sequence without shelling out.
7
+ */
8
+ export { parseArgs, UsageError, type ParsedArgs } from './args.js';
9
+ export { createAuthUser, findAuthUserByEmail, type AuthUser, type CreateAuthUser, type CreateAuthUserOptions, type FetchLike, } from './auth.js';
10
+ export { availableCountries, bootstrap, countryCharts, countryLanguage, countryPack, installedPacks, schemaIsInstalled, type ChartChoice, type InstalledPack, type PackSummary, type BootstrapOptions, type BootstrapResult, type Step, } from './bootstrap.js';
11
+ export { DEMO_SEED, migrationsDir, resolveBundleDir, seedDir } from './bundle.js';
12
+ export { OPERATOR_CHECKLIST, printOperatorChecklist, type OperatorInstruction, } from './checklist.js';
13
+ export { describeCertification, needsWarning, type Certification, type CertificationFacts } from './pack/certification.js';
14
+ export { describeFiling, filingReadiness, type FilingReadiness } from './pack/filing.js';
15
+ export { compileAssetsSeed, compileFrameworkPack, compileModuleSeeds, compilePack, frameworkSeedFileName, moduleSeedFileName, seedFileName, seedFileNames, } from './pack/compile.js';
16
+ export { DEFAULT_CHART, GENERIC_PACK, declaredSeedSequences, listPacks, packsDir, parseCsv, readFrameworkPack, readPack, readSchema, repoRootDir, resolveBoxRef, seedOutputDir, sourcesOf, vatRegime, PackError, type FrameworkManifest, type FrameworkPack, type Manifest, type Pack, type PackAccount, type PackChart, type PackPosting, type PackReport, type PackReportBox, type PackStatement, type PackStatementLine, type PackStatementRule, type PackTax, type PackCertification, type PackSource, type PackAssets, type PackAssetCategory, type PackGolden, type PackGoldenContact, type PackGoldenDocument, type PackGoldenPayment, } from './pack/read.js';
17
+ export { CATEGORY_CODES, COMMON_SYSTEM, TREATMENT_CODES, taxCodes, type CodeIssue, type TaxCodes, type TreatmentCodes, type VatRegime, } from './pack/vat-codes.js';
18
+ export { euVatScopeOf, parseTerritorySeed, readTerritories, territoryOf, territoryWithin, TerritoryError, type EuVatScope, type Territory, } from './pack/territories.js';
19
+ export { validate, type Issue } from './pack/schema.js';
20
+ export { packDiff, packStatus, packUpgrade, resolveCompany, type CompanyPackStatus, type PackChange, type PackStatusReport, type PackUpgradeResult, type UpgradeOptions, } from './pack/upgrade.js';
21
+ export { allModuleMigrations, exposeSchemaNote, listModules, moduleMigrations, moduleSeeds, readModule, readModuleSchema, resolveModulesDir, ModuleError, type EkwoModule, type ModuleManifest, } from './module/read.js';
22
+ export { applyModuleMigrations, moduleCommand, MODULE_FLAGS } from './commands/module.js';
23
+ export { companyCommand, COMPANY_FLAGS, readArchive, type ArchiveManifest, type ArchiveTable, } from './commands/company.js';
24
+ export { snapshotRecommendation } from './commands/migrate.js';
25
+ export { SCHEMA_MIN } from './schema.js';
26
+ export { COMMANDS, help, run, version, type RunDeps } from './cli.js';
27
+ export { EXIT_ERROR, EXIT_OK, EXIT_REFUSED, EXIT_USAGE, classify, commandLabel, execute, setContext, setResult, type ErrorKind, type OutputContext, type OutputDocument, type OutputError, } from './output.js';
28
+ export type { CommandDeps, Connector } from './context.js';
29
+ export { matchCompany } from './company.js';
30
+ export { IDENTITY_FLAGS, actAsUser, type Acting, type UserDeps } from './identity.js';
31
+ export { ENV_CONFIG_DIR, ENV_PROFILE, assertOutsideRepository, configDir, readProfiles, readSession, type Profile, type ProfilesFile, type StoredSession, } from './profiles.js';
32
+ export { RestError, UserClient } from './rest.js';
33
+ export { AuthError, refreshSession, signIn } from './session.js';
34
+ export { CONFIG_FILE, readConfig, writeConfig, type EkwoConfig } from './config.js';
35
+ export { NoPoolerHostError, POOLER_GENERATIONS, hostOf, pickPoolerUrl, poolerCandidates, poolerUrl, projectRefFrom, supabaseUrlFor, withSsl, type Connection, type Probe, } from './connection.js';
36
+ export { doctor, type Check, type DoctorOptions, type DoctorReport, type Severity } from './doctor.js';
37
+ export { compareCatalogue, describeDifferences, installedSections, readExpectedObjects, readGrants, resolveInventoryPath, InventoryError, type CatalogueComparison, type CategoryDiff, type ExpectedObjects, type ExpectedSchema, type ExpectedModule, type SectionComparison, } from './inventory.js';
38
+ export { GRANT_ROLES, compareSection, describeFinding, describeGrants, type Difference, type GrantFinding, type GrantRole, type GrantedObject, type GrantsSection, type HeldBy, type QueryRows, } from './grants.js';
39
+ export { applyMigration, applyMigrations, appliedVersions, ensureHistory, listMigrations, migrationGap, parseMigrationFile, splitStatements, type Gap, type Migration, } from './migrations.js';
40
+ export { DEFAULT_REGISTRY_URL, anyAdminId, announce, payloadFor, readInstance, register, registryUrl, unregister, type InstanceRow, type RegisterResult, type RegistrationPayload, } from './registry.js';
41
+ export { applyDemoSeed, applySeed, applySeeds, listSeeds, type Seed } from './seeds.js';
42
+ export { asUser, connect, first, scalar, type SqlClient } from './sql.js';
43
+ export { status, syncSchemaVersion, type Status } from './status.js';
44
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,U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EAAE,MAAM,aAAa,CAAC;AACvG,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,oBAAoB,EACpB,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,iBAAiB,GACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,WAAW,EACX,cAAc,EACd,eAAe,EACf,cAAc,EACd,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,SAAS,GACf,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,cAAc,EACd,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,KAAK,GAAG,EACR,KAAK,SAAS,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,oBAAoB,EACpB,UAAU,EACV,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,UAAU,EACV,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,mBAAmB,GACzB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AACxF,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,43 @@
1
+ /**
2
+ * The CLI as a library.
3
+ *
4
+ * Exported so the tests can drive the same code paths a terminal would, and
5
+ * so another tool can reuse the migration runner and the installation
6
+ * sequence without shelling out.
7
+ */
8
+ export { parseArgs, UsageError } from './args.js';
9
+ export { createAuthUser, findAuthUserByEmail, } from './auth.js';
10
+ export { availableCountries, bootstrap, countryCharts, countryLanguage, countryPack, installedPacks, schemaIsInstalled, } from './bootstrap.js';
11
+ export { DEMO_SEED, migrationsDir, resolveBundleDir, seedDir } from './bundle.js';
12
+ export { OPERATOR_CHECKLIST, printOperatorChecklist, } from './checklist.js';
13
+ export { describeCertification, needsWarning } from './pack/certification.js';
14
+ export { describeFiling, filingReadiness } from './pack/filing.js';
15
+ export { compileAssetsSeed, compileFrameworkPack, compileModuleSeeds, compilePack, frameworkSeedFileName, moduleSeedFileName, seedFileName, seedFileNames, } from './pack/compile.js';
16
+ export { DEFAULT_CHART, GENERIC_PACK, declaredSeedSequences, listPacks, packsDir, parseCsv, readFrameworkPack, readPack, readSchema, repoRootDir, resolveBoxRef, seedOutputDir, sourcesOf, vatRegime, PackError, } from './pack/read.js';
17
+ export { CATEGORY_CODES, COMMON_SYSTEM, TREATMENT_CODES, taxCodes, } from './pack/vat-codes.js';
18
+ export { euVatScopeOf, parseTerritorySeed, readTerritories, territoryOf, territoryWithin, TerritoryError, } from './pack/territories.js';
19
+ export { validate } from './pack/schema.js';
20
+ export { packDiff, packStatus, packUpgrade, resolveCompany, } from './pack/upgrade.js';
21
+ export { allModuleMigrations, exposeSchemaNote, listModules, moduleMigrations, moduleSeeds, readModule, readModuleSchema, resolveModulesDir, ModuleError, } from './module/read.js';
22
+ export { applyModuleMigrations, moduleCommand, MODULE_FLAGS } from './commands/module.js';
23
+ export { companyCommand, COMPANY_FLAGS, readArchive, } from './commands/company.js';
24
+ export { snapshotRecommendation } from './commands/migrate.js';
25
+ export { SCHEMA_MIN } from './schema.js';
26
+ export { COMMANDS, help, run, version } from './cli.js';
27
+ export { EXIT_ERROR, EXIT_OK, EXIT_REFUSED, EXIT_USAGE, classify, commandLabel, execute, setContext, setResult, } from './output.js';
28
+ export { matchCompany } from './company.js';
29
+ export { IDENTITY_FLAGS, actAsUser } from './identity.js';
30
+ export { ENV_CONFIG_DIR, ENV_PROFILE, assertOutsideRepository, configDir, readProfiles, readSession, } from './profiles.js';
31
+ export { RestError, UserClient } from './rest.js';
32
+ export { AuthError, refreshSession, signIn } from './session.js';
33
+ export { CONFIG_FILE, readConfig, writeConfig } from './config.js';
34
+ export { NoPoolerHostError, POOLER_GENERATIONS, hostOf, pickPoolerUrl, poolerCandidates, poolerUrl, projectRefFrom, supabaseUrlFor, withSsl, } from './connection.js';
35
+ export { doctor } from './doctor.js';
36
+ export { compareCatalogue, describeDifferences, installedSections, readExpectedObjects, readGrants, resolveInventoryPath, InventoryError, } from './inventory.js';
37
+ export { GRANT_ROLES, compareSection, describeFinding, describeGrants, } from './grants.js';
38
+ export { applyMigration, applyMigrations, appliedVersions, ensureHistory, listMigrations, migrationGap, parseMigrationFile, splitStatements, } from './migrations.js';
39
+ export { DEFAULT_REGISTRY_URL, anyAdminId, announce, payloadFor, readInstance, register, registryUrl, unregister, } from './registry.js';
40
+ export { applyDemoSeed, applySeed, applySeeds, listSeeds } from './seeds.js';
41
+ export { asUser, connect, first, scalar } from './sql.js';
42
+ export { status, syncSchemaVersion } from './status.js';
43
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAmB,MAAM,WAAW,CAAC;AACnE,OAAO,EACL,cAAc,EACd,mBAAmB,GAKpB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,kBAAkB,EAClB,SAAS,EACT,aAAa,EACb,eAAe,EACf,WAAW,EACX,cAAc,EACd,iBAAiB,GAOlB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAClF,OAAO,EACL,kBAAkB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