@outlit/cli 3.2.0 → 3.2.1
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 +40 -16
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -104,7 +104,7 @@ var package_default;
|
|
|
104
104
|
var init_package = __esm(() => {
|
|
105
105
|
package_default = {
|
|
106
106
|
name: "@outlit/cli",
|
|
107
|
-
version: "3.2.
|
|
107
|
+
version: "3.2.1",
|
|
108
108
|
description: "CLI for querying Outlit customer context and installing agent skills",
|
|
109
109
|
license: "Apache-2.0",
|
|
110
110
|
repository: {
|
|
@@ -147,7 +147,7 @@ var init_package = __esm(() => {
|
|
|
147
147
|
},
|
|
148
148
|
dependencies: {
|
|
149
149
|
"@clack/prompts": "^1.0.1",
|
|
150
|
-
"@outlit/tools": "^2.2.
|
|
150
|
+
"@outlit/tools": "^2.2.1",
|
|
151
151
|
citty: "^0.2.1"
|
|
152
152
|
},
|
|
153
153
|
devDependencies: {
|
|
@@ -15776,6 +15776,7 @@ Returns column definitions and example queries for each view.`,
|
|
|
15776
15776
|
"TOOL_BINDING_MISSING",
|
|
15777
15777
|
"TOOL_IMPLEMENTATION_ERROR",
|
|
15778
15778
|
"TOOL_OUTPUT_INVALID",
|
|
15779
|
+
"TOOL_RESOURCE_NOT_FOUND",
|
|
15779
15780
|
"TOOL_RESULT_TOO_LARGE",
|
|
15780
15781
|
"TOOL_GATEWAY_ERROR",
|
|
15781
15782
|
"plan_api_limit_exceeded",
|
|
@@ -19251,6 +19252,13 @@ function readCommandOutput2(command, args) {
|
|
|
19251
19252
|
return null;
|
|
19252
19253
|
}
|
|
19253
19254
|
}
|
|
19255
|
+
function isStandaloneInstall(argv = process.argv) {
|
|
19256
|
+
const scriptPath = argv[1];
|
|
19257
|
+
if (!scriptPath)
|
|
19258
|
+
return true;
|
|
19259
|
+
const resolved = safeRealPath2(scriptPath) ?? scriptPath;
|
|
19260
|
+
return !/\.(?:cjs|mjs|jsx?|tsx?)$/.test(resolved);
|
|
19261
|
+
}
|
|
19254
19262
|
function inferInstaller2() {
|
|
19255
19263
|
const fromAgent = inferInstallerFromUserAgent2(process.env.npm_config_user_agent ?? "");
|
|
19256
19264
|
if (fromAgent)
|
|
@@ -19326,8 +19334,9 @@ async function fetchLatestCliVersion2() {
|
|
|
19326
19334
|
throw new Error("registry returned no version");
|
|
19327
19335
|
return data.version;
|
|
19328
19336
|
}
|
|
19329
|
-
function runUpgradeCommand(command) {
|
|
19330
|
-
const
|
|
19337
|
+
function runUpgradeCommand(command, opts) {
|
|
19338
|
+
const stdio = opts?.stdoutToStderr ? ["ignore", process.stderr, process.stderr] : "inherit";
|
|
19339
|
+
const result = spawnSync2(command.command, command.args, { stdio });
|
|
19331
19340
|
if (result.error)
|
|
19332
19341
|
throw result.error;
|
|
19333
19342
|
if (result.status !== 0 || result.signal) {
|
|
@@ -19946,9 +19955,10 @@ var exports_upgrade = {};
|
|
|
19946
19955
|
__export(exports_upgrade, {
|
|
19947
19956
|
default: () => upgrade_default
|
|
19948
19957
|
});
|
|
19949
|
-
var upgrade_default;
|
|
19958
|
+
var STANDALONE_UPDATE_HINT = "re-run your original install method (for example `curl -fsSL https://outlit.ai/install.sh | bash` or `brew upgrade outlitai/tap/outlit`), or download the latest release from https://github.com/OutlitAI/outlit-sdk/releases", upgrade_default;
|
|
19950
19959
|
var init_upgrade = __esm(() => {
|
|
19951
19960
|
init_dist();
|
|
19961
|
+
init_output2();
|
|
19952
19962
|
init_config();
|
|
19953
19963
|
init_output();
|
|
19954
19964
|
init_update2();
|
|
@@ -19960,20 +19970,16 @@ var init_upgrade = __esm(() => {
|
|
|
19960
19970
|
"",
|
|
19961
19971
|
"Checks npm for the latest published version first.",
|
|
19962
19972
|
"If the current version is already latest, no install command is run.",
|
|
19973
|
+
"Standalone binaries cannot self-update; they get manual-update guidance instead.",
|
|
19963
19974
|
"",
|
|
19964
19975
|
"Examples:",
|
|
19965
19976
|
" outlit upgrade"
|
|
19966
19977
|
].join(`
|
|
19967
19978
|
`)
|
|
19968
19979
|
},
|
|
19969
|
-
|
|
19970
|
-
|
|
19971
|
-
|
|
19972
|
-
return outputError({
|
|
19973
|
-
message: "Could not determine how Outlit CLI was installed. Update it manually with your package manager, for example `bun add -g @outlit/cli` or `npm install -g @outlit/cli`.",
|
|
19974
|
-
code: "unknown_installer"
|
|
19975
|
-
}, false);
|
|
19976
|
-
}
|
|
19980
|
+
args: { ...outputArgs },
|
|
19981
|
+
async run({ args }) {
|
|
19982
|
+
const json = !!args.json;
|
|
19977
19983
|
let latestVersion;
|
|
19978
19984
|
try {
|
|
19979
19985
|
latestVersion = await fetchLatestCliVersion2();
|
|
@@ -19981,20 +19987,38 @@ var init_upgrade = __esm(() => {
|
|
|
19981
19987
|
return outputError({
|
|
19982
19988
|
message: "Could not check for CLI updates. Try again later or update manually.",
|
|
19983
19989
|
code: "update_check_failed"
|
|
19984
|
-
},
|
|
19990
|
+
}, json);
|
|
19985
19991
|
}
|
|
19986
19992
|
if (compareVersions2(CLI_VERSION2, latestVersion) >= 0) {
|
|
19993
|
+
const result2 = { status: "current", currentVersion: CLI_VERSION2, latestVersion };
|
|
19994
|
+
if (isJsonMode(json))
|
|
19995
|
+
return outputResult(result2);
|
|
19987
19996
|
console.log(`Outlit CLI is already up to date (v${CLI_VERSION2})`);
|
|
19988
19997
|
return;
|
|
19989
19998
|
}
|
|
19999
|
+
const standalone = isStandaloneInstall();
|
|
20000
|
+
const upgradeCommand = standalone ? null : getUpgradeCommand();
|
|
20001
|
+
if (!upgradeCommand) {
|
|
20002
|
+
const message = standalone ? `Outlit CLI v${latestVersion} is available. This standalone binary cannot update itself — ${STANDALONE_UPDATE_HINT}.` : `Outlit CLI v${latestVersion} is available. Could not determine how Outlit CLI was installed. Update it manually with your package manager, for example \`bun add -g @outlit/cli\` or \`npm install -g @outlit/cli\`.`;
|
|
20003
|
+
return outputError({ message, code: standalone ? "manual_update_required" : "unknown_installer" }, json);
|
|
20004
|
+
}
|
|
19990
20005
|
try {
|
|
19991
|
-
runUpgradeCommand(upgradeCommand);
|
|
20006
|
+
runUpgradeCommand(upgradeCommand, { stdoutToStderr: isJsonMode(json) });
|
|
19992
20007
|
} catch (err) {
|
|
19993
20008
|
return outputError({
|
|
19994
20009
|
message: errorMessage(err, `Failed to run ${upgradeCommand.displayCommand}`),
|
|
19995
20010
|
code: "upgrade_failed"
|
|
19996
|
-
},
|
|
20011
|
+
}, json);
|
|
19997
20012
|
}
|
|
20013
|
+
const result = {
|
|
20014
|
+
status: "updated",
|
|
20015
|
+
currentVersion: CLI_VERSION2,
|
|
20016
|
+
latestVersion,
|
|
20017
|
+
command: upgradeCommand.displayCommand
|
|
20018
|
+
};
|
|
20019
|
+
if (isJsonMode(json))
|
|
20020
|
+
return outputResult(result);
|
|
20021
|
+
console.log(`Updated Outlit CLI to v${latestVersion}`);
|
|
19998
20022
|
}
|
|
19999
20023
|
});
|
|
20000
20024
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@outlit/cli",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "CLI for querying Outlit customer context and installing agent skills",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@clack/prompts": "^1.0.1",
|
|
46
|
-
"@outlit/tools": "^2.2.
|
|
46
|
+
"@outlit/tools": "^2.2.1",
|
|
47
47
|
"citty": "^0.2.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|