Giter Club home page Giter Club logo

serverless-plugin-browserifier's People

Contributors

nolde avatar robbrazier avatar semantic-release-bot avatar vonbarbarosa 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

Watchers

 avatar  avatar  avatar  avatar

serverless-plugin-browserifier's Issues

serverless-plugin-browserifier & serverless-plugin-typescript

I'm experiencing an error on sls package trying to have both of these plugins active in my project. It appears to be looking for my .serverless dir inside my .build dir, even though they are both at the root of my project. If I run either plugin without the other, everything works fine. Any ideas how to fix?

Here's the end:

Serverless: Packaging service...

  Error --------------------------------------------------

  ENOENT: no such file or directory, lstat '/Users/home/roam/backend/.build/.serverless'

     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

  Stack Trace --------------------------------------------

Error: ENOENT: no such file or directory, lstat '/Users/home/roam/backend/.build/.serverless'
    at PluginManager.invoke (/Users/home/.config/yarn/global/node_modules/serverless/lib/classes/PluginManager.js:390:22)
    at PluginManager.run (/Users/home/.config/yarn/global/node_modules/serverless/lib/classes/PluginManager.js:421:17)
    at variables.populateService.then.then (/Users/home/.config/yarn/global/node_modules/serverless/lib/Serverless.js:157:33)
    at runCallback (timers.js:693:18)
    at tryOnImmediate (timers.js:664:5)
    at processImmediate (timers.js:646:5)
    at process.topLevelDomainCallback (domain.js:121:23)
From previous event:
    at Serverless.run (/Users/home/.config/yarn/global/node_modules/serverless/lib/Serverless.js:144:8)
    at serverless.init.then (/Users/home/.config/yarn/global/node_modules/serverless/bin/serverless:43:50)

data.functionObject.artifact sometimes not found

I just started using this plugin, switched over from webpack and I really like it, however after getting the plugin working and packaging properly the first time, the build now fails with the following error:
https://gist.github.com/RobBrazier/010880575cac41b57c0311eb55ed7aae

I'm able to resolve this by changing bundle.js#87 and bundle.js#90 from data.functionObject.artifact to data.functionObject.package.artifact, however I'm not sure if I'm doing something wrong here?

I'm happy to raise a PR to check both objects if you want.

Plugin fails when used with serverless that contains ECR (Elastic Container Repository) with lambdas in Python and NodeJS

I have one serverless.yaml to deploy Lambda Functions in Python with ECR (Elastic Container Repository) and Lambda Functions in NodeJs, Everything works fine without the plugin, but when I add it, I get the error below

NodeJS 14.15.5
npm 6.14.11
Serverless Framework 2.23

sls package --stage dev -v --service name-of-service
.
.
.
.

Serverless: Invoke package
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:common:cleanupTempDir
Serverless: Invoke warmup:addWarmers
Serverless: WarmUp: Skipping warmer "default" creation. No functions to warm up.
Serverless: Browserifier: Service runtime is not nodejs...
Serverless: Browserifier: Service not set to package individually...
Serverless: Browserifier: Computing global config...
Serverless: Browserifier: Using [email protected]
Serverless: Browserifier: Using browserify "node" option...
Serverless: Browserifier: Computed globalBrowserifyConfig: {"disable":false,"exclude":[],"include":[],"external":[],"ignore":[],"basedir":"/home/xxxxxxx/repos/name-of-the-service","entries":[],"bare":true,"standalone":"lambda","ignoreMissing":true,"detectGlobals":true,"debug":true,"node":true}
Serverless: Browserifier: Preparing 1 function(s)...
Serverless: Browserifier: Preparing "name_of_function"...
Serverless: Browserifier: functionObject for name_of_function: {"description":"commit:  branch: ","image":{"name":"name_of_image"},"memorySize":10240,"environment":{"STAGE":"dev","SNS_TOPIC_NAME":"xxx-yyy-zzz","SNS_ARN":"arn:aws:sns:us-east-1:xxx:xxx-yyy-zzz","SNS_JSON_BUCKET":"xxx-yyyy-zzz","SNS_AB_TEST_TOGGLE":"False"},"events":[],"name":"name-of-service-stage-function"}
Serverless: Browserifier: Unexpected failure detected!
 
 Type Error ----------------------------------------------
 
  TypeError: Cannot read property 'split' of undefined

