stacks 0.58.68 → 0.58.69

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 (88) hide show
  1. package/core/actions/dist/src/upgrade.js +1 -1
  2. package/core/actions/package.json +1 -1
  3. package/core/ai/package.json +1 -1
  4. package/core/alias/package.json +1 -1
  5. package/core/analytics/package.json +1 -1
  6. package/core/api/package.json +1 -1
  7. package/core/arrays/package.json +1 -1
  8. package/core/auth/package.json +1 -1
  9. package/core/buddy/dist/{chunk-6658b07ce4c24cac.js → chunk-89229d657386eb70.js} +17 -14
  10. package/core/buddy/dist/cli.js +1 -1
  11. package/core/buddy/dist/index.js +3 -1
  12. package/core/buddy/package.json +1 -1
  13. package/core/buddy/src/commands/setup.ts +19 -14
  14. package/core/build/package.json +1 -1
  15. package/core/bun-create/bud/package.json +1 -1
  16. package/core/bun-create/buddy/package.json +1 -1
  17. package/core/bun-create/stack/package.json +1 -1
  18. package/core/bun-create/stacks/package.json +1 -1
  19. package/core/bun-create/stx/package.json +1 -1
  20. package/core/bun-plugin-yaml/package.json +1 -1
  21. package/core/cache/package.json +1 -1
  22. package/core/chat/package.json +1 -1
  23. package/core/cli/dist/index.js +1 -1
  24. package/core/cli/package.json +1 -1
  25. package/core/cloud/package.json +1 -1
  26. package/core/cloud/src/cloud/aws-sdk-layer/nodejs/package.json +1 -1
  27. package/core/cloud/src/cloud/router-layer/nodejs/package.json +1 -1
  28. package/core/collections/package.json +1 -1
  29. package/core/config/package.json +1 -1
  30. package/core/database/package.json +1 -1
  31. package/core/datetime/package.json +1 -1
  32. package/core/desktop/package.json +1 -1
  33. package/core/development/package.json +1 -1
  34. package/core/dns/package.json +1 -1
  35. package/core/docs/package.json +1 -1
  36. package/core/email/package.json +1 -1
  37. package/core/enums/package.json +1 -1
  38. package/core/env/package.json +1 -1
  39. package/core/error-handling/package.json +1 -1
  40. package/core/eslint-config/package.json +1 -1
  41. package/core/events/package.json +1 -1
  42. package/core/faker/package.json +1 -1
  43. package/core/git/package.json +1 -1
  44. package/core/health/package.json +1 -1
  45. package/core/http/package.json +1 -1
  46. package/core/lint/package.json +1 -1
  47. package/core/logging/package.json +1 -1
  48. package/core/notifications/package.json +1 -1
  49. package/core/objects/package.json +1 -1
  50. package/core/orm/package.json +1 -1
  51. package/core/path/package.json +1 -1
  52. package/core/payments/package.json +1 -1
  53. package/core/push/package.json +1 -1
  54. package/core/query-builder/package.json +1 -1
  55. package/core/queue/package.json +1 -1
  56. package/core/raycast/package.json +1 -1
  57. package/core/realtime/package.json +1 -1
  58. package/core/repl/package.json +1 -1
  59. package/core/router/dist/index.js +540 -2
  60. package/core/router/package.json +1 -1
  61. package/core/router/src/router.ts +9 -1
  62. package/core/router/src/server.ts +15 -1
  63. package/core/scheduler/package.json +1 -1
  64. package/core/search-engine/package.json +1 -1
  65. package/core/security/package.json +1 -1
  66. package/core/server/package.json +1 -1
  67. package/core/signals/package.json +1 -1
  68. package/core/slug/package.json +1 -1
  69. package/core/sms/package.json +1 -1
  70. package/core/storage/package.json +1 -1
  71. package/core/strings/package.json +1 -1
  72. package/core/tables/package.json +1 -1
  73. package/core/testing/dist/index.js +1 -1
  74. package/core/testing/package.json +1 -1
  75. package/core/tinker/package.json +1 -1
  76. package/core/tunnel/package.json +1 -1
  77. package/core/types/package.json +1 -1
  78. package/core/ui/package.json +1 -1
  79. package/core/utils/dist/index.js +1 -1
  80. package/core/utils/package.json +1 -1
  81. package/core/validation/package.json +1 -1
  82. package/core/vite/dist/index.js +1 -1
  83. package/core/vite/package.json +1 -1
  84. package/core/whois/package.json +1 -1
  85. package/core/x-ray/package.json +1 -1
  86. package/core/zsh-buddy/package.json +1 -1
  87. package/ide/vscode/package.json +1 -1
  88. package/package.json +1 -1
