@revos/cli 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/README.md +271 -71
- 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 +2 -2
- 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 +26 -23
- 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 +10 -3
- 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/{integrations/get.d.mts → sources/update.d.mts} +4 -4
- 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-YiwlGlKs.mjs → base.command-cV5d65r8.mjs} +15 -12
- package/dist/chunk-CfYAbeIz.mjs +13 -0
- package/dist/core-CMrP5BQS.mjs +2378 -0
- package/dist/{factory-BrFKT8t-.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-D9b6IWKy.mjs → presets-CJbFbHlw.mjs} +35 -8
- package/dist/templates/.claude/settings.json +39 -0
- package/dist/templates/.devcontainer/setup.sh +3 -0
- package/dist/templates/AGENTS.md +33 -20
- 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 +20 -18
- 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 +2 -2
- 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 +43 -22
- package/dist/templates/skills/create-dbt-transformations/references/edge-cases.md +20 -2
- 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 +3 -3
- package/dist/templates/skills/load-sample-data/SKILL.md +1 -1
- 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 +44 -7
- package/dist/adapters/oclif/commands/integrations/create.d.mts +0 -11
- package/dist/adapters/oclif/commands/integrations/create.mjs +0 -16
- package/dist/adapters/oclif/commands/integrations/get.mjs +0 -21
- package/dist/adapters/oclif/commands/integrations/list.d.mts +0 -11
- package/dist/adapters/oclif/commands/integrations/list.mjs +0 -16
- package/dist/adapters/oclif/commands/integrations/update.d.mts +0 -15
- package/dist/adapters/oclif/commands/integrations/update.mjs +0 -21
- 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 -45
- 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-jpFPylBb.mjs +0 -997
- package/dist/index-DD2Vr-pu.d.mts +0 -193
- 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,21 +0,0 @@
|
|
|
1
|
-
import { b as getConfig, h as resolveAppUrl } from "../../../../core-jpFPylBb.mjs";
|
|
2
|
-
import { t as BaseCommand } from "../../../../base.command-YiwlGlKs.mjs";
|
|
3
|
-
import chalk from "chalk";
|
|
4
|
-
import { Args } from "@oclif/core";
|
|
5
|
-
import open from "open";
|
|
6
|
-
//#region src/adapters/oclif/commands/integrations/update.ts
|
|
7
|
-
var IntegrationsUpdate = class extends BaseCommand {
|
|
8
|
-
static description = "Open the RevOS UI to edit an existing integration";
|
|
9
|
-
static args = { id: Args.string({
|
|
10
|
-
description: "Integration 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 { IntegrationsUpdate as default };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { o as DiffResult } from "../../../../types-C_p_6rkj.mjs";
|
|
2
|
-
import { t as BaseCommand } from "../../../../base.command-d7VW6WTp.mjs";
|
|
3
|
-
import * as _$_oclif_core_interfaces0 from "@oclif/core/interfaces";
|
|
4
|
-
|
|
5
|
-
//#region src/adapters/oclif/commands/overlays/diff.d.ts
|
|
6
|
-
declare class OverlaysDiff extends BaseCommand<typeof OverlaysDiff> {
|
|
7
|
-
static description: string;
|
|
8
|
-
static flags: {
|
|
9
|
-
dir: _$_oclif_core_interfaces0.OptionFlag<string, _$_oclif_core_interfaces0.CustomOptions>;
|
|
10
|
-
};
|
|
11
|
-
static args: {
|
|
12
|
-
files: _$_oclif_core_interfaces0.Arg<string[] | undefined, Record<string, unknown>>;
|
|
13
|
-
};
|
|
14
|
-
run(): Promise<DiffResult>;
|
|
15
|
-
private renderEntry;
|
|
16
|
-
private renderDataDiff;
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
export { OverlaysDiff as default };
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { b as getConfig, p as createApiClient, r as DiffService } from "../../../../core-jpFPylBb.mjs";
|
|
2
|
-
import { t as BaseCommand } from "../../../../base.command-YiwlGlKs.mjs";
|
|
3
|
-
import chalk from "chalk";
|
|
4
|
-
import { Args, Flags } from "@oclif/core";
|
|
5
|
-
//#region src/adapters/oclif/commands/overlays/diff.ts
|
|
6
|
-
var OverlaysDiff = class extends BaseCommand {
|
|
7
|
-
static description = "Show differences between local files and remote overlays";
|
|
8
|
-
static flags = { dir: Flags.string({
|
|
9
|
-
char: "d",
|
|
10
|
-
description: "Directory containing overlay files",
|
|
11
|
-
default: "./semantic"
|
|
12
|
-
}) };
|
|
13
|
-
static args = { files: Args.string({
|
|
14
|
-
description: "Specific files to diff (optional)",
|
|
15
|
-
required: false,
|
|
16
|
-
multiple: true
|
|
17
|
-
}) };
|
|
18
|
-
async run() {
|
|
19
|
-
const { flags, args } = this;
|
|
20
|
-
const files = args.files ?? [];
|
|
21
|
-
const result = await new DiffService({ api: createApiClient(await getConfig()) }).execute({
|
|
22
|
-
dir: flags.dir,
|
|
23
|
-
files: files.length > 0 ? files : void 0
|
|
24
|
-
});
|
|
25
|
-
if (!this.jsonEnabled()) {
|
|
26
|
-
if (result.entries.length === 0) {
|
|
27
|
-
this.warn("No overlay files found.");
|
|
28
|
-
return result;
|
|
29
|
-
}
|
|
30
|
-
for (const entry of result.entries) this.renderEntry(entry);
|
|
31
|
-
this.log("");
|
|
32
|
-
}
|
|
33
|
-
return result;
|
|
34
|
-
}
|
|
35
|
-
renderEntry(entry) {
|
|
36
|
-
this.log(chalk.bold(`\n${entry.name}:`));
|
|
37
|
-
if (entry.isRemoteOnly) {
|
|
38
|
-
this.log(chalk.red(" - Exists only on remote (not in local files)"));
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
if (entry.isSynced) {
|
|
42
|
-
this.log(chalk.gray(" No changes"));
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
if (entry.isNew) {
|
|
46
|
-
this.log(chalk.green("+ New overlay (will be created)"));
|
|
47
|
-
for (const change of entry.changes) if (change.field === "data") {
|
|
48
|
-
this.log(chalk.green(` ${change.field}:`));
|
|
49
|
-
for (const line of (change.newValue ?? "").split(/\r?\n/)) this.log(chalk.green(` ${line}`));
|
|
50
|
-
} else this.log(chalk.green(` ${change.field}: ${change.newValue}`));
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
for (const change of entry.changes) if (change.field === "data") {
|
|
54
|
-
this.log(chalk.yellow(" ~ data: (modified)"));
|
|
55
|
-
this.renderDataDiff(change.oldValue ?? "", change.newValue ?? "");
|
|
56
|
-
} else {
|
|
57
|
-
this.log(chalk.red(` - ${change.field}: ${change.oldValue}`));
|
|
58
|
-
this.log(chalk.green(` + ${change.field}: ${change.newValue}`));
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
renderDataDiff(oldValue, newValue) {
|
|
62
|
-
const oldLines = oldValue.split(/\r?\n/);
|
|
63
|
-
const newLines = newValue.split(/\r?\n/);
|
|
64
|
-
const maxLines = Math.max(oldLines.length, newLines.length);
|
|
65
|
-
const maxDiffLines = 20;
|
|
66
|
-
let diffCount = 0;
|
|
67
|
-
for (let i = 0; i < maxLines && diffCount < maxDiffLines; i++) {
|
|
68
|
-
const oldLine = oldLines[i] ?? "";
|
|
69
|
-
const newLine = newLines[i] ?? "";
|
|
70
|
-
if (oldLine !== newLine) {
|
|
71
|
-
if (oldLine) this.log(chalk.red(` - ${oldLine}`));
|
|
72
|
-
if (newLine) this.log(chalk.green(` + ${newLine}`));
|
|
73
|
-
diffCount++;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
if (diffCount >= maxDiffLines) this.log(chalk.gray(` ... (${maxLines - maxDiffLines} more lines)`));
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
//#endregion
|
|
80
|
-
export { OverlaysDiff as default };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { u as PullResult } from "../../../../types-C_p_6rkj.mjs";
|
|
2
|
-
import { t as BaseCommand } from "../../../../base.command-d7VW6WTp.mjs";
|
|
3
|
-
import * as _$_oclif_core_interfaces0 from "@oclif/core/interfaces";
|
|
4
|
-
|
|
5
|
-
//#region src/adapters/oclif/commands/overlays/pull.d.ts
|
|
6
|
-
declare class OverlaysPull extends BaseCommand<typeof OverlaysPull> {
|
|
7
|
-
static description: string;
|
|
8
|
-
static flags: {
|
|
9
|
-
dir: _$_oclif_core_interfaces0.OptionFlag<string, _$_oclif_core_interfaces0.CustomOptions>;
|
|
10
|
-
name: _$_oclif_core_interfaces0.OptionFlag<string[] | undefined, _$_oclif_core_interfaces0.CustomOptions>;
|
|
11
|
-
};
|
|
12
|
-
run(): Promise<PullResult>;
|
|
13
|
-
}
|
|
14
|
-
//#endregion
|
|
15
|
-
export { OverlaysPull as default };
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { a as PullService, b as getConfig, p as createApiClient } from "../../../../core-jpFPylBb.mjs";
|
|
2
|
-
import { t as BaseCommand } from "../../../../base.command-YiwlGlKs.mjs";
|
|
3
|
-
import * as os from "os";
|
|
4
|
-
import chalk from "chalk";
|
|
5
|
-
import { Flags } from "@oclif/core";
|
|
6
|
-
//#region src/adapters/oclif/commands/overlays/pull.ts
|
|
7
|
-
var OverlaysPull = class extends BaseCommand {
|
|
8
|
-
static description = "Pull overlays from RevOS API to local files";
|
|
9
|
-
static flags = {
|
|
10
|
-
dir: Flags.string({
|
|
11
|
-
char: "d",
|
|
12
|
-
description: "Directory to save overlay files",
|
|
13
|
-
default: "./semantic"
|
|
14
|
-
}),
|
|
15
|
-
name: Flags.string({
|
|
16
|
-
char: "n",
|
|
17
|
-
description: "Specific overlay names to pull",
|
|
18
|
-
multiple: true
|
|
19
|
-
})
|
|
20
|
-
};
|
|
21
|
-
async run() {
|
|
22
|
-
const { flags } = this;
|
|
23
|
-
const result = await new PullService({ api: createApiClient(await getConfig()) }).execute({
|
|
24
|
-
dir: flags.dir,
|
|
25
|
-
names: flags.name
|
|
26
|
-
});
|
|
27
|
-
if (!this.jsonEnabled()) {
|
|
28
|
-
if (result.pulled.length === 0 && result.notFound.length === 0) {
|
|
29
|
-
this.warn("No overlays to pull.");
|
|
30
|
-
return result;
|
|
31
|
-
}
|
|
32
|
-
if (result.notFound.length > 0) this.warn(`The following overlays were not found:${os.EOL}${result.notFound.map((n) => ` - ${n}`).join(os.EOL)}`);
|
|
33
|
-
for (const item of result.pulled) this.log(chalk.green(`↓ Pulled: ${item.name} → ${item.filePath}`));
|
|
34
|
-
for (const e of result.errors) this.log(chalk.red(`✗ Error saving ${e.name}: ${e.error}`));
|
|
35
|
-
this.log("");
|
|
36
|
-
this.log(chalk.bold("Summary:"));
|
|
37
|
-
this.log(chalk.green(` Pulled: ${result.pulled.length}`));
|
|
38
|
-
if (result.errors.length > 0) this.log(chalk.red(` Errors: ${result.errors.length}`));
|
|
39
|
-
}
|
|
40
|
-
if (result.errors.length > 0) this.exit(1);
|
|
41
|
-
return result;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
//#endregion
|
|
45
|
-
export { OverlaysPull as default };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { d as PushResult } from "../../../../types-C_p_6rkj.mjs";
|
|
2
|
-
import { t as BaseCommand } from "../../../../base.command-d7VW6WTp.mjs";
|
|
3
|
-
import * as _$_oclif_core_interfaces0 from "@oclif/core/interfaces";
|
|
4
|
-
|
|
5
|
-
//#region src/adapters/oclif/commands/overlays/push.d.ts
|
|
6
|
-
declare class OverlaysPush extends BaseCommand<typeof OverlaysPush> {
|
|
7
|
-
static description: string;
|
|
8
|
-
static flags: {
|
|
9
|
-
dir: _$_oclif_core_interfaces0.OptionFlag<string, _$_oclif_core_interfaces0.CustomOptions>;
|
|
10
|
-
force: _$_oclif_core_interfaces0.BooleanFlag<boolean>;
|
|
11
|
-
};
|
|
12
|
-
static args: {
|
|
13
|
-
files: _$_oclif_core_interfaces0.Arg<string[] | undefined, Record<string, unknown>>;
|
|
14
|
-
};
|
|
15
|
-
run(): Promise<PushResult>;
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
export { OverlaysPush as default };
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { b as getConfig, o as PushService, p as createApiClient } from "../../../../core-jpFPylBb.mjs";
|
|
2
|
-
import { t as BaseCommand } from "../../../../base.command-YiwlGlKs.mjs";
|
|
3
|
-
import chalk from "chalk";
|
|
4
|
-
import { Args, Flags } from "@oclif/core";
|
|
5
|
-
//#region src/adapters/oclif/commands/overlays/push.ts
|
|
6
|
-
var OverlaysPush = class extends BaseCommand {
|
|
7
|
-
static description = "Push overlay files to RevOS API";
|
|
8
|
-
static flags = {
|
|
9
|
-
dir: Flags.string({
|
|
10
|
-
char: "d",
|
|
11
|
-
description: "Directory containing overlay files",
|
|
12
|
-
default: "./semantic"
|
|
13
|
-
}),
|
|
14
|
-
force: Flags.boolean({
|
|
15
|
-
char: "f",
|
|
16
|
-
description: "Force push even if remote is newer",
|
|
17
|
-
default: false
|
|
18
|
-
})
|
|
19
|
-
};
|
|
20
|
-
static args = { files: Args.string({
|
|
21
|
-
description: "Specific files to push (optional)",
|
|
22
|
-
required: false,
|
|
23
|
-
multiple: true
|
|
24
|
-
}) };
|
|
25
|
-
async run() {
|
|
26
|
-
const { flags, args } = this;
|
|
27
|
-
const files = args.files ?? [];
|
|
28
|
-
const result = await new PushService({ api: createApiClient(await getConfig()) }).execute({
|
|
29
|
-
dir: flags.dir,
|
|
30
|
-
force: flags.force,
|
|
31
|
-
files: files.length > 0 ? files : void 0
|
|
32
|
-
});
|
|
33
|
-
if (!this.jsonEnabled()) {
|
|
34
|
-
if (result.created.length === 0 && result.updated.length === 0 && result.conflicts.length === 0 && result.errors.length === 0) {
|
|
35
|
-
this.warn("No overlay files found.");
|
|
36
|
-
return result;
|
|
37
|
-
}
|
|
38
|
-
const remoteOnlyConflicts = result.conflicts.filter((c) => c.reason === "exists remotely but not locally");
|
|
39
|
-
if (remoteOnlyConflicts.length > 0) {
|
|
40
|
-
for (const c of remoteOnlyConflicts) this.log(chalk.red(` - ${c.name}`));
|
|
41
|
-
this.error("The following overlays exist remotely but not locally. Run 'revos overlays pull' first.", { exit: 1 });
|
|
42
|
-
}
|
|
43
|
-
for (const name of result.created) this.log(chalk.green(`+ Created: ${name}`));
|
|
44
|
-
for (const name of result.updated) this.log(chalk.blue(`~ Updated: ${name}`));
|
|
45
|
-
for (const c of result.conflicts) this.log(chalk.yellow(`! Conflict: ${c.name} - ${c.reason}`));
|
|
46
|
-
for (const e of result.errors) this.log(chalk.red(`✗ Error: ${e.name} - ${e.error}`));
|
|
47
|
-
this.log("");
|
|
48
|
-
this.log(chalk.bold("Summary:"));
|
|
49
|
-
if (result.created.length > 0) this.log(chalk.green(` Created: ${result.created.length}`));
|
|
50
|
-
if (result.updated.length > 0) this.log(chalk.blue(` Updated: ${result.updated.length}`));
|
|
51
|
-
if (result.conflicts.length > 0) this.log(chalk.yellow(` Conflicts: ${result.conflicts.length}`));
|
|
52
|
-
if (result.errors.length > 0) this.log(chalk.red(` Errors: ${result.errors.length}`));
|
|
53
|
-
}
|
|
54
|
-
if (result.errors.length > 0 || result.conflicts.length > 0) this.exit(1);
|
|
55
|
-
return result;
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
//#endregion
|
|
59
|
-
export { OverlaysPush as default };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { f as StatusResult } from "../../../../types-C_p_6rkj.mjs";
|
|
2
|
-
import { t as BaseCommand } from "../../../../base.command-d7VW6WTp.mjs";
|
|
3
|
-
import * as _$_oclif_core_interfaces0 from "@oclif/core/interfaces";
|
|
4
|
-
|
|
5
|
-
//#region src/adapters/oclif/commands/overlays/status.d.ts
|
|
6
|
-
declare class OverlaysStatus extends BaseCommand<typeof OverlaysStatus> {
|
|
7
|
-
static description: string;
|
|
8
|
-
static flags: {
|
|
9
|
-
dir: _$_oclif_core_interfaces0.OptionFlag<string, _$_oclif_core_interfaces0.CustomOptions>;
|
|
10
|
-
columns: _$_oclif_core_interfaces0.OptionFlag<string | undefined, _$_oclif_core_interfaces0.CustomOptions>;
|
|
11
|
-
};
|
|
12
|
-
static args: {
|
|
13
|
-
files: _$_oclif_core_interfaces0.Arg<string[] | undefined, Record<string, unknown>>;
|
|
14
|
-
};
|
|
15
|
-
run(): Promise<StatusResult>;
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
export { OverlaysStatus as default };
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { b as getConfig, i as StatusService, p as createApiClient } from "../../../../core-jpFPylBb.mjs";
|
|
2
|
-
import { t as BaseCommand } from "../../../../base.command-YiwlGlKs.mjs";
|
|
3
|
-
import chalk from "chalk";
|
|
4
|
-
import { Args, Flags } from "@oclif/core";
|
|
5
|
-
//#region src/adapters/oclif/commands/overlays/status.ts
|
|
6
|
-
const ALL_COLUMNS = ["name", "status"];
|
|
7
|
-
const STATUS_LABELS = {
|
|
8
|
-
new: chalk.green("new"),
|
|
9
|
-
modified: chalk.blue("modified"),
|
|
10
|
-
conflict: chalk.yellow("conflict"),
|
|
11
|
-
synced: chalk.gray("synced"),
|
|
12
|
-
"remote-only": chalk.red("remote-only")
|
|
13
|
-
};
|
|
14
|
-
var OverlaysStatus = class extends BaseCommand {
|
|
15
|
-
static description = "Show sync status of overlay files";
|
|
16
|
-
static flags = {
|
|
17
|
-
dir: Flags.string({
|
|
18
|
-
char: "d",
|
|
19
|
-
description: "Directory containing overlay files",
|
|
20
|
-
default: "./semantic"
|
|
21
|
-
}),
|
|
22
|
-
columns: Flags.string({
|
|
23
|
-
description: `Columns to display (comma-separated). Available: ${ALL_COLUMNS.join(", ")}`,
|
|
24
|
-
helpValue: "name,status"
|
|
25
|
-
})
|
|
26
|
-
};
|
|
27
|
-
static args = { files: Args.string({
|
|
28
|
-
description: "Specific files to check (optional)",
|
|
29
|
-
required: false,
|
|
30
|
-
multiple: true
|
|
31
|
-
}) };
|
|
32
|
-
async run() {
|
|
33
|
-
const { flags, args } = this;
|
|
34
|
-
const files = args.files ?? [];
|
|
35
|
-
const result = await new StatusService({ api: createApiClient(await getConfig()) }).execute({
|
|
36
|
-
dir: flags.dir,
|
|
37
|
-
files: files.length > 0 ? files : void 0
|
|
38
|
-
});
|
|
39
|
-
if (!this.jsonEnabled()) {
|
|
40
|
-
const cols = flags.columns?.split(",").map((c) => c.trim()).filter((c) => ALL_COLUMNS.includes(c)) ?? [...ALL_COLUMNS];
|
|
41
|
-
const rows = result.statuses.map((s) => ({
|
|
42
|
-
name: s.name,
|
|
43
|
-
status: STATUS_LABELS[s.status] ?? s.status
|
|
44
|
-
}));
|
|
45
|
-
this.table(rows, { columns: cols.map((c) => ({ key: c })) });
|
|
46
|
-
if (result.hasConflicts || result.hasRemoteOnly) this.warn("Run 'revos overlays pull' to resolve remote-only and conflicts.");
|
|
47
|
-
}
|
|
48
|
-
if (result.hasConflicts || result.hasRemoteOnly) this.exit(1);
|
|
49
|
-
return result;
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
//#endregion
|
|
53
|
-
export { OverlaysStatus as default };
|