@_linked/server 3.4.0 → 3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @\_linked/server
2
2
 
3
+ ## 3.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#193](https://github.com/linked-fw/server/pull/193) [`e4f2510`](https://github.com/linked-fw/server/commit/e4f251007b3f8f28ada5ed2d83daef4cda8ec15c) Thanks [@flyon](https://github.com/flyon)! - The server enforces and reports the `'signed-in'` callable level from `@_linked/server-utils` 1.14: a `'signed-in'` method answers 401 without a session. A method declared with the deprecated alias `'user'` is treated exactly the same, and `resolveCallable` reports it as `'signed-in'`. Requires `@_linked/server-utils` ^1.14.0.
8
+
9
+ ## 3.4.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#192](https://github.com/linked-fw/server/pull/192) [`9109073`](https://github.com/linked-fw/server/commit/9109073db79ed4b8fe90cdf89cda61f45905a7e2) Thanks [@flyon](https://github.com/flyon)! - `RemoteDataset` no longer imports `@_linked/server-utils/utils/CallContext` (which imports `node:async_hooks`): it reads the call context from the store that module shares on `globalThis`, so the store loads in the browser again.
14
+
3
15
  ## 3.4.0
4
16
 
5
17
  ### Minor Changes
@@ -249,7 +249,10 @@ export declare class LinkedServer extends Shape {
249
249
  * (in 'warn' mode it is logged once and runs).
250
250
  */
251
251
  private assertDispatchAllowed;
252
- /** A declared `'user'` method needs a session: 401 without one, in every mode. */
252
+ /**
253
+ * A declared `'signed-in'` method (or one declared with its deprecated alias
254
+ * `'user'`) needs a session: 401 without one, in every mode.
255
+ */
253
256
  private assertSessionForLevel;
254
257
  handleErrors(fn: any): (req: any, res: any, next: any) => Promise<any>;
255
258
  handleErrorsJson(fn: any): (req: any, res: any, next: any) => Promise<any>;
@@ -1685,10 +1685,13 @@ let LinkedServer = class LinkedServer extends Shape {
1685
1685
  warnUndeclaredCall(pkg, resolution.owner, method, hasSession(request));
1686
1686
  }
1687
1687
  }
1688
- /** A declared `'user'` method needs a session: 401 without one, in every mode. */
1688
+ /**
1689
+ * A declared `'signed-in'` method (or one declared with its deprecated alias
1690
+ * `'user'`) needs a session: 401 without one, in every mode.
1691
+ */
1689
1692
  assertSessionForLevel(pkg, method, resolution, request) {
1690
1693
  if (resolution.status === 'callable' &&
1691
- resolution.level === 'user' &&
1694
+ resolution.level === 'signed-in' &&
1692
1695
  !hasSession(request)) {
1693
1696
  throw new ServerCallError(401, 'Authentication required');
1694
1697
  }