mirror of
https://github.com/strapi/strapi.git
synced 2026-01-03 02:32:56 +00:00
fix after merge
This commit is contained in:
parent
68e7bc8b21
commit
8627f96d89
@ -12,7 +12,7 @@ The Strapi remote source provider connects to a remote Strapi websocket server a
|
||||
|
||||
## Provider Options
|
||||
|
||||
The remote source provider accepts a `url` and `auth` options described below.
|
||||
The remote source provider accepts `url`, `auth`, and `retryMessageOptions` described below.
|
||||
|
||||
```typescript
|
||||
interface ITransferTokenAuth {
|
||||
@ -24,6 +24,10 @@ export interface IRemoteStrapiDestinationProviderOptions
|
||||
extends Pick<ILocalStrapiDestinationProviderOptions, 'restore' | 'strategy'> {
|
||||
url: URL;
|
||||
auth?: ITransferTokenAuth;
|
||||
retryMessageOptions?: {
|
||||
retryMessageTimeout: number; // milliseconds to wait for a response from a message
|
||||
retryMessageMaxRetries: number; // max number of retries for a message before aborting transfer
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ The Strapi remote destination provider connects to a remote Strapi websocket ser
|
||||
|
||||
## Provider Options
|
||||
|
||||
The remote destination provider accepts the same `restore` and `strategy` options from local Strapi destination provider, plus `url` and `auth` options described below.
|
||||
The remote destination provider accepts the same `restore` and `strategy` options from local Strapi destination provider, plus `url`, `auth`, and `retryMessageOptions` described below.
|
||||
|
||||
```typescript
|
||||
interface ITransferTokenAuth {
|
||||
@ -24,6 +24,10 @@ export interface IRemoteStrapiDestinationProviderOptions
|
||||
extends Pick<ILocalStrapiDestinationProviderOptions, 'restore' | 'strategy'> {
|
||||
url: URL; // the url of the remote Strapi admin
|
||||
auth?: ITransferTokenAuth;
|
||||
retryMessageOptions?: {
|
||||
retryMessageTimeout: number; // milliseconds to wait for a response from a message
|
||||
retryMessageMaxRetries: number; // max number of retries for a message before aborting transfer
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ import type { Schema, Utils } from '@strapi/strapi';
|
||||
import { createDispatcher, connectToWebsocket, trimTrailingSlash } from '../utils';
|
||||
|
||||
import type { IDestinationProvider, IMetadata, ProviderType, IAsset } from '../../../../types';
|
||||
import type { client, server, auth } from '../../../../types/remote/protocol';
|
||||
import type { Client, Server, Auth } from '../../../../types/remote/protocol';
|
||||
import type { ILocalStrapiDestinationProviderOptions } from '../local-destination';
|
||||
import { TRANSFER_PATH } from '../../remote/constants';
|
||||
import { ProviderTransferError, ProviderValidationError } from '../../../errors/providers';
|
||||
@ -15,8 +15,11 @@ import { ProviderTransferError, ProviderValidationError } from '../../../errors/
|
||||
export interface IRemoteStrapiDestinationProviderOptions
|
||||
extends Pick<ILocalStrapiDestinationProviderOptions, 'restore' | 'strategy'> {
|
||||
url: URL; // the url of the remote Strapi admin
|
||||
auth?: auth.ITransferTokenAuth;
|
||||
retryMessageOptions?: { retryMessageTimeout: number; retryMessageMaxRetries: number };
|
||||
auth?: Auth.ITransferTokenAuth;
|
||||
retryMessageOptions?: {
|
||||
retryMessageTimeout: number; // milliseconds to wait for a response from a message
|
||||
retryMessageMaxRetries: number; // max number of retries for a message before aborting transfer
|
||||
};
|
||||
}
|
||||
|
||||
const jsonLength = (obj: object) => Buffer.byteLength(JSON.stringify(obj));
|
||||
|
||||
@ -11,7 +11,7 @@ import type {
|
||||
ProviderType,
|
||||
TransferStage,
|
||||
} from '../../../../types';
|
||||
import { client, server, auth } from '../../../../types/remote/protocol';
|
||||
import { Client, Server, Auth } from '../../../../types/remote/protocol';
|
||||
import { ProviderTransferError, ProviderValidationError } from '../../../errors/providers';
|
||||
import { TRANSFER_PATH } from '../../remote/constants';
|
||||
import { ILocalStrapiSourceProviderOptions } from '../local-source';
|
||||
@ -19,8 +19,11 @@ import { createDispatcher, connectToWebsocket, trimTrailingSlash } from '../util
|
||||
|
||||
export interface IRemoteStrapiSourceProviderOptions extends ILocalStrapiSourceProviderOptions {
|
||||
url: URL; // the url of the remote Strapi admin
|
||||
auth?: auth.ITransferTokenAuth;
|
||||
retryMessageOptions?: { retryMessageTimeout: number; retryMessageMaxRetries: number };
|
||||
auth?: Auth.ITransferTokenAuth;
|
||||
retryMessageOptions?: {
|
||||
retryMessageTimeout: number; // milliseconds to wait for a response from a message
|
||||
retryMessageMaxRetries: number; // max number of retries for a message before aborting transfer
|
||||
};
|
||||
}
|
||||
|
||||
class RemoteStrapiSourceProvider implements ISourceProvider {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user