@sanity/cli 8.13.1 → 8.15.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 (33) hide show
  1. package/README.md +6 -5
  2. package/dist/actions/init/bootstrapLocalTemplate.js +5 -0
  3. package/dist/actions/init/bootstrapLocalTemplate.js.map +1 -1
  4. package/dist/actions/init/initAction.js +11 -3
  5. package/dist/actions/init/initAction.js.map +1 -1
  6. package/dist/actions/init/project/getProjectDetails.js +1 -0
  7. package/dist/actions/init/project/getProjectDetails.js.map +1 -1
  8. package/dist/actions/init/sdkAppDependencies.js +4 -4
  9. package/dist/actions/init/sdkAppDependencies.js.map +1 -1
  10. package/dist/actions/init/studioDependencies.js +2 -1
  11. package/dist/actions/init/studioDependencies.js.map +1 -1
  12. package/dist/actions/init/templates/appSanityUi.js +1 -1
  13. package/dist/actions/init/templates/appSanityUi.js.map +1 -1
  14. package/dist/actions/init/types.js +1 -1
  15. package/dist/actions/init/types.js.map +1 -1
  16. package/dist/commands/dev.js +1 -1
  17. package/dist/commands/dev.js.map +1 -1
  18. package/dist/commands/init.js +7 -7
  19. package/dist/commands/init.js.map +1 -1
  20. package/dist/generated/apiRoutes.js +2 -0
  21. package/dist/generated/apiRoutes.js.map +1 -1
  22. package/oclif.manifest.json +431 -428
  23. package/package.json +15 -15
  24. package/templates/app-sanity-ui/src/App.tsx +8 -8
  25. package/templates/app-sanity-ui/src/ExampleComponent.tsx +1 -1
  26. package/templates/app-sanity-ui/src/SanityUI.tsx +3 -1
  27. package/templates/shared/dashboard/app-quickstart/.claude/skills/sanity-app-sdk/SKILL.md +66 -0
  28. package/templates/shared/dashboard/app-quickstart/AGENTS.md +61 -0
  29. package/templates/shared/dashboard/app-quickstart/README.md +30 -0
  30. package/templates/shared/dashboard/app-sanity-ui/.claude/skills/sanity-app-sdk/SKILL.md +70 -0
  31. package/templates/shared/dashboard/app-sanity-ui/AGENTS.md +65 -0
  32. package/templates/shared/dashboard/app-sanity-ui/README.md +31 -0
  33. package/templates/shared/tsconfig.json +1 -0
@@ -706,6 +706,16 @@
706
706
  "multiple": false,
707
707
  "type": "option"
708
708
  },
709
+ "dashboard": {
710
+ "description": "Set up the project to run in the Sanity Dashboard (beta)",
711
+ "exclusive": [
712
+ "bare",
713
+ "env"
714
+ ],
715
+ "name": "dashboard",
716
+ "allowNo": false,
717
+ "type": "boolean"
718
+ },
709
719
  "dataset": {
710
720
  "description": "Dataset name for the studio",
711
721
  "exclusive": [
@@ -942,13 +952,6 @@
942
952
  "allowNo": true,
943
953
  "type": "boolean"
944
954
  },
945
- "unstable--workbench": {
946
- "description": "Opt into workbench: scaffolds the CLI config with defineApplication",
947
- "hidden": true,
948
- "name": "unstable--workbench",
949
- "allowNo": true,
950
- "type": "boolean"
951
- },
952
955
  "visibility": {
953
956
  "description": "Visibility mode for dataset",
954
957
  "name": "visibility",
@@ -1770,167 +1773,6 @@
1770
1773
  "list.js"
1771
1774
  ]
1772
1775
  },
