monday-cli 0.2.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/CHANGELOG.md +439 -0
- package/LICENSE +21 -0
- package/README.md +431 -0
- package/dist/api/board-child-finder.d.ts +95 -0
- package/dist/api/board-child-finder.d.ts.map +1 -0
- package/dist/api/board-child-finder.js +89 -0
- package/dist/api/board-child-finder.js.map +1 -0
- package/dist/api/board-metadata.d.ts +162 -0
- package/dist/api/board-metadata.d.ts.map +1 -0
- package/dist/api/board-metadata.js +238 -0
- package/dist/api/board-metadata.js.map +1 -0
- package/dist/api/board-mutation-invalidation.d.ts +153 -0
- package/dist/api/board-mutation-invalidation.d.ts.map +1 -0
- package/dist/api/board-mutation-invalidation.js +136 -0
- package/dist/api/board-mutation-invalidation.js.map +1 -0
- package/dist/api/board-mutation-result.d.ts +97 -0
- package/dist/api/board-mutation-result.d.ts.map +1 -0
- package/dist/api/board-mutation-result.js +99 -0
- package/dist/api/board-mutation-result.js.map +1 -0
- package/dist/api/board-projection.d.ts +68 -0
- package/dist/api/board-projection.d.ts.map +1 -0
- package/dist/api/board-projection.js +79 -0
- package/dist/api/board-projection.js.map +1 -0
- package/dist/api/cache.d.ts +150 -0
- package/dist/api/cache.d.ts.map +1 -0
- package/dist/api/cache.js +418 -0
- package/dist/api/cache.js.map +1 -0
- package/dist/api/client.d.ts +162 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +205 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/column-mapping.d.ts +68 -0
- package/dist/api/column-mapping.d.ts.map +1 -0
- package/dist/api/column-mapping.js +117 -0
- package/dist/api/column-mapping.js.map +1 -0
- package/dist/api/column-mutation-result.d.ts +136 -0
- package/dist/api/column-mutation-result.d.ts.map +1 -0
- package/dist/api/column-mutation-result.js +130 -0
- package/dist/api/column-mutation-result.js.map +1 -0
- package/dist/api/column-types.d.ts +215 -0
- package/dist/api/column-types.d.ts.map +1 -0
- package/dist/api/column-types.js +195 -0
- package/dist/api/column-types.js.map +1 -0
- package/dist/api/column-values.d.ts +446 -0
- package/dist/api/column-values.d.ts.map +1 -0
- package/dist/api/column-values.js +795 -0
- package/dist/api/column-values.js.map +1 -0
- package/dist/api/columns.d.ts +205 -0
- package/dist/api/columns.d.ts.map +1 -0
- package/dist/api/columns.js +343 -0
- package/dist/api/columns.js.map +1 -0
- package/dist/api/complexity.d.ts +90 -0
- package/dist/api/complexity.d.ts.map +1 -0
- package/dist/api/complexity.js +194 -0
- package/dist/api/complexity.js.map +1 -0
- package/dist/api/dates.d.ts +150 -0
- package/dist/api/dates.d.ts.map +1 -0
- package/dist/api/dates.js +490 -0
- package/dist/api/dates.js.map +1 -0
- package/dist/api/destructive-gate.d.ts +107 -0
- package/dist/api/destructive-gate.d.ts.map +1 -0
- package/dist/api/destructive-gate.js +19 -0
- package/dist/api/destructive-gate.js.map +1 -0
- package/dist/api/dry-run.d.ts +338 -0
- package/dist/api/dry-run.d.ts.map +1 -0
- package/dist/api/dry-run.js +607 -0
- package/dist/api/dry-run.js.map +1 -0
- package/dist/api/emails.d.ts +60 -0
- package/dist/api/emails.d.ts.map +1 -0
- package/dist/api/emails.js +113 -0
- package/dist/api/emails.js.map +1 -0
- package/dist/api/errors.d.ts +82 -0
- package/dist/api/errors.d.ts.map +1 -0
- package/dist/api/errors.js +434 -0
- package/dist/api/errors.js.map +1 -0
- package/dist/api/filters.d.ts +198 -0
- package/dist/api/filters.d.ts.map +1 -0
- package/dist/api/filters.js +328 -0
- package/dist/api/filters.js.map +1 -0
- package/dist/api/group-color.d.ts +33 -0
- package/dist/api/group-color.d.ts.map +1 -0
- package/dist/api/group-color.js +80 -0
- package/dist/api/group-color.js.map +1 -0
- package/dist/api/group-mutation-result.d.ts +150 -0
- package/dist/api/group-mutation-result.d.ts.map +1 -0
- package/dist/api/group-mutation-result.js +141 -0
- package/dist/api/group-mutation-result.js.map +1 -0
- package/dist/api/iso-country-codes.d.ts +45 -0
- package/dist/api/iso-country-codes.d.ts.map +1 -0
- package/dist/api/iso-country-codes.js +71 -0
- package/dist/api/iso-country-codes.js.map +1 -0
- package/dist/api/item-board-lookup.d.ts +86 -0
- package/dist/api/item-board-lookup.d.ts.map +1 -0
- package/dist/api/item-board-lookup.js +140 -0
- package/dist/api/item-board-lookup.js.map +1 -0
- package/dist/api/item-helpers.d.ts +133 -0
- package/dist/api/item-helpers.d.ts.map +1 -0
- package/dist/api/item-helpers.js +139 -0
- package/dist/api/item-helpers.js.map +1 -0
- package/dist/api/item-mutation-result.d.ts +60 -0
- package/dist/api/item-mutation-result.d.ts.map +1 -0
- package/dist/api/item-mutation-result.js +63 -0
- package/dist/api/item-mutation-result.js.map +1 -0
- package/dist/api/item-projection.d.ts +165 -0
- package/dist/api/item-projection.d.ts.map +1 -0
- package/dist/api/item-projection.js +235 -0
- package/dist/api/item-projection.js.map +1 -0
- package/dist/api/item-source-read.d.ts +45 -0
- package/dist/api/item-source-read.d.ts.map +1 -0
- package/dist/api/item-source-read.js +57 -0
- package/dist/api/item-source-read.js.map +1 -0
- package/dist/api/items-page-walker.d.ts +126 -0
- package/dist/api/items-page-walker.d.ts.map +1 -0
- package/dist/api/items-page-walker.js +256 -0
- package/dist/api/items-page-walker.js.map +1 -0
- package/dist/api/links.d.ts +70 -0
- package/dist/api/links.d.ts.map +1 -0
- package/dist/api/links.js +128 -0
- package/dist/api/links.js.map +1 -0
- package/dist/api/me-token.d.ts +52 -0
- package/dist/api/me-token.d.ts.map +1 -0
- package/dist/api/me-token.js +55 -0
- package/dist/api/me-token.js.map +1 -0
- package/dist/api/pagination.d.ts +201 -0
- package/dist/api/pagination.d.ts.map +1 -0
- package/dist/api/pagination.js +223 -0
- package/dist/api/pagination.js.map +1 -0
- package/dist/api/partial-success-mutation.d.ts +28 -0
- package/dist/api/partial-success-mutation.d.ts.map +1 -0
- package/dist/api/partial-success-mutation.js +68 -0
- package/dist/api/partial-success-mutation.js.map +1 -0
- package/dist/api/people.d.ts +182 -0
- package/dist/api/people.d.ts.map +1 -0
- package/dist/api/people.js +260 -0
- package/dist/api/people.js.map +1 -0
- package/dist/api/phones.d.ts +74 -0
- package/dist/api/phones.d.ts.map +1 -0
- package/dist/api/phones.js +167 -0
- package/dist/api/phones.js.map +1 -0
- package/dist/api/raw-document.d.ts +53 -0
- package/dist/api/raw-document.d.ts.map +1 -0
- package/dist/api/raw-document.js +177 -0
- package/dist/api/raw-document.js.map +1 -0
- package/dist/api/raw-write.d.ts +127 -0
- package/dist/api/raw-write.d.ts.map +1 -0
- package/dist/api/raw-write.js +233 -0
- package/dist/api/raw-write.js.map +1 -0
- package/dist/api/resolution-context.d.ts +32 -0
- package/dist/api/resolution-context.d.ts.map +1 -0
- package/dist/api/resolution-context.js +42 -0
- package/dist/api/resolution-context.js.map +1 -0
- package/dist/api/resolution-pass.d.ts +163 -0
- package/dist/api/resolution-pass.d.ts.map +1 -0
- package/dist/api/resolution-pass.js +254 -0
- package/dist/api/resolution-pass.js.map +1 -0
- package/dist/api/resolve-client.d.ts +69 -0
- package/dist/api/resolve-client.d.ts.map +1 -0
- package/dist/api/resolve-client.js +70 -0
- package/dist/api/resolve-client.js.map +1 -0
- package/dist/api/resolver-error-fold.d.ts +176 -0
- package/dist/api/resolver-error-fold.d.ts.map +1 -0
- package/dist/api/resolver-error-fold.js +230 -0
- package/dist/api/resolver-error-fold.js.map +1 -0
- package/dist/api/resolvers.d.ts +131 -0
- package/dist/api/resolvers.d.ts.map +1 -0
- package/dist/api/resolvers.js +262 -0
- package/dist/api/resolvers.js.map +1 -0
- package/dist/api/response-root.d.ts +65 -0
- package/dist/api/response-root.d.ts.map +1 -0
- package/dist/api/response-root.js +61 -0
- package/dist/api/response-root.js.map +1 -0
- package/dist/api/retry.d.ts +112 -0
- package/dist/api/retry.d.ts.map +1 -0
- package/dist/api/retry.js +181 -0
- package/dist/api/retry.js.map +1 -0
- package/dist/api/set-expression.d.ts +23 -0
- package/dist/api/set-expression.d.ts.map +1 -0
- package/dist/api/set-expression.js +31 -0
- package/dist/api/set-expression.js.map +1 -0
- package/dist/api/sort.d.ts +59 -0
- package/dist/api/sort.d.ts.map +1 -0
- package/dist/api/sort.js +73 -0
- package/dist/api/sort.js.map +1 -0
- package/dist/api/source-aggregator.d.ts +94 -0
- package/dist/api/source-aggregator.d.ts.map +1 -0
- package/dist/api/source-aggregator.js +111 -0
- package/dist/api/source-aggregator.js.map +1 -0
- package/dist/api/transport.d.ts +58 -0
- package/dist/api/transport.d.ts.map +1 -0
- package/dist/api/transport.js +190 -0
- package/dist/api/transport.js.map +1 -0
- package/dist/api/update-mutation-result.d.ts +133 -0
- package/dist/api/update-mutation-result.d.ts.map +1 -0
- package/dist/api/update-mutation-result.js +145 -0
- package/dist/api/update-mutation-result.js.map +1 -0
- package/dist/api/users-fan-out-mutation.d.ts +124 -0
- package/dist/api/users-fan-out-mutation.d.ts.map +1 -0
- package/dist/api/users-fan-out-mutation.js +331 -0
- package/dist/api/users-fan-out-mutation.js.map +1 -0
- package/dist/api/walk-pages.d.ts +91 -0
- package/dist/api/walk-pages.d.ts.map +1 -0
- package/dist/api/walk-pages.js +84 -0
- package/dist/api/walk-pages.js.map +1 -0
- package/dist/api/workspace-projection.d.ts +64 -0
- package/dist/api/workspace-projection.d.ts.map +1 -0
- package/dist/api/workspace-projection.js +83 -0
- package/dist/api/workspace-projection.js.map +1 -0
- package/dist/cli/envelope-out.d.ts +128 -0
- package/dist/cli/envelope-out.d.ts.map +1 -0
- package/dist/cli/envelope-out.js +146 -0
- package/dist/cli/envelope-out.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +27 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/program.d.ts +29 -0
- package/dist/cli/program.d.ts.map +1 -0
- package/dist/cli/program.js +109 -0
- package/dist/cli/program.js.map +1 -0
- package/dist/cli/run.d.ts +108 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +105 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/commands/account/client-helper.d.ts +37 -0
- package/dist/commands/account/client-helper.d.ts.map +1 -0
- package/dist/commands/account/client-helper.js +55 -0
- package/dist/commands/account/client-helper.js.map +1 -0
- package/dist/commands/account/complexity.d.ts +29 -0
- package/dist/commands/account/complexity.d.ts.map +1 -0
- package/dist/commands/account/complexity.js +70 -0
- package/dist/commands/account/complexity.js.map +1 -0
- package/dist/commands/account/info.d.ts +36 -0
- package/dist/commands/account/info.d.ts.map +1 -0
- package/dist/commands/account/info.js +74 -0
- package/dist/commands/account/info.js.map +1 -0
- package/dist/commands/account/version.d.ts +44 -0
- package/dist/commands/account/version.d.ts.map +1 -0
- package/dist/commands/account/version.js +98 -0
- package/dist/commands/account/version.js.map +1 -0
- package/dist/commands/account/whoami.d.ts +34 -0
- package/dist/commands/account/whoami.d.ts.map +1 -0
- package/dist/commands/account/whoami.js +77 -0
- package/dist/commands/account/whoami.js.map +1 -0
- package/dist/commands/board/add-users.d.ts +60 -0
- package/dist/commands/board/add-users.d.ts.map +1 -0
- package/dist/commands/board/add-users.js +133 -0
- package/dist/commands/board/add-users.js.map +1 -0
- package/dist/commands/board/archive.d.ts +64 -0
- package/dist/commands/board/archive.d.ts.map +1 -0
- package/dist/commands/board/archive.js +226 -0
- package/dist/commands/board/archive.js.map +1 -0
- package/dist/commands/board/column-create.d.ts +146 -0
- package/dist/commands/board/column-create.d.ts.map +1 -0
- package/dist/commands/board/column-create.js +564 -0
- package/dist/commands/board/column-create.js.map +1 -0
- package/dist/commands/board/column-delete.d.ts +76 -0
- package/dist/commands/board/column-delete.d.ts.map +1 -0
- package/dist/commands/board/column-delete.js +224 -0
- package/dist/commands/board/column-delete.js.map +1 -0
- package/dist/commands/board/column-update.d.ts +92 -0
- package/dist/commands/board/column-update.d.ts.map +1 -0
- package/dist/commands/board/column-update.js +364 -0
- package/dist/commands/board/column-update.js.map +1 -0
- package/dist/commands/board/columns.d.ts +30 -0
- package/dist/commands/board/columns.d.ts.map +1 -0
- package/dist/commands/board/columns.js +102 -0
- package/dist/commands/board/columns.js.map +1 -0
- package/dist/commands/board/create.d.ts +67 -0
- package/dist/commands/board/create.d.ts.map +1 -0
- package/dist/commands/board/create.js +226 -0
- package/dist/commands/board/create.js.map +1 -0
- package/dist/commands/board/delete.d.ts +60 -0
- package/dist/commands/board/delete.d.ts.map +1 -0
- package/dist/commands/board/delete.js +192 -0
- package/dist/commands/board/delete.js.map +1 -0
- package/dist/commands/board/describe.d.ts +68 -0
- package/dist/commands/board/describe.d.ts.map +1 -0
- package/dist/commands/board/describe.js +241 -0
- package/dist/commands/board/describe.js.map +1 -0
- package/dist/commands/board/doctor.d.ts +108 -0
- package/dist/commands/board/doctor.d.ts.map +1 -0
- package/dist/commands/board/doctor.js +417 -0
- package/dist/commands/board/doctor.js.map +1 -0
- package/dist/commands/board/duplicate.d.ts +85 -0
- package/dist/commands/board/duplicate.d.ts.map +1 -0
- package/dist/commands/board/duplicate.js +281 -0
- package/dist/commands/board/duplicate.js.map +1 -0
- package/dist/commands/board/find.d.ts +47 -0
- package/dist/commands/board/find.d.ts.map +1 -0
- package/dist/commands/board/find.js +153 -0
- package/dist/commands/board/find.js.map +1 -0
- package/dist/commands/board/get.d.ts +41 -0
- package/dist/commands/board/get.d.ts.map +1 -0
- package/dist/commands/board/get.js +66 -0
- package/dist/commands/board/get.js.map +1 -0
- package/dist/commands/board/group-archive.d.ts +83 -0
- package/dist/commands/board/group-archive.d.ts.map +1 -0
- package/dist/commands/board/group-archive.js +264 -0
- package/dist/commands/board/group-archive.js.map +1 -0
- package/dist/commands/board/group-create.d.ts +118 -0
- package/dist/commands/board/group-create.d.ts.map +1 -0
- package/dist/commands/board/group-create.js +239 -0
- package/dist/commands/board/group-create.js.map +1 -0
- package/dist/commands/board/group-delete.d.ts +79 -0
- package/dist/commands/board/group-delete.d.ts.map +1 -0
- package/dist/commands/board/group-delete.js +222 -0
- package/dist/commands/board/group-delete.js.map +1 -0
- package/dist/commands/board/group-duplicate.d.ts +70 -0
- package/dist/commands/board/group-duplicate.d.ts.map +1 -0
- package/dist/commands/board/group-duplicate.js +219 -0
- package/dist/commands/board/group-duplicate.js.map +1 -0
- package/dist/commands/board/group-update.d.ts +145 -0
- package/dist/commands/board/group-update.d.ts.map +1 -0
- package/dist/commands/board/group-update.js +341 -0
- package/dist/commands/board/group-update.js.map +1 -0
- package/dist/commands/board/groups.d.ts +28 -0
- package/dist/commands/board/groups.d.ts.map +1 -0
- package/dist/commands/board/groups.js +85 -0
- package/dist/commands/board/groups.js.map +1 -0
- package/dist/commands/board/list.d.ts +39 -0
- package/dist/commands/board/list.d.ts.map +1 -0
- package/dist/commands/board/list.js +135 -0
- package/dist/commands/board/list.js.map +1 -0
- package/dist/commands/board/subscribers.d.ts +24 -0
- package/dist/commands/board/subscribers.d.ts.map +1 -0
- package/dist/commands/board/subscribers.js +89 -0
- package/dist/commands/board/subscribers.js.map +1 -0
- package/dist/commands/board/update.d.ts +82 -0
- package/dist/commands/board/update.d.ts.map +1 -0
- package/dist/commands/board/update.js +328 -0
- package/dist/commands/board/update.js.map +1 -0
- package/dist/commands/cache/clear.d.ts +34 -0
- package/dist/commands/cache/clear.d.ts.map +1 -0
- package/dist/commands/cache/clear.js +113 -0
- package/dist/commands/cache/clear.js.map +1 -0
- package/dist/commands/cache/list.d.ts +50 -0
- package/dist/commands/cache/list.d.ts.map +1 -0
- package/dist/commands/cache/list.js +77 -0
- package/dist/commands/cache/list.js.map +1 -0
- package/dist/commands/cache/stats.d.ts +22 -0
- package/dist/commands/cache/stats.d.ts.map +1 -0
- package/dist/commands/cache/stats.js +56 -0
- package/dist/commands/cache/stats.js.map +1 -0
- package/dist/commands/config/path.d.ts +22 -0
- package/dist/commands/config/path.d.ts.map +1 -0
- package/dist/commands/config/path.js +74 -0
- package/dist/commands/config/path.js.map +1 -0
- package/dist/commands/config/show.d.ts +61 -0
- package/dist/commands/config/show.d.ts.map +1 -0
- package/dist/commands/config/show.js +137 -0
- package/dist/commands/config/show.js.map +1 -0
- package/dist/commands/emit.d.ts +156 -0
- package/dist/commands/emit.d.ts.map +1 -0
- package/dist/commands/emit.js +212 -0
- package/dist/commands/emit.js.map +1 -0
- package/dist/commands/index.d.ts +5 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +195 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/item/archive.d.ts +81 -0
- package/dist/commands/item/archive.d.ts.map +1 -0
- package/dist/commands/item/archive.js +187 -0
- package/dist/commands/item/archive.js.map +1 -0
- package/dist/commands/item/clear.d.ts +140 -0
- package/dist/commands/item/clear.d.ts.map +1 -0
- package/dist/commands/item/clear.js +748 -0
- package/dist/commands/item/clear.js.map +1 -0
- package/dist/commands/item/create.d.ts +77 -0
- package/dist/commands/item/create.d.ts.map +1 -0
- package/dist/commands/item/create.js +802 -0
- package/dist/commands/item/create.js.map +1 -0
- package/dist/commands/item/delete.d.ts +82 -0
- package/dist/commands/item/delete.d.ts.map +1 -0
- package/dist/commands/item/delete.js +179 -0
- package/dist/commands/item/delete.js.map +1 -0
- package/dist/commands/item/duplicate.d.ts +117 -0
- package/dist/commands/item/duplicate.d.ts.map +1 -0
- package/dist/commands/item/duplicate.js +238 -0
- package/dist/commands/item/duplicate.js.map +1 -0
- package/dist/commands/item/find.d.ts +55 -0
- package/dist/commands/item/find.d.ts.map +1 -0
- package/dist/commands/item/find.js +231 -0
- package/dist/commands/item/find.js.map +1 -0
- package/dist/commands/item/get.d.ts +47 -0
- package/dist/commands/item/get.d.ts.map +1 -0
- package/dist/commands/item/get.js +66 -0
- package/dist/commands/item/get.js.map +1 -0
- package/dist/commands/item/list.d.ts +73 -0
- package/dist/commands/item/list.d.ts.map +1 -0
- package/dist/commands/item/list.js +284 -0
- package/dist/commands/item/list.js.map +1 -0
- package/dist/commands/item/move.d.ts +181 -0
- package/dist/commands/item/move.d.ts.map +1 -0
- package/dist/commands/item/move.js +560 -0
- package/dist/commands/item/move.js.map +1 -0
- package/dist/commands/item/search.d.ts +67 -0
- package/dist/commands/item/search.d.ts.map +1 -0
- package/dist/commands/item/search.js +322 -0
- package/dist/commands/item/search.js.map +1 -0
- package/dist/commands/item/set.d.ts +88 -0
- package/dist/commands/item/set.d.ts.map +1 -0
- package/dist/commands/item/set.js +387 -0
- package/dist/commands/item/set.js.map +1 -0
- package/dist/commands/item/subitems.d.ts +50 -0
- package/dist/commands/item/subitems.d.ts.map +1 -0
- package/dist/commands/item/subitems.js +86 -0
- package/dist/commands/item/subitems.js.map +1 -0
- package/dist/commands/item/update.d.ts +99 -0
- package/dist/commands/item/update.d.ts.map +1 -0
- package/dist/commands/item/update.js +884 -0
- package/dist/commands/item/update.js.map +1 -0
- package/dist/commands/item/upsert.d.ts +105 -0
- package/dist/commands/item/upsert.d.ts.map +1 -0
- package/dist/commands/item/upsert.js +998 -0
- package/dist/commands/item/upsert.js.map +1 -0
- package/dist/commands/parse-argv.d.ts +20 -0
- package/dist/commands/parse-argv.d.ts.map +1 -0
- package/dist/commands/parse-argv.js +40 -0
- package/dist/commands/parse-argv.js.map +1 -0
- package/dist/commands/raw/index.d.ts +23 -0
- package/dist/commands/raw/index.d.ts.map +1 -0
- package/dist/commands/raw/index.js +416 -0
- package/dist/commands/raw/index.js.map +1 -0
- package/dist/commands/run-by-id-lookup.d.ts +72 -0
- package/dist/commands/run-by-id-lookup.d.ts.map +1 -0
- package/dist/commands/run-by-id-lookup.js +58 -0
- package/dist/commands/run-by-id-lookup.js.map +1 -0
- package/dist/commands/schema/index.d.ts +104 -0
- package/dist/commands/schema/index.d.ts.map +1 -0
- package/dist/commands/schema/index.js +183 -0
- package/dist/commands/schema/index.js.map +1 -0
- package/dist/commands/types.d.ts +66 -0
- package/dist/commands/types.d.ts.map +1 -0
- package/dist/commands/types.js +15 -0
- package/dist/commands/types.js.map +1 -0
- package/dist/commands/update/body-source.d.ts +38 -0
- package/dist/commands/update/body-source.d.ts.map +1 -0
- package/dist/commands/update/body-source.js +80 -0
- package/dist/commands/update/body-source.js.map +1 -0
- package/dist/commands/update/clear-all.d.ts +67 -0
- package/dist/commands/update/clear-all.d.ts.map +1 -0
- package/dist/commands/update/clear-all.js +281 -0
- package/dist/commands/update/clear-all.js.map +1 -0
- package/dist/commands/update/create.d.ts +51 -0
- package/dist/commands/update/create.d.ts.map +1 -0
- package/dist/commands/update/create.js +167 -0
- package/dist/commands/update/create.js.map +1 -0
- package/dist/commands/update/delete.d.ts +53 -0
- package/dist/commands/update/delete.d.ts.map +1 -0
- package/dist/commands/update/delete.js +148 -0
- package/dist/commands/update/delete.js.map +1 -0
- package/dist/commands/update/edit.d.ts +37 -0
- package/dist/commands/update/edit.d.ts.map +1 -0
- package/dist/commands/update/edit.js +129 -0
- package/dist/commands/update/edit.js.map +1 -0
- package/dist/commands/update/get.d.ts +37 -0
- package/dist/commands/update/get.d.ts.map +1 -0
- package/dist/commands/update/get.js +92 -0
- package/dist/commands/update/get.js.map +1 -0
- package/dist/commands/update/like.d.ts +17 -0
- package/dist/commands/update/like.d.ts.map +1 -0
- package/dist/commands/update/like.js +23 -0
- package/dist/commands/update/like.js.map +1 -0
- package/dist/commands/update/list.d.ts +58 -0
- package/dist/commands/update/list.d.ts.map +1 -0
- package/dist/commands/update/list.js +322 -0
- package/dist/commands/update/list.js.map +1 -0
- package/dist/commands/update/pin.d.ts +17 -0
- package/dist/commands/update/pin.d.ts.map +1 -0
- package/dist/commands/update/pin.js +23 -0
- package/dist/commands/update/pin.js.map +1 -0
- package/dist/commands/update/reply.d.ts +47 -0
- package/dist/commands/update/reply.d.ts.map +1 -0
- package/dist/commands/update/reply.js +149 -0
- package/dist/commands/update/reply.js.map +1 -0
- package/dist/commands/update/toggle.d.ts +70 -0
- package/dist/commands/update/toggle.d.ts.map +1 -0
- package/dist/commands/update/toggle.js +118 -0
- package/dist/commands/update/toggle.js.map +1 -0
- package/dist/commands/update/unlike.d.ts +17 -0
- package/dist/commands/update/unlike.d.ts.map +1 -0
- package/dist/commands/update/unlike.js +22 -0
- package/dist/commands/update/unlike.js.map +1 -0
- package/dist/commands/update/unpin.d.ts +17 -0
- package/dist/commands/update/unpin.d.ts.map +1 -0
- package/dist/commands/update/unpin.js +21 -0
- package/dist/commands/update/unpin.js.map +1 -0
- package/dist/commands/user/get.d.ts +31 -0
- package/dist/commands/user/get.d.ts.map +1 -0
- package/dist/commands/user/get.js +81 -0
- package/dist/commands/user/get.js.map +1 -0
- package/dist/commands/user/list.d.ts +61 -0
- package/dist/commands/user/list.d.ts.map +1 -0
- package/dist/commands/user/list.js +148 -0
- package/dist/commands/user/list.js.map +1 -0
- package/dist/commands/user/me.d.ts +17 -0
- package/dist/commands/user/me.d.ts.map +1 -0
- package/dist/commands/user/me.js +49 -0
- package/dist/commands/user/me.js.map +1 -0
- package/dist/commands/workspace/add-users.d.ts +76 -0
- package/dist/commands/workspace/add-users.d.ts.map +1 -0
- package/dist/commands/workspace/add-users.js +154 -0
- package/dist/commands/workspace/add-users.js.map +1 -0
- package/dist/commands/workspace/create.d.ts +59 -0
- package/dist/commands/workspace/create.d.ts.map +1 -0
- package/dist/commands/workspace/create.js +163 -0
- package/dist/commands/workspace/create.js.map +1 -0
- package/dist/commands/workspace/delete.d.ts +67 -0
- package/dist/commands/workspace/delete.d.ts.map +1 -0
- package/dist/commands/workspace/delete.js +182 -0
- package/dist/commands/workspace/delete.js.map +1 -0
- package/dist/commands/workspace/folders.d.ts +40 -0
- package/dist/commands/workspace/folders.d.ts.map +1 -0
- package/dist/commands/workspace/folders.js +124 -0
- package/dist/commands/workspace/folders.js.map +1 -0
- package/dist/commands/workspace/get.d.ts +35 -0
- package/dist/commands/workspace/get.d.ts.map +1 -0
- package/dist/commands/workspace/get.js +62 -0
- package/dist/commands/workspace/get.js.map +1 -0
- package/dist/commands/workspace/list.d.ts +57 -0
- package/dist/commands/workspace/list.d.ts.map +1 -0
- package/dist/commands/workspace/list.js +125 -0
- package/dist/commands/workspace/list.js.map +1 -0
- package/dist/commands/workspace/remove-users.d.ts +47 -0
- package/dist/commands/workspace/remove-users.d.ts.map +1 -0
- package/dist/commands/workspace/remove-users.js +122 -0
- package/dist/commands/workspace/remove-users.js.map +1 -0
- package/dist/commands/workspace/update.d.ts +68 -0
- package/dist/commands/workspace/update.d.ts.map +1 -0
- package/dist/commands/workspace/update.js +237 -0
- package/dist/commands/workspace/update.js.map +1 -0
- package/dist/config/load.d.ts +33 -0
- package/dist/config/load.d.ts.map +1 -0
- package/dist/config/load.js +81 -0
- package/dist/config/load.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/types/global-flags.d.ts +69 -0
- package/dist/types/global-flags.d.ts.map +1 -0
- package/dist/types/global-flags.js +170 -0
- package/dist/types/global-flags.js.map +1 -0
- package/dist/types/ids.d.ts +38 -0
- package/dist/types/ids.d.ts.map +1 -0
- package/dist/types/ids.js +51 -0
- package/dist/types/ids.js.map +1 -0
- package/dist/types/json.d.ts +60 -0
- package/dist/types/json.d.ts.map +1 -0
- package/dist/types/json.js +33 -0
- package/dist/types/json.js.map +1 -0
- package/dist/utils/errors.d.ts +121 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +264 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/logger.d.ts +39 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +49 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/output/envelope.d.ts +140 -0
- package/dist/utils/output/envelope.d.ts.map +1 -0
- package/dist/utils/output/envelope.js +120 -0
- package/dist/utils/output/envelope.js.map +1 -0
- package/dist/utils/output/json.d.ts +10 -0
- package/dist/utils/output/json.d.ts.map +1 -0
- package/dist/utils/output/json.js +12 -0
- package/dist/utils/output/json.js.map +1 -0
- package/dist/utils/output/ndjson.d.ts +92 -0
- package/dist/utils/output/ndjson.d.ts.map +1 -0
- package/dist/utils/output/ndjson.js +33 -0
- package/dist/utils/output/ndjson.js.map +1 -0
- package/dist/utils/output/select.d.ts +22 -0
- package/dist/utils/output/select.d.ts.map +1 -0
- package/dist/utils/output/select.js +47 -0
- package/dist/utils/output/select.js.map +1 -0
- package/dist/utils/output/table.d.ts +32 -0
- package/dist/utils/output/table.d.ts.map +1 -0
- package/dist/utils/output/table.js +133 -0
- package/dist/utils/output/table.js.map +1 -0
- package/dist/utils/output/text.d.ts +5 -0
- package/dist/utils/output/text.d.ts.map +1 -0
- package/dist/utils/output/text.js +32 -0
- package/dist/utils/output/text.js.map +1 -0
- package/dist/utils/parse-boundary.d.ts +53 -0
- package/dist/utils/parse-boundary.d.ts.map +1 -0
- package/dist/utils/parse-boundary.js +62 -0
- package/dist/utils/parse-boundary.js.map +1 -0
- package/dist/utils/redact.d.ts +54 -0
- package/dist/utils/redact.d.ts.map +1 -0
- package/dist/utils/redact.js +154 -0
- package/dist/utils/redact.js.map +1 -0
- package/dist/utils/request-id.d.ts +17 -0
- package/dist/utils/request-id.d.ts.map +1 -0
- package/dist/utils/request-id.js +26 -0
- package/dist/utils/request-id.js.map +1 -0
- package/package.json +87 -0
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
import { constants as fsConstants } from 'node:fs';
|
|
2
|
+
import { chmod, mkdir, open, readdir, rename, rm, stat, unlink, writeFile, } from 'node:fs/promises';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
4
|
+
import { dirname, join, relative, resolve, sep } from 'node:path';
|
|
5
|
+
import { randomUUID } from 'node:crypto';
|
|
6
|
+
import { CacheError } from '../utils/errors.js';
|
|
7
|
+
/**
|
|
8
|
+
* Local cache for board metadata, the user directory, and the
|
|
9
|
+
* schema-version pin (`cli-design.md` §8). M3+ reads/writes; M1 ships
|
|
10
|
+
* the primitives so the `cache list/clear/stats` commands can reason
|
|
11
|
+
* over the on-disk state.
|
|
12
|
+
*
|
|
13
|
+
* Invariants:
|
|
14
|
+
* - Files live under `$XDG_CACHE_HOME/monday-cli/` (or
|
|
15
|
+
* `~/.cache/monday-cli/` if XDG isn't set), per §8.
|
|
16
|
+
* - File mode is `0600`. Writes set it explicitly; reads `fstat` and
|
|
17
|
+
* refuse anything group/world-readable.
|
|
18
|
+
* - Writes are atomic via `tmp + rename`. A crash mid-write leaves the
|
|
19
|
+
* previous version in place — never a half-written JSON file.
|
|
20
|
+
* - Per-profile namespacing is deferred to v0.3+. v0.1 is single-
|
|
21
|
+
* profile so the layout stays flat.
|
|
22
|
+
*
|
|
23
|
+
* The CLI never writes secrets here; redaction lives elsewhere. The
|
|
24
|
+
* mode rule is belt-and-braces — if a future regression slipped a
|
|
25
|
+
* sensitive field in, the file's still `0600`.
|
|
26
|
+
*/
|
|
27
|
+
const CACHE_DIR_NAME = 'monday-cli';
|
|
28
|
+
const FILE_MODE = 0o600;
|
|
29
|
+
const FILE_MODE_MASK = 0o077;
|
|
30
|
+
const DEFAULT_TTL_SECONDS = 300;
|
|
31
|
+
const CACHE_SCHEMA_VERSION = '1';
|
|
32
|
+
export const CACHE_FILE_MODE = FILE_MODE;
|
|
33
|
+
export const DEFAULT_CACHE_TTL_SECONDS = DEFAULT_TTL_SECONDS;
|
|
34
|
+
/**
|
|
35
|
+
* Resolves the cache root per `cli-design.md` §8 and the XDG Base
|
|
36
|
+
* Directory spec. Order:
|
|
37
|
+
* 1. `$XDG_CACHE_HOME/monday-cli` when set and non-empty.
|
|
38
|
+
* 2. `<home>/.cache/monday-cli` otherwise.
|
|
39
|
+
*
|
|
40
|
+
* The return is always absolute. We don't create the directory here —
|
|
41
|
+
* `writeEntry` does that lazily so a read-only path (`cache list` on a
|
|
42
|
+
* fresh install) doesn't side-effect.
|
|
43
|
+
*/
|
|
44
|
+
export const resolveCacheRoot = (options = {}) => {
|
|
45
|
+
const env = options.env ?? process.env;
|
|
46
|
+
const home = options.home ?? homedir();
|
|
47
|
+
const xdg = env.XDG_CACHE_HOME;
|
|
48
|
+
const base = xdg !== undefined && xdg.length > 0 ? xdg : join(home, '.cache');
|
|
49
|
+
return resolve(base, CACHE_DIR_NAME);
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Maps a typed cache key to its on-disk relative path. Centralised so
|
|
53
|
+
* every consumer (read/write/clear, plus the M1 commands) agrees on
|
|
54
|
+
* the layout.
|
|
55
|
+
*/
|
|
56
|
+
export const cacheKeyToRelativePath = (key) => {
|
|
57
|
+
switch (key.kind) {
|
|
58
|
+
case 'board':
|
|
59
|
+
assertSafeIdentifier(key.boardId, 'board id');
|
|
60
|
+
return join('boards', `${key.boardId}.json`);
|
|
61
|
+
case 'users':
|
|
62
|
+
return join('users', 'index.json');
|
|
63
|
+
case 'schemaVersion':
|
|
64
|
+
return join('schema', 'version.json');
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
const SAFE_IDENTIFIER = /^[A-Za-z0-9._-]+$/u;
|
|
68
|
+
const assertSafeIdentifier = (value, label) => {
|
|
69
|
+
if (!SAFE_IDENTIFIER.test(value)) {
|
|
70
|
+
throw new CacheError(`invalid ${label}: ${JSON.stringify(value)}`, {
|
|
71
|
+
details: { hint: 'cache key segments must match [A-Za-z0-9._-]' },
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
// The character class accepts `.` and `..` literally — both are
|
|
75
|
+
// path-traversal sentinels on every common filesystem, and a
|
|
76
|
+
// future caller using `.` / `..` as a cache key would happily
|
|
77
|
+
// resolve to a parent directory. Defence in depth (Codex review
|
|
78
|
+
// suggestion): reject the bare-dots forms even though current
|
|
79
|
+
// M1 callers (board ids via `BoardIdSchema`) can't reach this.
|
|
80
|
+
if (value === '.' || value === '..') {
|
|
81
|
+
throw new CacheError(`invalid ${label}: cache key segments may not be "." or "..", got ${JSON.stringify(value)}`, { details: { hint: 'use a non-sentinel identifier' } });
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
const wrapFsError = (err, message, details = {}) => {
|
|
85
|
+
const cause = err instanceof Error ? err : new Error(String(err));
|
|
86
|
+
return new CacheError(message, { cause, details });
|
|
87
|
+
};
|
|
88
|
+
const isENOENT = (err) => {
|
|
89
|
+
if (typeof err !== 'object' || err === null) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
return err.code === 'ENOENT';
|
|
93
|
+
};
|
|
94
|
+
const ensureSecureDir = async (path) => {
|
|
95
|
+
// mkdir respects umask, so the explicit `mode` is advisory on some
|
|
96
|
+
// platforms. Re-apply via chmod so a tightened-after-creation
|
|
97
|
+
// directory doesn't betray cache contents to another user.
|
|
98
|
+
try {
|
|
99
|
+
await mkdir(path, { recursive: true, mode: 0o700 });
|
|
100
|
+
await chmod(path, 0o700);
|
|
101
|
+
}
|
|
102
|
+
catch (err) {
|
|
103
|
+
throw wrapFsError(err, `cannot prepare cache directory ${path}`, {
|
|
104
|
+
path,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Reads and parses a cache entry. Returns `undefined` on cache miss
|
|
110
|
+
* (file not present or expired). Throws `CacheError` on any other
|
|
111
|
+
* failure (permission too loose, malformed JSON, decode mismatch).
|
|
112
|
+
*/
|
|
113
|
+
export const readEntry = async (root, key, parse, options = {}) => {
|
|
114
|
+
const ttlSeconds = options.ttlSeconds ?? DEFAULT_TTL_SECONDS;
|
|
115
|
+
const now = (options.now ?? (() => new Date()))();
|
|
116
|
+
const relativePath = cacheKeyToRelativePath(key);
|
|
117
|
+
const fullPath = join(root, relativePath);
|
|
118
|
+
let handle;
|
|
119
|
+
try {
|
|
120
|
+
handle = await open(fullPath, fsConstants.O_RDONLY);
|
|
121
|
+
}
|
|
122
|
+
catch (err) {
|
|
123
|
+
if (isENOENT(err)) {
|
|
124
|
+
return undefined;
|
|
125
|
+
}
|
|
126
|
+
throw wrapFsError(err, `cannot read cache entry ${relativePath}`, {
|
|
127
|
+
path: fullPath,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
try {
|
|
131
|
+
const stats = await handle.stat();
|
|
132
|
+
if ((stats.mode & FILE_MODE_MASK) !== 0) {
|
|
133
|
+
throw new CacheError(`refusing to read cache entry with insecure permissions ${formatMode(stats.mode)}`, {
|
|
134
|
+
details: {
|
|
135
|
+
path: fullPath,
|
|
136
|
+
mode: formatMode(stats.mode),
|
|
137
|
+
hint: 'expected mode 0600 — delete and re-fetch',
|
|
138
|
+
},
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
const ageSeconds = Math.max(0, Math.floor((now.getTime() - stats.mtimeMs) / 1000));
|
|
142
|
+
if (ageSeconds > ttlSeconds) {
|
|
143
|
+
return undefined;
|
|
144
|
+
}
|
|
145
|
+
const raw = await handle.readFile('utf8');
|
|
146
|
+
let envelope;
|
|
147
|
+
try {
|
|
148
|
+
envelope = JSON.parse(raw);
|
|
149
|
+
}
|
|
150
|
+
catch (err) {
|
|
151
|
+
throw wrapFsError(err, `malformed cache JSON at ${relativePath}`, {
|
|
152
|
+
path: fullPath,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
if (envelope.schema_version !== CACHE_SCHEMA_VERSION) {
|
|
156
|
+
// Treat a different cache schema as a miss — stale on-disk state
|
|
157
|
+
// shouldn't break a fresh CLI version.
|
|
158
|
+
return undefined;
|
|
159
|
+
}
|
|
160
|
+
const parsed = parse(envelope.data);
|
|
161
|
+
return {
|
|
162
|
+
data: parsed,
|
|
163
|
+
ageSeconds,
|
|
164
|
+
path: fullPath,
|
|
165
|
+
sizeBytes: stats.size,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
finally {
|
|
169
|
+
await handle.close();
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* Writes a cache entry atomically. Sequence:
|
|
174
|
+
* 1. Ensure the parent directory exists with mode `0700`.
|
|
175
|
+
* 2. Write to a tmp sibling with mode `0600`.
|
|
176
|
+
* 3. `rename` over the final path. Atomic on the same filesystem.
|
|
177
|
+
*
|
|
178
|
+
* On any failure the tmp file is best-effort cleaned up so a half-
|
|
179
|
+
* written `.tmp` doesn't accumulate on the next call.
|
|
180
|
+
*/
|
|
181
|
+
export const writeEntry = async (root, key, data) => {
|
|
182
|
+
const relativePath = cacheKeyToRelativePath(key);
|
|
183
|
+
const fullPath = join(root, relativePath);
|
|
184
|
+
const dir = dirname(fullPath);
|
|
185
|
+
await ensureSecureDir(root);
|
|
186
|
+
await ensureSecureDir(dir);
|
|
187
|
+
const envelope = {
|
|
188
|
+
schema_version: CACHE_SCHEMA_VERSION,
|
|
189
|
+
created_at: new Date().toISOString(),
|
|
190
|
+
key,
|
|
191
|
+
data,
|
|
192
|
+
};
|
|
193
|
+
const payload = JSON.stringify(envelope);
|
|
194
|
+
const tmpPath = `${fullPath}.${randomUUID()}.tmp`;
|
|
195
|
+
try {
|
|
196
|
+
await writeFile(tmpPath, payload, { mode: FILE_MODE });
|
|
197
|
+
// Some platforms ignore the `mode` on `writeFile` (umask). Re-
|
|
198
|
+
// chmod explicitly so we never leave the file group/world
|
|
199
|
+
// readable.
|
|
200
|
+
await chmod(tmpPath, FILE_MODE);
|
|
201
|
+
await rename(tmpPath, fullPath);
|
|
202
|
+
return { path: fullPath, sizeBytes: Buffer.byteLength(payload, 'utf8') };
|
|
203
|
+
}
|
|
204
|
+
catch (err) {
|
|
205
|
+
await unlink(tmpPath).catch(() => undefined);
|
|
206
|
+
throw wrapFsError(err, `cannot write cache entry ${relativePath}`, {
|
|
207
|
+
path: fullPath,
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
const classifyEntry = (relativePath) => {
|
|
212
|
+
const segments = relativePath.split(sep);
|
|
213
|
+
const [first] = segments;
|
|
214
|
+
if (first === 'boards' && segments.length === 2) {
|
|
215
|
+
const [, file] = segments;
|
|
216
|
+
if (file !== undefined) {
|
|
217
|
+
const id = file.replace(/\.json$/u, '');
|
|
218
|
+
return { kind: 'boards', id };
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
if (first === 'users') {
|
|
222
|
+
return { kind: 'users', id: undefined };
|
|
223
|
+
}
|
|
224
|
+
if (first === 'schema') {
|
|
225
|
+
return { kind: 'schema', id: undefined };
|
|
226
|
+
}
|
|
227
|
+
return { kind: 'other', id: undefined };
|
|
228
|
+
};
|
|
229
|
+
/**
|
|
230
|
+
* Walks the cache root and reports every JSON entry. Returns an empty
|
|
231
|
+
* array (not an error) when the root doesn't exist — `cache list` on
|
|
232
|
+
* a fresh install is a normal state, not a failure.
|
|
233
|
+
*/
|
|
234
|
+
export const listEntries = async (root, options = {}) => {
|
|
235
|
+
const now = (options.now ?? (() => new Date()))();
|
|
236
|
+
let exists = true;
|
|
237
|
+
try {
|
|
238
|
+
await stat(root);
|
|
239
|
+
}
|
|
240
|
+
catch (err) {
|
|
241
|
+
if (isENOENT(err)) {
|
|
242
|
+
exists = false;
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
throw wrapFsError(err, `cannot stat cache root ${root}`, { path: root });
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
if (!exists) {
|
|
249
|
+
return [];
|
|
250
|
+
}
|
|
251
|
+
const found = [];
|
|
252
|
+
await walk(root, root, found, now);
|
|
253
|
+
// Stable order: sorted by relative path. Spec says agents key off
|
|
254
|
+
// shape; deterministic output is friendlier than insertion order.
|
|
255
|
+
return [...found].sort((a, b) => a.relativePath.localeCompare(b.relativePath));
|
|
256
|
+
};
|
|
257
|
+
const walk = async (root, current, out, now) => {
|
|
258
|
+
let entries;
|
|
259
|
+
try {
|
|
260
|
+
entries = await readdir(current, { withFileTypes: true });
|
|
261
|
+
}
|
|
262
|
+
catch (err) {
|
|
263
|
+
throw wrapFsError(err, `cannot read cache directory ${current}`, {
|
|
264
|
+
path: current,
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
for (const entry of entries) {
|
|
268
|
+
const full = join(current, entry.name);
|
|
269
|
+
if (entry.isDirectory()) {
|
|
270
|
+
await walk(root, full, out, now);
|
|
271
|
+
continue;
|
|
272
|
+
}
|
|
273
|
+
if (!entry.isFile() || !entry.name.endsWith('.json')) {
|
|
274
|
+
// Skip non-file dirents (sockets/symlinks) and non-cache files
|
|
275
|
+
// (a stray README.txt under boards/, etc.). Either case is an
|
|
276
|
+
// un-cataloged on-disk artefact, not something `cache list`
|
|
277
|
+
// should fabricate an entry for.
|
|
278
|
+
continue;
|
|
279
|
+
}
|
|
280
|
+
let stats;
|
|
281
|
+
try {
|
|
282
|
+
stats = await stat(full);
|
|
283
|
+
}
|
|
284
|
+
catch (err) {
|
|
285
|
+
throw wrapFsError(err, `cannot stat cache file ${full}`, { path: full });
|
|
286
|
+
}
|
|
287
|
+
const relativePath = relative(root, full);
|
|
288
|
+
const { kind, id } = classifyEntry(relativePath);
|
|
289
|
+
const ageSeconds = Math.max(0, Math.floor((now.getTime() - stats.mtimeMs) / 1000));
|
|
290
|
+
out.push({
|
|
291
|
+
path: full,
|
|
292
|
+
relativePath,
|
|
293
|
+
sizeBytes: stats.size,
|
|
294
|
+
modifiedAt: new Date(stats.mtimeMs).toISOString(),
|
|
295
|
+
ageSeconds,
|
|
296
|
+
kind,
|
|
297
|
+
id,
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
/**
|
|
302
|
+
* Removes a single entry. Missing → no-op; reports zero removals so
|
|
303
|
+
* `cache clear --board <bid>` against an unknown board doesn't fail.
|
|
304
|
+
*/
|
|
305
|
+
export const clearEntry = async (root, key) => {
|
|
306
|
+
const fullPath = join(root, cacheKeyToRelativePath(key));
|
|
307
|
+
let stats;
|
|
308
|
+
try {
|
|
309
|
+
stats = await stat(fullPath);
|
|
310
|
+
}
|
|
311
|
+
catch (err) {
|
|
312
|
+
if (isENOENT(err)) {
|
|
313
|
+
return { removed: 0, bytesFreed: 0 };
|
|
314
|
+
}
|
|
315
|
+
throw wrapFsError(err, `cannot stat cache entry ${fullPath}`, {
|
|
316
|
+
path: fullPath,
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
try {
|
|
320
|
+
await unlink(fullPath);
|
|
321
|
+
}
|
|
322
|
+
catch (err) {
|
|
323
|
+
throw wrapFsError(err, `cannot remove cache entry ${fullPath}`, {
|
|
324
|
+
path: fullPath,
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
return { removed: 1, bytesFreed: stats.size };
|
|
328
|
+
};
|
|
329
|
+
/**
|
|
330
|
+
* Eager invalidation of a board's metadata cache entry per
|
|
331
|
+
* `cli-design.md` §8 eager-invalidation contract (M16). Thin wrapper
|
|
332
|
+
* over `clearEntry(root, { kind: 'board', boardId })` that owns the
|
|
333
|
+
* cache-root resolution so call sites — every M16 column-mutation
|
|
334
|
+
* verb plus the M15 retrofit cluster (`board update` / `archive` /
|
|
335
|
+
* `delete`) — read as `invalidateBoard(boardId)` rather than
|
|
336
|
+
* `clearEntry(resolveCacheRoot({env}), {kind:'board',boardId})`.
|
|
337
|
+
*
|
|
338
|
+
* **Idempotent.** Invalidating an already-absent entry is a no-op
|
|
339
|
+
* (matches `clearEntry`'s missing-file semantics) — callers don't
|
|
340
|
+
* need to gate the call on "is this board cached?". Errors during
|
|
341
|
+
* unlink (permission flip, disk loss) bubble as `CacheError` per the
|
|
342
|
+
* underlying primitive.
|
|
343
|
+
*
|
|
344
|
+
* **Process-local.** The on-disk cache file IS shared across
|
|
345
|
+
* processes (same `$XDG_CACHE_HOME/monday-cli/boards/<bid>.json`
|
|
346
|
+
* path), so this `unlink` does remove peer processes' cache entries;
|
|
347
|
+
* the missing primitive is inter-process locking. Cross-process
|
|
348
|
+
* coordination is explicitly deferred to v0.3 per cli-design §8 —
|
|
349
|
+
* this helper does NOT add inter-process locking.
|
|
350
|
+
*
|
|
351
|
+
* Mirrors `evictBoardMetadata` in `board-metadata.ts` (the M3-era
|
|
352
|
+
* helper that predates the eager-invalidation contract); the two
|
|
353
|
+
* helpers are intentionally parallel — `evictBoardMetadata` lives
|
|
354
|
+
* next to the metadata loader and is consumed by tests + potential
|
|
355
|
+
* future `cache clear --board <bid>` flows; `invalidateBoard` lives
|
|
356
|
+
* here next to the underlying `clearEntry` primitive and is consumed
|
|
357
|
+
* by every M16+ board-structure mutation per the §8 contract. Lifting
|
|
358
|
+
* one over the other was rejected during M16 pre-flight to keep the
|
|
359
|
+
* existing test surface unchanged.
|
|
360
|
+
*/
|
|
361
|
+
export const invalidateBoard = async (boardId,
|
|
362
|
+
/* c8 ignore next — defensive default; callers pass an explicit env. */
|
|
363
|
+
env = process.env) => {
|
|
364
|
+
const root = resolveCacheRoot({ env });
|
|
365
|
+
return clearEntry(root, { kind: 'board', boardId });
|
|
366
|
+
};
|
|
367
|
+
/**
|
|
368
|
+
* Removes the entire cache root. Used by `monday cache clear` (no
|
|
369
|
+
* flag) and tests. Counts removed JSON files for reporting; the
|
|
370
|
+
* directory tree itself goes too so a follow-up `cache list` reports
|
|
371
|
+
* an empty cache, not phantom directories.
|
|
372
|
+
*/
|
|
373
|
+
export const clearAll = async (root) => {
|
|
374
|
+
const entries = await listEntries(root);
|
|
375
|
+
if (entries.length === 0) {
|
|
376
|
+
// Nothing to remove; only delete the dir tree if it exists so the
|
|
377
|
+
// `cache list` output stays empty afterwards.
|
|
378
|
+
await rm(root, { recursive: true, force: true });
|
|
379
|
+
return { removed: 0, bytesFreed: 0 };
|
|
380
|
+
}
|
|
381
|
+
const bytesFreed = entries.reduce((sum, e) => sum + e.sizeBytes, 0);
|
|
382
|
+
try {
|
|
383
|
+
await rm(root, { recursive: true, force: true });
|
|
384
|
+
}
|
|
385
|
+
catch (err) {
|
|
386
|
+
throw wrapFsError(err, `cannot clear cache root ${root}`, { path: root });
|
|
387
|
+
}
|
|
388
|
+
return { removed: entries.length, bytesFreed };
|
|
389
|
+
};
|
|
390
|
+
export const stats = async (root, options = {}) => {
|
|
391
|
+
const entries = await listEntries(root, options);
|
|
392
|
+
if (entries.length === 0) {
|
|
393
|
+
// listEntries already threw on EACCES / etc.; reaching here means
|
|
394
|
+
// the root was either missing or present-and-empty. A quick stat
|
|
395
|
+
// distinguishes — any failure (race with `rm`, etc.) is treated
|
|
396
|
+
// as "doesn't exist" rather than re-wrapping into a CacheError.
|
|
397
|
+
const exists = await stat(root).then(() => true, () => false);
|
|
398
|
+
return {
|
|
399
|
+
root,
|
|
400
|
+
exists,
|
|
401
|
+
entries: 0,
|
|
402
|
+
bytes: 0,
|
|
403
|
+
oldestAgeSeconds: null,
|
|
404
|
+
newestAgeSeconds: null,
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
const ages = entries.map((e) => e.ageSeconds);
|
|
408
|
+
return {
|
|
409
|
+
root,
|
|
410
|
+
exists: true,
|
|
411
|
+
entries: entries.length,
|
|
412
|
+
bytes: entries.reduce((sum, e) => sum + e.sizeBytes, 0),
|
|
413
|
+
oldestAgeSeconds: Math.max(...ages),
|
|
414
|
+
newestAgeSeconds: Math.min(...ages),
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
const formatMode = (mode) => `0${(mode & 0o777).toString(8).padStart(3, '0')}`;
|
|
418
|
+
//# sourceMappingURL=cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../src/api/cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,WAAW,EAAc,MAAM,SAAS,CAAC;AAC/D,OAAO,EACL,KAAK,EACL,KAAK,EACL,IAAI,EACJ,OAAO,EACP,MAAM,EACN,EAAE,EACF,IAAI,EACJ,MAAM,EACN,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD;;;;;;;;;;;;;;;;;;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EAAkE;QAClE,iEAAiE;QACjE,gEAAgE;QAChE,gEAAgE;QAChE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAClC,GAAG,EAAE,CAAC,IAAI,EACV,GAAG,EAAE,CAAC,KAAK,CACZ,CAAC;QACF,OAAO;YACL,IAAI;YACJ,MAAM;YACN,OAAO,EAAE,CAAC;YACV,KAAK,EAAE,CAAC;YACR,gBAAgB,EAAE,IAAI;YACtB,gBAAgB,EAAE,IAAI;SACvB,CAAC;IACJ,CAAC;IACD,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IAC9C,OAAO;QACL,IAAI;QACJ,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,OAAO,CAAC,MAAM;QACvB,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;QACvD,gBAAgB,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;QACnC,gBAAgB,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;KACpC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,IAAY,EAAU,EAAE,CAC1C,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Monday GraphQL client over the injected `Transport`
|
|
3
|
+
* (`v0.1-plan.md` §3 M2).
|
|
4
|
+
*
|
|
5
|
+
* Why not the SDK's `ApiClient`. The plan's wording is
|
|
6
|
+
* "wraps `@mondaydotcomorg/api`'s `ApiClient`" but the SDK's
|
|
7
|
+
* `request()` doesn't accept an external `AbortSignal` — it builds
|
|
8
|
+
* its own controller per-call, which means the runner's SIGINT-ware
|
|
9
|
+
* abort can't cancel an in-flight request. Tests also need to swap
|
|
10
|
+
* the network stack without monkey-patching SDK internals (Codex
|
|
11
|
+
* review §2 of M0). Both problems are solved by the existing
|
|
12
|
+
* `Transport` interface, so the client routes every call through
|
|
13
|
+
* `transport.request()` and uses the SDK only for *types* — `Account`,
|
|
14
|
+
* `User`, `Complexity`, `Version`, `CURRENT_VERSION`.
|
|
15
|
+
*
|
|
16
|
+
* Header injection (`Authorization`, `API-Version`, `Content-Type`)
|
|
17
|
+
* lives in `FetchTransport` and is locked down (Codex review M0 §1
|
|
18
|
+
* follow-up). Caller-supplied headers can't override it; this client
|
|
19
|
+
* passes only operation-name and any future trace headers.
|
|
20
|
+
*
|
|
21
|
+
* Internal callers see `Record<string, unknown>` for variables. The
|
|
22
|
+
* SDK's `QueryVariables = Record<string, any>` boundary leak is
|
|
23
|
+
* contained at this module's edge — no `any` flows into `commands/*`.
|
|
24
|
+
*/
|
|
25
|
+
import { type RetryStats } from './retry.js';
|
|
26
|
+
import type { Transport } from './transport.js';
|
|
27
|
+
import type { Complexity } from '../utils/output/envelope.js';
|
|
28
|
+
/**
|
|
29
|
+
* The Monday API version pinned to the SDK install. Re-exported so
|
|
30
|
+
* the production runner and `monday account version` read the same
|
|
31
|
+
* source of truth — bumping the SDK is the only way this changes.
|
|
32
|
+
*/
|
|
33
|
+
export declare const PINNED_API_VERSION: string;
|
|
34
|
+
export interface MondayClientConfig {
|
|
35
|
+
readonly transport: Transport;
|
|
36
|
+
readonly signal: AbortSignal;
|
|
37
|
+
/**
|
|
38
|
+
* Maximum retries per request. Comes from `--retry` (default 3).
|
|
39
|
+
* Passed through to `withRetry`; the retry layer respects
|
|
40
|
+
* `error.retryable` + `retry_after_seconds`.
|
|
41
|
+
*/
|
|
42
|
+
readonly retries: number;
|
|
43
|
+
/**
|
|
44
|
+
* When true, every request injects the `complexity { ... }`
|
|
45
|
+
* selection at the outermost selection set and parses the result
|
|
46
|
+
* onto `Complexity`. Comes from `--verbose`.
|
|
47
|
+
*/
|
|
48
|
+
readonly verbose: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Test hooks — production wires these to defaults. Documented in
|
|
51
|
+
* `api/retry.ts` (`RetryOptions`).
|
|
52
|
+
*/
|
|
53
|
+
readonly retrySleep?: (ms: number, signal: AbortSignal) => Promise<void>;
|
|
54
|
+
readonly retryRandom?: () => number;
|
|
55
|
+
}
|
|
56
|
+
export interface MondayRequestOptions {
|
|
57
|
+
/**
|
|
58
|
+
* Marker passed to the transport for a friendlier `body.operationName`
|
|
59
|
+
* — Monday's logs surface this when triaging issues. Defaults to
|
|
60
|
+
* the typed-method's name (e.g. `"whoami"`).
|
|
61
|
+
*/
|
|
62
|
+
readonly operationName?: string;
|
|
63
|
+
}
|
|
64
|
+
export interface MondayResponse<T> {
|
|
65
|
+
readonly data: T;
|
|
66
|
+
/**
|
|
67
|
+
* Always present — null when the response carried no `complexity`
|
|
68
|
+
* block, an object otherwise. Matches `cli-design.md` §6.1's rule
|
|
69
|
+
* for `meta.complexity`.
|
|
70
|
+
*/
|
|
71
|
+
readonly complexity: Complexity | null;
|
|
72
|
+
/** How many transport calls happened (1 = first attempt succeeded). */
|
|
73
|
+
readonly stats: RetryStats;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Subset of Monday's `User` we surface on `monday account whoami` /
|
|
77
|
+
* `monday user me`. The SDK's full `User` type (~30 fields) is too
|
|
78
|
+
* wide — we project to the slim shape `cli-design.md` calls out.
|
|
79
|
+
*/
|
|
80
|
+
export interface WhoamiData {
|
|
81
|
+
/**
|
|
82
|
+
* `me` is nullable in the wire shape — Monday returns `null` when
|
|
83
|
+
* the token is valid syntactically but belongs to a guest /
|
|
84
|
+
* disabled user. Commands surface that case as `unauthorized`.
|
|
85
|
+
*/
|
|
86
|
+
readonly me: {
|
|
87
|
+
readonly id: string;
|
|
88
|
+
readonly name: string;
|
|
89
|
+
readonly email: string;
|
|
90
|
+
readonly account: {
|
|
91
|
+
readonly id: string;
|
|
92
|
+
readonly name: string;
|
|
93
|
+
readonly slug: string | null;
|
|
94
|
+
};
|
|
95
|
+
} | null;
|
|
96
|
+
}
|
|
97
|
+
export interface AccountData {
|
|
98
|
+
/**
|
|
99
|
+
* Same nullability story as `me` above — Monday won't typically
|
|
100
|
+
* return a null account for a valid token, but the wire field is
|
|
101
|
+
* `Maybe<Account>` and the CLI treats null as `not_found`.
|
|
102
|
+
*/
|
|
103
|
+
readonly account: {
|
|
104
|
+
readonly id: string;
|
|
105
|
+
readonly name: string;
|
|
106
|
+
readonly slug: string | null;
|
|
107
|
+
readonly country_code: string | null;
|
|
108
|
+
readonly first_day_of_the_week: string | null;
|
|
109
|
+
readonly active_members_count: number | null;
|
|
110
|
+
readonly logo: string | null;
|
|
111
|
+
readonly plan: {
|
|
112
|
+
readonly version: number;
|
|
113
|
+
readonly tier: string;
|
|
114
|
+
readonly max_users: number;
|
|
115
|
+
readonly period: string | null;
|
|
116
|
+
} | null;
|
|
117
|
+
} | null;
|
|
118
|
+
}
|
|
119
|
+
export interface VersionsData {
|
|
120
|
+
readonly versions: readonly {
|
|
121
|
+
readonly display_name: string;
|
|
122
|
+
readonly kind: string;
|
|
123
|
+
readonly value: string;
|
|
124
|
+
}[];
|
|
125
|
+
}
|
|
126
|
+
export interface ComplexityProbeData {
|
|
127
|
+
readonly complexity: {
|
|
128
|
+
readonly before: number;
|
|
129
|
+
readonly after: number;
|
|
130
|
+
readonly query: number;
|
|
131
|
+
readonly reset_in_x_seconds: number;
|
|
132
|
+
} | null;
|
|
133
|
+
}
|
|
134
|
+
export declare class MondayClient {
|
|
135
|
+
private readonly transport;
|
|
136
|
+
private readonly signal;
|
|
137
|
+
private readonly retries;
|
|
138
|
+
private readonly verbose;
|
|
139
|
+
private readonly retrySleep;
|
|
140
|
+
private readonly retryRandom;
|
|
141
|
+
constructor(config: MondayClientConfig);
|
|
142
|
+
/**
|
|
143
|
+
* Low-level escape hatch (`v0.1-plan.md` §3 M2 deliverable).
|
|
144
|
+
* `commands/raw` (M6) calls this directly; M2 commands use the
|
|
145
|
+
* typed wrappers. Returns the parsed `data` plus the per-request
|
|
146
|
+
* complexity meta and retry stats.
|
|
147
|
+
*
|
|
148
|
+
* Variables are typed `Record<string, unknown>` rather than the
|
|
149
|
+
* SDK's `any`-laced `QueryVariables` so the surface stays sealed.
|
|
150
|
+
*/
|
|
151
|
+
readonly raw: <T>(query: string, variables: Readonly<Record<string, unknown>> | undefined, options?: MondayRequestOptions) => Promise<MondayResponse<T>>;
|
|
152
|
+
readonly whoami: () => Promise<MondayResponse<WhoamiData>>;
|
|
153
|
+
readonly account: () => Promise<MondayResponse<AccountData>>;
|
|
154
|
+
readonly versions: () => Promise<MondayResponse<VersionsData>>;
|
|
155
|
+
/**
|
|
156
|
+
* Cheapest possible call: just selects the `complexity` field with
|
|
157
|
+
* no payload. Used by `monday account complexity` to probe the
|
|
158
|
+
* budget without any other side-effect.
|
|
159
|
+
*/
|
|
160
|
+
readonly complexityProbe: () => Promise<MondayResponse<ComplexityProbeData>>;
|
|
161
|
+
}
|
|
162
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH,OAAO,EAAa,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAExD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAA0C,CAAC;AAE5E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ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