Restructuring

This commit is contained in:
Konrad Pabjan
2023-08-01 11:21:35 -04:00
parent 95cf02468e
commit 962fd91d75
6 changed files with 36 additions and 23 deletions

View File

@@ -0,0 +1,29 @@
import {checkArtifactName} from './path-and-artifact-name-validation'
import {UploadOptions} from './upload-options'
import {UploadResponse} from './upload-response'
export async function uploadArtifact(
name: string,
files: string[],
rootDirectory: string,
options?: UploadOptions | undefined
): Promise<UploadResponse> {
// Need to keep checking the artifact name
checkArtifactName(name)
// TODO Twirp call to create new artifact
// TODO Upload to blob storage using SAS URL
// TODO Twirp call to finalize the new artifact upload
const uploadResponse: UploadResponse = {
artifactName: name,
artifactItems: [],
size: 0
}
return uploadResponse
}