@appilots/cli 0.10.0 → 0.11.0
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/index.js +37 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +37 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +37 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -31,7 +31,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
31
31
|
var import_commander8 = require("commander");
|
|
32
32
|
|
|
33
33
|
// src/version.ts
|
|
34
|
-
var CLI_VERSION = "0.
|
|
34
|
+
var CLI_VERSION = "0.11.0";
|
|
35
35
|
|
|
36
36
|
// src/config/index.ts
|
|
37
37
|
var import_fs = require("fs");
|
|
@@ -127,6 +127,18 @@ function loadConfig(onWarn) {
|
|
|
127
127
|
} else if (!env.apiKey) {
|
|
128
128
|
return null;
|
|
129
129
|
}
|
|
130
|
+
const legacyWarnings = [];
|
|
131
|
+
if (fileConfig.serverUrl === void 0) {
|
|
132
|
+
for (const [alias, canonical] of Object.entries(KEY_ALIASES)) {
|
|
133
|
+
if (canonical !== "serverUrl" || fileConfig[alias] === void 0) continue;
|
|
134
|
+
fileConfig.serverUrl = fileConfig[alias];
|
|
135
|
+
delete fileConfig[alias];
|
|
136
|
+
legacyWarnings.push(
|
|
137
|
+
`legacy key "${alias}" \u2014 using it as "serverUrl"; rename it in .appilotsrc`
|
|
138
|
+
);
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
130
142
|
const merged = {
|
|
131
143
|
serverUrl: DEFAULT_SERVER_URL,
|
|
132
144
|
outputDir: ".appilots",
|
|
@@ -138,6 +150,20 @@ function loadConfig(onWarn) {
|
|
|
138
150
|
...env.serverUrl ? { serverUrl: env.serverUrl } : {}
|
|
139
151
|
};
|
|
140
152
|
const validation = validateConfig(merged);
|
|
153
|
+
validation.warnings.unshift(...legacyWarnings);
|
|
154
|
+
if (fileConfig.serverUrl === void 0 && env.serverUrl === void 0) {
|
|
155
|
+
for (const key of Object.keys(fileConfig)) {
|
|
156
|
+
if (KNOWN_CONFIG_KEYS.includes(key)) continue;
|
|
157
|
+
if (suggestConfigKey(key) !== "serverUrl") continue;
|
|
158
|
+
validation.warnings = validation.warnings.filter(
|
|
159
|
+
(warning) => !warning.startsWith(`unknown key "${key}"`)
|
|
160
|
+
);
|
|
161
|
+
validation.errors.push(
|
|
162
|
+
`unknown key "${key}" looks like "serverUrl" \u2014 not falling back to ${DEFAULT_SERVER_URL}; rename the key to "serverUrl"`
|
|
163
|
+
);
|
|
164
|
+
validation.valid = false;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
141
167
|
if (onWarn) {
|
|
142
168
|
const source = configPath ?? "environment variables";
|
|
143
169
|
for (const warning of validation.warnings) {
|
|
@@ -9126,7 +9152,7 @@ var coerce = {
|
|
|
9126
9152
|
};
|
|
9127
9153
|
var NEVER = INVALID;
|
|
9128
9154
|
|
|
9129
|
-
// ../shared/dist/chunk-
|
|
9155
|
+
// ../shared/dist/chunk-MKT45LRA.mjs
|
|
9130
9156
|
var locatorSourceSchema = external_exports.enum([
|
|
9131
9157
|
"appilotsId",
|
|
9132
9158
|
"testID",
|
|
@@ -9452,9 +9478,16 @@ var createProjectSchema = external_exports.object({
|
|
|
9452
9478
|
// Reference to a tenant-scoped provider (preferred). Optional at
|
|
9453
9479
|
// creation so a project can be created and configured later.
|
|
9454
9480
|
providerId: external_exports.string().min(1).optional(),
|
|
9455
|
-
|
|
9481
|
+
// 16k chars (~4k tokens): um prompt de CS real não cabe em 4096 — o
|
|
9482
|
+
// primeiro cliente de produção chegou com 6.385 e tomou 'Invalid input'
|
|
9483
|
+
// sem saber por quê. O teto continua existindo porque o systemPrompt
|
|
9484
|
+
// entra em TODO hop do relay: é proteção de TPM, não de gosto.
|
|
9485
|
+
systemPrompt: external_exports.string().max(16e3).optional()
|
|
9486
|
+
});
|
|
9487
|
+
var updateProjectSchema = createProjectSchema.partial().extend({
|
|
9488
|
+
providerId: external_exports.string().min(1).nullable().optional(),
|
|
9489
|
+
systemPrompt: external_exports.string().max(16e3).nullable().optional()
|
|
9456
9490
|
});
|
|
9457
|
-
var updateProjectSchema = createProjectSchema.partial();
|
|
9458
9491
|
var providerKindSchema = external_exports.enum(["openai", "anthropic", "custom"]);
|
|
9459
9492
|
var createProviderSchema = external_exports.object({
|
|
9460
9493
|
name: external_exports.string().min(1).max(100),
|