GithubHelp home page GithubHelp logo

daishi4u / forcecode Goto Github PK

View Code? Open in Web Editor NEW

This project forked from celador/forcecode

62.0 62.0 11.0 372.06 MB

ForceCode is a Visual Studio Code extension for Salesforce development

License: MIT License

TypeScript 93.37% JavaScript 0.49% HTML 6.14%

forcecode's People

Contributors

celador avatar daishi4u avatar dapearce avatar dependabot[bot] avatar dougjod avatar jodything avatar kenhuman avatar mgarf avatar mnunezdm avatar reaperbeats avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

forcecode's Issues

Problem deploying static resources with spaDist

When I attempt to deploy a static resource I get the following error: Cannot read property 'replace' of undefined.

Are there any additional requirements in the force.json file that could make my project not work in this version of ForceCode?
{
"checkForFileChanges": true,
"autoRefresh": true,
"showTestCoverage": true,
"showTestLog": true,
"showFilesOnOpen": true,
"showFilesOnOpenMax": 3,
"browser": "Google Chrome Canary",
"pollTimeout": 1200,
"debugOnly": true,
"debugFilter": "USER_DEBUG|FATAL_ERROR",
"apiVersion": "38.0",
"deployOptions": {
"checkOnly": false,
"ignoreWarnings": true,
"rollbackOnError": true,
"testLevel": "runLocalTests",
"verbose": true
},
"autoCompile": true,
"url": "https://test.salesforce.com",
"poll": 1500,
"prefix": "",
"spaDist": "build",
"src": "src",
"username": "sandbox username"
}

class is invalid and requires compilation

this error is back with the latest update. i am unable to save any of my files without getting this error.

no issues with 3.5.7 which is my go-to fallback version

Plugin not loading

Hi,
I've downloaded forcecode-3.5.13.vsix to update my installation, when loading the window, ForceCode.showMenu cannot be found.

Opening the Developer Tools window, reveals that the plugin failed to load:
[Extension Host] Activating extension 'BrettWagner.forcecode' failed: Cannot find module 'C:\Users\[UserName]\.vscode\extensions\brettwagner.forcecode-3.5.13\out\src\extension'
[Extension Host] Activating extension BrettWagner.forcecode failed: Cannot find module 'C:\Users\[UserName]\.vscode\extensions\brettwagner.forcecode-3.5.13\out\src\extension

screenshot_2

Peeking around, I cloned and build the source, that ran perfectly. Using 7-zip to snoop inside the .vsix files, v3.5.11 has the missing out/src/extension (and therefore worked perfectly), where as v3.5.12 and v3.5.13 do not.

image

Huh, This seems related to issue #40

VS Code crashing on startup

I start VS Code, and I see some toasts

image

i see the max of 3 toasts, and then my VS Code locks up. I have not changed these files. My only option is to force close VS.

Sometimes I am able to dismiss a few toasts before it locks up. More just appear.

Cannot read property 'compareDates' of undefined error when editing Lightning Event

VSCode: Version 1.26.1 (1.26.1)
ForceCode: 3.6.5

When attempting to edit a lightning event, I receive the error "Cannot read property 'compareDates' of undefined". I don't receive the error when editing other items (lightning components, apex classes).

I've also tried 3.6.4 and 3.6.6 and receive the error on both of those versions as well.

log out/log in busted

i am logged into my org

i open menu, log out

open menu, log in

choose "Yes" ("You will be asked for your login information for the other org")

error: Failed to execute command: auth:logout {0: , 1:noprompt, }

Can't log when SAML enabled

Hi, thanks for the good work.

In my case, we connect to the production org with SAML (not with the standard salesforce login page). The issue is that some of the developers (like me), doesn't have a SAML access to the org. Instead we use the username, password and token url login. In the previous version I was able to log to that org using username, password and token. Now it tries to redirect me to the login page even if I'm already connected to the org in my browser.

Any ideas ?

error when saving Lightning JS

When trying to saving a lightning component js file I get this error...

Cannot read property 'compareDates' of undefined

feature request: multiple orgs

