@revos/cli 0.2.1 → 0.2.3

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.
Files changed (162) hide show
  1. package/README.md +289 -77
  2. package/dist/adapters/oclif/commands/action-runs/get.mjs +1 -1
  3. package/dist/adapters/oclif/commands/action-runs/list.mjs +8 -2
  4. package/dist/adapters/oclif/commands/actions/get-input-schema.mjs +2 -2
  5. package/dist/adapters/oclif/commands/actions/get-params-schema.mjs +2 -2
  6. package/dist/adapters/oclif/commands/actions/get.mjs +1 -1
  7. package/dist/adapters/oclif/commands/actions/list.mjs +8 -4
  8. package/dist/adapters/oclif/commands/ai-instructions/create.mjs +1 -1
  9. package/dist/adapters/oclif/commands/ai-instructions/delete.mjs +1 -1
  10. package/dist/adapters/oclif/commands/ai-instructions/get.mjs +1 -1
  11. package/dist/adapters/oclif/commands/ai-instructions/list.mjs +8 -2
  12. package/dist/adapters/oclif/commands/ai-instructions/update.mjs +1 -1
  13. package/dist/adapters/oclif/commands/api.d.mts +11 -0
  14. package/dist/adapters/oclif/commands/api.mjs +112 -0
  15. package/dist/adapters/oclif/commands/apply.d.mts +29 -0
  16. package/dist/adapters/oclif/commands/apply.mjs +77 -0
  17. package/dist/adapters/oclif/commands/auth/login.d.mts +6 -4
  18. package/dist/adapters/oclif/commands/auth/login.mjs +23 -11
  19. package/dist/adapters/oclif/commands/auth/logout.d.mts +2 -1
  20. package/dist/adapters/oclif/commands/auth/logout.mjs +3 -2
  21. package/dist/adapters/oclif/commands/auth/status.d.mts +4 -2
  22. package/dist/adapters/oclif/commands/auth/status.mjs +23 -3
  23. package/dist/adapters/oclif/commands/connections/create.d.mts +6 -0
  24. package/dist/adapters/oclif/commands/connections/create.mjs +8 -0
  25. package/dist/adapters/oclif/commands/connections/delete.d.mts +6 -0
  26. package/dist/adapters/oclif/commands/connections/delete.mjs +8 -0
  27. package/dist/adapters/oclif/commands/connections/get.d.mts +6 -0
  28. package/dist/adapters/oclif/commands/connections/get.mjs +8 -0
  29. package/dist/adapters/oclif/commands/connections/list.d.mts +6 -0
  30. package/dist/adapters/oclif/commands/connections/list.mjs +14 -0
  31. package/dist/adapters/oclif/commands/connections/update.d.mts +6 -0
  32. package/dist/adapters/oclif/commands/connections/update.mjs +8 -0
  33. package/dist/adapters/oclif/commands/cubes/create.d.mts +6 -0
  34. package/dist/adapters/oclif/commands/cubes/create.mjs +8 -0
  35. package/dist/adapters/oclif/commands/cubes/delete.d.mts +6 -0
  36. package/dist/adapters/oclif/commands/cubes/delete.mjs +8 -0
  37. package/dist/adapters/oclif/commands/cubes/get.d.mts +6 -0
  38. package/dist/adapters/oclif/commands/cubes/get.mjs +8 -0
  39. package/dist/adapters/oclif/commands/cubes/list.d.mts +6 -0
  40. package/dist/adapters/oclif/commands/cubes/list.mjs +13 -0
  41. package/dist/adapters/oclif/commands/cubes/update.d.mts +6 -0
  42. package/dist/adapters/oclif/commands/cubes/update.mjs +8 -0
  43. package/dist/adapters/oclif/commands/diff.d.mts +28 -0
  44. package/dist/adapters/oclif/commands/diff.mjs +66 -0
  45. package/dist/adapters/oclif/commands/gservice-account-keys/get.mjs +1 -1
  46. package/dist/adapters/oclif/commands/gservice-account-keys/reveal.mjs +2 -2
  47. package/dist/adapters/oclif/commands/gservice-accounts/create.mjs +1 -1
  48. package/dist/adapters/oclif/commands/gservice-accounts/delete.mjs +1 -1
  49. package/dist/adapters/oclif/commands/gservice-accounts/get.mjs +1 -1
  50. package/dist/adapters/oclif/commands/gservice-accounts/list.mjs +7 -2
  51. package/dist/adapters/oclif/commands/init.d.mts +3 -1
  52. package/dist/adapters/oclif/commands/init.mjs +27 -23
  53. package/dist/adapters/oclif/commands/org/create.mjs +3 -2
  54. package/dist/adapters/oclif/commands/org/current.d.mts +12 -3
  55. package/dist/adapters/oclif/commands/org/current.mjs +27 -2
  56. package/dist/adapters/oclif/commands/org/get.mjs +3 -2
  57. package/dist/adapters/oclif/commands/org/list.d.mts +3 -11
  58. package/dist/adapters/oclif/commands/org/list.mjs +35 -26
  59. package/dist/adapters/oclif/commands/org/switch.d.mts +4 -2
  60. package/dist/adapters/oclif/commands/org/switch.mjs +16 -3
  61. package/dist/adapters/oclif/commands/pull.d.mts +29 -0
  62. package/dist/adapters/oclif/commands/pull.mjs +88 -0
  63. package/dist/adapters/oclif/commands/score-groups/create.mjs +3 -2
  64. package/dist/adapters/oclif/commands/score-groups/delete.mjs +1 -1
  65. package/dist/adapters/oclif/commands/score-groups/get.mjs +1 -1
  66. package/dist/adapters/oclif/commands/score-groups/list.mjs +3 -2
  67. package/dist/adapters/oclif/commands/score-groups/update.mjs +1 -1
  68. package/dist/adapters/oclif/commands/scores/create.mjs +3 -2
  69. package/dist/adapters/oclif/commands/scores/delete.mjs +1 -1
  70. package/dist/adapters/oclif/commands/scores/list.mjs +3 -2
  71. package/dist/adapters/oclif/commands/scores/update.mjs +1 -1
  72. package/dist/adapters/oclif/commands/segments/create.mjs +1 -1
  73. package/dist/adapters/oclif/commands/segments/delete.mjs +1 -1
  74. package/dist/adapters/oclif/commands/segments/evaluate.mjs +2 -2
  75. package/dist/adapters/oclif/commands/segments/get-evaluation-history.mjs +2 -2
  76. package/dist/adapters/oclif/commands/segments/get-version.mjs +2 -2
  77. package/dist/adapters/oclif/commands/segments/get.mjs +1 -1
  78. package/dist/adapters/oclif/commands/segments/list-versions.mjs +16 -5
  79. package/dist/adapters/oclif/commands/segments/list.mjs +9 -2
  80. package/dist/adapters/oclif/commands/segments/restore-version.mjs +2 -2
  81. package/dist/adapters/oclif/commands/segments/update.mjs +1 -1
  82. package/dist/adapters/oclif/commands/sources/create.d.mts +11 -0
  83. package/dist/adapters/oclif/commands/sources/create.mjs +16 -0
  84. package/dist/adapters/oclif/commands/sources/delete.d.mts +6 -0
  85. package/dist/adapters/oclif/commands/sources/delete.mjs +8 -0
  86. package/dist/adapters/oclif/commands/sources/get.d.mts +6 -0
  87. package/dist/adapters/oclif/commands/sources/get.mjs +8 -0
  88. package/dist/adapters/oclif/commands/sources/list-streams.d.mts +6 -0
  89. package/dist/adapters/oclif/commands/sources/list-streams.mjs +31 -0
  90. package/dist/adapters/oclif/commands/sources/list.d.mts +6 -0
  91. package/dist/adapters/oclif/commands/sources/list.mjs +13 -0
  92. package/dist/adapters/oclif/commands/{integrations/get.d.mts → sources/update.d.mts} +4 -4
  93. package/dist/adapters/oclif/commands/sources/update.mjs +21 -0
  94. package/dist/adapters/oclif/commands/status.d.mts +27 -0
  95. package/dist/adapters/oclif/commands/status.mjs +77 -0
  96. package/dist/adapters/oclif/commands/table-views/create.mjs +3 -2
  97. package/dist/adapters/oclif/commands/table-views/delete.mjs +1 -1
  98. package/dist/adapters/oclif/commands/table-views/list.mjs +3 -2
  99. package/dist/adapters/oclif/commands/table-views/update.mjs +1 -1
  100. package/dist/adapters/oclif/commands/tables/create.mjs +1 -1
  101. package/dist/adapters/oclif/commands/tables/delete.mjs +1 -1
  102. package/dist/adapters/oclif/commands/tables/get.mjs +1 -1
  103. package/dist/adapters/oclif/commands/tables/list.mjs +3 -2
  104. package/dist/adapters/oclif/commands/tables/update.mjs +1 -1
  105. package/dist/{base.command-d7VW6WTp.d.mts → base.command-BmddDbHa.d.mts} +4 -1
  106. package/dist/base.command-D8taHOFF.mjs +83 -0
  107. package/dist/chunk-CfYAbeIz.mjs +13 -0
  108. package/dist/context-D5uelKLe.d.mts +62 -0
  109. package/dist/core-B-IdeRNl.mjs +2448 -0
  110. package/dist/{factory-BrFKT8t-.mjs → factory-CCcimDhl.mjs} +45 -10
  111. package/dist/iac-render-BSZZEP0n.mjs +17 -0
  112. package/dist/index-D0ax2I61.d.mts +581 -0
  113. package/dist/index.d.mts +4 -4
  114. package/dist/index.mjs +2 -2
  115. package/dist/{presets-D9b6IWKy.mjs → presets-Bb9gwgeh.mjs} +40 -8
  116. package/dist/templates/.claude/settings.json +39 -0
  117. package/dist/templates/.devcontainer/Dockerfile +9 -0
  118. package/dist/templates/.devcontainer/devcontainer.json +4 -1
  119. package/dist/templates/.devcontainer/setup.sh +3 -0
  120. package/dist/templates/AGENTS.md +33 -20
  121. package/dist/templates/dbt/dbt_project.yml +2 -2
  122. package/dist/templates/gitignore +3 -1
  123. package/dist/templates/skills/create-connections/SKILL.md +210 -0
  124. package/dist/templates/skills/create-connections/references/mappers.md +152 -0
  125. package/dist/templates/skills/{create-semantic-model → create-cubes}/SKILL.md +20 -18
  126. package/dist/templates/skills/create-cubes/references/bq-pk-fk-conventions.md +183 -0
  127. package/dist/templates/skills/{create-semantic-model → create-cubes}/references/cube-examples.md +2 -2
  128. package/dist/templates/skills/create-cubes/references/hubspot-entities.md +289 -0
  129. package/dist/templates/skills/create-cubes/references/jira-entities.md +201 -0
  130. package/dist/templates/skills/create-cubes/references/netsuite-entities.md +121 -0
  131. package/dist/templates/skills/create-cubes/references/stripe-entities.md +114 -0
  132. package/dist/templates/skills/create-dbt-transformations/SKILL.md +43 -22
  133. package/dist/templates/skills/create-dbt-transformations/references/edge-cases.md +20 -2
  134. package/dist/templates/skills/create-dbt-transformations/references/schema-conventions.md +21 -7
  135. package/dist/templates/skills/create-dbt-transformations/references/sql-templates.md +34 -20
  136. package/dist/templates/skills/explore-lakehouse/SKILL.md +3 -3
  137. package/dist/templates/skills/load-sample-data/SKILL.md +1 -1
  138. package/dist/templates/skills/visualize-semantic-model/SKILL.md +159 -0
  139. package/dist/templates/skills/visualize-semantic-model/scripts/render_graph.py +186 -0
  140. package/dist/{types-Y_ht_ja5.d.mts → types-Bk2Cb5yt.d.mts} +9 -0
  141. package/package.json +44 -7
  142. package/dist/adapters/oclif/commands/integrations/create.d.mts +0 -11
  143. package/dist/adapters/oclif/commands/integrations/create.mjs +0 -16
  144. package/dist/adapters/oclif/commands/integrations/get.mjs +0 -21
  145. package/dist/adapters/oclif/commands/integrations/list.d.mts +0 -11
  146. package/dist/adapters/oclif/commands/integrations/list.mjs +0 -16
  147. package/dist/adapters/oclif/commands/integrations/update.d.mts +0 -15
  148. package/dist/adapters/oclif/commands/integrations/update.mjs +0 -21
  149. package/dist/adapters/oclif/commands/overlays/diff.d.mts +0 -19
  150. package/dist/adapters/oclif/commands/overlays/diff.mjs +0 -80
  151. package/dist/adapters/oclif/commands/overlays/pull.d.mts +0 -15
  152. package/dist/adapters/oclif/commands/overlays/pull.mjs +0 -45
  153. package/dist/adapters/oclif/commands/overlays/push.d.mts +0 -18
  154. package/dist/adapters/oclif/commands/overlays/push.mjs +0 -59
  155. package/dist/adapters/oclif/commands/overlays/status.d.mts +0 -18
  156. package/dist/adapters/oclif/commands/overlays/status.mjs +0 -53
  157. package/dist/base.command-YiwlGlKs.mjs +0 -62
  158. package/dist/core-jpFPylBb.mjs +0 -997
  159. package/dist/index-DD2Vr-pu.d.mts +0 -193
  160. package/dist/types-C_p_6rkj.d.mts +0 -69
  161. /package/dist/templates/skills/{create-semantic-model → create-cubes}/references/key-patterns.md +0 -0
  162. /package/dist/templates/skills/{create-semantic-model → create-cubes}/references/validation-queries.md +0 -0
