Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jspm_packages/
*.tsbuildinfo
dist
dist-bin
# Bun bundler temp artifacts (created during `bun run build`)
*.bun-build

generated
# Keep committed snapshots of the generated GraphQL/REST artifacts so the
Expand Down
4 changes: 2 additions & 2 deletions src/commands/board/create.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildCommand } from "@stricli/core";
import { defineCommand } from "../../lib/stricli-wrappers";
import type { LocalContext } from "../../context";
import { saveBoard } from "../../gql/board/save-board";
import { GqlApiError } from "../../gql/gql-request";
Expand Down Expand Up @@ -33,7 +33,7 @@ async function create(
}
}

export const createCommand = buildCommand({
export const createCommand = defineCommand({
loader: async () => create,
parameters: {
positional: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/board/delete.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildCommand } from "@stricli/core";
import { defineCommand } from "../../lib/stricli-wrappers";
import type { LocalContext } from "../../context";
import { deleteBoard } from "../../gql/board/delete-board";
import { GqlApiError } from "../../gql/gql-request";
Expand Down Expand Up @@ -36,7 +36,7 @@ async function del(
}
}

export const deleteCommand = buildCommand({
export const deleteCommand = defineCommand({
loader: async () => del,
parameters: {
positional: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/board/get.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildCommand } from "@stricli/core";
import { defineCommand } from "../../lib/stricli-wrappers";
import type { LocalContext } from "../../context";
import { getBoard } from "../../gql/board/get-board";
import { GqlApiError } from "../../gql/gql-request";
Expand Down Expand Up @@ -33,7 +33,7 @@ async function get(
}
}

export const getCommand = buildCommand({
export const getCommand = defineCommand({
loader: async () => get,
parameters: {
positional: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/board/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildRouteMap } from "@stricli/core";
import { defineRoutes } from "../../lib/stricli-wrappers";
import { createCommand } from "./create";
import { updateCommand } from "./update";
import { getCommand } from "./get";
Expand All @@ -7,7 +7,7 @@ import { deleteCommand } from "./delete";
import { scaffoldCommand } from "./scaffold";
import { clearDefaultCommand, setDefaultCommand } from "./set-default";

export const boardRoutes = buildRouteMap({
export const boardRoutes = defineRoutes({
routes: {
create: createCommand,
update: updateCommand,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/board/list.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildCommand } from "@stricli/core";
import { defineCommand } from "../../lib/stricli-wrappers";
import chalk from "chalk";
import type { LocalContext } from "../../context";
import { listBoards, type BoardListEntry } from "../../gql/board/list-boards";
Expand Down Expand Up @@ -82,7 +82,7 @@ async function list(
}
}

export const listCommand = buildCommand({
export const listCommand = defineCommand({
loader: async () => list,
parameters: {
positional: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/board/scaffold.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildCommand } from "@stricli/core";
import { defineCommand } from "../../lib/stricli-wrappers";
import type { LocalContext } from "../../context";

// Mirrors boardScaffoldTemplate in the Go fork (cmd_board.go). Prints a minimal
Expand Down Expand Up @@ -72,7 +72,7 @@ async function scaffold(
writer.write(JSON.stringify(template, null, 2));
}

export const scaffoldCommand = buildCommand({
export const scaffoldCommand = defineCommand({
loader: async () => scaffold,
parameters: {
positional: {
Expand Down
6 changes: 3 additions & 3 deletions src/commands/board/set-default.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildCommand } from "@stricli/core";
import { defineCommand } from "../../lib/stricli-wrappers";
import type { LocalContext } from "../../context";
import {
clearDefaultDashboard,
Expand Down Expand Up @@ -67,7 +67,7 @@ async function clearDefault(
}
}

export const setDefaultCommand = buildCommand({
export const setDefaultCommand = defineCommand({
loader: async () => setDefault,
parameters: {
positional: {
Expand All @@ -84,7 +84,7 @@ export const setDefaultCommand = buildCommand({
},
});

export const clearDefaultCommand = buildCommand({
export const clearDefaultCommand = defineCommand({
loader: async () => clearDefault,
parameters: {
positional: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/board/update.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildCommand } from "@stricli/core";
import { defineCommand } from "../../lib/stricli-wrappers";
import type { LocalContext } from "../../context";
import { saveBoard } from "../../gql/board/save-board";
import { GqlApiError } from "../../gql/gql-request";
Expand Down Expand Up @@ -35,7 +35,7 @@ async function update(
}
}

export const updateCommand = buildCommand({
export const updateCommand = defineCommand({
loader: async () => update,
parameters: {
positional: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/dataset/dry-run.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildCommand } from "@stricli/core";
import { defineCommand } from "../../lib/stricli-wrappers";
import * as fs from "node:fs";
import type { LocalContext } from "../../context";
import { datasetDryRun } from "../../gql/dataset/dataset-analysis";
Expand Down Expand Up @@ -69,7 +69,7 @@ async function dryRun(
}
}

export const dryRunCommand = buildCommand({
export const dryRunCommand = defineCommand({
loader: async () => dryRun,
parameters: {
positional: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/dataset/impact.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildCommand } from "@stricli/core";
import { defineCommand } from "../../lib/stricli-wrappers";
import chalk from "chalk";
import * as fs from "node:fs";
import type { LocalContext } from "../../context";
Expand Down Expand Up @@ -89,7 +89,7 @@ async function impact(
}
}

export const impactCommand = buildCommand({
export const impactCommand = defineCommand({
loader: async () => impact,
parameters: {
positional: {
Expand Down
10 changes: 5 additions & 5 deletions src/commands/fleet/fleet.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildCommand } from "@stricli/core";
import { defineCommand } from "../../lib/stricli-wrappers";
import type { LocalContext } from "../../context";
import { loadConfig } from "../../lib/config";
import { formatApiError } from "../../lib/format-error";
Expand Down Expand Up @@ -82,7 +82,7 @@ const windowFlag = {
},
};

export const statusCommand = buildCommand({
export const statusCommand = defineCommand({
loader: async () => {
return async function (this: LocalContext, flags: FleetFlags) {
await runFleet.call(this, flags, OPAL_FLEET_STATUS);
Expand All @@ -95,7 +95,7 @@ export const statusCommand = buildCommand({
docs: { brief: "Show current status of all observe-agent instances" },
});

export const versionsCommand = buildCommand({
export const versionsCommand = defineCommand({
loader: async () => {
return async function (this: LocalContext, flags: FleetFlags) {
await runFleet.call(this, flags, OPAL_FLEET_VERSIONS);
Expand All @@ -108,7 +108,7 @@ export const versionsCommand = buildCommand({
docs: { brief: "Show observe-agent versions across the fleet" },
});

export const authCommand = buildCommand({
export const authCommand = defineCommand({
loader: async () => {
return async function (this: LocalContext, flags: FleetFlags) {
await runFleet.call(this, flags, OPAL_FLEET_AUTH);
Expand All @@ -121,7 +121,7 @@ export const authCommand = buildCommand({
docs: { brief: "Show observe-agent auth-check status across the fleet" },
});

export const hostCommand = buildCommand({
export const hostCommand = defineCommand({
loader: async () => {
return async function (
this: LocalContext,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/fleet/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { buildRouteMap } from "@stricli/core";
import { defineRoutes } from "../../lib/stricli-wrappers";
import {
authCommand,
hostCommand,
statusCommand,
versionsCommand,
} from "./fleet";

export const fleetRoutes = buildRouteMap({
export const fleetRoutes = defineRoutes({
routes: {
status: statusCommand,
host: hostCommand,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/folder/create.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildCommand } from "@stricli/core";
import { defineCommand } from "../../lib/stricli-wrappers";
import type { LocalContext } from "../../context";
import {
createFolder,
Expand Down Expand Up @@ -69,7 +69,7 @@ async function create(
}
}

export const createCommand = buildCommand({
export const createCommand = defineCommand({
loader: async () => create,
parameters: {
positional: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/folder/delete.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildCommand } from "@stricli/core";
import { defineCommand } from "../../lib/stricli-wrappers";
import type { LocalContext } from "../../context";
import { deleteFolder } from "../../gql/folder/folder";
import { GqlApiError } from "../../gql/gql-request";
Expand Down Expand Up @@ -36,7 +36,7 @@ async function del(
}
}

export const deleteCommand = buildCommand({
export const deleteCommand = defineCommand({
loader: async () => del,
parameters: {
positional: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/folder/get.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildCommand } from "@stricli/core";
import { defineCommand } from "../../lib/stricli-wrappers";
import type { LocalContext } from "../../context";
import { lookupFolderByName } from "../../gql/folder/folder";
import { GqlApiError } from "../../gql/gql-request";
Expand Down Expand Up @@ -43,7 +43,7 @@ async function get(
}
}

export const getCommand = buildCommand({
export const getCommand = defineCommand({
loader: async () => get,
parameters: {
positional: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/folder/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { buildRouteMap } from "@stricli/core";
import { defineRoutes } from "../../lib/stricli-wrappers";
import { createCommand } from "./create";
import { getCommand } from "./get";
import { updateCommand } from "./update";
import { deleteCommand } from "./delete";

export const folderRoutes = buildRouteMap({
export const folderRoutes = defineRoutes({
routes: {
create: createCommand,
get: getCommand,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/folder/update.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildCommand } from "@stricli/core";
import { defineCommand } from "../../lib/stricli-wrappers";
import type { LocalContext } from "../../context";
import { updateFolder, type FolderInput } from "../../gql/folder/folder";
import { GqlApiError } from "../../gql/gql-request";
Expand Down Expand Up @@ -47,7 +47,7 @@ async function update(
}
}

export const updateCommand = buildCommand({
export const updateCommand = defineCommand({
loader: async () => update,
parameters: {
positional: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/opal/check.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildCommand } from "@stricli/core";
import { defineCommand } from "../../lib/stricli-wrappers";
import * as fs from "node:fs";
import type { LocalContext } from "../../context";
import { checkQueries } from "../../gql/opal/check-queries";
Expand Down Expand Up @@ -83,7 +83,7 @@ async function check(
}
}

export const checkCommand = buildCommand({
export const checkCommand = defineCommand({
loader: async () => check,
parameters: {
positional: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/opal/functions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildCommand } from "@stricli/core";
import { defineCommand } from "../../lib/stricli-wrappers";
import type { LocalContext } from "../../context";
import { verbsAndFunctions } from "../../gql/opal/verbs-and-functions";
import { GqlApiError } from "../../gql/gql-request";
Expand Down Expand Up @@ -29,7 +29,7 @@ async function functions(this: LocalContext): Promise<void> {
}
}

export const functionsCommand = buildCommand({
export const functionsCommand = defineCommand({
loader: async () => functions,
parameters: { positional: { kind: "tuple", parameters: [] }, flags: {} },
docs: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/opal/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { buildRouteMap } from "@stricli/core";
import { defineRoutes } from "../../lib/stricli-wrappers";
import { checkCommand } from "./check";
import { verbsCommand } from "./verbs";
import { functionsCommand } from "./functions";
import { validateIngestCommand } from "./validate-ingest";

export const opalRoutes = buildRouteMap({
export const opalRoutes = defineRoutes({
routes: {
check: checkCommand,
verbs: verbsCommand,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/opal/validate-ingest.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildCommand } from "@stricli/core";
import { defineCommand } from "../../lib/stricli-wrappers";
import type { LocalContext } from "../../context";
import { validateIngestFilter } from "../../gql/opal/validate-ingest-filter";
import { GqlApiError } from "../../gql/gql-request";
Expand Down Expand Up @@ -47,7 +47,7 @@ async function validateIngest(
}
}

export const validateIngestCommand = buildCommand({
export const validateIngestCommand = defineCommand({
loader: async () => validateIngest,
parameters: {
positional: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/opal/verbs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildCommand } from "@stricli/core";
import { defineCommand } from "../../lib/stricli-wrappers";
import type { LocalContext } from "../../context";
import { verbsAndFunctions } from "../../gql/opal/verbs-and-functions";
import { GqlApiError } from "../../gql/gql-request";
Expand Down Expand Up @@ -27,7 +27,7 @@ async function verbs(this: LocalContext): Promise<void> {
}
}

export const verbsCommand = buildCommand({
export const verbsCommand = defineCommand({
loader: async () => verbs,
parameters: { positional: { kind: "tuple", parameters: [] }, flags: {} },
docs: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/schema/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { buildRouteMap } from "@stricli/core";
import { defineRoutes } from "../../lib/stricli-wrappers";
import { introspectCommand } from "./introspect";

export const schemaRoutes = buildRouteMap({
export const schemaRoutes = defineRoutes({
routes: {
introspect: introspectCommand,
},
Expand Down
4 changes: 2 additions & 2 deletions src/commands/schema/introspect.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildCommand } from "@stricli/core";
import { defineCommand } from "../../lib/stricli-wrappers";
import type { LocalContext } from "../../context";
import { introspectSchema } from "../../gql/schema/introspect";
import { GqlApiError } from "../../gql/gql-request";
Expand Down Expand Up @@ -43,7 +43,7 @@ async function introspect(
}
}

export const introspectCommand = buildCommand({
export const introspectCommand = defineCommand({
loader: async () => introspect,
parameters: {
positional: { kind: "tuple", parameters: [] },
Expand Down
Loading
Loading