@blotoutio/providers-smblead-sdk 1.6.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/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # providers-smblead-sdk
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Building
6
+
7
+ Run `nx build providers-smblead-sdk` to build the library.
8
+
9
+ ## Running unit tests
10
+
11
+ Run `nx test providers-smblead-sdk` to execute the unit tests via [Jest](https://jestjs.io).
package/index.cjs.js ADDED
@@ -0,0 +1,35 @@
1
+ 'use strict';
2
+
3
+ const packageName = 'smblead';
4
+
5
+ const init = ({ manifest }) => {
6
+ if (!document || !manifest.variables || !manifest.variables['scriptURL']) {
7
+ return;
8
+ }
9
+ const element = document.createElement('script');
10
+ element.async = true;
11
+ element.src = manifest.variables['scriptURL'];
12
+ const script = document.getElementsByTagName('script')[0];
13
+ if (script && script.parentNode) {
14
+ script.parentNode.insertBefore(element, script);
15
+ }
16
+ };
17
+
18
+ // eslint-disable-next-line @nx/enforce-module-boundaries
19
+ const data = {
20
+ name: packageName,
21
+ init,
22
+ };
23
+ try {
24
+ if (window) {
25
+ if (!window.edgetagProviders) {
26
+ window.edgetagProviders = [];
27
+ }
28
+ window.edgetagProviders.push(data);
29
+ }
30
+ }
31
+ catch {
32
+ // No window
33
+ }
34
+
35
+ module.exports = data;
package/index.js ADDED
@@ -0,0 +1,38 @@
1
+ var ProvidersSmbleadSdk = (function () {
2
+ 'use strict';
3
+
4
+ const packageName = 'smblead';
5
+
6
+ const init = ({ manifest }) => {
7
+ if (!document || !manifest.variables || !manifest.variables['scriptURL']) {
8
+ return;
9
+ }
10
+ const element = document.createElement('script');
11
+ element.async = true;
12
+ element.src = manifest.variables['scriptURL'];
13
+ const script = document.getElementsByTagName('script')[0];
14
+ if (script && script.parentNode) {
15
+ script.parentNode.insertBefore(element, script);
16
+ }
17
+ };
18
+
19
+ // eslint-disable-next-line @nx/enforce-module-boundaries
20
+ const data = {
21
+ name: packageName,
22
+ init,
23
+ };
24
+ try {
25
+ if (window) {
26
+ if (!window.edgetagProviders) {
27
+ window.edgetagProviders = [];
28
+ }
29
+ window.edgetagProviders.push(data);
30
+ }
31
+ }
32
+ catch {
33
+ // No window
34
+ }
35
+
36
+ return data;
37
+
38
+ })();
package/index.mjs ADDED
@@ -0,0 +1,33 @@
1
+ const packageName = 'smblead';
2
+
3
+ const init = ({ manifest }) => {
4
+ if (!document || !manifest.variables || !manifest.variables['scriptURL']) {
5
+ return;
6
+ }
7
+ const element = document.createElement('script');
8
+ element.async = true;
9
+ element.src = manifest.variables['scriptURL'];
10
+ const script = document.getElementsByTagName('script')[0];
11
+ if (script && script.parentNode) {
12
+ script.parentNode.insertBefore(element, script);
13
+ }
14
+ };
15
+
16
+ // eslint-disable-next-line @nx/enforce-module-boundaries
17
+ const data = {
18
+ name: packageName,
19
+ init,
20
+ };
21
+ try {
22
+ if (window) {
23
+ if (!window.edgetagProviders) {
24
+ window.edgetagProviders = [];
25
+ }
26
+ window.edgetagProviders.push(data);
27
+ }
28
+ }
29
+ catch {
30
+ // No window
31
+ }
32
+
33
+ export { data as default };
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@blotoutio/providers-smblead-sdk",
3
+ "version": "1.6.0",
4
+ "description": "CustomersAI Browser SDK for EdgeTag",
5
+ "author": "Blotout",
6
+ "license": "MIT",
7
+ "homepage": "https://github.com/blotoutio/edgetag-sdk",
8
+ "publishConfig": {
9
+ "access": "public"
10
+ },
11
+ "main": "./index.cjs.js",
12
+ "module": "./index.mjs",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/blotoutio/edgetag-sdk.git"
16
+ },
17
+ "files": [
18
+ "index.js",
19
+ "index.cjs.js",
20
+ "index.mjs",
21
+ "package.json",
22
+ "README.md"
23
+ ]
24
+ }