@sanity/runtime-cli 13.2.0 → 13.2.1

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/README.md CHANGED
@@ -20,7 +20,7 @@ $ npm install -g @sanity/runtime-cli
20
20
  $ sanity-run COMMAND
21
21
  running command...
22
22
  $ sanity-run (--version)
23
- @sanity/runtime-cli/13.2.0 linux-x64 node-v24.13.0
23
+ @sanity/runtime-cli/13.2.1 linux-x64 node-v24.13.0
24
24
  $ sanity-run --help [COMMAND]
25
25
  USAGE
26
26
  $ sanity-run COMMAND
@@ -98,7 +98,7 @@ EXAMPLES
98
98
  $ sanity-run blueprints add function --name my-function --fn-type document-create --fn-type document-update --lang js
99
99
  ```
100
100
 
101
- _See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/blueprints/add.ts)_
101
+ _See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.1/src/commands/blueprints/add.ts)_
102
102
 
103
103
  ## `sanity-run blueprints config`
104
104
 
@@ -133,7 +133,7 @@ EXAMPLES
133
133
  $ sanity-run blueprints config --edit --project-id <projectId> --stack-id <stackId>
134
134
  ```
135
135
 
136
- _See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/blueprints/config.ts)_
136
+ _See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.1/src/commands/blueprints/config.ts)_
137
137
 
138
138
  ## `sanity-run blueprints deploy`
139
139
 
@@ -163,7 +163,7 @@ EXAMPLES
163
163
  $ sanity-run blueprints deploy --no-wait
164
164
  ```
165
165
 
166
- _See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/blueprints/deploy.ts)_
166
+ _See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.1/src/commands/blueprints/deploy.ts)_
167
167
 
168
168
  ## `sanity-run blueprints destroy`
169
169
 
@@ -195,7 +195,7 @@ EXAMPLES
195
195
  $ sanity-run blueprints destroy --stack-id <stackId> --project-id <projectId> --force --no-wait
196
196
  ```
197
197
 
198
- _See code: [src/commands/blueprints/destroy.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/blueprints/destroy.ts)_
198
+ _See code: [src/commands/blueprints/destroy.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.1/src/commands/blueprints/destroy.ts)_
199
199
 
200
200
  ## `sanity-run blueprints doctor`
201
201
 
@@ -221,7 +221,7 @@ DESCRIPTION
221
221
  issues.
222
222
  ```
223
223
 
224
- _See code: [src/commands/blueprints/doctor.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/blueprints/doctor.ts)_
224
+ _See code: [src/commands/blueprints/doctor.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.1/src/commands/blueprints/doctor.ts)_
225
225
 
226
226
  ## `sanity-run blueprints info`
227
227
 
@@ -251,7 +251,7 @@ EXAMPLES
251
251
  $ sanity-run blueprints info --id <stackId>
252
252
  ```
253
253
 
254
- _See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/blueprints/info.ts)_
254
+ _See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.1/src/commands/blueprints/info.ts)_
255
255
 
256
256
  ## `sanity-run blueprints init [DIR]`
257
257
 
@@ -301,7 +301,7 @@ EXAMPLES
301
301
  $ sanity-run blueprints init --blueprint-type <json|js|ts> --stack-name <stackName>
302
302
  ```
303
303
 
304
- _See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/blueprints/init.ts)_
304
+ _See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.1/src/commands/blueprints/init.ts)_
305
305
 
306
306
  ## `sanity-run blueprints logs`
307
307
 
@@ -329,7 +329,7 @@ EXAMPLES
329
329
  $ sanity-run blueprints logs --watch
330
330
  ```
331
331
 
332
- _See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/blueprints/logs.ts)_
332
+ _See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.1/src/commands/blueprints/logs.ts)_
333
333
 
334
334
  ## `sanity-run blueprints plan`
335
335
 
@@ -352,7 +352,7 @@ EXAMPLES
352
352
  $ sanity-run blueprints plan
353
353
  ```
354
354
 
355
- _See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/blueprints/plan.ts)_
355
+ _See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.1/src/commands/blueprints/plan.ts)_
356
356
 
357
357
  ## `sanity-run blueprints stacks`
358
358
 
@@ -381,7 +381,7 @@ EXAMPLES
381
381
  $ sanity-run blueprints stacks --organization-id <organizationId>
382
382
  ```
383
383
 
384
- _See code: [src/commands/blueprints/stacks.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/blueprints/stacks.ts)_
384
+ _See code: [src/commands/blueprints/stacks.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.1/src/commands/blueprints/stacks.ts)_
385
385
 
386
386
  ## `sanity-run functions add`
387
387
 
