@dpgradio/creative 5.6.1 → 5.8.0
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/.eslintrc.cjs +4 -1
- package/package.json +7 -1
- package/src/__test__/utils/openLink.test.js +2 -2
- package/src/api/request.js +1 -2
- package/src/index.js +10 -10
- package/src/privacy/dataLayer.js +3 -3
- package/src/privacy/privacy.js +3 -3
- package/src/share/ShareResult.js +1 -1
- package/src/share/Shareable.js +2 -1
- package/src/share.js +3 -3
- package/src/socket/SocketStation.js +1 -1
- package/src/socket/socket.js +2 -2
- package/src/utils/openLink.js +1 -1
package/.eslintrc.cjs
CHANGED
|
@@ -4,9 +4,12 @@ module.exports = {
|
|
|
4
4
|
es6: true,
|
|
5
5
|
node: true,
|
|
6
6
|
},
|
|
7
|
-
extends: ['@dpgradio/eslint-config-recommended'],
|
|
7
|
+
extends: ['@dpgradio/eslint-config-recommended', 'plugin:import/recommended'],
|
|
8
8
|
parserOptions: {
|
|
9
9
|
sourceType: 'module',
|
|
10
10
|
ecmaVersion: 2023,
|
|
11
11
|
},
|
|
12
|
+
rules: {
|
|
13
|
+
'import/extensions': [2, 'ignorePackages'],
|
|
14
|
+
},
|
|
12
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dpgradio/creative",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.8.0",
|
|
4
4
|
"description": "Support package for standalone Javascript applications",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -15,6 +15,11 @@
|
|
|
15
15
|
"keywords": [
|
|
16
16
|
"qmusic"
|
|
17
17
|
],
|
|
18
|
+
"exports": {
|
|
19
|
+
".": "./src/index.js",
|
|
20
|
+
"./share": "./src/share.js",
|
|
21
|
+
"./styles/": "./styles/"
|
|
22
|
+
},
|
|
18
23
|
"type": "module",
|
|
19
24
|
"author": "DPG Media",
|
|
20
25
|
"license": "ISC",
|
|
@@ -25,6 +30,7 @@
|
|
|
25
30
|
"devDependencies": {
|
|
26
31
|
"@dpgradio/eslint-config-recommended": "^0.0.1",
|
|
27
32
|
"eslint": "^8.32.0",
|
|
33
|
+
"eslint-plugin-import": "^2.27.5",
|
|
28
34
|
"jest": "^29.4.0",
|
|
29
35
|
"jest-environment-jsdom": "^29.4.0"
|
|
30
36
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, test, jest } from '@jest/globals'
|
|
2
|
-
import hybrid from '../../app/hybrid'
|
|
3
|
-
import openLink from '../../utils/openLink'
|
|
2
|
+
import hybrid from '../../app/hybrid.js'
|
|
3
|
+
import openLink from '../../utils/openLink.js'
|
|
4
4
|
|
|
5
5
|
jest.mock('../../utils/hybrid.js', () => ({
|
|
6
6
|
isNativeApp: jest.fn(),
|
package/src/api/request.js
CHANGED
|
@@ -96,8 +96,7 @@ export default class Request {
|
|
|
96
96
|
|
|
97
97
|
const endpointWithoutSlash = endpoint.replace(/^\/+/, '')
|
|
98
98
|
|
|
99
|
-
const urlParts =
|
|
100
|
-
endpoint.startsWith('http')
|
|
99
|
+
const urlParts = endpoint.startsWith('http')
|
|
101
100
|
? [endpoint]
|
|
102
101
|
: [baseUrlWithProtocol, this.version, endpointWithoutSlash].filter(Boolean)
|
|
103
102
|
|
package/src/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export { default as hybrid } from './app/hybrid'
|
|
1
|
+
export { default as hybrid } from './app/hybrid.js'
|
|
2
2
|
|
|
3
|
-
export { default as privacy } from './privacy/privacy'
|
|
4
|
-
export { default as dataLayer } from './privacy/dataLayer'
|
|
3
|
+
export { default as privacy } from './privacy/privacy.js'
|
|
4
|
+
export { default as dataLayer } from './privacy/dataLayer.js'
|
|
5
5
|
|
|
6
|
-
export { default as socket } from './socket/socket'
|
|
6
|
+
export { default as socket } from './socket/socket.js'
|
|
7
7
|
|
|
8
|
-
export { default as configuration, config } from './config/config'
|
|
8
|
+
export { default as configuration, config } from './config/config.js'
|
|
9
9
|
|
|
10
|
-
export { default as api } from './api/api'
|
|
10
|
+
export { default as api } from './api/api.js'
|
|
11
11
|
|
|
12
|
-
export { default as loadScript } from './utils/loadScript'
|
|
13
|
-
export { default as openLink } from './utils/openLink'
|
|
14
|
-
export { default as tap } from './utils/tap'
|
|
15
|
-
export { cdnImageUrl, cdnUrl } from './utils/cdnUrl'
|
|
12
|
+
export { default as loadScript } from './utils/loadScript.js'
|
|
13
|
+
export { default as openLink } from './utils/openLink.js'
|
|
14
|
+
export { default as tap } from './utils/tap.js'
|
|
15
|
+
export { cdnImageUrl, cdnUrl } from './utils/cdnUrl.js'
|
package/src/privacy/dataLayer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import hybrid from '../app/hybrid'
|
|
2
|
-
import { config } from '../config/config'
|
|
3
|
-
import loadScript from '../utils/loadScript'
|
|
1
|
+
import hybrid from '../app/hybrid.js'
|
|
2
|
+
import { config } from '../config/config.js'
|
|
3
|
+
import loadScript from '../utils/loadScript.js'
|
|
4
4
|
|
|
5
5
|
class DataLayer {
|
|
6
6
|
constructor() {
|
package/src/privacy/privacy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { config } from '../config/config'
|
|
2
|
-
import loadScript from '../utils/loadScript'
|
|
1
|
+
import { config } from '../config/config.js'
|
|
2
|
+
import loadScript from '../utils/loadScript.js'
|
|
3
3
|
|
|
4
4
|
class Privacy {
|
|
5
5
|
constructor() {
|
|
@@ -51,7 +51,7 @@ class Privacy {
|
|
|
51
51
|
|
|
52
52
|
this.pushFunctional(() => {
|
|
53
53
|
clearTimeout(timeout)
|
|
54
|
-
this.consent = new Consent(window._privacy.consentString, window._privacy.purposesProvider.
|
|
54
|
+
this.consent = new Consent(window._privacy.consentString, window._privacy.purposesProvider.enabledPurposes)
|
|
55
55
|
this.consentSubscribers.forEach((subscriber) => subscriber(this.consent))
|
|
56
56
|
})
|
|
57
57
|
}
|
package/src/share/ShareResult.js
CHANGED
package/src/share/Shareable.js
CHANGED
package/src/share.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Shareable from './share/Shareable'
|
|
2
|
-
import ImageGeneratorProperties from './share/ImageGeneratorProperties'
|
|
3
|
-
import ShareResult from './share/ShareResult'
|
|
1
|
+
import Shareable from './share/Shareable.js'
|
|
2
|
+
import ImageGeneratorProperties from './share/ImageGeneratorProperties.js'
|
|
3
|
+
import ShareResult from './share/ShareResult.js'
|
|
4
4
|
|
|
5
5
|
export { ShareResult, Shareable, ImageGeneratorProperties }
|
package/src/socket/socket.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import SocketConnection from './SocketConnection'
|
|
2
|
-
import SocketStation from './SocketStation'
|
|
1
|
+
import SocketConnection from './SocketConnection.js'
|
|
2
|
+
import SocketStation from './SocketStation.js'
|
|
3
3
|
|
|
4
4
|
// This is a JS rewrite of [https://github.com/medialaan/radio-sockets-server/blob/master/dist/q.coffee] with some minor additional functionality.
|
|
5
5
|
class Socket {
|
package/src/utils/openLink.js
CHANGED