@odla-ai/cli 0.11.0 → 0.11.2
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/README.md +5 -4
- package/dist/bin.cjs +15 -12
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-KUQCJ6KA.js → chunk-DC4MIB4X.js} +16 -13
- package/dist/chunk-DC4MIB4X.js.map +1 -0
- package/dist/index.cjs +15 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -8
- package/dist/index.d.ts +5 -8
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/skills/odla/SKILL.md +22 -0
- package/skills/odla/references/build.md +10 -6
- package/skills/odla-migrate/SKILL.md +17 -0
- package/skills/odla-migrate/references/phase-1-static.md +5 -1
- package/skills/odla-migrate/references/phase-3-auth.md +5 -0
- package/dist/chunk-KUQCJ6KA.js.map +0 -1
package/dist/bin.js
CHANGED
|
@@ -210,12 +210,16 @@ function handshakeEmail(value, cached) {
|
|
|
210
210
|
}
|
|
211
211
|
return email;
|
|
212
212
|
}
|
|
213
|
-
function approvalBrowser(options) {
|
|
213
|
+
function approvalBrowser(options, host = {}) {
|
|
214
214
|
if (options.open === true) return { open: true, mode: "forced" };
|
|
215
215
|
if (options.open === false) return { open: false, reason: "disabled by --no-open" };
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
if (
|
|
216
|
+
const env = host.env ?? process3.env;
|
|
217
|
+
if (env.CI) return { open: false, reason: "CI environment" };
|
|
218
|
+
if (env.SSH_CONNECTION || env.SSH_TTY) return { open: false, reason: "SSH session; pass --open to force" };
|
|
219
|
+
const platform = host.platform ?? process3.platform;
|
|
220
|
+
if (platform !== "darwin" && platform !== "win32" && !env.DISPLAY && !env.WAYLAND_DISPLAY) {
|
|
221
|
+
return { open: false, reason: "no graphical display; pass --open to force" };
|
|
222
|
+
}
|
|
219
223
|
return { open: true, mode: "auto" };
|
|
220
224
|
}
|
|
221
225
|
function handshakeUrl(platformUrl, userCode) {
|
|
@@ -286,8 +290,9 @@ async function scopedToken(platform, scope, options, doFetch, out) {
|
|
|
286
290
|
onCode: async ({ userCode, expiresIn, verificationUriComplete }) => {
|
|
287
291
|
const approvalUrl = verificationUriComplete ?? handshakeUrl(audience, userCode);
|
|
288
292
|
out.log(`Review, then approve scoped request ${userCode} at ${approvalUrl} within ${Math.floor(expiresIn / 60)}m.`);
|
|
289
|
-
|
|
290
|
-
|
|
293
|
+
if (approvalBrowser({ open: options.open }).open) {
|
|
294
|
+
await (options.openApprovalUrl ?? openUrl)(approvalUrl).catch(() => void 0);
|
|
295
|
+
}
|
|
291
296
|
}
|
|
292
297
|
});
|
|
293
298
|
const tokens = cache?.platform === audience ? { ...cache.tokens ?? {} } : {};
|
|
@@ -1249,7 +1254,6 @@ async function lifecycleContext(options) {
|
|
|
1249
1254
|
token: options.token,
|
|
1250
1255
|
email: options.email,
|
|
1251
1256
|
open: options.open,
|
|
1252
|
-
interactive: options.interactive,
|
|
1253
1257
|
openApprovalUrl: options.openConsentUrl
|
|
1254
1258
|
},
|
|
1255
1259
|
doFetch,
|
|
@@ -1258,7 +1262,7 @@ async function lifecycleContext(options) {
|
|
|
1258
1262
|
return { cfg, ctx: { platform: cfg.platformUrl, appId: cfg.app.id, env, token, fetch: doFetch }, out };
|
|
1259
1263
|
}
|
|
1260
1264
|
function connectionOptions(options, out) {
|
|
1261
|
-
const browser = approvalBrowser({
|
|
1265
|
+
const browser = approvalBrowser({ open: options.open });
|
|
1262
1266
|
return {
|
|
1263
1267
|
out,
|
|
1264
1268
|
open: browser.open,
|
|
@@ -2125,7 +2129,6 @@ ${env}: credentials are already saved; retry "odla-ai secrets push --env ${env}$
|
|
|
2125
2129
|
{ platform: cfg.platformUrl, appId: cfg.app.id, env, token, fetch: doFetch },
|
|
2126
2130
|
{
|
|
2127
2131
|
open: options.open,
|
|
2128
|
-
interactive: options.interactive,
|
|
2129
2132
|
openConsentUrl: options.openApprovalUrl,
|
|
2130
2133
|
wait: options.calendarPollWait,
|
|
2131
2134
|
pollTimeoutMs: options.calendarPollTimeoutMs,
|
|
@@ -3019,7 +3022,6 @@ async function smoke(options) {
|
|
|
3019
3022
|
token: options.token,
|
|
3020
3023
|
email: options.email,
|
|
3021
3024
|
open: options.open,
|
|
3022
|
-
interactive: options.interactive,
|
|
3023
3025
|
openApprovalUrl: options.openApprovalUrl
|
|
3024
3026
|
},
|
|
3025
3027
|
doFetch,
|
|
@@ -3307,8 +3309,9 @@ Safety:
|
|
|
3307
3309
|
Provision caches the approved developer token and service credentials under
|
|
3308
3310
|
.odla/ with mode 0600, and init adds those paths to .gitignore. Secret push
|
|
3309
3311
|
preflights Wrangler before any shown-once issuance or destructive rotation.
|
|
3310
|
-
Provision opens the approval page automatically
|
|
3311
|
-
|
|
3312
|
+
Provision opens the approval page in your browser automatically whenever the
|
|
3313
|
+
machine can show one, including agent-driven runs; only CI, SSH, and
|
|
3314
|
+
display-less hosts skip it. Use --open to force or --no-open to suppress.
|
|
3312
3315
|
A fresh device handshake requires --email <odla-account> or ODLA_USER_EMAIL.
|
|
3313
3316
|
The email is a non-secret identity hint: never provide a password or session
|
|
3314
3317
|
token. The matching account must already exist, be signed in, explicitly
|
|
@@ -4014,4 +4017,4 @@ export {
|
|
|
4014
4017
|
smoke,
|
|
4015
4018
|
runCli
|
|
4016
4019
|
};
|
|
4017
|
-
//# sourceMappingURL=chunk-
|
|
4020
|
+
//# sourceMappingURL=chunk-DC4MIB4X.js.map
|