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: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Precedence (highest wins):
Environment variables:

- `PATCHSTACK_SITE_UUID` — the site UUID from your Patchstack dashboard
- `PATCHSTACK_ENDPOINT` — override the API endpoint (default `https://app.patchstack.com/monitor/pulse/manifest`)
- `PATCHSTACK_ENDPOINT` — override the API endpoint (default `http://api.patchstack.com/monitor/pulse/manifest`)
- `PATCHSTACK_TIMEOUT_MS` — request timeout in milliseconds (default `30000`)

`.patchstackrc.json` example:
Expand Down
4 changes: 2 additions & 2 deletions dist/cli.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cli.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ function compareSegments(a, b) {
}

// src/client.ts
var DEFAULT_ENDPOINT = "https://app.patchstack.com/monitor/pulse/manifest";
var DEFAULT_ENDPOINT = "http://api.patchstack.com/monitor/pulse/manifest";
var DEFAULT_TIMEOUT_MS = 3e4;
function buildEndpointUrl(base, siteUuid) {
const trimmed = base.replace(/\/$/, "");
Expand Down
2 changes: 1 addition & 1 deletion dist/index.cjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.d.cts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ interface NormalizeResult {
declare function buildWirePayload(manifest: Manifest): NormalizeResult;
declare function compareVersions(a: string, b: string): number;

declare const DEFAULT_ENDPOINT = "https://app.patchstack.com/monitor/pulse/manifest";
declare const DEFAULT_ENDPOINT = "http://api.patchstack.com/monitor/pulse/manifest";
declare function buildEndpointUrl(base: string, siteUuid?: string | null): string;
declare function postManifest(config: Config, payload: WirePayload): Promise<StoreManifestResponse>;

Expand Down
2 changes: 1 addition & 1 deletion dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ interface NormalizeResult {
declare function buildWirePayload(manifest: Manifest): NormalizeResult;
declare function compareVersions(a: string, b: string): number;

declare const DEFAULT_ENDPOINT = "https://app.patchstack.com/monitor/pulse/manifest";
declare const DEFAULT_ENDPOINT = "http://api.patchstack.com/monitor/pulse/manifest";
declare function buildEndpointUrl(base: string, siteUuid?: string | null): string;
declare function postManifest(config: Config, payload: WirePayload): Promise<StoreManifestResponse>;

Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@patchstack/connect",
"version": "0.2.3",
"version": "0.2.4",
"description": "Patchstack connector for JavaScript applications. Scans your lockfile and reports installed packages to Patchstack for vulnerability monitoring.",
"keywords": [
"patchstack",
Expand Down
2 changes: 1 addition & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Options (for scan and status):

Environment:
PATCHSTACK_SITE_UUID Site UUID
PATCHSTACK_ENDPOINT API endpoint (default: https://app.patchstack.com/monitor/pulse/manifest)
PATCHSTACK_ENDPOINT API endpoint (default: http://api.patchstack.com/monitor/pulse/manifest)
PATCHSTACK_TIMEOUT_MS Request timeout in ms (default: 30000)

Precedence: CLI flag > environment variable > .patchstackrc.json.
Expand Down
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PatchstackError, type Config, type StoreManifestResponse } from './types.js';
import type { WirePayload } from './normalize.js';

export const DEFAULT_ENDPOINT = 'https://app.patchstack.com/monitor/pulse/manifest';
export const DEFAULT_ENDPOINT = 'http://api.patchstack.com/monitor/pulse/manifest';
export const DEFAULT_TIMEOUT_MS = 30_000;

export function buildEndpointUrl(base: string, siteUuid?: string | null): string {
Expand Down
4 changes: 2 additions & 2 deletions tests/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { PatchstackError } from '../src/types.js';

describe('buildEndpointUrl', () => {
it('joins base and uuid cleanly', () => {
expect(buildEndpointUrl('https://app.patchstack.com/monitor/pulse/manifest', 'abc')).toBe(
'https://app.patchstack.com/monitor/pulse/manifest/abc',
expect(buildEndpointUrl('http://api.patchstack.com/monitor/pulse/manifest', 'abc')).toBe(
'http://api.patchstack.com/monitor/pulse/manifest/abc',
);
});

Expand Down
Loading