@goweekdays/layer-common 0.0.11 → 0.0.12

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @goweekdays/layer-common
2
2
 
3
+ ## 0.0.12
4
+
5
+ ### Patch Changes
6
+
7
+ - 72ba6c2: Remove client plugin
8
+
3
9
  ## 0.0.11
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@goweekdays/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "0.0.11",
5
+ "version": "0.0.12",
6
6
  "main": "./nuxt.config.ts",
7
7
  "publishConfig": {
8
8
  "access": "public"
package/plugins/client.ts DELETED
@@ -1,30 +0,0 @@
1
- export default defineNuxtPlugin(async () => {
2
- const cookieConfig = useRuntimeConfig().public.cookieConfig;
3
-
4
- const clientId = useCookie("clientId", cookieConfig).value;
5
-
6
- if (!clientId) {
7
- const res = await fetch("/api/auth/init");
8
- const headers = res.headers.get("accept-ch");
9
-
10
- console.log("headers", headers);
11
-
12
- // const headerValues = [
13
- // headers.get("user-agent"),
14
- // headers.get("sec-ch-ua"),
15
- // headers.get("sec-ch-ua-platform"),
16
- // headers.get("sec-ch-ua-mobile"),
17
- // headers.get("accept-language"),
18
- // ].join("|");
19
-
20
- const buffer = await crypto.subtle.digest(
21
- "SHA-256",
22
- new TextEncoder().encode(headers ?? "")
23
- );
24
- const _clientId = [...new Uint8Array(buffer)]
25
- .map((b) => b.toString(16).padStart(2, "0"))
26
- .join("");
27
-
28
- useCookie("clientId", cookieConfig).value = _clientId;
29
- }
30
- });