1773
- "cors:add": {
1774
- "aliases": [],
1775
- "args": {
1776
- "origin": {
1777
- "description": "Origin to allow (e.g., https://example.com)",
1778
- "name": "origin",
1779
- "required": true
1780
- }
1781
- },
1782
- "description": "Add a CORS origin to the project",
1783
- "examples": [
1784
- {
1785
- "command": "<%= config.bin %> <%= command.id %>",
1786
- "description": "Interactively add a CORS origin"
1787
- },
1788
- {
1789
- "command": "<%= config.bin %> <%= command.id %> http://localhost:3000 --no-credentials",
1790
- "description": "Add a localhost origin without credentials"
1791
- },
1792
- {
1793
- "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
1794
- "description": "Add a production origin with credentials allowed"
1795
- },
1796
- {
1797
- "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project-id abc123",
1798
- "description": "Add a CORS origin for a specific project"
1799
- }
1800
- ],
1801
- "flags": {
1802
- "project-id": {
1803
- "char": "p",
1804
- "description": "Project ID to add CORS origin to (overrides CLI configuration)",
1805
- "helpGroup": "OVERRIDE",
1806
- "name": "project-id",
1807
- "hasDynamicHelp": false,
1808
- "helpValue": "<id>",
1809
- "multiple": false,
1810
- "type": "option"
1811
- },
1812
- "credentials": {
1813
- "description": "Allow credentials (token/cookie) to be sent from this origin",
1814
- "name": "credentials",
1815
- "required": false,
1816
- "allowNo": true,
1817
- "type": "boolean"
1818
- },
1819
- "yes": {
1820
- "char": "y",
1821
- "description": "Confirm risky wildcard origins without prompting",
1822
- "name": "yes",
1823
- "allowNo": false,
1824
- "type": "boolean"
1825
- }
1826
- },
1827
- "hasDynamicHelp": false,
1828
- "hiddenAliases": [],
1829
- "id": "cors:add",
1830
- "pluginAlias": "@sanity/cli",
1831
- "pluginName": "@sanity/cli",
1832
- "pluginType": "core",
1833
- "strict": true,
1834
- "isESM": true,
1835
- "relativePath": [
1836
- "dist",
1837
- "commands",
1838
- "cors",
1839
- "add.js"
1840
- ]
1841
- },
1842
- "cors:delete": {
1843
- "aliases": [],
1844
- "args": {
1845
- "origin": {
1846
- "description": "Origin to delete (will prompt if not provided)",
1847
- "name": "origin",
1848
- "required": false
1849
- }
1850
- },
1851
- "description": "Delete a CORS origin from the project",
1852
- "examples": [
1853
- {
1854
- "command": "<%= config.bin %> <%= command.id %>",
1855
- "description": "Interactively select and delete a CORS origin"
1856
- },
1857
- {
1858
- "command": "<%= config.bin %> <%= command.id %> https://example.com",
1859
- "description": "Delete a specific CORS origin"
1860
- },
1861
- {
1862
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
1863
- "description": "Delete a CORS origin from a specific project"
1864
- }
1865
- ],
1866
- "flags": {
1867
- "project-id": {
1868
- "char": "p",
1869
- "description": "Project ID to delete CORS origin from (overrides CLI configuration)",
1870
- "helpGroup": "OVERRIDE",
1871
- "name": "project-id",
1872
- "hasDynamicHelp": false,
1873
- "helpValue": "<id>",
1874
- "multiple": false,
1875
- "type": "option"
1876
- }
1877
- },
1878
- "hasDynamicHelp": false,
1879
- "hiddenAliases": [],
1880
- "id": "cors:delete",
1881
- "pluginAlias": "@sanity/cli",
1882
- "pluginName": "@sanity/cli",
1883
- "pluginType": "core",
1884
- "strict": true,
1885
- "isESM": true,
1886
- "relativePath": [
1887
- "dist",
1888
- "commands",
1889
- "cors",
1890
- "delete.js"
1891
- ]
1892
- },
1893
- "cors:list": {
1894
- "aliases": [],
1895
- "args": {},
1896
- "description": "List CORS origins for the project",
1897
- "examples": [
1898
- {
1899
- "command": "<%= config.bin %> <%= command.id %>",
1900
- "description": "List CORS origins for the project"
1901
- },
1902
- {
1903
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
1904
- "description": "List CORS origins for a specific project"
1905
- }
1906
- ],
1907
- "flags": {
1908
- "project-id": {
1909
- "char": "p",
1910
- "description": "Project ID to list CORS origins for (overrides CLI configuration)",
1911
- "helpGroup": "OVERRIDE",
1912
- "name": "project-id",
1913
- "hasDynamicHelp": false,
1914
- "helpValue": "<id>",
1915
- "multiple": false,
1916
- "type": "option"
1917
- }
1918
- },
1919
- "hasDynamicHelp": false,
1920
- "hiddenAliases": [],
1921
- "id": "cors:list",
1922
- "pluginAlias": "@sanity/cli",
1923
- "pluginName": "@sanity/cli",
1924
- "pluginType": "core",
1925
- "strict": true,
1926
- "isESM": true,
1927
- "relativePath": [
1928
- "dist",
1929
- "commands",
1930
- "cors",
1931
- "list.js"
1932
- ]
1933
- },
1934
1776
  "datasets:copy": {
1935
1777
  "aliases": [],
1936
1778
  "args": {
@@ -2940,69 +2782,63 @@
2940
2782
  "update.js"
2941
2783
  ]
2942
2784
  },
