devextreme-internal-tools 7.8.1 → 8.0.0-beta.3

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 (60) hide show
  1. package/Readme.md +1 -421
  2. package/bin/DevExtreme.Declarations.Discoverer.dll +0 -0
  3. package/bin/DevExtreme.Declarations.IntegrityValidator.dll +0 -0
  4. package/bin/DevExtreme.Declarations.dll +0 -0
  5. package/bin/DevExtreme.Descriptions.Injector.dll +0 -0
  6. package/bin/DevExtreme.Infrastructure.dll +0 -0
  7. package/bin/DevExtreme.IntegrationDataGenerator.dll +0 -0
  8. package/bin/DevExtreme.NgSmdGenerator.dll +0 -0
  9. package/bin/DevExtreme.SmdCommon.dll +0 -0
  10. package/bin/DevExtreme.StrongMetaDataGenerator.dll +0 -0
  11. package/bin/DevExtreme.Topics.ExtraFilesGenerator.dll +0 -0
  12. package/bin/DevExtreme.Topics.Generator.dll +0 -0
  13. package/bin/DevExtreme.Topics.ModulesGuideValidator.dll +0 -0
  14. package/bin/DevExtreme.Topics.Validation.dll +0 -0
  15. package/bin/DevExtreme.Topics.dll +0 -0
  16. package/bin/DevExtreme.WebSite.ContentMapCreator.dll +0 -0
  17. package/bin/DevExtreme.WebSite.LinksConverter.dll +0 -0
  18. package/bin/DevExtreme.WebSite.SyntaxDataGenerator.dll +0 -0
  19. package/bin/internal-tools-log.txt +3 -3
  20. package/index.js +4 -4
  21. package/index.js.map +1 -1
  22. package/package.json +5 -3
  23. package/ts/bundler/bundler.js +5 -33
  24. package/ts/bundler/bundler.js.map +1 -1
  25. package/ts/collapser/collapser.js +11 -11
  26. package/ts/collapser/collapser.js.map +1 -1
  27. package/ts/common/common-resolving.js +3 -1
  28. package/ts/common/common-resolving.js.map +1 -1
  29. package/ts/common/tags.js +68 -85
  30. package/ts/common/tags.js.map +1 -1
  31. package/ts/common/ts-type-resolving.js +43 -53
  32. package/ts/common/ts-type-resolving.js.map +1 -1
  33. package/ts/common/ts-utils.js +90 -17
  34. package/ts/common/ts-utils.js.map +1 -1
  35. package/ts/common/type-resolving.js +17 -26
  36. package/ts/common/type-resolving.js.map +1 -1
  37. package/ts/common/utils.js +13 -5
  38. package/ts/common/utils.js.map +1 -1
  39. package/ts/discoverer/discovering-error.js +8 -6
  40. package/ts/discoverer/discovering-error.js.map +1 -1
  41. package/ts/discoverer/discovering.js +14 -177
  42. package/ts/discoverer/discovering.js.map +1 -1
  43. package/ts/discoverer/parsing/common.js +68 -0
  44. package/ts/discoverer/parsing/common.js.map +1 -0
  45. package/ts/discoverer/parsing/dts-parser.js +336 -0
  46. package/ts/discoverer/parsing/dts-parser.js.map +1 -0
  47. package/ts/discoverer/parsing/enum-collecting.js +8 -10
  48. package/ts/discoverer/parsing/enum-collecting.js.map +1 -1
  49. package/ts/discoverer/parsing/renovation-parser.js +292 -0
  50. package/ts/discoverer/parsing/renovation-parser.js.map +1 -0
  51. package/ts/modules-meta-generator/modules-meta-generator.js +7 -8
  52. package/ts/modules-meta-generator/modules-meta-generator.js.map +1 -1
  53. package/ts/scripts/args.js +3 -1
  54. package/ts/scripts/args.js.map +1 -1
  55. package/ts/scripts/tools.js +15 -19
  56. package/ts/scripts/tools.js.map +1 -1
  57. package/ts/discoverer/processing.js +0 -237
  58. package/ts/discoverer/processing.js.map +0 -1
  59. package/ts/tag-cleaner/tag-cleaner.js +0 -43
  60. package/ts/tag-cleaner/tag-cleaner.js.map +0 -1
package/Readme.md CHANGED
@@ -1,429 +1,9 @@
1
1
  # DevExtreme Internal Tools #
