@simitgroup/simpleapp-generator 1.0.46 → 1.0.48

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 (147) hide show
  1. package/README.md +35 -1
  2. package/buildinschemas copy/docnoformat.docno.jsonschema.json +2 -20
  3. package/dist/buildinschemas/autoincreament.js +1 -1
  4. package/dist/buildinschemas/autoincreament.js.map +1 -1
  5. package/dist/buildinschemas/branch.js +1 -1
  6. package/dist/buildinschemas/branch.js.map +1 -1
  7. package/dist/buildinschemas/docnoformat.d.ts.map +1 -1
  8. package/dist/buildinschemas/docnoformat.js +12 -25
  9. package/dist/buildinschemas/docnoformat.js.map +1 -1
  10. package/dist/buildinschemas/user.d.ts.map +1 -1
  11. package/dist/buildinschemas/user.js +1 -0
  12. package/dist/buildinschemas/user.js.map +1 -1
  13. package/dist/framework.d.ts.map +1 -1
  14. package/dist/framework.js +11 -3
  15. package/dist/framework.js.map +1 -1
  16. package/dist/generate.js +33 -22
  17. package/dist/generate.js.map +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/index.js.map +1 -1
  20. package/dist/processors/jsonschemabuilder.d.ts.map +1 -1
  21. package/dist/processors/jsonschemabuilder.js +10 -0
  22. package/dist/processors/jsonschemabuilder.js.map +1 -1
  23. package/dist/type.d.ts +115 -22
  24. package/dist/type.d.ts.map +1 -1
  25. package/dist/type.js.map +1 -1
  26. package/package.json +1 -1
  27. package/src/buildinschemas/autoincreament.ts +1 -1
  28. package/src/buildinschemas/branch.ts +1 -1
  29. package/src/buildinschemas/docnoformat.ts +13 -27
  30. package/src/buildinschemas/user.ts +1 -0
  31. package/src/framework.ts +11 -3
  32. package/src/generate.ts +35 -22
  33. package/src/index.ts +1 -1
  34. package/src/processors/jsonschemabuilder.ts +14 -1
  35. package/src/type.ts +137 -22
  36. package/templates/basic/nest/processor.ts.eta +5 -3
  37. package/templates/basic/nest/service.ts.eta +2 -4
  38. package/templates/basic/nuxt/pages.crud.vue.eta +3 -2
  39. package/templates/basic/nuxt/simpleapp.generate.client.ts.eta +18 -2
  40. package/templates/nest/src/app.controller.ts.eta +6 -0
  41. package/templates/nest/src/app.module.ts.eta +9 -1
  42. package/templates/nest/src/app.service.ts.eta +6 -0
  43. package/templates/nest/src/main.ts.eta +7 -0
  44. package/templates/nest/src/simpleapp/generate/apischemas/index.ts.eta +6 -2
  45. package/templates/nest/src/simpleapp/generate/commons/audittrail.service.ts.eta +17 -0
  46. package/templates/nest/src/simpleapp/generate/commons/decorators/appuser.decorator.ts.eta +6 -0
  47. package/templates/nest/src/simpleapp/generate/commons/dicts/documents.ts.eta +14 -0
  48. package/templates/nest/src/simpleapp/generate/commons/dicts/foreignkeys.ts.eta +6 -0
  49. package/templates/nest/src/simpleapp/generate/commons/docnogenerator.service.ts.eta +9 -3
  50. package/templates/nest/src/simpleapp/generate/commons/exceptions/SimpleAppExceptionFilter.ts.eta +23 -3
  51. package/templates/nest/src/simpleapp/generate/commons/interceptors/response.interceptor.ts.eta +52 -10
  52. package/templates/nest/src/simpleapp/generate/commons/middlewares/tenant.middleware.ts.eta +6 -0
  53. package/templates/nest/src/simpleapp/generate/commons/providers/workflow.provider.ts.etax +6 -0
  54. package/templates/nest/src/simpleapp/generate/commons/roles/roles.decorator.ts.eta +6 -1
  55. package/templates/nest/src/simpleapp/generate/commons/roles/roles.enum.ts.eta +6 -0
  56. package/templates/nest/src/simpleapp/generate/commons/roles/roles.group.ts.eta +6 -0
  57. package/templates/nest/src/simpleapp/generate/commons/roles/roles.guard.ts.eta +6 -1
  58. package/templates/nest/src/simpleapp/generate/commons/user.context.ts.eta +15 -7
  59. package/templates/nest/src/simpleapp/generate/controllers/simpleapp.controller.ts.eta +6 -0
  60. package/templates/nest/src/simpleapp/generate/models/apievent.model.ts.eta +27 -0
  61. package/templates/nest/src/simpleapp/generate/models/perm.model.ts.eta +3 -4
  62. package/templates/nest/src/simpleapp/generate/models/tenant.model.ts.eta +3 -5
  63. package/templates/nest/src/simpleapp/generate/models/user.model.ts.eta +3 -4
  64. package/templates/nest/src/simpleapp/generate/processors/simpleapp.processor.ts.eta +54 -12
  65. package/templates/nest/src/simpleapp/generate/types/apievent.type.ts.eta +22 -0
  66. package/templates/nest/src/simpleapp/generate/types/index.ts.eta +6 -0
  67. package/templates/nest/src/simpleapp/profile/profile.apischema.ts.eta +6 -0
  68. package/templates/nest/src/simpleapp/profile/profile.controller.ts.eta +6 -0
  69. package/templates/nest/src/simpleapp/profile/profile.service.ts.eta +6 -0
  70. package/templates/nest/src/simpleapp/profile/profile.types.ts.eta +6 -0
  71. package/templates/nest/src/simpleapp/services/autoinc.service.ts.eta +5 -6
  72. package/templates/nest/src/simpleapp/services/branch.service.ts.eta +50 -10
  73. package/templates/nest/src/simpleapp/services/docno.service.ts.eta +9 -10
  74. package/templates/nest/src/simpleapp/services/org.service.ts.eta +4 -6
  75. package/templates/nest/src/simpleapp/services/perm.service.ts.eta +6 -7
  76. package/templates/nest/src/simpleapp/services/tenant.service.ts.eta +5 -6
  77. package/templates/nest/src/simpleapp/services/user.service.ts.eta +5 -6
  78. package/templates/nest/src/simpleapp/simpleapp.module.ts.eta +6 -8
  79. package/templates/nuxt/app.vue.eta +6 -1
  80. package/templates/nuxt/assets/css/style.css._eta +12 -0
  81. package/templates/nuxt/assets/css/tailwind.css._eta +10 -0
  82. package/templates/nuxt/assets/primevue/passthrough.ts._eta +37 -0
  83. package/templates/nuxt/components/ButtonCreateTenant.vue.eta +68 -0
  84. package/templates/nuxt/components/ButtonHome.vue.eta +10 -0
  85. package/templates/nuxt/components/ButtonLogout.vue.eta +9 -0
  86. package/templates/nuxt/components/ButtonMenuPicker.vue.eta +55 -0
  87. package/templates/nuxt/components/ButtonPermissionInfo.vue.eta +113 -0
  88. package/templates/nuxt/components/ButtonProfile.vue.eta +52 -0
  89. package/templates/nuxt/components/CrudNestedDoc.vue.eta +16 -8
  90. package/templates/nuxt/components/CrudSimple.vue.eta +13 -11
  91. package/templates/nuxt/components/DebugDocumentData.vue.eta +1 -1
  92. package/templates/nuxt/components/HeaderBar.vue.eta +39 -0
  93. package/templates/nuxt/components/Invitation.vue.eta +2 -2
  94. package/templates/nuxt/components/ListView.vue.eta +52 -0
  95. package/templates/nuxt/components/Menus.vue.eta +6 -6
  96. package/templates/nuxt/components/SelectBranch.vue.eta +35 -0
  97. package/templates/nuxt/components/SimpleAppDatatable.vue.eta +0 -1
  98. package/templates/nuxt/components/SimpleAppDocumentNo.vue.eta +2 -2
  99. package/templates/nuxt/components/SimpleAppInputTable.vue.eta +2 -2
  100. package/templates/nuxt/components/SimpleFieldContainer.vue.eta +18 -12
  101. package/templates/nuxt/components/Spinner.vue.eta +9 -0
  102. package/templates/nuxt/composables/getMenus.generate.ts.eta +5 -4
  103. package/templates/nuxt/layouts/default.vue.eta +3 -12
  104. package/templates/nuxt/layouts/sidelistcrud.vue.eta +43 -0
  105. package/templates/nuxt/middleware/{10.acl.global.ts.eta → 30.acl.global.ts.eta} +6 -0
  106. package/templates/nuxt/nuxt.config.ts.eta +55 -12
  107. package/templates/nuxt/pages/[xorg]/docnoformat/index.vue.eta +274 -247
  108. package/templates/nuxt/pages/[xorg]/index.vue._eta +13 -0
  109. package/templates/nuxt/pages/[xorg]/organization/index.vue.eta +89 -65
  110. package/templates/nuxt/pages/[xorg]/permission/index.vue.eta +7 -7
  111. package/templates/nuxt/pages/[xorg]/user/index.vue.eta +33 -33
  112. package/templates/nuxt/pages/index.vue.eta +10 -85
  113. package/templates/nuxt/pages/login.vue.eta +9 -3
  114. package/templates/nuxt/plugins/10.simpleapp-event.ts.eta +16 -19
  115. package/templates/nuxt/plugins/20.simpleapp-userstore.ts.eta +19 -3
  116. package/templates/nuxt/plugins/50.simpleapp-client.ts.eta +4 -4
  117. package/templates/nuxt/server/api/[xorg]/[...].ts.eta +4 -4
  118. package/templates/nuxt/server/api/auth/[...].ts.eta +6 -0
  119. package/templates/nuxt/server/api/auth/logout.ts.eta +6 -1
  120. package/templates/nuxt/server/api/profile/[...].ts.eta +4 -5
  121. package/templates/nuxt/server/api/profile/index.ts.eta +4 -6
  122. package/templates/nuxt/simpleapp/generate/clients/SimpleAppClient.ts.eta +9 -2
  123. package/templates/nuxt/simpleapp/generate/commons/documents.ts.eta +12 -3
  124. package/templates/nuxt/simpleapp/generate/commons/events.ts.eta +6 -0
  125. package/templates/nuxt/simpleapp/generate/commons/groups.ts.eta +6 -0
  126. package/templates/nuxt/simpleapp/generate/commons/roles.ts.eta +6 -0
  127. package/templates/nuxt/tailwind.config.ts._eta +66 -0
  128. package/templates/nuxt/types/index.ts.eta +22 -1
  129. package/templates/project/build.sh.eta +4 -4
  130. package/templates/project/schemas/category.ts.eta +40 -27
  131. package/templates/project/schemas/customer.ts.eta +35 -0
  132. package/templates/project/schemas/index.ts.eta +4 -4
  133. package/templates/project/schemas/invoice.ts.eta +56 -0
  134. package/templates/project/schemas/product.ts.eta +41 -57
  135. package/templates/project/sharelibs/index.ts.eta +2 -0
  136. package/templates/project/sharelibs/money.ts.eta +17 -0
  137. package/tsconfig.tsbuildinfo +1 -1
  138. package/templates/nuxt/assets/css/tailwind.css.eta +0 -35
  139. package/templates/nuxt/components/PermissionInfo.vue.eta +0 -92
  140. package/templates/nuxt/pages/[xorg]/index.vue.eta +0 -36
  141. package/templates/nuxt/tailwind.config.ts.eta +0 -9
  142. package/templates/project/shares/index.ts.eta +0 -2
  143. /package/templates/nest/{.env.eta → .env._eta} +0 -0
  144. /package/templates/nuxt/{.env.eta → .env._eta} +0 -0
  145. /package/templates/nuxt/pages/[xorg]/branch/{index.vue.eta → index.vue.etax} +0 -0
  146. /package/templates/project/{config.json.eta → config.json._eta} +0 -0
  147. /package/templates/project/{shares → sharelibs}/hello.ts.eta +0 -0