oftentimes i have the need to upload files to two or three different orgs.

it would be nice if i could store the configurations for all my orgs, select a default org, as well as have the ability to change orgs on the fly.

currently one has to log out from current org and then log into new org (which is an improvement from original, as there one had to modify force.json file and then restart vscode)

Where should i define files for retreiving by name?

Hi,
I am trying to retreive package by Name and i don't know where i should define the XML file. In scr folder and project folder doesn't work for me. Should i type only file Name or full path to the file ?

Thank You for your help!

[BUG] Error messages not fetched anymore

Hi,

I don't remember in which version this was working (probably 3.5.8) but when I was saving a class and that this save was not working (because of bad code), I used to have the list of errors added to the "problems" list of my file.

This doesn't work anymore so it's really hard to know why the save failed.

once you log out, you cannot re-open the forcecode menu

i am successfully logged in to my org, saving files, etc

force code menu, log out

force code menu....nothing happens

edit: i restarted vs code, logged into my other org, and then ForceCode tried to execute 860 tasks !! i killed the process, deleted wsMembers.json and restarted again, no issues.

ForceCode buggy when creating a new vs code workspace

i have a script that creates a new vs code workspace for me. it creates a new directory, checks out a bunch of files, copies in force.json, and creates a vs code workspace file, then opens it.

on that very first vs code launch, it seems like ForceCode is not initialized (no status bar items are present)

i press ctrl-shift-p to invoke command palette
select "open forcecode menu"
i am prompted for my SFDC username (which is already in force.json)
then production or sandbox (which is already in force.json)
then whether or not to automatically deploy on save (which is already in force.json)

then i get following error (image):
image

still no status bar items

i then restart vs code and everything works as expected. upon start i get the prompt asking me if i'd like to login to my org.

update: i am also presented with this error upon vs code restart:
image
cant seem to replicate it consistently

Generic Oauth error on a brand installation

Hi,

Sorry to bother, but I am not sure how to debug this.

I am using a brand new computer, I installed node and npm, java 8, visual studio code v 1.25.1 and force code 3.5.11 and 3.5.10 (tried on both), browser Chrome.

I created a folder, clicked on Show force code menu and got the "You are not logged in, log in now" message. I click on it and get redirected to the login form, after that, the page gets stuck (does not show anything) and I see a ForceCode: Executing 1 task on the bar on visual studio code.

I never get past this message, so no menu or anything like that.

If I refresh the page on the browser I get an oAuth generic error message. Force code just stays eternally with the Executing 1 task message.

I tried changing the browser to safari, and it seems to trigger the login flow all the time. It opens the browser and then closes it, and a new "You are not logged in, log in now" message appears every time.

I have forceCode working perfect with the same credentials on the old computer.

I'll be happy to debug it if someone can point me in the right direction.

ForceCode running of tests broken with Salesforce 43.11.0 release

I was using the links that the Salesforce apex extension provides in the test classes to run tests by intercepting the 'sfdx.force.apex.test.class.run.delegate' and 'sfdx.force.apex.test.method.run.delegate' commands only if other salesforce extensions that rely on these commands weren't installed. With v43.11.0 salesforce forces the user to have the CLI extenstion installed which breaks this functionality.

I will either provide a right-click-to-run functionality or I'll add in my own links into the source files, maybe even both. Sorry for any inconvenience. For now if you'd like to use the ForceCode way of running tests then you will need to downgrade the Salesforce extensions and remove the CLI extension that was installed with 43.11.0.

Saving/deploying apex classes not happening

When I try to deploy an apex class, I see that force code runs the saving method but it don't deploy anything to Salesforce nor generate any error. I am logged in. Version 3.5.10.
Thanks

Invalid static resource folder or file name.

When I try and save/deploy javascript files in a resource bundle, i get the follwoing error message:

Invalid static resource folder or file name. Name must be in the form of ResourceName.resource.type.subtype EXAMPLE: MyResource.resource.aplication.javascript This folder would then contain one file, named MyResource.js

I'm not in a position where I can change the names of these files or directories. Is there a workaround for this?

code coverage confusion