2
2
 
3
- ![](https://github.com/DevExpress/devextreme-internal-tools/workflows/Tests/badge.svg?branch=releases/v7)
3
+ ![](https://github.com/DevExpress/devextreme-internal-tools/workflows/Tests/badge.svg?branch=releases/v8.0)
4
4
 
5
5
  This package contains tools used by the DevExtreme team for development.
6
6
 
7
- # Commands
8
-
9
- | Command | Description |
10
- | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
11
- | [discover-declarations](#discover-declarations) | Runs discovering |
12
- | [discover-ts-declarations](#discover-ts-declarations) | Runs discovering for TS files only |
13
- | [generate-smd](#generate-smd) | Generates the `StrongMetaData.json` file |
14
- | [generate-ng-smd](#generate-ng-smd) | Generates the `NGDataMeta.json` file |
15
- | [update-meta](#update-meta) | Updates the `NGDataMeta.json` file |
16
- | [generate-ts-bundle](#generate-ts-bundle) | Bundles all `*.d.ts` files to a single file (e.g. `dx.all.d.ts`) |
17
- | [update-ts-bundle](#update-ts-bundle) | Bundles all `*.d.ts` files to a single file (e.g. `dx.all.d.ts`) |
18
- | [integration-data-generator](#integration-data-generator) | Generates `integration-data.json` and `integration-data-model.json` |
19
- | [update-integration-meta](#update-integration-meta) | Updates `integration-data.json` and `integration-data-model.json` |
20
- | [inject-descriptions](#inject-descriptions) | Runs the injector for all `*.d.ts` files that equal the search pattern. |
21
- | [inject-descriptions-to-bundle](#inject-descriptions-to-bundle) | Runs the injector for the `dx.all.d.ts` file only |
22
- | [update-topics](#update-topics) | Updates the documentation |
23
- | [generate-content-map](#generate-content-map) | Generates content maps necessary to run `WebSite.JS`. The actual content is not included. |
24
- | [update-links](#update-links) | Updates links for the site. Logs are saved in the root directory. |
25
-
26
- ---
27
-
28
-
29
- ## discover-declarations
30
- ```
31
- dx-tools discover-declarations
32
- ```
33
- | Arg | Default | Description |
34
- | ------------ | ---------------------------------- | ----------------------------------------- |
35
- | `js-scripts` | *rootDir*\js | See [common arguments](#common-arguments) |
36
- | `artifacts` | *rootDir*\artifacts\internal-tools | See [common arguments](#common-arguments) |
37
- | `docs-root` | Optional parameter | See [common arguments](#common-arguments) |
38
- | `ignore-pattern` | null | See [common arguments](#common-arguments) |
39
-
40
- ## discover-ts-declarations
41
- ```
42
- dx-tools discover-ts-declarations
43
- ```
44
- | Arg | Default | Description |
45
- | ------------ | ------------ | ----------------------------------------- |
46
- | `js-scripts` | *rootDir*\js | See [common arguments](#common-arguments) |
47
- | `ignore-pattern` | null | See [common arguments](#common-arguments) |
48
-
49
- ## generate-smd
50
- ```
51
- dx-tools generate-smd --version xx_x
52
- ```
53
- | Arg | Default | Description |
54
- | ------------------- | ------------------------------------------------------ | ----------------------------------------- |
55
- | `version` | xx_x | See [common arguments](#common-arguments) |
56
- | `output-path` | *rootDir*\artifacts\internal-tools\StrongMetaData.json | See [common arguments](#common-arguments) |
57
- | `declarations-path` | *rootDir*\artifacts\internal-tools\Declarations.json | See [common arguments](#common-arguments) |
58
-
59
- ## generate-ng-smd
60
- ```
61
- dx-tools generate-ng-smd --version xx_x
62
- ```
63
- | Arg | Default | Description |
64
- | ------------------- | ---------------------------------------------------- | ----------------------------------------- |
65
- | `version` | xx_x | See [common arguments](#common-arguments) |
66
- | `output-path` | *rootDir*\artifacts\internal-tools\NGMetaData.json | See [common arguments](#common-arguments) |
67
- | `declarations-path` | *rootDir*\artifacts\internal-tools\Declarations.json | See [common arguments](#common-arguments) |
68
-
69
- ## update-meta
70
- ```
71
- dx-tools update-meta --version xx_x --js-scripts D:\DevExtreme\js --docs-root D:\devextreme-docs
72
- ```
73
- | Arg | Default | Descriptions |
74
- | ------------------- | ---------------------------------------------------- | ----------------------------------------- |
75
- | `version` | xx_x | See [common arguments](#common-arguments) |
76
- | `js-scripts` | *rootDir*\js | See [common arguments](#common-arguments) |
77
- | `artifacts` | *rootDir*\artifacts\internal-tools | See [common arguments](#common-arguments) |
78
- | `output-path` | *rootDir*\artifacts\internal-tools\NGMetaData.json | See [common arguments](#common-arguments) |
79
- | `declarations-path` | *rootDir*\artifacts\internal-tools\Declarations.json | See [common arguments](#common-arguments) |
80
- | `docs-root` | Optional parameter | See [common arguments](#common-arguments) |
81
- | `ignore-pattern` | null | See [common arguments](#common-arguments) |
82
-
83
- ## generate-ts-bundle
84
- ```
85
- dx-tools generate-ts-bundle --js-scripts D:\DevExtreme\js --output-path D:\DevExtreme\ts\dx.all.d.ts
86
- ```
87
- | Arg | Default | Description |
88
- | ------------- | ------------------------ | ----------------------------------------- |
89
- | `js-scripts` | undefined | See [common arguments](#common-arguments) |
90
- | `output-path` | undefined | See [common arguments](#common-arguments) |
91
- | `ignore-pattern` | null | See [common arguments](#common-arguments) |
92
-
93
- For more information, see [Bundler specs](#bundler-specs)
94
-
95
- ## update-ts-bundle
96
- ```
97
- dx-tools update-ts-bundle --js-scripts D:\DevExtreme\js --output-path D:\DevExtreme\ts\dx.all.d.ts
98
- ```
99
- | Arg | Default | Description |
100
- | ------------- | ------------------------ | ----------------------------------------- |
101
- | `js-scripts` | undefined | See [common arguments](#common-arguments) |
102
- | `output-path` | undefined | See [common arguments](#common-arguments) |
103
- | `ignore-pattern` | null | See [common arguments](#common-arguments) |
104
-
105
- For more information, see [Bundler specs](#bundler-specs)
106
-
107
- ## integration-data-generator
108
- ```
109
- dx-tools integration-data-generator
110
- ```
111
- | Arg | Default | Description |
112
- | ------------------- | -------------------------------------------------------- | ----------------------------------------- |
113
- | `output-path` | *rootDir*\artifacts\internal-tools\integration-data.json | See [common arguments](#common-arguments) |
114
- | `declarations-path` | *rootDir*\artifacts\internal-tools\Declarations.json | See [common arguments](#common-arguments) |
115
-
116
- ## update-integration-meta
117
- ```
118
- dx-tools update-integration-meta --js-scripts D:\DevExtreme\js --docs-root D:\devextreme-docs
119
- ```
120
- | Arg | Default | Description |
121
- | ------------------- | -------------------------------------------------------- | ----------------------------------------- |
122
- | `js-scripts` | *rootDir*\js | See [common arguments](#common-arguments) |
123
- | `artifacts` | *rootDir*\artifacts\internal-tools | See [common arguments](#common-arguments) |
124
- | `output-path` | *rootDir*\artifacts\internal-tools\integration-data.json | See [common arguments](#common-arguments) |
125
- | `declarations-path` | *rootDir*\artifacts\internal-tools\Declarations.json | See [common arguments](#common-arguments) |
126
- | `docs-root` | Optional parameter | See [common arguments](#common-arguments) |
127
- | `ignore-pattern` | null | See [common arguments](#common-arguments) |
128
-
129
- ## inject-descriptions
130
- ```
131
- dx-tools inject-descriptions
132
- ```
133
- | Arg | Default | Description |
134
- | ------------------- | ---------------------------------------------------- | ----------------------------------------- |
135
- | `js-scripts` | *rootDir*\js | See [common arguments](#common-arguments) |
136
- | `descriptions-path` | *rootDir*\artifacts\internal-tools\Descriptions.json | Sets path to the Descriptions.json file |
137
- | `search-pattern` | * | Sets a pattern to find the files |
138
- | `ignore-pattern` | null | See [common arguments](#common-arguments) |
139
-
140
- ## inject-descriptions-to-bundle
141
- ```
142
- dx-tools inject-descriptions-to-bundle
143
- ```
144
- | Arg | Default | Description |
145
- | ------------------- | ---------------------------------------------------------------- | ----------------------------------------- |
146
- | `js-scripts` | *rootDir*\js | See [common arguments](#common-arguments) |
147
- | `descriptions-path` | *rootDir*\artifacts\internal-tools\Descriptions.json | Sets path to the Descriptions.json file |
148
- | `target-path` | *rootDir*\node_modules\devextreme-internal-tools\bin\dx.all.d.ts | Sets the path to the `dx.all.d.ts` file |
149
- | `output-path` | `target-path | See [common arguments](#common-arguments) |
150
- | `ignore-pattern` | null | See [common arguments](#common-arguments) |
151
-
152
- ## update-topics
153
- ```
154
- dx-tools update-topics
155
- ```
156
- | Arg | Default | Description |
157
- | ------------ | ---------------------------------- | ----------------------------------------- |
158
- | `js-scripts` | *rootDir*\js | See [common arguments](#common-arguments) |
159
- | `docs-root` | *rootDir* | See [common arguments](#common-arguments) |
160
- | `artifacts` | *rootDir*\artifacts\internal-tools | See [common arguments](#common-arguments) |
161
-
162
- ## generate-content-map
163
- ```
164
- dx-tools generate-content-map
165
- ```
166
- | Arg | Default | Description |
167
- | ----------- | ------------------------- | ----------------------------------------- |
168
- | `docs-root` | *rootDir* | See [common arguments](#common-arguments) |
169
- | `version` | Version in `package.json` | See [common arguments](#common-arguments) |
170
-
171
- ## update-links
172
- ```
173
- dx-tools update-links --check-all --validation
174
- ```
175
- | Flag | Description |
176
- | ------------------ | -------------------------------------------- |
177
- | `--fail-on-change` | Check and update links in changed files only |
178
- | `--check-all` | Check and update links in all files |
179
- | `--validation` | Check links without updating them |
180
-
181
- # Common Arguments
182
-
183
- | Arg | Description |
184
- | ------------------- | --------------------------------------------------------------------------------------------------- |
185
- | `js-scripts` | Path to the `js` folder in the [DevExtreme repo](https://github.com/DevExpress/DevExtreme) |
186
- | `docs-root` | Path to the [devextreme-documentation repo](https://github.com/DevExpress/devextreme-documentation) |
187
- | `version` | Major version (for example, `20_1`) |
188
- | `artifacts` | Path to the `artifacts` folder |
189
- | `declarations-path` | Path to the `Declarations.json` file |
190
- | `output-path` | Path to the output file |
191
- | `ignore-pattern` | Pattern for ignoring files |
192
-
193
-
194
- # Development
195
-
196
- We assume that [DevExtreme repo](https://github.com/DevExpress/DevExtreme) is located in the same parent directory:
197
- ```
198
- ···
199
- ├── devextreme/
200
- │ ├── js/
201
- │ └── ···
202
- ├── devextreme-internal-tools/
203
- │ └── ···
204
- ···
205
- ```
206
- If you need to target another directory, go to `./package.json` and change `--js-scripts` argument value.
207
-
208
- ## Discover TypeScript Declarations
209
-
210
- ```
211
- npm run build-ts
212
- npm run discover
213
- ```
214
-
215
- The commands above run the TypeScript Discoverer only. The .NET Discoverer should be run separately.
216
-
217
- ## Discover TypeScript Declarations in Watch Mode
218
-
219
- ```
220
- npm run build-ts-watch
221
- npm run discover-watch
222
- ```
223
-
224
- `build-ts-watch` recompiles the TypeScript Discoverer when its sources change.
225
-
226
- `discover-watch` reruns the TypeScript Discoverer when Declarations change.
227
-
228
- # Additional Information
229
-
230
- ## Bundler specs
231
-
232
- `Bundler` is a tool that bundles all `*.d.ts` files into a single `bundle` file. A `bundle` is a file with a set of module declarations (namespaces).
233
-
234
- ```typescript
235
- declare global {}
236
-
237
- declare module DevExpress {}
238
-
239
- declare module DevExpress.module1 {}
240
- ```
241
-
242
- The bundling process starts with collecting all `public` types (types, interfaces, classes, etc.). A type is considered `public` if it is:
243
-
244
- - exported and has the `@docid`, `@public`, or `@const` jsDoc tag.
245
- - referenced by another `public` type.
246
-
247
- ```typescript
248
-
249
- export interface NonPublicType { }
250
-
251
- /** @docid */
252
- export interface PublicType {
253
- field: AnotherPublicType;
254
- }
255
-
256
- export interface AnotherPublicType {}
257
-
258
- ```
259
-
260
- The next step is to decide what namespace the `public` type belongs to.
261
-
262
- There are two options:
263
-
264
- - the namespace is set explicitly with the help of the `@namespace` jsDoc tag.
265
- - the namespace is calculated based on the type file location and structure.
266
-
267
- In the latter case, there are 3 options:
268
-
269
- - if the type is declared in the `global` namespace, it is preserved in this namespace.
270
- - the calculated namespace is a `DevExpress` string followed by the first folder name in `cwd`. E.g., for types in the `{cwd}/core/utils/math/calculation.utils.d.ts` file, the namespace is `DevExpress.core`.
271
- - if there is the default export of some class in the file, this class is considered a widget class, and then the `public` type is placed in the nested module with the name of the exported widget class. E.g., for types in the `{cwd}/ui/data_grid.d.ts` file with the `dxDataGrid` class as the default export, the module is `dxDataGrid` inside the `DevExpress.ui` namespace.
272
-
273
- In the last step, all jsDoc comments are transformed by the [Collapser](#collapser-specs).
274
-
275
- For example, consider the following files:
276
-
277
- ```typescript
278
- // {cwd}/ui/some_widget.d.ts
279
-
280
- import { MyType } from '../core/utils';
281
-
282
- export type SimplePropType = number;
283
-
284
- /**
285
- * @public
286
- * @namespace DevExpress.ui.options
287
- */
288
- export interface WidgetOptions {
289
- myProp?: MyType;
290
- }
291
-
292
- /** @public */
293
- export default class Widget {
294
- getOptions(): WidgetOptions;
295
- getSingleProp(): SimplePropType;
296
- }
297
- ```
298
-
299
- ```typescript
300
- // {cwd}/core/utils.d.ts
301
-
302
- export type MyType = string;
303
-
304
- export type MyType = string;
305
-
306
- export type MySuperType = any;
307
- ```
308
-
309
- The result of bundling these files:
310
-
311
- ```typescript
312
- declare module DevExpress.core {
313
- /**
314
- * @deprecated Attention! This type is for internal purposes only...
315
- */
316
- export type MyType = string;
317
- }
318
-
319
- declare module DevExpress.ui {
320
- module Widget {
321
- /**
322
- * @deprecated Attention! This type is for internal purposes only...
323
- */
324
- export type SimplePropType = number;
325
- }
326
-
327
- /**
328
- * [descr:Widget]
329
- */
330
- export class Widget {
331
- getOptions(): DevExpress.ui.options.WidgetOptions;
332
-
333
- getSingleProp(): DevExpress.ui.Widget.SimplePropType;
334
- }
335
- }
336
-
337
- declare module DevExpress.ui.options {
338
- /**
339
- * [descr:WidgetOptions]
340
- */
341
- export interface WidgetOptions {
342
- myProp?: DevExpress.core.MyType;
343
- }
344
- }
345
- ```
346
-
347
- To replace placeholders with actual descriptions or deprecation messages, use the [inject-descriptions-to-bundle](#inject-descriptions-to-bundle) command.
348
-
349
-
350
- ## Collapser specs
351
-
352
- The collapser is an internal process that runs against `*.d.ts` files and simplifies jsDoc comments to prepare them for further usage. It is used by the [inject-descriptions](#inject-descriptions) command as a first step and by [update-ts-bundle](#update-ts-bundle) as a last step.
353
-
354
- The collapser changes jsDoc comments following the rules below:
355
-
356
- - the `@docid` or `@const` jsDoc tag is replaced with a placeholder for description.
357
- - the `@deprecated` tag with a custom (or empty) message is preserved.
358
- - the `@deprecated` tag with a reference to other types either by `docid` or `{file/path.typeName}` is preserved, but the reference is replaced with a placeholder for a correct deprecation message.
359
- - all other tags or content of a jsDoc comment will be removed.
360
- - if the original type has no `@public` tag or jsDoc comments, an additional `@deprecated` tag is added with a standard warning message stating that this type is for internal use.
361
-
362
- Once the collapser process is completed, all jsDoc comments will contain only placeholders and meaningful deprecation messages.
363
-
364
- Let's look at an example. Below is the initial file.
365
-
366
- ```typescript
367
- /**
368
- * @docid
369
- * @public
370
- */
371
- export interface WidgetProps {}
372
-
373
- /**
374
- * @docid
375
- * @public
376
- * @deprecated WidgetProps
377
- */
378
- export interface WidgetOptions {}
379
-
380
- /**
381
- * @deprecated This is custom message
382
- * @public
383
- */
384
- export type DeprecatedType = {};
385
-
386
- /**
387
- * @docid
388
- * @public
389
- * @deprecated {file_path/file_name.TypeName}
390
- */
391
- export type OldType = {};
392
-
393
- export type InternalType = {};
394
- ```
395
-
396
- And this is the result of the applied collapser:
397
-
398
- ```typescript
399
- /**
400
- * [descr:WidgetProps]
401
- */
402
- export interface WidgetProps {}
403
-
404
- /**
405
- * [descr:WidgetOptions]
406
- * @deprecated [depNote:WidgetProps]
407
- */
408
- export interface WidgetOptions {}
409
-
410
- /**
411
- * @deprecated This is custom message
412
- */
413
- export type DeprecatedType = {};
414
-
415
- /**
416
- * [descr:OldType]
417
- * @deprecated [depNote.OldType]
418
- */
419
- export type OldType = {};
420
-
421
- /**
422
- * @deprecated Attention! This type is for internal purposes only...
423
- */
424
- export type InternalType = {};
425
- ```
426
-
427
7
  # License
428
8
 
429
9
  **DevExtreme Internal Tools are released as MIT-licensed.**
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,13 +1,13 @@
1
- 2022-04-01 07:28:51.5977 | Info | IntegrationDataModel Generation
1
+ 2022-04-08 11:37:56.3945 | Info | IntegrationDataModel Generation
2
2
 
3
3
  ================================================================
4
4
  IntegrationDataModel Generation Started
5
5
  Path to log file: D:\a\devextreme-internal-tools\devextreme-internal-tools\dist\bin\internal-tools-log.txt
6
6
  ================================================================
7
7
 
8
- 2022-04-01 07:28:51.6509 | Info | IntegrationDataModel Generation
8
+ 2022-04-08 11:37:56.4479 | Info | IntegrationDataModel Generation
9
9
  Model saved to: D:\a\devextreme-internal-tools\devextreme-internal-tools\dist\bin\integration-data-model.ts
10
- 2022-04-01 07:28:51.6509 | Info | IntegrationDataModel Generation
10
+ 2022-04-08 11:37:56.4479 | Info | IntegrationDataModel Generation
11
11
 
12
12
  ================================================================
13
13
 
package/index.js CHANGED
@@ -10,8 +10,9 @@ var logging_1 = require("./ts/logging");
10
10
  var scripts = {
11
11
  'discover-declarations': [tools_1.runDiscoverer],
12
12
  'discover-ts-declarations': [tools_1.runTsDiscoverer],
13
+ 'discover-renovation-declarations': [tools_1.runTsRenovationDiscoverer],
13
14
  'discover': [tools_1.runTsDiscoverer, tools_1.runDiscoverer],
14
- 'generate-modules-meta': [tools_1.runModulesMetaGenerator],
15
+ 'discover-renovation': [tools_1.runTsRenovationDiscoverer, tools_1.runDiscoverer],
15
16
  'generate-extra-topics': [tools_1.runExtraTopicsGenerator],
16
17
  'generate-content-map': [tools_1.runContentMapGenerator],
17
18
  'generate-ng-smd': [tools_1.runNgSmdGenerator],
@@ -21,8 +22,8 @@ var scripts = {
21
22
  'generate-ts-bundle': [tools_1.runDtsBundler],
22
23
  'inject-descriptions-to-bundle': [tools_1.runInjector],
23
24
  'inject-descriptions': [tools_1.runCollapser, tools_1.runInjector],
24
- 'integration-data-generator': [tools_1.runModulesMetaGenerator, tools_1.runImdGenerator],
25
- 'update-integration-meta': [tools_1.runTsDiscoverer, tools_1.runDiscoverer, tools_1.runModulesMetaGenerator, tools_1.runImdGenerator],
25
+ 'integration-data-generator': [tools_1.runImdGenerator],
26
+ 'update-integration-meta': [tools_1.runTsDiscoverer, tools_1.runDiscoverer, tools_1.runImdGenerator],
26
27
  'update-links': [tools_1.runLinksConverter],
27
28
  'update-meta': [tools_1.runTsDiscoverer, tools_1.runDiscoverer, tools_1.runNgSmdGenerator],
28
29
  'update-topics': [tools_1.runDocGenerator],
@@ -30,7 +31,6 @@ var scripts = {
30
31
  'validate-declarations': [tools_1.runTsDiscoverer, tools_1.runValidator],
31
32
  'validate-docs': [tools_1.runTopicsValidation],
32
33
  'validate-modules-guide': [tools_1.runModulesGuideValidator],
33
- 'clean-tags': [tools_1.runTagCleaner],
34
34
  };
35
35
  var allArgs = args_1.parseArgs(process.argv);
36
36
  logging_1.setLogDir(allArgs.artifacts);
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAEA,mCAA+B;AAE/B,4CAmB4B;AAC5B,0CAAuD;AACvD,gDAAiD;AACjD,+CAAyC;AACzC,wCAIsB;AAItB,IAAM,OAAO,GAAgD;IAE3D,uBAAuB,EAAE,CAAC,qBAAa,CAAC;IAExC,0BAA0B,EAAE,CAAC,uBAAe,CAAC;IAE7C,UAAU,EAAE,CAAC,uBAAe,EAAE,qBAAa,CAAC;IAE5C,uBAAuB,EAAE,CAAC,+BAAuB,CAAC;IAElD,uBAAuB,EAAE,CAA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C;IACjD,cAAI,CAAC,CAAC,CAAC,CAAC;CACT;AAED,IAAM,UAAU,GAAW,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAE3C,IAAI,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE;IAC1C,aAAG,CAAC,wDAAsD,WAAW,CAAC,IAAI,CAAC,IAAI,CAAG,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;IACtG,cAAI,CAAC,CAAC,CAAC,CAAC;CACT;AAED,mBAAS,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAC7B,OAAO,CAAC,YAAY,GAAG,sBAAO,CAAC;AAC/B,aAAG,CAAC,oBAAkB,sBAAS,CAAC,CAAC;AACjC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,OAAO,CAAC,EAAb,CAAa,CAAC,CAAC"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "devextreme-internal-tools",
3
3
  "description": "DevExtreme internal tools",
4
4
  "author": "Developer Express Inc.",
5
- "version": "7.8.1",
5
+ "version": "8.0.0-beta.3",
6
6
  "license": "MIT",
7
7
  "bin": {
8
8
  "dx-tools": "./index.js"
@@ -14,9 +14,10 @@
14
14
  "build": "tsc ./build.ts --outdir ./dist && node ./dist/build.js",
15
15
  "build-ts": "tsc",
16
16
  "build-ts-watch": "tsc -w",
17
- "clean-tags": "node dist/index.js clean-tags --artifacts dist/bin --js-scripts ../devextreme/js",
18
17
  "discover": "node dist/index.js discover-ts-declarations --artifacts dist/bin --js-scripts ../devextreme/js --exclude js/renovation/",
19
18
  "discover-watch": "nodemon --delay 500ms -e js,.ts,d.ts --watch dist --watch ../devextreme/js --exec node dist/index.js discover-ts-declarations --artifacts dist/bin --js-scripts ../devextreme/js --exclude js/renovation/",
19
+ "generate-dashboards-ngsmd": "node dist/index.js update-meta --js-scripts ../dashboards/src/DevExpress.Dashboards.WebClient/sources --artifacts dist/bin",
20
+ "generate-dashboards-imd": "node dist/index.js update-integration-meta --js-scripts ../dashboards/src/DevExpress.Dashboards.WebClient/sources --artifacts dist/bin",
20
21
  "inject": "node dist/index.js inject-descriptions --artifacts dist/bin --js-scripts ../devextreme/js",
21
22
  "lint": "npm run lint-ts && npm run lint-netcore",
22
23
  "lint-ts": "eslint .",
@@ -30,10 +31,11 @@
30
31
  "dependencies": {
31
32
  "prettier": "2.3.2",
32
33
  "shelljs": "^0.8.3",
33
- "typescript": "~4.1",
34
+ "typescript": "4.2",
34
35
  "winston": "~3.4.0"
35
36
  },
36
37
  "devDependencies": {
38
+ "@devextreme-generator/declarations": "2.3.3",
37
39
  "@types/jest": "^25.2.1",
38
40
  "@types/node": "^13.9.0",
39
41
  "@types/shelljs": "^0.8.6",
@@ -1,11 +1,4 @@
1
1
  "use strict";
2
- var __spreadArrays = (this && this.__spreadArrays) || function () {
3
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
4
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
5
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
6
- r[k] = a[j];
7
- return r;
8
- };
9
2
  Object.defineProperty(exports, "__esModule", { value: true });
10
3
  exports.processFiles = exports.bundle = void 0;
11
4
  var fs_1 = require("fs");
@@ -15,7 +8,6 @@ var typescript_1 = require("typescript");
15
8
  var utils_1 = require("../common/utils");
16
9
  var ts_utils_1 = require("../common/ts-utils");
17
10
  var collapser_1 = require("../collapser/collapser");
18
- var type_resolving_1 = require("../common/type-resolving");
19
11
  var logging_1 = require("../logging");
20
12
  var GLOBAL_MODULE_NAME = 'global';
21
13
  function formatFileContent(content) {
@@ -212,36 +204,16 @@ function getModuleSubmodules(checker, moduleNodes, allNodes) {
212
204
  sortName: submoduleName,
213
205
  getText: function () {
214
206
  var nodesText = submoduleNodes
215
- .sort(function (a, b) { return String(ts_utils_1.getNodeName(a.node)).localeCompare(ts_utils_1.getNodeName(b.node)); })
207
+ .sort(function (a, b) { return String(ts_utils_1.getNodeName(a.node))
208
+ .localeCompare(ts_utils_1.getNodeName(b.node)); })
216
209
  .map(function (node) { return getNodeText(checker, node, allNodes); }).join('\n');
217
210
  return "module " + submoduleName + " {\n" + nodesText + "\n}";
218
211
  },
219
212
  });
220
213
  });
221
214
  }
222
- function getReferenceNodes(node, checker) {
223
- var nodes = [];
224
- findRefs(node);
225
- return utils_1.distinct(nodes);
226
- function findRefs(n) {
227
- var _a, _b;
228
- if (typescript_1.isTypeReferenceNode(n)) {
229
- if (type_resolving_1.getGenericParameterDeclaration(n, checker)) {
230
- return;
231
- }
232
- nodes.push(n);
233
- (_a = n.typeArguments) === null || _a === void 0 ? void 0 : _a.forEach(function (c) { return findRefs(c); });
234
- }
235
- else {
236
- if ((typescript_1.isClassDeclaration(n) || typescript_1.isInterfaceDeclaration(n)) && ((_b = n.heritageClauses) === null || _b === void 0 ? void 0 : _b.length)) {
237
- nodes.push.apply(nodes, n.heritageClauses.map(function (hc) { return __spreadArrays(hc.types); }).flat());
238
- }
239
- n.getChildren().forEach(function (c) { return findRefs(c); });
240
- }
241
- }
242
- }
243
215
  function getNodeRenames(node, allNodes, checker) {
244
- return utils_1.distinct(getReferenceNodes(node.node, checker)
216
+ return utils_1.distinct(ts_utils_1.getReferencedNodes(node.node, checker)
245
217
  .map(function (tsNode) {
246
218
  var targetNode = allNodes.get(resolveReferenceNode(tsNode, checker)[0]);
247
219
  if (!targetNode || targetNode.module === GLOBAL_MODULE_NAME) {
@@ -285,7 +257,7 @@ function processDeclaration(cache, programFiles, checker, declaration, checkPubl
285
257
  }
286
258
  cache.add(declaration);
287
259
  }
288
- getReferenceNodes(declaration, checker)
260
+ ts_utils_1.getReferencedNodes(declaration, checker)
289
261
  .forEach(function (refNode) { return resolveReferenceNode(refNode, checker)
290
262
  .forEach(function (node) { return processDeclaration(cache, programFiles, checker, node); }); });
291
263
  }
@@ -299,7 +271,7 @@ function resolveReferenceNode(node, checker) {
299
271
  return [];
300
272
  }
301
273
  function resolveTypeReference(typeNode, checker) {
302
- var parameterDeclaration = type_resolving_1.getGenericParameterDeclaration(typeNode, checker);
274
+ var parameterDeclaration = ts_utils_1.getGenericParameterDeclaration(typeNode, checker);
303
275
  if (parameterDeclaration) {
304
276
  return [parameterDeclaration];
305
277
  }