@@ -430,7 +430,7 @@ EXAMPLES
430
430
  $ sanity-run functions add --name my-function --type document-create --type document-update --lang js
431
431
  ```
432
432
 
433
- _See code: [src/commands/functions/add.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/functions/add.ts)_
433
+ _See code: [src/commands/functions/add.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.1/src/commands/functions/add.ts)_
434
434
 
435
435
  ## `sanity-run functions dev`
436
436
 
@@ -464,7 +464,7 @@ EXAMPLES
464
464
  $ sanity-run functions dev --timeout 60
465
465
  ```
466
466
 
467
- _See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/functions/dev.ts)_
467
+ _See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.1/src/commands/functions/dev.ts)_
468
468
 
469
469
  ## `sanity-run functions env add NAME KEY VALUE`
470
470
 
@@ -491,7 +491,7 @@ EXAMPLES
491
491
  $ sanity-run functions env add MyFunction API_URL https://api.example.com/
492
492
  ```
493
493
 
494
- _See code: [src/commands/functions/env/add.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/functions/env/add.ts)_
494
+ _See code: [src/commands/functions/env/add.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.1/src/commands/functions/env/add.ts)_
495
495
 
496
496
  ## `sanity-run functions env list NAME`
497
497
 
@@ -515,7 +515,7 @@ EXAMPLES
515
515
  $ sanity-run functions env list MyFunction
516
516
  ```
517
517
 
518
- _See code: [src/commands/functions/env/list.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/functions/env/list.ts)_
518
+ _See code: [src/commands/functions/env/list.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.1/src/commands/functions/env/list.ts)_
519
519
 
520
520
  ## `sanity-run functions env remove NAME KEY`
521
521
 
@@ -541,7 +541,7 @@ EXAMPLES
541
541
  $ sanity-run functions env remove MyFunction API_URL
542
542
  ```
543
543
 
544
- _See code: [src/commands/functions/env/remove.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/functions/env/remove.ts)_
544
+ _See code: [src/commands/functions/env/remove.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.1/src/commands/functions/env/remove.ts)_
545
545
 
546
546
  ## `sanity-run functions logs [NAME]`
547
547
 
@@ -580,7 +580,7 @@ EXAMPLES
580
580
  $ sanity-run functions logs <name> --delete
581
581
  ```
582
582
 
583
- _See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/functions/logs.ts)_
583
+ _See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.1/src/commands/functions/logs.ts)_
584
584
 
585
585
  ## `sanity-run functions test [NAME]`
586
586
 
@@ -634,7 +634,7 @@ EXAMPLES
634
634
  $ sanity-run functions test <name> --event update --data-before '{ "title": "before" }' --data-after '{ "title": "after" }'
635
635
  ```
636
636
 
637
- _See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/functions/test.ts)_
637
+ _See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v13.2.1/src/commands/functions/test.ts)_
638
638
 
639
639
  ## `sanity-run help [COMMAND]`
640
640
 
@@ -1,11 +1,27 @@
1
+ import { existsSync } from 'node:fs';
2
+ import { join } from 'node:path';
1
3
  import hydrate from '@architect/hydrate';
2
4
  import inventory from '@architect/inventory';
3
5
  import { convertResourceToArcFormat } from './resource-to-arc.js';
4
6
  export async function resolveResourceDependencies(resource, transpiled) {
5
7
  const rawArc = await convertResourceToArcFormat(resource, transpiled);
6
8
  const inv = await inventory({ rawArc });
9
+ const cwd = inv.inv._project.cwd;
10
+ const installOptions = {
11
+ inventory: inv,
12
+ hydrateShared: false,
13
+ quiet: true,
14
+ pnpm: false,
15
+ yarn: false,
16
+ };
17
+ if (existsSync(join(cwd, 'pnpm-lock.yaml'))) {
18
+ installOptions.pnpm = true;
19
+ }
20
+ else if (existsSync(join(cwd, 'yarn.lock'))) {
21
+ installOptions.yarn = true;
22
+ }
7
23
  try {
8
- await hydrate.install({ inventory: inv, hydrateShared: false, quiet: true });
24
+ await hydrate.install(installOptions);
9
25
  }
10
26
  catch (err) {
11
27
  // This is a temporary fix.
@@ -1933,5 +1933,5 @@
1933
1933
  ]
1934
1934
  }
1935
1935
  },
1936
- "version": "13.2.0"
1936
+ "version": "13.2.1"
1937
1937
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sanity/runtime-cli",
3
3
  "description": "Sanity's Runtime CLI for Blueprints and Functions",
4
- "version": "13.2.0",
4
+ "version": "13.2.1",
5
5
  "author": "Sanity Runtime Team",
6
6
  "type": "module",
7
7
  "license": "MIT",