refactor: rename CLI command 'inkreach' -> 'inkreach-teable'
Rename the command (and its config namespace) to match the project name: - bin: inkreach -> inkreach-teable - program name: inkreach -> inkreach-teable - config dir: ~/.inkreach/ -> ~/.inkreach-teable/ - env vars: INKREACH_* -> INKREACH_TEABLE_* - all docs (SKILL.md, guides, api-reference, AGENTS.md, design doc, install.sh) Unchanged (intentional): - npm package name: @inkreach/teable-cli - package directory: packages/inkreach-cli/ - skill name: inkreach-teable-ops - organization/authors: 'inkreach' (npm scope @inkreach) Existing config auto-migrated (~/.inkreach -> ~/.inkreach-teable). Verified end-to-end: auth status, workflow list (636), build clean.
This commit is contained in:
Vendored
+7
-7
@@ -25,16 +25,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.configPath = exports.resolveConfig = exports.writeConfigFile = exports.readConfigFile = exports.DEFAULT_ENDPOINT = void 0;
|
||||
/**
|
||||
* Config storage for inkreach CLI.
|
||||
* Config storage for inkreach-teable CLI.
|
||||
*
|
||||
* Stores endpoint + token at ~/.inkreach/config.json, with environment variable
|
||||
* overrides INKREACH_ENDPOINT / INKREACH_TOKEN. The --endpoint / --token / --base-id
|
||||
* Stores endpoint + token at ~/.inkreach-teable/config.json, with environment variable
|
||||
* overrides INKREACH_TEABLE_ENDPOINT / INKREACH_TEABLE_TOKEN. The --endpoint / --token / --base-id
|
||||
* global flags take the highest precedence (handled by resolveOptions()).
|
||||
*/
|
||||
const fs = __importStar(require("node:fs"));
|
||||
const path = __importStar(require("node:path"));
|
||||
const os = __importStar(require("node:os"));
|
||||
const CONFIG_DIR = path.join(os.homedir(), '.inkreach');
|
||||
const CONFIG_DIR = path.join(os.homedir(), '.inkreach-teable');
|
||||
const CONFIG_FILE = path.join(CONFIG_DIR, 'config.json');
|
||||
exports.DEFAULT_ENDPOINT = 'http://localhost:3000';
|
||||
function readConfigFile() {
|
||||
@@ -59,11 +59,11 @@ function resolveConfig(overrides) {
|
||||
const file = readConfigFile();
|
||||
return {
|
||||
endpoint: overrides?.endpoint ||
|
||||
process.env.INKREACH_ENDPOINT ||
|
||||
process.env.INKREACH_TEABLE_ENDPOINT ||
|
||||
file.endpoint ||
|
||||
exports.DEFAULT_ENDPOINT,
|
||||
token: overrides?.token || process.env.INKREACH_TOKEN || file.token || '',
|
||||
baseId: overrides?.baseId || process.env.INKREACH_BASE_ID || file.baseId,
|
||||
token: overrides?.token || process.env.INKREACH_TEABLE_TOKEN || file.token || '',
|
||||
baseId: overrides?.baseId || process.env.INKREACH_TEABLE_BASE_ID || file.baseId,
|
||||
};
|
||||
}
|
||||
exports.resolveConfig = resolveConfig;
|
||||
|
||||
Vendored
+1
-1
@@ -65,7 +65,7 @@ function findRoot(cmd) {
|
||||
function requireBaseId(ctx, flagVal) {
|
||||
const baseId = flagVal || ctx.baseId;
|
||||
if (!baseId) {
|
||||
throw new client_1.ApiError(0, 'MISSING_BASE_ID', 'No base id. Pass --base-id <id>, set a default with `inkreach auth login --base-id <id>`, or export INKREACH_BASE_ID.');
|
||||
throw new client_1.ApiError(0, 'MISSING_BASE_ID', 'No base id. Pass --base-id <id>, set a default with `inkreach-teable auth login --base-id <id>`, or export INKREACH_TEABLE_BASE_ID.');
|
||||
}
|
||||
return baseId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user