@revos/cli 0.2.0 → 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/LICENSE +9 -0
- package/README.md +286 -41
- package/dist/adapters/oclif/commands/action-runs/get.mjs +1 -1
- package/dist/adapters/oclif/commands/action-runs/list.mjs +8 -2
- 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 +8 -4
- 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 +8 -2
- package/dist/adapters/oclif/commands/ai-instructions/update.mjs +1 -1
- package/dist/adapters/oclif/commands/api.d.mts +11 -0
- package/dist/adapters/oclif/commands/api.mjs +112 -0
- package/dist/adapters/oclif/commands/apply.d.mts +28 -0
- package/dist/adapters/oclif/commands/apply.mjs +77 -0
- package/dist/adapters/oclif/commands/auth/login.d.mts +5 -4
- package/dist/adapters/oclif/commands/auth/login.mjs +22 -11
- package/dist/adapters/oclif/commands/auth/logout.d.mts +1 -1
- package/dist/adapters/oclif/commands/auth/logout.mjs +7 -3
- package/dist/adapters/oclif/commands/auth/status.d.mts +2 -2
- package/dist/adapters/oclif/commands/auth/status.mjs +2 -2
- package/dist/adapters/oclif/commands/connections/create.d.mts +6 -0
- package/dist/adapters/oclif/commands/connections/create.mjs +8 -0
- package/dist/adapters/oclif/commands/connections/delete.d.mts +6 -0
- package/dist/adapters/oclif/commands/connections/delete.mjs +8 -0
- package/dist/adapters/oclif/commands/connections/get.d.mts +6 -0
- package/dist/adapters/oclif/commands/connections/get.mjs +8 -0
- package/dist/adapters/oclif/commands/connections/list.d.mts +6 -0
- package/dist/adapters/oclif/commands/connections/list.mjs +14 -0
- package/dist/adapters/oclif/commands/connections/update.d.mts +6 -0
- package/dist/adapters/oclif/commands/connections/update.mjs +8 -0
- package/dist/adapters/oclif/commands/cubes/create.d.mts +6 -0
- package/dist/adapters/oclif/commands/cubes/create.mjs +8 -0
- package/dist/adapters/oclif/commands/cubes/delete.d.mts +6 -0
- package/dist/adapters/oclif/commands/cubes/delete.mjs +8 -0
- package/dist/adapters/oclif/commands/cubes/get.d.mts +6 -0
- package/dist/adapters/oclif/commands/cubes/get.mjs +8 -0
- package/dist/adapters/oclif/commands/cubes/list.d.mts +6 -0
- package/dist/adapters/oclif/commands/cubes/list.mjs +13 -0
- package/dist/adapters/oclif/commands/cubes/update.d.mts +6 -0
- package/dist/adapters/oclif/commands/cubes/update.mjs +8 -0
- package/dist/adapters/oclif/commands/diff.d.mts +27 -0
- package/dist/adapters/oclif/commands/diff.mjs +66 -0
- 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 +7 -2
- package/dist/adapters/oclif/commands/init.d.mts +2 -1
- package/dist/adapters/oclif/commands/init.mjs +28 -24
- package/dist/adapters/oclif/commands/org/create.mjs +1 -1
- package/dist/adapters/oclif/commands/org/current.d.mts +2 -2
- 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.d.mts +3 -11
- package/dist/adapters/oclif/commands/org/list.mjs +26 -26
- package/dist/adapters/oclif/commands/org/switch.d.mts +3 -2
- package/dist/adapters/oclif/commands/org/switch.mjs +13 -5
- package/dist/adapters/oclif/commands/pull.d.mts +28 -0
- package/dist/adapters/oclif/commands/pull.mjs +88 -0
- package/dist/adapters/oclif/commands/score-groups/create.mjs +3 -2
- 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 +3 -2
- package/dist/adapters/oclif/commands/score-groups/update.mjs +1 -1
- package/dist/adapters/oclif/commands/scores/create.mjs +3 -2
- package/dist/adapters/oclif/commands/scores/delete.mjs +1 -1
- package/dist/adapters/oclif/commands/scores/list.mjs +3 -2
- 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 +16 -5
- package/dist/adapters/oclif/commands/segments/list.mjs +9 -2
- 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 +11 -0
- package/dist/adapters/oclif/commands/sources/create.mjs +16 -0
- package/dist/adapters/oclif/commands/sources/delete.d.mts +6 -0
- package/dist/adapters/oclif/commands/sources/delete.mjs +8 -0
- package/dist/adapters/oclif/commands/sources/get.d.mts +6 -0
- package/dist/adapters/oclif/commands/sources/get.mjs +8 -0
- package/dist/adapters/oclif/commands/sources/list-streams.d.mts +6 -0
- package/dist/adapters/oclif/commands/sources/list-streams.mjs +31 -0
- package/dist/adapters/oclif/commands/sources/list.d.mts +6 -0
- package/dist/adapters/oclif/commands/sources/list.mjs +13 -0
- package/dist/adapters/oclif/commands/sources/update.d.mts +15 -0
- package/dist/adapters/oclif/commands/sources/update.mjs +21 -0
- package/dist/adapters/oclif/commands/status.d.mts +26 -0
- package/dist/adapters/oclif/commands/status.mjs +77 -0
- package/dist/adapters/oclif/commands/table-views/create.mjs +3 -2
- package/dist/adapters/oclif/commands/table-views/delete.mjs +1 -1
- package/dist/adapters/oclif/commands/table-views/list.mjs +3 -2
- 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 +3 -2
- package/dist/adapters/oclif/commands/tables/update.mjs +1 -1
- package/dist/{base.command-d7VW6WTp.d.mts → base.command-D7X3ZNtY.d.mts} +0 -1
- package/dist/{base.command-DlVQ9Cqa.mjs → base.command-cV5d65r8.mjs} +15 -12
- package/dist/chunk-CfYAbeIz.mjs +13 -0
- package/dist/core-CMrP5BQS.mjs +2378 -0
- package/dist/{factory-D9sR_S_g.mjs → factory-C6XLqhT9.mjs} +44 -10
- package/dist/iac-render-BSZZEP0n.mjs +17 -0
- package/dist/index-BqKwXXAo.d.mts +598 -0
- package/dist/index.d.mts +3 -4
- package/dist/index.mjs +2 -2
- package/dist/{presets-Cvazkjmu.mjs → presets-CJbFbHlw.mjs} +35 -8
- package/dist/templates/.claude/settings.json +39 -0
- package/dist/templates/.devcontainer/devcontainer.json +2 -2
- package/dist/templates/.devcontainer/setup.sh +3 -0
- package/dist/templates/AGENTS.md +36 -13
- package/dist/templates/dbt/dbt_project.yml +2 -2
- package/dist/templates/skills/create-connections/SKILL.md +210 -0
- package/dist/templates/skills/create-connections/references/mappers.md +152 -0
- package/dist/templates/skills/{create-semantic-model → create-cubes}/SKILL.md +28 -26
- package/dist/templates/skills/create-cubes/references/bq-pk-fk-conventions.md +183 -0
- package/dist/templates/skills/{create-semantic-model → create-cubes}/references/cube-examples.md +85 -7
- package/dist/templates/skills/create-cubes/references/hubspot-entities.md +289 -0
- package/dist/templates/skills/create-cubes/references/jira-entities.md +201 -0
- package/dist/templates/skills/create-cubes/references/netsuite-entities.md +121 -0
- package/dist/templates/skills/create-cubes/references/stripe-entities.md +114 -0
- package/dist/templates/skills/create-dbt-transformations/SKILL.md +62 -33
- package/dist/templates/skills/create-dbt-transformations/references/edge-cases.md +21 -3
- package/dist/templates/skills/create-dbt-transformations/references/schema-conventions.md +21 -7
- package/dist/templates/skills/create-dbt-transformations/references/sql-templates.md +34 -20
- package/dist/templates/skills/explore-lakehouse/SKILL.md +8 -4
- package/dist/templates/skills/load-sample-data/SKILL.md +119 -0
- package/dist/templates/skills/visualize-semantic-model/SKILL.md +159 -0
- package/dist/templates/skills/visualize-semantic-model/scripts/render_graph.py +186 -0
- package/dist/{types-Y_ht_ja5.d.mts → types-CGjxcj4L.d.mts} +3 -0
- package/package.json +48 -6
- package/dist/adapters/oclif/commands/overlays/diff.d.mts +0 -19
- package/dist/adapters/oclif/commands/overlays/diff.mjs +0 -80
- package/dist/adapters/oclif/commands/overlays/pull.d.mts +0 -15
- package/dist/adapters/oclif/commands/overlays/pull.mjs +0 -44
- package/dist/adapters/oclif/commands/overlays/push.d.mts +0 -18
- package/dist/adapters/oclif/commands/overlays/push.mjs +0 -59
- package/dist/adapters/oclif/commands/overlays/status.d.mts +0 -18
- package/dist/adapters/oclif/commands/overlays/status.mjs +0 -53
- package/dist/core-gKJ_V-K5.mjs +0 -973
- package/dist/index-KAzwt5vr.d.mts +0 -190
- package/dist/types-C_p_6rkj.d.mts +0 -69
- /package/dist/templates/skills/{create-semantic-model → create-cubes}/references/key-patterns.md +0 -0
- /package/dist/templates/skills/{create-semantic-model → create-cubes}/references/validation-queries.md +0 -0
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import { i as listCommand } from "../../../../presets-
|
|
1
|
+
import { i as listCommand } from "../../../../presets-CJbFbHlw.mjs";
|
|
2
2
|
//#region src/adapters/oclif/commands/segments/list.ts
|
|
3
3
|
var list_default = listCommand({
|
|
4
4
|
resource: "segments",
|
|
5
|
-
description: "List segments"
|
|
5
|
+
description: "List segments",
|
|
6
|
+
defaultColumns: [
|
|
7
|
+
"id",
|
|
8
|
+
"name",
|
|
9
|
+
"type",
|
|
10
|
+
"status",
|
|
11
|
+
"objectCount"
|
|
12
|
+
]
|
|
6
13
|
});
|
|
7
14
|
//#endregion
|
|
8
15
|
export { list_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { p as unwrap } from "../../../../core-CMrP5BQS.mjs";
|
|
2
|
+
import { r as defineApiCommand } from "../../../../factory-C6XLqhT9.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({
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { t as BaseCommand } from "../../../../base.command-D7X3ZNtY.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/adapters/oclif/commands/sources/create.d.ts
|
|
4
|
+
declare class SourcesCreate extends BaseCommand<typeof SourcesCreate> {
|
|
5
|
+
static description: string;
|
|
6
|
+
run(): Promise<{
|
|
7
|
+
url: string;
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { SourcesCreate as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { m as resolveAppUrl, v as getConfig } from "../../../../core-CMrP5BQS.mjs";
|
|
2
|
+
import { t as BaseCommand } from "../../../../base.command-cV5d65r8.mjs";
|
|
3
|
+
import chalk from "chalk";
|
|
4
|
+
import open from "open";
|
|
5
|
+
//#region src/adapters/oclif/commands/sources/create.ts
|
|
6
|
+
var SourcesCreate = class extends BaseCommand {
|
|
7
|
+
static description = "Open the RevOS UI to create a new data source";
|
|
8
|
+
async run() {
|
|
9
|
+
const url = `${resolveAppUrl((await getConfig()).apiUrl)}/integrations?action=new`;
|
|
10
|
+
if (!this.jsonEnabled()) this.log(`Opening ${chalk.bold(url)} in your browser...`);
|
|
11
|
+
await open(url);
|
|
12
|
+
return { url };
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { SourcesCreate as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { n as deleteCommand } from "../../../../presets-CJbFbHlw.mjs";
|
|
2
|
+
//#region src/adapters/oclif/commands/sources/delete.ts
|
|
3
|
+
var delete_default = deleteCommand({
|
|
4
|
+
resource: "sources",
|
|
5
|
+
description: "Delete a data source"
|
|
6
|
+
});
|
|
7
|
+
//#endregion
|
|
8
|
+
export { delete_default as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { r as getCommand } from "../../../../presets-CJbFbHlw.mjs";
|
|
2
|
+
//#region src/adapters/oclif/commands/sources/get.ts
|
|
3
|
+
var get_default = getCommand({
|
|
4
|
+
resource: "sources",
|
|
5
|
+
description: "Get a data source by ID"
|
|
6
|
+
});
|
|
7
|
+
//#endregion
|
|
8
|
+
export { get_default as default };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { p as unwrap } from "../../../../core-CMrP5BQS.mjs";
|
|
2
|
+
import { n as createListRender, r as defineApiCommand } from "../../../../factory-C6XLqhT9.mjs";
|
|
3
|
+
import { Args, Flags } from "@oclif/core";
|
|
4
|
+
var list_streams_default = defineApiCommand({
|
|
5
|
+
description: "List streams the source exposes (sync modes, cursor/PK candidates, field paths)",
|
|
6
|
+
args: { id: Args.string({
|
|
7
|
+
description: "Source ID",
|
|
8
|
+
required: true
|
|
9
|
+
}) },
|
|
10
|
+
flags: {
|
|
11
|
+
"ignore-cache": Flags.boolean({ description: "Bypass the cached catalog and re-discover from the source" }),
|
|
12
|
+
columns: Flags.string({
|
|
13
|
+
description: "Columns to display in table output (comma-separated). Overrides the default. Ignored with --json.",
|
|
14
|
+
helpValue: "a,b,c"
|
|
15
|
+
})
|
|
16
|
+
},
|
|
17
|
+
call: async ({ api, args, flags }) => {
|
|
18
|
+
const params = { id: args.id };
|
|
19
|
+
if (flags["ignore-cache"]) params.ignoreCache = true;
|
|
20
|
+
return unwrap(await api.sources.listStreams(params));
|
|
21
|
+
},
|
|
22
|
+
render: createListRender([
|
|
23
|
+
"streamName",
|
|
24
|
+
"streamnamespace",
|
|
25
|
+
"syncModes",
|
|
26
|
+
"defaultCursorField",
|
|
27
|
+
"sourceDefinedPrimaryKey"
|
|
28
|
+
])
|
|
29
|
+
});
|
|
30
|
+
//#endregion
|
|
31
|
+
export { list_streams_default as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { i as listCommand } from "../../../../presets-CJbFbHlw.mjs";
|
|
2
|
+
//#region src/adapters/oclif/commands/sources/list.ts
|
|
3
|
+
var list_default = listCommand({
|
|
4
|
+
resource: "sources",
|
|
5
|
+
description: "List data sources",
|
|
6
|
+
defaultColumns: [
|
|
7
|
+
"id",
|
|
8
|
+
"name",
|
|
9
|
+
"sourceType"
|
|
10
|
+
]
|
|
11
|
+
});
|
|
12
|
+
//#endregion
|
|
13
|
+
export { list_default as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { t as BaseCommand } from "../../../../base.command-D7X3ZNtY.mjs";
|
|
2
|
+
import * as _$_oclif_core_interfaces0 from "@oclif/core/interfaces";
|
|
3
|
+
|
|
4
|
+
//#region src/adapters/oclif/commands/sources/update.d.ts
|
|
5
|
+
declare class SourcesUpdate extends BaseCommand<typeof SourcesUpdate> {
|
|
6
|
+
static description: string;
|
|
7
|
+
static args: {
|
|
8
|
+
id: _$_oclif_core_interfaces0.Arg<string, Record<string, unknown>>;
|
|
9
|
+
};
|
|
10
|
+
run(): Promise<{
|
|
11
|
+
url: string;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { SourcesUpdate as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { m as resolveAppUrl, v as getConfig } from "../../../../core-CMrP5BQS.mjs";
|
|
2
|
+
import { t as BaseCommand } from "../../../../base.command-cV5d65r8.mjs";
|
|
3
|
+
import chalk from "chalk";
|
|
4
|
+
import { Args } from "@oclif/core";
|
|
5
|
+
import open from "open";
|
|
6
|
+
//#region src/adapters/oclif/commands/sources/update.ts
|
|
7
|
+
var SourcesUpdate = class extends BaseCommand {
|
|
8
|
+
static description = "Open the RevOS UI to edit an existing data source";
|
|
9
|
+
static args = { id: Args.string({
|
|
10
|
+
description: "Source ID",
|
|
11
|
+
required: true
|
|
12
|
+
}) };
|
|
13
|
+
async run() {
|
|
14
|
+
const url = `${resolveAppUrl((await getConfig()).apiUrl)}/integrations?action=edit&id=${this.args.id}`;
|
|
15
|
+
if (!this.jsonEnabled()) this.log(`Opening ${chalk.bold(url)} in your browser...`);
|
|
16
|
+
await open(url);
|
|
17
|
+
return { url };
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { SourcesUpdate as default };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { a as ResourceStatus, c as IacError } from "../../../index-BqKwXXAo.mjs";
|
|
2
|
+
import { t as BaseCommand } from "../../../base.command-D7X3ZNtY.mjs";
|
|
3
|
+
import * as _$_oclif_core_interfaces0 from "@oclif/core/interfaces";
|
|
4
|
+
|
|
5
|
+
//#region src/adapters/oclif/commands/status.d.ts
|
|
6
|
+
interface StatusJsonOutput {
|
|
7
|
+
project: {
|
|
8
|
+
path: string;
|
|
9
|
+
orgId: string;
|
|
10
|
+
};
|
|
11
|
+
resources: ResourceStatus[];
|
|
12
|
+
errors: IacError[];
|
|
13
|
+
}
|
|
14
|
+
declare class Status extends BaseCommand<typeof Status> {
|
|
15
|
+
static description: string;
|
|
16
|
+
static flags: {
|
|
17
|
+
project: _$_oclif_core_interfaces0.OptionFlag<string | undefined, _$_oclif_core_interfaces0.CustomOptions>;
|
|
18
|
+
columns: _$_oclif_core_interfaces0.OptionFlag<string | undefined, _$_oclif_core_interfaces0.CustomOptions>;
|
|
19
|
+
};
|
|
20
|
+
static args: {
|
|
21
|
+
path: _$_oclif_core_interfaces0.Arg<string | undefined, Record<string, unknown>>;
|
|
22
|
+
};
|
|
23
|
+
run(): Promise<StatusJsonOutput>;
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { StatusJsonOutput, Status as default };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { c as loadResources, d as projectRoot, f as createApiClient, i as describeResources, l as buildIacRegistry, u as discoverProject } from "../../../core-CMrP5BQS.mjs";
|
|
2
|
+
import { t as BaseCommand } from "../../../base.command-cV5d65r8.mjs";
|
|
3
|
+
import { a as resolveColumns, i as renderList } from "../../../factory-C6XLqhT9.mjs";
|
|
4
|
+
import { n as renderIacErrors } from "../../../iac-render-BSZZEP0n.mjs";
|
|
5
|
+
import chalk from "chalk";
|
|
6
|
+
import { Args, Flags } from "@oclif/core";
|
|
7
|
+
//#region src/adapters/oclif/commands/status.ts
|
|
8
|
+
const DEFAULT_COLUMNS = [
|
|
9
|
+
"address",
|
|
10
|
+
"state",
|
|
11
|
+
"id",
|
|
12
|
+
"source"
|
|
13
|
+
];
|
|
14
|
+
const STATE_LABELS = {
|
|
15
|
+
ok: chalk.green("ok"),
|
|
16
|
+
drifted: chalk.yellow("drifted"),
|
|
17
|
+
pending: chalk.cyan("pending"),
|
|
18
|
+
tampered: chalk.red("tampered")
|
|
19
|
+
};
|
|
20
|
+
var Status = class extends BaseCommand {
|
|
21
|
+
static description = "Show local revos resources and their state (pending until applied)";
|
|
22
|
+
static flags = {
|
|
23
|
+
project: Flags.string({ description: "Path to the project root (defaults to walking up from cwd)" }),
|
|
24
|
+
columns: Flags.string({
|
|
25
|
+
description: `Columns to display in table output (comma-separated). Available: ${DEFAULT_COLUMNS.join(", ")}. Ignored with --json.`,
|
|
26
|
+
helpValue: "address,state"
|
|
27
|
+
})
|
|
28
|
+
};
|
|
29
|
+
static args = { path: Args.string({
|
|
30
|
+
description: "Restrict scan to a sub-path within the project (default: project root)",
|
|
31
|
+
required: false
|
|
32
|
+
}) };
|
|
33
|
+
async run() {
|
|
34
|
+
const project = discoverProject({
|
|
35
|
+
cwd: process.cwd(),
|
|
36
|
+
projectPath: this.flags.project
|
|
37
|
+
});
|
|
38
|
+
const load = loadResources({
|
|
39
|
+
project,
|
|
40
|
+
registry: buildIacRegistry(createApiClient({
|
|
41
|
+
apiUrl: process.env.REVOS_API_URL ?? "https://api.revos.ai",
|
|
42
|
+
token: "",
|
|
43
|
+
organizationId: project.metadata.orgId
|
|
44
|
+
})),
|
|
45
|
+
startPath: this.args.path ? this.args.path : projectRoot(project)
|
|
46
|
+
});
|
|
47
|
+
const resources = describeResources(load);
|
|
48
|
+
if (!this.jsonEnabled()) {
|
|
49
|
+
if (load.errors.length > 0) {
|
|
50
|
+
renderIacErrors(load.errors, (msg) => this.log(msg));
|
|
51
|
+
this.log("");
|
|
52
|
+
}
|
|
53
|
+
if (resources.length === 0) this.log(chalk.dim("No resources found. Add `.yaml` files under the project root."));
|
|
54
|
+
else {
|
|
55
|
+
const rows = resources.map((r) => ({
|
|
56
|
+
address: r.address,
|
|
57
|
+
state: STATE_LABELS[r.state],
|
|
58
|
+
id: r.id ?? chalk.dim("—"),
|
|
59
|
+
source: `${r.source.file}${r.source.line ? `:${r.source.line}` : ""}`
|
|
60
|
+
}));
|
|
61
|
+
const columns = resolveColumns(this.flags.columns, DEFAULT_COLUMNS);
|
|
62
|
+
renderList(this, rows, { columns });
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (load.errors.length > 0) this.exit(1);
|
|
66
|
+
return {
|
|
67
|
+
project: {
|
|
68
|
+
path: project.path,
|
|
69
|
+
orgId: project.metadata.orgId
|
|
70
|
+
},
|
|
71
|
+
resources,
|
|
72
|
+
errors: load.errors
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
//#endregion
|
|
77
|
+
export { Status as default };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { t as createCommand } from "../../../../presets-
|
|
1
|
+
import { t as createCommand } from "../../../../presets-CJbFbHlw.mjs";
|
|
2
2
|
//#region src/adapters/oclif/commands/table-views/create.ts
|
|
3
3
|
var create_default = createCommand({
|
|
4
4
|
resource: "tableViews",
|
|
5
|
-
description: "Create a new table view"
|
|
5
|
+
description: "Create a new table view",
|
|
6
|
+
pathParams: ["tableId"]
|
|
6
7
|
});
|
|
7
8
|
//#endregion
|
|
8
9
|
export { create_default as default };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { i as listCommand } from "../../../../presets-
|
|
1
|
+
import { i as listCommand } from "../../../../presets-CJbFbHlw.mjs";
|
|
2
2
|
//#region src/adapters/oclif/commands/table-views/list.ts
|
|
3
3
|
var list_default = listCommand({
|
|
4
4
|
resource: "tableViews",
|
|
5
|
-
description: "List table views"
|
|
5
|
+
description: "List table views",
|
|
6
|
+
pathParams: ["tableId"]
|
|
6
7
|
});
|
|
7
8
|
//#endregion
|
|
8
9
|
export { list_default as default };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { i as listCommand } from "../../../../presets-
|
|
1
|
+
import { i as listCommand } from "../../../../presets-CJbFbHlw.mjs";
|
|
2
2
|
//#region src/adapters/oclif/commands/tables/list.ts
|
|
3
3
|
var list_default = listCommand({
|
|
4
4
|
resource: "tables",
|
|
5
|
-
description: "List tables"
|
|
5
|
+
description: "List tables",
|
|
6
|
+
defaultColumns: ["id", "name"]
|
|
6
7
|
});
|
|
7
8
|
//#endregion
|
|
8
9
|
export { list_default as default };
|
|
@@ -8,7 +8,6 @@ declare abstract class BaseCommand<T extends typeof Command> extends Command {
|
|
|
8
8
|
static enableJsonFlag: boolean;
|
|
9
9
|
static baseFlags: {
|
|
10
10
|
org: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
11
|
-
dev: Interfaces.BooleanFlag<boolean>;
|
|
12
11
|
};
|
|
13
12
|
protected flags: Flags$1<T>;
|
|
14
13
|
protected args: Args$1<T>;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import { E as
|
|
1
|
+
import { E as setAuthConfig, F as ApiError, N as loadCredentials } from "./core-CMrP5BQS.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
|
|
5
5
|
var BaseCommand = class extends Command {
|
|
6
6
|
static enableJsonFlag = true;
|
|
7
|
-
static baseFlags = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}),
|
|
12
|
-
dev: Flags.boolean({ description: "Use development environment (Clerk + API)" })
|
|
13
|
-
};
|
|
7
|
+
static baseFlags = { org: Flags.string({
|
|
8
|
+
char: "o",
|
|
9
|
+
description: "Override organization ID for this command"
|
|
10
|
+
}) };
|
|
14
11
|
flags;
|
|
15
12
|
args;
|
|
16
13
|
async init() {
|
|
@@ -24,10 +21,7 @@ var BaseCommand = class extends Command {
|
|
|
24
21
|
});
|
|
25
22
|
this.flags = flags;
|
|
26
23
|
this.args = args;
|
|
27
|
-
|
|
28
|
-
setClerkEnv("development");
|
|
29
|
-
if (!process.env.REVOS_API_URL) process.env.REVOS_API_URL = "https://api.revos.dev";
|
|
30
|
-
}
|
|
24
|
+
applyStoredEnvironment();
|
|
31
25
|
if (this.flags.org) process.env.REVOS_ORG_ID = this.flags.org;
|
|
32
26
|
}
|
|
33
27
|
table(data, options) {
|
|
@@ -58,5 +52,14 @@ var BaseCommand = class extends Command {
|
|
|
58
52
|
return super.toErrorJson(err);
|
|
59
53
|
}
|
|
60
54
|
};
|
|
55
|
+
function applyStoredEnvironment() {
|
|
56
|
+
const credentials = loadCredentials();
|
|
57
|
+
if (!credentials) return;
|
|
58
|
+
if (credentials.apiUrl && !process.env.REVOS_API_URL) process.env.REVOS_API_URL = credentials.apiUrl;
|
|
59
|
+
if (credentials.authUrl && !process.env.REVOS_AUTH_URL || credentials.authClientId && !process.env.REVOS_AUTH_CLIENT_ID) setAuthConfig({
|
|
60
|
+
authUrl: process.env.REVOS_AUTH_URL ?? credentials.authUrl,
|
|
61
|
+
authClientId: process.env.REVOS_AUTH_CLIENT_ID ?? credentials.authClientId
|
|
62
|
+
});
|
|
63
|
+
}
|
|
61
64
|
//#endregion
|
|
62
65
|
export { BaseCommand as t };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, no_symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) __defProp(target, name, {
|
|
6
|
+
get: all[name],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { __exportAll as t };
|