diff --git a/packages/api-client/package.json b/packages/api-client/package.json index b9a2f3f1..a16d8a98 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -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" }, diff --git a/packages/api-client/src/index.ts b/packages/api-client/src/index.ts index 56207e19..f8f90906 100644 --- a/packages/api-client/src/index.ts +++ b/packages/api-client/src/index.ts @@ -9,7 +9,7 @@ export { APIError } from "./fetch"; export type ArgosAPIClient = ReturnType; /** - * Create Argos API client. + * Create Snapvisor API client. */ export function createClient(options?: { baseUrl?: string; diff --git a/packages/browser/package.json b/packages/browser/package.json index da21a8dc..5271fd14 100644 --- a/packages/browser/package.json +++ b/packages/browser/package.json @@ -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" }, diff --git a/packages/browser/src/global/stabilization/plugins/argosHelpers.ts b/packages/browser/src/global/stabilization/plugins/argosHelpers.ts index 15e57467..749db0d2 100644 --- a/packages/browser/src/global/stabilization/plugins/argosHelpers.ts +++ b/packages/browser/src/global/stabilization/plugins/argosHelpers.ts @@ -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, diff --git a/packages/cli/e2e/analytics.test.ts b/packages/cli/e2e/analytics.test.ts index 265d6a8f..9a37552d 100644 --- a/packages/cli/e2e/analytics.test.ts +++ b/packages/cli/e2e/analytics.test.ts @@ -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", () => { diff --git a/packages/cli/e2e/build.test.ts b/packages/cli/e2e/build.test.ts index b1db6d0b..1734c8fa 100644 --- a/packages/cli/e2e/build.test.ts +++ b/packages/cli/e2e/build.test.ts @@ -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", () => { @@ -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", () => { @@ -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", () => { @@ -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", () => { diff --git a/packages/cli/e2e/change.test.ts b/packages/cli/e2e/change.test.ts index 7bfc4fa1..99cf606b 100644 --- a/packages/cli/e2e/change.test.ts +++ b/packages/cli/e2e/change.test.ts @@ -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", () => { diff --git a/packages/cli/e2e/review.test.ts b/packages/cli/e2e/review.test.ts index 5b728484..03d141c1 100644 --- a/packages/cli/e2e/review.test.ts +++ b/packages/cli/e2e/review.test.ts @@ -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", () => { diff --git a/packages/cli/e2e/whoami.test.ts b/packages/cli/e2e/whoami.test.ts index 0802e28c..138c1a40 100644 --- a/packages/cli/e2e/whoami.test.ts +++ b/packages/cli/e2e/whoami.test.ts @@ -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", () => { @@ -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:"); }); }); diff --git a/packages/cli/package.json b/packages/cli/package.json index 82299540..4c2347f8 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -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" }, diff --git a/packages/cli/src/auth.ts b/packages/cli/src/auth.ts index ab59a795..7c91802b 100644 --- a/packages/cli/src/auth.ts +++ b/packages/cli/src/auth.ts @@ -152,13 +152,13 @@ export async function getAccessToken(): Promise { 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; diff --git a/packages/cli/src/commands/comment/_action.ts b/packages/cli/src/commands/comment/_action.ts index 52068ea4..73b7001a 100644 --- a/packages/cli/src/commands/comment/_action.ts +++ b/packages/cli/src/commands/comment/_action.ts @@ -28,7 +28,7 @@ export function defineCommentAction(opts: { comment .command(opts.name) .description(opts.description) - .argument("", "Build number or Argos build URL") + .argument("", "Build number or Snapvisor build URL") .argument("", "ID of the comment") .addOption(tokenOption) .addOption(projectPathOption) diff --git a/packages/cli/src/commands/comment/create.ts b/packages/cli/src/commands/comment/create.ts index ebc57a89..df1c1368 100644 --- a/packages/cli/src/commands/comment/create.ts +++ b/packages/cli/src/commands/comment/create.ts @@ -21,7 +21,7 @@ export function registerCommentCreate(comment: Command) { comment .command("create") .description("Post a comment (or reply) on a build") - .argument("", "Build number or Argos build URL") + .argument("", "Build number or Snapvisor build URL") .option("--body ", "Markdown body of the comment") .option("--body-file ", "Read the comment body from a Markdown file") .option( diff --git a/packages/cli/src/commands/comment/edit.ts b/packages/cli/src/commands/comment/edit.ts index 5bf3d69e..ae9e3b46 100644 --- a/packages/cli/src/commands/comment/edit.ts +++ b/packages/cli/src/commands/comment/edit.ts @@ -14,7 +14,7 @@ export function registerCommentEdit(comment: Command) { comment .command("edit") .description("Update the body of a comment (author only)") - .argument("", "Build number or Argos build URL") + .argument("", "Build number or Snapvisor build URL") .argument("", "ID of the comment") .option("--body ", "New Markdown body of the comment") .option("--body-file ", "Read the new body from a Markdown file") diff --git a/packages/cli/src/commands/comment/list.ts b/packages/cli/src/commands/comment/list.ts index 41ba144f..f8eae310 100644 --- a/packages/cli/src/commands/comment/list.ts +++ b/packages/cli/src/commands/comment/list.ts @@ -8,7 +8,7 @@ export function registerCommentList(comment: Command) { comment .command("list") .description("List the comments on a build") - .argument("", "Build number or Argos build URL") + .argument("", "Build number or Snapvisor build URL") .addOption(tokenOption) .addOption(projectPathOption) .addOption(jsonOption) diff --git a/packages/cli/src/commands/comment/react.ts b/packages/cli/src/commands/comment/react.ts index ad7ed844..8e7196ab 100644 --- a/packages/cli/src/commands/comment/react.ts +++ b/packages/cli/src/commands/comment/react.ts @@ -8,7 +8,7 @@ export function registerCommentReact(comment: Command) { comment .command("react") .description("Add an emoji reaction to a comment") - .argument("", "Build number or Argos build URL") + .argument("", "Build number or Snapvisor build URL") .argument("", "ID of the comment") .argument("", "Emoji to react with") .addOption(tokenOption) diff --git a/packages/cli/src/commands/comment/unreact.ts b/packages/cli/src/commands/comment/unreact.ts index 0ceb638d..8eeaa324 100644 --- a/packages/cli/src/commands/comment/unreact.ts +++ b/packages/cli/src/commands/comment/unreact.ts @@ -8,7 +8,7 @@ export function registerCommentUnreact(comment: Command) { comment .command("unreact") .description("Remove one of your emoji reactions from a comment") - .argument("", "Build number or Argos build URL") + .argument("", "Build number or Snapvisor build URL") .argument("", "ID of the comment") .argument("", "Emoji reaction to remove") .addOption(tokenOption) diff --git a/packages/cli/src/commands/finalize.ts b/packages/cli/src/commands/finalize.ts index 592bd1c0..7466c877 100644 --- a/packages/cli/src/commands/finalize.ts +++ b/packages/cli/src/commands/finalize.ts @@ -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) { diff --git a/packages/cli/src/commands/login.ts b/packages/cli/src/commands/login.ts index 55646852..457c78fe 100644 --- a/packages/cli/src/commands/login.ts +++ b/packages/cli/src/commands/login.ts @@ -18,7 +18,7 @@ const LOGIN_TIMEOUT_MS = 5 * 60 * 1000; const CALLBACK_ERROR_HTML = ` - Argos CLI + Snapvisor CLI

Authorization failed. Please run argos login again.

@@ -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.")); }); } diff --git a/packages/cli/src/commands/logout.ts b/packages/cli/src/commands/logout.ts index eca1026f..642bb9b5 100644 --- a/packages/cli/src/commands/logout.ts +++ b/packages/cli/src/commands/logout.ts @@ -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."); }); } diff --git a/packages/cli/src/commands/review/create.ts b/packages/cli/src/commands/review/create.ts index c98f1465..24e16d6d 100644 --- a/packages/cli/src/commands/review/create.ts +++ b/packages/cli/src/commands/review/create.ts @@ -17,7 +17,7 @@ export function registerReviewCreate(review: Command) { review .command("create") .description("Submit a review on a build") - .argument("", "Build number or Argos build URL") + .argument("", "Build number or Snapvisor build URL") .addOption( new Option("--event ", "Review event to apply to the build") .choices(Object.keys(events)) diff --git a/packages/cli/src/commands/review/dismiss.ts b/packages/cli/src/commands/review/dismiss.ts index cd1dd91e..5a431d70 100644 --- a/packages/cli/src/commands/review/dismiss.ts +++ b/packages/cli/src/commands/review/dismiss.ts @@ -8,7 +8,7 @@ export function registerReviewDismiss(review: Command) { review .command("dismiss") .description("Dismiss a submitted review on a build") - .argument("", "Build number or Argos build URL") + .argument("", "Build number or Snapvisor build URL") .argument("", "ID of the review to dismiss") .addOption(tokenOption) .addOption(projectPathOption) diff --git a/packages/cli/src/commands/review/list.ts b/packages/cli/src/commands/review/list.ts index abf15002..e3b7f9e8 100644 --- a/packages/cli/src/commands/review/list.ts +++ b/packages/cli/src/commands/review/list.ts @@ -8,7 +8,7 @@ export function registerReviewList(review: Command) { review .command("list") .description("List the reviews submitted on a build") - .argument("", "Build number or Argos build URL") + .argument("", "Build number or Snapvisor build URL") .addOption(tokenOption) .addOption(projectPathOption) .addOption(jsonOption) diff --git a/packages/cli/src/commands/upload.ts b/packages/cli/src/commands/upload.ts index ea2d55d5..43e36310 100644 --- a/packages/cli/src/commands/upload.ts +++ b/packages/cli/src/commands/upload.ts @@ -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( diff --git a/packages/cli/src/lib/api.ts b/packages/cli/src/lib/api.ts index d3f4995c..98f1332d 100644 --- a/packages/cli/src/lib/api.ts +++ b/packages/cli/src/lib/api.ts @@ -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() }); } diff --git a/packages/cli/src/lib/body.ts b/packages/cli/src/lib/body.ts index 8ab91bea..389154d0 100644 --- a/packages/cli/src/lib/body.ts +++ b/packages/cli/src/lib/body.ts @@ -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. */ diff --git a/packages/cli/src/lib/build-reference.test.ts b/packages/cli/src/lib/build-reference.test.ts index 04e0f024..6372b807 100644 --- a/packages/cli/src/lib/build-reference.test.ts +++ b/packages/cli/src/lib/build-reference.test.ts @@ -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/, ); }); }); diff --git a/packages/cli/src/lib/build-reference.ts b/packages/cli/src/lib/build-reference.ts index 77916af8..91d19b39 100644 --- a/packages/cli/src/lib/build-reference.ts +++ b/packages/cli/src/lib/build-reference.ts @@ -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); @@ -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/), got "${reference}".`, + `Build reference must be a valid build number or Snapvisor build URL (https://app.snapvisor.io/.../builds/), got "${reference}".`, ); } return parsed; diff --git a/packages/cli/src/lib/format.ts b/packages/cli/src/lib/format.ts index 8c8b965c..caf8c74d 100644 --- a/packages/cli/src/lib/format.ts +++ b/packages/cli/src/lib/format.ts @@ -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)}`, ]; diff --git a/packages/cli/src/lib/oauth.ts b/packages/cli/src/lib/oauth.ts index 1d1bd2ec..23132901 100644 --- a/packages/cli/src/lib/oauth.ts +++ b/packages/cli/src/lib/oauth.ts @@ -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"; /** diff --git a/packages/cli/src/lib/target.ts b/packages/cli/src/lib/target.ts index 9100c633..92e1f8a4 100644 --- a/packages/cli/src/lib/target.ts +++ b/packages/cli/src/lib/target.ts @@ -47,7 +47,7 @@ export async function resolveToken(options: TargetOptions): Promise { 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; diff --git a/packages/core/package.json b/packages/core/package.json index f4fab16a..5fd7f7ac 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -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" }, diff --git a/packages/core/src/auth.test.ts b/packages/core/src/auth.test.ts index 15ceb73b..9391dbc3 100644 --- a/packages/core/src/auth.test.ts +++ b/packages/core/src/auth.test.ts @@ -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'"); }); }); }); diff --git a/packages/core/src/auth.ts b/packages/core/src/auth.ts index 8e44d590..81f2dd01 100644 --- a/packages/core/src/auth.ts +++ b/packages/core/src/auth.ts @@ -10,7 +10,7 @@ import type { Config } from "./config"; import { debug } from "./debug"; /** - * Resolve the Argos authentication token. + * Resolve the Snapvisor authentication token. * Priority: ARGOS_TOKEN > GitHub Actions OIDC > GitHub Actions tokenless exchange. */ export async function resolveArgosToken(config: Config): Promise { @@ -41,5 +41,5 @@ export async function resolveArgosToken(config: Config): Promise { return token; } - throw new Error("Missing Argos repository token 'ARGOS_TOKEN'"); + throw new Error("Missing Snapvisor repository token 'ARGOS_TOKEN'"); } diff --git a/packages/core/src/ci-environment/git.ts b/packages/core/src/ci-environment/git.ts index c76df6ba..e4fde9d9 100644 --- a/packages/core/src/ci-environment/git.ts +++ b/packages/core/src/ci-environment/git.ts @@ -230,7 +230,7 @@ async function fetchMergeBaseRef(input: { ); } else { console.warn( - `Argos failed to fetch "${input.ref}" from origin, falling back to the local history to find the merge base.`, + `Snapvisor failed to fetch "${input.ref}" from origin, falling back to the local history to find the merge base.`, ); debug(`git fetch failed for "${input.ref}"`, getGitErrorOutput(error)); } diff --git a/packages/core/src/ci-environment/github.ts b/packages/core/src/ci-environment/github.ts index e5b454b1..a7cc8fdb 100644 --- a/packages/core/src/ci-environment/github.ts +++ b/packages/core/src/ci-environment/github.ts @@ -40,8 +40,8 @@ function getGitHubToken({ env }: Context): string | null { if (!env.DISABLE_GITHUB_TOKEN_WARNING) { console.log( ` -Argos couldn’t find a relevant pull request in the current environment. -To resolve this, Argos requires a GITHUB_TOKEN to fetch the pull request associated with the head SHA. Please ensure the following environment variable is added: +Snapvisor couldn’t find a relevant pull request in the current environment. +To resolve this, Snapvisor requires a GITHUB_TOKEN to fetch the pull request associated with the head SHA. Please ensure the following environment variable is added: GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }} diff --git a/packages/core/src/config.test.ts b/packages/core/src/config.test.ts index 8ef5e9f3..9efb0ab7 100644 --- a/packages/core/src/config.test.ts +++ b/packages/core/src/config.test.ts @@ -24,7 +24,7 @@ describe("#readConfig", () => { token: "invalid", }), ).rejects.toThrow( - "token: Invalid Argos repository token (must be 40 characters)", + "token: Invalid Snapvisor repository token (must be 40 characters)", ); }); diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts index 516d4e3f..420710d2 100644 --- a/packages/core/src/config.ts +++ b/packages/core/src/config.ts @@ -6,7 +6,7 @@ const mustBeApiBaseUrl = (value: any) => { /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/; if (!URL_REGEX.test(value)) { - throw new Error("Invalid Argos API base URL"); + throw new Error("Invalid Snapvisor API base URL"); } }; @@ -24,7 +24,9 @@ const mustBeCommit = (value: any) => { const mustBeArgosToken = (value: any) => { if (value && value.length !== 40) { - throw new Error("Invalid Argos repository token (must be 40 characters)"); + throw new Error( + "Invalid Snapvisor repository token (must be 40 characters)", + ); } }; @@ -263,7 +265,7 @@ const schema = { export interface Config { /** - * Base URL of the Argos API. + * Base URL of the Snapvisor API. * Use this to target a self-hosted installation. * @default "https://api.snapvisor.io/v2/" */ @@ -281,13 +283,13 @@ export interface Config { branch: string; /** - * Argos repository access token. + * Snapvisor repository access token. */ token: string | null; /** - * Argos project slug used for tokenless authentication. - * Useful to disambiguate when multiple Argos projects are linked + * Snapvisor project slug used for tokenless authentication. + * Useful to disambiguate when multiple Snapvisor projects are linked * to the same repository. * @example "my-org/my-project" */ @@ -392,7 +394,7 @@ export interface Config { /** * Diff sensitivity threshold between 0 and 1. - * Higher values make Argos less sensitive to differences. + * Higher values make Snapvisor less sensitive to differences. */ threshold: number | null; @@ -485,7 +487,7 @@ export async function readConfig(options: Partial = {}) { if (!config.get("branch") || !config.get("commit")) { throw new Error( - "Argos requires a branch and a commit to be set. If you are running in a non-git environment consider setting ARGOS_BRANCH and ARGOS_COMMIT environment variables.", + "Snapvisor requires a branch and a commit to be set. If you are running in a non-git environment consider setting ARGOS_BRANCH and ARGOS_COMMIT environment variables.", ); } diff --git a/packages/core/src/deploy.ts b/packages/core/src/deploy.ts index 57b12fce..b8337334 100644 --- a/packages/core/src/deploy.ts +++ b/packages/core/src/deploy.ts @@ -23,12 +23,12 @@ export interface DeployParameters { root: string; /** - * Argos repository access token. + * Snapvisor repository access token. */ token?: string; /** - * Base URL of the Argos API. + * Base URL of the Snapvisor API. * @default "https://api.snapvisor.io/v2/" */ apiBaseUrl?: string; @@ -55,7 +55,7 @@ export interface DeployParameters { } /** - * Deploy a static site (e.g. Storybook) to Argos. + * Deploy a static site (e.g. Storybook) to Snapvisor. */ export async function deploy(params: DeployParameters) { const { token: _token, ...debugParams } = params; diff --git a/packages/core/src/discovery.ts b/packages/core/src/discovery.ts index 9ed75028..c36b9b9d 100644 --- a/packages/core/src/discovery.ts +++ b/packages/core/src/discovery.ts @@ -26,7 +26,7 @@ export async function discoverSnapshots( } /** - * Check if the given filename corresponds to an Argos image. + * Check if the given filename corresponds to an Snapvisor image. */ export function checkIsValidImageFile(filename: string): boolean { const lowerFilename = extname(filename).toLowerCase(); diff --git a/packages/core/src/finalize.ts b/packages/core/src/finalize.ts index 6bd14b28..1c762d87 100644 --- a/packages/core/src/finalize.ts +++ b/packages/core/src/finalize.ts @@ -6,12 +6,12 @@ import { skip } from "./skip"; export type FinalizeParameters = { /** - * Base URL of the Argos API. + * Base URL of the Snapvisor API. */ apiBaseUrl?: string; /** - * Argos token. + * Snapvisor token. */ token?: string; @@ -22,7 +22,7 @@ export type FinalizeParameters = { /** * Create a skipped build when no parallel build matches the nonce. * Useful when uploads are conditional (e.g. skipped by a CI cache such as - * Turborepo or Nx) and Argos is a required status check: the skipped build + * Turborepo or Nx) and Snapvisor is a required status check: the skipped build * reports a success status even though nothing was uploaded. */ skipIfEmpty?: boolean; diff --git a/packages/core/src/github-actions-oidc.ts b/packages/core/src/github-actions-oidc.ts index 02a8a22c..c2a3f577 100644 --- a/packages/core/src/github-actions-oidc.ts +++ b/packages/core/src/github-actions-oidc.ts @@ -51,7 +51,7 @@ async function fetchOidcToken(args: { audience: string }): Promise { } /** - * Exchange a GitHub Actions OIDC token for a short-lived Argos token. + * Exchange a GitHub Actions OIDC token for a short-lived Snapvisor token. */ export async function exchangeGitHubActionsOidcToken(args: { apiBaseUrl: string; diff --git a/packages/core/src/github-actions-tokenless.ts b/packages/core/src/github-actions-tokenless.ts index 871a3d63..9cf36ced 100644 --- a/packages/core/src/github-actions-tokenless.ts +++ b/packages/core/src/github-actions-tokenless.ts @@ -49,7 +49,7 @@ function getTokenlessBearerToken( } /** - * Exchange a tokenless GitHub Actions bearer token for a short-lived Argos token. + * Exchange a tokenless GitHub Actions bearer token for a short-lived Snapvisor token. */ export async function exchangeGitHubActionsTokenlessToken(args: { apiBaseUrl: string; diff --git a/packages/core/src/upload.ts b/packages/core/src/upload.ts index d301fba8..76afa340 100644 --- a/packages/core/src/upload.ts +++ b/packages/core/src/upload.ts @@ -59,7 +59,7 @@ export interface UploadParameters { ignore?: string[]; /** - * Base URL of the Argos API. + * Base URL of the Snapvisor API. * @default "https://api.snapvisor.io/v2/" */ apiBaseUrl?: string; @@ -75,14 +75,14 @@ export interface UploadParameters { branch?: string; /** - * Argos repository access token. + * Snapvisor repository access token. */ token?: string; /** - * Argos project slug (`account/project`). + * Snapvisor project slug (`account/project`). * Used to disambiguate tokenless authentication when multiple - * Argos projects are linked to the same repository. + * Snapvisor projects are linked to the same repository. */ project?: string; @@ -92,7 +92,7 @@ export interface UploadParameters { prNumber?: number; /** - * Custom build name. Useful when triggering multiple Argos builds + * Custom build name. Useful when triggering multiple Snapvisor builds * for the same commit. */ buildName?: string; @@ -133,7 +133,7 @@ export interface UploadParameters { /** * Diff sensitivity threshold between 0 and 1. - * Higher values make Argos less sensitive to differences. + * Higher values make Snapvisor less sensitive to differences. * @default 0.5 */ threshold?: number; @@ -182,7 +182,7 @@ interface Screenshot { } /** - * Upload screenshots to Argos. + * Upload screenshots to Snapvisor. */ export async function upload(params: UploadParameters): Promise<{ build: ArgosAPISchema.components["schemas"]["Build"]; diff --git a/packages/cypress/package.json b/packages/cypress/package.json index c2e74f0c..abe2112c 100644 --- a/packages/cypress/package.json +++ b/packages/cypress/package.json @@ -1,15 +1,15 @@ { "name": "@snapvisor/cypress", - "description": "Cypress SDK for visual testing with Argos.", + "description": "Cypress SDK for visual testing with Snapvisor.", "version": "7.0.23", "author": "Smooth Code", "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/cypress" }, - "homepage": "https://argos-ci.com/docs/reference/cypress", + "homepage": "https://snapvisor.io/docs", "bugs": { "url": "https://github.com/argos-ci/argos-javascript/issues" }, diff --git a/packages/cypress/src/shared.ts b/packages/cypress/src/shared.ts index 84112f89..ed9138a8 100644 --- a/packages/cypress/src/shared.ts +++ b/packages/cypress/src/shared.ts @@ -1,4 +1,4 @@ /** - * Prefix to identify Argos screenshots. + * Prefix to identify Snapvisor screenshots. */ export const NAME_PREFIX = "argos/"; diff --git a/packages/cypress/src/support.ts b/packages/cypress/src/support.ts index 8f12add6..cace164d 100644 --- a/packages/cypress/src/support.ts +++ b/packages/cypress/src/support.ts @@ -184,7 +184,7 @@ Cypress.Commands.add( Cypress.log({ name: "argosScreenshot", - displayName: `Argos Screenshot`, + displayName: `Snapvisor Screenshot`, message: name, }); diff --git a/packages/cypress/src/task.ts b/packages/cypress/src/task.ts index 81769902..382633cf 100644 --- a/packages/cypress/src/task.ts +++ b/packages/cypress/src/task.ts @@ -10,7 +10,7 @@ export type RegisterArgosTaskOptions = Omit< "files" | "root" | "metadata" > & { /** - * Upload the report to Argos. + * Upload the report to Snapvisor. * @default true */ uploadToArgos?: boolean; @@ -56,7 +56,7 @@ function getArgosConfigFromOptions( /** * Cypress "after:screenshot" event handler. - * - Move screenshots to Argos directory + * - Move screenshots to Snapvisor directory */ export async function argosAfterScreenshot( config: Cypress.PluginConfigOptions, @@ -111,7 +111,7 @@ export async function argosAfterScreenshot( /** * Cypress "after:run" event handler. - * - Upload screenshots to Argos + * - Upload screenshots to Snapvisor */ export async function argosAfterRun( _config: Cypress.PluginConfigOptions, @@ -145,11 +145,11 @@ export async function argosAfterRun( }, }); - console.log(`✅ Argos build created: ${res.build.url}`); + console.log(`✅ Snapvisor build created: ${res.build.url}`); } /** - * Register the Argos tasks for Cypress. + * Register the Snapvisor tasks for Cypress. */ export function registerArgosTask( on: Cypress.PluginEvents, diff --git a/packages/playwright/package.json b/packages/playwright/package.json index b0d9768e..9f7ab088 100644 --- a/packages/playwright/package.json +++ b/packages/playwright/package.json @@ -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/playwright" }, - "homepage": "https://argos-ci.com/docs/reference/playwright", + "homepage": "https://snapvisor.io/docs", "bugs": { "url": "https://github.com/argos-ci/argos-javascript/issues" }, diff --git a/packages/playwright/src/aria-snapshot.ts b/packages/playwright/src/aria-snapshot.ts index 09323ac3..99d503c2 100644 --- a/packages/playwright/src/aria-snapshot.ts +++ b/packages/playwright/src/aria-snapshot.ts @@ -31,7 +31,7 @@ export type ArgosSnapshotOptions = { element?: string | Locator; /** - * Folder where the snapshots will be saved if not using the Argos reporter. + * Folder where the snapshots will be saved if not using the Snapvisor reporter. * @default "./screenshots" */ root?: string; diff --git a/packages/playwright/src/metadata.ts b/packages/playwright/src/metadata.ts index 74c2347a..b44d5dd3 100644 --- a/packages/playwright/src/metadata.ts +++ b/packages/playwright/src/metadata.ts @@ -79,7 +79,7 @@ async function getAutomationLibraryMetadata(): Promise< } /** - * Get the version of the Argos Playwright SDK. + * Get the version of the Snapvisor Playwright SDK. */ async function getArgosPlaywrightVersion(): Promise { const pkgPath = require.resolve("@snapvisor/playwright/package.json"); diff --git a/packages/playwright/src/reporter.ts b/packages/playwright/src/reporter.ts index effa7951..5bbbad0e 100644 --- a/packages/playwright/src/reporter.ts +++ b/packages/playwright/src/reporter.ts @@ -33,7 +33,7 @@ import { type DynamicBuildName = { /** * The values that the build name can take. - * It is required to ensure Argos will always upload + * It is required to ensure Snapvisor will always upload * for each build name in order to work in sharding mode. */ values: readonly [...T]; @@ -49,7 +49,7 @@ export type ArgosReporterOptions = Omit< "files" | "root" | "buildName" | "metadata" > & { /** - * Upload the report to Argos. + * Upload the report to Snapvisor. * @default true */ uploadToArgos?: boolean; @@ -61,7 +61,7 @@ export type ArgosReporterOptions = Omit< ignoreUploadFailures?: boolean; /** - * The name of the build in Argos. + * The name of the build in Snapvisor. * Can be a string or a function that receives the test case and returns the build name. */ buildName?: string | DynamicBuildName | null; @@ -78,7 +78,7 @@ function checkIsDynamicBuildName( /** * Chromium launch arguments recommended to stabilize font rendering - * and get consistent Argos screenshots. + * and get consistent Snapvisor screenshots. */ const RECOMMENDED_CHROMIUM_ARGS = [ "--disable-lcd-text", @@ -107,7 +107,7 @@ function checkLaunchOptions(config: FullConfig) { const projectLabel = project.name || "default"; console.warn( chalk.yellow( - `⚠️ Argos: Playwright project "${projectLabel}" is missing recommended launchOptions args: ${missing.join( + `⚠️ Snapvisor: Playwright project "${projectLabel}" is missing recommended launchOptions args: ${missing.join( ", ", )}.\n` + ` Add them to stabilize font rendering and get consistent screenshots. See https://argos-ci.com/docs/reference/playwright`, @@ -211,7 +211,7 @@ class ArgosReporter implements Reporter { : this.config.buildName; if (buildName === "") { - throw new Error('Argos "buildName" cannot be an empty string.'); + throw new Error('Snapvisor "buildName" cannot be an empty string.'); } const rootUploadDir = await this.getRootUploadDirectory(); @@ -233,7 +233,7 @@ class ArgosReporter implements Reporter { return; } - // Error screenshots are sent to Argos + // Error screenshots are sent to Snapvisor if (checkIsAutomaticScreenshot(attachment)) { const metadata = await getMetadataFromTestCase(test, result); const name = getAutomaticScreenshotName(test, result); @@ -253,7 +253,7 @@ class ArgosReporter implements Reporter { debug("ArgosReporter:onEnd"); const rootUploadDir = await this.getRootUploadDirectory(); if (!this.uploadToArgos) { - debug("Not uploading to Argos because uploadToArgos is false."); + debug("Not uploading to Snapvisor because uploadToArgos is false."); debug(`Upload directory: ${rootUploadDir}`); return; } @@ -287,7 +287,7 @@ class ArgosReporter implements Reporter { try { if (checkIsDynamicBuildName(buildNameConfig)) { debug( - `Dynamic build names, uploading to Argos for each build name: ${buildNameConfig.values.join()}`, + `Dynamic build names, uploading to Snapvisor for each build name: ${buildNameConfig.values.join()}`, ); const directories = await readdir(rootUploadDir); // Check if the buildName.values are consistent with the directories created @@ -304,7 +304,7 @@ class ArgosReporter implements Reporter { for (const buildName of iteratesOnBuildNames) { const uploadDir = join(rootUploadDir, buildName); await createDirectory(uploadDir); - debug(`Uploading to Argos for build: ${buildName}`); + debug(`Uploading to Snapvisor for build: ${buildName}`); const res = await upload({ ...uploadOptions, root: uploadDir, @@ -312,12 +312,12 @@ class ArgosReporter implements Reporter { }); console.log( chalk.green( - `✅ Argos "${buildName}" build created: ${res.build.url}`, + `✅ Snapvisor "${buildName}" build created: ${res.build.url}`, ), ); } } else { - debug("Uploading to Argos"); + debug("Uploading to Snapvisor"); const uploadDir = buildNameConfig ? join(rootUploadDir, buildNameConfig) : rootUploadDir; @@ -326,10 +326,12 @@ class ArgosReporter implements Reporter { root: uploadDir, buildName: buildNameConfig ?? undefined, }); - console.log(chalk.green(`✅ Argos build created: ${res.build.url}`)); + console.log( + chalk.green(`✅ Snapvisor build created: ${res.build.url}`), + ); } } catch (error) { - console.error(chalk.red(`❌ Error while creating the Argos build`)); + console.error(chalk.red(`❌ Error while creating the Snapvisor build`)); console.error(error); if (!this.config.ignoreUploadFailures) { return { status: "failed" as const }; diff --git a/packages/playwright/src/screenshot.ts b/packages/playwright/src/screenshot.ts index ab3ba595..f3874582 100644 --- a/packages/playwright/src/screenshot.ts +++ b/packages/playwright/src/screenshot.ts @@ -88,7 +88,7 @@ export type ArgosScreenshotOptions = { threshold?: number; /** - * Folder where the screenshots will be saved if not using the Argos reporter. + * Folder where the screenshots will be saved if not using the Snapvisor reporter. * @default "./screenshots" */ root?: string; @@ -112,7 +112,7 @@ export type ArgosScreenshotOptions = { */ beforeScreenshot?: (api: { /** - * Run Argos stabilization alorithm. + * Run Snapvisor stabilization alorithm. * Accepts an object to customize the stabilization. * Note that this function is independent of the `stabilize` option. */ diff --git a/packages/playwright/src/util.ts b/packages/playwright/src/util.ts index 20ef1491..38b36a8f 100644 --- a/packages/playwright/src/util.ts +++ b/packages/playwright/src/util.ts @@ -20,7 +20,7 @@ import type { ArgosAttachment } from "./attachment"; const require = createRequire(import.meta.url); /** - * Check if the project is using the Argos reporter. + * Check if the project is using the Snapvisor reporter. */ export function checkIsUsingArgosReporter(testInfo: TestInfo | null): boolean { if (!testInfo) { @@ -199,7 +199,7 @@ export function getSnapshotNames( } /** - * Inject Argos script into the document. + * Inject Snapvisor script into the document. */ async function injectArgos(handler: Page | Frame) { const injected = await handler.evaluate( @@ -211,7 +211,7 @@ async function injectArgos(handler: Page | Frame) { } /** - * Prepare Argos screenshot by injecting the SDK and creating the root directory. + * Prepare Snapvisor screenshot by injecting the SDK and creating the root directory. */ export async function prepare(args: { handler: Page | Frame; @@ -222,7 +222,7 @@ export async function prepare(args: { await Promise.all([ // Create the screenshot folder if it doesn't exist useArgosReporter ? null : mkdir(root, { recursive: true }), - // Inject Argos script into the page + // Inject Snapvisor script into the page injectArgos(handler), ]); } diff --git a/packages/puppeteer/package.json b/packages/puppeteer/package.json index 01dd818e..2cb2b508 100644 --- a/packages/puppeteer/package.json +++ b/packages/puppeteer/package.json @@ -1,15 +1,15 @@ { "name": "@snapvisor/puppeteer", - "description": "Puppeteer SDK for visual testing with Argos.", + "description": "Puppeteer SDK for visual testing with Snapvisor.", "version": "6.0.24", "author": "Smooth Code", "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/puppeteer" }, - "homepage": "https://argos-ci.com/docs/reference/puppeteer", + "homepage": "https://snapvisor.io/docs", "bugs": { "url": "https://github.com/argos-ci/argos-javascript/issues" }, diff --git a/packages/puppeteer/src/index.ts b/packages/puppeteer/src/index.ts index 87e08260..4530c47d 100644 --- a/packages/puppeteer/src/index.ts +++ b/packages/puppeteer/src/index.ts @@ -22,7 +22,7 @@ import { const require = createRequire(import.meta.url); /** - * Inject Argos script into the page. + * Inject Snapvisor script into the page. */ async function injectArgos(page: Page) { const injected = await page.evaluate( @@ -35,7 +35,7 @@ async function injectArgos(page: Page) { } /** - * Accepts all Puppeteer screenshot options and adds Argos-specific options. + * Accepts all Puppeteer screenshot options and adds Snapvisor-specific options. */ export type ArgosScreenshotOptions = Omit< ScreenshotOptions, @@ -262,7 +262,7 @@ export async function argosScreenshot( const [originalViewport] = await Promise.all([ getViewport(page), - // Inject Argos script into the page + // Inject Snapvisor script into the page injectArgos(page), ]); diff --git a/packages/storybook/package.json b/packages/storybook/package.json index d1c08bb5..ee192888 100644 --- a/packages/storybook/package.json +++ b/packages/storybook/package.json @@ -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/storybook" }, - "homepage": "https://argos-ci.com/docs/reference/storybook", + "homepage": "https://snapvisor.io/docs", "keywords": [ "storybook", "storybook-addon", diff --git a/packages/storybook/src/utils/metadata.ts b/packages/storybook/src/utils/metadata.ts index 2d4619d3..bdfe0b80 100644 --- a/packages/storybook/src/utils/metadata.ts +++ b/packages/storybook/src/utils/metadata.ts @@ -4,7 +4,7 @@ import { createRequire } from "node:module"; const require = createRequire(import.meta.url); /** - * Get the version of the Argos Playwright SDK. + * Get the version of the Snapvisor Playwright SDK. */ export async function getArgosStorybookVersion(): Promise { const pkgPath = require.resolve("@snapvisor/storybook/package.json"); diff --git a/packages/storybook/src/utils/parameters.ts b/packages/storybook/src/utils/parameters.ts index ef647a72..0bf73e78 100644 --- a/packages/storybook/src/utils/parameters.ts +++ b/packages/storybook/src/utils/parameters.ts @@ -17,7 +17,7 @@ export type FitToContent = { }; /** - * Argos parameters in Storybook. + * Snapvisor parameters in Storybook. */ export interface ArgosStorybookParameters { /** @@ -70,7 +70,7 @@ export function getViewport( } /** - * Get the Argos parameters from the Storybook context. + * Get the Snapvisor parameters from the Storybook context. */ export function getArgosParameters( parameters: StoryParameters, diff --git a/packages/storybook/src/vitest-plugin.ts b/packages/storybook/src/vitest-plugin.ts index dea19aa1..1f685658 100644 --- a/packages/storybook/src/vitest-plugin.ts +++ b/packages/storybook/src/vitest-plugin.ts @@ -31,14 +31,14 @@ export type ArgosScreenshotCommandArgs = [ export interface ArgosVitestPluginOptions extends ArgosReporterConfig, ArgosScreenshotOptions { /** - * Upload the report to Argos. + * Upload the report to Snapvisor. * @default true */ uploadToArgos?: boolean; } /** - * Create a command for taking Argos screenshots in Vitest. + * Create a command for taking Snapvisor screenshots in Vitest. */ export const createArgosScreenshotCommand = ( pluginOptions?: ArgosVitestPluginOptions, diff --git a/packages/storybook/src/vitest.ts b/packages/storybook/src/vitest.ts index 6e7eeb80..f66dadca 100644 --- a/packages/storybook/src/vitest.ts +++ b/packages/storybook/src/vitest.ts @@ -17,7 +17,7 @@ declare module "vitest/browser" { } /** - * Setup Argos hooks for Vitest. + * Setup Snapvisor hooks for Vitest. */ export function setupArgos(api: { afterEach: typeof vitest.afterEach }) { api.afterEach(async (ctx) => { @@ -62,7 +62,7 @@ export function setupArgos(api: { afterEach: typeof vitest.afterEach }) { } /** - * Take an Argos screenshot of a story in Vitest. + * Take an Snapvisor screenshot of a story in Vitest. */ export async function argosScreenshot( story: { diff --git a/packages/util/package.json b/packages/util/package.json index 029d1bfd..f4ca5809 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -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/util" }, - "homepage": "https://github.com/argos-ci/argos-javascript/blob/main/packages/util/README.md", + "homepage": "https://snapvisor.io/docs", "bugs": { "url": "https://github.com/argos-ci/argos-javascript/issues" }, diff --git a/packages/util/src/metadata.ts b/packages/util/src/metadata.ts index 29f33dca..2a6570b2 100644 --- a/packages/util/src/metadata.ts +++ b/packages/util/src/metadata.ts @@ -81,11 +81,11 @@ export type ScreenshotMetadata = { /** @description The version of the automation library */ version: string; }; - /** @description The Argos SDK that generated the screenshot */ + /** @description The Snapvisor SDK that generated the screenshot */ sdk: { - /** @description The name of the Argos SDK */ + /** @description The name of the Snapvisor SDK */ name: string; - /** @description The version of the Argos SDK */ + /** @description The version of the Snapvisor SDK */ version: string; }; // Metadata used to pass informations later removed from metadata. diff --git a/packages/vitest/package.json b/packages/vitest/package.json index a502448d..020bcabf 100644 --- a/packages/vitest/package.json +++ b/packages/vitest/package.json @@ -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/vitest" }, - "homepage": "https://argos-ci.com/docs/reference/vitest", + "homepage": "https://snapvisor.io/docs", "bugs": { "url": "https://github.com/argos-ci/argos-javascript/issues" }, diff --git a/packages/vitest/src/auto-name.ts b/packages/vitest/src/auto-name.ts index 2ee0c512..d33bbd15 100644 --- a/packages/vitest/src/auto-name.ts +++ b/packages/vitest/src/auto-name.ts @@ -33,7 +33,7 @@ function truncate(text: string, length: number): string { * several auto-named captures in the same test stay unique. * * Unlike Vitest — which stores snapshots in a per-file `.snap`, so its keys only - * need to be unique within a file — Argos names are global across the whole + * need to be unique within a file — Snapvisor names are global across the whole * build. The name therefore includes the test file path so two tests with the * same title in different files do not collide. Vitest's `fullName` already * starts with the file path; we prepend it defensively in case that changes. @@ -65,7 +65,7 @@ export async function resolveAutoName( const test = await getCurrentTest(); if (!test) { throw new Error( - "Argos could not generate an automatic name because it is not running " + + "Snapvisor could not generate an automatic name because it is not running " + "inside a Vitest test. Pass an explicit `name` argument.", ); } diff --git a/packages/vitest/src/command.ts b/packages/vitest/src/command.ts index a002ec4b..6f1eb15d 100644 --- a/packages/vitest/src/command.ts +++ b/packages/vitest/src/command.ts @@ -25,7 +25,7 @@ export type ArgosScreenshotCommandArgs = [ ]; /** - * Create the `argosScreenshot` browser command used to capture Argos + * Create the `argosScreenshot` browser command used to capture Snapvisor * screenshots from Vitest browser tests. * * Non-serializable options (`beforeScreenshot`, `afterScreenshot`, a diff --git a/packages/vitest/src/index.ts b/packages/vitest/src/index.ts index 81413956..c54b6283 100644 --- a/packages/vitest/src/index.ts +++ b/packages/vitest/src/index.ts @@ -39,14 +39,14 @@ declare module "vitest/browser" { } /** - * Take an Argos screenshot in a Vitest browser test. + * Take an Snapvisor screenshot in a Vitest browser test. * - * Requires the {@link https://www.npmjs.com/package/@snapvisor/vitest Argos Vitest plugin} + * Requires the {@link https://www.npmjs.com/package/@snapvisor/vitest Snapvisor Vitest plugin} * to be registered in your Vitest config. * - * The `name` is optional: when omitted, Argos generates one automatically from + * The `name` is optional: when omitted, Snapvisor generates one automatically from * the current test, mimicking {@link https://vitest.dev/guide/snapshot Vitest's - * snapshot naming}. The name includes the test file path (Argos names are global + * snapshot naming}. The name includes the test file path (Snapvisor names are global * across the build, unlike Vitest's per-file `.snap`), so names stay unique * across files. * @@ -104,18 +104,18 @@ export async function argosScreenshot( } /** - * Take an Argos snapshot of any serializable value, mimicking + * Take an Snapvisor snapshot of any serializable value, mimicking * {@link https://vitest.dev/guide/snapshot Vitest snapshots}. * * Unlike {@link argosScreenshot}, this does not need a browser: it serializes * the value (strings verbatim, everything else via `@vitest/pretty-format`) to a - * file that Argos picks up and diffs across builds. It works both in Vitest + * file that Snapvisor picks up and diffs across builds. It works both in Vitest * browser tests and in plain Node tests. * - * The name is optional: pass it via `options.name`, or omit it to have Argos + * The name is optional: pass it via `options.name`, or omit it to have Snapvisor * generate one automatically from the current test, mimicking * {@link https://vitest.dev/guide/snapshot Vitest's snapshot naming}. The name - * includes the test file path (Argos names are global across the build, unlike + * includes the test file path (Snapvisor names are global across the build, unlike * Vitest's per-file `.snap`), so names stay unique across files. * * @example diff --git a/packages/vitest/src/internal.ts b/packages/vitest/src/internal.ts index 8ac66c78..ba77766c 100644 --- a/packages/vitest/src/internal.ts +++ b/packages/vitest/src/internal.ts @@ -1,5 +1,5 @@ /** - * Internal, unstable entry point shared with other Argos SDKs (e.g. + * Internal, unstable entry point shared with other Snapvisor SDKs (e.g. * `@snapvisor/storybook`). No semver guarantee — do not import directly. */ export { diff --git a/packages/vitest/src/metadata.ts b/packages/vitest/src/metadata.ts index 84605564..c3d2b7b1 100644 --- a/packages/vitest/src/metadata.ts +++ b/packages/vitest/src/metadata.ts @@ -30,7 +30,7 @@ function getTitlePath(task: CurrentTask): string[] { } /** - * Build the Argos `test` metadata from a Vitest test task, mirroring the + * Build the Snapvisor `test` metadata from a Vitest test task, mirroring the * Playwright SDK. * * `location.file` is left absolute here; the Node side (the Playwright SDK for @@ -73,7 +73,7 @@ export function buildTestMetadata( } /** - * Get the Argos `test` metadata for the current Vitest test, or `null` when not + * Get the Snapvisor `test` metadata for the current Vitest test, or `null` when not * running inside a test. * * Runs on the test side (browser or Node) where the test context is available; diff --git a/packages/vitest/src/options.ts b/packages/vitest/src/options.ts index b1a2c5d9..aa3c4a7a 100644 --- a/packages/vitest/src/options.ts +++ b/packages/vitest/src/options.ts @@ -6,7 +6,7 @@ import type { } from "@snapvisor/browser"; /** - * Configuration for the Argos Vitest reporter. + * Configuration for the Snapvisor Vitest reporter. * @see https://js-sdk-reference.argos-ci.com/interfaces/UploadParameters.html */ export interface ArgosReporterConfig extends UploadParameters { @@ -90,7 +90,7 @@ export interface VitestScreenshotOptions { /** * Options passed when calling `argosSnapshot`. * - * `argosSnapshot` serializes any value to a file that Argos picks up and diffs, + * `argosSnapshot` serializes any value to a file that Snapvisor picks up and diffs, * mimicking {@link https://vitest.dev/guide/snapshot Vitest snapshots}. Unlike * `argosScreenshot`, it does not need a browser and works both in Vitest browser * tests and in plain Node tests. @@ -103,10 +103,10 @@ export interface VitestSnapshotOptions { /** * Unique name of the snapshot. * - * When omitted, Argos generates one automatically from the current test, + * When omitted, Snapvisor generates one automatically from the current test, * mimicking {@link https://vitest.dev/guide/snapshot Vitest's snapshot naming}. * The generated name includes the test file path so names stay unique across - * files (Argos names are global across the build, unlike Vitest's per-file + * files (Snapvisor names are global across the build, unlike Vitest's per-file * `.snap`). */ name?: string; @@ -121,7 +121,7 @@ export interface VitestSnapshotOptions { root?: string; /** - * Extension of the snapshot file. It also determines how Argos renders and + * Extension of the snapshot file. It also determines how Snapvisor renders and * diffs the snapshot (e.g. `.txt`, `.json`, `.yml`, `.html`, `.md`). * @default ".txt" */ @@ -151,10 +151,10 @@ export type SerializableSnapshotOptions = Omit< >; /** - * Options for the Argos Vitest plugin. + * Options for the Snapvisor Vitest plugin. * * Accepts every option supported by the Playwright `argosScreenshot` function - * (including non-serializable ones like `beforeScreenshot`), all Argos upload + * (including non-serializable ones like `beforeScreenshot`), all Snapvisor upload * parameters, plus the plugin-specific options below. These act as defaults for * every screenshot and can be overridden per call with the serializable * {@link VitestScreenshotOptions}. @@ -162,7 +162,7 @@ export type SerializableSnapshotOptions = Omit< export interface ArgosVitestPluginOptions extends ArgosReporterConfig, PlaywrightScreenshotOptions { /** - * Upload the report to Argos at the end of the run. + * Upload the report to Snapvisor at the end of the run. * @default false */ uploadToArgos?: boolean; diff --git a/packages/vitest/src/plugin.ts b/packages/vitest/src/plugin.ts index 9c9bd386..4cb209b6 100644 --- a/packages/vitest/src/plugin.ts +++ b/packages/vitest/src/plugin.ts @@ -23,7 +23,7 @@ const cwd = process.cwd(); /** * Vitest plugin that registers the `argosScreenshot` browser command and, - * optionally, the reporter that uploads the captured screenshots to Argos. + * optionally, the reporter that uploads the captured screenshots to Snapvisor. * * @example * ```ts @@ -65,7 +65,7 @@ export function argosVitestPlugin(options?: ArgosVitestPluginOptions): Plugin { include: ["@snapvisor/vitest"], }, test: { - // Record each test's source location so Argos can attach it to the + // Record each test's source location so Snapvisor can attach it to the // screenshot/snapshot metadata (and link back to the test source). includeTaskLocation: true, browser: { diff --git a/packages/vitest/src/reporter.test.ts b/packages/vitest/src/reporter.test.ts index d0d0baa8..70198585 100644 --- a/packages/vitest/src/reporter.test.ts +++ b/packages/vitest/src/reporter.test.ts @@ -95,7 +95,7 @@ describe("ArgosReporter", () => { reporter.onInit(createVitest({})); await expect(reporter.onTestRunEnd()).resolves.toBeUndefined(); expect(error).toHaveBeenCalledWith( - expect.stringContaining("Error while creating the Argos build"), + expect.stringContaining("Error while creating the Snapvisor build"), ); expect(error).toHaveBeenCalledWith( expect.objectContaining({ message: "upload failed" }), @@ -112,7 +112,7 @@ describe("ArgosReporter", () => { reporter.onInit(createVitest({})); await expect(reporter.onTestRunEnd()).resolves.toBeUndefined(); expect(error).toHaveBeenCalledWith( - expect.stringContaining("Error while creating the Argos build"), + expect.stringContaining("Error while creating the Snapvisor build"), ); expect(warn).toHaveBeenCalledWith( expect.stringContaining("ignoreUploadFailures"), diff --git a/packages/vitest/src/reporter.ts b/packages/vitest/src/reporter.ts index 4d34e833..20526d1b 100644 --- a/packages/vitest/src/reporter.ts +++ b/packages/vitest/src/reporter.ts @@ -6,12 +6,12 @@ import type { ArgosReporterConfig } from "./options"; export type { ArgosReporterConfig }; /** - * Derive the Argos parallel configuration from Vitest's shard settings, matching + * Derive the Snapvisor parallel configuration from Vitest's shard settings, matching * the Playwright reporter. * * Vitest's `--shard=/` populates `config.shard` as - * `{ index, count }` (the `index` is 1-based, like the Argos `parallel.index`). - * When sharding is active, Argos still needs `ARGOS_PARALLEL_NONCE` to group the + * `{ index, count }` (the `index` is 1-based, like the Snapvisor `parallel.index`). + * When sharding is active, Snapvisor still needs `ARGOS_PARALLEL_NONCE` to group the * shards into a single build; the total and index default to the shard values * but can be overridden via `ARGOS_PARALLEL_TOTAL` / `ARGOS_PARALLEL_INDEX`. */ @@ -36,7 +36,7 @@ async function getParallelFromConfig(config: { } /** - * Vitest reporter that uploads the screenshots captured during the run to Argos. + * Vitest reporter that uploads the screenshots captured during the run to Snapvisor. */ export class ArgosReporter implements Reporter { vitest!: Vitest; @@ -62,7 +62,7 @@ export class ArgosReporter implements Reporter { } const { ignoreUploadFailures, ...uploadParameters } = this.config; try { - // Auto-detect `vitest --shard=/` and map it to Argos parallel + // Auto-detect `vitest --shard=/` and map it to Snapvisor parallel // options, so users only need `ARGOS_PARALLEL_NONCE`. const parallel = await getParallelFromConfig(this.vitest.config); const res = await upload({ @@ -80,12 +80,12 @@ export class ArgosReporter implements Reporter { parallel: parallel ?? undefined, ...uploadParameters, }); - console.log(`✅ Argos build created: ${res.build.url}`); + console.log(`✅ Snapvisor build created: ${res.build.url}`); } catch (error) { // Vitest decides the exit code before reporters run `onTestRunEnd`, so // an error thrown here would surface as an "Unhandled Error" without // failing the run (exit code 0). Report it and fail the run explicitly. - console.error(`❌ Error while creating the Argos build`); + console.error(`❌ Error while creating the Snapvisor build`); console.error(error); if (ignoreUploadFailures) { console.warn( diff --git a/packages/vitest/src/snapshot-file.ts b/packages/vitest/src/snapshot-file.ts index 3d137566..0fa399c2 100644 --- a/packages/vitest/src/snapshot-file.ts +++ b/packages/vitest/src/snapshot-file.ts @@ -61,7 +61,7 @@ function normalizeExtension(extension: string): string { /** * Write a serialized snapshot (and its metadata) to disk and return the - * corresponding Argos attachments. + * corresponding Snapvisor attachments. * * This is the shared Node-side primitive used by both the browser command (which * receives the already-serialized string over RPC) and the Node code path. diff --git a/packages/vitest/src/test-context.ts b/packages/vitest/src/test-context.ts index 0e133bd8..e1132f4a 100644 --- a/packages/vitest/src/test-context.ts +++ b/packages/vitest/src/test-context.ts @@ -9,7 +9,7 @@ export interface CurrentSuite { /** * Minimal structural view of the Vitest test task we read metadata from. Only - * the fields Argos uses are declared; the real object has many more. + * the fields Snapvisor uses are declared; the real object has many more. */ export interface CurrentTask extends CurrentSuite { id: string; diff --git a/packages/vitest/src/version.ts b/packages/vitest/src/version.ts index 2d0fd8a6..8ffdf690 100644 --- a/packages/vitest/src/version.ts +++ b/packages/vitest/src/version.ts @@ -4,7 +4,7 @@ import { createRequire } from "node:module"; const require = createRequire(import.meta.url); /** - * Get the version of the Argos Vitest SDK. + * Get the version of the Snapvisor Vitest SDK. */ export async function getArgosVitestVersion(): Promise { const pkgPath = require.resolve("@snapvisor/vitest/package.json"); diff --git a/packages/webdriverio/package.json b/packages/webdriverio/package.json index 04d75eea..3a4e2d7a 100644 --- a/packages/webdriverio/package.json +++ b/packages/webdriverio/package.json @@ -1,15 +1,15 @@ { "name": "@snapvisor/webdriverio", - "description": "WebdriverIO SDK for visual testing with Argos.", + "description": "WebdriverIO SDK for visual testing with Snapvisor.", "version": "0.7.20", "author": "Smooth Code", "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/webdriverio" }, - "homepage": "https://argos-ci.com/docs/reference/webdriverio", + "homepage": "https://snapvisor.io/docs", "bugs": { "url": "https://github.com/argos-ci/argos-javascript/issues" },