Files
inkreach-teable-cli/dist/bin.js
T
yeuimu e1d6b03a61 fix: getRecords action page→take/skip + prisma engine fix + CLI fixes
- getRecords automation action: translate page/pageSize to skip/take
  before calling the records API (which ignores page/pageSize, causing
  pagination to always return first 100 records)
- Add postbuild script to restore correct prisma engine binary after
  nest build (which generates an incompatible engine causing SIGSEGV)
- CLI fixes (from earlier commits):
  - deleteRecords: query params instead of JSON body
  - deleteTable: add /base/{baseId} prefix
2026-08-07 16:55:18 +00:00

45 lines
2.0 KiB
JavaScript
Executable File

#!/usr/bin/env node
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* inkreach-teable — CLI for operating inkreach-teable.
*
* Entry point. Sets up the global commander program and mounts command groups.
*/
const commander_1 = require("commander");
const package_json_1 = require("../package.json");
const plugin_1 = require("./commands/plugin");
const auth_1 = require("./commands/auth");
const workflow_1 = require("./commands/workflow");
const resources_1 = require("./commands/resources");
const extras_1 = require("./commands/extras");
const program = new commander_1.Command();
program
.name('inkreach-teable')
.description('Operate inkreach-teable: tables, fields, records, views, and the self-built automation engine (8 triggers + 6 actions).\n' +
'Use --json for machine-readable output (agent parsing).')
.version(`inkreach-teable ${package_json_1.version}`, '-v, --version');
// Global options (highest precedence over config file + env).
program
.option('--endpoint <url>', 'Backend URL (default http://localhost:3000)')
.option('--token <token>', 'Personal Access Token')
.option('--base-id <id>', 'Default base id')
.option('--json', 'Output raw JSON for agent parsing')
.option('--debug', 'Print requests/responses to stderr (verbose)');
// Command groups
program.addCommand((0, auth_1.authCommand)());
program.addCommand((0, plugin_1.pluginCommand)());
for (const c of (0, resources_1.baseResourceCommands)())
program.addCommand(c);
program.addCommand((0, workflow_1.workflowCommand)());
program.addCommand((0, workflow_1.triggerCommand)());
program.addCommand((0, workflow_1.actionCommand)());
program.addCommand((0, extras_1.secretCommand)());
program.addCommand((0, extras_1.runsCommand)());
program.addCommand((0, extras_1.fireCommand)());
program.addCommand((0, extras_1.sqlCommand)());
program.parseAsync(process.argv).catch((err) => {
process.stderr.write(`Fatal: ${err instanceof Error ? err.message : String(err)}\n`);
process.exit(1);
});