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
4 changes: 2 additions & 2 deletions packages/api-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/argos-ci/argos-javascript.git",
"url": "git+https://github.com/DevinoSolutions/snapvisor-js.git",
"directory": "packages/api-client"
},
"homepage": "https://github.com/argos-ci/argos-javascript/blob/main/packages/api-client/README.md",
"homepage": "https://snapvisor.io/docs",
"bugs": {
"url": "https://github.com/argos-ci/argos-javascript/issues"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/api-client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export { APIError } from "./fetch";
export type ArgosAPIClient = ReturnType<typeof createClient>;

/**
* Create Argos API client.
* Create Snapvisor API client.
*/
export function createClient(options?: {
baseUrl?: string;
Expand Down
4 changes: 2 additions & 2 deletions packages/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/argos-ci/argos-javascript.git",
"url": "git+https://github.com/DevinoSolutions/snapvisor-js.git",
"directory": "packages/browser"
},
"homepage": "https://github.com/argos-ci/argos-javascript/blob/main/packages/browser/README.md",
"homepage": "https://snapvisor.io/docs",
"bugs": {
"url": "https://github.com/argos-ci/argos-javascript/issues"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Plugin } from "..";
import { injectGlobalStyles } from "../util";

/**
* Inject CSS for Argos helpers.
* Inject CSS for Snapvisor helpers.
*/
export const plugin = {
name: "argosHelpers" as const,
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/e2e/analytics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe("argos analytics", () => {
test("fails when no token is provided", () => {
const error = expectRunToFail(["analytics", "--account", account]);
expect(error.status).not.toBe(0);
expect(error.stderr).toContain("No Argos token found");
expect(error.stderr).toContain("No Snapvisor token found");
});

test("fails when no account is provided", () => {
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/e2e/build.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("argos build get", () => {
const error = expectRunToFail(["build", "get", "1"], { ARGOS_TOKEN: "" });

expect(error.status).not.toBe(0);
expect(error.stderr).toContain("No Argos token found");
expect(error.stderr).toContain("No Snapvisor token found");
});

test("fails when token is missing for a build URL", () => {
Expand All @@ -58,7 +58,7 @@ describe("argos build get", () => {
);

expect(error.status).not.toBe(0);
expect(error.stderr).toContain("No Argos token found");
expect(error.stderr).toContain("No Snapvisor token found");
});

test("fails for an unknown build number", () => {
Expand All @@ -72,7 +72,7 @@ describe("argos build get", () => {
const error = expectRunToFail(["build", "get", "not-a-number"]);

expect(error.status).not.toBe(0);
expect(error.stderr).toContain("valid build number or Argos build URL");
expect(error.stderr).toContain("valid build number or Snapvisor build URL");
});

test("returns build details for a build number in JSON mode", () => {
Expand Down Expand Up @@ -113,7 +113,7 @@ describe("argos build snapshots", () => {
});

expect(error.status).not.toBe(0);
expect(error.stderr).toContain("No Argos token found");
expect(error.stderr).toContain("No Snapvisor token found");
});

test("prints human-readable snapshot data", () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/e2e/change.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe("argos change ignore", () => {
"acme/web",
]);
expect(error.status).not.toBe(0);
expect(error.stderr).toContain("No Argos token found");
expect(error.stderr).toContain("No Snapvisor token found");
});

test("fails when no project is provided", () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/e2e/review.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe("argos review create", () => {
{ ARGOS_TOKEN: "", HOME: noTokenHome },
);
expect(error.status).not.toBe(0);
expect(error.stderr).toContain("No Argos token found");
expect(error.stderr).toContain("No Snapvisor token found");
});

test("creates an approved review in JSON mode", () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/e2e/whoami.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe("argos whoami", () => {
}
expect(error).toBeDefined();
expect(error?.status).not.toBe(0);
expect(error?.stderr).toContain("No Argos token found");
expect(error?.stderr).toContain("No Snapvisor token found");
});

test("prints the authenticated user in JSON mode", () => {
Expand All @@ -39,7 +39,7 @@ describe("argos whoami", () => {

test("prints human-readable user data", () => {
const output = run(["whoami", "--token", userAccessToken], baseEnv);
expect(output.stdout).toContain("Logged in to Argos as");
expect(output.stdout).toContain("Logged in to Snapvisor as");
expect(output.stdout).toContain("Slug:");
});
});
6 changes: 3 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
},
"repository": {
"type": "git",
"url": "https://github.com/argos-ci/argos-javascript.git",
"directory": "packages/core"
"url": "git+https://github.com/DevinoSolutions/snapvisor-js.git",
"directory": "packages/cli"
},
"homepage": "https://argos-ci.com/docs/reference/argos-command-line-interface-cli",
"homepage": "https://snapvisor.io/docs",
"bugs": {
"url": "https://github.com/argos-ci/argos-javascript/issues"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,13 @@ export async function getAccessToken(): Promise<string | undefined> {
if (err instanceof OAuthTokenError) {
// The server rejected the refresh token — the session is really gone.
console.warn(
"Warning: Your Argos session has expired. Run `argos login` again.",
"Warning: Your Snapvisor session has expired. Run `argos login` again.",
);
} else {
// Transient failure (offline, DNS, timeout): don't claim the session
// expired, and keep the stored tokens so a later retry can succeed.
console.warn(
"Warning: Could not reach Argos to refresh your session. Check your connection and try again.",
"Warning: Could not reach Snapvisor to refresh your session. Check your connection and try again.",
);
}
return undefined;
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/comment/_action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function defineCommentAction(opts: {
comment
.command(opts.name)
.description(opts.description)
.argument("<buildReference>", "Build number or Argos build URL")
.argument("<buildReference>", "Build number or Snapvisor build URL")
.argument("<commentId>", "ID of the comment")
.addOption(tokenOption)
.addOption(projectPathOption)
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/comment/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function registerCommentCreate(comment: Command) {
comment
.command("create")
.description("Post a comment (or reply) on a build")
.argument("<buildReference>", "Build number or Argos build URL")
.argument("<buildReference>", "Build number or Snapvisor build URL")
.option("--body <markdown>", "Markdown body of the comment")
.option("--body-file <path>", "Read the comment body from a Markdown file")
.option(
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/comment/edit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function registerCommentEdit(comment: Command) {
comment
.command("edit")
.description("Update the body of a comment (author only)")
.argument("<buildReference>", "Build number or Argos build URL")
.argument("<buildReference>", "Build number or Snapvisor build URL")
.argument("<commentId>", "ID of the comment")
.option("--body <markdown>", "New Markdown body of the comment")
.option("--body-file <path>", "Read the new body from a Markdown file")
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/comment/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function registerCommentList(comment: Command) {
comment
.command("list")
.description("List the comments on a build")
.argument("<buildReference>", "Build number or Argos build URL")
.argument("<buildReference>", "Build number or Snapvisor build URL")
.addOption(tokenOption)
.addOption(projectPathOption)
.addOption(jsonOption)
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/comment/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function registerCommentReact(comment: Command) {
comment
.command("react")
.description("Add an emoji reaction to a comment")
.argument("<buildReference>", "Build number or Argos build URL")
.argument("<buildReference>", "Build number or Snapvisor build URL")
.argument("<commentId>", "ID of the comment")
.argument("<emoji>", "Emoji to react with")
.addOption(tokenOption)
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/comment/unreact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function registerCommentUnreact(comment: Command) {
comment
.command("unreact")
.description("Remove one of your emoji reactions from a comment")
.argument("<buildReference>", "Build number or Argos build URL")
.argument("<buildReference>", "Build number or Snapvisor build URL")
.argument("<commentId>", "ID of the comment")
.argument("<emoji>", "Emoji reaction to remove")
.addOption(tokenOption)
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/finalize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type FinalizeOptions = ParallelNonceOption &

const skipIfEmptyOption = new Option(
"--skip-if-empty",
"Create a skipped build when no parallel build matches the nonce.\nUseful when uploads are conditional (e.g. skipped by a CI cache) and Argos is a required status check: the skipped build reports a success status even though nothing was uploaded.",
"Create a skipped build when no parallel build matches the nonce.\nUseful when uploads are conditional (e.g. skipped by a CI cache) and Snapvisor is a required status check: the skipped build reports a success status even though nothing was uploaded.",
);

export function finalizeCommand(program: Command) {
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/commands/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const LOGIN_TIMEOUT_MS = 5 * 60 * 1000;
const CALLBACK_ERROR_HTML = `<!DOCTYPE html><html lang="en">
<head>
<meta charset="UTF-8">
<title>Argos CLI</title>
<title>Snapvisor CLI</title>
</head>
<body>
<p>Authorization failed. Please run <code>argos login</code> again.</p>
Expand Down Expand Up @@ -211,6 +211,6 @@ export function loginCommand(program: Command) {
process.exit(1);
}

console.log(successColor("Logged in to Argos successfully."));
console.log(successColor("Logged in to Snapvisor successfully."));
});
}
2 changes: 1 addition & 1 deletion packages/cli/src/commands/logout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ export function logoutCommand(program: Command) {
await revokeToken(oauth.refreshToken);
}
await clearStoredCredentials();
console.log("Logged out from Argos.");
console.log("Logged out from Snapvisor.");
});
}
2 changes: 1 addition & 1 deletion packages/cli/src/commands/review/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function registerReviewCreate(review: Command) {
review
.command("create")
.description("Submit a review on a build")
.argument("<buildReference>", "Build number or Argos build URL")
.argument("<buildReference>", "Build number or Snapvisor build URL")
.addOption(
new Option("--event <event>", "Review event to apply to the build")
.choices(Object.keys(events))
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/review/dismiss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function registerReviewDismiss(review: Command) {
review
.command("dismiss")
.description("Dismiss a submitted review on a build")
.argument("<buildReference>", "Build number or Argos build URL")
.argument("<buildReference>", "Build number or Snapvisor build URL")
.argument("<reviewId>", "ID of the review to dismiss")
.addOption(tokenOption)
.addOption(projectPathOption)
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/review/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function registerReviewList(review: Command) {
review
.command("list")
.description("List the reviews submitted on a build")
.argument("<buildReference>", "Build number or Argos build URL")
.argument("<buildReference>", "Build number or Snapvisor build URL")
.addOption(tokenOption)
.addOption(projectPathOption)
.addOption(jsonOption)
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function uploadCommand(program: Command) {
.addOption(
new Option(
"--parallel",
"Enable parallel mode. Run multiple Argos builds and combine them at the end.\nCan also be set via the ARGOS_PARALLEL environment variable.",
"Enable parallel mode. Run multiple Snapvisor builds and combine them at the end.\nCan also be set via the ARGOS_PARALLEL environment variable.",
),
)
.addOption(
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function getApiBaseUrl(): string | undefined {
return process.env["ARGOS_API_BASE_URL"];
}

/** Create an Argos API client authenticated with the given token. */
/** Create an Snapvisor API client authenticated with the given token. */
export function createApiClient(authToken?: string): ArgosAPIClient {
return createClient({ authToken, baseUrl: getApiBaseUrl() });
}
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/lib/body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type BodyOptions = {
* Resolve the Markdown body of a comment or review from the mutually-exclusive
* `--body` (inline) and `--body-file` (path) options.
*
* The Argos API also accepts a rich-text JSON document, but that form is only
* The Snapvisor API also accepts a rich-text JSON document, but that form is only
* needed for `@mentions` (which require user ids); the CLI exposes Markdown
* only, which the API converts server-side.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/lib/build-reference.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe("parseBuildReferenceOrFail", () => {
it("throws a CliError on invalid input", () => {
expect(() => parseBuildReferenceOrFail("nope")).toThrow(CliError);
expect(() => parseBuildReferenceOrFail("nope")).toThrow(
/valid build number or Argos build URL/,
/valid build number or Snapvisor build URL/,
);
});
});
4 changes: 2 additions & 2 deletions packages/cli/src/lib/build-reference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const BUILD_URL_REGEXP =

/**
* Parse a build reference, accepting either a bare build number (`"1234"`) or a
* full Argos build URL. Returns `null` when the input is neither.
* full Snapvisor build URL. Returns `null` when the input is neither.
*/
export function parseBuildReference(reference: string): BuildReference | null {
const asNumber = Number(reference);
Expand Down Expand Up @@ -46,7 +46,7 @@ export function parseBuildReferenceOrFail(reference: string): BuildReference {
const parsed = parseBuildReference(reference);
if (!parsed) {
fail(
`Build reference must be a valid build number or Argos build URL (https://app.argos-ci.com/.../builds/<number>), got "${reference}".`,
`Build reference must be a valid build number or Snapvisor build URL (https://app.snapvisor.io/.../builds/<number>), got "${reference}".`,
);
}
return parsed;
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/lib/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function formatUser(user: User | null | undefined): string {

export function formatMe(me: Me): string {
const lines = [
`Logged in to Argos as ${formatValue(me.user.name)}.`,
`Logged in to Snapvisor as ${formatValue(me.user.name)}.`,
`Name: ${formatValue(me.user.name)}`,
`Email: ${formatValue(me.user.email)}`,
];
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/src/lib/oauth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { createHash, randomBytes } from "node:crypto";
* OAuth 2.1 client configuration and helpers for the `argos login` flow
* (Authorization Code + PKCE with a loopback redirect, RFC 8252).
*
* The authorization server is the Argos app origin; endpoints and token
* validation are implemented in the main Argos repo (`apps/backend/src/oauth`).
* The authorization server is the Snapvisor app origin; endpoints and token
* validation are implemented in the main Snapvisor repo (`apps/backend/src/oauth`).
*/

/** First-party public client id, seeded in the Argos database. */
/** First-party public client id, seeded in the Snapvisor database. */
export const OAUTH_CLIENT_ID = "argos-cli";

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/lib/target.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export async function resolveToken(options: TargetOptions): Promise<string> {
options.token || process.env["ARGOS_TOKEN"] || (await getAccessToken());
if (!token) {
fail(
"No Argos token found. Use --token, set ARGOS_TOKEN, or run `argos login`.",
"No Snapvisor token found. Use --token, set ARGOS_TOKEN, or run `argos login`.",
);
}
return token;
Expand Down
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"types": "./dist/index.d.mts",
"repository": {
"type": "git",
"url": "https://github.com/argos-ci/argos-javascript.git",
"url": "git+https://github.com/DevinoSolutions/snapvisor-js.git",
"directory": "packages/core"
},
"homepage": "https://argos-ci.com/docs/reference/node.js-sdk",
"homepage": "https://snapvisor.io/docs",
"bugs": {
"url": "https://github.com/argos-ci/argos-javascript/issues"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,19 +205,19 @@ describe("resolveArgosToken", () => {
it("throws for an unsupported CI provider", async () => {
await expect(
resolveArgosToken({ ...baseConfig, ciProvider: "gitlab-ci" }),
).rejects.toThrow("Missing Argos repository token 'ARGOS_TOKEN'");
).rejects.toThrow("Missing Snapvisor repository token 'ARGOS_TOKEN'");
});

it("throws when ciProvider is null and no token or OIDC", async () => {
await expect(
resolveArgosToken({ ...baseConfig, ciProvider: null }),
).rejects.toThrow("Missing Argos repository token 'ARGOS_TOKEN'");
).rejects.toThrow("Missing Snapvisor repository token 'ARGOS_TOKEN'");
});

it("throws when ciProvider is circleci (unsupported tokenless)", async () => {
await expect(
resolveArgosToken({ ...baseConfig, ciProvider: "circleci" }),
).rejects.toThrow("Missing Argos repository token 'ARGOS_TOKEN'");
).rejects.toThrow("Missing Snapvisor repository token 'ARGOS_TOKEN'");
});
});
});
Loading
Loading