@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.
- package/.cursor/rules/commons.mdc +27 -0
- package/.turbo/turbo-build.log +5 -0
- package/.turbo/turbo-check-types.log +5 -0
- package/.turbo/turbo-lint$colon$fix.log +6 -0
- package/.turbo/turbo-lint.log +61 -0
- package/LICENSE +621 -0
- package/dist/src/modules/ai/ai.constants.d.ts +55 -0
- package/dist/src/modules/ai/ai.constants.d.ts.map +1 -0
- package/dist/src/modules/ai/ai.constants.js +287 -0
- package/dist/src/modules/ai/ai.utils.d.ts +2 -0
- package/dist/src/modules/ai/ai.utils.d.ts.map +1 -0
- package/dist/src/modules/ai/ai.utils.js +10 -0
- package/dist/src/modules/auth/auth.schema.d.ts +21 -0
- package/dist/src/modules/auth/auth.schema.d.ts.map +1 -0
- package/dist/src/modules/auth/auth.schema.js +22 -0
- package/dist/src/modules/base/base.schema.d.ts +26 -0
- package/dist/src/modules/base/base.schema.d.ts.map +1 -0
- package/dist/src/modules/base/base.schema.js +18 -0
- package/dist/src/modules/billing/billing.schema.d.ts +23 -0
- package/dist/src/modules/billing/billing.schema.d.ts.map +1 -0
- package/dist/src/modules/billing/billing.schema.js +24 -0
- package/dist/src/modules/billing/billing.types.d.ts +18 -0
- package/dist/src/modules/billing/billing.types.d.ts.map +1 -0
- package/dist/src/modules/billing/billing.types.js +2 -0
- package/dist/src/modules/billing/billing.utils.d.ts +6 -0
- package/dist/src/modules/billing/billing.utils.d.ts.map +1 -0
- package/dist/src/modules/billing/billing.utils.js +12 -0
- package/dist/src/modules/file/file.constants.d.ts +5 -0
- package/dist/src/modules/file/file.constants.d.ts.map +1 -0
- package/dist/src/modules/file/file.constants.js +17 -0
- package/dist/src/modules/recurrence/recurrence.schema.d.ts +99 -0
- package/dist/src/modules/recurrence/recurrence.schema.d.ts.map +1 -0
- package/dist/src/modules/recurrence/recurrence.schema.js +65 -0
- package/dist/src/modules/schemas/query.schema.d.ts +111 -0
- package/dist/src/modules/schemas/query.schema.d.ts.map +1 -0
- package/dist/src/modules/schemas/query.schema.js +38 -0
- package/dist/src/modules/table/filter.types.d.ts +13 -0
- package/dist/src/modules/table/filter.types.d.ts.map +1 -0
- package/dist/src/modules/table/filter.types.js +2 -0
- package/dist/src/modules/tag/tag.schema.d.ts +112 -0
- package/dist/src/modules/tag/tag.schema.d.ts.map +1 -0
- package/dist/src/modules/tag/tag.schema.js +54 -0
- package/dist/src/modules/workflow/workflow.constants.d.ts +3 -0
- package/dist/src/modules/workflow/workflow.constants.d.ts.map +1 -0
- package/dist/src/modules/workflow/workflow.constants.js +4 -0
- package/dist/src/modules/workflow/workflow.schema.d.ts +93 -0
- package/dist/src/modules/workflow/workflow.schema.d.ts.map +1 -0
- package/dist/src/modules/workflow/workflow.schema.js +37 -0
- package/dist/src/utils/json.d.ts +3 -0
- package/dist/src/utils/json.d.ts.map +1 -0
- package/dist/src/utils/json.js +11 -0
- package/dist/src/utils/timezones.d.ts +15 -0
- package/dist/src/utils/timezones.d.ts.map +1 -0
- package/dist/src/utils/timezones.js +4362 -0
- package/dist/src/utils/trpc.d.ts +5 -0
- package/dist/src/utils/trpc.d.ts.map +1 -0
- package/dist/src/utils/trpc.js +8 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +75 -0
- package/src/modules/ai/ai.constants.ts +305 -0
- package/src/modules/ai/ai.utils.ts +14 -0
- package/src/modules/auth/auth.schema.ts +22 -0
- package/src/modules/base/base.schema.ts +27 -0
- package/src/modules/billing/billing.schema.ts +24 -0
- package/src/modules/billing/billing.types.ts +18 -0
- package/src/modules/billing/billing.utils.ts +13 -0
- package/src/modules/file/file.constants.ts +14 -0
- package/src/modules/recurrence/recurrence.schema.ts +78 -0
- package/src/modules/schemas/query.schema.ts +44 -0
- package/src/modules/table/filter.types.ts +39 -0
- package/src/modules/tag/tag.schema.ts +68 -0
- package/src/modules/workflow/workflow.constants.ts +2 -0
- package/src/modules/workflow/workflow.schema.ts +48 -0
- package/src/utils/json.ts +9 -0
- package/src/utils/timezones.ts +4380 -0
- package/src/utils/trpc.ts +6 -0
- 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,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.
|