package/dist/type.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { JSONSchema7, JSONSchema7Definition } from 'json-schema';
1
+ import { JSONSchema7Type, JSONSchema7Version, JSONSchema7TypeName, JSONSchema7Definition } from 'json-schema';
2
2
  export type ChildModels = {
3
3
  [key: string]: {
4
4
  type: string;
@@ -51,6 +51,7 @@ export type ModuleObject = {
51
51
  docname: string;
52
52
  pagetype: string;
53
53
  api: DocumentApi[];
54
+ schema: SimpleAppJSONSchema7;
54
55
  };
55
56
  export type TypeGenerateDocumentVariable = {
56
57
  name: string;
@@ -64,7 +65,7 @@ export type TypeGenerateDocumentVariable = {
64
65
  typename: string;
65
66
  fullApiSchemaName: string;
66
67
  fullTypeName: string;
67
- jsonschema: JSONSchema7;
68
+ jsonschema: SimpleAppJSONSchema7;
68
69
  bothEndCode: string;
69
70
  frontEndCode: string;
70
71
  backEndCode: string;
@@ -116,10 +117,6 @@ export declare enum IsolationType {
116
117
  "org" = "org",
117
118
  "branch" = "branch"
118
119
  }
119
- export type ImportLibs = {
120
- "lib": string;
121
- "as": string;
122
- };
123
120
  export type Formula = {
124
121
  "jsonpath": string;
125
122
  "formula": string;
@@ -135,30 +132,126 @@ export type SchemaConfig = {
135
132
  allStatus?: DocumentStatus[];
136
133
  additionalApis?: DocumentApi[];
137
134
  additionalAutoCompleteFields?: string[];
138
- libs?: ImportLibs[];
139
135
  formulas?: Formula[];
140
136
  documentType: string;
141
137
  documentName: string;
142
138
  collectionName?: string;
143
139
  foreignKeys?: MyForeignKey;
144
140
  };
145
- export type ForeignKeyProperty = {
146
- 'x-foreignkey'?: string;
147
- };
148
141
  export type SchemaFields = {
149
- _id: JSONSchema7;
150
- tenantId: JSONSchema7 & ForeignKeyProperty;
151
- orgId: JSONSchema7 & ForeignKeyProperty;
152
- branchId: JSONSchema7 & ForeignKeyProperty;
153
- created: JSONSchema7;
154
- updated: JSONSchema7;
155
- createdby: JSONSchema7;
156
- updatedby: JSONSchema7;
157
- [key: string]: JSONSchema7 & ForeignKeyProperty;
158
- };
159
- export type AdditionalSchemaType = {
142
+ _id: SimpleAppJSONSchema7;
143
+ tenantId: SimpleAppJSONSchema7;
144
+ orgId: SimpleAppJSONSchema7;
145
+ branchId: SimpleAppJSONSchema7;
146
+ created: SimpleAppJSONSchema7;
147
+ updated: SimpleAppJSONSchema7;
148
+ createdby: SimpleAppJSONSchema7;
149
+ updatedby: SimpleAppJSONSchema7;
150
+ [key: string]: SimpleAppJSONSchema7 | SimpleAppJSONSchema7[] | undefined;
151
+ };
152
+ export type SchemaType = {
153
+ type: string;
154
+ definitions?: SimpleAppJSONSchema7;
155
+ required?: string[];
160
156
  "x-simpleapp-config": SchemaConfig;
161
157
  properties: SchemaFields;
162
158
  };
163
- export type SchemaType = JSONSchema7 & AdditionalSchemaType;
159
+ export type SimpleAppJSONSchema7Definition = SimpleAppJSONSchema7 | boolean;
160
+ export interface SimpleAppJSONSchema7 {
161
+ 'x-foreignkey'?: string;
162
+ $id?: string | undefined;
163
+ $ref?: string | undefined;
164
+ $schema?: JSONSchema7Version | undefined;
165
+ $comment?: string | undefined;
166
+ /**
167
+ * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.4
168
+ * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A
169
+ */
170
+ $defs?: {
171
+ [key: string]: JSONSchema7Definition;
172
+ } | undefined;
173
+ /**
174
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1
175
+ */
176
+ type?: JSONSchema7TypeName | JSONSchema7TypeName[] | undefined;
177
+ enum?: JSONSchema7Type[] | undefined;
178
+ const?: JSONSchema7Type | undefined;
179
+ /**
180
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2
181
+ */
182
+ multipleOf?: number | undefined;
183
+ maximum?: number | undefined;
184
+ exclusiveMaximum?: number | undefined;
185
+ minimum?: number | undefined;
186
+ exclusiveMinimum?: number | undefined;
187
+ /**
188
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3
189
+ */
190
+ maxLength?: number | undefined;
191
+ minLength?: number | undefined;
192
+ pattern?: string | undefined;
193
+ /**
194
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4
195
+ */
196
+ items?: SimpleAppJSONSchema7Definition | SimpleAppJSONSchema7Definition[] | undefined;
197
+ additionalItems?: JSONSchema7Definition | undefined;
198
+ maxItems?: number | undefined;
199
+ minItems?: number | undefined;
200
+ uniqueItems?: boolean | undefined;
201
+ contains?: SimpleAppJSONSchema7Definition | undefined;
202
+ /**
203
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5
204
+ */
205
+ maxProperties?: number | undefined;
206
+ minProperties?: number | undefined;
207
+ required?: string[] | undefined;
208
+ properties?: {
209
+ [key: string]: SimpleAppJSONSchema7Definition;
210
+ } | undefined;
211
+ patternProperties?: {
212
+ [key: string]: SimpleAppJSONSchema7Definition;
213
+ } | undefined;
214
+ additionalProperties?: SimpleAppJSONSchema7Definition | undefined;
215
+ dependencies?: {
216
+ [key: string]: SimpleAppJSONSchema7Definition | string[];
217
+ } | undefined;
218
+ propertyNames?: SimpleAppJSONSchema7Definition | undefined;
219
+ /**
220
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6
221
+ */
222
+ if?: SimpleAppJSONSchema7Definition | undefined;
223
+ then?: SimpleAppJSONSchema7Definition | undefined;
224
+ else?: SimpleAppJSONSchema7Definition | undefined;
225
+ /**
226
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7
227
+ */
228
+ allOf?: SimpleAppJSONSchema7Definition[] | undefined;
229
+ anyOf?: SimpleAppJSONSchema7Definition[] | undefined;
230
+ oneOf?: SimpleAppJSONSchema7Definition[] | undefined;
231
+ not?: SimpleAppJSONSchema7Definition | undefined;
232
+ /**
233
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
234
+ */
235
+ format?: string | undefined;
236
+ /**
237
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8
238
+ */
239
+ contentMediaType?: string | undefined;
240
+ contentEncoding?: string | undefined;
241
+ /**
242
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9
243
+ */
244
+ definitions?: {
245
+ [key: string]: JSONSchema7Definition;
246
+ } | undefined;
247
+ /**
248
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10
249
+ */
250
+ title?: string | undefined;
251
+ description?: string | undefined;
252
+ default?: JSONSchema7Type | undefined;
253
+ readOnly?: boolean | undefined;
254
+ writeOnly?: boolean | undefined;
255
+ examples?: JSONSchema7Type | undefined;
256
+ }
164
257
  //# sourceMappingURL=type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../src/type.ts"],"names":[],"mappings":"AAAA,OAAQ,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAClE,MAAM,MAAM,WAAW,GAAG;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG;QACb,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,WAAW,CAAC;QACnB,SAAS,EAAC,MAAM,CAAC;QACjB,SAAS,EAAC,MAAM,CAAC;QACjB,gBAAgB,CAAC,EAAC,MAAM,EAAE,CAAC;QAC3B,iBAAiB,CAAC,EAAC,cAAc,EAAE,CAAC;QACpC,WAAW,CAAC,EAAC,WAAW,EAAE,CAAC;QAE3B,aAAa,EAAC,MAAM,CAAA;QACpB,YAAY,EAAC,OAAO,CAAC;QACrB,WAAW,EAAC,YAAY,CAAA;KACzB,CAAC;CACH,CAAC;AACF,oBAAY,UAAU;IACpB,QAAQ,WAAW;IACnB,QAAQ,WAAW;IACnB,OAAO,UAAU;IACjB,SAAS,YAAY;IACrB,SAAS,YAAY;IACrB,QAAQ,WAAW;CACpB;AACD,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;IAEjB,MAAM,CAAC,EAAE,MAAM,CAAC;I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AAe,CAAA;AAAA,CAAC,EAAvF,WAAW,2BAAX,WAAW,QAA4E;AAUnG,IAAY,aAAgF;AAA5F,WAAY,aAAa;IAAE,8BAAa,CAAA;IAAG,kCAAiB,CAAA;IAAC,4BAAW,CAAA;IAAE,kCAAiB,CAAA;AAAA,CAAC,EAAhF,aAAa,6BAAb,aAAa,QAAmE"}
1
+ {"version":3,"file":"type.js","sourceRoot":"","sources":["../src/type.ts"],"names":[],"mappings":";;;AAgBA,IAAY,UAOX;AAPD,WAAY,UAAU;IACpB,+BAAmB,CAAA;IACnB,+BAAmB,CAAA;IACnB,6BAAiB,CAAA;IACjB,iCAAqB,CAAA;IACrB,iCAAqB,CAAA;IACrB,+BAAmB,CAAA;AACrB,CAAC,EAPW,UAAU,0BAAV,UAAU,QAOrB;AA4FD,IAAY,WAAuF;AAAnG,WAAY,WAAW;IAAE,4BAAa,CAAA;IAAC,0BAAW,CAAA;IAAE,gCAAiB,CAAA;IAAC,0BAAW,CAAA;IAAE,8BAAe,CAAA;AAAA,CAAC,EAAvF,WAAW,2BAAX,WAAW,QAA4E;AAUnG,IAAY,aAAgF;AAA5F,WAAY,aAAa;IAAE,8BAAa,CAAA;IAAG,kCAAiB,CAAA;IAAC,4BAAW,CAAA;IAAE,kCAAiB,CAAA;AAAA,CAAC,EAAhF,aAAa,6BAAb,aAAa,QAAmE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simitgroup/simpleapp-generator",
3
- "version": "1.0.46",
3
+ "version": "1.0.48",
4
4
  "description": "frontend nuxtjs and backend nests code generator using jsonschema",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -5,7 +5,7 @@ export const autoincreament:SchemaType = {
5
5
  "x-simpleapp-config":{
6
6
  documentType:'autoinc',
7
7
  documentName:'autoincreament',
8
- isolationType:IsolationType.tenant,
8
+ isolationType:IsolationType.none,
9
9
  pageType:"crud",
10
10
  additionalApis:[{
11
11
  action:"genNextNumber",
@@ -6,7 +6,7 @@ export const branch:SchemaType ={
6
6
  isolationType:IsolationType.tenant,
7
7
  documentType:'branch',
8
8
  documentName:'branch',
9
- pageType:"crud",
9
+ // pageType:"crud",
10
10
  uniqueKey:'branchCode',
11
11
  documentTitle:'branchName',
12
12
  additionalAutoCompleteFields: ['branchId']
@@ -18,8 +18,7 @@ export const docnoformat:SchemaType ={
18
18
  "execute":"listDocFormats",
19
19
  "description":"get list of document format for 1 doctype"
20
20
  } ]
21
- },
22
-
21
+ },
23
22
  properties: {
24
23
  _id:{type:'string'},
25
24
  created:{type:'string'},
@@ -29,30 +28,17 @@ export const docnoformat:SchemaType ={
29
28
  tenantId: {type:'integer',default:1,minimum:1 },
30
29
  orgId: {type:'integer',default:1,minimum:1 },
31
30
  branchId: {type:'integer',default:1,minimum:1 },
32
- "docNoFormatNo": {"type": "string","examples": ["INV"]},
33
- "docNoFormatName": { "type": "string", "examples": ["Invoice Default Format"]},
34
- "active": {"type": "boolean","examples": [true],"default":true},
35
- "default":{"type": "boolean","examples": [true],"default":true},
36
- "docNoType": {"type": "string","examples": ["SI","PI"]},
37
- "docNoPattern": {"type": "string","examples": ["SI{YYMM}-<000>","PI-2023-<0000>"],"description":"{date} format as ISO8601 symbol"},
38
- "isMonthly": {"type": "boolean","examples": [false]},
39
- "nextNumber":{"type":"integer","examples":[1],"default":1},
40
- "monthlySetting": {
41
- "type": "object",
42
- "properties": {
43
- "jan": {"type": "integer","default":1},
44
- "feb": {"type": "integer","default":1},
45
- "mar": {"type": "integer","default":1},
46
- "apr": {"type": "integer","default":1},
47
- "may": {"type": "integer","default":1},
48
- "jun": {"type": "integer","default":1},
49
- "jul": {"type": "integer","default":1},
50
- "aug": {"type": "integer","default":1},
51
- "sep": {"type": "integer","default":1},
52
- "oct": {"type": "integer","default":1},
53
- "nov": {"type": "integer","default":1},
54
- "dec": {"type": "integer","default":1}
55
- }
56
- }
31
+ branch:{type:"object", "x-foreignkey":"branch",properties:{
32
+ "_id":{"type":"string"},
33
+ "label":{"type":"string"},
34
+ "branchId":{type:"integer"},
35
+ }},
36
+ docNoFormatNo: {"type": "string","examples": ["INV"]},
37
+ docNoFormatName: { "type": "string", "examples": ["Invoice Default Format"]},
38
+ active: {type: "boolean","examples": [true],default:true},
39
+ default:{type: "boolean","examples": [true],default:true},
40
+ docNoType: {type: "string","examples": ["SI","PI"]},
41
+ docNoPattern: {type: "string","examples": ["SI{YYMM}-<000>","PI-2023-<0000>"],"description":"{date} format as ISO8601 symbol"},
42
+ nextNumber:{type:"integer",default:1}
57
43
  }
58
44
  }
@@ -5,6 +5,7 @@ export const user:SchemaType ={
5
5
  "x-simpleapp-config":{
6
6
  documentType:'user',
7
7
  documentName:'user',
8
+ pageType:'crud',
8
9
  isolationType:IsolationType.tenant,
9
10
  uniqueKey:'email',
10
11
  documentTitle:'fullname',
package/src/framework.ts CHANGED
@@ -12,7 +12,7 @@ let config = {
12
12
  "backendFolder":"./backend",
13
13
  "groupFolder":"./groups",
14
14
  "backendPort":"8000",
15
- "mongoConnectStr":'mongodb://user:pass@localhost:27017/simpleapp?authMechanism=DEFAULT',
15
+ "mongoConnectStr":'mongodb://localhost:27017/simpleapp',
16
16
  "frontendFolder":"./frontend",
17
17
  "frontendPort":"8080",
18
18
  "oauthSetting":{
@@ -126,6 +126,14 @@ export const prepareProject = async (callback)=>{
126
126
  // log.info(fullfilename+"====>>"+tofilename)
127
127
  // console.log(txt)
128
128
  writeFileSync(tofilename,txt)
129
+ }else if(filename.includes('._eta')){
130
+ const tofilename =targetfolder + filename.replace('._eta','')
131
+ log.info(tofilename,"Render file")
132
+ const txt = eta.render(fullfilename,vars)
133
+ if(!existsSync(tofilename)){
134
+ writeFileSync(tofilename,txt)
135
+ }
136
+
129
137
  }else if(filename.includes('.md')){
130
138
  const tofilename =dir + filename.replace('.eta','')
131
139
  log.info(tofilename,"Copy")
@@ -149,10 +157,10 @@ export const prepareNuxt = (callback:Function)=>{
149
157
  const targetfolder = config.frontendFolder
150
158
  if(!fs.existsSync(`${targetfolder}/.env`)){
151
159
  //asume no environment. prepare now
152
- exec(`cd ${targetfolder};pnpm install;pnpm install -D @nuxtjs/tailwindcss @sidebase/nuxt-auth @nuxt/ui @types/node @vueuse/nuxt @sidebase/nuxt-auth @vueuse/core nuxt-security prettier `, (error, stdout, stderr)=>{
160
+ exec(`cd ${targetfolder};pnpm install;pnpm install -D nuxt-primevue @nuxtjs/tailwindcss @sidebase/nuxt-auth @nuxt/ui @types/node @vueuse/nuxt @sidebase/nuxt-auth @vueuse/core prettier `, (error, stdout, stderr)=>{
153
161
  //;pnpm install
154
162
  console.log(error, stdout, stderr)
155
- exec(`cd ${targetfolder};pnpm install --save pinia @pinia/nuxt @nuxt/kit lodash @types/lodash @darkwolf/base64url next-auth@4.21.1 @darkwolf/base64url @nuxt/ui ajv ajv-formats ajv-errors dotenv @fullcalendar/core @fullcalendar/vue3 quill primeflex primeicons prettier primevue axios json-schema mitt @simitgroup/simpleapp-vue-component@latest`, (error, stdout, stderr)=>{
163
+ exec(`cd ${targetfolder};pnpm install --save primeicons moment memory-cache jsonpath pinia @pinia/nuxt @nuxt/kit lodash @types/lodash @darkwolf/base64url next-auth@4.21.1 @darkwolf/base64url @nuxt/ui ajv ajv-formats ajv-errors dotenv @fullcalendar/core @fullcalendar/vue3 quill prettier axios json-schema mitt `, (error, stdout, stderr)=>{
156
164
  console.log(error, stdout, stderr)
157
165
 
158
166
  // fs.mkdirSync(`${targetfolder}/assets/css/`,{recursive:true})
package/src/generate.ts CHANGED
@@ -12,14 +12,14 @@ import * as buildinschemas from './buildinschemas'
12
12
  import { JSONSchema7 } from 'json-schema';
13
13
  const { Eta } = require('eta');
14
14
  const { capitalizeFirstLetter }= require('./libs');
15
- const X_DOCUMENT_TYPE='x-document-type'
16
- const X_DOCUMENT_NAME='x-document-name'
17
- const X_COLLECTION_NAME='x-collection-name'
18
- const X_PAGE_TYPE='x-page-type'
19
- const extFb = '.xfb.json';
20
- const extHfb = '.xhfb.json';
21
- const extjsonschema = '.jsonschema.json';
22
- const extgroups = '.group.json';
15
+ // const X_DOCUMENT_TYPE='x-document-type'
16
+ // const X_DOCUMENT_NAME='x-document-name'
17
+ // const X_COLLECTION_NAME='x-collection-name'
18
+ const X_SIMPLEAPP_CONFIG='x-simpleapp-config'
19
+ // const extFb = '.xfb.json';
20
+ // const extHfb = '.xhfb.json';
21
+ // const extjsonschema = '.jsonschema.json';
22
+ // const extgroups = '.group.json';
23
23
  let jsonschemas = {};
24
24
  let configs:any = {}
25
25
  const docs = [];
@@ -92,15 +92,15 @@ export const run = async (paraconfigs:any,genFor:string[],callback:Function) =>
92
92
  await processSchema(file.replace('.json',''),jsonschema)
93
93
  }
94
94
  // //generate groups
95
- // const systemgroups = readdirSync(`${groupFolder}`)
96
- // for(let g = 0; g< systemgroups.length;g++){
97
- // const groupfile = systemgroups[g]
98
- // const groupjsonstr = readFileSync(`${groupFolder}/${groupfile}`, 'utf-8');
99
- // const groupdata = JSON.parse(groupjsonstr);
100
- // const documentname = groupfile.split('.')[0]
101
- // const roles = prepareRoles(groupdata)
102
- // allroles[documentname]=roles
103
- // }
95
+ const systemgroups = readdirSync(`${groupFolder}`)
96
+ for(let g = 0; g< systemgroups.length;g++){
97
+ const groupfile = systemgroups[g]
98
+ const groupjsonstr = readFileSync(`${groupFolder}/${groupfile}`, 'utf-8');
99
+ const groupdata = JSON.parse(groupjsonstr);
100
+ const documentname = groupfile.split('.')[0]
101
+ const roles = prepareRoles(groupdata)
102
+ allroles[documentname]=roles
103
+ }
104
104
  finalize(activatemodules)
105
105
  callback()
106
106
  }
@@ -128,6 +128,7 @@ const processSchema= async (schemaname:string,jsondata:JSONSchema7)=>{
128
128
  // const jsondata = JSON.parse(jsonstring);
129
129
  const rendertype = 'basic';
130
130
  jsonschemas[docname] = jsondata;
131
+ const copyofjsonschema = {...jsondata}
131
132
  const allmodels:ChildModels = await readJsonSchemaBuilder(docname, jsondata);
132
133
  // log.error("allmodels",docname,schemaname)
133
134
  generateSchema(docname, doctype, rendertype, allmodels);
@@ -135,7 +136,8 @@ const processSchema= async (schemaname:string,jsondata:JSONSchema7)=>{
135
136
  doctype:doctype,
136
137
  docname:capitalizeFirstLetter(docname),
137
138
  pagetype: config.pageType??'',
138
- api:config.additionalApis
139
+ api:config.additionalApis,
140
+ schema : copyofjsonschema
139
141
  })
140
142
  // } else {
141
143
  // log.warn(`Load `+clc.yellow(file) + ` but it is not supported`)
@@ -242,7 +244,7 @@ const generateSchema = ( docname: string,
242
244
  }else if(foldertype=='nuxt'){
243
245
  const capname = capitalizeFirstLetter(docname)
244
246
  const validateWritePage = (folder:string,isexists:boolean)=>{
245
- if(!jsonschemas[docname][X_PAGE_TYPE] ){
247
+ if(!jsonschemas[docname][X_SIMPLEAPP_CONFIG]['pageType'] ){
246
248
  return false
247
249
  }else if(!isexists){
248
250
  return true
@@ -339,15 +341,26 @@ const finalize=(modules:ModuleObject[])=>{
339
341
  const arrfilename:string[] = filename.split('.')
340
342
  // log.info("check longfilename:::",longfilename,"become====",arrfilename)
341
343
  //only process .eta
342
- if(_.last(arrfilename)=='eta'){
344
+ if(_.last(arrfilename)=='eta'|| _.last(arrfilename)=='_eta'){
343
345
  const relativepath = longfilename.includes('/') ? longfilename.replace(`/${filename}`,'') : ''
344
346
  const foldername = `${frameworkpath}/${relativepath}`
345
- const shortfilename = filename.replace('.eta','')
347
+ const shortfilename = filename.replace('.eta','').replace('._eta','')
346
348
  const targetfilename = `${foldername}/${shortfilename}`
349
+ let forceoverride=true
350
+ if(filename.includes('._eta')){
351
+ forceoverride=false
352
+ }
353
+ // log.warn("Process=== ",targetfilename)
354
+ if(existsSync(targetfilename) && forceoverride == false){
355
+ log.info("file exists, skip: ",targetfilename)
356
+ continue;
357
+ }
358
+
359
+
347
360
  if(!existsSync(foldername)){
348
361
  mkdirSync(foldername,{recursive:true})
349
362
  }
350
- const templatename = `${frameworkfolder}/${longfilename}`.replace(".eta","")
363
+ // const templatename = `${frameworkfolder}/${longfilename}`.replace(".eta","").replace('._eta','')
351
364
  log.info("Write template:",targetfilename)
352
365
  const txt = eta.render(longfilename, renderProperties)
353
366
  writeFileSync(targetfilename,txt)
package/src/index.ts CHANGED
@@ -82,7 +82,7 @@ if(continueexecute){
82
82
  const reGenFrontend = async()=>{
83
83
  fw.setConfiguration(configs)
84
84
  generate.run(configs,['nuxt'],()=>{
85
- fw.prettyNuxt()
85
+ // fw.prettyNuxt()
86
86
  })
87
87
  }
88
88
  const reGenBackend = async()=>{
@@ -3,7 +3,7 @@ import { JSONSchema7, JSONSchema7Definition,JSONSchema7Array,JSONSchema7TypeName
3
3
  import * as js7 from 'json-schema';
4
4
  import _ from 'lodash'
5
5
  import { capitalizeFirstLetter } from '../libs';
6
- import {SchemaType,SchemaConfig,JsonSchemaProperties,MyForeignKey} from "../type"
6
+ import {SchemaType,SchemaConfig,JsonSchemaProperties} from "../type"
7
7
  // import * as schematemplates from '../schematype'
8
8
  import { Logger, ILogObj } from "tslog";
9
9
  import $RefParser from "@apidevtools/json-schema-ref-parser";
@@ -43,6 +43,7 @@ export const readJsonSchemaBuilder = async (docname: string,orijsondata:JSONSche
43
43
 
44
44
  let schemaconfigs:SchemaConfig = orijsondata[configname]
45
45
  const doctype=schemaconfigs.documentType
46
+
46
47
  if(!schemaconfigs.collectionName){
47
48
  schemaconfigs.documentName
48
49
  }
@@ -51,6 +52,18 @@ export const readJsonSchemaBuilder = async (docname: string,orijsondata:JSONSche
51
52
  schemaconfigs.foreignKeys={}
52
53
  }
53
54
 
55
+ if(schemaconfigs.generateDocumentNumber){
56
+ const tmp = {
57
+ type: "object",
58
+ "x-foreignkey":"docnoformat",
59
+ properties: {_id: {type: "string"},label: {type: "string"}}
60
+ }
61
+ orijsondata.properties["docNoFormat"] = tmp as JSONSchema7Definition
62
+ }
63
+
64
+ //apply some controls
65
+ //control docnoformatis required
66
+
54
67
  // let schemaprops:any = targettemplate.properties
55
68
  // console.log("just want process targettemplate ######>>>",orijsondata)
56
69
  // let schemadefinitions = targettemplate.definitions