stacks 0.47.4 → 0.48.2

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 (116) hide show
  1. package/buddy/art/social.png +0 -0
  2. package/buddy/package.json +1 -1
  3. package/buddy/src/commands/make.ts +27 -12
  4. package/buddy/src/commands/test.ts +40 -2
  5. package/core/actions/package.json +2 -2
  6. package/core/actions/src/helpers/utils.ts +29 -3
  7. package/core/actions/src/make.ts +37 -6
  8. package/core/actions/src/test-coverage.ts +1 -1
  9. package/core/actions/src/test-feature.ts +5 -0
  10. package/core/actions/src/test-unit.ts +5 -0
  11. package/core/ai/package.json +1 -1
  12. package/core/alias/package.json +1 -1
  13. package/core/arrays/package.json +1 -1
  14. package/core/auth/package.json +1 -1
  15. package/core/build/package.json +3 -3
  16. package/core/cache/package.json +3 -3
  17. package/core/chat/README.md +33 -40
  18. package/core/chat/package.json +1 -1
  19. package/core/cli/package.json +1 -1
  20. package/core/cloud/package.json +1 -1
  21. package/core/collections/package.json +1 -1
  22. package/core/config/package.json +1 -1
  23. package/core/dashboard/package.json +1 -1
  24. package/core/database/package.json +1 -1
  25. package/core/datetime/package.json +1 -1
  26. package/core/desktop/package.json +1 -1
  27. package/core/docs/node_modules/.bin/vitepress +2 -2
  28. package/core/docs/package.json +2 -2
  29. package/core/domains/package.json +1 -1
  30. package/core/drivers/package.json +1 -1
  31. package/core/email/README.md +101 -35
  32. package/core/email/package.json +1 -1
  33. package/core/error-handling/package.json +2 -2
  34. package/core/events/package.json +1 -1
  35. package/core/git/package.json +1 -1
  36. package/core/health/package.json +1 -1
  37. package/core/lint/node_modules/.bin/eslint +2 -2
  38. package/core/lint/package.json +3 -3
  39. package/core/logging/package.json +1 -1
  40. package/core/modules/package.json +1 -1
  41. package/core/notifications/README.md +7 -2
  42. package/core/notifications/package.json +1 -1
  43. package/core/notifications/src/index.ts +37 -9
  44. package/core/notifications/tests/chat/Slack.test.ts +5 -4
  45. package/core/notifications/tests/email/Mailgun.test.ts +4 -3
  46. package/core/notifications/tests/email/Sendgrid.test.ts +3 -3
  47. package/core/notifications/tests/sms/Twilio.test.ts +3 -3
  48. package/core/objects/package.json +1 -1
  49. package/core/path/package.json +1 -1
  50. package/core/path/src/index.ts +5 -0
  51. package/core/payments/package.json +1 -1
  52. package/core/push/README.md +24 -42
  53. package/core/push/package.json +1 -1
  54. package/core/realtime/package.json +1 -1
  55. package/core/router/package.json +1 -1
  56. package/core/search-engine/package.json +1 -1
  57. package/core/security/package.json +1 -1
  58. package/core/server/package.json +1 -1
  59. package/core/sms/README.md +82 -35
  60. package/core/sms/package.json +1 -1
  61. package/core/storage/package.json +1 -1
  62. package/core/storage/src/index.ts +13 -0
  63. package/core/strings/README.md +10 -2
  64. package/core/strings/package.json +4 -2
  65. package/core/strings/src/case.ts +14 -0
  66. package/core/strings/src/index.ts +4 -97
  67. package/core/strings/src/pluralize.ts +1 -0
  68. package/core/strings/src/utils.ts +80 -0
  69. package/core/strings/src/validation.ts +182 -0
  70. package/core/tables/README.md +109 -0
  71. package/core/tables/examples/vue/App.vue +12 -0
  72. package/core/tables/examples/vue/favicon.png +0 -0
  73. package/core/tables/examples/vue/index.html +20 -0
  74. package/core/tables/examples/web/favicon.png +0 -0
  75. package/core/tables/examples/web/index.html +13 -0
  76. package/core/tables/node_modules/.bin/mkdist +17 -0
  77. package/core/tables/node_modules/.bin/tsc +17 -0
  78. package/core/tables/node_modules/.bin/tsserver +17 -0
  79. package/core/tables/node_modules/.bin/unbuild +17 -0
  80. package/core/tables/package.json +97 -0
  81. package/core/tables/src/cli/index.ts +1 -0
  82. package/core/tables/src/components/Demo.vue +89 -0
  83. package/core/tables/src/components/README.md +111 -0
  84. package/core/tables/src/components/Table.vue +342 -0
  85. package/core/tables/src/components/TableBody.vue +33 -0
  86. package/core/tables/src/components/TableCellActionItems.vue +9 -0
  87. package/core/tables/src/components/TableFilters.vue +703 -0
  88. package/core/tables/src/components/TableHead.vue +87 -0
  89. package/core/tables/src/components/TablePagination.vue +146 -0
  90. package/core/tables/src/components/TableRow.vue +78 -0
  91. package/core/tables/src/components/TableSearch.vue +38 -0
  92. package/core/tables/src/components/Tooltip.vue +10 -0
  93. package/core/tables/src/config/tables.ts +1 -0
  94. package/core/tables/src/docs/index.md +0 -0
  95. package/core/tables/src/functions/README.md +8 -0
  96. package/core/tables/src/functions/dark.ts +3 -0
  97. package/core/tables/src/functions/index.ts +2 -0
  98. package/core/tables/src/functions/table.ts +180 -0
  99. package/core/tables/tests/example.test.ts +7 -0
  100. package/core/testing/node_modules/.bin/vitest +2 -2
  101. package/core/testing/package.json +9 -6
  102. package/core/types/node_modules/.bin/vitepress +2 -2
  103. package/core/types/package.json +4 -3
  104. package/core/types/src/cli.ts +10 -2
  105. package/core/types/src/hashing.ts +15 -0
  106. package/core/types/src/index.ts +2 -0
  107. package/core/types/src/notifications.ts +1 -0
  108. package/core/types/src/reactivity.ts +3 -0
  109. package/core/types/src/tables.ts +48 -0
  110. package/core/ui/node_modules/.bin/vue-tsc +2 -2
  111. package/core/ui/package.json +2 -2
  112. package/core/utils/package.json +1 -1
  113. package/core/x-ray/package.json +1 -1
  114. package/package.json +3 -2
  115. package/tsconfig.json +8 -0
  116. package/vitest.config.ts +2 -0
