notion-github 0.1.0 → 0.1.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/dist/cli.cjs ADDED
@@ -0,0 +1,66 @@
1
+ #!/usr/bin/env node
2
+ #!/usr/bin/env node
3
+ "use strict";
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
19
+ // If the importer is in node compatibility mode or this is not an ESM
20
+ // file that has been converted to a CommonJS file using a Babel-
21
+ // compatible transform (i.e. "__esModule" has not been set), then set
22
+ // "default" to the CommonJS "module.exports" for node compatibility.
23
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
24
+ mod
25
+ ));
26
+
27
+ // src/cli.ts
28
+ var import_commander = require("commander");
29
+
30
+ // src/commands/create.ts
31
+ var import_ora = __toESM(require("ora"));
32
+ async function create(options) {
33
+ const spinner = (0, import_ora.default)("Creating PR...").start();
34
+ try {
35
+ spinner.text = "Validating inputs...";
36
+ spinner.text = "Creating PR...";
37
+ spinner.succeed("PR created successfully!");
38
+ } catch (error) {
39
+ spinner.fail(`Failed to create PR: ${error.message}`);
40
+ process.exit(1);
41
+ }
42
+ }
43
+
44
+ // src/commands/read.ts
45
+ function read(options) {
46
+ console.log("Read command called with:", options);
47
+ }
48
+
49
+ // src/commands/update.ts
50
+ function update(options) {
51
+ console.log("Update command called with:", options);
52
+ }
53
+
54
+ // src/commands/remove.ts
55
+ function remove(options) {
56
+ console.log("Delete command called with:", options);
57
+ }
58
+
59
+ // src/cli.ts
60
+ var program = new import_commander.Command();
61
+ program.name("pr-cli").description("CLI for managing PRs").version("0.2.0");
62
+ program.command("create").description("Create a new PR").requiredOption("--title <title>", "PR title").option("--description <description>", "PR description").option("--branch <branch>", "Target branch", "main").action(create);
63
+ program.command("read").description("Read PR information").requiredOption("--id <id>", "PR ID").action(read);
64
+ program.command("update").description("Update an existing PR").requiredOption("--id <id>", "PR ID").option("--title <title>", "New PR title").option("--description <description>", "New PR description").action(update);
65
+ program.command("delete").description("Delete a PR").requiredOption("--id <id>", "PR ID").option("--force", "Force deletion", false).action(remove);
66
+ program.parse();
package/dist/cli.d.mts ADDED
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
package/dist/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
package/dist/cli.esm ADDED
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env node
2
+ #!/usr/bin/env node
3
+
4
+ // src/cli.ts
5
+ import { Command } from "commander";
6
+
7
+ // src/commands/create.ts
8
+ import ora from "ora";
9
+ async function create(options) {
10
+ const spinner = ora("Creating PR...").start();
11
+ try {
12
+ spinner.text = "Validating inputs...";
13
+ spinner.text = "Creating PR...";
14
+ spinner.succeed("PR created successfully!");
15
+ } catch (error) {
16
+ spinner.fail(`Failed to create PR: ${error.message}`);
17
+ process.exit(1);
18
+ }
19
+ }
20
+
21
+ // src/commands/read.ts
22
+ function read(options) {
23
+ console.log("Read command called with:", options);
24
+ }
25
+
26
+ // src/commands/update.ts
27
+ function update(options) {
28
+ console.log("Update command called with:", options);
29
+ }
30
+
31
+ // src/commands/remove.ts
32
+ function remove(options) {
33
+ console.log("Delete command called with:", options);
34
+ }
35
+
36
+ // src/cli.ts
37
+ var program = new Command();
38
+ program.name("pr-cli").description("CLI for managing PRs").version("0.2.0");
39
+ program.command("create").description("Create a new PR").requiredOption("--title <title>", "PR title").option("--description <description>", "PR description").option("--branch <branch>", "Target branch", "main").action(create);
40
+ program.command("read").description("Read PR information").requiredOption("--id <id>", "PR ID").action(read);
41
+ program.command("update").description("Update an existing PR").requiredOption("--id <id>", "PR ID").option("--title <title>", "New PR title").option("--description <description>", "New PR description").action(update);
42
+ program.command("delete").description("Delete a PR").requiredOption("--id <id>", "PR ID").option("--force", "Force deletion", false).action(remove);
43
+ program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notion-github",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "GitHub and Notion integration for PR automation",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -10,7 +10,8 @@
10
10
  ],
11
11
  "scripts": {
12
12
  "build": "tsup",
13
- "upload": "tsup && npm publish"
13
+ "upload": "tsup && npm publish",
14
+ "lint": "tsc"
14
15
  },
15
16
  "engines": {
16
17
  "node": ">=16"
@@ -22,11 +23,13 @@
22
23
  "typescript": "^5.0.0"
23
24
  },
24
25
  "dependencies": {
26
+ "@changesets/cli": "^2.27.11",
25
27
  "@notionhq/client": "^2.0.0",
26
28
  "@octokit/rest": "^19.0.0",
27
- "commander": "^11.0.0"
29
+ "commander": "^11.0.0",
30
+ "ora": "^8.1.1"
28
31
  },
29
32
  "bin": {
30
- "pr-cli": "dist/cli.cjs"
33
+ "pr-cli": "dist/cli.js"
31
34
  }
32
35
  }