flingit 0.0.27 → 0.0.31

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 (48) hide show
  1. package/README.md +0 -2
  2. package/dist/cli/commands/cron.d.ts +13 -1
  3. package/dist/cli/commands/cron.d.ts.map +1 -1
  4. package/dist/cli/commands/cron.js +140 -44
  5. package/dist/cli/commands/cron.js.map +1 -1
  6. package/dist/cli/commands/dev.d.ts.map +1 -1
  7. package/dist/cli/commands/dev.js +11 -83
  8. package/dist/cli/commands/dev.js.map +1 -1
  9. package/dist/cli/commands/plugin.d.ts +1 -2
  10. package/dist/cli/commands/plugin.d.ts.map +1 -1
  11. package/dist/cli/commands/plugin.js +6 -7
  12. package/dist/cli/commands/plugin.js.map +1 -1
  13. package/dist/cli/commands/project.d.ts +2 -5
  14. package/dist/cli/commands/project.d.ts.map +1 -1
  15. package/dist/cli/commands/project.js +11 -18
  16. package/dist/cli/commands/project.js.map +1 -1
  17. package/dist/cli/commands/storage.d.ts.map +1 -1
  18. package/dist/cli/commands/storage.js +10 -15
  19. package/dist/cli/commands/storage.js.map +1 -1
  20. package/dist/cli/commands/whoami.d.ts +1 -0
  21. package/dist/cli/commands/whoami.d.ts.map +1 -1
  22. package/dist/cli/commands/whoami.js +6 -3
  23. package/dist/cli/commands/whoami.js.map +1 -1
  24. package/dist/cli/deploy/bundler.d.ts.map +1 -1
  25. package/dist/cli/deploy/bundler.js +14 -112
  26. package/dist/cli/deploy/bundler.js.map +1 -1
  27. package/dist/cli/utils/find-project.d.ts +22 -0
  28. package/dist/cli/utils/find-project.d.ts.map +1 -0
  29. package/dist/cli/utils/find-project.js +16 -0
  30. package/dist/cli/utils/find-project.js.map +1 -0
  31. package/dist/runtime/cron.d.ts +20 -3
  32. package/dist/runtime/cron.d.ts.map +1 -1
  33. package/dist/runtime/cron.js +52 -9
  34. package/dist/runtime/cron.js.map +1 -1
  35. package/dist/runtime/entry.d.ts +31 -0
  36. package/dist/runtime/entry.d.ts.map +1 -0
  37. package/dist/runtime/entry.js +155 -0
  38. package/dist/runtime/entry.js.map +1 -0
  39. package/dist/worker-runtime/entry.d.ts +22 -0
  40. package/dist/worker-runtime/entry.d.ts.map +1 -0
  41. package/dist/worker-runtime/entry.js +121 -0
  42. package/dist/worker-runtime/entry.js.map +1 -0
  43. package/package.json +4 -1
  44. package/templates/default/skills/fling/.hash +1 -1
  45. package/templates/default/skills/fling/DISCORD.md +15 -0
  46. package/templates/default/skills/fling/SKILL.md +2 -0
  47. package/templates/default/skills/fling/SLACK.md +15 -0
  48. package/templates/default/vite.config.ts +17 -14
@@ -1 +1 @@
1
- 22899e72887b1287e26b8e8d78f0a6e2
1
+ 339299253f11e387255fd5be8d99e37d
@@ -314,3 +314,18 @@ npm exec fling plugin remove discord # Disconnect, release all servers
314
314
  3. **One project per server** — A Discord server can only be claimed by one Fling project at a time.
315
315
 
316
316
  4. **Plugin must be installed first** — Run `fling plugin install discord` before using any Discord features. Check with `fling plugin permissions discord`.
