@m5kdev/commons 0.1.0

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 (77) hide show
  1. package/.cursor/rules/commons.mdc +27 -0
  2. package/.turbo/turbo-build.log +5 -0
  3. package/.turbo/turbo-check-types.log +5 -0
  4. package/.turbo/turbo-lint$colon$fix.log +6 -0
  5. package/.turbo/turbo-lint.log +61 -0
  6. package/LICENSE +621 -0
  7. package/dist/src/modules/ai/ai.constants.d.ts +55 -0
  8. package/dist/src/modules/ai/ai.constants.d.ts.map +1 -0
  9. package/dist/src/modules/ai/ai.constants.js +287 -0
  10. package/dist/src/modules/ai/ai.utils.d.ts +2 -0
  11. package/dist/src/modules/ai/ai.utils.d.ts.map +1 -0
  12. package/dist/src/modules/ai/ai.utils.js +10 -0
  13. package/dist/src/modules/auth/auth.schema.d.ts +21 -0
  14. package/dist/src/modules/auth/auth.schema.d.ts.map +1 -0
  15. package/dist/src/modules/auth/auth.schema.js +22 -0
  16. package/dist/src/modules/base/base.schema.d.ts +26 -0
  17. package/dist/src/modules/base/base.schema.d.ts.map +1 -0
  18. package/dist/src/modules/base/base.schema.js +18 -0
  19. package/dist/src/modules/billing/billing.schema.d.ts +23 -0
  20. package/dist/src/modules/billing/billing.schema.d.ts.map +1 -0
  21. package/dist/src/modules/billing/billing.schema.js +24 -0
  22. package/dist/src/modules/billing/billing.types.d.ts +18 -0
  23. package/dist/src/modules/billing/billing.types.d.ts.map +1 -0
  24. package/dist/src/modules/billing/billing.types.js +2 -0
  25. package/dist/src/modules/billing/billing.utils.d.ts +6 -0
  26. package/dist/src/modules/billing/billing.utils.d.ts.map +1 -0
  27. package/dist/src/modules/billing/billing.utils.js +12 -0
  28. package/dist/src/modules/file/file.constants.d.ts +5 -0
  29. package/dist/src/modules/file/file.constants.d.ts.map +1 -0
  30. package/dist/src/modules/file/file.constants.js +17 -0
  31. package/dist/src/modules/recurrence/recurrence.schema.d.ts +99 -0
  32. package/dist/src/modules/recurrence/recurrence.schema.d.ts.map +1 -0
  33. package/dist/src/modules/recurrence/recurrence.schema.js +65 -0
  34. package/dist/src/modules/schemas/query.schema.d.ts +111 -0
  35. package/dist/src/modules/schemas/query.schema.d.ts.map +1 -0
  36. package/dist/src/modules/schemas/query.schema.js +38 -0
  37. package/dist/src/modules/table/filter.types.d.ts +13 -0
  38. package/dist/src/modules/table/filter.types.d.ts.map +1 -0
  39. package/dist/src/modules/table/filter.types.js +2 -0
  40. package/dist/src/modules/tag/tag.schema.d.ts +112 -0
  41. package/dist/src/modules/tag/tag.schema.d.ts.map +1 -0
  42. package/dist/src/modules/tag/tag.schema.js +54 -0
  43. package/dist/src/modules/workflow/workflow.constants.d.ts +3 -0
  44. package/dist/src/modules/workflow/workflow.constants.d.ts.map +1 -0
  45. package/dist/src/modules/workflow/workflow.constants.js +4 -0
  46. package/dist/src/modules/workflow/workflow.schema.d.ts +93 -0
  47. package/dist/src/modules/workflow/workflow.schema.d.ts.map +1 -0
  48. package/dist/src/modules/workflow/workflow.schema.js +37 -0
  49. package/dist/src/utils/json.d.ts +3 -0
  50. package/dist/src/utils/json.d.ts.map +1 -0
  51. package/dist/src/utils/json.js +11 -0
  52. package/dist/src/utils/timezones.d.ts +15 -0
  53. package/dist/src/utils/timezones.d.ts.map +1 -0
  54. package/dist/src/utils/timezones.js +4362 -0
  55. package/dist/src/utils/trpc.d.ts +5 -0
  56. package/dist/src/utils/trpc.d.ts.map +1 -0
  57. package/dist/src/utils/trpc.js +8 -0
  58. package/dist/tsconfig.tsbuildinfo +1 -0
  59. package/package.json +75 -0
  60. package/src/modules/ai/ai.constants.ts +305 -0
  61. package/src/modules/ai/ai.utils.ts +14 -0
  62. package/src/modules/auth/auth.schema.ts +22 -0
  63. package/src/modules/base/base.schema.ts +27 -0
  64. package/src/modules/billing/billing.schema.ts +24 -0
  65. package/src/modules/billing/billing.types.ts +18 -0
  66. package/src/modules/billing/billing.utils.ts +13 -0
  67. package/src/modules/file/file.constants.ts +14 -0
  68. package/src/modules/recurrence/recurrence.schema.ts +78 -0
  69. package/src/modules/schemas/query.schema.ts +44 -0
  70. package/src/modules/table/filter.types.ts +39 -0
  71. package/src/modules/tag/tag.schema.ts +68 -0
  72. package/src/modules/workflow/workflow.constants.ts +2 -0
  73. package/src/modules/workflow/workflow.schema.ts +48 -0
  74. package/src/utils/json.ts +9 -0
  75. package/src/utils/timezones.ts +4380 -0
  76. package/src/utils/trpc.ts +6 -0
  77. package/tsconfig.json +10 -0
