Bugfix: Babel compile

pull/4267/head
Maki Nishifuji 9 years ago
parent 1c52051aeb
commit c43537fc76
  1. 2
      packages/rocketchat-integrations/client/views/integrationsIncoming.html
  2. 2
      packages/rocketchat-integrations/client/views/integrationsOutgoing.html
  3. 6
      packages/rocketchat-integrations/server/methods/incoming/addIncomingIntegration.coffee
  4. 6
      packages/rocketchat-integrations/server/methods/incoming/updateIncomingIntegration.coffee
  5. 6
      packages/rocketchat-integrations/server/methods/outgoing/addOutgoingIntegration.coffee
  6. 6
      packages/rocketchat-integrations/server/methods/outgoing/updateOutgoingIntegration.coffee

@ -91,7 +91,7 @@
<div class="title">
{{data.scriptError.name}}
</div>
<pre>{{data.scriptError.codeFrame}}</pre>
<pre>{{data.scriptError.message}}</pre>
</div>
{{/if}}
</div>

@ -109,7 +109,7 @@
<div class="title">
{{data.scriptError.name}}
</div>
<pre>{{data.scriptError.codeFrame}}</pre>
<pre>{{data.scriptError.message}}</pre>
</div>
{{/if}}
</div>

@ -23,14 +23,14 @@ Meteor.methods
if integration.scriptEnabled is true and integration.script? and integration.script.trim() isnt ''
try
babelOptions = Babel.getDefaultOptions()
babelOptions.externalHelpers = false
babelOptions = Babel.getDefaultOptions({ runtime: false })
babelOptions = _.extend(babelOptions, { compact: true, minified: true, comments: false })
integration.scriptCompiled = Babel.compile(integration.script, babelOptions).code
integration.scriptError = undefined
catch e
integration.scriptCompiled = undefined
integration.scriptError = _.pick e, 'name', 'message', 'pos', 'loc', 'codeFrame'
integration.scriptError = _.pick e, 'name', 'message', 'stack'
for channel in channels
record = undefined

@ -26,14 +26,14 @@ Meteor.methods
if integration.scriptEnabled is true and integration.script? and integration.script.trim() isnt ''
try
babelOptions = Babel.getDefaultOptions()
babelOptions.externalHelpers = false
babelOptions = Babel.getDefaultOptions({ runtime: false })
babelOptions = _.extend(babelOptions, { compact: true, minified: true, comments: false })
integration.scriptCompiled = Babel.compile(integration.script, babelOptions).code
integration.scriptError = undefined
catch e
integration.scriptCompiled = undefined
integration.scriptError = _.pick e, 'name', 'message', 'pos', 'loc', 'codeFrame'
integration.scriptError = _.pick e, 'name', 'message', 'stack'
for channel in channels
record = undefined

@ -40,14 +40,14 @@ Meteor.methods
if integration.scriptEnabled is true and integration.script? and integration.script.trim() isnt ''
try
babelOptions = Babel.getDefaultOptions()
babelOptions.externalHelpers = false
babelOptions = Babel.getDefaultOptions({ runtime: false })
babelOptions = _.extend(babelOptions, { compact: true, minified: true, comments: false })
integration.scriptCompiled = Babel.compile(integration.script, babelOptions).code
integration.scriptError = undefined
catch e
integration.scriptCompiled = undefined
integration.scriptError = _.pick e, 'name', 'message', 'pos', 'loc', 'codeFrame'
integration.scriptError = _.pick e, 'name', 'message', 'stack'
for channel in channels

@ -52,14 +52,14 @@ Meteor.methods
if integration.scriptEnabled is true and integration.script? and integration.script.trim() isnt ''
try
babelOptions = Babel.getDefaultOptions()
babelOptions.externalHelpers = false
babelOptions = Babel.getDefaultOptions({ runtime: false })
babelOptions = _.extend(babelOptions, { compact: true, minified: true, comments: false })
integration.scriptCompiled = Babel.compile(integration.script, babelOptions).code
integration.scriptError = undefined
catch e
integration.scriptCompiled = undefined
integration.scriptError = _.pick e, 'name', 'message', 'pos', 'loc', 'codeFrame'
integration.scriptError = _.pick e, 'name', 'message', 'stack',
for channel in channels

Loading…
Cancel
Save