origem 0.2.1 → 0.2.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/dist/index.js +6 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -636,6 +636,10 @@ function resolveApiUrl(flag) {
|
|
|
636
636
|
const fromLock = readLock(process.cwd())?.apiUrl || void 0;
|
|
637
637
|
return (flag || process.env.ORIGEM_API_URL || fromLock || readConfig().apiUrl || DEFAULT_API).replace(/\/$/, "");
|
|
638
638
|
}
|
|
639
|
+
function resolveConnectUrl(flag) {
|
|
640
|
+
const fromLock = readLock(process.cwd())?.apiUrl || void 0;
|
|
641
|
+
return (flag || process.env.ORIGEM_API_URL || fromLock || DEFAULT_API).replace(/\/$/, "");
|
|
642
|
+
}
|
|
639
643
|
function resolveKey(flag) {
|
|
640
644
|
const key = flag || process.env.ORIGEM_TOKEN || readConfig().token || "";
|
|
641
645
|
if (!key) {
|
|
@@ -1626,6 +1630,7 @@ async function runConnect(opts) {
|
|
|
1626
1630
|
authorizeUrl.searchParams.set("code_challenge_method", "S256");
|
|
1627
1631
|
authorizeUrl.searchParams.set("state", state);
|
|
1628
1632
|
authorizeUrl.searchParams.set("scope", "read write");
|
|
1633
|
+
info(`${color.cyan("\u2192")} connecting to ${color.bold(apiUrl)}`);
|
|
1629
1634
|
info(`${color.cyan("\u2192")} opening your browser to authorise\u2026`);
|
|
1630
1635
|
info(color.dim(` if nothing opens, paste this in your browser:
|
|
1631
1636
|
${authorizeUrl.toString()}`));
|
|
@@ -2255,7 +2260,7 @@ async function main() {
|
|
|
2255
2260
|
switch (cmd) {
|
|
2256
2261
|
case "connect": {
|
|
2257
2262
|
await runConnect({
|
|
2258
|
-
apiUrl:
|
|
2263
|
+
apiUrl: resolveConnectUrl(flags.apiUrl),
|
|
2259
2264
|
scope: flags.scope,
|
|
2260
2265
|
// `targets` já traz o default (CLAUDE_TARGETS); passar flags.targets aqui
|
|
2261
2266
|
// faria o apply cair no "todos os alvos" e escrever GEMINI.md, .cursor/…
|
package/package.json
CHANGED