@@ -1,4 +1,4 @@
1
- import { a as updateCommand } from "../../../../presets-D9b6IWKy.mjs";
1
+ import { a as updateCommand } from "../../../../presets-Bb9gwgeh.mjs";
2
2
  //#region src/adapters/oclif/commands/score-groups/update.ts
3
3
  var update_default = updateCommand({
4
4
  resource: "scoreGroups",
@@ -1,8 +1,9 @@
1
- import { t as createCommand } from "../../../../presets-D9b6IWKy.mjs";
1
+ import { t as createCommand } from "../../../../presets-Bb9gwgeh.mjs";
2
2
  //#region src/adapters/oclif/commands/scores/create.ts
3
3
  var create_default = createCommand({
4
4
  resource: "scores",
5
- description: "Create a new score"
5
+ description: "Create a new score",
6
+ pathParams: ["tableId"]
6
7
  });
7
8
  //#endregion
8
9
  export { create_default as default };
@@ -1,4 +1,4 @@
1
- import { n as deleteCommand } from "../../../../presets-D9b6IWKy.mjs";
1
+ import { n as deleteCommand } from "../../../../presets-Bb9gwgeh.mjs";
2
2
  //#region src/adapters/oclif/commands/scores/delete.ts
3
3
  var delete_default = deleteCommand({
4
4
  resource: "scores",
@@ -1,8 +1,9 @@
1
- import { i as listCommand } from "../../../../presets-D9b6IWKy.mjs";
1
+ import { i as listCommand } from "../../../../presets-Bb9gwgeh.mjs";
2
2
  //#region src/adapters/oclif/commands/scores/list.ts
3
3
  var list_default = listCommand({
4
4
  resource: "scores",
5
- description: "List scores"
5
+ description: "List scores",
6
+ pathParams: ["tableId"]
6
7
  });
7
8
  //#endregion
8
9
  export { list_default as default };
@@ -1,4 +1,4 @@
1
- import { a as updateCommand } from "../../../../presets-D9b6IWKy.mjs";
1
+ import { a as updateCommand } from "../../../../presets-Bb9gwgeh.mjs";
2
2
  //#region src/adapters/oclif/commands/scores/update.ts
3
3
  var update_default = updateCommand({
4
4
  resource: "scores",
@@ -1,4 +1,4 @@
1
- import { t as createCommand } from "../../../../presets-D9b6IWKy.mjs";
1
+ import { t as createCommand } from "../../../../presets-Bb9gwgeh.mjs";
2
2
  //#region src/adapters/oclif/commands/segments/create.ts
3
3
  var create_default = createCommand({
4
4
  resource: "segments",
@@ -1,4 +1,4 @@
1
- import { n as deleteCommand } from "../../../../presets-D9b6IWKy.mjs";
1
+ import { n as deleteCommand } from "../../../../presets-Bb9gwgeh.mjs";
2
2
  //#region src/adapters/oclif/commands/segments/delete.ts
3
3
  var delete_default = deleteCommand({
4
4
  resource: "segments",
@@ -1,5 +1,5 @@
1
- import { m as unwrap } from "../../../../core-jpFPylBb.mjs";
2
- import { n as defineApiCommand } from "../../../../factory-BrFKT8t-.mjs";
1
+ import { x as unwrap } from "../../../../core-B-IdeRNl.mjs";
2
+ import { r as defineApiCommand } from "../../../../factory-CCcimDhl.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 { m as unwrap } from "../../../../core-jpFPylBb.mjs";
2
- import { n as defineApiCommand } from "../../../../factory-BrFKT8t-.mjs";
1
+ import { x as unwrap } from "../../../../core-B-IdeRNl.mjs";
2
+ import { r as defineApiCommand } from "../../../../factory-CCcimDhl.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 { m as unwrap } from "../../../../core-jpFPylBb.mjs";
2
- import { n as defineApiCommand } from "../../../../factory-BrFKT8t-.mjs";
1
+ import { x as unwrap } from "../../../../core-B-IdeRNl.mjs";
2
+ import { r as defineApiCommand } from "../../../../factory-CCcimDhl.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,4 +1,4 @@
1
- import { r as getCommand } from "../../../../presets-D9b6IWKy.mjs";
1
+ import { r as getCommand } from "../../../../presets-Bb9gwgeh.mjs";
2
2
  //#region src/adapters/oclif/commands/segments/get.ts
3
3
  var get_default = getCommand({
4
4
  resource: "segments",
@@ -1,7 +1,6 @@
1
- import { m as unwrap } from "../../../../core-jpFPylBb.mjs";
2
- import { n as defineApiCommand } from "../../../../factory-BrFKT8t-.mjs";
1
+ import { x as unwrap } from "../../../../core-B-IdeRNl.mjs";
2
+ import { n as createListRender, r as defineApiCommand } from "../../../../factory-CCcimDhl.mjs";
3
3
  import { Args, Flags } from "@oclif/core";
4
- //#region src/adapters/oclif/commands/segments/list-versions.ts
5
4
  var list_versions_default = defineApiCommand({
6
5
  description: "List versions of a segment",
7
6
  args: { id: Args.string({
@@ -13,7 +12,11 @@ var list_versions_default = defineApiCommand({
13
12
  "page-token": Flags.string({ description: "Token for the next page" }),
14
13
  "order-by": Flags.string({ description: "Field to order results by" }),
15
14
  filter: Flags.string({ description: "Filter expression" }),
16
- fields: Flags.string({ description: "Comma-separated fields to include" })
15
+ fields: Flags.string({ description: "Comma-separated fields to include" }),
16
+ columns: Flags.string({
17
+ description: "Columns to display in table output (comma-separated). Overrides the resource default. Ignored with --json.",
18
+ helpValue: "a,b,c"
19
+ })
17
20
  },
18
21
  call: async ({ api, args, flags }) => {
19
22
  const params = { id: args.id };
@@ -23,7 +26,15 @@ var list_versions_default = defineApiCommand({
23
26
  if (flags.filter !== void 0) params.filter = flags.filter;
24
27
  if (flags.fields !== void 0) params.fields = flags.fields;
25
28
  return unwrap(await api.segments.listVersions(params));
26
- }
29
+ },
30
+ render: createListRender([
31
+ "id",
32
+ "version",
33
+ "name",
34
+ "createdAt",
35
+ "createdBy",
36
+ "isCurrent"
37
+ ])
27
38
  });
28
39
  //#endregion
29
40
  export { list_versions_default as default };
@@ -1,8 +1,15 @@
1
- import { i as listCommand } from "../../../../presets-D9b6IWKy.mjs";
1
+ import { i as listCommand } from "../../../../presets-Bb9gwgeh.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 { m as unwrap } from "../../../../core-jpFPylBb.mjs";
2
- import { n as defineApiCommand } from "../../../../factory-BrFKT8t-.mjs";
1
+ import { x as unwrap } from "../../../../core-B-IdeRNl.mjs";
2
+ import { r as defineApiCommand } from "../../../../factory-CCcimDhl.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 { a as updateCommand } from "../../../../presets-D9b6IWKy.mjs";
1
+ import { a as updateCommand } from "../../../../presets-Bb9gwgeh.mjs";
2
2
  //#region src/adapters/oclif/commands/segments/update.ts
3
3
  var update_default = updateCommand({
4
4
  resource: "segments",
@@ -0,0 +1,11 @@
1
+ import { t as BaseCommand } from "../../../../base.command-BmddDbHa.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 { E as getConfig, S as resolveAppUrl } from "../../../../core-B-IdeRNl.mjs";
2
+ import { t as BaseCommand } from "../../../../base.command-D8taHOFF.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,6 @@
1
+ import * as _$_oclif_core0 from "@oclif/core";
2
+
3
+ //#region src/adapters/oclif/commands/sources/delete.d.ts
4
+ declare const _default: typeof _$_oclif_core0.Command;
5
+ //#endregion
6
+ export { _default as default };
@@ -0,0 +1,8 @@
1
+ import { n as deleteCommand } from "../../../../presets-Bb9gwgeh.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,6 @@
1
+ import * as _$_oclif_core0 from "@oclif/core";
2
+
3
+ //#region src/adapters/oclif/commands/sources/get.d.ts
4
+ declare const _default: typeof _$_oclif_core0.Command;
5
+ //#endregion
6
+ export { _default as default };
@@ -0,0 +1,8 @@
1
+ import { r as getCommand } from "../../../../presets-Bb9gwgeh.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,6 @@
1
+ import * as _$_oclif_core0 from "@oclif/core";
2
+
3
+ //#region src/adapters/oclif/commands/sources/list-streams.d.ts
4
+ declare const _default: typeof _$_oclif_core0.Command;
5
+ //#endregion
6
+ export { _default as default };
@@ -0,0 +1,31 @@
1
+ import { x as unwrap } from "../../../../core-B-IdeRNl.mjs";
2
+ import { n as createListRender, r as defineApiCommand } from "../../../../factory-CCcimDhl.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,6 @@
1
+ import * as _$_oclif_core0 from "@oclif/core";
2
+
3
+ //#region src/adapters/oclif/commands/sources/list.d.ts
4
+ declare const _default: typeof _$_oclif_core0.Command;
5
+ //#endregion
6
+ export { _default as default };
@@ -0,0 +1,13 @@
1
+ import { i as listCommand } from "../../../../presets-Bb9gwgeh.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 };
@@ -1,8 +1,8 @@
1
- import { t as BaseCommand } from "../../../../base.command-d7VW6WTp.mjs";
1
+ import { t as BaseCommand } from "../../../../base.command-BmddDbHa.mjs";
2
2
  import * as _$_oclif_core_interfaces0 from "@oclif/core/interfaces";
3
3
 
4
- //#region src/adapters/oclif/commands/integrations/get.d.ts
5
- declare class IntegrationsGet extends BaseCommand<typeof IntegrationsGet> {
4
+ //#region src/adapters/oclif/commands/sources/update.d.ts
5
+ declare class SourcesUpdate extends BaseCommand<typeof SourcesUpdate> {
6
6
  static description: string;
7
7
  static args: {
8
8
  id: _$_oclif_core_interfaces0.Arg<string, Record<string, unknown>>;
@@ -12,4 +12,4 @@ declare class IntegrationsGet extends BaseCommand<typeof IntegrationsGet> {
12
12
  }>;
13
13
  }
14
14
  //#endregion
15
- export { IntegrationsGet as default };
15
+ export { SourcesUpdate as default };
@@ -0,0 +1,21 @@
1
+ import { E as getConfig, S as resolveAppUrl } from "../../../../core-B-IdeRNl.mjs";
2
+ import { t as BaseCommand } from "../../../../base.command-D8taHOFF.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,27 @@
1
+ import { u as ResourceStatus } from "../../../index-D0ax2I61.mjs";
2
+ import { c as IacError } from "../../../context-D5uelKLe.mjs";
3
+ import { t as BaseCommand } from "../../../base.command-BmddDbHa.mjs";
4
+ import * as _$_oclif_core_interfaces0 from "@oclif/core/interfaces";
5
+
6
+ //#region src/adapters/oclif/commands/status.d.ts
7
+ interface StatusJsonOutput {
8
+ project: {
9
+ path: string;
10
+ orgId: string;
11
+ };
12
+ resources: ResourceStatus[];
13
+ errors: IacError[];
14
+ }
15
+ declare class Status extends BaseCommand<typeof Status> {
16
+ static description: string;
17
+ static flags: {
18
+ project: _$_oclif_core_interfaces0.OptionFlag<string | undefined, _$_oclif_core_interfaces0.CustomOptions>;
19
+ columns: _$_oclif_core_interfaces0.OptionFlag<string | undefined, _$_oclif_core_interfaces0.CustomOptions>;
20
+ };
21
+ static args: {
22
+ path: _$_oclif_core_interfaces0.Arg<string | undefined, Record<string, unknown>>;
23
+ };
24
+ run(): Promise<StatusJsonOutput>;
25
+ }
26
+ //#endregion
27
+ export { StatusJsonOutput, Status as default };
@@ -0,0 +1,77 @@
1
+ import { _ as buildIacRegistry, b as createApiClient, f as describeResources, g as loadResources, v as discoverProject, y as projectRoot } from "../../../core-B-IdeRNl.mjs";
2
+ import { t as BaseCommand } from "../../../base.command-D8taHOFF.mjs";
3
+ import { a as resolveColumns, i as renderList } from "../../../factory-CCcimDhl.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-D9b6IWKy.mjs";
1
+ import { t as createCommand } from "../../../../presets-Bb9gwgeh.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,4 +1,4 @@
1
- import { n as deleteCommand } from "../../../../presets-D9b6IWKy.mjs";
1
+ import { n as deleteCommand } from "../../../../presets-Bb9gwgeh.mjs";
2
2
  //#region src/adapters/oclif/commands/table-views/delete.ts
3
3
  var delete_default = deleteCommand({
4
4
  resource: "tableViews",
@@ -1,8 +1,9 @@
1
- import { i as listCommand } from "../../../../presets-D9b6IWKy.mjs";
1
+ import { i as listCommand } from "../../../../presets-Bb9gwgeh.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,4 +1,4 @@
1
- import { a as updateCommand } from "../../../../presets-D9b6IWKy.mjs";
1
+ import { a as updateCommand } from "../../../../presets-Bb9gwgeh.mjs";
2
2
  //#region src/adapters/oclif/commands/table-views/update.ts
3
3
  var update_default = updateCommand({
4
4
  resource: "tableViews",
@@ -1,4 +1,4 @@
1
- import { t as createCommand } from "../../../../presets-D9b6IWKy.mjs";
1
+ import { t as createCommand } from "../../../../presets-Bb9gwgeh.mjs";
2
2
  //#region src/adapters/oclif/commands/tables/create.ts
3
3
  var create_default = createCommand({
4
4
  resource: "tables",
@@ -1,4 +1,4 @@
1
- import { n as deleteCommand } from "../../../../presets-D9b6IWKy.mjs";
1
+ import { n as deleteCommand } from "../../../../presets-Bb9gwgeh.mjs";
2
2
  //#region src/adapters/oclif/commands/tables/delete.ts
3
3
  var delete_default = deleteCommand({
4
4
  resource: "tables",
@@ -1,4 +1,4 @@
1
- import { r as getCommand } from "../../../../presets-D9b6IWKy.mjs";
1
+ import { r as getCommand } from "../../../../presets-Bb9gwgeh.mjs";
2
2
  //#region src/adapters/oclif/commands/tables/get.ts
3
3
  var get_default = getCommand({
4
4
  resource: "tables",
@@ -1,8 +1,9 @@
1
- import { i as listCommand } from "../../../../presets-D9b6IWKy.mjs";
1
+ import { i as listCommand } from "../../../../presets-Bb9gwgeh.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 };
@@ -1,4 +1,4 @@
1
- import { a as updateCommand } from "../../../../presets-D9b6IWKy.mjs";
1
+ import { a as updateCommand } from "../../../../presets-Bb9gwgeh.mjs";
2
2
  //#region src/adapters/oclif/commands/tables/update.ts
3
3
  var update_default = updateCommand({
4
4
  resource: "tables",
@@ -1,17 +1,20 @@
1
+ import { n as ProjectContext } from "./context-D5uelKLe.mjs";
1
2
  import { Command, Interfaces } from "@oclif/core";
2
3
  import { TableOptions } from "@oclif/table";
3
4
 
4
5
  //#region src/adapters/oclif/base.command.d.ts
5
6
  type Flags$1<T extends typeof Command> = Interfaces.InferredFlags<(typeof BaseCommand)["baseFlags"] & T["flags"]>;
6
7
  type Args$1<T extends typeof Command> = Interfaces.InferredArgs<T["args"]>;
8
+ type ProjectContextMode = "enforce" | "relaxed";
7
9
  declare abstract class BaseCommand<T extends typeof Command> extends Command {
8
10
  static enableJsonFlag: boolean;
11
+ static projectContextMode: ProjectContextMode;
9
12
  static baseFlags: {
10
13
  org: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
11
- dev: Interfaces.BooleanFlag<boolean>;
12
14
  };
13
15
  protected flags: Flags$1<T>;
14
16
  protected args: Args$1<T>;
17
+ protected projectContext: ProjectContext | null;
15
18
  init(): Promise<void>;
16
19
  protected table<R extends Record<string, unknown>>(data: R[], options?: Omit<TableOptions<R>, "data">): void;
17
20
  protected catch(err: Error & {
@@ -0,0 +1,83 @@
1
+ import { P as setAuthConfig, U as ApiError, V as loadCredentials, i as formatEnvMismatchError, l as resolveProjectContext, o as formatProjectOrgFlagError, r as formatCredentialsMismatchWarning, u as validateEnvAgainstProject } from "./core-B-IdeRNl.mjs";
2
+ import { Command, Flags } from "@oclif/core";
3
+ import { makeTable } from "@oclif/table";
4
+ //#region src/adapters/oclif/base.command.ts
5
+ var BaseCommand = class extends Command {
6
+ static enableJsonFlag = true;
7
+ static projectContextMode = "enforce";
8
+ static baseFlags = { org: Flags.string({
9
+ char: "o",
10
+ description: "Override organization ID for this command"
11
+ }) };
12
+ flags;
13
+ args;
14
+ projectContext = null;
15
+ async init() {
16
+ await super.init();
17
+ const { flags, args } = await this.parse({
18
+ flags: this.ctor.flags,
19
+ baseFlags: super.ctor.baseFlags,
20
+ enableJsonFlag: this.ctor.enableJsonFlag,
21
+ args: this.ctor.args,
22
+ strict: this.ctor.strict
23
+ });
24
+ this.flags = flags;
25
+ this.args = args;
26
+ applyStoredEnvironment();
27
+ this.projectContext = resolveProjectContext();
28
+ const mode = this.ctor.projectContextMode;
29
+ if (this.projectContext && mode === "enforce") {
30
+ if (this.flags.org && this.flags.org !== this.projectContext.orgId) this.error(formatProjectOrgFlagError({
31
+ projectOrgId: this.projectContext.orgId,
32
+ projectPath: this.projectContext.projectFile.path
33
+ }), { exit: 1 });
34
+ const mismatches = validateEnvAgainstProject(this.projectContext);
35
+ if (mismatches.length > 0) this.error(formatEnvMismatchError(mismatches, this.projectContext.projectFile.path), { exit: 1 });
36
+ process.env.REVOS_ORG_ID = this.projectContext.orgId;
37
+ const credentials = loadCredentials();
38
+ if (credentials?.organizationId && credentials.organizationId !== this.projectContext.orgId && !this.jsonEnabled()) this.warn(formatCredentialsMismatchWarning({
39
+ credentialsOrgId: credentials.organizationId,
40
+ projectOrgId: this.projectContext.orgId,
41
+ projectPath: this.projectContext.projectFile.path
42
+ }));
43
+ } else if (this.flags.org) process.env.REVOS_ORG_ID = this.flags.org;
44
+ }
45
+ table(data, options) {
46
+ this.log(makeTable({
47
+ data,
48
+ ...options
49
+ }));
50
+ }
51
+ async catch(err) {
52
+ if (err instanceof ApiError) err.message = this.formatApiError(err);
53
+ return super.catch(err);
54
+ }
55
+ formatApiError(err) {
56
+ if (err.status === 401) return "Authentication expired or invalid. Run 'revos auth login' to re-authenticate.";
57
+ if (err.status === 403) return "Access denied. You don't have permission to perform this action.";
58
+ if (err.status === 404) return `Resource not found: ${err.url}`;
59
+ if (err.status === 0) return "Network error: could not reach the API. Check your connection and API URL.";
60
+ if (err.status >= 500) return `Server error (${err.status}): ${err.message}`;
61
+ return err.message;
62
+ }
63
+ toErrorJson(err) {
64
+ if (err instanceof ApiError) return { error: {
65
+ message: err.message,
66
+ status: err.status,
67
+ url: err.url,
68
+ body: err.body
69
+ } };
70
+ return super.toErrorJson(err);
71
+ }
72
+ };
73
+ function applyStoredEnvironment() {
74
+ const credentials = loadCredentials();
75
+ if (!credentials) return;
76
+ if (credentials.apiUrl && !process.env.REVOS_API_URL) process.env.REVOS_API_URL = credentials.apiUrl;
77
+ if (credentials.authUrl && !process.env.REVOS_AUTH_URL || credentials.authClientId && !process.env.REVOS_AUTH_CLIENT_ID) setAuthConfig({
78
+ authUrl: process.env.REVOS_AUTH_URL ?? credentials.authUrl,
79
+ authClientId: process.env.REVOS_AUTH_CLIENT_ID ?? credentials.authClientId
80
+ });
81
+ }
82
+ //#endregion
83
+ export { BaseCommand as t };