@officexapp/catalogs-cli 0.2.1 → 0.2.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/index.js +5 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
4
|
import { Command } from "commander";
|
|
5
|
-
import {
|
|
5
|
+
import { readFileSync as readFileSync5 } from "fs";
|
|
6
|
+
import { fileURLToPath } from "url";
|
|
7
|
+
import { dirname as dirname3, join as join3 } from "path";
|
|
6
8
|
|
|
7
9
|
// src/config.ts
|
|
8
10
|
var DEFAULT_API_URL = "https://api.catalogkit.cc";
|
|
@@ -1128,8 +1130,8 @@ async function whoami() {
|
|
|
1128
1130
|
}
|
|
1129
1131
|
|
|
1130
1132
|
// src/index.ts
|
|
1131
|
-
var
|
|
1132
|
-
var { version } =
|
|
1133
|
+
var __dirname = dirname3(fileURLToPath(import.meta.url));
|
|
1134
|
+
var { version } = JSON.parse(readFileSync5(join3(__dirname, "../package.json"), "utf-8"));
|
|
1133
1135
|
var program = new Command();
|
|
1134
1136
|
program.name("catalogs").description("CLI for Catalog Kit \u2014 upload videos, push catalogs, manage assets").version(version).option("--token <token>", "Auth token (overrides CATALOG_KIT_TOKEN env var)").hook("preAction", (thisCommand) => {
|
|
1135
1137
|
const opts = thisCommand.opts();
|