create-oss-store 2.1.0 → 2.2.0

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/README.md CHANGED
@@ -7,7 +7,7 @@ Create a new [OSS – OopsSec Store](https://github.com/kOaDT/oss-oopssec-store)
7
7
  ```bash
8
8
  npx create-oss-store my-ctf-lab
9
9
  cd my-ctf-lab
10
- npm run dev
10
+ npm start
11
11
  ```
12
12
 
13
13
  Then open http://localhost:3000 in your browser and start hunting for flags.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-oss-store",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "type": "module",
5
5
  "description": "Create a new OSS – OopsSec Store instance for web security CTF training",
6
6
  "author": "kOaDT",
package/src/index.js CHANGED
@@ -104,6 +104,17 @@ export async function createOssStore(projectName) {
104
104
  process.exit(1);
105
105
  }
106
106
 
107
+ // Build
108
+ const buildSpinner = ora("Building lab...").start();
109
+ try {
110
+ await runCommand("npm", ["run", "build"], targetPath);
111
+ buildSpinner.succeed("Lab is operational");
112
+ } catch (error) {
113
+ seedSpinner.fail("Failed to build lab");
114
+ console.error(chalk.red(error.message));
115
+ process.exit(1);
116
+ }
117
+
107
118
  // Success message
108
119
  console.log();
109
120
  console.log(chalk.green.bold("Setup complete!"));
@@ -111,7 +122,7 @@ export async function createOssStore(projectName) {
111
122
  console.log("To start hunting for flags:");
112
123
  console.log();
113
124
  console.log(chalk.cyan(` cd ${projectName}`));
114
- console.log(chalk.cyan(" npm run dev"));
125
+ console.log(chalk.cyan(" npm start"));
115
126
  console.log();
116
127
  console.log(
117
128
  `Then open ${chalk.underline("http://localhost:3000")} in your browser.`