Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pikachu #33

Merged
merged 2 commits into from
Nov 12, 2023
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
1 change: 1 addition & 0 deletions scripts/local/sdk_gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ echo "✅ Generated SDK for Core API '$version'"
echo "🔧 Patching generated code..."
sed -i 's/import {/import type {/g' ./src/lib/api/core/Api.ts
sed -i 's/import type { ContentType, HttpClient, RequestParams/import { ContentType, HttpClient, type RequestParams/g' ./src/lib/api/core/Api.ts
sed -i '/credentials: "same-origin",/d; /headers: {},/d; /redirect: "follow",/d; /referrerPolicy: "no-referrer",/d' ./src/lib/api/core/http-client.ts
echo "✅ Patched generated code"
6 changes: 1 addition & 5 deletions src/lib/api/core/data-contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ export interface PluginVersionPrincipalResp {
createdAt?: string;
description?: string | null;
dockerReference?: string | null;
dockerSha?: string | null;
dockerTag?: string | null;
}

Expand Down Expand Up @@ -175,7 +174,6 @@ export interface ProcessorVersionPrincipalResp {
createdAt?: string;
description?: string | null;
dockerReference?: string | null;
dockerSha?: string | null;
dockerTag?: string | null;
}

Expand Down Expand Up @@ -263,10 +261,8 @@ export interface TemplateVersionPrincipalResp {
createdAt?: string;
description?: string | null;
blobDockerReference?: string | null;
blobDockerSha?: string | null;
templateDockerReference?: string | null;
templateDockerSha?: string | null;
blobDockerTag?: string | null;
templateDockerReference?: string | null;
templateDockerTag?: string | null;
}

Expand Down
7 changes: 1 addition & 6 deletions src/lib/api/core/http-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,7 @@ export class HttpClient<SecurityDataType = unknown> {
private customFetch = (...fetchParams: Parameters<typeof fetch>) =>
fetch(...fetchParams);

private baseApiParams: RequestParams = {
credentials: "same-origin",
headers: {},
redirect: "follow",
referrerPolicy: "no-referrer",
};
private baseApiParams: RequestParams = {};

constructor(apiConfig: ApiConfig<SecurityDataType> = {}) {
Object.assign(this, apiConfig);
Expand Down