-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypescript.json
51 lines (50 loc) · 2.86 KB
/
typescript.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
"Vivat 3.0 Alert System": {
"prefix": "alert",
"body": [
"import { useAlertStore } from '@/composables/vivat/useAlert';\nconst { alert } = useAlertStore();\nalert({ level: '', message: '' });"
]
},
"Vivat 3.0 Permission System": {
"prefix": "hasPermission",
"body": [
"import { useAuthStore } from '@/composables/vivat/useAuth';\nconst authStore = useAuthStore();\nconst { hasPermission } = authStore;"
]
},
"Vivat 3.0 Pusher integration": {
"prefix": "usePusher",
"body": [
"import { usePusherStore } from '@/composables/usePusher';\nconst { pusher } = storeToRefs(usePusherStore());"
]
},
// NestJS
"nest-js-graphql-resolver": {
"prefix": "nest-resolver",
"body": [
"import { Resolver, Args, Query, Mutation } from '@nestjs/common';",
"import { ${TM_FILENAME_BASE/((\\w*)\\.)|([\\.(resolver?)\\.])|([-\\.]+)/${1:/pascalcase}/gm} } from 'src/@generated/${TM_FILENAME_BASE/(\\W(resolver))//gm}/${TM_FILENAME_BASE/(\\W(resolver))//gm}.model';",
"import { ${TM_FILENAME_BASE/((\\w*)\\.)|([\\.(resolver?)\\.])|([-\\.]+)/${1:/pascalcase}/gm}Service } from './${TM_FILENAME_BASE/(\\W(resolver))//gm}.service';",
"",
"@Resolver((of) => '${TM_FILENAME_BASE/((\\w*)\\.)|([\\.(resolver?)\\.])|([-\\.]+)/${1:/pascalcase}/gm}')",
"export class ${TM_FILENAME_BASE/(([A-Z]|[a-z]).+)/${1:/pascalcase}/} {",
"\t$1constructor(private readonly ${TM_FILENAME_BASE/(\\W(resolver))//gm}Service: ${TM_FILENAME_BASE/((\\w*)\\.)|([\\.(resolver?)\\.])|([-\\.]+)/${1:/pascalcase}/gm}Service) {}",
"}",
]
},
"nest-js-graphql-service": {
"prefix": "nest-service",
"body": [
"import { Injectable } from '@nestjs/common';",
"import { PrismaService } from 'src/prisma.service';",
// "import { UserCreateInput } from 'src/@generated/${TM_FILENAME_BASE/(^[A-Z][a-z]*|[a-z])([A-Z])?/${1:/downcase}${2:+-}${2:/downcase}/g}/${TM_FILENAME_BASE/(^[A-Z][a-z]*|[a-z])([A-Z])?/${1:/downcase}${2:+-}${2:/downcase}/g}-create.input';",
// "import { UserPaginator } from 'src/@generated/${TM_FILENAME_BASE/(^[A-Z][a-z]*|[a-z])([A-Z])?/${1:/downcase}${2:+-}${2:/downcase}/g}/${TM_FILENAME_BASE/(^[A-Z][a-z]*|[a-z])([A-Z])?/${1:/downcase}${2:+-}${2:/downcase}/g}-paginator.output';",
// "import { UserWhereInput } from 'src/@generated/${TM_FILENAME_BASE/(^[A-Z][a-z]*|[a-z])([A-Z])?/${1:/downcase}${2:+-}${2:/downcase}/g}/${TM_FILENAME_BASE/(^[A-Z][a-z]*|[a-z])([A-Z])?/${1:/downcase}${2:+-}${2:/downcase}/g}-where.input';",
// "import { User } from 'src/@generated/${TM_FILENAME_BASE/(^[A-Z][a-z]*|[a-z])([A-Z])?/${1:/downcase}${2:+-}${2:/downcase}/g}/${TM_FILENAME_BASE/(^[A-Z][a-z]*|[a-z])([A-Z])?/${1:/downcase}${2:+-}${2:/downcase}/g}.model';",
"",
"@Injectable()",
"export class ${TM_FILENAME_BASE/(([A-Z]|[a-z]).+)/${1:/pascalcase}/} {",
"\t$1constructor(private prisma: PrismaService) {}",
"}",
]
},
}