@paris-ias/trees 1.8.56 → 2.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.
Files changed (181) hide show
  1. package/dist/form/actions.d.ts +130 -0
  2. package/dist/form/affiliations.d.ts +293 -0
  3. package/dist/form/apps.d.ts +210 -0
  4. package/dist/form/disciplines.d.ts +41 -0
  5. package/dist/form/events.d.ts +1398 -0
  6. package/dist/form/fellowships.d.ts +2123 -0
  7. package/dist/form/fellowships.js +4 -4
  8. package/dist/form/files.d.ts +41 -0
  9. package/dist/form/mailing.d.ts +63 -0
  10. package/dist/form/news.d.ts +406 -0
  11. package/dist/form/people.d.ts +1063 -0
  12. package/dist/form/people.js +4 -4
  13. package/dist/form/projects.d.ts +565 -0
  14. package/dist/form/publications.d.ts +616 -0
  15. package/dist/form/tags.d.ts +55 -0
  16. package/dist/form/users.d.ts +947 -0
  17. package/dist/graphql/client/events/query.list.events.gql +0 -1
  18. package/dist/graphql/schemas/schema.apex.graphql +37 -9
  19. package/dist/graphql/schemas/schema.website.graphql +31 -4
  20. package/dist/graphql/schemas/website-resolvers-list.json +3 -4
  21. package/dist/list/actions.d.ts +104 -0
  22. package/dist/list/affiliations.d.ts +104 -0
  23. package/dist/list/apps.d.ts +104 -0
  24. package/dist/list/disciplines.d.ts +102 -0
  25. package/dist/list/events.d.ts +173 -0
  26. package/dist/list/fellowships.d.ts +124 -0
  27. package/dist/list/files.d.ts +102 -0
  28. package/dist/list/mailing.d.ts +102 -0
  29. package/dist/list/news.d.ts +104 -0
  30. package/dist/list/people.d.ts +154 -0
  31. package/dist/list/projects.d.ts +104 -0
  32. package/dist/list/publications.d.ts +128 -0
  33. package/dist/list/tags.d.ts +104 -0
  34. package/dist/list/users.d.ts +154 -0
  35. package/index.d.ts +31 -0
  36. package/package.json +173 -14
  37. package/readme.md +609 -74
  38. package/index.ts +0 -63
  39. package/lib/README.md +0 -206
  40. package/lib/buildClientGraphQL.ts +0 -342
  41. package/lib/buildDefaults.ts +0 -0
  42. package/lib/buildSchemas.ts +0 -109
  43. package/lib/generate.ts +0 -505
  44. package/lib/generateAll.ts +0 -231
  45. package/lib/utils.ts +0 -24
  46. package/src/LICENSE +0 -661
  47. package/src/action/graphql/client/query.get.action.gql +0 -22
  48. package/src/action/graphql/client/query.list.action.gql +0 -32
  49. package/src/action/graphql/server/apex.types.action.graphql +0 -15
  50. package/src/action/models/action.ts +0 -147
  51. package/src/affiliation/graphql/client/query.get.affiliations.gql +0 -37
  52. package/src/affiliation/graphql/client/query.list.affiliations.gql +0 -43
  53. package/src/affiliation/graphql/server/shared.types.affiliations.graphql +0 -20
  54. package/src/affiliation/models/affiliation.ts +0 -130
  55. package/src/affiliation/models/member.ts +0 -11
  56. package/src/affiliation/models/partner.ts +0 -9
  57. package/src/apps/graphql/client/query.get.apps.gql +0 -33
  58. package/src/apps/graphql/client/query.list.apps.gql +0 -43
  59. package/src/apps/models/apps.ts +0 -195
  60. package/src/events/graphql/client/query.get.events.gql +0 -119
  61. package/src/events/graphql/client/query.list.events.gql +0 -40
  62. package/src/events/graphql/server/shared.inputs.events.graphql +0 -24
  63. package/src/events/models/eventSlot.ts +0 -73
  64. package/src/events/models/events.ts +0 -569
  65. package/src/fellowships/graphql/client/query.get.fellowships.gql +0 -163
  66. package/src/fellowships/graphql/client/query.list.fellowships.gql +0 -49
  67. package/src/fellowships/graphql/server/apex.inputs.fellowshipDetails.graphql +0 -13
  68. package/src/fellowships/graphql/server/shared.types.fellowshipDetails.graphql +0 -13
  69. package/src/fellowships/graphql/server/shared.types.fellowships.graphql +0 -38
  70. package/src/fellowships/models/fellowshipDetails.ts +0 -145
  71. package/src/fellowships/models/fellowships.ts +0 -341
  72. package/src/files/graphql/client/query.get.files.gql +0 -24
  73. package/src/files/graphql/client/query.list.files.gql +0 -37
  74. package/src/files/graphql/server/apex.inputs.files.graphql +0 -7
  75. package/src/files/graphql/server/apex.inputs.video.graphql +0 -9
  76. package/src/files/graphql/server/apex.types.files.graphql +0 -4
  77. package/src/files/graphql/server/shared.inputs.image.graphql +0 -9
  78. package/src/files/graphql/server/shared.types.files.graphql +0 -15
  79. package/src/files/graphql/server/shared.types.image.graphql +0 -9
  80. package/src/files/graphql/server/shared.types.video.graphql +0 -9
  81. package/src/files/models/files.ts +0 -113
  82. package/src/files/models/gallery.ts +0 -11
  83. package/src/files/models/image.ts +0 -159
  84. package/src/files/models/video.ts +0 -166
  85. package/src/form.ts +0 -52
  86. package/src/index.ts +0 -98
  87. package/src/list.ts +0 -34
  88. package/src/mailing/graphql/client/query.get.mailing.gql +0 -24
  89. package/src/mailing/graphql/client/query.list.mailing.gql +0 -23
  90. package/src/mailing/graphql/server/apex.types.mailing.graphql +0 -13
  91. package/src/mailing/models/mailing.ts +0 -123
  92. package/src/misc/graphql/client/apex.mutations.delete.gql +0 -0
  93. package/src/misc/graphql/client/apex.mutations.upsert.gql +0 -0
  94. package/src/misc/graphql/client/apex.queries.login.gql +0 -0
  95. package/src/misc/graphql/client/query.get.disciplines.gql +0 -17
  96. package/src/misc/graphql/client/query.get.tags.gql +0 -13
  97. package/src/misc/graphql/client/query.list.disciplines.gql +0 -23
  98. package/src/misc/graphql/client/query.list.tags.gql +0 -23
  99. package/src/misc/graphql/server/apex.inputs.misc.graphql +0 -13
  100. package/src/misc/graphql/server/apex.inputs.socials.graphql +0 -12
  101. package/src/misc/graphql/server/apex.mutations.graphql +0 -23
  102. package/src/misc/graphql/server/apex.queries.graphql +0 -36
  103. package/src/misc/graphql/server/apex.types.disciplines.graphql +0 -4
  104. package/src/misc/graphql/server/apex.types.tags.graphql +0 -4
  105. package/src/misc/graphql/server/shared.enums.graphql +0 -112
  106. package/src/misc/graphql/server/shared.inputs.misc.graphql +0 -101
  107. package/src/misc/graphql/server/shared.queries.graphql +0 -35
  108. package/src/misc/graphql/server/shared.types.disciplines.graphql +0 -8
  109. package/src/misc/graphql/server/shared.types.events.graphql +0 -39
  110. package/src/misc/graphql/server/shared.types.location.graphql +0 -17
  111. package/src/misc/graphql/server/shared.types.misc.graphql +0 -120
  112. package/src/misc/graphql/server/shared.types.related.graphql +0 -10
  113. package/src/misc/graphql/server/shared.types.relatedAffiliation.graphql +0 -7
  114. package/src/misc/graphql/server/shared.types.relatedEvent.graphql +0 -7
  115. package/src/misc/graphql/server/shared.types.relatedFellowships.graphql +0 -7
  116. package/src/misc/graphql/server/shared.types.relatedNews.graphql +0 -7
  117. package/src/misc/graphql/server/shared.types.relatedPeople.graphql +0 -6
  118. package/src/misc/graphql/server/shared.types.relatedProject.graphql +0 -7
  119. package/src/misc/graphql/server/shared.types.relatedPublications.graphql +0 -6
  120. package/src/misc/graphql/server/shared.types.socials.graphql +0 -22
  121. package/src/misc/graphql/server/shared.types.tags.graphql +0 -11
  122. package/src/misc/graphql/server/website.mutations.graphql +0 -4
  123. package/src/misc/models/disciplines.ts +0 -116
  124. package/src/misc/models/location.ts +0 -136
  125. package/src/misc/models/organizers.ts +0 -13
  126. package/src/misc/models/related.ts +0 -123
  127. package/src/misc/models/relatedEvents.ts +0 -16
  128. package/src/misc/models/relatedFellowships.ts +0 -7
  129. package/src/misc/models/relatedNews.ts +0 -13
  130. package/src/misc/models/relatedPeople.ts +0 -8
  131. package/src/misc/models/relatedProject.ts +0 -14
  132. package/src/misc/models/relatedPublications.ts +0 -14
  133. package/src/misc/models/socials.ts +0 -133
  134. package/src/misc/models/sponsor.ts +0 -13
  135. package/src/misc/models/tags.ts +0 -116
  136. package/src/misc/models/taxonomy.ts +0 -1
  137. package/src/model.ts +0 -7
  138. package/src/news/graphql/client/query.get.news.gql +0 -128
  139. package/src/news/graphql/client/query.list.news.gql +0 -35
  140. package/src/news/graphql/server/share.types.news.graphql +0 -27
  141. package/src/news/models/news.ts +0 -257
  142. package/src/people/graphql/client/query.get.people.gql +0 -173
  143. package/src/people/graphql/client/query.get.users.gql +0 -0
  144. package/src/people/graphql/client/query.list.people.gql +0 -55
  145. package/src/people/graphql/client/query.list.users.gql +0 -31
  146. package/src/people/graphql/server/apex.inputs.consent.graphql +0 -9
  147. package/src/people/graphql/server/apex.inputs.groups.graphql +0 -8
  148. package/src/people/graphql/server/apex.inputs.vintage.graphql +0 -6
  149. package/src/people/graphql/server/shared.types.consent.graphql +0 -9
  150. package/src/people/graphql/server/shared.types.groups.graphql +0 -8
  151. package/src/people/graphql/server/shared.types.people.graphql +0 -29
  152. package/src/people/graphql/server/shared.types.position.graphql +0 -6
  153. package/src/people/graphql/server/shared.types.users.graphql +0 -17
  154. package/src/people/graphql/server/shared.types.vintage.graphql +0 -6
  155. package/src/people/models/consent.ts +0 -82
  156. package/src/people/models/discussants.ts +0 -9
  157. package/src/people/models/experiences.ts +0 -38
  158. package/src/people/models/fellows.ts +0 -12
  159. package/src/people/models/groups.ts +0 -58
  160. package/src/people/models/people.ts +0 -244
  161. package/src/people/models/position.ts +0 -62
  162. package/src/people/models/speakers.ts +0 -9
  163. package/src/people/models/users.ts +0 -252
  164. package/src/people/models/vintage.ts +0 -124
  165. package/src/projects/graphql/client/query.get.projects.gql +0 -166
  166. package/src/projects/graphql/client/query.list.projects.gql +0 -33
  167. package/src/projects/graphql/server/shared.types.projects.graphql +0 -29
  168. package/src/projects/models/projects.ts +0 -249
  169. package/src/publications/graphql/client/query.get.publications.gql +0 -169
  170. package/src/publications/graphql/client/query.list.publications.gql +0 -35
  171. package/src/publications/graphql/server/shared.types.publications.graphql +0 -34
  172. package/src/publications/models/article.ts +0 -262
  173. package/src/publications/models/publications.ts +0 -306
  174. /package/dist/form/{action.js → actions.js} +0 -0
  175. /package/dist/form/{affiliation.js → affiliations.js} +0 -0
  176. /package/dist/graphql/client/{action/query.get.action.gql → actions/query.get.actions.gql} +0 -0
  177. /package/dist/graphql/client/{action/query.list.action.gql → actions/query.list.actions.gql} +0 -0
  178. /package/dist/graphql/client/{affiliation → affiliations}/query.get.affiliations.gql +0 -0
  179. /package/dist/graphql/client/{affiliation → affiliations}/query.list.affiliations.gql +0 -0
  180. /package/dist/list/{action.js → actions.js} +0 -0
  181. /package/dist/list/{affiliation.js → affiliations.js} +0 -0
