@revos/cli 0.2.2 → 0.3.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/README.md +33 -9
- 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 +3 -2
- package/dist/adapters/oclif/commands/apply.mjs +2 -2
- package/dist/adapters/oclif/commands/auth/login.d.mts +3 -2
- package/dist/adapters/oclif/commands/auth/login.mjs +9 -3
- package/dist/adapters/oclif/commands/auth/logout.d.mts +2 -1
- package/dist/adapters/oclif/commands/auth/logout.mjs +3 -2
- package/dist/adapters/oclif/commands/auth/status.d.mts +4 -2
- package/dist/adapters/oclif/commands/auth/status.mjs +23 -3
- 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/update.mjs +1 -1
- package/dist/adapters/oclif/commands/diff.d.mts +3 -2
- 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.d.mts +4 -1
- package/dist/adapters/oclif/commands/init.mjs +83 -3
- package/dist/adapters/oclif/commands/org/create.mjs +3 -2
- package/dist/adapters/oclif/commands/org/current.d.mts +12 -3
- package/dist/adapters/oclif/commands/org/current.mjs +27 -2
- package/dist/adapters/oclif/commands/org/get.mjs +3 -2
- package/dist/adapters/oclif/commands/org/list.mjs +15 -6
- package/dist/adapters/oclif/commands/org/switch.d.mts +3 -2
- package/dist/adapters/oclif/commands/org/switch.mjs +8 -2
- package/dist/adapters/oclif/commands/pull.d.mts +3 -2
- 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.d.mts +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.d.mts +1 -1
- package/dist/adapters/oclif/commands/sources/update.mjs +2 -2
- package/dist/adapters/oclif/commands/status.d.mts +3 -2
- 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-cV5d65r8.mjs → base.command-BLken6pU.mjs} +20 -2
- package/dist/{base.command-D7X3ZNtY.d.mts → base.command-BmddDbHa.d.mts} +4 -0
- package/dist/context-D5uelKLe.d.mts +62 -0
- package/dist/{core-CMrP5BQS.mjs → core-DsGA_HuL.mjs} +102 -4
- package/dist/{factory-C6XLqhT9.mjs → factory-eslVs9tN.mjs} +3 -2
- package/dist/{index-BqKwXXAo.d.mts → index-Blr5iiwc.d.mts} +37 -42
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +2 -2
- package/dist/{presets-CJbFbHlw.mjs → presets-D0AIVsGO.mjs} +7 -2
- package/dist/templates/.devcontainer/Dockerfile +17 -0
- package/dist/templates/.devcontainer/devcontainer.json +14 -10
- package/dist/templates/.devcontainer/post-create.sh +46 -0
- package/dist/templates/.devcontainer/post-start.sh +65 -0
- package/dist/templates/.devcontainer/welcome.sh +27 -0
- package/dist/templates/README.md +81 -12
- package/dist/templates/gitignore +3 -1
- package/dist/{types-CGjxcj4L.d.mts → types-Bk2Cb5yt.d.mts} +6 -0
- package/package.json +1 -1
- package/dist/templates/.devcontainer/setup.sh +0 -35
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as getConfig, U as ApiError, l as resolveProjectContext, t as InitService } from "../../../core-DsGA_HuL.mjs";
|
|
2
2
|
import { TEMPLATES_DIR } from "../../../templates/index.mjs";
|
|
3
|
-
import { t as BaseCommand } from "../../../base.command-
|
|
3
|
+
import { t as BaseCommand } from "../../../base.command-BLken6pU.mjs";
|
|
4
4
|
import * as fs from "fs";
|
|
5
5
|
import * as path from "path";
|
|
6
6
|
import chalk from "chalk";
|
|
7
|
+
import { execFileSync } from "child_process";
|
|
7
8
|
import { Args, Flags } from "@oclif/core";
|
|
8
9
|
import select from "@inquirer/select";
|
|
9
10
|
//#region src/adapters/oclif/commands/init.ts
|
|
@@ -12,6 +13,7 @@ function isDirEmpty(dirPath) {
|
|
|
12
13
|
}
|
|
13
14
|
var Init = class extends BaseCommand {
|
|
14
15
|
static description = "Scaffold a new RevOS data engineering project";
|
|
16
|
+
static projectContextMode = "relaxed";
|
|
15
17
|
static args = { destination: Args.string({
|
|
16
18
|
description: "Path or project name (default: current directory name). Supports relative and absolute paths.",
|
|
17
19
|
required: false
|
|
@@ -34,6 +36,17 @@ var Init = class extends BaseCommand {
|
|
|
34
36
|
async run() {
|
|
35
37
|
const { apiUrl, token, organizationId } = await getConfig();
|
|
36
38
|
const projectDir = this.args.destination ? path.resolve(this.args.destination) : process.cwd();
|
|
39
|
+
const service = new InitService(TEMPLATES_DIR);
|
|
40
|
+
const projectCtx = fs.existsSync(projectDir) ? resolveProjectContext({ cwd: projectDir }) : null;
|
|
41
|
+
if (projectCtx) {
|
|
42
|
+
await this.runInProject({
|
|
43
|
+
apiUrl,
|
|
44
|
+
token,
|
|
45
|
+
service,
|
|
46
|
+
projectCtx
|
|
47
|
+
});
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
37
50
|
if (fs.existsSync(projectDir) && !isDirEmpty(projectDir) && !this.flags.yes) {
|
|
38
51
|
if (await select({
|
|
39
52
|
message: `Directory "${path.basename(projectDir)}" already exists and is not empty. What would you like to do?`,
|
|
@@ -49,7 +62,6 @@ var Init = class extends BaseCommand {
|
|
|
49
62
|
return;
|
|
50
63
|
}
|
|
51
64
|
}
|
|
52
|
-
const service = new InitService(TEMPLATES_DIR);
|
|
53
65
|
const org = await service.resolveOrganization(apiUrl, token, organizationId).catch((err) => {
|
|
54
66
|
const message = err instanceof Error ? err.message : String(err);
|
|
55
67
|
this.error(message, { exit: 1 });
|
|
@@ -101,6 +113,74 @@ var Init = class extends BaseCommand {
|
|
|
101
113
|
this.log(`\nNext step: open ${chalk.bold(result.projectDir)} in VS Code and click ${chalk.bold("Reopen in Container")}.`);
|
|
102
114
|
this.log(`\n${chalk.dim("Tip: once inside the Dev Container, ask Claude to \"load sample data\" if you need example datasets.")}\n`);
|
|
103
115
|
}
|
|
116
|
+
async runInProject(args) {
|
|
117
|
+
const { apiUrl, token, service, projectCtx } = args;
|
|
118
|
+
const projectSlug = projectCtx.projectFile.metadata.name;
|
|
119
|
+
const orgId = projectCtx.orgId;
|
|
120
|
+
if (!projectSlug) this.error(`revos.yaml at ${projectCtx.projectFile.path} is missing metadata.name — required to locate the GCP service account key.`, { exit: 1 });
|
|
121
|
+
if (this.flags["dry-run"]) {
|
|
122
|
+
this.log(`\nDetected existing RevOS project at ${chalk.dim(projectCtx.projectPath)}`);
|
|
123
|
+
this.log(` Org: ${chalk.bold(orgId)}`);
|
|
124
|
+
const keyPath = InitService.gcpKeyPath(projectSlug);
|
|
125
|
+
if (fs.existsSync(keyPath) && fs.statSync(keyPath).size > 0) this.log(chalk.dim("\nNothing to do — GCP service account key already present."));
|
|
126
|
+
else this.log(`\nWould provision GCP service account key at ${keyPath}`);
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
const org = await service.resolveOrganization(apiUrl, token, orgId).catch((err) => {
|
|
130
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
131
|
+
this.error(message, { exit: 1 });
|
|
132
|
+
});
|
|
133
|
+
this.log(`\nDetected existing RevOS project at ${chalk.dim(projectCtx.projectPath)}`);
|
|
134
|
+
this.log(` Org: ${chalk.bold(org.name)} (${org.id})\n`);
|
|
135
|
+
const result = await service.ensureGcpKey({
|
|
136
|
+
apiUrl,
|
|
137
|
+
token,
|
|
138
|
+
organization: org,
|
|
139
|
+
projectSlug
|
|
140
|
+
}).catch((err) => {
|
|
141
|
+
if (err instanceof ApiError) {
|
|
142
|
+
this.log(chalk.red(`\nAPI error: ${err.status} ${err.statusText}`));
|
|
143
|
+
this.log(chalk.red(`URL: ${err.url}`));
|
|
144
|
+
this.log(chalk.red(`Body: ${JSON.stringify(err.body, null, 2)}`));
|
|
145
|
+
}
|
|
146
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
147
|
+
this.error(message, { exit: 1 });
|
|
148
|
+
});
|
|
149
|
+
if (result.status === "created") {
|
|
150
|
+
this.log(chalk.green(`Provisioned GCP service account key: ${result.keyPath}`));
|
|
151
|
+
this.activateGcloudInContainer(result.keyPath);
|
|
152
|
+
} else this.log(chalk.dim(`Nothing to do — GCP service account key already present at ${result.keyPath}.`));
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* After provisioning a key inside a Dev Container, the GSA still needs to
|
|
156
|
+
* be activated in gcloud's local config for `bq`, `dbt`, and direct
|
|
157
|
+
* `gcloud` commands to work in this shell — postStartCommand already ran
|
|
158
|
+
* with no key file. We do that activation here, but only inside a
|
|
159
|
+
* container (detected via /.dockerenv) so we never touch the user's
|
|
160
|
+
* personal gcloud config on the host.
|
|
161
|
+
*/
|
|
162
|
+
activateGcloudInContainer(keyPath) {
|
|
163
|
+
if (!fs.existsSync("/.dockerenv")) return;
|
|
164
|
+
try {
|
|
165
|
+
execFileSync("gcloud", [
|
|
166
|
+
"auth",
|
|
167
|
+
"activate-service-account",
|
|
168
|
+
"--key-file",
|
|
169
|
+
keyPath
|
|
170
|
+
], { stdio: "ignore" });
|
|
171
|
+
const project = process.env.GOOGLE_CLOUD_PROJECT;
|
|
172
|
+
if (project) execFileSync("gcloud", [
|
|
173
|
+
"config",
|
|
174
|
+
"set",
|
|
175
|
+
"project",
|
|
176
|
+
project
|
|
177
|
+
], { stdio: "ignore" });
|
|
178
|
+
this.log(chalk.green("Activated service account in gcloud."));
|
|
179
|
+
} catch (err) {
|
|
180
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
181
|
+
this.log(chalk.yellow(`Could not activate gcloud automatically (${msg}). Run manually:\n gcloud auth activate-service-account --key-file=${keyPath}`));
|
|
182
|
+
}
|
|
183
|
+
}
|
|
104
184
|
};
|
|
105
185
|
//#endregion
|
|
106
186
|
export { Init as default };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { t as createCommand } from "../../../../presets-
|
|
1
|
+
import { t as createCommand } from "../../../../presets-D0AIVsGO.mjs";
|
|
2
2
|
//#region src/adapters/oclif/commands/org/create.ts
|
|
3
3
|
var create_default = createCommand({
|
|
4
4
|
resource: "organizations",
|
|
5
|
-
description: "Create a new organization"
|
|
5
|
+
description: "Create a new organization",
|
|
6
|
+
projectContextMode: "relaxed"
|
|
6
7
|
});
|
|
7
8
|
//#endregion
|
|
8
9
|
export { create_default as default };
|
|
@@ -1,14 +1,23 @@
|
|
|
1
|
-
import { s as OrganizationInfo } from "../../../../types-
|
|
2
|
-
import { t as BaseCommand } from "../../../../base.command-
|
|
1
|
+
import { s as OrganizationInfo } from "../../../../types-Bk2Cb5yt.mjs";
|
|
2
|
+
import { t as BaseCommand } from "../../../../base.command-BmddDbHa.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/adapters/oclif/commands/org/current.d.ts
|
|
5
5
|
interface CurrentOrgResult {
|
|
6
6
|
organizationId: string | null;
|
|
7
7
|
organization: OrganizationInfo | null;
|
|
8
|
-
source: "env" | "credentials" | null;
|
|
8
|
+
source: "env" | "credentials" | "project" | null;
|
|
9
|
+
project?: {
|
|
10
|
+
name?: string;
|
|
11
|
+
path: string;
|
|
12
|
+
orgId: string;
|
|
13
|
+
};
|
|
14
|
+
globalDefault?: {
|
|
15
|
+
organizationId: string | null;
|
|
16
|
+
};
|
|
9
17
|
}
|
|
10
18
|
declare class OrgCurrent extends BaseCommand<typeof OrgCurrent> {
|
|
11
19
|
static description: string;
|
|
20
|
+
static projectContextMode: "relaxed";
|
|
12
21
|
run(): Promise<CurrentOrgResult>;
|
|
13
22
|
}
|
|
14
23
|
//#endregion
|
|
@@ -1,11 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as BaseCommand } from "../../../../base.command-
|
|
1
|
+
import { E as getConfig, V as loadCredentials, b as createApiClient, l as resolveProjectContext, x as unwrap } from "../../../../core-DsGA_HuL.mjs";
|
|
2
|
+
import { t as BaseCommand } from "../../../../base.command-BLken6pU.mjs";
|
|
3
|
+
import chalk from "chalk";
|
|
3
4
|
//#region src/adapters/oclif/commands/org/current.ts
|
|
4
5
|
var OrgCurrent = class extends BaseCommand {
|
|
5
6
|
static description = "Show currently selected organization";
|
|
7
|
+
static projectContextMode = "relaxed";
|
|
6
8
|
async run() {
|
|
7
9
|
const credentials = loadCredentials();
|
|
10
|
+
const projectContext = resolveProjectContext();
|
|
8
11
|
const envOrgId = process.env.REVOS_ORG_ID;
|
|
12
|
+
if (projectContext) {
|
|
13
|
+
let organization = null;
|
|
14
|
+
try {
|
|
15
|
+
organization = unwrap(await createApiClient(await getConfig()).organizations.list()).find((o) => o.id === projectContext.orgId) ?? null;
|
|
16
|
+
} catch {}
|
|
17
|
+
if (!this.jsonEnabled()) {
|
|
18
|
+
const orgDisplay = organization ? `${organization.name} (${projectContext.orgId})` : projectContext.orgId;
|
|
19
|
+
this.log(`Current organization (from ${chalk.cyan("revos.yaml")}): ${orgDisplay}`);
|
|
20
|
+
if (credentials?.organizationId && credentials.organizationId !== projectContext.orgId) this.log(chalk.gray(`Global default differs: ${credentials.organizationId}`));
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
organizationId: projectContext.orgId,
|
|
24
|
+
organization,
|
|
25
|
+
source: "project",
|
|
26
|
+
project: {
|
|
27
|
+
name: projectContext.projectFile.metadata.name,
|
|
28
|
+
path: projectContext.projectFile.path,
|
|
29
|
+
orgId: projectContext.orgId
|
|
30
|
+
},
|
|
31
|
+
globalDefault: { organizationId: credentials?.organizationId ?? null }
|
|
32
|
+
};
|
|
33
|
+
}
|
|
9
34
|
if (envOrgId) {
|
|
10
35
|
if (!this.jsonEnabled()) this.log(`Current organization (from REVOS_ORG_ID): ${envOrgId}`);
|
|
11
36
|
return {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { r as getCommand } from "../../../../presets-
|
|
1
|
+
import { r as getCommand } from "../../../../presets-D0AIVsGO.mjs";
|
|
2
2
|
//#region src/adapters/oclif/commands/org/get.ts
|
|
3
3
|
var get_default = getCommand({
|
|
4
4
|
resource: "organizations",
|
|
5
|
-
description: "Get an organization by ID"
|
|
5
|
+
description: "Get an organization by ID",
|
|
6
|
+
projectContextMode: "relaxed"
|
|
6
7
|
});
|
|
7
8
|
//#endregion
|
|
8
9
|
export { get_default as default };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as resolveColumns, i as renderList, r as defineApiCommand } from "../../../../factory-
|
|
1
|
+
import { l as resolveProjectContext, x as unwrap } from "../../../../core-DsGA_HuL.mjs";
|
|
2
|
+
import { a as resolveColumns, i as renderList, r as defineApiCommand } from "../../../../factory-eslVs9tN.mjs";
|
|
3
3
|
import chalk from "chalk";
|
|
4
4
|
import { Flags } from "@oclif/core";
|
|
5
5
|
//#region src/adapters/oclif/commands/org/list.ts
|
|
6
6
|
const DEFAULT_COLUMNS = ["id", "name"];
|
|
7
7
|
var list_default = defineApiCommand({
|
|
8
8
|
description: "List organizations you belong to",
|
|
9
|
+
projectContextMode: "relaxed",
|
|
9
10
|
flags: { columns: Flags.string({
|
|
10
11
|
description: "Columns to display in table output (comma-separated). Overrides the resource default. Ignored with --json.",
|
|
11
12
|
helpValue: "a,b,c"
|
|
@@ -22,12 +23,20 @@ var list_default = defineApiCommand({
|
|
|
22
23
|
command.warn("You don't belong to any organizations.");
|
|
23
24
|
return;
|
|
24
25
|
}
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
const projectOrgId = resolveProjectContext()?.orgId;
|
|
27
|
+
const rows = organizations.map((org) => {
|
|
28
|
+
const annotations = [];
|
|
29
|
+
if (org.id === projectOrgId) annotations.push(chalk.cyan("project"));
|
|
30
|
+
if (org.id === currentOrgId && org.id !== projectOrgId) annotations.push(chalk.green("current"));
|
|
31
|
+
const suffix = annotations.length ? ` ${annotations.join(" ")}` : "";
|
|
32
|
+
return {
|
|
33
|
+
id: org.id,
|
|
34
|
+
name: `${org.name}${suffix}`
|
|
35
|
+
};
|
|
36
|
+
});
|
|
29
37
|
const flags = command.flags;
|
|
30
38
|
renderList(command, rows, { columns: resolveColumns(flags.columns, DEFAULT_COLUMNS) });
|
|
39
|
+
if (projectOrgId && projectOrgId !== currentOrgId) command.log(chalk.gray(`\nThis directory is anchored to the project org; the global default differs.`));
|
|
31
40
|
}
|
|
32
41
|
});
|
|
33
42
|
//#endregion
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { o as OrgSwitchResult } from "../../../../types-
|
|
2
|
-
import { t as BaseCommand } from "../../../../base.command-
|
|
1
|
+
import { o as OrgSwitchResult } from "../../../../types-Bk2Cb5yt.mjs";
|
|
2
|
+
import { t as BaseCommand } from "../../../../base.command-BmddDbHa.mjs";
|
|
3
3
|
import * as _$_oclif_core_interfaces0 from "@oclif/core/interfaces";
|
|
4
4
|
|
|
5
5
|
//#region src/adapters/oclif/commands/org/switch.d.ts
|
|
6
6
|
declare class OrgSwitch extends BaseCommand<typeof OrgSwitch> {
|
|
7
7
|
static description: string;
|
|
8
|
+
static projectContextMode: "relaxed";
|
|
8
9
|
static args: {
|
|
9
10
|
id: _$_oclif_core_interfaces0.Arg<string | undefined, Record<string, unknown>>;
|
|
10
11
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as BaseCommand } from "../../../../base.command-
|
|
1
|
+
import { E as getConfig, H as saveCredentials, V as loadCredentials, a as formatInProjectSwitchWarning, b as createApiClient, l as resolveProjectContext, n as selectOrganization, x as unwrap } from "../../../../core-DsGA_HuL.mjs";
|
|
2
|
+
import { t as BaseCommand } from "../../../../base.command-BLken6pU.mjs";
|
|
3
3
|
import * as os from "os";
|
|
4
4
|
import chalk from "chalk";
|
|
5
5
|
import { Args } from "@oclif/core";
|
|
6
6
|
//#region src/adapters/oclif/commands/org/switch.ts
|
|
7
7
|
var OrgSwitch = class extends BaseCommand {
|
|
8
8
|
static description = "Switch to a different organization";
|
|
9
|
+
static projectContextMode = "relaxed";
|
|
9
10
|
static args = { id: Args.string({
|
|
10
11
|
description: "Organization ID",
|
|
11
12
|
required: false
|
|
@@ -29,6 +30,11 @@ var OrgSwitch = class extends BaseCommand {
|
|
|
29
30
|
...credentials,
|
|
30
31
|
organizationId: selected.id
|
|
31
32
|
});
|
|
33
|
+
const projectContext = resolveProjectContext();
|
|
34
|
+
if (projectContext && projectContext.orgId !== selected.id && !json) this.warn(formatInProjectSwitchWarning({
|
|
35
|
+
projectName: projectContext.projectFile.metadata.name,
|
|
36
|
+
projectOrgId: projectContext.orgId
|
|
37
|
+
}));
|
|
32
38
|
if (!json) this.log(chalk.green(`Switched to organization: ${selected.name}`));
|
|
33
39
|
return {
|
|
34
40
|
success: true,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { d as PulledResource } from "../../../index-Blr5iiwc.mjs";
|
|
2
|
+
import { c as IacError } from "../../../context-D5uelKLe.mjs";
|
|
3
|
+
import { t as BaseCommand } from "../../../base.command-BmddDbHa.mjs";
|
|
3
4
|
import * as _$_oclif_core_interfaces0 from "@oclif/core/interfaces";
|
|
4
5
|
|
|
5
6
|
//#region src/adapters/oclif/commands/pull.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as BaseCommand } from "../../../base.command-
|
|
1
|
+
import { E as getConfig, _ as buildIacRegistry, b as createApiClient, p as pull, v as discoverProject, y as projectRoot } from "../../../core-DsGA_HuL.mjs";
|
|
2
|
+
import { t as BaseCommand } from "../../../base.command-BLken6pU.mjs";
|
|
3
3
|
import { n as renderIacErrors } from "../../../iac-render-BSZZEP0n.mjs";
|
|
4
4
|
import chalk from "chalk";
|
|
5
5
|
import { Args, Flags } from "@oclif/core";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createCommand } from "../../../../presets-
|
|
1
|
+
import { t as createCommand } from "../../../../presets-D0AIVsGO.mjs";
|
|
2
2
|
//#region src/adapters/oclif/commands/score-groups/create.ts
|
|
3
3
|
var create_default = createCommand({
|
|
4
4
|
resource: "scoreGroups",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as deleteCommand } from "../../../../presets-
|
|
1
|
+
import { n as deleteCommand } from "../../../../presets-D0AIVsGO.mjs";
|
|
2
2
|
//#region src/adapters/oclif/commands/score-groups/delete.ts
|
|
3
3
|
var delete_default = deleteCommand({
|
|
4
4
|
resource: "scoreGroups",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as updateCommand } from "../../../../presets-
|
|
1
|
+
import { a as updateCommand } from "../../../../presets-D0AIVsGO.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 {
|
|
2
|
-
import { r as defineApiCommand } from "../../../../factory-
|
|
1
|
+
import { x as unwrap } from "../../../../core-DsGA_HuL.mjs";
|
|
2
|
+
import { r as defineApiCommand } from "../../../../factory-eslVs9tN.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 {
|
|
2
|
-
import { r as defineApiCommand } from "../../../../factory-
|
|
1
|
+
import { x as unwrap } from "../../../../core-DsGA_HuL.mjs";
|
|
2
|
+
import { r as defineApiCommand } from "../../../../factory-eslVs9tN.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 {
|
|
2
|
-
import { r as defineApiCommand } from "../../../../factory-
|
|
1
|
+
import { x as unwrap } from "../../../../core-DsGA_HuL.mjs";
|
|
2
|
+
import { r as defineApiCommand } from "../../../../factory-eslVs9tN.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 {
|
|
2
|
-
import { n as createListRender, r as defineApiCommand } from "../../../../factory-
|
|
1
|
+
import { x as unwrap } from "../../../../core-DsGA_HuL.mjs";
|
|
2
|
+
import { n as createListRender, r as defineApiCommand } from "../../../../factory-eslVs9tN.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 {
|
|
2
|
-
import { r as defineApiCommand } from "../../../../factory-
|
|
1
|
+
import { x as unwrap } from "../../../../core-DsGA_HuL.mjs";
|
|
2
|
+
import { r as defineApiCommand } from "../../../../factory-eslVs9tN.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,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseCommand } from "../../../../base.command-
|
|
1
|
+
import { t as BaseCommand } from "../../../../base.command-BmddDbHa.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/adapters/oclif/commands/sources/create.d.ts
|
|
4
4
|
declare class SourcesCreate extends BaseCommand<typeof SourcesCreate> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as BaseCommand } from "../../../../base.command-
|
|
1
|
+
import { E as getConfig, S as resolveAppUrl } from "../../../../core-DsGA_HuL.mjs";
|
|
2
|
+
import { t as BaseCommand } from "../../../../base.command-BLken6pU.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 {
|
|
2
|
-
import { n as createListRender, r as defineApiCommand } from "../../../../factory-
|
|
1
|
+
import { x as unwrap } from "../../../../core-DsGA_HuL.mjs";
|
|
2
|
+
import { n as createListRender, r as defineApiCommand } from "../../../../factory-eslVs9tN.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,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseCommand } from "../../../../base.command-
|
|
1
|
+
import { t as BaseCommand } from "../../../../base.command-BmddDbHa.mjs";
|
|
2
2
|
import * as _$_oclif_core_interfaces0 from "@oclif/core/interfaces";
|
|
3
3
|
|
|
4
4
|
//#region src/adapters/oclif/commands/sources/update.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as BaseCommand } from "../../../../base.command-
|
|
1
|
+
import { E as getConfig, S as resolveAppUrl } from "../../../../core-DsGA_HuL.mjs";
|
|
2
|
+
import { t as BaseCommand } from "../../../../base.command-BLken6pU.mjs";
|
|
3
3
|
import chalk from "chalk";
|
|
4
4
|
import { Args } from "@oclif/core";
|
|
5
5
|
import open from "open";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { u as ResourceStatus } from "../../../index-Blr5iiwc.mjs";
|
|
2
|
+
import { c as IacError } from "../../../context-D5uelKLe.mjs";
|
|
3
|
+
import { t as BaseCommand } from "../../../base.command-BmddDbHa.mjs";
|
|
3
4
|
import * as _$_oclif_core_interfaces0 from "@oclif/core/interfaces";
|
|
4
5
|
|
|
5
6
|
//#region src/adapters/oclif/commands/status.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
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-DsGA_HuL.mjs";
|
|
2
|
+
import { t as BaseCommand } from "../../../base.command-BLken6pU.mjs";
|
|
3
|
+
import { a as resolveColumns, i as renderList } from "../../../factory-eslVs9tN.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";
|