@sanity/cli 6.0.0 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/README.md +78 -111
  2. package/dist/actions/mcp/detectAvailableEditors.js +19 -10
  3. package/dist/actions/mcp/detectAvailableEditors.js.map +1 -1
  4. package/dist/actions/mcp/editorConfigs.js +222 -158
  5. package/dist/actions/mcp/editorConfigs.js.map +1 -1
  6. package/dist/actions/mcp/promptForMCPSetup.js +16 -7
  7. package/dist/actions/mcp/promptForMCPSetup.js.map +1 -1
  8. package/dist/actions/mcp/setupMCP.js +62 -23
  9. package/dist/actions/mcp/setupMCP.js.map +1 -1
  10. package/dist/actions/mcp/types.js.map +1 -1
  11. package/dist/actions/mcp/validateEditorTokens.js +56 -0
  12. package/dist/actions/mcp/validateEditorTokens.js.map +1 -0
  13. package/dist/actions/telemetry/telemetryDebug.js +2 -2
  14. package/dist/actions/telemetry/telemetryDebug.js.map +1 -1
  15. package/dist/commands/init.js +9 -4
  16. package/dist/commands/init.js.map +1 -1
  17. package/dist/commands/mcp/configure.js +3 -1
  18. package/dist/commands/mcp/configure.js.map +1 -1
  19. package/dist/commands/preview.js +3 -4
  20. package/dist/commands/preview.js.map +1 -1
  21. package/dist/hooks/prerun/setupTelemetry.js +7 -7
  22. package/dist/hooks/prerun/setupTelemetry.js.map +1 -1
  23. package/dist/services/mcp.js +55 -1
  24. package/dist/services/mcp.js.map +1 -1
  25. package/dist/util/getLocalPackageVersion.js +4 -2
  26. package/dist/util/getLocalPackageVersion.js.map +1 -1
  27. package/dist/util/getProjectDefaults.js +22 -28
  28. package/dist/util/getProjectDefaults.js.map +1 -1
  29. package/dist/util/gitConfig.js +45 -0
  30. package/dist/util/gitConfig.js.map +1 -0
  31. package/dist/util/telemetry/telemetryStoreDebug.js +2 -2
  32. package/dist/util/telemetry/telemetryStoreDebug.js.map +1 -1
  33. package/oclif.manifest.json +454 -454
  34. package/package.json +3 -5
@@ -859,9 +859,7 @@
859
859
  ]
860
860
  },
861
861
  "preview": {
862
- "aliases": [
863
- "start"
864
- ],
862
+ "aliases": [],
865
863
  "args": {
866
864
  "outputDir": {
867
865
  "description": "Output directory",
@@ -891,7 +889,9 @@
891
889
  }
892
890
  },
893
891
  "hasDynamicHelp": false,
894
- "hiddenAliases": [],
892
+ "hiddenAliases": [
893
+ "start"
894
+ ],
895
895
  "id": "preview",
896
896
  "pluginAlias": "@sanity/cli",
897
897
  "pluginName": "@sanity/cli",
@@ -3628,24 +3628,120 @@
3628
3628
  "list.js"
3629
3629
  ]
3630
3630
  },
