@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/index.cjs
CHANGED
|
@@ -286,12 +286,16 @@ function handshakeEmail(value, cached) {
|
|
|
286
286
|
}
|
|
287
287
|
return email;
|
|
288
288
|
}
|
|
289
|
-
function approvalBrowser(options) {
|
|
289
|
+
function approvalBrowser(options, host = {}) {
|
|
290
290
|
if (options.open === true) return { open: true, mode: "forced" };
|
|
291
291
|
if (options.open === false) return { open: false, reason: "disabled by --no-open" };
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
if (
|
|
292
|
+
const env = host.env ?? import_node_process2.default.env;
|
|
293
|
+
if (env.CI) return { open: false, reason: "CI environment" };
|
|
294
|
+
if (env.SSH_CONNECTION || env.SSH_TTY) return { open: false, reason: "SSH session; pass --open to force" };
|
|
295
|
+
const platform = host.platform ?? import_node_process2.default.platform;
|
|
296
|
+
if (platform !== "darwin" && platform !== "win32" && !env.DISPLAY && !env.WAYLAND_DISPLAY) {
|
|
297
|
+
return { open: false, reason: "no graphical display; pass --open to force" };
|
|
298
|
+
}
|
|
295
299
|
return { open: true, mode: "auto" };
|
|
296
300
|
}
|
|
297
301
|
function handshakeUrl(platformUrl, userCode) {
|
|
@@ -388,8 +392,9 @@ async function scopedToken(platform, scope, options, doFetch, out) {
|
|
|
388
392
|
onCode: async ({ userCode, expiresIn, verificationUriComplete }) => {
|
|
389
393
|
const approvalUrl = verificationUriComplete ?? handshakeUrl(audience, userCode);
|
|
390
394
|
out.log(`Review, then approve scoped request ${userCode} at ${approvalUrl} within ${Math.floor(expiresIn / 60)}m.`);
|
|
391
|
-
|
|
392
|
-
|
|
395
|
+
if (approvalBrowser({ open: options.open }).open) {
|
|
396
|
+
await (options.openApprovalUrl ?? openUrl)(approvalUrl).catch(() => void 0);
|
|
397
|
+
}
|
|
393
398
|
}
|
|
394
399
|
});
|
|
395
400
|
const tokens = cache?.platform === audience ? { ...cache.tokens ?? {} } : {};
|
|
@@ -1461,7 +1466,6 @@ async function lifecycleContext(options) {
|
|
|
1461
1466
|
token: options.token,
|
|
1462
1467
|
email: options.email,
|
|
1463
1468
|
open: options.open,
|
|
1464
|
-
interactive: options.interactive,
|
|
1465
1469
|
openApprovalUrl: options.openConsentUrl
|
|
1466
1470
|
},
|
|
1467
1471
|
doFetch,
|
|
@@ -1470,7 +1474,7 @@ async function lifecycleContext(options) {
|
|
|
1470
1474
|
return { cfg, ctx: { platform: cfg.platformUrl, appId: cfg.app.id, env, token, fetch: doFetch }, out };
|
|
1471
1475
|
}
|
|
1472
1476
|
function connectionOptions(options, out) {
|
|
1473
|
-
const browser = approvalBrowser({
|
|
1477
|
+
const browser = approvalBrowser({ open: options.open });
|
|
1474
1478
|
return {
|
|
1475
1479
|
out,
|
|
1476
1480
|
open: browser.open,
|
|
@@ -1931,8 +1935,9 @@ Safety:
|
|
|
1931
1935
|
Provision caches the approved developer token and service credentials under
|
|
1932
1936
|
.odla/ with mode 0600, and init adds those paths to .gitignore. Secret push
|
|
1933
1937
|
preflights Wrangler before any shown-once issuance or destructive rotation.
|
|
1934
|
-
Provision opens the approval page automatically
|
|
1935
|
-
|
|
1938
|
+
Provision opens the approval page in your browser automatically whenever the
|
|
1939
|
+
machine can show one, including agent-driven runs; only CI, SSH, and
|
|
1940
|
+
display-less hosts skip it. Use --open to force or --no-open to suppress.
|
|
1936
1941
|
A fresh device handshake requires --email <odla-account> or ODLA_USER_EMAIL.
|
|
1937
1942
|
The email is a non-secret identity hint: never provide a password or session
|
|
1938
1943
|
token. The matching account must already exist, be signed in, explicitly
|
|
@@ -2442,7 +2447,6 @@ ${env}: credentials are already saved; retry "odla-ai secrets push --env ${env}$
|
|
|
2442
2447
|
{ platform: cfg.platformUrl, appId: cfg.app.id, env, token, fetch: doFetch },
|
|
2443
2448
|
{
|
|
2444
2449
|
open: options.open,
|
|
2445
|
-
interactive: options.interactive,
|
|
2446
2450
|
openConsentUrl: options.openApprovalUrl,
|
|
2447
2451
|
wait: options.calendarPollWait,
|
|
2448
2452
|
pollTimeoutMs: options.calendarPollTimeoutMs,
|
|
@@ -3764,7 +3768,6 @@ async function smoke(options) {
|
|
|
3764
3768
|
token: options.token,
|
|
3765
3769
|
email: options.email,
|
|
3766
3770
|
open: options.open,
|
|
3767
|
-
interactive: options.interactive,
|
|
3768
3771
|
openApprovalUrl: options.openApprovalUrl
|
|
3769
3772
|
},
|
|
3770
3773
|
doFetch,
|