@revos/cli 0.3.0 → 0.3.1
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 +30 -4
- package/dist/adapters/oclif/commands/action-runs/get.mjs +1 -1
- package/dist/adapters/oclif/commands/action-runs/list.mjs +1 -1
- package/dist/adapters/oclif/commands/actions/get-input-schema.mjs +2 -2
- package/dist/adapters/oclif/commands/actions/get-params-schema.mjs +2 -2
- package/dist/adapters/oclif/commands/actions/get.mjs +1 -1
- package/dist/adapters/oclif/commands/actions/list.mjs +2 -2
- package/dist/adapters/oclif/commands/ai-instructions/create.mjs +1 -1
- package/dist/adapters/oclif/commands/ai-instructions/delete.mjs +1 -1
- package/dist/adapters/oclif/commands/ai-instructions/get.mjs +1 -1
- package/dist/adapters/oclif/commands/ai-instructions/list.mjs +1 -1
- package/dist/adapters/oclif/commands/ai-instructions/update.mjs +1 -1
- package/dist/adapters/oclif/commands/api.mjs +2 -2
- package/dist/adapters/oclif/commands/apply.d.mts +1 -1
- package/dist/adapters/oclif/commands/apply.mjs +2 -2
- package/dist/adapters/oclif/commands/auth/login.mjs +10 -30
- package/dist/adapters/oclif/commands/auth/logout.mjs +2 -2
- package/dist/adapters/oclif/commands/auth/status.mjs +2 -2
- package/dist/adapters/oclif/commands/connections/create.mjs +1 -1
- package/dist/adapters/oclif/commands/connections/delete.mjs +1 -1
- package/dist/adapters/oclif/commands/connections/get.mjs +1 -1
- package/dist/adapters/oclif/commands/connections/list.mjs +1 -1
- package/dist/adapters/oclif/commands/connections/update.mjs +1 -1
- package/dist/adapters/oclif/commands/cubes/create.mjs +1 -1
- package/dist/adapters/oclif/commands/cubes/delete.mjs +1 -1
- package/dist/adapters/oclif/commands/cubes/get.mjs +1 -1
- package/dist/adapters/oclif/commands/cubes/list.mjs +1 -1
- package/dist/adapters/oclif/commands/cubes/meta.d.mts +6 -0
- package/dist/adapters/oclif/commands/cubes/meta.mjs +45 -0
- package/dist/adapters/oclif/commands/cubes/query.d.mts +6 -0
- package/dist/adapters/oclif/commands/cubes/query.mjs +51 -0
- package/dist/adapters/oclif/commands/cubes/update.mjs +1 -1
- package/dist/adapters/oclif/commands/diff.d.mts +1 -1
- package/dist/adapters/oclif/commands/diff.mjs +2 -2
- package/dist/adapters/oclif/commands/gservice-account-keys/get.mjs +1 -1
- package/dist/adapters/oclif/commands/gservice-account-keys/reveal.mjs +2 -2
- package/dist/adapters/oclif/commands/gservice-accounts/create.mjs +1 -1
- package/dist/adapters/oclif/commands/gservice-accounts/delete.mjs +1 -1
- package/dist/adapters/oclif/commands/gservice-accounts/get.mjs +1 -1
- package/dist/adapters/oclif/commands/gservice-accounts/list.mjs +1 -1
- package/dist/adapters/oclif/commands/init.mjs +12 -3
- package/dist/adapters/oclif/commands/org/create.mjs +1 -1
- package/dist/adapters/oclif/commands/org/current.mjs +2 -2
- package/dist/adapters/oclif/commands/org/get.mjs +1 -1
- package/dist/adapters/oclif/commands/org/list.mjs +2 -2
- package/dist/adapters/oclif/commands/org/switch.mjs +2 -2
- package/dist/adapters/oclif/commands/pull.d.mts +1 -1
- package/dist/adapters/oclif/commands/pull.mjs +2 -2
- package/dist/adapters/oclif/commands/score-groups/create.mjs +1 -1
- package/dist/adapters/oclif/commands/score-groups/delete.mjs +1 -1
- package/dist/adapters/oclif/commands/score-groups/get.mjs +1 -1
- package/dist/adapters/oclif/commands/score-groups/list.mjs +1 -1
- package/dist/adapters/oclif/commands/score-groups/update.mjs +1 -1
- package/dist/adapters/oclif/commands/scores/create.mjs +1 -1
- package/dist/adapters/oclif/commands/scores/delete.mjs +1 -1
- package/dist/adapters/oclif/commands/scores/list.mjs +1 -1
- package/dist/adapters/oclif/commands/scores/update.mjs +1 -1
- package/dist/adapters/oclif/commands/segments/create.mjs +1 -1
- package/dist/adapters/oclif/commands/segments/delete.mjs +1 -1
- package/dist/adapters/oclif/commands/segments/evaluate.mjs +2 -2
- package/dist/adapters/oclif/commands/segments/get-evaluation-history.mjs +2 -2
- package/dist/adapters/oclif/commands/segments/get-version.mjs +2 -2
- package/dist/adapters/oclif/commands/segments/get.mjs +1 -1
- package/dist/adapters/oclif/commands/segments/list-versions.mjs +2 -2
- package/dist/adapters/oclif/commands/segments/list.mjs +1 -1
- package/dist/adapters/oclif/commands/segments/restore-version.mjs +2 -2
- package/dist/adapters/oclif/commands/segments/update.mjs +1 -1
- package/dist/adapters/oclif/commands/sources/create.mjs +2 -2
- package/dist/adapters/oclif/commands/sources/delete.mjs +1 -1
- package/dist/adapters/oclif/commands/sources/get.mjs +1 -1
- package/dist/adapters/oclif/commands/sources/list-streams.mjs +2 -2
- package/dist/adapters/oclif/commands/sources/list.mjs +1 -1
- package/dist/adapters/oclif/commands/sources/update.mjs +2 -2
- package/dist/adapters/oclif/commands/status.d.mts +1 -1
- package/dist/adapters/oclif/commands/status.mjs +3 -3
- package/dist/adapters/oclif/commands/table-views/create.mjs +1 -1
- package/dist/adapters/oclif/commands/table-views/delete.mjs +1 -1
- package/dist/adapters/oclif/commands/table-views/list.mjs +1 -1
- package/dist/adapters/oclif/commands/table-views/update.mjs +1 -1
- package/dist/adapters/oclif/commands/tables/create.mjs +1 -1
- package/dist/adapters/oclif/commands/tables/delete.mjs +1 -1
- package/dist/adapters/oclif/commands/tables/get.mjs +1 -1
- package/dist/adapters/oclif/commands/tables/list.mjs +1 -1
- package/dist/adapters/oclif/commands/tables/update.mjs +1 -1
- package/dist/{base.command-BLken6pU.mjs → base.command-CnVb4RG6.mjs} +1 -1
- package/dist/{core-DsGA_HuL.mjs → core-CY9pC37x.mjs} +37 -2
- package/dist/{factory-eslVs9tN.mjs → factory-DTqayaCF.mjs} +2 -2
- package/dist/{index-Blr5iiwc.d.mts → index-Cbb9pLt6.d.mts} +14 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{presets-D0AIVsGO.mjs → presets-mJzFGMhG.mjs} +2 -2
- package/dist/templates/.devcontainer/post-start.sh +4 -8
- package/dist/templates/.devcontainer/welcome.sh +8 -9
- package/dist/templates/README.md +4 -5
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as updateCommand } from "../../../../presets-
|
|
1
|
+
import { a as updateCommand } from "../../../../presets-mJzFGMhG.mjs";
|
|
2
2
|
//#region src/adapters/oclif/commands/score-groups/update.ts
|
|
3
3
|
var update_default = updateCommand({
|
|
4
4
|
resource: "scoreGroups",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { x as unwrap } from "../../../../core-
|
|
2
|
-
import { r as defineApiCommand } from "../../../../factory-
|
|
1
|
+
import { x as unwrap } from "../../../../core-CY9pC37x.mjs";
|
|
2
|
+
import { r as defineApiCommand } from "../../../../factory-DTqayaCF.mjs";
|
|
3
3
|
import { Args } from "@oclif/core";
|
|
4
4
|
//#region src/adapters/oclif/commands/segments/evaluate.ts
|
|
5
5
|
var evaluate_default = defineApiCommand({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { x as unwrap } from "../../../../core-
|
|
2
|
-
import { r as defineApiCommand } from "../../../../factory-
|
|
1
|
+
import { x as unwrap } from "../../../../core-CY9pC37x.mjs";
|
|
2
|
+
import { r as defineApiCommand } from "../../../../factory-DTqayaCF.mjs";
|
|
3
3
|
import { Args } from "@oclif/core";
|
|
4
4
|
//#region src/adapters/oclif/commands/segments/get-evaluation-history.ts
|
|
5
5
|
var get_evaluation_history_default = defineApiCommand({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { x as unwrap } from "../../../../core-
|
|
2
|
-
import { r as defineApiCommand } from "../../../../factory-
|
|
1
|
+
import { x as unwrap } from "../../../../core-CY9pC37x.mjs";
|
|
2
|
+
import { r as defineApiCommand } from "../../../../factory-DTqayaCF.mjs";
|
|
3
3
|
import { Args } from "@oclif/core";
|
|
4
4
|
//#region src/adapters/oclif/commands/segments/get-version.ts
|
|
5
5
|
var get_version_default = defineApiCommand({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { x as unwrap } from "../../../../core-
|
|
2
|
-
import { n as createListRender, r as defineApiCommand } from "../../../../factory-
|
|
1
|
+
import { x as unwrap } from "../../../../core-CY9pC37x.mjs";
|
|
2
|
+
import { n as createListRender, r as defineApiCommand } from "../../../../factory-DTqayaCF.mjs";
|
|
3
3
|
import { Args, Flags } from "@oclif/core";
|
|
4
4
|
var list_versions_default = defineApiCommand({
|
|
5
5
|
description: "List versions of a segment",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { x as unwrap } from "../../../../core-
|
|
2
|
-
import { r as defineApiCommand } from "../../../../factory-
|
|
1
|
+
import { x as unwrap } from "../../../../core-CY9pC37x.mjs";
|
|
2
|
+
import { r as defineApiCommand } from "../../../../factory-DTqayaCF.mjs";
|
|
3
3
|
import { Args } from "@oclif/core";
|
|
4
4
|
//#region src/adapters/oclif/commands/segments/restore-version.ts
|
|
5
5
|
var restore_version_default = defineApiCommand({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as getConfig, S as resolveAppUrl } from "../../../../core-
|
|
2
|
-
import { t as BaseCommand } from "../../../../base.command-
|
|
1
|
+
import { E as getConfig, S as resolveAppUrl } from "../../../../core-CY9pC37x.mjs";
|
|
2
|
+
import { t as BaseCommand } from "../../../../base.command-CnVb4RG6.mjs";
|
|
3
3
|
import chalk from "chalk";
|
|
4
4
|
import open from "open";
|
|
5
5
|
//#region src/adapters/oclif/commands/sources/create.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { x as unwrap } from "../../../../core-
|
|
2
|
-
import { n as createListRender, r as defineApiCommand } from "../../../../factory-
|
|
1
|
+
import { x as unwrap } from "../../../../core-CY9pC37x.mjs";
|
|
2
|
+
import { n as createListRender, r as defineApiCommand } from "../../../../factory-DTqayaCF.mjs";
|
|
3
3
|
import { Args, Flags } from "@oclif/core";
|
|
4
4
|
var list_streams_default = defineApiCommand({
|
|
5
5
|
description: "List streams the source exposes (sync modes, cursor/PK candidates, field paths)",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as getConfig, S as resolveAppUrl } from "../../../../core-
|
|
2
|
-
import { t as BaseCommand } from "../../../../base.command-
|
|
1
|
+
import { E as getConfig, S as resolveAppUrl } from "../../../../core-CY9pC37x.mjs";
|
|
2
|
+
import { t as BaseCommand } from "../../../../base.command-CnVb4RG6.mjs";
|
|
3
3
|
import chalk from "chalk";
|
|
4
4
|
import { Args } from "@oclif/core";
|
|
5
5
|
import open from "open";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as ResourceStatus } from "../../../index-
|
|
1
|
+
import { u as ResourceStatus } from "../../../index-Cbb9pLt6.mjs";
|
|
2
2
|
import { c as IacError } from "../../../context-D5uelKLe.mjs";
|
|
3
3
|
import { t as BaseCommand } from "../../../base.command-BmddDbHa.mjs";
|
|
4
4
|
import * as _$_oclif_core_interfaces0 from "@oclif/core/interfaces";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as buildIacRegistry, b as createApiClient, f as describeResources, g as loadResources, v as discoverProject, y as projectRoot } from "../../../core-
|
|
2
|
-
import { t as BaseCommand } from "../../../base.command-
|
|
3
|
-
import { a as resolveColumns, i as renderList } from "../../../factory-
|
|
1
|
+
import { _ as buildIacRegistry, b as createApiClient, f as describeResources, g as loadResources, v as discoverProject, y as projectRoot } from "../../../core-CY9pC37x.mjs";
|
|
2
|
+
import { t as BaseCommand } from "../../../base.command-CnVb4RG6.mjs";
|
|
3
|
+
import { a as resolveColumns, i as renderList } from "../../../factory-DTqayaCF.mjs";
|
|
4
4
|
import { n as renderIacErrors } from "../../../iac-render-BSZZEP0n.mjs";
|
|
5
5
|
import chalk from "chalk";
|
|
6
6
|
import { Args, Flags } from "@oclif/core";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { G as ApiError, I as setAuthConfig, U as loadCredentials, i as formatEnvMismatchError, l as resolveProjectContext, o as formatProjectOrgFlagError, r as formatCredentialsMismatchWarning, u as validateEnvAgainstProject } from "./core-CY9pC37x.mjs";
|
|
2
2
|
import { Command, Flags } from "@oclif/core";
|
|
3
3
|
import { makeTable } from "@oclif/table";
|
|
4
4
|
//#region src/adapters/oclif/base.command.ts
|
|
@@ -357,8 +357,43 @@ async function refreshAccessToken(refreshToken) {
|
|
|
357
357
|
return response.json();
|
|
358
358
|
}
|
|
359
359
|
//#endregion
|
|
360
|
+
//#region src/core/auth/oauth-flow.ts
|
|
361
|
+
const noop = () => {};
|
|
362
|
+
async function performOAuthLogin(opts) {
|
|
363
|
+
const log = opts.log ?? noop;
|
|
364
|
+
const server = await startOAuthServer();
|
|
365
|
+
const redirectUri = `http://localhost:${server.port}/callback`;
|
|
366
|
+
const pkce = generatePKCEChallenge();
|
|
367
|
+
const authorizationUrl = buildAuthorizationUrl(redirectUri, pkce);
|
|
368
|
+
log("Opening browser for authentication...");
|
|
369
|
+
log("If the browser doesn't open, visit this URL:\n");
|
|
370
|
+
log(` ${authorizationUrl}\n`);
|
|
371
|
+
log("Waiting for authentication... (Press Ctrl+C to cancel)\n");
|
|
372
|
+
const { default: open } = await import("open");
|
|
373
|
+
await open(authorizationUrl);
|
|
374
|
+
const callbackResult = await server.waitForCallback();
|
|
375
|
+
if (callbackResult.state !== pkce.state) throw new Error("Invalid state parameter. Authentication may have been tampered with.");
|
|
376
|
+
log("Received authorization code, exchanging for tokens...\n");
|
|
377
|
+
const tokenResponse = await exchangeCodeForTokens(callbackResult.code, redirectUri, pkce.codeVerifier);
|
|
378
|
+
const userInfo = await getUserInfo(tokenResponse.access_token);
|
|
379
|
+
const credentials = tokenResponseToCredentials(tokenResponse, userInfo);
|
|
380
|
+
const activeAuth = getActiveAuthConfig();
|
|
381
|
+
credentials.apiUrl = opts.apiUrl;
|
|
382
|
+
credentials.authUrl = activeAuth.authUrl;
|
|
383
|
+
credentials.authClientId = activeAuth.authClientId;
|
|
384
|
+
if (opts.organizationId) credentials.organizationId = opts.organizationId;
|
|
385
|
+
saveCredentials(credentials);
|
|
386
|
+
return {
|
|
387
|
+
credentials,
|
|
388
|
+
userInfo
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
//#endregion
|
|
360
392
|
//#region src/core/config.ts
|
|
361
393
|
const DEFAULT_API_URL = "https://api.revos.ai";
|
|
394
|
+
function resolveApiUrl() {
|
|
395
|
+
return process.env.REVOS_API_URL || "https://api.revos.ai";
|
|
396
|
+
}
|
|
362
397
|
async function getStoredAccessToken() {
|
|
363
398
|
const credentials = loadCredentials();
|
|
364
399
|
if (!credentials) return null;
|
|
@@ -381,7 +416,7 @@ async function getConfig() {
|
|
|
381
416
|
const token = process.env.REVOS_TOKEN || await getStoredAccessToken();
|
|
382
417
|
if (!token) throw new Error("Not authenticated. Run 'revos auth login' or set REVOS_TOKEN environment variable.");
|
|
383
418
|
return {
|
|
384
|
-
apiUrl:
|
|
419
|
+
apiUrl: resolveApiUrl(),
|
|
385
420
|
token,
|
|
386
421
|
organizationId: process.env.REVOS_ORG_ID || getStoredOrganizationId()
|
|
387
422
|
};
|
|
@@ -2473,4 +2508,4 @@ var InitService = class InitService {
|
|
|
2473
2508
|
}
|
|
2474
2509
|
};
|
|
2475
2510
|
//#endregion
|
|
2476
|
-
export {
|
|
2511
|
+
export { buildAuthorizationUrl as A, deleteCredentials as B, formatError as C, resolveApiUrl as D, getConfig as E, refreshAccessToken as F, ApiError as G, isTokenExpired as H, setAuthConfig as I, setAuthEnv as L, generatePKCEChallenge as M, getActiveAuthConfig as N, performOAuthLogin as O, getUserInfo as P, tokenResponseToCredentials as R, resolveAppUrl as S, DEFAULT_API_URL as T, loadCredentials as U, getCredentialsPath as V, saveCredentials as W, buildIacRegistry as _, formatInProjectSwitchWarning as a, createApiClient as b, isInsideProject as c, iac_exports as d, describeResources as f, loadResources as g, formatDiffLine as h, formatEnvMismatchError as i, exchangeCodeForTokens as j, AUTH_ENVS as k, resolveProjectContext as l, apply as m, selectOrganization as n, formatProjectOrgFlagError as o, pull as p, formatCredentialsMismatchWarning as r, renderProjectContextLine as s, InitService as t, validateEnvAgainstProject as u, discoverProject as v, sanitizeFileName as w, unwrap as x, projectRoot as y, startOAuthServer as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as getConfig, b as createApiClient } from "./core-
|
|
2
|
-
import { t as BaseCommand } from "./base.command-
|
|
1
|
+
import { E as getConfig, b as createApiClient } from "./core-CY9pC37x.mjs";
|
|
2
|
+
import { t as BaseCommand } from "./base.command-CnVb4RG6.mjs";
|
|
3
3
|
import * as fs from "fs";
|
|
4
4
|
import * as path from "path";
|
|
5
5
|
import chalk from "chalk";
|
|
@@ -25,6 +25,7 @@ declare class ApiError extends Error {
|
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/core/config.d.ts
|
|
27
27
|
declare const DEFAULT_API_URL = "https://api.revos.ai";
|
|
28
|
+
declare function resolveApiUrl(): string;
|
|
28
29
|
declare function getConfig(): Promise<Config>;
|
|
29
30
|
//#endregion
|
|
30
31
|
//#region src/core/auth/credentials-store.d.ts
|
|
@@ -78,6 +79,18 @@ declare function getUserInfo(accessToken: string): Promise<ClerkUserInfo>;
|
|
|
78
79
|
declare function tokenResponseToCredentials(tokenResponse: TokenResponse, userInfo: ClerkUserInfo): StoredCredentials;
|
|
79
80
|
declare function refreshAccessToken(refreshToken: string): Promise<TokenResponse>;
|
|
80
81
|
//#endregion
|
|
82
|
+
//#region src/core/auth/oauth-flow.d.ts
|
|
83
|
+
interface PerformOAuthLoginOptions {
|
|
84
|
+
apiUrl: string;
|
|
85
|
+
organizationId?: string;
|
|
86
|
+
log?: (msg: string) => void;
|
|
87
|
+
}
|
|
88
|
+
interface PerformOAuthLoginResult {
|
|
89
|
+
credentials: StoredCredentials;
|
|
90
|
+
userInfo: ClerkUserInfo;
|
|
91
|
+
}
|
|
92
|
+
declare function performOAuthLogin(opts: PerformOAuthLoginOptions): Promise<PerformOAuthLoginResult>;
|
|
93
|
+
//#endregion
|
|
81
94
|
//#region src/core/utils.d.ts
|
|
82
95
|
declare function formatError(error: unknown): string;
|
|
83
96
|
declare function sanitizeFileName(name: string): string;
|
|
@@ -590,4 +603,4 @@ declare class InitService {
|
|
|
590
603
|
private renderTemplate;
|
|
591
604
|
}
|
|
592
605
|
//#endregion
|
|
593
|
-
export {
|
|
606
|
+
export { getUserInfo as A, loadCredentials as B, AuthConfig as C, exchangeCodeForTokens as D, buildAuthorizationUrl as E, OAuthServerResult as F, ApiError as G, DEFAULT_API_URL as H, startOAuthServer as I, Config as K, deleteCredentials as L, setAuthConfig as M, setAuthEnv as N, generatePKCEChallenge as O, tokenResponseToCredentials as P, getCredentialsPath as R, AUTH_ENVS as S, PKCEChallenge as T, getConfig as U, saveCredentials as V, resolveApiUrl as W, formatError as _, formatEnvMismatchError as a, PerformOAuthLoginResult as b, renderProjectContextLine as c, PulledResource as d, AppliedResource as f, resolveAppUrl as g, unwrap as h, formatCredentialsMismatchWarning as i, refreshAccessToken as j, getActiveAuthConfig as k, index_d_exports as l, createApiClient as m, InitResult as n, formatInProjectSwitchWarning as o, ApiClient as p, InitService as r, formatProjectOrgFlagError as s, InitOptions as t, ResourceStatus as u, sanitizeFileName as v, AuthEnv as w, performOAuthLogin as x, PerformOAuthLoginOptions as y, isTokenExpired as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as getUserInfo, B as loadCredentials, C as AuthConfig, D as exchangeCodeForTokens, E as buildAuthorizationUrl, F as OAuthServerResult, G as ApiError, H as DEFAULT_API_URL, I as startOAuthServer, K as Config, L as deleteCredentials, M as setAuthConfig, N as setAuthEnv, O as generatePKCEChallenge, P as tokenResponseToCredentials, R as getCredentialsPath, S as AUTH_ENVS, T as PKCEChallenge, U as getConfig, V as saveCredentials, W as resolveApiUrl, _ as formatError, a as formatEnvMismatchError, b as PerformOAuthLoginResult, c as renderProjectContextLine, g as resolveAppUrl, h as unwrap, i as formatCredentialsMismatchWarning, j as refreshAccessToken, k as getActiveAuthConfig, l as index_d_exports, m as createApiClient, n as InitResult, o as formatInProjectSwitchWarning, p as ApiClient, r as InitService, s as formatProjectOrgFlagError, t as InitOptions, v as sanitizeFileName, w as AuthEnv, x as performOAuthLogin, y as PerformOAuthLoginOptions, z as isTokenExpired } from "./index-Cbb9pLt6.mjs";
|
|
2
2
|
import { a as OrgListResult, c as StoredCredentials, i as OAuthCallbackResult, l as TokenResponse, n as AuthStatusInfo, o as OrgSwitchResult, r as ClerkUserInfo, s as OrganizationInfo, t as AuthResult } from "./types-Bk2Cb5yt.mjs";
|
|
3
3
|
import { a as validateEnvAgainstProject, i as resolveProjectContext, n as ProjectContext, r as isInsideProject, t as EnvMismatch } from "./context-D5uelKLe.mjs";
|
|
4
|
-
export { AUTH_ENVS, ApiClient, ApiError, AuthConfig, AuthEnv, AuthResult, AuthStatusInfo, ClerkUserInfo, Config, DEFAULT_API_URL, EnvMismatch, InitOptions, InitResult, InitService, OAuthCallbackResult, OAuthServerResult, OrgListResult, OrgSwitchResult, OrganizationInfo, PKCEChallenge, ProjectContext, StoredCredentials, TokenResponse, buildAuthorizationUrl, createApiClient, deleteCredentials, exchangeCodeForTokens, formatCredentialsMismatchWarning, formatEnvMismatchError, formatError, formatInProjectSwitchWarning, formatProjectOrgFlagError, generatePKCEChallenge, getActiveAuthConfig, getConfig, getCredentialsPath, getUserInfo, index_d_exports as iac, isInsideProject, isTokenExpired, loadCredentials, refreshAccessToken, renderProjectContextLine, resolveAppUrl, resolveProjectContext, sanitizeFileName, saveCredentials, setAuthConfig, setAuthEnv, startOAuthServer, tokenResponseToCredentials, unwrap, validateEnvAgainstProject };
|
|
4
|
+
export { AUTH_ENVS, ApiClient, ApiError, AuthConfig, AuthEnv, AuthResult, AuthStatusInfo, ClerkUserInfo, Config, DEFAULT_API_URL, EnvMismatch, InitOptions, InitResult, InitService, OAuthCallbackResult, OAuthServerResult, OrgListResult, OrgSwitchResult, OrganizationInfo, PKCEChallenge, PerformOAuthLoginOptions, PerformOAuthLoginResult, ProjectContext, StoredCredentials, TokenResponse, buildAuthorizationUrl, createApiClient, deleteCredentials, exchangeCodeForTokens, formatCredentialsMismatchWarning, formatEnvMismatchError, formatError, formatInProjectSwitchWarning, formatProjectOrgFlagError, generatePKCEChallenge, getActiveAuthConfig, getConfig, getCredentialsPath, getUserInfo, index_d_exports as iac, isInsideProject, isTokenExpired, loadCredentials, performOAuthLogin, refreshAccessToken, renderProjectContextLine, resolveApiUrl, resolveAppUrl, resolveProjectContext, sanitizeFileName, saveCredentials, setAuthConfig, setAuthEnv, startOAuthServer, tokenResponseToCredentials, unwrap, validateEnvAgainstProject };
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
export { AUTH_ENVS, ApiError, DEFAULT_API_URL, InitService, buildAuthorizationUrl, createApiClient, deleteCredentials, exchangeCodeForTokens, formatCredentialsMismatchWarning, formatEnvMismatchError, formatError, formatInProjectSwitchWarning, formatProjectOrgFlagError, generatePKCEChallenge, getActiveAuthConfig, getConfig, getCredentialsPath, getUserInfo, iac_exports as iac, isInsideProject, isTokenExpired, loadCredentials, refreshAccessToken, renderProjectContextLine, resolveAppUrl, resolveProjectContext, sanitizeFileName, saveCredentials, setAuthConfig, setAuthEnv, startOAuthServer, tokenResponseToCredentials, unwrap, validateEnvAgainstProject };
|
|
1
|
+
import { A as buildAuthorizationUrl, B as deleteCredentials, C as formatError, D as resolveApiUrl, E as getConfig, F as refreshAccessToken, G as ApiError, H as isTokenExpired, I as setAuthConfig, L as setAuthEnv, M as generatePKCEChallenge, N as getActiveAuthConfig, O as performOAuthLogin, P as getUserInfo, R as tokenResponseToCredentials, S as resolveAppUrl, T as DEFAULT_API_URL, U as loadCredentials, V as getCredentialsPath, W as saveCredentials, a as formatInProjectSwitchWarning, b as createApiClient, c as isInsideProject, d as iac_exports, i as formatEnvMismatchError, j as exchangeCodeForTokens, k as AUTH_ENVS, l as resolveProjectContext, o as formatProjectOrgFlagError, r as formatCredentialsMismatchWarning, s as renderProjectContextLine, t as InitService, u as validateEnvAgainstProject, w as sanitizeFileName, x as unwrap, z as startOAuthServer } from "./core-CY9pC37x.mjs";
|
|
2
|
+
export { AUTH_ENVS, ApiError, DEFAULT_API_URL, InitService, buildAuthorizationUrl, createApiClient, deleteCredentials, exchangeCodeForTokens, formatCredentialsMismatchWarning, formatEnvMismatchError, formatError, formatInProjectSwitchWarning, formatProjectOrgFlagError, generatePKCEChallenge, getActiveAuthConfig, getConfig, getCredentialsPath, getUserInfo, iac_exports as iac, isInsideProject, isTokenExpired, loadCredentials, performOAuthLogin, refreshAccessToken, renderProjectContextLine, resolveApiUrl, resolveAppUrl, resolveProjectContext, sanitizeFileName, saveCredentials, setAuthConfig, setAuthEnv, startOAuthServer, tokenResponseToCredentials, unwrap, validateEnvAgainstProject };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { x as unwrap } from "./core-
|
|
2
|
-
import { n as createListRender, r as defineApiCommand, t as bodyFlag } from "./factory-
|
|
1
|
+
import { x as unwrap } from "./core-CY9pC37x.mjs";
|
|
2
|
+
import { n as createListRender, r as defineApiCommand, t as bodyFlag } from "./factory-DTqayaCF.mjs";
|
|
3
3
|
import { Args, Flags } from "@oclif/core";
|
|
4
4
|
//#region src/adapters/oclif/presets.ts
|
|
5
5
|
function camelToKebab(s) {
|
|
@@ -11,19 +11,18 @@ set -euo pipefail
|
|
|
11
11
|
# named volume keeps the activation state across rebuilds, so this script
|
|
12
12
|
# doesn't need to re-activate on every start.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
need_init=false
|
|
14
|
+
need_setup=false
|
|
16
15
|
|
|
17
16
|
if command -v revos >/dev/null 2>&1; then
|
|
18
17
|
if ! revos auth status --json 2>/dev/null | jq -e '.authenticated' >/dev/null 2>&1; then
|
|
19
|
-
|
|
18
|
+
need_setup=true
|
|
20
19
|
fi
|
|
21
20
|
if [ ! -s "$HOME/.revos/<%=projectSlug%>-gsa-creds.json" ]; then
|
|
22
|
-
|
|
21
|
+
need_setup=true
|
|
23
22
|
fi
|
|
24
23
|
fi
|
|
25
24
|
|
|
26
|
-
if $
|
|
25
|
+
if $need_setup; then
|
|
27
26
|
echo ""
|
|
28
27
|
echo "████████████████████████████████████████████████████████████████████████"
|
|
29
28
|
echo "█ █"
|
|
@@ -31,9 +30,6 @@ if $need_login || $need_init; then
|
|
|
31
30
|
echo "█ █"
|
|
32
31
|
echo "█ Open a terminal and run: █"
|
|
33
32
|
echo "█ █"
|
|
34
|
-
$need_login && \
|
|
35
|
-
echo "█ revos auth login █"
|
|
36
|
-
$need_init && \
|
|
37
33
|
echo "█ revos init █"
|
|
38
34
|
echo "█ █"
|
|
39
35
|
echo "████████████████████████████████████████████████████████████████████████"
|
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
# RevOS dev-container welcome check. Sourced from ~/.bashrc on every
|
|
2
2
|
# interactive shell. Silent once `revos auth status` is authenticated and
|
|
3
|
-
# the GSA key file is present.
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
# the GSA key file is present. `revos init` handles both — it signs you in
|
|
4
|
+
# via the browser if needed, then provisions the GSA key.
|
|
5
|
+
__revos_need_setup=false
|
|
6
6
|
|
|
7
7
|
if ! command -v revos >/dev/null 2>&1; then
|
|
8
8
|
return 0
|
|
9
9
|
fi
|
|
10
10
|
if ! revos auth status --json 2>/dev/null | jq -e '.authenticated' >/dev/null 2>&1; then
|
|
11
|
-
|
|
11
|
+
__revos_need_setup=true
|
|
12
12
|
fi
|
|
13
13
|
if [ ! -s "$HOME/.revos/<%=projectSlug%>-gsa-creds.json" ]; then
|
|
14
|
-
|
|
14
|
+
__revos_need_setup=true
|
|
15
15
|
fi
|
|
16
16
|
|
|
17
|
-
if $
|
|
17
|
+
if $__revos_need_setup; then
|
|
18
18
|
echo ""
|
|
19
19
|
echo "============================================================"
|
|
20
20
|
echo " Welcome to <%=projectName%> dev container!"
|
|
21
21
|
echo " To finish setup, run:"
|
|
22
|
-
|
|
23
|
-
$__revos_need_init && echo " revos init"
|
|
22
|
+
echo " revos init"
|
|
24
23
|
echo "============================================================"
|
|
25
24
|
echo ""
|
|
26
25
|
fi
|
|
27
|
-
unset
|
|
26
|
+
unset __revos_need_setup
|
package/dist/templates/README.md
CHANGED
|
@@ -8,14 +8,13 @@ This project is designed to be opened in a Dev Container. All tooling — Python
|
|
|
8
8
|
|
|
9
9
|
1. **Open in VS Code** and click **Reopen in Container** when prompted. First open builds the image (~1–2 min); subsequent opens are instant.
|
|
10
10
|
|
|
11
|
-
2. **One-time setup inside the container.** Open a terminal and run
|
|
11
|
+
2. **One-time setup inside the container.** Open a terminal and run:
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
revos
|
|
15
|
-
revos init # provisions the BigQuery service account key
|
|
14
|
+
revos init # signs you in via browser (if needed), then provisions the BigQuery service account key
|
|
16
15
|
```
|
|
17
16
|
|
|
18
|
-
`revos init` detects it's running inside an existing project, skips the org prompt and scaffolding, and just fills in the missing GCP key.
|
|
17
|
+
`revos init` detects it's running inside an existing project, skips the org prompt and scaffolding, and just fills in the missing GCP key. If you aren't authenticated yet, it opens the browser for sign-in first — the org is taken from `revos.yaml`.
|
|
19
18
|
|
|
20
19
|
**You won't need to repeat this.** Credentials persist in per-project Docker volumes, so every future `Rebuild Container`, restart, or VS Code reopen lands in a fully-authenticated state — the container will print `REVOS DEV CONTAINER — READY` on every start.
|
|
21
20
|
|
|
@@ -76,7 +75,7 @@ Inside the container, ask Claude things like _"create a Connection for our Strip
|
|
|
76
75
|
|
|
77
76
|
## Troubleshooting
|
|
78
77
|
|
|
79
|
-
- **Container shows `SETUP REQUIRED` banner.** Run `revos
|
|
78
|
+
- **Container shows `SETUP REQUIRED` banner.** Run `revos init` in the container terminal — it handles login automatically.
|
|
80
79
|
- **`bq` or `dbt` fails with auth errors.** Container's gcloud is not activated. Rebuild the container, or run `bash .devcontainer/post-start.sh` to re-activate.
|
|
81
80
|
- **Start from a clean slate.** Wipe the per-project Docker volumes from your host:
|
|
82
81
|
```bash
|