poe-code 3.0.196 → 3.0.197
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
CHANGED
|
@@ -33494,6 +33494,8 @@ var init_journal = __esm({
|
|
|
33494
33494
|
this.journalPath = journalPath;
|
|
33495
33495
|
this.fs = fs19;
|
|
33496
33496
|
}
|
|
33497
|
+
journalPath;
|
|
33498
|
+
fs;
|
|
33497
33499
|
async init() {
|
|
33498
33500
|
await this.fs.mkdir(dirname2(this.journalPath), { recursive: true });
|
|
33499
33501
|
try {
|
|
@@ -34850,6 +34852,7 @@ var init_ralph = __esm({
|
|
|
34850
34852
|
this.kind = kind;
|
|
34851
34853
|
this.name = "RalphWorkflowStopError";
|
|
34852
34854
|
}
|
|
34855
|
+
kind;
|
|
34853
34856
|
};
|
|
34854
34857
|
}
|
|
34855
34858
|
});
|
|
@@ -35804,6 +35807,7 @@ var init_types6 = __esm({
|
|
|
35804
35807
|
this.code = code;
|
|
35805
35808
|
this.name = "ToolError";
|
|
35806
35809
|
}
|
|
35810
|
+
code;
|
|
35807
35811
|
};
|
|
35808
35812
|
}
|
|
35809
35813
|
});
|
|
@@ -35979,6 +35983,8 @@ var init_image = __esm({
|
|
|
35979
35983
|
this.base64Data = base64Data;
|
|
35980
35984
|
this.mimeType = mimeType;
|
|
35981
35985
|
}
|
|
35986
|
+
base64Data;
|
|
35987
|
+
mimeType;
|
|
35982
35988
|
static async fromUrl(url) {
|
|
35983
35989
|
const response = await fetch(url);
|
|
35984
35990
|
if (!response.ok) {
|
|
@@ -36053,6 +36059,8 @@ var init_audio = __esm({
|
|
|
36053
36059
|
this.base64Data = base64Data;
|
|
36054
36060
|
this.mimeType = mimeType;
|
|
36055
36061
|
}
|
|
36062
|
+
base64Data;
|
|
36063
|
+
mimeType;
|
|
36056
36064
|
static async fromUrl(url) {
|
|
36057
36065
|
const response = await fetch(url);
|
|
36058
36066
|
if (!response.ok) {
|
|
@@ -36123,6 +36131,10 @@ var init_file = __esm({
|
|
|
36123
36131
|
this.isText = isText;
|
|
36124
36132
|
this.name = name;
|
|
36125
36133
|
}
|
|
36134
|
+
data;
|
|
36135
|
+
mimeType;
|
|
36136
|
+
isText;
|
|
36137
|
+
name;
|
|
36126
36138
|
static async fromUrl(url) {
|
|
36127
36139
|
const response = await fetch(url);
|
|
36128
36140
|
if (!response.ok) {
|
|
@@ -46097,20 +46109,41 @@ function formatSecretDescription(secret) {
|
|
|
46097
46109
|
}
|
|
46098
46110
|
return secret.optional === true ? "Optional secret" : "Required secret";
|
|
46099
46111
|
}
|
|
46100
|
-
function
|
|
46101
|
-
|
|
46112
|
+
function wrapOptionalCommandParameterToken(token, optional) {
|
|
46113
|
+
return optional ? `[${token}]` : token;
|
|
46114
|
+
}
|
|
46115
|
+
function formatCommandDynamicParameterTokens(field, casing) {
|
|
46116
|
+
const optional = field.optional || field.hasDefault;
|
|
46117
|
+
return formatDynamicHelpFields(field, casing).map(
|
|
46118
|
+
(row) => wrapOptionalCommandParameterToken(row.flags, optional)
|
|
46119
|
+
);
|
|
46120
|
+
}
|
|
46121
|
+
function formatCommandParameterTokens(command, casing, globalLongOptionFlags) {
|
|
46122
|
+
const collected = collectFields(command.params, casing, globalLongOptionFlags);
|
|
46123
|
+
const fields = assignPositionals(collected.fields, command.positional);
|
|
46124
|
+
return fields.map(
|
|
46125
|
+
(field) => wrapOptionalCommandParameterToken(
|
|
46126
|
+
formatHelpFieldFlags(field, globalLongOptionFlags),
|
|
46127
|
+
field.positionalIndex === void 0 && (field.optional || field.hasDefault)
|
|
46128
|
+
)
|
|
46129
|
+
).concat(collected.dynamicFields.flatMap((field) => formatCommandDynamicParameterTokens(field, casing)));
|
|
46130
|
+
}
|
|
46131
|
+
function formatCommandRowName(node, depth, casing, globalLongOptionFlags) {
|
|
46132
|
+
const baseName = node.aliases.length === 0 ? node.name : `${node.name} (${node.aliases.join(", ")})`;
|
|
46133
|
+
const parameterTokens = node.kind === "command" ? formatCommandParameterTokens(node, casing, globalLongOptionFlags) : [];
|
|
46134
|
+
const name = parameterTokens.length === 0 ? baseName : `${baseName} ${parameterTokens.join(" ")}`;
|
|
46102
46135
|
return `${" ".repeat(depth)}${name}`;
|
|
46103
46136
|
}
|
|
46104
|
-
function formatCommandRows(group, scope, depth = 0) {
|
|
46137
|
+
function formatCommandRows(group, scope, casing, globalLongOptionFlags, depth = 0) {
|
|
46105
46138
|
return getVisibleChildren(group, scope).flatMap((child) => {
|
|
46106
46139
|
const row = {
|
|
46107
|
-
name: formatCommandRowName(child, depth),
|
|
46140
|
+
name: formatCommandRowName(child, depth, casing, globalLongOptionFlags),
|
|
46108
46141
|
description: child.description ?? ""
|
|
46109
46142
|
};
|
|
46110
46143
|
if (child.kind === "command") {
|
|
46111
46144
|
return [row];
|
|
46112
46145
|
}
|
|
46113
|
-
return [row, ...formatCommandRows(child, scope, depth + 1)];
|
|
46146
|
+
return [row, ...formatCommandRows(child, scope, casing, globalLongOptionFlags, depth + 1)];
|
|
46114
46147
|
});
|
|
46115
46148
|
}
|
|
46116
46149
|
function formatGlobalOptionRows(showVersion, presetsEnabled) {
|
|
@@ -46153,9 +46186,10 @@ function buildUsageLine(breadcrumb, rootUsageName, suffix) {
|
|
|
46153
46186
|
const subPath = breadcrumb.slice(1).join(" ");
|
|
46154
46187
|
return subPath ? `${rootUsageName} ${subPath} ${suffix}` : `${rootUsageName} ${suffix}`;
|
|
46155
46188
|
}
|
|
46156
|
-
function renderGroupHelp(group, breadcrumb, scope, showVersion, presetsEnabled, rootUsageName) {
|
|
46189
|
+
function renderGroupHelp(group, breadcrumb, scope, casing, showVersion, presetsEnabled, rootUsageName) {
|
|
46157
46190
|
const sections = [];
|
|
46158
|
-
const
|
|
46191
|
+
const globalLongOptionFlags = getGlobalLongOptionFlags(presetsEnabled);
|
|
46192
|
+
const commandRows = formatCommandRows(group, scope, casing, globalLongOptionFlags);
|
|
46159
46193
|
if (commandRows.length > 0) {
|
|
46160
46194
|
sections.push(`${text.section("Commands:")}
|
|
46161
46195
|
${formatCommandList(commandRows)}`);
|
|
@@ -46227,6 +46261,7 @@ async function renderGeneratedHelp(root, argv, options) {
|
|
|
46227
46261
|
target.node,
|
|
46228
46262
|
target.breadcrumb,
|
|
46229
46263
|
"cli",
|
|
46264
|
+
casing,
|
|
46230
46265
|
options.version !== void 0,
|
|
46231
46266
|
options.presets === true,
|
|
46232
46267
|
options.rootUsageName
|
|
@@ -56832,7 +56867,7 @@ var init_package2 = __esm({
|
|
|
56832
56867
|
"package.json"() {
|
|
56833
56868
|
package_default2 = {
|
|
56834
56869
|
name: "poe-code",
|
|
56835
|
-
version: "3.0.
|
|
56870
|
+
version: "3.0.197",
|
|
56836
56871
|
description: "CLI tool to configure Poe API for developer workflows.",
|
|
56837
56872
|
type: "module",
|
|
56838
56873
|
main: "./dist/index.js",
|