@appsemble/node-utils 0.24.9 → 0.24.10

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 CHANGED
@@ -1,9 +1,9 @@
1
- # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.24.9/config/assets/logo.svg) Appsemble Node Utilities
1
+ # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.24.10/config/assets/logo.svg) Appsemble Node Utilities
2
2
 
3
3
  > NodeJS utilities used by Appsemble internally.
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/@appsemble/node-utils)](https://www.npmjs.com/package/@appsemble/node-utils)
6
- [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.24.9/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.24.9)
6
+ [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.24.10/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.24.10)
7
7
  [![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://prettier.io)
8
8
 
9
9
  ## Table of Contents
@@ -26,5 +26,5 @@ compatibility is not guaranteed.
26
26
 
27
27
  ## License
28
28
 
29
- [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.24.9/LICENSE.md) ©
29
+ [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.24.10/LICENSE.md) ©
30
30
  [Appsemble](https://appsemble.com)
package/app.js CHANGED
@@ -42,6 +42,7 @@ export async function getRemapperContext(app, language, userInfo, options, conte
42
42
  return cache(message || `'{${id}}'`);
43
43
  },
44
44
  userInfo,
45
+ appMember: userInfo === null || userInfo === void 0 ? void 0 : userInfo.appMember,
45
46
  context: {},
46
47
  locale: (_b = (_a = userInfo === null || userInfo === void 0 ? void 0 : userInfo.locale) !== null && _a !== void 0 ? _a : app.definition.defaultLanguage) !== null && _b !== void 0 ? _b : defaultLocale,
47
48
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appsemble/node-utils",
3
- "version": "0.24.9",
3
+ "version": "0.24.10",
4
4
  "description": "NodeJS utilities used by Appsemble internally.",
5
5
  "keywords": [
6
6
  "app",
@@ -38,8 +38,8 @@
38
38
  "test": "vitest"
39
39
  },
40
40
  "dependencies": {
41
- "@appsemble/types": "0.24.9",
42
- "@appsemble/utils": "0.24.9",
41
+ "@appsemble/types": "0.24.10",
42
+ "@appsemble/utils": "0.24.10",
43
43
  "@formatjs/fast-memoize": "^2.0.0",
44
44
  "@fortawesome/fontawesome-free": "^6.0.0",
45
45
  "@koa/cors": "^4.0.0",
@@ -1,11 +1,11 @@
1
1
  import { assertKoaError } from '../../koa.js';
2
2
  export function createGetAppMember({ getApp, getAppMembers }) {
3
3
  return async (ctx) => {
4
- const { pathParams: { appId, memberId }, } = ctx;
4
+ const { pathParams: { appId, userId }, } = ctx;
5
5
  const app = await getApp({ context: ctx, query: { where: { id: appId } } });
6
6
  assertKoaError(!app, ctx, 404, 'App not found');
7
7
  assertKoaError(app.definition.security === undefined, ctx, 404, 'App does not have a security definition');
8
- const appMembers = await getAppMembers({ context: ctx, app, memberId });
8
+ const appMembers = await getAppMembers({ context: ctx, app, userId });
9
9
  assertKoaError(appMembers.length !== 1, ctx, 404, 'App member not found');
10
10
  ctx.body = appMembers[0];
11
11
  };
package/server/types.d.ts CHANGED
@@ -132,7 +132,7 @@ export interface GetAppMessagesParams extends GetAppSubEntityParams {
132
132
  merge?: string[] | string;
133
133
  }
134
134
  export interface GetAppMembersParams extends GetAppSubEntityParams {
135
- memberId: string;
135
+ userId: string;
136
136
  }
137
137
  export interface GetAppUserInfoParams {
138
138
  context: ParameterizedContext<DefaultState, DefaultContextInterface, any>;