Merge pull request #27950 from backstage/freben/no-node-fetch
remove most usages of node-fetch
This commit is contained in:
@@ -16,7 +16,6 @@ import {
|
||||
coreServices,
|
||||
createBackendPlugin,
|
||||
} from '@backstage/backend-plugin-api';
|
||||
import { fetch } from 'node-fetch';
|
||||
|
||||
createBackendPlugin({
|
||||
pluginId: 'example',
|
||||
|
||||
@@ -16,7 +16,6 @@ import {
|
||||
coreServices,
|
||||
createBackendPlugin,
|
||||
} from '@backstage/backend-plugin-api';
|
||||
import { fetch } from 'node-fetch';
|
||||
|
||||
createBackendPlugin({
|
||||
pluginId: 'example',
|
||||
|
||||
@@ -106,15 +106,12 @@ Imagine your FAQs can be retrieved at the URL `https://backstage.example.biz/faq
|
||||
Below we provide an example implementation of how the FAQ collator factory could look like using our new document type, placed in the `plugins/search-backend-module-faq-snippets-collator/src/factory.ts` file:
|
||||
|
||||
```ts
|
||||
import fetch from 'node-fetch';
|
||||
import { Readable } from 'stream';
|
||||
|
||||
import {
|
||||
LoggerService,
|
||||
RootConfigService,
|
||||
} from '@backstage/backend-plugin-api';
|
||||
import { DocumentCollatorFactory } from '@backstage/plugin-search-common';
|
||||
|
||||
import { FaqSnippetDocument } from './types';
|
||||
|
||||
const DEFAULT_BASE_URL = 'https://backstage.example.biz/faq-snippets';
|
||||
|
||||
Reference in New Issue
Block a user