@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.
- package/dist/form/actions.d.ts +130 -0
- package/dist/form/affiliations.d.ts +293 -0
- package/dist/form/apps.d.ts +210 -0
- package/dist/form/disciplines.d.ts +41 -0
- package/dist/form/events.d.ts +1398 -0
- package/dist/form/fellowships.d.ts +2123 -0
- package/dist/form/fellowships.js +4 -4
- package/dist/form/files.d.ts +41 -0
- package/dist/form/mailing.d.ts +63 -0
- package/dist/form/news.d.ts +406 -0
- package/dist/form/people.d.ts +1063 -0
- package/dist/form/people.js +4 -4
- package/dist/form/projects.d.ts +565 -0
- package/dist/form/publications.d.ts +616 -0
- package/dist/form/tags.d.ts +55 -0
- package/dist/form/users.d.ts +947 -0
- package/dist/graphql/client/events/query.list.events.gql +0 -1
- package/dist/graphql/schemas/schema.apex.graphql +37 -9
- package/dist/graphql/schemas/schema.website.graphql +31 -4
- package/dist/graphql/schemas/website-resolvers-list.json +3 -4
- package/dist/list/actions.d.ts +104 -0
- package/dist/list/affiliations.d.ts +104 -0
- package/dist/list/apps.d.ts +104 -0
- package/dist/list/disciplines.d.ts +102 -0
- package/dist/list/events.d.ts +173 -0
- package/dist/list/fellowships.d.ts +124 -0
- package/dist/list/files.d.ts +102 -0
- package/dist/list/mailing.d.ts +102 -0
- package/dist/list/news.d.ts +104 -0
- package/dist/list/people.d.ts +154 -0
- package/dist/list/projects.d.ts +104 -0
- package/dist/list/publications.d.ts +128 -0
- package/dist/list/tags.d.ts +104 -0
- package/dist/list/users.d.ts +154 -0
- package/index.d.ts +31 -0
- package/package.json +173 -14
- package/readme.md +609 -74
- package/index.ts +0 -63
- package/lib/README.md +0 -206
- package/lib/buildClientGraphQL.ts +0 -342
- package/lib/buildDefaults.ts +0 -0
- package/lib/buildSchemas.ts +0 -109
- package/lib/generate.ts +0 -505
- package/lib/generateAll.ts +0 -231
- package/lib/utils.ts +0 -24
- package/src/LICENSE +0 -661
- package/src/action/graphql/client/query.get.action.gql +0 -22
- package/src/action/graphql/client/query.list.action.gql +0 -32
- package/src/action/graphql/server/apex.types.action.graphql +0 -15
- package/src/action/models/action.ts +0 -147
- package/src/affiliation/graphql/client/query.get.affiliations.gql +0 -37
- package/src/affiliation/graphql/client/query.list.affiliations.gql +0 -43
- package/src/affiliation/graphql/server/shared.types.affiliations.graphql +0 -20
- package/src/affiliation/models/affiliation.ts +0 -130
- package/src/affiliation/models/member.ts +0 -11
- package/src/affiliation/models/partner.ts +0 -9
- package/src/apps/graphql/client/query.get.apps.gql +0 -33
- package/src/apps/graphql/client/query.list.apps.gql +0 -43
- package/src/apps/models/apps.ts +0 -195
- package/src/events/graphql/client/query.get.events.gql +0 -119
- package/src/events/graphql/client/query.list.events.gql +0 -40
- package/src/events/graphql/server/shared.inputs.events.graphql +0 -24
- package/src/events/models/eventSlot.ts +0 -73
- package/src/events/models/events.ts +0 -569
- package/src/fellowships/graphql/client/query.get.fellowships.gql +0 -163
- package/src/fellowships/graphql/client/query.list.fellowships.gql +0 -49
- package/src/fellowships/graphql/server/apex.inputs.fellowshipDetails.graphql +0 -13
- package/src/fellowships/graphql/server/shared.types.fellowshipDetails.graphql +0 -13
- package/src/fellowships/graphql/server/shared.types.fellowships.graphql +0 -38
- package/src/fellowships/models/fellowshipDetails.ts +0 -145
- package/src/fellowships/models/fellowships.ts +0 -341
- package/src/files/graphql/client/query.get.files.gql +0 -24
- package/src/files/graphql/client/query.list.files.gql +0 -37
- package/src/files/graphql/server/apex.inputs.files.graphql +0 -7
- package/src/files/graphql/server/apex.inputs.video.graphql +0 -9
- package/src/files/graphql/server/apex.types.files.graphql +0 -4
- package/src/files/graphql/server/shared.inputs.image.graphql +0 -9
- package/src/files/graphql/server/shared.types.files.graphql +0 -15
- package/src/files/graphql/server/shared.types.image.graphql +0 -9
- package/src/files/graphql/server/shared.types.video.graphql +0 -9
- package/src/files/models/files.ts +0 -113
- package/src/files/models/gallery.ts +0 -11
- package/src/files/models/image.ts +0 -159
- package/src/files/models/video.ts +0 -166
- package/src/form.ts +0 -52
- package/src/index.ts +0 -98
- package/src/list.ts +0 -34
- package/src/mailing/graphql/client/query.get.mailing.gql +0 -24
- package/src/mailing/graphql/client/query.list.mailing.gql +0 -23
- package/src/mailing/graphql/server/apex.types.mailing.graphql +0 -13
- package/src/mailing/models/mailing.ts +0 -123
- package/src/misc/graphql/client/apex.mutations.delete.gql +0 -0
- package/src/misc/graphql/client/apex.mutations.upsert.gql +0 -0
- package/src/misc/graphql/client/apex.queries.login.gql +0 -0
- package/src/misc/graphql/client/query.get.disciplines.gql +0 -17
- package/src/misc/graphql/client/query.get.tags.gql +0 -13
- package/src/misc/graphql/client/query.list.disciplines.gql +0 -23
- package/src/misc/graphql/client/query.list.tags.gql +0 -23
- package/src/misc/graphql/server/apex.inputs.misc.graphql +0 -13
- package/src/misc/graphql/server/apex.inputs.socials.graphql +0 -12
- package/src/misc/graphql/server/apex.mutations.graphql +0 -23
- package/src/misc/graphql/server/apex.queries.graphql +0 -36
- package/src/misc/graphql/server/apex.types.disciplines.graphql +0 -4
- package/src/misc/graphql/server/apex.types.tags.graphql +0 -4
- package/src/misc/graphql/server/shared.enums.graphql +0 -112
- package/src/misc/graphql/server/shared.inputs.misc.graphql +0 -101
- package/src/misc/graphql/server/shared.queries.graphql +0 -35
- package/src/misc/graphql/server/shared.types.disciplines.graphql +0 -8
- package/src/misc/graphql/server/shared.types.events.graphql +0 -39
- package/src/misc/graphql/server/shared.types.location.graphql +0 -17
- package/src/misc/graphql/server/shared.types.misc.graphql +0 -120
- package/src/misc/graphql/server/shared.types.related.graphql +0 -10
- package/src/misc/graphql/server/shared.types.relatedAffiliation.graphql +0 -7
- package/src/misc/graphql/server/shared.types.relatedEvent.graphql +0 -7
- package/src/misc/graphql/server/shared.types.relatedFellowships.graphql +0 -7
- package/src/misc/graphql/server/shared.types.relatedNews.graphql +0 -7
- package/src/misc/graphql/server/shared.types.relatedPeople.graphql +0 -6
- package/src/misc/graphql/server/shared.types.relatedProject.graphql +0 -7
- package/src/misc/graphql/server/shared.types.relatedPublications.graphql +0 -6
- package/src/misc/graphql/server/shared.types.socials.graphql +0 -22
- package/src/misc/graphql/server/shared.types.tags.graphql +0 -11
- package/src/misc/graphql/server/website.mutations.graphql +0 -4
- package/src/misc/models/disciplines.ts +0 -116
- package/src/misc/models/location.ts +0 -136
- package/src/misc/models/organizers.ts +0 -13
- package/src/misc/models/related.ts +0 -123
- package/src/misc/models/relatedEvents.ts +0 -16
- package/src/misc/models/relatedFellowships.ts +0 -7
- package/src/misc/models/relatedNews.ts +0 -13
- package/src/misc/models/relatedPeople.ts +0 -8
- package/src/misc/models/relatedProject.ts +0 -14
- package/src/misc/models/relatedPublications.ts +0 -14
- package/src/misc/models/socials.ts +0 -133
- package/src/misc/models/sponsor.ts +0 -13
- package/src/misc/models/tags.ts +0 -116
- package/src/misc/models/taxonomy.ts +0 -1
- package/src/model.ts +0 -7
- package/src/news/graphql/client/query.get.news.gql +0 -128
- package/src/news/graphql/client/query.list.news.gql +0 -35
- package/src/news/graphql/server/share.types.news.graphql +0 -27
- package/src/news/models/news.ts +0 -257
- package/src/people/graphql/client/query.get.people.gql +0 -173
- package/src/people/graphql/client/query.get.users.gql +0 -0
- package/src/people/graphql/client/query.list.people.gql +0 -55
- package/src/people/graphql/client/query.list.users.gql +0 -31
- package/src/people/graphql/server/apex.inputs.consent.graphql +0 -9
- package/src/people/graphql/server/apex.inputs.groups.graphql +0 -8
- package/src/people/graphql/server/apex.inputs.vintage.graphql +0 -6
- package/src/people/graphql/server/shared.types.consent.graphql +0 -9
- package/src/people/graphql/server/shared.types.groups.graphql +0 -8
- package/src/people/graphql/server/shared.types.people.graphql +0 -29
- package/src/people/graphql/server/shared.types.position.graphql +0 -6
- package/src/people/graphql/server/shared.types.users.graphql +0 -17
- package/src/people/graphql/server/shared.types.vintage.graphql +0 -6
- package/src/people/models/consent.ts +0 -82
- package/src/people/models/discussants.ts +0 -9
- package/src/people/models/experiences.ts +0 -38
- package/src/people/models/fellows.ts +0 -12
- package/src/people/models/groups.ts +0 -58
- package/src/people/models/people.ts +0 -244
- package/src/people/models/position.ts +0 -62
- package/src/people/models/speakers.ts +0 -9
- package/src/people/models/users.ts +0 -252
- package/src/people/models/vintage.ts +0 -124
- package/src/projects/graphql/client/query.get.projects.gql +0 -166
- package/src/projects/graphql/client/query.list.projects.gql +0 -33
- package/src/projects/graphql/server/shared.types.projects.graphql +0 -29
- package/src/projects/models/projects.ts +0 -249
- package/src/publications/graphql/client/query.get.publications.gql +0 -169
- package/src/publications/graphql/client/query.list.publications.gql +0 -35
- package/src/publications/graphql/server/shared.types.publications.graphql +0 -34
- package/src/publications/models/article.ts +0 -262
- package/src/publications/models/publications.ts +0 -306
- /package/dist/form/{action.js → actions.js} +0 -0
- /package/dist/form/{affiliation.js → affiliations.js} +0 -0
- /package/dist/graphql/client/{action/query.get.action.gql → actions/query.get.actions.gql} +0 -0
- /package/dist/graphql/client/{action/query.list.action.gql → actions/query.list.actions.gql} +0 -0
- /package/dist/graphql/client/{affiliation → affiliations}/query.get.affiliations.gql +0 -0
- /package/dist/graphql/client/{affiliation → affiliations}/query.list.affiliations.gql +0 -0
- /package/dist/list/{action.js → actions.js} +0 -0
- /package/dist/list/{affiliation.js → affiliations.js} +0 -0
package/lib/generateAll.ts
DELETED
|
@@ -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
|