@sanity/cli 3.96.1-next.6.af20bbf4af → 3.96.1-next.8.41afd49906

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.
@@ -8098,6 +8098,7 @@ Options
8098
8098
  --api <version> Sanity API Version to use
8099
8099
  --dataset <dataset> The Sanity dataset to use
8100
8100
  --project-id <id> Sanity Project ID to use
8101
+ --with-user-token Prime access token from CLI config into getCliClient()
8101
8102
 
8102
8103
 
8103
8104
  Examples
@@ -8110,13 +8111,14 @@ Examples
8110
8111
  # Test function passing event data on command line and cap execution time to 60 seconds
8111
8112
  sanity functions test echo --data '{ "id": 1 }' --timeout 60
8112
8113
  `, defaultFlags$1 = {
8113
- timeout: 10
8114
+ timeout: 10,
8114
8115
  // seconds
8116
+ "with-user-token": !1
8115
8117
  }, testFunctionsCommand = {
8116
8118
  name: "test",
8117
8119
  group: "functions",
8118
8120
  helpText: helpText$a,
8119
- signature: "<name> [--data <json>] [--file <filename>] [--timeout <seconds>] [--api <version>] [--dataset <name>] [--project-id] <id>]",
8121
+ signature: "<name> [--data <json>] [--file <filename>] [--timeout <seconds>] [--api <version>] [--dataset <name>] [--project-id] <id>] [--with-user-token]",
8120
8122
  description: "Invoke a local Sanity Function",
8121
8123
  async action(args, context) {
8122
8124
  const { apiClient, output } = context, [name] = args.argsWithoutOptions, flags = { ...defaultFlags$1, ...args.extOptions }, client2 = apiClient({
@@ -8141,7 +8143,8 @@ Examples
8141
8143
  timeout: flags.timeout,
8142
8144
  api: flags.api,
8143
8145
  dataset: flags.dataset || actualDataset,
8144
- "project-id": flags["project-id"] || projectId
8146
+ "project-id": flags["project-id"] || projectId,
8147
+ "with-user-token": flags["with-user-token"]
8145
8148
  }
8146
8149
  });
8147
8150
  if (!success) throw new Error(error2);