@streamlayer/sdk-web-anonymous-auth 1.4.7 → 1.5.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/lib/cjs/index.js CHANGED
@@ -3793,6 +3793,11 @@ const anonymous = (instance, opts, done) => {
3793
3793
  instance.sdk.anonymousAuthorization = async () => {
3794
3794
  await anonymousAuth(instance, opts);
3795
3795
  };
3796
+ if (opts?.autoLogin !== false) {
3797
+ anonymousAuth(instance, opts).catch((e) => {
3798
+ console.error(e, "fail auto anonymous auth");
3799
+ });
3800
+ }
3796
3801
  done();
3797
3802
  };
3798
3803
  exports.anonymous = anonymous;
@@ -7,4 +7,5 @@ declare module '@streamlayer/sdk-web-interfaces' {
7
7
  export declare const anonymous: StreamLayerPlugin<{
8
8
  schemaName?: string;
9
9
  issuer?: string;
10
+ autoLogin?: boolean;
10
11
  }>;
package/lib/dist/index.js CHANGED
@@ -75,5 +75,10 @@ export const anonymous = (instance, opts, done) => {
75
75
  instance.sdk.anonymousAuthorization = async () => {
76
76
  await anonymousAuth(instance, opts);
77
77
  };
78
+ if (opts?.autoLogin !== false) {
79
+ anonymousAuth(instance, opts).catch((e) => {
80
+ console.error(e, 'fail auto anonymous auth');
81
+ });
82
+ }
78
83
  done();
79
84
  };
package/lib/es/index.js CHANGED
@@ -3791,6 +3791,11 @@ const anonymous = (instance, opts, done) => {
3791
3791
  instance.sdk.anonymousAuthorization = async () => {
3792
3792
  await anonymousAuth(instance, opts);
3793
3793
  };
3794
+ if (opts?.autoLogin !== false) {
3795
+ anonymousAuth(instance, opts).catch((e) => {
3796
+ console.error(e, "fail auto anonymous auth");
3797
+ });
3798
+ }
3794
3799
  done();
3795
3800
  };
3796
3801
  export {
package/lib/index.d.ts CHANGED
@@ -7,4 +7,5 @@ declare module '@streamlayer/sdk-web-interfaces' {
7
7
  export declare const anonymous: StreamLayerPlugin<{
8
8
  schemaName?: string;
9
9
  issuer?: string;
10
+ autoLogin?: boolean;
10
11
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/sdk-web-anonymous-auth",
3
- "version": "1.4.7",
3
+ "version": "1.5.0",
4
4
  "author": "StreamLayer, Inc (https://streamlayer.io)",
5
5
  "maintainers": [
6
6
  {
@@ -31,24 +31,23 @@
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@streamlayer/sl-eslib": "^5.229.1",
34
- "jose": "^5.9.3",
35
- "@streamlayer/sdk-web": "^1.18.7"
34
+ "jose": "^5.9.3"
36
35
  },
37
36
  "devDependencies": {
38
- "@nx/devkit": "20.4.2",
39
- "@nx/playwright": "20.4.2",
40
- "@nx/webpack": "20.4.2",
41
- "@playwright/test": "^1.47.2",
42
- "@swc/helpers": "~0.5.15",
37
+ "@nx/devkit": "22.5.4",
38
+ "@nx/playwright": "22.5.4",
39
+ "@nx/webpack": "22.5.4",
40
+ "@playwright/test": "^1.58.2",
41
+ "@swc/helpers": "0.5.19",
43
42
  "rollup-plugin-visualizer": "^5.12.0",
44
43
  "url": "^0.11.4",
45
44
  "vite": "7.3.1",
46
- "vite-plugin-dts": "^4.5.4",
45
+ "vite-plugin-dts": "4.5.4",
47
46
  "vite-plugin-node-polyfills": "^0.25.0",
48
47
  "vite-tsconfig-paths": "^6.1.1",
49
- "webpack": "^5.95.0",
50
- "@streamlayer/sdk-web-api": "^1.16.7",
51
- "@streamlayer/sdk-web-core": "^1.21.7",
52
- "@streamlayer/sdk-web-interfaces": "^1.9.15"
48
+ "webpack": "5.101.3",
49
+ "@streamlayer/sdk-web-api": "^1.17.0",
50
+ "@streamlayer/sdk-web-core": "^1.22.0",
51
+ "@streamlayer/sdk-web-interfaces": "^1.10.0"
53
52
  }
54
53
  }