@dboio/cli 0.6.14 → 0.7.2

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 CHANGED
@@ -158,6 +158,7 @@ All configuration is **directory-scoped**. Each project folder maintains its own
158
158
  | `AppShortName` | string | App short name (used for `dbo clone --app`) |
159
159
  | `AppModifyKey` | string | ModifyKey for locked/production apps (set by `dbo clone`, used for submission guards) |
160
160
  | `TransactionKeyPreset` | `RowUID` \| `RowID` | Row key type for auto-assembled expressions (set during `dbo init`/`dbo clone`, default `RowUID`) |
161
+ | `TicketSuggestionOutput` | string | Output UID for fetching ticket suggestions during error recovery (set during `dbo init`, default `ojaie9t3o0kfvliahnuuda`) |
161
162
  | `ContentPlacement` | `bin` \| `path` \| `ask` | Where to place content files during clone |
162
163
  | `MediaPlacement` | `bin` \| `fullpath` \| `ask` | Where to place media files during clone |
163
164
  | `<Entity>FilenameCol` | column name | Filename column for entity-dir records (e.g., `ExtensionFilenameCol`) |
@@ -571,8 +572,24 @@ dbo output myOutputUID --debug-sql
571
572
  | `--maxrows <n>` | Maximum rows |
572
573
  | `--rows <range>` | Row range, e.g., `1-10` |
573
574
  | `--template <value>` | Custom template |
575
+ | `--limit <n>` | Maximum rows to return (preferred over `--maxrows`) |
576
+ | `--rowcount <bool>` | Include row count: `true` (default) or `false` for performance |
577
+ | `--display <expr>` | Show/hide template tags (repeatable), e.g., `sidebar=hide` |
578
+ | `--format-values` | Enable value formatting in `json_raw` output |
579
+ | `--empty-response-code <code>` | HTTP status code when output returns no results |
580
+ | `--fallback-content <expr>` | Fallback content UID for error codes, e.g., `404=contentUID` |
581
+ | `--escape-html <bool>` | Control HTML escaping: `true` or `false` |
582
+ | `--mime <type>` | Override MIME/content type |
583
+ | `--strict` | Strict error mode |
584
+ | `--confirm` | Confirmation flag |
585
+ | `--include <expr>` | Include token |
586
+ | `--no-transaction` | Disable transaction wrapping |
587
+ | `--skip <phase>` | Skip execution phases (repeatable, admin-only) |
588
+ | `--profile` | Enable MiniProfiler output |
574
589
  | `--debug` | Include debug info |
575
590
  | `--debug-sql` | Include SQL debug info |
591
+ | `--debug-verbose` | Verbose debug output |
592
+ | `--debug-analysis` | Analysis debug output |
576
593
  | `--meta` | Use meta output endpoint |
577
594
  | `--meta-column <uid>` | Column metadata |
578
595
  | `--save` | Interactive save-to-disk mode |
@@ -1156,6 +1173,22 @@ When the server returns a `ticket_error` (record update requires a Ticket ID), t
1156
1173
  Skip all updates that require a Ticket ID
1157
1174
  ```
1158
1175
 
1176
+ #### Ticket suggestions
1177
+
1178
+ When `TicketSuggestionOutput` is configured in `.dbo/config.json` (set during `dbo init`), the CLI automatically fetches relevant ticket suggestions from the server and presents them as selectable choices:
1179
+
1180
+ ```
1181
+ ? Select a Ticket ID:
1182
+ ❯ 1 (TKT-001): Fix login page [login-fix]
1183
+ 2 (TKT-002): Update dashboard [dashboard-v2]
1184
+ 3 (TKT-003): Refactor auth [auth-refactor]
1185
+ Enter a Ticket ID manually…
1186
+ ```
1187
+
1188
+ The suggestions are fetched from the configured output endpoint, filtered by the current record's UID. Users can arrow-key through the list to select a ticket, or choose "Enter a Ticket ID manually" for custom input.
1189
+
1190
+ If `TicketSuggestionOutput` is not configured or the fetch fails, the CLI falls back to a plain text input prompt.
1191
+
1159
1192
  When the server returns a `repo_mismatch` (Ticket ID belongs to a different repository), the CLI prompts:
1160
1193
 
1161
1194
  ```