it is hard to tell if code coverage is toggled on or off. the icon should change, or something.

to compound the issue, it doesn't seem like there's any indicator that there is 0% code coverage for a file.

when looking at a file that has no code coverage, and code coverage is toggled on, there is no indication that there is simply no coverage. it makes it sort of hard to tell if something is broken or not.

on top of that, i am looking in the ApexCoverage file that is generated, and I see a file that is 57% covered. yet in vs code there is no inline code coverage. however I can open up a different file that is 90% covered and it works fine. is there some sort of cutoff point?

update: i see now that there is two different options to retrieve code coverage, and only one of them enables the inline code coverage. i have a different vscode workspace folder with some additional classes that are outside of my "src": "sfdc" config. is there a way to provide more than one src folder?

can't compile/deploy files

i was using the celador/ForceCode previously, and did not have this issue

every file i try to compile/deploy complains that "dependent class is invalid and needs recompilation"

sometimes it is the very file i am trying to upload, sometimes it is some other file referenced within.

in this case right now, the very class i am uploading is invalid with the error: "No such column 'Id' on entity 'User'", which is clearly false.

vsix install fails

image

install log as follows: not sure why it doesn't detect my vs code...

21/06/2018 9:48:46 AM - Microsoft VSIX Installer
21/06/2018 9:48:46 AM - -------------------------------------------
21/06/2018 9:48:46 AM - vsixinstaller.exe version:
21/06/2018 9:48:46 AM - 15.7.105+ga2c5d563c6
21/06/2018 9:48:46 AM - -------------------------------------------
21/06/2018 9:48:46 AM - Command line parameters:
21/06/2018 9:48:46 AM - C:\program files (x86)\microsoft visual studio\installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\VSIXInstaller.exe,C:\Users\julesx\Downloads\forcecode-3.2.9.vsix
21/06/2018 9:48:46 AM - -------------------------------------------
21/06/2018 9:48:46 AM - Microsoft VSIX Installer
21/06/2018 9:48:46 AM - -------------------------------------------
21/06/2018 9:48:47 AM - Initializing Install...
21/06/2018 9:48:49 AM - Extension Details...
21/06/2018 9:48:49 AM - Identifier : forcecode
21/06/2018 9:48:49 AM - Name : ForceCode
21/06/2018 9:48:49 AM - Author : BrettWagner
21/06/2018 9:48:49 AM - Version : 3.2.9
21/06/2018 9:48:49 AM - Description : Visual Studio Code extension for Salesforce (SFDC) development
21/06/2018 9:48:49 AM - Locale : en-US
21/06/2018 9:48:49 AM - MoreInfoURL :
21/06/2018 9:48:49 AM - InstalledByMSI : False
21/06/2018 9:48:49 AM - SupportedFrameworkVersionRange : [0.0,2147483647.2147483647]
21/06/2018 9:48:49 AM -
21/06/2018 9:48:50 AM - SignatureState : Unsigned
21/06/2018 9:48:52 AM - Supported Products :
21/06/2018 9:48:52 AM - Microsoft.VisualStudio.Code
21/06/2018 9:48:52 AM - Version :
21/06/2018 9:48:52 AM -
21/06/2018 9:48:52 AM - References :
21/06/2018 9:48:52 AM - Signature Details...
21/06/2018 9:48:52 AM - Extension is not signed.
21/06/2018 9:48:52 AM -
21/06/2018 9:48:52 AM - Searching for applicable products...
21/06/2018 9:48:52 AM - Found installed product - Global Location
21/06/2018 9:48:52 AM - Found installed product - Visual Studio Community 2017
21/06/2018 9:48:52 AM - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
at VSIXInstaller.App.GetInstallableData(String vsixPath, Boolean isRepairSupported, IEnumerable1& skuData) at VSIXInstaller.App.Initialize(Boolean isRepairSupported) at VSIXInstaller.App.Initialize() at System.Threading.Tasks.Task1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()

image

debugFilter option

how do i specify no filtering?

if i put "" as the value, ForceCode doesn't even start up on vs code launch.
if i put "*" as the value, log files just do not open at all, i guess because nothing is matching?

