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.
- package/README.md +873 -0
- package/dist/args.d.ts +57 -0
- package/dist/args.d.ts.map +1 -0
- package/dist/args.js +134 -0
- package/dist/args.js.map +1 -0
- package/dist/assets/expected-objects.json +9432 -0
- package/dist/assets/migrations/20260911120000_core_companies.sql +260 -0
- package/dist/assets/migrations/20260911120100_accounts_journals.sql +211 -0
- package/dist/assets/migrations/20260911120200_contacts.sql +90 -0
- package/dist/assets/migrations/20260911120300_taxes.sql +146 -0
- package/dist/assets/migrations/20260911120400_entries.sql +338 -0
- package/dist/assets/migrations/20260911120500_documents.sql +279 -0
- package/dist/assets/migrations/20260911120600_payments_reconciliation.sql +251 -0
- package/dist/assets/migrations/20260911120700_bank.sql +178 -0
- package/dist/assets/migrations/20260911120800_analytics_attachments.sql +128 -0
- package/dist/assets/migrations/20260911120900_post_document.sql +279 -0
- package/dist/assets/migrations/20260911121000_reporting.sql +235 -0
- package/dist/assets/migrations/20260911121100_country_templates.sql +226 -0
- package/dist/assets/migrations/20260911121200_fec.sql +71 -0
- package/dist/assets/migrations/20260911130000_instance.sql +77 -0
- package/dist/assets/migrations/20260911130100_instance_members.sql +224 -0
- package/dist/assets/migrations/20260911140000_instance_admins.sql +112 -0
- package/dist/assets/migrations/20260911160000_tax_posting_templates_unique.sql +17 -0
- package/dist/assets/migrations/20260911170000_document_amount_paid.sql +82 -0
- package/dist/assets/migrations/20260911173000_post_payment.sql +122 -0
- package/dist/assets/migrations/20260911173100_sequence_counters_under_rls.sql +84 -0
- package/dist/assets/migrations/20260911183000_country_journal_defaults.sql +143 -0
- package/dist/assets/migrations/20260911193853_line_account_defaults.sql +274 -0
- package/dist/assets/migrations/20260911195054_products.sql +221 -0
- package/dist/assets/migrations/20260911210131_anon_surface.sql +85 -0
- package/dist/assets/migrations/20260912074712_country_packs.sql +318 -0
- package/dist/assets/migrations/20260912080311_report_code_and_region.sql +198 -0
- package/dist/assets/migrations/20260912081014_pack_certification_maintained.sql +31 -0
- package/dist/assets/migrations/20260912081015_pack_certification_backfill.sql +16 -0
- package/dist/assets/migrations/20260912090407_tax_report_boxes.sql +329 -0
- package/dist/assets/migrations/20260912091917_tax_on_base_value.sql +25 -0
- package/dist/assets/migrations/20260912091918_tax_engine_columns.sql +776 -0
- package/dist/assets/migrations/20260912094412_opening_and_closing.sql +759 -0
- package/dist/assets/migrations/20260912095825_charts_of_accounts.sql +326 -0
- package/dist/assets/migrations/20260912100412_financial_statements.sql +632 -0
- package/dist/assets/migrations/20260912104719_one_formula_evaluator.sql +209 -0
- package/dist/assets/migrations/20260912105720_entry_kind_appropriation.sql +26 -0
- package/dist/assets/migrations/20260912105721_appropriation_entry_kind.sql +444 -0
- package/dist/assets/migrations/20260912111751_document_rules.sql +274 -0
- package/dist/assets/migrations/20260912112132_cash_basis_vat_and_fx.sql +1189 -0
- package/dist/assets/migrations/20260913074512_modules.sql +493 -0
- package/dist/assets/migrations/20260913075903_asset_disposal_roles.sql +47 -0
- package/dist/assets/migrations/20260913083216_capabilities.sql +637 -0
- package/dist/assets/migrations/20260913083901_company_invitations.sql +262 -0
- package/dist/assets/migrations/20260913084402_user_preferences.sql +376 -0
- package/dist/assets/migrations/20260913084847_company_profile.sql +261 -0
- package/dist/assets/migrations/20260913085436_numbering_reads_the_pack.sql +235 -0
- package/dist/assets/migrations/20260913085932_api_keys.sql +303 -0
- package/dist/assets/migrations/20260913090216_fiscal_year_bounds.sql +159 -0
- package/dist/assets/migrations/20260913092527_entries_import.sql +219 -0
- package/dist/assets/migrations/20260913101536_null_safe_guards.sql +188 -0
- package/dist/assets/migrations/20260913102115_installer_is_named.sql +462 -0
- package/dist/assets/migrations/20260913102758_no_currency_default.sql +138 -0
- package/dist/assets/migrations/20260913103355_cash_basis_needs_a_box.sql +453 -0
- package/dist/assets/migrations/20260913104014_aged_balance_named_group.sql +79 -0
- package/dist/assets/migrations/20260913104232_foreign_key_indexes.sql +144 -0
- package/dist/assets/migrations/20260913105120_declared_no_reader.sql +41 -0
- package/dist/assets/migrations/20260913111407_pack_languages.sql +223 -0
- package/dist/assets/migrations/20260913112233_schema_comments_for_a_reader.sql +27 -0
- package/dist/assets/migrations/20260913114535_fec_opening_balances.sql +307 -0
- package/dist/assets/migrations/20260914103412_audit_log.sql +509 -0
- package/dist/assets/migrations/20260914111907_pack_upgrade.sql +428 -0
- package/dist/assets/migrations/20260914120500_rounding_reads_the_currency.sql +206 -0
- package/dist/assets/migrations/20260914121200_amounts_round_at_the_currency.sql +2403 -0
- package/dist/assets/migrations/20260914134325_schema_version_0_2_0.sql +36 -0
- package/dist/assets/migrations/20260914143915_accounts_in_use.sql +428 -0
- package/dist/assets/migrations/20260914144731_account_code_frozen.sql +99 -0
- package/dist/assets/migrations/20260914151207_schema_grants_its_own_rights.sql +284 -0
- package/dist/assets/migrations/20260914152840_pack_upgrade_records_its_own_line.sql +237 -0
- package/dist/assets/migrations/20260914163943_declaration_periodicity.sql +349 -0
- package/dist/assets/migrations/20260915094000_foreign_services_received.sql +37 -0
- package/dist/assets/migrations/20260915094500_mentions_read_a_foreign_service.sql +72 -0
- package/dist/assets/migrations/20260915153000_document_shares.sql +568 -0
- package/dist/assets/migrations/20260915160000_ec_sales_list.sql +181 -0
- package/dist/assets/migrations/20260915161842_pack_sources.sql +56 -0
- package/dist/assets/migrations/20260915170500_schema_version_0_3_0.sql +45 -0
- package/dist/assets/migrations/20260915174500_a_vat_category_is_a_code.sql +177 -0
- package/dist/assets/migrations/20260915180000_document_rule_references.sql +85 -0
- package/dist/assets/migrations/20260915181000_territories.sql +342 -0
- package/dist/assets/migrations/20260915181500_ec_sales_list_reads_the_territories.sql +222 -0
- package/dist/assets/migrations/20260915182000_intracom_triangular.sql +53 -0
- package/dist/assets/migrations/20260915182500_a_triangular_supply_says_reverse_charge.sql +99 -0
- package/dist/assets/migrations/20260915191200_a_document_knows_its_language.sql +633 -0
- package/dist/assets/migrations/20260915195000_a_price_that_holds_its_tax.sql +649 -0
- package/dist/assets/migrations/20260915200000_a_posting_names_its_boxes.sql +1004 -0
- package/dist/assets/migrations/20260916094500_a_company_files_more_than_one_declaration.sql +795 -0
- package/dist/assets/migrations/20260916103000_a_ledger_line_names_its_posting.sql +902 -0
- package/dist/assets/migrations/20260916123000_a_vocabulary_for_a_tax_that_is_not_a_vat.sql +144 -0
- package/dist/assets/migrations/20260916124000_a_box_can_be_a_rate_of_a_box.sql +525 -0
- package/dist/assets/migrations/20260916125000_a_tax_follows_the_territory.sql +1318 -0
- package/dist/assets/migrations/20260916126000_a_tax_point_and_its_exception.sql +1211 -0
- package/dist/assets/migrations/20260917090000_a_counterparty_that_learns.sql +561 -0
- package/dist/assets/migrations/20260917120000_what_the_money_pays.sql +545 -0
- package/dist/assets/migrations/20260917150000_a_filing_is_a_row.sql +488 -0
- package/dist/assets/migrations/20260917170000_when_it_is_due.sql +194 -0
- package/dist/assets/migrations/20260917180000_a_box_is_a_number_and_a_kind.sql +213 -0
- package/dist/assets/migrations/20260917190000_what_a_declaration_owes.sql +486 -0
- package/dist/assets/migrations/20260917200000_what_moved_after_it_went.sql +227 -0
- package/dist/assets/migrations/20260918090000_a_form_names_its_file.sql +27 -0
- package/dist/assets/migrations/20260918110000_a_deposit_and_what_came_back.sql +286 -0
- package/dist/assets/migrations/20260918113741_a_fourth_preset_is_named.sql +9 -0
- package/dist/assets/migrations/20260918113807_a_client_reads_and_hands_over.sql +96 -0
- package/dist/assets/migrations/20260918114322_two_definer_functions_check_their_caller.sql +75 -0
- package/dist/assets/migrations/20260918130000_every_company_somebody_keeps.sql +177 -0
- package/dist/assets/migrations/20260918140000_a_session_nobody_prepared.sql +40 -0
- package/dist/assets/migrations/20260918141107_a_line_keeps_the_tax_it_was_posted_with.sql +256 -0
- package/dist/assets/migrations/20260918141342_a_company_has_an_electronic_address.sql +66 -0
- package/dist/assets/migrations/20260918141605_an_invoice_reads_whole_from_the_views.sql +313 -0
- package/dist/assets/migrations/20260918141627_a_policy_asks_once.sql +132 -0
- package/dist/assets/migrations/20260918143352_a_suggestion_reads_the_words_once.sql +204 -0
- package/dist/assets/migrations/20260918143417_a_reference_of_the_caller_and_a_rehearsal.sql +115 -0
- package/dist/assets/migrations/20260918150712_a_company_leaves_with_its_books.sql +1119 -0
- package/dist/assets/migrations/20260918150931_a_statement_is_imported_once.sql +654 -0
- package/dist/assets/migrations/20260918161204_a_posted_document_does_not_move.sql +437 -0
- package/dist/assets/migrations/20260918161538_a_posted_entry_does_not_move.sql +252 -0
- package/dist/assets/migrations/20260918171946_an_entry_is_posted_by_post_entry.sql +289 -0
- package/dist/assets/migrations/20260918174312_schema_version_0_4_0.sql +53 -0
- package/dist/assets/modules/assets/module.json +13 -0
- package/dist/assets/modules/assets/supabase/migrations/20260913081447_assets.sql +1190 -0
- package/dist/assets/modules/assets/supabase/migrations/20260913104234_foreign_key_indexes.sql +47 -0
- package/dist/assets/modules/assets/supabase/migrations/20260913104500_assets_capabilities.sql +145 -0
- package/dist/assets/modules/assets/supabase/migrations/20260914122100_assets_round_at_the_currency.sql +564 -0
- package/dist/assets/modules/assets/supabase/migrations/20260914145012_assets_accounts_in_use.sql +37 -0
- package/dist/assets/modules/assets/supabase/migrations/20260914151530_assets_grants_its_own_rights.sql +63 -0
- package/dist/assets/modules/assets/supabase/migrations/20260918113912_assets_client_reads.sql +20 -0
- package/dist/assets/modules/assets/supabase/migrations/20260918150801_assets_leave_with_the_company.sql +41 -0
- package/dist/assets/modules/budgets/module.json +12 -0
- package/dist/assets/modules/budgets/supabase/migrations/20260913083012_budgets.sql +210 -0
- package/dist/assets/modules/budgets/supabase/migrations/20260913104233_foreign_key_indexes.sql +37 -0
- package/dist/assets/modules/budgets/supabase/migrations/20260913104501_budgets_capabilities.sql +72 -0
- package/dist/assets/modules/budgets/supabase/migrations/20260914122400_budgets_round_at_the_currency.sql +68 -0
- package/dist/assets/modules/budgets/supabase/migrations/20260914145048_budgets_accounts_in_use.sql +30 -0
- package/dist/assets/modules/budgets/supabase/migrations/20260914151812_budgets_grants_its_own_rights.sql +31 -0
- package/dist/assets/modules/budgets/supabase/migrations/20260918113954_budgets_client_reads.sql +20 -0
- package/dist/assets/modules/budgets/supabase/migrations/20260918150823_budgets_leave_with_the_company.sql +37 -0
- package/dist/assets/modules/schema/module.1.json +69 -0
- package/dist/assets/seed/00_currencies.sql +15 -0
- package/dist/assets/seed/00_territories.sql +280 -0
- package/dist/assets/seed/05_framework_generic.sql +110 -0
- package/dist/assets/seed/10_pack_be.sql +1284 -0
- package/dist/assets/seed/11_pack_fr.sql +1112 -0
- package/dist/assets/seed/12_pack_lu.sql +2484 -0
- package/dist/assets/seed/13_pack_ee.sql +733 -0
- package/dist/assets/seed/14_pack_gb.sql +796 -0
- package/dist/assets/seed/15_pack_us.sql +751 -0
- package/dist/assets/seed/90_demo_company.sql +368 -0
- package/dist/assets/seed/modules/assets/10_pack_be.sql +58 -0
- package/dist/assets/seed/modules/assets/11_pack_fr.sql +57 -0
- package/dist/assets/seed/modules/assets/14_pack_gb.sql +58 -0
- package/dist/assets/seed/modules/assets/15_pack_us.sql +60 -0
- package/dist/auth.d.ts +59 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +134 -0
- package/dist/auth.js.map +1 -0
- package/dist/bin.d.ts +6 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +8 -0
- package/dist/bin.js.map +1 -0
- package/dist/books.d.ts +60 -0
- package/dist/books.d.ts.map +1 -0
- package/dist/books.js +168 -0
- package/dist/books.js.map +1 -0
- package/dist/bootstrap.d.ts +236 -0
- package/dist/bootstrap.d.ts.map +1 -0
- package/dist/bootstrap.js +459 -0
- package/dist/bootstrap.js.map +1 -0
- package/dist/bundle.d.ts +27 -0
- package/dist/bundle.d.ts.map +1 -0
- package/dist/bundle.js +47 -0
- package/dist/bundle.js.map +1 -0
- package/dist/checklist.d.ts +35 -0
- package/dist/checklist.d.ts.map +1 -0
- package/dist/checklist.js +64 -0
- package/dist/checklist.js.map +1 -0
- package/dist/cli.d.ts +14 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +318 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/company.d.ts +59 -0
- package/dist/commands/company.d.ts.map +1 -0
- package/dist/commands/company.js +287 -0
- package/dist/commands/company.js.map +1 -0
- package/dist/commands/contact.d.ts +9 -0
- package/dist/commands/contact.d.ts.map +1 -0
- package/dist/commands/contact.js +82 -0
- package/dist/commands/contact.js.map +1 -0
- package/dist/commands/demo.d.ts +19 -0
- package/dist/commands/demo.d.ts.map +1 -0
- package/dist/commands/demo.js +72 -0
- package/dist/commands/demo.js.map +1 -0
- package/dist/commands/doctor.d.ts +12 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +68 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/document.d.ts +17 -0
- package/dist/commands/document.d.ts.map +1 -0
- package/dist/commands/document.js +217 -0
- package/dist/commands/document.js.map +1 -0
- package/dist/commands/init.d.ts +31 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +535 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/login.d.ts +24 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +128 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/migrate.d.ts +30 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/migrate.js +115 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/module.d.ts +32 -0
- package/dist/commands/module.d.ts.map +1 -0
- package/dist/commands/module.js +285 -0
- package/dist/commands/module.js.map +1 -0
- package/dist/commands/pack.d.ts +22 -0
- package/dist/commands/pack.d.ts.map +1 -0
- package/dist/commands/pack.js +481 -0
- package/dist/commands/pack.js.map +1 -0
- package/dist/commands/payment.d.ts +15 -0
- package/dist/commands/payment.d.ts.map +1 -0
- package/dist/commands/payment.js +97 -0
- package/dist/commands/payment.js.map +1 -0
- package/dist/commands/register.d.ts +20 -0
- package/dist/commands/register.d.ts.map +1 -0
- package/dist/commands/register.js +134 -0
- package/dist/commands/register.js.map +1 -0
- package/dist/commands/status.d.ts +8 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +134 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/whoami.d.ts +21 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/whoami.js +133 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/company.d.ts +16 -0
- package/dist/company.d.ts.map +1 -0
- package/dist/company.js +26 -0
- package/dist/company.js.map +1 -0
- package/dist/config.d.ts +24 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +50 -0
- package/dist/config.js.map +1 -0
- package/dist/connection.d.ts +79 -0
- package/dist/connection.d.ts.map +1 -0
- package/dist/connection.js +116 -0
- package/dist/connection.js.map +1 -0
- package/dist/context.d.ts +47 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +93 -0
- package/dist/context.js.map +1 -0
- package/dist/doctor.d.ts +45 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +448 -0
- package/dist/doctor.js.map +1 -0
- package/dist/grants.d.ts +88 -0
- package/dist/grants.d.ts.map +1 -0
- package/dist/grants.js +174 -0
- package/dist/grants.js.map +1 -0
- package/dist/identity.d.ts +54 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +132 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/dist/inventory.d.ts +155 -0
- package/dist/inventory.d.ts.map +1 -0
- package/dist/inventory.js +303 -0
- package/dist/inventory.js.map +1 -0
- package/dist/migrations.d.ts +76 -0
- package/dist/migrations.d.ts.map +1 -0
- package/dist/migrations.js +226 -0
- package/dist/migrations.js.map +1 -0
- package/dist/module/read.d.ts +91 -0
- package/dist/module/read.d.ts.map +1 -0
- package/dist/module/read.js +172 -0
- package/dist/module/read.js.map +1 -0
- package/dist/output.d.ts +110 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/output.js +173 -0
- package/dist/output.js.map +1 -0
- package/dist/pack/certification.d.ts +27 -0
- package/dist/pack/certification.d.ts.map +1 -0
- package/dist/pack/certification.js +38 -0
- package/dist/pack/certification.js.map +1 -0
- package/dist/pack/compile.d.ts +75 -0
- package/dist/pack/compile.d.ts.map +1 -0
- package/dist/pack/compile.js +801 -0
- package/dist/pack/compile.js.map +1 -0
- package/dist/pack/filing.d.ts +48 -0
- package/dist/pack/filing.d.ts.map +1 -0
- package/dist/pack/filing.js +56 -0
- package/dist/pack/filing.js.map +1 -0
- package/dist/pack/read.d.ts +766 -0
- package/dist/pack/read.d.ts.map +1 -0
- package/dist/pack/read.js +2336 -0
- package/dist/pack/read.js.map +1 -0
- package/dist/pack/schema.d.ts +26 -0
- package/dist/pack/schema.d.ts.map +1 -0
- package/dist/pack/schema.js +181 -0
- package/dist/pack/schema.js.map +1 -0
- package/dist/pack/territories.d.ts +98 -0
- package/dist/pack/territories.d.ts.map +1 -0
- package/dist/pack/territories.js +0 -0
- package/dist/pack/territories.js.map +1 -0
- package/dist/pack/upgrade.d.ts +86 -0
- package/dist/pack/upgrade.d.ts.map +1 -0
- package/dist/pack/upgrade.js +76 -0
- package/dist/pack/upgrade.js.map +1 -0
- package/dist/pack/vat-codes.d.ts +273 -0
- package/dist/pack/vat-codes.d.ts.map +1 -0
- package/dist/pack/vat-codes.js +513 -0
- package/dist/pack/vat-codes.js.map +1 -0
- package/dist/profiles.d.ts +67 -0
- package/dist/profiles.d.ts.map +1 -0
- package/dist/profiles.js +187 -0
- package/dist/profiles.js.map +1 -0
- package/dist/prompt.d.ts +40 -0
- package/dist/prompt.d.ts.map +1 -0
- package/dist/prompt.js +120 -0
- package/dist/prompt.js.map +1 -0
- package/dist/registry.d.ts +84 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +104 -0
- package/dist/registry.js.map +1 -0
- package/dist/rest.d.ts +81 -0
- package/dist/rest.d.ts.map +1 -0
- package/dist/rest.js +245 -0
- package/dist/rest.js.map +1 -0
- package/dist/schema.d.ts +15 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +15 -0
- package/dist/schema.js.map +1 -0
- package/dist/seeds.d.ts +27 -0
- package/dist/seeds.d.ts.map +1 -0
- package/dist/seeds.js +47 -0
- package/dist/seeds.js.map +1 -0
- package/dist/session.d.ts +39 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +92 -0
- package/dist/session.js.map +1 -0
- package/dist/sql.d.ts +48 -0
- package/dist/sql.d.ts.map +1 -0
- package/dist/sql.js +112 -0
- package/dist/sql.js.map +1 -0
- package/dist/status.d.ts +94 -0
- package/dist/status.d.ts.map +1 -0
- package/dist/status.js +120 -0
- package/dist/status.js.map +1 -0
- package/dist/ui.d.ts +55 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +114 -0
- package/dist/ui.js.map +1 -0
- package/package.json +29 -0
- package/schema/output.1.json +613 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ekwo pack` — the country packs, in this repository and in an installation.
|
|
3
|
+
*
|
|
4
|
+
* ekwo pack build <cc>|--all compile packs/<cc> into supabase/seed/
|
|
5
|
+
* ekwo pack check <cc>|--all recompile in memory and refuse a stale seed
|
|
6
|
+
* ekwo pack check --links … and open the source register's URLs
|
|
7
|
+
* ekwo pack list what this checkout carries
|
|
8
|
+
* ekwo pack status what an installation holds, company by company
|
|
9
|
+
* ekwo pack upgrade <company> move a company to the version loaded here
|
|
10
|
+
*
|
|
11
|
+
* The first three are files in, one SQL file out: no database, no network, and
|
|
12
|
+
* they only run in a checkout, because a published installation has the
|
|
13
|
+
* compiled seeds and no pack to compile. `--links` is the one exception and it
|
|
14
|
+
* is an option for exactly that reason: it reaches the publishers a register
|
|
15
|
+
* names, reports what did not answer, and decides nothing. The last two are
|
|
16
|
+
* the opposite — they need a connection and know nothing about `packs/`.
|
|
17
|
+
*/
|
|
18
|
+
import { type ParsedArgs } from '../args.js';
|
|
19
|
+
import { type CommandDeps } from '../context.js';
|
|
20
|
+
export declare const PACK_FLAGS: readonly ["db-url", "db-password", "db-region", "project-ref", "supabase-url", "service-role-key", "all", "yes", "apply", "country", "links"];
|
|
21
|
+
export declare function packCommand(args: ParsedArgs, deps?: CommandDeps): Promise<number>;
|
|
22
|
+
//# sourceMappingURL=pack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pack.d.ts","sourceRoot":"","sources":["../../src/commands/pack.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAwD,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AACnG,OAAO,EAAkC,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAuBjF,eAAO,MAAM,UAAU,+IAA4E,CAAC;AAEpG,wBAAsB,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAuO3F"}
|
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ekwo pack` — the country packs, in this repository and in an installation.
|
|
3
|
+
*
|
|
4
|
+
* ekwo pack build <cc>|--all compile packs/<cc> into supabase/seed/
|
|
5
|
+
* ekwo pack check <cc>|--all recompile in memory and refuse a stale seed
|
|
6
|
+
* ekwo pack check --links … and open the source register's URLs
|
|
7
|
+
* ekwo pack list what this checkout carries
|
|
8
|
+
* ekwo pack status what an installation holds, company by company
|
|
9
|
+
* ekwo pack upgrade <company> move a company to the version loaded here
|
|
10
|
+
*
|
|
11
|
+
* The first three are files in, one SQL file out: no database, no network, and
|
|
12
|
+
* they only run in a checkout, because a published installation has the
|
|
13
|
+
* compiled seeds and no pack to compile. `--links` is the one exception and it
|
|
14
|
+
* is an option for exactly that reason: it reaches the publishers a register
|
|
15
|
+
* names, reports what did not answer, and decides nothing. The last two are
|
|
16
|
+
* the opposite — they need a connection and know nothing about `packs/`.
|
|
17
|
+
*/
|
|
18
|
+
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
19
|
+
import { join } from 'node:path';
|
|
20
|
+
import { rejectUnknownFlags, boolFlag, stringFlag, UsageError } from '../args.js';
|
|
21
|
+
import { CONNECTION_FLAGS, openDatabase } from '../context.js';
|
|
22
|
+
import { isInteractive } from '../prompt.js';
|
|
23
|
+
import { packStatus, packUpgrade, resolveCompany } from '../pack/upgrade.js';
|
|
24
|
+
import { compileFrameworkPack, compileModuleSeeds, compilePack, frameworkSeedFileName, seedFileName, } from '../pack/compile.js';
|
|
25
|
+
import { describeFiling } from '../pack/filing.js';
|
|
26
|
+
import { GENERIC_PACK, declaredSeedSequences, listPacks, packsDir, readFrameworkPack, readPack, seedOutputDir, } from '../pack/read.js';
|
|
27
|
+
import { setResult } from '../output.js';
|
|
28
|
+
import { bold, dim, fail, heading, line, note, pairs, skipped, step, warn, yellow } from '../ui.js';
|
|
29
|
+
export const PACK_FLAGS = [...CONNECTION_FLAGS, 'all', 'yes', 'apply', 'country', 'links'];
|
|
30
|
+
export async function packCommand(args, deps = {}) {
|
|
31
|
+
rejectUnknownFlags(args, PACK_FLAGS);
|
|
32
|
+
const action = args.positional[0];
|
|
33
|
+
if (action === undefined)
|
|
34
|
+
throw new UsageError(`name a subcommand\n${usage()}`);
|
|
35
|
+
if (action === 'help') {
|
|
36
|
+
line(usage());
|
|
37
|
+
return 0;
|
|
38
|
+
}
|
|
39
|
+
if (action === 'status')
|
|
40
|
+
return await statusSubcommand(args, deps);
|
|
41
|
+
if (action === 'upgrade')
|
|
42
|
+
return await upgradeSubcommand(args, deps);
|
|
43
|
+
if (action !== 'build' && action !== 'check' && action !== 'list') {
|
|
44
|
+
throw new UsageError(`unknown subcommand: pack ${action}\n${usage()}`);
|
|
45
|
+
}
|
|
46
|
+
const dir = packsDir();
|
|
47
|
+
const available = await listPacks(dir);
|
|
48
|
+
if (action === 'list') {
|
|
49
|
+
heading(`Packs (${available.length + 1})`);
|
|
50
|
+
const framework = await readFrameworkPack(GENERIC_PACK, dir);
|
|
51
|
+
const listed = [
|
|
52
|
+
{
|
|
53
|
+
pack: GENERIC_PACK,
|
|
54
|
+
name: framework.manifest.name,
|
|
55
|
+
version: framework.manifest.version,
|
|
56
|
+
charts: [],
|
|
57
|
+
taxes: 0,
|
|
58
|
+
statements: framework.statements.length,
|
|
59
|
+
languages: [],
|
|
60
|
+
certification: framework.manifest.certification?.status ?? null,
|
|
61
|
+
golden: false,
|
|
62
|
+
goldenExemption: framework.goldenExemption,
|
|
63
|
+
},
|
|
64
|
+
];
|
|
65
|
+
note(`${bold(GENERIC_PACK)} ${framework.manifest.name} ${framework.manifest.version} · ` +
|
|
66
|
+
`${framework.statements.length} statements · no country · ` +
|
|
67
|
+
`certification ${framework.manifest.certification?.status ?? 'none'}`);
|
|
68
|
+
if (framework.goldenExemption !== null) {
|
|
69
|
+
note(dim(` no golden — ${framework.goldenExemption}`));
|
|
70
|
+
}
|
|
71
|
+
for (const slug of available) {
|
|
72
|
+
const pack = await readPack(slug, dir);
|
|
73
|
+
listed.push({
|
|
74
|
+
pack: slug,
|
|
75
|
+
name: pack.manifest.name,
|
|
76
|
+
version: pack.manifest.version,
|
|
77
|
+
charts: pack.charts.map((chart) => ({
|
|
78
|
+
code: chart.code,
|
|
79
|
+
name: chart.name,
|
|
80
|
+
isDefault: chart.is_default === true,
|
|
81
|
+
accounts: chart.accounts.length,
|
|
82
|
+
})),
|
|
83
|
+
taxes: pack.taxes.length,
|
|
84
|
+
statements: pack.statements.length,
|
|
85
|
+
languages: pack.languages,
|
|
86
|
+
certification: pack.manifest.certification?.status ?? null,
|
|
87
|
+
golden: pack.golden !== null,
|
|
88
|
+
goldenExemption: pack.goldenExemption,
|
|
89
|
+
});
|
|
90
|
+
note(`${bold(slug)} ${pack.manifest.name} ${pack.manifest.version} · ` +
|
|
91
|
+
`${pack.charts.length} chart(s), ${pack.charts.reduce((n, c) => n + c.accounts.length, 0)} accounts · ` +
|
|
92
|
+
`${pack.taxes.length} taxes · ${pack.statements.length} statements · ` +
|
|
93
|
+
`${pack.languages.join(', ')} · ` +
|
|
94
|
+
`certification ${pack.manifest.certification?.status ?? 'none'} · ` +
|
|
95
|
+
(pack.golden === null
|
|
96
|
+
? 'no golden'
|
|
97
|
+
: `golden: ${pack.golden.documents.length} documents, ` +
|
|
98
|
+
`${pack.golden.payments.length} payments, ${pack.golden.periods.length} period(s)`));
|
|
99
|
+
// What this pack can say about filing a declaration — every "no" printed
|
|
100
|
+
// rather than left out, because a listing that showed only what works
|
|
101
|
+
// would be a brochure.
|
|
102
|
+
note(dim(` ${describeFiling(pack)}`));
|
|
103
|
+
// An exemption is a claim somebody made, so it is printed rather than
|
|
104
|
+
// inferred from the absence of a folder.
|
|
105
|
+
if (pack.goldenExemption !== null) {
|
|
106
|
+
note(dim(` no golden — ${pack.goldenExemption}`));
|
|
107
|
+
}
|
|
108
|
+
for (const chart of pack.charts) {
|
|
109
|
+
note(dim(` ${chart.code}${chart.is_default ? ' (default)' : ''} — ${chart.name}, ` +
|
|
110
|
+
`${chart.accounts.length} accounts, ` +
|
|
111
|
+
`${chart.statements.length === 0 ? 'generic statements only' : chart.statements.join(', ')}`));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
setResult({ packs: listed });
|
|
115
|
+
return 0;
|
|
116
|
+
}
|
|
117
|
+
const wanted = selection(args, available);
|
|
118
|
+
// The number a pack's seed carries is the pack's own, and a number that has
|
|
119
|
+
// shipped never moves — so it is read from every manifest of the checkout
|
|
120
|
+
// before any file is named, and nothing sorts anything.
|
|
121
|
+
const declared = await declaredSeedSequences(dir);
|
|
122
|
+
const seedDir = seedOutputDir();
|
|
123
|
+
let stale = 0;
|
|
124
|
+
// One line per seed file, for `--json`: what it is the output of, and what
|
|
125
|
+
// this run found or did about it.
|
|
126
|
+
const files = [];
|
|
127
|
+
heading(action === 'build' ? 'Compiling' : 'Checking');
|
|
128
|
+
// The framework pack first: a chart may name one of its statements, and it
|
|
129
|
+
// is the fallback for a country that ships none.
|
|
130
|
+
if (boolFlag(args, 'all') || wanted.includes(GENERIC_PACK)) {
|
|
131
|
+
const framework = await readFrameworkPack(GENERIC_PACK, dir);
|
|
132
|
+
const file = frameworkSeedFileName(GENERIC_PACK);
|
|
133
|
+
const sql = compileFrameworkPack(framework);
|
|
134
|
+
const path = join(seedDir, file);
|
|
135
|
+
const current = await readFile(path, 'utf8').catch(() => undefined);
|
|
136
|
+
if (action === 'build') {
|
|
137
|
+
files.push({ file, pack: GENERIC_PACK, state: current === sql ? 'unchanged' : 'written' });
|
|
138
|
+
if (current === sql)
|
|
139
|
+
note(dim(`${file} — already the output of packs/${GENERIC_PACK}`));
|
|
140
|
+
else {
|
|
141
|
+
await writeFile(path, sql, 'utf8');
|
|
142
|
+
step(`${file} — ${framework.statements.length} statements`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
else if (current !== sql) {
|
|
146
|
+
stale += 1;
|
|
147
|
+
files.push({ file, pack: GENERIC_PACK, state: 'stale' });
|
|
148
|
+
fail(`${file} is not the output of packs/${GENERIC_PACK}${current === undefined ? ' (it does not exist)' : ''}`);
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
files.push({ file, pack: GENERIC_PACK, state: 'unchanged' });
|
|
152
|
+
step(file);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
for (const slug of wanted.filter((s) => s !== GENERIC_PACK)) {
|
|
156
|
+
const pack = await readPack(slug, dir);
|
|
157
|
+
const file = seedFileName(slug, available, declared);
|
|
158
|
+
const sql = compilePack(pack);
|
|
159
|
+
const path = join(seedDir, file);
|
|
160
|
+
const current = await readFile(path, 'utf8').catch(() => undefined);
|
|
161
|
+
if (action === 'build') {
|
|
162
|
+
files.push({ file, pack: slug, state: current === sql ? 'unchanged' : 'written' });
|
|
163
|
+
if (current === sql) {
|
|
164
|
+
note(dim(`${file} — already the output of packs/${slug}`));
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
await writeFile(path, sql, 'utf8');
|
|
168
|
+
step(`${file} — ${pack.charts.length} chart(s), ` +
|
|
169
|
+
`${pack.charts.reduce((n, c) => n + c.accounts.length, 0)} accounts, ` +
|
|
170
|
+
`${pack.taxes.length} taxes, ${pack.statements.length} statements`);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
else if (current !== sql) {
|
|
174
|
+
stale += 1;
|
|
175
|
+
files.push({ file, pack: slug, state: 'stale' });
|
|
176
|
+
fail(`${file} is not the output of packs/${slug}${current === undefined ? ' (it does not exist)' : ''}`);
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
files.push({ file, pack: slug, state: 'unchanged' });
|
|
180
|
+
step(`${file}`);
|
|
181
|
+
}
|
|
182
|
+
// What the figures of this pack are replayed against. A seed that
|
|
183
|
+
// compiles says nothing about whether the country's boxes add up; the
|
|
184
|
+
// golden is what does, and a pack exempt from one says so out loud.
|
|
185
|
+
if (pack.golden === null) {
|
|
186
|
+
note(dim(` no golden — ${pack.goldenExemption ?? 'and no reason given'}`));
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
note(dim(` golden: ${pack.golden.documents.length} documents, ` +
|
|
190
|
+
`${pack.golden.payments.length} payments, ` +
|
|
191
|
+
`${pack.golden.periods.length} period(s) of ${pack.golden.fiscalYear.name}`));
|
|
192
|
+
}
|
|
193
|
+
// The sections of a module compile beside the pack seed, under the module's
|
|
194
|
+
// own folder: `assets.category_templates` exists only on an installation
|
|
195
|
+
// that carries `assets`, and a seed applied where its tables are missing is
|
|
196
|
+
// a seed nobody can re-run.
|
|
197
|
+
for (const [module, moduleSql] of compileModuleSeeds(pack)) {
|
|
198
|
+
const modulePath = join(seedDir, 'modules', module, file);
|
|
199
|
+
const moduleCurrent = await readFile(modulePath, 'utf8').catch(() => undefined);
|
|
200
|
+
const moduleFile = `modules/${module}/${file}`;
|
|
201
|
+
if (action === 'build') {
|
|
202
|
+
files.push({ file: moduleFile, pack: slug, state: moduleCurrent === moduleSql ? 'unchanged' : 'written' });
|
|
203
|
+
if (moduleCurrent === moduleSql) {
|
|
204
|
+
note(dim(`modules/${module}/${file} — already the output of packs/${slug}/${module}.json`));
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
await mkdir(join(seedDir, 'modules', module), { recursive: true });
|
|
208
|
+
await writeFile(modulePath, moduleSql, 'utf8');
|
|
209
|
+
step(`modules/${module}/${file}`);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
else if (moduleCurrent !== moduleSql) {
|
|
213
|
+
stale += 1;
|
|
214
|
+
files.push({ file: moduleFile, pack: slug, state: 'stale' });
|
|
215
|
+
fail(`modules/${module}/${file} is not the output of packs/${slug}/${module}.json` +
|
|
216
|
+
(moduleCurrent === undefined ? ' (it does not exist)' : ''));
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
files.push({ file: moduleFile, pack: slug, state: 'unchanged' });
|
|
220
|
+
step(`modules/${module}/${file}`);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
for (const section of pack.deferred) {
|
|
224
|
+
warn(`packs/${slug}: ${section}`);
|
|
225
|
+
}
|
|
226
|
+
// What a reader should know and what nothing fails over: a bare title left
|
|
227
|
+
// in the register, a tax of a maintained pack whose article nobody linked.
|
|
228
|
+
for (const warning of pack.warnings) {
|
|
229
|
+
warn(`packs/${slug}: ${warning}`);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
// `--links` opens what the register points at. It is asked for by hand and it
|
|
233
|
+
// never decides the exit code — see `followLinks`.
|
|
234
|
+
if (action === 'check' && boolFlag(args, 'links')) {
|
|
235
|
+
await followLinks(wanted.filter((s) => s !== GENERIC_PACK), dir);
|
|
236
|
+
}
|
|
237
|
+
setResult({ action, files, stale });
|
|
238
|
+
if (stale > 0) {
|
|
239
|
+
line();
|
|
240
|
+
note(dim('Run `ekwo pack build --all` and commit the result.'));
|
|
241
|
+
return 1;
|
|
242
|
+
}
|
|
243
|
+
return 0;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* `--links`: open every URL of every register and say which ones went quiet.
|
|
247
|
+
*
|
|
248
|
+
* Off by default, never run by the CI, and it cannot fail a check. Three
|
|
249
|
+
* reasons, and they are the whole design of this option.
|
|
250
|
+
*
|
|
251
|
+
* A link that does not answer **today** is not a wrong pack. Légifrance
|
|
252
|
+
* refuses a request with no browser behind it, Riigi Teataja serves the same
|
|
253
|
+
* page shell for a text and for a typo, and a ministry moves a form the week
|
|
254
|
+
* before a deadline. A gate that turned any of those into a red build would
|
|
255
|
+
* make every contributor's pull request fail for something nobody in it did,
|
|
256
|
+
* and the fix would be to delete the link.
|
|
257
|
+
*
|
|
258
|
+
* It also reaches the network, which `pack build`, `pack check` and everything
|
|
259
|
+
* else under `packs/` deliberately do not: they are files in, one SQL file out.
|
|
260
|
+
* An option is how that stays true of the command and available to a person.
|
|
261
|
+
*
|
|
262
|
+
* So what it reports is a reading, not a verdict: a maintainer runs it when
|
|
263
|
+
* they refresh a pack, reads what did not answer, and opens the ones that look
|
|
264
|
+
* real. A HEAD is tried first and a GET follows, because some publishers
|
|
265
|
+
* answer one and not the other.
|
|
266
|
+
*/
|
|
267
|
+
async function followLinks(slugs, dir) {
|
|
268
|
+
heading('Links');
|
|
269
|
+
for (const slug of slugs) {
|
|
270
|
+
const pack = await readPack(slug, dir);
|
|
271
|
+
if (pack.sources.length === 0) {
|
|
272
|
+
note(dim(`${slug} — no register to follow`));
|
|
273
|
+
continue;
|
|
274
|
+
}
|
|
275
|
+
let quiet = 0;
|
|
276
|
+
for (const source of pack.sources) {
|
|
277
|
+
const answer = await reach(source.url);
|
|
278
|
+
if (answer === null) {
|
|
279
|
+
step(dim(`${slug} ${source.key}`));
|
|
280
|
+
continue;
|
|
281
|
+
}
|
|
282
|
+
quiet += 1;
|
|
283
|
+
warn(`${slug} ${source.key} — ${answer}: ${source.url}`);
|
|
284
|
+
}
|
|
285
|
+
note(dim(` ${slug}: ${pack.sources.length - quiet} of ${pack.sources.length} answered` +
|
|
286
|
+
(quiet === 0
|
|
287
|
+
? ''
|
|
288
|
+
: '. A refusal may be the publisher turning away anything without a browser — open it yourself before deleting it.')));
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
/** Null when the URL answered, else what it said instead. */
|
|
292
|
+
async function reach(url) {
|
|
293
|
+
for (const method of ['HEAD', 'GET']) {
|
|
294
|
+
try {
|
|
295
|
+
const response = await fetch(url, { method, redirect: 'follow', signal: AbortSignal.timeout(15_000) });
|
|
296
|
+
if (response.ok)
|
|
297
|
+
return null;
|
|
298
|
+
if (method === 'GET')
|
|
299
|
+
return `HTTP ${response.status}`;
|
|
300
|
+
}
|
|
301
|
+
catch (error) {
|
|
302
|
+
if (method === 'GET')
|
|
303
|
+
return error instanceof Error ? error.message : 'no answer';
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
return null;
|
|
307
|
+
}
|
|
308
|
+
function selection(args, available) {
|
|
309
|
+
const all = [GENERIC_PACK, ...available];
|
|
310
|
+
if (boolFlag(args, 'all'))
|
|
311
|
+
return all;
|
|
312
|
+
const asked = args.positional[1];
|
|
313
|
+
if (asked === undefined) {
|
|
314
|
+
throw new UsageError(`name a country or pass --all. This checkout carries: ${all.join(', ')}`);
|
|
315
|
+
}
|
|
316
|
+
const slug = asked.toLowerCase();
|
|
317
|
+
if (!all.includes(slug)) {
|
|
318
|
+
throw new UsageError(`unknown pack: ${asked}. This checkout carries: ${all.join(', ')}`);
|
|
319
|
+
}
|
|
320
|
+
return [slug];
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* `ekwo pack status` — what each company copied, against what is loaded here.
|
|
324
|
+
*
|
|
325
|
+
* Read-only. It is the question `ekwo pack upgrade` answers by acting on, so
|
|
326
|
+
* an operator can ask it as often as they like and on a company they have no
|
|
327
|
+
* intention of moving.
|
|
328
|
+
*/
|
|
329
|
+
async function statusSubcommand(args, deps) {
|
|
330
|
+
const interactive = !boolFlag(args, 'yes') && isInteractive();
|
|
331
|
+
const { db } = await openDatabase(args, { interactive, connect: deps.connect });
|
|
332
|
+
try {
|
|
333
|
+
const report = await packStatus(db);
|
|
334
|
+
setResult(report);
|
|
335
|
+
heading(`Packs loaded here (${report.packs.length})`);
|
|
336
|
+
if (report.packs.length === 0) {
|
|
337
|
+
note(dim('none — this installation was seeded before packs, or the seeds have not run'));
|
|
338
|
+
}
|
|
339
|
+
else {
|
|
340
|
+
pairs(report.packs.map((p) => [`${p.country} ${p.name}`, p.version]));
|
|
341
|
+
}
|
|
342
|
+
heading(`Companies (${report.companies.length})`);
|
|
343
|
+
if (report.companies.length === 0) {
|
|
344
|
+
note(dim('none yet'));
|
|
345
|
+
return 0;
|
|
346
|
+
}
|
|
347
|
+
for (const company of report.companies) {
|
|
348
|
+
const held = company.heldVersion ?? 'none recorded';
|
|
349
|
+
const loaded = company.packVersion ?? 'no pack loaded';
|
|
350
|
+
const head = `${bold(company.name)} ${company.country}${company.chartCode === null ? '' : `/${company.chartCode}`} copied ${held}, loaded ${loaded}`;
|
|
351
|
+
if (!company.behind) {
|
|
352
|
+
skipped(`${head} — up to date`);
|
|
353
|
+
continue;
|
|
354
|
+
}
|
|
355
|
+
step(head);
|
|
356
|
+
const d = company.differences;
|
|
357
|
+
if (d !== undefined) {
|
|
358
|
+
note(dim(` ${d.additions} addition(s), ${d.closures} closure(s) — applied by rule; ` +
|
|
359
|
+
`${d.review} to review`));
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
const behind = report.companies.filter((c) => c.behind);
|
|
363
|
+
if (behind.length > 0) {
|
|
364
|
+
line();
|
|
365
|
+
note(dim('Run `ekwo pack upgrade <company>` to see the difference and apply the two rules.'));
|
|
366
|
+
}
|
|
367
|
+
return behind.length > 0 ? 1 : 0;
|
|
368
|
+
}
|
|
369
|
+
finally {
|
|
370
|
+
await db.close();
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* `ekwo pack upgrade <company>` — the three rules, out loud.
|
|
375
|
+
*
|
|
376
|
+
* Additions and closed validities are applied; everything else is printed and
|
|
377
|
+
* left exactly where it was. `--apply` is the operator saying they have read
|
|
378
|
+
* that list.
|
|
379
|
+
*/
|
|
380
|
+
async function upgradeSubcommand(args, deps) {
|
|
381
|
+
const wanted = args.positional[1];
|
|
382
|
+
if (wanted === undefined) {
|
|
383
|
+
throw new UsageError('name the company to upgrade: `ekwo pack upgrade "<name>"`, or its id.');
|
|
384
|
+
}
|
|
385
|
+
const interactive = !boolFlag(args, 'yes') && isInteractive();
|
|
386
|
+
const { db } = await openDatabase(args, { interactive, connect: deps.connect });
|
|
387
|
+
try {
|
|
388
|
+
const company = await resolveCompany(db, wanted);
|
|
389
|
+
const country = stringFlag(args, 'country');
|
|
390
|
+
const apply = boolFlag(args, 'apply');
|
|
391
|
+
// No special case for "nothing differs", and there used to be one: the
|
|
392
|
+
// command asked for the difference first and returned early when it was
|
|
393
|
+
// empty, saying the company was already at the version this installation
|
|
394
|
+
// holds. Those are two different claims. A pack release whose only change
|
|
395
|
+
// is a legal reference on a tax — a patch, and the commonest kind there is
|
|
396
|
+
// — moves the version and produces no difference this diff compares, so
|
|
397
|
+
// the company went on recording the old version for ever and `ekwo pack
|
|
398
|
+
// status` went on calling it behind. Found by the end-to-end run against a
|
|
399
|
+
// real project, upgrading an installation made at v0.2.0: the pack moved
|
|
400
|
+
// 1.5.0 to 1.5.1 and the company stayed on 1.5.0.
|
|
401
|
+
//
|
|
402
|
+
// `pack_upgrade()` handles an empty difference on its own — it applies
|
|
403
|
+
// nothing and records the version — so the branch is gone rather than
|
|
404
|
+
// corrected.
|
|
405
|
+
const result = await packUpgrade(db, company.id, {
|
|
406
|
+
apply,
|
|
407
|
+
...(country === undefined ? {} : { country }),
|
|
408
|
+
});
|
|
409
|
+
setResult({ company: { id: company.id, name: company.name }, ...result });
|
|
410
|
+
heading(`${company.name} — ${result.country} pack ${result.from_version} → ${result.to_version}`);
|
|
411
|
+
if (result.applied.length === 0) {
|
|
412
|
+
skipped('nothing applied');
|
|
413
|
+
}
|
|
414
|
+
else {
|
|
415
|
+
for (const change of result.applied)
|
|
416
|
+
step(describe(change));
|
|
417
|
+
note(dim(`${result.applied.length} change(s) applied: an addition and a closed validity take nothing away.`));
|
|
418
|
+
}
|
|
419
|
+
if (result.listed.length > 0) {
|
|
420
|
+
heading(`To review (${result.listed.length})`);
|
|
421
|
+
note(dim('Not applied. Read them, then run again with --apply if the pack is right.'));
|
|
422
|
+
for (const change of result.listed)
|
|
423
|
+
warn(describe(change));
|
|
424
|
+
}
|
|
425
|
+
if (result.never_applied.length > 0) {
|
|
426
|
+
heading(`Yours, not the pack's (${result.never_applied.length})`);
|
|
427
|
+
note(dim('Never applied by an upgrade: nothing is removed from a company\'s books.'));
|
|
428
|
+
for (const change of result.never_applied)
|
|
429
|
+
note(dim(describe(change)));
|
|
430
|
+
}
|
|
431
|
+
heading('Version');
|
|
432
|
+
if (result.version_moved) {
|
|
433
|
+
step(`company_packs now records ${result.to_version}`);
|
|
434
|
+
}
|
|
435
|
+
else {
|
|
436
|
+
note(yellow(`still ${result.from_version}: ${result.listed.length} difference(s) are waiting to be decided.`));
|
|
437
|
+
}
|
|
438
|
+
line();
|
|
439
|
+
return result.listed.length > 0 ? 1 : 0;
|
|
440
|
+
}
|
|
441
|
+
finally {
|
|
442
|
+
await db.close();
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
/** One difference, in one line. */
|
|
446
|
+
function describe(change) {
|
|
447
|
+
const what = `${change.object} ${bold(change.key)}`;
|
|
448
|
+
switch (change.change) {
|
|
449
|
+
case 'missing':
|
|
450
|
+
return `${what} — added from the pack`;
|
|
451
|
+
case 'valid_to':
|
|
452
|
+
return `${what} — validity closed on ${String(change.detail['pack']?.['valid_to'] ?? '?')}`;
|
|
453
|
+
case 'company_only':
|
|
454
|
+
return `${what} — held here, not in the pack`;
|
|
455
|
+
default:
|
|
456
|
+
return `${what} — ${change.change}: ${JSON.stringify(change.detail)}`;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
function usage() {
|
|
460
|
+
return `${bold('ekwo pack')} — compile a country pack into a seed, and move a company onto it.
|
|
461
|
+
|
|
462
|
+
ekwo pack build <cc> Write supabase/seed/<n>_pack_<cc>.sql from packs/<cc>.
|
|
463
|
+
ekwo pack build --all Every pack of this checkout.
|
|
464
|
+
ekwo pack check --all Refuse a seed that is not the output of its pack.
|
|
465
|
+
--links Also open every URL of every pack's source register
|
|
466
|
+
and say which ones went quiet. Off by default, never
|
|
467
|
+
run by the CI, and it never changes the exit code:
|
|
468
|
+
a publisher that refuses a robot is not a wrong pack.
|
|
469
|
+
ekwo pack list What this checkout carries, and its certification.
|
|
470
|
+
|
|
471
|
+
ekwo pack status What each company of an installation copied, against
|
|
472
|
+
what is loaded there. Read-only.
|
|
473
|
+
ekwo pack upgrade <company>
|
|
474
|
+
Move it to the version loaded there. Additions and
|
|
475
|
+
closed validities are applied; everything else is
|
|
476
|
+
listed and left alone.
|
|
477
|
+
--apply Also apply what was listed for review.
|
|
478
|
+
--country <cc> A second pack the company holds, rather than its own.
|
|
479
|
+
`;
|
|
480
|
+
}
|
|
481
|
+
//# sourceMappingURL=pack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pack.js","sourceRoot":"","sources":["../../src/commands/pack.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAmB,MAAM,YAAY,CAAC;AACnG,OA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ACT,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC;IACnB,CAAC;AACH,CAAC;AAED,mCAAmC;AACnC,SAAS,QAAQ,CAAC,MAAkB;IAClC,MAAM,IAAI,GAAG,GAAG,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;IACpD,QAAQ,MAAM,CAAC,MAAM,EAAE,CAAC;QACtB,KAAK,SAAS;YACZ,OAAO,GAAG,IAAI,wBAAwB,CAAC;QACzC,KAAK,UAAU;YACb,OAAO,GAAG,IAAI,yBAAyB,MAAM,CAC1C,MAAM,CAAC,MAAM,CAAC,MAAM,CAAyC,EAAE,CAAC,UAAU,CAAC,IAAI,GAAG,CACpF,EAAE,CAAC;QACN,KAAK,cAAc;YACjB,OAAO,GAAG,IAAI,+BAA+B,CAAC;QAChD;YACE,OAAO,GAAG,IAAI,MAAM,MAAM,CAAC,MAAM,KAAK,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;IAC1E,CAAC;AACH,CAAC;AAED,SAAS,KAAK;IACZ,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;CAmB5B,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ekwo payment record` and `ekwo match`.
|
|
3
|
+
*
|
|
4
|
+
* `recordPayment()` of the core is the MCP server's `record_payment`: it
|
|
5
|
+
* inserts the payment, has `post_payment()` book it and `reconcile()` match
|
|
6
|
+
* it. `settleFromStatement()` is `settle_from_statement()` of the schema: the
|
|
7
|
+
* statement line is booked as the payment it is and matched to what is open
|
|
8
|
+
* on the document. Which way the money goes, who it is from and how much is
|
|
9
|
+
* still owed are read from the ledger, never worked out here.
|
|
10
|
+
*/
|
|
11
|
+
import { type ParsedArgs } from '../args.js';
|
|
12
|
+
import { type BooksDeps } from '../books.js';
|
|
13
|
+
export declare function paymentCommand(args: ParsedArgs, deps?: BooksDeps): Promise<number>;
|
|
14
|
+
export declare function matchCommand(args: ParsedArgs, deps?: BooksDeps): Promise<number>;
|
|
15
|
+
//# sourceMappingURL=payment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../src/commands/payment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAwD,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AACnG,OAAO,EAAwF,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAgBnI,wBAAsB,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,GAAE,SAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAwD5F;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,GAAE,SAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAiB1F"}
|