@vention/vention-cli 0.11.0 → 0.11.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/cli.esm.js +12 -10
- package/package.json +4 -1
package/cli.esm.js
CHANGED
|
@@ -6,7 +6,7 @@ import fs, { promises, realpathSync } from 'fs';
|
|
|
6
6
|
import path from 'path';
|
|
7
7
|
import { exec } from 'child_process';
|
|
8
8
|
import http from 'http';
|
|
9
|
-
import { URLSearchParams } from 'url';
|
|
9
|
+
import { URLSearchParams, fileURLToPath } from 'url';
|
|
10
10
|
import { once } from 'events';
|
|
11
11
|
import crypto from 'crypto';
|
|
12
12
|
import { z } from 'zod';
|
|
@@ -386,7 +386,7 @@ const createFileSystemFromJson = async (fileSystemNode, targetDirectory) => {
|
|
|
386
386
|
const decodedContent = Buffer.from(contentOrNode, "base64");
|
|
387
387
|
const fileHandle = await fs.promises.open(fullPath, "w");
|
|
388
388
|
try {
|
|
389
|
-
await fileHandle.writeFile(decodedContent);
|
|
389
|
+
await fileHandle.writeFile(new Uint8Array(decodedContent));
|
|
390
390
|
await fileHandle.sync();
|
|
391
391
|
}
|
|
392
392
|
finally {
|
|
@@ -400,12 +400,14 @@ const createFileSystemFromJson = async (fileSystemNode, targetDirectory) => {
|
|
|
400
400
|
}
|
|
401
401
|
};
|
|
402
402
|
await writeFiles(fileSystemNode, targetDirectory);
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
403
|
+
if (process.platform !== "win32") {
|
|
404
|
+
const dirHandle = await fs.promises.open(targetDirectory, "r");
|
|
405
|
+
try {
|
|
406
|
+
await dirHandle.sync();
|
|
407
|
+
}
|
|
408
|
+
finally {
|
|
409
|
+
await dirHandle.close();
|
|
410
|
+
}
|
|
409
411
|
}
|
|
410
412
|
};
|
|
411
413
|
const ensureDirectoryExists = async (directory) => {
|
|
@@ -741,8 +743,8 @@ program
|
|
|
741
743
|
}
|
|
742
744
|
});
|
|
743
745
|
const resolvedArgv = realpathSync(process.argv[1]);
|
|
744
|
-
const
|
|
745
|
-
if (resolvedArgv ===
|
|
746
|
+
const resolvedUrlPath = realpathSync(fileURLToPath(import.meta.url));
|
|
747
|
+
if (resolvedArgv === resolvedUrlPath) {
|
|
746
748
|
const showLogoConditions = [process.argv.length <= 2, process.argv.includes("--help"), process.argv.includes("-h")];
|
|
747
749
|
if (showLogoConditions.some(Boolean)) {
|
|
748
750
|
console.log(chalk.cyan(ventionLogo));
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vention/vention-cli",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"description": "CLI tool for Vention applications",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=18.0.0"
|
|
8
|
+
},
|
|
6
9
|
"repository": {
|
|
7
10
|
"type": "git",
|
|
8
11
|
"url": "https://github.com/VentionCo/machine-cloud.git"
|