@sanity/cli 6.0.0-alpha.12 → 6.0.0-alpha.13
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/manifest/extractWorkspaceManifest.js +3 -1
- package/dist/actions/manifest/extractWorkspaceManifest.js.map +1 -1
- package/dist/config/createCliConfig.js +1 -2
- package/dist/config/createCliConfig.js.map +1 -1
- package/dist/exports/_internal.d.ts +132 -0
- package/dist/exports/_internal.js +4 -0
- package/dist/exports/_internal.js.map +1 -0
- package/dist/{index.d.ts → exports/index.d.ts} +2 -0
- package/dist/exports/index.js +6 -0
- package/dist/exports/index.js.map +1 -0
- package/oclif.manifest.json +165 -165
- package/package.json +11 -7
- package/dist/index.js +0 -6
- package/dist/index.js.map +0 -1
|
@@ -32,7 +32,9 @@ import { transformType } from './schemaTypeTransformer.js';
|
|
|
32
32
|
/**
|
|
33
33
|
* Extracts all serializable properties from userland schema types,
|
|
34
34
|
* so they best-effort can be used as definitions for Schema.compile.
|
|
35
|
-
|
|
35
|
+
*
|
|
36
|
+
* @internal
|
|
37
|
+
*/ export async function extractManifestSchemaTypes(schema, workDir) {
|
|
36
38
|
const typeNames = schema.getTypeNames();
|
|
37
39
|
const context = {
|
|
38
40
|
schema
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/actions/manifest/extractWorkspaceManifest.ts"],"sourcesContent":["import {resolveLocalPackage} from '@sanity/cli-core'\nimport {type Schema} from '@sanity/types'\nimport {type Workspace} from 'sanity'\n\nimport {resolveIcon} from './iconResolver.js'\nimport {type SchemaIconProps} from './SchemaIcon.js'\nimport {transformType} from './schemaTypeTransformer.js'\nimport {type CreateWorkspaceManifest, type ManifestSchemaType, type ManifestTool} from './types.js'\n\n/**\n * Extracts manifest data from an array of workspaces\n */\nexport function extractWorkspaceManifest(\n workspaces: Workspace[],\n workDir: string,\n): Promise<CreateWorkspaceManifest[]> {\n return Promise.all(\n workspaces.map(async (workspace) => {\n const [icon, serializedSchema, serializedTools] = await Promise.all([\n resolveIcon({\n icon: workspace.icon,\n subtitle: workspace.subtitle,\n title: workspace.title,\n workDir,\n }),\n extractManifestSchemaTypes(workspace.schema as Schema, workDir),\n extractManifestTools(workspace.tools, workDir),\n ])\n\n return {\n basePath: workspace.basePath,\n dataset: workspace.dataset,\n icon,\n mediaLibrary: workspace.mediaLibrary,\n name: workspace.name,\n projectId: workspace.projectId,\n schema: serializedSchema,\n subtitle: workspace.subtitle,\n title: workspace.title,\n tools: serializedTools,\n }\n }),\n )\n}\n\n/**\n * Extracts all serializable properties from userland schema types,\n * so they best-effort can be used as definitions for Schema.compile.\n */\
|
|
1
|
+
{"version":3,"sources":["../../../src/actions/manifest/extractWorkspaceManifest.ts"],"sourcesContent":["import {resolveLocalPackage} from '@sanity/cli-core'\nimport {type Schema} from '@sanity/types'\nimport {type Workspace} from 'sanity'\n\nimport {resolveIcon} from './iconResolver.js'\nimport {type SchemaIconProps} from './SchemaIcon.js'\nimport {transformType} from './schemaTypeTransformer.js'\nimport {type CreateWorkspaceManifest, type ManifestSchemaType, type ManifestTool} from './types.js'\n\n/**\n * Extracts manifest data from an array of workspaces\n */\nexport function extractWorkspaceManifest(\n workspaces: Workspace[],\n workDir: string,\n): Promise<CreateWorkspaceManifest[]> {\n return Promise.all(\n workspaces.map(async (workspace) => {\n const [icon, serializedSchema, serializedTools] = await Promise.all([\n resolveIcon({\n icon: workspace.icon,\n subtitle: workspace.subtitle,\n title: workspace.title,\n workDir,\n }),\n extractManifestSchemaTypes(workspace.schema as Schema, workDir),\n extractManifestTools(workspace.tools, workDir),\n ])\n\n return {\n basePath: workspace.basePath,\n dataset: workspace.dataset,\n icon,\n mediaLibrary: workspace.mediaLibrary,\n name: workspace.name,\n projectId: workspace.projectId,\n schema: serializedSchema,\n subtitle: workspace.subtitle,\n title: workspace.title,\n tools: serializedTools,\n }\n }),\n )\n}\n\n/**\n * Extracts all serializable properties from userland schema types,\n * so they best-effort can be used as definitions for Schema.compile.\n *\n * @internal\n */\nexport async function extractManifestSchemaTypes(\n schema: Schema,\n workDir: string,\n): Promise<ManifestSchemaType[]> {\n const typeNames = schema.getTypeNames()\n const context = {schema}\n\n const {createSchema} = await resolveLocalPackage<typeof import('sanity')>('sanity', workDir)\n\n const studioDefaultTypeNames = createSchema({name: 'default', types: []}).getTypeNames()\n\n return typeNames\n .filter((typeName) => !studioDefaultTypeNames.includes(typeName))\n .map((typeName) => schema.get(typeName))\n .filter((type): type is NonNullable<typeof type> => type !== undefined)\n .map((type) => transformType(type, context))\n}\n\n/**\n * Extracts tool information from workspace tools\n */\nconst extractManifestTools = async (\n tools: Workspace['tools'],\n workDir: string,\n): Promise<ManifestTool[]> =>\n Promise.all(\n tools.map(async (tool) => {\n const {\n __internalApplicationType: type,\n icon,\n name,\n title,\n } = tool as Workspace['tools'][number] & {__internalApplicationType: string}\n return {\n icon: await resolveIcon({\n icon: icon as SchemaIconProps['icon'],\n title,\n workDir,\n }),\n name,\n title,\n type: type || null,\n } satisfies ManifestTool\n }),\n )\n"],"names":["resolveLocalPackage","resolveIcon","transformType","extractWorkspaceManifest","workspaces","workDir","Promise","all","map","workspace","icon","serializedSchema","serializedTools","subtitle","title","extractManifestSchemaTypes","schema","extractManifestTools","tools","basePath","dataset","mediaLibrary","name","projectId","typeNames","getTypeNames","context","createSchema","studioDefaultTypeNames","types","filter","typeName","includes","get","type","undefined","tool","__internalApplicationType"],"mappings":"AAAA,SAAQA,mBAAmB,QAAO,mBAAkB;AAIpD,SAAQC,WAAW,QAAO,oBAAmB;AAE7C,SAAQC,aAAa,QAAO,6BAA4B;AAGxD;;CAEC,GACD,OAAO,SAASC,yBACdC,UAAuB,EACvBC,OAAe;IAEf,OAAOC,QAAQC,GAAG,CAChBH,WAAWI,GAAG,CAAC,OAAOC;QACpB,MAAM,CAACC,MAAMC,kBAAkBC,gBAAgB,GAAG,MAAMN,QAAQC,GAAG,CAAC;YAClEN,YAAY;gBACVS,MAAMD,UAAUC,IAAI;gBACpBG,UAAUJ,UAAUI,QAAQ;gBAC5BC,OAAOL,UAAUK,KAAK;gBACtBT;YACF;YACAU,2BAA2BN,UAAUO,MAAM,EAAYX;YACvDY,qBAAqBR,UAAUS,KAAK,EAAEb;SACvC;QAED,OAAO;YACLc,UAAUV,UAAUU,QAAQ;YAC5BC,SAASX,UAAUW,OAAO;YAC1BV;YACAW,cAAcZ,UAAUY,YAAY;YACpCC,MAAMb,UAAUa,IAAI;YACpBC,WAAWd,UAAUc,SAAS;YAC9BP,QAAQL;YACRE,UAAUJ,UAAUI,QAAQ;YAC5BC,OAAOL,UAAUK,KAAK;YACtBI,OAAON;QACT;IACF;AAEJ;AAEA;;;;;CAKC,GACD,OAAO,eAAeG,2BACpBC,MAAc,EACdX,OAAe;IAEf,MAAMmB,YAAYR,OAAOS,YAAY;IACrC,MAAMC,UAAU;QAACV;IAAM;IAEvB,MAAM,EAACW,YAAY,EAAC,GAAG,MAAM3B,oBAA6C,UAAUK;IAEpF,MAAMuB,yBAAyBD,aAAa;QAACL,MAAM;QAAWO,OAAO,EAAE;IAAA,GAAGJ,YAAY;IAEtF,OAAOD,UACJM,MAAM,CAAC,CAACC,WAAa,CAACH,uBAAuBI,QAAQ,CAACD,WACtDvB,GAAG,CAAC,CAACuB,WAAaf,OAAOiB,GAAG,CAACF,WAC7BD,MAAM,CAAC,CAACI,OAA2CA,SAASC,WAC5D3B,GAAG,CAAC,CAAC0B,OAAShC,cAAcgC,MAAMR;AACvC;AAEA;;CAEC,GACD,MAAMT,uBAAuB,OAC3BC,OACAb,UAEAC,QAAQC,GAAG,CACTW,MAAMV,GAAG,CAAC,OAAO4B;QACf,MAAM,EACJC,2BAA2BH,IAAI,EAC/BxB,IAAI,EACJY,IAAI,EACJR,KAAK,EACN,GAAGsB;QACJ,OAAO;YACL1B,MAAM,MAAMT,YAAY;gBACtBS,MAAMA;gBACNI;gBACAT;YACF;YACAiB;YACAR;YACAoB,MAAMA,QAAQ;QAChB;IACF"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { cliConfigSchema } from '@sanity/cli-core';
|
|
2
1
|
/**
|
|
3
2
|
* @deprecated Use `defineCliConfig` instead
|
|
4
3
|
* @public
|
|
5
4
|
*/ export function createCliConfig(config) {
|
|
6
|
-
return
|
|
5
|
+
return config;
|
|
7
6
|
}
|
|
8
7
|
|
|
9
8
|
//# sourceMappingURL=createCliConfig.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/config/createCliConfig.ts"],"sourcesContent":["import {type CliConfig
|
|
1
|
+
{"version":3,"sources":["../../src/config/createCliConfig.ts"],"sourcesContent":["import {type CliConfig} from '@sanity/cli-core'\n\n/**\n * @deprecated Use `defineCliConfig` instead\n * @public\n */\nexport function createCliConfig(config: CliConfig): CliConfig {\n return config\n}\n"],"names":["createCliConfig","config"],"mappings":"AAEA;;;CAGC,GACD,OAAO,SAASA,gBAAgBC,MAAiB;IAC/C,OAAOA;AACT"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import {Schema} from '@sanity/types'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Extracts all serializable properties from userland schema types,
|
|
5
|
+
* so they best-effort can be used as definitions for Schema.compile.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare function extractManifestSchemaTypes(
|
|
10
|
+
schema: Schema,
|
|
11
|
+
workDir: string,
|
|
12
|
+
): Promise<ManifestSchemaType[]>
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Get environment variables prefixed with SANITY_STUDIO_, as an object.
|
|
16
|
+
*
|
|
17
|
+
* @param options - Options for the environment variable loading
|
|
18
|
+
* {@link StudioEnvVariablesOptions}
|
|
19
|
+
* @returns Object of studio environment variables
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```tsx
|
|
23
|
+
* getStudioEnvironmentVariables({prefix: 'process.env.', jsonEncode: true})
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
export declare function getStudioEnvironmentVariables(
|
|
29
|
+
options?: StudioEnvVariablesOptions,
|
|
30
|
+
): Record<string, string>
|
|
31
|
+
|
|
32
|
+
declare type ManifestArrayMember = Omit<ManifestSchemaType, 'name'> & {
|
|
33
|
+
name?: string
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
declare type ManifestField = ManifestSchemaType & {
|
|
37
|
+
fieldset?: string
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
declare interface ManifestFieldset {
|
|
41
|
+
[index: string]: ManifestSerializable | undefined
|
|
42
|
+
name: string
|
|
43
|
+
title?: string
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
declare type ManifestReferenceMember = Omit<ManifestSchemaType, 'name'> & {
|
|
47
|
+
name?: string
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
declare interface ManifestSchemaType {
|
|
51
|
+
name: string
|
|
52
|
+
type: string
|
|
53
|
+
deprecated?: {
|
|
54
|
+
reason: string
|
|
55
|
+
}
|
|
56
|
+
fields?: ManifestField[]
|
|
57
|
+
fieldsets?: ManifestFieldset[]
|
|
58
|
+
hidden?: 'conditional' | boolean
|
|
59
|
+
lists?: ManifestTitledValue[]
|
|
60
|
+
marks?: {
|
|
61
|
+
annotations?: ManifestArrayMember[]
|
|
62
|
+
decorators?: ManifestTitledValue[]
|
|
63
|
+
}
|
|
64
|
+
of?: ManifestArrayMember[]
|
|
65
|
+
options?: Record<string, ManifestSerializable>
|
|
66
|
+
preview?: {
|
|
67
|
+
select: Record<string, string>
|
|
68
|
+
}
|
|
69
|
+
readOnly?: 'conditional' | boolean
|
|
70
|
+
styles?: ManifestTitledValue[]
|
|
71
|
+
title?: string
|
|
72
|
+
to?: ManifestReferenceMember[]
|
|
73
|
+
validation?: ManifestValidationGroup[]
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
declare type ManifestSerializable =
|
|
77
|
+
| boolean
|
|
78
|
+
| ManifestSerializable[]
|
|
79
|
+
| number
|
|
80
|
+
| string
|
|
81
|
+
| {
|
|
82
|
+
[k: string]: ManifestSerializable
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
declare interface ManifestTitledValue {
|
|
86
|
+
value: string
|
|
87
|
+
title?: string
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
declare interface ManifestValidationGroup {
|
|
91
|
+
rules: ManifestValidationRule[]
|
|
92
|
+
level?: 'error' | 'info' | 'warning'
|
|
93
|
+
message?: string
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
declare type ManifestValidationRule = {
|
|
97
|
+
[index: string]: ManifestSerializable | undefined
|
|
98
|
+
constraint?: ManifestSerializable
|
|
99
|
+
flag: string
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* The params for the `getStudioEnvironmentVariables` function that gets Studio focused environment variables.
|
|
104
|
+
*
|
|
105
|
+
* @public
|
|
106
|
+
*/
|
|
107
|
+
export declare interface StudioEnvVariablesOptions {
|
|
108
|
+
/**
|
|
109
|
+
* When specified includes environment variables from dotenv files (`.env`), in the same way the studio does.
|
|
110
|
+
* A `mode` must be specified, usually `development`
|
|
111
|
+
* or `production`, which will load the corresponding `.env.development` or `.env.production`.
|
|
112
|
+
* To specify where to look for the dotenv files, specify `options.envFile.envDir`.
|
|
113
|
+
*/
|
|
114
|
+
envFile?:
|
|
115
|
+
| false
|
|
116
|
+
| {
|
|
117
|
+
envDir?: string
|
|
118
|
+
mode: string
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* When specified, JSON-encodes the values, which is handy if you want to pass
|
|
122
|
+
* this to a bundlers hardcoded defines, such as Vite's `define` or Webpack's `DefinePlugin`.
|
|
123
|
+
*/
|
|
124
|
+
jsonEncode?: boolean
|
|
125
|
+
/**
|
|
126
|
+
* When specified adds a prefix to the environment variable keys,
|
|
127
|
+
* eg: `getStudioEnvironmentVariables({prefix: 'process.env.'})`
|
|
128
|
+
*/
|
|
129
|
+
prefix?: string
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/exports/_internal.ts"],"sourcesContent":["export {getStudioEnvironmentVariables} from '../actions/build/getStudioEnvironmentVariables.js'\nexport type {StudioEnvVariablesOptions} from '../actions/build/getStudioEnvironmentVariables.js'\nexport {extractManifestSchemaTypes} from '../actions/manifest/extractWorkspaceManifest.js'\n"],"names":["getStudioEnvironmentVariables","extractManifestSchemaTypes"],"mappings":"AAAA,SAAQA,6BAA6B,QAAO,oDAAmD;AAE/F,SAAQC,0BAA0B,QAAO,kDAAiD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { createCliConfig } from '../config/createCliConfig.js';
|
|
2
|
+
export { defineCliConfig } from '../config/defineCliConfig.js';
|
|
3
|
+
export { getCliClient } from '../util/cliClient.js';
|
|
4
|
+
export { loadEnv } from '../util/loadEnv.js';
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/exports/index.ts"],"sourcesContent":["export {createCliConfig} from '../config/createCliConfig.js'\nexport {defineCliConfig} from '../config/defineCliConfig.js'\nexport type {PackageJson} from '../types.js'\nexport {type CliClientOptions, getCliClient} from '../util/cliClient.js'\nexport {loadEnv} from '../util/loadEnv.js'\nexport type {CliConfig} from '@sanity/cli-core'\n"],"names":["createCliConfig","defineCliConfig","getCliClient","loadEnv"],"mappings":"AAAA,SAAQA,eAAe,QAAO,+BAA8B;AAC5D,SAAQC,eAAe,QAAO,+BAA8B;AAE5D,SAA+BC,YAAY,QAAO,uBAAsB;AACxE,SAAQC,OAAO,QAAO,qBAAoB"}
|
package/oclif.manifest.json
CHANGED
|
@@ -2206,6 +2206,170 @@
|
|
|
2206
2206
|
"validate.js"
|
|
2207
2207
|
]
|
|
2208
2208
|
},
|
|
2209
|
+
"hook:attempt": {
|
|
2210
|
+
"aliases": [],
|
|
2211
|
+
"args": {
|
|
2212
|
+
"attemptId": {
|
|
2213
|
+
"description": "The delivery attempt ID to get details for",
|
|
2214
|
+
"name": "attemptId",
|
|
2215
|
+
"required": true
|
|
2216
|
+
}
|
|
2217
|
+
},
|
|
2218
|
+
"description": "Print details of a given webhook delivery attempt",
|
|
2219
|
+
"examples": [
|
|
2220
|
+
{
|
|
2221
|
+
"command": "<%= config.bin %> <%= command.id %> abc123",
|
|
2222
|
+
"description": "Print details of webhook delivery attempt with ID abc123"
|
|
2223
|
+
}
|
|
2224
|
+
],
|
|
2225
|
+
"flags": {},
|
|
2226
|
+
"hasDynamicHelp": false,
|
|
2227
|
+
"hiddenAliases": [],
|
|
2228
|
+
"id": "hook:attempt",
|
|
2229
|
+
"pluginAlias": "@sanity/cli",
|
|
2230
|
+
"pluginName": "@sanity/cli",
|
|
2231
|
+
"pluginType": "core",
|
|
2232
|
+
"strict": true,
|
|
2233
|
+
"isESM": true,
|
|
2234
|
+
"relativePath": [
|
|
2235
|
+
"dist",
|
|
2236
|
+
"commands",
|
|
2237
|
+
"hook",
|
|
2238
|
+
"attempt.js"
|
|
2239
|
+
]
|
|
2240
|
+
},
|
|
2241
|
+
"hook:create": {
|
|
2242
|
+
"aliases": [],
|
|
2243
|
+
"args": {},
|
|
2244
|
+
"description": "Create a new webhook for the current project",
|
|
2245
|
+
"examples": [
|
|
2246
|
+
{
|
|
2247
|
+
"command": "<%= config.bin %> <%= command.id %>",
|
|
2248
|
+
"description": "Create a new webhook for the current project"
|
|
2249
|
+
}
|
|
2250
|
+
],
|
|
2251
|
+
"flags": {},
|
|
2252
|
+
"hasDynamicHelp": false,
|
|
2253
|
+
"hiddenAliases": [],
|
|
2254
|
+
"id": "hook:create",
|
|
2255
|
+
"pluginAlias": "@sanity/cli",
|
|
2256
|
+
"pluginName": "@sanity/cli",
|
|
2257
|
+
"pluginType": "core",
|
|
2258
|
+
"strict": true,
|
|
2259
|
+
"isESM": true,
|
|
2260
|
+
"relativePath": [
|
|
2261
|
+
"dist",
|
|
2262
|
+
"commands",
|
|
2263
|
+
"hook",
|
|
2264
|
+
"create.js"
|
|
2265
|
+
]
|
|
2266
|
+
},
|
|
2267
|
+
"hook:delete": {
|
|
2268
|
+
"aliases": [],
|
|
2269
|
+
"args": {
|
|
2270
|
+
"name": {
|
|
2271
|
+
"description": "Name of hook to delete (will prompt if not provided)",
|
|
2272
|
+
"name": "name",
|
|
2273
|
+
"required": false
|
|
2274
|
+
}
|
|
2275
|
+
},
|
|
2276
|
+
"description": "Delete a hook within your project",
|
|
2277
|
+
"examples": [
|
|
2278
|
+
{
|
|
2279
|
+
"command": "<%= config.bin %> <%= command.id %>",
|
|
2280
|
+
"description": "Interactively select and delete a hook"
|
|
2281
|
+
},
|
|
2282
|
+
{
|
|
2283
|
+
"command": "<%= config.bin %> <%= command.id %> my-hook",
|
|
2284
|
+
"description": "Delete a specific hook by name"
|
|
2285
|
+
}
|
|
2286
|
+
],
|
|
2287
|
+
"flags": {},
|
|
2288
|
+
"hasDynamicHelp": false,
|
|
2289
|
+
"hiddenAliases": [],
|
|
2290
|
+
"id": "hook:delete",
|
|
2291
|
+
"pluginAlias": "@sanity/cli",
|
|
2292
|
+
"pluginName": "@sanity/cli",
|
|
2293
|
+
"pluginType": "core",
|
|
2294
|
+
"strict": true,
|
|
2295
|
+
"isESM": true,
|
|
2296
|
+
"relativePath": [
|
|
2297
|
+
"dist",
|
|
2298
|
+
"commands",
|
|
2299
|
+
"hook",
|
|
2300
|
+
"delete.js"
|
|
2301
|
+
]
|
|
2302
|
+
},
|
|
2303
|
+
"hook:list": {
|
|
2304
|
+
"aliases": [],
|
|
2305
|
+
"args": {},
|
|
2306
|
+
"description": "List hooks for a given project",
|
|
2307
|
+
"examples": [
|
|
2308
|
+
{
|
|
2309
|
+
"command": "<%= config.bin %> <%= command.id %>",
|
|
2310
|
+
"description": "List hooks for a given project"
|
|
2311
|
+
}
|
|
2312
|
+
],
|
|
2313
|
+
"flags": {},
|
|
2314
|
+
"hasDynamicHelp": false,
|
|
2315
|
+
"hiddenAliases": [],
|
|
2316
|
+
"id": "hook:list",
|
|
2317
|
+
"pluginAlias": "@sanity/cli",
|
|
2318
|
+
"pluginName": "@sanity/cli",
|
|
2319
|
+
"pluginType": "core",
|
|
2320
|
+
"strict": true,
|
|
2321
|
+
"isESM": true,
|
|
2322
|
+
"relativePath": [
|
|
2323
|
+
"dist",
|
|
2324
|
+
"commands",
|
|
2325
|
+
"hook",
|
|
2326
|
+
"list.js"
|
|
2327
|
+
]
|
|
2328
|
+
},
|
|
2329
|
+
"hook:logs": {
|
|
2330
|
+
"aliases": [],
|
|
2331
|
+
"args": {
|
|
2332
|
+
"name": {
|
|
2333
|
+
"description": "Name of the hook to show logs for",
|
|
2334
|
+
"name": "name",
|
|
2335
|
+
"required": false
|
|
2336
|
+
}
|
|
2337
|
+
},
|
|
2338
|
+
"description": "List latest log entries for a given hook",
|
|
2339
|
+
"examples": [
|
|
2340
|
+
{
|
|
2341
|
+
"command": "<%= config.bin %> <%= command.id %>",
|
|
2342
|
+
"description": "List latest log entries for a given hook"
|
|
2343
|
+
},
|
|
2344
|
+
{
|
|
2345
|
+
"command": "<%= config.bin %> <%= command.id %> [NAME]",
|
|
2346
|
+
"description": "List latest log entries for a specific hook by name"
|
|
2347
|
+
}
|
|
2348
|
+
],
|
|
2349
|
+
"flags": {
|
|
2350
|
+
"detailed": {
|
|
2351
|
+
"description": "Include detailed payload and attempts",
|
|
2352
|
+
"name": "detailed",
|
|
2353
|
+
"required": false,
|
|
2354
|
+
"allowNo": false,
|
|
2355
|
+
"type": "boolean"
|
|
2356
|
+
}
|
|
2357
|
+
},
|
|
2358
|
+
"hasDynamicHelp": false,
|
|
2359
|
+
"hiddenAliases": [],
|
|
2360
|
+
"id": "hook:logs",
|
|
2361
|
+
"pluginAlias": "@sanity/cli",
|
|
2362
|
+
"pluginName": "@sanity/cli",
|
|
2363
|
+
"pluginType": "core",
|
|
2364
|
+
"strict": true,
|
|
2365
|
+
"isESM": true,
|
|
2366
|
+
"relativePath": [
|
|
2367
|
+
"dist",
|
|
2368
|
+
"commands",
|
|
2369
|
+
"hook",
|
|
2370
|
+
"logs.js"
|
|
2371
|
+
]
|
|
2372
|
+
},
|
|
2209
2373
|
"graphql:deploy": {
|
|
2210
2374
|
"aliases": [],
|
|
2211
2375
|
"args": {},
|
|
@@ -2456,170 +2620,6 @@
|
|
|
2456
2620
|
"extract.js"
|
|
2457
2621
|
]
|
|
2458
2622
|
},
|
|
2459
|
-
"hook:attempt": {
|
|
2460
|
-
"aliases": [],
|
|
2461
|
-
"args": {
|
|
2462
|
-
"attemptId": {
|
|
2463
|
-
"description": "The delivery attempt ID to get details for",
|
|
2464
|
-
"name": "attemptId",
|
|
2465
|
-
"required": true
|
|
2466
|
-
}
|
|
2467
|
-
},
|
|
2468
|
-
"description": "Print details of a given webhook delivery attempt",
|
|
2469
|
-
"examples": [
|
|
2470
|
-
{
|
|
2471
|
-
"command": "<%= config.bin %> <%= command.id %> abc123",
|
|
2472
|
-
"description": "Print details of webhook delivery attempt with ID abc123"
|
|
2473
|
-
}
|
|
2474
|
-
],
|
|
2475
|
-
"flags": {},
|
|
2476
|
-
"hasDynamicHelp": false,
|
|
2477
|
-
"hiddenAliases": [],
|
|
2478
|
-
"id": "hook:attempt",
|
|
2479
|
-
"pluginAlias": "@sanity/cli",
|
|
2480
|
-
"pluginName": "@sanity/cli",
|
|
2481
|
-
"pluginType": "core",
|
|
2482
|
-
"strict": true,
|
|
2483
|
-
"isESM": true,
|
|
2484
|
-
"relativePath": [
|
|
2485
|
-
"dist",
|
|
2486
|
-
"commands",
|
|
2487
|
-
"hook",
|
|
2488
|
-
"attempt.js"
|
|
2489
|
-
]
|
|
2490
|
-
},
|
|
2491
|
-
"hook:create": {
|
|
2492
|
-
"aliases": [],
|
|
2493
|
-
"args": {},
|
|
2494
|
-
"description": "Create a new webhook for the current project",
|
|
2495
|
-
"examples": [
|
|
2496
|
-
{
|
|
2497
|
-
"command": "<%= config.bin %> <%= command.id %>",
|
|
2498
|
-
"description": "Create a new webhook for the current project"
|
|
2499
|
-
}
|
|
2500
|
-
],
|
|
2501
|
-
"flags": {},
|
|
2502
|
-
"hasDynamicHelp": false,
|
|
2503
|
-
"hiddenAliases": [],
|
|
2504
|
-
"id": "hook:create",
|
|
2505
|
-
"pluginAlias": "@sanity/cli",
|
|
2506
|
-
"pluginName": "@sanity/cli",
|
|
2507
|
-
"pluginType": "core",
|
|
2508
|
-
"strict": true,
|
|
2509
|
-
"isESM": true,
|
|
2510
|
-
"relativePath": [
|
|
2511
|
-
"dist",
|
|
2512
|
-
"commands",
|
|
2513
|
-
"hook",
|
|
2514
|
-
"create.js"
|
|
2515
|
-
]
|
|
2516
|
-
},
|
|
2517
|
-
"hook:delete": {
|
|
2518
|
-
"aliases": [],
|
|
2519
|
-
"args": {
|
|
2520
|
-
"name": {
|
|
2521
|
-
"description": "Name of hook to delete (will prompt if not provided)",
|
|
2522
|
-
"name": "name",
|
|
2523
|
-
"required": false
|
|
2524
|
-
}
|
|
2525
|
-
},
|
|
2526
|
-
"description": "Delete a hook within your project",
|
|
2527
|
-
"examples": [
|
|
2528
|
-
{
|
|
2529
|
-
"command": "<%= config.bin %> <%= command.id %>",
|
|
2530
|
-
"description": "Interactively select and delete a hook"
|
|
2531
|
-
},
|
|
2532
|
-
{
|
|
2533
|
-
"command": "<%= config.bin %> <%= command.id %> my-hook",
|
|
2534
|
-
"description": "Delete a specific hook by name"
|
|
2535
|
-
}
|
|
2536
|
-
],
|
|
2537
|
-
"flags": {},
|
|
2538
|
-
"hasDynamicHelp": false,
|
|
2539
|
-
"hiddenAliases": [],
|
|
2540
|
-
"id": "hook:delete",
|
|
2541
|
-
"pluginAlias": "@sanity/cli",
|
|
2542
|
-
"pluginName": "@sanity/cli",
|
|
2543
|
-
"pluginType": "core",
|
|
2544
|
-
"strict": true,
|
|
2545
|
-
"isESM": true,
|
|
2546
|
-
"relativePath": [
|
|
2547
|
-
"dist",
|
|
2548
|
-
"commands",
|
|
2549
|
-
"hook",
|
|
2550
|
-
"delete.js"
|
|
2551
|
-
]
|
|
2552
|
-
},
|
|
2553
|
-
"hook:list": {
|
|
2554
|
-
"aliases": [],
|
|
2555
|
-
"args": {},
|
|
2556
|
-
"description": "List hooks for a given project",
|
|
2557
|
-
"examples": [
|
|
2558
|
-
{
|
|
2559
|
-
"command": "<%= config.bin %> <%= command.id %>",
|
|
2560
|
-
"description": "List hooks for a given project"
|
|
2561
|
-
}
|
|
2562
|
-
],
|
|
2563
|
-
"flags": {},
|
|
2564
|
-
"hasDynamicHelp": false,
|
|
2565
|
-
"hiddenAliases": [],
|
|
2566
|
-
"id": "hook:list",
|
|
2567
|
-
"pluginAlias": "@sanity/cli",
|
|
2568
|
-
"pluginName": "@sanity/cli",
|
|
2569
|
-
"pluginType": "core",
|
|
2570
|
-
"strict": true,
|
|
2571
|
-
"isESM": true,
|
|
2572
|
-
"relativePath": [
|
|
2573
|
-
"dist",
|
|
2574
|
-
"commands",
|
|
2575
|
-
"hook",
|
|
2576
|
-
"list.js"
|
|
2577
|
-
]
|
|
2578
|
-
},
|
|
2579
|
-
"hook:logs": {
|
|
2580
|
-
"aliases": [],
|
|
2581
|
-
"args": {
|
|
2582
|
-
"name": {
|
|
2583
|
-
"description": "Name of the hook to show logs for",
|
|
2584
|
-
"name": "name",
|
|
2585
|
-
"required": false
|
|
2586
|
-
}
|
|
2587
|
-
},
|
|
2588
|
-
"description": "List latest log entries for a given hook",
|
|
2589
|
-
"examples": [
|
|
2590
|
-
{
|
|
2591
|
-
"command": "<%= config.bin %> <%= command.id %>",
|
|
2592
|
-
"description": "List latest log entries for a given hook"
|
|
2593
|
-
},
|
|
2594
|
-
{
|
|
2595
|
-
"command": "<%= config.bin %> <%= command.id %> [NAME]",
|
|
2596
|
-
"description": "List latest log entries for a specific hook by name"
|
|
2597
|
-
}
|
|
2598
|
-
],
|
|
2599
|
-
"flags": {
|
|
2600
|
-
"detailed": {
|
|
2601
|
-
"description": "Include detailed payload and attempts",
|
|
2602
|
-
"name": "detailed",
|
|
2603
|
-
"required": false,
|
|
2604
|
-
"allowNo": false,
|
|
2605
|
-
"type": "boolean"
|
|
2606
|
-
}
|
|
2607
|
-
},
|
|
2608
|
-
"hasDynamicHelp": false,
|
|
2609
|
-
"hiddenAliases": [],
|
|
2610
|
-
"id": "hook:logs",
|
|
2611
|
-
"pluginAlias": "@sanity/cli",
|
|
2612
|
-
"pluginName": "@sanity/cli",
|
|
2613
|
-
"pluginType": "core",
|
|
2614
|
-
"strict": true,
|
|
2615
|
-
"isESM": true,
|
|
2616
|
-
"relativePath": [
|
|
2617
|
-
"dist",
|
|
2618
|
-
"commands",
|
|
2619
|
-
"hook",
|
|
2620
|
-
"logs.js"
|
|
2621
|
-
]
|
|
2622
|
-
},
|
|
2623
2623
|
"mcp:configure": {
|
|
2624
2624
|
"aliases": [],
|
|
2625
2625
|
"args": {},
|
|
@@ -4146,5 +4146,5 @@
|
|
|
4146
4146
|
]
|
|
4147
4147
|
}
|
|
4148
4148
|
},
|
|
4149
|
-
"version": "6.0.0-alpha.
|
|
4149
|
+
"version": "6.0.0-alpha.13"
|
|
4150
4150
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/cli",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.13",
|
|
4
4
|
"description": "Sanity CLI tool for managing Sanity projects and organizations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity",
|
|
@@ -24,13 +24,17 @@
|
|
|
24
24
|
"type": "module",
|
|
25
25
|
"exports": {
|
|
26
26
|
".": {
|
|
27
|
-
"source": "./src/index.ts",
|
|
28
|
-
"default": "./dist/index.js"
|
|
27
|
+
"source": "./src/exports/index.ts",
|
|
28
|
+
"default": "./dist/exports/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./_internal": {
|
|
31
|
+
"source": "./src/exports/_internal.ts",
|
|
32
|
+
"default": "./dist/exports/_internal.js"
|
|
29
33
|
},
|
|
30
34
|
"./package.json": "./package.json"
|
|
31
35
|
},
|
|
32
|
-
"main": "./dist/index.js",
|
|
33
|
-
"types": "./dist/index.d.ts",
|
|
36
|
+
"main": "./dist/exports/index.js",
|
|
37
|
+
"types": "./dist/exports/index.d.ts",
|
|
34
38
|
"bin": {
|
|
35
39
|
"sanity": "./bin/run.js"
|
|
36
40
|
},
|
|
@@ -64,7 +68,7 @@
|
|
|
64
68
|
"@sanity/ui": "^3.1.11",
|
|
65
69
|
"@vercel/frameworks": "3.8.4",
|
|
66
70
|
"@vercel/fs-detectors": "5.5.2",
|
|
67
|
-
"@vitejs/plugin-react": "^5.1.
|
|
71
|
+
"@vitejs/plugin-react": "^5.1.4",
|
|
68
72
|
"chokidar": "^5.0.0",
|
|
69
73
|
"console-table-printer": "^2.15.0",
|
|
70
74
|
"date-fns": "^4.1.0",
|
|
@@ -151,8 +155,8 @@
|
|
|
151
155
|
"vite-tsconfig-paths": "^6.0.4",
|
|
152
156
|
"vitest": "^4.0.18",
|
|
153
157
|
"@repo/package.config": "0.0.1",
|
|
154
|
-
"@sanity/cli-test": "0.0.2-alpha.11",
|
|
155
158
|
"@repo/tsconfig": "3.70.0",
|
|
159
|
+
"@sanity/cli-test": "0.0.2-alpha.11",
|
|
156
160
|
"@sanity/eslint-config-cli": "0.0.0-alpha.2"
|
|
157
161
|
},
|
|
158
162
|
"engines": {
|
package/dist/index.js
DELETED
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {createCliConfig} from './config/createCliConfig.js'\nexport {defineCliConfig} from './config/defineCliConfig.js'\nexport type {PackageJson} from './types.js'\nexport {type CliClientOptions, getCliClient} from './util/cliClient.js'\nexport {loadEnv} from './util/loadEnv.js'\n"],"names":["createCliConfig","defineCliConfig","getCliClient","loadEnv"],"mappings":"AAAA,SAAQA,eAAe,QAAO,8BAA6B;AAC3D,SAAQC,eAAe,QAAO,8BAA6B;AAE3D,SAA+BC,YAAY,QAAO,sBAAqB;AACvE,SAAQC,OAAO,QAAO,oBAAmB"}
|