niuma-codex 0.0.1-beta.11 → 0.0.1-beta.12
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/dist/cli.js +19 -7
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -6797,7 +6797,7 @@ var init_src = __esm({
|
|
|
6797
6797
|
// apps/desktop/src/release-version.ts
|
|
6798
6798
|
import { readFileSync } from "node:fs";
|
|
6799
6799
|
function desktopReleaseVersion() {
|
|
6800
|
-
return false ? null : "0.0.1-beta.
|
|
6800
|
+
return false ? null : "0.0.1-beta.12";
|
|
6801
6801
|
}
|
|
6802
6802
|
function desktopPresenceVersion() {
|
|
6803
6803
|
return desktopReleaseVersion() ?? sourcePresenceVersion;
|
|
@@ -17431,12 +17431,24 @@ async function installRelease(options) {
|
|
|
17431
17431
|
const manifest = JSON.parse(await fs14.readFile(path19.join(pkg, "package.json"), "utf8"));
|
|
17432
17432
|
if (manifest.name !== "niuma-codex" || manifest.version !== options.version) throw Error("version");
|
|
17433
17433
|
if (!(await fs14.lstat(entry(dir))).isFile()) throw Error("entry");
|
|
17434
|
-
|
|
17435
|
-
|
|
17436
|
-
|
|
17437
|
-
|
|
17438
|
-
|
|
17439
|
-
|
|
17434
|
+
const probe = path19.join(pkg, `.verify-${randomUUID10()}.mjs`);
|
|
17435
|
+
await fs14.writeFile(probe, `
|
|
17436
|
+
import { createRequire } from 'node:module';
|
|
17437
|
+
import { access } from 'node:fs/promises';
|
|
17438
|
+
import { fileURLToPath } from 'node:url';
|
|
17439
|
+
const require = createRequire(import.meta.url);
|
|
17440
|
+
const manifest = require('./package.json');
|
|
17441
|
+
for (const name of Object.keys(manifest.dependencies || {})) {
|
|
17442
|
+
await access(fileURLToPath(import.meta.resolve(name)));
|
|
17443
|
+
}
|
|
17444
|
+
// sharp \u4ECD\u987B\u5B9E\u9645\u52A0\u8F7D\uFF1B\u5176\u4F59\u670D\u52A1\u7AEF\u5BFC\u5165\u94FE\u7531 CLI \u5E2E\u52A9\u9A8C\u8BC1\u3002
|
|
17445
|
+
if (manifest.dependencies?.sharp) require('sharp');
|
|
17446
|
+
`, { flag: "wx", mode: 384 });
|
|
17447
|
+
try {
|
|
17448
|
+
await options.run(options.node, [probe], 3e4);
|
|
17449
|
+
} finally {
|
|
17450
|
+
await fs14.rm(probe, { force: true });
|
|
17451
|
+
}
|
|
17440
17452
|
await options.run(options.node, [entry(dir), "--help"], 3e4);
|
|
17441
17453
|
}
|
|
17442
17454
|
let exists = false;
|