notion-github 0.1.9 → 0.1.10
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.js +11 -16
- package/package.json +1 -1
package/dist/cli.js
CHANGED
@@ -2789,7 +2789,7 @@ var {
|
|
2789
2789
|
} = import_index.default;
|
2790
2790
|
|
2791
2791
|
// package.json
|
2792
|
-
var version = "0.1.
|
2792
|
+
var version = "0.1.10";
|
2793
2793
|
|
2794
2794
|
// src/commands/create/action.ts
|
2795
2795
|
var import_rest = require("@octokit/rest");
|
@@ -2797,27 +2797,22 @@ var import_rest = require("@octokit/rest");
|
|
2797
2797
|
// src/utils/config.ts
|
2798
2798
|
var import_fs = __toESM(require("fs"));
|
2799
2799
|
var import_path = __toESM(require("path"));
|
2800
|
-
var import_os = __toESM(require("os"));
|
2801
2800
|
var CONFIG_FILE = "notion_github_config.json";
|
2802
2801
|
function readConfig() {
|
2803
2802
|
try {
|
2803
|
+
const currentDir = process.cwd();
|
2804
|
+
console.log("Current directory:", currentDir);
|
2804
2805
|
const currentDirPath = import_path.default.join(process.cwd(), CONFIG_FILE);
|
2805
|
-
|
2806
|
-
|
2806
|
+
console.log("Looking for config file at:", currentDirPath);
|
2807
|
+
console.log("File exists:", import_fs.default.existsSync(currentDirPath));
|
2807
2808
|
if (import_fs.default.existsSync(currentDirPath)) {
|
2808
|
-
|
2809
|
-
|
2810
|
-
|
2811
|
-
|
2812
|
-
|
2813
|
-
`Config file not found. Please create ${CONFIG_FILE} in your project directory or home directory.`
|
2814
|
-
);
|
2815
|
-
}
|
2816
|
-
const config = JSON.parse(import_fs.default.readFileSync(configPath, "utf8"));
|
2817
|
-
if (!config.githubToken) {
|
2818
|
-
throw new Error("GitHub token not found in config file.");
|
2809
|
+
const config = JSON.parse(import_fs.default.readFileSync(currentDirPath, "utf8"));
|
2810
|
+
if (!config.githubToken) {
|
2811
|
+
throw new Error("GitHub token not found in config file.");
|
2812
|
+
}
|
2813
|
+
return config;
|
2819
2814
|
}
|
2820
|
-
|
2815
|
+
throw new Error(`Config file not found at ${currentDirPath}`);
|
2821
2816
|
} catch (error) {
|
2822
2817
|
if (error instanceof Error) {
|
2823
2818
|
throw new Error(`Failed to read config: ${error.message}`);
|