monowalk 1.1.1 → 1.1.2-c

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.
@@ -83,4 +83,4 @@ function out(_a) {
83
83
  });
84
84
  });
85
85
  }
86
- exports.description = "Build targer project into a single JavaScript file";
86
+ exports.description = "Build target project into a single JavaScript file";
@@ -1,6 +1,35 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
2
14
  Object.defineProperty(exports, "__esModule", { value: true });
3
15
  exports.description = void 0;
4
16
  exports.default = to;
5
- function to() { }
17
+ const select_1 = __importDefault(require("@inquirer/select"));
18
+ const config_1 = require("../utils/config");
19
+ const path_1 = __importDefault(require("path"));
20
+ const folder_1 = require("../utils/folder");
21
+ function to() {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ console.log("Your projects:");
24
+ let { content } = (0, config_1.findNearestConfigPath)();
25
+ let res = yield (0, select_1.default)({
26
+ message: "Select a project to open in Visual Studio Code:",
27
+ choices: Object.keys(content.projects || {}),
28
+ });
29
+ let projectPath = content.projects[res];
30
+ let fullPath = path_1.default.join(process.cwd(), projectPath.replace("./", ""));
31
+ (0, folder_1.loadFolder)(fullPath);
32
+ console.log(`Opened project "${res}" in Visual Studio Code.`);
33
+ });
34
+ }
6
35
  exports.description = "Load a project in visual studio code";
@@ -33,7 +33,7 @@ function findNearestConfigPath(iterations = 3) {
33
33
  }
34
34
  configPath = configExists(workingDir);
35
35
  if (!found || !configPath) {
36
- throw new Error("No monowalk.config.js found in any parent directory.");
36
+ throw new Error("No .monowalkrc found in any parent directory. Use 'monowalk init' to create one.");
37
37
  }
38
38
  let content = JSON.parse(fs_1.default.readFileSync(configPath, "utf-8"));
39
39
  return { content, configPath };
@@ -57,7 +57,7 @@ function getCommands() {
57
57
  commands.push({
58
58
  exec: command,
59
59
  description: description,
60
- name: file.replace(".ts", ""),
60
+ name: file.replace(".ts", "").replace(".js", ""),
61
61
  });
62
62
  }
63
63
  return commands;
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "dependencies": {
3
3
  "@inquirer/input": "^5.0.4",
4
+ "@inquirer/select": "^5.0.4",
4
5
  "esbuild": "^0.27.2"
5
6
  },
6
7
  "devDependencies": {
@@ -8,7 +9,7 @@
8
9
  "typescript": "^5.9.3"
9
10
  },
10
11
  "name": "monowalk",
11
- "type": "module",
12
+ "type": "commonjs",
12
13
  "module": "bin/cli.js",
13
14
  "bin": {
14
15
  "monowalk": "bin/cli.js",
@@ -26,8 +27,18 @@
26
27
  "type": "github",
27
28
  "url": "git+https://github.com/nekoniyah/monowalk.git"
28
29
  },
29
- "version": "1.1.1",
30
+ "version": "1.1.2-c",
30
31
  "scripts": {
31
32
  "prepublish": "tsc"
32
- }
33
+ },
34
+ "keywords": [
35
+ "cli",
36
+ "management",
37
+ "monorepo",
38
+ "qol",
39
+ "utilities",
40
+ "console",
41
+ "vscode",
42
+ "visual studio code"
43
+ ]
33
44
  }