@@ -1,231 +0,0 @@
1
- import { spawn } from "child_process"
2
- import { fileURLToPath } from "url"
3
- import path from "path"
4
-
5
- // Declare process global and other types for environments without @types/node
6
- declare const process: any
7
-
8
- const __filename = fileURLToPath(import.meta.url)
9
- const __dirname = path.dirname(__filename)
10
-
11
- /**
12
- * Task execution result
13
- */
14
- interface TaskResult {
15
- name: string
16
- success: boolean
17
- duration: number
18
- output: string[]
19
- errors: string[]
20
- }
21
-
22
- /**
23
- * Overall generation statistics
24
- */
25
- interface GenerationStats {
26
- totalDuration: number
27
- tasks: TaskResult[]
28
- successCount: number
29
- errorCount: number
30
- }
31
-
32
- /**
33
- * Executes a script and captures output
34
- */
35
- function executeScript(
36
- scriptPath: string,
37
- taskName: string
38
- ): Promise<TaskResult> {
39
- return new Promise((resolve) => {
40
- const startTime = Date.now()
41
- const output: string[] = []
42
- const errors: string[] = []
43
-
44
- console.log(`🔄 ${taskName}...`)
45
-
46
- const child = spawn("npx", ["tsx", scriptPath], {
47
- cwd: path.dirname(__dirname),
48
- stdio: ["pipe", "pipe", "pipe"],
49
- })
50
-
51
- child.stdout?.on("data", (data: any) => {
52
- const lines = data
53
- .toString()
54
- .split("\n")
55
- .filter((line: string) => line.trim())
56
- lines.forEach((line: string) => {
57
- output.push(line)
58
- console.log(` ${line}`)
59
- })
60
- })
61
-
62
- child.stderr?.on("data", (data: any) => {
63
- const lines = data
64
- .toString()
65
- .split("\n")
66
- .filter((line: string) => line.trim())
67
- lines.forEach((line: string) => {
68
- errors.push(line)
69
- console.log(` ⚠️ ${line}`)
70
- })
71
- })
72
-
73
- child.on("close", (code: any) => {
74
- const duration = Date.now() - startTime
75
- const success = code === 0
76
-
77
- console.log(
78
- ` ${success ? "✅" : "❌"} ${taskName} ${
79
- success ? "completed" : "failed"
80
- } (${duration}ms)`
81
- )
82
-
83
- resolve({
84
- name: taskName,
85
- success,
86
- duration,
87
- output,
88
- errors,
89
- })
90
- })
91
- })
92
- }
93
-
94
- /**
95
- * Extracts key metrics from task output
96
- */
97
- function extractMetrics(result: TaskResult): string {
98
- const { output } = result
99
-
100
- switch (result.name) {
101
- case "Generate Modules":
102
- const moduleMatches = output
103
- .join(" ")
104
- .match(/Successfully generated: (\d+)\/(\d+) modules/)
105
- if (moduleMatches) {
106
- return `${moduleMatches[1]}/${moduleMatches[2]} modules`
107
- }
108
- const moduleCount = output.filter((line) =>
109
- line.includes("✅ Module")
110
- ).length
111
- return moduleCount > 0 ? `${moduleCount} modules` : "Unknown count"
112
-
113
- case "Generate Schemas":
114
- const schemaSuccess = output.some((line) =>
115
- line.includes("✅ Schemas generated successfully")
116
- )
117
- if (schemaSuccess) {
118
- return "2 schemas + resolvers"
119
- }
120
- return "Schema generation status unknown"
121
-
122
- case "Generate GraphQL Client":
123
- const clientMatch = output
124
- .join(" ")
125
- .match(/(\d+) GraphQL files processed/)
126
- const typeMatch = output.join(" ").match(/(\d+) type categories/)
127
- if (clientMatch && typeMatch) {
128
- return `${clientMatch[1]} files, ${typeMatch[1]} types`
129
- }
130
- return "GraphQL client status unknown"
131
-
132
- default:
133
- return "Status unknown"
134
- }
135
- }
136
-
137
- /**
138
- * Main generation orchestrator
139
- */
140
- export async function generateAll(): Promise<void> {
141
- const overallStartTime = Date.now()
142
- const stats: GenerationStats = {
143
- totalDuration: 0,
144
- tasks: [],
145
- successCount: 0,
146
- errorCount: 0,
147
- }
148
-
149
- console.log("🚀 Starting unified generation process...")
150
- console.log("=".repeat(60))
151
-
152
- // Define tasks to execute
153
- const tasks = [
154
- { script: "lib/generate.ts", name: "Generate Modules" },
155
- { script: "lib/buildSchemas.ts", name: "Generate Schemas" },
156
- { script: "lib/buildClientGraphQL.ts", name: "Generate GraphQL Client" },
157
- ]
158
-
159
- // Execute tasks sequentially
160
- for (const task of tasks) {
161
- const result = await executeScript(task.script, task.name)
162
- stats.tasks.push(result)
163
-
164
- if (result.success) {
165
- stats.successCount++
166
- } else {
167
- stats.errorCount++
168
- }
169
- }
170
-
171
- // Calculate total duration
172
- stats.totalDuration = Date.now() - overallStartTime
173
-
174
- // Display unified summary
175
- console.log("\n" + "=".repeat(60))
176
- console.log("📊 GENERATION SUMMARY")
177
- console.log("=".repeat(60))
178
-
179
- console.log(`🕐 Total Duration: ${stats.totalDuration}ms`)
180
- console.log(
181
- `� Success Rate: ${stats.successCount}/${tasks.length} tasks completed`
182
- )
183
-
184
- if (stats.successCount > 0) {
185
- console.log("\n✅ Completed Tasks:")
186
- stats.tasks
187
- .filter((task) => task.success)
188
- .forEach((task) => {
189
- const metrics = extractMetrics(task)
190
- console.log(` • ${task.name}: ${metrics} (${task.duration}ms)`)
191
- })
192
- }
193
-
194
- if (stats.errorCount > 0) {
195
- console.log("\n❌ Failed Tasks:")
196
- stats.tasks
197
- .filter((task) => !task.success)
198
- .forEach((task) => {
199
- console.log(` • ${task.name}: Failed (${task.duration}ms)`)
200
- if (task.errors.length > 0) {
201
- console.log(` Errors: ${task.errors.slice(0, 3).join(", ")}`)
202
- }
203
- })
204
- }
205
-
206
- // Overall status
207
- if (stats.errorCount === 0) {
208
- console.log("\n🎉 All generation tasks completed successfully!")
209
- } else if (stats.successCount > 0) {
210
- console.log("\n⚠️ Generation completed with some errors")
211
- } else {
212
- console.log("\n💥 Generation failed - no tasks completed successfully")
213
- }
214
-
215
- console.log("=".repeat(60))
216
- }
217
-
218
- // Execute if run directly
219
- if (
220
- typeof process !== "undefined" &&
221
- import.meta.url === `file://${process.argv[1]}`
222
- ) {
223
- try {
224
- await generateAll()
225
- } catch (error) {
226
- console.error("💥 Generation orchestrator failed:", error)
227
- if (typeof process !== "undefined") {
228
- process.exit(1)
229
- }
230
- }
231
- }
package/lib/utils.ts DELETED
@@ -1,24 +0,0 @@
1
- import fs from "fs"
2
- import path from "path"
3
-
4
- export function createJsonFile(
5
- type: string,
6
- module: any,
7
- append: string = ""
8
- ): void {
9
- const distPath = path.resolve("./dist" + append)
10
-
11
- if (!fs.existsSync(distPath)) {
12
- fs.mkdirSync(distPath, { recursive: true })
13
- }
14
-
15
- const filePath = path.join(distPath, `${type}.js`)
16
- fs.writeFileSync(
17
- filePath,
18
- `export default ${JSON.stringify(module, null, 2)}`
19
- )
20
- }
21
- export const mapEnum = (arg) =>
22
- Object.keys(arg)
23
- .filter((key) => isNaN(Number(key))) // Filter out numeric keys
24
- .map((key) => key) // Cast to string array