@simitgroup/simpleapp-generator 2.0.2-r-alpha → 2.0.2-t-alpha

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/ReleaseNote.md CHANGED
@@ -1,3 +1,12 @@
1
+ [2.0.2t-alpha]
2
+
3
+ 1. Fix define type on service file
4
+
5
+ [2.0.2s-alpha]
6
+
7
+ 1. Reduce expired-token issues
8
+ 2. Define type on service for readonly
9
+
1
10
  [2.0.2r-alpha]
2
11
 
3
12
  1. Fix define types on controller fulltextsearch and setStatus
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simitgroup/simpleapp-generator",
3
- "version": "2.0.2r-alpha",
3
+ "version": "2.0.2t-alpha",
4
4
  "description": "frontend nuxtjs and backend nests code generator using jsonschema.",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -72,8 +72,13 @@ export class <%= it.typename %>Service extends SimpleAppService<schema.<%= it.ty
72
72
  <%}%>
73
73
  <%if(it.jsonschema.properties['documentStatus']){%>
74
74
  const docstatus = this.data.documentStatus
75
- const statussetting = this.jsonschema['x-simpleapp-config'].allStatus?.find((item)=>item.status==docstatus)
76
- if(statussetting && statussetting.readOnly) return true
75
+ const schemaJson = this.jsonschema as {
76
+ ['x-simpleapp-config']?: { allStatus?: { status: string; readOnly?: boolean }[] }
77
+ }
78
+ const statussetting = schemaJson['x-simpleapp-config']?.allStatus?.find(
79
+ (item) => item.status === docstatus
80
+ )
81
+ if(statussetting?.readOnly) return true
77
82
  <%}%>
78
83
  return false
79
84
  }
@@ -88,7 +93,7 @@ export class <%= it.typename %>Service extends SimpleAppService<schema.<%= it.ty
88
93
  // <%~ JSON.stringify(fml) %>
89
94
  //const tmp = jsonpath.query(vdata,fieldpath).filter((item:string)=>item!='')
90
95
  jsonpath.apply($data, '<%~ fml.jsonPath %>', function ($item: schema.<%= fml?.paramType || it.typename %>) {
91
- return <%~ fml.formula %>
96
+ return <%~ fml.formula %>
92
97
  })
93
98
  <%}) %>
94
99
  <%} %>
@@ -58,7 +58,7 @@ onMounted(async()=>{
58
58
  if(getCurrentXorg()===''){
59
59
  navigateTo('/picktenant')
60
60
  }else if(!currentgroup){
61
- goTo('/pickgroup')
61
+ goTo('pickgroup')
62
62
  }
63
63
  setGraphqlServer()
64
64
  }else{
@@ -75,8 +75,12 @@ export default NuxtAuthHandler({
75
75
  return token;
76
76
  }
77
77
 
78
- const buffer = 60;
78
+ const buffer = 300;
79
79
 
80
+ if (!token.expiresAt) {
81
+ return token;
82
+ }
83
+
80
84
  if (Date.now() < (<number>token.expiresAt - buffer) * 1000) {
81
85
  return token;
82
86
  }