* Add x-pack plugin for new platform browser licensing information * Address next round of reviews * Remove poller functionality in favor of inline observables * More observable changes from review comments * Fix outstanding tests * More changes from review, adding additional testing * Add additional tests for license comparisons and sessions * Update test snapshot due to sessionstorage mock * Next round of review feedback from restrry * Fix more review requests from restrry, add additional tests * Pass correct sign mock to license info changed test * Improve doc comments, switch to I-interface pattern * Test error polling sanity, do not expose signature, do not poll on client * Fix type check issues from rebase * Fix build error from rebase * minimize config * move all types to server with consistency with other code * implement License * implement license update & refactor has License changed check * update tests for licensing extending route handler context * implement client side side license plugin * implement server side licensing plugin * remove old code * update testing harness * update types for license status * remove jest-localstorage-mock * fix tests * update license in security * address comments. first pass * error is a part of signature. pass error message to License * move common license types under common folder * rename feature props for BWC and unify name with ILicense * test should work in any timezone * make prettier happy * remove obsolete comment * address Pierre comments * use sha256 for security reasons * use stable stringify to avoid churn
47 lines
1.4 KiB
TypeScript
47 lines
1.4 KiB
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License;
|
|
* you may not use this file except in compliance with the Elastic License.
|
|
*/
|
|
|
|
declare module '*.html' {
|
|
const template: string;
|
|
// eslint-disable-next-line import/no-default-export
|
|
export default template;
|
|
}
|
|
|
|
declare module 'lodash/internal/toPath' {
|
|
function toPath(value: string | string[]): string[];
|
|
export = toPath;
|
|
}
|
|
|
|
type MethodKeysOf<T> = {
|
|
[K in keyof T]: T[K] extends (...args: any[]) => any ? K : never;
|
|
}[keyof T];
|
|
|
|
type PublicMethodsOf<T> = Pick<T, MethodKeysOf<T>>;
|
|
|
|
declare module 'axios/lib/adapters/xhr';
|
|
|
|
type Writable<T> = {
|
|
-readonly [K in keyof T]: T[K];
|
|
};
|
|
|
|
type MockedKeys<T> = { [P in keyof T]: jest.Mocked<Writable<T[P]>> };
|
|
|
|
type DeeplyMockedKeys<T> = {
|
|
[P in keyof T]: T[P] extends (...args: any[]) => any
|
|
? jest.MockInstance<ReturnType<T[P]>, Parameters<T[P]>>
|
|
: DeeplyMockedKeys<T[P]>;
|
|
} &
|
|
T;
|
|
|
|
// allow JSON files to be imported directly without lint errors
|
|
// see: https://github.com/palantir/tslint/issues/1264#issuecomment-228433367
|
|
// and: https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#arbitrary-expressions-are-forbidden-in-export-assignments-in-ambient-contexts
|
|
declare module '*.json' {
|
|
const json: any;
|
|
// eslint-disable-next-line import/no-default-export
|
|
export default json;
|
|
}
|