Skip to content

Commit

Permalink
Console warnings edited + repository links updated
Browse files Browse the repository at this point in the history
  • Loading branch information
RNEvok committed Apr 23, 2023
1 parent 1163bac commit ef5a2f2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
1 change: 1 addition & 0 deletions config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ type DevMode = "PRODUCTION" | "DEVELOPMENT";
const DEV_MODE: DevMode = "PRODUCTION";

const CONFIG_INNER = {
PRODUCT_NAME: "CodeBud",
DOMAIN: "unitap.online",
MAIN_URL: "https://unitap.online",
BASE_URL: 'https://unitap.online/api',
Expand Down
7 changes: 4 additions & 3 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { MODULE_STATES } from './States';
import { EXISTING_SPECIAL_INSTRUCTION_IDS } from './constants/events';
import { validateApiKey } from './constants/regex';
import { AppKlaarSdk as ModuleInterface } from './moduleInterface';
import { CONFIG } from './config';

export type { Instruction } from './types';

Expand All @@ -15,7 +16,7 @@ export const CodeBud: ModuleInterface = {

init(apiKey, instructions, config) {
if (this._currentState === "WORKING") {
console.warn("Sdk already initiated!");
console.warn(`${CONFIG.PRODUCT_NAME} already initiated!`);
return;
}

Expand Down Expand Up @@ -97,13 +98,13 @@ export const CodeBud: ModuleInterface = {
if (this._connector)
this._connector.refreshRemoteSettings(callbackFn);
else
console.warn("Sdk not initiated.");
console.warn(`${CONFIG.PRODUCT_NAME} not initiated.`);
},

createReduxStoreChangeHandler(store, selectFn, batchingTimeMs = 500) {
try {
if (!this._connector)
throw new Error('Something went wrong while creating ReduxStoreChangeHandler. Double check that you initialized sdk');
throw new Error(`Something went wrong while creating ReduxStoreChangeHandler. Double check that you initialized ${CONFIG.PRODUCT_NAME}`);

return this._connector.createReduxStoreChangeHandler(store, selectFn, batchingTimeMs);
} catch (e) {
Expand Down
11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@appklaar/codebud",
"version": "1.0.0",
"private": false,
"description": "App Klaar package for remote app testing & debugging",
"description": "CodeBud - AppKlaar's package for remote app testing & debugging",
"main": "index.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down Expand Up @@ -37,9 +37,6 @@
"@types/react": "^18.0.28",
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.55.0",
"react-native": "^0.71.4",
"tweetnacl": "^1.0.3",
"tweetnacl-util": "^0.15.1",
"typescript": "^4.9.5"
},
"peerDependencies": {
Expand Down Expand Up @@ -68,11 +65,11 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/Appklaar/AppKlaarSDK.git"
"url": "git+https://github.com/Appklaar/CodeBud.git"
},
"license": "ISC",
"bugs": {
"url": "https://github.com/Appklaar/AppKlaarSDK/issues"
"url": "https://github.com/Appklaar/CodeBud/issues"
},
"homepage": "https://github.com/Appklaar/AppKlaarSDK#readme"
"homepage": "https://github.com/Appklaar/CodeBud#readme"
}

0 comments on commit ef5a2f2

Please sign in to comment.