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
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
const fs = require( 'fs' );
|
|
9
|
-
const mkdirp = require( 'mkdirp' );
|
|
8
|
+
const fs = require( 'fs-extra' );
|
|
10
9
|
const upath = require( 'upath' );
|
|
11
10
|
|
|
12
11
|
/**
|
|
@@ -14,29 +13,15 @@ const upath = require( 'upath' );
|
|
|
14
13
|
*
|
|
15
14
|
* @param {Array.<HtmlFile>} files HtmlFile objects containing content to be written to .html files to file system.
|
|
16
15
|
* @param {String} destinationDir Additional destination path. Additional because files already have its own path.
|
|
17
|
-
* @returns {Promise}
|
|
16
|
+
* @returns {Promise<void>}
|
|
18
17
|
*/
|
|
19
|
-
module.exports = ( files, destinationDir = '.' ) => {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
fs.writeFile( upath.join( fileDir, file.basename ), file.content, err => {
|
|
29
|
-
if ( err ) {
|
|
30
|
-
return reject( err );
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return resolve();
|
|
34
|
-
} );
|
|
35
|
-
} );
|
|
36
|
-
} );
|
|
37
|
-
|
|
38
|
-
promises.push( promise );
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return Promise.all( promises );
|
|
18
|
+
module.exports = async ( files, destinationDir = '.' ) => {
|
|
19
|
+
const writePromises = files.map( file =>
|
|
20
|
+
fs.outputFile(
|
|
21
|
+
upath.join( destinationDir, file.dirname, file.basename ),
|
|
22
|
+
file.content
|
|
23
|
+
)
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
return Promise.all( writePromises );
|
|
42
27
|
};
|
|
@@ -15,7 +15,7 @@ const splitLongname = require( '../helpers/split-longname' );
|
|
|
15
15
|
const extractLongname = require( '../helpers/extract-longname' );
|
|
16
16
|
const getApiInfoboxTooltip = require( '../helpers/get-api-infobox-tooltip' );
|
|
17
17
|
const capitalize = require( '../helpers/capitalize' );
|
|
18
|
-
const relative_url = require( 'hexo/
|
|
18
|
+
const relative_url = require( 'hexo/dist/plugins/helper/relative_url' ); // eslint-disable-line camelcase
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Provides pug templates and adds various helpers to them.
|
|
@@ -56,6 +56,15 @@ mixin renderComplexStructure( complexType )
|
|
|
56
56
|
| !{ ' ' }
|
|
57
57
|
+renderType( complexType.values )
|
|
58
58
|
|
|
59
|
+
//- Raw operator.
|
|
60
|
+
//-
|
|
61
|
+
//- Since `typedoc@0.28`, some of known types are translated as `unknown`. To display anything, we treat
|
|
62
|
+
//- them as a pure string. We wrap it in brackets to avoid confusions when it is a part of the union type.
|
|
63
|
+
if ( complexType.type === 'raw' && complexType.value )
|
|
64
|
+
| !{ '( ' }
|
|
65
|
+
| #{ complexType.value }
|
|
66
|
+
| !{ ' )' }
|
|
67
|
+
|
|
59
68
|
//- An object with type arguments.
|
|
60
69
|
if ( complexType.type === 'generic' && complexType.name && ( complexType.typeParameters || complexType.typeParameter ) )
|
|
61
70
|
+renderGenericType( complexType )
|
|
@@ -56,6 +56,15 @@ mixin renderComplexStructure( complexType )
|
|
|
56
56
|
| !{ ' ' }
|
|
57
57
|
+renderType( complexType.values )
|
|
58
58
|
|
|
59
|
+
//- Raw operator.
|
|
60
|
+
//-
|
|
61
|
+
//- Since `typedoc@0.28`, some of known types are translated as `unknown`. To display anything, we treat
|
|
62
|
+
//- them as a pure string. We wrap it in brackets to avoid confusions when it is a part of the union type.
|
|
63
|
+
if ( complexType.type === 'raw' && complexType.value )
|
|
64
|
+
| !{ '( ' }
|
|
65
|
+
| #{ complexType.value }
|
|
66
|
+
| !{ ' )' }
|
|
67
|
+
|
|
59
68
|
//- An object with type arguments.
|
|
60
69
|
if ( complexType.type === 'generic' && complexType.name && ( complexType.typeParameters || complexType.typeParameter ) )
|
|
61
70
|
+renderGenericType( complexType )
|
|
@@ -100,11 +100,11 @@ export function createCodeSwitcherButtons() {
|
|
|
100
100
|
|
|
101
101
|
const selfHostedButton = createButton( 'Self-hosted (npm)', activeType === type.selfHosted );
|
|
102
102
|
|
|
103
|
-
selfHostedButton.setAttribute( 'title', '
|
|
103
|
+
selfHostedButton.setAttribute( 'title', 'Show import snippets for npm and ZIP setups.' );
|
|
104
104
|
|
|
105
105
|
const cloudButton = createButton( 'Cloud (CDN)', activeType === type.cloud );
|
|
106
106
|
|
|
107
|
-
cloudButton.setAttribute( 'title', '
|
|
107
|
+
cloudButton.setAttribute( 'title', 'Show import snippets for a CDN setup.' );
|
|
108
108
|
|
|
109
109
|
const switcherToolbar = switcher.querySelector( `.${ codeSwitcherToolbarClass }` );
|
|
110
110
|
|
|
@@ -3,11 +3,6 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
// Polyfill for `window.Symbol`.
|
|
7
|
-
import '@babel/polyfill';
|
|
8
|
-
// Polyfill for `Element.closest()`.
|
|
9
|
-
import 'element-closest/browser';
|
|
10
|
-
|
|
11
6
|
import $ from 'jquery';
|
|
12
7
|
import { setupPrism } from './_prism';
|
|
13
8
|
import { enableCollapsables, hideTogglers } from './_collapsables';
|
|
@@ -100,11 +100,11 @@ export function createCodeSwitcherButtons() {
|
|
|
100
100
|
|
|
101
101
|
const selfHostedButton = createButton( 'Self-hosted (npm)', activeType === type.selfHosted );
|
|
102
102
|
|
|
103
|
-
selfHostedButton.setAttribute( 'title', '
|
|
103
|
+
selfHostedButton.setAttribute( 'title', 'Show import snippets for npm and ZIP setups.' );
|
|
104
104
|
|
|
105
105
|
const cloudButton = createButton( 'Cloud (CDN)', activeType === type.cloud );
|
|
106
106
|
|
|
107
|
-
cloudButton.setAttribute( 'title', '
|
|
107
|
+
cloudButton.setAttribute( 'title', 'Show import snippets for a CDN setup.' );
|
|
108
108
|
|
|
109
109
|
const switcherToolbar = switcher.querySelector( `.${ codeSwitcherToolbarClass }` );
|
|
110
110
|
|
|
@@ -3,11 +3,6 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
// Polyfill for `window.Symbol`.
|
|
7
|
-
import '@babel/polyfill';
|
|
8
|
-
// Polyfill for `Element.closest()`.
|
|
9
|
-
import 'element-closest/browser';
|
|
10
|
-
|
|
11
6
|
import $ from 'jquery';
|
|
12
7
|
import { setupPrism } from './_prism';
|
|
13
8
|
import { enableCollapsables, hideTogglers } from './_collapsables';
|
package/src/helpers/copy-file.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
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 fs = require( 'fs' );
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Copies a specified file from the `source` path to the `destination` path.
|
|
12
|
-
*
|
|
13
|
-
* @param {String} source
|
|
14
|
-
* @param {String} destination
|
|
15
|
-
* @return {Promise}
|
|
16
|
-
*/
|
|
17
|
-
module.exports = function copyFile( source, destination ) {
|
|
18
|
-
return new Promise( ( resolve, reject ) => {
|
|
19
|
-
const readStream = fs.createReadStream( source );
|
|
20
|
-
|
|
21
|
-
// In order to catch an error if `source` points to non-existing file, we need to wait for
|
|
22
|
-
// the `#open` event emitted by the read readStream.
|
|
23
|
-
readStream.on( 'open', () => {
|
|
24
|
-
const writeStream = fs.createWriteStream( destination );
|
|
25
|
-
|
|
26
|
-
readStream.pipe( writeStream );
|
|
27
|
-
|
|
28
|
-
writeStream.on( 'error', reject );
|
|
29
|
-
writeStream.on( 'finish', resolve );
|
|
30
|
-
} );
|
|
31
|
-
|
|
32
|
-
readStream.on( 'error', reject );
|
|
33
|
-
} );
|
|
34
|
-
};
|