@openfin/core 31.74.5 → 31.74.6

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.
Files changed (63) hide show
  1. package/package.json +1 -1
  2. package/src/OpenFin.d.ts +238 -238
  3. package/src/OpenFin.js +0 -2
  4. package/src/api/base.d.ts +2 -2
  5. package/src/api/events/application.d.ts +22 -22
  6. package/src/api/events/base.d.ts +6 -6
  7. package/src/api/events/channel.d.ts +5 -5
  8. package/src/api/events/emitterMap.d.ts +1 -1
  9. package/src/api/events/externalApplication.d.ts +3 -3
  10. package/src/api/events/frame.d.ts +5 -5
  11. package/src/api/events/globalHotkey.d.ts +3 -3
  12. package/src/api/events/platform.d.ts +3 -3
  13. package/src/api/events/system.d.ts +17 -17
  14. package/src/api/events/typedEventEmitter.d.ts +1 -1
  15. package/src/api/events/view.d.ts +13 -13
  16. package/src/api/events/webcontents.d.ts +22 -22
  17. package/src/api/events/window.d.ts +49 -49
  18. package/src/api/fin.d.ts +1 -1
  19. package/src/api/frame/Instance.d.ts +1 -1
  20. package/src/api/interappbus/channel/channel.d.ts +4 -4
  21. package/src/api/interappbus/channel/channel.js +3 -3
  22. package/src/api/interappbus/channel/client.d.ts +2 -2
  23. package/src/api/interappbus/channel/client.js +20 -20
  24. package/src/api/interappbus/channel/connection-manager.d.ts +1 -1
  25. package/src/api/interappbus/channel/connection-manager.js +12 -12
  26. package/src/api/interappbus/channel/index.d.ts +2 -2
  27. package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +1 -1
  28. package/src/api/interappbus/channel/protocols/combined/strategy.d.ts +2 -2
  29. package/src/api/interappbus/channel/protocols/combined/strategy.js +5 -5
  30. package/src/api/interappbus/channel/protocols/index.d.ts +4 -4
  31. package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +1 -1
  32. package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +1 -1
  33. package/src/api/interappbus/channel/protocols/strategy-types.d.ts +4 -4
  34. package/src/api/interappbus/channel/protocols/strategy.d.ts +3 -3
  35. package/src/api/interappbus/channel/provider.d.ts +5 -5
  36. package/src/api/interappbus/channel/provider.js +24 -24
  37. package/src/api/interop/InteropBroker.d.ts +1 -1
  38. package/src/api/interop/fdc3/PrivateChannelClient.d.ts +1 -1
  39. package/src/api/interop/fdc3/PrivateChannelProvider.d.ts +1 -1
  40. package/src/api/interop/fdc3/shapes/fdc3v1.d.ts +3 -3
  41. package/src/api/interop/fdc3/shapes/fdc3v2.d.ts +4 -4
  42. package/src/api/interop/fdc3/versions.d.ts +1 -1
  43. package/src/api/me.d.ts +3 -3
  44. package/src/api/platform/common-utils.d.ts +1 -1
  45. package/src/api/platform/layout/Factory.d.ts +1 -1
  46. package/src/api/platform/layout/Instance.d.ts +3 -3
  47. package/src/api/platform/layout/controllers/splitter-controller.d.ts +1 -1
  48. package/src/api/platform/layout/shapes.d.ts +1 -1
  49. package/src/api/system/index.d.ts +13 -13
  50. package/src/api/view/Instance.d.ts +1 -1
  51. package/src/environment/browser.d.ts +1 -1
  52. package/src/environment/environment.d.ts +1 -1
  53. package/src/environment/node-env.d.ts +1 -1
  54. package/src/environment/openfin-env.d.ts +1 -1
  55. package/src/shapes/ERROR_BOX_TYPES.d.ts +1 -1
  56. package/src/shapes/protocol.d.ts +3 -3
  57. package/src/transport/transport-errors.d.ts +2 -2
  58. package/src/transport/transport.d.ts +3 -3
  59. package/src/transport/wire.d.ts +13 -13
  60. package/src/util/errors.d.ts +2 -2
  61. package/src/util/http.js +4 -2
  62. package/src/util/promises.d.ts +1 -1
  63. package/src/util/utilTypes.d.ts +1 -1
@@ -1,6 +1,6 @@
1
1
  import type * as OpenFin from '../../../OpenFin';
2
2
  import type { Listener, Context, ContextHandler } from './shapes/fdc3v2';
