@sanity/cli 6.0.0-alpha.3 → 6.0.0-alpha.5
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/dist/actions/auth/login/{index.js → login.js} +1 -1
- package/dist/actions/auth/login/{index.js.map → login.js.map} +1 -1
- package/dist/actions/dev/startStudioDevServer.js +3 -8
- package/dist/actions/dev/startStudioDevServer.js.map +1 -1
- package/dist/actions/dev/types.d.ts +1 -3
- package/dist/actions/dev/types.js.map +1 -1
- package/dist/actions/documents/validate.d.ts +0 -2
- package/dist/actions/documents/validate.js +21 -1
- package/dist/actions/documents/validate.js.map +1 -1
- package/dist/actions/exec/execScript.js +1 -1
- package/dist/actions/exec/execScript.js.map +1 -1
- package/dist/actions/graphql/__tests__/getGraphQLAPIs.test.js +1 -1
- package/dist/actions/graphql/__tests__/getGraphQLAPIs.test.js.map +1 -1
- package/dist/actions/graphql/getGraphQLAPIs.js +1 -1
- package/dist/actions/graphql/getGraphQLAPIs.js.map +1 -1
- package/dist/actions/manifest/extractManifest.js +1 -4
- package/dist/actions/manifest/extractManifest.js.map +1 -1
- package/dist/actions/organizations/getOrganizationChoices.d.ts +6 -0
- package/dist/actions/organizations/getOrganizationChoices.js +23 -0
- package/dist/actions/organizations/getOrganizationChoices.js.map +1 -0
- package/dist/actions/organizations/getOrganizationsWithAttachGrantInfo.d.ts +2 -0
- package/dist/actions/organizations/getOrganizationsWithAttachGrantInfo.js +9 -0
- package/dist/actions/organizations/getOrganizationsWithAttachGrantInfo.js.map +1 -0
- package/dist/actions/organizations/hasProjectAttachGrant.d.ts +1 -0
- package/dist/actions/organizations/hasProjectAttachGrant.js +24 -0
- package/dist/actions/organizations/hasProjectAttachGrant.js.map +1 -0
- package/dist/actions/schema/deleteSchemaAction.d.ts +13 -5
- package/dist/actions/schema/deleteSchemaAction.js +12 -17
- package/dist/actions/schema/deleteSchemaAction.js.map +1 -1
- package/dist/actions/schema/deploySchemas.d.ts +15 -0
- package/dist/actions/schema/deploySchemas.js +98 -0
- package/dist/actions/schema/deploySchemas.js.map +1 -0
- package/dist/actions/schema/listSchemas.d.ts +12 -0
- package/dist/actions/schema/listSchemas.js +119 -0
- package/dist/actions/schema/listSchemas.js.map +1 -0
- package/dist/actions/schema/schemaStoreTypes.d.ts +0 -11
- package/dist/actions/schema/schemaStoreTypes.js.map +1 -1
- package/dist/actions/schema/utils/debug.d.ts +2 -0
- package/dist/actions/schema/utils/debug.js +5 -0
- package/dist/actions/schema/utils/debug.js.map +1 -0
- package/dist/actions/schema/utils/manifestExtractor.d.ts +3 -8
- package/dist/actions/schema/utils/manifestExtractor.js +12 -17
- package/dist/actions/schema/utils/manifestExtractor.js.map +1 -1
- package/dist/actions/schema/utils/manifestReader.d.ts +2 -9
- package/dist/actions/schema/utils/manifestReader.js +6 -12
- package/dist/actions/schema/utils/manifestReader.js.map +1 -1
- package/dist/actions/schema/utils/schemaStoreOutStrings.d.ts +0 -1
- package/dist/actions/schema/utils/schemaStoreOutStrings.js +1 -1
- package/dist/actions/schema/utils/schemaStoreOutStrings.js.map +1 -1
- package/dist/actions/schema/utils/schemaStoreValidation.d.ts +10 -62
- package/dist/actions/schema/utils/schemaStoreValidation.js +40 -127
- package/dist/actions/schema/utils/schemaStoreValidation.js.map +1 -1
- package/dist/actions/schema/utils/uniqByProjectIdDataset.d.ts +14 -0
- package/dist/actions/schema/utils/uniqByProjectIdDataset.js +9 -0
- package/dist/actions/schema/utils/uniqByProjectIdDataset.js.map +1 -0
- package/dist/actions/users/getMembersForProject.d.ts +1 -3
- package/dist/actions/users/getMembersForProject.js +6 -17
- package/dist/actions/users/getMembersForProject.js.map +1 -1
- package/dist/actions/users/types.d.ts +0 -11
- package/dist/actions/users/types.js.map +1 -1
- package/dist/commands/__tests__/debug.test.js +113 -220
- package/dist/commands/__tests__/debug.test.js.map +1 -1
- package/dist/commands/__tests__/deploy.test.js +325 -293
- package/dist/commands/__tests__/deploy.test.js.map +1 -1
- package/dist/commands/__tests__/dev.test.js +62 -19
- package/dist/commands/__tests__/dev.test.js.map +1 -1
- package/dist/commands/__tests__/init/init.authentication.test.js +73 -0
- package/dist/commands/__tests__/init/init.authentication.test.js.map +1 -0
- package/dist/commands/__tests__/init/init.create-new-project.test.js +195 -0
- package/dist/commands/__tests__/init/init.create-new-project.test.js.map +1 -0
- package/dist/commands/__tests__/init/init.plan.test.js +279 -0
- package/dist/commands/__tests__/init/init.plan.test.js.map +1 -0
- package/dist/commands/__tests__/init/init.setup.test.js +335 -0
- package/dist/commands/__tests__/init/init.setup.test.js.map +1 -0
- package/dist/commands/__tests__/install.test.js +46 -22
- package/dist/commands/__tests__/install.test.js.map +1 -1
- package/dist/commands/__tests__/logout.test.js +8 -5
- package/dist/commands/__tests__/logout.test.js.map +1 -1
- package/dist/commands/__tests__/manage.test.js +29 -24
- package/dist/commands/__tests__/manage.test.js.map +1 -1
- package/dist/commands/__tests__/migration.test.js +119 -0
- package/dist/commands/__tests__/migration.test.js.map +1 -0
- package/dist/commands/__tests__/versions.test.js +22 -14
- package/dist/commands/__tests__/versions.test.js.map +1 -1
- package/dist/commands/backup/__tests__/disable.test.js +72 -75
- package/dist/commands/backup/__tests__/disable.test.js.map +1 -1
- package/dist/commands/backup/__tests__/download.test.js +169 -80
- package/dist/commands/backup/__tests__/download.test.js.map +1 -1
- package/dist/commands/backup/__tests__/enable.test.js +109 -140
- package/dist/commands/backup/__tests__/enable.test.js.map +1 -1
- package/dist/commands/backup/__tests__/list.test.js +84 -75
- package/dist/commands/backup/__tests__/list.test.js.map +1 -1
- package/dist/commands/backup/disable.js +5 -11
- package/dist/commands/backup/disable.js.map +1 -1
- package/dist/commands/backup/enable.js +5 -11
- package/dist/commands/backup/enable.js.map +1 -1
- package/dist/commands/backup/list.js +7 -8
- package/dist/commands/backup/list.js.map +1 -1
- package/dist/commands/cors/__tests__/add.test.js +68 -38
- package/dist/commands/cors/__tests__/add.test.js.map +1 -1
- package/dist/commands/cors/__tests__/delete.test.js +52 -37
- package/dist/commands/cors/__tests__/delete.test.js.map +1 -1
- package/dist/commands/cors/__tests__/list.test.js +80 -57
- package/dist/commands/cors/__tests__/list.test.js.map +1 -1
- package/dist/commands/cors/add.js +5 -13
- package/dist/commands/cors/add.js.map +1 -1
- package/dist/commands/cors/delete.js +7 -15
- package/dist/commands/cors/delete.js.map +1 -1
- package/dist/commands/cors/list.js +2 -10
- package/dist/commands/cors/list.js.map +1 -1
- package/dist/commands/dataset/__tests__/copy.test.js +197 -89
- package/dist/commands/dataset/__tests__/copy.test.js.map +1 -1
- package/dist/commands/dataset/__tests__/create.test.js +147 -117
- package/dist/commands/dataset/__tests__/create.test.js.map +1 -1
- package/dist/commands/dataset/__tests__/delete.test.js +75 -68
- package/dist/commands/dataset/__tests__/delete.test.js.map +1 -1
- package/dist/commands/dataset/__tests__/export.test.js +123 -83
- package/dist/commands/dataset/__tests__/export.test.js.map +1 -1
- package/dist/commands/dataset/__tests__/import.test.js +2 -2
- package/dist/commands/dataset/__tests__/import.test.js.map +1 -1
- package/dist/commands/dataset/__tests__/list.test.js +107 -65
- package/dist/commands/dataset/__tests__/list.test.js.map +1 -1
- package/dist/commands/dataset/alias/__tests__/create.test.js +114 -74
- package/dist/commands/dataset/alias/__tests__/create.test.js.map +1 -1
- package/dist/commands/dataset/alias/__tests__/delete.test.js +40 -29
- package/dist/commands/dataset/alias/__tests__/delete.test.js.map +1 -1
- package/dist/commands/dataset/alias/__tests__/link.test.js +114 -74
- package/dist/commands/dataset/alias/__tests__/link.test.js.map +1 -1
- package/dist/commands/dataset/alias/__tests__/unlink.test.js +44 -29
- package/dist/commands/dataset/alias/__tests__/unlink.test.js.map +1 -1
- package/dist/commands/dataset/export.js +4 -4
- package/dist/commands/dataset/export.js.map +1 -1
- package/dist/commands/dataset/visibility/__tests__/get.test.js +48 -67
- package/dist/commands/dataset/visibility/__tests__/get.test.js.map +1 -1
- package/dist/commands/dataset/visibility/__tests__/set.test.js +76 -123
- package/dist/commands/dataset/visibility/__tests__/set.test.js.map +1 -1
- package/dist/commands/dev.js +0 -1
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/docs/__tests__/search.test.js +8 -7
- package/dist/commands/docs/__tests__/search.test.js.map +1 -1
- package/dist/commands/documents/__tests__/create.test.js +328 -265
- package/dist/commands/documents/__tests__/create.test.js.map +1 -1
- package/dist/commands/documents/__tests__/delete.test.js +119 -87
- package/dist/commands/documents/__tests__/delete.test.js.map +1 -1
- package/dist/commands/documents/__tests__/get.test.js +68 -95
- package/dist/commands/documents/__tests__/get.test.js.map +1 -1
- package/dist/commands/documents/__tests__/query.test.js +87 -192
- package/dist/commands/documents/__tests__/query.test.js.map +1 -1
- package/dist/commands/documents/__tests__/validate.test.js +52 -29
- package/dist/commands/documents/__tests__/validate.test.js.map +1 -1
- package/dist/commands/documents/create.d.ts +1 -0
- package/dist/commands/documents/create.js +10 -9
- package/dist/commands/documents/create.js.map +1 -1
- package/dist/commands/documents/delete.js +2 -3
- package/dist/commands/documents/delete.js.map +1 -1
- package/dist/commands/documents/get.js +2 -3
- package/dist/commands/documents/get.js.map +1 -1
- package/dist/commands/documents/query.js +2 -3
- package/dist/commands/documents/query.js.map +1 -1
- package/dist/commands/documents/validate.js +0 -20
- package/dist/commands/documents/validate.js.map +1 -1
- package/dist/commands/graphql/__tests__/list.test.js +57 -45
- package/dist/commands/graphql/__tests__/list.test.js.map +1 -1
- package/dist/commands/graphql/__tests__/undeploy.test.js +85 -59
- package/dist/commands/graphql/__tests__/undeploy.test.js.map +1 -1
- package/dist/commands/graphql/list.js +2 -2
- package/dist/commands/graphql/list.js.map +1 -1
- package/dist/commands/graphql/undeploy.js +4 -9
- package/dist/commands/graphql/undeploy.js.map +1 -1
- package/dist/commands/hook/__tests__/attempt.test.js +48 -33
- package/dist/commands/hook/__tests__/attempt.test.js.map +1 -1
- package/dist/commands/hook/__tests__/create.test.js +49 -51
- package/dist/commands/hook/__tests__/create.test.js.map +1 -1
- package/dist/commands/hook/__tests__/delete.test.js +43 -30
- package/dist/commands/hook/__tests__/delete.test.js.map +1 -1
- package/dist/commands/hook/__tests__/list.test.js +38 -31
- package/dist/commands/hook/__tests__/list.test.js.map +1 -1
- package/dist/commands/hook/__tests__/logs.test.js +68 -40
- package/dist/commands/hook/__tests__/logs.test.js.map +1 -1
- package/dist/commands/hook/create.js +2 -6
- package/dist/commands/hook/create.js.map +1 -1
- package/dist/commands/hook/delete.js +5 -17
- package/dist/commands/hook/delete.js.map +1 -1
- package/dist/commands/hook/list.js +2 -8
- package/dist/commands/hook/list.js.map +1 -1
- package/dist/commands/init.d.ts +4 -0
- package/dist/commands/init.js +151 -18
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/login.js +1 -1
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/manifest/__tests__/extract.test.js +22 -13
- package/dist/commands/manifest/__tests__/extract.test.js.map +1 -1
- package/dist/commands/media/__tests__/create-aspect.test.js +41 -28
- package/dist/commands/media/__tests__/create-aspect.test.js.map +1 -1
- package/dist/commands/media/__tests__/delete-aspect.test.js +44 -35
- package/dist/commands/media/__tests__/delete-aspect.test.js.map +1 -1
- package/dist/commands/media/__tests__/deploy-aspect.test.js +67 -80
- package/dist/commands/media/__tests__/deploy-aspect.test.js.map +1 -1
- package/dist/commands/media/__tests__/export.test.js +365 -66
- package/dist/commands/media/__tests__/export.test.js.map +1 -1
- package/dist/commands/media/__tests__/import.test.js +171 -105
- package/dist/commands/media/__tests__/import.test.js.map +1 -1
- package/dist/commands/media/export.js +2 -2
- package/dist/commands/media/export.js.map +1 -1
- package/dist/commands/media/import.js +2 -2
- package/dist/commands/media/import.js.map +1 -1
- package/dist/commands/projects/__tests__/list.test.js +5 -4
- package/dist/commands/projects/__tests__/list.test.js.map +1 -1
- package/dist/commands/projects/list.js +2 -6
- package/dist/commands/projects/list.js.map +1 -1
- package/dist/commands/schema/__tests__/delete.test.js +396 -151
- package/dist/commands/schema/__tests__/delete.test.js.map +1 -1
- package/dist/commands/schema/__tests__/deploy.test.js +348 -0
- package/dist/commands/schema/__tests__/deploy.test.js.map +1 -0
- package/dist/commands/schema/__tests__/extract.test.js +19 -11
- package/dist/commands/schema/__tests__/extract.test.js.map +1 -1
- package/dist/commands/schema/__tests__/list.test.js +399 -0
- package/dist/commands/schema/__tests__/list.test.js.map +1 -0
- package/dist/commands/schema/__tests__/validate.test.js +27 -10
- package/dist/commands/schema/__tests__/validate.test.js.map +1 -1
- package/dist/commands/schema/delete.d.ts +1 -1
- package/dist/commands/schema/delete.js +20 -23
- package/dist/commands/schema/delete.js.map +1 -1
- package/dist/commands/schema/deploy.d.ts +16 -0
- package/dist/commands/schema/deploy.js +98 -0
- package/dist/commands/schema/deploy.js.map +1 -0
- package/dist/commands/schema/list.d.ts +15 -0
- package/dist/commands/schema/list.js +104 -0
- package/dist/commands/schema/list.js.map +1 -0
- package/dist/commands/telemetry/__tests__/disable.test.js +7 -5
- package/dist/commands/telemetry/__tests__/disable.test.js.map +1 -1
- package/dist/commands/telemetry/__tests__/enable.test.js +7 -5
- package/dist/commands/telemetry/__tests__/enable.test.js.map +1 -1
- package/dist/commands/telemetry/__tests__/status.test.js +7 -5
- package/dist/commands/telemetry/__tests__/status.test.js.map +1 -1
- package/dist/commands/tokens/__tests__/add.test.js +55 -40
- package/dist/commands/tokens/__tests__/add.test.js.map +1 -1
- package/dist/commands/tokens/__tests__/delete.test.js +72 -42
- package/dist/commands/tokens/__tests__/delete.test.js.map +1 -1
- package/dist/commands/tokens/__tests__/list.test.js +87 -60
- package/dist/commands/tokens/__tests__/list.test.js.map +1 -1
- package/dist/commands/tokens/add.js +3 -5
- package/dist/commands/tokens/add.js.map +1 -1
- package/dist/commands/users/__tests__/invite.test.js +100 -79
- package/dist/commands/users/__tests__/invite.test.js.map +1 -1
- package/dist/commands/users/__tests__/list.test.js +186 -180
- package/dist/commands/users/__tests__/list.test.js.map +1 -1
- package/dist/commands/users/invite.js +6 -17
- package/dist/commands/users/invite.js.map +1 -1
- package/dist/commands/users/list.js +4 -7
- package/dist/commands/users/list.js.map +1 -1
- package/dist/config/createCliConfig.d.ts +4 -4
- package/dist/services/backup.d.ts +8 -0
- package/dist/services/backup.js +19 -0
- package/dist/services/backup.js.map +1 -1
- package/dist/services/cors.d.ts +23 -0
- package/dist/services/cors.js +38 -0
- package/dist/services/cors.js.map +1 -0
- package/dist/services/graphql.d.ts +7 -0
- package/dist/services/graphql.js +11 -0
- package/dist/services/graphql.js.map +1 -1
- package/dist/services/hooks.d.ts +2 -0
- package/dist/services/hooks.js +19 -0
- package/dist/services/hooks.js.map +1 -1
- package/dist/services/organizations.d.ts +40 -0
- package/dist/services/organizations.js +41 -0
- package/dist/services/organizations.js.map +1 -0
- package/dist/services/projects.d.ts +31 -0
- package/dist/services/projects.js +71 -1
- package/dist/services/projects.js.map +1 -1
- package/dist/services/schemas.d.ts +4 -0
- package/dist/services/schemas.js +40 -0
- package/dist/services/schemas.js.map +1 -0
- package/dist/services/user.d.ts +10 -0
- package/dist/services/user.js +24 -0
- package/dist/services/user.js.map +1 -0
- package/dist/util/__tests__/getCliVersion.test.js +2 -2
- package/dist/util/__tests__/getCliVersion.test.js.map +1 -1
- package/dist/util/errorMessages.d.ts +1 -0
- package/dist/util/errorMessages.js +1 -0
- package/dist/util/errorMessages.js.map +1 -1
- package/dist/util/getCliVersion.js +1 -1
- package/dist/util/getCliVersion.js.map +1 -1
- package/dist/util/readPackageJson.d.ts +1 -15
- package/dist/util/readPackageJson.js +1 -1
- package/dist/util/readPackageJson.js.map +1 -1
- package/dist/util/uniqBy.d.ts +1 -0
- package/dist/util/uniqBy.js +14 -0
- package/dist/util/uniqBy.js.map +1 -0
- package/oclif.config.js +6 -1
- package/oclif.manifest.json +152 -158
- package/package.json +30 -31
- package/dist/actions/cors/constants.d.ts +0 -1
- package/dist/actions/cors/constants.js +0 -3
- package/dist/actions/cors/constants.js.map +0 -1
- package/dist/actions/cors/types.d.ts +0 -9
- package/dist/actions/cors/types.js +0 -3
- package/dist/actions/cors/types.js.map +0 -1
- package/dist/actions/migration/getMigrationRootDirectory.d.ts +0 -2
- package/dist/actions/migration/getMigrationRootDirectory.js +0 -14
- package/dist/actions/migration/getMigrationRootDirectory.js.map +0 -1
- package/dist/actions/migration/resolveMigrations.d.ts +0 -19
- package/dist/actions/migration/resolveMigrations.js +0 -43
- package/dist/actions/migration/resolveMigrations.js.map +0 -1
- package/dist/actions/migration/templates/__tests__/minimalAdvanced.test.js +0 -65
- package/dist/actions/migration/templates/__tests__/minimalAdvanced.test.js.map +0 -1
- package/dist/actions/migration/templates/__tests__/minimalSimple.test.js +0 -145
- package/dist/actions/migration/templates/__tests__/minimalSimple.test.js.map +0 -1
- package/dist/actions/migration/templates/__tests__/renameField.test.js +0 -63
- package/dist/actions/migration/templates/__tests__/renameField.test.js.map +0 -1
- package/dist/actions/migration/templates/__tests__/renameType.test.js +0 -61
- package/dist/actions/migration/templates/__tests__/renameType.test.js.map +0 -1
- package/dist/actions/migration/templates/__tests__/stringToPTE.test.js +0 -87
- package/dist/actions/migration/templates/__tests__/stringToPTE.test.js.map +0 -1
- package/dist/actions/migration/templates/index.d.ts +0 -5
- package/dist/actions/migration/templates/index.js +0 -7
- package/dist/actions/migration/templates/index.js.map +0 -1
- package/dist/actions/migration/templates/minimalAdvanced.d.ts +0 -4
- package/dist/actions/migration/templates/minimalAdvanced.js +0 -21
- package/dist/actions/migration/templates/minimalAdvanced.js.map +0 -1
- package/dist/actions/migration/templates/minimalSimple.d.ts +0 -4
- package/dist/actions/migration/templates/minimalSimple.js +0 -61
- package/dist/actions/migration/templates/minimalSimple.js.map +0 -1
- package/dist/actions/migration/templates/renameField.d.ts +0 -4
- package/dist/actions/migration/templates/renameField.js +0 -20
- package/dist/actions/migration/templates/renameField.js.map +0 -1
- package/dist/actions/migration/templates/renameType.d.ts +0 -4
- package/dist/actions/migration/templates/renameType.js +0 -19
- package/dist/actions/migration/templates/renameType.js.map +0 -1
- package/dist/actions/migration/templates/stringToPTE.d.ts +0 -4
- package/dist/actions/migration/templates/stringToPTE.js +0 -32
- package/dist/actions/migration/templates/stringToPTE.js.map +0 -1
- package/dist/actions/schema/__tests__/deleteSchemaAction.test.js +0 -294
- package/dist/actions/schema/__tests__/deleteSchemaAction.test.js.map +0 -1
- package/dist/actions/schema/schemaStoreConstants.d.ts +0 -1
- package/dist/actions/schema/schemaStoreConstants.js +0 -4
- package/dist/actions/schema/schemaStoreConstants.js.map +0 -1
- package/dist/actions/schema/utils/schemaActionHelpers.d.ts +0 -1
- package/dist/actions/schema/utils/schemaActionHelpers.js +0 -5
- package/dist/actions/schema/utils/schemaActionHelpers.js.map +0 -1
- package/dist/actions/schema/utils/schemaApiClient.d.ts +0 -6
- package/dist/actions/schema/utils/schemaApiClient.js +0 -17
- package/dist/actions/schema/utils/schemaApiClient.js.map +0 -1
- package/dist/actions/users/apiVersion.d.ts +0 -6
- package/dist/actions/users/apiVersion.js +0 -7
- package/dist/actions/users/apiVersion.js.map +0 -1
- package/dist/commands/__tests__/init.test.js +0 -411
- package/dist/commands/__tests__/init.test.js.map +0 -1
- package/dist/commands/migration/__tests__/create.test.js +0 -296
- package/dist/commands/migration/__tests__/create.test.js.map +0 -1
- package/dist/commands/migration/__tests__/list.test.js +0 -166
- package/dist/commands/migration/__tests__/list.test.js.map +0 -1
- package/dist/commands/migration/__tests__/run.test.js +0 -481
- package/dist/commands/migration/__tests__/run.test.js.map +0 -1
- package/dist/commands/migration/create.d.ts +0 -17
- package/dist/commands/migration/create.js +0 -143
- package/dist/commands/migration/create.js.map +0 -1
- package/dist/commands/migration/list.d.ts +0 -9
- package/dist/commands/migration/list.js +0 -61
- package/dist/commands/migration/list.js.map +0 -1
- package/dist/commands/migration/run.d.ts +0 -26
- package/dist/commands/migration/run.js +0 -271
- package/dist/commands/migration/run.js.map +0 -1
- package/dist/util/migration/constants.d.ts +0 -3
- package/dist/util/migration/constants.js +0 -10
- package/dist/util/migration/constants.js.map +0 -1
- package/dist/util/migration/ensureApiVersionFormat.d.ts +0 -9
- package/dist/util/migration/ensureApiVersionFormat.js +0 -16
- package/dist/util/migration/ensureApiVersionFormat.js.map +0 -1
- package/dist/util/migration/prettyMutationFormatter.d.ts +0 -8
- package/dist/util/migration/prettyMutationFormatter.js +0 -141
- package/dist/util/migration/prettyMutationFormatter.js.map +0 -1
- package/dist/utils/migration/resolveMigrationScript.d.ts +0 -44
- package/dist/utils/migration/resolveMigrationScript.js +0 -74
- package/dist/utils/migration/resolveMigrationScript.js.map +0 -1
- /package/dist/actions/auth/login/{index.d.ts → login.d.ts} +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { getGlobalCliClient } from '@sanity/cli-core';
|
|
2
|
+
export const SCHEMA_API_VERSION = 'v2025-03-01';
|
|
3
|
+
async function getSchemaClient() {
|
|
4
|
+
return await getGlobalCliClient({
|
|
5
|
+
apiVersion: SCHEMA_API_VERSION,
|
|
6
|
+
requireUser: true
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
export async function getSchemas(dataset, projectId, id) {
|
|
10
|
+
const client = await getSchemaClient();
|
|
11
|
+
return client.request({
|
|
12
|
+
method: 'GET',
|
|
13
|
+
uri: `/projects/${projectId}/datasets/${dataset}/schemas${id ? `/${id}` : ''}`
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export async function deleteSchema(dataset, projectId, id) {
|
|
17
|
+
const exists = await getSchemas(dataset, projectId, id);
|
|
18
|
+
if (exists?.length === 0) {
|
|
19
|
+
return {
|
|
20
|
+
deleted: false
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
const client = await getSchemaClient();
|
|
24
|
+
return client.request({
|
|
25
|
+
method: 'DELETE',
|
|
26
|
+
uri: `/projects/${projectId}/datasets/${dataset}/schemas/${id}`
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
export async function updateSchemas(dataset, projectId, schemas) {
|
|
30
|
+
const client = await getSchemaClient();
|
|
31
|
+
return client.request({
|
|
32
|
+
body: {
|
|
33
|
+
schemas: schemas
|
|
34
|
+
},
|
|
35
|
+
method: 'PUT',
|
|
36
|
+
url: `/projects/${projectId}/datasets/${dataset}/schemas`
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/services/schemas.ts"],"sourcesContent":["import {getGlobalCliClient} from '@sanity/cli-core'\n\nexport const SCHEMA_API_VERSION = 'v2025-03-01'\n\nasync function getSchemaClient() {\n return await getGlobalCliClient({\n apiVersion: SCHEMA_API_VERSION,\n requireUser: true,\n })\n}\n\nexport async function getSchemas(dataset: string, projectId: string, id?: string) {\n const client = await getSchemaClient()\n\n return client.request({\n method: 'GET',\n uri: `/projects/${projectId}/datasets/${dataset}/schemas${id ? `/${id}` : ''}`,\n })\n}\n\nexport async function deleteSchema(dataset: string, projectId: string, id: string) {\n const exists = await getSchemas(dataset, projectId, id)\n\n if (exists?.length === 0) {\n return {\n deleted: false,\n }\n }\n\n const client = await getSchemaClient()\n\n return client.request({\n method: 'DELETE',\n uri: `/projects/${projectId}/datasets/${dataset}/schemas/${id}`,\n })\n}\n\nexport async function updateSchemas<T>(dataset: string, projectId: string, schemas: T) {\n const client = await getSchemaClient()\n\n return client.request({\n body: {\n schemas: schemas,\n },\n method: 'PUT',\n url: `/projects/${projectId}/datasets/${dataset}/schemas`,\n })\n}\n"],"names":["getGlobalCliClient","SCHEMA_API_VERSION","getSchemaClient","apiVersion","requireUser","getSchemas","dataset","projectId","id","client","request","method","uri","deleteSchema","exists","length","deleted","updateSchemas","schemas","body","url"],"mappings":"AAAA,SAAQA,kBAAkB,QAAO,mBAAkB;AAEnD,OAAO,MAAMC,qBAAqB,cAAa;AAE/C,eAAeC;IACb,OAAO,MAAMF,mBAAmB;QAC9BG,YAAYF;QACZG,aAAa;IACf;AACF;AAEA,OAAO,eAAeC,WAAWC,OAAe,EAAEC,SAAiB,EAAEC,EAAW;IAC9E,MAAMC,SAAS,MAAMP;IAErB,OAAOO,OAAOC,OAAO,CAAC;QACpBC,QAAQ;QACRC,KAAK,CAAC,UAAU,EAAEL,UAAU,UAAU,EAAED,QAAQ,QAAQ,EAAEE,KAAK,CAAC,CAAC,EAAEA,IAAI,GAAG,IAAI;IAChF;AACF;AAEA,OAAO,eAAeK,aAAaP,OAAe,EAAEC,SAAiB,EAAEC,EAAU;IAC/E,MAAMM,SAAS,MAAMT,WAAWC,SAASC,WAAWC;IAEpD,IAAIM,QAAQC,WAAW,GAAG;QACxB,OAAO;YACLC,SAAS;QACX;IACF;IAEA,MAAMP,SAAS,MAAMP;IAErB,OAAOO,OAAOC,OAAO,CAAC;QACpBC,QAAQ;QACRC,KAAK,CAAC,UAAU,EAAEL,UAAU,UAAU,EAAED,QAAQ,SAAS,EAAEE,IAAI;IACjE;AACF;AAEA,OAAO,eAAeS,cAAiBX,OAAe,EAAEC,SAAiB,EAAEW,OAAU;IACnF,MAAMT,SAAS,MAAMP;IAErB,OAAOO,OAAOC,OAAO,CAAC;QACpBS,MAAM;YACJD,SAASA;QACX;QACAP,QAAQ;QACRS,KAAK,CAAC,UAAU,EAAEb,UAAU,UAAU,EAAED,QAAQ,QAAQ,CAAC;IAC3D;AACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type SanityOrgUser } from '@sanity/cli-core';
|
|
2
|
+
import { type User } from '../actions/users/types.js';
|
|
3
|
+
/**
|
|
4
|
+
* The API version to use for the users list command
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare const USERS_API_VERSION = "v2025-08-30";
|
|
9
|
+
export declare function getCliUser(): Promise<SanityOrgUser>;
|
|
10
|
+
export declare function getMembers(memberIds: string[]): Promise<User | User[]>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getGlobalCliClient } from '@sanity/cli-core';
|
|
2
|
+
/**
|
|
3
|
+
* The API version to use for the users list command
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/ export const USERS_API_VERSION = 'v2025-08-30';
|
|
7
|
+
export async function getCliUser() {
|
|
8
|
+
const client = await getGlobalCliClient({
|
|
9
|
+
apiVersion: USERS_API_VERSION,
|
|
10
|
+
requireUser: true
|
|
11
|
+
});
|
|
12
|
+
return client.users.getById('me');
|
|
13
|
+
}
|
|
14
|
+
export async function getMembers(memberIds) {
|
|
15
|
+
const client = await getGlobalCliClient({
|
|
16
|
+
apiVersion: USERS_API_VERSION,
|
|
17
|
+
requireUser: true
|
|
18
|
+
});
|
|
19
|
+
return client.request({
|
|
20
|
+
uri: `/users/${memberIds.join(',')}`
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=user.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/services/user.ts"],"sourcesContent":["import {getGlobalCliClient, type SanityOrgUser} from '@sanity/cli-core'\n\nimport {type User} from '../actions/users/types.js'\n\n/**\n * The API version to use for the users list command\n *\n * @internal\n */\nexport const USERS_API_VERSION = 'v2025-08-30'\n\nexport async function getCliUser() {\n const client = await getGlobalCliClient({\n apiVersion: USERS_API_VERSION,\n requireUser: true,\n })\n\n return client.users.getById('me') as unknown as SanityOrgUser\n}\n\nexport async function getMembers(memberIds: string[]) {\n const client = await getGlobalCliClient({\n apiVersion: USERS_API_VERSION,\n requireUser: true,\n })\n\n return client.request<User | User[]>({uri: `/users/${memberIds.join(',')}`})\n}\n"],"names":["getGlobalCliClient","USERS_API_VERSION","getCliUser","client","apiVersion","requireUser","users","getById","getMembers","memberIds","request","uri","join"],"mappings":"AAAA,SAAQA,kBAAkB,QAA2B,mBAAkB;AAIvE;;;;CAIC,GACD,OAAO,MAAMC,oBAAoB,cAAa;AAE9C,OAAO,eAAeC;IACpB,MAAMC,SAAS,MAAMH,mBAAmB;QACtCI,YAAYH;QACZI,aAAa;IACf;IAEA,OAAOF,OAAOG,KAAK,CAACC,OAAO,CAAC;AAC9B;AAEA,OAAO,eAAeC,WAAWC,SAAmB;IAClD,MAAMN,SAAS,MAAMH,mBAAmB;QACtCI,YAAYH;QACZI,aAAa;IACf;IAEA,OAAOF,OAAOO,OAAO,CAAgB;QAACC,KAAK,CAAC,OAAO,EAAEF,UAAUG,IAAI,CAAC,MAAM;IAAA;AAC5E"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { packageDirectory } from '
|
|
1
|
+
import { packageDirectory } from 'package-directory';
|
|
2
2
|
import { describe, expect, test, vi } from 'vitest';
|
|
3
3
|
import { getCliVersion } from '../getCliVersion.js';
|
|
4
4
|
import { readPackageJson } from '../readPackageJson.js';
|
|
5
|
-
vi.mock('
|
|
5
|
+
vi.mock('package-directory');
|
|
6
6
|
vi.mock(import('../readPackageJson.js'));
|
|
7
7
|
describe('#getCliVersion', ()=>{
|
|
8
8
|
test('should return the version of the @sanity/cli package', async ()=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/util/__tests__/getCliVersion.test.ts"],"sourcesContent":["import {packageDirectory} from '
|
|
1
|
+
{"version":3,"sources":["../../../src/util/__tests__/getCliVersion.test.ts"],"sourcesContent":["import {packageDirectory} from 'package-directory'\nimport {describe, expect, test, vi} from 'vitest'\n\nimport {getCliVersion} from '../getCliVersion.js'\nimport {readPackageJson} from '../readPackageJson.js'\n\nvi.mock('package-directory')\nvi.mock(import('../readPackageJson.js'))\n\ndescribe('#getCliVersion', () => {\n test('should return the version of the @sanity/cli package', async () => {\n vi.mocked(packageDirectory).mockResolvedValueOnce('/test/path')\n vi.mocked(readPackageJson).mockResolvedValueOnce({\n name: '@sanity/cli',\n version: '1.0.0',\n })\n\n const version = await getCliVersion()\n\n expect(version).toBe('1.0.0')\n })\n\n test('should throw an error if the package.json is not found', async () => {\n vi.mocked(packageDirectory).mockResolvedValueOnce('/test/path')\n vi.mocked(readPackageJson).mockRejectedValueOnce(new Error('Package.json not found'))\n\n await expect(getCliVersion()).rejects.toThrow('Package.json not found')\n })\n\n test('should throw an error if cli path is not found', async () => {\n vi.mocked(packageDirectory).mockResolvedValueOnce(undefined)\n\n await expect(getCliVersion()).rejects.toThrow('Unable to resolve root of @sanity/cli module')\n })\n})\n"],"names":["packageDirectory","describe","expect","test","vi","getCliVersion","readPackageJson","mock","mocked","mockResolvedValueOnce","name","version","toBe","mockRejectedValueOnce","Error","rejects","toThrow","undefined"],"mappings":"AAAA,SAAQA,gBAAgB,QAAO,oBAAmB;AAClD,SAAQC,QAAQ,EAAEC,MAAM,EAAEC,IAAI,EAAEC,EAAE,QAAO,SAAQ;AAEjD,SAAQC,aAAa,QAAO,sBAAqB;AACjD,SAAQC,eAAe,QAAO,wBAAuB;AAErDF,GAAGG,IAAI,CAAC;AACRH,GAAGG,IAAI,CAAC,MAAM,CAAC;AAEfN,SAAS,kBAAkB;IACzBE,KAAK,wDAAwD;QAC3DC,GAAGI,MAAM,CAACR,kBAAkBS,qBAAqB,CAAC;QAClDL,GAAGI,MAAM,CAACF,iBAAiBG,qBAAqB,CAAC;YAC/CC,MAAM;YACNC,SAAS;QACX;QAEA,MAAMA,UAAU,MAAMN;QAEtBH,OAAOS,SAASC,IAAI,CAAC;IACvB;IAEAT,KAAK,0DAA0D;QAC7DC,GAAGI,MAAM,CAACR,kBAAkBS,qBAAqB,CAAC;QAClDL,GAAGI,MAAM,CAACF,iBAAiBO,qBAAqB,CAAC,IAAIC,MAAM;QAE3D,MAAMZ,OAAOG,iBAAiBU,OAAO,CAACC,OAAO,CAAC;IAChD;IAEAb,KAAK,kDAAkD;QACrDC,GAAGI,MAAM,CAACR,kBAAkBS,qBAAqB,CAACQ;QAElD,MAAMf,OAAOG,iBAAiBU,OAAO,CAACC,OAAO,CAAC;IAChD;AACF"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const NO_PROJECT_ID = "sanity.cli.ts does not contain a project identifier (\"api.projectId\"), which is required for the Sanity CLI to communicate with the Sanity API";
|
|
2
|
+
export declare const NO_DATASET_ID = "sanity.cli.ts does not contain a dataset identifier (\"api.dataset\"), which is required for the Sanity CLI to communicate with the Sanity API";
|
|
2
3
|
export declare const NO_ORGANIZATION_ID = "sanity.cli.ts does not contain an organization identifier (\"app.organizationId\"), which is required for the Sanity CLI to communicate with the Sanity API";
|
|
3
4
|
export declare const NO_MEDIA_LIBRARY_ASPECTS_PATH = "sanity.cli.ts does not contain a media library aspects path (\"mediaLibrary.aspectsPath\"), which is required for the Sanity CLI to manage aspects.";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export const NO_PROJECT_ID = `sanity.cli.ts does not contain a project identifier ("api.projectId"), which is required for the Sanity CLI to communicate with the Sanity API`;
|
|
2
|
+
export const NO_DATASET_ID = `sanity.cli.ts does not contain a dataset identifier ("api.dataset"), which is required for the Sanity CLI to communicate with the Sanity API`;
|
|
2
3
|
export const NO_ORGANIZATION_ID = `sanity.cli.ts does not contain an organization identifier ("app.organizationId"), which is required for the Sanity CLI to communicate with the Sanity API`;
|
|
3
4
|
export const NO_MEDIA_LIBRARY_ASPECTS_PATH = `sanity.cli.ts does not contain a media library aspects path ("mediaLibrary.aspectsPath"), which is required for the Sanity CLI to manage aspects.`;
|
|
4
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/util/errorMessages.ts"],"sourcesContent":["export const NO_PROJECT_ID = `sanity.cli.ts does not contain a project identifier (\"api.projectId\"), which is required for the Sanity CLI to communicate with the Sanity API`\nexport const NO_ORGANIZATION_ID = `sanity.cli.ts does not contain an organization identifier (\"app.organizationId\"), which is required for the Sanity CLI to communicate with the Sanity API`\nexport const NO_MEDIA_LIBRARY_ASPECTS_PATH = `sanity.cli.ts does not contain a media library aspects path (\"mediaLibrary.aspectsPath\"), which is required for the Sanity CLI to manage aspects.`\n"],"names":["NO_PROJECT_ID","NO_ORGANIZATION_ID","NO_MEDIA_LIBRARY_ASPECTS_PATH"],"mappings":"AAAA,OAAO,MAAMA,gBAAgB,CAAC,8IAA8I,CAAC,CAAA;AAC7K,OAAO,MAAMC,qBAAqB,CAAC,yJAAyJ,CAAC,CAAA;AAC7L,OAAO,MAAMC,gCAAgC,CAAC,iJAAiJ,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"sources":["../../src/util/errorMessages.ts"],"sourcesContent":["export const NO_PROJECT_ID = `sanity.cli.ts does not contain a project identifier (\"api.projectId\"), which is required for the Sanity CLI to communicate with the Sanity API`\nexport const NO_DATASET_ID = `sanity.cli.ts does not contain a dataset identifier (\"api.dataset\"), which is required for the Sanity CLI to communicate with the Sanity API`\nexport const NO_ORGANIZATION_ID = `sanity.cli.ts does not contain an organization identifier (\"app.organizationId\"), which is required for the Sanity CLI to communicate with the Sanity API`\nexport const NO_MEDIA_LIBRARY_ASPECTS_PATH = `sanity.cli.ts does not contain a media library aspects path (\"mediaLibrary.aspectsPath\"), which is required for the Sanity CLI to manage aspects.`\n"],"names":["NO_PROJECT_ID","NO_DATASET_ID","NO_ORGANIZATION_ID","NO_MEDIA_LIBRARY_ASPECTS_PATH"],"mappings":"AAAA,OAAO,MAAMA,gBAAgB,CAAC,8IAA8I,CAAC,CAAA;AAC7K,OAAO,MAAMC,gBAAgB,CAAC,4IAA4I,CAAC,CAAA;AAC3K,OAAO,MAAMC,qBAAqB,CAAC,yJAAyJ,CAAC,CAAA;AAC7L,OAAO,MAAMC,gCAAgC,CAAC,iJAAiJ,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { fileURLToPath } from 'node:url';
|
|
3
|
-
import { packageDirectory } from '
|
|
3
|
+
import { packageDirectory } from 'package-directory';
|
|
4
4
|
import { readPackageJson } from './readPackageJson.js';
|
|
5
5
|
/**
|
|
6
6
|
* Get the version of the `@sanity/cli` package.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/util/getCliVersion.ts"],"sourcesContent":["import path from 'node:path'\nimport {fileURLToPath} from 'node:url'\n\nimport {packageDirectory} from '
|
|
1
|
+
{"version":3,"sources":["../../src/util/getCliVersion.ts"],"sourcesContent":["import path from 'node:path'\nimport {fileURLToPath} from 'node:url'\n\nimport {packageDirectory} from 'package-directory'\n\nimport {type PackageJson, readPackageJson} from './readPackageJson.js'\n\n/**\n * Get the version of the `@sanity/cli` package.\n *\n * @internal\n * @returns The version of the `@sanity/cli` package.\n */\nexport async function getCliVersion(): Promise<string> {\n // using the meta.url will resolve to the code running from the cli\n // this will find the package.json in cli package.\n const cliPath = await packageDirectory({cwd: fileURLToPath(import.meta.url)})\n if (!cliPath) {\n throw new Error('Unable to resolve root of @sanity/cli module')\n }\n\n let pkg: PackageJson | undefined\n try {\n pkg = await readPackageJson(path.join(cliPath, 'package.json'))\n } catch (err) {\n throw new Error(`Unable to read @sanity/cli/package.json: ${(err as Error).message}`)\n }\n\n return pkg.version\n}\n"],"names":["path","fileURLToPath","packageDirectory","readPackageJson","getCliVersion","cliPath","cwd","url","Error","pkg","join","err","message","version"],"mappings":"AAAA,OAAOA,UAAU,YAAW;AAC5B,SAAQC,aAAa,QAAO,WAAU;AAEtC,SAAQC,gBAAgB,QAAO,oBAAmB;AAElD,SAA0BC,eAAe,QAAO,uBAAsB;AAEtE;;;;;CAKC,GACD,OAAO,eAAeC;IACpB,mEAAmE;IACnE,kDAAkD;IAClD,MAAMC,UAAU,MAAMH,iBAAiB;QAACI,KAAKL,cAAc,YAAYM,GAAG;IAAC;IAC3E,IAAI,CAACF,SAAS;QACZ,MAAM,IAAIG,MAAM;IAClB;IAEA,IAAIC;IACJ,IAAI;QACFA,MAAM,MAAMN,gBAAgBH,KAAKU,IAAI,CAACL,SAAS;IACjD,EAAE,OAAOM,KAAK;QACZ,MAAM,IAAIH,MAAM,CAAC,yCAAyC,EAAE,AAACG,IAAcC,OAAO,EAAE;IACtF;IAEA,OAAOH,IAAII,OAAO;AACpB"}
|
|
@@ -12,21 +12,7 @@ declare const packageJsonSchema: z.ZodObject<{
|
|
|
12
12
|
devDependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
13
13
|
exports: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
14
14
|
peerDependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
15
|
-
},
|
|
16
|
-
name: string;
|
|
17
|
-
version: string;
|
|
18
|
-
exports?: Record<string, any> | undefined;
|
|
19
|
-
dependencies?: Record<string, string> | undefined;
|
|
20
|
-
devDependencies?: Record<string, string> | undefined;
|
|
21
|
-
peerDependencies?: Record<string, string> | undefined;
|
|
22
|
-
}, {
|
|
23
|
-
name: string;
|
|
24
|
-
version: string;
|
|
25
|
-
exports?: Record<string, any> | undefined;
|
|
26
|
-
dependencies?: Record<string, string> | undefined;
|
|
27
|
-
devDependencies?: Record<string, string> | undefined;
|
|
28
|
-
peerDependencies?: Record<string, string> | undefined;
|
|
29
|
-
}>;
|
|
15
|
+
}, z.core.$strip>;
|
|
30
16
|
/**
|
|
31
17
|
* Minimal representation of a package.json.
|
|
32
18
|
*
|
|
@@ -36,7 +36,7 @@ import { z } from 'zod';
|
|
|
36
36
|
if (success) {
|
|
37
37
|
return data;
|
|
38
38
|
}
|
|
39
|
-
throw new Error(`Invalid package.json at "${filePath}": ${error.
|
|
39
|
+
throw new Error(`Invalid package.json at "${filePath}": ${error.issues.map((err)=>err.message).join('\n')}`);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
//# sourceMappingURL=readPackageJson.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/util/readPackageJson.ts"],"sourcesContent":["import {readFile} from 'node:fs/promises'\n\nimport {z} from 'zod'\n\n/**\n * Feel free to add properties to this,\n * 🟠ℹ️ BUT ENSURE OPTIONAL STUFF IS ACTUALLY OPTIONAL ℹ️🟠\n * 🟠ℹ️ SINCE THIS IS USED IN A NUMBER OF LOCATIONS WHERE ℹ️🟠\n * 🟠ℹ️ WE CANNOT ENFORCE/GUARANTEE ANY PARTICULAR PROPS ℹ️🟠\n */\nconst packageJsonSchema = z.object({\n name: z.string(),\n version: z.string(),\n\n dependencies: z.record(z.string(), z.string()).optional(),\n devDependencies: z.record(z.string(), z.string()).optional(),\n exports: z.record(z.string(), z.any()).optional(),\n peerDependencies: z.record(z.string(), z.string()).optional(),\n})\n\n/**\n * Minimal representation of a package.json.\n *\n * @internal\n */\nexport type PackageJson = z.infer<typeof packageJsonSchema>\n\n/**\n * Read the `package.json` file at the given path\n *\n * @param filePath - Path to package.json to read\n * @param skipSchemaValidation - Skip schema validation if true\n * @returns The parsed package.json\n * @internal\n */\nexport async function readPackageJson(\n filePath: string,\n skipSchemaValidation = false,\n): Promise<PackageJson> {\n let pkg: unknown\n try {\n pkg = JSON.parse(await readFile(filePath, 'utf8'))\n } catch (err: unknown) {\n throw new Error(`Failed to read \"${filePath}\"`, {cause: err})\n }\n\n if (skipSchemaValidation) {\n return pkg as PackageJson\n }\n\n const {data, error, success} = packageJsonSchema.safeParse(pkg)\n if (success) {\n return data\n }\n\n throw new Error(\n `Invalid package.json at \"${filePath}\": ${error.
|
|
1
|
+
{"version":3,"sources":["../../src/util/readPackageJson.ts"],"sourcesContent":["import {readFile} from 'node:fs/promises'\n\nimport {z} from 'zod'\n\n/**\n * Feel free to add properties to this,\n * 🟠ℹ️ BUT ENSURE OPTIONAL STUFF IS ACTUALLY OPTIONAL ℹ️🟠\n * 🟠ℹ️ SINCE THIS IS USED IN A NUMBER OF LOCATIONS WHERE ℹ️🟠\n * 🟠ℹ️ WE CANNOT ENFORCE/GUARANTEE ANY PARTICULAR PROPS ℹ️🟠\n */\nconst packageJsonSchema = z.object({\n name: z.string(),\n version: z.string(),\n\n dependencies: z.record(z.string(), z.string()).optional(),\n devDependencies: z.record(z.string(), z.string()).optional(),\n exports: z.record(z.string(), z.any()).optional(),\n peerDependencies: z.record(z.string(), z.string()).optional(),\n})\n\n/**\n * Minimal representation of a package.json.\n *\n * @internal\n */\nexport type PackageJson = z.infer<typeof packageJsonSchema>\n\n/**\n * Read the `package.json` file at the given path\n *\n * @param filePath - Path to package.json to read\n * @param skipSchemaValidation - Skip schema validation if true\n * @returns The parsed package.json\n * @internal\n */\nexport async function readPackageJson(\n filePath: string,\n skipSchemaValidation = false,\n): Promise<PackageJson> {\n let pkg: unknown\n try {\n pkg = JSON.parse(await readFile(filePath, 'utf8'))\n } catch (err: unknown) {\n throw new Error(`Failed to read \"${filePath}\"`, {cause: err})\n }\n\n if (skipSchemaValidation) {\n return pkg as PackageJson\n }\n\n const {data, error, success} = packageJsonSchema.safeParse(pkg)\n if (success) {\n return data\n }\n\n throw new Error(\n `Invalid package.json at \"${filePath}\": ${error.issues.map((err) => err.message).join('\\n')}`,\n )\n}\n"],"names":["readFile","z","packageJsonSchema","object","name","string","version","dependencies","record","optional","devDependencies","exports","any","peerDependencies","readPackageJson","filePath","skipSchemaValidation","pkg","JSON","parse","err","Error","cause","data","error","success","safeParse","issues","map","message","join"],"mappings":"AAAA,SAAQA,QAAQ,QAAO,mBAAkB;AAEzC,SAAQC,CAAC,QAAO,MAAK;AAErB;;;;;CAKC,GACD,MAAMC,oBAAoBD,EAAEE,MAAM,CAAC;IACjCC,MAAMH,EAAEI,MAAM;IACdC,SAASL,EAAEI,MAAM;IAEjBE,cAAcN,EAAEO,MAAM,CAACP,EAAEI,MAAM,IAAIJ,EAAEI,MAAM,IAAII,QAAQ;IACvDC,iBAAiBT,EAAEO,MAAM,CAACP,EAAEI,MAAM,IAAIJ,EAAEI,MAAM,IAAII,QAAQ;IAC1DE,SAASV,EAAEO,MAAM,CAACP,EAAEI,MAAM,IAAIJ,EAAEW,GAAG,IAAIH,QAAQ;IAC/CI,kBAAkBZ,EAAEO,MAAM,CAACP,EAAEI,MAAM,IAAIJ,EAAEI,MAAM,IAAII,QAAQ;AAC7D;AASA;;;;;;;CAOC,GACD,OAAO,eAAeK,gBACpBC,QAAgB,EAChBC,uBAAuB,KAAK;IAE5B,IAAIC;IACJ,IAAI;QACFA,MAAMC,KAAKC,KAAK,CAAC,MAAMnB,SAASe,UAAU;IAC5C,EAAE,OAAOK,KAAc;QACrB,MAAM,IAAIC,MAAM,CAAC,gBAAgB,EAAEN,SAAS,CAAC,CAAC,EAAE;YAACO,OAAOF;QAAG;IAC7D;IAEA,IAAIJ,sBAAsB;QACxB,OAAOC;IACT;IAEA,MAAM,EAACM,IAAI,EAAEC,KAAK,EAAEC,OAAO,EAAC,GAAGvB,kBAAkBwB,SAAS,CAACT;IAC3D,IAAIQ,SAAS;QACX,OAAOF;IACT;IAEA,MAAM,IAAIF,MACR,CAAC,yBAAyB,EAAEN,SAAS,GAAG,EAAES,MAAMG,MAAM,CAACC,GAAG,CAAC,CAACR,MAAQA,IAAIS,OAAO,EAAEC,IAAI,CAAC,OAAO;AAEjG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function uniqBy<T>(array: T[], key: keyof T): T[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Native implementation instead of lodash/uniqBy
|
|
2
|
+
export function uniqBy(array, key) {
|
|
3
|
+
const seen = new Set();
|
|
4
|
+
return array.filter((item)=>{
|
|
5
|
+
const value = item[key];
|
|
6
|
+
if (seen.has(value)) {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
seen.add(value);
|
|
10
|
+
return true;
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=uniqBy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/util/uniqBy.ts"],"sourcesContent":["// Native implementation instead of lodash/uniqBy\nexport function uniqBy<T>(array: T[], key: keyof T): T[] {\n const seen = new Set()\n return array.filter((item) => {\n const value = item[key]\n if (seen.has(value)) {\n return false\n }\n seen.add(value)\n return true\n })\n}\n"],"names":["uniqBy","array","key","seen","Set","filter","item","value","has","add"],"mappings":"AAAA,iDAAiD;AACjD,OAAO,SAASA,OAAUC,KAAU,EAAEC,GAAY;IAChD,MAAMC,OAAO,IAAIC;IACjB,OAAOH,MAAMI,MAAM,CAAC,CAACC;QACnB,MAAMC,QAAQD,IAAI,CAACJ,IAAI;QACvB,IAAIC,KAAKK,GAAG,CAACD,QAAQ;YACnB,OAAO;QACT;QACAJ,KAAKM,GAAG,CAACF;QACT,OAAO;IACT;AACF"}
|
package/oclif.config.js
CHANGED
|
@@ -6,6 +6,11 @@ export default {
|
|
|
6
6
|
hooks: {
|
|
7
7
|
prerun: ['./dist/hooks/prerun/setupTelemetry.js'],
|
|
8
8
|
},
|
|
9
|
-
plugins: [
|
|
9
|
+
plugins: [
|
|
10
|
+
'@oclif/plugin-help',
|
|
11
|
+
'@oclif/plugin-not-found',
|
|
12
|
+
'@sanity/runtime-cli',
|
|
13
|
+
'@sanity/migrate',
|
|
14
|
+
],
|
|
10
15
|
topicSeparator: ' ',
|
|
11
16
|
}
|
package/oclif.manifest.json
CHANGED
|
@@ -534,7 +534,13 @@
|
|
|
534
534
|
"type": "option"
|
|
535
535
|
},
|
|
536
536
|
"project": {
|
|
537
|
+
"aliases": [
|
|
538
|
+
"project-id"
|
|
539
|
+
],
|
|
537
540
|
"description": "Project ID to use for the studio",
|
|
541
|
+
"exclusive": [
|
|
542
|
+
"create-project"
|
|
543
|
+
],
|
|
538
544
|
"name": "project",
|
|
539
545
|
"hasDynamicHelp": false,
|
|
540
546
|
"helpValue": "<id>",
|
|
@@ -2775,163 +2781,6 @@
|
|
|
2775
2781
|
"import.js"
|
|
2776
2782
|
]
|
|
2777
2783
|
},
|
|
2778
|
-
"migration:create": {
|
|
2779
|
-
"aliases": [],
|
|
2780
|
-
"args": {
|
|
2781
|
-
"title": {
|
|
2782
|
-
"description": "Title of migration",
|
|
2783
|
-
"name": "title",
|
|
2784
|
-
"required": false
|
|
2785
|
-
}
|
|
2786
|
-
},
|
|
2787
|
-
"description": "Create a new migration within your project",
|
|
2788
|
-
"examples": [
|
|
2789
|
-
{
|
|
2790
|
-
"command": "<%= config.bin %> <%= command.id %>",
|
|
2791
|
-
"description": "Create a new migration, prompting for title and options"
|
|
2792
|
-
},
|
|
2793
|
-
{
|
|
2794
|
-
"command": "<%= config.bin %> <%= command.id %> \"Rename field from location to address\"",
|
|
2795
|
-
"description": "Create a new migration with the provided title, prompting for options"
|
|
2796
|
-
}
|
|
2797
|
-
],
|
|
2798
|
-
"flags": {},
|
|
2799
|
-
"hasDynamicHelp": false,
|
|
2800
|
-
"hiddenAliases": [],
|
|
2801
|
-
"id": "migration:create",
|
|
2802
|
-
"pluginAlias": "@sanity/cli",
|
|
2803
|
-
"pluginName": "@sanity/cli",
|
|
2804
|
-
"pluginType": "core",
|
|
2805
|
-
"strict": true,
|
|
2806
|
-
"isESM": true,
|
|
2807
|
-
"relativePath": [
|
|
2808
|
-
"dist",
|
|
2809
|
-
"commands",
|
|
2810
|
-
"migration",
|
|
2811
|
-
"create.js"
|
|
2812
|
-
]
|
|
2813
|
-
},
|
|
2814
|
-
"migration:list": {
|
|
2815
|
-
"aliases": [],
|
|
2816
|
-
"args": {},
|
|
2817
|
-
"description": "List available migrations",
|
|
2818
|
-
"examples": [
|
|
2819
|
-
{
|
|
2820
|
-
"command": "<%= config.bin %> <%= command.id %>",
|
|
2821
|
-
"description": "List all available migrations in the project"
|
|
2822
|
-
}
|
|
2823
|
-
],
|
|
2824
|
-
"flags": {},
|
|
2825
|
-
"hasDynamicHelp": false,
|
|
2826
|
-
"hiddenAliases": [],
|
|
2827
|
-
"id": "migration:list",
|
|
2828
|
-
"pluginAlias": "@sanity/cli",
|
|
2829
|
-
"pluginName": "@sanity/cli",
|
|
2830
|
-
"pluginType": "core",
|
|
2831
|
-
"strict": true,
|
|
2832
|
-
"isESM": true,
|
|
2833
|
-
"relativePath": [
|
|
2834
|
-
"dist",
|
|
2835
|
-
"commands",
|
|
2836
|
-
"migration",
|
|
2837
|
-
"list.js"
|
|
2838
|
-
]
|
|
2839
|
-
},
|
|
2840
|
-
"migration:run": {
|
|
2841
|
-
"aliases": [],
|
|
2842
|
-
"args": {
|
|
2843
|
-
"id": {
|
|
2844
|
-
"description": "ID",
|
|
2845
|
-
"name": "id",
|
|
2846
|
-
"required": false
|
|
2847
|
-
}
|
|
2848
|
-
},
|
|
2849
|
-
"description": "Run a migration against a dataset",
|
|
2850
|
-
"examples": [
|
|
2851
|
-
{
|
|
2852
|
-
"command": "<%= config.bin %> <%= command.id %> <id>",
|
|
2853
|
-
"description": "dry run the migration"
|
|
2854
|
-
},
|
|
2855
|
-
{
|
|
2856
|
-
"command": "<%= config.bin %> <%= command.id %> <id> --no-dry-run --project xyz --dataset staging",
|
|
2857
|
-
"description": "execute the migration against a dataset"
|
|
2858
|
-
},
|
|
2859
|
-
{
|
|
2860
|
-
"command": "<%= config.bin %> <%= command.id %> <id> --from-export=production.tar.gz --no-dry-run --project xyz --dataset staging",
|
|
2861
|
-
"description": "execute the migration using a dataset export as the source"
|
|
2862
|
-
}
|
|
2863
|
-
],
|
|
2864
|
-
"flags": {
|
|
2865
|
-
"api-version": {
|
|
2866
|
-
"description": "API version to use when migrating. Defaults to v2024-01-29.",
|
|
2867
|
-
"name": "api-version",
|
|
2868
|
-
"hasDynamicHelp": false,
|
|
2869
|
-
"multiple": false,
|
|
2870
|
-
"type": "option"
|
|
2871
|
-
},
|
|
2872
|
-
"concurrency": {
|
|
2873
|
-
"description": "How many mutation requests to run in parallel. Must be between 1 and 10. Default: 6.",
|
|
2874
|
-
"name": "concurrency",
|
|
2875
|
-
"default": 6,
|
|
2876
|
-
"hasDynamicHelp": false,
|
|
2877
|
-
"multiple": false,
|
|
2878
|
-
"type": "option"
|
|
2879
|
-
},
|
|
2880
|
-
"confirm": {
|
|
2881
|
-
"description": "Prompt for confirmation before running the migration (default: true). Use --no-confirm to skip.",
|
|
2882
|
-
"name": "confirm",
|
|
2883
|
-
"allowNo": true,
|
|
2884
|
-
"type": "boolean"
|
|
2885
|
-
},
|
|
2886
|
-
"dataset": {
|
|
2887
|
-
"description": "Dataset to migrate. Defaults to the dataset configured in your Sanity CLI config.",
|
|
2888
|
-
"name": "dataset",
|
|
2889
|
-
"hasDynamicHelp": false,
|
|
2890
|
-
"multiple": false,
|
|
2891
|
-
"type": "option"
|
|
2892
|
-
},
|
|
2893
|
-
"dry-run": {
|
|
2894
|
-
"description": "By default the migration runs in dry mode. Use --no-dry-run to migrate dataset.",
|
|
2895
|
-
"name": "dry-run",
|
|
2896
|
-
"allowNo": true,
|
|
2897
|
-
"type": "boolean"
|
|
2898
|
-
},
|
|
2899
|
-
"from-export": {
|
|
2900
|
-
"description": "Use a local dataset export as source for migration instead of calling the Sanity API. Note: this is only supported for dry runs.",
|
|
2901
|
-
"name": "from-export",
|
|
2902
|
-
"hasDynamicHelp": false,
|
|
2903
|
-
"multiple": false,
|
|
2904
|
-
"type": "option"
|
|
2905
|
-
},
|
|
2906
|
-
"progress": {
|
|
2907
|
-
"description": "Display progress during migration (default: true). Use --no-progress to hide output.",
|
|
2908
|
-
"name": "progress",
|
|
2909
|
-
"allowNo": true,
|
|
2910
|
-
"type": "boolean"
|
|
2911
|
-
},
|
|
2912
|
-
"project": {
|
|
2913
|
-
"description": "Project ID of the dataset to migrate. Defaults to the projectId configured in your Sanity CLI config.",
|
|
2914
|
-
"name": "project",
|
|
2915
|
-
"hasDynamicHelp": false,
|
|
2916
|
-
"multiple": false,
|
|
2917
|
-
"type": "option"
|
|
2918
|
-
}
|
|
2919
|
-
},
|
|
2920
|
-
"hasDynamicHelp": false,
|
|
2921
|
-
"hiddenAliases": [],
|
|
2922
|
-
"id": "migration:run",
|
|
2923
|
-
"pluginAlias": "@sanity/cli",
|
|
2924
|
-
"pluginName": "@sanity/cli",
|
|
2925
|
-
"pluginType": "core",
|
|
2926
|
-
"strict": true,
|
|
2927
|
-
"isESM": true,
|
|
2928
|
-
"relativePath": [
|
|
2929
|
-
"dist",
|
|
2930
|
-
"commands",
|
|
2931
|
-
"migration",
|
|
2932
|
-
"run.js"
|
|
2933
|
-
]
|
|
2934
|
-
},
|
|
2935
2784
|
"openapi:get": {
|
|
2936
2785
|
"aliases": [],
|
|
2937
2786
|
"args": {
|
|
@@ -3143,6 +2992,7 @@
|
|
|
3143
2992
|
"manifest-dir": {
|
|
3144
2993
|
"description": "Directory containing manifest file",
|
|
3145
2994
|
"name": "manifest-dir",
|
|
2995
|
+
"default": "./dist/static",
|
|
3146
2996
|
"hasDynamicHelp": false,
|
|
3147
2997
|
"multiple": false,
|
|
3148
2998
|
"type": "option"
|
|
@@ -3169,6 +3019,78 @@
|
|
|
3169
3019
|
"delete.js"
|
|
3170
3020
|
]
|
|
3171
3021
|
},
|
|
3022
|
+
"schema:deploy": {
|
|
3023
|
+
"aliases": [],
|
|
3024
|
+
"args": {},
|
|
3025
|
+
"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.",
|
|
3026
|
+
"examples": [
|
|
3027
|
+
{
|
|
3028
|
+
"command": "<%= config.bin %> <%= command.id %>",
|
|
3029
|
+
"description": "Deploy all workspace schemas"
|
|
3030
|
+
},
|
|
3031
|
+
{
|
|
3032
|
+
"command": "<%= config.bin %> <%= command.id %> --workspace default",
|
|
3033
|
+
"description": "Deploy the schema for only the workspace \"default\""
|
|
3034
|
+
},
|
|
3035
|
+
{
|
|
3036
|
+
"command": "<%= config.bin %> <%= command.id %> --no-extract-manifest",
|
|
3037
|
+
"description": "Runs using a pre-existing manifest file. Config changes in sanity.config will not be picked up in this case."
|
|
3038
|
+
}
|
|
3039
|
+
],
|
|
3040
|
+
"flags": {
|
|
3041
|
+
"extract-manifest": {
|
|
3042
|
+
"description": "Disables manifest generation - the command will fail if no manifest exists",
|
|
3043
|
+
"name": "extract-manifest",
|
|
3044
|
+
"allowNo": true,
|
|
3045
|
+
"type": "boolean"
|
|
3046
|
+
},
|
|
3047
|
+
"manifest-dir": {
|
|
3048
|
+
"description": "Directory containing manifest file",
|
|
3049
|
+
"name": "manifest-dir",
|
|
3050
|
+
"default": "./dist/static",
|
|
3051
|
+
"hasDynamicHelp": false,
|
|
3052
|
+
"helpValue": "<directory>",
|
|
3053
|
+
"multiple": false,
|
|
3054
|
+
"type": "option"
|
|
3055
|
+
},
|
|
3056
|
+
"tag": {
|
|
3057
|
+
"description": "Add a tag suffix to the schema id",
|
|
3058
|
+
"name": "tag",
|
|
3059
|
+
"hasDynamicHelp": false,
|
|
3060
|
+
"helpValue": "<tag>",
|
|
3061
|
+
"multiple": false,
|
|
3062
|
+
"type": "option"
|
|
3063
|
+
},
|
|
3064
|
+
"verbose": {
|
|
3065
|
+
"description": "Print detailed information during deployment",
|
|
3066
|
+
"name": "verbose",
|
|
3067
|
+
"allowNo": false,
|
|
3068
|
+
"type": "boolean"
|
|
3069
|
+
},
|
|
3070
|
+
"workspace": {
|
|
3071
|
+
"description": "The name of the workspace to deploy a schema for",
|
|
3072
|
+
"name": "workspace",
|
|
3073
|
+
"hasDynamicHelp": false,
|
|
3074
|
+
"helpValue": "<name>",
|
|
3075
|
+
"multiple": false,
|
|
3076
|
+
"type": "option"
|
|
3077
|
+
}
|
|
3078
|
+
},
|
|
3079
|
+
"hasDynamicHelp": false,
|
|
3080
|
+
"hiddenAliases": [],
|
|
3081
|
+
"id": "schema:deploy",
|
|
3082
|
+
"pluginAlias": "@sanity/cli",
|
|
3083
|
+
"pluginName": "@sanity/cli",
|
|
3084
|
+
"pluginType": "core",
|
|
3085
|
+
"strict": true,
|
|
3086
|
+
"isESM": true,
|
|
3087
|
+
"relativePath": [
|
|
3088
|
+
"dist",
|
|
3089
|
+
"commands",
|
|
3090
|
+
"schema",
|
|
3091
|
+
"deploy.js"
|
|
3092
|
+
]
|
|
3093
|
+
},
|
|
3172
3094
|
"schema:extract": {
|
|
3173
3095
|
"aliases": [],
|
|
3174
3096
|
"args": {},
|
|
@@ -3226,6 +3148,78 @@
|
|
|
3226
3148
|
"extract.js"
|
|
3227
3149
|
]
|
|
3228
3150
|
},
|
|
3151
|
+
"schema:list": {
|
|
3152
|
+
"aliases": [],
|
|
3153
|
+
"args": {},
|
|
3154
|
+
"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.",
|
|
3155
|
+
"examples": [
|
|
3156
|
+
{
|
|
3157
|
+
"command": "<%= config.bin %> <%= command.id %>",
|
|
3158
|
+
"description": "List all schemas found in any workspace dataset in a table"
|
|
3159
|
+
},
|
|
3160
|
+
{
|
|
3161
|
+
"command": "<%= config.bin %> <%= command.id %> --id _.schemas.workspaceName",
|
|
3162
|
+
"description": "Get a schema for a given id"
|
|
3163
|
+
},
|
|
3164
|
+
{
|
|
3165
|
+
"command": "<%= config.bin %> <%= command.id %> --json",
|
|
3166
|
+
"description": "Get stored schemas as pretty-printed json-array"
|
|
3167
|
+
},
|
|
3168
|
+
{
|
|
3169
|
+
"command": "<%= config.bin %> <%= command.id %> --json --id _.schemas.workspaceName",
|
|
3170
|
+
"description": "Get singular stored schema as pretty-printed json-object"
|
|
3171
|
+
},
|
|
3172
|
+
{
|
|
3173
|
+
"command": "<%= config.bin %> <%= command.id %> --no-extract-manifest",
|
|
3174
|
+
"description": "Runs using a pre-existing manifest file. Config changes in sanity.config will not be picked up in this case."
|
|
3175
|
+
}
|
|
3176
|
+
],
|
|
3177
|
+
"flags": {
|
|
3178
|
+
"extract-manifest": {
|
|
3179
|
+
"description": "Disables manifest generation - the command will fail if no manifest exists",
|
|
3180
|
+
"name": "extract-manifest",
|
|
3181
|
+
"allowNo": true,
|
|
3182
|
+
"type": "boolean"
|
|
3183
|
+
},
|
|
3184
|
+
"id": {
|
|
3185
|
+
"description": "Fetch a single schema by id",
|
|
3186
|
+
"name": "id",
|
|
3187
|
+
"hasDynamicHelp": false,
|
|
3188
|
+
"helpValue": "<schema_id>",
|
|
3189
|
+
"multiple": false,
|
|
3190
|
+
"type": "option"
|
|
3191
|
+
},
|
|
3192
|
+
"json": {
|
|
3193
|
+
"description": "Get schema as json",
|
|
3194
|
+
"name": "json",
|
|
3195
|
+
"allowNo": false,
|
|
3196
|
+
"type": "boolean"
|
|
3197
|
+
},
|
|
3198
|
+
"manifest-dir": {
|
|
3199
|
+
"description": "Directory containing manifest file",
|
|
3200
|
+
"name": "manifest-dir",
|
|
3201
|
+
"default": "./dist/static",
|
|
3202
|
+
"hasDynamicHelp": false,
|
|
3203
|
+
"helpValue": "<directory>",
|
|
3204
|
+
"multiple": false,
|
|
3205
|
+
"type": "option"
|
|
3206
|
+
}
|
|
3207
|
+
},
|
|
3208
|
+
"hasDynamicHelp": false,
|
|
3209
|
+
"hiddenAliases": [],
|
|
3210
|
+
"id": "schema:list",
|
|
3211
|
+
"pluginAlias": "@sanity/cli",
|
|
3212
|
+
"pluginName": "@sanity/cli",
|
|
3213
|
+
"pluginType": "core",
|
|
3214
|
+
"strict": true,
|
|
3215
|
+
"isESM": true,
|
|
3216
|
+
"relativePath": [
|
|
3217
|
+
"dist",
|
|
3218
|
+
"commands",
|
|
3219
|
+
"schema",
|
|
3220
|
+
"list.js"
|
|
3221
|
+
]
|
|
3222
|
+
},
|
|
3229
3223
|
"schema:validate": {
|
|
3230
3224
|
"aliases": [],
|
|
3231
3225
|
"args": {},
|
|
@@ -3953,5 +3947,5 @@
|
|
|
3953
3947
|
]
|
|
3954
3948
|
}
|
|
3955
3949
|
},
|
|
3956
|
-
"version": "6.0.0-alpha.
|
|
3950
|
+
"version": "6.0.0-alpha.5"
|
|
3957
3951
|
}
|