umberto 6.1.2 → 7.0.1
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 +20 -0
- package/hexo-config.json +14 -19
- package/package.json +15 -21
- package/scripts/filter/after-post-render/time-end.js +5 -6
- package/scripts/utils/getreportissuewidgeturl.js +1 -1
- package/scripts/utils/logcrossprojectreference.js +3 -3
- package/scripts/utils/parselinks.js +12 -6
- package/src/api-builder/classes/description-parser.js +2 -2
- package/src/api-builder/utils/findtargetdoclet.js +2 -2
- package/src/data-converter/converters/typedoc/abstractparser.js +54 -50
- package/src/data-converter/converters/typedoc/accessorparser.js +7 -5
- package/src/data-converter/converters/typedoc/classparser.js +5 -3
- package/src/data-converter/converters/typedoc/computedpropertyparser.js +4 -3
- package/src/data-converter/converters/typedoc/constantparser.js +5 -3
- package/src/data-converter/converters/typedoc/constructorparser.js +4 -3
- package/src/data-converter/converters/typedoc/errorparser.js +4 -10
- package/src/data-converter/converters/typedoc/eventparser.js +4 -10
- package/src/data-converter/converters/typedoc/functionparser.js +5 -3
- package/src/data-converter/converters/typedoc/interfaceparser.js +5 -3
- package/src/data-converter/converters/typedoc/methodparser.js +6 -4
- package/src/data-converter/converters/typedoc/moduleparser.js +9 -3
- package/src/data-converter/converters/typedoc/propertyparser.js +7 -28
- package/src/data-converter/converters/typedoc/referenceparser.js +41 -0
- package/src/data-converter/converters/typedoc/reflectionkind.js +34 -0
- package/src/data-converter/converters/typedoc/typedoc.ts +215 -214
- package/src/data-converter/converters/typedoc/typedocconverter.js +130 -99
- package/src/data-converter/converters/typedoc/typeparser.js +10 -6
- package/src/data-converter/converters/typedoc2umberto.js +9 -3
- package/src/helpers/snippets.js +7 -6
- package/src/hexo/get-repo-urls.js +4 -5
- package/src/hexo-manager.js +16 -12
- package/src/index.js +4 -4
- package/src/sdk-builder/get-sdk-sources.js +3 -2
- package/src/tasks/build-documentation.js +2 -62
- package/src/tasks/cache-files.js +2 -2
- package/src/tasks/copy-files.js +4 -3
- package/src/tasks/copy-project-icons.js +10 -18
- package/src/tasks/create-sitemap-index.js +40 -0
- package/src/tasks/create-sitemap-step.js +106 -0
- package/src/tasks/create-sitemap.js +50 -29
- package/src/tasks/create-sym-links.js +7 -7
- package/src/tasks/get-project-config.js +3 -2
- package/src/tasks/overwrite-api-guides.js +2 -2
- package/src/tasks/read-doc-sources.js +2 -2
- package/src/tasks/validate-links.js +8 -5
- package/src/tasks/watcher.js +19 -16
- package/src/tasks/write-html-files.js +11 -26
- package/src/template/template-collection.js +1 -1
- package/themes/umberto/layout/gloria/_api-docs/_mixin/_type.pug +9 -0
- package/themes/umberto/layout/umberto/_api-docs/_mixin/_type.pug +9 -0
- package/themes/umberto/src/gloria/js/_codeswitcherbuttons.js +2 -2
- package/themes/umberto/src/gloria/js/app.js +0 -5
- package/themes/umberto/src/umberto/js/_codeswitcherbuttons.js +2 -2
- package/themes/umberto/src/umberto/js/app.js +0 -5
- package/src/helpers/copy-file.js +0 -34
|
@@ -6,18 +6,19 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const AbstractParser = require( './abstractparser' );
|
|
9
|
+
const ReflectionKind = require( './reflectionkind' );
|
|
9
10
|
|
|
10
11
|
module.exports = class ConstantParser extends AbstractParser {
|
|
11
12
|
/**
|
|
12
|
-
* @param {
|
|
13
|
+
* @param {BaseReflection} item
|
|
13
14
|
* @returns {Boolean}
|
|
14
15
|
*/
|
|
15
16
|
canParse( item ) {
|
|
16
|
-
return item.
|
|
17
|
+
return item.kind === ReflectionKind.Variable;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
|
-
* @param {
|
|
21
|
+
* @param {VariableReflection} item
|
|
21
22
|
* @param {String} parentName
|
|
22
23
|
* @returns {Object}
|
|
23
24
|
*/
|
|
@@ -26,6 +27,7 @@ module.exports = class ConstantParser extends AbstractParser {
|
|
|
26
27
|
// Needed for post-processing once all project reflections are converted.
|
|
27
28
|
_signature: item,
|
|
28
29
|
|
|
30
|
+
id: item.id,
|
|
29
31
|
name: item.name,
|
|
30
32
|
memberof: parentName,
|
|
31
33
|
longname: this.getLongName( item, parentName ),
|
|
@@ -6,18 +6,19 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const MethodParser = require( './methodparser' );
|
|
9
|
+
const ReflectionKind = require( './reflectionkind' );
|
|
9
10
|
|
|
10
11
|
module.exports = class ConstructorParser extends MethodParser {
|
|
11
12
|
/**
|
|
12
|
-
* @param {
|
|
13
|
+
* @param {BaseReflection} item
|
|
13
14
|
* @returns {Boolean}
|
|
14
15
|
*/
|
|
15
16
|
canParse( item ) {
|
|
16
|
-
return item.
|
|
17
|
+
return item.kind === ReflectionKind.Constructor;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
|
-
* @param {
|
|
21
|
+
* @param {ConstructorReflection} item
|
|
21
22
|
* @param {String} parentName
|
|
22
23
|
* @returns {Array.<Object>}
|
|
23
24
|
*/
|
|
@@ -9,26 +9,20 @@ const AbstractParser = require( './abstractparser' );
|
|
|
9
9
|
|
|
10
10
|
module.exports = class ErrorParser extends AbstractParser {
|
|
11
11
|
/**
|
|
12
|
-
* @param {
|
|
12
|
+
* @param {BaseReflection} item
|
|
13
13
|
* @returns {Boolean}
|
|
14
14
|
*/
|
|
15
15
|
canParse( item ) {
|
|
16
|
-
return item.
|
|
16
|
+
return item.isCKEditor5Error === true;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* @param {
|
|
20
|
+
* @param {CKEditor5ErrorReflection} item
|
|
21
21
|
* @returns {Object}
|
|
22
22
|
*/
|
|
23
23
|
parse( item ) {
|
|
24
24
|
return {
|
|
25
|
-
_signature: [
|
|
26
|
-
{},
|
|
27
|
-
// As errors are our custom implementation, TypeDoc does not allow creating `parameters` property for them. Error parameters
|
|
28
|
-
// are passed in `typeParameters` property. To process the error parameters properly, we manually map `typeParameters` into
|
|
29
|
-
// `parameters` property.
|
|
30
|
-
{ parameters: item.typeParameters }
|
|
31
|
-
],
|
|
25
|
+
_signature: [ {}, item ],
|
|
32
26
|
|
|
33
27
|
kind: this.getKind( item ),
|
|
34
28
|
scope: 'inner',
|
|
@@ -9,15 +9,15 @@ const AbstractParser = require( './abstractparser' );
|
|
|
9
9
|
|
|
10
10
|
module.exports = class EventParser extends AbstractParser {
|
|
11
11
|
/**
|
|
12
|
-
* @param {
|
|
12
|
+
* @param {BaseReflection} item
|
|
13
13
|
* @returns {Boolean}
|
|
14
14
|
*/
|
|
15
15
|
canParse( item ) {
|
|
16
|
-
return item.
|
|
16
|
+
return item.isCKEditor5Event === true;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* @param {
|
|
20
|
+
* @param {CKEditor5EventReflection} item
|
|
21
21
|
* @param {String} parentName
|
|
22
22
|
* @returns {Object}
|
|
23
23
|
*/
|
|
@@ -28,13 +28,7 @@ module.exports = class EventParser extends AbstractParser {
|
|
|
28
28
|
|
|
29
29
|
return {
|
|
30
30
|
// Needed for post-processing once all project reflections are converted.
|
|
31
|
-
_signature: [
|
|
32
|
-
{},
|
|
33
|
-
// As events are our custom implementation, TypeDoc does not allow creating `parameters` property for them. Event parameters
|
|
34
|
-
// are passed in `typeParameters` property. To process the event parameters properly, we manually map `typeParameters` into
|
|
35
|
-
// `parameters` property.
|
|
36
|
-
{ parameters: item.typeParameters }
|
|
37
|
-
],
|
|
31
|
+
_signature: [ {}, item ],
|
|
38
32
|
|
|
39
33
|
name: item.name,
|
|
40
34
|
memberof: parentName,
|
|
@@ -6,18 +6,19 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const AbstractParser = require( './abstractparser' );
|
|
9
|
+
const ReflectionKind = require( './reflectionkind' );
|
|
9
10
|
|
|
10
11
|
module.exports = class FunctionParser extends AbstractParser {
|
|
11
12
|
/**
|
|
12
|
-
* @param {
|
|
13
|
+
* @param {BaseReflection} item
|
|
13
14
|
* @returns {Boolean}
|
|
14
15
|
*/
|
|
15
16
|
canParse( item ) {
|
|
16
|
-
return item.
|
|
17
|
+
return item.kind === ReflectionKind.Function;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
|
-
* @param {
|
|
21
|
+
* @param {FunctionReflection} item
|
|
21
22
|
* @param {String} parentName
|
|
22
23
|
* @returns {Array.<Object>}
|
|
23
24
|
*/
|
|
@@ -27,6 +28,7 @@ module.exports = class FunctionParser extends AbstractParser {
|
|
|
27
28
|
// Needed for post-processing once all project reflections are converted.
|
|
28
29
|
_signature: signature,
|
|
29
30
|
|
|
31
|
+
id: item.id,
|
|
30
32
|
name: item.name,
|
|
31
33
|
memberof: parentName,
|
|
32
34
|
longname: this.getLongName( item, parentName ),
|
|
@@ -6,18 +6,19 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const AbstractParser = require( './abstractparser' );
|
|
9
|
+
const ReflectionKind = require( './reflectionkind' );
|
|
9
10
|
|
|
10
11
|
module.exports = class InterfaceParser extends AbstractParser {
|
|
11
12
|
/**
|
|
12
|
-
* @param {
|
|
13
|
+
* @param {BaseReflection} item
|
|
13
14
|
* @returns {Boolean}
|
|
14
15
|
*/
|
|
15
16
|
canParse( item ) {
|
|
16
|
-
return item.
|
|
17
|
+
return item.kind === ReflectionKind.Interface;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
|
-
* @param {
|
|
21
|
+
* @param {InterfaceReflection} item
|
|
21
22
|
* @param {String} parentName
|
|
22
23
|
* @returns {Object}
|
|
23
24
|
*/
|
|
@@ -26,6 +27,7 @@ module.exports = class InterfaceParser extends AbstractParser {
|
|
|
26
27
|
// Needed for post-processing once all project reflections are converted.
|
|
27
28
|
_signature: item,
|
|
28
29
|
|
|
30
|
+
id: item.id,
|
|
29
31
|
name: item.name,
|
|
30
32
|
memberof: parentName,
|
|
31
33
|
longname: this.getLongName( item, parentName ),
|
|
@@ -6,18 +6,19 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const AbstractParser = require( './abstractparser' );
|
|
9
|
+
const ReflectionKind = require( './reflectionkind' );
|
|
9
10
|
|
|
10
11
|
module.exports = class MethodParser extends AbstractParser {
|
|
11
12
|
/**
|
|
12
|
-
* @param {
|
|
13
|
+
* @param {BaseReflection} item
|
|
13
14
|
* @returns {Boolean}
|
|
14
15
|
*/
|
|
15
16
|
canParse( item ) {
|
|
16
|
-
return item.
|
|
17
|
+
return item.kind === ReflectionKind.Method;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
|
-
* @param {
|
|
21
|
+
* @param {MethodReflection|ConstructorReflection} item
|
|
21
22
|
* @param {String} parentName
|
|
22
23
|
* @returns {Array.<Object>}
|
|
23
24
|
*/
|
|
@@ -27,6 +28,7 @@ module.exports = class MethodParser extends AbstractParser {
|
|
|
27
28
|
// Needed for post-processing once all project reflections are converted.
|
|
28
29
|
_signature: signature,
|
|
29
30
|
|
|
31
|
+
id: item.id,
|
|
30
32
|
name: item.name,
|
|
31
33
|
memberof: parentName,
|
|
32
34
|
longname: this.getLongName( item, parentName ),
|
|
@@ -64,7 +66,7 @@ module.exports = class MethodParser extends AbstractParser {
|
|
|
64
66
|
/**
|
|
65
67
|
* Returns the access type for the item based on its signatures.
|
|
66
68
|
*
|
|
67
|
-
* @param {
|
|
69
|
+
* @param {MethodReflection|ConstructorReflection} item
|
|
68
70
|
* @param {Number} sourceIndex
|
|
69
71
|
* @returns {'public'|'internal'|'protected'|'private'}
|
|
70
72
|
*/
|
|
@@ -6,22 +6,28 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const AbstractParser = require( './abstractparser' );
|
|
9
|
+
const ReflectionKind = require( './reflectionkind' );
|
|
9
10
|
|
|
10
11
|
module.exports = class ModuleParser extends AbstractParser {
|
|
11
12
|
/**
|
|
12
|
-
* @param {
|
|
13
|
+
* @param {BaseReflection} item
|
|
13
14
|
* @returns {Boolean}
|
|
14
15
|
*/
|
|
15
16
|
canParse( item ) {
|
|
16
|
-
return item.
|
|
17
|
+
return item.kind === ReflectionKind.Module;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
|
-
* @param {
|
|
21
|
+
* @param {ModuleReflection} item
|
|
21
22
|
* @returns {Object}
|
|
22
23
|
*/
|
|
23
24
|
parse( item ) {
|
|
25
|
+
if ( !item.name.includes( '/' ) ) {
|
|
26
|
+
item.name += '/index';
|
|
27
|
+
}
|
|
28
|
+
|
|
24
29
|
return {
|
|
30
|
+
id: item.id,
|
|
25
31
|
name: item.name,
|
|
26
32
|
longname: this.getLongName( item ),
|
|
27
33
|
kind: this.getKind( item ),
|
|
@@ -6,33 +6,28 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const AbstractParser = require( './abstractparser' );
|
|
9
|
+
const ReflectionKind = require( './reflectionkind' );
|
|
9
10
|
|
|
10
11
|
module.exports = class PropertyParser extends AbstractParser {
|
|
11
12
|
/**
|
|
12
|
-
* @param {
|
|
13
|
+
* @param {BaseReflection} item
|
|
13
14
|
* @returns {Boolean}
|
|
14
15
|
*/
|
|
15
16
|
canParse( item ) {
|
|
16
|
-
return item.
|
|
17
|
+
return item.kind === ReflectionKind.Property;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
|
-
* @param {
|
|
21
|
+
* @param {PropertyReflection} item
|
|
21
22
|
* @param {String} parentName
|
|
22
23
|
* @returns {Object}
|
|
23
24
|
*/
|
|
24
25
|
parse( item, parentName ) {
|
|
25
|
-
// By default, a comment that is associated in the source code with the property, is bound to the item itself, as anyone would
|
|
26
|
-
// expect. TypeDoc works differently for a callable property, for which the comment is moved down to the property signature.
|
|
27
|
-
// Hence, we must extract it back from the property signature to be able to display it correctly in the API docs.
|
|
28
|
-
const description = isCallableProperty( item ) ?
|
|
29
|
-
this.getComment( item.type.declaration.signatures[ 0 ] ) :
|
|
30
|
-
this.getComment( item );
|
|
31
|
-
|
|
32
26
|
return {
|
|
33
27
|
// Needed for post-processing once all project reflections are converted.
|
|
34
28
|
_signature: [ item, {} ],
|
|
35
29
|
|
|
30
|
+
id: item.id,
|
|
36
31
|
name: item.name,
|
|
37
32
|
memberof: parentName,
|
|
38
33
|
longname: this.getLongName( item, parentName ),
|
|
@@ -44,7 +39,7 @@ module.exports = class PropertyParser extends AbstractParser {
|
|
|
44
39
|
optional: this.isOptional( item ),
|
|
45
40
|
kind: this.getKind( item ),
|
|
46
41
|
extraId: this.getExtraId( item ),
|
|
47
|
-
description,
|
|
42
|
+
description: this.getComment( item ),
|
|
48
43
|
file: this.getFile( item ),
|
|
49
44
|
skipSource: this.shouldSkipSource( item ),
|
|
50
45
|
deprecated: this.isDeprecated( item ),
|
|
@@ -60,7 +55,7 @@ module.exports = class PropertyParser extends AbstractParser {
|
|
|
60
55
|
/**
|
|
61
56
|
* Returns the default value of an item defined by the `@defaultValue` or `@default` tags.
|
|
62
57
|
*
|
|
63
|
-
* @param {
|
|
58
|
+
* @param {PropertyReflection} item
|
|
64
59
|
* @returns {String}
|
|
65
60
|
*/
|
|
66
61
|
getDefault( item ) {
|
|
@@ -77,19 +72,3 @@ module.exports = class PropertyParser extends AbstractParser {
|
|
|
77
72
|
return defaultTag.content[ 0 ].text;
|
|
78
73
|
}
|
|
79
74
|
};
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* @param {TypedocReflectionType} item
|
|
83
|
-
* @returns {Boolean}
|
|
84
|
-
*/
|
|
85
|
-
function isCallableProperty( item ) {
|
|
86
|
-
if ( item.type.type !== 'reflection' ) {
|
|
87
|
-
return false;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
if ( !Array.isArray( item.type.declaration.signatures ) ) {
|
|
91
|
-
return false;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
return true;
|
|
95
|
-
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2017-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
const AbstractParser = require( './abstractparser' );
|
|
9
|
+
const ReflectionKind = require( './reflectionkind' );
|
|
10
|
+
|
|
11
|
+
module.exports = class ReferenceParser extends AbstractParser {
|
|
12
|
+
/**
|
|
13
|
+
* @param {BaseReflection} item
|
|
14
|
+
* @returns {Boolean}
|
|
15
|
+
*/
|
|
16
|
+
canParse( item ) {
|
|
17
|
+
return item.kind === ReflectionKind.Reference;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @param {ReferenceReflection} item
|
|
22
|
+
* @param {String} parentName
|
|
23
|
+
* @returns {Object}
|
|
24
|
+
*/
|
|
25
|
+
parse( item, parentName ) {
|
|
26
|
+
return {
|
|
27
|
+
// Needed for post-processing once all project reflections are converted.
|
|
28
|
+
_signature: item,
|
|
29
|
+
|
|
30
|
+
id: item.id,
|
|
31
|
+
name: item.name,
|
|
32
|
+
memberof: parentName,
|
|
33
|
+
longname: this.getLongName( item, parentName ),
|
|
34
|
+
file: this.getFile( item ),
|
|
35
|
+
|
|
36
|
+
_isReference: true,
|
|
37
|
+
|
|
38
|
+
targetDoclet: null
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2017-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
// To avoid linking Umberto and Typedoc, let's keep this file in sync with the `ReflectionKind` enum.
|
|
9
|
+
// See: https://typedoc.org/api/enums/Models.ReflectionKind.html
|
|
10
|
+
|
|
11
|
+
module.exports.Accessor = 262144;
|
|
12
|
+
module.exports.CallSignature = 4096;
|
|
13
|
+
module.exports.Class = 128;
|
|
14
|
+
module.exports.Constructor = 512;
|
|
15
|
+
module.exports.ConstructorSignature = 16384;
|
|
16
|
+
module.exports.Document = 8388608;
|
|
17
|
+
module.exports.Enum = 8;
|
|
18
|
+
module.exports.EnumMember = 16;
|
|
19
|
+
module.exports.Function = 64;
|
|
20
|
+
module.exports.GetSignature = 524288;
|
|
21
|
+
module.exports.IndexSignature = 8192;
|
|
22
|
+
module.exports.Interface = 256;
|
|
23
|
+
module.exports.Method = 2048;
|
|
24
|
+
module.exports.Module = 2;
|
|
25
|
+
module.exports.Namespace = 4;
|
|
26
|
+
module.exports.Parameter = 32768;
|
|
27
|
+
module.exports.Project = 1;
|
|
28
|
+
module.exports.Property = 1024;
|
|
29
|
+
module.exports.Reference = 4194304;
|
|
30
|
+
module.exports.SetSignature = 1048576;
|
|
31
|
+
module.exports.TypeAlias = 2097152;
|
|
32
|
+
module.exports.TypeLiteral = 65536;
|
|
33
|
+
module.exports.TypeParameter = 131072;
|
|
34
|
+
module.exports.Variable = 32;
|