3
- declare type HandlerId = string;
3
+ type HandlerId = string;
4
4
  export declare class PrivateChannelClient {
5
5
  id: string;
6
6
  client: OpenFin.ChannelClient;
@@ -1,6 +1,6 @@
1
1
  import type * as OpenFin from '../../../OpenFin';
2
2
  import { ChannelProvider } from '../../interappbus/channel/provider';
3
- declare type HandlerId = string;
3
+ type HandlerId = string;
4
4
  export declare class PrivateChannelProvider {
5
5
  id: string;
6
6
  private provider;
@@ -8,8 +8,8 @@ export type { Listener } from 'fdc3v1/src/api/Listener';
8
8
  export type { AppMetadata } from 'fdc3v1/src/api/AppMetadata';
9
9
  export type { AppIntent } from 'fdc3v1/src/api/AppIntent';
10
10
  export type { ImplementationMetadata } from 'fdc3v1/src/api/ImplementationMetadata';
11
- export declare type ContextHandler = (context: Context) => void;
12
- export declare type TargetApp = string | AppMetadata;
11
+ export type ContextHandler = (context: Context) => void;
12
+ export type TargetApp = string | AppMetadata;
13
13
  export interface Context {
14
14
  id?: {
15
15
  [key: string]: string;
@@ -30,7 +30,7 @@ export interface Channel {
30
30
  getCurrentContext(contextType?: string): Promise<Context | null>;
31
31
  addContextListener(contextType: string | null, handler: ContextHandler): Listener & Promise<Listener>;
32
32
  }
33
- export declare type SystemChannel = Omit<Channel, 'addContextListener' | 'broadcast' | 'getCurrentContext'> & {
33
+ export type SystemChannel = Omit<Channel, 'addContextListener' | 'broadcast' | 'getCurrentContext'> & {
34
34
  addContextListener(): Error;
35
35
  broadcast(): Error;
36
36
  getCurrentContext(): Error;
@@ -14,9 +14,9 @@ export type { ContextMetadata } from 'fdc3v2/src/api/ContextMetadata';
14
14
  export type { AppIdentifier } from 'fdc3v2/src/api/AppIdentifier';
15
15
  export type { AppMetadata } from 'fdc3v2/src/api/AppMetadata';
16
16
  export type { DisplayMetadata } from 'fdc3v2/src/api/DisplayMetadata';
17
- export declare type ContextHandler = (context: Context, metadata?: ContextMetadata) => void;
18
- export declare type IntentHandler = (context: Context, metadata?: ContextMetadata) => Promise<IntentResult> | void;
19
- export declare type IntentResult = Context | Channel | PrivateChannel;
17
+ export type ContextHandler = (context: Context, metadata?: ContextMetadata) => void;
18
+ export type IntentHandler = (context: Context, metadata?: ContextMetadata) => Promise<IntentResult> | void;
19
+ export type IntentResult = Context | Channel | PrivateChannel;
20
20
  export interface Context {
21
21
  id?: {
22
22
  [key: string]: string;
@@ -45,7 +45,7 @@ export interface Channel {
45
45
  getCurrentContext(contextType?: string): Promise<Context | null>;
46
46
  addContextListener(contextType: string | null, handler: ContextHandler): Listener & Promise<Listener>;
47
47
  }
48
- export declare type PrivateChannel = Omit<Channel, 'addContextListener'> & {
48
+ export type PrivateChannel = Omit<Channel, 'addContextListener'> & {
49
49
  addContextListener(contextType: string | null, handler: ContextHandler): Promise<Listener>;
50
50
  onAddContextListener(handler: (contextType?: string) => void): Listener;
51
51
  onUnsubscribe(handler: (contextType?: string) => void): Listener;
@@ -1 +1 @@
1
- export declare type Fdc3Version = '1.2' | '2.0';
1
+ export type Fdc3Version = '1.2' | '2.0';
package/src/api/me.d.ts CHANGED
@@ -2,8 +2,8 @@ import type * as OpenFin from '../OpenFin';
2
2
  import type { Transport } from '../transport/transport';
3
3
  import type { InteropClient } from './interop';
4
4
  export declare const environmentUnsupportedMessage = "You are not running in OpenFin.";
5
- declare type EntityType = OpenFin.EntityType;
6
- export declare type EntityTypeHelpers<T extends EntityType> = T extends 'view' ? {
5
+ type EntityType = OpenFin.EntityType;
6
+ export type EntityTypeHelpers<T extends EntityType> = T extends 'view' ? {
7
7
  isView: true;
8
8
  isWindow: false;
9
9
  isExternal: false;
@@ -33,7 +33,7 @@ export declare function getBaseMe<T extends EntityType = EntityType>(entityType:
33
33
  export interface WithInterop {
34
34
  interop: InteropClient;
35
35
  }
36
- export declare type Me<MeType extends EntityType> = OpenFin.EntityInfo & (MeType extends 'view' ? EntityTypeHelpers<'view'> & OpenFin.View & WithInterop : MeType extends 'window' ? EntityTypeHelpers<'window'> & OpenFin.Window & WithInterop : MeType extends 'iframe' ? EntityTypeHelpers<'iframe'> & OpenFin.Frame & WithInterop : EntityTypeHelpers<MeType> & WithInterop) & {
36
+ export type Me<MeType extends EntityType> = OpenFin.EntityInfo & (MeType extends 'view' ? EntityTypeHelpers<'view'> & OpenFin.View & WithInterop : MeType extends 'window' ? EntityTypeHelpers<'window'> & OpenFin.Window & WithInterop : MeType extends 'iframe' ? EntityTypeHelpers<'iframe'> & OpenFin.Frame & WithInterop : EntityTypeHelpers<MeType> & WithInterop) & {
37
37
  isOpenFin: boolean;
38
38
  };
39
39
  export declare function getMe<MeType extends EntityType>(wire: Transport<MeType>): Me<MeType>;
@@ -1,5 +1,5 @@
1
1
  import type * as OpenFin from '../../OpenFin';
2
- declare type LayoutPresetType = OpenFin.LayoutPresetType;
2
+ type LayoutPresetType = OpenFin.LayoutPresetType;
3
3
  export declare function isValidPresetType(type: LayoutPresetType): type is LayoutPresetType;
4
4
  declare const _default: {
5
5
  isValidPresetType: typeof isValidPresetType;
@@ -1,7 +1,7 @@
1
1
  import type * as OpenFin from '../../../OpenFin';
2
2
  import { Layout } from './Instance';
3
3
  import { Base } from '../../base';
4
- declare type InitLayoutOptions = OpenFin.InitLayoutOptions;
4
+ type InitLayoutOptions = OpenFin.InitLayoutOptions;
5
5
  /**
6
6
  * @PORTED
7
7
  * InitLayoutOptions interface
@@ -1,9 +1,9 @@
1
1
  import type * as OpenFin from '../../../OpenFin';
2
2
  import { Transport } from '../../../transport/transport';
3
3
  import { Base } from '../../base';
4
- declare type Identity = OpenFin.Identity;
5
- declare type InitLayoutOptions = OpenFin.InitLayoutOptions;
6
- declare type PresetLayoutOptions = OpenFin.PresetLayoutOptions;
4
+ type Identity = OpenFin.Identity;
5
+ type InitLayoutOptions = OpenFin.InitLayoutOptions;
6
+ type PresetLayoutOptions = OpenFin.PresetLayoutOptions;
7
7
  /**
8
8
  * @lends Platform#Layout
9
9
  */
@@ -1,5 +1,5 @@
1
1
  import { ViewOverlay } from '../utils/view-overlay';
2
- export declare type SplitterItem = GoldenLayout.ContentItem & {
2
+ export type SplitterItem = GoldenLayout.ContentItem & {
3
3
  viewEventsAdded: boolean;
4
4
  isVertical: boolean;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import type * as OpenFin from '../../../OpenFin';
2
- declare type LayoutPresetType = OpenFin.LayoutPresetType;
2
+ type LayoutPresetType = OpenFin.LayoutPresetType;
3
3
  export interface InitLayoutOptions {
4
4
  containerId?: string;
5
5
  }
@@ -1,19 +1,19 @@
1
1
  import type * as OpenFin from '../../OpenFin';
2
2
  import { EmitterBase } from '../base';
3
3
  import { Transport } from '../../transport/transport';
4
- declare type Identity = OpenFin.Identity;
5
- declare type ProxyInfo = OpenFin.ProxyInfo;
6
- declare type ProxyConfig = OpenFin.ProxyConfig;
7
- declare type InstalledApps = OpenFin.InstalledApps;
8
- declare type LogInfo = OpenFin.LogInfo;
9
- declare type LogLevel = OpenFin.LogLevel;
10
- declare type GetLogRequestType = OpenFin.GetLogRequestType;
11
- declare type RegistryInfo = OpenFin.RegistryInfo;
12
- declare type EntityInfo = OpenFin.EntityInfo;
13
- declare type Entity = OpenFin.ApplicationType;
14
- declare type ApplicationState = OpenFin.ApplicationState;
15
- declare type ApplicationWindowInfo = OpenFin.ApplicationWindowInfo;
16
- declare type PrinterInfo = OpenFin.PrinterInfo;
4
+ type Identity = OpenFin.Identity;
5
+ type ProxyInfo = OpenFin.ProxyInfo;
6
+ type ProxyConfig = OpenFin.ProxyConfig;
7
+ type InstalledApps = OpenFin.InstalledApps;
8
+ type LogInfo = OpenFin.LogInfo;
9
+ type LogLevel = OpenFin.LogLevel;
10
+ type GetLogRequestType = OpenFin.GetLogRequestType;
11
+ type RegistryInfo = OpenFin.RegistryInfo;
12
+ type EntityInfo = OpenFin.EntityInfo;
13
+ type Entity = OpenFin.ApplicationType;
14
+ type ApplicationState = OpenFin.ApplicationState;
15
+ type ApplicationWindowInfo = OpenFin.ApplicationWindowInfo;
16
+ type PrinterInfo = OpenFin.PrinterInfo;
17
17
  /**
18
18
  * An object representing the core of OpenFin Runtime. Allows the developer
19
19
  * to perform system-level actions, such as accessing logs, viewing processes,
@@ -3,7 +3,7 @@ import { WebContents } from '../webcontents/main';
3
3
  import { Transport } from '../../transport/transport';
4
4
  import { Layout } from '../platform/layout';
5
5
  import { ViewEvent } from '../events/view';
6
- declare type UpdatableViewOptions = OpenFin.UpdatableViewOptions;
6
+ type UpdatableViewOptions = OpenFin.UpdatableViewOptions;
7
7
  /**
8
8
  * @PORTED
9
9
  * @typedef {object} View~options
@@ -1,7 +1,7 @@
1
1
  import type * as OpenFin from '../OpenFin';
2
2
  import { NewConnectConfig } from '../transport/wire';
3
3
  import { ChildContentOptions, Environment } from './environment';
4
- declare type EntityType = OpenFin.EntityType;
4
+ type EntityType = OpenFin.EntityType;
5
5
  export declare class BrowserEnvironment implements Environment {
6
6
  getManagerConstructor(): Promise<any>;
7
7
  getProviderInitializer(): Promise<any>;
@@ -1,6 +1,6 @@
1
1
  import type * as OpenFin from '../OpenFin';
2
2
  import { NewConnectConfig } from '../transport/wire';
3
- declare type EntityType = OpenFin.EntityType;
3
+ type EntityType = OpenFin.EntityType;
4
4
  export interface Environment {
5
5
  getManagerConstructor(): Promise<any>;
6
6
  getProviderInitializer(): Promise<any>;
@@ -1,7 +1,7 @@
1
1
  import type * as OpenFin from '../OpenFin';
2
2
  import { Environment } from './environment';
3
3
  import { NewConnectConfig } from '../transport/wire';
4
- declare type EntityType = OpenFin.EntityType;
4
+ type EntityType = OpenFin.EntityType;
5
5
  export default class NodeEnvironment implements Environment {
6
6
  getDefaultChannelOptions(): {
7
7
  create: OpenFin.ChannelCreateOptions;
@@ -2,7 +2,7 @@ import type * as OpenFin from '../OpenFin';
2
2
  import { ChildContentOptions, Environment } from './environment';
3
3
  import { NewConnectConfig } from '../transport/wire';
4
4
  import { BrowserEnvironment } from './browser';
5
- declare type EntityType = OpenFin.EntityType;
5
+ type EntityType = OpenFin.EntityType;
6
6
  export default class OpenFinEnvironment extends BrowserEnvironment implements Environment {
7
7
  #private;
8
8
  private raiseEventAsync;
@@ -1 +1 @@
1
- export declare type ERROR_BOX_TYPES = 'OF_error_box:app_initialization' | 'OF_error_box:main_process' | 'OF_error_box:renderer_crash';
1
+ export type ERROR_BOX_TYPES = 'OF_error_box:app_initialization' | 'OF_error_box:main_process' | 'OF_error_box:renderer_crash';
@@ -149,12 +149,12 @@ export interface ProtocolMap extends ProtocolMapBase {
149
149
  response: OpenFin.PrinterInfo[];
150
150
  };
151
151
  }
152
- declare type ApiCall<Request, Response> = {
152
+ type ApiCall<Request, Response> = {
153
153
  request: Request;
154
154
  response: Response;
155
155
  };
156
- declare type VoidCall = ApiCall<void, void>;
157
- declare type IdentityCall<AdditionalPayload = {}, Response = void> = ApiCall<AdditionalPayload & OpenFin.Identity, Response>;
156
+ type VoidCall = ApiCall<void, void>;
157
+ type IdentityCall<AdditionalPayload = {}, Response = void> = ApiCall<AdditionalPayload & OpenFin.Identity, Response>;
158
158
  interface ProtocolMapBase {
159
159
  [action: string]: {
160
160
  request: any;
@@ -1,5 +1,5 @@
1
1
  import { ErrorPlainObject } from '../util/errors';
2
- export declare type ReadyState = 'CONNECTING' | 'OPEN' | 'CLOSING' | 'CLOSED';
2
+ export type ReadyState = 'CONNECTING' | 'OPEN' | 'CLOSING' | 'CLOSED';
3
3
  export declare class DisconnectedError extends Error {
4
4
  constructor(readyState: ReadyState);
5
5
  readyState: ReadyState;
@@ -14,7 +14,7 @@ export declare class NotImplementedError extends Error {
14
14
  }
15
15
  export declare class NotSupportedError extends Error {
16
16
  }
17
- export declare type RuntimeErrorPayload = {
17
+ export type RuntimeErrorPayload = {
18
18
  reason: string;
19
19
  error?: ErrorPlainObject;
20
20
  };
@@ -8,8 +8,8 @@ import { EntityTypeHelpers } from '../api/me';
8
8
  import { ProtocolMap } from '../shapes/protocol';
9
9
  import { NamedEvent } from '../api/events/base';
10
10
  import { ErrorPlainObject } from '../util/errors';
11
- declare type EntityType = OpenFin.EntityType;
12
- export declare type MessageHandler = (data: any) => boolean;
11
+ type EntityType = OpenFin.EntityType;
12
+ export type MessageHandler = (data: any) => boolean;
13
13
  export declare class Transport<MeType extends EntityType = EntityType> extends EventEmitter {
14
14
  #private;
15
15
  protected wireListeners: Map<number, {
@@ -49,7 +49,7 @@ export interface EventMessage extends Message<NamedEvent> {
49
49
  action: 'process-desktop-event';
50
50
  payload: NamedEvent;
51
51
  }
52
- export declare type Payload<Success extends boolean = boolean, Data = any> = {
52
+ export type Payload<Success extends boolean = boolean, Data = any> = {
53
53
  success: Success;
54
54
  data: Success extends true ? Data : never;
55
55
  reason: Success extends false ? string : never;
@@ -1,16 +1,16 @@
1
1
  /// <reference types="mocha" />
2
2
  /// <reference types="node" />
3
3
  import EventEmitter = NodeJS.EventEmitter;
4
- export declare type Wire = EventEmitter & {
4
+ export type Wire = EventEmitter & {
5
5
  connect(address: string, WsConstructor: typeof WebSocket): Promise<any>;
6
6
  connectSync(): any;
7
7
  send(data: any): Promise<any>;
8
8
  shutdown(): Promise<void>;
9
9
  };
10
- export declare type WireConstructor = {
10
+ export type WireConstructor = {
11
11
  new (onmessage: (data: any) => void): Wire;
12
12
  };
13
- export declare type RuntimeConfig = {
13
+ export type RuntimeConfig = {
14
14
  version: string;
15
15
  fallbackVersion?: string;
16
16
  securityRealm?: string;
@@ -18,11 +18,11 @@ export declare type RuntimeConfig = {
18
18
  arguments?: string;
19
19
  rvmDir?: string;
20
20
  };
21
- export declare type ServiceConfig = {
21
+ export type ServiceConfig = {
22
22
  name: string;
23
23
  manifestUrl: string;
24
24
  };
25
- export declare type BaseConfig = {
25
+ export type BaseConfig = {
26
26
  uuid?: string;
27
27
  address?: string;
28
28
  name?: string;
@@ -50,22 +50,22 @@ export declare type BaseConfig = {
50
50
  customItems?: [any];
51
51
  timeout?: number;
52
52
  };
53
- export declare type ConfigWithUuid = BaseConfig & {
53
+ export type ConfigWithUuid = BaseConfig & {
54
54
  uuid: string;
55
55
  };
56
- export declare type ExistingConnectConfig = ConfigWithUuid & {
56
+ export type ExistingConnectConfig = ConfigWithUuid & {
57
57
  address: string;
58
58
  };
59
- export declare type ConfigWithRuntime = BaseConfig & {
59
+ export type ConfigWithRuntime = BaseConfig & {
60
60
  runtime: RuntimeConfig;
61
61
  };
62
- export declare type ExternalConfig = BaseConfig & {
62
+ export type ExternalConfig = BaseConfig & {
63
63
  manifestUrl: string;
64
64
  };
65
- export declare type NewConnectConfig = ConfigWithUuid & ConfigWithRuntime;
66
- export declare type PortDiscoveryConfig = (ExternalConfig & ConfigWithRuntime) | NewConnectConfig;
67
- export declare type ConnectConfig = ExistingConnectConfig | NewConnectConfig | ExternalConfig;
68
- export declare type InternalConnectConfig = ExistingConnectConfig | NewConnectConfig;
65
+ export type NewConnectConfig = ConfigWithUuid & ConfigWithRuntime;
66
+ export type PortDiscoveryConfig = (ExternalConfig & ConfigWithRuntime) | NewConnectConfig;
67
+ export type ConnectConfig = ExistingConnectConfig | NewConnectConfig | ExternalConfig;
68
+ export type InternalConnectConfig = ExistingConnectConfig | NewConnectConfig;
69
69
  export interface RemoteConfig extends ExistingConnectConfig {
70
70
  token: string;
71
71
  }
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * This function converts JS errors into plain objects
3
3
  */
4
- export declare type ErrorPlainObject = {
5
- stack: string;
4
+ export type ErrorPlainObject = {
5
+ stack?: string;
6
6
  message: string;
7
7
  toString(): string;
8
8
  };
package/src/util/http.js CHANGED
@@ -38,9 +38,10 @@ const getRequestOptions = (url) => {
38
38
  };
39
39
  exports.getRequestOptions = getRequestOptions;
40
40
  const fetch = async (url) => {
41
+ var _a;
41
42
  const requestUrl = getProxyVar() ? getProxyVar() : url;
42
43
  const proto = (0, url_1.parse)(requestUrl).protocol.slice(0, -1) === 'http' ? 'http' : 'https';
43
- const fetcher = await Promise.resolve().then(() => require(proto));
44
+ const fetcher = await (_a = proto, Promise.resolve().then(() => require(_a)));
44
45
  return new Promise((resolve, reject) => {
45
46
  const options = (0, exports.getRequestOptions)(url);
46
47
  const request = fetcher.get(options, (response) => {
@@ -60,9 +61,10 @@ const fetch = async (url) => {
60
61
  };
61
62
  exports.fetch = fetch;
62
63
  const downloadFile = async (url, writeLocation) => {
64
+ var _a;
63
65
  const requestUrl = getProxyVar() ? getProxyVar() : url;
64
66
  const proto = (0, url_1.parse)(requestUrl).protocol.slice(0, -1) === 'http' ? 'http' : 'https';
65
- const fetcher = await Promise.resolve().then(() => require(proto));
67
+ const fetcher = await (_a = proto, Promise.resolve().then(() => require(_a)));
66
68
  return new Promise((resolve, reject) => {
67
69
  try {
68
70
  const options = (0, exports.getRequestOptions)(url);
@@ -1,5 +1,5 @@
1
1
  export declare function promisify(func: Function): (...args: any[]) => Promise<any>;
2
2
  export declare function promiseMap<T, S>(arr: T[], asyncF: (x: T, i: number, r: T[]) => Promise<S>): Promise<S[]>;
3
- export declare type asyncF<T> = (...args: any[]) => Promise<T>;
3
+ export type asyncF<T> = (...args: any[]) => Promise<T>;
4
4
  export declare function serial<T>(arr: asyncF<T>[]): Promise<T[]>;
5
5
  export declare function promiseMapSerial<T>(arr: any[], func: asyncF<T>): Promise<T[]>;
@@ -3,6 +3,6 @@
3
3
  * which are always populated in certain contexts. A `DeepPick` type would be even better,
4
4
  * but no reliable implementation of one appears to exist yet.
5
5
  */
6
- export declare type Complete<T extends {}> = T & {
6
+ export type Complete<T extends {}> = T & {
7
7
  [MK in keyof T]-?: Complete<NonNullable<T[MK]>>;
8
8
  };