disable: true not working

I get the following failure when I try to set disable: true:

$ yarn clean && serverless deploy -v --stage prod
$ (rm -r ./.build || echo "") && (rm -r ./.serverless || echo "") && (find ./src -name '*.js' -delete || echo "")
rm: ./.build: No such file or directory

Serverless: Browserifier: unexpected failure detected

  Serverless Error ---------------------------------------

  custom.browserify.disable is true in serverless.yml

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com

  Your Environment Information -----------------------------
     OS:                     darwin
     Node Version:           11.1.0
     Serverless Version:     1.30.1

Here's my browserify setup for reference:

custom:
    browserify:
        disable: true
        basedir: ./
        entries: ['src/handlers/graphql.ts']
        exclude:
            - envkey
            - dotenv
            - glob
            - fs.realpath
            - minimatch
            - brace-expansion
            - concat-map
            - balanced-match
            - inherits
            - path-is-absolute
            - inflight
            - wrappy
            - once
        require:
            - node_modules/envkey
            - node_modules/dotenv
            - node_modules/glob
            - node_modules/fs.realpath
            - node_modules/minimatch
            - node_modules/brace-expansion
            - node_modules/concat-map
            - node_modules/balanced-match
            - node_modules/inherits
            - node_modules/path-is-absolute
            - node_modules/inflight
            - node_modules/wrappy
            - node_modules/once
        node: true
        debug: true
        extensions: ['.ts']
        plugin:
            - tsify

Optional chaining is not working with serverless-plugin-browserifier

Hello there,

Now node 14 version is available to use on AWS lambda, I'm trying to use a feature from this version optional chaining, however I'm facing a error when I try to use serverless-plugin-browserifier, without this plugin it's possible to compile code.

This is the error: "OperationalError: Parsing file {path}: Unexpected token (32:27)"

Is the plugin compatible with node 14 version ?

The automated release is failing 🚨

🚨 The automated release from the next branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the next branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Invalid npm token.

The npm token configured in the NPM_TOKEN environment variable must be a valid token allowing to publish to the registry https://registry.npmjs.org/.

If you are using Two Factor Authentication for your account, set its level to "Authorization only" in your account settings. semantic-release cannot publish with the default "
Authorization and writes" level.

Please make sure to set the NPM_TOKEN environment variable in your CI with the exact value of the npm token.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

"Unable to import module" error when using bwip-js

I received an error when using bwip-js for serverless project.
Though this setup works when executed locally, when deployed to AWS, it throws some error.

Unable to import module 'test/index': Error
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
...

Current configuration is below:

serverless.yml
package:
  individually: true

plugins:
  - serverless-plugin-browserifier
package.json
...
"dependencies": {
    "aws-sdk": "2.104.0",
    "bardcode": "1.0.0",
    "bwip-js": "1.5.6",
    "pdfkit": "0.8.3"
  },
"devDependencies": {
    "chai": "4.1.1",
    "mocha": "3.5.0",
    "nock": "9.0.14",
    "serverless": "1.20.2",
    "serverless-plugin-browserifier": "1.0.5"
  }

Code snippet.

'use strict';

const bardcode = require('bardcode');
const fs = require('fs');
const bwipjs = require('bwip-js');

Dependency with high vulnerability (globby)

Hello! I'm currently using serverless-plugin-browserifier on its latest version (3.1.0). When I audit with npm audit, it points me a high vulnerability in the package glob-parent, which could be solved by updating the dependency of globby (currently on version 9.2.0).

I noticed the commit 0089e68 from 5 months ago seems to intent to solve this problem, but it's currently in the branch update-dependencies and isn't merged with master.

