create-discord-https 2.0.7 → 2.0.14

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 (24) hide show
  1. package/index.js +5 -4
  2. package/package.json +1 -1
  3. package/templates/vercel/README.md +1 -1
  4. package/templates/vercel-ts/README.md +1 -1
  5. /package/templates/vercel/{src → api/src}/DevLayer.js +0 -0
  6. /package/templates/vercel/{src → api/src}/commands/fun/joke.js +0 -0
  7. /package/templates/vercel/{src → api/src}/commands/index.js +0 -0
  8. /package/templates/vercel/{src → api/src}/commands/reply/ping.js +0 -0
  9. /package/templates/vercel/{src → api/src}/commands/utility/help.js +0 -0
  10. /package/templates/vercel/{src → api/src}/commands/utility/index.js +0 -0
  11. /package/templates/vercel/{src → api/src}/commands/utility/info.js +0 -0
  12. /package/templates/vercel/{src → api/src}/commands/utility/profile.js +0 -0
  13. /package/templates/vercel/{src → api/src}/index.js +0 -0
  14. /package/templates/vercel/{src → api/src}/spawner.js +0 -0
  15. /package/templates/vercel-ts/{src → api/src}/DevLayer.js +0 -0
  16. /package/templates/vercel-ts/{src → api/src}/commands/fun/joke.ts +0 -0
  17. /package/templates/vercel-ts/{src → api/src}/commands/index.ts +0 -0
  18. /package/templates/vercel-ts/{src → api/src}/commands/reply/ping.ts +0 -0
  19. /package/templates/vercel-ts/{src → api/src}/commands/utility/help.ts +0 -0
  20. /package/templates/vercel-ts/{src → api/src}/commands/utility/index.ts +0 -0
  21. /package/templates/vercel-ts/{src → api/src}/commands/utility/info.ts +0 -0
  22. /package/templates/vercel-ts/{src → api/src}/commands/utility/profile.ts +0 -0
  23. /package/templates/vercel-ts/{src → api/src}/index.ts +0 -0
  24. /package/templates/vercel-ts/{src → api/src}/spawner.js +0 -0
package/index.js CHANGED
@@ -65,7 +65,7 @@ const SERVERTYPE = [
65
65
  display: "JavaScript",
66
66
  color: yellow,
67
67
  secret: {
68
- token: [9 - 1, 12 - 1],
68
+ token: [9 - 1, 11 - 1],
69
69
  publicKey: [10 - 1, 15 - 1],
70
70
  },
71
71
  },
@@ -74,7 +74,7 @@ const SERVERTYPE = [
74
74
  display: "TypeScript (recommend)",
75
75
  color: blueBright,
76
76
  secret: {
77
- token: [9 - 1, 12 - 1],
77
+ token: [9 - 1, 11 - 1],
78
78
  publicKey: [10 - 1, 15 - 1],
79
79
  },
80
80
  },
@@ -253,8 +253,9 @@ 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
- await setupSecret(root, `src/index.${ext}`, secret);
257
- await setupSubdomain(root, `src/DevLayer.js`);
256
+ let srcEntry = template.startsWith("vercel") ? "api/src" : "src";
257
+ await setupSecret(root, `${srcEntry}/index.${ext}`, secret);
258
+ await setupSubdomain(root, `${srcEntry}/DevLayer.js`);
258
259
  let doneMessage = "";
259
260
  const cdProjectName = path.relative(cwd, root);
260
261
  doneMessage += `All done! Execute:\n`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-discord-https",
3
3
  "description": "Create Discord.https-powered bots with one command.",
4
- "version": "2.0.7",
4
+ "version": "2.0.14",
5
5
  "bin": {
6
6
  "create-discord-https": "index.js"
7
7
  },
@@ -1,6 +1,6 @@
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.
4
4
 
5
5
  By default, the URL is: `<vercel_url>/api/interactions`
6
6
 
@@ -1,6 +1,6 @@
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.
4
4
 
5
5
  By default, the URL is: `<vercel_url>/api/interactions`
6
6
 
File without changes
File without changes
File without changes
File without changes
File without changes