@@ -126,7 +126,7 @@ export type LintOptions = {
126
126
  [key in LintOption]: boolean;
127
127
  } & CliOptions
128
128
 
129
- export type MakeStringOption = 'name'
129
+ export type MakeStringOption = 'name' | 'chat' | 'sms'
130
130
  export type MakeBooleanOption = 'component' | 'page' | 'function' | 'language' | 'database' | 'migration' | 'factory' | 'notification' | 'stack'
131
131
  export type MakeOptions = {
132
132
  [key in MakeBooleanOption]: boolean
@@ -150,8 +150,10 @@ export type ExamplesOptions = {
150
150
  } & {
151
151
  [key in ExamplesBoolean]: boolean;
152
152
  } & CliOptions
153
+ export type TestOptions = CliOptions & {
154
+ showReport?: boolean
155
+ }
153
156
 
154
- export interface TestOptions extends CliOptions {}
155
157
  export interface CleanOptions extends CliOptions {}
156
158
  export interface CommitOptions extends CliOptions {}
157
159
  export interface KeyOptions extends CliOptions {}
@@ -190,6 +192,8 @@ export const enum NpmScript {
190
192
  LintFix = 'eslint . --fix',
191
193
  MakeStack = 'make:stack',
192
194
  Test = 'vitest --config vitest.config.ts',
195
+ TestUnit = 'vitest --config vitest.config.ts',
196
+ TestFeature = 'playwright test --config playwright.config.ts',
193
197
  TestUi = 'vitest --config vitest.config.ts --ui',
194
198
  TestCoverage = 'vitest --config vitest.config.ts --coverage',
195
199
  TestTypes = 'vue-tsc --noEmit',
@@ -233,9 +237,13 @@ export const enum Action {
233
237
  LintFix = 'lint-fix', // ✅
234
238
  Test = 'test', // ✅
235
239
  TestUi = 'test-ui', // ✅
240
+ TestUnit = 'test-unit', // ✅
241
+ TestFeature = 'test-feature', // wip
236
242
  TestCoverage = 'test-coverage', // ✅
243
+ ShowFeatureTestReport = 'show-feature-test-report', // wip
237
244
  Typecheck = 'typecheck', // wip
238
245
  KeyGenerate = 'key-generate', // wip
246
+ MakeNotification = 'make-notification', // wip
239
247
  }
240
248
 
241
249
  export type { CAC as CLI } from 'cac'
@@ -105,3 +105,18 @@ export interface ArgonOptions {
105
105
  */
106
106
  time?: number
107
107
  }
108
+
109
+ export type HashAlgorithm =
110
+ | 'md4'
111
+ | 'md5'
112
+ | 'sha1'
113
+ | 'sha256'
114
+ | 'sha384'
115
+ | 'sha512'
116
+ | 'ripemd128'
117
+ | 'ripemd160'
118
+ | 'tiger128'
119
+ | 'tiger160'
120
+ | 'tiger192'
121
+ | 'crc32'
122
+ | 'crc32b'
@@ -23,7 +23,9 @@ export * from './notifications'
23
23
  export * from './pages'
24
24
  export * from './promise'
25
25
  export * from './pwa'
26
+ export * from './reactivity'
26
27
  export * from './search-engine'
27
28
  export * from './ssg'
29
+ export * from './tables'
28
30
  export * from './ui'
29
31
  export * from './utils'
@@ -1,6 +1,7 @@
1
1
  import type { IChatOptions, IEmailOptions, ISendMessageSuccessResponse, ISmsOptions } from '@novu/stateless'
2
2
 
3
3
  export interface NotificationOptions {
4
+ type?: string
4
5
  driver?: string
5
6
 
6
7
  email: {
@@ -0,0 +1,3 @@
1
+ import type { Ref } from 'vue'
2
+
3
+ export type { Ref }
@@ -0,0 +1,48 @@
1
+ import type { Hits, SearchResponse } from 'meilisearch'
2
+
3
+ /**
4
+ * the TableStore interface is primarily used to unify the persisting of data to localStorage
5
+ */
6
+ export interface TableStore {
7
+ /**
8
+ * The search engine index name.
9
+ * i.e. the type of table, like `users`, `posts`, `products`, etc.
10
+ */
11
+ index: string
12
+ /**
13
+ * The search engine results object.
14
+ */
15
+ results?: SearchResponse<Record<string, any>> // optional: the Meilisearch search response (defaults: {})
16
+ /**
17
+ * The search engine hits object.
18
+ */
19
+ hits?: Hits
20
+
21
+ columns: string[] // used as table heads/column titles
22
+ source?: string // optional: the Meilisearch host name/address (defaults: http://127.0.0.1:7700)
23
+ password?: string // optional: the Meilisearch password (defaults: '')
24
+ searchable?: string | boolean // optional: determines whether the table displays the search bar (defaults: true)
25
+ query?: string // optional: the "query" (= search input) used to search the table (defaults: '')
26
+ sortable?: string | boolean // optional: determines whether the table displays the "table head"-sorts (defaults: true)
27
+ sort?: string // optional: the only active sort to be applied to the table (defaults: '')
28
+ sorts?: string | string[] // optional: the specific type of sorts to be applied to the table (defaults: [])
29
+ filterable?: string | boolean // optional: determines whether the table displays the filters component (defaults: true)
30
+ filters?: string | string[] // optional: the specific type of filters to be displayed/utilized in the table (defaults: [])
31
+ filterValue?: any[]// optional: the specific type of filters to be displayed/utilized in the table (defaults: [])
32
+ actionable?: string | boolean // optional: determines whether the table displays any "action items" (defaults: true)
33
+ actions?: string | string[] // optional: the specific type of actions to be displayed/utilized in the table (defaults: 'Edit, Delete')
34
+ perPage: number // optional: the number of rows (items) to be displayed per page (defaults: 10)
35
+ selectable?: string | boolean // optional: determines whether the table displays the checkboxes (defaults: true)
36
+ selectedRows?: number[] | string[] // optional: holds the selected rows (defaults: [])
37
+ selectedAll?: boolean // optional: determines whether all the rows are selected (defaults: false)
38
+ // stickyHeader?: string | boolean // optional: determines whether the table displays the sticky header (defaults: false)
39
+ // stickyFooter?: string | boolean // optional: determines whether the table displays the sticky footer (defaults: false)
40
+ /**
41
+ * The current page number
42
+ * @default 1
43
+ * @type {number}
44
+ * @memberof TableStore
45
+ * @example 1
46
+ */
47
+ currentPage: number
48
+ }
@@ -11,7 +11,7 @@ else
11
11
  export NODE_PATH="$NODE_PATH:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vue-tsc@1.0.18_typescript@4.9.4/node_modules/vue-tsc/bin/vue-tsc.js" "$@"
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vue-tsc@1.0.19_typescript@4.9.4/node_modules/vue-tsc/bin/vue-tsc.js" "$@"
15
15
  else
16
- exec node "$basedir/../../../../../node_modules/.pnpm/vue-tsc@1.0.18_typescript@4.9.4/node_modules/vue-tsc/bin/vue-tsc.js" "$@"
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/vue-tsc@1.0.19_typescript@4.9.4/node_modules/vue-tsc/bin/vue-tsc.js" "$@"
17
17
  fi
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/ui",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "The Stacks atomic UI engine, powered by UnoCSS.",
7
7
  "author": "Chris Breuer",
@@ -56,7 +56,7 @@
56
56
  "pinia": "^2.0.28",
57
57
  "unocss": "^0.48.0",
58
58
  "vue": "^3.2.45",
59
- "vue-tsc": "^1.0.18"
59
+ "vue-tsc": "^1.0.19"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@stacksjs/testing": "workspace:*",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/utils",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "The Stacks helper functions.",
7
7
  "author": "Chris Breuer",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/x-ray",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "All you need to debug, log & analyze.",
7
7
  "author": "Chris Breuer",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stacks",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "The Stacks framework.",
7
7
  "author": "Chris Breuer",
@@ -65,7 +65,7 @@
65
65
  },
66
66
  "web-types": "./web-types.json",
67
67
  "dependencies": {
68
- "@stacksjs/buddy": "0.47.4"
68
+ "@stacksjs/buddy": "0.48.2"
69
69
  },
70
70
  "scripts": {
71
71
  "buddy": "esno ./buddy/src/cli.ts",
@@ -127,6 +127,7 @@
127
127
  "make:function": "pnpm buddy make:function",
128
128
  "make:database": "pnpm buddy make:migration",
129
129
  "make:migration": "pnpm buddy make:migration",
130
+ "make:notification": "pnpm buddy make:notification",
130
131
  "make:factory": "pnpm buddy make:factory",
131
132
  "make:lang": "pnpm buddy make:lang",
132
133
  "make:stack": "pnpm buddy make:stack",
package/tsconfig.json CHANGED
@@ -41,6 +41,8 @@
41
41
  "@stacksjs/build/*": ["./core/build/src/*"],
42
42
  "@stacksjs/cache": ["./core/cache/src/index.ts"],
43
43
  "@stacksjs/cache/*": ["./core/cache/src/*"],
44
+ "@stacksjs/chat": ["./core/chat/src/index.ts"],
45
+ "@stacksjs/chat/*": ["./core/chat/src/*"],
44
46
  "@stacksjs/cli": ["./core/cli/src/index.ts"],
45
47
  "@stacksjs/cli/*": ["./core/cli/src/*"],
46
48
  "@stacksjs/cloud": ["./core/cloud/src/index.ts"],
@@ -57,6 +59,8 @@
57
59
  "@stacksjs/domains/*": ["./core/domains/src/*"],
58
60
  "@stacksjs/drivers": ["./core/drivers/src/index.ts"],
59
61
  "@stacksjs/drivers/*": ["./core/drivers/src/*"],
62
+ "@stacksjs/email": ["./core/email/src/index.ts"],
63
+ "@stacksjs/email/*": ["./core/email/src/*"],
60
64
  "@stacksjs/error-handling": ["./core/error-handling/src/index.ts"],
61
65
  "@stacksjs/logging": ["./core/logging/src/index.ts"],
62
66
  "@stacksjs/logging/*": ["./core/logging/src/*"],
@@ -68,6 +72,8 @@
68
72
  "@stacksjs/objects/*": ["./core/objects/src/*"],
69
73
  "@stacksjs/path": ["./core/path/src/index.ts"],
70
74
  "@stacksjs/path/*": ["./core/path/src/*"],
75
+ "@stacksjs/push": ["./core/push/src/index.ts"],
76
+ "@stacksjs/push/*": ["./core/push/src/*"],
71
77
  "@stacksjs/router": ["./core/router/src/index.ts"],
72
78
  "@stacksjs/router/*": ["./core/router/src/*"],
73
79
  "@stacksjs/search-engine": ["./core/search-engine/src/index.ts"],
@@ -76,6 +82,8 @@
76
82
  "@stacksjs/security/*": ["./core/security/src/*"],
77
83
  "@stacksjs/server": ["./core/server/src/index.ts"],
78
84
  "@stacksjs/server/*": ["./core/server/src/*"],
85
+ "@stacksjs/sms": ["./core/sms/src/index.ts"],
86
+ "@stacksjs/sms/*": ["./core/sms/src/*"],
79
87
  "@stacksjs/storage": ["./core/storage/src/index.ts"],
80
88
  "@stacksjs/storage/*": ["./core/storage/src/*"],
81
89
  "@stacksjs/strings": ["./core/strings/src/index.ts"],
package/vitest.config.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { defineConfig } from 'vitest/config'
2
+ import { projectPath } from './core/path'
2
3
  import { alias } from './core/alias'
3
4
 
4
5
  export default defineConfig({
@@ -16,6 +17,7 @@ export default defineConfig({
16
17
  globals: true,
17
18
  coverage: {
18
19
  provider: 'istanbul',
20
+ reportsDirectory: projectPath('./tests/unit/coverage'),
19
21
  },
20
22
  },
21
23
  })