@revos/cli 0.1.4 → 0.2.1
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 +104 -0
- package/dist/adapters/oclif/commands/action-runs/get.d.mts +6 -0
- package/dist/adapters/oclif/commands/action-runs/get.mjs +8 -0
- package/dist/adapters/oclif/commands/action-runs/list.d.mts +6 -0
- package/dist/adapters/oclif/commands/action-runs/list.mjs +8 -0
- package/dist/adapters/oclif/commands/actions/get-input-schema.d.mts +6 -0
- package/dist/adapters/oclif/commands/actions/get-input-schema.mjs +23 -0
- package/dist/adapters/oclif/commands/actions/get-params-schema.d.mts +6 -0
- package/dist/adapters/oclif/commands/actions/get-params-schema.mjs +23 -0
- package/dist/adapters/oclif/commands/actions/get.d.mts +6 -0
- package/dist/adapters/oclif/commands/actions/get.mjs +8 -0
- package/dist/adapters/oclif/commands/actions/list.d.mts +6 -0
- package/dist/adapters/oclif/commands/actions/list.mjs +27 -0
- package/dist/adapters/oclif/commands/ai-instructions/create.d.mts +6 -0
- package/dist/adapters/oclif/commands/ai-instructions/create.mjs +8 -0
- package/dist/adapters/oclif/commands/ai-instructions/delete.d.mts +6 -0
- package/dist/adapters/oclif/commands/ai-instructions/delete.mjs +8 -0
- package/dist/adapters/oclif/commands/ai-instructions/get.d.mts +6 -0
- package/dist/adapters/oclif/commands/ai-instructions/get.mjs +8 -0
- package/dist/adapters/oclif/commands/ai-instructions/list.d.mts +6 -0
- package/dist/adapters/oclif/commands/ai-instructions/list.mjs +8 -0
- package/dist/adapters/oclif/commands/ai-instructions/update.d.mts +6 -0
- package/dist/adapters/oclif/commands/ai-instructions/update.mjs +8 -0
- package/dist/adapters/oclif/commands/auth/login.d.mts +2 -2
- package/dist/adapters/oclif/commands/auth/login.mjs +2 -2
- 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/gservice-account-keys/get.d.mts +6 -0
- package/dist/adapters/oclif/commands/gservice-account-keys/get.mjs +8 -0
- package/dist/adapters/oclif/commands/gservice-account-keys/reveal.d.mts +6 -0
- package/dist/adapters/oclif/commands/gservice-account-keys/reveal.mjs +14 -0
- package/dist/adapters/oclif/commands/gservice-accounts/create.d.mts +6 -0
- package/dist/adapters/oclif/commands/gservice-accounts/create.mjs +8 -0
- package/dist/adapters/oclif/commands/gservice-accounts/delete.d.mts +6 -0
- package/dist/adapters/oclif/commands/gservice-accounts/delete.mjs +8 -0
- package/dist/adapters/oclif/commands/gservice-accounts/get.d.mts +6 -0
- package/dist/adapters/oclif/commands/gservice-accounts/get.mjs +8 -0
- package/dist/adapters/oclif/commands/gservice-accounts/list.d.mts +6 -0
- package/dist/adapters/oclif/commands/gservice-accounts/list.mjs +8 -0
- package/dist/adapters/oclif/commands/init.d.mts +1 -1
- package/dist/adapters/oclif/commands/init.mjs +4 -3
- package/dist/adapters/oclif/commands/integrations/create.d.mts +11 -0
- package/dist/adapters/oclif/commands/integrations/create.mjs +16 -0
- package/dist/adapters/oclif/commands/integrations/get.d.mts +15 -0
- package/dist/adapters/oclif/commands/integrations/get.mjs +21 -0
- package/dist/adapters/oclif/commands/integrations/list.d.mts +11 -0
- package/dist/adapters/oclif/commands/integrations/list.mjs +16 -0
- package/dist/adapters/oclif/commands/integrations/update.d.mts +15 -0
- package/dist/adapters/oclif/commands/integrations/update.mjs +21 -0
- package/dist/adapters/oclif/commands/org/create.d.mts +6 -0
- package/dist/adapters/oclif/commands/org/create.mjs +8 -0
- 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.d.mts +6 -0
- package/dist/adapters/oclif/commands/org/get.mjs +8 -0
- package/dist/adapters/oclif/commands/org/list.d.mts +2 -2
- package/dist/adapters/oclif/commands/org/list.mjs +2 -2
- package/dist/adapters/oclif/commands/org/switch.d.mts +1 -1
- package/dist/adapters/oclif/commands/org/switch.mjs +5 -4
- package/dist/adapters/oclif/commands/overlays/diff.d.mts +2 -2
- package/dist/adapters/oclif/commands/overlays/diff.mjs +5 -5
- package/dist/adapters/oclif/commands/overlays/pull.d.mts +2 -2
- package/dist/adapters/oclif/commands/overlays/pull.mjs +4 -3
- package/dist/adapters/oclif/commands/overlays/push.d.mts +2 -2
- package/dist/adapters/oclif/commands/overlays/push.mjs +2 -2
- package/dist/adapters/oclif/commands/overlays/status.d.mts +2 -2
- package/dist/adapters/oclif/commands/overlays/status.mjs +2 -2
- package/dist/adapters/oclif/commands/score-groups/create.d.mts +6 -0
- package/dist/adapters/oclif/commands/score-groups/create.mjs +8 -0
- package/dist/adapters/oclif/commands/score-groups/delete.d.mts +6 -0
- package/dist/adapters/oclif/commands/score-groups/delete.mjs +8 -0
- package/dist/adapters/oclif/commands/score-groups/get.d.mts +6 -0
- package/dist/adapters/oclif/commands/score-groups/get.mjs +8 -0
- package/dist/adapters/oclif/commands/score-groups/list.d.mts +6 -0
- package/dist/adapters/oclif/commands/score-groups/list.mjs +8 -0
- package/dist/adapters/oclif/commands/score-groups/update.d.mts +6 -0
- package/dist/adapters/oclif/commands/score-groups/update.mjs +8 -0
- package/dist/adapters/oclif/commands/scores/create.d.mts +6 -0
- package/dist/adapters/oclif/commands/scores/create.mjs +8 -0
- package/dist/adapters/oclif/commands/scores/delete.d.mts +6 -0
- package/dist/adapters/oclif/commands/scores/delete.mjs +8 -0
- package/dist/adapters/oclif/commands/scores/list.d.mts +6 -0
- package/dist/adapters/oclif/commands/scores/list.mjs +8 -0
- package/dist/adapters/oclif/commands/scores/update.d.mts +6 -0
- package/dist/adapters/oclif/commands/scores/update.mjs +8 -0
- package/dist/adapters/oclif/commands/segments/create.d.mts +6 -0
- package/dist/adapters/oclif/commands/segments/create.mjs +8 -0
- package/dist/adapters/oclif/commands/segments/delete.d.mts +6 -0
- package/dist/adapters/oclif/commands/segments/delete.mjs +8 -0
- package/dist/adapters/oclif/commands/segments/evaluate.d.mts +6 -0
- package/dist/adapters/oclif/commands/segments/evaluate.mjs +14 -0
- package/dist/adapters/oclif/commands/segments/get-evaluation-history.d.mts +6 -0
- package/dist/adapters/oclif/commands/segments/get-evaluation-history.mjs +14 -0
- package/dist/adapters/oclif/commands/segments/get-version.d.mts +6 -0
- package/dist/adapters/oclif/commands/segments/get-version.mjs +23 -0
- package/dist/adapters/oclif/commands/segments/get.d.mts +6 -0
- package/dist/adapters/oclif/commands/segments/get.mjs +8 -0
- package/dist/adapters/oclif/commands/segments/list-versions.d.mts +6 -0
- package/dist/adapters/oclif/commands/segments/list-versions.mjs +29 -0
- package/dist/adapters/oclif/commands/segments/list.d.mts +6 -0
- package/dist/adapters/oclif/commands/segments/list.mjs +8 -0
- package/dist/adapters/oclif/commands/segments/restore-version.d.mts +6 -0
- package/dist/adapters/oclif/commands/segments/restore-version.mjs +23 -0
- package/dist/adapters/oclif/commands/segments/update.d.mts +6 -0
- package/dist/adapters/oclif/commands/segments/update.mjs +8 -0
- package/dist/adapters/oclif/commands/table-views/create.d.mts +6 -0
- package/dist/adapters/oclif/commands/table-views/create.mjs +8 -0
- package/dist/adapters/oclif/commands/table-views/delete.d.mts +6 -0
- package/dist/adapters/oclif/commands/table-views/delete.mjs +8 -0
- package/dist/adapters/oclif/commands/table-views/list.d.mts +6 -0
- package/dist/adapters/oclif/commands/table-views/list.mjs +8 -0
- package/dist/adapters/oclif/commands/table-views/update.d.mts +6 -0
- package/dist/adapters/oclif/commands/table-views/update.mjs +8 -0
- package/dist/adapters/oclif/commands/tables/create.d.mts +6 -0
- package/dist/adapters/oclif/commands/tables/create.mjs +8 -0
- package/dist/adapters/oclif/commands/tables/delete.d.mts +6 -0
- package/dist/adapters/oclif/commands/tables/delete.mjs +8 -0
- package/dist/adapters/oclif/commands/tables/get.d.mts +6 -0
- package/dist/adapters/oclif/commands/tables/get.mjs +8 -0
- package/dist/adapters/oclif/commands/tables/list.d.mts +6 -0
- package/dist/adapters/oclif/commands/tables/list.mjs +8 -0
- package/dist/adapters/oclif/commands/tables/update.d.mts +6 -0
- package/dist/adapters/oclif/commands/tables/update.mjs +8 -0
- package/dist/{base.command-DlVQ9Cqa.mjs → base.command-YiwlGlKs.mjs} +1 -1
- package/dist/{core-gKJ_V-K5.mjs → core-jpFPylBb.mjs} +31 -7
- package/dist/factory-BrFKT8t-.mjs +90 -0
- package/dist/{index-B8n2GxTc.d.mts → index-DD2Vr-pu.d.mts} +6 -3
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +2 -2
- package/dist/presets-D9b6IWKy.mjs +98 -0
- package/dist/templates/.devcontainer/devcontainer.json +2 -2
- package/dist/templates/AGENTS.md +19 -9
- package/dist/templates/skills/create-dbt-transformations/SKILL.md +21 -13
- package/dist/templates/skills/create-dbt-transformations/references/edge-cases.md +1 -1
- package/dist/templates/skills/create-semantic-model/SKILL.md +11 -11
- package/dist/templates/skills/create-semantic-model/references/cube-examples.md +83 -5
- package/dist/templates/skills/explore-lakehouse/SKILL.md +7 -3
- package/dist/templates/skills/load-sample-data/SKILL.md +119 -0
- package/package.json +8 -3
- /package/dist/{base.command-BjFWMIzL.d.mts → base.command-d7VW6WTp.d.mts} +0 -0
- /package/dist/{types-DmuJzN0Z.d.mts → types-C_p_6rkj.d.mts} +0 -0
- /package/dist/{types-DsQtGF-c.d.mts → types-Y_ht_ja5.d.mts} +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { m as unwrap } from "../../../../core-jpFPylBb.mjs";
|
|
2
|
+
import { n as defineApiCommand } from "../../../../factory-BrFKT8t-.mjs";
|
|
3
|
+
import { Args, Flags } from "@oclif/core";
|
|
4
|
+
//#region src/adapters/oclif/commands/segments/list-versions.ts
|
|
5
|
+
var list_versions_default = defineApiCommand({
|
|
6
|
+
description: "List versions of a segment",
|
|
7
|
+
args: { id: Args.string({
|
|
8
|
+
description: "Segment ID",
|
|
9
|
+
required: true
|
|
10
|
+
}) },
|
|
11
|
+
flags: {
|
|
12
|
+
"page-size": Flags.integer({ description: "Maximum number of items to return" }),
|
|
13
|
+
"page-token": Flags.string({ description: "Token for the next page" }),
|
|
14
|
+
"order-by": Flags.string({ description: "Field to order results by" }),
|
|
15
|
+
filter: Flags.string({ description: "Filter expression" }),
|
|
16
|
+
fields: Flags.string({ description: "Comma-separated fields to include" })
|
|
17
|
+
},
|
|
18
|
+
call: async ({ api, args, flags }) => {
|
|
19
|
+
const params = { id: args.id };
|
|
20
|
+
if (flags["page-size"] !== void 0) params.pageSize = flags["page-size"];
|
|
21
|
+
if (flags["page-token"] !== void 0) params.pageToken = flags["page-token"];
|
|
22
|
+
if (flags["order-by"] !== void 0) params.orderBy = flags["order-by"];
|
|
23
|
+
if (flags.filter !== void 0) params.filter = flags.filter;
|
|
24
|
+
if (flags.fields !== void 0) params.fields = flags.fields;
|
|
25
|
+
return unwrap(await api.segments.listVersions(params));
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
//#endregion
|
|
29
|
+
export { list_versions_default as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { i as listCommand } from "../../../../presets-D9b6IWKy.mjs";
|
|
2
|
+
//#region src/adapters/oclif/commands/segments/list.ts
|
|
3
|
+
var list_default = listCommand({
|
|
4
|
+
resource: "segments",
|
|
5
|
+
description: "List segments"
|
|
6
|
+
});
|
|
7
|
+
//#endregion
|
|
8
|
+
export { list_default as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { m as unwrap } from "../../../../core-jpFPylBb.mjs";
|
|
2
|
+
import { n as defineApiCommand } from "../../../../factory-BrFKT8t-.mjs";
|
|
3
|
+
import { Args } from "@oclif/core";
|
|
4
|
+
//#region src/adapters/oclif/commands/segments/restore-version.ts
|
|
5
|
+
var restore_version_default = defineApiCommand({
|
|
6
|
+
description: "Restore a segment to a specific version",
|
|
7
|
+
args: {
|
|
8
|
+
id: Args.string({
|
|
9
|
+
description: "Segment ID",
|
|
10
|
+
required: true
|
|
11
|
+
}),
|
|
12
|
+
version: Args.integer({
|
|
13
|
+
description: "Version number",
|
|
14
|
+
required: true
|
|
15
|
+
})
|
|
16
|
+
},
|
|
17
|
+
call: async ({ api, args }) => unwrap(await api.segments.restoreVersion({
|
|
18
|
+
id: args.id,
|
|
19
|
+
version: args.version
|
|
20
|
+
}))
|
|
21
|
+
});
|
|
22
|
+
//#endregion
|
|
23
|
+
export { restore_version_default as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { a as updateCommand } from "../../../../presets-D9b6IWKy.mjs";
|
|
2
|
+
//#region src/adapters/oclif/commands/segments/update.ts
|
|
3
|
+
var update_default = updateCommand({
|
|
4
|
+
resource: "segments",
|
|
5
|
+
description: "Update a segment"
|
|
6
|
+
});
|
|
7
|
+
//#endregion
|
|
8
|
+
export { update_default as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { t as createCommand } from "../../../../presets-D9b6IWKy.mjs";
|
|
2
|
+
//#region src/adapters/oclif/commands/table-views/create.ts
|
|
3
|
+
var create_default = createCommand({
|
|
4
|
+
resource: "tableViews",
|
|
5
|
+
description: "Create a new table view"
|
|
6
|
+
});
|
|
7
|
+
//#endregion
|
|
8
|
+
export { create_default as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { n as deleteCommand } from "../../../../presets-D9b6IWKy.mjs";
|
|
2
|
+
//#region src/adapters/oclif/commands/table-views/delete.ts
|
|
3
|
+
var delete_default = deleteCommand({
|
|
4
|
+
resource: "tableViews",
|
|
5
|
+
description: "Delete a table view"
|
|
6
|
+
});
|
|
7
|
+
//#endregion
|
|
8
|
+
export { delete_default as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { i as listCommand } from "../../../../presets-D9b6IWKy.mjs";
|
|
2
|
+
//#region src/adapters/oclif/commands/table-views/list.ts
|
|
3
|
+
var list_default = listCommand({
|
|
4
|
+
resource: "tableViews",
|
|
5
|
+
description: "List table views"
|
|
6
|
+
});
|
|
7
|
+
//#endregion
|
|
8
|
+
export { list_default as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { a as updateCommand } from "../../../../presets-D9b6IWKy.mjs";
|
|
2
|
+
//#region src/adapters/oclif/commands/table-views/update.ts
|
|
3
|
+
var update_default = updateCommand({
|
|
4
|
+
resource: "tableViews",
|
|
5
|
+
description: "Update a table view"
|
|
6
|
+
});
|
|
7
|
+
//#endregion
|
|
8
|
+
export { update_default as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { t as createCommand } from "../../../../presets-D9b6IWKy.mjs";
|
|
2
|
+
//#region src/adapters/oclif/commands/tables/create.ts
|
|
3
|
+
var create_default = createCommand({
|
|
4
|
+
resource: "tables",
|
|
5
|
+
description: "Create a new table"
|
|
6
|
+
});
|
|
7
|
+
//#endregion
|
|
8
|
+
export { create_default as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { n as deleteCommand } from "../../../../presets-D9b6IWKy.mjs";
|
|
2
|
+
//#region src/adapters/oclif/commands/tables/delete.ts
|
|
3
|
+
var delete_default = deleteCommand({
|
|
4
|
+
resource: "tables",
|
|
5
|
+
description: "Delete a table"
|
|
6
|
+
});
|
|
7
|
+
//#endregion
|
|
8
|
+
export { delete_default as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { r as getCommand } from "../../../../presets-D9b6IWKy.mjs";
|
|
2
|
+
//#region src/adapters/oclif/commands/tables/get.ts
|
|
3
|
+
var get_default = getCommand({
|
|
4
|
+
resource: "tables",
|
|
5
|
+
description: "Get a table by ID"
|
|
6
|
+
});
|
|
7
|
+
//#endregion
|
|
8
|
+
export { get_default as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { i as listCommand } from "../../../../presets-D9b6IWKy.mjs";
|
|
2
|
+
//#region src/adapters/oclif/commands/tables/list.ts
|
|
3
|
+
var list_default = listCommand({
|
|
4
|
+
resource: "tables",
|
|
5
|
+
description: "List tables"
|
|
6
|
+
});
|
|
7
|
+
//#endregion
|
|
8
|
+
export { list_default as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { a as updateCommand } from "../../../../presets-D9b6IWKy.mjs";
|
|
2
|
+
//#region src/adapters/oclif/commands/tables/update.ts
|
|
3
|
+
var update_default = updateCommand({
|
|
4
|
+
resource: "tables",
|
|
5
|
+
description: "Update a table"
|
|
6
|
+
});
|
|
7
|
+
//#endregion
|
|
8
|
+
export { update_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as setClerkEnv, F as ApiError } from "./core-jpFPylBb.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
|
|
@@ -21,6 +21,7 @@ var ApiError = class extends Error {
|
|
|
21
21
|
//#region src/core/auth/credentials-store.ts
|
|
22
22
|
const REVOS_DIR = path.join(os.homedir(), ".revos");
|
|
23
23
|
const CREDENTIALS_FILE = path.join(REVOS_DIR, "credentials.json");
|
|
24
|
+
const isPosix = process.platform !== "win32";
|
|
24
25
|
function getCredentialsPath() {
|
|
25
26
|
return CREDENTIALS_FILE;
|
|
26
27
|
}
|
|
@@ -34,11 +35,11 @@ function loadCredentials() {
|
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
function saveCredentials(credentials) {
|
|
37
|
-
if (!fs.existsSync(REVOS_DIR)) fs.mkdirSync(REVOS_DIR, { mode: 448 });
|
|
38
|
-
fs.writeFileSync(CREDENTIALS_FILE, JSON.stringify(credentials, null, 2), {
|
|
38
|
+
if (!fs.existsSync(REVOS_DIR)) fs.mkdirSync(REVOS_DIR, isPosix ? { mode: 448 } : void 0);
|
|
39
|
+
fs.writeFileSync(CREDENTIALS_FILE, JSON.stringify(credentials, null, 2), isPosix ? {
|
|
39
40
|
mode: 384,
|
|
40
41
|
encoding: "utf-8"
|
|
41
|
-
});
|
|
42
|
+
} : { encoding: "utf-8" });
|
|
42
43
|
}
|
|
43
44
|
function deleteCredentials() {
|
|
44
45
|
try {
|
|
@@ -391,6 +392,26 @@ function findRemoteOnlyOverlays(localOverlays, remoteOverlays) {
|
|
|
391
392
|
return remoteOverlays.filter((r) => !localNames.has(r.name));
|
|
392
393
|
}
|
|
393
394
|
//#endregion
|
|
395
|
+
//#region src/core/url.ts
|
|
396
|
+
const DEFAULT_APP_URL = "https://app.revos.dev";
|
|
397
|
+
/**
|
|
398
|
+
* Derive the RevOS app (frontend) URL from the API URL.
|
|
399
|
+
* `https://api.revos.ai` → `https://app.revos.ai`
|
|
400
|
+
* `https://api.revos.dev` → `https://app.revos.dev`
|
|
401
|
+
*/
|
|
402
|
+
function resolveAppUrl(apiUrl) {
|
|
403
|
+
try {
|
|
404
|
+
const parsed = new URL(apiUrl);
|
|
405
|
+
const host = parsed.hostname;
|
|
406
|
+
if (host.startsWith("api.")) {
|
|
407
|
+
parsed.hostname = host.replace(/^api\./, "app.");
|
|
408
|
+
parsed.pathname = "/";
|
|
409
|
+
return parsed.origin;
|
|
410
|
+
}
|
|
411
|
+
} catch {}
|
|
412
|
+
return DEFAULT_APP_URL;
|
|
413
|
+
}
|
|
414
|
+
//#endregion
|
|
394
415
|
//#region src/core/api/create-client.ts
|
|
395
416
|
function createApiClient(config) {
|
|
396
417
|
const headers = {};
|
|
@@ -817,6 +838,7 @@ var InitService = class InitService {
|
|
|
817
838
|
".claude/skills/create-semantic-model/references",
|
|
818
839
|
".claude/skills/create-dbt-transformations",
|
|
819
840
|
".claude/skills/create-dbt-transformations/references",
|
|
841
|
+
".claude/skills/load-sample-data",
|
|
820
842
|
"dbt/models/bronze",
|
|
821
843
|
"dbt/models/silver",
|
|
822
844
|
"dbt/models/gold",
|
|
@@ -841,6 +863,7 @@ var InitService = class InitService {
|
|
|
841
863
|
".claude/skills/create-dbt-transformations/references/sql-templates.md",
|
|
842
864
|
".claude/skills/create-dbt-transformations/references/schema-conventions.md",
|
|
843
865
|
".claude/skills/create-dbt-transformations/references/edge-cases.md",
|
|
866
|
+
".claude/skills/load-sample-data/SKILL.md",
|
|
844
867
|
"dbt/models/bronze/.gitkeep",
|
|
845
868
|
"dbt/models/silver/.gitkeep",
|
|
846
869
|
"dbt/models/gold/.gitkeep",
|
|
@@ -895,10 +918,10 @@ var InitService = class InitService {
|
|
|
895
918
|
if (!keyJson) throw new Error("Service account key is empty");
|
|
896
919
|
const gcpKeyPath = path.join(os.homedir(), ".revos", `${projectSlug}-gsa-creds.json`);
|
|
897
920
|
fs.mkdirSync(path.dirname(gcpKeyPath), { recursive: true });
|
|
898
|
-
fs.writeFileSync(gcpKeyPath, keyJson, {
|
|
921
|
+
fs.writeFileSync(gcpKeyPath, keyJson, process.platform !== "win32" ? {
|
|
899
922
|
encoding: "utf-8",
|
|
900
923
|
mode: 384
|
|
901
|
-
});
|
|
924
|
+
} : { encoding: "utf-8" });
|
|
902
925
|
return JSON.parse(keyJson).project_id ?? "";
|
|
903
926
|
}
|
|
904
927
|
dryRun(projectName, targetDir) {
|
|
@@ -948,6 +971,7 @@ var InitService = class InitService {
|
|
|
948
971
|
".claude/skills/create-dbt-transformations/references/sql-templates.md": this.renderTemplate("skills/create-dbt-transformations/references/sql-templates.md", {}),
|
|
949
972
|
".claude/skills/create-dbt-transformations/references/schema-conventions.md": this.renderTemplate("skills/create-dbt-transformations/references/schema-conventions.md", {}),
|
|
950
973
|
".claude/skills/create-dbt-transformations/references/edge-cases.md": this.renderTemplate("skills/create-dbt-transformations/references/edge-cases.md", {}),
|
|
974
|
+
".claude/skills/load-sample-data/SKILL.md": this.renderTemplate("skills/load-sample-data/SKILL.md", {}),
|
|
951
975
|
"dbt/models/bronze/.gitkeep": "",
|
|
952
976
|
"dbt/models/silver/.gitkeep": "",
|
|
953
977
|
"dbt/models/gold/.gitkeep": "",
|
|
@@ -956,7 +980,7 @@ var InitService = class InitService {
|
|
|
956
980
|
for (const [rel, content] of Object.entries(files)) {
|
|
957
981
|
const full = path.join(projectDir, rel);
|
|
958
982
|
fs.writeFileSync(full, content, "utf-8");
|
|
959
|
-
if (rel.endsWith(".sh")) fs.chmodSync(full, 493);
|
|
983
|
+
if (rel.endsWith(".sh") && process.platform !== "win32") fs.chmodSync(full, 493);
|
|
960
984
|
created.push(rel);
|
|
961
985
|
}
|
|
962
986
|
return created;
|
|
@@ -970,4 +994,4 @@ var InitService = class InitService {
|
|
|
970
994
|
}
|
|
971
995
|
};
|
|
972
996
|
//#endregion
|
|
973
|
-
export {
|
|
997
|
+
export { deleteCredentials as A, generatePKCEChallenge as C, setClerkEnv as D, setClerkConfig as E, ApiError as F, isTokenExpired as M, loadCredentials as N, tokenResponseToCredentials as O, saveCredentials as P, exchangeCodeForTokens as S, refreshAccessToken as T, formatError as _, PullService as a, getConfig as b, loadOverlayFile as c, loadOverlaysFromDir as d, saveOverlayToFile as f, findRemoteOnlyOverlays as g, resolveAppUrl as h, StatusService as i, getCredentialsPath as j, startOAuthServer as k, loadOverlays as l, unwrap as m, selectOrganization as n, PushService as o, createApiClient as p, DiffService as r, getLocalOverlayNames as s, InitService as t, loadOverlaysByNames as u, isContentEqual as v, getUserInfo as w, buildAuthorizationUrl as x, sanitizeFileName as y };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { b as getConfig, p as createApiClient } from "./core-jpFPylBb.mjs";
|
|
2
|
+
import { t as BaseCommand } from "./base.command-YiwlGlKs.mjs";
|
|
3
|
+
import * as fs from "fs";
|
|
4
|
+
import * as path from "path";
|
|
5
|
+
import chalk from "chalk";
|
|
6
|
+
import { Flags } from "@oclif/core";
|
|
7
|
+
//#region src/adapters/oclif/factory.ts
|
|
8
|
+
const bodyFlag = Flags.string({
|
|
9
|
+
description: "Request body. Inline JSON, '@path' to read a file, or '-' to read stdin.",
|
|
10
|
+
helpValue: "JSON|@file|-"
|
|
11
|
+
});
|
|
12
|
+
function defineApiCommand(spec) {
|
|
13
|
+
class ApiCmd extends BaseCommand {
|
|
14
|
+
static description = spec.description;
|
|
15
|
+
static examples = spec.examples ?? [];
|
|
16
|
+
static args = spec.args ?? {};
|
|
17
|
+
static flags = spec.flags ?? {};
|
|
18
|
+
async run() {
|
|
19
|
+
const api = createApiClient(await getConfig());
|
|
20
|
+
const flags = this.flags;
|
|
21
|
+
const body = await parseBody(typeof flags.body === "string" ? flags.body : void 0);
|
|
22
|
+
const result = await spec.call({
|
|
23
|
+
api,
|
|
24
|
+
args: this.args,
|
|
25
|
+
flags: this.flags,
|
|
26
|
+
body,
|
|
27
|
+
command: this
|
|
28
|
+
});
|
|
29
|
+
if (!this.jsonEnabled()) this.render(result);
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
render(data) {
|
|
33
|
+
if (spec.render) {
|
|
34
|
+
spec.render(data, this);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
defaultRender(this, data);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return ApiCmd;
|
|
41
|
+
}
|
|
42
|
+
async function parseBody(value) {
|
|
43
|
+
if (value === void 0) return void 0;
|
|
44
|
+
let raw;
|
|
45
|
+
if (value === "-") raw = await readStdin();
|
|
46
|
+
else if (value.startsWith("@")) {
|
|
47
|
+
const filePath = path.resolve(process.cwd(), value.slice(1));
|
|
48
|
+
raw = fs.readFileSync(filePath, "utf8");
|
|
49
|
+
} else raw = value;
|
|
50
|
+
try {
|
|
51
|
+
return JSON.parse(raw);
|
|
52
|
+
} catch (err) {
|
|
53
|
+
throw new Error(`--body is not valid JSON: ${err.message}`, { cause: err });
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
async function readStdin() {
|
|
57
|
+
const chunks = [];
|
|
58
|
+
for await (const chunk of process.stdin) chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
59
|
+
return Buffer.concat(chunks).toString("utf8");
|
|
60
|
+
}
|
|
61
|
+
function defaultRender(cmd, data) {
|
|
62
|
+
if (data == null) return;
|
|
63
|
+
if (Array.isArray(data)) {
|
|
64
|
+
if (data.length === 0) {
|
|
65
|
+
cmd.log("(no results)");
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const rows = data.map((d) => toRow(d));
|
|
69
|
+
cmd.table(rows);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (typeof data === "object") {
|
|
73
|
+
for (const [k, v] of Object.entries(data)) cmd.log(`${chalk.bold(k)}: ${formatValue(v)}`);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
cmd.log(String(data));
|
|
77
|
+
}
|
|
78
|
+
function toRow(d) {
|
|
79
|
+
if (d == null || typeof d !== "object") return { value: d };
|
|
80
|
+
const out = {};
|
|
81
|
+
for (const [k, v] of Object.entries(d)) out[k] = formatValue(v);
|
|
82
|
+
return out;
|
|
83
|
+
}
|
|
84
|
+
function formatValue(v) {
|
|
85
|
+
if (v == null) return "";
|
|
86
|
+
if (typeof v === "object") return JSON.stringify(v);
|
|
87
|
+
return String(v);
|
|
88
|
+
}
|
|
89
|
+
//#endregion
|
|
90
|
+
export { defineApiCommand as n, bodyFlag as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
-
import { c as StoredCredentials, i as OAuthCallbackResult, l as TokenResponse, r as ClerkUserInfo, s as OrganizationInfo } from "./types-
|
|
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
3
|
import { Client } from "@revos/api-client";
|
|
4
4
|
|
|
5
5
|
//#region src/core/errors.d.ts
|
|
@@ -80,6 +80,9 @@ declare function sanitizeFileName(name: string): string;
|
|
|
80
80
|
declare function isContentEqual(local: OverlayFile, remote: CubeOverlay): boolean;
|
|
81
81
|
declare function findRemoteOnlyOverlays(localOverlays: LoadedOverlay[], remoteOverlays: CubeOverlay[]): CubeOverlay[];
|
|
82
82
|
//#endregion
|
|
83
|
+
//#region src/core/url.d.ts
|
|
84
|
+
declare function resolveAppUrl(apiUrl: string): string;
|
|
85
|
+
//#endregion
|
|
83
86
|
//#region src/core/api/create-client.d.ts
|
|
84
87
|
type ApiClient = Client;
|
|
85
88
|
declare function createApiClient(config: {
|
|
@@ -187,4 +190,4 @@ declare class InitService {
|
|
|
187
190
|
private renderTemplate;
|
|
188
191
|
}
|
|
189
192
|
//#endregion
|
|
190
|
-
export {
|
|
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 };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DiffEntry, c as OverlayFileData, d as PushResult, f as StatusResult, i as DiffChange, l as OverlayStatusInfo, n as CubeDefinition, o as DiffResult, p as SyncStatus, r as CubeOverlay, s as OverlayFile, t as Config, u as PullResult } from "./types-
|
|
2
|
-
import { A as
|
|
3
|
-
import { a as OrgListResult, c as StoredCredentials, i as OAuthCallbackResult, l as TokenResponse, n as AuthStatusInfo, o as OrgSwitchResult, r as ClerkUserInfo, s as OrganizationInfo, t as AuthResult } from "./types-
|
|
4
|
-
export { ApiClient, ApiError, AuthResult, AuthStatusInfo, ClerkEnv, ClerkOAuthConfig, ClerkUserInfo, Config, CubeDefinition, CubeOverlay, DiffChange, DiffContext, DiffEntry, DiffOptions, DiffResult, DiffService, InitOptions, InitResult, InitService, LoadedOverlay, OAuthCallbackResult, OAuthServerResult, OrgListResult, OrgSwitchResult, OrganizationInfo, OverlayFile, OverlayFileData, OverlayStatusInfo, PKCEChallenge, PullContext, PullOptions, PullResult, PullService, PushContext, PushOptions, PushResult, PushService, StatusContext, StatusOptions, StatusResult, StatusService, StoredCredentials, SyncStatus, TokenResponse, buildAuthorizationUrl, createApiClient, deleteCredentials, exchangeCodeForTokens, findRemoteOnlyOverlays, formatError, generatePKCEChallenge, getConfig, getCredentialsPath, getLocalOverlayNames, getUserInfo, isContentEqual, isTokenExpired, loadCredentials, loadOverlayFile, loadOverlays, loadOverlaysByNames, loadOverlaysFromDir, refreshAccessToken, sanitizeFileName, saveCredentials, saveOverlayToFile, setClerkConfig, setClerkEnv, startOAuthServer, tokenResponseToCredentials, unwrap };
|
|
1
|
+
import { a as DiffEntry, c as OverlayFileData, d as PushResult, f as StatusResult, i as DiffChange, l as OverlayStatusInfo, n as CubeDefinition, o as DiffResult, p as SyncStatus, r as CubeOverlay, s as OverlayFile, t as Config, u as PullResult } from "./types-C_p_6rkj.mjs";
|
|
2
|
+
import { A as saveOverlayToFile, B as setClerkEnv, C as sanitizeFileName, D as loadOverlays, E as loadOverlayFile, F as exchangeCodeForTokens, G as getCredentialsPath, H as OAuthServerResult, I as generatePKCEChallenge, J as saveCredentials, K as isTokenExpired, L as getUserInfo, M as ClerkOAuthConfig, N as PKCEChallenge, O as loadOverlaysByNames, P as buildAuthorizationUrl, R as refreshAccessToken, S as isContentEqual, T as getLocalOverlayNames, U as startOAuthServer, V as tokenResponseToCredentials, W as deleteCredentials, X as ApiError, Y as getConfig, _ as createApiClient, a as DiffOptions, b as findRemoteOnlyOverlays, c as StatusOptions, d as PullOptions, f as PullService, g as ApiClient, h as PushService, i as DiffContext, j as ClerkEnv, k as loadOverlaysFromDir, l as StatusService, m as PushOptions, n as InitResult, o as DiffService, p as PushContext, q as loadCredentials, r as InitService, s as StatusContext, t as InitOptions, u as PullContext, v as unwrap, w as LoadedOverlay, x as formatError, y as resolveAppUrl, z as setClerkConfig } from "./index-DD2Vr-pu.mjs";
|
|
3
|
+
import { a as OrgListResult, c as StoredCredentials, i as OAuthCallbackResult, l as TokenResponse, n as AuthStatusInfo, o as OrgSwitchResult, r as ClerkUserInfo, s as OrganizationInfo, t as AuthResult } from "./types-Y_ht_ja5.mjs";
|
|
4
|
+
export { ApiClient, ApiError, AuthResult, AuthStatusInfo, ClerkEnv, ClerkOAuthConfig, ClerkUserInfo, Config, CubeDefinition, CubeOverlay, DiffChange, DiffContext, DiffEntry, DiffOptions, DiffResult, DiffService, InitOptions, InitResult, InitService, LoadedOverlay, OAuthCallbackResult, OAuthServerResult, OrgListResult, OrgSwitchResult, OrganizationInfo, OverlayFile, OverlayFileData, OverlayStatusInfo, PKCEChallenge, PullContext, PullOptions, PullResult, PullService, PushContext, PushOptions, PushResult, PushService, StatusContext, StatusOptions, StatusResult, StatusService, StoredCredentials, SyncStatus, TokenResponse, buildAuthorizationUrl, createApiClient, deleteCredentials, exchangeCodeForTokens, findRemoteOnlyOverlays, formatError, generatePKCEChallenge, getConfig, getCredentialsPath, getLocalOverlayNames, getUserInfo, isContentEqual, isTokenExpired, loadCredentials, loadOverlayFile, loadOverlays, loadOverlaysByNames, loadOverlaysFromDir, refreshAccessToken, resolveAppUrl, sanitizeFileName, saveCredentials, saveOverlayToFile, setClerkConfig, setClerkEnv, startOAuthServer, tokenResponseToCredentials, unwrap };
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
export { ApiError, DiffService, InitService, PullService, PushService, StatusService, buildAuthorizationUrl, createApiClient, deleteCredentials, exchangeCodeForTokens, findRemoteOnlyOverlays, formatError, generatePKCEChallenge, getConfig, getCredentialsPath, getLocalOverlayNames, getUserInfo, isContentEqual, isTokenExpired, loadCredentials, loadOverlayFile, loadOverlays, loadOverlaysByNames, loadOverlaysFromDir, refreshAccessToken, sanitizeFileName, saveCredentials, saveOverlayToFile, setClerkConfig, setClerkEnv, startOAuthServer, tokenResponseToCredentials, unwrap };
|
|
1
|
+
import { A as deleteCredentials, C as generatePKCEChallenge, D as setClerkEnv, E as setClerkConfig, F as ApiError, M as isTokenExpired, N as loadCredentials, O as tokenResponseToCredentials, P as saveCredentials, S as exchangeCodeForTokens, T as refreshAccessToken, _ as formatError, a as PullService, b as getConfig, c as loadOverlayFile, d as loadOverlaysFromDir, f as saveOverlayToFile, g as findRemoteOnlyOverlays, h as resolveAppUrl, i as StatusService, j as getCredentialsPath, k as startOAuthServer, l as loadOverlays, m as unwrap, o as PushService, p as createApiClient, r as DiffService, s as getLocalOverlayNames, t as InitService, u as loadOverlaysByNames, v as isContentEqual, w as getUserInfo, x as buildAuthorizationUrl, y as sanitizeFileName } from "./core-jpFPylBb.mjs";
|
|
2
|
+
export { ApiError, DiffService, InitService, PullService, PushService, StatusService, buildAuthorizationUrl, createApiClient, deleteCredentials, exchangeCodeForTokens, findRemoteOnlyOverlays, formatError, generatePKCEChallenge, getConfig, getCredentialsPath, getLocalOverlayNames, getUserInfo, isContentEqual, isTokenExpired, loadCredentials, loadOverlayFile, loadOverlays, loadOverlaysByNames, loadOverlaysFromDir, refreshAccessToken, resolveAppUrl, sanitizeFileName, saveCredentials, saveOverlayToFile, setClerkConfig, setClerkEnv, startOAuthServer, tokenResponseToCredentials, unwrap };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { m as unwrap } from "./core-jpFPylBb.mjs";
|
|
2
|
+
import { n as defineApiCommand, t as bodyFlag } from "./factory-BrFKT8t-.mjs";
|
|
3
|
+
import { Args, Flags } from "@oclif/core";
|
|
4
|
+
//#region src/adapters/oclif/presets.ts
|
|
5
|
+
const listFlags = {
|
|
6
|
+
"page-size": Flags.integer({ description: "Maximum number of items to return" }),
|
|
7
|
+
"page-token": Flags.string({ description: "Token for the next page (from previous response)" }),
|
|
8
|
+
"order-by": Flags.string({ description: "Field to order results by (e.g. 'createdAt desc')" }),
|
|
9
|
+
filter: Flags.string({ description: "Filter expression" }),
|
|
10
|
+
fields: Flags.string({ description: "Comma-separated list of fields to include" })
|
|
11
|
+
};
|
|
12
|
+
function getResource(api, key) {
|
|
13
|
+
return api[key];
|
|
14
|
+
}
|
|
15
|
+
function listCommand(spec) {
|
|
16
|
+
return defineApiCommand({
|
|
17
|
+
description: spec.description,
|
|
18
|
+
flags: listFlags,
|
|
19
|
+
call: async ({ api, flags }) => {
|
|
20
|
+
const resource = getResource(api, spec.resource);
|
|
21
|
+
if (!resource.list) throw new Error(`Resource '${String(spec.resource)}' has no list method`);
|
|
22
|
+
const params = {};
|
|
23
|
+
if (flags["page-size"] !== void 0) params.pageSize = flags["page-size"];
|
|
24
|
+
if (flags["page-token"] !== void 0) params.pageToken = flags["page-token"];
|
|
25
|
+
if (flags["order-by"] !== void 0) params.orderBy = flags["order-by"];
|
|
26
|
+
if (flags.filter !== void 0) params.filter = flags.filter;
|
|
27
|
+
if (flags.fields !== void 0) params.fields = flags.fields;
|
|
28
|
+
return unwrap(await resource.list(Object.keys(params).length > 0 ? params : void 0));
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function getCommand(spec) {
|
|
33
|
+
return defineApiCommand({
|
|
34
|
+
description: spec.description,
|
|
35
|
+
args: { id: Args.string({
|
|
36
|
+
description: "Resource ID",
|
|
37
|
+
required: true
|
|
38
|
+
}) },
|
|
39
|
+
call: async ({ api, args }) => {
|
|
40
|
+
const resource = getResource(api, spec.resource);
|
|
41
|
+
if (!resource.get) throw new Error(`Resource '${String(spec.resource)}' has no get method`);
|
|
42
|
+
return unwrap(await resource.get({ id: args.id }));
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function createCommand(spec) {
|
|
47
|
+
return defineApiCommand({
|
|
48
|
+
description: spec.description,
|
|
49
|
+
flags: { body: bodyFlag },
|
|
50
|
+
call: async ({ api, body }) => {
|
|
51
|
+
const resource = getResource(api, spec.resource);
|
|
52
|
+
if (!resource.create) throw new Error(`Resource '${String(spec.resource)}' has no create method`);
|
|
53
|
+
if (body === void 0) throw new Error("--body is required (inline JSON, '@path' for file, or '-' for stdin)");
|
|
54
|
+
return unwrap(await resource.create({ body }));
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function updateCommand(spec) {
|
|
59
|
+
return defineApiCommand({
|
|
60
|
+
description: spec.description,
|
|
61
|
+
args: { id: Args.string({
|
|
62
|
+
description: "Resource ID",
|
|
63
|
+
required: true
|
|
64
|
+
}) },
|
|
65
|
+
flags: { body: bodyFlag },
|
|
66
|
+
call: async ({ api, args, body }) => {
|
|
67
|
+
const resource = getResource(api, spec.resource);
|
|
68
|
+
if (!resource.update) throw new Error(`Resource '${String(spec.resource)}' has no update method`);
|
|
69
|
+
if (body === void 0) throw new Error("--body is required (inline JSON, '@path' for file, or '-' for stdin)");
|
|
70
|
+
return unwrap(await resource.update({
|
|
71
|
+
id: args.id,
|
|
72
|
+
body
|
|
73
|
+
}));
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function deleteCommand(spec) {
|
|
78
|
+
return defineApiCommand({
|
|
79
|
+
description: spec.description,
|
|
80
|
+
args: { id: Args.string({
|
|
81
|
+
description: "Resource ID",
|
|
82
|
+
required: true
|
|
83
|
+
}) },
|
|
84
|
+
call: async ({ api, args }) => {
|
|
85
|
+
const resource = getResource(api, spec.resource);
|
|
86
|
+
if (!resource.delete) throw new Error(`Resource '${String(spec.resource)}' has no delete method`);
|
|
87
|
+
return unwrap(await resource.delete({ id: args.id })) ?? {
|
|
88
|
+
id: args.id,
|
|
89
|
+
deleted: true
|
|
90
|
+
};
|
|
91
|
+
},
|
|
92
|
+
render: (_data, command) => {
|
|
93
|
+
command.log(`Deleted.`);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
export { updateCommand as a, listCommand as i, deleteCommand as n, getCommand as r, createCommand as t };
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"postCreateCommand": "bash .devcontainer/setup.sh",
|
|
23
23
|
"mounts": [
|
|
24
24
|
{
|
|
25
|
-
"source": "${localEnv:HOME}/.revos/<%=projectSlug%>-gsa-creds.json",
|
|
25
|
+
"source": "${localEnv:HOME}${localEnv:USERPROFILE}/.revos/<%=projectSlug%>-gsa-creds.json",
|
|
26
26
|
"target": "/tmp/.revos-gsa-creds.json",
|
|
27
27
|
"type": "bind"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"source": "${localEnv:HOME}/.revos/credentials.json",
|
|
30
|
+
"source": "${localEnv:HOME}${localEnv:USERPROFILE}/.revos/credentials.json",
|
|
31
31
|
"target": "/tmp/.revos-credentials.json",
|
|
32
32
|
"type": "bind"
|
|
33
33
|
},
|