2943
- "docs:browse": {
2944
- "aliases": [],
2945
- "args": {},
2946
- "description": "Open Sanity docs in your browser",
2947
- "flags": {},
2948
- "hasDynamicHelp": false,
2949
- "hiddenAliases": [],
2950
- "id": "docs:browse",
2951
- "pluginAlias": "@sanity/cli",
2952
- "pluginName": "@sanity/cli",
2953
- "pluginType": "core",
2954
- "strict": true,
2955
- "enableJsonFlag": false,
2956
- "isESM": true,
2957
- "relativePath": [
2958
- "dist",
2959
- "commands",
2960
- "docs",
2961
- "browse.js"
2962
- ]
2963
- },
2964
- "docs:read": {
2785
+ "cors:add": {
2965
2786
  "aliases": [],
2966
2787
  "args": {
2967
- "path": {
2968
- "description": "Path or URL to article, found in search results and docs content as links",
2969
- "name": "path",
2788
+ "origin": {
2789
+ "description": "Origin to allow (e.g., https://example.com)",
2790
+ "name": "origin",
2970
2791
  "required": true
2971
2792
  }
2972
2793
  },
2973
- "description": "Read an article in terminal",
2794
+ "description": "Add a CORS origin to the project",
2974
2795
  "examples": [
2975
2796
  {
2976
- "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation",
2977
- "description": "Read as markdown in terminal"
2797
+ "command": "<%= config.bin %> <%= command.id %>",
2798
+ "description": "Interactively add a CORS origin"
2978
2799
  },
2979
2800
  {
2980
- "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation",
2981
- "description": "Read using full URL"
2801
+ "command": "<%= config.bin %> <%= command.id %> http://localhost:3000 --no-credentials",
2802
+ "description": "Add a localhost origin without credentials"
2982
2803
  },
2983
2804
  {
2984
- "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation --web",
2985
- "description": "Open in web browser"
2805
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
2806
+ "description": "Add a production origin with credentials allowed"
2986
2807
  },
2987
2808
  {
2988
- "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation -w",
2989
- "description": "Open using full URL in web browser"
2809
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project-id abc123",
2810
+ "description": "Add a CORS origin for a specific project"
2990
2811
  }
2991
2812
  ],
2992
2813
  "flags": {
2993
- "web": {
2994
- "aliases": [
2995
- "w"
2996
- ],
2997
- "description": "Open in a web browser",
2998
- "name": "web",
2814
+ "project-id": {
2815
+ "char": "p",
2816
+ "description": "Project ID to add CORS origin to (overrides CLI configuration)",
2817
+ "helpGroup": "OVERRIDE",
2818
+ "name": "project-id",
2819
+ "hasDynamicHelp": false,
2820
+ "helpValue": "<id>",
2821
+ "multiple": false,
2822
+ "type": "option"
2823
+ },
2824
+ "credentials": {
2825
+ "description": "Allow credentials (token/cookie) to be sent from this origin",
2826
+ "name": "credentials",
2827
+ "required": false,
2828
+ "allowNo": true,
2829
+ "type": "boolean"
2830
+ },
2831
+ "yes": {
2832
+ "char": "y",
2833
+ "description": "Confirm risky wildcard origins without prompting",
2834
+ "name": "yes",
2999
2835
  "allowNo": false,
3000
2836
  "type": "boolean"
3001
2837
  }
3002
2838
  },
3003
2839
  "hasDynamicHelp": false,
3004
2840
  "hiddenAliases": [],
3005
- "id": "docs:read",
2841
+ "id": "cors:add",
3006
2842
  "pluginAlias": "@sanity/cli",
3007
2843
  "pluginName": "@sanity/cli",
3008
2844
  "pluginType": "core",
@@ -3011,17 +2847,184 @@
3011
2847
  "relativePath": [
3012
2848
  "dist",
3013
2849
  "commands",
3014
- "docs",
3015
- "read.js"
2850
+ "cors",
2851
+ "add.js"
3016
2852
  ]
3017
2853
  },
3018
- "docs:search": {
2854
+ "cors:delete": {
3019
2855
  "aliases": [],
3020
2856
  "args": {
3021
- "query": {
3022
- "description": "Search query for documentation",
3023
- "name": "query",
3024
- "required": true
2857
+ "origin": {
2858
+ "description": "Origin to delete (will prompt if not provided)",
2859
+ "name": "origin",
2860
+ "required": false
2861
+ }
2862
+ },
2863
+ "description": "Delete a CORS origin from the project",
2864
+ "examples": [
2865
+ {
2866
+ "command": "<%= config.bin %> <%= command.id %>",
2867
+ "description": "Interactively select and delete a CORS origin"
2868
+ },
2869
+ {
2870
+ "command": "<%= config.bin %> <%= command.id %> https://example.com",
2871
+ "description": "Delete a specific CORS origin"
2872
+ },
2873
+ {
2874
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2875
+ "description": "Delete a CORS origin from a specific project"
2876
+ }
2877
+ ],
2878
+ "flags": {
2879
+ "project-id": {
2880
+ "char": "p",
2881
+ "description": "Project ID to delete CORS origin from (overrides CLI configuration)",
2882
+ "helpGroup": "OVERRIDE",
2883
+ "name": "project-id",
2884
+ "hasDynamicHelp": false,
2885
+ "helpValue": "<id>",
2886
+ "multiple": false,
2887
+ "type": "option"
2888
+ }
2889
+ },
2890
+ "hasDynamicHelp": false,
2891
+ "hiddenAliases": [],
2892
+ "id": "cors:delete",
2893
+ "pluginAlias": "@sanity/cli",
2894
+ "pluginName": "@sanity/cli",
2895
+ "pluginType": "core",
2896
+ "strict": true,
2897
+ "isESM": true,
2898
+ "relativePath": [
2899
+ "dist",
2900
+ "commands",
2901
+ "cors",
2902
+ "delete.js"
2903
+ ]
2904
+ },
2905
+ "cors:list": {
2906
+ "aliases": [],
2907
+ "args": {},
2908
+ "description": "List CORS origins for the project",
2909
+ "examples": [
2910
+ {
2911
+ "command": "<%= config.bin %> <%= command.id %>",
2912
+ "description": "List CORS origins for the project"
2913
+ },
2914
+ {
2915
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2916
+ "description": "List CORS origins for a specific project"
2917
+ }
2918
+ ],
2919
+ "flags": {
2920
+ "project-id": {
2921
+ "char": "p",
2922
+ "description": "Project ID to list CORS origins for (overrides CLI configuration)",
2923
+ "helpGroup": "OVERRIDE",
2924
+ "name": "project-id",
2925
+ "hasDynamicHelp": false,
2926
+ "helpValue": "<id>",
2927
+ "multiple": false,
2928
+ "type": "option"
2929
+ }
2930
+ },
2931
+ "hasDynamicHelp": false,
2932
+ "hiddenAliases": [],
2933
+ "id": "cors:list",
2934
+ "pluginAlias": "@sanity/cli",
2935
+ "pluginName": "@sanity/cli",
2936
+ "pluginType": "core",
2937
+ "strict": true,
2938
+ "isESM": true,
2939
+ "relativePath": [
2940
+ "dist",
2941
+ "commands",
2942
+ "cors",
2943
+ "list.js"
2944
+ ]
2945
+ },
2946
+ "docs:browse": {
2947
+ "aliases": [],
2948
+ "args": {},
2949
+ "description": "Open Sanity docs in your browser",
2950
+ "flags": {},
2951
+ "hasDynamicHelp": false,
2952
+ "hiddenAliases": [],
2953
+ "id": "docs:browse",
2954
+ "pluginAlias": "@sanity/cli",
2955
+ "pluginName": "@sanity/cli",
2956
+ "pluginType": "core",
2957
+ "strict": true,
2958
+ "enableJsonFlag": false,
2959
+ "isESM": true,
2960
+ "relativePath": [
2961
+ "dist",
2962
+ "commands",
2963
+ "docs",
2964
+ "browse.js"
2965
+ ]
2966
+ },
2967
+ "docs:read": {
2968
+ "aliases": [],
2969
+ "args": {
2970
+ "path": {
2971
+ "description": "Path or URL to article, found in search results and docs content as links",
2972
+ "name": "path",
2973
+ "required": true
2974
+ }
2975
+ },
2976
+ "description": "Read an article in terminal",
2977
+ "examples": [
2978
+ {
2979
+ "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation",
2980
+ "description": "Read as markdown in terminal"
2981
+ },
2982
+ {
2983
+ "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation",
2984
+ "description": "Read using full URL"
2985
+ },
2986
+ {
2987
+ "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation --web",
2988
+ "description": "Open in web browser"
2989
+ },
2990
+ {
2991
+ "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation -w",
2992
+ "description": "Open using full URL in web browser"
2993
+ }
2994
+ ],
2995
+ "flags": {
2996
+ "web": {
2997
+ "aliases": [
2998
+ "w"
2999
+ ],
3000
+ "description": "Open in a web browser",
3001
+ "name": "web",
3002
+ "allowNo": false,
3003
+ "type": "boolean"
3004
+ }
3005
+ },
3006
+ "hasDynamicHelp": false,
3007
+ "hiddenAliases": [],
3008
+ "id": "docs:read",
3009
+ "pluginAlias": "@sanity/cli",
3010
+ "pluginName": "@sanity/cli",
3011
+ "pluginType": "core",
3012
+ "strict": true,
3013
+ "isESM": true,
3014
+ "relativePath": [
3015
+ "dist",
3016
+ "commands",
3017
+ "docs",
3018
+ "read.js"
3019
+ ]
3020
+ },
3021
+ "docs:search": {
3022
+ "aliases": [],
3023
+ "args": {
3024
+ "query": {
3025
+ "description": "Search query for documentation",
3026
+ "name": "query",
3027
+ "required": true
3025
3028
  }
3026
3029
  },
3027
3030
  "description": "Search Sanity docs",
@@ -4085,10 +4088,173 @@
4085
4088
  "description": "Configure Sanity MCP server for detected AI editors"
4086
4089
  }
4087
4090
  ],
4088
- "flags": {},
4089
- "hasDynamicHelp": false,
4090
- "hiddenAliases": [],
4091
- "id": "mcp:configure",
4091
+ "flags": {},
4092
+ "hasDynamicHelp": false,
4093
+ "hiddenAliases": [],
4094
+ "id": "mcp:configure",
4095
+ "pluginAlias": "@sanity/cli",
4096
+ "pluginName": "@sanity/cli",
4097
+ "pluginType": "core",
4098
+ "strict": true,
4099
+ "isESM": true,
4100
+ "relativePath": [
4101
+ "dist",
4102
+ "commands",
4103
+ "mcp",
4104
+ "configure.js"
4105
+ ]
4106
+ },
4107
+ "migrations:create": {
4108
+ "aliases": [],
4109
+ "args": {
4110
+ "title": {
4111
+ "description": "Title of migration",
4112
+ "name": "title",
4113
+ "required": false
4114
+ }
4115
+ },
4116
+ "description": "Create a new migration within your project",
4117
+ "examples": [
4118
+ {
4119
+ "command": "<%= config.bin %> <%= command.id %>",
4120
+ "description": "Create a new migration, prompting for title and options"
4121
+ },
4122
+ {
4123
+ "command": "<%= config.bin %> <%= command.id %> \"Rename field from location to address\"",
4124
+ "description": "Create a new migration with the provided title, prompting for options"
4125
+ }
4126
+ ],
4127
+ "flags": {},
4128
+ "hasDynamicHelp": false,
4129
+ "hiddenAliases": [
4130
+ "migration:create"
4131
+ ],
4132
+ "id": "migrations:create",
4133
+ "pluginAlias": "@sanity/cli",
4134
+ "pluginName": "@sanity/cli",
4135
+ "pluginType": "core",
4136
+ "strict": true,
4137
+ "isESM": true,
4138
+ "relativePath": [
4139
+ "dist",
4140
+ "commands",
4141
+ "migrations",
4142
+ "create.js"
4143
+ ]
4144
+ },
4145
+ "migrations:list": {
4146
+ "aliases": [],
4147
+ "args": {},
4148
+ "description": "List available migrations",
4149
+ "examples": [
4150
+ {
4151
+ "command": "<%= config.bin %> <%= command.id %>",
4152
+ "description": "List all available migrations in the project"
4153
+ }
4154
+ ],
4155
+ "flags": {},
4156
+ "hasDynamicHelp": false,
4157
+ "hiddenAliases": [
4158
+ "migration:list"
4159
+ ],
4160
+ "id": "migrations:list",
4161
+ "pluginAlias": "@sanity/cli",
4162
+ "pluginName": "@sanity/cli",
4163
+ "pluginType": "core",
4164
+ "strict": true,
4165
+ "isESM": true,
4166
+ "relativePath": [
4167
+ "dist",
4168
+ "commands",
4169
+ "migrations",
4170
+ "list.js"
4171
+ ]
4172
+ },
4173
+ "migrations:run": {
4174
+ "aliases": [],
4175
+ "args": {
4176
+ "id": {
4177
+ "description": "ID",
4178
+ "name": "id",
4179
+ "required": false
4180
+ }
4181
+ },
4182
+ "description": "Run a migration against a dataset",
4183
+ "examples": [
4184
+ {
4185
+ "command": "<%= config.bin %> <%= command.id %> <id>",
4186
+ "description": "dry run the migration"
4187
+ },
4188
+ {
4189
+ "command": "<%= config.bin %> <%= command.id %> <id> --no-dry-run --project xyz --dataset staging",
4190
+ "description": "execute the migration against a dataset"
4191
+ },
4192
+ {
4193
+ "command": "<%= config.bin %> <%= command.id %> <id> --from-export=production.tar.gz --no-dry-run --project xyz --dataset staging",
4194
+ "description": "execute the migration using a dataset export as the source"
4195
+ }
4196
+ ],
4197
+ "flags": {
4198
+ "api-version": {
4199
+ "description": "API version to use when migrating. Defaults to v2024-01-29.",
4200
+ "name": "api-version",
4201
+ "hasDynamicHelp": false,
4202
+ "multiple": false,
4203
+ "type": "option"
4204
+ },
4205
+ "concurrency": {
4206
+ "description": "How many mutation requests to run in parallel. Must be between 1 and 10. Default: 6.",
4207
+ "name": "concurrency",
4208
+ "default": 6,
4209
+ "hasDynamicHelp": false,
4210
+ "multiple": false,
4211
+ "type": "option"
4212
+ },
4213
+ "confirm": {
4214
+ "description": "Prompt for confirmation before running the migration (default: true). Use --no-confirm to skip.",
4215
+ "name": "confirm",
4216
+ "allowNo": true,
4217
+ "type": "boolean"
4218
+ },
4219
+ "dataset": {
4220
+ "description": "Dataset to migrate. Defaults to the dataset configured in your Sanity CLI config.",
4221
+ "name": "dataset",
4222
+ "hasDynamicHelp": false,
4223
+ "multiple": false,
4224
+ "type": "option"
4225
+ },
4226
+ "dry-run": {
4227
+ "description": "By default the migration runs in dry mode. Use --no-dry-run to migrate dataset.",
4228
+ "name": "dry-run",
4229
+ "allowNo": true,
4230
+ "type": "boolean"
4231
+ },
4232
+ "from-export": {
4233
+ "description": "Use a local dataset export as source for migration instead of calling the Sanity API. Note: this is only supported for dry runs.",
4234
+ "name": "from-export",
4235
+ "hasDynamicHelp": false,
4236
+ "multiple": false,
4237
+ "type": "option"
4238
+ },
4239
+ "progress": {
4240
+ "description": "Display progress during migration (default: true). Use --no-progress to hide output.",
4241
+ "name": "progress",
4242
+ "allowNo": true,
4243
+ "type": "boolean"
4244
+ },
4245
+ "project": {
4246
+ "description": "Project ID of the dataset to migrate. Defaults to the projectId configured in your Sanity CLI config.",
4247
+ "name": "project",
4248
+ "hasDynamicHelp": false,
4249
+ "multiple": false,
4250
+ "type": "option"
4251
+ }
4252
+ },
4253
+ "hasDynamicHelp": false,
4254
+ "hiddenAliases": [
4255
+ "migration:run"
4256
+ ],
4257
+ "id": "migrations:run",
4092
4258
  "pluginAlias": "@sanity/cli",
4093
4259
  "pluginName": "@sanity/cli",
4094
4260
  "pluginType": "core",
@@ -4097,8 +4263,8 @@
4097
4263
  "relativePath": [
4098
4264
  "dist",
4099
4265
  "commands",
4100
- "mcp",
4101
- "configure.js"
4266
+ "migrations",
4267
+ "run.js"
4102
4268
  ]
4103
4269
  },
4104
4270
  "media:create-aspect": {
@@ -4441,169 +4607,6 @@
4441
4607
  "import.js"
4442
4608
  ]
4443
4609
  },
4444
- "migrations:create": {
4445
- "aliases": [],
4446
- "args": {
4447
- "title": {
4448
- "description": "Title of migration",
4449
- "name": "title",
4450
- "required": false
4451
- }
4452
- },
4453
- "description": "Create a new migration within your project",
4454
- "examples": [
4455
- {
4456
- "command": "<%= config.bin %> <%= command.id %>",
4457
- "description": "Create a new migration, prompting for title and options"
4458
- },
4459
- {
4460
- "command": "<%= config.bin %> <%= command.id %> \"Rename field from location to address\"",
4461
- "description": "Create a new migration with the provided title, prompting for options"
4462
- }
4463
- ],
4464
- "flags": {},
4465
- "hasDynamicHelp": false,
4466
- "hiddenAliases": [
4467
- "migration:create"
4468
- ],
4469
- "id": "migrations:create",
4470
- "pluginAlias": "@sanity/cli",
4471
- "pluginName": "@sanity/cli",
4472
- "pluginType": "core",
4473
- "strict": true,
4474
- "isESM": true,
4475
- "relativePath": [
4476
- "dist",
4477
- "commands",
4478
- "migrations",
4479
- "create.js"
4480
- ]
4481
- },
4482
- "migrations:list": {
4483
- "aliases": [],
4484
- "args": {},
4485
- "description": "List available migrations",
4486
- "examples": [
4487
- {
4488
- "command": "<%= config.bin %> <%= command.id %>",
4489
- "description": "List all available migrations in the project"
4490
- }
4491
- ],
4492
- "flags": {},
4493
- "hasDynamicHelp": false,
4494
- "hiddenAliases": [
4495
- "migration:list"
4496
- ],
4497
- "id": "migrations:list",
4498
- "pluginAlias": "@sanity/cli",
4499
- "pluginName": "@sanity/cli",
4500
- "pluginType": "core",
4501
- "strict": true,
4502
- "isESM": true,
4503
- "relativePath": [
4504
- "dist",
4505
- "commands",
4506
- "migrations",
4507
- "list.js"
4508
- ]
4509
- },
4510
- "migrations:run": {
4511
- "aliases": [],
4512
- "args": {
4513
- "id": {
4514
- "description": "ID",
4515
- "name": "id",
4516
- "required": false
4517
- }
4518
- },
4519
- "description": "Run a migration against a dataset",
4520
- "examples": [
4521
- {
4522
- "command": "<%= config.bin %> <%= command.id %> <id>",
4523
- "description": "dry run the migration"
4524
- },
4525
- {
4526
- "command": "<%= config.bin %> <%= command.id %> <id> --no-dry-run --project xyz --dataset staging",
4527
- "description": "execute the migration against a dataset"
4528
- },
4529
- {
4530
- "command": "<%= config.bin %> <%= command.id %> <id> --from-export=production.tar.gz --no-dry-run --project xyz --dataset staging",
4531
- "description": "execute the migration using a dataset export as the source"
4532
- }
4533
- ],
4534
- "flags": {
4535
- "api-version": {
4536
- "description": "API version to use when migrating. Defaults to v2024-01-29.",
4537
- "name": "api-version",
4538
- "hasDynamicHelp": false,
4539
- "multiple": false,
4540
- "type": "option"
4541
- },
4542
- "concurrency": {
4543
- "description": "How many mutation requests to run in parallel. Must be between 1 and 10. Default: 6.",
4544
- "name": "concurrency",
4545
- "default": 6,
4546
- "hasDynamicHelp": false,
4547
- "multiple": false,
4548
- "type": "option"
4549
- },
4550
- "confirm": {
4551
- "description": "Prompt for confirmation before running the migration (default: true). Use --no-confirm to skip.",
4552
- "name": "confirm",
4553
- "allowNo": true,
4554
- "type": "boolean"
4555
- },
4556
- "dataset": {
4557
- "description": "Dataset to migrate. Defaults to the dataset configured in your Sanity CLI config.",
4558
- "name": "dataset",
4559
- "hasDynamicHelp": false,
4560
- "multiple": false,
4561
- "type": "option"
4562
- },
4563
- "dry-run": {
4564
- "description": "By default the migration runs in dry mode. Use --no-dry-run to migrate dataset.",
4565
- "name": "dry-run",
4566
- "allowNo": true,
4567
- "type": "boolean"
4568
- },
4569
- "from-export": {
4570
- "description": "Use a local dataset export as source for migration instead of calling the Sanity API. Note: this is only supported for dry runs.",
4571
- "name": "from-export",
4572
- "hasDynamicHelp": false,
4573
- "multiple": false,
4574
- "type": "option"
4575
- },
4576
- "progress": {
4577
- "description": "Display progress during migration (default: true). Use --no-progress to hide output.",
4578
- "name": "progress",
4579
- "allowNo": true,
4580
- "type": "boolean"
4581
- },
4582
- "project": {
4583
- "description": "Project ID of the dataset to migrate. Defaults to the projectId configured in your Sanity CLI config.",
4584
- "name": "project",
4585
- "hasDynamicHelp": false,
4586
- "multiple": false,
4587
- "type": "option"
4588
- }
4589
- },
4590
- "hasDynamicHelp": false,
4591
- "hiddenAliases": [
4592
- "migration:run"
4593
- ],
4594
- "id": "migrations:run",
4595
- "pluginAlias": "@sanity/cli",
4596
- "pluginName": "@sanity/cli",
4597
- "pluginType": "core",
4598
- "strict": true,
4599
- "isESM": true,
4600
- "relativePath": [
4601
- "dist",
4602
- "commands",
4603
- "migrations",
4604
- "run.js"
4605
- ]
4606
- },
4607
4610
  "openapi:get": {
4608
4611
  "aliases": [],
4609
4612
  "args": {
@@ -5656,6 +5659,48 @@
5656
5659
  "status.js"
5657
5660
  ]
5658
5661
  },
5662
+ "typegen:generate": {
5663
+ "aliases": [],
5664
+ "args": {},
5665
+ "description": "Sanity TypeGen\n\nConfiguration:\nThis command can utilize configuration settings defined in a `sanity-typegen.json` file. These settings include:\n\n- \"path\": Specifies a glob pattern to locate your TypeScript or JavaScript files.\n Default: \"./src/**/*.{ts,tsx,js,jsx}\"\n\n- \"schema\": Defines the path to your Sanity schema file. This file should be generated using the `sanity schema extract` command.\n Default: \"schema.json\"\n\n- \"generates\": Indicates the path where the generated TypeScript type definitions will be saved.\n Default: \"./sanity.types.ts\"\n\nThe default configuration values listed above are used if not overridden in your `sanity-typegen.json` configuration file. To customize the behavior of the type generation, adjust these properties in the configuration file according to your project's needs.\n\nNote:\n- The `sanity schema extract` command is a prerequisite for extracting your Sanity Studio schema into a `schema.json` file, which is then used by the `sanity typegen generate` command to generate type definitions.",
5666
+ "examples": [
5667
+ {
5668
+ "command": "<%= config.bin %> <%= command.id %>",
5669
+ "description": "Generate TypeScript type definitions from a Sanity Studio schema extracted using the `sanity schema extract` command."
5670
+ }
5671
+ ],
5672
+ "flags": {
5673
+ "config-path": {
5674
+ "description": "[Default: sanity-typegen.json] Specifies the path to the typegen configuration file. This file should be a JSON file that contains settings for the type generation process.",
5675
+ "name": "config-path",
5676
+ "hasDynamicHelp": false,
5677
+ "multiple": false,
5678
+ "type": "option"
5679
+ },
5680
+ "watch": {
5681
+ "description": "[Default: false] Run the typegen in watch mode",
5682
+ "name": "watch",
5683
+ "allowNo": false,
5684
+ "type": "boolean"
5685
+ }
5686
+ },
5687
+ "hasDynamicHelp": false,
5688
+ "hiddenAliases": [
5689
+ "typegen:generate"
5690
+ ],
5691
+ "id": "typegen:generate",
5692
+ "pluginAlias": "@sanity/cli",
5693
+ "pluginName": "@sanity/cli",
5694
+ "pluginType": "core",
5695
+ "strict": true,
5696
+ "isESM": true,
5697
+ "relativePath": [
5698
+ "dist",
5699
+ "commands",
5700
+ "typegen",
5701
+ "generate.js"
5702
+ ]
5703
+ },
5659
5704
  "tokens:create": {
5660
5705
  "aliases": [],
5661
5706
  "args": {
@@ -5921,48 +5966,6 @@
5921
5966
  "rotate.js"
5922
5967
  ]
5923
5968
  },
5924
- "typegen:generate": {
5925
- "aliases": [],
5926
- "args": {},
5927
- "description": "Sanity TypeGen\n\nConfiguration:\nThis command can utilize configuration settings defined in a `sanity-typegen.json` file. These settings include:\n\n- \"path\": Specifies a glob pattern to locate your TypeScript or JavaScript files.\n Default: \"./src/**/*.{ts,tsx,js,jsx}\"\n\n- \"schema\": Defines the path to your Sanity schema file. This file should be generated using the `sanity schema extract` command.\n Default: \"schema.json\"\n\n- \"generates\": Indicates the path where the generated TypeScript type definitions will be saved.\n Default: \"./sanity.types.ts\"\n\nThe default configuration values listed above are used if not overridden in your `sanity-typegen.json` configuration file. To customize the behavior of the type generation, adjust these properties in the configuration file according to your project's needs.\n\nNote:\n- The `sanity schema extract` command is a prerequisite for extracting your Sanity Studio schema into a `schema.json` file, which is then used by the `sanity typegen generate` command to generate type definitions.",
5928
- "examples": [
5929
- {
5930
- "command": "<%= config.bin %> <%= command.id %>",
5931
- "description": "Generate TypeScript type definitions from a Sanity Studio schema extracted using the `sanity schema extract` command."
5932
- }
5933
- ],
5934
- "flags": {
5935
- "config-path": {
5936
- "description": "[Default: sanity-typegen.json] Specifies the path to the typegen configuration file. This file should be a JSON file that contains settings for the type generation process.",
5937
- "name": "config-path",
5938
- "hasDynamicHelp": false,
5939
- "multiple": false,
5940
- "type": "option"
5941
- },
5942
- "watch": {
5943
- "description": "[Default: false] Run the typegen in watch mode",
5944
- "name": "watch",
5945
- "allowNo": false,
5946
- "type": "boolean"
5947
- }
5948
- },
5949
- "hasDynamicHelp": false,
5950
- "hiddenAliases": [
5951
- "typegen:generate"
5952
- ],
5953
- "id": "typegen:generate",
5954
- "pluginAlias": "@sanity/cli",
5955
- "pluginName": "@sanity/cli",
5956
- "pluginType": "core",
5957
- "strict": true,
5958
- "isESM": true,
5959
- "relativePath": [
5960
- "dist",
5961
- "commands",
5962
- "typegen",
5963
- "generate.js"
5964
- ]
5965
- },
5966
5969
  "users:invite": {
5967
5970
  "aliases": [],
5968
5971
  "args": {
@@ -7052,5 +7055,5 @@
7052
7055
  ]
7053
7056
  }
7054
7057
  },
7055
- "version": "8.13.1"
7058
+ "version": "8.15.0"
7056
7059
  }