pinglet-cli 0.1.2 → 0.1.3
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/config.js +10 -1
- package/package.json +1 -1
package/dist/config.js
CHANGED
|
@@ -43,7 +43,16 @@ exports.cliPath = cliPath;
|
|
|
43
43
|
const fs = __importStar(require("fs"));
|
|
44
44
|
const os = __importStar(require("os"));
|
|
45
45
|
const path = __importStar(require("path"));
|
|
46
|
-
|
|
46
|
+
/** package.json의 version — 하드코딩하면 npm version bump와 어긋난다. */
|
|
47
|
+
exports.VERSION = (() => {
|
|
48
|
+
try {
|
|
49
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "package.json"), "utf8"));
|
|
50
|
+
return pkg.version ?? "0.0.0";
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
return "0.0.0";
|
|
54
|
+
}
|
|
55
|
+
})();
|
|
47
56
|
exports.PINGLET_DIR = path.join(os.homedir(), ".pinglet");
|
|
48
57
|
exports.CONFIG_PATH = path.join(exports.PINGLET_DIR, "config.json");
|
|
49
58
|
exports.FEED_PATH = path.join(exports.PINGLET_DIR, "feed.json");
|