@applicaster/quick-brick-core 16.0.0-rc.126 → 16.0.0-rc.127
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.
- package/App/ActionSetters/index.ts +2 -2
- package/App/ActionsProvider/ActionsProvider.tsx +1 -1
- package/App/ActionsProvider/LegacyActionsRegistryAdapter.tsx +1 -1
- package/App/AssetCache/logger.ts +1 -1
- package/App/DeepLinking/logger.ts +1 -1
- package/App/ErrorBoundary/index.tsx +5 -2
- package/App/NavigationProvider/NavigationProvider.tsx +2 -2
- package/App/NavigationProvider/utils.ts +2 -2
- package/App/NetworkStatusProvider/NetworkStatusProvider.tsx +3 -2
- package/App/NetworkStatusProvider/ResumeVerificationController.ts +2 -2
- package/App/NetworkStatusProvider/__tests__/NetworkStatusProvider.test.tsx +27 -12
- package/App/NetworkStatusProvider/__tests__/ResumeVerificationController.test.ts +27 -12
- package/App/NetworkStatusProvider/__tests__/useResumeVerifiedNetInfo.test.ts +27 -12
- package/App/appLifeCycleManager/index.tsx +2 -2
- package/App/appRemoteDataLoader/index.tsx +2 -2
- package/App/appRemoteDataLoader/remoteDataLoader.ts +2 -2
- package/App/logger.js +2 -2
- package/package.json +8 -8
|
@@ -4,8 +4,8 @@ import { allSettled } from "promise";
|
|
|
4
4
|
import { useActions } from "@applicaster/zapp-react-native-utils/reactHooks/actions";
|
|
5
5
|
|
|
6
6
|
import * as React from "react";
|
|
7
|
-
import {
|
|
8
|
-
const logger =
|
|
7
|
+
import { subsystemLogger } from "@applicaster/zapp-react-native-utils/logger";
|
|
8
|
+
const logger = subsystemLogger("app/lifecycle", "AppLifeCycleManager");
|
|
9
9
|
|
|
10
10
|
const debugActions = (actions) =>
|
|
11
11
|
logger.debug({
|
|
@@ -8,7 +8,7 @@ import { createLogger } from "@applicaster/zapp-react-native-utils/logger";
|
|
|
8
8
|
import { LegacyActionsRegistryAdapter } from "./LegacyActionsRegistryAdapter";
|
|
9
9
|
|
|
10
10
|
const { log_debug } = createLogger({
|
|
11
|
-
subsystem: "
|
|
11
|
+
subsystem: "core/actions",
|
|
12
12
|
category: "ActionRegistration",
|
|
13
13
|
});
|
|
14
14
|
|
|
@@ -5,7 +5,7 @@ import { uiActionsRegistry } from "@applicaster/zapp-react-native-utils/uiAction
|
|
|
5
5
|
import { createLogger } from "@applicaster/zapp-react-native-utils/logger";
|
|
6
6
|
|
|
7
7
|
const { log_debug, log_warning } = createLogger({
|
|
8
|
-
subsystem: "
|
|
8
|
+
subsystem: "core/actions/legacy_registry",
|
|
9
9
|
category: "ActionRegistration",
|
|
10
10
|
});
|
|
11
11
|
|
package/App/AssetCache/logger.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import pick from "lodash/pick";
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { subsystemLogger } from "@applicaster/zapp-react-native-utils/logger";
|
|
5
5
|
import { ErrorScreen } from "@applicaster/zapp-react-native-ui-components/Components/ErrorScreen";
|
|
6
6
|
|
|
7
7
|
import { useErrorStore } from "./store";
|
|
8
8
|
import * as QuickBrickManager from "@applicaster/zapp-react-native-bridge/QuickBrick";
|
|
9
9
|
|
|
10
|
-
const errorBoundaryLogger =
|
|
10
|
+
const errorBoundaryLogger = subsystemLogger(
|
|
11
|
+
"crash/error_boundary",
|
|
12
|
+
"ErrorBoundary"
|
|
13
|
+
);
|
|
11
14
|
|
|
12
15
|
type Props = {
|
|
13
16
|
children: React.ReactNode;
|
|
@@ -45,7 +45,6 @@ import {
|
|
|
45
45
|
startUpHookPluginIdentifiersSelector,
|
|
46
46
|
} from "./navigator/selectors";
|
|
47
47
|
|
|
48
|
-
import { coreAppLogger } from "../logger";
|
|
49
48
|
import {
|
|
50
49
|
getPlatform,
|
|
51
50
|
isTV,
|
|
@@ -89,8 +88,9 @@ import {
|
|
|
89
88
|
useLayoutVersion,
|
|
90
89
|
useRivers,
|
|
91
90
|
} from "@applicaster/zapp-react-native-utils/reactHooks";
|
|
91
|
+
import { subsystemLogger } from "@applicaster/zapp-react-native-utils/logger";
|
|
92
92
|
|
|
93
|
-
const logger =
|
|
93
|
+
const logger = subsystemLogger("ui/navigation", "Navigator");
|
|
94
94
|
|
|
95
95
|
type Props = {
|
|
96
96
|
children?: React.ReactChild;
|
|
@@ -7,16 +7,16 @@ import {
|
|
|
7
7
|
} from "@applicaster/zapp-react-native-utils/navigationUtils";
|
|
8
8
|
import { findPluginByType } from "@applicaster/zapp-react-native-utils/pluginUtils";
|
|
9
9
|
|
|
10
|
-
import { coreAppLogger } from "../logger";
|
|
11
10
|
import { isString } from "@applicaster/zapp-react-native-utils/stringUtils";
|
|
12
11
|
import { SCREEN_TYPES } from "@applicaster/zapp-react-native-utils/navigationUtils/itemTypes";
|
|
13
12
|
import { isNilOrEmpty } from "@applicaster/zapp-react-native-utils/reactUtils/helpers";
|
|
13
|
+
import { subsystemLogger } from "@applicaster/zapp-react-native-utils/logger";
|
|
14
14
|
|
|
15
15
|
const EXTERNAL_URL_TYPE = "external_url";
|
|
16
16
|
const EXTERNAL_URL_FLAG = "open_external_url";
|
|
17
17
|
const WEBVIEW_SCREEN_IDENTIFIER = "webview_screen_qb";
|
|
18
18
|
|
|
19
|
-
const logger =
|
|
19
|
+
const logger = subsystemLogger("ui/navigation", "Navigator");
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Drops a leading `/hooks/<screen_id>` segment from a path.
|
|
@@ -12,11 +12,12 @@ import {
|
|
|
12
12
|
unsubscribeToDeviceNetworkChanges,
|
|
13
13
|
} from "./utils";
|
|
14
14
|
import { usePrevious } from "@applicaster/zapp-react-native-utils/reactHooks/utils";
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
import { useResumeVerifiedNetInfo } from "./useResumeVerifiedNetInfo";
|
|
17
17
|
import { describeNetInfo } from "./resumeVerification";
|
|
18
|
+
import { subsystemLogger } from "@applicaster/zapp-react-native-utils/logger";
|
|
18
19
|
|
|
19
|
-
const logger =
|
|
20
|
+
const logger = subsystemLogger("network/reachability", "NetworkStatusProvider");
|
|
20
21
|
|
|
21
22
|
// Use default netInfo config for all platforms (important for web platform which otherwise
|
|
22
23
|
// will use backend root which is not responding for HEAD request)
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { AppState, AppStateStatus } from "react-native";
|
|
2
2
|
import { NetInfoState } from "@react-native-community/netinfo";
|
|
3
3
|
|
|
4
|
-
import { coreAppLogger } from "../logger";
|
|
5
4
|
import { isOnline } from "./utils";
|
|
6
5
|
import {
|
|
7
6
|
RESUME_VERIFICATION_DELAY_MS,
|
|
@@ -10,8 +9,9 @@ import {
|
|
|
10
9
|
isBackgroundAppState,
|
|
11
10
|
isResumeVerificationEnabled,
|
|
12
11
|
} from "./resumeVerification";
|
|
12
|
+
import { subsystemLogger } from "@applicaster/zapp-react-native-utils/logger";
|
|
13
13
|
|
|
14
|
-
const logger =
|
|
14
|
+
const logger = subsystemLogger("network/reachability", "NetworkStatusProvider");
|
|
15
15
|
|
|
16
16
|
export type ConnectionInfo = NetInfoState & { deviceStatus?: NetStatus };
|
|
17
17
|
|
|
@@ -16,18 +16,33 @@ const mockLogger = {
|
|
|
16
16
|
error: jest.fn(),
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
//
|
|
20
|
-
jest.mock("
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
// subsystemLogger runs at module load, before mockLogger is initialised: delegate lazily
|
|
20
|
+
jest.mock("@applicaster/zapp-react-native-utils/logger", () => {
|
|
21
|
+
const actual = jest.requireActual(
|
|
22
|
+
"@applicaster/zapp-react-native-utils/logger"
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
...actual,
|
|
27
|
+
// Only the logger of this subsystem is replaced; every other module keeps its real one.
|
|
28
|
+
subsystemLogger: (subsystem: string) => {
|
|
29
|
+
if (subsystem !== "network/reachability") {
|
|
30
|
+
return actual.subsystemLogger(subsystem);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const logger = {
|
|
34
|
+
warning: (event) => mockLogger.warning(event),
|
|
35
|
+
debug: (event) => mockLogger.debug(event),
|
|
36
|
+
info: (event) => mockLogger.info(event),
|
|
37
|
+
log: (event) => mockLogger.log(event),
|
|
38
|
+
error: (event) => mockLogger.error(event),
|
|
39
|
+
addSubsystem: () => logger,
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
return logger;
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
});
|
|
31
46
|
|
|
32
47
|
jest.mock("react-native/Libraries/AppState/AppState", () => {
|
|
33
48
|
const { EventEmitter } = require("events");
|
|
@@ -12,18 +12,33 @@ const mockLogger = {
|
|
|
12
12
|
error: jest.fn(),
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
//
|
|
16
|
-
jest.mock("
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
// subsystemLogger runs at module load, before mockLogger is initialised: delegate lazily
|
|
16
|
+
jest.mock("@applicaster/zapp-react-native-utils/logger", () => {
|
|
17
|
+
const actual = jest.requireActual(
|
|
18
|
+
"@applicaster/zapp-react-native-utils/logger"
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
...actual,
|
|
23
|
+
// Only the logger of this subsystem is replaced; every other module keeps its real one.
|
|
24
|
+
subsystemLogger: (subsystem: string) => {
|
|
25
|
+
if (subsystem !== "network/reachability") {
|
|
26
|
+
return actual.subsystemLogger(subsystem);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const logger = {
|
|
30
|
+
warning: (event) => mockLogger.warning(event),
|
|
31
|
+
debug: (event) => mockLogger.debug(event),
|
|
32
|
+
info: (event) => mockLogger.info(event),
|
|
33
|
+
log: (event) => mockLogger.log(event),
|
|
34
|
+
error: (event) => mockLogger.error(event),
|
|
35
|
+
addSubsystem: () => logger,
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
return logger;
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
});
|
|
27
42
|
|
|
28
43
|
jest.mock("react-native/Libraries/AppState/AppState", () => {
|
|
29
44
|
const { EventEmitter } = require("events");
|
|
@@ -14,18 +14,33 @@ const mockLogger = {
|
|
|
14
14
|
error: jest.fn(),
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
//
|
|
18
|
-
jest.mock("
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
// subsystemLogger runs at module load, before mockLogger is initialised: delegate lazily
|
|
18
|
+
jest.mock("@applicaster/zapp-react-native-utils/logger", () => {
|
|
19
|
+
const actual = jest.requireActual(
|
|
20
|
+
"@applicaster/zapp-react-native-utils/logger"
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
return {
|
|
24
|
+
...actual,
|
|
25
|
+
// Only the logger of this subsystem is replaced; every other module keeps its real one.
|
|
26
|
+
subsystemLogger: (subsystem: string) => {
|
|
27
|
+
if (subsystem !== "network/reachability") {
|
|
28
|
+
return actual.subsystemLogger(subsystem);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const logger = {
|
|
32
|
+
warning: (event) => mockLogger.warning(event),
|
|
33
|
+
debug: (event) => mockLogger.debug(event),
|
|
34
|
+
info: (event) => mockLogger.info(event),
|
|
35
|
+
log: (event) => mockLogger.log(event),
|
|
36
|
+
error: (event) => mockLogger.error(event),
|
|
37
|
+
addSubsystem: () => logger,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return logger;
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
});
|
|
29
44
|
|
|
30
45
|
jest.mock("react-native/Libraries/AppState/AppState", () => {
|
|
31
46
|
const { EventEmitter } = require("events");
|
|
@@ -12,13 +12,13 @@ import { isAndroidPlatform } from "@applicaster/zapp-react-native-utils/reactUti
|
|
|
12
12
|
import { networkStatusReady } from "../NetworkStatusProvider/networkStatusReady";
|
|
13
13
|
import { updateSessionNumber } from "../SessionCounter/sessionCounter";
|
|
14
14
|
|
|
15
|
-
import { coreAppLogger } from "../logger";
|
|
16
15
|
import { sessionStorage } from "@applicaster/zapp-react-native-bridge/ZappStorage/SessionStorage";
|
|
17
16
|
import { isEmptyOrNil } from "@applicaster/zapp-react-native-utils/cellUtils";
|
|
18
17
|
import { requiredSessionKeys } from "../../const";
|
|
19
18
|
import { initializeActionSetters, useActionSetters } from "../ActionSetters";
|
|
19
|
+
import { subsystemLogger } from "@applicaster/zapp-react-native-utils/logger";
|
|
20
20
|
|
|
21
|
-
const logger =
|
|
21
|
+
const logger = subsystemLogger("app/lifecycle", "AppLifeCycleManager");
|
|
22
22
|
|
|
23
23
|
const isAndroid = isAndroidPlatform();
|
|
24
24
|
|
|
@@ -2,11 +2,11 @@ import * as React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { getRemoteContextData } from "../remoteContextReloader/getRemoteContextData";
|
|
4
4
|
|
|
5
|
-
import { coreAppLogger } from "../logger";
|
|
6
5
|
import { UnknownAction, Dispatch } from "@reduxjs/toolkit";
|
|
7
6
|
import { isAndroidPlatform } from "@applicaster/zapp-react-native-utils/reactUtils";
|
|
7
|
+
import { subsystemLogger } from "@applicaster/zapp-react-native-utils/logger";
|
|
8
8
|
|
|
9
|
-
const logger =
|
|
9
|
+
const logger = subsystemLogger("app/loading", "AppRemoteDataLoader");
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* adds a call to the QuickBrickManager to tell the app is ready, reloads remote
|
|
@@ -5,8 +5,8 @@ import { createLogger } from "@applicaster/zapp-react-native-utils/logger";
|
|
|
5
5
|
import { coreAppLogger } from "../logger";
|
|
6
6
|
|
|
7
7
|
const logger = createLogger({
|
|
8
|
-
category: "
|
|
9
|
-
subsystem: "
|
|
8
|
+
category: "RemoteDataLoader",
|
|
9
|
+
subsystem: "app/loading",
|
|
10
10
|
parent: coreAppLogger,
|
|
11
11
|
});
|
|
12
12
|
|
package/App/logger.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { subsystemLogger } from "@applicaster/zapp-react-native-utils/logger";
|
|
2
2
|
|
|
3
|
-
export const coreAppLogger =
|
|
3
|
+
export const coreAppLogger = subsystemLogger("app");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/quick-brick-core",
|
|
3
|
-
"version": "16.0.0-rc.
|
|
3
|
+
"version": "16.0.0-rc.127",
|
|
4
4
|
"description": "Core package for Applicaster's Quick Brick App",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@applicaster/applicaster-types": "16.0.0-rc.
|
|
32
|
-
"@applicaster/quick-brick-core-plugins": "16.0.0-rc.
|
|
33
|
-
"@applicaster/zapp-pipes-v2-client": "16.0.0-rc.
|
|
34
|
-
"@applicaster/zapp-react-native-bridge": "16.0.0-rc.
|
|
35
|
-
"@applicaster/zapp-react-native-redux": "16.0.0-rc.
|
|
36
|
-
"@applicaster/zapp-react-native-ui-components": "16.0.0-rc.
|
|
37
|
-
"@applicaster/zapp-react-native-utils": "16.0.0-rc.
|
|
31
|
+
"@applicaster/applicaster-types": "16.0.0-rc.127",
|
|
32
|
+
"@applicaster/quick-brick-core-plugins": "16.0.0-rc.127",
|
|
33
|
+
"@applicaster/zapp-pipes-v2-client": "16.0.0-rc.127",
|
|
34
|
+
"@applicaster/zapp-react-native-bridge": "16.0.0-rc.127",
|
|
35
|
+
"@applicaster/zapp-react-native-redux": "16.0.0-rc.127",
|
|
36
|
+
"@applicaster/zapp-react-native-ui-components": "16.0.0-rc.127",
|
|
37
|
+
"@applicaster/zapp-react-native-utils": "16.0.0-rc.127",
|
|
38
38
|
"atob": "^2.1.2",
|
|
39
39
|
"axios": "^0.28.0",
|
|
40
40
|
"btoa": "^1.2.1",
|