Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create plugins API and add preprocessor plugin support #888

Merged
merged 82 commits into from
Nov 20, 2017
Merged
Show file tree
Hide file tree
Changes from 73 commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
36eacaa
fix broken menu specs
chrisbreiding Aug 10, 2017
b8a820c
extract browserify code and create preprocessor abstraction
chrisbreiding Aug 10, 2017
73d794f
Merge branch 'master' into preprocessor-refactor
chrisbreiding Aug 14, 2017
058ac46
Merge branch 'develop' into preprocessor-refactor
chrisbreiding Aug 22, 2017
e25c924
Merge branch 'develop' into preprocessor-refactor
chrisbreiding Aug 23, 2017
694caa0
server: remove unused code
chrisbreiding Aug 23, 2017
f42ee15
server: implement logic for importing preprocessor
chrisbreiding Aug 24, 2017
62e07db
Merge branch 'develop' into preprocessor-refactor
chrisbreiding Aug 30, 2017
8d38995
Merge branch 'develop' into preprocessor-refactor
chrisbreiding Sep 1, 2017
3f91b51
server: add eslintrc and ignore test fixtures
chrisbreiding Sep 6, 2017
00c0444
server: implement plugins API
chrisbreiding Sep 6, 2017
8cc7633
Merge branch 'develop' into preprocessor-refactor
chrisbreiding Sep 6, 2017
c766657
server: add node_cache module to manage clearing a package and its de…
chrisbreiding Sep 6, 2017
0a01d24
server: clear plugins file from cache to re-require it
chrisbreiding Sep 6, 2017
1184a07
server: set pluginsFile to absolute path
chrisbreiding Sep 7, 2017
48d0916
server: add debug logging to plugins
chrisbreiding Sep 7, 2017
723cdcc
server: watch pluginsFile
chrisbreiding Sep 7, 2017
92945c4
server: throw the right error when requiring plugins file
chrisbreiding Sep 7, 2017
8ea4f34
server: organize config folders and keys visually
chrisbreiding Sep 8, 2017
64eeccb
server: scaffold plugins file
chrisbreiding Sep 8, 2017
2a533a0
server: require plugins file via nodeCache.require
chrisbreiding Sep 11, 2017
184baa7
Merge branch 'develop' into preprocessor-refactor
chrisbreiding Sep 11, 2017
854d968
Merge branch 'develop' into preprocessor-refactor
chrisbreiding Sep 14, 2017
b7ff32e
server: update browserify preprocessor name and point to github for now
chrisbreiding Sep 14, 2017
b8b556c
server: remove redundant integration tests
chrisbreiding Sep 15, 2017
7bb6145
server: always scaffold plugins file, except when falsey
chrisbreiding Sep 15, 2017
7d35576
server: add plugins file test to scaffold spec
chrisbreiding Sep 15, 2017
b53fe5f
server: always provide util.fileUpdated to preprocessor
chrisbreiding Sep 15, 2017
9a536e4
server: update browserify-preprocessor dep
chrisbreiding Sep 15, 2017
e9059a3
server: fix integration tests
chrisbreiding Sep 15, 2017
37f0bde
server: remove redundant logic
chrisbreiding Sep 15, 2017
240e736
server: catch errors thrown synchronously by plugins function
chrisbreiding Sep 15, 2017
e11a23f
Merge branch 'develop' into preprocessor-refactor
chrisbreiding Sep 15, 2017
37522bc
server: reduce chances of flakyness in async test
chrisbreiding Sep 15, 2017
3137e0f
driver: fix broken spec
chrisbreiding Sep 15, 2017
2052fc7
server: don’t check for dirname of supportFile and pluginFile when we…
chrisbreiding Sep 15, 2017
7e56623
Merge branch 'develop' into preprocessor-refactor
chrisbreiding Sep 18, 2017
ca63cb0
driver: there is no dist
chrisbreiding Sep 18, 2017
a5efb92
server: update default options sent to browserify preprocessor
chrisbreiding Sep 20, 2017
eaa1b6d
server: send config into browserify instead of options
chrisbreiding Sep 20, 2017
5b71c84
server: add test around default preprocessor
chrisbreiding Sep 20, 2017
048bd29
Merge branch 'develop' into preprocessor-refactor
chrisbreiding Sep 20, 2017
31f43ea
Merge branch 'develop' into preprocessor-refactor
chrisbreiding Sep 26, 2017
8fb7348
server: update browserify preprocessor
chrisbreiding Sep 26, 2017
2d8ee05
server: refactor events spec to better handle multiple calls to handl…
chrisbreiding Sep 27, 2017
6ff3dc2
server: add tests around project:open events
chrisbreiding Sep 27, 2017
5c7fe76
server/desktop-gui: handle errors when plugins file changes
chrisbreiding Sep 27, 2017
46a9b34
Merge branch 'develop' into preprocessor-refactor
chrisbreiding Sep 27, 2017
d371549
Merge branch 'develop' into preprocessor-refactor
chrisbreiding Oct 4, 2017
60666be
Merge branch 'develop' into preprocessor-refactor
chrisbreiding Oct 11, 2017
d781ce8
server: fix events spec
chrisbreiding Oct 16, 2017
146996c
server: allow any file types to be spec files
chrisbreiding Oct 16, 2017
5ef8f52
Merge branch 'develop' into preprocessor-refactor
chrisbreiding Oct 16, 2017
3a745d9
server: validate config.pluginsFile
chrisbreiding Oct 16, 2017
941e881
server: remove link to error doc
chrisbreiding Oct 17, 2017
e0f13cb
server: improve plugins error message
chrisbreiding Oct 17, 2017
280a880
server: simplify example plugins file
chrisbreiding Oct 17, 2017
f352801
server: on:spec:file:preprocessor -> file:preprocessor
chrisbreiding Oct 19, 2017
6aef011
server: wrap plugins in a child process
chrisbreiding Nov 1, 2017
82f4d53
server: rename specsGlob to testFiles
chrisbreiding Nov 2, 2017
e2f56c7
Merge branch 'develop' into preprocessor-refactor
chrisbreiding Nov 2, 2017
e7b39b1
server: bump browserify-preprocessor ‘version’
chrisbreiding Nov 3, 2017
8458401
Merge branch 'develop' into preprocessor-refactor
chrisbreiding Nov 3, 2017
4d4f32d
server: fix references left by merge
chrisbreiding Nov 3, 2017
a9dcf78
server: fix incorrect function names
chrisbreiding Nov 6, 2017
7299e4e
server: fix plugin error serialization
chrisbreiding Nov 6, 2017
701401f
server: display error if plugins process has an uncaught exception or…
chrisbreiding Nov 7, 2017
ad41441
server: reset domain on reset
chrisbreiding Nov 8, 2017
2a16813
server: exit early on plugin error headlessly
chrisbreiding Nov 8, 2017
db46c14
server: add e2e tests for plugins/preprocessors
chrisbreiding Nov 8, 2017
479b34f
server: remove obselete node cache file
chrisbreiding Nov 8, 2017
e291d67
server: fix integration tests
chrisbreiding Nov 8, 2017
8e51a7f
server: log plugins error before exiting
chrisbreiding Nov 8, 2017
eafee68
server: use npm version of browserify preprocessor
chrisbreiding Nov 8, 2017
2c7b670
server: extract string-splitting function
chrisbreiding Nov 13, 2017
1fd8873
socket: use path.join in spec
chrisbreiding Nov 13, 2017
f8e7ae7
Merge branch 'develop' into preprocessor-refactor
chrisbreiding Nov 14, 2017
5f95a21
Merge branch 'develop' into preprocessor-refactor
bahmutov Nov 16, 2017
b9d86ab
server: eslint ignore scaffold files
brian-mann Nov 20, 2017
ff644de
server: fix scaffolded plugins file links, add snapshot test
brian-mann Nov 20, 2017
39c0bcb
server: if app_spec runs, cause a failure [skip ci]
brian-mann Nov 20, 2017
7fa4033
Merge branch 'develop' into preprocessor-refactor
brian-mann Nov 20, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/desktop-gui/cypress.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"projectId": "fas5qd",
"pluginsFile": false,
"viewportWidth": 800,
"viewportHeight": 550
}
8 changes: 8 additions & 0 deletions packages/desktop-gui/cypress/integration/project_spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ describe "Project", ->
.should("contain", @err.message)
.and("contain", "To fix")

