netlify-cli 16.6.2 → 16.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/npm-shrinkwrap.json +366 -1042
  2. package/package.json +4 -4
  3. package/src/lib/build.mjs +3 -1
  4. package/src/lib/edge-functions/consts.mjs +1 -0
  5. package/src/lib/edge-functions/proxy.mjs +1 -2
  6. package/src/lib/edge-functions/registry.mjs +15 -19
  7. package/src/utils/deploy/hash-fns.mjs +9 -3
  8. package/src/functions-templates/javascript/apollo-graphql/.netlify-function-template.mjs +0 -5
  9. package/src/functions-templates/javascript/apollo-graphql/package.json +0 -21
  10. package/src/functions-templates/javascript/apollo-graphql/{{name}}.js +0 -42
  11. package/src/functions-templates/javascript/apollo-graphql-rest/.netlify-function-template.mjs +0 -5
  12. package/src/functions-templates/javascript/apollo-graphql-rest/package.json +0 -22
  13. package/src/functions-templates/javascript/apollo-graphql-rest/random-user.js +0 -23
  14. package/src/functions-templates/javascript/apollo-graphql-rest/{{name}}.js +0 -68
  15. package/src/functions-templates/javascript/auth-fetch/.netlify-function-template.mjs +0 -11
  16. package/src/functions-templates/javascript/auth-fetch/package-lock.json +0 -83
  17. package/src/functions-templates/javascript/auth-fetch/package.json +0 -21
  18. package/src/functions-templates/javascript/auth-fetch/{{name}}.js +0 -39
  19. package/src/functions-templates/javascript/create-user/.netlify-function-template.mjs +0 -11
  20. package/src/functions-templates/javascript/create-user/package.json +0 -21
  21. package/src/functions-templates/javascript/create-user/{{name}}.js +0 -36
  22. package/src/functions-templates/javascript/fauna-crud/.netlify-function-template.mjs +0 -17
  23. package/src/functions-templates/javascript/fauna-crud/create-schema.js +0 -36
  24. package/src/functions-templates/javascript/fauna-crud/create.js +0 -37
  25. package/src/functions-templates/javascript/fauna-crud/delete.js +0 -29
  26. package/src/functions-templates/javascript/fauna-crud/package.json +0 -20
  27. package/src/functions-templates/javascript/fauna-crud/read-all.js +0 -33
  28. package/src/functions-templates/javascript/fauna-crud/read.js +0 -30
  29. package/src/functions-templates/javascript/fauna-crud/update.js +0 -30
  30. package/src/functions-templates/javascript/fauna-crud/{{name}}.js +0 -62
  31. package/src/functions-templates/javascript/fauna-graphql/.netlify-function-template.mjs +0 -17
  32. package/src/functions-templates/javascript/fauna-graphql/package.json +0 -26
  33. package/src/functions-templates/javascript/fauna-graphql/schema.graphql +0 -8
  34. package/src/functions-templates/javascript/fauna-graphql/sync-schema.js +0 -38
  35. package/src/functions-templates/javascript/fauna-graphql/{{name}}.js +0 -46
  36. package/src/functions-templates/javascript/google-analytics/.netlify-function-template.mjs +0 -5
  37. package/src/functions-templates/javascript/google-analytics/package-lock.json +0 -100
  38. package/src/functions-templates/javascript/google-analytics/package.json +0 -25
  39. package/src/functions-templates/javascript/google-analytics/{{name}}.js +0 -114
  40. package/src/functions-templates/javascript/graphql-gateway/.netlify-function-template.mjs +0 -5
  41. package/src/functions-templates/javascript/graphql-gateway/example-sibling-function-graphql-1.js +0 -42
  42. package/src/functions-templates/javascript/graphql-gateway/example-sibling-function-graphql-2.js +0 -80
  43. package/src/functions-templates/javascript/graphql-gateway/package.json +0 -24
  44. package/src/functions-templates/javascript/graphql-gateway/{{name}}.js +0 -75
  45. package/src/functions-templates/javascript/hasura-event-triggered/.netlify-function-template.mjs +0 -5
  46. package/src/functions-templates/javascript/hasura-event-triggered/package.json +0 -21
  47. package/src/functions-templates/javascript/hasura-event-triggered/{{name}}.js +0 -40
  48. package/src/functions-templates/javascript/node-fetch/.netlify-function-template.mjs +0 -5
  49. package/src/functions-templates/javascript/node-fetch/package.json +0 -19
  50. package/src/functions-templates/javascript/node-fetch/{{name}}.js +0 -29
  51. package/src/functions-templates/javascript/oauth-passport/.netlify-function-template.mjs +0 -5
  52. package/src/functions-templates/javascript/oauth-passport/package.json +0 -25
  53. package/src/functions-templates/javascript/oauth-passport/utils/auth.js +0 -65
  54. package/src/functions-templates/javascript/oauth-passport/utils/config.js +0 -24
  55. package/src/functions-templates/javascript/oauth-passport/{{name}}.js +0 -37
  56. package/src/functions-templates/javascript/protected-function/.netlify-function-template.mjs +0 -5
  57. package/src/functions-templates/javascript/protected-function/{{name}}.js +0 -25
  58. package/src/functions-templates/javascript/send-email/.netlify-function-template.mjs +0 -5
  59. package/src/functions-templates/javascript/send-email/package.json +0 -21
  60. package/src/functions-templates/javascript/send-email/validations.js +0 -38
  61. package/src/functions-templates/javascript/send-email/{{name}}.js +0 -68
  62. package/src/functions-templates/javascript/serverless-ssr/.netlify-function-template.mjs +0 -5
  63. package/src/functions-templates/javascript/serverless-ssr/app/index.js +0 -116
  64. package/src/functions-templates/javascript/serverless-ssr/package.json +0 -24
  65. package/src/functions-templates/javascript/serverless-ssr/serverless-http.js +0 -15
  66. package/src/functions-templates/javascript/serverless-ssr/{{name}}.js +0 -15
  67. package/src/functions-templates/javascript/set-cookie/.netlify-function-template.mjs +0 -5
  68. package/src/functions-templates/javascript/set-cookie/package.json +0 -19
  69. package/src/functions-templates/javascript/set-cookie/{{name}}.js +0 -44
  70. package/src/functions-templates/javascript/slack-rate-limit/.netlify-function-template.mjs +0 -5
  71. package/src/functions-templates/javascript/slack-rate-limit/package.json +0 -20
  72. package/src/functions-templates/javascript/slack-rate-limit/{{name}}.js +0 -115
  73. package/src/functions-templates/javascript/stripe-charge/.netlify-function-template.mjs +0 -28
  74. package/src/functions-templates/javascript/stripe-charge/package-lock.json +0 -196
  75. package/src/functions-templates/javascript/stripe-charge/package.json +0 -21
  76. package/src/functions-templates/javascript/stripe-charge/{{name}}.js +0 -56
  77. package/src/functions-templates/javascript/stripe-subscription/.netlify-function-template.mjs +0 -28
  78. package/src/functions-templates/javascript/stripe-subscription/package-lock.json +0 -196
  79. package/src/functions-templates/javascript/stripe-subscription/package.json +0 -21
  80. package/src/functions-templates/javascript/stripe-subscription/{{name}}.js +0 -52
  81. package/src/functions-templates/javascript/token-hider/.netlify-function-template.mjs +0 -29
  82. package/src/functions-templates/javascript/token-hider/package-lock.json +0 -317
  83. package/src/functions-templates/javascript/token-hider/package.json +0 -21
  84. package/src/functions-templates/javascript/token-hider/{{name}}.js +0 -37
  85. package/src/functions-templates/javascript/url-shortener/.netlify-function-template.mjs +0 -29
  86. package/src/functions-templates/javascript/url-shortener/generate-route.js +0 -53
  87. package/src/functions-templates/javascript/url-shortener/get-route.js +0 -32
  88. package/src/functions-templates/javascript/url-shortener/package-lock.json +0 -126
  89. package/src/functions-templates/javascript/url-shortener/package.json +0 -22
  90. package/src/functions-templates/javascript/url-shortener/{{name}}.js +0 -30
  91. package/src/functions-templates/javascript/using-middleware/.netlify-function-template.mjs +0 -5
  92. package/src/functions-templates/javascript/using-middleware/package.json +0 -19
  93. package/src/functions-templates/javascript/using-middleware/{{name}}.js +0 -60
