[@pollyjs] Add missing adapter and persister packages (#41894)

* [@pollyjs] Add missing adapter and persister packages

* Address PR feedback
This commit is contained in:
Offir Golan 2020-01-27 22:28:58 -08:00 committed by Wesley Wigham
parent 92434b8642
commit 6d993e42ec
12 changed files with 185 additions and 0 deletions

View File

@ -0,0 +1,11 @@
// Type definitions for @pollyjs/adapter-puppeteer 4.0
// Project: https://github.com/netflix/pollyjs/tree/master/packages/@pollyjs/adapter-puppeteer
// Definitions by: offirgolan <https://github.com/offirgolan>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4
import Adapter from '@pollyjs/adapter';
declare class PuppeteerAdapter extends Adapter {}
export = PuppeteerAdapter;

View File

@ -0,0 +1,8 @@
import PuppeteerAdapter from '@pollyjs/adapter-puppeteer';
import { Polly } from '@pollyjs/core';
Polly.register(PuppeteerAdapter);
new Polly('<recording>', {
adapters: ['puppeteer', PuppeteerAdapter],
});

View File

@ -0,0 +1,41 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"esModuleInterop": true,
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"paths": {
"@pollyjs/core": [
"pollyjs__core"
],
"@pollyjs/adapter": [
"pollyjs__adapter"
],
"@pollyjs/adapter-puppeteer": [
"pollyjs__adapter-puppeteer"
],
"@pollyjs/persister": [
"pollyjs__persister"
],
"@pollyjs/utils": [
"pollyjs__utils"
]
}
},
"files": [
"index.d.ts",
"pollyjs__adapter-puppeteer-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

View File

@ -0,0 +1,11 @@
// Type definitions for @pollyjs/persister-local-storage 4.0
// Project: https://github.com/netflix/pollyjs/tree/master/packages/@pollyjs/persister-local-storage
// Definitions by: offirgolan <https://github.com/offirgolan>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4
import Persister from '@pollyjs/persister';
declare class LocalStoragePersister extends Persister {}
export = LocalStoragePersister;

View File

@ -0,0 +1,8 @@
import LocalStoragePersister from '@pollyjs/persister-local-storage';
import { Polly } from '@pollyjs/core';
Polly.register(LocalStoragePersister);
new Polly('<recording>', {
persister: LocalStoragePersister,
});

View File

@ -0,0 +1,42 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"esModuleInterop": true,
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"paths": {
"@pollyjs/persister": [
"pollyjs__persister"
],
"@pollyjs/persister-local-storage": [
"pollyjs__persister-local-storage"
],
"@pollyjs/core": [
"pollyjs__core"
],
"@pollyjs/utils": [
"pollyjs__utils"
],
"@pollyjs/adapter": [
"pollyjs__adapter"
]
}
},
"files": [
"index.d.ts",
"pollyjs__persister-local-storage-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

View File

@ -0,0 +1,11 @@
// Type definitions for @pollyjs/persister-rest 4.0
// Project: https://github.com/netflix/pollyjs/tree/master/packages/@pollyjs/persister-rest
// Definitions by: offirgolan <https://github.com/offirgolan>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4
import Persister from '@pollyjs/persister';
declare class RESTPersister extends Persister {}
export = RESTPersister;

View File

@ -0,0 +1,8 @@
import RESTPersister from '@pollyjs/persister-rest';
import { Polly } from '@pollyjs/core';
Polly.register(RESTPersister);
new Polly('<recording>', {
persister: RESTPersister,
});

View File

@ -0,0 +1,42 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"esModuleInterop": true,
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"paths": {
"@pollyjs/persister": [
"pollyjs__persister"
],
"@pollyjs/persister-rest": [
"pollyjs__persister-rest"
],
"@pollyjs/core": [
"pollyjs__core"
],
"@pollyjs/utils": [
"pollyjs__utils"
],
"@pollyjs/adapter": [
"pollyjs__adapter"
]
}
},
"files": [
"index.d.ts",
"pollyjs__persister-rest-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }