Skip to content

Commit

Permalink
chore!: move to @krakenjs scope
Browse files Browse the repository at this point in the history
  • Loading branch information
westeezy committed Mar 1, 2022
1 parent e3be73c commit d707e26
Show file tree
Hide file tree
Showing 31 changed files with 74 additions and 74 deletions.
12 changes: 6 additions & 6 deletions package.json
@@ -1,5 +1,5 @@
{
"name": "post-robot",
"name": "@krakenjs/post-robot",
"version": "10.0.46",
"description": "Simple postMessage based server.",
"main": "index.js",
Expand Down Expand Up @@ -96,10 +96,10 @@
"standard-version": "^9.3.2"
},
"dependencies": {
"belter": "^1.0.41",
"cross-domain-safe-weakmap": "^1.0.1",
"cross-domain-utils": "^2.0.0",
"universal-serialize": "^1.0.4",
"zalgo-promise": "^1.0.3"
"@krakenjs/belter": "^2.0.0",
"@krakenjs/cross-domain-safe-weakmap": "^2.0.0",
"@krakenjs/cross-domain-utils": "^3.0.0",
"@krakenjs/universal-serialize": "^2.0.0",
"@krakenjs/zalgo-promise": "^2.0.0"
}
}
6 changes: 3 additions & 3 deletions src/bridge/bridge.js
@@ -1,8 +1,8 @@
/* @flow */

