chrishasz / spgo

SPGo: A Lightweight, Open Source, SharePoint IDE for Visual Studio Code
https://www.chrishasz.com/spgo
MIT License
60 stars 11 forks source link

Populate workspace stopped working #112

Closed yanivoh closed 4 years ago

yanivoh commented 4 years ago

Hi, Populate workspace stopped working for me few weeks a go. Configure workspace works and creates SPGo.json file, but the populate workspace doesn't do anything. Tried on multiple sites and document libraries. This is my SPGo.json file: { "sourceDirectory": "src", "sharePointSiteUrl": "https://sampletenant.sharepoint.com/doccenter", "publishingScope": "SaveOnly", "authenticationType": "Digest", "remoteFolders": [ "CustomScripts/*/.*" ] }

Output says: [7.4.2020, 16:06:20] ================================ ERROR ================================

[7.4.2020, 16:06:20] Cannot read property 'toString' of undefined [7.4.2020, 16:06:20] Error Detail: [7.4.2020, 16:06:20] ---------------------- [7.4.2020, 16:06:20] {} [7.4.2020, 16:06:20] ===============================================================================

ghost commented 4 years ago

I am experiencing the same issue. If I manually create a new folder, manually create the file and contents, i can edit and update the SharePoint source just fine.

chrishasz commented 4 years ago

Thank you for bringing this to my attention. I will take a look this week and get you a response soon.

Also- I appreciate you posting your SPGo.json file, it is helpful.

chrishasz commented 4 years ago

Hey Everyone- I am able to replicate this issue. I will have a fix out to the marketplace in the next day or so.

chrishasz commented 4 years ago

@billr-stcu, @yanivoh -

I have found and fixed a bug with file parsing, but I had a separate question about the glob pattern you are using in the remoteFolders property, because that might be part of your issue.

Are you looking to download all files within the specified folder? If so, the correct glob pattern would be "CustomScripts/**/*". The glob pattern **/. is not recognized by the parser used by SPGo.

I will publish the fix to the marketplace soon, but you may want to try the above as a workaround until then.

ghost commented 4 years ago

I have been using **/*.* for quite a while. Found the pattern in the documentation. I just changed to **/* and files are downloading.

chrishasz commented 4 years ago

@billr-stcu the *.* notation is correct - I was specifically referring to this notation: **/.

That said, I was still not handling the *.* notation correctly, and that is on me! I've just published 1.6.3 to the VSCode marketplace which will now correctly handle that notation as well.

Thank you for catching this!

ghost commented 4 years ago

Thanks you for your quick turn on this. Updated/Tested - All is well. It's the totality of the simple things that make our lives much richer. Very much appreciated! Be safe :)

chrishasz commented 4 years ago

(Belated) Thanks @billr-stcu!

I will close this issue now.