@24i/bigscreen-sdk 1.0.37-alpha.2650 → 1.0.38

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.
@@ -0,0 +1,6 @@
1
+ {
2
+ "cSpell.words": [
3
+ "MEDIAPAYLOAD",
4
+ "Tealium"
5
+ ]
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@24i/bigscreen-sdk",
3
- "version": "1.0.37-alpha.2650",
3
+ "version": "1.0.38",
4
4
  "description": "SmartApps BIGscreen SDK monorepo",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -41,7 +41,7 @@
41
41
  "@24i/appstage-shared-analytics": "1.0.20-alpha.72",
42
42
  "@24i/appstage-shared-events-manager": "1.0.11",
43
43
  "@24i/appstage-shared-perf-utils": "1.0.11",
44
- "@24i/bigscreen-players-engine-base": "4.0.4",
44
+ "@24i/bigscreen-players-engine-base": "4.0.9",
45
45
  "@24i/smartapps-datalayer": "3.0.15",
46
46
  "@sentry/browser": "7.35.0",
47
47
  "@sentry/types": "7.35.0",
@@ -54,14 +54,14 @@
54
54
  "@24i/bigscreen-sdk": "file:.",
55
55
  "@24i/eslint-config-smartapps-bigscreen-linters": "file:./libs/linters",
56
56
  "@24i/smartapps-bigscreen-changelog-generator": "0.17.0",
57
- "@babel/core": "^7.24.3",
58
- "@babel/preset-env": "^7.24.3",
57
+ "@babel/core": "^7.24.5",
58
+ "@babel/preset-env": "^7.24.5",
59
59
  "@types/fs-extra": "^11.0.4",
60
60
  "@types/gtag.js": "^0.0.19",
61
61
  "@types/inquirer": "^9.0.7",
62
62
  "@types/jest": "^29.5.12",
63
63
  "@types/minimist": "^1.2.5",
64
- "@types/node": "^20.12.2",
64
+ "@types/node": "^20.12.7",
65
65
  "@types/prop-types": "^15.7.12",
66
66
  "@types/react": "18.0.33",
67
67
  "@types/scheduler": "^0.23.0",
@@ -72,19 +72,19 @@
72
72
  "fs-extra": "^11.2.0",
73
73
  "full-icu": "^1.5.0",
74
74
  "identity-obj-proxy": "^3.0.0",
75
- "inquirer": "^9.2.17",
75
+ "inquirer": "^9.2.20",
76
76
  "jest": "^29.7.0",
77
77
  "jest-canvas-mock": "^2.5.2",
78
78
  "jest-environment-jsdom": "^29.7.0",
79
79
  "jest-sonar": "^0.2.15",
80
80
  "minimist": "^1.2.8",
81
81
  "patch-package": "^8.0.0",
82
- "sass": "^1.72.0",
82
+ "sass": "^1.76.0",
83
83
  "sass-true": "^8.0.0",
84
84
  "ts-jest": "^29.1.2",
85
85
  "ts-node": "^10.9.2",
86
86
  "tsconfig-paths-jest": "0.0.1",
87
- "typescript": "^5.4.3"
87
+ "typescript": "^5.4.5"
88
88
  },
