flowstride 1.0.16 → 1.0.18
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/commands/init.js +7 -2
- package/dist/cli/index.js +5 -14
- package/package.json +1 -1
|
@@ -46,17 +46,22 @@ const ora_1 = __importDefault(require("ora"));
|
|
|
46
46
|
const execAsync = (0, util_1.promisify)(child_process_1.exec);
|
|
47
47
|
async function initAction() {
|
|
48
48
|
const root = process.cwd();
|
|
49
|
-
|
|
49
|
+
// Added 'manual_flows' to strictly isolate manual test designs
|
|
50
|
+
const folders = ["flows", "manual_flows", "reports", "plugins", "fixtures"];
|
|
50
51
|
const sampleFlowPath = path.join(root, "flows", "example.flow");
|
|
51
52
|
const fixturesReadmePath = path.join(root, "fixtures", "README.md");
|
|
52
53
|
const gitignorePath = path.join(root, ".gitignore");
|
|
53
|
-
console.log("\n[Info]
|
|
54
|
+
console.log("\n[Info] Initialising new workspace...");
|
|
54
55
|
// 1. Create Directories
|
|
55
56
|
folders.forEach((folder) => {
|
|
56
57
|
const dirPath = path.join(root, folder);
|
|
57
58
|
if (!fs.existsSync(dirPath)) {
|
|
58
59
|
fs.mkdirSync(dirPath);
|
|
59
60
|
console.log(`[OK] Created directory: ${folder}/`);
|
|
61
|
+
// Securely ensure the manual_flows directory is strictly tracked by Git even when empty
|
|
62
|
+
if (folder === "manual_flows") {
|
|
63
|
+
fs.writeFileSync(path.join(dirPath, ".gitkeep"), "");
|
|
64
|
+
}
|
|
60
65
|
}
|
|
61
66
|
else {
|
|
62
67
|
console.log(`[Info] Directory already exists: ${folder}/`);
|
package/dist/cli/index.js
CHANGED
|
@@ -44,7 +44,6 @@ const init_1 = require("./commands/init");
|
|
|
44
44
|
const fs = __importStar(require("fs"));
|
|
45
45
|
const path = __importStar(require("path"));
|
|
46
46
|
const os = __importStar(require("os"));
|
|
47
|
-
const tar = __importStar(require("tar"));
|
|
48
47
|
const child_process_1 = require("child_process");
|
|
49
48
|
const prompts_1 = require("@inquirer/prompts");
|
|
50
49
|
const chalk_1 = __importDefault(require("chalk"));
|
|
@@ -54,7 +53,7 @@ const API_BASE = process.env.FLOWSTRIDE_API_URL || "https://cloud.flowstride.io"
|
|
|
54
53
|
program
|
|
55
54
|
.name("flowstride")
|
|
56
55
|
.description("Flowstride: The Enterprise Flow-First Automation CLI")
|
|
57
|
-
.version("1.0.
|
|
56
|
+
.version("1.0.18");
|
|
58
57
|
program
|
|
59
58
|
.command("init")
|
|
60
59
|
.description("Initialise a new Flowstride workspace in the current directory")
|
|
@@ -155,19 +154,11 @@ program
|
|
|
155
154
|
}
|
|
156
155
|
const buffer = await tarballResponse.arrayBuffer();
|
|
157
156
|
fs.writeFileSync(tarballPath, Buffer.from(buffer));
|
|
158
|
-
installSpinner.text = "Silently extracting Enterprise Engine...";
|
|
159
|
-
installSpinner.color = "cyan";
|
|
160
|
-
if (!fs.existsSync(nodeModulesPath)) {
|
|
161
|
-
fs.mkdirSync(nodeModulesPath, { recursive: true });
|
|
162
|
-
}
|
|
163
|
-
await tar.x({
|
|
164
|
-
file: tarballPath,
|
|
165
|
-
cwd: nodeModulesPath,
|
|
166
|
-
strip: 1,
|
|
167
|
-
});
|
|
168
157
|
installSpinner.text = "Wiring up Enterprise dependencies...";
|
|
169
|
-
|
|
170
|
-
|
|
158
|
+
installSpinner.color = "cyan";
|
|
159
|
+
// Let npm natively handle the extraction and binary symlinking
|
|
160
|
+
(0, child_process_1.execSync)(`npm install "${tarballPath}" --no-save`, {
|
|
161
|
+
cwd: process.cwd(),
|
|
171
162
|
stdio: "ignore",
|
|
172
163
|
});
|
|
173
164
|
installSpinner.succeed(chalk_1.default.green("Enterprise Engine installed successfully!"));
|