@appsemble/node-utils 0.23.4 → 0.23.6

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.23.4/config/assets/logo.svg) Appsemble Node Utilities
1
+ # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.23.6/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.23.4/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.23.4)
6
+ [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.23.6/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.23.6)
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.23.4/LICENSE.md) ©
29
+ [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.23.6/LICENSE.md) ©
30
30
  [Appsemble](https://appsemble.com)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appsemble/node-utils",
3
- "version": "0.23.4",
3
+ "version": "0.23.6",
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.23.4",
42
- "@appsemble/utils": "0.23.4",
41
+ "@appsemble/types": "0.23.6",
42
+ "@appsemble/utils": "0.23.6",
43
43
  "@formatjs/fast-memoize": "^2.0.0",
44
44
  "@fortawesome/fontawesome-free": "^6.0.0",
45
45
  "@koa/cors": "^4.0.0",
package/server/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
2
  /// <reference types="node" resolution-mode="require"/>
3
- import { type App, type AppMember, type AppMessages, type Asset, type BlockConfig, type BlockDefinition, type BlockManifest, type EmailActionDefinition, type Resource, type ResourceDefinition, type TeamMember, type Theme as ThemeType, type UserInfo } from '@appsemble/types';
3
+ import { type App, type AppMember, type AppMessages, type Asset, type BlockDefinition, type BlockManifest, type ControllerDefinition, type EmailActionDefinition, type Resource, type ResourceDefinition, type TeamMember, type Theme as ThemeType, type UserInfo } from '@appsemble/types';
4
4
  import { type IdentifiableBlock, type Permission } from '@appsemble/utils';
5
5
  import { type RawAxiosRequestConfig } from 'axios';
6
6
  import { type Context, type DefaultContext as DefaultContextInterface, type DefaultState, type ParameterizedContext } from 'koa';
@@ -62,6 +62,8 @@ declare module 'koas-parameters' {
62
62
  assetId: string;
63
63
  blockId: string;
64
64
  blockVersion: string;
65
+ controllerName: string;
66
+ controllerVersion: string;
65
67
  clientId: string;
66
68
  language: string;
67
69
  memberId: string;
@@ -109,7 +111,7 @@ export interface FindOptions {
109
111
  order?: OrderItem[];
110
112
  include?: any[];
111
113
  }
112
- export interface ContextBlockConfig extends BlockConfig {
114
+ export interface ContextBlockConfig extends BlockManifest {
113
115
  OrganizationId: string;
114
116
  }
115
117
  export interface GetAppParams {
@@ -164,6 +166,12 @@ export interface GetBlockAssetParams {
164
166
  filename: string;
165
167
  version: string;
166
168
  }
169
+ export interface GetControllerVersionAssetParams {
170
+ controllerName: string;
171
+ controllerVersion: string;
172
+ organizationId: string;
173
+ filename: string[] | string;
174
+ }
167
175
  export interface GetBlocksAssetsPathsParams {
168
176
  context: ParameterizedContext<DefaultState, DefaultContextInterface, any>;
169
177
  identifiableBlocks: IdentifiableBlock[];
@@ -187,6 +195,7 @@ export interface CreateSettingsParams {
187
195
  app: App;
188
196
  host: string;
189
197
  identifiableBlocks: IdentifiableBlock[];
198
+ controllerDefinition?: ControllerDefinition;
190
199
  hostname: string;
191
200
  languages: string[];
192
201
  }
@@ -309,7 +318,8 @@ export interface AppBlockStyle {
309
318
  export interface AppAsset extends Asset {
310
319
  data: Buffer;
311
320
  }
312
- export interface BlockAsset {
321
+ export interface ProjectAsset {
322
+ filename: string;
313
323
  mime: string;
314
324
  content: Buffer;
315
325
  }
@@ -338,7 +348,7 @@ export interface Options {
338
348
  getAppUrl: (params: GetAppSubEntityParams) => Promise<URL>;
339
349
  getDbUpdated: (params: GetDbUpdatedParams) => Promise<Date | number>;
340
350
  getBlockMessages: (params: GetBlockMessagesParams) => Promise<BlockMessages[]>;
341
- getBlockAsset: (params: GetBlockAssetParams) => Promise<BlockAsset>;
351
+ getBlockAsset: (params: GetBlockAssetParams) => Promise<ProjectAsset>;
342
352
  getBlocksAssetsPaths: (params: GetBlocksAssetsPathsParams) => Promise<string[]>;
343
353
  getTheme: (params: GetThemeParams) => Promise<Theme>;
344
354
  createTheme: (params: CreateThemeParams) => Promise<Theme>;