netlify-cli 17.37.2 → 17.38.1
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.
- package/bin/run.js +4 -2
- package/dist/commands/addons/addons.d.ts.map +1 -1
- package/dist/commands/addons/addons.js +0 -1
- package/dist/commands/base-command.d.ts.map +1 -1
- package/dist/commands/base-command.js +2 -1
- package/dist/commands/blobs/blobs-delete.d.ts.map +1 -1
- package/dist/commands/blobs/blobs-delete.js +7 -1
- package/dist/commands/blobs/blobs-set.d.ts +1 -0
- package/dist/commands/blobs/blobs-set.d.ts.map +1 -1
- package/dist/commands/blobs/blobs-set.js +10 -2
- package/dist/commands/deploy/deploy.js +2 -2
- package/dist/commands/deploy/index.d.ts.map +1 -1
- package/dist/commands/deploy/index.js +4 -3
- package/dist/commands/env/env-clone.d.ts.map +1 -1
- package/dist/commands/env/env-clone.js +12 -3
- package/dist/commands/env/env-set.d.ts.map +1 -1
- package/dist/commands/env/env-set.js +8 -3
- package/dist/commands/env/env-unset.d.ts.map +1 -1
- package/dist/commands/env/env-unset.js +7 -3
- package/dist/commands/init/index.d.ts.map +1 -1
- package/dist/commands/init/index.js +0 -1
- package/dist/commands/integration/deploy.d.ts.map +1 -1
- package/dist/commands/integration/deploy.js +11 -20
- package/dist/commands/main.d.ts +34 -0
- package/dist/commands/main.d.ts.map +1 -1
- package/dist/commands/main.js +36 -6
- package/dist/commands/sites/sites-create-template.d.ts +2 -3
- package/dist/commands/sites/sites-create-template.d.ts.map +1 -1
- package/dist/commands/sites/sites-create-template.js +113 -92
- package/dist/commands/sites/sites-create.d.ts.map +1 -1
- package/dist/commands/sites/sites.d.ts.map +1 -1
- package/dist/commands/sites/sites.js +0 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/command-helpers.d.ts +16 -0
- package/dist/utils/command-helpers.d.ts.map +1 -1
- package/dist/utils/command-helpers.js +7 -0
- package/dist/utils/framework-server.d.ts.map +1 -1
- package/dist/utils/framework-server.js +2 -2
- package/dist/utils/gh-auth.js +1 -1
- package/dist/utils/headers.js +1 -1
- package/dist/utils/prompts/blob-delete-prompts.d.ts +2 -0
- package/dist/utils/prompts/blob-delete-prompts.d.ts.map +1 -0
- package/dist/utils/prompts/blob-delete-prompts.js +11 -0
- package/dist/utils/prompts/blob-set-prompt.d.ts +2 -0
- package/dist/utils/prompts/blob-set-prompt.d.ts.map +1 -0
- package/dist/utils/prompts/blob-set-prompt.js +11 -0
- package/dist/utils/prompts/confirm-prompt.d.ts +2 -0
- package/dist/utils/prompts/confirm-prompt.d.ts.map +1 -0
- package/dist/utils/prompts/confirm-prompt.js +20 -0
- package/dist/utils/prompts/env-clone-prompt.d.ts +11 -0
- package/dist/utils/prompts/env-clone-prompt.d.ts.map +1 -0
- package/dist/utils/prompts/env-clone-prompt.js +27 -0
- package/dist/utils/prompts/env-set-prompts.d.ts +2 -0
- package/dist/utils/prompts/env-set-prompts.d.ts.map +1 -0
- package/dist/utils/prompts/env-set-prompts.js +11 -0
- package/dist/utils/prompts/env-unset-prompts.d.ts +8 -0
- package/dist/utils/prompts/env-unset-prompts.d.ts.map +1 -0
- package/dist/utils/prompts/env-unset-prompts.js +17 -0
- package/dist/utils/prompts/prompt-messages.d.ts +25 -0
- package/dist/utils/prompts/prompt-messages.d.ts.map +1 -0
- package/dist/utils/prompts/prompt-messages.js +25 -0
- package/dist/utils/redirects.js +1 -1
- package/dist/utils/run-build.d.ts +2 -0
- package/dist/utils/run-build.d.ts.map +1 -1
- package/dist/utils/run-program.d.ts +3 -0
- package/dist/utils/run-program.d.ts.map +1 -0
- package/dist/utils/run-program.js +12 -0
- package/dist/utils/scripted-commands.d.ts +3 -0
- package/dist/utils/scripted-commands.d.ts.map +1 -0
- package/dist/utils/scripted-commands.js +17 -0
- package/dist/utils/sites/create-template.d.ts +14 -0
- package/dist/utils/sites/create-template.d.ts.map +1 -0
- package/dist/utils/sites/create-template.js +46 -0
- package/dist/utils/sites/utils.d.ts +8 -6
- package/dist/utils/sites/utils.d.ts.map +1 -1
- package/dist/utils/sites/utils.js +10 -4
- package/dist/utils/static-server.d.ts +3 -1
- package/dist/utils/static-server.d.ts.map +1 -1
- package/dist/utils/static-server.js +2 -0
- package/dist/utils/types.d.ts +14 -1
- package/dist/utils/types.d.ts.map +1 -1
- package/functions-templates/javascript/hello-world/{{name}}.mjs +13 -0
- package/functions-templates/javascript/scheduled-function/{{name}}.mjs +11 -0
- package/functions-templates/rust/hello-world/Cargo.toml +1 -1
- package/functions-templates/typescript/hello-world/package-lock.json +15 -15
- package/functions-templates/typescript/hello-world/package.json +1 -1
- package/functions-templates/typescript/hello-world/{{name}}.mts +14 -0
- package/functions-templates/typescript/scheduled-function/package.json +1 -1
- package/functions-templates/typescript/scheduled-function/{{name}}.mts +11 -0
- package/npm-shrinkwrap.json +849 -626
- package/package.json +14 -14
- package/functions-templates/javascript/hello-world/{{name}}.js +0 -17
- package/functions-templates/javascript/identity-signup/.netlify-function-template.mjs +0 -5
- package/functions-templates/javascript/identity-signup/{{name}}.js +0 -29
- package/functions-templates/javascript/sanity-create/.netlify-function-template.mjs +0 -5
- package/functions-templates/javascript/sanity-create/package.json +0 -20
- package/functions-templates/javascript/sanity-create/{{name}}.js +0 -72
- package/functions-templates/javascript/sanity-groq/.netlify-function-template.mjs +0 -5
- package/functions-templates/javascript/sanity-groq/package.json +0 -21
- package/functions-templates/javascript/sanity-groq/{{name}}.js +0 -56
- package/functions-templates/javascript/scheduled-function/{{name}}.js +0 -12
- package/functions-templates/javascript/submission-created/.netlify-function-template.mjs +0 -5
- package/functions-templates/javascript/submission-created/package.json +0 -19
- package/functions-templates/javascript/submission-created/{{name}}.js +0 -29
- package/functions-templates/typescript/hello-world/{{name}}.ts +0 -12
- package/functions-templates/typescript/scheduled-function/{{name}}.ts +0 -12
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Docs on request and context https://docs.netlify.com/functions/build/#code-your-function-2
|
|
2
|
+
export default (request, context) => {
|
|
3
|
+
try {
|
|
4
|
+
const url = new URL(request.url)
|
|
5
|
+
const subject = url.searchParams.get('name') || 'World'
|
|
6
|
+
|
|
7
|
+
return new Response(`Hello ${subject}`)
|
|
8
|
+
} catch (error) {
|
|
9
|
+
return new Response(error.toString(), {
|
|
10
|
+
status: 500,
|
|
11
|
+
})
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// To learn about scheduled functions and supported cron extensions,
|
|
2
|
+
// see: https://ntl.fyi/sched-func
|
|
3
|
+
export default async (req) => {
|
|
4
|
+
const { next_run } = await req.json()
|
|
5
|
+
|
|
6
|
+
console.log('Received event! Next invocation at:', next_run)
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const config = {
|
|
10
|
+
schedule: '@hourly',
|
|
11
|
+
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@netlify/functions": "^2.8.2",
|
|
13
|
-
"@types/node": "^
|
|
13
|
+
"@types/node": "^22.0.0",
|
|
14
14
|
"typescript": "^4.0.0"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"node_modules/@types/node": {
|
|
49
|
-
"version": "
|
|
50
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-
|
|
51
|
-
"integrity": "sha512-
|
|
49
|
+
"version": "22.10.1",
|
|
50
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.1.tgz",
|
|
51
|
+
"integrity": "sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==",
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"undici-types": "~6.
|
|
53
|
+
"undici-types": "~6.20.0"
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"node_modules/typescript": {
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
"node_modules/undici-types": {
|
|
69
|
-
"version": "6.
|
|
70
|
-
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.
|
|
71
|
-
"integrity": "sha512-
|
|
69
|
+
"version": "6.20.0",
|
|
70
|
+
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz",
|
|
71
|
+
"integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="
|
|
72
72
|
},
|
|
73
73
|
"node_modules/urlpattern-polyfill": {
|
|
74
74
|
"version": "8.0.2",
|
|
@@ -100,11 +100,11 @@
|
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
102
|
"@types/node": {
|
|
103
|
-
"version": "
|
|
104
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-
|
|
105
|
-
"integrity": "sha512-
|
|
103
|
+
"version": "22.10.1",
|
|
104
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.1.tgz",
|
|
105
|
+
"integrity": "sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==",
|
|
106
106
|
"requires": {
|
|
107
|
-
"undici-types": "~6.
|
|
107
|
+
"undici-types": "~6.20.0"
|
|
108
108
|
}
|
|
109
109
|
},
|
|
110
110
|
"typescript": {
|
|
@@ -113,9 +113,9 @@
|
|
|
113
113
|
"integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g=="
|
|
114
114
|
},
|
|
115
115
|
"undici-types": {
|
|
116
|
-
"version": "6.
|
|
117
|
-
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.
|
|
118
|
-
"integrity": "sha512-
|
|
116
|
+
"version": "6.20.0",
|
|
117
|
+
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz",
|
|
118
|
+
"integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="
|
|
119
119
|
},
|
|
120
120
|
"urlpattern-polyfill": {
|
|
121
121
|
"version": "8.0.2",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Context } from '@netlify/functions'
|
|
2
|
+
|
|
3
|
+
export default (request: Request, context: Context) => {
|
|
4
|
+
try {
|
|
5
|
+
const url = new URL(request.url)
|
|
6
|
+
const subject = url.searchParams.get('name') || 'World'
|
|
7
|
+
|
|
8
|
+
return new Response(`Hello ${subject}`)
|
|
9
|
+
} catch (error) {
|
|
10
|
+
return new Response(error.toString(), {
|
|
11
|
+
status: 500,
|
|
12
|
+
})
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Config } from "@netlify/functions"
|
|
2
|
+
|
|
3
|
+
export default async (req: Request) => {
|
|
4
|
+
const { next_run } = await req.json()
|
|
5
|
+
|
|
6
|
+
console.log("Received event! Next invocation at:", next_run)
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const config: Config = {
|
|
10
|
+
schedule: "@hourly"
|
|
11
|
+
}
|