james-proxy / james Goto Github PK
View Code? Open in Web Editor NEWWeb Debugging Proxy Application
Web Debugging Proxy Application
issue needs evaluation
So, #74 fixed the situation for when the window width is wider, but for some reason, something is changing around the 990px
mark. Now, instead of a problem existing on big windows, it exists on small windows.
The close tab should always appear properly.
For some reasons the browsers not always open the defined default page.
It nevers works for me on chrome but always works on firefox it seems.
Needs further investigation.
I suspect that this is due to moving to the james-proxy
organization
Currently when I want to disable an existing mapping I need to delete it. As a user I want a button that lets me disable and reenable specific mappings.
The standard CMD + Q command doesn't quit the application.
In fact, I can't seem to find any way to actually quit the application without right-clicking the dock or killing the process.
To make contributing for others easier there should be eslint in the project.
The eslintrc can be taken from https://github.com/airbnb/javascript/blob/master/linters/.eslintrc
I want to add mapping rules with regex.
e.g.: cdn.com/*/index.js maps to local.js
cdn.com/version-1.0/index.js maps to local.js
cdn.com/version-2.0/index.js maps to local.js
I get the following deprecation warning on npm install
:
[email protected]: use [cross-spawn](https://github.com/IndigoUnited/node-cross-spawn) or [cross-spawn-async](https://github.com/IndigoUnited/node-cross-spawn-async) instead.
I have the canary versions of Chrome and Firefox installed. I noticed that browser-launcher2
does detect them, but gives both browsers the same name.
That also results in React complaining that keys aren't unique:
Warning: flattenChildren(...): Encountered two children with the same key,
.2:$
. Child keys must be unique; when two children share a key, only the first child will be used.
Not exactly sure which browser version I end up launching at the moment, as the list order seems to change a lot of the time as well.
Right now, the "Developer" button needs to actually be pressed. That's no fun ๐
Currently James only supports inspection of a single request. I would like to propose the support of inspecting multiple requests. It may look like the following draft:
Perhaps the inspection should be a particular section rather than an overlay. I'm looking forward to your feedback.
There should be a warning if port 1338 is already in use
While working on #59 i noticed that the fade out doesn't make the horizontal scrollbar disappear as I believe they should?
Also, I feel the fade starts a bit early. Maybe start it a bit later and fade more aggressively?
Upon running the lint
script, eslint
failes with Maximum call stack size exceeded
. This only occurs on Windows.
Node: v4.2.4
C:\dev\james>npm run lint
> [email protected] lint C:\dev\james
> eslint ./src ./test
C:\dev\james\node_modules\eslint\node_modules\escope\node_modules\esrecurse\esrecurse.js:78
children = objectKeys(node);
^
RangeError: Maximum call stack size exceeded
at keys (native)
at Referencer.Visitor.visitChildren (C:\dev\james\node_modules\eslint\node_modules\escope\node_modules\esrecurse\
esrecurse.js:78:24)
at Referencer.Visitor.visit (C:\dev\james\node_modules\eslint\node_modules\escope\node_modules\esrecurse\esrecurs
e.js:112:14)
at Referencer.Visitor.visitChildren (C:\dev\james\node_modules\eslint\node_modules\escope\node_modules\esrecurse\
esrecurse.js:93:26)
at Referencer.Visitor.visit (C:\dev\james\node_modules\eslint\node_modules\escope\node_modules\esrecurse\esrecurs
e.js:112:14)
at Referencer.Visitor.visitChildren (C:\dev\james\node_modules\eslint\node_modules\escope\node_modules\esrecurse\
esrecurse.js:88:38)
at Referencer.Visitor.visit (C:\dev\james\node_modules\eslint\node_modules\escope\node_modules\esrecurse\esrecurs
e.js:112:14)
at Referencer.Visitor.visitChildren (C:\dev\james\node_modules\eslint\node_modules\escope\node_modules\esrecurse\
esrecurse.js:93:26)
at Referencer.Visitor.visit (C:\dev\james\node_modules\eslint\node_modules\escope\node_modules\esrecurse\esrecurs
e.js:112:14)
at Referencer.Visitor.visitChildren (C:\dev\james\node_modules\eslint\node_modules\escope\node_modules\esrecurse\
esrecurse.js:88:38)
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "
run" "lint"
npm ERR! node v4.2.4
npm ERR! npm v2.14.12
npm ERR! code ELIFECYCLE
npm ERR! [email protected] lint: `eslint ./src ./test`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] lint script 'eslint ./src ./test'.
npm ERR! This is most likely a problem with the james package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! eslint ./src ./test
npm ERR! You can get their info via:
npm ERR! npm owner ls james
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\dev\james\npm-debug.log
It takes ~10 seconds to launch on Windows, and this is with and SSD (though I doubt that disk-reading is the bottleneck).
On Linux, it takes around ~1 second to launch (which is still a little silly). Windows launch times should be comparable to Linux
The SearchBar is sluggish while the user types when there are a lot of requests displayed. A solution for this would be to wait after each change event until the user has finished typing before calling render.
In the top bar, beside "URL Mappings", allow users to launch a modal that will allow them to setup the HTTPs requirements in-app. The wizard should:
Alright, maybe the term "wizard" is a little too 90's to describe this feature, but ยฏ\_(ใ)_/ยฏ
It would be convenient if the npm
scripts didn't depend on *nix specific commands, like rm
, etc
Curious about what the deal with Materialize is... it's an external resource, but it's also not very used very much at the moment.
It does look like it's possible to include it via npm and add it to the build. So if you're interested in making more use of it, I'd be happy to submit a PR to make James a bit more material.
Otherwise, if you want to keep the current look, it's possible to pull out that dependency and don't need to depend on being online. Lemme know which direction you'd like to go in.
It would be better to show/render only requests that are actually visible for the user. This would be a massive performance improvement.
They query parameters should be displayed as a list in the request detail view.
Currently, the user is provided no feedback when a browser doesn't launch. Instead, they get to wait to see if it eventually pops up.
Perhaps a modal should be shown? A toast, like in Android? A text log at the bottom? I'm not sure, but some feedback should exist
http://jsframework.io
won't match a mapping for http://jsframework.io/
Trailing slashes should be ignored
Manually restarting the app gets a little annoying, it would be awesome if, on-build, it reused the electron shell and restarted the page/injected css changes.
Additionally, it would be great if there was one command to get this going, like:
npm run dev
Rather than how it is right now:
npm run watch
npm start
A default page should be shown in a browser that was opened by james.
Right now, "About James" does nothing. It appears like it's supposed to do something, but is broken, because nothing happens on-click. That's :(
It's a habit to tap "ESC" to get out of sticky situations. Chrome allows the same thing: when in the "Elements" view with the lower-console-panel open, hitting "ESC" makes it go away
If there is a window up (e.g. URL Mappings), close it instead - never close two things on one ESC-press.
If there is just a drawer open, close the drawer.
To ensure that James doesn't become monolithic, there should be an api in place such that plugins can intercept request, reading/replacing data and the like.
This would probably be a step towards solving #1 (comment)
Right now, Chrome and Firefox are always shown, regardless of whether they are installed, or if other browsers are available.
Instead, browser-launcher2
's detection feature should be used to find potential browsers
The cache property should be removed from the response header to avoid caching.
This is how charles does it:
The No Caching tool prevents caching by manipulating the HTTP headers that control the caching of responses. The If-Modified-Since and If-None-Match headers are removed from requests, Pragma: no-cache and Cache-control: no-cache are added. The Expires, Last-Modified and ETag headers are removed from responses and Expires: 0 and Cache-Control: no-cache are added.
Still allow users to copy-paste the entire URL into the "Enter the URL to map" field, but remove the protocol when the mapping is "added".
When requests arrive, attempt to match them, regardless of http
or https
Currently James doesn't have HTTPs support.
The reason is, that hoxy, which is the underlying proxy used in James, currently doesn't support HTTPs. This feature is under heavy discussion and can be followed here: greim/hoxy#4
Perhaps CTRL-U
can be the shortcut. There needs to be some shortcut for toggling whether or not the URL Mappings window is open
After clicking on a request, there should be an option to set a URL Mapping for it in the details view. Alternately, with some magic, rearrange each row so that there's a button on each that allows each mapping-setting (would appear on-hover)
When looking at the log for the last successful master build, it looks like npm run lint
never occurs.
It's out-of-date, and doesn't show the "throttle" control. We need to run the 1.3.2 version of James, and get a good screenshot.
@kokarn, maybe you'd be interested?
As mentioned here it would be a cool feature to implement a throttle feature to test a page with slow connections.
This should be fairly easy to implement using hoxys slow feature: http://greim.github.io/hoxy/#request-slow
Implementation could be done here: https://github.com/uxebu/james/blob/master/src/service/proxy.js#L50
Currently the Request URL is shortened with a fixed value. It would be much better to shorten the URL based on the available space.
As of the url-wildcard
branch, wildcards can fill in between any two /
. This behaviour should be extended to allow partial wildcards (http://foo.com/bar*/*.css
) and double-wildcards (e.g. http://foo.com/**/*.css
)
Specification
*
between two /
, match any content, so long as it's between the same /
/
, so long as the other parts of the url-mapping "mask" are met*
with other characters between two /
, then match the characters, with anything being allowed in place of the wildcard(s)Things to make this feature not overly complex
(>Implying that it's not already too complex, lol sorry)
double-wildcard
, the url-mapping mask is invalid. It'd be too much of a slipperly slope to allow that./
, there can be a maximum of two separate *
. This is to stop situations like: http://foo.com/*cats*bagels*spaghetti_lol*
Examples:
-> mask: http://foo.com/*/style.css
http://foo.com/a.css //not mapped
http://foo.com/bar/style.css //is mapped, see #1
http://foo.com/bar/a/style.css //is not mapped, see #1 (The `/a/` component isn't in the mask)
-> mask: http://foo.com/**/style.css
http://foo.com/a.css //not mapped
http://foo.com/bar/style.css //is mapped, see #2 (any content between `http://foo.com/` and `/style.css` is allowed)
http://foo.com/bar/a/style.css //is mapped, see #2
-> mask: http://foo.com/bar*/*.css
http://foo.com/a.css //not mapped
http://foo.com/bar/style.css //is mapped
http://foo.com/bar/neat.css //is mapped
http://foo.com/bars-and-chipz/neat.css //is mapped
http://foo.com/blitz-bars-and-chipz/neat.css //is not mapped
http://foo.com/bar/a/style.css //is not mapped
-> mask: http://foo.com/**/bar/** //error, can't have multiple **
-> mask: http://foo.com/*bar*baz*/style.css //error, can't have over two * per between two /
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.