@akanjs/cli 0.9.60-canary.8 → 1.0.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/cjs/index.js +16 -47
- package/cjs/src/guidelines/scalarConstant/scalarConstant.generate.json +24 -20
- package/cjs/src/guidelines/scalarConstant/scalarConstant.instruction.md +284 -326
- package/cjs/src/guidelines/scalarDictionary/scalarDictionary.generate.json +32 -32
- package/cjs/src/guidelines/scalarDictionary/scalarDictionary.instruction.md +175 -249
- package/cjs/src/templates/app/app/[lang]/page.js +19 -36
- package/cjs/src/templates/workspaceRoot/package.json.template +5 -5
- package/esm/index.js +16 -47
- package/esm/src/guidelines/scalarConstant/scalarConstant.generate.json +24 -20
- package/esm/src/guidelines/scalarConstant/scalarConstant.instruction.md +284 -326
- package/esm/src/guidelines/scalarDictionary/scalarDictionary.generate.json +32 -32
- package/esm/src/guidelines/scalarDictionary/scalarDictionary.instruction.md +175 -249
- package/esm/src/templates/app/app/[lang]/page.js +19 -36
- package/esm/src/templates/workspaceRoot/package.json.template +5 -5
- package/package.json +5 -4
- package/src/guidelines/scalarConstant/scalarConstant.instruction.md +284 -326
- package/src/guidelines/scalarDictionary/scalarDictionary.instruction.md +175 -249
- package/src/library/library.command.d.ts +0 -2
- package/src/library/library.runner.d.ts +0 -2
- package/src/library/library.script.d.ts +0 -2
- package/src/scalar/scalar.command.d.ts +1 -1
- package/cjs/src/guidelines/fieldDecorator/fieldDecorator.generate.json +0 -135
- package/cjs/src/guidelines/fieldDecorator/fieldDecorator.instruction.md +0 -606
- package/esm/src/guidelines/fieldDecorator/fieldDecorator.generate.json +0 -135
- package/esm/src/guidelines/fieldDecorator/fieldDecorator.instruction.md +0 -606
- package/src/guidelines/fieldDecorator/fieldDecorator.instruction.md +0 -606
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Field Decorator",
|
|
3
|
-
"description": "How to use @Field decorators in Akan.js",
|
|
4
|
-
"scans": [
|
|
5
|
-
{
|
|
6
|
-
"type": "source",
|
|
7
|
-
"description": "Field decorator implementation",
|
|
8
|
-
"path": "pkgs/@akanjs/constant/src/fieldMeta.ts"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"type": "source",
|
|
12
|
-
"description": "Field options and metadata interface",
|
|
13
|
-
"path": "pkgs/@akanjs/constant/src/scalar.ts"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"type": "source",
|
|
17
|
-
"description": "Base enum and type definitions",
|
|
18
|
-
"path": "pkgs/@akanjs/base/src/base.ts"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"type": "source",
|
|
22
|
-
"description": "Scalar type definitions",
|
|
23
|
-
"path": "pkgs/@akanjs/base/src/scalar.ts"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"type": "source",
|
|
27
|
-
"description": "Model class metadata implementation",
|
|
28
|
-
"path": "pkgs/@akanjs/constant/src/classMeta.ts"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"type": "source",
|
|
32
|
-
"description": "GraphQL type generation from field metadata",
|
|
33
|
-
"path": "pkgs/@akanjs/server/src/gql.ts"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"type": "source",
|
|
37
|
-
"description": "MongoDB schema generation from field metadata",
|
|
38
|
-
"path": "pkgs/@akanjs/server/src/schema.ts"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"type": "source",
|
|
42
|
-
"description": "Search indexing based on field metadata",
|
|
43
|
-
"path": "pkgs/@akanjs/server/src/searchDaemon.ts"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"type": "example",
|
|
47
|
-
"description": "Examples of Field.Prop with basic options",
|
|
48
|
-
"path": "{apps,libs}/**/lib/__scalar/*/*.constant.ts",
|
|
49
|
-
"query": "/Field\\.Prop.*default/",
|
|
50
|
-
"sample": 3
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"type": "example",
|
|
54
|
-
"description": "Examples of Field.Hidden and Field.Secret",
|
|
55
|
-
"path": "{apps,libs}/**/lib/*/*.constant.ts",
|
|
56
|
-
"query": "/Field\\.(Hidden|Secret)/",
|
|
57
|
-
"sample": 3
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"type": "example",
|
|
61
|
-
"description": "Examples of Field.Resolve for computed properties",
|
|
62
|
-
"path": "{apps,libs}/**/lib/*/*.constant.ts",
|
|
63
|
-
"query": "/Field\\.Resolve/",
|
|
64
|
-
"sample": 2
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"type": "example",
|
|
68
|
-
"description": "Examples of array field decorators",
|
|
69
|
-
"path": "{apps,libs}/**/lib/*/*.constant.ts",
|
|
70
|
-
"query": "/Field\\.Prop\\(\\(\\)\\s*=>\\s*\\[/",
|
|
71
|
-
"sample": 3
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"type": "example",
|
|
75
|
-
"description": "Examples of enum usage with Field.Prop",
|
|
76
|
-
"path": "{apps,libs}/**/lib/*/*.constant.ts",
|
|
77
|
-
"query": "/Field\\.Prop.*enum:/",
|
|
78
|
-
"sample": 3
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"type": "example",
|
|
82
|
-
"description": "Examples of text search and filter options",
|
|
83
|
-
"path": "{apps,libs}/**/lib/*/*.constant.ts",
|
|
84
|
-
"query": "/Field\\.Prop.*text:/",
|
|
85
|
-
"sample": 2
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
"type": "example",
|
|
89
|
-
"description": "Examples of validation options (min, max, minlength, etc.)",
|
|
90
|
-
"path": "{apps,libs}/**/lib/*/*.constant.ts",
|
|
91
|
-
"query": "/Field\\.Prop.*(min:|max:|minlength:|maxlength:|validate:)/",
|
|
92
|
-
"sample": 3
|
|
93
|
-
}
|
|
94
|
-
],
|
|
95
|
-
"update": {
|
|
96
|
-
"filePath": "./fieldDecorator.instruction.md",
|
|
97
|
-
"contents": [
|
|
98
|
-
"Purpose and types of Field decorators",
|
|
99
|
-
"Basic syntax and structure",
|
|
100
|
-
"Field.Prop for standard properties",
|
|
101
|
-
"Field.Hidden for database-only fields",
|
|
102
|
-
"Field.Secret for sensitive data",
|
|
103
|
-
"Field.Resolve for computed properties",
|
|
104
|
-
"Field options reference",
|
|
105
|
-
"Working with primitive types",
|
|
106
|
-
"Working with enums",
|
|
107
|
-
"Working with arrays and nested structures",
|
|
108
|
-
"Reference fields and relationships",
|
|
109
|
-
"Date and special type handling",
|
|
110
|
-
"Validation and constraints",
|
|
111
|
-
"Search optimization",
|
|
112
|
-
"Default values and immutability",
|
|
113
|
-
"Integration with Model types",
|
|
114
|
-
"Best practices",
|
|
115
|
-
"Troubleshooting common issues"
|
|
116
|
-
],
|
|
117
|
-
"rules": [
|
|
118
|
-
"Always use arrow function syntax for type specification: () => Type",
|
|
119
|
-
"Field type in the arrow function must match the TypeScript type",
|
|
120
|
-
"Use bracket notation for arrays: () => [Type] (not Array<Type>)",
|
|
121
|
-
"Always provide a default value for required fields",
|
|
122
|
-
"Mark sensitive fields with Field.Secret instead of Field.Prop",
|
|
123
|
-
"For nullable fields, add both { nullable: true } option and Type | null in TypeScript",
|
|
124
|
-
"When using enums, always create them with enumOf() and export both const and type",
|
|
125
|
-
"For date fields, use Date in the arrow function but Dayjs as the TypeScript type",
|
|
126
|
-
"Always specify the 'of' option when using Map type",
|
|
127
|
-
"Use text: 'search' for full-text searchable fields and text: 'filter' for filterable fields",
|
|
128
|
-
"Use immutable: true for fields that shouldn't change after creation",
|
|
129
|
-
"Array fields should have [] as the default value",
|
|
130
|
-
"Prefer Field.Resolve for computed properties instead of getters",
|
|
131
|
-
"Use Field.Hidden for internal fields that shouldn't be exposed in GraphQL"
|
|
132
|
-
]
|
|
133
|
-
},
|
|
134
|
-
"page": "/[lang]/akanjs/(docs)/docs/codebase/field/page.tsx"
|
|
135
|
-
}
|