expo-desktop 0.1.7 → 0.1.8
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.
|
@@ -3,6 +3,7 @@ import fs from "node:fs/promises";
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { env } from "node:process";
|
|
5
5
|
import readline from "node:readline";
|
|
6
|
+
import { stripVTControlCharacters } from "node:util";
|
|
6
7
|
/**
|
|
7
8
|
* Clack {@link Task} that runs a subprocess; piped stdout/stderr lines are sent
|
|
8
9
|
* through the task `message` callback (not `log.message`). Lines are also kept in
|
|
@@ -74,7 +75,7 @@ function runPromisifiedSpawn({ command, args, options, logLine, debugLogDir, })
|
|
|
74
75
|
try {
|
|
75
76
|
await fs.mkdir(logDir, { recursive: true });
|
|
76
77
|
const body = lineBuffer.length > 0
|
|
77
|
-
? lineBuffer.join("\n")
|
|
78
|
+
? lineBuffer.map((line) => stripVTControlCharacters(line)).join("\n")
|
|
78
79
|
: "(no stdout/stderr lines were captured; streams may have been inherited or ignored.)";
|
|
79
80
|
await fs.writeFile(absPath, `${header}${body}\n`, "utf-8");
|
|
80
81
|
wrotePath = absPath;
|
|
@@ -77,10 +77,14 @@ export async function createExpoDesktopApp({ name, packageManager, versions, })
|
|
|
77
77
|
}
|
|
78
78
|
async function createExpoApp({ name, packageManager, versions, }) {
|
|
79
79
|
const command = packageManager;
|
|
80
|
+
// npm treats flags after `npm create <pkg> <name>` as its own unless we use
|
|
81
|
+
// `--`; otherwise e.g. `--template` is dropped and the template string becomes
|
|
82
|
+
// a bogus positional arg (create-expo-app then fails inside `npm pack`).
|
|
80
83
|
const args = [
|
|
81
84
|
"create",
|
|
82
85
|
"expo-app",
|
|
83
86
|
name.filesafeName,
|
|
87
|
+
...(packageManager === "npm" ? ["--"] : []),
|
|
84
88
|
"--template",
|
|
85
89
|
`blank-typescript@${versions.expoBlankTypeScript}`,
|
|
86
90
|
"--no-install",
|