Adding SQL Edge project template (#13558)

* Checkpoint

* removing flag for not creating subfolder

* Adding Edge template

* Removing janky map function

* Adding templates for additional objects

* Updating tests, fixing bug

* Added Edge project icon

* Updating strings to Drew-approved text

* Cleaning up template scripts and Edge project template names
This commit is contained in:
Benjin Dubishar
2020-12-03 10:33:31 -08:00
committed by GitHub
parent 08735c9434
commit fde031be48
15 changed files with 230 additions and 67 deletions

View File

@@ -28,6 +28,7 @@ export async function shouldThrowSpecificError(block: Function, expectedMessage:
}
export async function createTestSqlProjFile(contents: string, folderPath?: string): Promise<string> {
folderPath = folderPath ?? path.join(await generateTestFolderPath(), 'TestProject');
return await createTestFile(contents, 'TestProject.sqlproj', folderPath);
}
@@ -40,7 +41,7 @@ export async function createTestDataSources(contents: string, folderPath?: strin
}
export async function generateTestFolderPath(): Promise<string> {
const folderPath = path.join(os.tmpdir(), `TestProject_${new Date().getTime()}`);
const folderPath = path.join(os.tmpdir(), `TestRun_${new Date().getTime()}`);
await fs.mkdir(folderPath, { recursive: true });
return folderPath;
@@ -55,6 +56,7 @@ export async function createTestFile(contents: string, fileName: string, folderP
return filePath;
}
/**
* TestFolder directory structure
* - file1.sql