create-discord-https 2.0.14 → 2.0.16
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/index.js +2 -3
- package/package.json +1 -1
- package/templates/vercel/.vercelignore +0 -4
- package/templates/vercel/README.md +2 -2
- package/templates/vercel/api/interactions.js +1 -1
- package/templates/vercel/vercel.json +9 -0
- package/templates/vercel-ts/.vercelignore +0 -4
- package/templates/vercel-ts/README.md +5 -5
- package/templates/vercel-ts/api/interactions.ts +1 -1
- package/templates/vercel-ts/vercel.json +9 -0
- /package/templates/vercel/{api/src → src}/DevLayer.js +0 -0
- /package/templates/vercel/{api/src → src}/commands/fun/joke.js +0 -0
- /package/templates/vercel/{api/src → src}/commands/index.js +0 -0
- /package/templates/vercel/{api/src → src}/commands/reply/ping.js +0 -0
- /package/templates/vercel/{api/src → src}/commands/utility/help.js +0 -0
- /package/templates/vercel/{api/src → src}/commands/utility/index.js +0 -0
- /package/templates/vercel/{api/src → src}/commands/utility/info.js +0 -0
- /package/templates/vercel/{api/src → src}/commands/utility/profile.js +0 -0
- /package/templates/vercel/{api/src → src}/index.js +0 -0
- /package/templates/vercel/{api/src → src}/spawner.js +0 -0
- /package/templates/vercel-ts/{api/src → src}/DevLayer.js +0 -0
- /package/templates/vercel-ts/{api/src → src}/commands/fun/joke.ts +0 -0
- /package/templates/vercel-ts/{api/src → src}/commands/index.ts +0 -0
- /package/templates/vercel-ts/{api/src → src}/commands/reply/ping.ts +0 -0
- /package/templates/vercel-ts/{api/src → src}/commands/utility/help.ts +0 -0
- /package/templates/vercel-ts/{api/src → src}/commands/utility/index.ts +0 -0
- /package/templates/vercel-ts/{api/src → src}/commands/utility/info.ts +0 -0
- /package/templates/vercel-ts/{api/src → src}/commands/utility/profile.ts +0 -0
- /package/templates/vercel-ts/{api/src → src}/index.ts +0 -0
- /package/templates/vercel-ts/{api/src → src}/spawner.js +0 -0
package/index.js
CHANGED
|
@@ -253,9 +253,8 @@ async function init() {
|
|
|
253
253
|
pkg.name = packageName;
|
|
254
254
|
write("package.json", JSON.stringify(pkg, null, 2) + "\n");
|
|
255
255
|
const ext = template.split("-")[1] ? "ts" : "js";
|
|
256
|
-
|
|
257
|
-
await
|
|
258
|
-
await setupSubdomain(root, `${srcEntry}/DevLayer.js`);
|
|
256
|
+
await setupSecret(root, `src/index.${ext}`, secret);
|
|
257
|
+
await setupSubdomain(root, `src/DevLayer.js`);
|
|
259
258
|
let doneMessage = "";
|
|
260
259
|
const cdProjectName = path.relative(cwd, root);
|
|
261
260
|
doneMessage += `All done! Execute:\n`;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
## Discord.https
|
|
2
2
|
|
|
3
|
-
Vercel’s serverless functions must be placed inside the api directory
|
|
3
|
+
Vercel’s serverless functions must be placed inside the `api` directory. Anything outside this directory will be served as a public asset. Therefore, `vercel.json` is used to rewrite all requests to point to `api/interactions`, so that interactions will also resolve to `api/interactions`.
|
|
4
4
|
|
|
5
|
-
By default, the URL is: `<vercel_url>/
|
|
5
|
+
By default, the URL is: `<vercel_url>/interactions`
|
|
6
6
|
|
|
7
7
|
More details:
|
|
8
8
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
## Discord.https
|
|
2
2
|
|
|
3
|
-
Vercel’s serverless functions must be placed inside the api directory
|
|
3
|
+
Vercel’s serverless functions must be placed inside the `api` directory. Anything outside this directory will be served as a public asset. Therefore, `vercel.json` is used to rewrite all requests to point to `api/interactions`, so that interactions will also resolve to `api/interactions`.
|
|
4
4
|
|
|
5
|
-
By default, the URL is: `<vercel_url>/
|
|
5
|
+
By default, the URL is: `<vercel_url>/interactions`
|
|
6
6
|
|
|
7
7
|
More details:
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
- [Vercel](https://vercel.com)
|
|
10
|
+
- [Vercel Functions Documentation](https://vercel.com/docs/functions)
|
|
11
11
|
|
|
12
12
|
### How to deploy
|
|
13
13
|
|
|
@@ -29,4 +29,4 @@ npm run dev
|
|
|
29
29
|
|
|
30
30
|
For more information, view `DevLayer.ts` or, `DevLayer.js`
|
|
31
31
|
|
|
32
|
-
You don’t need a separate TypeScript build step—Vercel handles it automatically.
|
|
32
|
+
You don’t need a separate TypeScript build step—Vercel handles it automatically.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import client from "../src/index.js";
|
|
2
2
|
import type { VercelRequest, VercelResponse } from "@vercel/node";
|
|
3
3
|
export default async function handler(req: VercelRequest, res: VercelResponse) {
|
|
4
|
-
return await client.listen("
|
|
4
|
+
return await client.listen("interactions", req, res);
|
|
5
5
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|