@stackone/cli 1.44.1 → 1.45.0
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 +45 -0
- package/dist/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/{cliCore-DSgrBC4x.mjs → cliCore-BharJXXM.mjs} +52 -52
- package/dist/{cliCore-DUvOvrms.cjs → cliCore-BqpUU92Z.cjs} +37 -37
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -396,6 +396,51 @@ stackone run --account-id <account-id> --api-key <your-api-key>
|
|
|
396
396
|
- `--builtin` - Use the builtin (StackOne) version of the connector when fetching from the registry
|
|
397
397
|
- `--custom` - Use the custom (organization) version of the connector when fetching from the registry
|
|
398
398
|
- `--owner <owner>` - Explicitly specify the owner to disambiguate between multiple versions of the same connector in the registry
|
|
399
|
+
- `--sync-full` - Walk the action's `dataSync` config to exhaustion the way a full sync would, reporting pages, records and the checkpoint the run would persist. Reads only — nothing is indexed
|
|
400
|
+
- `--sync-incremental [checkpoint]` - Test incremental sync. With a checkpoint value, resumes from it. Without one, runs a full pass first and then resumes from the checkpoint that pass produced, exercising the handoff that normally spans two scheduled runs
|
|
401
|
+
- `--sync-max-pages <pages>` - Cap pages for a sync run, clamped to the production limit of 2000
|
|
402
|
+
- `--sync-page-size <size>` - Override the provider page size for a sync run, so a small sample account still produces several pages (`page` and `offset` strategies only)
|
|
403
|
+
|
|
404
|
+
#### Testing a `dataSync` config
|
|
405
|
+
|
|
406
|
+
`--sync-full` and `--sync-incremental` mirror the page loop the sync workflow runs in production: the same paginator and incremental strategies from `@stackone/connect-sdk`, the same item extraction, the same stop conditions (`exhausted`, `maxIterations`, `duplicatePage`), and the same rule that a truncated run does not advance its watermark. They never write to OpenSearch, so the org record and byte caps that can stop a production run are not reachable locally.
|
|
407
|
+
|
|
408
|
+
```bash
|
|
409
|
+
# Walk every page and show the watermark the run would persist
|
|
410
|
+
stackone run --connector connector.s1.yaml --account account.json --action-id list_employees --sync-full
|
|
411
|
+
|
|
412
|
+
# Full pass, then an incremental pass resuming from its checkpoint
|
|
413
|
+
stackone run --connector connector.s1.yaml --account account.json --action-id list_employees --sync-incremental
|
|
414
|
+
|
|
415
|
+
# Reproduce a specific resume point
|
|
416
|
+
stackone run --connector connector.s1.yaml --account account.json --action-id list_employees --sync-incremental 2026-08-05T00:00:00Z
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
The summary reports, per phase, the pages walked, the record count, why the loop stopped, and the checkpoint the run consumed and would persist — plus a `sampleRecord` (the first record fetched) so the record shape is visible without opening the output file. Add `-d, --debug` to include the resolved request inputs for every page, which is what a surprising stop verdict has to be diagnosed from. `--output-file` always includes those per-page inputs, along with every fetched record under `records` (one array per phase); records are never printed to the terminal.
|
|
420
|
+
|
|
421
|
+
#### Forcing multiple pages on a small account
|
|
422
|
+
|
|
423
|
+
A sample account with three records returns everything on page one, so a full walk never proves the iterator advances. `--sync-page-size` shrinks the page size for the run:
|
|
424
|
+
|
|
425
|
+
```bash
|
|
426
|
+
stackone run --connector connector.s1.yaml --account '{"auth_config_key":"custom"}' \
|
|
427
|
+
--credentials '{"apiKey":"..."}' --action-id list_things --sync-full --sync-page-size 1
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
This cannot be done with `--params`. The `page` and `offset` strategies rewrite their size key from the connector config on every page (`params[pageSizeKey] = defaultPageSize`, `params[limitKey] = defaultLimit`), so any value supplied through `--params` is overwritten before the request is sent. The flag overrides `iterator.defaultPageSize` / `iterator.defaultLimit` on a copy of the config instead, leaving the connector file untouched.
|
|
431
|
+
|
|
432
|
+
`cursor` pagination is the exception and is rejected with an explanation: the cursor strategy only ever writes the cursor itself, so there is no size key to override. A provider that takes a page size alongside a cursor (GraphQL `first`, for example) exposes it as an ordinary action input, which `--params` sets and the paginator preserves across every page.
|
|
433
|
+
|
|
434
|
+
The checkpoint's kind (`timestamp` for `time_filter`, `cursor` for `delta_token`) is derived from the connector, so a bare value cannot be mismatched — a mismatched checkpoint is silently ignored by the strategy, which would make a run report success while fetching an unfiltered dataset.
|
|
435
|
+
|
|
436
|
+
The run exits non-zero when its conclusions are invalid — an ignored checkpoint, or an iterator that is not advancing. A page-capped run exits zero, since a large dataset is not a misconfiguration.
|
|
437
|
+
|
|
438
|
+
Warnings call out failure modes that are silent in production, including:
|
|
439
|
+
|
|
440
|
+
- An iterator that never reaches the provider. `stackone validate` checks that the iterator key is declared as an action input, but not that the request step forwards it via `args` — if it does not, every page returns the same records
|
|
441
|
+
- A `time_filter` whose `response.updatedAtPath` resolves on no record, so the watermark falls back to the local clock rather than provider timestamps
|
|
442
|
+
- A `delta_token` run that emits no token, which makes production abandon every following incremental fire
|
|
443
|
+
- An incremental pass that does not narrow the result set
|
|
399
444
|
|
|
400
445
|
**Note:** You must provide either `--profile` or `--api-key` when using `--account-id`. If using `--api-key`, the `--api-url` option is optional and will default to the production API URL.
|
|
401
446
|
|
package/dist/cli.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const e=require(`./agentConfig-KBkYYmMr.cjs`),t=require(`./cliCore-
|
|
2
|
+
const e=require(`./agentConfig-KBkYYmMr.cjs`),t=require(`./cliCore-BqpUU92Z.cjs`);require(`./setupMigration-rqPZ8MV6.cjs`),require(`./agentApiKey-BDp7EFMI.cjs`);let n=require(`dotenv`);process.env.DOTENV_CONFIG_QUIET=`true`,(0,n.config)(),new t.t().run();
|
package/dist/cli.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./cliCore-
|
|
2
|
+
import{t as e}from"./cliCore-BharJXXM.mjs";import"./agentConfig-BWQWMYKQ.mjs";import"./setupMigration-C1ShGzOu.mjs";import"./agentApiKey-CWXxJgCO.mjs";import{config as t}from"dotenv";process.env.DOTENV_CONFIG_QUIET=`true`,t(),new e().run();export{};
|