Could we maybe merge this branch with master, or solve this vulnerability issue another way?

Thanks!

npm audit output:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                Manual Review                                 β”‚
β”‚            Some vulnerabilities require your attention to resolve            β”‚
β”‚                                                                              β”‚
β”‚         Visit https://go.npm.me/audit-guide for additional guidance          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ High          β”‚ Regular expression denial of service                         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Package       β”‚ glob-parent                                                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Patched in    β”‚ >=5.1.2                                                      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Dependency of β”‚ serverless-plugin-browserifier                               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Path          β”‚ serverless-plugin-browserifier > globby > fast-glob >        β”‚
β”‚               β”‚ glob-parent                                                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ More info     β”‚ https://github.com/advisories/GHSA-ww39-953v-wcq6            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Pass options to browserify plugin

How do we pass options to a browserify plugin?

I have tried both:

custom:
  browserify:
    plugin:
      - prepackify:
          compatibility: node-cli
custom:
  browserify:
    plugin:
      - prepackify --compatibility=node-cli

Async package with high vulnerability issue

Hi everyone, good afternoon.
It seems that there is a vulnerability issue with the async package as we can see below with the npm audit command:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ High          β”‚ Prototype Pollution in async                                 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Package       β”‚ async                                                        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Patched in    β”‚ >=3.2.2                                                      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Dependency of β”‚ serverless-plugin-browserifier [dev]                         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Path          β”‚ serverless-plugin-browserifier > archiver > async            β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ More info     β”‚ https://github.com/advisories/GHSA-fwr7-v2mv-hh25            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Did you guys have the chance to look at this?
Thank you,
Regards.

ENOENT: no such file or directory, lstat '/Users/home/roam/backend/.build/.serverless'

First off, thanks for continuing this project. I'm having a really hard time figuring out how to get my serverless typescript function small enough to upload to Lambda, and I really hope this works.

I'm getting the error:
ENOENT: no such file or directory, lstat '/Users/home/roam/backend/.build/.serverless'

I don't know why it's looking in /.build/.serverless. My .serverless dir is at the same level as ./build. Is there a config option I need to set to make this work?

Here's my stacktrace:

Error: ENOENT: no such file or directory, lstat '/Users/home/roam/backend/.build/.serverless'
    at PluginManager.invoke (/Users/home/.config/yarn/global/node_modules/serverless/lib/classes/PluginManager.js:390:22)
    at PluginManager.spawn (/Users/home/.config/yarn/global/node_modules/serverless/lib/classes/PluginManager.js:408:17)
    at Deploy.BbPromise.bind.then.then (/Users/home/.config/yarn/global/node_modules/serverless/lib/plugins/deploy/deploy.js:123:50)
From previous event:
    at Object.before:deploy:deploy [as hook] (/Users/home/.config/yarn/global/node_modules/serverless/lib/plugins/deploy/deploy.js:113:10)
    at BbPromise.reduce (/Users/home/.config/yarn/global/node_modules/serverless/lib/classes/PluginManager.js:390:55)
From previous event:
    at PluginManager.invoke (/Users/home/.config/yarn/global/node_modules/serverless/lib/classes/PluginManager.js:390:22)
    at PluginManager.run (/Users/home/.config/yarn/global/node_modules/serverless/lib/classes/PluginManager.js:421:17)
    at variables.populateService.then.then (/Users/home/.config/yarn/global/node_modules/serverless/lib/Serverless.js:157:33)
    at runCallback (timers.js:693:18)
    at tryOnImmediate (timers.js:664:5)
    at processImmediate (timers.js:646:5)
    at process.topLevelDomainCallback (domain.js:121:23)
From previous event:
    at Serverless.run (/Users/home/.config/yarn/global/node_modules/serverless/lib/Serverless.js:144:8)
    at serverless.init.then (/Users/home/.config/yarn/global/node_modules/serverless/bin/serverless:43:50)

Question: Browserify not included in package dependencies