it "displays miscellaneous project error", ->
cy.stub(@ipc, "onProjectError").yields(null, @err)
@start()
cy
.get(".error")
.should("contain", @err.message)
.and("contain", "To fix")

it "word wraps long error message plus update bar", ->
@updaterCheck.resolve("1.3.4")
@longErrMessage = "Morbileorisus,portaacconsecteturac,vestibulumateros.Nullamquisrisusegeturnamollis ornare vel eu leo. Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Etiam porta sem malesuada magna mollis euismod. Maecenas faucibus mollis interdum. Nullam id dolor id nibh ultricies vehicula ut id elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id dolor id nibh ultricies vehicula ut id elit. Vestibulum id ligula porta felis euismod semper. Vestibulum id ligula porta felis euismod semper.Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec id elit non mi porta gravida at eget metus. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras justo odio, dapibus ac facilisis in, egestas eget quam.Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Maecenas faucibus mollis interdum. Etiam porta sem malesuada magna mollis euismod."
Expand Down
1 change: 1 addition & 0 deletions packages/desktop-gui/src/lib/ipc.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ register('open:finder')
register('open:project', false)
register('on:config:changed', false)
register('on:spec:changed', false)
register('on:project:error', false)
register('on:project:warning', false)
register('ping:api:server')
register('remove:project')
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-gui/src/project/project.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class Project extends Component {
<div className='full-alert alert alert-danger error'>
<p>
<i className='fa fa-warning'></i>{' '}
<strong>Can't start server</strong>
<strong>{err.title || 'Can\'t start server'}</strong>
</p>
<p dangerouslySetInnerHTML={{
__html: err.message.split('\n').join('<br />'),
Expand Down
4 changes: 4 additions & 0 deletions packages/desktop-gui/src/projects/projects-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ const openProject = (project) => {
reopenProject(project)
})

ipc.onProjectError((__, error) => {
project.setError(error)
})

ipc.onProjectWarning((__, warning) => {
project.setWarning(warning)
})
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop-gui/src/specs/spec-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export default class Spec {
this.displayName = displayName
this.isExpanded = true
}
hasChildren() {

hasChildren () {
return this.children.specs && this.children.specs.length;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-gui/src/specs/specs-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class SpecsStore {

this.isLoading = false
}

@action setChosenSpec (specPath) {
this.chosenSpecPath = specPath
}
Expand Down
2 changes: 1 addition & 1 deletion packages/driver/test/cypress/fixtures/app.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{foo: "bar"}
{ 'bar' }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why such weird javacript string here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what that's about. I think eslint keeps auto-formatting it for some reason.

Loading