@expo/build-tools 1.0.4 → 1.0.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.
@@ -6,14 +6,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getParentAndDescendantProcessPidsAsync = void 0;
7
7
  const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
8
8
  async function getChildrenPidsAsync(parentPids) {
9
- const result = await (0, turtle_spawn_1.default)('pgrep', ['-P', parentPids.join(',')], {
10
- stdio: 'pipe',
11
- });
12
- return result.stdout
13
- .toString()
14
- .split('\n')
15
- .map((i) => Number(i.trim()))
16
- .filter((i) => i);
9
+ try {
10
+ const result = await (0, turtle_spawn_1.default)('pgrep', ['-P', parentPids.join(',')], {
11
+ stdio: 'pipe',
12
+ });
13
+ return result.stdout
14
+ .toString()
15
+ .split('\n')
16
+ .map((i) => Number(i.trim()))
17
+ .filter((i) => i);
18
+ }
19
+ catch {
20
+ return [];
21
+ }
17
22
  }
18
23
  async function getParentAndDescendantProcessPidsAsync(ppid) {
19
24
  const children = new Set([ppid]);
@@ -1 +1 @@
1
- {"version":3,"file":"processes.js","sourceRoot":"","sources":["../../src/utils/processes.ts"],"names":[],"mappings":";;;;;;AAAA,sEAAuC;AAEvC,KAAK,UAAU,oBAAoB,CAAC,UAAoB;IACtD,MAAM,MAAM,GAAG,MAAM,IAAA,sBAAK,EAAC,OAAO,EAAE,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE;QAChE,KAAK,EAAE,MAAM;KACd,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,MAAM;SACjB,QAAQ,EAAE;SACV,KAAK,CAAC,IAAI,CAAC;SACX,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;SAC5B,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;AACtB,CAAC;AAEM,KAAK,UAAU,sCAAsC,CAAC,IAAY;IACvE,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IACzC,IAAI,gBAAgB,GAAG,IAAI,CAAC;IAC5B,OAAO,gBAAgB,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,oBAAoB,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;QACvD,gBAAgB,GAAG,KAAK,CAAC;QACzB,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;YACtB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;gBACtB,gBAAgB,GAAG,IAAI,CAAC;gBACxB,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;aACnB;SACF;KACF;IACD,OAAO,CAAC,GAAG,QAAQ,CAAC,CAAC;AACvB,CAAC;AAdD,wFAcC","sourcesContent":["import spawn from '@expo/turtle-spawn';\n\nasync function getChildrenPidsAsync(parentPids: number[]): Promise<number[]> {\n const result = await spawn('pgrep', ['-P', parentPids.join(',')], {\n stdio: 'pipe',\n });\n return result.stdout\n .toString()\n .split('\\n')\n .map((i) => Number(i.trim()))\n .filter((i) => i);\n}\n\nexport async function getParentAndDescendantProcessPidsAsync(ppid: number): Promise<number[]> {\n const children = new Set<number>([ppid]);\n let shouldCheckAgain = true;\n while (shouldCheckAgain) {\n const pids = await getChildrenPidsAsync([...children]);\n shouldCheckAgain = false;\n for (const pid of pids) {\n if (!children.has(pid)) {\n shouldCheckAgain = true;\n children.add(pid);\n }\n }\n }\n return [...children];\n}\n"]}
1
+ {"version":3,"file":"processes.js","sourceRoot":"","sources":["../../src/utils/processes.ts"],"names":[],"mappings":";;;;;;AAAA,sEAAuC;AAEvC,KAAK,UAAU,oBAAoB,CAAC,UAAoB;IACtD,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,IAAA,sBAAK,EAAC,OAAO,EAAE,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE;YAChE,KAAK,EAAE,MAAM;SACd,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,MAAM;aACjB,QAAQ,EAAE;aACV,KAAK,CAAC,IAAI,CAAC;aACX,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;aAC5B,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;KACrB;IAAC,MAAM;QACN,OAAO,EAAE,CAAC;KACX;AACH,CAAC;AAEM,KAAK,UAAU,sCAAsC,CAAC,IAAY;IACvE,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IACzC,IAAI,gBAAgB,GAAG,IAAI,CAAC;IAC5B,OAAO,gBAAgB,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,oBAAoB,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;QACvD,gBAAgB,GAAG,KAAK,CAAC;QACzB,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;YACtB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;gBACtB,gBAAgB,GAAG,IAAI,CAAC;gBACxB,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;aACnB;SACF;KACF;IACD,OAAO,CAAC,GAAG,QAAQ,CAAC,CAAC;AACvB,CAAC;AAdD,wFAcC","sourcesContent":["import spawn from '@expo/turtle-spawn';\n\nasync function getChildrenPidsAsync(parentPids: number[]): Promise<number[]> {\n try {\n const result = await spawn('pgrep', ['-P', parentPids.join(',')], {\n stdio: 'pipe',\n });\n return result.stdout\n .toString()\n .split('\\n')\n .map((i) => Number(i.trim()))\n .filter((i) => i);\n } catch {\n return [];\n }\n}\n\nexport async function getParentAndDescendantProcessPidsAsync(ppid: number): Promise<number[]> {\n const children = new Set<number>([ppid]);\n let shouldCheckAgain = true;\n while (shouldCheckAgain) {\n const pids = await getChildrenPidsAsync([...children]);\n shouldCheckAgain = false;\n for (const pid of pids) {\n if (!children.has(pid)) {\n shouldCheckAgain = true;\n children.add(pid);\n }\n }\n }\n return [...children];\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/build-tools",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -61,5 +61,5 @@
61
61
  "node": "18.13.0",
62
62
  "yarn": "1.22.19"
63
63
  },
64
- "gitHead": "70bc03aa69788a3df0caee2174dfbaf8bc8af5f9"
64
+ "gitHead": "ea62cd92782b0c5cb5cee6ec9cd4341c7bcb78a0"
65
65
  }