Hello there,
Noticed an inconsistency during the migration of the no longer supported serverless-plugin-browserify plugin to this one. Seems like they included a version of browserify in their dependencies while this package does not.

Is this intended in order to allow customization of the browserify version or is there any other reason behind not including the package within the plugin?

Any way to use sourcemaps with this plugin?

I'm having a hard time debugging an issue with my function; any way to get a source map and figure out exactly where the issue is?

fyi here's the error I'm seeing on Lambda:

2018-11-14 16:24:22.407 graphql-api-dev-graphql error module initialization error: TypeError
    at Object.1764.. (/var/task/src/handlers/graphql.js:239273:65)
    at o (/var/task/src/handlers/graphql.js:1:693)
    at /var/task/src/handlers/graphql.js:1:744
    at Object.1761../PointTransaction (/var/task/src/handlers/graphql.js:239051:16)
    at o (/var/task/src/handlers/graphql.js:1:693)
    at /var/task/src/handlers/graphql.js:1:744
    at Object.1759../HotelBooking (/var/task/src/handlers/graphql.js:238935:20)
    at o (/var/task/src/handlers/graphql.js:1:693)
    at /var/task/src/handlers/graphql.js:1:744
    at Object.1750.. (/var/task/src/handlers/graphql.js:238349:28)

How to handle multiple entries

As soon as I added multiple entry points to my custom.browserify options, AWS is no longer able to find my handlers.

For example, I see AWS errors like:
Handler 'webhook' missing on module 'src/handlers/graphql'

Even though when I inspect the bundle and looks at the .js, I see exports.handler defined.
image

Interestingly though, a different function does work and AWS is able to find the handler.

And when I only include 1 entry in entries, the function for which I add the entry works, but the others do not.

None of my handlers have the same name.

Please let me know if you have any ideas.

Here's a stripped version of my serverless.yml:

package:
    individually: true
    excludeDevDependencies: true
    include:
        - node_modules/dotenv/**/*
        - node_modules/envkey/*
        - node_modules/envkey/ext/envkey-fetch_1.2.4_linux*/*
        - node_modules/glob/**/*
        - node_modules/fs.realpath/**/*
        - node_modules/minimatch/**/*
        - node_modules/brace-expansion/**/*
        - node_modules/concat-map/**/*
        - node_modules/balanced-match/**/*
        - node_modules/inherits/**/*
        - node_modules/path-is-absolute/**/*
        - node_modules/inflight/**/*
        - node_modules/wrappy/**/*
        - node_modules/once/**/*

functions:
    expedia-update:
        handler: src/handlers/expedia.update

    graphql:
        handler: src/handlers/graphql.handler
        events:
            - http:
                  path: graphql
                  method: post
                  cors: true

    membership-check:
        handler: src/handlers/membership.check

    stripe:
        handler: src/handlers/stripe.webhook
        events:
            - http:
                  path: stripe
                  method: post
                  cors: true

plugins:
    - serverless-plugin-browserifier
    - serverless-offline

custom:
    browserify:
        basedir: ./
        entries:
            [
                'src/handlers/graphql.ts',
                'src/handlers/stripe.ts',
                'src/handlers/membership.ts',
                'src/handlers/expedia.ts',
            ]
        exclude:
            - envkey
            - dotenv
            - glob
            - fs.realpath
            - minimatch
            - brace-expansion
            - concat-map
            - balanced-match
            - inherits
            - path-is-absolute
            - inflight
            - wrappy
            - once
        require:
            - node_modules/envkey
            - node_modules/dotenv
            - node_modules/glob
            - node_modules/fs.realpath
            - node_modules/minimatch
            - node_modules/brace-expansion
            - node_modules/concat-map
            - node_modules/balanced-match
            - node_modules/inherits
            - node_modules/path-is-absolute
            - node_modules/inflight
            - node_modules/wrappy
            - node_modules/once
        node: true
        debug: false
        extensions: ['.ts']
        plugin:
            - tsify

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.