3.5.2 login to org bug

made new vs code workspace
open force code menu
log in successfully

presented with following error:

image

suggestion:

collapse the "ForceCode 3.5.2 connected" status bar item into something smaller, and put the full information in the tooltip. i have long emails and it takes up a 3rd of my status bar

status bar suggestions

i think the status bar can be improved. currently it utilizes 3 different status bar elements. "executing tasks" is displayed in one element, but the result of that execution is displayed in another.

i believe everything should be condensed into one button.

the label on the button would be something like "ForceCode - connected (1408/15000)"

i don't think the version should be listed. it is not important enough information.

clicking the button opens the menu as it does now.

there is a spinning arrow loading indicator you can use to denote activity. the VS Live Share extension uses it.

triggering a ForceCode task displays the spinning arrow to the left of the text. text on button changes to "ForceCode - saving"

when the task completes, text changes again: "ForceCode - save complete" on a ~10 second timer before reverting to original.

command 'ForceCode.showMenu' not found

Hi,
no functionality works now.
I'm using your 3.2.9 build and Visual Studio Code 1.25.0, running on MacOS.
Same problems occurs with Visual Studio Code 1.24.1.
I haven't tried other versions.
I also tried to install Apex and Visualforce extensions by JohnAaronNelson first, same problems.
Thanks

3.5.0 startup bug

image

image attached

update: also happens when attempting to save a file. reverting to 3.4.0 for now.

comments: too much force code stuff on the status bar. there are now 3 elements: menu, status indicator, version/connection/limit indicator. i think they should probably be compacted/combined.

conflict with apex replay debugger extension

as soon as i start using apex replay debugger, forcecode stops working.

all the status bar items are gone, and trying to open the menu fails.

attached image:
image

i dont think this is true

execute anonymous apex

you are forced to select code, it does not seem to use the active text file like it says it does

also: when you run execute anonymous, you are taken to the output tab. however, if you have syntax errors, the problems tab is actually what you want to see. output has nothing in it.

Notifications vs Problems

Hello,

Sometimes when I save classes with Forcecode I receive errors in Notifications and not in Problems or both.
For me Notifications should be used for problems with Session token or similar with that.
Problems should be used when there is a Syntax error or a problem when saving a file.

The next example gives the error in Notification and Problem
When you solve this issue it stays in Notifications. This should disappear as well, or maybe easier, never show in the Notifications
Account accountInstance = new Account(); if(account.Date_Field__c = null)

Problem that is only in Notification
Time out when saving a class
Dependent class is invalid
When you save the same class two times, sometimes you receive a Notification like 'This container member belongs to a container that currently has an unfinished save request with deploymentId...'

These Notifications are not easy to link with a file. So I prefer to see these in the Problem Panel, if you need to add a Line Number, maybe you can take the first line.

What do you think about this?

And a last question, when you have a difference and you want to look into it, how can you overwrite this without a extra save? Is it possible to only save some sections, like a merge in GIT?

Thank you for your work in ForceCode.

No Credentials Found Error When Deploying Package

I have a ForceCode project with just two files, a package.xml and a destructiveChanges.xml, which I use to delete things from my org. In the older version from celador, I would just do Deploy Package and it would push the package to the org and delete the files.

I recently updated to the daishi4u 3.5.3 version since the celador version didn't work with the latest VS Code.

Unfortunately since the update, I have not been able to deploy the destructive changes. When I try, it would give me the error:

Credential to salesforce server is not found in options.
Specify "username" and "password" in options, or give any other credentials.

Credentials are in the force.json though, and I can confirm I'm logged in to the org since I can do all other operations (Open File, Execute Anonymous, etc..)

Contributing

Hello! I see you've made some awesome changes to the extension!!! This is awesome!

I have created a pull request at celador#158

Can you review it and make sure you agree with the changes?

I am in the process of reviewing the changes myself and would love it if we could collaborate on this to move this forward! I will publish an update to the extension that includes your changes soon. :)

Cheers!

Dependent class is invalid and needs recompilation