@@ -1508,6 +1541,158 @@ Both `--json` and `--jq` output use syntax highlighting:
1508
1541
 
1509
1542
  ---
1510
1543
 
1544
+ ## DBO API Parameter Reference
1545
+
1546
+ The DBO.io API uses a token architecture for dynamic parameters. All parameters are passed as URL query string key-value pairs.
1547
+
1548
+ ### Token Syntax
1549
+
1550
+ Parameters follow the token delimiter system:
1551
+
1552
+ ```
1553
+ _tokenType@reference$target!defaultValue:modifier=value
1554
+ ```
1555
+
1556
+ | Delimiter | Purpose | Example |
1557
+ |-----------|---------|---------|
1558
+ | `_` | Prefix for token type | `_filter`, `_sort`, `_limit` |
1559
+ | `@` | Reference (column, field, key) | `_filter@FirstName=John` |
1560
+ | `$` | Target (scope to a specific output/entity) | `_limit$outputUid=100` |
1561
+ | `!` | Default value (fallback) | `_filter@Status!active=value` |
1562
+ | `:` | Modifier(s) | `_filter@Name:Contains=john` |
1563
+
1564
+ ### Output Parameters
1565
+
1566
+ These parameters control the output endpoint behavior (`/api/output/{uid}` and `/api/output/entity/{entityUid}`):
1567
+
1568
+ #### Filtering
1569
+
1570
+ ```
1571
+ _filter@ColumnName=value # exact match (default)
1572
+ _filter@ColumnName:Contains=value # LIKE %value%
1573
+ _filter@ColumnName:StartsWith=value # LIKE value%
1574
+ _filter@ColumnName:EndsWith=value # LIKE %value
1575
+ _filter@ColumnName:LessThan=value # < comparison
1576
+ _filter@ColumnName:LessThanOrEqualTo=value # <= comparison
1577
+ _filter@ColumnName:GreaterThan=value # > comparison
1578
+ _filter@ColumnName:GreaterThanOrEqualTo=value # >= comparison
1579
+ _filter@ColumnName:Contains,And=value # AND logic (default is OR)
1580
+ _filter@ColumnName:Contains,Exclude=value # NOT LIKE
1581
+ _filter$outputTarget@ColumnName=value # scoped to specific output
1582
+ ```
1583
+
1584
+ #### Sorting
1585
+
1586
+ ```
1587
+ _sort=ColumnName # ascending (default)
1588
+ _sort=ColumnName:ASC # explicit ascending
1589
+ _sort=ColumnName:DESC # descending
1590
+ _sort=Column1:ASC,Column2:DESC # multiple sorts (comma-separated)
1591
+ _sort=ColumnName ASC # space-separated also works
1592
+ ```
1593
+
1594
+ Multiple `_sort` parameters can be specified; earlier sorts take precedence.
1595
+
1596
+ #### Pagination
1597
+
1598
+ ```
1599
+ _limit=30 # max 30 rows
1600
+ _limit=10-30 # rows 10 through 30 (range)
1601
+ _limit=10&_page=3 # 10 rows per page, page 3
1602
+ _rowcount=false # disable row count for performance
1603
+ ```
1604
+
1605
+ Deprecated (still accepted): `_maxrows`, `_rows`, `_rowsperpage`
1606
+
1607
+ #### Search
1608
+
1609
+ ```
1610
+ _search=keyword # full-text search across searchable columns
1611
+ _search@ColumnName=keyword # search specific column
1612
+ ```
1613
+
1614
+ #### Template & Format
1615
+
1616
+ ```
1617
+ _template=json_raw # format name: json_raw, html, json, json_indented, csv, xml, txt, pdf
1618
+ _template=3iX9fHFTL064Shgol8Bktw # content UID (custom template)
1619
+ _format_values=true # enable value formatting in json_raw
1620
+ _format=json # legacy format specifier
1621
+ _mime=application/json # override MIME/content type
1622
+ _escape_html=false # disable HTML escaping of data values
1623
+ ```
1624
+
1625
+ #### Display Control
1626
+
1627
+ ```
1628
+ _display@tagName=show # show a template content tag
1629
+ _display@tagName=hide # hide a template content tag
1630
+ _empty_response_code=404 # HTTP status when results are empty
1631
+ _fallback_content:404=contentUID # render a different content on 404
1632
+ ```
1633
+
1634
+ #### Debug & Profiling
1635
+
1636
+ ```
1637
+ _debug=true # general debug output
1638
+ _debug:sql=true # return SQL without executing
1639
+ _debug:verbose=true # verbose debug
1640
+ _debug:analysis=true # analysis debug
1641
+ _profile=true # MiniProfiler output
1642
+ ```
1643
+
1644
+ Other debug sub-keys: `http_modules`, `instance`, `rewrites`, `cache`, `executable_contents`, `security`, `controllers`, `embeds`, `includes`, `contents`, `template_render`, `tokens`, `messages`, `media`, `request_stack`, `query_execution`, `query_building`
1645
+
1646
+ #### Control Flags
1647
+
1648
+ ```
1649
+ _strict=true # strict error mode
1650
+ _confirm=true # confirmation flag for operations
1651
+ _no_transaction=true # disable transaction wrapping
1652
+ _skip=all # skip execution phases (admin-only)
1653
+ _include=value # include token
1654
+ _security=value # security filter enforcement
1655
+ ```
1656
+
1657
+ ### Data Tokens (used in templates)
1658
+
1659
+ | Token | Description |
1660
+ |-------|-------------|
1661
+ | `#{value@ColumnName}` | Column value from output row |
1662
+ | `#{id}` | Row primary key |
1663
+ | `#{uid}` | Row UID |
1664
+ | `#{CurrentUser@field}` | Current user field (e.g., `FirstName`, `Email`) |
1665
+ | `#{request@key}` | URL parameter value |
1666
+ | `#{session@variable}` | Session variable |
1667
+ | `#{site@field}` | Site field |
1668
+ | `#{date:format}` | Current date/time |
1669
+ | `#{unique:uid}` | Generate unique UID |
1670
+ | `#{count}` | Row count |
1671
+ | `#{page}` | Current page number |
1672
+
1673
+ ### Template Tags
1674
+
1675
+ System tags (used in output templates):
1676
+
1677
+ | Tag | Purpose |
1678
+ |-----|---------|
1679
+ | `<#_row>` | Row template |
1680
+ | `<#_header>` | Header template |
1681
+ | `<#_footer>` | Footer template |
1682
+ | `<#_cell>` | Cell template |
1683
+ | `<#_empty>` | Empty result template |
1684
+ | `<#_noresult>` | No result template |
1685
+ | `<#_prompt>` | Prompt template |
1686
+ | `<#_shared>` | Shared template |
1687
+ | `<#_rowdelimiter>` | Row delimiter |
1688
+ | `<#_celldelimiter>` | Cell delimiter |
1689
+ | `<#_value>` | Value template |
1690
+ | `<#_embed url="...">` | Embed nested content/output |
1691
+
1692
+ User-defined tags use `<#reference>` (no underscore prefix).
1693
+
1694
+ ---
1695
+
1511
1696
  ## Migration from curl
1512
1697
 
1513
1698
  The `dbo` CLI is a drop-in replacement for the curl-based workflow. Here's how common operations translate:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dboio/cli",
3
- "version": "0.6.14",
3
+ "version": "0.7.2",
4
4
  "description": "CLI for the DBO.io framework",
5
5
  "type": "module",
6
6
  "bin": {