@ng-doc/keywords-loaders 17.6.8 → 17.6.9
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/index.cjs.js +2 -8
- package/package.json +2 -2
package/index.cjs.js
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var fetch = require('node-fetch');
|
|
6
4
|
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
var fetch__default = /*#__PURE__*/_interopDefaultLegacy(fetch);
|
|
10
|
-
|
|
11
5
|
const ngApiPageTypes = ['class', 'interface', 'function', 'type-alias', 'enum', 'const', 'ngmodule', 'directive', 'pipe', 'decorator'];
|
|
12
6
|
|
|
13
7
|
/**
|
|
@@ -24,7 +18,7 @@ function getNgHost(version) {
|
|
|
24
18
|
* @param version
|
|
25
19
|
*/
|
|
26
20
|
async function fetchDocs(version) {
|
|
27
|
-
return await
|
|
21
|
+
return await fetch(`${getNgHost(version)}/generated/docs/app/search-data.json`).then(response => response.json());
|
|
28
22
|
}
|
|
29
23
|
|
|
30
24
|
/**
|
|
@@ -84,7 +78,7 @@ function ngKeywordsLoader(options) {
|
|
|
84
78
|
* @param endpoint
|
|
85
79
|
*/
|
|
86
80
|
async function fetchKeywords(endpoint) {
|
|
87
|
-
return await
|
|
81
|
+
return await fetch(`${endpoint}/keywords.json`).then(response => response.json());
|
|
88
82
|
}
|
|
89
83
|
|
|
90
84
|
/**
|
package/package.json
CHANGED