Skip to content

Commit

Permalink
renamed package to "-np"
Browse files Browse the repository at this point in the history
  • Loading branch information
peterBrxwn committed Jul 23, 2024
1 parent 82d4dd3 commit e33f5a5
Show file tree
Hide file tree
Showing 16 changed files with 38 additions and 23 deletions.
27 changes: 21 additions & 6 deletions Countly.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ interface ResultObject {
}
interface ErrorObject { error: string | null }

declare module "countly-sdk-react-native-bridge" {
import type CountlyConfig from "countly-sdk-react-native-bridge/CountlyConfig";
declare module "countly-sdk-react-native-bridge-np" {
import type CountlyConfig from "countly-sdk-react-native-bridge-np/CountlyConfig";

namespace Countly {
string;
Expand Down Expand Up @@ -244,7 +244,7 @@ declare module "countly-sdk-react-native-bridge" {
export function disablePushNotifications(): string | void;

/**
* @deprecated in 23.02.0 : use 'countlyConfig.pushTokenType' instead of 'pushTokenType'.
* @deprecated in 23.02.0 : use 'countlyConfig.pushTokenType' instead of 'pushTokenType'. FOR PUSH VERSION ONLY
*
* @param {string} tokenType - Token type
* @param {string} channelName - Channel name
Expand All @@ -257,6 +257,7 @@ declare module "countly-sdk-react-native-bridge" {
export function pushTokenType(tokenType: string, channelName: string, channelDescription: string): Promise<string> | string;

/**
* @deprecated FOR PUSH VERSION ONLY
*
* Send push token
* @param {object} options - object containing the push token
Expand All @@ -267,6 +268,8 @@ declare module "countly-sdk-react-native-bridge" {
export function sendPushToken(options: { readonly token?: string }): void;

/**
* @deprecated FOR PUSH VERSION ONLY
*
* This method will ask for permission, enables push notification and send push token to countly server.
*
* @param {string} customSoundPath - name of custom sound for push notifications (Only for Android)
Expand All @@ -278,6 +281,7 @@ declare module "countly-sdk-react-native-bridge" {
export function askForNotificationPermission(customSoundPath?: string): string | void;

/**
* @deprecated FOR PUSH VERSION ONLY
*
* Set callback to receive push notifications
* @param {callback listener } theListener
Expand All @@ -286,7 +290,7 @@ declare module "countly-sdk-react-native-bridge" {
export function registerForNotification(theListener: (theNotification: string) => void): any; // The return type should be adjusted to the actual event subscription type

/**
* @deprecated in 23.02.0 : use 'countlyConfig.configureIntentRedirectionCheck' instead of 'configureIntentRedirectionCheck'.
* @deprecated in 23.02.0 : use 'countlyConfig.configureIntentRedirectionCheck' instead of 'configureIntentRedirectionCheck'. FOR PUSH VERSION ONLY
*
* Configure intent redirection checks for push notification
* Should be called before Countly "askForNotificationPermission"
Expand Down Expand Up @@ -1096,7 +1100,7 @@ declare module "countly-sdk-react-native-bridge" {
export default Countly;
}

declare module "countly-sdk-react-native-bridge/CountlyConfig" {
declare module "countly-sdk-react-native-bridge-np/CountlyConfig" {
/**
*
* This class holds APM specific configurations to be used with
Expand Down Expand Up @@ -1227,14 +1231,17 @@ declare module "countly-sdk-react-native-bridge/CountlyConfig" {
enableApm(): CountlyConfig;

/**
* @deprecated FOR PUSH VERSION ONLY
*
* AdditionalIntentRedirectionChecks are enabled by default.
* This method should be used to disable them.
*/
disableAdditionalIntentRedirectionChecks(): CountlyConfig;

/**
* Method to set the push token type
* @deprecated
* @deprecated FOR PUSH VERSION ONLY
*
* Use setPushTokenType() instead to set pushToken
* Use setPushNotificationChannelInformation() instead to set channel information
*
Expand All @@ -1245,6 +1252,8 @@ declare module "countly-sdk-react-native-bridge/CountlyConfig" {
pushTokenType(tokenType: TokenType, channelName: string, channelDescription: string): CountlyConfig;

/**
* @deprecated FOR PUSH VERSION ONLY
*
* Method to set the push token type
* NB: ONLY FOR iOS
*
Expand All @@ -1254,6 +1263,8 @@ declare module "countly-sdk-react-native-bridge/CountlyConfig" {
setPushTokenType(tokenType: messagingMode): CountlyConfig;

/**
* @deprecated FOR PUSH VERSION ONLY
*
* Method to set the push channel name and description
* NB: ONLY FOR ANDROID
*
Expand All @@ -1263,6 +1274,8 @@ declare module "countly-sdk-react-native-bridge/CountlyConfig" {
setPushNotificationChannelInformation(name: string, description: string): CountlyConfig;

/**
* @deprecated FOR PUSH VERSION ONLY
*
* Method to set the push notification accent color
* NB: ONLY FOR ANDROID
*
Expand All @@ -1272,6 +1285,8 @@ declare module "countly-sdk-react-native-bridge/CountlyConfig" {
setPushNotificationAccentColor(accentColor: string): CountlyConfig;

/**
* @deprecated FOR PUSH VERSION ONLY
*
* Method to configure intent redirection check
*
* @param {string[]} allowedIntentClassNames allowed intent class names
Expand Down
2 changes: 1 addition & 1 deletion Countly.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ Countly.pushTokenType = function (tokenType, channelName, channelDescription) {
*/
Countly.sendPushToken = function (options) {
if (BUILDING_WITH_PUSH_DISABLED) {
L.w(`pushTokenType, ${_pushDisabledMsg}`);
L.w(`sendPushToken, ${_pushDisabledMsg}`);
return;
}
L.d(`sendPushToken, Sending push token: [${JSON.stringify(options)}]`);
Expand Down
2 changes: 1 addition & 1 deletion example/CountlyRNExample/APM.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { ScrollView } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import Countly from "countly-sdk-react-native-bridge";
import Countly from "countly-sdk-react-native-bridge-np";
import CountlyButton from "./CountlyButton";

const successCodes = [100, 101, 200, 201, 202, 205, 300, 301, 303, 305];
Expand Down
2 changes: 1 addition & 1 deletion example/CountlyRNExample/Configuration.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import CountlyConfig from "countly-sdk-react-native-bridge/CountlyConfig";
import CountlyConfig from "countly-sdk-react-native-bridge-np/CountlyConfig";

const COUNTLY_SERVER_KEY = "https://your.server.ly";
const COUNTLY_APP_KEY = "YOUR_APP_KEY";
Expand Down
2 changes: 1 addition & 1 deletion example/CountlyRNExample/Consent.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { ScrollView } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import Countly from "countly-sdk-react-native-bridge";
import Countly from "countly-sdk-react-native-bridge-np";
import CountlyButton from "./CountlyButton";

const giveConsent = (name: string) => {
Expand Down
2 changes: 1 addition & 1 deletion example/CountlyRNExample/Crashes.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { ScrollView } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import Countly from "countly-sdk-react-native-bridge";
import Countly from "countly-sdk-react-native-bridge-np";
import CountlyButton from "./CountlyButton";

const addCrashLog = () => {
Expand Down
2 changes: 1 addition & 1 deletion example/CountlyRNExample/DeviceID.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { ScrollView } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import Countly from "countly-sdk-react-native-bridge";
import Countly from "countly-sdk-react-native-bridge-np";
import CountlyButton from "./CountlyButton";
import { lightOrange } from "./Constants";

Expand Down
2 changes: 1 addition & 1 deletion example/CountlyRNExample/Events.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { ScrollView } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import Countly from "countly-sdk-react-native-bridge";
import Countly from "countly-sdk-react-native-bridge-np";
import CountlyButton from "./CountlyButton";

const basicEvent = () => {
Expand Down
2 changes: 1 addition & 1 deletion example/CountlyRNExample/EventsLegacy.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { ScrollView } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import Countly from "countly-sdk-react-native-bridge";
import Countly from "countly-sdk-react-native-bridge-np";
import CountlyButton from "./CountlyButton";

interface Segmentation {}
Expand Down
2 changes: 1 addition & 1 deletion example/CountlyRNExample/Feedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React from "react";
import { ScrollView, StyleSheet, Text, TextInput } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import Countly from "countly-sdk-react-native-bridge";
import Countly from "countly-sdk-react-native-bridge-np";
import CountlyButton from "./CountlyButton";
import { lightOrange } from "./Constants";

Expand Down
2 changes: 1 addition & 1 deletion example/CountlyRNExample/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React from "react";
import { Text, SafeAreaView, ScrollView, Alert } from "react-native";
import CountlyButton from "./CountlyButton";
import Countly from "countly-sdk-react-native-bridge";
import Countly from "countly-sdk-react-native-bridge-np";
import countlyConfig from "./Configuration";
import { lightGreen, navigationName } from "./Constants";

Expand Down
2 changes: 1 addition & 1 deletion example/CountlyRNExample/Others.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { Platform, ScrollView } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import Countly from "countly-sdk-react-native-bridge";
import Countly from "countly-sdk-react-native-bridge-np";
import CountlyButton from "./CountlyButton";

class AttributionKey {
Expand Down
2 changes: 1 addition & 1 deletion example/CountlyRNExample/RemoteConfig.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { ScrollView } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import Countly from "countly-sdk-react-native-bridge";
import Countly from "countly-sdk-react-native-bridge-np";
import CountlyButton from "./CountlyButton";

const remoteConfigUpdate = () => {
Expand Down
2 changes: 1 addition & 1 deletion example/CountlyRNExample/UserProfiles.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { ScrollView } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import Countly from "countly-sdk-react-native-bridge";
import Countly from "countly-sdk-react-native-bridge-np";
import CountlyButton from "./CountlyButton";

interface UserDataPredefined {
Expand Down
2 changes: 1 addition & 1 deletion example/CountlyRNExample/Views.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { ScrollView } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import Countly from "countly-sdk-react-native-bridge";
import Countly from "countly-sdk-react-native-bridge-np";
import CountlyButton from "./CountlyButton";

function ViewsScreen({ navigation }) {
Expand Down
6 changes: 3 additions & 3 deletions example/create_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# It is meant to be run from the example folder
# It will remove any existing AwesomeProject folder, and create a new one
# It will then copy the contents of CountlyRNExample to AwesomeProject
# It will then add countly-sdk-react-native-bridge to dependencies in package.json
# It will then add countly-sdk-react-native-bridge-np to dependencies in package.json
# If on iOS, it will run pod install

def setup_react_native_app():
Expand All @@ -26,7 +26,7 @@ def setup_react_native_app():
# Copy contents of CountlyRNExample to AwesomeProject
shutil.copytree("CountlyRNExample", "AwesomeProject", dirs_exist_ok=True)

print("Adding countly-sdk-react-native-bridge to dependencies...")
print("Adding countly-sdk-react-native-bridge-np to dependencies...")

# Add countly-sdk-react-native-bridge to dependencies in package.json
os.chdir("AwesomeProject")
Expand All @@ -36,7 +36,7 @@ def setup_react_native_app():
if platform.system() == "Darwin":
print("Running pod install")
os.chdir("ios")
os.system("pod install")
os.system("pod install --no-repo-update --verbose")
os.chdir("..")

if __name__ == "__main__":
Expand Down

0 comments on commit e33f5a5

Please sign in to comment.