diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f563b5..34f72ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,4 +37,7 @@ - Significant changes in behavior + available commands - Changes to file tree view - Changes to credential authentication + caching -- Initial support for custom controls \ No newline at end of file +- Initial support for custom controls + +## [0.3.1] +- Path bug \ No newline at end of file diff --git a/package.json b/package.json index e9bcc75..c45c177 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "url": "https://github.com/Root16/bamboo" }, "description": "Enables users to create, update, and publish Web Resources and Custom Controls for Microsoft Power Platform — directly from VS Code.", - "version": "0.3.0", + "version": "0.3.1", "icon": "resources/bamboo-green.png", "engines": { "vscode": "^1.73.0" diff --git a/src/classes/syncer/BambooManager.ts b/src/classes/syncer/BambooManager.ts index 0ed58d9..55759ac 100644 --- a/src/classes/syncer/BambooManager.ts +++ b/src/classes/syncer/BambooManager.ts @@ -134,7 +134,6 @@ export class BambooManager { return tokenCacheFolder; } - public static async getTokenCacheFilePath(): Promise { let currentWorkspaceFolders = vscode.workspace.workspaceFolders; if (currentWorkspaceFolders === undefined || currentWorkspaceFolders?.length > 1) { @@ -142,24 +141,18 @@ export class BambooManager { return null; } - const workspacePath = currentWorkspaceFolders![0].uri.path; - - const tokenFileFolderPath = await BambooManager.getTokenCacheFolderPath() - + const tokenFileFolderPath = await BambooManager.getTokenCacheFolderPath(); if (tokenFileFolderPath === null) return null; - const cacheFile = path.join( - ( - tokenFileFolderPath - ).path, "tokenCache.json"); + const tokenFileFolderPathStr = tokenFileFolderPath instanceof vscode.Uri ? tokenFileFolderPath.fsPath : tokenFileFolderPath; + + const tokenCacheFilePath = path.join(tokenFileFolderPathStr, "tokenCache.json"); - //TODO - const normalizedPath = path.resolve(cacheFile).replace("\\c:", ""); + const normalizedPath = path.resolve(tokenCacheFilePath); return normalizedPath; } - public async getToken(): Promise { const bambooConfig = await this.getConfig();