@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,193 +0,0 @@
1
- import { d as PushResult, f as StatusResult, o as DiffResult, r as CubeOverlay, s as OverlayFile, t as Config, u as PullResult } from "./types-C_p_6rkj.mjs";
2
- import { c as StoredCredentials, i as OAuthCallbackResult, l as TokenResponse, r as ClerkUserInfo, s as OrganizationInfo } from "./types-Y_ht_ja5.mjs";
3
- import { Client } from "@revos/api-client";
4
-
5
- //#region src/core/errors.d.ts
6
- declare class ApiError extends Error {
7
- readonly status: number;
8
- readonly statusText: string;
9
- readonly url: string;
10
- readonly body: unknown;
11
- name: string;
12
- constructor(message: string, status: number, statusText: string, url: string, body: unknown);
13
- }
14
- //#endregion
15
- //#region src/core/config.d.ts
16
- declare function getConfig(): Promise<Config>;
17
- //#endregion
18
- //#region src/core/auth/credentials-store.d.ts
19
- declare function getCredentialsPath(): string;
20
- declare function loadCredentials(): StoredCredentials | null;
21
- declare function saveCredentials(credentials: StoredCredentials): void;
22
- declare function deleteCredentials(): boolean;
23
- declare function isTokenExpired(credentials: StoredCredentials): boolean;
24
- //#endregion
25
- //#region src/core/auth/oauth-server.d.ts
26
- interface OAuthServerResult {
27
- port: number;
28
- waitForCallback: () => Promise<OAuthCallbackResult>;
29
- shutdown: () => void;
30
- }
31
- declare function startOAuthServer(): Promise<OAuthServerResult>;
32
- //#endregion
33
- //#region src/core/auth/clerk-oauth.d.ts
34
- declare const CLERK_ENVS: {
35
- readonly production: {
36
- readonly domain: "https://clerk.revos.ai";
37
- readonly clientId: "Hkj5lEtyyF5DUQX6";
38
- };
39
- readonly development: {
40
- readonly domain: "https://strong-minnow-46.clerk.accounts.dev";
41
- readonly clientId: "o3eTaWPmeJAMfRPw";
42
- };
43
- };
44
- type ClerkEnv = keyof typeof CLERK_ENVS;
45
- interface ClerkOAuthConfig {
46
- clerkDomain?: string;
47
- clerkClientId?: string;
48
- }
49
- declare function setClerkConfig(config: ClerkOAuthConfig): void;
50
- declare function setClerkEnv(env: ClerkEnv): void;
51
- interface PKCEChallenge {
52
- codeVerifier: string;
53
- codeChallenge: string;
54
- state: string;
55
- }
56
- declare function generatePKCEChallenge(): PKCEChallenge;
57
- declare function buildAuthorizationUrl(redirectUri: string, pkce: PKCEChallenge): string;
58
- declare function exchangeCodeForTokens(code: string, redirectUri: string, codeVerifier: string): Promise<TokenResponse>;
59
- declare function getUserInfo(accessToken: string): Promise<ClerkUserInfo>;
60
- declare function tokenResponseToCredentials(tokenResponse: TokenResponse, userInfo: ClerkUserInfo): StoredCredentials;
61
- declare function refreshAccessToken(refreshToken: string): Promise<TokenResponse>;
62
- //#endregion
63
- //#region src/core/files/overlay-files.d.ts
64
- interface LoadedOverlay {
65
- filePath: string;
66
- fileName: string;
67
- overlay: OverlayFile;
68
- mtime: Date;
69
- }
70
- declare function loadOverlayFile(filePath: string): LoadedOverlay;
71
- declare function loadOverlaysFromDir(dirPath: string): LoadedOverlay[];
72
- declare function loadOverlaysByNames(dirPath: string, names: string[]): LoadedOverlay[];
73
- declare function loadOverlays(dir: string, files?: string[]): LoadedOverlay[];
74
- declare function saveOverlayToFile(dirPath: string, overlay: CubeOverlay): string;
75
- declare function getLocalOverlayNames(dirPath: string): string[];
76
- //#endregion
77
- //#region src/core/utils.d.ts
78
- declare function formatError(error: unknown): string;
79
- declare function sanitizeFileName(name: string): string;
80
- declare function isContentEqual(local: OverlayFile, remote: CubeOverlay): boolean;
81
- declare function findRemoteOnlyOverlays(localOverlays: LoadedOverlay[], remoteOverlays: CubeOverlay[]): CubeOverlay[];
82
- //#endregion
83
- //#region src/core/url.d.ts
84
- declare function resolveAppUrl(apiUrl: string): string;
85
- //#endregion
86
- //#region src/core/api/create-client.d.ts
87
- type ApiClient = Client;
88
- declare function createApiClient(config: {
89
- apiUrl: string;
90
- token: string;
91
- organizationId?: string;
92
- }): ApiClient;
93
- declare function unwrap<T extends {
94
- data: unknown;
95
- }>(result: {
96
- data?: T;
97
- error?: unknown;
98
- response?: Response;
99
- request?: Request;
100
- }): T["data"];
101
- //#endregion
102
- //#region src/core/services/push.service.d.ts
103
- interface PushOptions {
104
- dir: string;
105
- force: boolean;
106
- files?: string[];
107
- }
108
- interface PushContext {
109
- api: ApiClient;
110
- }
111
- declare class PushService {
112
- private ctx;
113
- constructor(ctx: PushContext);
114
- execute(options: PushOptions): Promise<PushResult>;
115
- }
116
- //#endregion
117
- //#region src/core/services/pull.service.d.ts
118
- interface PullOptions {
119
- dir: string;
120
- names?: string[];
121
- }
122
- interface PullContext {
123
- api: ApiClient;
124
- }
125
- declare class PullService {
126
- private ctx;
127
- constructor(ctx: PullContext);
128
- execute(options: PullOptions): Promise<PullResult>;
129
- }
130
- //#endregion
131
- //#region src/core/services/status.service.d.ts
132
- interface StatusOptions {
133
- dir: string;
134
- files?: string[];
135
- }
136
- interface StatusContext {
137
- api: ApiClient;
138
- }
139
- declare class StatusService {
140
- private ctx;
141
- constructor(ctx: StatusContext);
142
- execute(options: StatusOptions): Promise<StatusResult>;
143
- }
144
- //#endregion
145
- //#region src/core/services/diff.service.d.ts
146
- interface DiffOptions {
147
- dir: string;
148
- files?: string[];
149
- }
150
- interface DiffContext {
151
- api: ApiClient;
152
- }
153
- declare class DiffService {
154
- private ctx;
155
- constructor(ctx: DiffContext);
156
- execute(options: DiffOptions): Promise<DiffResult>;
157
- private computeDiff;
158
- private getNewOverlayChanges;
159
- }
160
- //#endregion
161
- //#region src/core/services/init.service.d.ts
162
- interface InitOptions {
163
- projectName: string;
164
- targetDir: string;
165
- apiUrl: string;
166
- token: string;
167
- organizationId?: string;
168
- organization?: OrganizationInfo;
169
- allowExistingDir?: boolean;
170
- }
171
- interface InitResult {
172
- projectDir: string;
173
- organization: OrganizationInfo;
174
- createdFiles: string[];
175
- }
176
- declare class InitService {
177
- private readonly templatesDir;
178
- private static readonly PROJECT_DIRS;
179
- private static readonly PROJECT_FILES;
180
- constructor(templatesDir: string);
181
- run(options: InitOptions): Promise<InitResult>;
182
- resolveOrganization(apiUrl: string, token: string, organizationId?: string): Promise<OrganizationInfo>;
183
- private downloadGcpKey;
184
- dryRun(projectName: string, targetDir: string): {
185
- projectDir: string;
186
- dirs: readonly string[];
187
- files: readonly string[];
188
- };
189
- private scaffold;
190
- private renderTemplate;
191
- }
192
- //#endregion
193
- export { saveOverlayToFile as A, setClerkEnv as B, sanitizeFileName as C, loadOverlays as D, loadOverlayFile as E, exchangeCodeForTokens as F, getCredentialsPath as G, OAuthServerResult as H, generatePKCEChallenge as I, saveCredentials as J, isTokenExpired as K, getUserInfo as L, ClerkOAuthConfig as M, PKCEChallenge as N, loadOverlaysByNames as O, buildAuthorizationUrl as P, refreshAccessToken as R, isContentEqual as S, getLocalOverlayNames as T, startOAuthServer as U, tokenResponseToCredentials as V, deleteCredentials as W, ApiError as X, getConfig as Y, createApiClient as _, DiffOptions as a, findRemoteOnlyOverlays as b, StatusOptions as c, PullOptions as d, PullService as f, ApiClient as g, PushService as h, DiffContext as i, ClerkEnv as j, loadOverlaysFromDir as k, StatusService as l, PushOptions as m, InitResult as n, DiffService as o, PushContext as p, loadCredentials as q, InitService as r, StatusContext as s, InitOptions as t, PullContext as u, unwrap as v, LoadedOverlay as w, formatError as x, resolveAppUrl as y, setClerkConfig as z };
@@ -1,69 +0,0 @@
1
- import { CreateOverlayDto, OverlaysResponseDto } from "@revos/api-client";
2
-
3
- //#region src/core/types.d.ts
4
- type CubeOverlay = OverlaysResponseDto["data"][number];
5
- type CubeDefinition = CubeOverlay["data"];
6
- type OverlayFileData = CubeDefinition & {
7
- name?: string;
8
- description?: string;
9
- };
10
- type OverlayFile = CreateOverlayDto;
11
- interface Config {
12
- apiUrl: string;
13
- token: string;
14
- organizationId?: string;
15
- }
16
- type SyncStatus = "new" | "modified" | "conflict" | "synced" | "remote-only";
17
- interface OverlayStatusInfo {
18
- name: string;
19
- status: SyncStatus;
20
- localMtime?: Date;
21
- remoteUpdatedAt?: Date;
22
- }
23
- interface PushResult {
24
- created: string[];
25
- updated: string[];
26
- skipped: string[];
27
- conflicts: Array<{
28
- name: string;
29
- reason: string;
30
- }>;
31
- errors: Array<{
32
- name: string;
33
- error: string;
34
- }>;
35
- }
36
- interface PullResult {
37
- pulled: Array<{
38
- name: string;
39
- filePath: string;
40
- }>;
41
- notFound: string[];
42
- errors: Array<{
43
- name: string;
44
- error: string;
45
- }>;
46
- }
47
- interface StatusResult {
48
- statuses: OverlayStatusInfo[];
49
- hasConflicts: boolean;
50
- hasRemoteOnly: boolean;
51
- }
52
- interface DiffEntry {
53
- name: string;
54
- isNew: boolean;
55
- isRemoteOnly: boolean;
56
- isSynced: boolean;
57
- changes: DiffChange[];
58
- }
59
- interface DiffChange {
60
- field: string;
61
- type: "added" | "removed" | "modified";
62
- oldValue?: string;
63
- newValue?: string;
64
- }
65
- interface DiffResult {
66
- entries: DiffEntry[];
67
- }
68
- //#endregion
69
- export { DiffEntry as a, OverlayFileData as c, PushResult as d, StatusResult as f, DiffChange as i, OverlayStatusInfo as l, CubeDefinition as n, DiffResult as o, SyncStatus as p, CubeOverlay as r, OverlayFile as s, Config as t, PullResult as u };