@evenicanpm/admin-graphql-codegen 1.2.0 → 1.4.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/codegen.ts +1 -1
- package/documents/authorization/authorization.ts +184 -0
- package/documents/seo/robots.ts +135 -0
- package/documents/seo/sitemap.ts +163 -0
- package/documents/session/session.ts +36 -0
- package/package.json +2 -2
- package/tsconfig.json +17 -0
- package/documents/seo/generate-sitemap.ts +0 -13
- package/documents/seo/sitemap-schedule.ts +0 -12
- package/documents/seo/update-sitemap-schedule.ts +0 -14
- package/test.js +0 -15
package/codegen.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CodegenConfig } from "@graphql-codegen/cli";
|
|
2
2
|
|
|
3
3
|
const config: CodegenConfig = {
|
|
4
|
-
schema:
|
|
4
|
+
schema: `${process.env.NEXT_PUBLIC_E4_API_ENDPOINT}/graphql`,
|
|
5
5
|
documents: [
|
|
6
6
|
"./documents/**/*.ts",
|
|
7
7
|
"../admin-integrate/documents/**/*.ts",
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import gql from "graphql-tag";
|
|
2
|
+
|
|
3
|
+
const GET_MODULES = gql`
|
|
4
|
+
query GetAllActiveModules {
|
|
5
|
+
getModules {
|
|
6
|
+
createdAt
|
|
7
|
+
description
|
|
8
|
+
id
|
|
9
|
+
isActive
|
|
10
|
+
name
|
|
11
|
+
}
|
|
12
|
+
}`;
|
|
13
|
+
|
|
14
|
+
const GET_USERS = gql`
|
|
15
|
+
query GetAllAdminUsers ($usersInput: UsersInput!) {
|
|
16
|
+
getUsers (input: $usersInput) {
|
|
17
|
+
users {
|
|
18
|
+
id
|
|
19
|
+
email
|
|
20
|
+
displayName
|
|
21
|
+
isActive
|
|
22
|
+
createdAt
|
|
23
|
+
updatedAt
|
|
24
|
+
roleNames
|
|
25
|
+
}
|
|
26
|
+
top
|
|
27
|
+
skip
|
|
28
|
+
resultsReturned
|
|
29
|
+
recordCount
|
|
30
|
+
}
|
|
31
|
+
}`;
|
|
32
|
+
|
|
33
|
+
const GET_USER_BY_ID = gql`
|
|
34
|
+
query GetUserById ($id: ID!) {
|
|
35
|
+
getUserById (id: $id) {
|
|
36
|
+
roles {
|
|
37
|
+
name
|
|
38
|
+
moduleName
|
|
39
|
+
id
|
|
40
|
+
description
|
|
41
|
+
isEditable
|
|
42
|
+
assignedByName
|
|
43
|
+
assignedByEmail
|
|
44
|
+
assignedAt
|
|
45
|
+
}
|
|
46
|
+
user {
|
|
47
|
+
id
|
|
48
|
+
email
|
|
49
|
+
displayName
|
|
50
|
+
isActive
|
|
51
|
+
createdAt
|
|
52
|
+
updatedAt
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}`;
|
|
56
|
+
|
|
57
|
+
const GET_ROLES = gql`
|
|
58
|
+
query GetAllRoles ($input: RolesInput!) {
|
|
59
|
+
getRoles(input: $input) {
|
|
60
|
+
recordCount
|
|
61
|
+
resultsReturned
|
|
62
|
+
roles {
|
|
63
|
+
name
|
|
64
|
+
moduleName
|
|
65
|
+
id
|
|
66
|
+
description
|
|
67
|
+
isEditable
|
|
68
|
+
}
|
|
69
|
+
skip
|
|
70
|
+
top
|
|
71
|
+
}
|
|
72
|
+
}`;
|
|
73
|
+
|
|
74
|
+
const GET_ROLE_BY_ID = gql`
|
|
75
|
+
query GetRoleById ($id: ID!) {
|
|
76
|
+
getRoleById (id: $id) {
|
|
77
|
+
role {
|
|
78
|
+
name
|
|
79
|
+
moduleName
|
|
80
|
+
id
|
|
81
|
+
description
|
|
82
|
+
isEditable
|
|
83
|
+
createdByName
|
|
84
|
+
createdByEmail
|
|
85
|
+
createdAt
|
|
86
|
+
updatedByName
|
|
87
|
+
updatedByEmail
|
|
88
|
+
updatedAt
|
|
89
|
+
}
|
|
90
|
+
assignedPermissions {
|
|
91
|
+
key
|
|
92
|
+
id
|
|
93
|
+
description
|
|
94
|
+
assignedByName
|
|
95
|
+
assignedByEmail
|
|
96
|
+
assignedAt
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}`;
|
|
100
|
+
|
|
101
|
+
const GET_PERMISSIONS = gql`
|
|
102
|
+
query GetAllActivePermissions {
|
|
103
|
+
getPermissions {
|
|
104
|
+
key
|
|
105
|
+
id
|
|
106
|
+
description
|
|
107
|
+
}
|
|
108
|
+
}`;
|
|
109
|
+
|
|
110
|
+
const ACTIVATE_USER = gql`
|
|
111
|
+
mutation ActivateUser($input: ActivateUserInput!) {
|
|
112
|
+
activateUser(input: $input){
|
|
113
|
+
code
|
|
114
|
+
success
|
|
115
|
+
message
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
`;
|
|
119
|
+
|
|
120
|
+
const ASSIGN_ROLES = gql`
|
|
121
|
+
mutation AssignRoles($input: AssignRolesInput!) {
|
|
122
|
+
assignRoles(input: $input){
|
|
123
|
+
code
|
|
124
|
+
success
|
|
125
|
+
message
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
`;
|
|
129
|
+
|
|
130
|
+
const CREATE_ROLE = gql`
|
|
131
|
+
mutation CreateRole($input: AARoleInput!) {
|
|
132
|
+
aaCreateRole(input: $input){
|
|
133
|
+
name
|
|
134
|
+
moduleName
|
|
135
|
+
id
|
|
136
|
+
description
|
|
137
|
+
isEditable
|
|
138
|
+
createdByName
|
|
139
|
+
createdByEmail
|
|
140
|
+
createdAt
|
|
141
|
+
updatedByName
|
|
142
|
+
updatedByEmail
|
|
143
|
+
updatedAt
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
`;
|
|
147
|
+
|
|
148
|
+
const UPDATE_ROLE = gql`
|
|
149
|
+
mutation UpdateRole($id:ID!,$input: AARoleInput!) {
|
|
150
|
+
aaUpdateRole(id:$id, input: $input){
|
|
151
|
+
name
|
|
152
|
+
moduleName
|
|
153
|
+
id
|
|
154
|
+
description
|
|
155
|
+
isEditable
|
|
156
|
+
createdByName
|
|
157
|
+
createdByEmail
|
|
158
|
+
createdAt
|
|
159
|
+
updatedByName
|
|
160
|
+
updatedByEmail
|
|
161
|
+
updatedAt
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
`;
|
|
165
|
+
|
|
166
|
+
const DELETE_ROLE = gql`
|
|
167
|
+
mutation DeleteRole($id:ID!) {
|
|
168
|
+
aaDeleteRole(id:$id){
|
|
169
|
+
code
|
|
170
|
+
success
|
|
171
|
+
message
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
`;
|
|
175
|
+
|
|
176
|
+
const ASSIGN_PERMISSIONS = gql`
|
|
177
|
+
mutation AssignPermissions($input: AssignPermissionsInput!) {
|
|
178
|
+
assignPermissions(input: $input) {
|
|
179
|
+
code
|
|
180
|
+
message
|
|
181
|
+
success
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
`;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import gql from "graphql-tag";
|
|
2
|
+
|
|
3
|
+
const ROBOTS_STATE_FIELDS = gql`
|
|
4
|
+
fragment RobotsStateFields on RobotsState {
|
|
5
|
+
id
|
|
6
|
+
robotsText
|
|
7
|
+
lastModifiedAt
|
|
8
|
+
lastModifiedBy
|
|
9
|
+
notifyGoogle
|
|
10
|
+
notifyBing
|
|
11
|
+
historyLimit
|
|
12
|
+
agentRules {
|
|
13
|
+
id
|
|
14
|
+
agent
|
|
15
|
+
crawlDelay
|
|
16
|
+
}
|
|
17
|
+
agentAutomation {
|
|
18
|
+
agentId
|
|
19
|
+
enabled
|
|
20
|
+
}
|
|
21
|
+
blockedAreas {
|
|
22
|
+
id
|
|
23
|
+
path
|
|
24
|
+
blocked
|
|
25
|
+
}
|
|
26
|
+
collections {
|
|
27
|
+
id
|
|
28
|
+
name
|
|
29
|
+
allowed
|
|
30
|
+
}
|
|
31
|
+
pdpAllowed
|
|
32
|
+
versions {
|
|
33
|
+
id
|
|
34
|
+
label
|
|
35
|
+
text
|
|
36
|
+
builderState {
|
|
37
|
+
agentRules {
|
|
38
|
+
id
|
|
39
|
+
agent
|
|
40
|
+
crawlDelay
|
|
41
|
+
}
|
|
42
|
+
blockedAreas {
|
|
43
|
+
id
|
|
44
|
+
path
|
|
45
|
+
blocked
|
|
46
|
+
}
|
|
47
|
+
collections {
|
|
48
|
+
id
|
|
49
|
+
name
|
|
50
|
+
allowed
|
|
51
|
+
}
|
|
52
|
+
pdpAllowed
|
|
53
|
+
agentAutomation {
|
|
54
|
+
agentId
|
|
55
|
+
enabled
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
notifyGoogle
|
|
59
|
+
notifyBing
|
|
60
|
+
createdAt
|
|
61
|
+
createdBy
|
|
62
|
+
}
|
|
63
|
+
log {
|
|
64
|
+
id
|
|
65
|
+
level
|
|
66
|
+
message
|
|
67
|
+
at
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
`;
|
|
71
|
+
|
|
72
|
+
const ROBOTS_STATE = gql`
|
|
73
|
+
query RobotsState {
|
|
74
|
+
robotsState {
|
|
75
|
+
...RobotsStateFields
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
${ROBOTS_STATE_FIELDS}
|
|
79
|
+
`;
|
|
80
|
+
|
|
81
|
+
const PUBLISH_ROBOTS = gql`
|
|
82
|
+
mutation PublishRobots($input: PublishRobotsInput!) {
|
|
83
|
+
publishRobots(input: $input) {
|
|
84
|
+
code
|
|
85
|
+
message
|
|
86
|
+
success
|
|
87
|
+
state {
|
|
88
|
+
...RobotsStateFields
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
${ROBOTS_STATE_FIELDS}
|
|
93
|
+
`;
|
|
94
|
+
|
|
95
|
+
const UPDATE_ROBOTS_SETTINGS = gql`
|
|
96
|
+
mutation UpdateRobotsSettings($input: UpdateRobotsSettingsInput!) {
|
|
97
|
+
updateRobotsSettings(input: $input) {
|
|
98
|
+
code
|
|
99
|
+
message
|
|
100
|
+
success
|
|
101
|
+
state {
|
|
102
|
+
...RobotsStateFields
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
${ROBOTS_STATE_FIELDS}
|
|
107
|
+
`;
|
|
108
|
+
|
|
109
|
+
const UPDATE_ROBOTS_HISTORY_LIMIT = gql`
|
|
110
|
+
mutation UpdateRobotsHistoryLimit($input: UpdateRobotsHistoryLimitInput!) {
|
|
111
|
+
updateRobotsHistoryLimit(input: $input) {
|
|
112
|
+
code
|
|
113
|
+
message
|
|
114
|
+
success
|
|
115
|
+
state {
|
|
116
|
+
...RobotsStateFields
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
${ROBOTS_STATE_FIELDS}
|
|
121
|
+
`;
|
|
122
|
+
|
|
123
|
+
const DELETE_ROBOTS_VERSION = gql`
|
|
124
|
+
mutation DeleteRobotsVersion($input: DeleteRobotsVersionInput!) {
|
|
125
|
+
deleteRobotsVersion(input: $input) {
|
|
126
|
+
code
|
|
127
|
+
message
|
|
128
|
+
success
|
|
129
|
+
state {
|
|
130
|
+
...RobotsStateFields
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
${ROBOTS_STATE_FIELDS}
|
|
135
|
+
`;
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import gql from "graphql-tag";
|
|
2
|
+
|
|
3
|
+
const GENERATE_SITEMAP = gql`
|
|
4
|
+
mutation GenerateSitemap($generateSitemapInput: GenerateSitemapInput!) {
|
|
5
|
+
generateSitemap(input: $generateSitemapInput) {
|
|
6
|
+
message
|
|
7
|
+
code
|
|
8
|
+
generationType
|
|
9
|
+
id
|
|
10
|
+
source
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
const SITEMAP_SCHEDULE = gql`
|
|
16
|
+
query SitemapSchedule($sitemapScheduleInput: SitemapScheduleInput!) {
|
|
17
|
+
sitemapSchedule(input: $sitemapScheduleInput) {
|
|
18
|
+
lastRunAt
|
|
19
|
+
nextRunAt
|
|
20
|
+
schedule
|
|
21
|
+
source
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
const UPDATE_SITEMAP_SCHEDULE = gql`
|
|
27
|
+
mutation UpdateSitemapSchedule(
|
|
28
|
+
$updateSitemapScheduleInput: UpdateSitemapScheduleInput!
|
|
29
|
+
) {
|
|
30
|
+
updateSitemapSchedule(input: $updateSitemapScheduleInput) {
|
|
31
|
+
code
|
|
32
|
+
message
|
|
33
|
+
source
|
|
34
|
+
success
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
38
|
+
|
|
39
|
+
const SITEMAP_RULES = gql`
|
|
40
|
+
query SitemapRules($sitemapRulesInput: SitemapRulesInput!) {
|
|
41
|
+
sitemapRules(input: $sitemapRulesInput) {
|
|
42
|
+
top
|
|
43
|
+
skip
|
|
44
|
+
rules {
|
|
45
|
+
exclude
|
|
46
|
+
id
|
|
47
|
+
createdByName
|
|
48
|
+
createdByEmail
|
|
49
|
+
createdAt
|
|
50
|
+
changefreq
|
|
51
|
+
url
|
|
52
|
+
updatedByName
|
|
53
|
+
updatedByEmail
|
|
54
|
+
updatedAt
|
|
55
|
+
source
|
|
56
|
+
priority
|
|
57
|
+
name
|
|
58
|
+
notes
|
|
59
|
+
}
|
|
60
|
+
resultsReturned
|
|
61
|
+
recordCount
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
`;
|
|
65
|
+
|
|
66
|
+
const CREATE_SITEMAP_RULE = gql`
|
|
67
|
+
mutation CreateSitemapRule($sitemapRuleInput: SitemapRuleInput!) {
|
|
68
|
+
createSitemapRule(input: $sitemapRuleInput) {
|
|
69
|
+
url
|
|
70
|
+
updatedByName
|
|
71
|
+
updatedByEmail
|
|
72
|
+
updatedAt
|
|
73
|
+
source
|
|
74
|
+
priority
|
|
75
|
+
name
|
|
76
|
+
notes
|
|
77
|
+
id
|
|
78
|
+
exclude
|
|
79
|
+
createdByName
|
|
80
|
+
createdByEmail
|
|
81
|
+
createdAt
|
|
82
|
+
changefreq
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
`;
|
|
86
|
+
|
|
87
|
+
const UPDATE_SITEMAP_RULE = gql`
|
|
88
|
+
mutation UpdateSitemapRule($id:ID!,$sitemapRuleInput: SitemapRuleInput!) {
|
|
89
|
+
updateSitemapRule(id:$id,input: $sitemapRuleInput) {
|
|
90
|
+
changefreq
|
|
91
|
+
createdAt
|
|
92
|
+
createdByEmail
|
|
93
|
+
createdByName
|
|
94
|
+
exclude
|
|
95
|
+
id
|
|
96
|
+
notes
|
|
97
|
+
name
|
|
98
|
+
priority
|
|
99
|
+
source
|
|
100
|
+
updatedAt
|
|
101
|
+
updatedByEmail
|
|
102
|
+
updatedByName
|
|
103
|
+
url
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
`;
|
|
107
|
+
|
|
108
|
+
const DELETE_SITEMAP_RULE = gql`
|
|
109
|
+
mutation DeleteSitemapRule($id:ID!) {
|
|
110
|
+
deleteSitemapRule(id:$id) {
|
|
111
|
+
code
|
|
112
|
+
message
|
|
113
|
+
success
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
`;
|
|
117
|
+
|
|
118
|
+
const SITEMAP_AUDIT_LOG = gql`
|
|
119
|
+
query SitemapAuditLogs($sitemapAuditLogInput: SitemapRulesInput!) {
|
|
120
|
+
sitemapAuditLogs(input: $sitemapAuditLogInput) {
|
|
121
|
+
logs {
|
|
122
|
+
actionType
|
|
123
|
+
createdAt
|
|
124
|
+
valueTo
|
|
125
|
+
valueFrom
|
|
126
|
+
source
|
|
127
|
+
ruleId
|
|
128
|
+
modifiedByName
|
|
129
|
+
modifiedByEmail
|
|
130
|
+
id
|
|
131
|
+
}
|
|
132
|
+
recordCount
|
|
133
|
+
resultsReturned
|
|
134
|
+
skip
|
|
135
|
+
top
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
`;
|
|
139
|
+
|
|
140
|
+
const SITEMAP_HISTORY = gql`
|
|
141
|
+
query SitemapHistory($sitemapHistoryInput: SitemapHistoryInput!) {
|
|
142
|
+
sitemapHistory(input: $sitemapHistoryInput) {
|
|
143
|
+
top
|
|
144
|
+
skip
|
|
145
|
+
resultsReturned
|
|
146
|
+
recordCount
|
|
147
|
+
sitemaps {
|
|
148
|
+
updatedAt
|
|
149
|
+
status
|
|
150
|
+
source
|
|
151
|
+
message
|
|
152
|
+
id
|
|
153
|
+
generationType
|
|
154
|
+
jobProcessId
|
|
155
|
+
generatedByName
|
|
156
|
+
generatedByEmail
|
|
157
|
+
dataType
|
|
158
|
+
createdAt
|
|
159
|
+
logs
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
`;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import gql from "graphql-tag";
|
|
2
|
+
|
|
3
|
+
const ADMIN_INIT_SESSION = gql`
|
|
4
|
+
mutation AdminInitSession(
|
|
5
|
+
$adminInitSessionInput: AdminInitSessionInput!
|
|
6
|
+
) {
|
|
7
|
+
adminInitSession(input: $adminInitSessionInput) {
|
|
8
|
+
code
|
|
9
|
+
message
|
|
10
|
+
success
|
|
11
|
+
session {
|
|
12
|
+
id
|
|
13
|
+
user {
|
|
14
|
+
aspNetUserId
|
|
15
|
+
email
|
|
16
|
+
displayName
|
|
17
|
+
permissions
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
const GET_SESSION = gql`
|
|
25
|
+
query GetSession {
|
|
26
|
+
session {
|
|
27
|
+
id
|
|
28
|
+
user {
|
|
29
|
+
aspNetUserId
|
|
30
|
+
displayName
|
|
31
|
+
email
|
|
32
|
+
permissions
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
`;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evenicanpm/admin-graphql-codegen",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "",
|
|
7
7
|
"license": "ISC",
|
|
8
|
-
"gitHead": "
|
|
8
|
+
"gitHead": "0614726ec6b7ce9564706514a6b756b390a13e96",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
11
11
|
"codegen:insecure": "NODE_TLS_REJECT_UNAUTHORIZED=0 npm run codegen",
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "node",
|
|
6
|
+
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"allowSyntheticDefaultImports": true,
|
|
9
|
+
|
|
10
|
+
"strict": false,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
|
|
13
|
+
"noEmit": true,
|
|
14
|
+
"types": ["node"]
|
|
15
|
+
},
|
|
16
|
+
"include": ["codegen.ts", "documents/**/*.ts"]
|
|
17
|
+
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import gql from "graphql-tag";
|
|
2
|
-
|
|
3
|
-
const UPDATE_SITEMAP_SCHEDULE = gql`
|
|
4
|
-
mutation UpdateSitemapSchedule(
|
|
5
|
-
$updateSitemapScheduleInput: UpdateSitemapScheduleInput!
|
|
6
|
-
) {
|
|
7
|
-
updateSitemapSchedule(input: $updateSitemapScheduleInput) {
|
|
8
|
-
code
|
|
9
|
-
message
|
|
10
|
-
source
|
|
11
|
-
success
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
`;
|
package/test.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from "node:fs";
|
|
2
|
-
import { parse } from "graphql";
|
|
3
|
-
import { glob } from "glob";
|
|
4
|
-
|
|
5
|
-
const main = async () => {
|
|
6
|
-
const files = await glob("./documents/**/*.ts");
|
|
7
|
-
return files.map((f) => {
|
|
8
|
-
console.log(f);
|
|
9
|
-
const js = readFileSync(f, "utf8");
|
|
10
|
-
eval(js);
|
|
11
|
-
//const gql = parse(js);
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
main();
|