import { type ZalgoPromise } from 'zalgo-promise/src';
import { getParent, isWindowClosed, type CrossDomainWindowType } from 'cross-domain-utils/src';
import { noop, uniqueID } from 'belter/src';
import { type ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import { getParent, isWindowClosed, type CrossDomainWindowType } from '@krakenjs/cross-domain-utils/src';
import { noop, uniqueID } from '@krakenjs/belter/src';

import { MESSAGE_NAME, WILDCARD } from '../conf';
import { getGlobal, globalStore } from '../global';
Expand Down
6 changes: 3 additions & 3 deletions src/bridge/child.js
@@ -1,8 +1,8 @@
/* @flow */

import { ZalgoPromise } from 'zalgo-promise/src';
import { isSameDomain, getOpener, getDomain, getFrameByName, assertSameDomain, type CrossDomainWindowType } from 'cross-domain-utils/src';
import { noop } from 'belter/src';
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import { isSameDomain, getOpener, getDomain, getFrameByName, assertSameDomain, type CrossDomainWindowType } from '@krakenjs/cross-domain-utils/src';
import { noop } from '@krakenjs/belter/src';

import { getGlobal, windowStore } from '../global';
import type { OnType, SendType, ReceiveMessageType } from '../types';
Expand Down
6 changes: 3 additions & 3 deletions src/bridge/common.js
@@ -1,8 +1,8 @@
/* @flow */

import { ZalgoPromise } from 'zalgo-promise/src';
import { getDomain, isSameDomain, isOpener, isSameTopWindow, matchDomain, getUserAgent, getDomainFromUrl, type CrossDomainWindowType } from 'cross-domain-utils/src';
import { noop } from 'belter/src';
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import { getDomain, isSameDomain, isOpener, isSameTopWindow, matchDomain, getUserAgent, getDomainFromUrl, type CrossDomainWindowType } from '@krakenjs/cross-domain-utils/src';
import { noop } from '@krakenjs/belter/src';

import { BRIDGE_NAME_PREFIX } from '../conf';
import { windowStore } from '../global';
Expand Down
4 changes: 2 additions & 2 deletions src/bridge/parent.js
@@ -1,7 +1,7 @@
/* @flow */

import { ZalgoPromise } from 'zalgo-promise/src';
import { getDomain, getFrameByName, isWindowClosed, getDomainFromUrl, normalizeMockUrl, type CrossDomainWindowType } from 'cross-domain-utils/src';
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import { getDomain, getFrameByName, isWindowClosed, getDomainFromUrl, normalizeMockUrl, type CrossDomainWindowType } from '@krakenjs/cross-domain-utils/src';

import { BRIDGE_TIMEOUT, MESSAGE_NAME } from '../conf';
import { awaitWindowHello } from '../lib';
Expand Down
4 changes: 2 additions & 2 deletions src/clean.js
@@ -1,7 +1,7 @@
/* @flow */

import { type CrossDomainWindowType, isWindowClosed } from 'cross-domain-utils/src';
import { noop } from 'belter/src';
import { type CrossDomainWindowType, isWindowClosed } from '@krakenjs/cross-domain-utils/src';
import { noop } from '@krakenjs/belter/src';

import { windowStore } from './global';

Expand Down
6 changes: 3 additions & 3 deletions src/drivers/listeners.js
@@ -1,8 +1,8 @@
/* @flow */

import { type ZalgoPromise } from 'zalgo-promise/src';
import { matchDomain, type CrossDomainWindowType, type DomainMatcher } from 'cross-domain-utils/src';
import { isRegex, getOrSet, noop } from 'belter/src';
import { type ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import { matchDomain, type CrossDomainWindowType, type DomainMatcher } from '@krakenjs/cross-domain-utils/src';
import { isRegex, getOrSet, noop } from '@krakenjs/belter/src';

import { getWildcard, type WildCard, globalStore, windowStore } from '../global';
import { WILDCARD } from '../conf';
Expand Down
6 changes: 3 additions & 3 deletions src/drivers/receive/index.js
@@ -1,8 +1,8 @@
/* @flow */

import { ZalgoPromise } from 'zalgo-promise/src';
import { isWindowClosed, type CrossDomainWindowType, getDomain, isSameTopWindow, PROTOCOL } from 'cross-domain-utils/src';
import { addEventListener, noop } from 'belter/src';
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import { isWindowClosed, type CrossDomainWindowType, getDomain, isSameTopWindow, PROTOCOL } from '@krakenjs/cross-domain-utils/src';
import { addEventListener, noop } from '@krakenjs/belter/src';

import type { Message } from '../types';
import { MESSAGE_TYPE } from '../../conf';
Expand Down
6 changes: 3 additions & 3 deletions src/drivers/receive/types.js
@@ -1,8 +1,8 @@
/* @flow */

import { ZalgoPromise } from 'zalgo-promise/src';
import { getDomain, isWindowClosed, matchDomain, stringifyDomainPattern, type CrossDomainWindowType } from 'cross-domain-utils/src';
import { noop, stringifyError, uniqueID } from 'belter/src';
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import { getDomain, isWindowClosed, matchDomain, stringifyDomainPattern, type CrossDomainWindowType } from '@krakenjs/cross-domain-utils/src';
import { noop, stringifyError, uniqueID } from '@krakenjs/belter/src';

import { MESSAGE_TYPE, MESSAGE_ACK, MESSAGE_NAME } from '../../conf';
import { sendMessage } from '../send';
Expand Down
6 changes: 3 additions & 3 deletions src/drivers/send/index.js
@@ -1,8 +1,8 @@
/* @flow */

import { ZalgoPromise } from 'zalgo-promise/src';
import { isWindowClosed, type CrossDomainWindowType } from 'cross-domain-utils/src';
import { stringifyError, noop } from 'belter/src';
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import { isWindowClosed, type CrossDomainWindowType } from '@krakenjs/cross-domain-utils/src';
import { stringifyError, noop } from '@krakenjs/belter/src';

import { serializeMessage } from '../../serialize';
import { windowStore, getGlobalKey } from '../../global';
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/send/strategies.js
@@ -1,7 +1,7 @@
/* @flow */

import { isSameDomain, isSameTopWindow, isActuallySameDomain, getActualDomain,
getDomain, type CrossDomainWindowType, PROTOCOL } from 'cross-domain-utils/src';
getDomain, type CrossDomainWindowType, PROTOCOL } from '@krakenjs/cross-domain-utils/src';

import { SEND_STRATEGY, WILDCARD } from '../../conf';
import { needsGlobalMessagingForBrowser } from '../../lib';
Expand Down
6 changes: 3 additions & 3 deletions src/global.js
@@ -1,8 +1,8 @@
/* @flow */

import { type CrossDomainWindowType, type SameDomainWindowType } from 'cross-domain-utils/src';
import { WeakMap } from 'cross-domain-safe-weakmap/src';
import { getOrSet, getCurrentScriptUID } from 'belter/src';
import { type CrossDomainWindowType, type SameDomainWindowType } from '@krakenjs/cross-domain-utils/src';
import { WeakMap } from '@krakenjs/cross-domain-safe-weakmap/src';
import { getOrSet, getCurrentScriptUID } from '@krakenjs/belter/src';

export function getGlobalKey() : string {
if (__POST_ROBOT__.__SCRIPT_NAMESPACE__) {
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Expand Up @@ -4,7 +4,7 @@ import { setup } from './setup';
import { setupBridge, openBridge, linkWindow, linkUrl, isBridge, needsBridge, needsBridgeForBrowser, hasBridge,
needsBridgeForWin, needsBridgeForDomain, destroyBridges } from './bridge';

export { ZalgoPromise as Promise } from 'zalgo-promise/src';
export { ZalgoPromise as Promise } from '@krakenjs/zalgo-promise/src';

export * from './types';
export { ProxyWindow } from './serialize';
Expand Down
2 changes: 1 addition & 1 deletion src/lib/compat.js
@@ -1,6 +1,6 @@
/* @flow */

import { getUserAgent } from 'cross-domain-utils/src';
import { getUserAgent } from '@krakenjs/cross-domain-utils/src';

export function needsGlobalMessagingForBrowser() : boolean {

Expand Down
6 changes: 3 additions & 3 deletions src/lib/hello.js
@@ -1,8 +1,8 @@
/* @flow */

import { getAncestor, type CrossDomainWindowType } from 'cross-domain-utils/src';
import { ZalgoPromise } from 'zalgo-promise/src';
import { uniqueID } from 'belter/src';
import { getAncestor, type CrossDomainWindowType } from '@krakenjs/cross-domain-utils/src';
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import { uniqueID } from '@krakenjs/belter/src';

import { MESSAGE_NAME, WILDCARD } from '../conf';
import { windowStore, globalStore, getGlobal } from '../global';
Expand Down
2 changes: 1 addition & 1 deletion src/lib/windows.js
@@ -1,6 +1,6 @@
/* @flow */

import { type CrossDomainWindowType } from 'cross-domain-utils/src';
import { type CrossDomainWindowType } from '@krakenjs/cross-domain-utils/src';

import { windowStore } from '../global';

Expand Down
2 changes: 1 addition & 1 deletion src/public/on.js
@@ -1,6 +1,6 @@
/* @flow */

import { ZalgoPromise } from 'zalgo-promise/src';
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';

import { addRequestListener } from '../drivers';
import { WILDCARD } from '../conf';
Expand Down
6 changes: 3 additions & 3 deletions src/public/send.js
@@ -1,8 +1,8 @@
/* @flow */

import { ZalgoPromise } from 'zalgo-promise/src';
import { isAncestor, isWindowClosed, getDomain, matchDomain, type CrossDomainWindowType, type DomainMatcher } from 'cross-domain-utils/src';
import { uniqueID, isRegex, noop, safeInterval, stringify, stringifyError } from 'belter/src';
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import { isAncestor, isWindowClosed, getDomain, matchDomain, type CrossDomainWindowType, type DomainMatcher } from '@krakenjs/cross-domain-utils/src';
import { uniqueID, isRegex, noop, safeInterval, stringify, stringifyError } from '@krakenjs/belter/src';


import { CHILD_WINDOW_TIMEOUT, MESSAGE_TYPE, WILDCARD, MESSAGE_NAME, ACK_TIMEOUT, RES_TIMEOUT, ACK_TIMEOUT_KNOWN, RESPONSE_CYCLE_TIME } from '../conf';
Expand Down
8 changes: 4 additions & 4 deletions src/serialize/function.js
@@ -1,9 +1,9 @@
/* @flow */

import { matchDomain, getDomain, type CrossDomainWindowType, type DomainMatcher } from 'cross-domain-utils/src';
import { ZalgoPromise } from 'zalgo-promise/src';
import { uniqueID, isRegex, arrayFrom } from 'belter/src';
import { serializeType, type CustomSerializedType } from 'universal-serialize/src';
import { matchDomain, getDomain, type CrossDomainWindowType, type DomainMatcher } from '@krakenjs/cross-domain-utils/src';
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import { uniqueID, isRegex, arrayFrom } from '@krakenjs/belter/src';
import { serializeType, type CustomSerializedType } from '@krakenjs/universal-serialize/src';

import { MESSAGE_NAME, WILDCARD, SERIALIZATION_TYPE } from '../conf';
import { windowStore, globalStore } from '../global';
Expand Down
6 changes: 3 additions & 3 deletions src/serialize/promise.js
@@ -1,8 +1,8 @@
/* @flow */

import { type CrossDomainWindowType, type DomainMatcher } from 'cross-domain-utils/src';
import { ZalgoPromise } from 'zalgo-promise/src';
import { serializeType, type CustomSerializedType, type Thenable } from 'universal-serialize/src';
import { type CrossDomainWindowType, type DomainMatcher } from '@krakenjs/cross-domain-utils/src';
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import { serializeType, type CustomSerializedType, type Thenable } from '@krakenjs/universal-serialize/src';

import { SERIALIZATION_TYPE } from '../conf';
import type { OnType, SendType } from '../types';
Expand Down
4 changes: 2 additions & 2 deletions src/serialize/serialize.js
@@ -1,7 +1,7 @@
/* @flow */

import { type CrossDomainWindowType, isWindow, type DomainMatcher } from 'cross-domain-utils/src';
import { TYPE, serialize, deserialize, type Thenable } from 'universal-serialize/src';
import { type CrossDomainWindowType, isWindow, type DomainMatcher } from '@krakenjs/cross-domain-utils/src';
import { TYPE, serialize, deserialize, type Thenable } from '@krakenjs/universal-serialize/src';

import { SERIALIZATION_TYPE } from '../conf';
import type { OnType, SendType } from '../types';
Expand Down
8 changes: 4 additions & 4 deletions src/serialize/window.js
Expand Up @@ -2,10 +2,10 @@
/* eslint no-use-before-define: off */

import { isSameDomain, isWindowClosed, type CrossDomainWindowType, closeWindow,
type DomainMatcher, getOpener, WINDOW_TYPE, isWindow, assertSameDomain, getFrameForWindow } from 'cross-domain-utils/src';
import { ZalgoPromise } from 'zalgo-promise/src';
import { uniqueID, memoizePromise, noop, submitForm } from 'belter/src';
import { serializeType, type CustomSerializedType } from 'universal-serialize/src';
type DomainMatcher, getOpener, WINDOW_TYPE, isWindow, assertSameDomain, getFrameForWindow } from '@krakenjs/cross-domain-utils/src';
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import { uniqueID, memoizePromise, noop, submitForm } from '@krakenjs/belter/src';
import { serializeType, type CustomSerializedType } from '@krakenjs/universal-serialize/src';

import { SERIALIZATION_TYPE, METHOD } from '../conf';
import { windowStore, globalStore } from '../global';
Expand Down
2 changes: 1 addition & 1 deletion src/setup.js
@@ -1,6 +1,6 @@
/* @flow */

import type { CrossDomainWindowType, DomainMatcher } from 'cross-domain-utils/src';
import type { CrossDomainWindowType, DomainMatcher } from '@krakenjs/cross-domain-utils/src';

import { initHello } from './lib';
import { listenForMessages, stopListenForMessages, receiveMessage, setupGlobalReceiveMessage, cancelResponseListeners } from './drivers';
Expand Down
4 changes: 2 additions & 2 deletions src/types.js
@@ -1,7 +1,7 @@
/* @flow */

import type { ZalgoPromise } from 'zalgo-promise/src';
import type { CrossDomainWindowType, DomainMatcher } from 'cross-domain-utils/src';
import type { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import type { CrossDomainWindowType, DomainMatcher } from '@krakenjs/cross-domain-utils/src';

import type { ProxyWindow } from './serialize/window';

Expand Down
6 changes: 3 additions & 3 deletions test/common.js
@@ -1,8 +1,8 @@
/* @flow */

import { ZalgoPromise } from 'zalgo-promise/src';
import { getBody, noop } from 'belter/src';
import { type CrossDomainWindowType } from 'cross-domain-utils/src';
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import { getBody, noop } from '@krakenjs/belter/src';
import { type CrossDomainWindowType } from '@krakenjs/cross-domain-utils/src';

import { awaitWindowHello } from '../src/lib';

Expand Down
4 changes: 2 additions & 2 deletions test/tests/error.js
@@ -1,8 +1,8 @@
/* @flow */
/* eslint max-lines: 0 */

import { ZalgoPromise } from 'zalgo-promise/src';
import { wrapPromise } from 'belter/src';
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import { wrapPromise } from '@krakenjs/belter/src';

import { on, send } from '../../src';
import { getWindows } from '../common';
Expand Down
4 changes: 2 additions & 2 deletions test/tests/happy.js
@@ -1,8 +1,8 @@
/* @flow */
/* eslint max-lines: 0 */

import { ZalgoPromise } from 'zalgo-promise/src';
import { wrapPromise } from 'belter/src';
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import { wrapPromise } from '@krakenjs/belter/src';

import { on, send } from '../../src';
import { getWindows } from '../common';
Expand Down
2 changes: 1 addition & 1 deletion test/tests/options.js
@@ -1,7 +1,7 @@
/* @flow */
/* eslint max-lines: 0 */

import { ZalgoPromise } from 'zalgo-promise/src';
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';

import { on, send, once } from '../../src';
import { getWindows } from '../common';
Expand Down
2 changes: 1 addition & 1 deletion test/tests/popup.js
@@ -1,7 +1,7 @@
/* @flow */
/* eslint max-lines: 0 */

import { ZalgoPromise } from 'zalgo-promise/src';
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';

import { send, bridge } from '../../src';
import { awaitWindowHello } from '../../src/lib';
Expand Down
6 changes: 3 additions & 3 deletions test/tests/serialization.js
@@ -1,9 +1,9 @@
/* @flow */
/* eslint max-lines: 0 */

import { ZalgoPromise } from 'zalgo-promise/src';
import { WINDOW_TYPE } from 'cross-domain-utils/src';
import { uniqueID, getBody } from 'belter/src';
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import { WINDOW_TYPE } from '@krakenjs/cross-domain-utils/src';
import { uniqueID, getBody } from '@krakenjs/belter/src';

import { send } from '../../src';
import { awaitWindowHello } from '../../src/lib';
Expand Down
2 changes: 1 addition & 1 deletion test/tests/window-proxy.js
@@ -1,7 +1,7 @@
/* @flow */
/* eslint max-lines: 0, max-nested-callbacks: off */

import { wrapPromise } from 'belter/src';
import { wrapPromise } from '@krakenjs/belter/src';

import { on, send } from '../../src';
import { getWindows } from '../common';
Expand Down

0 comments on commit d707e26

Please sign in to comment.