@@ -1,5 +1,6 @@
1
1
  import type { RedirectCode, Route, RouteGroupOptions, StatusCode } from '@stacksjs/types'
2
2
  import { path as p, projectPath } from '@stacksjs/path'
3
+ import { pascalCase } from '@stacksjs/strings'
3
4
 
4
5
  export interface RouterInterface {
5
6
  get: (url: Route['url'], callback: Route['callback']) => Promise<this>
@@ -52,9 +53,12 @@ export class Router implements RouterInterface {
52
53
  const actionModule = await callback
53
54
  callback = actionModule.default
54
55
  }
56
+
55
57
  else if (typeof callback === 'string') {
56
58
  // import the module and use the default.handle function as the callback
57
59
  const actionModule = await import(p.userActionsPath(`${callback}.ts`))
60
+
61
+ path = actionModule.default.path ?? path // in case a custom path is defined inside the Action, use that instead of the path passed by the router
58
62
  callback = actionModule.default.handle
59
63
  }
60
64
 
@@ -71,7 +75,11 @@ export class Router implements RouterInterface {
71
75
  }
72
76
 
73
77
  public async job(path: Route['url']): Promise<this> {
74
- const jobModule = await import(p.userJobsPath('ExampleJob.ts'))
78
+ if (path.includes('api/')) // TODO: once the api prefix is removed from the router/api, remove this
79
+ pascalCase(path.replace(/^api\/?|^\//, ''))
80
+
81
+ // removes the potential `JobJob` suffix in case the user does not choose to use the Job suffix in their file name
82
+ const jobModule = await import(p.userJobsPath(`${path}Job.ts`.replace(/JobJob/, 'Job')))
75
83
  const callback = jobModule.default.handle
76
84
 
77
85
  this.addRoute('GET', path, callback, 200)
@@ -27,8 +27,22 @@ export async function serve(options: ServeOptions = {}) {
27
27
  }
28
28
 
29
29
  export async function serverResponse(req: Request) {
30
+ const timestamp = new Date().toISOString()
31
+
32
+ // log the request in a structured way like Laravel does in the console
33
+ // eslint-disable-next-line no-console
34
+ console.log(`${timestamp} - Incoming request: ${req.method} ${req.url}`)
35
+ // eslint-disable-next-line no-console
36
+ console.log(`${timestamp} - Headers: ${JSON.stringify(req.headers)}`)
37
+ // eslint-disable-next-line no-console
38
+ console.log(`${timestamp} - Body: ${JSON.stringify(req.body)}`)
30
39
  // eslint-disable-next-line no-console
31
- console.log('serverResponse', JSON.stringify(req))
40
+ console.log(`${timestamp} - Query: ${JSON.stringify(req.query)}`)
41
+ // eslint-disable-next-line no-console
42
+ console.log(`${timestamp} - Params: ${JSON.stringify(req.params)}`)
43
+ // eslint-disable-next-line no-console
44
+ console.log(`${timestamp} - Cookies: ${JSON.stringify(req.cookies)}`)
45
+
32
46
  const routesList: Route[] = await route.getRoutes()
33
47
  const url = new URL(req.url)
34
48
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/scheduler",
3
3
  "type": "module",
4
- "version": "0.58.68",
4
+ "version": "0.58.69",
5
5
  "description": "The Stacks scheduler.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/search-engine",
3
3
  "type": "module",
4
- "version": "0.58.68",
4
+ "version": "0.58.69",
5
5
  "description": "The Stacks search engine integrations.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/security",
3
3
  "type": "module",
4
- "version": "0.58.68",
4
+ "version": "0.58.69",
5
5
  "description": "The Stacks framework security.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/server",
3
3
  "type": "module",
4
- "version": "0.58.68",
4
+ "version": "0.58.69",
5
5
  "description": "Local development and production-ready.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/signals",
3
3
  "type": "module",
4
- "version": "0.58.68",
4
+ "version": "0.58.69",
5
5
  "description": "The Stacks signals integration, based on Maverick.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/slug",
3
3
  "type": "module",
4
- "version": "0.58.68",
4
+ "version": "0.58.69",
5
5
  "description": "The Stacks slug functionality.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/sms",
3
3
  "type": "module",
4
- "version": "0.58.68",
4
+ "version": "0.58.69",
5
5
  "description": "The Stacks SMS integration. Painlessly create & manage your inboxes, templates, and send sms.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/storage",
3
3
  "type": "module",
4
- "version": "0.58.68",
4
+ "version": "0.58.69",
5
5
  "description": "The Stacks file system.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/strings",
3
3
  "type": "module",
4
- "version": "0.58.68",
4
+ "version": "0.58.69",
5
5
  "description": "The Stacks string utilities.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stacksjs/tables",
3
- "version": "0.58.68",
3
+ "version": "0.58.69",
4
4
  "description": "The easy & modern way to work with tables. Facet filtering, searching, pagination, ...",
5
5
  "author": "Open Web Labs",
6
6
  "license": "MIT",
@@ -7015,7 +7015,7 @@ class Queue {
7015
7015
  }
7016
7016
 
7017
7017
  // /home/runner/work/stacks/stacks/node_modules/p-limit/index.js
7018
- import {AsyncResource} from "dist/source";
7018
+ import {AsyncResource} from "dist/index.";
7019
7019
 
7020
7020
  // /home/runner/work/stacks/stacks/node_modules/@vitest/utils/dist/helpers.js
7021
7021
  var assertTypes = function(value, name, types) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/testing",
3
3
  "type": "module",
4
- "version": "0.58.68",
4
+ "version": "0.58.69",
5
5
  "description": "The Stacks way of testing.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/tinker",
3
3
  "type": "module",
4
- "version": "0.58.68",
4
+ "version": "0.58.69",
5
5
  "description": "All you need to tinker.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/tunnel",
3
3
  "type": "module",
4
- "version": "0.58.68",
4
+ "version": "0.58.69",
5
5
  "description": "Local development tunnel.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/types",
3
3
  "type": "module",
4
- "version": "0.58.68",
4
+ "version": "0.58.69",
5
5
  "description": "The Stacks framework types.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/ui",
3
3
  "type": "module",
4
- "version": "0.58.68",
4
+ "version": "0.58.69",
5
5
  "description": "The Stacks UI engine.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -918,7 +918,7 @@ function prettyBytes(number, options) {
918
918
  return prefix + numberString + separator + unit;
919
919
  }
920
920
  // package.json
921
- var version = "0.58.68";
921
+ var version = "0.58.69";
922
922
  export {
923
923
  wordChar,
924
924
  wordBoundary,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/utils",
3
3
  "type": "module",
4
- "version": "0.58.68",
4
+ "version": "0.58.69",
5
5
  "description": "The Stacks helper functions.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/validation",
3
3
  "type": "module",
4
- "version": "0.58.68",
4
+ "version": "0.58.69",
5
5
  "description": "The Stacks Validation ways.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -609,7 +609,7 @@ var web_components_default = defineConfig6(({ command }) => {
609
609
  // src/plugin/docs.ts
610
610
  import {kolorist as c2} from "@stacksjs/cli";
611
611
  // package.json
612
- var version = "0.58.68";
612
+ var version = "0.58.69";
613
613
 
614
614
  // src/plugin/docs.ts
615
615
  var docsEngine = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/vite",
3
3
  "type": "module",
4
- "version": "0.58.68",
4
+ "version": "0.58.69",
5
5
  "description": "The Stacks Vite plugin.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/whois",
3
3
  "type": "module",
4
- "version": "0.58.68",
4
+ "version": "0.58.69",
5
5
  "description": "Easily get whois info.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/x-ray",
3
3
  "type": "module",
4
- "version": "0.58.68",
4
+ "version": "0.58.69",
5
5
  "description": "All you need to debug, log & analyze.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zsh-buddy",
3
3
  "type": "module",
4
- "version": "0.58.68",
4
+ "version": "0.58.69",
5
5
  "description": "A better Stacks zsh experience.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -2,7 +2,7 @@
2
2
  "publisher": "Stacks",
3
3
  "name": "vscode-stacks",
4
4
  "displayName": "Stacks",
5
- "version": "0.58.68",
5
+ "version": "0.58.69",
6
6
  "description": "A modern Stacks development environment.",
7
7
  "license": "MIT",
8
8
  "funding": "https://github.com/sponsors/chrisbbreuer",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stacks",
3
3
  "type": "module",
4
- "version": "0.58.68",
4
+ "version": "0.58.69",
5
5
  "description": "The Stacks framework.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",