chrishasz / spgo Goto Github PK
View Code? Open in Web Editor NEWSPGo: A Lightweight, Open Source, SharePoint IDE for Visual Studio Code
Home Page: https://www.chrishasz.com/spgo
License: MIT License
SPGo: A Lightweight, Open Source, SharePoint IDE for Visual Studio Code
Home Page: https://www.chrishasz.com/spgo
License: MIT License
Hello and thank you for the awesome extension!
I have the following issue while using it:
We have this configuration:
{
"sourceDirectory": "src",
"sharePointSiteUrl": "https://domain/subsiteName",
"publishingScope": "None",
"authenticationType": "Digest",
"remoteFolders": [
"/SiteAssets/**/."
]
}
The real "Site Assets" structure on the server is:
SiteAssets/js/subsiteName111.xxx.js
SiteAssets/js/subsiteName222.yyy.js
SiteAssets/js/subsiteName333.zzz.js
File names start with the same name as the subsiteName.
After populating the workspace the js files are shown outside the js folder and are renamed. The populated structure is the following:
SiteAssets/js111.xxx.js
SiteAssets/js222.yyy.js
SiteAssets/js333.zzz.js
If the file names do not contain the subsite name everything is fine.
Hi,
Kenneth here from the VS Code team.
Your extension is affected by https://code.visualstudio.com/blogs/2018/11/26/event-stream, and we have blocked your extension.
In order to enable your extension again the workflow is:
/k
Hi - I'm wondering if you can help me with this error during "populate local workspace": Cannot set property 'domain' of undefined
*Intranet
*vpn'd into company
Format:
uid: domain\username
pwd: pwd
*when I try email and pwd, I don't get an error message but I get "Starting File Synchronization" but nothing happens.
Thank you.
PowPow
I have followed all the steps as mentioned in documentation.
I have two SharePoint sites
I am able to connect with first account (personal account) and loaded all data from server successfully.
But unable to load data from second site(organisation site). It just keep saying "populating workspace" but nothing gets loaded.
{
"sourceDirectory": "src",
"sharePointSiteUrl": "https://tenant.sharepoint.com/sites/sitename/Demo",
"publishingScope": "SaveOnly",
"authenticationType": "Digest",
"storeCredentials" : true,
"remoteFolders": [
"/app"
]
}
Can you help me with this.
I am using VS Code Ver : 1.23.1 and SPGO ver : 1.3.2
Hi.
I have a site with the following SPGo.json:
{
"sourceDirectory": "src",
"sharePointSiteUrl": "https://tenant.sharepoint.com/sites/modernworkplace",
"publishingScope": "Minor",
"remoteFolders": [
"/Style Library/custom",
"/_catalogs/masterpage"
]
}
When starting "Populate local workspace" it will download the remote folders to a structure like this:
../src/sites/modernworkplace/Style Library/..." etc.
Also when modifying files locally or adding new ones and starting ""SPGo: Publish..." the files are not uploaded/published (although there is no error message).
As a workaround, after populating local workspace in Windows Explorer I moved the two remote folders directly underneath "src" and publishing worked again.
In another site collection on the same tenant everything works as described and the remote folders are created directly in "src".
One difference is that the site collection with the error has publishing feature activated and the other is a standard team site.
Regards, Bernhard
Hello,
I´m using SPGO v1.2.4 on VSCode v1.23.1 2018-05-10
my SPGO.json contains:
{
"sourceDirectory": "src",
"sharePointSiteUrl": "https://sp69.domain.corp:9998",
"publishingScope": "Major",
"publishWorkspaceGlobPattern": "/**/.min.",
"remoteFolders": [
"/Style Library/",
"/_catalogs/masterpage/"
]
}
When i use populate local workspace command on SPGO , the _catalogs folder gets downloaded .
Nothing from "/Style Library/" gets downloaded.
Console logs the following info:
Successfully downloaded 0 files to: src/Style Library/
Successfully downloaded 81 files to: src/_catalogs/masterpage/
Can you help me find the cause for this behaviour?
Thank you
Is SharePoint 2010 supported and/or are there plans to support it?
Thank you very much for your awesome plugin! unfortunately we are usually putting our customized stuff outside any library, in a folder named _custom under the root of the sharepoint web (via all file sin sharepoint designer) - so the urls would be for example https://tenant.sharepoint.com/sites/webUnderDevelopment/_custom/myscript.js - when i add /_custom/ to the remoteFolders in SPGo.json, that folder doesn't get downloaded when using populate workspace and also isn't being downloaded when using retrieve folders - any chance that can be implemented in a future release?
Hi, this is very minor and can be easily prevented on the user side but when adding the "sharePointSiteUrl" if the URL ends with a backslash, the retrieve folder will not execute
In other words, this will work
"sharePointSiteUrl": "https://[tenant].sharepoint.com/[site]",
but this won't
"sharePointSiteUrl": "https://[tenant].sharepoint.com/[site]/",
Again, super minor
It would be great if the SharePoint username and password could be stored and easily re-used. I switch between multiple projects daily and find having to type in my username and password repeatedly quite laborious.
Guys, thanks for the great work on the SPGO library. I have tried all the suggestions related to this issue, but am not able to download the folders. It says "Populating Workspace", but nothing is loaded and the message disappears. There are no errors in the Output window and there is no 'SPGO Enabled' message. Please advise. Here is what I am using:
{
"sourceDirectory": "src",
"sharePointSiteUrl": "https://xxx.xx.com/sites/IOC/crew",
"publishingScope": "SaveOnly",
"authenticationType": "Digest",
"storeCredentials" : true,
"remoteFolders": [
"/SiteAssets//.",
"/SitePages//."
]
}
In Germany we have a special "German Cloud" version of Office 365 where SharePoint and other services are hosted within Germany. Authentication fails with a SharePoint site on such a location. Not sure if this is related, but we also had problems with SharePoint Designer and the following hints helped:
https://support.office.com/en-us/article/Enable-Modern-Authentication-for-Office-2013-on-Windows-devices-7dc1c01a-090f-4971-9677-f1b192d6c910
Attempting to populate local workspace from SharePoint Online (O365).
SPGo.json config:
{
"sourceDirectory": "src",
"sharePointSiteUrl": "https://TENANT.sharepoint.com",
"publishingScope": "Major",
"authenticationType": "Digest",
"remoteFolders": ["/SiteAssets/", "/_catalogs/"]
}
Log shows:
SPGo enabled.
Starting File Synchronization...
================================ ERROR ================================
Cannot read property 'indexOf' of null
===============================================================================
After updating to VSCode 1.31 (January 2019 update), the SPGo extension appears to break. Every operation results in "401 - undefined" in the output.
I verified this by rolling back to the November 2018 build (1.30), and everything worked great.
Also, great work on this extension, it's awesome!
For some reason, SPGo doesn't seem to prom me for authentication anymore.
I'm using version 1.2.1:
I've tried:
Config:
{
"sourceDirectory": "src",
"sharePointSiteUrl": "https://mysite.sharepoint.com/sites/Demo",
"publishingScope": "PublishMajor",
"authenticationType": "Digest",
"remoteFolders": ["/SiteAssets/"],
"checkInMessage": "",
"storeCredentials": true
}
I run "Public local workspace" and the output says:
Starting Workspace Publish...
Saving file: c:\Users\me\OneDrive - me\projects\blue.sp\src\**\*.*
Workspace Publish complete.
But there's nothing in Site Assets. I was expecting there to be a folder called "bs.widgets" with all of the stuff I have in there.
ERROR ================================
Error: read ECONNRESET
Getting the error above (from Log File) when trying to Publish a JS File into SiteAssets library.
I'm able to Check-out/Discard Check-out the file but unable to PUBLISH
Hello SPgo,
I have created a workspace (populated from remote) which works fine.
When I try to publish a file I see the action progress in the status bar together with a spinning wheel but when I look on the site nothing has changed or is updated.
Please advise.
Kind regards,
Mario
We're currently experiencing an issue where authentication has to be re-entered on every new session.
Here's our SPGo config setup:
{
"sourceDirectory": "src",
"sharePointSiteUrl": "https://contoso.sharepoint.com/",
"publishingScope": "PublishMinor",
"authenticationType": "Digest",
"storeCredentials": true,
"remoteFolders": [
"/SiteAssets/**/*"
]
}
We have folder redirection set up in our company if that provides any helpful env info. If you need anything more from me just say.
Awesome extension btw! Our department is moving to this currently as it allows for us to tentatively move away from SPD and more into VSCode for all dev work.
Thanks in advance guys!
So pull, publish works great but is it possible to delete files straight from Code?
I use minify-extension in VS Code. The minified file is not uploaded to the SharePoint location automatically. Also when copying/pasting a file in a synched folder it is not uploaded automatically.
Maybe this should be at least an option in SPGo?
Hello @ sg-chrishasz!
Great API!
But, I'm trying to use the SPGo command: Publish local workspace to no avail. Or maybe you're not fully understanding your concept.
In my view this command would publish all files with check out inside my workspace, correct?
Hi.
quick question: is it possible to store credentials? In order not to enter them each time VSCode starts :)
Is no - do you have such feature on your roadmap?
Thanks
Hi,
I'm looking forward to using SPGo!
From the authentication code it looks like Digest authentication is the only supported authentication.
Is there an easy way to enhance SPGo (or via VSCode) to use NTLM? How about a Forms based SP 2013 authenticator?
Per
Just installed vs code and the git extension both seemingly working fine. When I install SPGo and look to run > SPGo: configure workspace
command 'spgo.configureWorkspace' not found
Debug info says about the same:
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2255 command 'spgo.configureWorkspace' not found
Any known issues in this environment?
Hi,
I have installed spgo (0.10.1) - which looks to be exactly what I need for SP module builds.
However, when I save a file and am challenged for username and password - I get "Invalid user credentials". I am simply entering domain\username.
I have on premise SP2013 and using standard company network (NTML w. kerberos).
Any idea what is going wrong?
Thanks
When I login .
TypeError: First argument should be a valid curve name
If i setup the SPGo.json like this:
{
"sourceDirectory": "src",
"workspaceRoot": "c:\CodeProjects\myproject\",
"sharePointSiteUrl": "https://domain.sharepoint.com",
"publishingScope": "SaveOnly",
"remoteFolders": [
"/SiteAssets/"
]
}
The result will be that SPGo downloads the content of the SiteAssets folder into the "src" folder. Then upload or publishing will not work.
The same goes if you add 2 folders:
"remoteFolders": [
"/SiteAssets/",
"/Style%20Library/"
]
The last folder will download into the "src" folder.
Is there any way to transpile / babel the file before pushing to SP?
For example. I'd like to write with ES6 but IE sucks.
First, thanks for this awesome extensions.
I was wondering if there is a way to retrieve all folders and subfolders at once. For example, when using spgo: retrieve folder, if i set the path to /sitepages it would only get the files at that level but none of the folders or nested files within that folder. I try /sitepages/* without success
Perhaps, i am missing a step.
Cheers
My team uses different branches for different environments. It's nice that we can have different SP site URLs in SPGo.json, but when we switch environments SPGo is still caching the previous URL. If it could check the sharePointSiteUrl
parameter before an operation (ok to assume the security model/context is the same, IMO), that would enable us to switch environments without having to reload VS Code.
Since the latest update, I can't seem to use SPGo anymore. It doesn't seem to register in Code properly anymore. If I try to configure a new workspace I get the below. For existing projects, none of the commands are working. I've tried this in latest versions of Code and Code Insiders on both macOS and Windows but see same issue.
I've tried reloading the extension as well as removing and reinstalling but to no avail. Any ideas what I can do to get this working again? It's an amazing extension and I feel lost without it!
Search site in 365 is /search (not under a managed path).
"remoteFolders": ["/_catalogs/masterpage/display templates/**/*.html"]
All sub folders under /display templates/ are populated except files from the /display templates/Search folder are copied to the parent folder "display templates"
Hi. I tried to use SPGo but it didn't work at all. Even the "Configure workspace" didn't.
After many minutes of investigation in Visual Studio Code debugging console I found that the file names on the distribution folder (~/.vscode/extensions/sitego.spgo-1.3.1/out/src) don't quite correspond in casing to the requires("...")s around the code.
The issue here is an annoying case sensitiveness one, expressed only on non-NTFS filesystems (even the HFS+ filesystem on Mac OS X should have this issue) as with my case with an BTRFS file system on linux.
I think this can be a simple task to accomplish in order to let this extension be truly cross platform.
Thanks for understanding.
spgo: Configure Workspace is not working after firing this command
When I try to populate local workspace I only get the SiteAssets library and the root files in SiteAssets, but none of the subfolders or files in subfolders.
Config file looks like this:
{
"sourceDirectory": "src",
"sharePointSiteUrl": "https://domain.sharepoint.com",
"publishingScope": "SaveOnly",
"remoteFolders": [
"/SiteAssets"
]
}
Also tried this config, with same results:
{
"sourceDirectory": "src",
"sharePointSiteUrl": "https://domain.sharepoint.com",
"publishingScope": "SaveOnly",
"publishWorkspaceGlobPattern": "//.min.",
"remoteFolders": [
"/SiteAssets//."
]
}
This one is driving me crazy, I was able to update a file once but not after that. While using NTML authentication on mixed authentication (NTML + FBA) it gets access denied for my own user which I can use to upload & overwrite the files manually but not using SPGO. If I use a site administrator user, I keep getting the "The security validation for this page is invalid.", I was able to update a file once and then after restarting visual studio code it fails.
10/26/2018 08:40:18.89 w3wp.exe (0xAA94) 0x25EC SharePoint Foundation Monitoring nasq Medium Entering monitored scope (Request (GET:https://site.domain.com:443/sites/demo/_api/web/GetFileByServerRelativeUrl('/sites/demo/SiteAssets/printOnClick_mr.js')/CheckOut())). Parent No 35129c9e-acfd-3093-e956-61d513561ab1
10/26/2018 08:40:18.89 w3wp.exe (0xAA94) 0x25EC SharePoint Foundation Logging Correlation Data xmnv Medium Name=Request (GET:https://site.domain.com:443/sites/demo/_api/web/GetFileByServerRelativeUrl('/sites/demo/SiteAssets/printOnClick_mr.js')/CheckOut()) 6f149c9e-bcfc-3093-e956-69fe7a3a4844
10/26/2018 08:40:18.92 w3wp.exe (0xAA94) 0x5ED0 SharePoint Foundation CSOM agw10 Medium Begin CSOM Request ManagedThreadId=189, NativeThreadId=24272 6f149c9e-bcfc-3093-e956-6f34a799ceba
10/26/2018 08:40:18.92 w3wp.exe (0xAA94) 0x5ED0 SharePoint Foundation Logging Correlation Data xmnv Medium Site=/sites/demo 6f149c9e-bcfc-3093-e956-6f34a799ceba
10/26/2018 08:40:18.92 w3wp.exe (0xAA94) 0x5ED0 SharePoint Foundation General 8kh7 High The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again. 6f149c9e-bcfc-3093-e956-6f34a799ceba
10/26/2018 08:40:18.92 w3wp.exe (0xAA94) 0x5ED0 SharePoint Foundation General aix9j High SPRequest.ValidateFormDigest: UserPrincipalName=i:0).w|, AppPrincipalName= ,bstrUrl=https://site.domain.com/sites/demo ,bstrListName=<null> 6f149c9e-bcfc-3093-e956-6f34a799ceba
10/26/2018 08:40:18.92 w3wp.exe (0xAA94) 0x5ED0 SharePoint Foundation General ai1wu Medium System.Runtime.InteropServices.COMException: The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again., StackTrace: at Microsoft.SharePoint.SPWeb.ValidateFormDigest()
10/26/2018 08:40:18.92 w3wp.exe (0xAA94) 0x5ED0 SharePoint Foundation CSOM afxwb High System.Runtime.InteropServices.COMException (0x8102006D): The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again. at Microsoft.SharePoint.Library.SPRequestInternalClass.ValidateFormDigest(String bstrUrl, String bstrListName)
10/26/2018 08:40:18.92 w3wp.exe (0xAA94) 0x5ED0 SharePoint Foundation CSOM agmjp High Original error: System.Runtime.InteropServices.COMException (0x8102006D): The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again. at Microsoft.SharePoint.Library.SPRequestInternalClass.ValidateFormDigest(String bstrUrl, String bstrListName)
10/26/2018 08:40:18.92 w3wp.exe (0xAA94) 0x5ED0 SharePoint Portal Server Microfeeds aizmo Medium SocialRESTExceptionProcessingHandler.DoServerExceptionProcessing - SharePoint Server Exception [System.Runtime.InteropServices.COMException (0x8102006D): The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again. at Microsoft.SharePoint.Library.SPRequestInternalClass.ValidateFormDigest(String bstrUrl, String bstrListName)
10/26/2018 08:40:18.92 w3wp.exe (0xAA94) 0x1370 SharePoint Foundation Monitoring b4ly Medium Leaving Monitored Scope (Request (POST:https://site.domain.com:443/sites/demo/_api/web/GetFileByServerRelativeUrl('/sites/demo/SiteAssets/printOnClick_mr.js')/CheckOut())). Execution Time=38,1100810298516 6f149c9e-bcfc-3093-e956-6f34a799ceba
Any idea? Weirdest part is that I could update the file once before but can't replicate it anymore.
Many thanks
Is there any plans to support SharePoint 2010? I'm hoping the company I work for eventually upgrades but for now I'm stuck using SharePoint Designer unless there are plans to add this functionality in the future.
I can edit the file in SharePoint designer but when I open it I get a message telling me there are some regions which are unavailable in safe mode, so I choose advanced mode.
In SPGo How ca I achive the same goal?
Hi!
I need some info on how to configure SPGo correctly for my scenario.
I have some files and folders in a dist folder (I would map as the src folder, I imagine). This folder is filled with preprocessed files that can be loaded into sharepoint directly at that point.
I need to load all the contents of the "source" folder into /_catalogs/masterpage/{my root folder with another name}/
So my local folder structure would be something like:
/dist
While my remote folder would be something like:
/_catalogs/masterpage/My.SP.Project/
How can I accomplish this setup with SPGo?
Thanks in advance.
Today I updated my Visual Studio Code to version 1.31.0 and after that SPGo Extension stopped publishing files. When I try to publish a file in my SP 2013 On Premise environment, VSCode outputs "input.resume is not a function" error.
I tried repopulating the folder, resetting credentials, but didn't work out. I'll downgrade my VSCode release to temporarily solve this.
Update: The downgrade of VSCode version solved the problem.
Hello,
"Digest" authentication does not work when using Multi-Factor Authentication (at least I think this is the cause). The extension says "Invalid user credentials" when logging in. This also doesn't work with the "app password" so I'm not 100% certain MFA is the true case, but it seems likely.
When I write scripts using SharePoint PnP PowerShell, specifying the -UseWebLogin switch will pop an Office 365 authentication form which can be used to retrieve an OAuth token that is used to process the request. Do you think something like this might be possible with SPGo?
Thanks,
Chris
Hello!
I'm looking forward trying SPGO, but struggling with configuring it.
I work with SP2013 on-premises using NTLM (Kerberos) authentication.
Here is my spgo.json
{
"sourceDirectory": "src",
"sharePointSiteUrl": "https://shpdev",
"publishingScope": "None",
"authenticationType": "NTLM",
"remoteFolders": [
"/Style Library/portal/**/*.*"
]
}
When I issue SPGo: Populate local workspace command the following happens:
SPGo console prints: Starting File Synchronization...
Progress bar shows 'Populating workspace' but it doesn't end.
And local src folder is not populated.
Also in ULS I found that FileNotFound exception occured, here is some logs:
Name=Request (POST:https://shpdev:443/_api/Web/GetList(@DocLibUrl)/GetItems?$select=Name,UniqueID,ID,FileDirRef,FileRef,FSObjType,TimeCreated,TimeLastModified,Length,ModifiedBy&@DocLibUrl=%27%252FStyle%2520Library%252Fportal%252F**%252F%27) d23f699e-458e-60ef-2126-afb74ab7bb92
Unknown SPRequest error occurred. More information: 0x80070002 d23f699e-458e-60ef-2126-afb74ab7bb92
SPRequest.GetMetadataForUrl: UserPrincipalName=..., AppPrincipalName= ,bstrUrl=/Style Library/portal/** ,METADATAFLAGS=59 d23f699e-458e-60ef-2126-afb74ab7bb92
System.IO.FileNotFoundException: 0x80070002, StackTrace: at Microsoft.SharePoint.SPWeb.GetList(String strUrl) at... d23f699e-458e-60ef-2126-afb74ab7bb92
If I set "remoteFolders": [ "/Style Library/portal/" ]
I get in SPGo console:
Starting File Synchronization...
Successfully downloaded 0 files to: src/Style Library/portal/
file synchronization complete.
But src folder is empty.
In ULS I found error:
SPSecurityContext: Could not retrieve a valid windows identity for username 'DOMAIN\USER' with UPN 'user@domain'. UPN is required when Kerberos constrained delegation is used. Exception: System.ComponentModel.Win32Exception (0x80004005): Access is denied
But if I set "remoteFolders": [ "/Style Library/portal/*.*" ]
I get:
Starting File Synchronization...
Successfully downloaded 175 files to: src/Style Library/portal/.
file synchronization complete.
And src folder is populated with Style Library folder and everything what is inside, not only "/Style Library/portal/" folder!
So, my question is: am I doing something wrong or is this a bug?
Thank you!
It would be nice if we could change the default "Updated by SPGo" check-in message, maybe as a parameter in SPGo.json or (better) as a user setting.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.