317
+
318
+ 5. **Rate limit: 60 things/hour per project** — `reply`, `followup`, `sendMessage`, `editMessage`, and `addReaction` all count as "things". When exceeded, methods throw an error containing `PLUGIN_RATE_LIMIT_EXCEEDED`.
319
+
320
+ ```typescript
321
+ try {
322
+ await discord.sendMessage({ channelId, content: "Update" });
323
+ } catch (error) {
324
+ const message = error instanceof Error ? error.message : String(error);
325
+ if (message.includes("PLUGIN_RATE_LIMIT_EXCEEDED")) {
326
+ // Back off and retry in the next window.
327
+ return;
328
+ }
329
+ throw error;
330
+ }
331
+ ```
@@ -150,6 +150,7 @@ npm exec fling project slug:set <new-slug> # Change project slug (affects URL)
150
150
  npm exec fling cron list # List registered cron jobs
151
151
  npm exec fling cron history <name> # View invocation history
152
152
  npm exec fling cron trigger <name> # Manually trigger a cron job
153
+ npm exec fling cron trigger <name> --port 4000 # If dev API uses custom port
153
154
  npm exec fling storage list # List storage objects
154
155
  npm exec fling storage put <key> <file> # Upload file to storage
155
156
  npm exec fling storage get <key> [output] # Download object (stdout if no output)
@@ -189,6 +190,7 @@ npm exec fling -- --prod secret list # Deployed secrets
189
190
  npm exec fling -- --prod logs # Deployed logs
190
191
  npm exec fling -- --prod db sql "SELECT 1" # Deployed D1
191
192
  npm exec fling -- --prod storage list # R2 storage
193
+ npm exec fling -- --prod cron list # Deployed cron jobs
192
194
  ```
193
195
 
194
196
  **Note:** Production logs have a delay of ~10 seconds or more before they appear.
@@ -212,3 +212,18 @@ npm exec fling plugin remove slack # Disconnect, release all workspaces
212
212
  3. **One project per workspace** — A Slack workspace can only be claimed by one Fling project at a time.
213
213
 
214
214
  4. **Plugin must be installed first** — Run `fling plugin install slack` before using any Slack features. Check with `fling plugin permissions slack`.
215
+
216
+ 5. **Rate limit: 60 things/hour per project** — `sendMessage`, `editMessage`, `addReaction`, and thread replies all count as "things". When exceeded, methods throw an error containing `PLUGIN_RATE_LIMIT_EXCEEDED`.
217
+
218
+ ```typescript
219
+ try {
220
+ await slack.sendMessage({ channelId, text: "Update" });
221
+ } catch (error) {
222
+ const message = error instanceof Error ? error.message : String(error);
223
+ if (message.includes("PLUGIN_RATE_LIMIT_EXCEEDED")) {
224
+ // Back off and retry in the next window.
225
+ return;
226
+ }
227
+ throw error;
228
+ }
229
+ ```
@@ -3,19 +3,22 @@ import tailwindcss from "@tailwindcss/vite";
3
3
  import react from "@vitejs/plugin-react";
4
4
 
5
5
  export default defineConfig({
6
- base: process.env["VITE_BASE"] || "/",
7
- plugins: [tailwindcss(), react()],
8
- build: {
9
- outDir: "dist/client",
10
- emptyOutDir: true,
11
- },
12
- server: {
13
- port: 5173,
14
- proxy: {
15
- "/api": {
16
- target: "http://localhost:3210",
17
- changeOrigin: true,
18
- },
6
+ base: process.env["VITE_BASE"] || "/",
7
+ plugins: [tailwindcss(), react()],
8
+ build: {
9
+ outDir: "dist/client",
10
+ emptyOutDir: true,
11
+ },
12
+ server: {
13
+ port: 5173,
14
+ watch: {
15
+ ignored: ["**/.fling/**"],
16
+ },
17
+ proxy: {
18
+ "/api": {
19
+ target: "http://localhost:3210",
20
+ changeOrigin: true,
21
+ },
22
+ },
19
23
  },
20
- },
21
24
  });