@se-studio/contentful-cms 3.17.4 → 4.2.3
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 +38 -0
- package/README.md +15 -662
- package/pack/access/schema.d.ts +57 -0
- package/pack/access/schema.d.ts.map +1 -0
- package/pack/access/schema.js +96 -0
- package/pack/access/schema.js.map +1 -0
- package/pack/bin/cms-edit.js +29 -0
- package/pack/bin/cms-edit.js.map +1 -0
- package/pack/cli/pack-program.d.ts +8 -0
- package/pack/cli/pack-program.d.ts.map +1 -0
- package/pack/cli/pack-program.js +37 -0
- package/pack/cli/pack-program.js.map +1 -0
- package/{dist → pack}/commands/host-pack-publish.d.ts.map +1 -1
- package/{dist → pack}/commands/host-pack-publish.js +1 -5
- package/pack/commands/host-pack-publish.js.map +1 -0
- package/pack/commands/host.d.ts +4 -0
- package/{dist → pack}/commands/host.d.ts.map +1 -1
- package/pack/commands/host.js +10 -0
- package/pack/commands/host.js.map +1 -0
- package/{dist → pack}/editor-pack/capabilities.d.ts.map +1 -1
- package/{dist → pack}/editor-pack/capabilities.js +1 -3
- package/pack/editor-pack/capabilities.js.map +1 -0
- package/{dist → pack}/editor-pack/generate.d.ts +0 -6
- package/pack/editor-pack/generate.d.ts.map +1 -0
- package/{dist → pack}/editor-pack/generate.js +16 -1
- package/pack/editor-pack/generate.js.map +1 -0
- package/{dist → pack}/editor-pack/load.d.ts +2 -0
- package/pack/editor-pack/load.d.ts.map +1 -0
- package/{dist → pack}/editor-pack/load.js +10 -1
- package/pack/editor-pack/load.js.map +1 -0
- package/{dist → pack}/editor-pack/parse-constants.d.ts.map +1 -1
- package/{dist → pack}/editor-pack/parse-constants.js +0 -12
- package/pack/editor-pack/parse-constants.js.map +1 -0
- package/pack/generated/version.d.ts +3 -0
- package/{dist → pack}/generated/version.d.ts.map +1 -1
- package/{dist → pack}/generated/version.js +1 -1
- package/{dist → pack}/generated/version.js.map +1 -1
- package/{dist → pack}/output/mode.d.ts.map +1 -1
- package/pack/output/mode.js +8 -0
- package/pack/output/mode.js.map +1 -0
- package/pack/pack-public.d.ts +3 -0
- package/pack/pack-public.d.ts.map +1 -0
- package/pack/pack-public.js +3 -0
- package/pack/pack-public.js.map +1 -0
- package/{dist → pack}/project/doctor.js +1 -1
- package/{dist → pack}/project/doctor.js.map +1 -1
- package/{dist → pack}/project/types.d.ts.map +1 -1
- package/{dist → pack}/project/types.js +0 -7
- package/pack/project/types.js.map +1 -0
- package/{dist → pack}/project/validate-staged-upload-route.d.ts.map +1 -1
- package/{dist → pack}/project/validate-staged-upload-route.js +1 -3
- package/{dist → pack}/project/validate-staged-upload-route.js.map +1 -1
- package/{dist → pack}/publish/classify.d.ts +7 -0
- package/{dist → pack}/publish/classify.d.ts.map +1 -1
- package/{dist → pack}/publish/classify.js +21 -0
- package/{dist → pack}/publish/classify.js.map +1 -1
- package/package.json +24 -55
- package/HOSTED.md +0 -221
- package/INSTALL.md +0 -29
- package/dist/audit/asset-usage.d.ts +0 -29
- package/dist/audit/asset-usage.d.ts.map +0 -1
- package/dist/audit/asset-usage.js +0 -100
- package/dist/audit/asset-usage.js.map +0 -1
- package/dist/audit/media-review-rules.d.ts +0 -33
- package/dist/audit/media-review-rules.d.ts.map +0 -1
- package/dist/audit/media-review-rules.js +0 -120
- package/dist/audit/media-review-rules.js.map +0 -1
- package/dist/audit/media-review.d.ts +0 -45
- package/dist/audit/media-review.d.ts.map +0 -1
- package/dist/audit/media-review.js +0 -69
- package/dist/audit/media-review.js.map +0 -1
- package/dist/bin/cms-edit.js +0 -51
- package/dist/bin/cms-edit.js.map +0 -1
- package/dist/cli/hosted-inline-limit.d.ts +0 -4
- package/dist/cli/hosted-inline-limit.d.ts.map +0 -1
- package/dist/cli/hosted-inline-limit.js +0 -15
- package/dist/cli/hosted-inline-limit.js.map +0 -1
- package/dist/cli/local-cli-allowed.d.ts +0 -6
- package/dist/cli/local-cli-allowed.d.ts.map +0 -1
- package/dist/cli/local-cli-allowed.js +0 -29
- package/dist/cli/local-cli-allowed.js.map +0 -1
- package/dist/cli/parse-boolean.d.ts +0 -3
- package/dist/cli/parse-boolean.d.ts.map +0 -1
- package/dist/cli/parse-boolean.js +0 -9
- package/dist/cli/parse-boolean.js.map +0 -1
- package/dist/cli/program.d.ts +0 -9
- package/dist/cli/program.d.ts.map +0 -1
- package/dist/cli/program.js +0 -164
- package/dist/cli/program.js.map +0 -1
- package/dist/cli/read-json-input.d.ts +0 -42
- package/dist/cli/read-json-input.d.ts.map +0 -1
- package/dist/cli/read-json-input.js +0 -153
- package/dist/cli/read-json-input.js.map +0 -1
- package/dist/cli/runner.d.ts +0 -19
- package/dist/cli/runner.d.ts.map +0 -1
- package/dist/cli/runner.js +0 -139
- package/dist/cli/runner.js.map +0 -1
- package/dist/commands/add-initial-fields.d.ts +0 -34
- package/dist/commands/add-initial-fields.d.ts.map +0 -1
- package/dist/commands/add-initial-fields.js +0 -50
- package/dist/commands/add-initial-fields.js.map +0 -1
- package/dist/commands/add-target-field.d.ts +0 -15
- package/dist/commands/add-target-field.d.ts.map +0 -1
- package/dist/commands/add-target-field.js +0 -48
- package/dist/commands/add-target-field.js.map +0 -1
- package/dist/commands/add.d.ts +0 -4
- package/dist/commands/add.d.ts.map +0 -1
- package/dist/commands/add.js +0 -278
- package/dist/commands/add.js.map +0 -1
- package/dist/commands/apply-from-json.d.ts +0 -4
- package/dist/commands/apply-from-json.d.ts.map +0 -1
- package/dist/commands/apply-from-json.js +0 -206
- package/dist/commands/apply-from-json.js.map +0 -1
- package/dist/commands/article-tags-from-json.d.ts +0 -4
- package/dist/commands/article-tags-from-json.d.ts.map +0 -1
- package/dist/commands/article-tags-from-json.js +0 -64
- package/dist/commands/article-tags-from-json.js.map +0 -1
- package/dist/commands/asset.d.ts +0 -4
- package/dist/commands/asset.d.ts.map +0 -1
- package/dist/commands/asset.js +0 -1010
- package/dist/commands/asset.js.map +0 -1
- package/dist/commands/assignment-value.d.ts +0 -6
- package/dist/commands/assignment-value.d.ts.map +0 -1
- package/dist/commands/assignment-value.js +0 -13
- package/dist/commands/assignment-value.js.map +0 -1
- package/dist/commands/batch-assignments.d.ts +0 -16
- package/dist/commands/batch-assignments.d.ts.map +0 -1
- package/dist/commands/batch-assignments.js +0 -62
- package/dist/commands/batch-assignments.js.map +0 -1
- package/dist/commands/batch.d.ts +0 -5
- package/dist/commands/batch.d.ts.map +0 -1
- package/dist/commands/batch.js +0 -265
- package/dist/commands/batch.js.map +0 -1
- package/dist/commands/bulk-rtf-replace.d.ts +0 -4
- package/dist/commands/bulk-rtf-replace.d.ts.map +0 -1
- package/dist/commands/bulk-rtf-replace.js +0 -103
- package/dist/commands/bulk-rtf-replace.js.map +0 -1
- package/dist/commands/create-editor.d.ts +0 -4
- package/dist/commands/create-editor.d.ts.map +0 -1
- package/dist/commands/create-editor.js +0 -411
- package/dist/commands/create-editor.js.map +0 -1
- package/dist/commands/create-from-json.d.ts +0 -26
- package/dist/commands/create-from-json.d.ts.map +0 -1
- package/dist/commands/create-from-json.js +0 -704
- package/dist/commands/create-from-json.js.map +0 -1
- package/dist/commands/create-person-from-json.d.ts +0 -4
- package/dist/commands/create-person-from-json.d.ts.map +0 -1
- package/dist/commands/create-person-from-json.js +0 -95
- package/dist/commands/create-person-from-json.js.map +0 -1
- package/dist/commands/create-person.d.ts +0 -4
- package/dist/commands/create-person.d.ts.map +0 -1
- package/dist/commands/create-person.js +0 -100
- package/dist/commands/create-person.js.map +0 -1
- package/dist/commands/create-taxonomy-from-json.d.ts +0 -4
- package/dist/commands/create-taxonomy-from-json.d.ts.map +0 -1
- package/dist/commands/create-taxonomy-from-json.js +0 -105
- package/dist/commands/create-taxonomy-from-json.js.map +0 -1
- package/dist/commands/create-taxonomy.d.ts +0 -52
- package/dist/commands/create-taxonomy.d.ts.map +0 -1
- package/dist/commands/create-taxonomy.js +0 -329
- package/dist/commands/create-taxonomy.js.map +0 -1
- package/dist/commands/create.d.ts +0 -4
- package/dist/commands/create.d.ts.map +0 -1
- package/dist/commands/create.js +0 -454
- package/dist/commands/create.js.map +0 -1
- package/dist/commands/customer.d.ts +0 -4
- package/dist/commands/customer.d.ts.map +0 -1
- package/dist/commands/customer.js +0 -56
- package/dist/commands/customer.js.map +0 -1
- package/dist/commands/diagnose.d.ts +0 -29
- package/dist/commands/diagnose.d.ts.map +0 -1
- package/dist/commands/diagnose.js +0 -116
- package/dist/commands/diagnose.js.map +0 -1
- package/dist/commands/diff.d.ts +0 -4
- package/dist/commands/diff.d.ts.map +0 -1
- package/dist/commands/diff.js +0 -33
- package/dist/commands/diff.js.map +0 -1
- package/dist/commands/discard.d.ts +0 -7
- package/dist/commands/discard.d.ts.map +0 -1
- package/dist/commands/discard.js +0 -77
- package/dist/commands/discard.js.map +0 -1
- package/dist/commands/entry-lookup-target.d.ts +0 -163
- package/dist/commands/entry-lookup-target.d.ts.map +0 -1
- package/dist/commands/entry-lookup-target.js +0 -305
- package/dist/commands/entry-lookup-target.js.map +0 -1
- package/dist/commands/entry-search.d.ts +0 -4
- package/dist/commands/entry-search.d.ts.map +0 -1
- package/dist/commands/entry-search.js +0 -92
- package/dist/commands/entry-search.js.map +0 -1
- package/dist/commands/export-from-json.d.ts +0 -4
- package/dist/commands/export-from-json.d.ts.map +0 -1
- package/dist/commands/export-from-json.js +0 -28
- package/dist/commands/export-from-json.js.map +0 -1
- package/dist/commands/guide.d.ts +0 -4
- package/dist/commands/guide.d.ts.map +0 -1
- package/dist/commands/guide.js +0 -18
- package/dist/commands/guide.js.map +0 -1
- package/dist/commands/health.d.ts +0 -4
- package/dist/commands/health.d.ts.map +0 -1
- package/dist/commands/health.js +0 -179
- package/dist/commands/health.js.map +0 -1
- package/dist/commands/help.d.ts +0 -4
- package/dist/commands/help.d.ts.map +0 -1
- package/dist/commands/help.js +0 -35
- package/dist/commands/help.js.map +0 -1
- package/dist/commands/host-pack-publish.js.map +0 -1
- package/dist/commands/host-scaffold.d.ts +0 -5
- package/dist/commands/host-scaffold.d.ts.map +0 -1
- package/dist/commands/host-scaffold.js +0 -120
- package/dist/commands/host-scaffold.js.map +0 -1
- package/dist/commands/host-stage.d.ts +0 -4
- package/dist/commands/host-stage.d.ts.map +0 -1
- package/dist/commands/host-stage.js +0 -60
- package/dist/commands/host-stage.js.map +0 -1
- package/dist/commands/host.d.ts +0 -3
- package/dist/commands/host.js +0 -11
- package/dist/commands/host.js.map +0 -1
- package/dist/commands/index-dump.d.ts +0 -15
- package/dist/commands/index-dump.d.ts.map +0 -1
- package/dist/commands/index-dump.js +0 -207
- package/dist/commands/index-dump.js.map +0 -1
- package/dist/commands/index.d.ts +0 -4
- package/dist/commands/index.d.ts.map +0 -1
- package/dist/commands/index.js +0 -107
- package/dist/commands/index.js.map +0 -1
- package/dist/commands/link-move.d.ts +0 -14
- package/dist/commands/link-move.d.ts.map +0 -1
- package/dist/commands/link-move.js +0 -29
- package/dist/commands/link-move.js.map +0 -1
- package/dist/commands/links.d.ts +0 -4
- package/dist/commands/links.d.ts.map +0 -1
- package/dist/commands/links.js +0 -362
- package/dist/commands/links.js.map +0 -1
- package/dist/commands/list.d.ts +0 -4
- package/dist/commands/list.d.ts.map +0 -1
- package/dist/commands/list.js +0 -291
- package/dist/commands/list.js.map +0 -1
- package/dist/commands/media.d.ts +0 -4
- package/dist/commands/media.d.ts.map +0 -1
- package/dist/commands/media.js +0 -148
- package/dist/commands/media.js.map +0 -1
- package/dist/commands/move.d.ts +0 -3
- package/dist/commands/move.d.ts.map +0 -1
- package/dist/commands/move.js +0 -86
- package/dist/commands/move.js.map +0 -1
- package/dist/commands/multiset-assignments.d.ts +0 -16
- package/dist/commands/multiset-assignments.d.ts.map +0 -1
- package/dist/commands/multiset-assignments.js +0 -25
- package/dist/commands/multiset-assignments.js.map +0 -1
- package/dist/commands/nav.d.ts +0 -4
- package/dist/commands/nav.d.ts.map +0 -1
- package/dist/commands/nav.js +0 -347
- package/dist/commands/nav.js.map +0 -1
- package/dist/commands/open.d.ts +0 -4
- package/dist/commands/open.d.ts.map +0 -1
- package/dist/commands/open.js +0 -130
- package/dist/commands/open.js.map +0 -1
- package/dist/commands/patterns.d.ts +0 -4
- package/dist/commands/patterns.d.ts.map +0 -1
- package/dist/commands/patterns.js +0 -107
- package/dist/commands/patterns.js.map +0 -1
- package/dist/commands/peek.d.ts +0 -4
- package/dist/commands/peek.d.ts.map +0 -1
- package/dist/commands/peek.js +0 -106
- package/dist/commands/peek.js.map +0 -1
- package/dist/commands/preview.d.ts +0 -4
- package/dist/commands/preview.d.ts.map +0 -1
- package/dist/commands/preview.js +0 -258
- package/dist/commands/preview.js.map +0 -1
- package/dist/commands/read.d.ts +0 -4
- package/dist/commands/read.d.ts.map +0 -1
- package/dist/commands/read.js +0 -62
- package/dist/commands/read.js.map +0 -1
- package/dist/commands/release.d.ts +0 -4
- package/dist/commands/release.d.ts.map +0 -1
- package/dist/commands/release.js +0 -484
- package/dist/commands/release.js.map +0 -1
- package/dist/commands/remove.d.ts +0 -4
- package/dist/commands/remove.d.ts.map +0 -1
- package/dist/commands/remove.js +0 -105
- package/dist/commands/remove.js.map +0 -1
- package/dist/commands/resolve.d.ts +0 -4
- package/dist/commands/resolve.d.ts.map +0 -1
- package/dist/commands/resolve.js +0 -156
- package/dist/commands/resolve.js.map +0 -1
- package/dist/commands/rtf.d.ts +0 -4
- package/dist/commands/rtf.d.ts.map +0 -1
- package/dist/commands/rtf.js +0 -635
- package/dist/commands/rtf.js.map +0 -1
- package/dist/commands/run.d.ts +0 -4
- package/dist/commands/run.d.ts.map +0 -1
- package/dist/commands/run.js +0 -547
- package/dist/commands/run.js.map +0 -1
- package/dist/commands/save-pending.d.ts +0 -3
- package/dist/commands/save-pending.d.ts.map +0 -1
- package/dist/commands/save-pending.js +0 -5
- package/dist/commands/save-pending.js.map +0 -1
- package/dist/commands/save.d.ts +0 -4
- package/dist/commands/save.d.ts.map +0 -1
- package/dist/commands/save.js +0 -70
- package/dist/commands/save.js.map +0 -1
- package/dist/commands/schema.d.ts +0 -4
- package/dist/commands/schema.d.ts.map +0 -1
- package/dist/commands/schema.js +0 -301
- package/dist/commands/schema.js.map +0 -1
- package/dist/commands/session-diff.d.ts +0 -14
- package/dist/commands/session-diff.d.ts.map +0 -1
- package/dist/commands/session-diff.js +0 -252
- package/dist/commands/session-diff.js.map +0 -1
- package/dist/commands/set.d.ts +0 -4
- package/dist/commands/set.d.ts.map +0 -1
- package/dist/commands/set.js +0 -808
- package/dist/commands/set.js.map +0 -1
- package/dist/commands/snapshot.d.ts +0 -3
- package/dist/commands/snapshot.d.ts.map +0 -1
- package/dist/commands/snapshot.js +0 -31
- package/dist/commands/snapshot.js.map +0 -1
- package/dist/commands/staged-upload.d.ts +0 -4
- package/dist/commands/staged-upload.d.ts.map +0 -1
- package/dist/commands/staged-upload.js +0 -56
- package/dist/commands/staged-upload.js.map +0 -1
- package/dist/config/data-root.d.ts +0 -6
- package/dist/config/data-root.d.ts.map +0 -1
- package/dist/config/data-root.js +0 -21
- package/dist/config/data-root.js.map +0 -1
- package/dist/config/hosted.d.ts +0 -50
- package/dist/config/hosted.d.ts.map +0 -1
- package/dist/config/hosted.js +0 -167
- package/dist/config/hosted.js.map +0 -1
- package/dist/config/load.d.ts +0 -27
- package/dist/config/load.d.ts.map +0 -1
- package/dist/config/load.js +0 -139
- package/dist/config/load.js.map +0 -1
- package/dist/config/types.d.ts +0 -42
- package/dist/config/types.d.ts.map +0 -1
- package/dist/config/types.js +0 -2
- package/dist/config/types.js.map +0 -1
- package/dist/contentful/article-tags-from-json.d.ts +0 -25
- package/dist/contentful/article-tags-from-json.d.ts.map +0 -1
- package/dist/contentful/article-tags-from-json.js +0 -122
- package/dist/contentful/article-tags-from-json.js.map +0 -1
- package/dist/contentful/article-type-resolve.d.ts +0 -11
- package/dist/contentful/article-type-resolve.d.ts.map +0 -1
- package/dist/contentful/article-type-resolve.js +0 -35
- package/dist/contentful/article-type-resolve.js.map +0 -1
- package/dist/contentful/asset-concepts.d.ts +0 -53
- package/dist/contentful/asset-concepts.d.ts.map +0 -1
- package/dist/contentful/asset-concepts.js +0 -137
- package/dist/contentful/asset-concepts.js.map +0 -1
- package/dist/contentful/asset-link-from-json.d.ts +0 -17
- package/dist/contentful/asset-link-from-json.d.ts.map +0 -1
- package/dist/contentful/asset-link-from-json.js +0 -41
- package/dist/contentful/asset-link-from-json.js.map +0 -1
- package/dist/contentful/asset-replace.d.ts +0 -29
- package/dist/contentful/asset-replace.d.ts.map +0 -1
- package/dist/contentful/asset-replace.js +0 -57
- package/dist/contentful/asset-replace.js.map +0 -1
- package/dist/contentful/assets.d.ts +0 -69
- package/dist/contentful/assets.d.ts.map +0 -1
- package/dist/contentful/assets.js +0 -224
- package/dist/contentful/assets.js.map +0 -1
- package/dist/contentful/bulk-rtf-replace.d.ts +0 -29
- package/dist/contentful/bulk-rtf-replace.d.ts.map +0 -1
- package/dist/contentful/bulk-rtf-replace.js +0 -120
- package/dist/contentful/bulk-rtf-replace.js.map +0 -1
- package/dist/contentful/cda-page.d.ts +0 -27
- package/dist/contentful/cda-page.d.ts.map +0 -1
- package/dist/contentful/cda-page.js +0 -111
- package/dist/contentful/cda-page.js.map +0 -1
- package/dist/contentful/cda-sync.d.ts +0 -45
- package/dist/contentful/cda-sync.d.ts.map +0 -1
- package/dist/contentful/cda-sync.js +0 -392
- package/dist/contentful/cda-sync.js.map +0 -1
- package/dist/contentful/client.d.ts +0 -65
- package/dist/contentful/client.d.ts.map +0 -1
- package/dist/contentful/client.js +0 -105
- package/dist/contentful/client.js.map +0 -1
- package/dist/contentful/cma-user-agent.d.ts +0 -10
- package/dist/contentful/cma-user-agent.d.ts.map +0 -1
- package/dist/contentful/cma-user-agent.js +0 -20
- package/dist/contentful/cma-user-agent.js.map +0 -1
- package/dist/contentful/content-type-disk-cache.d.ts +0 -7
- package/dist/contentful/content-type-disk-cache.d.ts.map +0 -1
- package/dist/contentful/content-type-disk-cache.js +0 -42
- package/dist/contentful/content-type-disk-cache.js.map +0 -1
- package/dist/contentful/create-from-json-types.d.ts +0 -56
- package/dist/contentful/create-from-json-types.d.ts.map +0 -1
- package/dist/contentful/create-from-json-types.js +0 -24
- package/dist/contentful/create-from-json-types.js.map +0 -1
- package/dist/contentful/delivery-token.d.ts +0 -17
- package/dist/contentful/delivery-token.d.ts.map +0 -1
- package/dist/contentful/delivery-token.js +0 -104
- package/dist/contentful/delivery-token.js.map +0 -1
- package/dist/contentful/editor-create.d.ts +0 -92
- package/dist/contentful/editor-create.d.ts.map +0 -1
- package/dist/contentful/editor-create.js +0 -194
- package/dist/contentful/editor-create.js.map +0 -1
- package/dist/contentful/entry-fields.d.ts +0 -92
- package/dist/contentful/entry-fields.d.ts.map +0 -1
- package/dist/contentful/entry-fields.js +0 -519
- package/dist/contentful/entry-fields.js.map +0 -1
- package/dist/contentful/entry-lookup.d.ts +0 -16
- package/dist/contentful/entry-lookup.d.ts.map +0 -1
- package/dist/contentful/entry-lookup.js +0 -290
- package/dist/contentful/entry-lookup.js.map +0 -1
- package/dist/contentful/featured-image-defaults.d.ts +0 -16
- package/dist/contentful/featured-image-defaults.d.ts.map +0 -1
- package/dist/contentful/featured-image-defaults.js +0 -118
- package/dist/contentful/featured-image-defaults.js.map +0 -1
- package/dist/contentful/fetch.d.ts +0 -31
- package/dist/contentful/fetch.d.ts.map +0 -1
- package/dist/contentful/fetch.js +0 -122
- package/dist/contentful/fetch.js.map +0 -1
- package/dist/contentful/field-metadata.d.ts +0 -8
- package/dist/contentful/field-metadata.d.ts.map +0 -1
- package/dist/contentful/field-metadata.js +0 -12
- package/dist/contentful/field-metadata.js.map +0 -1
- package/dist/contentful/field-value-from-json.d.ts +0 -30
- package/dist/contentful/field-value-from-json.d.ts.map +0 -1
- package/dist/contentful/field-value-from-json.js +0 -266
- package/dist/contentful/field-value-from-json.js.map +0 -1
- package/dist/contentful/hosted-asset-upload.d.ts +0 -4
- package/dist/contentful/hosted-asset-upload.d.ts.map +0 -1
- package/dist/contentful/hosted-asset-upload.js +0 -9
- package/dist/contentful/hosted-asset-upload.js.map +0 -1
- package/dist/contentful/link-fields.d.ts +0 -25
- package/dist/contentful/link-fields.d.ts.map +0 -1
- package/dist/contentful/link-fields.js +0 -71
- package/dist/contentful/link-fields.js.map +0 -1
- package/dist/contentful/linkedEntryFields.d.ts +0 -46
- package/dist/contentful/linkedEntryFields.d.ts.map +0 -1
- package/dist/contentful/linkedEntryFields.js +0 -152
- package/dist/contentful/linkedEntryFields.js.map +0 -1
- package/dist/contentful/list-entry-format.d.ts +0 -18
- package/dist/contentful/list-entry-format.d.ts.map +0 -1
- package/dist/contentful/list-entry-format.js +0 -45
- package/dist/contentful/list-entry-format.js.map +0 -1
- package/dist/contentful/locale-value.d.ts +0 -13
- package/dist/contentful/locale-value.d.ts.map +0 -1
- package/dist/contentful/locale-value.js +0 -36
- package/dist/contentful/locale-value.js.map +0 -1
- package/dist/contentful/media-dimensions.d.ts +0 -7
- package/dist/contentful/media-dimensions.d.ts.map +0 -1
- package/dist/contentful/media-dimensions.js +0 -169
- package/dist/contentful/media-dimensions.js.map +0 -1
- package/dist/contentful/media.d.ts +0 -27
- package/dist/contentful/media.d.ts.map +0 -1
- package/dist/contentful/media.js +0 -83
- package/dist/contentful/media.js.map +0 -1
- package/dist/contentful/object-path.d.ts +0 -21
- package/dist/contentful/object-path.d.ts.map +0 -1
- package/dist/contentful/object-path.js +0 -101
- package/dist/contentful/object-path.js.map +0 -1
- package/dist/contentful/person-create.d.ts +0 -36
- package/dist/contentful/person-create.d.ts.map +0 -1
- package/dist/contentful/person-create.js +0 -109
- package/dist/contentful/person-create.js.map +0 -1
- package/dist/contentful/person-type-resolve.d.ts +0 -8
- package/dist/contentful/person-type-resolve.d.ts.map +0 -1
- package/dist/contentful/person-type-resolve.js +0 -20
- package/dist/contentful/person-type-resolve.js.map +0 -1
- package/dist/contentful/pipeline-encode-gate.d.ts +0 -27
- package/dist/contentful/pipeline-encode-gate.d.ts.map +0 -1
- package/dist/contentful/pipeline-encode-gate.js +0 -102
- package/dist/contentful/pipeline-encode-gate.js.map +0 -1
- package/dist/contentful/reference-record.d.ts +0 -45
- package/dist/contentful/reference-record.d.ts.map +0 -1
- package/dist/contentful/reference-record.js +0 -114
- package/dist/contentful/reference-record.js.map +0 -1
- package/dist/contentful/references.d.ts +0 -7
- package/dist/contentful/references.d.ts.map +0 -1
- package/dist/contentful/references.js +0 -12
- package/dist/contentful/references.js.map +0 -1
- package/dist/contentful/regex.d.ts +0 -14
- package/dist/contentful/regex.d.ts.map +0 -1
- package/dist/contentful/regex.js +0 -38
- package/dist/contentful/regex.js.map +0 -1
- package/dist/contentful/required-fields.d.ts +0 -19
- package/dist/contentful/required-fields.d.ts.map +0 -1
- package/dist/contentful/required-fields.js +0 -70
- package/dist/contentful/required-fields.js.map +0 -1
- package/dist/contentful/resolve-content-type.d.ts +0 -9
- package/dist/contentful/resolve-content-type.d.ts.map +0 -1
- package/dist/contentful/resolve-content-type.js +0 -38
- package/dist/contentful/resolve-content-type.js.map +0 -1
- package/dist/contentful/scalar-value.d.ts +0 -23
- package/dist/contentful/scalar-value.d.ts.map +0 -1
- package/dist/contentful/scalar-value.js +0 -111
- package/dist/contentful/scalar-value.js.map +0 -1
- package/dist/contentful/session-to-from-json.d.ts +0 -7
- package/dist/contentful/session-to-from-json.d.ts.map +0 -1
- package/dist/contentful/session-to-from-json.js +0 -181
- package/dist/contentful/session-to-from-json.js.map +0 -1
- package/dist/contentful/set-field-schema.d.ts +0 -43
- package/dist/contentful/set-field-schema.d.ts.map +0 -1
- package/dist/contentful/set-field-schema.js +0 -157
- package/dist/contentful/set-field-schema.js.map +0 -1
- package/dist/contentful/slug-validation.d.ts +0 -7
- package/dist/contentful/slug-validation.d.ts.map +0 -1
- package/dist/contentful/slug-validation.js +0 -15
- package/dist/contentful/slug-validation.js.map +0 -1
- package/dist/contentful/upload-fetch.d.ts +0 -11
- package/dist/contentful/upload-fetch.d.ts.map +0 -1
- package/dist/contentful/upload-fetch.js +0 -26
- package/dist/contentful/upload-fetch.js.map +0 -1
- package/dist/contentful/upload-limits.d.ts +0 -13
- package/dist/contentful/upload-limits.d.ts.map +0 -1
- package/dist/contentful/upload-limits.js +0 -20
- package/dist/contentful/upload-limits.js.map +0 -1
- package/dist/contentful/validate-from-json.d.ts +0 -12
- package/dist/contentful/validate-from-json.d.ts.map +0 -1
- package/dist/contentful/validate-from-json.js +0 -106
- package/dist/contentful/validate-from-json.js.map +0 -1
- package/dist/contentful/write.d.ts +0 -25
- package/dist/contentful/write.d.ts.map +0 -1
- package/dist/contentful/write.js +0 -137
- package/dist/contentful/write.js.map +0 -1
- package/dist/diff/long-text.d.ts +0 -24
- package/dist/diff/long-text.d.ts.map +0 -1
- package/dist/diff/long-text.js +0 -65
- package/dist/diff/long-text.js.map +0 -1
- package/dist/editor-pack/capabilities.js.map +0 -1
- package/dist/editor-pack/generate.d.ts.map +0 -1
- package/dist/editor-pack/generate.js.map +0 -1
- package/dist/editor-pack/load.d.ts.map +0 -1
- package/dist/editor-pack/load.js.map +0 -1
- package/dist/editor-pack/parse-constants.js.map +0 -1
- package/dist/generated/help-topics.d.ts +0 -3
- package/dist/generated/help-topics.d.ts.map +0 -1
- package/dist/generated/help-topics.js +0 -4
- package/dist/generated/help-topics.js.map +0 -1
- package/dist/generated/hosted-guide.d.ts +0 -2
- package/dist/generated/hosted-guide.d.ts.map +0 -1
- package/dist/generated/hosted-guide.js +0 -3
- package/dist/generated/hosted-guide.js.map +0 -1
- package/dist/generated/version.d.ts +0 -3
- package/dist/hosted/customer-playbooks.d.ts +0 -23
- package/dist/hosted/customer-playbooks.d.ts.map +0 -1
- package/dist/hosted/customer-playbooks.js +0 -69
- package/dist/hosted/customer-playbooks.js.map +0 -1
- package/dist/hosted/index.d.ts +0 -32
- package/dist/hosted/index.d.ts.map +0 -1
- package/dist/hosted/index.js +0 -31
- package/dist/hosted/index.js.map +0 -1
- package/dist/hosted/next/HostedPageShell.d.ts +0 -18
- package/dist/hosted/next/HostedPageShell.d.ts.map +0 -1
- package/dist/hosted/next/HostedPageShell.js +0 -12
- package/dist/hosted/next/HostedPageShell.js.map +0 -1
- package/dist/hosted/next/claude-connect.d.ts +0 -8
- package/dist/hosted/next/claude-connect.d.ts.map +0 -1
- package/dist/hosted/next/claude-connect.js +0 -23
- package/dist/hosted/next/claude-connect.js.map +0 -1
- package/dist/hosted/next/context.d.ts +0 -8
- package/dist/hosted/next/context.d.ts.map +0 -1
- package/dist/hosted/next/context.js +0 -27
- package/dist/hosted/next/context.js.map +0 -1
- package/dist/hosted/next/editor-pack-path.d.ts +0 -6
- package/dist/hosted/next/editor-pack-path.d.ts.map +0 -1
- package/dist/hosted/next/editor-pack-path.js +0 -22
- package/dist/hosted/next/editor-pack-path.js.map +0 -1
- package/dist/hosted/next/page-context.d.ts +0 -32
- package/dist/hosted/next/page-context.d.ts.map +0 -1
- package/dist/hosted/next/page-context.js +0 -103
- package/dist/hosted/next/page-context.js.map +0 -1
- package/dist/hosted/next/page-styles.d.ts +0 -30
- package/dist/hosted/next/page-styles.d.ts.map +0 -1
- package/dist/hosted/next/page-styles.js +0 -156
- package/dist/hosted/next/page-styles.js.map +0 -1
- package/dist/hosted/next/pages/CmsEditPage.d.ts +0 -3
- package/dist/hosted/next/pages/CmsEditPage.d.ts.map +0 -1
- package/dist/hosted/next/pages/CmsEditPage.js +0 -16
- package/dist/hosted/next/pages/CmsEditPage.js.map +0 -1
- package/dist/hosted/next/pages/ContentfulCallbackPage.d.ts +0 -2
- package/dist/hosted/next/pages/ContentfulCallbackPage.d.ts.map +0 -1
- package/dist/hosted/next/pages/ContentfulCallbackPage.js +0 -47
- package/dist/hosted/next/pages/ContentfulCallbackPage.js.map +0 -1
- package/dist/hosted/next/pages/CustomerPlaybookPage.d.ts +0 -10
- package/dist/hosted/next/pages/CustomerPlaybookPage.d.ts.map +0 -1
- package/dist/hosted/next/pages/CustomerPlaybookPage.js +0 -20
- package/dist/hosted/next/pages/CustomerPlaybookPage.js.map +0 -1
- package/dist/hosted/next/pages/CustomerPlaybooksPage.d.ts +0 -3
- package/dist/hosted/next/pages/CustomerPlaybooksPage.d.ts.map +0 -1
- package/dist/hosted/next/pages/CustomerPlaybooksPage.js +0 -31
- package/dist/hosted/next/pages/CustomerPlaybooksPage.js.map +0 -1
- package/dist/hosted/next/pages/HomePage.d.ts +0 -3
- package/dist/hosted/next/pages/HomePage.d.ts.map +0 -1
- package/dist/hosted/next/pages/HomePage.js +0 -25
- package/dist/hosted/next/pages/HomePage.js.map +0 -1
- package/dist/hosted/next/proxy.d.ts +0 -16
- package/dist/hosted/next/proxy.d.ts.map +0 -1
- package/dist/hosted/next/proxy.js +0 -22
- package/dist/hosted/next/proxy.js.map +0 -1
- package/dist/hosted/next/redis.d.ts +0 -5
- package/dist/hosted/next/redis.d.ts.map +0 -1
- package/dist/hosted/next/redis.js +0 -49
- package/dist/hosted/next/redis.js.map +0 -1
- package/dist/hosted/next/request-origin.d.ts +0 -3
- package/dist/hosted/next/request-origin.d.ts.map +0 -1
- package/dist/hosted/next/request-origin.js +0 -12
- package/dist/hosted/next/request-origin.js.map +0 -1
- package/dist/hosted/next/routes/connect.d.ts +0 -2
- package/dist/hosted/next/routes/connect.d.ts.map +0 -1
- package/dist/hosted/next/routes/connect.js +0 -9
- package/dist/hosted/next/routes/connect.js.map +0 -1
- package/dist/hosted/next/routes/customer-index.d.ts +0 -2
- package/dist/hosted/next/routes/customer-index.d.ts.map +0 -1
- package/dist/hosted/next/routes/customer-index.js +0 -29
- package/dist/hosted/next/routes/customer-index.js.map +0 -1
- package/dist/hosted/next/routes/customer-resource.d.ts +0 -8
- package/dist/hosted/next/routes/customer-resource.d.ts.map +0 -1
- package/dist/hosted/next/routes/customer-resource.js +0 -29
- package/dist/hosted/next/routes/customer-resource.js.map +0 -1
- package/dist/hosted/next/routes/health.d.ts +0 -2
- package/dist/hosted/next/routes/health.d.ts.map +0 -1
- package/dist/hosted/next/routes/health.js +0 -184
- package/dist/hosted/next/routes/health.js.map +0 -1
- package/dist/hosted/next/routes/link-contentful.d.ts +0 -2
- package/dist/hosted/next/routes/link-contentful.d.ts.map +0 -1
- package/dist/hosted/next/routes/link-contentful.js +0 -6
- package/dist/hosted/next/routes/link-contentful.js.map +0 -1
- package/dist/hosted/next/routes/mcp.d.ts +0 -10
- package/dist/hosted/next/routes/mcp.d.ts.map +0 -1
- package/dist/hosted/next/routes/mcp.js +0 -190
- package/dist/hosted/next/routes/mcp.js.map +0 -1
- package/dist/hosted/next/routes/oauth-authorization-server.d.ts +0 -3
- package/dist/hosted/next/routes/oauth-authorization-server.d.ts.map +0 -1
- package/dist/hosted/next/routes/oauth-authorization-server.js +0 -9
- package/dist/hosted/next/routes/oauth-authorization-server.js.map +0 -1
- package/dist/hosted/next/routes/oauth-authorize.d.ts +0 -2
- package/dist/hosted/next/routes/oauth-authorize.d.ts.map +0 -1
- package/dist/hosted/next/routes/oauth-authorize.js +0 -6
- package/dist/hosted/next/routes/oauth-authorize.js.map +0 -1
- package/dist/hosted/next/routes/oauth-protected-resource-path.d.ts +0 -13
- package/dist/hosted/next/routes/oauth-protected-resource-path.d.ts.map +0 -1
- package/dist/hosted/next/routes/oauth-protected-resource-path.js +0 -17
- package/dist/hosted/next/routes/oauth-protected-resource-path.js.map +0 -1
- package/dist/hosted/next/routes/oauth-protected-resource.d.ts +0 -3
- package/dist/hosted/next/routes/oauth-protected-resource.d.ts.map +0 -1
- package/dist/hosted/next/routes/oauth-protected-resource.js +0 -9
- package/dist/hosted/next/routes/oauth-protected-resource.js.map +0 -1
- package/dist/hosted/next/routes/oauth-register.d.ts +0 -3
- package/dist/hosted/next/routes/oauth-register.d.ts.map +0 -1
- package/dist/hosted/next/routes/oauth-register.js +0 -10
- package/dist/hosted/next/routes/oauth-register.js.map +0 -1
- package/dist/hosted/next/routes/oauth-token.d.ts +0 -3
- package/dist/hosted/next/routes/oauth-token.d.ts.map +0 -1
- package/dist/hosted/next/routes/oauth-token.js +0 -10
- package/dist/hosted/next/routes/oauth-token.js.map +0 -1
- package/dist/hosted/next/routes/staged-upload.d.ts +0 -3
- package/dist/hosted/next/routes/staged-upload.d.ts.map +0 -1
- package/dist/hosted/next/routes/staged-upload.js +0 -120
- package/dist/hosted/next/routes/staged-upload.js.map +0 -1
- package/dist/hosted/next/stage-site.d.ts +0 -11
- package/dist/hosted/next/stage-site.d.ts.map +0 -1
- package/dist/hosted/next/stage-site.js +0 -50
- package/dist/hosted/next/stage-site.js.map +0 -1
- package/dist/hosted/oauth/auth.d.ts +0 -16
- package/dist/hosted/oauth/auth.d.ts.map +0 -1
- package/dist/hosted/oauth/auth.js +0 -55
- package/dist/hosted/oauth/auth.js.map +0 -1
- package/dist/hosted/oauth/cached-cma.d.ts +0 -14
- package/dist/hosted/oauth/cached-cma.d.ts.map +0 -1
- package/dist/hosted/oauth/cached-cma.js +0 -41
- package/dist/hosted/oauth/cached-cma.js.map +0 -1
- package/dist/hosted/oauth/cimd.d.ts +0 -17
- package/dist/hosted/oauth/cimd.d.ts.map +0 -1
- package/dist/hosted/oauth/cimd.js +0 -300
- package/dist/hosted/oauth/cimd.js.map +0 -1
- package/dist/hosted/oauth/client-name.d.ts +0 -4
- package/dist/hosted/oauth/client-name.d.ts.map +0 -1
- package/dist/hosted/oauth/client-name.js +0 -12
- package/dist/hosted/oauth/client-name.js.map +0 -1
- package/dist/hosted/oauth/complete.d.ts +0 -19
- package/dist/hosted/oauth/complete.d.ts.map +0 -1
- package/dist/hosted/oauth/complete.js +0 -63
- package/dist/hosted/oauth/complete.js.map +0 -1
- package/dist/hosted/oauth/config.d.ts +0 -26
- package/dist/hosted/oauth/config.d.ts.map +0 -1
- package/dist/hosted/oauth/config.js +0 -105
- package/dist/hosted/oauth/config.js.map +0 -1
- package/dist/hosted/oauth/cors.d.ts +0 -4
- package/dist/hosted/oauth/cors.d.ts.map +0 -1
- package/dist/hosted/oauth/cors.js +0 -23
- package/dist/hosted/oauth/cors.js.map +0 -1
- package/dist/hosted/oauth/handlers.d.ts +0 -20
- package/dist/hosted/oauth/handlers.d.ts.map +0 -1
- package/dist/hosted/oauth/handlers.js +0 -332
- package/dist/hosted/oauth/handlers.js.map +0 -1
- package/dist/hosted/oauth/jwt.d.ts +0 -11
- package/dist/hosted/oauth/jwt.d.ts.map +0 -1
- package/dist/hosted/oauth/jwt.js +0 -34
- package/dist/hosted/oauth/jwt.js.map +0 -1
- package/dist/hosted/oauth/log.d.ts +0 -14
- package/dist/hosted/oauth/log.d.ts.map +0 -1
- package/dist/hosted/oauth/log.js +0 -75
- package/dist/hosted/oauth/log.js.map +0 -1
- package/dist/hosted/oauth/pat-cache.d.ts +0 -11
- package/dist/hosted/oauth/pat-cache.d.ts.map +0 -1
- package/dist/hosted/oauth/pat-cache.js +0 -42
- package/dist/hosted/oauth/pat-cache.js.map +0 -1
- package/dist/hosted/oauth/pkce.d.ts +0 -3
- package/dist/hosted/oauth/pkce.d.ts.map +0 -1
- package/dist/hosted/oauth/pkce.js +0 -9
- package/dist/hosted/oauth/pkce.js.map +0 -1
- package/dist/hosted/oauth/redirect-hosts.d.ts +0 -4
- package/dist/hosted/oauth/redirect-hosts.d.ts.map +0 -1
- package/dist/hosted/oauth/redirect-hosts.js +0 -47
- package/dist/hosted/oauth/redirect-hosts.js.map +0 -1
- package/dist/hosted/oauth/redirect-uri.d.ts +0 -10
- package/dist/hosted/oauth/redirect-uri.d.ts.map +0 -1
- package/dist/hosted/oauth/redirect-uri.js +0 -61
- package/dist/hosted/oauth/redirect-uri.js.map +0 -1
- package/dist/hosted/oauth/refresh.d.ts +0 -25
- package/dist/hosted/oauth/refresh.d.ts.map +0 -1
- package/dist/hosted/oauth/refresh.js +0 -52
- package/dist/hosted/oauth/refresh.js.map +0 -1
- package/dist/hosted/oauth/scopes.d.ts +0 -15
- package/dist/hosted/oauth/scopes.d.ts.map +0 -1
- package/dist/hosted/oauth/scopes.js +0 -21
- package/dist/hosted/oauth/scopes.js.map +0 -1
- package/dist/hosted/oauth/store.d.ts +0 -79
- package/dist/hosted/oauth/store.d.ts.map +0 -1
- package/dist/hosted/oauth/store.js +0 -220
- package/dist/hosted/oauth/store.js.map +0 -1
- package/dist/hosted/oauth/token-grant-response.d.ts +0 -7
- package/dist/hosted/oauth/token-grant-response.d.ts.map +0 -1
- package/dist/hosted/oauth/token-grant-response.js +0 -34
- package/dist/hosted/oauth/token-grant-response.js.map +0 -1
- package/dist/hosted/pack-fetch.d.ts +0 -60
- package/dist/hosted/pack-fetch.d.ts.map +0 -1
- package/dist/hosted/pack-fetch.js +0 -443
- package/dist/hosted/pack-fetch.js.map +0 -1
- package/dist/hosted/parse-customer-resource.d.ts +0 -3
- package/dist/hosted/parse-customer-resource.d.ts.map +0 -1
- package/dist/hosted/parse-customer-resource.js +0 -16
- package/dist/hosted/parse-customer-resource.js.map +0 -1
- package/dist/hosted/tenant-registry.d.ts +0 -68
- package/dist/hosted/tenant-registry.d.ts.map +0 -1
- package/dist/hosted/tenant-registry.js +0 -170
- package/dist/hosted/tenant-registry.js.map +0 -1
- package/dist/index/blob.d.ts +0 -5
- package/dist/index/blob.d.ts.map +0 -1
- package/dist/index/blob.js +0 -15
- package/dist/index/blob.js.map +0 -1
- package/dist/index/cache-keys.d.ts +0 -9
- package/dist/index/cache-keys.d.ts.map +0 -1
- package/dist/index/cache-keys.js +0 -13
- package/dist/index/cache-keys.js.map +0 -1
- package/dist/index/cache-store.d.ts +0 -31
- package/dist/index/cache-store.d.ts.map +0 -1
- package/dist/index/cache-store.js +0 -17
- package/dist/index/cache-store.js.map +0 -1
- package/dist/index/db.d.ts +0 -12
- package/dist/index/db.d.ts.map +0 -1
- package/dist/index/db.js +0 -49
- package/dist/index/db.js.map +0 -1
- package/dist/index/distributed-sync-lock.d.ts +0 -3
- package/dist/index/distributed-sync-lock.d.ts.map +0 -1
- package/dist/index/distributed-sync-lock.js +0 -22
- package/dist/index/distributed-sync-lock.js.map +0 -1
- package/dist/index/errors.d.ts +0 -18
- package/dist/index/errors.d.ts.map +0 -1
- package/dist/index/errors.js +0 -18
- package/dist/index/errors.js.map +0 -1
- package/dist/index/file-index-cache.d.ts +0 -16
- package/dist/index/file-index-cache.d.ts.map +0 -1
- package/dist/index/file-index-cache.js +0 -103
- package/dist/index/file-index-cache.js.map +0 -1
- package/dist/index/hydrate.d.ts +0 -8
- package/dist/index/hydrate.d.ts.map +0 -1
- package/dist/index/hydrate.js +0 -26
- package/dist/index/hydrate.js.map +0 -1
- package/dist/index/invalidate.d.ts +0 -28
- package/dist/index/invalidate.d.ts.map +0 -1
- package/dist/index/invalidate.js +0 -115
- package/dist/index/invalidate.js.map +0 -1
- package/dist/index/mode.d.ts +0 -7
- package/dist/index/mode.d.ts.map +0 -1
- package/dist/index/mode.js +0 -9
- package/dist/index/mode.js.map +0 -1
- package/dist/index/patch-index.d.ts +0 -12
- package/dist/index/patch-index.d.ts.map +0 -1
- package/dist/index/patch-index.js +0 -81
- package/dist/index/patch-index.js.map +0 -1
- package/dist/index/paths.d.ts +0 -6
- package/dist/index/paths.d.ts.map +0 -1
- package/dist/index/paths.js +0 -23
- package/dist/index/paths.js.map +0 -1
- package/dist/index/publish-cache.d.ts +0 -5
- package/dist/index/publish-cache.d.ts.map +0 -1
- package/dist/index/publish-cache.js +0 -26
- package/dist/index/publish-cache.js.map +0 -1
- package/dist/index/query.d.ts +0 -139
- package/dist/index/query.d.ts.map +0 -1
- package/dist/index/query.js +0 -451
- package/dist/index/query.js.map +0 -1
- package/dist/index/redis-index-cache.d.ts +0 -24
- package/dist/index/redis-index-cache.d.ts.map +0 -1
- package/dist/index/redis-index-cache.js +0 -83
- package/dist/index/redis-index-cache.js.map +0 -1
- package/dist/index/reference-lookup.d.ts +0 -22
- package/dist/index/reference-lookup.d.ts.map +0 -1
- package/dist/index/reference-lookup.js +0 -140
- package/dist/index/reference-lookup.js.map +0 -1
- package/dist/index/require.d.ts +0 -22
- package/dist/index/require.d.ts.map +0 -1
- package/dist/index/require.js +0 -74
- package/dist/index/require.js.map +0 -1
- package/dist/index/run-sync.d.ts +0 -22
- package/dist/index/run-sync.d.ts.map +0 -1
- package/dist/index/run-sync.js +0 -76
- package/dist/index/run-sync.js.map +0 -1
- package/dist/index/schema.d.ts +0 -19
- package/dist/index/schema.d.ts.map +0 -1
- package/dist/index/schema.js +0 -85
- package/dist/index/schema.js.map +0 -1
- package/dist/index/sync-lock.d.ts +0 -9
- package/dist/index/sync-lock.d.ts.map +0 -1
- package/dist/index/sync-lock.js +0 -98
- package/dist/index/sync-lock.js.map +0 -1
- package/dist/index/sync-log.d.ts +0 -7
- package/dist/index/sync-log.d.ts.map +0 -1
- package/dist/index/sync-log.js +0 -23
- package/dist/index/sync-log.js.map +0 -1
- package/dist/index/sync.d.ts +0 -50
- package/dist/index/sync.d.ts.map +0 -1
- package/dist/index/sync.js +0 -292
- package/dist/index/sync.js.map +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -5
- package/dist/index.js.map +0 -1
- package/dist/mcp/guide.d.ts +0 -21
- package/dist/mcp/guide.d.ts.map +0 -1
- package/dist/mcp/guide.js +0 -97
- package/dist/mcp/guide.js.map +0 -1
- package/dist/mcp/hosted-metadata.d.ts +0 -12
- package/dist/mcp/hosted-metadata.d.ts.map +0 -1
- package/dist/mcp/hosted-metadata.js +0 -30
- package/dist/mcp/hosted-metadata.js.map +0 -1
- package/dist/mcp/http-handler.d.ts +0 -18
- package/dist/mcp/http-handler.d.ts.map +0 -1
- package/dist/mcp/http-handler.js +0 -43
- package/dist/mcp/http-handler.js.map +0 -1
- package/dist/mcp/prompts/onboarding.d.ts +0 -4
- package/dist/mcp/prompts/onboarding.d.ts.map +0 -1
- package/dist/mcp/prompts/onboarding.js +0 -398
- package/dist/mcp/prompts/onboarding.js.map +0 -1
- package/dist/mcp/resources/customer.d.ts +0 -7
- package/dist/mcp/resources/customer.d.ts.map +0 -1
- package/dist/mcp/resources/customer.js +0 -72
- package/dist/mcp/resources/customer.js.map +0 -1
- package/dist/mcp/resources/guide.d.ts +0 -4
- package/dist/mcp/resources/guide.d.ts.map +0 -1
- package/dist/mcp/resources/guide.js +0 -16
- package/dist/mcp/resources/guide.js.map +0 -1
- package/dist/mcp/server.d.ts +0 -17
- package/dist/mcp/server.d.ts.map +0 -1
- package/dist/mcp/server.js +0 -64
- package/dist/mcp/server.js.map +0 -1
- package/dist/mcp/session-args.d.ts +0 -10
- package/dist/mcp/session-args.d.ts.map +0 -1
- package/dist/mcp/session-args.js +0 -28
- package/dist/mcp/session-args.js.map +0 -1
- package/dist/mcp/tools/client-tools.d.ts +0 -11
- package/dist/mcp/tools/client-tools.d.ts.map +0 -1
- package/dist/mcp/tools/client-tools.js +0 -266
- package/dist/mcp/tools/client-tools.js.map +0 -1
- package/dist/mcp/tools/cms-edit.d.ts +0 -10
- package/dist/mcp/tools/cms-edit.d.ts.map +0 -1
- package/dist/mcp/tools/cms-edit.js +0 -180
- package/dist/mcp/tools/cms-edit.js.map +0 -1
- package/dist/mcp/tools/customer.d.ts +0 -8
- package/dist/mcp/tools/customer.d.ts.map +0 -1
- package/dist/mcp/tools/customer.js +0 -41
- package/dist/mcp/tools/customer.js.map +0 -1
- package/dist/mcp/tools/help.d.ts +0 -4
- package/dist/mcp/tools/help.d.ts.map +0 -1
- package/dist/mcp/tools/help.js +0 -64
- package/dist/mcp/tools/help.js.map +0 -1
- package/dist/mcp/tools/media.d.ts +0 -4
- package/dist/mcp/tools/media.d.ts.map +0 -1
- package/dist/mcp/tools/media.js +0 -187
- package/dist/mcp/tools/media.js.map +0 -1
- package/dist/mcp/tools/staged-upload.d.ts +0 -4
- package/dist/mcp/tools/staged-upload.d.ts.map +0 -1
- package/dist/mcp/tools/staged-upload.js +0 -97
- package/dist/mcp/tools/staged-upload.js.map +0 -1
- package/dist/mcp/types.d.ts +0 -2
- package/dist/mcp/types.d.ts.map +0 -1
- package/dist/mcp/types.js +0 -2
- package/dist/mcp/types.js.map +0 -1
- package/dist/media-pipeline/actions.d.ts +0 -32
- package/dist/media-pipeline/actions.d.ts.map +0 -1
- package/dist/media-pipeline/actions.js +0 -447
- package/dist/media-pipeline/actions.js.map +0 -1
- package/dist/media-pipeline/client.d.ts +0 -79
- package/dist/media-pipeline/client.d.ts.map +0 -1
- package/dist/media-pipeline/client.js +0 -76
- package/dist/media-pipeline/client.js.map +0 -1
- package/dist/media-pipeline/config.d.ts +0 -38
- package/dist/media-pipeline/config.d.ts.map +0 -1
- package/dist/media-pipeline/config.js +0 -118
- package/dist/media-pipeline/config.js.map +0 -1
- package/dist/media-pipeline/import-alt.d.ts +0 -8
- package/dist/media-pipeline/import-alt.d.ts.map +0 -1
- package/dist/media-pipeline/import-alt.js +0 -23
- package/dist/media-pipeline/import-alt.js.map +0 -1
- package/dist/media-pipeline/import-filter.d.ts +0 -36
- package/dist/media-pipeline/import-filter.d.ts.map +0 -1
- package/dist/media-pipeline/import-filter.js +0 -53
- package/dist/media-pipeline/import-filter.js.map +0 -1
- package/dist/media-pipeline/import.d.ts +0 -25
- package/dist/media-pipeline/import.d.ts.map +0 -1
- package/dist/media-pipeline/import.js +0 -273
- package/dist/media-pipeline/import.js.map +0 -1
- package/dist/media-pipeline/index.d.ts +0 -6
- package/dist/media-pipeline/index.d.ts.map +0 -1
- package/dist/media-pipeline/index.js +0 -6
- package/dist/media-pipeline/index.js.map +0 -1
- package/dist/media-pipeline/job-store.d.ts +0 -49
- package/dist/media-pipeline/job-store.d.ts.map +0 -1
- package/dist/media-pipeline/job-store.js +0 -215
- package/dist/media-pipeline/job-store.js.map +0 -1
- package/dist/media-pipeline/limits.d.ts +0 -19
- package/dist/media-pipeline/limits.d.ts.map +0 -1
- package/dist/media-pipeline/limits.js +0 -19
- package/dist/media-pipeline/limits.js.map +0 -1
- package/dist/media-pipeline/log.d.ts +0 -3
- package/dist/media-pipeline/log.d.ts.map +0 -1
- package/dist/media-pipeline/log.js +0 -12
- package/dist/media-pipeline/log.js.map +0 -1
- package/dist/media-pipeline/prepare-source.d.ts +0 -35
- package/dist/media-pipeline/prepare-source.d.ts.map +0 -1
- package/dist/media-pipeline/prepare-source.js +0 -179
- package/dist/media-pipeline/prepare-source.js.map +0 -1
- package/dist/media-pipeline/resolve-tenant.d.ts +0 -28
- package/dist/media-pipeline/resolve-tenant.d.ts.map +0 -1
- package/dist/media-pipeline/resolve-tenant.js +0 -62
- package/dist/media-pipeline/resolve-tenant.js.map +0 -1
- package/dist/media-pipeline/validate.d.ts +0 -18
- package/dist/media-pipeline/validate.d.ts.map +0 -1
- package/dist/media-pipeline/validate.js +0 -38
- package/dist/media-pipeline/validate.js.map +0 -1
- package/dist/output/json.d.ts +0 -53
- package/dist/output/json.d.ts.map +0 -1
- package/dist/output/json.js +0 -111
- package/dist/output/json.js.map +0 -1
- package/dist/output/mode.js +0 -16
- package/dist/output/mode.js.map +0 -1
- package/dist/output/print.d.ts +0 -14
- package/dist/output/print.d.ts.map +0 -1
- package/dist/output/print.js +0 -61
- package/dist/output/print.js.map +0 -1
- package/dist/output/terminal-table.d.ts +0 -15
- package/dist/output/terminal-table.d.ts.map +0 -1
- package/dist/output/terminal-table.js +0 -60
- package/dist/output/terminal-table.js.map +0 -1
- package/dist/patterns/census.d.ts +0 -8
- package/dist/patterns/census.d.ts.map +0 -1
- package/dist/patterns/census.js +0 -197
- package/dist/patterns/census.js.map +0 -1
- package/dist/patterns/cluster.d.ts +0 -19
- package/dist/patterns/cluster.d.ts.map +0 -1
- package/dist/patterns/cluster.js +0 -353
- package/dist/patterns/cluster.js.map +0 -1
- package/dist/patterns/markdown.d.ts +0 -3
- package/dist/patterns/markdown.d.ts.map +0 -1
- package/dist/patterns/markdown.js +0 -88
- package/dist/patterns/markdown.js.map +0 -1
- package/dist/patterns/types.d.ts +0 -70
- package/dist/patterns/types.d.ts.map +0 -1
- package/dist/patterns/types.js +0 -2
- package/dist/patterns/types.js.map +0 -1
- package/dist/patterns/write.d.ts +0 -7
- package/dist/patterns/write.d.ts.map +0 -1
- package/dist/patterns/write.js +0 -16
- package/dist/patterns/write.js.map +0 -1
- package/dist/preview/capture-urls.d.ts +0 -12
- package/dist/preview/capture-urls.d.ts.map +0 -1
- package/dist/preview/capture-urls.js +0 -41
- package/dist/preview/capture-urls.js.map +0 -1
- package/dist/preview/entry-urls.d.ts +0 -44
- package/dist/preview/entry-urls.d.ts.map +0 -1
- package/dist/preview/entry-urls.js +0 -155
- package/dist/preview/entry-urls.js.map +0 -1
- package/dist/preview/resolve-preview-entry.d.ts +0 -18
- package/dist/preview/resolve-preview-entry.d.ts.map +0 -1
- package/dist/preview/resolve-preview-entry.js +0 -31
- package/dist/preview/resolve-preview-entry.js.map +0 -1
- package/dist/project/types.js.map +0 -1
- package/dist/publish/attribution.d.ts +0 -16
- package/dist/publish/attribution.d.ts.map +0 -1
- package/dist/publish/attribution.js +0 -28
- package/dist/publish/attribution.js.map +0 -1
- package/dist/publish/cma.d.ts +0 -51
- package/dist/publish/cma.d.ts.map +0 -1
- package/dist/publish/cma.js +0 -308
- package/dist/publish/cma.js.map +0 -1
- package/dist/publish/fields.d.ts +0 -9
- package/dist/publish/fields.d.ts.map +0 -1
- package/dist/publish/fields.js +0 -56
- package/dist/publish/fields.js.map +0 -1
- package/dist/publish/permissions.d.ts +0 -23
- package/dist/publish/permissions.d.ts.map +0 -1
- package/dist/publish/permissions.js +0 -131
- package/dist/publish/permissions.js.map +0 -1
- package/dist/publish/plan.d.ts +0 -120
- package/dist/publish/plan.d.ts.map +0 -1
- package/dist/publish/plan.js +0 -382
- package/dist/publish/plan.js.map +0 -1
- package/dist/publish/revalidate-request.d.ts +0 -32
- package/dist/publish/revalidate-request.d.ts.map +0 -1
- package/dist/publish/revalidate-request.js +0 -38
- package/dist/publish/revalidate-request.js.map +0 -1
- package/dist/publish/store.d.ts +0 -13
- package/dist/publish/store.d.ts.map +0 -1
- package/dist/publish/store.js +0 -102
- package/dist/publish/store.js.map +0 -1
- package/dist/rtf/convertToRtf.d.ts +0 -7
- package/dist/rtf/convertToRtf.d.ts.map +0 -1
- package/dist/rtf/convertToRtf.js +0 -24
- package/dist/rtf/convertToRtf.js.map +0 -1
- package/dist/rtf/fromHtml.d.ts +0 -8
- package/dist/rtf/fromHtml.d.ts.map +0 -1
- package/dist/rtf/fromHtml.js +0 -290
- package/dist/rtf/fromHtml.js.map +0 -1
- package/dist/rtf/fromMarkdown.d.ts +0 -25
- package/dist/rtf/fromMarkdown.d.ts.map +0 -1
- package/dist/rtf/fromMarkdown.js +0 -375
- package/dist/rtf/fromMarkdown.js.map +0 -1
- package/dist/rtf/fromPlainText.d.ts +0 -7
- package/dist/rtf/fromPlainText.d.ts.map +0 -1
- package/dist/rtf/fromPlainText.js +0 -39
- package/dist/rtf/fromPlainText.js.map +0 -1
- package/dist/rtf/fromRtfJson.d.ts +0 -10
- package/dist/rtf/fromRtfJson.d.ts.map +0 -1
- package/dist/rtf/fromRtfJson.js +0 -52
- package/dist/rtf/fromRtfJson.js.map +0 -1
- package/dist/rtf/inlineHtml.d.ts +0 -6
- package/dist/rtf/inlineHtml.d.ts.map +0 -1
- package/dist/rtf/inlineHtml.js +0 -152
- package/dist/rtf/inlineHtml.js.map +0 -1
- package/dist/rtf/references.d.ts +0 -9
- package/dist/rtf/references.d.ts.map +0 -1
- package/dist/rtf/references.js +0 -50
- package/dist/rtf/references.js.map +0 -1
- package/dist/rtf/replacePlainText.d.ts +0 -117
- package/dist/rtf/replacePlainText.d.ts.map +0 -1
- package/dist/rtf/replacePlainText.js +0 -598
- package/dist/rtf/replacePlainText.js.map +0 -1
- package/dist/rtf/resolveRtfInput.d.ts +0 -18
- package/dist/rtf/resolveRtfInput.d.ts.map +0 -1
- package/dist/rtf/resolveRtfInput.js +0 -72
- package/dist/rtf/resolveRtfInput.js.map +0 -1
- package/dist/rtf/toMarkdown.d.ts +0 -6
- package/dist/rtf/toMarkdown.d.ts.map +0 -1
- package/dist/rtf/toMarkdown.js +0 -179
- package/dist/rtf/toMarkdown.js.map +0 -1
- package/dist/rtf/types.d.ts +0 -5
- package/dist/rtf/types.d.ts.map +0 -1
- package/dist/rtf/types.js +0 -2
- package/dist/rtf/types.js.map +0 -1
- package/dist/rtf/utils.d.ts +0 -7
- package/dist/rtf/utils.d.ts.map +0 -1
- package/dist/rtf/utils.js +0 -11
- package/dist/rtf/utils.js.map +0 -1
- package/dist/runtime/context.d.ts +0 -48
- package/dist/runtime/context.d.ts.map +0 -1
- package/dist/runtime/context.js +0 -9
- package/dist/runtime/context.js.map +0 -1
- package/dist/session/dirty.d.ts +0 -20
- package/dist/session/dirty.d.ts.map +0 -1
- package/dist/session/dirty.js +0 -44
- package/dist/session/dirty.js.map +0 -1
- package/dist/session/file-session-store.d.ts +0 -11
- package/dist/session/file-session-store.d.ts.map +0 -1
- package/dist/session/file-session-store.js +0 -170
- package/dist/session/file-session-store.js.map +0 -1
- package/dist/session/log.d.ts +0 -6
- package/dist/session/log.d.ts.map +0 -1
- package/dist/session/log.js +0 -21
- package/dist/session/log.js.map +0 -1
- package/dist/session/navigation-fields.d.ts +0 -21
- package/dist/session/navigation-fields.d.ts.map +0 -1
- package/dist/session/navigation-fields.js +0 -80
- package/dist/session/navigation-fields.js.map +0 -1
- package/dist/session/redis-session-store.d.ts +0 -42
- package/dist/session/redis-session-store.d.ts.map +0 -1
- package/dist/session/redis-session-store.js +0 -214
- package/dist/session/redis-session-store.js.map +0 -1
- package/dist/session/refs.d.ts +0 -45
- package/dist/session/refs.d.ts.map +0 -1
- package/dist/session/refs.js +0 -173
- package/dist/session/refs.js.map +0 -1
- package/dist/session/session-store.d.ts +0 -30
- package/dist/session/session-store.d.ts.map +0 -1
- package/dist/session/session-store.js +0 -15
- package/dist/session/session-store.js.map +0 -1
- package/dist/session/state.d.ts +0 -106
- package/dist/session/state.d.ts.map +0 -1
- package/dist/session/state.js +0 -110
- package/dist/session/state.js.map +0 -1
- package/dist/session/store.d.ts +0 -16
- package/dist/session/store.d.ts.map +0 -1
- package/dist/session/store.js +0 -90
- package/dist/session/store.js.map +0 -1
- package/dist/snapshot/field-value.d.ts +0 -5
- package/dist/snapshot/field-value.d.ts.map +0 -1
- package/dist/snapshot/field-value.js +0 -42
- package/dist/snapshot/field-value.js.map +0 -1
- package/dist/snapshot/fields.d.ts +0 -11
- package/dist/snapshot/fields.d.ts.map +0 -1
- package/dist/snapshot/fields.js +0 -96
- package/dist/snapshot/fields.js.map +0 -1
- package/dist/snapshot/render.d.ts +0 -21
- package/dist/snapshot/render.d.ts.map +0 -1
- package/dist/snapshot/render.js +0 -243
- package/dist/snapshot/render.js.map +0 -1
- package/dist/staged-upload/consume-text.d.ts +0 -11
- package/dist/staged-upload/consume-text.d.ts.map +0 -1
- package/dist/staged-upload/consume-text.js +0 -55
- package/dist/staged-upload/consume-text.js.map +0 -1
- package/dist/staged-upload/direct-intake.d.ts +0 -23
- package/dist/staged-upload/direct-intake.d.ts.map +0 -1
- package/dist/staged-upload/direct-intake.js +0 -71
- package/dist/staged-upload/direct-intake.js.map +0 -1
- package/dist/staged-upload/hmac.d.ts +0 -10
- package/dist/staged-upload/hmac.d.ts.map +0 -1
- package/dist/staged-upload/hmac.js +0 -78
- package/dist/staged-upload/hmac.js.map +0 -1
- package/dist/staged-upload/intake-policy.d.ts +0 -13
- package/dist/staged-upload/intake-policy.d.ts.map +0 -1
- package/dist/staged-upload/intake-policy.js +0 -37
- package/dist/staged-upload/intake-policy.js.map +0 -1
- package/dist/staged-upload/limits.d.ts +0 -6
- package/dist/staged-upload/limits.d.ts.map +0 -1
- package/dist/staged-upload/limits.js +0 -9
- package/dist/staged-upload/limits.js.map +0 -1
- package/dist/staged-upload/mime.d.ts +0 -10
- package/dist/staged-upload/mime.d.ts.map +0 -1
- package/dist/staged-upload/mime.js +0 -64
- package/dist/staged-upload/mime.js.map +0 -1
- package/dist/staged-upload/request.d.ts +0 -17
- package/dist/staged-upload/request.d.ts.map +0 -1
- package/dist/staged-upload/request.js +0 -84
- package/dist/staged-upload/request.js.map +0 -1
- package/dist/staged-upload/store.d.ts +0 -41
- package/dist/staged-upload/store.d.ts.map +0 -1
- package/dist/staged-upload/store.js +0 -221
- package/dist/staged-upload/store.js.map +0 -1
- package/dist/staged-upload/types.d.ts +0 -37
- package/dist/staged-upload/types.d.ts.map +0 -1
- package/dist/staged-upload/types.js +0 -2
- package/dist/staged-upload/types.js.map +0 -1
- package/dist/telemetry/axiom.d.ts +0 -22
- package/dist/telemetry/axiom.d.ts.map +0 -1
- package/dist/telemetry/axiom.js +0 -45
- package/dist/telemetry/axiom.js.map +0 -1
- package/dist/telemetry/composite.d.ts +0 -9
- package/dist/telemetry/composite.d.ts.map +0 -1
- package/dist/telemetry/composite.js +0 -16
- package/dist/telemetry/composite.js.map +0 -1
- package/dist/telemetry/enrich.d.ts +0 -11
- package/dist/telemetry/enrich.d.ts.map +0 -1
- package/dist/telemetry/enrich.js +0 -42
- package/dist/telemetry/enrich.js.map +0 -1
- package/dist/telemetry/factory.d.ts +0 -8
- package/dist/telemetry/factory.d.ts.map +0 -1
- package/dist/telemetry/factory.js +0 -44
- package/dist/telemetry/factory.js.map +0 -1
- package/dist/telemetry/identity.d.ts +0 -22
- package/dist/telemetry/identity.d.ts.map +0 -1
- package/dist/telemetry/identity.js +0 -48
- package/dist/telemetry/identity.js.map +0 -1
- package/dist/telemetry/index.d.ts +0 -11
- package/dist/telemetry/index.d.ts.map +0 -1
- package/dist/telemetry/index.js +0 -10
- package/dist/telemetry/index.js.map +0 -1
- package/dist/telemetry/local.d.ts +0 -9
- package/dist/telemetry/local.d.ts.map +0 -1
- package/dist/telemetry/local.js +0 -21
- package/dist/telemetry/local.js.map +0 -1
- package/dist/telemetry/noop.d.ts +0 -7
- package/dist/telemetry/noop.d.ts.map +0 -1
- package/dist/telemetry/noop.js +0 -6
- package/dist/telemetry/noop.js.map +0 -1
- package/dist/telemetry/record.d.ts +0 -17
- package/dist/telemetry/record.d.ts.map +0 -1
- package/dist/telemetry/record.js +0 -66
- package/dist/telemetry/record.js.map +0 -1
- package/dist/telemetry/request-stats.d.ts +0 -15
- package/dist/telemetry/request-stats.d.ts.map +0 -1
- package/dist/telemetry/request-stats.js +0 -34
- package/dist/telemetry/request-stats.js.map +0 -1
- package/dist/telemetry/types.d.ts +0 -56
- package/dist/telemetry/types.d.ts.map +0 -1
- package/dist/telemetry/types.js +0 -2
- package/dist/telemetry/types.js.map +0 -1
- package/dist/validation/allowed-types.d.ts +0 -19
- package/dist/validation/allowed-types.d.ts.map +0 -1
- package/dist/validation/allowed-types.js +0 -120
- package/dist/validation/allowed-types.js.map +0 -1
- package/docs/FEATURE_REQUESTS_ARCHIVE.md +0 -141
- package/docs/FUNCTIONAL_SPEC.md +0 -307
- package/docs/MEDIA_INDEX_PLAN.md +0 -256
- package/docs/SKILLS.md +0 -29
- package/docs/TELEMETRY_AXIOM.md +0 -119
- package/docs/help/article-tags-from-json.md +0 -62
- package/docs/help/asset-review.md +0 -56
- package/docs/help/batch-run.md +0 -222
- package/docs/help/batch.md +0 -94
- package/docs/help/bulk-rtf-replace.md +0 -80
- package/docs/help/create-editor-entries.md +0 -59
- package/docs/help/create-from-json.md +0 -436
- package/docs/help/fields-article.md +0 -162
- package/docs/help/fields-collection.md +0 -133
- package/docs/help/fields-component.md +0 -168
- package/docs/help/fields-html-component.md +0 -90
- package/docs/help/fields-page.md +0 -124
- package/docs/help/fields-taxonomy.md +0 -160
- package/docs/help/fields.md +0 -66
- package/docs/help/index-sync.md +0 -138
- package/docs/help/index.md +0 -192
- package/docs/help/lookup.md +0 -149
- package/docs/help/patterns.md +0 -33
- package/docs/help/person-from-json.md +0 -84
- package/docs/help/publish.md +0 -56
- package/docs/help/taxonomy-from-json.md +0 -115
- package/docs/help/workflow.md +0 -239
- package/docs/mcp/e2e-test-prompt.md +0 -160
- package/docs/mcp/hosted-guide.md +0 -397
- package/skills/README.md +0 -30
- package/skills/core/SKILL.md +0 -894
- package/skills/editor-tasks/SKILL.md +0 -88
- package/skills/manifest.json +0 -6
- package/skills/setup/SKILL.md +0 -123
- package/skills/templates/SKILL.md +0 -21
- /package/{dist → pack}/bin/cms-edit.d.ts +0 -0
- /package/{dist → pack}/bin/cms-edit.d.ts.map +0 -0
- /package/{dist → pack}/commands/editor-pack.d.ts +0 -0
- /package/{dist → pack}/commands/editor-pack.d.ts.map +0 -0
- /package/{dist → pack}/commands/editor-pack.js +0 -0
- /package/{dist → pack}/commands/editor-pack.js.map +0 -0
- /package/{dist → pack}/commands/host-pack-publish.d.ts +0 -0
- /package/{dist → pack}/commands/project.d.ts +0 -0
- /package/{dist → pack}/commands/project.d.ts.map +0 -0
- /package/{dist → pack}/commands/project.js +0 -0
- /package/{dist → pack}/commands/project.js.map +0 -0
- /package/{dist → pack}/commands/version.d.ts +0 -0
- /package/{dist → pack}/commands/version.d.ts.map +0 -0
- /package/{dist → pack}/commands/version.js +0 -0
- /package/{dist → pack}/commands/version.js.map +0 -0
- /package/{dist → pack}/editor-pack/capabilities.d.ts +0 -0
- /package/{dist → pack}/editor-pack/parse-constants.d.ts +0 -0
- /package/{dist → pack}/editor-pack/parse-guidelines.d.ts +0 -0
- /package/{dist → pack}/editor-pack/parse-guidelines.d.ts.map +0 -0
- /package/{dist → pack}/editor-pack/parse-guidelines.js +0 -0
- /package/{dist → pack}/editor-pack/parse-guidelines.js.map +0 -0
- /package/{dist → pack}/editor-pack/parse-registrations.d.ts +0 -0
- /package/{dist → pack}/editor-pack/parse-registrations.d.ts.map +0 -0
- /package/{dist → pack}/editor-pack/parse-registrations.js +0 -0
- /package/{dist → pack}/editor-pack/parse-registrations.js.map +0 -0
- /package/{dist → pack}/editor-pack/production-site.d.ts +0 -0
- /package/{dist → pack}/editor-pack/production-site.d.ts.map +0 -0
- /package/{dist → pack}/editor-pack/production-site.js +0 -0
- /package/{dist → pack}/editor-pack/production-site.js.map +0 -0
- /package/{dist → pack}/output/mode.d.ts +0 -0
- /package/{dist → pack}/project/doctor.d.ts +0 -0
- /package/{dist → pack}/project/doctor.d.ts.map +0 -0
- /package/{dist → pack}/project/load.d.ts +0 -0
- /package/{dist → pack}/project/load.d.ts.map +0 -0
- /package/{dist → pack}/project/load.js +0 -0
- /package/{dist → pack}/project/load.js.map +0 -0
- /package/{dist → pack}/project/types.d.ts +0 -0
- /package/{dist → pack}/project/validate-hosted.d.ts +0 -0
- /package/{dist → pack}/project/validate-hosted.d.ts.map +0 -0
- /package/{dist → pack}/project/validate-hosted.js +0 -0
- /package/{dist → pack}/project/validate-hosted.js.map +0 -0
- /package/{dist → pack}/project/validate-secrets.d.ts +0 -0
- /package/{dist → pack}/project/validate-secrets.d.ts.map +0 -0
- /package/{dist → pack}/project/validate-secrets.js +0 -0
- /package/{dist → pack}/project/validate-secrets.js.map +0 -0
- /package/{dist → pack}/project/validate-staged-upload-route.d.ts +0 -0
- /package/{dist → pack}/version.d.ts +0 -0
- /package/{dist → pack}/version.d.ts.map +0 -0
- /package/{dist → pack}/version.js +0 -0
- /package/{dist → pack}/version.js.map +0 -0
package/dist/commands/set.js
DELETED
|
@@ -1,808 +0,0 @@
|
|
|
1
|
-
import { parseJsonString, readJsonInput, readTextInputWithOptionalStaged, } from '../cli/read-json-input.js';
|
|
2
|
-
import { loadConfig, resolveSpaceConfig } from '../config/load.js';
|
|
3
|
-
import { createSafeEnvironment } from '../contentful/client.js';
|
|
4
|
-
import { normalizeSlug, serializeEntry } from '../contentful/fetch.js';
|
|
5
|
-
import { readLocaleValue } from '../contentful/locale-value.js';
|
|
6
|
-
import { assignFieldValue, splitFieldPath } from '../contentful/object-path.js';
|
|
7
|
-
import { isClearToken, requiredFieldClearError, resolveScalarValueForField, } from '../contentful/scalar-value.js';
|
|
8
|
-
import { getActiveFieldDef, getContentTypeCached, refreshContentType, validateJsonSetAgainstFieldSchema, validateLinkSetAgainstFieldSchema, validateLinksSetAgainstFieldSchema, validateScalarSetAgainstFieldSchema, } from '../contentful/set-field-schema.js';
|
|
9
|
-
import { isSlugFieldId, validateSlugFieldValue } from '../contentful/slug-validation.js';
|
|
10
|
-
import { errorMsg, infoMsg, successMsg, warnMsg } from '../output/print.js';
|
|
11
|
-
import { stringToRtfDocument } from '../rtf/convertToRtf.js';
|
|
12
|
-
import { isRtfDocument } from '../rtf/utils.js';
|
|
13
|
-
import { makeAssetLink, makeEntryLink, resolveRef, resolveRefToId } from '../session/refs.js';
|
|
14
|
-
import { requireSession, saveSession } from '../session/store.js';
|
|
15
|
-
import { consumeStagedUpload, peekStagedUtf8, tryConsumeStagedUpload, } from '../staged-upload/consume-text.js';
|
|
16
|
-
import { everyTokenLooksLikeBatchAssignment, parseBatchSetAssignments, } from './batch-assignments.js';
|
|
17
|
-
import { everyTokenLooksLikeMultiAssignment, parseMultiSetAssignments, } from './multiset-assignments.js';
|
|
18
|
-
export function registerSetCommand(program) {
|
|
19
|
-
program
|
|
20
|
-
.command('set [assignments...]')
|
|
21
|
-
.description('Set a field on one or more entries.\n' +
|
|
22
|
-
'Single: set <ref|entryId> <field> [value]\n' +
|
|
23
|
-
' <ref> is @cN / @root; bare Contentful entry IDs also work (fetched into the session if needed).\n' +
|
|
24
|
-
'Multi: set @c1:field="value" @c2:field="value" …\n' +
|
|
25
|
-
' Multi-set applies scalar values to any number of entries in one command.\n' +
|
|
26
|
-
' Flags (--link, --asset, --links, --json) apply to single mode only.\n' +
|
|
27
|
-
'Scalars by ID: set entryId:field=value … (same shape as batch set; stays on the page session).\n' +
|
|
28
|
-
'Scalar (default): pass a string, boolean, or number as <value>.\n' +
|
|
29
|
-
'Clear any optional field with null or "" (Symbol, Text, Integer, Number, Boolean, Date, Location, Object, Link, Array, RichText). Required fields reject a clear.\n' +
|
|
30
|
-
"Object keys: set <ref> data.stats --json '[]' patches that key. A positional value is stored as text; use --json for numbers, booleans, arrays, and objects.\n" +
|
|
31
|
-
'Rich text: use --rtf-text | --rtf-markdown (default) | --rtf-html | --rtf-json with a string value, or --json/--json-base64 with a full document. --json null clears it.\n' +
|
|
32
|
-
'Object/JSON: use --json <json>, --json-base64, or --staged <id> (kind=json).\n' +
|
|
33
|
-
'Long plain text: use --content, --content-base64, or --staged <id> (kind=text; rawHtml, customCss, customJs).\n' +
|
|
34
|
-
'Entry link (single): use --link (value = linked entry ID).\n' +
|
|
35
|
-
'Asset link: use --asset (value = asset ID).\n' +
|
|
36
|
-
'Entry link array: use --links (value = comma-separated refs or IDs); full replace, or --append; never use --link on arrays.')
|
|
37
|
-
.option('--link', 'Value is an entry ID for a single-entry link field')
|
|
38
|
-
.option('--asset', 'Value is an asset ID for a single-asset link field')
|
|
39
|
-
.option('--links', 'Value is comma-separated refs or entry IDs; field must be an array of entry links')
|
|
40
|
-
.option('--append', 'With --links: append to existing array instead of replacing')
|
|
41
|
-
.option('--json <json>', 'Inline JSON string to set the field as an Object value')
|
|
42
|
-
.option('--json-base64 <encoded>', 'Base64-encoded JSON object')
|
|
43
|
-
.option('--content <string>', 'Plain text content (for Text or Rich Text fields)')
|
|
44
|
-
.option('--content-base64 <encoded>', 'Base64-encoded plain text content')
|
|
45
|
-
.option('--staged <id>', 'Hosted staged upload: kind=text for Long Text, kind=json for Object/JSON fields.')
|
|
46
|
-
.option('--rtf-text', 'Interpret scalar value as plain text → Rich Text (paragraph breaks)')
|
|
47
|
-
.option('--rtf-markdown', 'Interpret scalar value as Markdown → Rich Text (default for RichText fields)')
|
|
48
|
-
.option('--rtf-html', 'Interpret scalar value as HTML → Rich Text')
|
|
49
|
-
.option('--rtf-json', 'Interpret scalar value as Contentful Rich Text document JSON')
|
|
50
|
-
.action(async (assignments, opts, cmd) => {
|
|
51
|
-
const parentOpts = cmd.parent?.opts() ?? {};
|
|
52
|
-
try {
|
|
53
|
-
// entryId:field=value tokens — apply on the current (page) session when open
|
|
54
|
-
if (everyTokenLooksLikeBatchAssignment(assignments)) {
|
|
55
|
-
const session = await requireSession(parentOpts.session, parentOpts.config);
|
|
56
|
-
if (opts.link ||
|
|
57
|
-
opts.asset ||
|
|
58
|
-
opts.links ||
|
|
59
|
-
opts.json ||
|
|
60
|
-
opts.jsonBase64 ||
|
|
61
|
-
opts.staged) {
|
|
62
|
-
errorMsg('entryId:field=value mode is scalar-only. For links use: set <ref|id> <field> <value> --link or --links.');
|
|
63
|
-
process.exit(1);
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
await handleEntryIdScalarAssignments(assignments, session, parentOpts);
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
// Multi-set mode: all tokens match @ref:field=value
|
|
70
|
-
if (everyTokenLooksLikeMultiAssignment(assignments)) {
|
|
71
|
-
const session = await requireSession(parentOpts.session, parentOpts.config);
|
|
72
|
-
let rtfFormatMulti = 'markdown';
|
|
73
|
-
try {
|
|
74
|
-
rtfFormatMulti = resolveSetRtfFormat(opts);
|
|
75
|
-
}
|
|
76
|
-
catch (e) {
|
|
77
|
-
errorMsg(e instanceof Error ? e.message : String(e));
|
|
78
|
-
process.exit(1);
|
|
79
|
-
}
|
|
80
|
-
const hasRtfMulti = !!(opts.rtfText ||
|
|
81
|
-
opts.rtfMarkdown ||
|
|
82
|
-
opts.rtfHtml ||
|
|
83
|
-
opts.rtfJson);
|
|
84
|
-
if (hasRtfMulti &&
|
|
85
|
-
(opts.link ||
|
|
86
|
-
opts.asset ||
|
|
87
|
-
opts.links ||
|
|
88
|
-
opts.json ||
|
|
89
|
-
opts.jsonBase64 ||
|
|
90
|
-
opts.content ||
|
|
91
|
-
opts.contentBase64 ||
|
|
92
|
-
opts.staged)) {
|
|
93
|
-
errorMsg('Cannot combine --rtf-* with --link, --asset, --links, --json, --json-base64, --content, --content-base64, or --staged in multi-set mode.');
|
|
94
|
-
process.exit(1);
|
|
95
|
-
}
|
|
96
|
-
await handleMultiSet(assignments, session, parentOpts, rtfFormatMulti);
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
const ref = assignments[0];
|
|
100
|
-
const field = assignments[1];
|
|
101
|
-
const rawValue = assignments[2];
|
|
102
|
-
if (!ref || !field) {
|
|
103
|
-
errorMsg('Usage: cms-edit set <ref|entryId> <field> [value]\n' +
|
|
104
|
-
' Or multi: cms-edit set @c1:field="value" @c2:field="value"\n' +
|
|
105
|
-
' Or by ID: cms-edit set <entryId>:field=value …');
|
|
106
|
-
process.exit(1);
|
|
107
|
-
}
|
|
108
|
-
const isObjectMode = opts.json !== undefined || opts.jsonBase64 !== undefined;
|
|
109
|
-
const isTextContentMode = opts.content !== undefined || opts.contentBase64 !== undefined;
|
|
110
|
-
if (isObjectMode && isTextContentMode) {
|
|
111
|
-
errorMsg('Cannot combine object JSON (--json/--json-base64) with --content/--content-base64.');
|
|
112
|
-
process.exit(1);
|
|
113
|
-
}
|
|
114
|
-
if (opts.staged && (isObjectMode || isTextContentMode)) {
|
|
115
|
-
errorMsg('Cannot combine --staged with --json/--json-base64/--content/--content-base64.');
|
|
116
|
-
process.exit(1);
|
|
117
|
-
}
|
|
118
|
-
if (opts.link && opts.links) {
|
|
119
|
-
errorMsg('Cannot use both --link and --links.');
|
|
120
|
-
process.exit(1);
|
|
121
|
-
}
|
|
122
|
-
if (opts.asset && opts.links) {
|
|
123
|
-
errorMsg('Cannot use both --asset and --links.');
|
|
124
|
-
process.exit(1);
|
|
125
|
-
}
|
|
126
|
-
if (opts.link && opts.asset) {
|
|
127
|
-
errorMsg('Cannot use both --link and --asset.');
|
|
128
|
-
process.exit(1);
|
|
129
|
-
}
|
|
130
|
-
if (isObjectMode && (opts.link || opts.asset || opts.links)) {
|
|
131
|
-
errorMsg('Cannot combine --json/--json-base64 with --link, --asset, or --links.');
|
|
132
|
-
process.exit(1);
|
|
133
|
-
}
|
|
134
|
-
if (isTextContentMode && (isObjectMode || opts.link || opts.asset || opts.links)) {
|
|
135
|
-
errorMsg('Cannot combine --content/--content-base64 with --json, --link, --asset, or --links.');
|
|
136
|
-
process.exit(1);
|
|
137
|
-
}
|
|
138
|
-
if (opts.staged && (opts.link || opts.asset || opts.links)) {
|
|
139
|
-
errorMsg('Cannot combine --staged with --link, --asset, or --links.');
|
|
140
|
-
process.exit(1);
|
|
141
|
-
}
|
|
142
|
-
if (opts.append && !opts.links) {
|
|
143
|
-
errorMsg('--append is only valid with --links.');
|
|
144
|
-
process.exit(1);
|
|
145
|
-
}
|
|
146
|
-
const session = await requireSession(parentOpts.session, parentOpts.config);
|
|
147
|
-
const { entry, displayRef } = await resolveRefOrEntryId(session, ref, parentOpts);
|
|
148
|
-
const locale = session.defaultLocale;
|
|
149
|
-
let rtfFormat = 'markdown';
|
|
150
|
-
try {
|
|
151
|
-
rtfFormat = resolveSetRtfFormat(opts);
|
|
152
|
-
}
|
|
153
|
-
catch (e) {
|
|
154
|
-
errorMsg(e instanceof Error ? e.message : String(e));
|
|
155
|
-
process.exit(1);
|
|
156
|
-
}
|
|
157
|
-
const hasRtfFlag = !!(opts.rtfText || opts.rtfMarkdown || opts.rtfHtml || opts.rtfJson);
|
|
158
|
-
if (hasRtfFlag &&
|
|
159
|
-
(opts.link ||
|
|
160
|
-
opts.asset ||
|
|
161
|
-
opts.links ||
|
|
162
|
-
isObjectMode ||
|
|
163
|
-
isTextContentMode ||
|
|
164
|
-
opts.staged)) {
|
|
165
|
-
errorMsg('Cannot combine --rtf-* with --link, --asset, --links, object JSON, --content, or --staged.');
|
|
166
|
-
process.exit(1);
|
|
167
|
-
}
|
|
168
|
-
let fieldId = field;
|
|
169
|
-
let objectPath = [];
|
|
170
|
-
try {
|
|
171
|
-
const split = splitFieldPath(field);
|
|
172
|
-
fieldId = split.fieldId;
|
|
173
|
-
objectPath = split.path;
|
|
174
|
-
}
|
|
175
|
-
catch (err) {
|
|
176
|
-
errorMsg(err instanceof Error ? err.message : String(err));
|
|
177
|
-
process.exit(1);
|
|
178
|
-
}
|
|
179
|
-
let fieldDef;
|
|
180
|
-
let schemaLoaded = false;
|
|
181
|
-
let schemaEnv;
|
|
182
|
-
try {
|
|
183
|
-
const config = loadConfig(parentOpts.config);
|
|
184
|
-
const { space } = resolveSpaceConfig(config, session.spaceKey);
|
|
185
|
-
schemaEnv = await createSafeEnvironment(space);
|
|
186
|
-
const ct = await getContentTypeCached(schemaEnv, session, entry.sys.contentType.sys.id);
|
|
187
|
-
schemaLoaded = true;
|
|
188
|
-
fieldDef = getActiveFieldDef(ct, fieldId);
|
|
189
|
-
}
|
|
190
|
-
catch {
|
|
191
|
-
fieldDef = undefined;
|
|
192
|
-
}
|
|
193
|
-
if (schemaLoaded && !fieldDef) {
|
|
194
|
-
errorMsg(`Unknown field '${fieldId}' on content type '${entry.sys.contentType.sys.id}'.`);
|
|
195
|
-
process.exit(1);
|
|
196
|
-
}
|
|
197
|
-
let parsedJson;
|
|
198
|
-
let hasParsedJson = false;
|
|
199
|
-
let textContent;
|
|
200
|
-
let consumeStaged = null;
|
|
201
|
-
let usedObjectJson = isObjectMode;
|
|
202
|
-
try {
|
|
203
|
-
if (isObjectMode) {
|
|
204
|
-
parsedJson = readJsonInput({
|
|
205
|
-
json: opts.json,
|
|
206
|
-
jsonBase64: opts.jsonBase64,
|
|
207
|
-
label: 'set',
|
|
208
|
-
});
|
|
209
|
-
hasParsedJson = true;
|
|
210
|
-
}
|
|
211
|
-
else if (isTextContentMode) {
|
|
212
|
-
if (opts.content === '' && opts.contentBase64 === undefined) {
|
|
213
|
-
textContent = '';
|
|
214
|
-
}
|
|
215
|
-
else {
|
|
216
|
-
const loaded = await readTextInputWithOptionalStaged({
|
|
217
|
-
content: opts.content,
|
|
218
|
-
base64: opts.contentBase64,
|
|
219
|
-
contentFlag: '--content',
|
|
220
|
-
base64Flag: '--content-base64',
|
|
221
|
-
label: 'set',
|
|
222
|
-
});
|
|
223
|
-
textContent = loaded.text;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
else if (opts.staged) {
|
|
227
|
-
const peeked = await peekStagedUtf8(opts.staged, ['text', 'json']);
|
|
228
|
-
consumeStaged = async () => {
|
|
229
|
-
await consumeStagedUpload(opts.staged);
|
|
230
|
-
};
|
|
231
|
-
if (peeked.kind === 'json') {
|
|
232
|
-
parsedJson = parseJsonString('--staged', peeked.text, 'set', peeked.byteLength);
|
|
233
|
-
hasParsedJson = true;
|
|
234
|
-
usedObjectJson = true;
|
|
235
|
-
}
|
|
236
|
-
else {
|
|
237
|
-
textContent = peeked.text;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
catch (err) {
|
|
242
|
-
errorMsg(err instanceof Error ? err.message : String(err));
|
|
243
|
-
process.exit(1);
|
|
244
|
-
}
|
|
245
|
-
const jsonClears = hasParsedJson && parsedJson === null;
|
|
246
|
-
const textClears = textContent === '';
|
|
247
|
-
if (jsonClears || textClears) {
|
|
248
|
-
const wrote = writeFieldOrExit({
|
|
249
|
-
entry,
|
|
250
|
-
locale,
|
|
251
|
-
field,
|
|
252
|
-
fieldId,
|
|
253
|
-
objectPath,
|
|
254
|
-
fieldDef,
|
|
255
|
-
value: null,
|
|
256
|
-
});
|
|
257
|
-
if (!wrote) {
|
|
258
|
-
successMsg(`No change to ${field} on ${displayRef}.`);
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
await persistFieldChange(wrote, session, entry.sys.id, parentOpts.session);
|
|
262
|
-
await tryConsumeStagedUpload(consumeStaged, 'Field was cleared');
|
|
263
|
-
successMsg(`Cleared ${field} on ${displayRef}.`);
|
|
264
|
-
return;
|
|
265
|
-
}
|
|
266
|
-
if (hasParsedJson) {
|
|
267
|
-
if (objectPath.length === 0 &&
|
|
268
|
-
fieldDef?.type === 'RichText' &&
|
|
269
|
-
!isRtfDocument(parsedJson)) {
|
|
270
|
-
errorMsg(`Field "${field}" is Rich Text — JSON must be a full Rich Text document (root nodeType "document"). Pass --json null to clear it.`);
|
|
271
|
-
process.exit(1);
|
|
272
|
-
}
|
|
273
|
-
if (objectPath.length === 0) {
|
|
274
|
-
const jsonSchemaError = validateJsonSetAgainstFieldSchema(fieldDef, parsedJson, fieldId);
|
|
275
|
-
if (jsonSchemaError) {
|
|
276
|
-
errorMsg(jsonSchemaError);
|
|
277
|
-
process.exit(1);
|
|
278
|
-
return;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
const wrote = writeFieldOrExit({
|
|
282
|
-
entry,
|
|
283
|
-
locale,
|
|
284
|
-
field,
|
|
285
|
-
fieldId,
|
|
286
|
-
objectPath,
|
|
287
|
-
fieldDef,
|
|
288
|
-
value: parsedJson,
|
|
289
|
-
});
|
|
290
|
-
if (!wrote)
|
|
291
|
-
return;
|
|
292
|
-
if (!session.modifiedEntryIds.includes(entry.sys.id)) {
|
|
293
|
-
session.modifiedEntryIds.push(entry.sys.id);
|
|
294
|
-
}
|
|
295
|
-
await saveSession(session, parentOpts.session);
|
|
296
|
-
await tryConsumeStagedUpload(consumeStaged, 'Field was set');
|
|
297
|
-
successMsg(`Set ${field} on ${displayRef} from ${usedObjectJson && opts.staged ? '--staged' : 'JSON'}.`);
|
|
298
|
-
return;
|
|
299
|
-
}
|
|
300
|
-
if (textContent !== undefined) {
|
|
301
|
-
let stored = textContent;
|
|
302
|
-
if (objectPath.length === 0 && fieldDef?.type === 'RichText') {
|
|
303
|
-
const hasExplicitRtfFlag = !!(opts.rtfText ||
|
|
304
|
-
opts.rtfMarkdown ||
|
|
305
|
-
opts.rtfHtml ||
|
|
306
|
-
opts.rtfJson);
|
|
307
|
-
const fmt = hasExplicitRtfFlag ? rtfFormat : 'text';
|
|
308
|
-
try {
|
|
309
|
-
stored = stringToRtfDocument(textContent, fmt);
|
|
310
|
-
}
|
|
311
|
-
catch (e) {
|
|
312
|
-
errorMsg(e instanceof Error ? e.message : String(e));
|
|
313
|
-
process.exit(1);
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
const wrote = writeFieldOrExit({
|
|
317
|
-
entry,
|
|
318
|
-
locale,
|
|
319
|
-
field,
|
|
320
|
-
fieldId,
|
|
321
|
-
objectPath,
|
|
322
|
-
fieldDef,
|
|
323
|
-
value: stored,
|
|
324
|
-
});
|
|
325
|
-
if (!wrote)
|
|
326
|
-
return;
|
|
327
|
-
if (!session.modifiedEntryIds.includes(entry.sys.id)) {
|
|
328
|
-
session.modifiedEntryIds.push(entry.sys.id);
|
|
329
|
-
}
|
|
330
|
-
await saveSession(session, parentOpts.session);
|
|
331
|
-
await tryConsumeStagedUpload(consumeStaged, 'Field was set');
|
|
332
|
-
successMsg(`Set ${field} on ${displayRef} from ${opts.staged ? '--staged' : '--content'}.`);
|
|
333
|
-
return;
|
|
334
|
-
}
|
|
335
|
-
if (rawValue === undefined && !opts.links) {
|
|
336
|
-
errorMsg('Missing value. Provide a <value> argument, null or "" to clear an optional field, --json/--json-base64 for Object fields, --content/--content-base64 for plain text, or --staged <id> on hosted MCP.');
|
|
337
|
-
process.exit(1);
|
|
338
|
-
}
|
|
339
|
-
if (rawValue !== undefined && isClearToken(rawValue)) {
|
|
340
|
-
if (opts.append) {
|
|
341
|
-
errorMsg('Cannot append a clear. Omit --append, or pass null without --links.');
|
|
342
|
-
process.exit(1);
|
|
343
|
-
}
|
|
344
|
-
const wrote = writeFieldOrExit({
|
|
345
|
-
entry,
|
|
346
|
-
locale,
|
|
347
|
-
field,
|
|
348
|
-
fieldId,
|
|
349
|
-
objectPath,
|
|
350
|
-
fieldDef,
|
|
351
|
-
value: null,
|
|
352
|
-
});
|
|
353
|
-
if (!wrote) {
|
|
354
|
-
successMsg(`No change to ${field} on ${displayRef}.`);
|
|
355
|
-
return;
|
|
356
|
-
}
|
|
357
|
-
await persistFieldChange(wrote, session, entry.sys.id, parentOpts.session);
|
|
358
|
-
successMsg(`Cleared ${field} on ${displayRef}.`);
|
|
359
|
-
return;
|
|
360
|
-
}
|
|
361
|
-
if (objectPath.length === 0 &&
|
|
362
|
-
!isObjectMode &&
|
|
363
|
-
!opts.link &&
|
|
364
|
-
!opts.asset &&
|
|
365
|
-
!opts.links) {
|
|
366
|
-
try {
|
|
367
|
-
const conflict = validateScalarSetAgainstFieldSchema(fieldDef);
|
|
368
|
-
if (conflict) {
|
|
369
|
-
errorMsg(formatSetSchemaConflict(displayRef, fieldId, conflict));
|
|
370
|
-
process.exit(1);
|
|
371
|
-
return;
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
catch (err) {
|
|
375
|
-
errorMsg(err instanceof Error ? err.message : String(err));
|
|
376
|
-
process.exit(1);
|
|
377
|
-
return;
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
const effectiveValue = rawValue ?? '';
|
|
381
|
-
if (objectPath.length > 0 && (opts.link || opts.asset || opts.links)) {
|
|
382
|
-
errorMsg(`Nested object key '${field}' cannot be combined with --link, --asset, or --links.`);
|
|
383
|
-
process.exit(1);
|
|
384
|
-
}
|
|
385
|
-
if (opts.links) {
|
|
386
|
-
try {
|
|
387
|
-
const config = loadConfig(parentOpts.config);
|
|
388
|
-
const { space } = resolveSpaceConfig(config, session.spaceKey);
|
|
389
|
-
const env = await createSafeEnvironment(space);
|
|
390
|
-
const ct = await getContentTypeCached(env, session, entry.sys.contentType.sys.id);
|
|
391
|
-
const linksFieldDef = getActiveFieldDef(ct, fieldId);
|
|
392
|
-
const linksError = validateLinksSetAgainstFieldSchema(linksFieldDef, fieldId);
|
|
393
|
-
if (linksError) {
|
|
394
|
-
errorMsg(linksError);
|
|
395
|
-
process.exit(1);
|
|
396
|
-
return;
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
catch (err) {
|
|
400
|
-
warnMsg(`Could not validate field schema: ${err instanceof Error ? err.message : String(err)}. Proceeding anyway.`);
|
|
401
|
-
}
|
|
402
|
-
const entryIds = parseRefsOrIds(session, effectiveValue);
|
|
403
|
-
const linkArray = entryIds.map((id) => makeEntryLink(id));
|
|
404
|
-
if (!entry.fields[field]) {
|
|
405
|
-
entry.fields[field] = {};
|
|
406
|
-
}
|
|
407
|
-
const fieldLocaleMap = entry.fields[field];
|
|
408
|
-
const existing = readLocaleValue(fieldLocaleMap, locale);
|
|
409
|
-
const current = Array.isArray(existing) ? existing : [];
|
|
410
|
-
const newValue = opts.append ? [...current, ...linkArray] : linkArray;
|
|
411
|
-
fieldLocaleMap[locale] = newValue;
|
|
412
|
-
if (!session.modifiedEntryIds.includes(entry.sys.id)) {
|
|
413
|
-
session.modifiedEntryIds.push(entry.sys.id);
|
|
414
|
-
}
|
|
415
|
-
await saveSession(session, parentOpts.session);
|
|
416
|
-
successMsg(opts.append
|
|
417
|
-
? `Appended ${linkArray.length} link(s) to ${field} on ${displayRef}.`
|
|
418
|
-
: `Set ${field} on ${displayRef} to ${linkArray.length} link(s).`);
|
|
419
|
-
return;
|
|
420
|
-
}
|
|
421
|
-
if (opts.link) {
|
|
422
|
-
const linkError = validateLinkSetAgainstFieldSchema(fieldDef, fieldId, displayRef);
|
|
423
|
-
if (linkError) {
|
|
424
|
-
errorMsg(linkError);
|
|
425
|
-
process.exit(1);
|
|
426
|
-
return;
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
let value;
|
|
430
|
-
try {
|
|
431
|
-
if (opts.link) {
|
|
432
|
-
value = makeEntryLink(effectiveValue.trim());
|
|
433
|
-
}
|
|
434
|
-
else if (opts.asset) {
|
|
435
|
-
value = makeAssetLink(effectiveValue.trim());
|
|
436
|
-
}
|
|
437
|
-
else if (objectPath.length > 0) {
|
|
438
|
-
value = effectiveValue;
|
|
439
|
-
}
|
|
440
|
-
else if (schemaEnv) {
|
|
441
|
-
value = await resolveScalarRefreshingEnum(schemaEnv, session, entry.sys.contentType.sys.id, fieldId, effectiveValue, fieldDef);
|
|
442
|
-
}
|
|
443
|
-
else {
|
|
444
|
-
value = resolveScalarValueForField(effectiveValue, fieldDef, fieldId);
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
catch (err) {
|
|
448
|
-
errorMsg(err instanceof Error ? err.message : String(err));
|
|
449
|
-
process.exit(1);
|
|
450
|
-
return;
|
|
451
|
-
}
|
|
452
|
-
value = coerceSlugFieldValue(fieldId, value);
|
|
453
|
-
if (objectPath.length === 0 &&
|
|
454
|
-
!opts.link &&
|
|
455
|
-
!opts.asset &&
|
|
456
|
-
fieldDef?.type === 'RichText' &&
|
|
457
|
-
typeof value === 'string') {
|
|
458
|
-
try {
|
|
459
|
-
value = stringToRtfDocument(value, rtfFormat);
|
|
460
|
-
}
|
|
461
|
-
catch (e) {
|
|
462
|
-
errorMsg(e instanceof Error ? e.message : String(e));
|
|
463
|
-
process.exit(1);
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
const wrote = writeFieldOrExit({
|
|
467
|
-
entry,
|
|
468
|
-
locale,
|
|
469
|
-
field,
|
|
470
|
-
fieldId,
|
|
471
|
-
objectPath,
|
|
472
|
-
fieldDef,
|
|
473
|
-
value,
|
|
474
|
-
});
|
|
475
|
-
if (!wrote)
|
|
476
|
-
return;
|
|
477
|
-
if (!session.modifiedEntryIds.includes(entry.sys.id)) {
|
|
478
|
-
session.modifiedEntryIds.push(entry.sys.id);
|
|
479
|
-
}
|
|
480
|
-
await saveSession(session, parentOpts.session);
|
|
481
|
-
// SEO field warnings
|
|
482
|
-
if (!opts.link && !opts.asset && typeof value === 'string') {
|
|
483
|
-
if (field === 'description' && value.length > 160) {
|
|
484
|
-
warnMsg(`'description' is ${String(value.length)} chars — SEO meta descriptions should be 160 chars or fewer.`);
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
successMsg(opts.link
|
|
488
|
-
? `Set ${field} on ${displayRef} to entry link → ${effectiveValue.trim()}`
|
|
489
|
-
: opts.asset
|
|
490
|
-
? `Set ${field} on ${displayRef} to asset link → ${effectiveValue.trim()}`
|
|
491
|
-
: `Set ${field} on ${displayRef} to: ${JSON.stringify(value)}`);
|
|
492
|
-
if (field === 'heading' && typeof value === 'string') {
|
|
493
|
-
const cmsLabelVal = entry.fields['cmsLabel']?.[locale];
|
|
494
|
-
const compType = entry.fields['componentType']?.[locale] ??
|
|
495
|
-
entry.fields['collectionType']?.[locale] ??
|
|
496
|
-
entry.fields['externalComponentType']?.[locale];
|
|
497
|
-
const typeName = typeof compType === 'string' ? compType : 'component';
|
|
498
|
-
if (typeof cmsLabelVal === 'string' && cmsLabelVal === `New ${typeName}`) {
|
|
499
|
-
infoMsg(`Tip: set cmsLabel on ${displayRef} so editors can tell this block apart — e.g. set ${displayRef} cmsLabel "${value.slice(0, 60)}"`);
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
catch (err) {
|
|
504
|
-
errorMsg(err instanceof Error ? err.message : String(err));
|
|
505
|
-
process.exit(1);
|
|
506
|
-
}
|
|
507
|
-
});
|
|
508
|
-
}
|
|
509
|
-
/** Resolve @ref or bare Contentful entry ID (fetch into session if missing). */
|
|
510
|
-
async function resolveRefOrEntryId(session, refOrId, parentOpts) {
|
|
511
|
-
if (refOrId.startsWith('@') || session.refs[refOrId] || session.refs[`@${refOrId}`]) {
|
|
512
|
-
const entry = resolveRef(session, refOrId);
|
|
513
|
-
const displayRef = session.refsByEntry[entry.sys.id] ?? refOrId;
|
|
514
|
-
return { entry, displayRef };
|
|
515
|
-
}
|
|
516
|
-
// Already loaded as detached / tree entry by ID
|
|
517
|
-
if (session.entries[refOrId]) {
|
|
518
|
-
const entry = session.entries[refOrId];
|
|
519
|
-
const displayRef = session.refsByEntry[refOrId] ?? refOrId;
|
|
520
|
-
return { entry, displayRef };
|
|
521
|
-
}
|
|
522
|
-
// Fetch into session (mid-session edit of media or other out-of-tree entries)
|
|
523
|
-
if (!/^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$/.test(refOrId)) {
|
|
524
|
-
throw new Error(`Ref or entry ID "${refOrId}" not found. Use @cN / @root, or a Contentful entry ID.`);
|
|
525
|
-
}
|
|
526
|
-
const config = loadConfig(parentOpts.config);
|
|
527
|
-
const { space } = resolveSpaceConfig(config, session.spaceKey);
|
|
528
|
-
const env = await createSafeEnvironment(space);
|
|
529
|
-
const fetched = await env.getEntry(refOrId);
|
|
530
|
-
const serialized = serializeEntry(fetched);
|
|
531
|
-
session.entries[refOrId] = serialized;
|
|
532
|
-
if (!session.originalEntries[refOrId]) {
|
|
533
|
-
session.originalEntries[refOrId] = JSON.parse(JSON.stringify(serialized));
|
|
534
|
-
}
|
|
535
|
-
// Detached: track by id so diff/save work; no tree node required
|
|
536
|
-
if (!session.refsByEntry[refOrId]) {
|
|
537
|
-
session.refsByEntry[refOrId] = refOrId;
|
|
538
|
-
}
|
|
539
|
-
await saveSession(session, parentOpts.session);
|
|
540
|
-
infoMsg(`Loaded entry ${refOrId} into session for mid-session edit (not in page tree).`);
|
|
541
|
-
return { entry: serialized, displayRef: refOrId };
|
|
542
|
-
}
|
|
543
|
-
/**
|
|
544
|
-
* Apply entryId:field=value scalars on the current session (page or batch).
|
|
545
|
-
* Same shape as `batch set`, but does not require leaving a page session.
|
|
546
|
-
*/
|
|
547
|
-
async function handleEntryIdScalarAssignments(tokens, session, parentOpts) {
|
|
548
|
-
let parsed;
|
|
549
|
-
try {
|
|
550
|
-
parsed = parseBatchSetAssignments(tokens);
|
|
551
|
-
}
|
|
552
|
-
catch (err) {
|
|
553
|
-
errorMsg(err instanceof Error ? err.message : String(err));
|
|
554
|
-
process.exit(1);
|
|
555
|
-
return;
|
|
556
|
-
}
|
|
557
|
-
const config = loadConfig(parentOpts.config);
|
|
558
|
-
const { space } = resolveSpaceConfig(config, session.spaceKey);
|
|
559
|
-
const env = await createSafeEnvironment(space);
|
|
560
|
-
const locale = session.defaultLocale;
|
|
561
|
-
const uniqueEntryIds = [...new Set(parsed.map((p) => p.entryId))];
|
|
562
|
-
for (const entryId of uniqueEntryIds) {
|
|
563
|
-
if (!session.entries[entryId]) {
|
|
564
|
-
const fetched = await env.getEntry(entryId);
|
|
565
|
-
const serialized = serializeEntry(fetched);
|
|
566
|
-
session.entries[entryId] = serialized;
|
|
567
|
-
if (!session.originalEntries[entryId]) {
|
|
568
|
-
session.originalEntries[entryId] = JSON.parse(JSON.stringify(serialized));
|
|
569
|
-
}
|
|
570
|
-
if (!session.refsByEntry[entryId]) {
|
|
571
|
-
session.refsByEntry[entryId] = entryId;
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
const ctByContentTypeId = new Map();
|
|
576
|
-
for (const { entryId, field } of parsed) {
|
|
577
|
-
const entry = session.entries[entryId];
|
|
578
|
-
if (!entry)
|
|
579
|
-
throw new Error(`Failed to load entry ${entryId}`);
|
|
580
|
-
const ctId = entry.sys.contentType.sys.id;
|
|
581
|
-
let ct = ctByContentTypeId.get(ctId);
|
|
582
|
-
if (!ct) {
|
|
583
|
-
ct = await getContentTypeCached(env, session, ctId);
|
|
584
|
-
ctByContentTypeId.set(ctId, ct);
|
|
585
|
-
}
|
|
586
|
-
const fieldDef = getActiveFieldDef(ct, field);
|
|
587
|
-
if (!fieldDef) {
|
|
588
|
-
throw new Error(`Entry ${entryId}: unknown field '${field}'.`);
|
|
589
|
-
}
|
|
590
|
-
const conflict = validateScalarSetAgainstFieldSchema(fieldDef);
|
|
591
|
-
if (conflict) {
|
|
592
|
-
throw new Error(`Entry ${entryId}: field '${field}' requires a specialized set mode (${conflict.kind}). ` +
|
|
593
|
-
`Use set <id> <field> … with --link/--links for link fields.`);
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
for (const { entryId, field, raw } of parsed) {
|
|
597
|
-
const entry = session.entries[entryId];
|
|
598
|
-
if (!entry)
|
|
599
|
-
continue;
|
|
600
|
-
const ctId = entry.sys.contentType.sys.id;
|
|
601
|
-
const ct = ctByContentTypeId.get(ctId);
|
|
602
|
-
const fieldDef = ct ? getActiveFieldDef(ct, field) : undefined;
|
|
603
|
-
const value = await resolveScalarRefreshingEnum(env, session, ctId, field, raw, fieldDef);
|
|
604
|
-
if (!entry.fields[field])
|
|
605
|
-
entry.fields[field] = {};
|
|
606
|
-
entry.fields[field][locale] = value;
|
|
607
|
-
if (!session.modifiedEntryIds.includes(entryId)) {
|
|
608
|
-
session.modifiedEntryIds.push(entryId);
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
await saveSession(session, parentOpts.session);
|
|
612
|
-
successMsg(`Queued ${parsed.length} field update${parsed.length !== 1 ? 's' : ''} on ${uniqueEntryIds.length} entr${uniqueEntryIds.length !== 1 ? 'ies' : 'y'} in the current session. Run 'cms-edit diff' then 'cms-edit save'.`);
|
|
613
|
-
}
|
|
614
|
-
function isEnumRejection(err) {
|
|
615
|
-
return err instanceof Error && err.message.startsWith('Invalid value for ');
|
|
616
|
-
}
|
|
617
|
-
/**
|
|
618
|
-
* Enum lists are cached with the content type. A newly published value is rejected
|
|
619
|
-
* until that cache is replaced, so retry once against the live content type.
|
|
620
|
-
*/
|
|
621
|
-
async function resolveScalarRefreshingEnum(env, session, contentTypeId, fieldId, raw, fieldDef) {
|
|
622
|
-
try {
|
|
623
|
-
return resolveScalarValueForField(raw, fieldDef, fieldId);
|
|
624
|
-
}
|
|
625
|
-
catch (err) {
|
|
626
|
-
if (!isEnumRejection(err))
|
|
627
|
-
throw err;
|
|
628
|
-
try {
|
|
629
|
-
const fresh = await refreshContentType(env, session, contentTypeId);
|
|
630
|
-
const nextDef = getActiveFieldDef(fresh, fieldId);
|
|
631
|
-
return resolveScalarValueForField(raw, nextDef, fieldId);
|
|
632
|
-
}
|
|
633
|
-
catch (refreshErr) {
|
|
634
|
-
if (isEnumRejection(refreshErr))
|
|
635
|
-
throw refreshErr;
|
|
636
|
-
throw err;
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
async function persistFieldChange(changed, session, entryId, sessionName) {
|
|
641
|
-
if (!changed)
|
|
642
|
-
return;
|
|
643
|
-
if (!session.modifiedEntryIds.includes(entryId)) {
|
|
644
|
-
session.modifiedEntryIds.push(entryId);
|
|
645
|
-
}
|
|
646
|
-
await saveSession(session, sessionName);
|
|
647
|
-
}
|
|
648
|
-
function writeFieldOrExit(args) {
|
|
649
|
-
try {
|
|
650
|
-
if (args.objectPath.length > 0) {
|
|
651
|
-
if (!args.fieldDef) {
|
|
652
|
-
throw new Error(`Cannot patch '${args.field}' without a content type. Retry when the schema is available.`);
|
|
653
|
-
}
|
|
654
|
-
if (args.fieldDef.type !== 'Object') {
|
|
655
|
-
throw new Error(`Field '${args.fieldId}' is ${args.fieldDef.type}, not Object. Nested keys can only be set on Object fields.`);
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
if (args.value === null && args.objectPath.length === 0 && args.fieldDef?.required) {
|
|
659
|
-
throw new Error(requiredFieldClearError(args.fieldId));
|
|
660
|
-
}
|
|
661
|
-
return assignFieldValue(args.entry.fields, args.locale, args.fieldId, args.objectPath, args.value);
|
|
662
|
-
}
|
|
663
|
-
catch (err) {
|
|
664
|
-
errorMsg(err instanceof Error ? err.message : String(err));
|
|
665
|
-
process.exit(1);
|
|
666
|
-
return false;
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
function formatSetSchemaConflict(ref, field, conflict) {
|
|
670
|
-
switch (conflict.kind) {
|
|
671
|
-
case 'entryLink':
|
|
672
|
-
return `'${field}' is an Entry link field — use: cms-edit set ${ref} ${field} <entry-id> --link`;
|
|
673
|
-
case 'assetLink':
|
|
674
|
-
return (`'${field}' is an Asset link field — use: cms-edit asset set ${ref} ${field} <asset-id>\n` +
|
|
675
|
-
` (or use: cms-edit set ${ref} ${field} <asset-id> --asset)`);
|
|
676
|
-
case 'entryLinkArray':
|
|
677
|
-
return `'${field}' holds entry links — use: cms-edit set ${ref} ${field} <refs-or-ids> --links`;
|
|
678
|
-
case 'assetLinkArray':
|
|
679
|
-
return `'${field}' holds asset links — use --json/--json-base64 with a valid link array, or manage assets with cms-edit asset.`;
|
|
680
|
-
case 'symbolArray':
|
|
681
|
-
return (`'${field}' is an array of strings — use --json/--json-base64 with a JSON string array.\n` +
|
|
682
|
-
` Example: cms-edit set ${ref} ${field} --json '["/html-components/feature/lib.js"]'`);
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
function parseRefsOrIds(session, raw) {
|
|
686
|
-
const tokens = raw
|
|
687
|
-
.split(',')
|
|
688
|
-
.map((t) => t.trim())
|
|
689
|
-
.filter(Boolean);
|
|
690
|
-
const ids = [];
|
|
691
|
-
for (const token of tokens) {
|
|
692
|
-
if (token.startsWith('@')) {
|
|
693
|
-
ids.push(resolveRefToId(session, token));
|
|
694
|
-
}
|
|
695
|
-
else {
|
|
696
|
-
ids.push(token);
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
return ids;
|
|
700
|
-
}
|
|
701
|
-
/**
|
|
702
|
-
* Handles multi-set mode: applies scalar values to multiple entries in one command.
|
|
703
|
-
* Token format: @ref:fieldName=value (e.g. @c1:cmsLabel=Hero — School avoidance)
|
|
704
|
-
*/
|
|
705
|
-
function resolveSetRtfFormat(opts) {
|
|
706
|
-
const chosen = [];
|
|
707
|
-
if (opts.rtfText)
|
|
708
|
-
chosen.push('text');
|
|
709
|
-
if (opts.rtfMarkdown)
|
|
710
|
-
chosen.push('markdown');
|
|
711
|
-
if (opts.rtfHtml)
|
|
712
|
-
chosen.push('html');
|
|
713
|
-
if (opts.rtfJson)
|
|
714
|
-
chosen.push('json');
|
|
715
|
-
if (chosen.length > 1) {
|
|
716
|
-
throw new Error('Use only one of --rtf-text, --rtf-markdown, --rtf-html, --rtf-json');
|
|
717
|
-
}
|
|
718
|
-
return chosen[0] ?? 'markdown';
|
|
719
|
-
}
|
|
720
|
-
function coerceSlugFieldValue(fieldId, value) {
|
|
721
|
-
if (!isSlugFieldId(fieldId) || typeof value !== 'string') {
|
|
722
|
-
return value;
|
|
723
|
-
}
|
|
724
|
-
const normalized = normalizeSlug(value);
|
|
725
|
-
const slugErr = validateSlugFieldValue(normalized);
|
|
726
|
-
if (slugErr) {
|
|
727
|
-
errorMsg(slugErr);
|
|
728
|
-
process.exit(1);
|
|
729
|
-
}
|
|
730
|
-
return normalized;
|
|
731
|
-
}
|
|
732
|
-
async function handleMultiSet(tokens, session, parentOpts, rtfFormat) {
|
|
733
|
-
let parsed;
|
|
734
|
-
try {
|
|
735
|
-
parsed = parseMultiSetAssignments(tokens);
|
|
736
|
-
}
|
|
737
|
-
catch (err) {
|
|
738
|
-
errorMsg(err instanceof Error ? err.message : String(err));
|
|
739
|
-
process.exit(1);
|
|
740
|
-
return;
|
|
741
|
-
}
|
|
742
|
-
const entryByRef = new Map();
|
|
743
|
-
for (const { ref } of parsed) {
|
|
744
|
-
if (!entryByRef.has(ref)) {
|
|
745
|
-
entryByRef.set(ref, resolveRef(session, ref));
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
const config = loadConfig(parentOpts.config);
|
|
749
|
-
const { space } = resolveSpaceConfig(config, session.spaceKey);
|
|
750
|
-
const env = await createSafeEnvironment(space);
|
|
751
|
-
const ctByContentTypeId = new Map();
|
|
752
|
-
for (const { ref, field } of parsed) {
|
|
753
|
-
const entry = entryByRef.get(ref);
|
|
754
|
-
const ctId = entry.sys.contentType.sys.id;
|
|
755
|
-
let ct = ctByContentTypeId.get(ctId);
|
|
756
|
-
if (!ct) {
|
|
757
|
-
ct = await getContentTypeCached(env, session, ctId);
|
|
758
|
-
ctByContentTypeId.set(ctId, ct);
|
|
759
|
-
}
|
|
760
|
-
const fieldDef = getActiveFieldDef(ct, field);
|
|
761
|
-
if (!fieldDef) {
|
|
762
|
-
errorMsg(`Unknown field '${field}' on content type '${ctId}'.`);
|
|
763
|
-
process.exit(1);
|
|
764
|
-
return;
|
|
765
|
-
}
|
|
766
|
-
const conflict = validateScalarSetAgainstFieldSchema(fieldDef);
|
|
767
|
-
if (conflict) {
|
|
768
|
-
errorMsg(formatSetSchemaConflict(ref, field, conflict));
|
|
769
|
-
process.exit(1);
|
|
770
|
-
return;
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
const locale = session.defaultLocale;
|
|
774
|
-
const applied = [];
|
|
775
|
-
for (const { ref, field, raw } of parsed) {
|
|
776
|
-
const entry = entryByRef.get(ref);
|
|
777
|
-
const ctId = entry.sys.contentType.sys.id;
|
|
778
|
-
let ct = ctByContentTypeId.get(ctId);
|
|
779
|
-
if (!ct) {
|
|
780
|
-
ct = await getContentTypeCached(env, session, ctId);
|
|
781
|
-
ctByContentTypeId.set(ctId, ct);
|
|
782
|
-
}
|
|
783
|
-
const fd = getActiveFieldDef(ct, field);
|
|
784
|
-
let value = await resolveScalarRefreshingEnum(env, session, ctId, field, raw, fd);
|
|
785
|
-
value = coerceSlugFieldValue(field, value);
|
|
786
|
-
if (fd?.type === 'RichText' && typeof value === 'string') {
|
|
787
|
-
try {
|
|
788
|
-
value = stringToRtfDocument(value, rtfFormat);
|
|
789
|
-
}
|
|
790
|
-
catch (e) {
|
|
791
|
-
errorMsg(e instanceof Error ? e.message : String(e));
|
|
792
|
-
process.exit(1);
|
|
793
|
-
return;
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
if (!entry.fields[field]) {
|
|
797
|
-
entry.fields[field] = {};
|
|
798
|
-
}
|
|
799
|
-
entry.fields[field][locale] = value;
|
|
800
|
-
if (!session.modifiedEntryIds.includes(entry.sys.id)) {
|
|
801
|
-
session.modifiedEntryIds.push(entry.sys.id);
|
|
802
|
-
}
|
|
803
|
-
applied.push(ref);
|
|
804
|
-
}
|
|
805
|
-
await saveSession(session);
|
|
806
|
-
successMsg(`Set field on ${applied.length} entr${applied.length === 1 ? 'y' : 'ies'}: ${applied.join(', ')}`);
|
|
807
|
-
}
|
|
808
|
-
//# sourceMappingURL=set.js.map
|