suparisma 0.0.1 → 0.0.3

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 (38) hide show
  1. package/README.md +156 -3
  2. package/dist/config.js +12 -3
  3. package/dist/generators/coreGenerator.js +122 -40
  4. package/dist/generators/hookGenerator.js +16 -7
  5. package/dist/generators/indexGenerator.js +12 -7
  6. package/dist/generators/supabaseClientGenerator.js +5 -5
  7. package/dist/generators/typeGenerator.js +22 -22
  8. package/dist/index.js +103 -25
  9. package/{src/suparisma/generated/useSuparismaUser.ts → dist/suparisma/generated/hooks/useSuparismaUser.js} +19 -35
  10. package/dist/suparisma/generated/index.js +33 -0
  11. package/dist/suparisma/generated/types/UserTypes.js +4 -0
  12. package/dist/suparisma/generated/utils/core.js +1090 -0
  13. package/dist/suparisma/generated/utils/supabase-client.js +8 -0
  14. package/package.json +12 -2
  15. package/prisma/schema.prisma +19 -3
  16. package/tsconfig.json +1 -1
  17. package/src/config.ts +0 -7
  18. package/src/generated/hooks/useSuparismaUser.ts +0 -77
  19. package/src/generated/index.ts +0 -50
  20. package/src/generated/types/UserTypes.ts +0 -400
  21. package/src/generated/utils/core.ts +0 -1413
  22. package/src/generated/utils/supabase-client.ts +0 -7
  23. package/src/generators/coreGenerator.ts +0 -1426
  24. package/src/generators/hookGenerator.ts +0 -110
  25. package/src/generators/indexGenerator.ts +0 -117
  26. package/src/generators/supabaseClientGenerator.ts +0 -24
  27. package/src/generators/typeGenerator.ts +0 -587
  28. package/src/index.ts +0 -339
  29. package/src/parser.ts +0 -134
  30. package/src/suparisma/generated/UserTypes.ts +0 -400
  31. package/src/suparisma/generated/core.ts +0 -1413
  32. package/src/suparisma/generated/hooks/useSuparismaUser.ts +0 -77
  33. package/src/suparisma/generated/index.ts +0 -50
  34. package/src/suparisma/generated/supabase-client-generated.ts +0 -9
  35. package/src/suparisma/generated/types/UserTypes.ts +0 -400
  36. package/src/suparisma/generated/utils/core.ts +0 -1413
  37. package/src/suparisma/generated/utils/supabase-client.ts +0 -7
  38. package/src/types.ts +0 -57
@@ -1,7 +0,0 @@
1
- // THIS FILE IS AUTO-GENERATED - DO NOT EDIT DIRECTLY
2
- import { createClient } from '@supabase/supabase-js';
3
-
4
- export const supabase = createClient(
5
- process.env.NEXT_PUBLIC_SUPABASE_URL!,
6
- process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!
7
- );
package/src/types.ts DELETED
@@ -1,57 +0,0 @@
1
- // Define field types and metadata
2
- export type FieldInfo = {
3
- name: string;
4
- type: string;
5
- isRequired: boolean;
6
- isOptional: boolean;
7
- isId: boolean;
8
- isUnique: boolean;
9
- isUpdatedAt: boolean;
10
- isCreatedAt: boolean;
11
- hasDefaultValue: boolean;
12
- defaultValue?: string; // Added to track the actual default value
13
- isRelation: boolean;
14
- };
15
-
16
- // Search field information
17
- export type SearchFieldInfo = {
18
- name: string;
19
- type: string;
20
- };
21
-
22
- // Search query type
23
- export type SearchQuery = {
24
- field: string;
25
- value: string;
26
- };
27
-
28
- // Complete search state
29
- export type SearchState = {
30
- queries: SearchQuery[];
31
- loading: boolean;
32
- setQueries: (queries: SearchQuery[]) => void;
33
- addQuery: (query: SearchQuery) => void;
34
- removeQuery: (field: string) => void;
35
- clearQueries: () => void;
36
- };
37
-
38
- // Model information
39
- export type ModelInfo = {
40
- name: string;
41
- mappedName: string;
42
- fields: FieldInfo[];
43
- // Fields marked with @enableSearch annotation
44
- searchFields?: SearchFieldInfo[];
45
- };
46
-
47
- // Processed model info with additional metadata
48
- export type ProcessedModelInfo = {
49
- modelName: string;
50
- tableName: string;
51
- hasCreatedAt: boolean;
52
- hasUpdatedAt: boolean;
53
- // All searchable fields
54
- searchFields?: string[];
55
- // Add default values map
56
- defaultValues?: Record<string, string>;
57
- };