3631
- "schema:delete": {
3631
+ "telemetry:disable": {
3632
3632
  "aliases": [],
3633
3633
  "args": {},
3634
- "description": "Delete schema documents by id",
3634
+ "description": "Disable telemetry for your logged in user",
3635
3635
  "examples": [
3636
3636
  {
3637
- "command": "<%= config.bin %> <%= command.id %> --ids sanity.workspace.schema.workspaceName",
3638
- "description": "Delete a single schema"
3637
+ "command": "<%= config.bin %> telemetry <%= command.id %>",
3638
+ "description": "Disable telemetry for your logged in user"
3639
+ }
3640
+ ],
3641
+ "flags": {},
3642
+ "hasDynamicHelp": false,
3643
+ "hiddenAliases": [],
3644
+ "id": "telemetry:disable",
3645
+ "pluginAlias": "@sanity/cli",
3646
+ "pluginName": "@sanity/cli",
3647
+ "pluginType": "core",
3648
+ "strict": true,
3649
+ "isESM": true,
3650
+ "relativePath": [
3651
+ "dist",
3652
+ "commands",
3653
+ "telemetry",
3654
+ "disable.js"
3655
+ ]
3656
+ },
3657
+ "telemetry:enable": {
3658
+ "aliases": [],
3659
+ "args": {},
3660
+ "description": "Enable telemetry for your logged in user",
3661
+ "examples": [
3662
+ {
3663
+ "command": "<%= config.bin %> telemetry <%= command.id %>",
3664
+ "description": "Enable telemetry for your logged in user"
3665
+ }
3666
+ ],
3667
+ "flags": {},
3668
+ "hasDynamicHelp": false,
3669
+ "hiddenAliases": [],
3670
+ "id": "telemetry:enable",
3671
+ "pluginAlias": "@sanity/cli",
3672
+ "pluginName": "@sanity/cli",
3673
+ "pluginType": "core",
3674
+ "strict": true,
3675
+ "isESM": true,
3676
+ "relativePath": [
3677
+ "dist",
3678
+ "commands",
3679
+ "telemetry",
3680
+ "enable.js"
3681
+ ]
3682
+ },
3683
+ "telemetry:status": {
3684
+ "aliases": [],
3685
+ "args": {},
3686
+ "description": "Check telemetry consent status for your logged in user",
3687
+ "examples": [
3688
+ {
3689
+ "command": "<%= config.bin %> telemetry <%= command.id %>",
3690
+ "description": "Check telemetry consent status for your logged in user"
3691
+ }
3692
+ ],
3693
+ "flags": {},
3694
+ "hasDynamicHelp": false,
3695
+ "hiddenAliases": [],
3696
+ "id": "telemetry:status",
3697
+ "pluginAlias": "@sanity/cli",
3698
+ "pluginName": "@sanity/cli",
3699
+ "pluginType": "core",
3700
+ "strict": true,
3701
+ "isESM": true,
3702
+ "relativePath": [
3703
+ "dist",
3704
+ "commands",
3705
+ "telemetry",
3706
+ "status.js"
3707
+ ]
3708
+ },
3709
+ "tokens:add": {
3710
+ "aliases": [],
3711
+ "args": {
3712
+ "label": {
3713
+ "description": "Label for the new token",
3714
+ "name": "label",
3715
+ "required": false
3716
+ }
3717
+ },
3718
+ "description": "Create a new API token for this project",
3719
+ "examples": [
3720
+ {
3721
+ "command": "<%= config.bin %> <%= command.id %> \"My API Token\"",
3722
+ "description": "Create a token with a label"
3639
3723
  },
3640
3724
  {
3641
- "command": "<%= config.bin %> <%= command.id %> --ids sanity.workspace.schema.workspaceName,prefix.sanity.workspace.schema.otherWorkspace",
3642
- "description": "Delete multiple schemas"
3725
+ "command": "<%= config.bin %> <%= command.id %> \"My API Token\" --role=editor",
3726
+ "description": "Create a token with editor role"
3727
+ },
3728
+ {
3729
+ "command": "<%= config.bin %> <%= command.id %> \"CI Token\" --role=editor --yes",
3730
+ "description": "Create a token in unattended mode"
3731
+ },
3732
+ {
3733
+ "command": "<%= config.bin %> <%= command.id %> \"API Token\" --json",
3734
+ "description": "Output token information as JSON"
3735
+ },
3736
+ {
3737
+ "command": "<%= config.bin %> <%= command.id %> \"My Token\" --project-id abc123 --role=editor",
3738
+ "description": "Create a token for a specific project"
3643
3739
  }
3644
3740
  ],
3645
3741
  "flags": {
3646
3742
  "project-id": {
3647
3743
  "char": "p",
3648
- "description": "Project ID to delete schema from (overrides CLI configuration)",
3744
+ "description": "Project ID to add token to (overrides CLI configuration)",
3649
3745
  "helpGroup": "OVERRIDE",
3650
3746
  "name": "project-id",
3651
3747
  "hasDynamicHelp": false,
@@ -3653,49 +3749,31 @@
3653
3749
  "multiple": false,
3654
3750
  "type": "option"
3655
3751
  },
3656
- "dataset": {
3657
- "char": "d",
3658
- "description": "Delete schemas from a specific dataset",
3659
- "name": "dataset",
3660
- "hasDynamicHelp": false,
3661
- "helpValue": "<name>",
3662
- "multiple": false,
3663
- "type": "option"
3664
- },
3665
- "extract-manifest": {
3666
- "description": "Generate manifest file (disable with --no-extract-manifest)",
3667
- "hidden": true,
3668
- "name": "extract-manifest",
3669
- "allowNo": true,
3752
+ "json": {
3753
+ "description": "Output as JSON",
3754
+ "name": "json",
3755
+ "allowNo": false,
3670
3756
  "type": "boolean"
3671
3757
  },
3672
- "ids": {
3673
- "description": "Comma-separated list of schema ids to delete",
3674
- "name": "ids",
3675
- "required": true,
3676
- "hasDynamicHelp": false,
3677
- "multiple": false,
3678
- "type": "option"
3679
- },
3680
- "manifest-dir": {
3681
- "description": "Directory containing manifest file",
3682
- "hidden": true,
3683
- "name": "manifest-dir",
3684
- "default": "./dist/static",
3758
+ "role": {
3759
+ "description": "Role to assign to the token",
3760
+ "name": "role",
3685
3761
  "hasDynamicHelp": false,
3762
+ "helpValue": "viewer",
3686
3763
  "multiple": false,
3687
3764
  "type": "option"
3688
3765
  },
3689
- "verbose": {
3690
- "description": "Enable verbose logging",
3691
- "name": "verbose",
3766
+ "yes": {
3767
+ "char": "y",
3768
+ "description": "Skip prompts and use defaults (unattended mode)",
3769
+ "name": "yes",
3692
3770
  "allowNo": false,
3693
3771
  "type": "boolean"
3694
3772
  }
3695
3773
  },
3696
3774
  "hasDynamicHelp": false,
3697
3775
  "hiddenAliases": [],
3698
- "id": "schema:delete",
3776
+ "id": "tokens:add",
3699
3777
  "pluginAlias": "@sanity/cli",
3700
3778
  "pluginName": "@sanity/cli",
3701
3779
  "pluginType": "core",
@@ -3704,66 +3782,63 @@
3704
3782
  "relativePath": [
3705
3783
  "dist",
3706
3784
  "commands",
3707
- "schema",
3708
- "delete.js"
3785
+ "tokens",
3786
+ "add.js"
3709
3787
  ]
3710
3788
  },
3711
- "schema:deploy": {
3789
+ "tokens:delete": {
3712
3790
  "aliases": [],
3713
- "args": {},
3714
- "description": "Deploy schema documents into workspace datasets.\n\n**Note**: This command is experimental and subject to change.\n\nThis operation (re-)generates a manifest file describing the sanity config workspace by default.\nTo re-use an existing manifest file, use --no-extract-manifest.",
3791
+ "args": {
3792
+ "tokenId": {
3793
+ "description": "Token ID to delete (will prompt if not provided)",
3794
+ "name": "tokenId",
3795
+ "required": false
3796
+ }
3797
+ },
3798
+ "description": "Delete an API token from this project",
3715
3799
  "examples": [
3716
3800
  {
3717
3801
  "command": "<%= config.bin %> <%= command.id %>",
3718
- "description": "Deploy all workspace schemas"
3802
+ "description": "Interactively select and delete a token"
3719
3803
  },
3720
3804
  {
3721
- "command": "<%= config.bin %> <%= command.id %> --workspace default",
3722
- "description": "Deploy the schema for only the workspace \"default\""
3805
+ "command": "<%= config.bin %> <%= command.id %> silJ2lFmK6dONB",
3806
+ "description": "Delete a specific token by ID"
3807
+ },
3808
+ {
3809
+ "command": "<%= config.bin %> <%= command.id %> silJ2lFmK6dONB --yes",
3810
+ "description": "Delete a specific token without confirmation prompt"
3811
+ },
3812
+ {
3813
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3814
+ "description": "Delete a token from a specific project"
3723
3815
  }
3724
3816
  ],
3725
3817
  "flags": {
3726
- "extract-manifest": {
3727
- "description": "Disables manifest generation - the command will fail if no manifest exists",
3728
- "name": "extract-manifest",
3729
- "allowNo": true,
3730
- "type": "boolean"
3731
- },
3732
- "manifest-dir": {
3733
- "description": "Directory containing manifest file",
3734
- "name": "manifest-dir",
3735
- "default": "./dist/static",
3736
- "hasDynamicHelp": false,
3737
- "helpValue": "<directory>",
3738
- "multiple": false,
3739
- "type": "option"
3740
- },
3741
- "tag": {
3742
- "description": "Add a tag suffix to the schema id",
3743
- "name": "tag",
3818
+ "project-id": {
3819
+ "char": "p",
3820
+ "description": "Project ID to delete token from (overrides CLI configuration)",
3821
+ "helpGroup": "OVERRIDE",
3822
+ "name": "project-id",
3744
3823
  "hasDynamicHelp": false,
3745
- "helpValue": "<tag>",
3824
+ "helpValue": "<id>",
3746
3825
  "multiple": false,
3747
3826
  "type": "option"
3748
3827
  },
3749
- "verbose": {
3750
- "description": "Print detailed information during deployment",
3751
- "name": "verbose",
3828
+ "yes": {
3829
+ "aliases": [
3830
+ "y"
3831
+ ],
3832
+ "description": "Skip confirmation prompt (unattended mode)",
3833
+ "name": "yes",
3834
+ "required": false,
3752
3835
  "allowNo": false,
3753
3836
  "type": "boolean"
3754
- },
3755
- "workspace": {
3756
- "description": "The name of the workspace to deploy a schema for",
3757
- "name": "workspace",
3758
- "hasDynamicHelp": false,
3759
- "helpValue": "<name>",
3760
- "multiple": false,
3761
- "type": "option"
3762
3837
  }
3763
3838
  },
3764
3839
  "hasDynamicHelp": false,
3765
3840
  "hiddenAliases": [],
3766
- "id": "schema:deploy",
3841
+ "id": "tokens:delete",
3767
3842
  "pluginAlias": "@sanity/cli",
3768
3843
  "pluginName": "@sanity/cli",
3769
3844
  "pluginType": "core",
@@ -3772,77 +3847,49 @@
3772
3847
  "relativePath": [
3773
3848
  "dist",
3774
3849
  "commands",
3775
- "schema",
3776
- "deploy.js"
3850
+ "tokens",
3851
+ "delete.js"
3777
3852
  ]
3778
3853
  },
3779
- "schema:extract": {
3854
+ "tokens:list": {
3780
3855
  "aliases": [],
3781
3856
  "args": {},
3782
- "description": "Extracts a JSON representation of a Sanity schema within a Studio context.\n\n**Note**: This command is experimental and subject to change.",
3857
+ "description": "List API tokens for the current project",
3783
3858
  "examples": [
3784
3859
  {
3785
- "command": "<%= config.bin %> <%= command.id %> --workspace default",
3786
- "description": "Extracts schema types in a Sanity project with more than one workspace"
3860
+ "command": "<%= config.bin %> <%= command.id %>",
3861
+ "description": "List tokens for the current project"
3787
3862
  },
3788
3863
  {
3789
- "command": "<%= config.bin %> <%= command.id %> --watch",
3790
- "description": "Watch mode - re-extract on changes"
3864
+ "command": "<%= config.bin %> <%= command.id %> --json",
3865
+ "description": "List tokens in JSON format"
3791
3866
  },
3792
3867
  {
3793
- "command": "<%= config.bin %> <%= command.id %> --watch --watch-patterns \"lib/**/*.ts\"",
3794
- "description": "Watch with custom glob patterns"
3868
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3869
+ "description": "List tokens for a specific project"
3795
3870
  }
3796
3871
  ],
3797
3872
  "flags": {
3798
- "enforce-required-fields": {
3799
- "description": "Makes the schema generated treat fields marked as required as non-optional",
3800
- "name": "enforce-required-fields",
3801
- "allowNo": false,
3802
- "type": "boolean"
3803
- },
3804
- "format": {
3805
- "description": "Format the schema as GROQ type nodes. Only available format at the moment.",
3806
- "name": "format",
3807
- "default": "groq-type-nodes",
3808
- "hasDynamicHelp": false,
3809
- "helpValue": "<format>",
3810
- "multiple": false,
3811
- "type": "option"
3812
- },
3813
- "path": {
3814
- "description": "Optional path to specify destination of the schema file",
3815
- "name": "path",
3873
+ "project-id": {
3874
+ "char": "p",
3875
+ "description": "Project ID to list tokens for (overrides CLI configuration)",
3876
+ "helpGroup": "OVERRIDE",
3877
+ "name": "project-id",
3816
3878
  "hasDynamicHelp": false,
3879
+ "helpValue": "<id>",
3817
3880
  "multiple": false,
3818
3881
  "type": "option"
3819
3882
  },
3820
- "watch": {
3821
- "description": "Enable watch mode to re-extract schema on file changes",
3822
- "name": "watch",
3883
+ "json": {
3884
+ "description": "Output tokens in JSON format",
3885
+ "name": "json",
3823
3886
  "allowNo": false,
3824
3887
  "type": "boolean"
3825
- },
3826
- "watch-patterns": {
3827
- "description": "Additional glob pattern(s) to watch (can be specified multiple times)",
3828
- "name": "watch-patterns",
3829
- "hasDynamicHelp": false,
3830
- "helpValue": "<glob>",
3831
- "multiple": true,
3832
- "type": "option"
3833
- },
3834
- "workspace": {
3835
- "description": "The name of the workspace to generate a schema for",
3836
- "name": "workspace",
3837
- "hasDynamicHelp": false,
3838
- "helpValue": "<name>",
3839
- "multiple": false,
3840
- "type": "option"
3841
3888
  }
3842
3889
  },
3843
3890
  "hasDynamicHelp": false,
3844
3891
  "hiddenAliases": [],
3845
- "id": "schema:extract",
3892
+ "id": "tokens:list",
3846
3893
  "pluginAlias": "@sanity/cli",
3847
3894
  "pluginName": "@sanity/cli",
3848
3895
  "pluginType": "core",
@@ -3851,68 +3898,61 @@
3851
3898
  "relativePath": [
3852
3899
  "dist",
3853
3900
  "commands",
3854
- "schema",
3855
- "extract.js"
3901
+ "tokens",
3902
+ "list.js"
3856
3903
  ]
3857
3904
  },
3858
- "schema:list": {
3905
+ "users:invite": {
3859
3906
  "aliases": [],
3860
- "args": {},
3861
- "description": "Lists all schemas in the current dataset.\n\n**Note**: This command is experimental and subject to change.\n\nThis operation (re-)generates a manifest file describing the sanity config workspace by default.\nTo re-use an existing manifest file, use --no-extract-manifest.",
3907
+ "args": {
3908
+ "email": {
3909
+ "description": "Email address to invite",
3910
+ "name": "email",
3911
+ "required": false
3912
+ }
3913
+ },
3914
+ "description": "Invite a new user to the project",
3862
3915
  "examples": [
3863
3916
  {
3864
3917
  "command": "<%= config.bin %> <%= command.id %>",
3865
- "description": "List all schemas found in any workspace dataset in a table"
3918
+ "description": "Invite a new user to the project (prompt for details)"
3866
3919
  },
3867
3920
  {
3868
- "command": "<%= config.bin %> <%= command.id %> --id _.schemas.workspaceName",
3869
- "description": "Get a schema for a given id"
3921
+ "command": "<%= config.bin %> <%= command.id %> pippi@sanity.io",
3922
+ "description": "Send a new user invite to the email \"pippi@sanity.io\", prompt for role"
3870
3923
  },
3871
3924
  {
3872
- "command": "<%= config.bin %> <%= command.id %> --json",
3873
- "description": "Get stored schemas as pretty-printed json-array"
3925
+ "command": "<%= config.bin %> <%= command.id %> pippi@sanity.io --role administrator",
3926
+ "description": "Send a new user invite to the email \"pippi@sanity.io\", as administrator"
3874
3927
  },
3875
3928
  {
3876
- "command": "<%= config.bin %> <%= command.id %> --json --id _.schemas.workspaceName",
3877
- "description": "Get singular stored schema as pretty-printed json-object"
3929
+ "command": "<%= config.bin %> <%= command.id %> pippi@sanity.io --project-id abc123",
3930
+ "description": "Invite a user to a specific project"
3878
3931
  }
3879
3932
  ],
3880
3933
  "flags": {
3881
- "extract-manifest": {
3882
- "description": "Disables manifest generation - the command will fail if no manifest exists",
3883
- "hidden": true,
3884
- "name": "extract-manifest",
3885
- "allowNo": true,
3886
- "type": "boolean"
3887
- },
3888
- "id": {
3889
- "description": "Fetch a single schema by id",
3890
- "name": "id",
3934
+ "project-id": {
3935
+ "char": "p",
3936
+ "description": "Project ID to invite user to (overrides CLI configuration)",
3937
+ "helpGroup": "OVERRIDE",
3938
+ "name": "project-id",
3891
3939
  "hasDynamicHelp": false,
3892
- "helpValue": "<schema_id>",
3940
+ "helpValue": "<id>",
3893
3941
  "multiple": false,
3894
3942
  "type": "option"
3895
3943
  },
3896
- "json": {
3897
- "description": "Get schema as json",
3898
- "name": "json",
3899
- "allowNo": false,
3900
- "type": "boolean"
3901
- },
3902
- "manifest-dir": {
3903
- "description": "Directory containing manifest file",
3904
- "hidden": true,
3905
- "name": "manifest-dir",
3906
- "default": "./dist/static",
3944
+ "role": {
3945
+ "description": "Role to invite the user as",
3946
+ "name": "role",
3947
+ "required": false,
3907
3948
  "hasDynamicHelp": false,
3908
- "helpValue": "<directory>",
3909
3949
  "multiple": false,
3910
3950
  "type": "option"
3911
3951
  }
3912
3952
  },
3913
3953
  "hasDynamicHelp": false,
3914
3954
  "hiddenAliases": [],
3915
- "id": "schema:list",
3955
+ "id": "users:invite",
3916
3956
  "pluginAlias": "@sanity/cli",
3917
3957
  "pluginName": "@sanity/cli",
3918
3958
  "pluginType": "core",
@@ -3921,129 +3961,85 @@
3921
3961
  "relativePath": [
3922
3962
  "dist",
3923
3963
  "commands",
3924
- "schema",
3925
- "list.js"
3964
+ "users",
3965
+ "invite.js"
3926
3966
  ]
3927
3967
  },
3928
- "schema:validate": {
3968
+ "users:list": {
3929
3969
  "aliases": [],
3930
3970
  "args": {},
3931
- "description": "Validates all schema types specified in a workspace",
3971
+ "description": "List all users of the project",
3932
3972
  "examples": [
3933
3973
  {
3934
- "command": "<%= config.bin %> <%= command.id %> --workspace default",
3935
- "description": "Validates all schema types in a Sanity project with more than one workspace"
3974
+ "command": "<%= config.bin %> <%= command.id %>",
3975
+ "description": "List all users of the project"
3936
3976
  },
3937
3977
  {
3938
- "command": "<%= config.bin %> <%= command.id %> > report.txt",
3939
- "description": "Save the results of the report into a file"
3978
+ "command": "<%= config.bin %> <%= command.id %> --no-invitations --no-robots",
3979
+ "description": "List all users of the project, but exclude pending invitations and robots"
3940
3980
  },
3941
3981
  {
3942
- "command": "<%= config.bin %> <%= command.id %> --level error",
3943
- "description": "Report out only errors"
3982
+ "command": "<%= config.bin %> <%= command.id %> --sort role",
3983
+ "description": "List all users, sorted by role"
3944
3984
  },
3945
3985
  {
3946
- "command": "<%= config.bin %> <%= command.id %> --debug-metafile-path metafile.json",
3947
- "description": "Generate a report which can be analyzed with https://esbuild.github.io/analyze/"
3986
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3987
+ "description": "List users for a specific project"
3948
3988
  }
3949
3989
  ],
3950
3990
  "flags": {
3951
- "debug-metafile-path": {
3952
- "description": "Optional path where a metafile will be written for build analysis. Only written on successful validation. Can be analyzed at https://esbuild.github.io/analyze/",
3953
- "helpGroup": "DEBUG",
3954
- "name": "debug-metafile-path",
3991
+ "project-id": {
3992
+ "char": "p",
3993
+ "description": "Project ID to list users for (overrides CLI configuration)",
3994
+ "helpGroup": "OVERRIDE",
3995
+ "name": "project-id",
3955
3996
  "hasDynamicHelp": false,
3997
+ "helpValue": "<id>",
3956
3998
  "multiple": false,
3957
3999
  "type": "option"
3958
4000
  },
3959
- "format": {
3960
- "description": "The output format used to print schema errors and warnings",
3961
- "name": "format",
3962
- "default": "pretty",
4001
+ "invitations": {
4002
+ "description": "Includes or excludes pending invitations",
4003
+ "name": "invitations",
4004
+ "allowNo": true,
4005
+ "type": "boolean"
4006
+ },
4007
+ "order": {
4008
+ "description": "Sort output ascending/descending",
4009
+ "name": "order",
4010
+ "default": "asc",
3963
4011
  "hasDynamicHelp": false,
3964
4012
  "multiple": false,
3965
4013
  "options": [
3966
- "pretty",
3967
- "ndjson",
3968
- "json"
4014
+ "asc",
4015
+ "desc"
3969
4016
  ],
3970
4017
  "type": "option"
3971
4018
  },
3972
- "level": {
3973
- "description": "The minimum level reported out",
3974
- "name": "level",
3975
- "default": "warning",
4019
+ "robots": {
4020
+ "description": "Includes or excludes robots (token users)",
4021
+ "name": "robots",
4022
+ "allowNo": true,
4023
+ "type": "boolean"
4024
+ },
4025
+ "sort": {
4026
+ "description": "Sort users by specified column",
4027
+ "name": "sort",
4028
+ "default": "date",
3976
4029
  "hasDynamicHelp": false,
3977
4030
  "multiple": false,
3978
4031
  "options": [
3979
- "error",
3980
- "warning"
4032
+ "id",
4033
+ "name",
4034
+ "role",
4035
+ "date"
3981
4036
  ],
3982
4037
  "type": "option"
3983
- },
3984
- "workspace": {
3985
- "description": "The name of the workspace to use when validating all schema types",
3986
- "name": "workspace",
3987
- "hasDynamicHelp": false,
3988
- "multiple": false,
3989
- "type": "option"
3990
4038
  }
3991
4039
  },
3992
4040
  "hasDynamicHelp": false,
3993
4041
  "hiddenAliases": [],
3994
- "id": "schema:validate",
3995
- "pluginAlias": "@sanity/cli",
3996
- "pluginName": "@sanity/cli",
3997
- "pluginType": "core",
3998
- "strict": true,
3999
- "isESM": true,
4000
- "relativePath": [
4001
- "dist",
4002
- "commands",
4003
- "schema",
4004
- "validate.js"
4005
- ]
4006
- },
4007
- "telemetry:disable": {
4008
- "aliases": [],
4009
- "args": {},
4010
- "description": "Disable telemetry for your logged in user",
4011
- "examples": [
4012
- {
4013
- "command": "<%= config.bin %> telemetry <%= command.id %>",
4014
- "description": "Disable telemetry for your logged in user"
4015
- }
4016
- ],
4017
- "flags": {},
4018
- "hasDynamicHelp": false,
4019
- "hiddenAliases": [],
4020
- "id": "telemetry:disable",
4021
- "pluginAlias": "@sanity/cli",
4022
- "pluginName": "@sanity/cli",
4023
- "pluginType": "core",
4024
- "strict": true,
4025
- "isESM": true,
4026
- "relativePath": [
4027
- "dist",
4028
- "commands",
4029
- "telemetry",
4030
- "disable.js"
4031
- ]
4032
- },
4033
- "telemetry:enable": {
4034
- "aliases": [],
4035
- "args": {},
4036
- "description": "Enable telemetry for your logged in user",
4037
- "examples": [
4038
- {
4039
- "command": "<%= config.bin %> telemetry <%= command.id %>",
4040
- "description": "Enable telemetry for your logged in user"
4041
- }
4042
- ],
4043
- "flags": {},
4044
- "hasDynamicHelp": false,
4045
- "hiddenAliases": [],
4046
- "id": "telemetry:enable",
4042
+ "id": "users:list",
4047
4043
  "pluginAlias": "@sanity/cli",
4048
4044
  "pluginName": "@sanity/cli",
4049
4045
  "pluginType": "core",
@@ -4052,72 +4048,28 @@
4052
4048
  "relativePath": [
4053
4049
  "dist",
4054
4050
  "commands",
4055
- "telemetry",
4056
- "enable.js"
4051
+ "users",
4052
+ "list.js"
4057
4053
  ]
4058
4054
  },
4059
- "telemetry:status": {
4055
+ "schema:delete": {
4060
4056
  "aliases": [],
4061
4057
  "args": {},
4062
- "description": "Check telemetry consent status for your logged in user",
4063
- "examples": [
4064
- {
4065
- "command": "<%= config.bin %> telemetry <%= command.id %>",
4066
- "description": "Check telemetry consent status for your logged in user"
4067
- }
4068
- ],
4069
- "flags": {},
4070
- "hasDynamicHelp": false,
4071
- "hiddenAliases": [],
4072
- "id": "telemetry:status",
4073
- "pluginAlias": "@sanity/cli",
4074
- "pluginName": "@sanity/cli",
4075
- "pluginType": "core",
4076
- "strict": true,
4077
- "isESM": true,
4078
- "relativePath": [
4079
- "dist",
4080
- "commands",
4081
- "telemetry",
4082
- "status.js"
4083
- ]
4084
- },
4085
- "tokens:add": {
4086
- "aliases": [],
4087
- "args": {
4088
- "label": {
4089
- "description": "Label for the new token",
4090
- "name": "label",
4091
- "required": false
4092
- }
4093
- },
4094
- "description": "Create a new API token for this project",
4058
+ "description": "Delete schema documents by id",
4095
4059
  "examples": [
4096
4060
  {
4097
- "command": "<%= config.bin %> <%= command.id %> \"My API Token\"",
4098
- "description": "Create a token with a label"
4099
- },
4100
- {
4101
- "command": "<%= config.bin %> <%= command.id %> \"My API Token\" --role=editor",
4102
- "description": "Create a token with editor role"
4103
- },
4104
- {
4105
- "command": "<%= config.bin %> <%= command.id %> \"CI Token\" --role=editor --yes",
4106
- "description": "Create a token in unattended mode"
4107
- },
4108
- {
4109
- "command": "<%= config.bin %> <%= command.id %> \"API Token\" --json",
4110
- "description": "Output token information as JSON"
4061
+ "command": "<%= config.bin %> <%= command.id %> --ids sanity.workspace.schema.workspaceName",
4062
+ "description": "Delete a single schema"
4111
4063
  },
4112
4064
  {
4113
- "command": "<%= config.bin %> <%= command.id %> \"My Token\" --project-id abc123 --role=editor",
4114
- "description": "Create a token for a specific project"
4065
+ "command": "<%= config.bin %> <%= command.id %> --ids sanity.workspace.schema.workspaceName,prefix.sanity.workspace.schema.otherWorkspace",
4066
+ "description": "Delete multiple schemas"
4115
4067
  }
4116
4068
  ],
4117
4069
  "flags": {
4118
4070
  "project-id": {
4119
4071
  "char": "p",
4120
- "description": "Project ID to add token to (overrides CLI configuration)",
4072
+ "description": "Project ID to delete schema from (overrides CLI configuration)",
4121
4073
  "helpGroup": "OVERRIDE",
4122
4074
  "name": "project-id",
4123
4075
  "hasDynamicHelp": false,
@@ -4125,31 +4077,49 @@
4125
4077
  "multiple": false,
4126
4078
  "type": "option"
4127
4079
  },
4128
- "json": {
4129
- "description": "Output as JSON",
4130
- "name": "json",
4131
- "allowNo": false,
4080
+ "dataset": {
4081
+ "char": "d",
4082
+ "description": "Delete schemas from a specific dataset",
4083
+ "name": "dataset",
4084
+ "hasDynamicHelp": false,
4085
+ "helpValue": "<name>",
4086
+ "multiple": false,
4087
+ "type": "option"
4088
+ },
4089
+ "extract-manifest": {
4090
+ "description": "Generate manifest file (disable with --no-extract-manifest)",
4091
+ "hidden": true,
4092
+ "name": "extract-manifest",
4093
+ "allowNo": true,
4132
4094
  "type": "boolean"
4133
4095
  },
4134
- "role": {
4135
- "description": "Role to assign to the token",
4136
- "name": "role",
4096
+ "ids": {
4097
+ "description": "Comma-separated list of schema ids to delete",
4098
+ "name": "ids",
4099
+ "required": true,
4137
4100
  "hasDynamicHelp": false,
4138
- "helpValue": "viewer",
4139
4101
  "multiple": false,
4140
4102
  "type": "option"
4141
4103
  },
4142
- "yes": {
4143
- "char": "y",
4144
- "description": "Skip prompts and use defaults (unattended mode)",
4145
- "name": "yes",
4104
+ "manifest-dir": {
4105
+ "description": "Directory containing manifest file",
4106
+ "hidden": true,
4107
+ "name": "manifest-dir",
4108
+ "default": "./dist/static",
4109
+ "hasDynamicHelp": false,
4110
+ "multiple": false,
4111
+ "type": "option"
4112
+ },
4113
+ "verbose": {
4114
+ "description": "Enable verbose logging",
4115
+ "name": "verbose",
4146
4116
  "allowNo": false,
4147
4117
  "type": "boolean"
4148
4118
  }
4149
4119
  },
4150
4120
  "hasDynamicHelp": false,
4151
4121
  "hiddenAliases": [],
4152
- "id": "tokens:add",
4122
+ "id": "schema:delete",
4153
4123
  "pluginAlias": "@sanity/cli",
4154
4124
  "pluginName": "@sanity/cli",
4155
4125
  "pluginType": "core",
@@ -4158,63 +4128,66 @@
4158
4128
  "relativePath": [
4159
4129
  "dist",
4160
4130
  "commands",
4161
- "tokens",
4162
- "add.js"
4131
+ "schema",
4132
+ "delete.js"
4163
4133
  ]
4164
4134
  },
4165
- "tokens:delete": {
4135
+ "schema:deploy": {
4166
4136
  "aliases": [],
4167
- "args": {
4168
- "tokenId": {
4169
- "description": "Token ID to delete (will prompt if not provided)",
4170
- "name": "tokenId",
4171
- "required": false
4172
- }
4173
- },
4174
- "description": "Delete an API token from this project",
4137
+ "args": {},
4138
+ "description": "Deploy schema documents into workspace datasets.\n\n**Note**: This command is experimental and subject to change.\n\nThis operation (re-)generates a manifest file describing the sanity config workspace by default.\nTo re-use an existing manifest file, use --no-extract-manifest.",
4175
4139
  "examples": [
4176
4140
  {
4177
4141
  "command": "<%= config.bin %> <%= command.id %>",
4178
- "description": "Interactively select and delete a token"
4142
+ "description": "Deploy all workspace schemas"
4179
4143
  },
4180
4144
  {
4181
- "command": "<%= config.bin %> <%= command.id %> silJ2lFmK6dONB",
4182
- "description": "Delete a specific token by ID"
4145
+ "command": "<%= config.bin %> <%= command.id %> --workspace default",
4146
+ "description": "Deploy the schema for only the workspace \"default\""
4147
+ }
4148
+ ],
4149
+ "flags": {
4150
+ "extract-manifest": {
4151
+ "description": "Disables manifest generation - the command will fail if no manifest exists",
4152
+ "name": "extract-manifest",
4153
+ "allowNo": true,
4154
+ "type": "boolean"
4183
4155
  },
4184
- {
4185
- "command": "<%= config.bin %> <%= command.id %> silJ2lFmK6dONB --yes",
4186
- "description": "Delete a specific token without confirmation prompt"
4156
+ "manifest-dir": {
4157
+ "description": "Directory containing manifest file",
4158
+ "name": "manifest-dir",
4159
+ "default": "./dist/static",
4160
+ "hasDynamicHelp": false,
4161
+ "helpValue": "<directory>",
4162
+ "multiple": false,
4163
+ "type": "option"
4187
4164
  },
4188
- {
4189
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
4190
- "description": "Delete a token from a specific project"
4191
- }
4192
- ],
4193
- "flags": {
4194
- "project-id": {
4195
- "char": "p",
4196
- "description": "Project ID to delete token from (overrides CLI configuration)",
4197
- "helpGroup": "OVERRIDE",
4198
- "name": "project-id",
4165
+ "tag": {
4166
+ "description": "Add a tag suffix to the schema id",
4167
+ "name": "tag",
4199
4168
  "hasDynamicHelp": false,
4200
- "helpValue": "<id>",
4169
+ "helpValue": "<tag>",
4201
4170
  "multiple": false,
4202
4171
  "type": "option"
4203
4172
  },
4204
- "yes": {
4205
- "aliases": [
4206
- "y"
4207
- ],
4208
- "description": "Skip confirmation prompt (unattended mode)",
4209
- "name": "yes",
4210
- "required": false,
4173
+ "verbose": {
4174
+ "description": "Print detailed information during deployment",
4175
+ "name": "verbose",
4211
4176
  "allowNo": false,
4212
4177
  "type": "boolean"
4178
+ },
4179
+ "workspace": {
4180
+ "description": "The name of the workspace to deploy a schema for",
4181
+ "name": "workspace",
4182
+ "hasDynamicHelp": false,
4183
+ "helpValue": "<name>",
4184
+ "multiple": false,
4185
+ "type": "option"
4213
4186
  }
4214
4187
  },
4215
4188
  "hasDynamicHelp": false,
4216
4189
  "hiddenAliases": [],
4217
- "id": "tokens:delete",
4190
+ "id": "schema:deploy",
4218
4191
  "pluginAlias": "@sanity/cli",
4219
4192
  "pluginName": "@sanity/cli",
4220
4193
  "pluginType": "core",
@@ -4223,49 +4196,77 @@
4223
4196
  "relativePath": [
4224
4197
  "dist",
4225
4198
  "commands",
4226
- "tokens",
4227
- "delete.js"
4199
+ "schema",
4200
+ "deploy.js"
4228
4201
  ]
4229
4202
  },
4230
- "tokens:list": {
4203
+ "schema:extract": {
4231
4204
  "aliases": [],
4232
4205
  "args": {},
4233
- "description": "List API tokens for the current project",
4206
+ "description": "Extracts a JSON representation of a Sanity schema within a Studio context.\n\n**Note**: This command is experimental and subject to change.",
4234
4207
  "examples": [
4235
4208
  {
4236
- "command": "<%= config.bin %> <%= command.id %>",
4237
- "description": "List tokens for the current project"
4209
+ "command": "<%= config.bin %> <%= command.id %> --workspace default",
4210
+ "description": "Extracts schema types in a Sanity project with more than one workspace"
4238
4211
  },
4239
4212
  {
4240
- "command": "<%= config.bin %> <%= command.id %> --json",
4241
- "description": "List tokens in JSON format"
4213
+ "command": "<%= config.bin %> <%= command.id %> --watch",
4214
+ "description": "Watch mode - re-extract on changes"
4242
4215
  },
4243
4216
  {
4244
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
4245
- "description": "List tokens for a specific project"
4217
+ "command": "<%= config.bin %> <%= command.id %> --watch --watch-patterns \"lib/**/*.ts\"",
4218
+ "description": "Watch with custom glob patterns"
4246
4219
  }
4247
4220
  ],
4248
4221
  "flags": {
4249
- "project-id": {
4250
- "char": "p",
4251
- "description": "Project ID to list tokens for (overrides CLI configuration)",
4252
- "helpGroup": "OVERRIDE",
4253
- "name": "project-id",
4222
+ "enforce-required-fields": {
4223
+ "description": "Makes the schema generated treat fields marked as required as non-optional",
4224
+ "name": "enforce-required-fields",
4225
+ "allowNo": false,
4226
+ "type": "boolean"
4227
+ },
4228
+ "format": {
4229
+ "description": "Format the schema as GROQ type nodes. Only available format at the moment.",
4230
+ "name": "format",
4231
+ "default": "groq-type-nodes",
4254
4232
  "hasDynamicHelp": false,
4255
- "helpValue": "<id>",
4233
+ "helpValue": "<format>",
4256
4234
  "multiple": false,
4257
4235
  "type": "option"
4258
4236
  },
4259
- "json": {
4260
- "description": "Output tokens in JSON format",
4261
- "name": "json",
4237
+ "path": {
4238
+ "description": "Optional path to specify destination of the schema file",
4239
+ "name": "path",
4240
+ "hasDynamicHelp": false,
4241
+ "multiple": false,
4242
+ "type": "option"
4243
+ },
4244
+ "watch": {
4245
+ "description": "Enable watch mode to re-extract schema on file changes",
4246
+ "name": "watch",
4262
4247
  "allowNo": false,
4263
4248
  "type": "boolean"
4249
+ },
4250
+ "watch-patterns": {
4251
+ "description": "Additional glob pattern(s) to watch (can be specified multiple times)",
4252
+ "name": "watch-patterns",
4253
+ "hasDynamicHelp": false,
4254
+ "helpValue": "<glob>",
4255
+ "multiple": true,
4256
+ "type": "option"
4257
+ },
4258
+ "workspace": {
4259
+ "description": "The name of the workspace to generate a schema for",
4260
+ "name": "workspace",
4261
+ "hasDynamicHelp": false,
4262
+ "helpValue": "<name>",
4263
+ "multiple": false,
4264
+ "type": "option"
4264
4265
  }
4265
4266
  },
4266
4267
  "hasDynamicHelp": false,
4267
4268
  "hiddenAliases": [],
4268
- "id": "tokens:list",
4269
+ "id": "schema:extract",
4269
4270
  "pluginAlias": "@sanity/cli",
4270
4271
  "pluginName": "@sanity/cli",
4271
4272
  "pluginType": "core",
@@ -4274,61 +4275,68 @@
4274
4275
  "relativePath": [
4275
4276
  "dist",
4276
4277
  "commands",
4277
- "tokens",
4278
- "list.js"
4278
+ "schema",
4279
+ "extract.js"
4279
4280
  ]
4280
4281
  },
4281
- "users:invite": {
4282
+ "schema:list": {
4282
4283
  "aliases": [],
4283
- "args": {
4284
- "email": {
4285
- "description": "Email address to invite",
4286
- "name": "email",
4287
- "required": false
4288
- }
4289
- },
4290
- "description": "Invite a new user to the project",
4284
+ "args": {},
4285
+ "description": "Lists all schemas in the current dataset.\n\n**Note**: This command is experimental and subject to change.\n\nThis operation (re-)generates a manifest file describing the sanity config workspace by default.\nTo re-use an existing manifest file, use --no-extract-manifest.",
4291
4286
  "examples": [
4292
4287
  {
4293
4288
  "command": "<%= config.bin %> <%= command.id %>",
4294
- "description": "Invite a new user to the project (prompt for details)"
4289
+ "description": "List all schemas found in any workspace dataset in a table"
4295
4290
  },
4296
4291
  {
4297
- "command": "<%= config.bin %> <%= command.id %> pippi@sanity.io",
4298
- "description": "Send a new user invite to the email \"pippi@sanity.io\", prompt for role"
4292
+ "command": "<%= config.bin %> <%= command.id %> --id _.schemas.workspaceName",
4293
+ "description": "Get a schema for a given id"
4299
4294
  },
4300
4295
  {
4301
- "command": "<%= config.bin %> <%= command.id %> pippi@sanity.io --role administrator",
4302
- "description": "Send a new user invite to the email \"pippi@sanity.io\", as administrator"
4296
+ "command": "<%= config.bin %> <%= command.id %> --json",
4297
+ "description": "Get stored schemas as pretty-printed json-array"
4303
4298
  },
4304
4299
  {
4305
- "command": "<%= config.bin %> <%= command.id %> pippi@sanity.io --project-id abc123",
4306
- "description": "Invite a user to a specific project"
4300
+ "command": "<%= config.bin %> <%= command.id %> --json --id _.schemas.workspaceName",
4301
+ "description": "Get singular stored schema as pretty-printed json-object"
4307
4302
  }
4308
4303
  ],
4309
4304
  "flags": {
4310
- "project-id": {
4311
- "char": "p",
4312
- "description": "Project ID to invite user to (overrides CLI configuration)",
4313
- "helpGroup": "OVERRIDE",
4314
- "name": "project-id",
4305
+ "extract-manifest": {
4306
+ "description": "Disables manifest generation - the command will fail if no manifest exists",
4307
+ "hidden": true,
4308
+ "name": "extract-manifest",
4309
+ "allowNo": true,
4310
+ "type": "boolean"
4311
+ },
4312
+ "id": {
4313
+ "description": "Fetch a single schema by id",
4314
+ "name": "id",
4315
4315
  "hasDynamicHelp": false,
4316
- "helpValue": "<id>",
4316
+ "helpValue": "<schema_id>",
4317
4317
  "multiple": false,
4318
4318
  "type": "option"
4319
4319
  },
4320
- "role": {
4321
- "description": "Role to invite the user as",
4322
- "name": "role",
4323
- "required": false,
4320
+ "json": {
4321
+ "description": "Get schema as json",
4322
+ "name": "json",
4323
+ "allowNo": false,
4324
+ "type": "boolean"
4325
+ },
4326
+ "manifest-dir": {
4327
+ "description": "Directory containing manifest file",
4328
+ "hidden": true,
4329
+ "name": "manifest-dir",
4330
+ "default": "./dist/static",
4324
4331
  "hasDynamicHelp": false,
4332
+ "helpValue": "<directory>",
4325
4333
  "multiple": false,
4326
4334
  "type": "option"
4327
4335
  }
4328
4336
  },
4329
4337
  "hasDynamicHelp": false,
4330
4338
  "hiddenAliases": [],
4331
- "id": "users:invite",
4339
+ "id": "schema:list",
4332
4340
  "pluginAlias": "@sanity/cli",
4333
4341
  "pluginName": "@sanity/cli",
4334
4342
  "pluginType": "core",
@@ -4337,85 +4345,77 @@
4337
4345
  "relativePath": [
4338
4346
  "dist",
4339
4347
  "commands",
4340
- "users",
4341
- "invite.js"
4348
+ "schema",
4349
+ "list.js"
4342
4350
  ]
4343
4351
  },
4344
- "users:list": {
4352
+ "schema:validate": {
4345
4353
  "aliases": [],
4346
4354
  "args": {},
4347
- "description": "List all users of the project",
4355
+ "description": "Validates all schema types specified in a workspace",
4348
4356
  "examples": [
4349
4357
  {
4350
- "command": "<%= config.bin %> <%= command.id %>",
4351
- "description": "List all users of the project"
4358
+ "command": "<%= config.bin %> <%= command.id %> --workspace default",
4359
+ "description": "Validates all schema types in a Sanity project with more than one workspace"
4352
4360
  },
4353
4361
  {
4354
- "command": "<%= config.bin %> <%= command.id %> --no-invitations --no-robots",
4355
- "description": "List all users of the project, but exclude pending invitations and robots"
4362
+ "command": "<%= config.bin %> <%= command.id %> > report.txt",
4363
+ "description": "Save the results of the report into a file"
4356
4364
  },
4357
4365
  {
4358
- "command": "<%= config.bin %> <%= command.id %> --sort role",
4359
- "description": "List all users, sorted by role"
4366
+ "command": "<%= config.bin %> <%= command.id %> --level error",
4367
+ "description": "Report out only errors"
4360
4368
  },
4361
4369
  {
4362
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
4363
- "description": "List users for a specific project"
4370
+ "command": "<%= config.bin %> <%= command.id %> --debug-metafile-path metafile.json",
4371
+ "description": "Generate a report which can be analyzed with https://esbuild.github.io/analyze/"
4364
4372
  }
4365
4373
  ],
4366
4374
  "flags": {
4367
- "project-id": {
4368
- "char": "p",
4369
- "description": "Project ID to list users for (overrides CLI configuration)",
4370
- "helpGroup": "OVERRIDE",
4371
- "name": "project-id",
4375
+ "debug-metafile-path": {
4376
+ "description": "Optional path where a metafile will be written for build analysis. Only written on successful validation. Can be analyzed at https://esbuild.github.io/analyze/",
4377
+ "helpGroup": "DEBUG",
4378
+ "name": "debug-metafile-path",
4372
4379
  "hasDynamicHelp": false,
4373
- "helpValue": "<id>",
4374
4380
  "multiple": false,
4375
4381
  "type": "option"
4376
4382
  },
4377
- "invitations": {
4378
- "description": "Includes or excludes pending invitations",
4379
- "name": "invitations",
4380
- "allowNo": true,
4381
- "type": "boolean"
4382
- },
4383
- "order": {
4384
- "description": "Sort output ascending/descending",
4385
- "name": "order",
4386
- "default": "asc",
4383
+ "format": {
4384
+ "description": "The output format used to print schema errors and warnings",
4385
+ "name": "format",
4386
+ "default": "pretty",
4387
4387
  "hasDynamicHelp": false,
4388
4388
  "multiple": false,
4389
4389
  "options": [
4390
- "asc",
4391
- "desc"
4390
+ "pretty",
4391
+ "ndjson",
4392
+ "json"
4392
4393
  ],
4393
4394
  "type": "option"
4394
4395
  },
4395
- "robots": {
4396
- "description": "Includes or excludes robots (token users)",
4397
- "name": "robots",
4398
- "allowNo": true,
4399
- "type": "boolean"
4400
- },
4401
- "sort": {
4402
- "description": "Sort users by specified column",
4403
- "name": "sort",
4404
- "default": "date",
4396
+ "level": {
4397
+ "description": "The minimum level reported out",
4398
+ "name": "level",
4399
+ "default": "warning",
4405
4400
  "hasDynamicHelp": false,
4406
4401
  "multiple": false,
4407
4402
  "options": [
4408
- "id",
4409
- "name",
4410
- "role",
4411
- "date"
4403
+ "error",
4404
+ "warning"
4412
4405
  ],
4413
4406
  "type": "option"
4407
+ },
4408
+ "workspace": {
4409
+ "description": "The name of the workspace to use when validating all schema types",
4410
+ "name": "workspace",
4411
+ "hasDynamicHelp": false,
4412
+ "multiple": false,
4413
+ "type": "option"
4414
4414
  }
4415
4415
  },
4416
4416
  "hasDynamicHelp": false,
4417
4417
  "hiddenAliases": [],
4418
- "id": "users:list",
4418
+ "id": "schema:validate",
4419
4419
  "pluginAlias": "@sanity/cli",
4420
4420
  "pluginName": "@sanity/cli",
4421
4421
  "pluginType": "core",
@@ -4424,8 +4424,8 @@
4424
4424
  "relativePath": [
4425
4425
  "dist",
4426
4426
  "commands",
4427
- "users",
4428
- "list.js"
4427
+ "schema",
4428
+ "validate.js"
4429
4429
  ]
4430
4430
  },
4431
4431
  "dataset:alias:create": {
@@ -4943,5 +4943,5 @@
4943
4943
  ]
4944
4944
  }
4945
4945
  },
4946
- "version": "6.0.0"
4946
+ "version": "6.1.0"
4947
4947
  }