@xyd-js/sources 0.0.1-xyd.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/docs.json ADDED
@@ -0,0 +1,551 @@
1
+ {
2
+ "schemaVersion": "2.0",
3
+ "id": 19,
4
+ "name": "@xyd-sources-examples/package-a",
5
+ "variant": "project",
6
+ "kind": 1,
7
+ "flags": {},
8
+ "children": [
9
+ {
10
+ "id": 20,
11
+ "name": "ExampleClass",
12
+ "variant": "declaration",
13
+ "kind": 128,
14
+ "flags": {},
15
+ "comment": {
16
+ "summary": [
17
+ {
18
+ "kind": "text",
19
+ "text": "Returns a personalized hello world message."
20
+ }
21
+ ]
22
+ },
23
+ "children": [
24
+ {
25
+ "id": 21,
26
+ "name": "constructor",
27
+ "variant": "declaration",
28
+ "kind": 512,
29
+ "flags": {},
30
+ "signatures": [
31
+ {
32
+ "id": 22,
33
+ "name": "ExampleClass",
34
+ "variant": "signature",
35
+ "kind": 16384,
36
+ "flags": {},
37
+ "type": {
38
+ "type": "reference",
39
+ "target": 20,
40
+ "name": "ExampleClass",
41
+ "package": "@xyd-sources-examples/package-a"
42
+ }
43
+ }
44
+ ]
45
+ },
46
+ {
47
+ "id": 23,
48
+ "name": "helloWorld",
49
+ "variant": "declaration",
50
+ "kind": 2048,
51
+ "flags": {},
52
+ "sources": [
53
+ {
54
+ "fileName": "index.ts",
55
+ "line": 36,
56
+ "character": 4,
57
+ "url": "https://github.com/livesession/xyd/blob/a2256e77dd1fbfde54d6308224d3f41847b1b817/packages/xyd-sources/example/package-a/src/index.ts#L36"
58
+ }
59
+ ],
60
+ "signatures": [
61
+ {
62
+ "id": 24,
63
+ "name": "helloWorld",
64
+ "variant": "signature",
65
+ "kind": 4096,
66
+ "flags": {},
67
+ "comment": {
68
+ "summary": [
69
+ {
70
+ "kind": "text",
71
+ "text": "Returns a hello world message."
72
+ }
73
+ ]
74
+ },
75
+ "sources": [
76
+ {
77
+ "fileName": "index.ts",
78
+ "line": 36,
79
+ "character": 4,
80
+ "url": "https://github.com/livesession/xyd/blob/a2256e77dd1fbfde54d6308224d3f41847b1b817/packages/xyd-sources/example/package-a/src/index.ts#L36"
81
+ }
82
+ ],
83
+ "type": {
84
+ "type": "intrinsic",
85
+ "name": "string"
86
+ }
87
+ }
88
+ ]
89
+ }
90
+ ],
91
+ "groups": [
92
+ {
93
+ "title": "Constructors",
94
+ "children": [
95
+ 21
96
+ ]
97
+ },
98
+ {
99
+ "title": "Methods",
100
+ "children": [
101
+ 23
102
+ ]
103
+ }
104
+ ],
105
+ "sources": [
106
+ {
107
+ "fileName": "index.ts",
108
+ "line": 32,
109
+ "character": 13,
110
+ "url": "https://github.com/livesession/xyd/blob/a2256e77dd1fbfde54d6308224d3f41847b1b817/packages/xyd-sources/example/package-a/src/index.ts#L32"
111
+ }
112
+ ]
113
+ },
114
+ {
115
+ "id": 25,
116
+ "name": "gqlSchemaToReferences",
117
+ "variant": "declaration",
118
+ "kind": 64,
119
+ "flags": {},
120
+ "sources": [
121
+ {
122
+ "fileName": "index.ts",
123
+ "line": 48,
124
+ "character": 16,
125
+ "url": "https://github.com/livesession/xyd/blob/a2256e77dd1fbfde54d6308224d3f41847b1b817/packages/xyd-sources/example/package-a/src/index.ts#L48"
126
+ }
127
+ ],
128
+ "signatures": [
129
+ {
130
+ "id": 26,
131
+ "name": "gqlSchemaToReferences",
132
+ "variant": "signature",
133
+ "kind": 4096,
134
+ "flags": {},
135
+ "comment": {
136
+ "summary": [
137
+ {
138
+ "kind": "text",
139
+ "text": "Converts a GraphQL schema file to references."
140
+ }
141
+ ],
142
+ "blockTags": [
143
+ {
144
+ "tag": "@returns",
145
+ "content": [
146
+ {
147
+ "kind": "text",
148
+ "text": "references"
149
+ }
150
+ ]
151
+ }
152
+ ]
153
+ },
154
+ "sources": [
155
+ {
156
+ "fileName": "index.ts",
157
+ "line": 48,
158
+ "character": 16,
159
+ "url": "https://github.com/livesession/xyd/blob/a2256e77dd1fbfde54d6308224d3f41847b1b817/packages/xyd-sources/example/package-a/src/index.ts#L48"
160
+ }
161
+ ],
162
+ "parameters": [
163
+ {
164
+ "id": 27,
165
+ "name": "schemaLocation",
166
+ "variant": "param",
167
+ "kind": 32768,
168
+ "flags": {},
169
+ "comment": {
170
+ "summary": [
171
+ {
172
+ "kind": "text",
173
+ "text": "The location of the schema file."
174
+ }
175
+ ]
176
+ },
177
+ "type": {
178
+ "type": "intrinsic",
179
+ "name": "string"
180
+ }
181
+ }
182
+ ],
183
+ "type": {
184
+ "type": "reference",
185
+ "target": {
186
+ "packageName": "typescript",
187
+ "packagePath": "lib/lib.es5.d.ts",
188
+ "qualifiedName": "Promise"
189
+ },
190
+ "typeArguments": [
191
+ {
192
+ "type": "tuple"
193
+ }
194
+ ],
195
+ "name": "Promise",
196
+ "package": "typescript"
197
+ }
198
+ }
199
+ ]
200
+ },
201
+ {
202
+ "id": 28,
203
+ "name": "helloWorld",
204
+ "variant": "declaration",
205
+ "kind": 64,
206
+ "flags": {},
207
+ "sources": [
208
+ {
209
+ "fileName": "index.ts",
210
+ "line": 4,
211
+ "character": 16,
212
+ "url": "https://github.com/livesession/xyd/blob/a2256e77dd1fbfde54d6308224d3f41847b1b817/packages/xyd-sources/example/package-a/src/index.ts#L4"
213
+ }
214
+ ],
215
+ "signatures": [
216
+ {
217
+ "id": 29,
218
+ "name": "helloWorld",
219
+ "variant": "signature",
220
+ "kind": 4096,
221
+ "flags": {},
222
+ "comment": {
223
+ "summary": [
224
+ {
225
+ "kind": "text",
226
+ "text": "Returns a hello world message."
227
+ }
228
+ ]
229
+ },
230
+ "sources": [
231
+ {
232
+ "fileName": "index.ts",
233
+ "line": 4,
234
+ "character": 16,
235
+ "url": "https://github.com/livesession/xyd/blob/a2256e77dd1fbfde54d6308224d3f41847b1b817/packages/xyd-sources/example/package-a/src/index.ts#L4"
236
+ }
237
+ ],
238
+ "type": {
239
+ "type": "intrinsic",
240
+ "name": "string"
241
+ }
242
+ }
243
+ ]
244
+ },
245
+ {
246
+ "id": 30,
247
+ "name": "helloWorldV2",
248
+ "variant": "declaration",
249
+ "kind": 64,
250
+ "flags": {},
251
+ "sources": [
252
+ {
253
+ "fileName": "index.ts",
254
+ "line": 15,
255
+ "character": 16,
256
+ "url": "https://github.com/livesession/xyd/blob/a2256e77dd1fbfde54d6308224d3f41847b1b817/packages/xyd-sources/example/package-a/src/index.ts#L15"
257
+ }
258
+ ],
259
+ "signatures": [
260
+ {
261
+ "id": 31,
262
+ "name": "helloWorldV2",
263
+ "variant": "signature",
264
+ "kind": 4096,
265
+ "flags": {},
266
+ "comment": {
267
+ "summary": [
268
+ {
269
+ "kind": "text",
270
+ "text": "Returns a personalized hello world message."
271
+ }
272
+ ],
273
+ "blockTags": [
274
+ {
275
+ "tag": "@returns",
276
+ "content": [
277
+ {
278
+ "kind": "text",
279
+ "text": "A greeting message string."
280
+ }
281
+ ]
282
+ }
283
+ ]
284
+ },
285
+ "sources": [
286
+ {
287
+ "fileName": "index.ts",
288
+ "line": 15,
289
+ "character": 16,
290
+ "url": "https://github.com/livesession/xyd/blob/a2256e77dd1fbfde54d6308224d3f41847b1b817/packages/xyd-sources/example/package-a/src/index.ts#L15"
291
+ }
292
+ ],
293
+ "parameters": [
294
+ {
295
+ "id": 32,
296
+ "name": "name",
297
+ "variant": "param",
298
+ "kind": 32768,
299
+ "flags": {},
300
+ "comment": {
301
+ "summary": [
302
+ {
303
+ "kind": "text",
304
+ "text": "Name of the person to greet."
305
+ }
306
+ ]
307
+ },
308
+ "type": {
309
+ "type": "intrinsic",
310
+ "name": "string"
311
+ }
312
+ },
313
+ {
314
+ "id": 33,
315
+ "name": "enthusiastic",
316
+ "variant": "param",
317
+ "kind": 32768,
318
+ "flags": {},
319
+ "comment": {
320
+ "summary": [
321
+ {
322
+ "kind": "text",
323
+ "text": "If true, adds an exclamation point to the greeting."
324
+ }
325
+ ]
326
+ },
327
+ "type": {
328
+ "type": "intrinsic",
329
+ "name": "boolean"
330
+ },
331
+ "defaultValue": "false"
332
+ }
333
+ ],
334
+ "type": {
335
+ "type": "intrinsic",
336
+ "name": "string"
337
+ }
338
+ }
339
+ ]
340
+ },
341
+ {
342
+ "id": 34,
343
+ "name": "helloWorldV3",
344
+ "variant": "declaration",
345
+ "kind": 64,
346
+ "flags": {},
347
+ "sources": [
348
+ {
349
+ "fileName": "index.ts",
350
+ "line": 25,
351
+ "character": 16,
352
+ "url": "https://github.com/livesession/xyd/blob/a2256e77dd1fbfde54d6308224d3f41847b1b817/packages/xyd-sources/example/package-a/src/index.ts#L25"
353
+ }
354
+ ],
355
+ "signatures": [
356
+ {
357
+ "id": 35,
358
+ "name": "helloWorldV3",
359
+ "variant": "signature",
360
+ "kind": 4096,
361
+ "flags": {},
362
+ "comment": {
363
+ "summary": [
364
+ {
365
+ "kind": "text",
366
+ "text": "Returns a personalized hello world message."
367
+ }
368
+ ],
369
+ "blockTags": [
370
+ {
371
+ "tag": "@returns",
372
+ "content": [
373
+ {
374
+ "kind": "text",
375
+ "text": "A greeting message string."
376
+ }
377
+ ]
378
+ }
379
+ ]
380
+ },
381
+ "sources": [
382
+ {
383
+ "fileName": "index.ts",
384
+ "line": 25,
385
+ "character": 16,
386
+ "url": "https://github.com/livesession/xyd/blob/a2256e77dd1fbfde54d6308224d3f41847b1b817/packages/xyd-sources/example/package-a/src/index.ts#L25"
387
+ }
388
+ ],
389
+ "typeParameters": [
390
+ {
391
+ "id": 36,
392
+ "name": "T",
393
+ "variant": "typeParam",
394
+ "kind": 131072,
395
+ "flags": {},
396
+ "comment": {
397
+ "summary": [
398
+ {
399
+ "kind": "text",
400
+ "text": "The type of the name."
401
+ }
402
+ ]
403
+ }
404
+ }
405
+ ],
406
+ "parameters": [
407
+ {
408
+ "id": 37,
409
+ "name": "name",
410
+ "variant": "param",
411
+ "kind": 32768,
412
+ "flags": {},
413
+ "comment": {
414
+ "summary": [
415
+ {
416
+ "kind": "text",
417
+ "text": "Name of the person to greet."
418
+ }
419
+ ]
420
+ },
421
+ "type": {
422
+ "type": "reference",
423
+ "target": 36,
424
+ "name": "T",
425
+ "package": "@xyd-sources-examples/package-a",
426
+ "refersToTypeParameter": true
427
+ }
428
+ }
429
+ ],
430
+ "type": {
431
+ "type": "intrinsic",
432
+ "name": "string"
433
+ }
434
+ }
435
+ ]
436
+ }
437
+ ],
438
+ "groups": [
439
+ {
440
+ "title": "Classes",
441
+ "children": [
442
+ 20
443
+ ]
444
+ },
445
+ {
446
+ "title": "Functions",
447
+ "children": [
448
+ 25,
449
+ 28,
450
+ 30,
451
+ 34
452
+ ]
453
+ }
454
+ ],
455
+ "packageName": "@xyd-js/sources",
456
+ "symbolIdMap": {
457
+ "19": {
458
+ "packageName": "@xyd-sources-examples/package-a",
459
+ "packagePath": "src/index.ts",
460
+ "qualifiedName": ""
461
+ },
462
+ "20": {
463
+ "packageName": "@xyd-sources-examples/package-a",
464
+ "packagePath": "src/index.ts",
465
+ "qualifiedName": "ExampleClass"
466
+ },
467
+ "23": {
468
+ "packageName": "@xyd-sources-examples/package-a",
469
+ "packagePath": "src/index.ts",
470
+ "qualifiedName": "ExampleClass.helloWorld"
471
+ },
472
+ "24": {
473
+ "packageName": "@xyd-sources-examples/package-a",
474
+ "packagePath": "src/index.ts",
475
+ "qualifiedName": "ExampleClass.helloWorld"
476
+ },
477
+ "25": {
478
+ "packageName": "@xyd-sources-examples/package-a",
479
+ "packagePath": "src/index.ts",
480
+ "qualifiedName": "gqlSchemaToReferences"
481
+ },
482
+ "26": {
483
+ "packageName": "@xyd-sources-examples/package-a",
484
+ "packagePath": "src/index.ts",
485
+ "qualifiedName": "gqlSchemaToReferences"
486
+ },
487
+ "27": {
488
+ "packageName": "@xyd-sources-examples/package-a",
489
+ "packagePath": "src/index.ts",
490
+ "qualifiedName": "schemaLocation"
491
+ },
492
+ "28": {
493
+ "packageName": "@xyd-sources-examples/package-a",
494
+ "packagePath": "src/index.ts",
495
+ "qualifiedName": "helloWorld"
496
+ },
497
+ "29": {
498
+ "packageName": "@xyd-sources-examples/package-a",
499
+ "packagePath": "src/index.ts",
500
+ "qualifiedName": "helloWorld"
501
+ },
502
+ "30": {
503
+ "packageName": "@xyd-sources-examples/package-a",
504
+ "packagePath": "src/index.ts",
505
+ "qualifiedName": "helloWorldV2"
506
+ },
507
+ "31": {
508
+ "packageName": "@xyd-sources-examples/package-a",
509
+ "packagePath": "src/index.ts",
510
+ "qualifiedName": "helloWorldV2"
511
+ },
512
+ "32": {
513
+ "packageName": "@xyd-sources-examples/package-a",
514
+ "packagePath": "src/index.ts",
515
+ "qualifiedName": "name"
516
+ },
517
+ "33": {
518
+ "packageName": "@xyd-sources-examples/package-a",
519
+ "packagePath": "src/index.ts",
520
+ "qualifiedName": "enthusiastic"
521
+ },
522
+ "34": {
523
+ "packageName": "@xyd-sources-examples/package-a",
524
+ "packagePath": "src/index.ts",
525
+ "qualifiedName": "helloWorldV3"
526
+ },
527
+ "35": {
528
+ "packageName": "@xyd-sources-examples/package-a",
529
+ "packagePath": "src/index.ts",
530
+ "qualifiedName": "helloWorldV3"
531
+ },
532
+ "36": {
533
+ "packageName": "@xyd-sources-examples/package-a",
534
+ "packagePath": "src/index.ts",
535
+ "qualifiedName": "T"
536
+ },
537
+ "37": {
538
+ "packageName": "@xyd-sources-examples/package-a",
539
+ "packagePath": "src/index.ts",
540
+ "qualifiedName": "name"
541
+ }
542
+ },
543
+ "files": {
544
+ "entries": {
545
+ "1": "package-a/src/index.ts"
546
+ },
547
+ "reflections": {
548
+ "1": 19
549
+ }
550
+ }
551
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "@xyd-sources-examples/package-a",
3
+ "main": "dist/index.js"
4
+ }
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Returns a hello world message.
3
+ */
4
+ export function helloWorld(): string {
5
+ return 'Hello world!';
6
+ }
7
+
8
+ /**
9
+ * Returns a personalized hello world message.
10
+ *
11
+ * @param name - Name of the person to greet.
12
+ * @param enthusiastic - If true, adds an exclamation point to the greeting.
13
+ * @returns A greeting message string.
14
+ */
15
+ export function helloWorldV2(name: string, enthusiastic: boolean = false): string {
16
+ return enthusiastic ? `Hello, ${name}!` : `Hello, ${name}`;
17
+ }
18
+
19
+ /**
20
+ * Returns a personalized hello world message.
21
+ * @param name - Name of the person to greet.
22
+ * @typeParam T - The type of the name.
23
+ * @returns A greeting message string.
24
+ */
25
+ export function helloWorldV3<T>(name: T): string {
26
+ return `Hello, ${name}!`
27
+ }
28
+
29
+ /**
30
+ * Returns a personalized hello world message.
31
+ */
32
+ export class ExampleClass {
33
+ /**
34
+ * Returns a hello world message.
35
+ */
36
+ helloWorld(): string {
37
+ return 'Hello world!';
38
+ }
39
+ }
40
+
41
+ /**
42
+ * Converts a GraphQL schema file to references.
43
+ *
44
+ * @param schemaLocation - The location of the schema file.
45
+ *
46
+ * @returns references
47
+ */
48
+ export function gqlSchemaToReferences(
49
+ schemaLocation: string
50
+ ): Promise<[]> {
51
+ if (schemaLocation.endsWith(".graphql")) {
52
+ return Promise.resolve([])
53
+ }
54
+
55
+ return Promise.resolve([])
56
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "strict": true,
7
+ "esModuleInterop": true,
8
+ "skipLibCheck": true,
9
+ "forceConsistentCasingInFileNames": true,
10
+ "outDir": "./dist",
11
+ "declaration": true,
12
+ "declarationMap": true,
13
+ "incremental": true,
14
+ "tsBuildInfoFile": "./dist/tsconfig.tsbuildinfo"
15
+ },
16
+ "include": [
17
+ "src/**/*.ts"
18
+ ],
19
+ "exclude": [
20
+ "node_modules",
21
+ "dist"
22
+ ]
23
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@xyd-sources-examples/package-b",
3
+ "files": [
4
+ "./dist"
5
+ ],
6
+ "main": "./dist/index.js"
7
+ }