@xyd-js/sources 0.0.1-xyd.0 → 0.1.1-build.161
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/CHANGELOG.md +1342 -0
- package/ISSUES.md +10 -0
- package/LICENSE +21 -0
- package/TODO.md +5 -2
- package/__fixtures__/-1.typescript/package.json +5 -0
- package/__fixtures__/-1.typescript/src/index.ts +0 -0
- package/__fixtures__/-1.typescript/src/settings.ts +592 -0
- package/__fixtures__/-1.typescript/tsconfig.json +8 -0
- package/__fixtures__/-2.react.basic/1.flat-interface.output.json +114 -0
- package/__fixtures__/-2.react.basic/2.file-connect-interface.output.json +60 -0
- package/__fixtures__/-2.react.basic/2a.file-connect-interface-advanced.output.json +92 -0
- package/__fixtures__/-2.react.basic/3.props-as-variants.output.json +166 -0
- package/__fixtures__/-2.react.basic/4.outside-interface.output.json +60 -0
- package/__fixtures__/-2.react.basic/5.inline-props.output.json +60 -0
- package/__fixtures__/-2.react.basic/5.outside-inline-props.output.json +60 -0
- package/__fixtures__/-2.react.basic/5a.inline-props+outside.output.json +60 -0
- package/__fixtures__/-2.react.basic/5b.inline-props+interfaces.output.json +92 -0
- package/__fixtures__/-2.react.basic/package.json +4 -0
- package/__fixtures__/-2.react.basic/src/1.flat-interface.tsx +41 -0
- package/__fixtures__/-2.react.basic/src/2.file-connect-interface.tsx +28 -0
- package/__fixtures__/-2.react.basic/src/2a.file-connect-interace+advanced.tsx +54 -0
- package/__fixtures__/-2.react.basic/src/3.props-as-variants.tsx +67 -0
- package/__fixtures__/-2.react.basic/src/4.outside-interface.tsx +13 -0
- package/__fixtures__/-2.react.basic/src/4.outside-interface2.ts +15 -0
- package/__fixtures__/-2.react.basic/src/5.inline-props.tsx +19 -0
- package/__fixtures__/-2.react.basic/src/5a.inline-props+outside.tsx +19 -0
- package/__fixtures__/-2.react.basic/src/5b.inline-props+interfaces.tsx +62 -0
- package/__fixtures__/-2.react.basic/src/index.ts +0 -0
- package/__fixtures__/-2.react.basic/tsconfig.json +8 -0
- package/__tests__/sourcesToUniform.test.ts +167 -0
- package/__tests__/testResolvePropertySymbol.ts +838 -0
- package/__tests__/types.ts +12 -0
- package/__tests__/utils.ts +108 -0
- package/dist/index.cjs +0 -645
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -82
- package/dist/index.d.ts +1 -82
- package/dist/index.js +0 -611
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +237 -0
- package/dist/react.cjs.map +1 -0
- package/dist/react.d.cts +6 -0
- package/dist/react.d.ts +6 -0
- package/dist/react.js +212 -0
- package/dist/react.js.map +1 -0
- package/dist/ts.cjs +1794 -0
- package/dist/ts.cjs.map +1 -0
- package/dist/ts.d.cts +14 -0
- package/dist/ts.d.ts +14 -0
- package/dist/ts.js +1760 -0
- package/dist/ts.js.map +1 -0
- package/package.json +23 -4
- package/packages/react/index.ts +1 -0
- package/packages/react/uniformToReactUniform.ts +275 -0
- package/{src → packages/ts}/SignatureText.ts +26 -7
- package/packages/ts/TypeDocTransformer.ts +1519 -0
- package/packages/ts/__fixtures__/packages2/package-a/package.json +4 -0
- package/packages/ts/__fixtures__/packages2/package-a/src/index.ts +496 -0
- package/packages/ts/__fixtures__/packages2/package-a/tsconfig.json +6 -0
- package/packages/ts/__fixtures__/packages3/package-a/package.json +4 -0
- package/packages/ts/__fixtures__/packages3/package-a/src/index.ts +488 -0
- package/packages/ts/__fixtures__/packages3/package-a/tsconfig.json +6 -0
- package/packages/ts/__fixtures__/packages3/project.json +171 -0
- package/packages/ts/__fixtures__/react/react-a/package.json +5 -0
- package/packages/ts/__fixtures__/react/react-a/src/TestAbc.tsx +90 -0
- package/packages/ts/__fixtures__/react/react-a/src/TestBasic.tsx +27 -0
- package/packages/ts/__fixtures__/react/react-a/src/TestNamedParameters.tsx +27 -0
- package/packages/ts/__fixtures__/react/react-a/src/TestNamedParameters2.tsx +26 -0
- package/packages/ts/__fixtures__/react/react-a/src/TestUnion.tsx +32 -0
- package/packages/ts/__fixtures__/react/react-a/src/index.ts +1 -0
- package/packages/ts/__fixtures__/react/react-a/tsconfig.json +8 -0
- package/packages/ts/__fixtures__/references-output-project.json +344 -0
- package/packages/ts/__fixtures__/references-output-react.json +68 -0
- package/packages/ts/__fixtures__/references-output.json +129 -0
- package/packages/ts/__tests__/sourcesToUniform.test.ts +106 -0
- package/packages/ts/context.ts +0 -0
- package/packages/ts/converterts/ts-class.ts +0 -0
- package/packages/ts/converterts/ts-enum.ts +0 -0
- package/packages/ts/converterts/ts-function.ts +0 -0
- package/packages/ts/converterts/ts-interface.ts +0 -0
- package/packages/ts/converterts/ts-type.ts +0 -0
- package/packages/ts/index.ts +129 -0
- package/packages/ts/ts-core.ts +0 -0
- package/packages/ts/uniformToMiniUniform.ts +486 -0
- package/src/index.ts +0 -45
- package/tsconfig.json +9 -1
- package/tsup.config.ts +4 -4
- package/vitest.config.ts +34 -0
- package/dist/example.cjs +0 -642
- package/dist/example.cjs.map +0 -1
- package/dist/example.d.cts +0 -2
- package/dist/example.d.ts +0 -2
- package/dist/example.js +0 -618
- package/dist/example.js.map +0 -1
- package/docs/README.md +0 -20
- package/docs/classes/ExampleClass.md +0 -35
- package/docs/functions/gqlSchemaToReferences.md +0 -27
- package/docs/functions/helloWorld.md +0 -17
- package/docs/functions/helloWorldV2.md +0 -33
- package/docs/functions/helloWorldV3.md +0 -35
- package/docs.json +0 -551
- package/references_todo.json +0 -220
- package/src/TypeDocTransformer.ts +0 -572
- /package/{example → packages/ts/__fixtures__/packages}/package-a/package.json +0 -0
- /package/{example → packages/ts/__fixtures__/packages}/package-a/src/index.ts +0 -0
- /package/{example → packages/ts/__fixtures__/packages}/package-a/tsconfig.json +0 -0
- /package/{example → packages/ts/__fixtures__/packages}/package-b/package.json +0 -0
- /package/{example → packages/ts/__fixtures__/packages}/package-b/src/billing.ts +0 -0
- /package/{example → packages/ts/__fixtures__/packages}/package-b/src/index.ts +0 -0
- /package/{example → packages/ts/__fixtures__/packages}/package-b/tsconfig.json +0 -0
package/references_todo.json
DELETED
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"title": "Class ExampleClass",
|
|
4
|
-
"canonical": "class-ExampleClass",
|
|
5
|
-
"description": "---\ntitle: ExampleClass \ngroup: [Source Code, Classes]\n---\nReturns a personalized hello world message.\n",
|
|
6
|
-
"context": {
|
|
7
|
-
"fileName": "index.ts",
|
|
8
|
-
"fileFullPath": "src/index.ts",
|
|
9
|
-
"line": 32,
|
|
10
|
-
"col": 13,
|
|
11
|
-
"signatureText": {
|
|
12
|
-
"code": "export class ExampleClass {\n}",
|
|
13
|
-
"lang": "ts"
|
|
14
|
-
},
|
|
15
|
-
"sourcecode": {
|
|
16
|
-
"code": "export class ExampleClass {\n /**\n * Returns a hello world message.\n */\n helloWorld(): string {\n return 'Hello world!';\n }\n}",
|
|
17
|
-
"lang": "ts"
|
|
18
|
-
},
|
|
19
|
-
"package": "@xyd-sources-examples/package-a"
|
|
20
|
-
},
|
|
21
|
-
"examples": {
|
|
22
|
-
"groups": []
|
|
23
|
-
},
|
|
24
|
-
"definitions": [
|
|
25
|
-
{
|
|
26
|
-
"title": "Constructor",
|
|
27
|
-
"properties": []
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"title": "Methods",
|
|
31
|
-
"properties": [
|
|
32
|
-
{
|
|
33
|
-
"name": "helloWorld",
|
|
34
|
-
"type": "string",
|
|
35
|
-
"description": "Returns a hello world message.\n"
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"title": "Function gqlSchemaToReferences",
|
|
43
|
-
"canonical": "fn-gqlSchemaToReferences",
|
|
44
|
-
"description": "---\ntitle: gqlSchemaToReferences\nabc: 123\ngroup: [Sourc, Functions]\n---\nConverts a GraphQL schema file to references.\n",
|
|
45
|
-
"context": {
|
|
46
|
-
"fileName": "index.ts",
|
|
47
|
-
"fileFullPath": "src/index.ts",
|
|
48
|
-
"line": 48,
|
|
49
|
-
"col": 16,
|
|
50
|
-
"signatureText": {
|
|
51
|
-
"code": "export function gqlSchemaToReferences(schemaLocation: string): Promise<[\n]>;",
|
|
52
|
-
"lang": "ts"
|
|
53
|
-
},
|
|
54
|
-
"sourcecode": {
|
|
55
|
-
"code": "export function gqlSchemaToReferences(\n schemaLocation: string\n): Promise<[]> {\n if (schemaLocation.endsWith(\".graphql\")) {\n return Promise.resolve([])\n }\n\n return Promise.resolve([])\n}",
|
|
56
|
-
"lang": "ts"
|
|
57
|
-
},
|
|
58
|
-
"package": "@xyd-sources-examples/package-a"
|
|
59
|
-
},
|
|
60
|
-
"examples": {
|
|
61
|
-
"groups": []
|
|
62
|
-
},
|
|
63
|
-
"definitions": [
|
|
64
|
-
{
|
|
65
|
-
"title": "Returns",
|
|
66
|
-
"properties": [
|
|
67
|
-
{
|
|
68
|
-
"name": "",
|
|
69
|
-
"type": "<Promise>",
|
|
70
|
-
"description": "references\n"
|
|
71
|
-
}
|
|
72
|
-
]
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"title": "Parameters",
|
|
76
|
-
"properties": [
|
|
77
|
-
{
|
|
78
|
-
"name": "schemaLocation",
|
|
79
|
-
"type": "string",
|
|
80
|
-
"description": "The location of the schema file.\n"
|
|
81
|
-
}
|
|
82
|
-
]
|
|
83
|
-
}
|
|
84
|
-
]
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"title": "Function helloWorld",
|
|
88
|
-
"canonical": "fn-helloWorld",
|
|
89
|
-
"description": "---\ntitle: helloWorld\nabc: 123\ngroup: [Sourc, Functions]\n---\nReturns a hello world message.\n",
|
|
90
|
-
"context": {
|
|
91
|
-
"fileName": "index.ts",
|
|
92
|
-
"fileFullPath": "src/index.ts",
|
|
93
|
-
"line": 4,
|
|
94
|
-
"col": 16,
|
|
95
|
-
"signatureText": {
|
|
96
|
-
"code": "export function helloWorld(): string;",
|
|
97
|
-
"lang": "ts"
|
|
98
|
-
},
|
|
99
|
-
"sourcecode": {
|
|
100
|
-
"code": "export function helloWorld(): string {\n return 'Hello world!';\n}",
|
|
101
|
-
"lang": "ts"
|
|
102
|
-
},
|
|
103
|
-
"package": "@xyd-sources-examples/package-a"
|
|
104
|
-
},
|
|
105
|
-
"examples": {
|
|
106
|
-
"groups": []
|
|
107
|
-
},
|
|
108
|
-
"definitions": [
|
|
109
|
-
{
|
|
110
|
-
"title": "Returns",
|
|
111
|
-
"properties": [
|
|
112
|
-
{
|
|
113
|
-
"name": "",
|
|
114
|
-
"type": "string",
|
|
115
|
-
"description": ""
|
|
116
|
-
}
|
|
117
|
-
]
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"title": "Parameters",
|
|
121
|
-
"properties": []
|
|
122
|
-
}
|
|
123
|
-
]
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"title": "Function helloWorldV2",
|
|
127
|
-
"canonical": "fn-helloWorldV2",
|
|
128
|
-
"description": "---\ntitle: helloWorldV2\nabc: 123\ngroup: [Sourc, Functions]\n---\nReturns a personalized hello world message.\n",
|
|
129
|
-
"context": {
|
|
130
|
-
"fileName": "index.ts",
|
|
131
|
-
"fileFullPath": "src/index.ts",
|
|
132
|
-
"line": 15,
|
|
133
|
-
"col": 16,
|
|
134
|
-
"signatureText": {
|
|
135
|
-
"code": "export function helloWorldV2(name: string, enthusiastic: boolean = false): string;",
|
|
136
|
-
"lang": "ts"
|
|
137
|
-
},
|
|
138
|
-
"sourcecode": {
|
|
139
|
-
"code": "export function helloWorldV2(name: string, enthusiastic: boolean = false): string {\n return enthusiastic ? `Hello, ${name}!` : `Hello, ${name}`;\n}",
|
|
140
|
-
"lang": "ts"
|
|
141
|
-
},
|
|
142
|
-
"package": "@xyd-sources-examples/package-a"
|
|
143
|
-
},
|
|
144
|
-
"examples": {
|
|
145
|
-
"groups": []
|
|
146
|
-
},
|
|
147
|
-
"definitions": [
|
|
148
|
-
{
|
|
149
|
-
"title": "Returns",
|
|
150
|
-
"properties": [
|
|
151
|
-
{
|
|
152
|
-
"name": "",
|
|
153
|
-
"type": "string",
|
|
154
|
-
"description": "A greeting message string.\n"
|
|
155
|
-
}
|
|
156
|
-
]
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
"title": "Parameters",
|
|
160
|
-
"properties": [
|
|
161
|
-
{
|
|
162
|
-
"name": "name",
|
|
163
|
-
"type": "string",
|
|
164
|
-
"description": "Name of the person to greet.\n"
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
"name": "enthusiastic",
|
|
168
|
-
"type": "boolean",
|
|
169
|
-
"description": "If true, adds an exclamation point to the greeting.\n"
|
|
170
|
-
}
|
|
171
|
-
]
|
|
172
|
-
}
|
|
173
|
-
]
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
"title": "Function helloWorldV3",
|
|
177
|
-
"canonical": "fn-helloWorldV3",
|
|
178
|
-
"description": "---\ntitle: helloWorldV3\nabc: 123\ngroup: [Sourc, Functions]\n---\nReturns a personalized hello world message.\n",
|
|
179
|
-
"context": {
|
|
180
|
-
"fileName": "index.ts",
|
|
181
|
-
"fileFullPath": "src/index.ts",
|
|
182
|
-
"line": 25,
|
|
183
|
-
"col": 16,
|
|
184
|
-
"signatureText": {
|
|
185
|
-
"code": "export function helloWorldV3<T>(name: T): string;",
|
|
186
|
-
"lang": "ts"
|
|
187
|
-
},
|
|
188
|
-
"sourcecode": {
|
|
189
|
-
"code": "export function helloWorldV3<T>(name: T): string {\n return `Hello, ${name}!`\n}",
|
|
190
|
-
"lang": "ts"
|
|
191
|
-
},
|
|
192
|
-
"package": "@xyd-sources-examples/package-a"
|
|
193
|
-
},
|
|
194
|
-
"examples": {
|
|
195
|
-
"groups": []
|
|
196
|
-
},
|
|
197
|
-
"definitions": [
|
|
198
|
-
{
|
|
199
|
-
"title": "Returns",
|
|
200
|
-
"properties": [
|
|
201
|
-
{
|
|
202
|
-
"name": "",
|
|
203
|
-
"type": "string",
|
|
204
|
-
"description": "A greeting message string.\n"
|
|
205
|
-
}
|
|
206
|
-
]
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
"title": "Parameters",
|
|
210
|
-
"properties": [
|
|
211
|
-
{
|
|
212
|
-
"name": "name",
|
|
213
|
-
"type": "<T>",
|
|
214
|
-
"description": "Name of the person to greet.\n"
|
|
215
|
-
}
|
|
216
|
-
]
|
|
217
|
-
}
|
|
218
|
-
]
|
|
219
|
-
}
|
|
220
|
-
]
|