Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev to Main Merge 10/21 #234

Merged
merged 29 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
543a29d
webpack change for new handler addition
Nandana-NNR Sep 12, 2024
853414c
integrated player changes
Nandana-NNR Sep 18, 2024
fc87f2d
entos changes
Nandana-NNR Sep 24, 2024
fca816f
lint fix
Nandana-NNR Sep 24, 2024
83ac9fa
Added new env for available SDK's
Eswar2103 Sep 24, 2024
9b6f27a
Merge branch 'entos-service' into extension-sdk-sanity-certification
Eswar2103 Sep 24, 2024
54ed6f1
Import correction
Eswar2103 Sep 30, 2024
e4cc515
Unit test case correction
Eswar2103 Sep 30, 2024
ea3890b
censor data function correction for non mono-repo versions
Eswar2103 Oct 1, 2024
cd4da0b
Merge branch 'entos-service' into extension-sdk-sanity-certification
Eswar2103 Oct 3, 2024
d3d3840
Change AdditionalExampleInvoker import to FireboltExtensionInvoker
Eswar2103 Oct 3, 2024
b93bf88
sdk-release-1.4.1 (#228)
anjalimukundan Oct 7, 2024
2acd2f4
update constant
Nandana-NNR Oct 8, 2024
5526258
revert update
Nandana-NNR Oct 8, 2024
417d131
Merge branch 'dev' into integratedPlayerChanges
Nandana-NNR Oct 8, 2024
e2e502c
merge dev
Nandana-NNR Oct 8, 2024
5391a94
Merge branch 'dev' into entos-service
Nandana-NNR Oct 10, 2024
7e58d12
merge dev
Nandana-NNR Oct 10, 2024
49408f1
Merge branch 'entos-service' of github.com:rdkcentral/firebolt-certif…
Nandana-NNR Oct 10, 2024
4d90372
Merge pull request #225 from rdkcentral/entos-service
anjalimukundan Oct 10, 2024
f28148a
Merge branch 'dev' into extension-sdk-sanity-certification
Eswar2103 Oct 10, 2024
98fab11
Merge pull request #226 from rdkcentral/extension-sdk-sanity-certific…
anjalimukundan Oct 10, 2024
1c8e548
Merge branch 'dev' into integratedPlayerChanges
Nandana-NNR Oct 11, 2024
a270082
merge dev
Nandana-NNR Oct 11, 2024
4bbbc5d
revert dummy commit
Nandana-NNR Oct 11, 2024
55fd1fe
Merge pull request #224 from rdkcentral/integratedPlayerChanges
anjalimukundan Oct 14, 2024
d55fd82
update winston
jmeier204 Oct 17, 2024
398d806
Update package
jmeier204 Oct 17, 2024
37f6b12
Merge pull request #233 from rdkcentral/winston_test
jmeier204 Oct 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,4 @@ To activate Mock Firebolt, there are specific start-up scripts that exist inside

For pinChallenge and acknowledgeChallenge UI prompts , a timeout of 15s is added so that, if no action is taken when the prompts displays on the screen (i.e; neither yes/no/back button ), the prompts will be automatically dismissed with "null" value as the response.
The prompt is displayed when the user needs to grant/deny a particular api, or the user has to enter a pin in-case of pinChallenge.
If user wants to grant an api, yes button is pressed, for deniel - no button, and incase if the user wants to dismiss the prompt without any action, back button is pressed.


If user wants to grant an api, yes button is pressed, for deniel - no button, and incase if the user wants to dismiss the prompt without any action, back button is pressed.
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"version": "1.3.0",
"version": "1.4.1",
"name": "firebolt-certification",
"description": "Reference App to demonstrate Firebolt APIs and Lifecycle",
"dependencies": {
"@apidevtools/json-schema-ref-parser": "^9.0.9",
"@firebolt-js/discovery-sdk": "1.3.0",
"@firebolt-js/manage-sdk": "1.3.0",
"@firebolt-js/sdk": "1.3.0",
"@firebolt-js/discovery-sdk": "1.4.1",
"@firebolt-js/manage-sdk": "1.4.1",
"@firebolt-js/sdk": "1.4.1",
"@lightningjs/core": "2.11.0",
"@lightningjs/sdk": "^5.0.1",
"@lightningjs/ui-components": "^2.2.2",
Expand All @@ -20,7 +20,8 @@
"perf_hooks": "^0.0.1",
"rxjs": "7.2.0",
"uuid": "^9.0.0",
"winston": "3.13.1",
"winston": "3.15.0",
"winston-transport": "4.7.1",
"xml2js": "^0.5.0"
},
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export default class App extends Base {
process.env.STANDALONE_PREFIX = standalonePrefix;
process.env.ID = 0;
process.env.REGISTERPROVIDER = true;
process.env.SDKS_AVAILABLE = [...CONSTANTS.defaultSDKs, ...CONSTANTS.additionalSDKs];

// Set the pubSub URL if present
process.env.PUB_SUB_URL = new URLSearchParams(window.location.search).get('pubSubUrl');
Expand Down
7 changes: 7 additions & 0 deletions src/FireboltExampleInvoker.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ export const MODULE_MAP = {
discovery: DISCOVERY_MODULE_MAP,
};

// importing additional invoker which has external sdk's being exported and adding those modules in the MODULE_MAP
try {
const additionalInvoker = require('../plugins/FireboltExtensionInvoker').default;
Object.assign(MODULE_MAP, additionalInvoker);
} catch (err) {
logger.error(`Unable to import additional invoker - ${err.message}`, 'MODULE_MAP');
}
let instance = null;

export default class FireboltExampleInvoker {
Expand Down
2 changes: 1 addition & 1 deletion src/IntentReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import GetPubSubStatusHandler from './pubsub/handlers/GetPubSubStatusHandler';
import CallMethodHandler from './pubsub/handlers/CallMethodHandler';
import DataFetchHandler from './pubsub/handlers/DataFetchHandler';
import HealthCheckHandler from './pubsub/handlers/HealthCheckHandler';
import RunTestHandler from './pubsub/handlers/RunTestHandler';
import RegisterEventHandler from './pubsub/handlers/RegisterEventHandler';
import ClearEventListeners from './pubsub/handlers/ClearEventListeners';
import ClearEventHandler from './pubsub/handlers/clearEventHandler';
Expand All @@ -45,6 +44,7 @@ import GetEventResponse from './pubsub/handlers/GetEventResponse';
import GetMethodResponseHandler from './pubsub/handlers/GetMethodResponseHandler';
import VisibilityStateHandler from '../src/pubsub/handlers/VisibilityStateHandler';
import LifecycleMethodHandler from './pubsub/handlers/LifecycleMethodHandler';
import RunTestHandler from 'RunTestHandler';

const logger = require('./utils/Logger')('IntentReader.js');

Expand Down
4 changes: 3 additions & 1 deletion src/ValidationView.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ export default class ValidationView extends lng.Component {
// Combine defaultSDKs and additionalSDKs into one array
const allSDKs = [...CONSTANTS.defaultSDKs, ...CONSTANTS.additionalSDKs];
// Find the SDK configuration for the specified sdk mode
const sdkConfig = allSDKs.find((sdk) => sdkMode.includes(sdk.name.toUpperCase()));
const sdkConfigs = allSDKs.filter((sdk) => sdkMode.toUpperCase().includes(sdk.name.toUpperCase()));
const exactMatch = sdkConfigs.find((sdk) => sdkMode.toUpperCase() === sdk.name.toUpperCase());
const sdkConfig = exactMatch || (sdkConfigs.length === 1 && sdkConfigs[0]) || sdkConfigs;
// If SDK config found and validation method exists
if (sdkConfig && sdkConfig.validation) {
if (!sdkConfig.validation()) {
Expand Down
12 changes: 12 additions & 0 deletions src/pubsub/handlers/setApiResponseHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export default class SetApiResponseHandler extends BaseHandler {
return this.setResponseAckChallenge(message);
case 'userinterest':
return this.setResponseUserInterestChallenge(message);
case 'external':
return this.setExternalResponse(message);
default:
const defaultIdString = JSON.stringify({
report: 'Selected module provider is not available',
Expand Down Expand Up @@ -102,4 +104,14 @@ export default class SetApiResponseHandler extends BaseHandler {
const reportIdString = JSON.stringify({ report: 'Received UserInterest apiResponse parameters' });
return reportIdString;
}

// importing external Api resonse function, which can set the pre-requisite values to external modules
setExternalResponse(message) {
try {
const externalFunction = require('../../../plugins/setExternalApiResponse');
return externalFunction.setExternalApiResponse(message);
} catch (err) {
return JSON.stringify({ report: 'Unable to import and set the data for external module' });
}
}
}
1 change: 1 addition & 0 deletions src/utils/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ async function getschemaValidationDone(name, response, sdkType) {
function censorData(methodName, response) {
try {
const json = censorDataJson;
methodName = methodName.charAt(0).toUpperCase() + methodName.slice(1);
if (methodName in json) {
for (let i = 0; i < json[methodName].field.length; i++) {
if (response[json[methodName].field[i]]) {
Expand Down
1 change: 1 addition & 0 deletions test/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ module.exports = {
'^EventInvocation$': '<rootDir>/../src//EventInvocation.js',
'^IntentReader$': '../src/IntentReader.js',
'^CensorData$': '<rootDir>/../src/source/censorData.json',
'^RunTestHandler$': '<rootDir>/../src/pubsub/handlers/RunTestHandler.js',
},
collectCoverage: true,
coverageThreshold: {
Expand Down
4 changes: 4 additions & 0 deletions webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ module.exports = {
name: 'CensorData',
alias: ['/plugins/censorData.json', '/src/source/censorData.json'],
},
{
name: 'RunTestHandler',
alias: ['/plugins/runTestHandler.js', '/src/pubsub/handlers/RunTestHandler.js'],
},
],
'resolve'
),
Expand Down
4 changes: 4 additions & 0 deletions webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ module.exports = {
name: 'CensorData',
alias: ['/plugins/censorData.json', '/src/source/censorData.json'],
},
{
name: 'RunTestHandler',
alias: ['/plugins/runTestHandler.js', '/src/pubsub/handlers/RunTestHandler.js'],
},
],
'resolve'
),
Expand Down
Loading