@@ -1,116 +0,0 @@
1
- /* Express App */
2
- const process = require('process')
3
-
4
- const compression = require('compression')
5
- const cors = require('cors')
6
- const express = require('express')
7
- const morgan = require('morgan')
8
-
9
- /* My express App */
10
- module.exports = function expressApp(functionName) {
11
- const app = express()
12
- const router = express.Router()
13
-
14
- // gzip responses
15
- router.use(compression())
16
-
17
- // Set router base path for local dev
18
- const routerBasePath = process.env.NODE_ENV === 'dev' ? `/${functionName}` : `/.netlify/functions/${functionName}/`
19
-
20
- /* define routes */
21
- router.get('/', function onRequest(req, res) {
22
- const html = `
23
- <html>
24
- <head>
25
- <style>
26
- body {
27
- padding: 30px;
28
- }
29
- </style>
30
- </head>
31
- <body>
32
- <h1>Express via '${functionName}' ⊂◉‿◉つ</h1>
33
-
34
- <p>I'm using Express running via a <a href='https://docs.netlify.com/functions/overview/' target='_blank'>Netlify Function</a>.</p>
35
-
36
- <p>Choose a route:</p>
37
-
38
- <div>
39
- <a href='/.netlify/functions/${functionName}/users'>View /users route</a>
40
- </div>
41
-
42
- <div>
43
- <a href='/.netlify/functions/${functionName}/hello'>View /hello route</a>
44
- </div>
45
-
46
- <br/>
47
- <br/>
48
-
49
- <div>
50
- <a href='/'>
51
- Go back to demo homepage
52
- </a>
53
- </div>
54
-
55
- <br/>
56
- <br/>
57
-
58
- <div>
59
- <a href='https://github.com/DavidWells/netlify-functions-express' target='_blank'>
60
- See the source code on GitHub
61
- </a>
62
- </div>
63
- </body>
64
- </html>
65
- `
66
- res.send(html)
67
- })
68
-
69
- router.get('/users', function onRequest(req, res) {
70
- res.json({
71
- users: [
72
- {
73
- name: 'steve',
74
- },
75
- {
76
- name: 'joe',
77
- },
78
- ],
79
- })
80
- })
81
-
82
- router.get('/hello/', function onRequest(req, res) {
83
- res.send('hello world')
84
- })
85
-
86
- // Attach logger
87
- app.use(morgan(customLogger))
88
-
89
- // Setup routes
90
- app.use(routerBasePath, router)
91
-
92
- // Apply express middlewares
93
- router.use(cors())
94
- router.use(express.json())
95
- router.use(express.urlencoded({ extended: true }))
96
-
97
- return app
98
- }
99
-
100
- const customLogger = function (tokens, req, res) {
101
- const log = [
102
- tokens.method(req, res),
103
- tokens.url(req, res),
104
- tokens.status(req, res),
105
- tokens.res(req, res, 'content-length'),
106
- '-',
107
- tokens['response-time'](req, res),
108
- 'ms',
109
- ].join(' ')
110
-
111
- if (process.env.NODE_ENV !== 'dev') {
112
- // Log only in AWS context to get back function logs
113
- console.log(log)
114
- }
115
- return log
116
- }
@@ -1,24 +0,0 @@
1
- {
2
- "name": "serverless-ssr",
3
- "version": "1.0.0",
4
- "description": "netlify functions:create - default template for a serverless SSR function",
5
- "main": "serverless-ssr.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
- },
9
- "keywords": [
10
- "netlify",
11
- "serverless",
12
- "js"
13
- ],
14
- "author": "Netlify",
15
- "license": "MIT",
16
- "dependencies": {
17
- "compression": "^1.7.4",
18
- "cors": "^2.8.5",
19
- "express": "^4.17.1",
20
- "morgan": "^1.10.0",
21
- "node-fetch": "^2.6.1",
22
- "serverless-http": "^2.0.0"
23
- }
24
- }
@@ -1,15 +0,0 @@
1
- // for a full working demo check https://express-via-functions.netlify.com/.netlify/functions/serverless-http
2
- const serverless = require('serverless-http')
3
-
4
- const expressApp = require('./app.js')
5
-
6
- // We need to define our function name for express routes to set the correct base path
7
- const functionName = 'serverless-http'
8
-
9
- // Initialize express app
10
- const app = expressApp(functionName)
11
-
12
- // Export lambda handler
13
- const handler = serverless(app)
14
-
15
- module.exports = { handler }
@@ -1,15 +0,0 @@
1
- // for a full working demo check https://express-via-functions.netlify.com/.netlify/functions/serverless-http
2
- const serverless = require('serverless-http')
3
-
4
- const expressApp = require('./app.js')
5
-
6
- // We need to define our function name for express routes to set the correct base path
7
- const functionName = 'serverless-http'
8
-
9
- // Initialize express app
10
- const app = expressApp(functionName)
11
-
12
- // Export lambda handler
13
- const handler = serverless(app)
14
-
15
- module.exports = { handler }
@@ -1,5 +0,0 @@
1
- export default {
2
- name: 'set-cookie',
3
- description: 'Set a cookie alongside your function',
4
- functionType: 'serverless',
5
- }
@@ -1,19 +0,0 @@
1
- {
2
- "name": "set-cookie",
3
- "version": "1.0.0",
4
- "description": "netlify functions:create - set a cookie with your Netlify Function",
5
- "main": "set-cookie",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
- },
9
- "keywords": [
10
- "netlify",
11
- "serverless",
12
- "js"
13
- ],
14
- "author": "Netlify",
15
- "license": "MIT",
16
- "dependencies": {
17
- "cookie": "^0.5.0"
18
- }
19
- }
@@ -1,44 +0,0 @@
1
- const cookie = require('cookie')
2
-
3
- // 14 days
4
- const COOKIE_MAX_AGE = 12_096e5
5
-
6
- const handler = async () => {
7
- const myCookie = cookie.serialize('my_cookie', 'lolHi', {
8
- secure: true,
9
- httpOnly: true,
10
- path: '/',
11
- maxAge: COOKIE_MAX_AGE,
12
- })
13
-
14
- const redirectUrl = 'https://google.com'
15
- // Do redirects via html
16
- const html = `
17
- <html lang="en">
18
- <head>
19
- <meta charset="utf-8">
20
- </head>
21
- <body>
22
- <noscript>
23
- <meta http-equiv="refresh" content="0; url=${redirectUrl}" />
24
- </noscript>
25
- </body>
26
- <script>
27
- setTimeout(function(){
28
- window.location.href = ${JSON.stringify(redirectUrl)}
29
- }, 0)
30
- </script>
31
- </html>`
32
-
33
- return {
34
- statusCode: 200,
35
- headers: {
36
- 'Set-Cookie': myCookie,
37
- 'Cache-Control': 'no-cache',
38
- 'Content-Type': 'text/html',
39
- },
40
- body: html,
41
- }
42
- }
43
-
44
- module.exports = { handler }
@@ -1,5 +0,0 @@
1
- export default {
2
- name: 'slack-rate-limit',
3
- description: 'Slack Rate-limit: post to Slack, at most once an hour, using Netlify Identity metadata',
4
- functionType: 'serverless',
5
- }
@@ -1,20 +0,0 @@
1
- {
2
- "name": "slack-rate-limit",
3
- "version": "1.0.0",
4
- "description": "netlify functions:create - post to Slack, at most once an hour, using Netlify Identity metadata",
5
- "main": "node-fetch.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
- },
9
- "keywords": [
10
- "netlify",
11
- "serverless",
12
- "slack",
13
- "js"
14
- ],
15
- "author": "Netlify",
16
- "license": "MIT",
17
- "dependencies": {
18
- "node-fetch": "^2.6.1"
19
- }
20
- }
@@ -1,115 +0,0 @@
1
- // code walkthrough: https://www.netlify.com/blog/2018/03/29/jamstack-architecture-on-netlify-how-identity-and-functions-work-together/#updating-user-data-with-the-identity-api
2
- // demo repo: https://github.com/biilmann/testing-slack-tutorial/tree/v3-one-message-an-hour
3
- // note: requires SLACK_WEBHOOK_URL environment variable
4
- const process = require('process')
5
-
6
- const slackURL = process.env.SLACK_WEBHOOK_URL
7
- const fetch = require('node-fetch')
8
-
9
- const parseJsonResponse = async (response) => {
10
- const json = await response.json()
11
- if (!response.ok) {
12
- const error = `JSON: ${JSON.stringify(json)}. Status: ${response.status}`
13
- throw new Error(error)
14
- }
15
- return json
16
- }
17
-
18
- class IdentityAPI {
19
- constructor(apiURL, token) {
20
- this.apiURL = apiURL
21
- this.token = token
22
- }
23
-
24
- headers(headers = {}) {
25
- return {
26
- 'Content-Type': 'application/json',
27
- Authorization: `Bearer ${this.token}`,
28
- ...headers,
29
- }
30
- }
31
-
32
- async request(path, options = {}) {
33
- const headers = this.headers(options.headers || {})
34
- const response = await fetch(this.apiURL + path, { ...options, headers })
35
- const contentType = response.headers.get('Content-Type')
36
- if (contentType && /json/.test(contentType)) {
37
- return parseJsonResponse(response)
38
- }
39
-
40
- if (!response.ok) {
41
- const data = await response.text()
42
- const error = `Data: ${data}. Status: ${response.status}`
43
- throw new Error(error)
44
- }
45
- return await response.text()
46
- }
47
- }
48
-
49
- //
50
- // Fetch a user from GoTrue via id
51
- //
52
- const fetchUser = function (identity, id) {
53
- const api = new IdentityAPI(identity.url, identity.token)
54
- return api.request(`/admin/users/${id}`)
55
- }
56
-
57
- //
58
- // Update the app_metadata of a user
59
- //
60
- const updateUser = function (identity, user, appMetadata) {
61
- const api = new IdentityAPI(identity.url, identity.token)
62
-
63
- return api.request(`/admin/users/${user.id}`, {
64
- method: 'PUT',
65
- body: JSON.stringify({ app_metadata: { ...user.app_metadata, ...appMetadata } }),
66
- })
67
- }
68
-
69
- // One hour
70
- const MESSAGE_RATE_LIMIT = 36e5
71
-
72
- module.exports = async function handler(event, context) {
73
- if (event.httpMethod !== 'POST') {
74
- return {
75
- statusCode: 410,
76
- body: 'Unsupported Request Method',
77
- }
78
- }
79
-
80
- const claims = context.clientContext && context.clientContext.user
81
- if (!claims) {
82
- return {
83
- statusCode: 401,
84
- body: 'You must be signed in to call this function',
85
- }
86
- }
87
-
88
- const user = await fetchUser(context.clientContext.identity, claims.sub)
89
- const lastMessage = new Date(user.app_metadata.last_message_at || 0).getTime()
90
- const cutOff = Date.now() - MESSAGE_RATE_LIMIT
91
- if (lastMessage > cutOff) {
92
- return {
93
- statusCode: 401,
94
- body: 'Only one message an hour allowed',
95
- }
96
- }
97
-
98
- try {
99
- const payload = JSON.parse(event.body)
100
-
101
- await fetch(slackURL, {
102
- method: 'POST',
103
- body: JSON.stringify({
104
- text: payload.text,
105
- attachments: [{ text: `From ${user.email}` }],
106
- }),
107
- })
108
- await updateUser(context.clientContext.identity, user, {
109
- last_message_at: Date.now(),
110
- })
111
- return { statusCode: 204 }
112
- } catch (error) {
113
- return { statusCode: 500, body: `Internal Server Error: ${error}` }
114
- }
115
- }
@@ -1,28 +0,0 @@
1
- import chalk from 'chalk'
2
-
3
- export default {
4
- name: 'stripe-charge',
5
- description: 'Stripe Charge: Charge a user with Stripe',
6
- functionType: 'serverless',
7
- async onComplete() {
8
- console.log(`${chalk.yellow('stripe-charge')} function created from template!`)
9
- if (!process.env.STRIPE_SECRET_KEY) {
10
- console.log(
11
- `note this function requires ${chalk.yellow(
12
- 'STRIPE_SECRET_KEY',
13
- )} build environment variable set in your Netlify Site.`,
14
- )
15
- let siteData = { name: 'YOURSITENAMEHERE' }
16
- try {
17
- siteData = await this.netlify.api.getSite({
18
- siteId: this.netlify.site.id,
19
- })
20
- } catch (e) {
21
- // silent error, not important
22
- }
23
- console.log(
24
- `Set it at: https://app.netlify.com/sites/${siteData.name}/settings/deploys#environment-variables (must have CD setup)`,
25
- )
26
- }
27
- },
28
- }
@@ -1,196 +0,0 @@
1
- {
2
- "name": "stripe-charge",
3
- "version": "1.0.0",
4
- "lockfileVersion": 2,
5
- "requires": true,
6
- "packages": {
7
- "": {
8
- "name": "stripe-charge",
9
- "version": "1.0.0",
10
- "license": "MIT",
11
- "dependencies": {
12
- "stripe": "^10.0.0"
13
- }
14
- },
15
- "node_modules/@types/node": {
16
- "version": "17.0.2",
17
- "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.2.tgz",
18
- "integrity": "sha512-JepeIUPFDARgIs0zD/SKPgFsJEAF0X5/qO80llx59gOxFTboS9Amv3S+QfB7lqBId5sFXJ99BN0J6zFRvL9dDA=="
19
- },
20
- "node_modules/call-bind": {
21
- "version": "1.0.2",
22
- "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
23
- "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
24
- "dependencies": {
25
- "function-bind": "^1.1.1",
26
- "get-intrinsic": "^1.0.2"
27
- },
28
- "funding": {
29
- "url": "https://github.com/sponsors/ljharb"
30
- }
31
- },
32
- "node_modules/function-bind": {
33
- "version": "1.1.1",
34
- "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
35
- "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
36
- },
37
- "node_modules/get-intrinsic": {
38
- "version": "1.1.1",
39
- "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
40
- "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
41
- "dependencies": {
42
- "function-bind": "^1.1.1",
43
- "has": "^1.0.3",
44
- "has-symbols": "^1.0.1"
45
- },
46
- "funding": {
47
- "url": "https://github.com/sponsors/ljharb"
48
- }
49
- },
50
- "node_modules/has": {
51
- "version": "1.0.3",
52
- "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
53
- "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
54
- "dependencies": {
55
- "function-bind": "^1.1.1"
56
- },
57
- "engines": {
58
- "node": ">= 0.4.0"
59
- }
60
- },
61
- "node_modules/has-symbols": {
62
- "version": "1.0.2",
63
- "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
64
- "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
65
- "engines": {
66
- "node": ">= 0.4"
67
- },
68
- "funding": {
69
- "url": "https://github.com/sponsors/ljharb"
70
- }
71
- },
72
- "node_modules/object-inspect": {
73
- "version": "1.12.0",
74
- "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz",
75
- "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==",
76
- "funding": {
77
- "url": "https://github.com/sponsors/ljharb"
78
- }
79
- },
80
- "node_modules/qs": {
81
- "version": "6.11.0",
82
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
83
- "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
84
- "dependencies": {
85
- "side-channel": "^1.0.4"
86
- },
87
- "engines": {
88
- "node": ">=0.6"
89
- },
90
- "funding": {
91
- "url": "https://github.com/sponsors/ljharb"
92
- }
93
- },
94
- "node_modules/side-channel": {
95
- "version": "1.0.4",
96
- "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
97
- "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
98
- "dependencies": {
99
- "call-bind": "^1.0.0",
100
- "get-intrinsic": "^1.0.2",
101
- "object-inspect": "^1.9.0"
102
- },
103
- "funding": {
104
- "url": "https://github.com/sponsors/ljharb"
105
- }
106
- },
107
- "node_modules/stripe": {
108
- "version": "10.17.0",
109
- "resolved": "https://registry.npmjs.org/stripe/-/stripe-10.17.0.tgz",
110
- "integrity": "sha512-JHV2KoL+nMQRXu3m9ervCZZvi4DDCJfzHUE6CmtJxR9TmizyYfrVuhGvnsZLLnheby9Qrnf4Hq6iOEcejGwnGQ==",
111
- "dependencies": {
112
- "@types/node": ">=8.1.0",
113
- "qs": "^6.11.0"
114
- },
115
- "engines": {
116
- "node": "^8.1 || >=10.*"
117
- }
118
- }
119
- },
120
- "dependencies": {
121
- "@types/node": {
122
- "version": "17.0.2",
123
- "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.2.tgz",
124
- "integrity": "sha512-JepeIUPFDARgIs0zD/SKPgFsJEAF0X5/qO80llx59gOxFTboS9Amv3S+QfB7lqBId5sFXJ99BN0J6zFRvL9dDA=="
125
- },
126
- "call-bind": {
127
- "version": "1.0.2",
128
- "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
129
- "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
130
- "requires": {
131
- "function-bind": "^1.1.1",
132
- "get-intrinsic": "^1.0.2"
133
- }
134
- },
135
- "function-bind": {
136
- "version": "1.1.1",
137
- "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
138
- "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
139
- },
140
- "get-intrinsic": {
141
- "version": "1.1.1",
142
- "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
143
- "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
144
- "requires": {
145
- "function-bind": "^1.1.1",
146
- "has": "^1.0.3",
147
- "has-symbols": "^1.0.1"
148
- }
149
- },
150
- "has": {
151
- "version": "1.0.3",
152
- "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
153
- "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
154
- "requires": {
155
- "function-bind": "^1.1.1"
156
- }
157
- },
158
- "has-symbols": {
159
- "version": "1.0.2",
160
- "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
161
- "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw=="
162
- },
163
- "object-inspect": {
164
- "version": "1.12.0",
165
- "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz",
166
- "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g=="
167
- },
168
- "qs": {
169
- "version": "6.11.0",
170
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
171
- "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
172
- "requires": {
173
- "side-channel": "^1.0.4"
174
- }
175
- },
176
- "side-channel": {
177
- "version": "1.0.4",
178
- "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
179
- "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
180
- "requires": {
181
- "call-bind": "^1.0.0",
182
- "get-intrinsic": "^1.0.2",
183
- "object-inspect": "^1.9.0"
184
- }
185
- },
186
- "stripe": {
187
- "version": "10.17.0",
188
- "resolved": "https://registry.npmjs.org/stripe/-/stripe-10.17.0.tgz",
189
- "integrity": "sha512-JHV2KoL+nMQRXu3m9ervCZZvi4DDCJfzHUE6CmtJxR9TmizyYfrVuhGvnsZLLnheby9Qrnf4Hq6iOEcejGwnGQ==",
190
- "requires": {
191
- "@types/node": ">=8.1.0",
192
- "qs": "^6.11.0"
193
- }
194
- }
195
- }
196
- }
@@ -1,21 +0,0 @@
1
- {
2
- "name": "stripe-charge",
3
- "version": "1.0.0",
4
- "description": "netlify functions:create - Charge a user with Stripe",
5
- "main": "stripe-charge.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
- },
9
- "keywords": [
10
- "netlify",
11
- "serverless",
12
- "apis",
13
- "stripe",
14
- "js"
15
- ],
16
- "author": "Netlify",
17
- "license": "MIT",
18
- "dependencies": {
19
- "stripe": "^10.0.0"
20
- }
21
- }