@@ -0,0 +1,27 @@
1
+ ---
2
+ alwaysApply: true
3
+ ---
4
+ # Commons Package Rules
5
+
6
+ This is a shared TypeScript utilities library that provides common functionality used across multiple server and frontend applications in the monorepo.
7
+
8
+ ## Package Purpose
9
+
10
+ The `@m5kdev/commons` package serves as a centralized location for:
11
+ - Shared type definitions and interfaces
12
+ - Common utility functions
13
+ - Shared constants and configurations
14
+
15
+ ## Testing Guidelines
16
+
17
+ - Every utility function should have unit tests
18
+ - Test edge cases and error conditions
19
+
20
+ ## Do NOT Include
21
+
22
+ - Application-specific business logic
23
+ - UI components or React hooks
24
+ - Database queries or models
25
+ - API endpoint definitions
26
+ - Environment-specific configurations
27
+ - Side effects or stateful operations
@@ -0,0 +1,5 @@
1
+
2
+ 
3
+ > @m5kdev/commons@0.1.0 build /Users/michalkow/Projects/m5kdev/packages/commons
4
+ > tsc --build
5
+
@@ -0,0 +1,5 @@
1
+
2
+ 
3
+ > @m5kdev/commons@0.1.0 check-types /Users/michalkow/Projects/m5-new/packages/commons
4
+ > tsc --noEmit
5
+
@@ -0,0 +1,6 @@
1
+
2
+ 
3
+ > @repo/commons@0.0.0 lint:fix /Users/michalkow/Projects/m5/packages/commons
4
+ > biome check . --write
5
+
6
+ Checked 7 files in 11ms. No fixes applied.
@@ -0,0 +1,61 @@
1
+
2
+ > @repo/commons@0.0.0 lint /Users/michalkow/Projects/m5/packages/commons
3
+ > biome check .
4
+
5
+ src/utils/trpc.ts:4:25 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
6
+
7
+ ! Unexpected any. Specify a different type.
8
+
9
+ 3 │ export const transformer = {
10
+ > 4 │ deserialize: (object: any) => parse(object),
11
+ │ ^^^
12
+ 5 │ serialize: (object: any) => stringify(object),
13
+ 6 │ };
14
+
15
+ i any disables many type checking rules. Its use should be avoided.
16
+
17
+
18
+ src/utils/trpc.ts:5:23 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
19
+
20
+ ! Unexpected any. Specify a different type.
21
+
22
+ 3 │ export const transformer = {
23
+ 4 │ deserialize: (object: any) => parse(object),
24
+ > 5 │ serialize: (object: any) => stringify(object),
25
+ │ ^^^
26
+ 6 │ };
27
+ 7 │
28
+
29
+ i any disables many type checking rules. Its use should be avoided.
30
+
31
+
32
+ src/modules/table/filter.types.ts format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
33
+
34
+ × Formatter would have printed the following content:
35
+
36
+ 34 34 │ [key in ColumnDataType]: FilterMethod[];␍
37
+ 35 35 │ };␍
38
+ 36 │ - ␍
39
+ 37 36 │
40
+
41
+
42
+ tsconfig.json format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
43
+
44
+ × Formatter would have printed the following content:
45
+
46
+ 4 4 │ "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo"␍
47
+ 5 5 │ }␍
48
+ 6 │ - }
49
+ 6 │ + }␍
50
+ 7 │ +
51
+
52
+
53
+ Checked 17 files in 4ms. No fixes applied.
54
+ Found 2 errors.
55
+ Found 2 warnings.
56
+ check ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
57
+
58
+ × Some errors were emitted while running checks.
59
+
60
+
61
+  ELIFECYCLE  Command failed with exit code 1.