From 3b513c9efd4ce29e359e0f77b7e4c32081f20312 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Fri, 18 Sep 2020 16:13:57 +0000 Subject: [PATCH] fix(core): update --- package-lock.json | 81 ++++++++++++++++++----------------------- package.json | 6 ++- readme.md | 2 + ts/index.ts | 20 +++++++++- ts/webclient.plugins.ts | 22 ++++++++++- 5 files changed, 82 insertions(+), 49 deletions(-) diff --git a/package-lock.json b/package-lock.json index d248969..3271847 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,6 @@ "version": "1.0.43", "resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest/-/typedrequest-1.0.43.tgz", "integrity": "sha512-BUY6o7vzh36zUn7tH3pHGS0XTKIUJ9pp6CUxL0PT99GOWaS6aStqwAN6JwtmVuibbu/uKgPvXvIjET90vXeeHg==", - "dev": true, "requires": { "@apiglobal/typedrequest-interfaces": "^1.0.15", "@pushrocks/isounique": "^1.0.4", @@ -21,8 +20,7 @@ "@apiglobal/typedrequest-interfaces": { "version": "1.0.15", "resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest-interfaces/-/typedrequest-interfaces-1.0.15.tgz", - "integrity": "sha512-KncX168fUQJ73FeT22Cvls41mkJmtasP8dB2s9+9/OyWZpNsCzk9NEmtdRhulW2vLQwuAbQc1eoloe7ffCmhcA==", - "dev": true + "integrity": "sha512-KncX168fUQJ73FeT22Cvls41mkJmtasP8dB2s9+9/OyWZpNsCzk9NEmtdRhulW2vLQwuAbQc1eoloe7ffCmhcA==" }, "@babel/code-frame": { "version": "7.10.4", @@ -1126,6 +1124,14 @@ "to-fast-properties": "^2.0.0" } }, + "@consentsoftware/interfaces": { + "version": "1.0.4", + "resolved": "https://verdaccio.lossless.one/@consentsoftware%2finterfaces/-/interfaces-1.0.4.tgz", + "integrity": "sha512-GovOjaywV+X9VW9AVOjIFIrue/6YXOMKjk/YBnxo52inYWit1v1HuUkjlG/AOqjipqoMB+aujKNXv70oeXa7xQ==", + "requires": { + "@apiglobal/typedrequest-interfaces": "^1.0.15" + } + }, "@gitzone/tsbuild": { "version": "2.1.25", "resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbuild/-/tsbuild-2.1.25.tgz", @@ -1379,14 +1385,12 @@ "@pushrocks/isounique": { "version": "1.0.4", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fisounique/-/isounique-1.0.4.tgz", - "integrity": "sha512-P1xLsuA1+8LQpoWCo2nP2vIQXKGUl5wDWU6CD7xTDZc3uw0He5V/qCPHM5zpIZsS7IuZOxDDpWb7aFveB11tXw==", - "dev": true + "integrity": "sha512-P1xLsuA1+8LQpoWCo2nP2vIQXKGUl5wDWU6CD7xTDZc3uw0He5V/qCPHM5zpIZsS7IuZOxDDpWb7aFveB11tXw==" }, "@pushrocks/lik": { "version": "4.0.17", "resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.17.tgz", "integrity": "sha512-K5dX3k3i7iVxFMJ+IYwJRljewukJCc2zgj6+88R18/8SajVAq7ITOl3/FTbmEPFCJv5rl/LQ9FtcMynWlwSlzQ==", - "dev": true, "requires": { "@pushrocks/smartdelay": "^2.0.10", "@pushrocks/smartmatch": "^1.0.7", @@ -1428,7 +1432,6 @@ "version": "2.0.10", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartdelay/-/smartdelay-2.0.10.tgz", "integrity": "sha512-JOFpEfYiKnqcQYoUrL/jDyBDZUmlgJNm5U30MQQ3f+yci+rlFnMY5VvBBEYn5WgoX0ilwU+E15mtpDWhXcmhzg==", - "dev": true, "requires": { "@pushrocks/smartpromise": "^3.0.6" } @@ -1437,7 +1440,6 @@ "version": "4.0.10", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartenv/-/smartenv-4.0.10.tgz", "integrity": "sha512-b9jJbBSaOl0nlujyEu/0q5lkOFSMmfcOwPGb3pYrF1B37O15qmVpuqYwA5T8BXj8A6y+oA2bwrrtDzQ7hYp1zg==", - "dev": true, "requires": { "@pushrocks/smartparam": "^1.1.6", "@pushrocks/smartpromise": "^3.0.6", @@ -1447,8 +1449,7 @@ "@types/node": { "version": "14.11.1", "resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-14.11.1.tgz", - "integrity": "sha512-oTQgnd0hblfLsJ6BvJzzSL+Inogp3lq9fGgqRkMB/ziKMgEUaFl801OncOzUmalfzt14N0oPHMK47ipl+wbTIw==", - "dev": true + "integrity": "sha512-oTQgnd0hblfLsJ6BvJzzSL+Inogp3lq9fGgqRkMB/ziKMgEUaFl801OncOzUmalfzt14N0oPHMK47ipl+wbTIw==" } } }, @@ -1800,7 +1801,6 @@ "version": "1.0.7", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartmatch/-/smartmatch-1.0.7.tgz", "integrity": "sha512-D+lK5HIKO4Kj1Jm/ycKvy1VzDJ3V6ucHqmf5DMBFdm18BrMj2Zb6M7wN8HUKtkfHvOI7ig85JMuANSEyO7kAPg==", - "dev": true, "requires": { "matcher": "^3.0.0" } @@ -1835,7 +1835,6 @@ "version": "1.1.6", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartparam/-/smartparam-1.1.6.tgz", "integrity": "sha512-1El/F2QTWYDGy4Nh6vz9Ry1JVg1FEeyexB7Uvi4zHElpXYVxwso6xImRTLj+SW50JAg7nwEZ+ljkzTG9XvnwWA==", - "dev": true, "requires": { "@pushrocks/smartpromise": "^3.0.6", "is-promise": "^2.1.0", @@ -1931,8 +1930,7 @@ "@pushrocks/smartpromise": { "version": "3.0.6", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-3.0.6.tgz", - "integrity": "sha512-vlQlBGNVIjfClgnsfgQBU6GIKcskYSFzEcKLt18ngPzPEcjKklXcxaqzLXpnoxR+KBh30QPE8255ncYHXuPPOg==", - "dev": true + "integrity": "sha512-vlQlBGNVIjfClgnsfgQBU6GIKcskYSFzEcKLt18ngPzPEcjKklXcxaqzLXpnoxR+KBh30QPE8255ncYHXuPPOg==" }, "@pushrocks/smartpuppeteer": { "version": "1.0.15", @@ -1961,7 +1959,6 @@ "version": "2.0.18", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrx/-/smartrx-2.0.18.tgz", "integrity": "sha512-DqUmtS7mONO6bvWEZmSLy4M9hlxNWysMYc7XOZLr50BMaa0HUNYWI1myUFCMNcbUUOxuQNig01XqR1smfIN69g==", - "dev": true, "requires": { "@pushrocks/lik": "^4.0.14", "@pushrocks/smartpromise": "^3.0.6", @@ -1999,7 +1996,6 @@ "version": "3.0.35", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmarttime/-/smarttime-3.0.35.tgz", "integrity": "sha512-KBDprr2gMcw+21kD6GkJ0Y9fc/SuMijhFPDKoBmuCW9Nhn+KAnabCB8Qn8OzeUuQcoHQ3SFJ/4KioJWNxMgxaQ==", - "dev": true, "requires": { "@pushrocks/lik": "^4.0.17", "@pushrocks/smartdelay": "^2.0.10", @@ -2046,13 +2042,20 @@ "version": "2.0.10", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fwebrequest/-/webrequest-2.0.10.tgz", "integrity": "sha512-uQ8MvKclGqdLaUjah3SUsr8RplvtEUDXpFYjyO1dsHabbLWNVPQipt70CAMvS/8hOzDDD/G+dUEHIz2yZSVKNQ==", - "dev": true, "requires": { "@pushrocks/smartdelay": "^2.0.9", "@pushrocks/smartenv": "^4.0.10", "node-fetch": "^2.6.0" } }, + "@pushrocks/webstore": { + "version": "1.0.9", + "resolved": "https://verdaccio.lossless.one/@pushrocks%2fwebstore/-/webstore-1.0.9.tgz", + "integrity": "sha512-wfPRKAVxiD5XWuJwMlgB2VWByrdXIjfPejgnUFJh5IIMt6Y/NA+lh3nRuZVMzNUWfZQIKQn7MOOt0nPDGAEvMw==", + "requires": { + "idb": "^5.0.6" + } + }, "@rollup/plugin-commonjs": { "version": "14.0.0", "resolved": "https://verdaccio.lossless.one/@rollup%2fplugin-commonjs/-/plugin-commonjs-14.0.0.tgz", @@ -2309,8 +2312,7 @@ "@types/minimatch": { "version": "3.0.3", "resolved": "https://verdaccio.lossless.one/@types%2fminimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", - "dev": true + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" }, "@types/node": { "version": "14.11.1", @@ -2811,8 +2813,7 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://verdaccio.lossless.one/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "base": { "version": "0.11.2", @@ -2981,7 +2982,6 @@ "version": "1.1.11", "resolved": "https://verdaccio.lossless.one/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3656,8 +3656,7 @@ "concat-map": { "version": "0.0.1", "resolved": "https://verdaccio.lossless.one/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "concat-stream": { "version": "1.6.2", @@ -3879,8 +3878,7 @@ "croner": { "version": "1.1.23", "resolved": "https://verdaccio.lossless.one/croner/-/croner-1.1.23.tgz", - "integrity": "sha512-VsSyKBVtshU8qd2yPEWsBv5xxTLbRUuq6DX5bgUb4TTn/H6hmFGtfJtr0NKswu1UEsZZ6uhYc0kSOAvPlicQUA==", - "dev": true + "integrity": "sha512-VsSyKBVtshU8qd2yPEWsBv5xxTLbRUuq6DX5bgUb4TTn/H6hmFGtfJtr0NKswu1UEsZZ6uhYc0kSOAvPlicQUA==" }, "cross-spawn": { "version": "6.0.5", @@ -4241,8 +4239,7 @@ "dayjs": { "version": "1.8.36", "resolved": "https://verdaccio.lossless.one/dayjs/-/dayjs-1.8.36.tgz", - "integrity": "sha512-3VmRXEtw7RZKAf+4Tv1Ym9AGeo8r8+CjDi26x+7SYQil1UqtqdaokhzoEJohqlzt0m5kacJSDhJQkG/LWhpRBw==", - "dev": true + "integrity": "sha512-3VmRXEtw7RZKAf+4Tv1Ym9AGeo8r8+CjDi26x+7SYQil1UqtqdaokhzoEJohqlzt0m5kacJSDhJQkG/LWhpRBw==" }, "deasync": { "version": "0.1.20", @@ -4347,7 +4344,6 @@ "version": "1.1.3", "resolved": "https://verdaccio.lossless.one/define-properties/-/define-properties-1.1.3.tgz", "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, "requires": { "object-keys": "^1.0.12" } @@ -4756,8 +4752,7 @@ "escape-string-regexp": { "version": "4.0.0", "resolved": "https://verdaccio.lossless.one/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" }, "escodegen": { "version": "1.9.1", @@ -6529,6 +6524,11 @@ "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=", "dev": true }, + "idb": { + "version": "5.0.6", + "resolved": "https://verdaccio.lossless.one/idb/-/idb-5.0.6.tgz", + "integrity": "sha512-/PFvOWPzRcEPmlDt5jEvzVZVs0wyd/EvGvkDIcbBpGuMMLQKrTPG0TxvE2UJtgZtCQCmOtM2QD7yQJBVEjKGOw==" + }, "ieee754": { "version": "1.1.13", "resolved": "https://verdaccio.lossless.one/ieee754/-/ieee754-1.1.13.tgz", @@ -6773,7 +6773,6 @@ "version": "1.3.0", "resolved": "https://verdaccio.lossless.one/is-nan/-/is-nan-1.3.0.tgz", "integrity": "sha512-z7bbREymOqt2CCaZVly8aC4ML3Xhfi0ekuOnjO2L8vKdl+CttdVoGZQhd4adMFAsxQ5VeRVwORs4tU8RH+HFtQ==", - "dev": true, "requires": { "define-properties": "^1.1.3" } @@ -6822,8 +6821,7 @@ "is-promise": { "version": "2.2.2", "resolved": "https://verdaccio.lossless.one/is-promise/-/is-promise-2.2.2.tgz", - "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", - "dev": true + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" }, "is-reference": { "version": "1.2.1", @@ -7355,7 +7353,6 @@ "version": "3.0.0", "resolved": "https://verdaccio.lossless.one/matcher/-/matcher-3.0.0.tgz", "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==", - "dev": true, "requires": { "escape-string-regexp": "^4.0.0" } @@ -7516,7 +7513,6 @@ "version": "3.0.4", "resolved": "https://verdaccio.lossless.one/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -7637,8 +7633,7 @@ "node-fetch": { "version": "2.6.1", "resolved": "https://verdaccio.lossless.one/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", - "dev": true + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" }, "node-forge": { "version": "0.7.6", @@ -7831,8 +7826,7 @@ "object-keys": { "version": "1.1.1", "resolved": "https://verdaccio.lossless.one/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" }, "object-visit": { "version": "1.0.1", @@ -9573,7 +9567,6 @@ "version": "6.6.3", "resolved": "https://verdaccio.lossless.one/rxjs/-/rxjs-6.6.3.tgz", "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", - "dev": true, "requires": { "tslib": "^1.9.0" } @@ -10437,8 +10430,7 @@ "symbol-tree": { "version": "3.2.4", "resolved": "https://verdaccio.lossless.one/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" }, "systeminformation": { "version": "4.27.4", @@ -10603,8 +10595,7 @@ "tslib": { "version": "1.13.0", "resolved": "https://verdaccio.lossless.one/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", - "dev": true + "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==" }, "tslint": { "version": "6.1.3", diff --git a/package.json b/package.json index c006e27..b952120 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,11 @@ "tslint": "^6.1.3", "tslint-config-prettier": "^1.15.0" }, - "dependencies": {}, + "dependencies": { + "@apiglobal/typedrequest": "^1.0.43", + "@consentsoftware/interfaces": "^1.0.4", + "@pushrocks/webstore": "^1.0.9" + }, "browserslist": [ "last 1 chrome versions" ], diff --git a/readme.md b/readme.md index 0aeb7cc..e45d6b1 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,8 @@ Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20W Use TypeScript for best in class intellisense +This WebClient allows you to use the consent.software api in your webproject + ## Contribution We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :) diff --git a/ts/index.ts b/ts/index.ts index eb07acc..92e9a2b 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -1,3 +1,21 @@ import * as plugins from './webclient.plugins'; -export let standardExport = 'Hi there! :) This is an exported string'; +export class CsWebclient { + webstore: plugins.webstore.WebStore; + + constructor() { + this.webstore = new plugins.webstore.WebStore({ + dbName: 'consentsoftware', + storeName: 'webclient' + }); + } + + public async isCookieLevelSet(): Promise { + const result = await this.webstore.get('acceptedCookieLevels'); + return !!result; + } + + public async setCookieLevels(cookieLevels ): Promise { + + } +} \ No newline at end of file diff --git a/ts/webclient.plugins.ts b/ts/webclient.plugins.ts index 29aa9da..d702fdd 100644 --- a/ts/webclient.plugins.ts +++ b/ts/webclient.plugins.ts @@ -1,2 +1,20 @@ -const removeme = {}; -export { removeme }; +// consentsoftware scope +import * as csInterfaces from '@consentsoftware/interfaces'; + +export { + csInterfaces +}; + +// apiglobal scope +import * as typedrequest from '@apiglobal/typedrequest'; + +export { + typedrequest +}; + +// @pushrocks scope +import * as webstore from '@pushrocks/webstore'; + +export { + webstore +};