@sanity/plugin-kit 0.0.1-studio-v3.1 → 0.0.1-studio-v3.2

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/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/plugin-kit",
3
- "version": "0.0.1-studio-v3.1",
3
+ "version": "0.0.1-studio-v3.2",
4
4
  "description": "Enhanced Sanity.io plugin development experience",
5
5
  "scripts": {
6
6
  "clean": "rimraf lib",
@@ -33,7 +33,12 @@ function runCommand(commandString) {
33
33
  // ref: https://stackoverflow.com/questions/37459717/error-spawn-enoent-on-windows/37487465
34
34
  options = process.platform === 'win32' ? Object.assign(Object.assign({}, options), { shell: true }) : options;
35
35
  return new Promise((resolve, reject) => {
36
- child_process_1.default.spawn(command, args, options).on('error', reject).on('close', resolve);
36
+ child_process_1.default
37
+ .spawn(command, args, options)
38
+ .on('error', reject)
39
+ .on('close', (exitCode) => {
40
+ resolve({ code: exitCode !== null && exitCode !== void 0 ? exitCode : 0 });
41
+ });
37
42
  });
38
43
  });
39
44
  }
@@ -1 +1 @@
1
- {"version":3,"file":"command-parser.js","sourceRoot":"","sources":["../../../src/util/command-parser.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kEAAwC;AACxC,gEAAqC;AACrC,gDAAuB;AAOvB,SAAgB,YAAY,CAAC,aAAqB;IAChD,MAAM,UAAU,GAAG,aAAa,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;IACpD,MAAM,aAAa,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC3C,OAAO;QACL,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC;QACzB,IAAI,EAAE,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;KAC7D,CAAA;AACH,CAAC;AAPD,o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APD,oCAOC;AAED,SAAsB,UAAU,CAAC,aAAqB;;QACpD,aAAG,CAAC,IAAI,CAAC,oBAAoB,aAAa,EAAE,CAAC,CAAA;QAC7C,MAAM,EAAC,OAAO,EAAE,IAAI,EAAC,GAAG,YAAY,CAAC,aAAa,CAAC,CAAA;QAEnD,IAAI,OAAO,GAAQ,EAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,sBAAU,CAAC,GAAG,EAAE,EAAC,CAAA;QAE5D,2FAA2F;QAC3F,OAAO,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,iCAAK,OAAO,KAAE,KAAK,EAAE,IAAI,IAAE,CAAC,CAAC,OAAO,CAAA;QAE5E,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,uBAAY;iBACT,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC;iBAC7B,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;iBACnB,EAAE,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE;gBACxB,OAAO,CAAC,EAAC,IAAI,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,CAAC,EAAC,CAAC,CAAA;YAChC,CAAC,CAAC,CAAA;QACN,CAAC,CAAC,CAAA;IACJ,CAAC;CAAA;AAjBD,gCAiBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/plugin-kit",
3
- "version": "0.0.1-studio-v3.1",
3
+ "version": "0.0.1-studio-v3.2",
4
4
  "description": "Enhanced Sanity.io plugin development experience",
5
5
  "scripts": {
6
6
  "clean": "rimraf lib",
@@ -26,6 +26,11 @@ export async function runCommand(commandString: string): Promise<{code: number}>
26
26
  options = process.platform === 'win32' ? {...options, shell: true} : options
27
27
 
28
28
  return new Promise((resolve, reject) => {
29
- childProcess.spawn(command, args, options).on('error', reject).on('close', resolve)
29
+ childProcess
30
+ .spawn(command, args, options)
31
+ .on('error', reject)
32
+ .on('close', (exitCode) => {
33
+ resolve({code: exitCode ?? 0})
34
+ })
30
35
  })
31
36
  }