89
89
  "exports": {
90
90
  "./adobe-heartbeat": "./packages/adobe-heartbeat/src/index.ts",
@@ -0,0 +1,66 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.main = void 0;
5
+ const path = require("path");
6
+ const fs = require("fs");
7
+ const fse = require("fs-extra");
8
+ const chalk = require("chalk");
9
+ const minimist = require("minimist");
10
+ const questions_1 = require("./questionnaire/questions");
11
+ const Settings_1 = require("./settings/Settings");
12
+ async function isDirectoryEmpty(dirPath) {
13
+ const files = await fs.promises.readdir(dirPath);
14
+ return !files.length;
15
+ }
16
+ async function copyTemplateFiles(templateDir, targetDir) {
17
+ return fse.copy(templateDir, targetDir);
18
+ }
19
+ function updatePackageJsonFile(filePath, options) {
20
+ let data = fs.readFileSync(filePath, 'utf8');
21
+ const keywords = options.keywords.map((word) => `"${word}"`).join(', ');
22
+ data = data.replace(/("name": ")(.*)(")/, `$1${options.name}$3`);
23
+ data = data.replace(/("version": ")(.*)(")/, `$1${options.version}$3`);
24
+ data = data.replace(/("description": ")(.*)(")/, `$1${options.description}$3`);
25
+ data = data.replace(/("keywords": \[)(.*)(\])/, `$1${keywords}$3`);
26
+ data = data.replace(/("author": ")(.*)(")/, `$1${options.author}$3`);
27
+ fs.writeFileSync(filePath, data);
28
+ }
29
+ function parseArguments(rawArgv) {
30
+ const argv = minimist(rawArgv.slice(2));
31
+ const dirName = argv._[0];
32
+ if (!dirName) {
33
+ console.error('Error: Missing package name');
34
+ process.exit(1);
35
+ }
36
+ return {
37
+ dirName,
38
+ };
39
+ }
40
+ async function main() {
41
+ const { dirName: destDirName } = parseArguments(process.argv);
42
+ const destDir = path.join(process.cwd(), 'packages/', destDirName);
43
+ if (fs.existsSync(destDir)) {
44
+ console.error(`Error: Target directory "${destDir}" already exists`);
45
+ process.exit(1);
46
+ }
47
+ fs.mkdirSync(destDir, { recursive: true });
48
+ const isDirEmpty = await isDirectoryEmpty(destDir);
49
+ if (!isDirEmpty) {
50
+ console.error(`Error: Target directory "${destDir}" is not empty.`);
51
+ process.exit(1);
52
+ }
53
+ const settings = Object.assign({}, Settings_1.Settings);
54
+ settings.name = `${Settings_1.Settings.name}${destDirName}`.toLowerCase();
55
+ const details = await (0, questions_1.promptPackageDetails)(settings);
56
+ const templateDir = path.join(__dirname, '..', 'templates/typescript');
57
+ await copyTemplateFiles(templateDir, destDir);
58
+ const packageJsonFile = path.join(destDir, 'package.json');
59
+ updatePackageJsonFile(packageJsonFile, details);
60
+ const docsSymlinkTarget = path.join('../../../packages/', destDirName, '/README.md');
61
+ const docsSymlinkPath = path.join(process.cwd(), 'docs/packages/', destDirName, '/README.md');
62
+ await fse.ensureSymlink(docsSymlinkTarget, docsSymlinkPath);
63
+ console.log(`${chalk.green('Success')}, package has been initialized!`);
64
+ }
65
+ exports.main = main;
66
+ //# sourceMappingURL=createPackage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createPackage.js","sourceRoot":"","sources":["../src/createPackage.ts"],"names":[],"mappings":";;;;AAEA,6BAA6B;AAC7B,yBAAyB;AACzB,gCAAgC;AAChC,+BAA+B;AAC/B,qCAAqC;AACrC,yDAAiE;AACjE,kDAA+C;AAG/C,KAAK,UAAU,gBAAgB,C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BAAsB,CAAC,CAAC;IAEvE,MAAM,iBAAiB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAC9C,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAC3D,qBAAqB,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;IAGhD,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;IACrF,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,gBAAgB,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;IAC9F,MAAM,GAAG,CAAC,aAAa,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;IAE5D,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,iCAAiC,CAAC,CAAC;AAC5E,CAAC;AA/BD,oBA+BC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const createPackage_1 = require("./createPackage");
4
+ (0, createPackage_1.main)();
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,mDAAuC;AAEvC,IAAA,oBAAI,GAAE,CAAC"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.promptPackageDetails = void 0;
4
+ const inquirer = require("inquirer");
5
+ async function promptPackageDetails(defaultValues) {
6
+ return inquirer.prompt([
7
+ {
8
+ type: 'input',
9
+ name: 'name',
10
+ message: 'Package name:',
11
+ default: defaultValues.name,
12
+ }, {
13
+ type: 'input',
14
+ name: 'version',
15
+ message: 'Version:',
16
+ default: defaultValues.version,
17
+ }, {
18
+ type: 'input',
19
+ name: 'description',
20
+ message: 'Description:',
21
+ }, {
22
+ type: 'input',
23
+ name: 'keywords',
24
+ message: 'Keywords:',
25
+ filter: (ans) => ans.split(/[\s,]+/),
26
+ }, {
27
+ type: 'input',
28
+ name: 'author',
29
+ message: 'Author:',
30
+ default: defaultValues.author,
31
+ },
32
+ ]);
33
+ }
34
+ exports.promptPackageDetails = promptPackageDetails;
35
+ //# sourceMappingURL=questions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"questions.js","sourceRoot":"","sources":["../../src/questionnaire/questions.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AAWrC,KAAK,UAAU,oBAAoB,CAAC,aAA4C;IAC5E,OAAO,QAAQ,CAAC,MAAM,CAAC;QACnB;YACI,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,eAAe;YACxB,OAAO,EAAE,aAAa,CAAC,IAAI;SAC9B,EAAE;YACC,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,UAAU;YACnB,OAAO,EAAE,aAAa,CAAC,OAAO;SACjC,EAAE;YACC,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,aAAa;YACnB,OAAO,EAAE,cAAc;SAC1B,EAAE;YACC,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,WAAW;YACpB,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC;SACvC,EAAE;YACC,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,SAAS;YAClB,OAAO,EAAE,aAAa,CAAC,MAAM;SAChC;KACJ,CAAC,CAAC;AACP,CAAC;AAEQ,oDAAoB"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Settings = void 0;
4
+ const Settings = {
5
+ name: '@24i/smartapps-bigscreen-',
6
+ version: '0.0.1',
7
+ author: '24i',
8
+ };
9
+ exports.Settings = Settings;
10
+ //# sourceMappingURL=Settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Settings.js","sourceRoot":"","sources":["../../src/settings/Settings.ts"],"names":[],"mappings":";;;AAAA,MAAM,QAAQ,GAAG;IACb,IAAI,EAAE,2BAA2B;IACjC,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,KAAK;CAChB,CAAC;AAEO,4BAAQ"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
@@ -193,14 +193,14 @@ export class DeviceSmartCast extends DeviceBase {
193
193
  }
194
194
 
195
195
  /**
196
- * Returs the status of Closed Captions feature.
196
+ * Returns the status of Closed Captions feature.
197
197
  */
198
198
  async getClosedCaptionsStatus() {
199
199
  return this.closedCaptionsStatus;
200
200
  }
201
201
 
202
202
  /**
203
- * Returs the status of Text to Speech Engine if it is available by the device.
203
+ * Returns the status of Text to Speech Engine if it is available by the device.
204
204
  */
205
205
  async getTextToSpeechStatus() {
206
206
  return this.textToSpeechStatus;
@@ -215,7 +215,6 @@ export class DeviceSmartCast extends DeviceBase {
215
215
 
216
216
  if (!IFAObject) return null;
217
217
 
218
- const usPrivacy = IFAObject.LMT === 1 ? '1YYN' : '1YNN';
219
218
  this.publicIpAddress = this.publicIpAddress ?? await ipify();
220
219
 
221
220
  return template
@@ -226,8 +225,8 @@ export class DeviceSmartCast extends DeviceBase {
226
225
  .replace('{{ifa}}', IFAObject.IFA)
227
226
  .replace('{{ifa_type}}', IFAObject.IFA_TYPE)
228
227
  .replace('{{ip_address}}', this.publicIpAddress!)
229
- .replace('{{lmt}}', String(IFAObject.LMT))
230
- .replace('{{us_privacy}}', usPrivacy);
228
+ .replace('{{lmt}}', IFAObject.LMT ? '1' : '0')
229
+ .replace('{{us_privacy}}', IFAObject.LMT ? '1YYN' : '1YNN');
231
230
  }
232
231
 
233
232
  async getManufacturerName() {
@@ -31,7 +31,7 @@ export const SmartCastMockApi: ISmartCastApi = {
31
31
  setAdvertiserIDListener: (callback: (advertiserID: IFA) => void): void => callback({
32
32
  IFA: deviceId,
33
33
  IFA_TYPE: 'vida',
34
- LMT: 0,
34
+ LMT: false,
35
35
  }),
36
36
 
37
37
  setContentChangeHandler:
@@ -56,8 +56,8 @@ export type IFA = {
56
56
  IFA: string,
57
57
  /** String value for IFA type ("vida") */
58
58
  IFA_TYPE: string,
59
- /** O or 1 (1=Limited tracking enabled, 0=Limited tracking disabled) */
60
- LMT: 0 | 1
59
+ /** true=Limited tracking enabled, false=Limited tracking disabled */
60
+ LMT: boolean,
61
61
  };
62
62
 
63
63
  export type DevicePlaybackQuality = 'UHD' | 'HD' | 'SD';
@@ -1,6 +1,7 @@
1
1
  @use 'sass:list';
2
2
  @use 'sass:math';
3
3
  @use 'sass:meta';
4
+ @use 'sass:map';
4
5
 
5
6
  @function legacy-direction($value) {
6
7
  @if is-direction($value) == false {
@@ -20,8 +21,8 @@
20
21
  to left top : right bottom,
21
22
  to top left : bottom right
22
23
  );
23
- @if map-has-key($conversion-map, $value) {
24
- @return map-get($conversion-map, $value);
24
+ @if map.has-key($conversion-map, $value) {
25
+ @return map.get($conversion-map, $value);
25
26
  }
26
27
  @return 90deg - $value;
27
28
  }
@@ -1,3 +1,5 @@
1
+ @use 'sass:math';
2
+
1
3
  @function scale($value) {
2
- @return round($number: $value);
4
+ @return math.round($number: $value);
3
5
  }
@@ -1,5 +1,5 @@
1
1
  @use 'sass:math';
2
2
 
3
3
  @function scale($value) {
4
- @return round($number: math.div($value, 1.5));
4
+ @return math.round($number: math.div($value, 1.5));
5
5
  }