Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ export function validateArtifactName(name: string): void {
if (name.includes(invalidCharacterKey)) {
throw new Error(
`The artifact name is not valid: ${name}. Contains the following character: ${errorMessageForCharacter}

Invalid characters include: ${Array.from(
invalidArtifactNameCharacters.values()
).toString()}

These characters are not allowed in the artifact name due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.`
)
}
Expand All @@ -69,11 +67,9 @@ export function validateFilePath(path: string): void {
if (path.includes(invalidCharacterKey)) {
throw new Error(
`The path for one of the files in artifact is not valid: ${path}. Contains the following character: ${errorMessageForCharacter}

Invalid characters include: ${Array.from(
invalidArtifactFilePathCharacters.values()
).toString()}

The following characters are not allowed in files that are uploaded due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.
`
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ export function getUploadZipSpecification(

/*
Example

Input:
rootDirectory: '/home/user/files/plz-upload'
artifactFiles: [
'/home/user/files/plz-upload/file1.txt',
'/home/user/files/plz-upload/file2.txt',
'/home/user/files/plz-upload/dir/file3.txt'
]

Output:
specifications: [
['/home/user/files/plz-upload/file1.txt', '/file1.txt'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import {
GetCacheEntryDownloadURLRequest,
GetCacheEntryDownloadURLResponse,
} from "./cache.js";

//==================================//
// Client Code //
//==================================//

interface Rpc {
request(
service: string,
Expand All @@ -19,7 +19,7 @@ import {
data: object | Uint8Array
): Promise<object | Uint8Array>;
}

export interface CacheServiceClient {
CreateCacheEntry(
request: CreateCacheEntryRequest
Expand All @@ -31,7 +31,7 @@ import {
request: GetCacheEntryDownloadURLRequest
): Promise<GetCacheEntryDownloadURLResponse>;
}

export class CacheServiceClientJSON implements CacheServiceClient {
private readonly rpc: Rpc;
constructor(rpc: Rpc) {
Expand Down Expand Up @@ -59,7 +59,7 @@ import {
})
);
}

FinalizeCacheEntryUpload(
request: FinalizeCacheEntryUploadRequest
): Promise<FinalizeCacheEntryUploadResponse> {
Expand All @@ -79,7 +79,7 @@ import {
})
);
}

GetCacheEntryDownloadURL(
request: GetCacheEntryDownloadURLRequest
): Promise<GetCacheEntryDownloadURLResponse> {
Expand All @@ -100,7 +100,7 @@ import {
);
}
}

export class CacheServiceClientProtobuf implements CacheServiceClient {
private readonly rpc: Rpc;
constructor(rpc: Rpc) {
Expand All @@ -123,7 +123,7 @@ import {
CreateCacheEntryResponse.fromBinary(data as Uint8Array)
);
}

FinalizeCacheEntryUpload(
request: FinalizeCacheEntryUploadRequest
): Promise<FinalizeCacheEntryUploadResponse> {
Expand All @@ -138,7 +138,7 @@ import {
FinalizeCacheEntryUploadResponse.fromBinary(data as Uint8Array)
);
}

GetCacheEntryDownloadURL(
request: GetCacheEntryDownloadURLRequest
): Promise<GetCacheEntryDownloadURLResponse> {
Expand All @@ -154,4 +154,3 @@ import {
);
}
}

4 changes: 1 addition & 3 deletions packages/core/src/oidc-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ export class OidcClient {
.getJson<TokenResponse>(id_token_url)
.catch(error => {
throw new Error(
`Failed to get ID Token. \n
Error Code : ${error.statusCode}\n
Error Message: ${error.message}`
`Failed to get ID Token.\n Error Code: ${error.statusCode}\n Error Message: ${error.message}`
)
})

Expand Down