@teardown/cli 1.1.0-beta-04

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 ADDED
@@ -0,0 +1,15 @@
1
+ # @teardown/cli
2
+
3
+ To install dependencies:
4
+
5
+ ```bash
6
+ bun install
7
+ ```
8
+
9
+ To run:
10
+
11
+ ```bash
12
+ bun run index.ts
13
+ ```
14
+
15
+ This project was created using `bun init` in bun v1.1.18. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ const commander_1 = require("commander");
27
+ const program = new commander_1.Command();
28
+ program
29
+ .name("Teardown CLI")
30
+ .description("CLI to use the Teardown")
31
+ .version("0.0.1");
32
+ program
33
+ .command("init")
34
+ .description("Initialize Teardown in the current project")
35
+ .action(async () => {
36
+ const project = await Promise.resolve().then(() => __importStar(require("./init-teardown")));
37
+ await new project.InitTeardown({
38
+ projectName: "example ",
39
+ }).init();
40
+ });
41
+ program.parse();
@@ -0,0 +1,9 @@
1
+ export type InitTeardownOptions = {
2
+ projectName: string;
3
+ };
4
+ export declare class InitTeardown {
5
+ readonly options: InitTeardownOptions;
6
+ constructor(options: InitTeardownOptions);
7
+ init(): Promise<void>;
8
+ getProjectLocation(): Promise<string>;
9
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InitTeardown = void 0;
4
+ const bun_1 = require("bun");
5
+ class InitTeardown {
6
+ options;
7
+ constructor(options) {
8
+ this.options = options;
9
+ }
10
+ async init() {
11
+ console.log("Initializing Teardown...");
12
+ const projectLocation = await this.getProjectLocation();
13
+ console.log(projectLocation);
14
+ }
15
+ async getProjectLocation() {
16
+ try {
17
+ const projectLocation = await (0, bun_1.$) `pwd`;
18
+ return projectLocation.text().trim();
19
+ }
20
+ catch (error) {
21
+ console.error("Error getting project location:", error);
22
+ throw error;
23
+ }
24
+ }
25
+ }
26
+ exports.InitTeardown = InitTeardown;
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@teardown/cli",
3
+ "scripts": {
4
+ "prepublishOnly": "bun run build",
5
+ "build": "tsc --declaration",
6
+ "dev": "tsc --declaration --watch"
7
+ },
8
+ "bin": {
9
+ "td": "./dist/index.js",
10
+ "teardown": "./dist/index.js"
11
+ },
12
+ "main": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "files": [
15
+ "README.md",
16
+ "dist/**/*"
17
+ ],
18
+ "dependencies": {
19
+ "@inquirer/prompts": "^7.0.0",
20
+ "bun": "^1.1.30",
21
+ "chalk": "^5.3.0",
22
+ "commander": "^12.1.0"
23
+ },
24
+ "devDependencies": {
25
+ "@types/bun": "latest"
26
+ },
27
+ "peerDependencies": {
28
+ "typescript": "^5.6.3"
29
+ },
30
+ "version": "1.1.0-beta-04"
31
+ }