|
1 | 1 | // setup must go first |
2 | | -import './lib/SetupAwaitedHandler'; |
3 | | - |
4 | | -import { ILocationTrigger, LocationStatus } from '@secret-agent/core-interfaces/Location'; |
5 | | -import IConfigureOptions from '@secret-agent/core-interfaces/IConfigureOptions'; |
6 | | -import { RenderingOption } from '@secret-agent/core-interfaces/ITabOptions'; |
7 | | -import os from 'os'; |
8 | | -import initializeConstantsAndProperties from 'awaited-dom/base/initializeConstantsAndProperties'; |
9 | | -import { IRequestInit } from 'awaited-dom/base/interfaces/official'; |
10 | | -import { ISuperElement } from 'awaited-dom/base/interfaces/super'; |
11 | | -import { ICookie } from '@secret-agent/core-interfaces/ICookie'; |
12 | | -import IDomStorage from '@secret-agent/core-interfaces/IDomStorage'; |
13 | | -import ISessionOptions from '@secret-agent/core-interfaces/ISessionOptions'; |
14 | | -import IUserProfile from '@secret-agent/core-interfaces/IUserProfile'; |
15 | | -import IWaitForResourceOptions from '@secret-agent/core-interfaces/IWaitForResourceOptions'; |
16 | | -import IWaitForElementOptions from '@secret-agent/core-interfaces/IWaitForElementOptions'; |
17 | | -import StateMachine from 'awaited-dom/base/StateMachine'; |
18 | | -import Request from 'awaited-dom/impl/official-klasses/Request'; |
19 | | -import { bindFunctions } from '@secret-agent/commons/utils'; |
20 | | -import ICreateSessionOptions from '@secret-agent/core-interfaces/ICreateSessionOptions'; |
21 | | -import ICreateSecretAgentOptions from './interfaces/ICreateSecretAgentOptions'; |
22 | | -import CoreClient from './lib/CoreClient'; |
| 2 | +import "./lib/SetupAwaitedHandler"; |
| 3 | + |
| 4 | +import { ILocationTrigger, LocationStatus } from "@secret-agent/core-interfaces/Location"; |
| 5 | +import IConfigureOptions from "@secret-agent/core-interfaces/IConfigureOptions"; |
| 6 | +import { RenderingOption } from "@secret-agent/core-interfaces/ITabOptions"; |
| 7 | +import os from "os"; |
| 8 | +import initializeConstantsAndProperties from "awaited-dom/base/initializeConstantsAndProperties"; |
| 9 | +import { IRequestInit } from "awaited-dom/base/interfaces/official"; |
| 10 | +import { ISuperElement } from "awaited-dom/base/interfaces/super"; |
| 11 | +import IDomStorage from "@secret-agent/core-interfaces/IDomStorage"; |
| 12 | +import ISessionOptions from "@secret-agent/core-interfaces/ISessionOptions"; |
| 13 | +import IUserProfile from "@secret-agent/core-interfaces/IUserProfile"; |
| 14 | +import IWaitForResourceOptions from "@secret-agent/core-interfaces/IWaitForResourceOptions"; |
| 15 | +import IWaitForElementOptions from "@secret-agent/core-interfaces/IWaitForElementOptions"; |
| 16 | +import StateMachine from "awaited-dom/base/StateMachine"; |
| 17 | +import Request from "awaited-dom/impl/official-klasses/Request"; |
| 18 | +import { bindFunctions } from "@secret-agent/commons/utils"; |
| 19 | +import ICreateSessionOptions from "@secret-agent/core-interfaces/ICreateSessionOptions"; |
| 20 | +import ICreateSecretAgentOptions from "./interfaces/ICreateSecretAgentOptions"; |
| 21 | +import CoreClient from "./lib/CoreClient"; |
23 | 22 | import ISecretAgentClass, { |
24 | 23 | ISecretAgent, |
25 | | - ISecretAgentConfigureOptions, ISecretAgentEvents, |
| 24 | + ISecretAgentConfigureOptions, |
| 25 | + ISecretAgentEvents, |
26 | 26 | SecretAgentStatics |
27 | 27 | } from "./interfaces/ISecretAgent"; |
28 | | -import CoreTab from './lib/CoreTab'; |
29 | | -import Tab, { createTab, getCoreTab } from './lib/Tab'; |
30 | | -import IInteractions, { |
31 | | - Command, |
32 | | - IMousePosition, |
33 | | - ITypeInteraction, |
34 | | -} from './interfaces/IInteractions'; |
35 | | -import Interactor from './lib/Interactor'; |
36 | | -import IWaitForResourceFilter from './interfaces/IWaitForResourceFilter'; |
37 | | -import AwaitedEventTarget from './lib/AwaitedEventTarget'; |
38 | | -import ScriptInstance from './lib/ScriptInstance'; |
| 28 | +import CoreTab from "./lib/CoreTab"; |
| 29 | +import Tab, { createTab, getCoreTab } from "./lib/Tab"; |
| 30 | +import IInteractions, { Command, IMousePosition, ITypeInteraction } from "./interfaces/IInteractions"; |
| 31 | +import Interactor from "./lib/Interactor"; |
| 32 | +import IWaitForResourceFilter from "./interfaces/IWaitForResourceFilter"; |
| 33 | +import AwaitedEventTarget from "./lib/AwaitedEventTarget"; |
| 34 | +import ScriptInstance from "./lib/ScriptInstance"; |
39 | 35 | import Signals = NodeJS.Signals; |
40 | 36 |
|
41 | 37 | const DefaultOptions = { |
@@ -64,7 +60,6 @@ export function SecretAgentClientGenerator( |
64 | 60 | 'activeTab', |
65 | 61 | 'sessionName', |
66 | 62 | 'url', |
67 | | - 'cookies', |
68 | 63 | 'lastCommandId', |
69 | 64 | 'Request', |
70 | 65 | ]; |
@@ -125,10 +120,6 @@ export function SecretAgentClientGenerator( |
125 | 120 | return getState(this).activeTab; |
126 | 121 | } |
127 | 122 |
|
128 | | - public get cookies(): Promise<ICookie[]> { |
129 | | - return getCoreTab(this.activeTab).then(x => x.getAllCookies()); |
130 | | - } |
131 | | - |
132 | 123 | public get document() { |
133 | 124 | return this.activeTab.document; |
134 | 125 | } |
|
0 commit comments