Dependent class is invalid and needs recompilation: Class MyClass : Invalid type: Document

this is back with 3.5.2

i can't seem to save anything

edit: this is something on my end, but i'm not sure what. i have multiple vs code workspaces, 3.5.2 saves succesfully in one but not the other. the force.json files are identical.

edit2: now it all works again. not sure what i did to trigger this behavior or fix it. :(

just go ahead and close this, not much use if i can't replicate it

feature request for running tasks

feature request

give running tasks its own side-tab section, like explorer, search, debug, extensions, etc.

use the badge functionality to display that something is going on at a glance.

currently, the way running tasks is embedded into the standard file explorer is not very useful, considering i am on often on other tabs, or have the tasks section collapsed, or even the entire sidebar collapsed. if badging on the sidebar was used, it would be very easy to see at a glance that something is going on.

Overriding commands from salesforce.salesforcedx-vscode-core

While I was testing your updated version of the ForceCode extension I noticed that it conflicts with the the salesforce provided salesforce.salesforcedx-vscode-core extension.

In the past I was using both force code and the official Salesforce extensions together but it looks like none of the default extensions comands will work when ForceCode is activated:

Extension 'salesforce.salesforcedx-vscode-apex-debugger' failed to activate. Reason: dependency 'salesforce.salesforcedx-vscode-core' failed to activate.
Activating extension 'salesforce.salesforcedx-vscode-core' failed: command 'sfdx.force.apex.test.class.run.delegate' already exists.
Extension 'salesforce.salesforcedx-vscode-apex-debugger' failed to activate. Reason: dependency 'salesforce.salesforcedx-vscode-core' failed to activate.

Could it be your extension now overrides these default commands in a way?

expired access/refresh token

Hi,
I'm wondering why I get this error "expired access/refresh token" after some inactivity when trying to deploy apex classes ? I need to restart visual studio code to be able to deploy again.

Is there something I'm doing wrongly ?

Metadata Describe Error

When I'm trying to deploy my javascript files from resources I keep getting the "Metadata Describe Error" message. Apex classes appear to be deploying fine.

I'm running ForceCode 3.5.2 in VS Code 1.25.1

Errors getting "stuck" in problems pane

When saving an apex class that has errors in it, sometimes the errors will get "stuck" in the problems pane on 3.6.2. and vscode 1.26.0

Proposed solution: reset diagnostic collection each time on save, look into what changed in the diagnostic collection in the vscode api with the 1.26.0 release and see if there's a reset function.

Creating Aura components in a folder doesn't save properly

When creating an Aura component (Lightning component) by creating a folder and the files inside of it and then saving each file, the files will not properly save onto the server. The data is on the server, but not fully accessible in the developer console. For now, Lightning components need to be created in the dev console and then can be opened in ForceCode.

Loop: You are not logged in. Login now?

Hi

I've recently decided to try using this version of ForceCode (you have no idea how excited I am), and updated to 1.25.1 VS Code along with it.

I'm running into a weird issue where I can't log into my sandbox properly. When I select Yes it opens my browser to log into my org. Once logged in on the browser, the popup appears again asking me to login again.

Any ideas? I've disabled the original ForceCode extension prior to using this version.

Edit: Just to add I looked into my Login History and can see they're all successful

Status | Application | Login URL |
Success | Global Connected App | test.salesforce.com |
Success | Browser | test.salesforce.com |

How to retrieve all metadata?

There seems to be an option to "Retrieve Package ... Retrieve all metadata". How do I do that? Can't seem to find it on the menu.

test result log just shows a blank editor window

when i run a test via vs code, a pane appears with the .log file but it is empty

3.5.2

update: i notice now that the success/fail message goes to the output pane, but only if you have ForceCode selected from the associated dropdown. it'd probably be nice if there was something more obvious telling you if it passed/failed. i was expecting the .log file to show that information, but i guess that file only shows actual debug writes?

ForceCode 3.7.0 Changed file notifications never go away

With 3.7.0 when you hit refresh on the changed file notification it will refresh the files, but the same notifications will popup again directly after refreshing them.

I know exactly why this is happening and will fix later today.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.