@appsemble/utils 0.25.1 → 0.26.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/README.md +3 -3
- package/api/paths/apps.js +6 -0
- package/api/paths/oauth2Login.js +1 -1
- package/examples.d.ts +24 -0
- package/examples.js +668 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +4 -4
- package/reference-schemas/remappers/arrays.js +8 -147
- package/reference-schemas/remappers/conditionals.js +9 -53
- package/reference-schemas/remappers/data.js +8 -66
- package/reference-schemas/remappers/dates.js +7 -42
- package/reference-schemas/remappers/objects.js +4 -66
- package/reference-schemas/remappers/strings.js +4 -32
- package/reference-schemas/remappers/unsorted.js +2 -24
- package/remap.test.js +8 -0
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#  Appsemble Utilities
|
|
2
2
|
|
|
3
3
|
> Internal utility functions used across multiple Appsemble projects.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@appsemble/utils)
|
|
6
|
-
[](https://gitlab.com/appsemble/appsemble/-/releases/0.26.0)
|
|
7
7
|
[](https://prettier.io)
|
|
8
8
|
|
|
9
9
|
## Table of Contents
|
|
@@ -26,5 +26,5 @@ not guaranteed.
|
|
|
26
26
|
|
|
27
27
|
## License
|
|
28
28
|
|
|
29
|
-
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.
|
|
29
|
+
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.26.0/LICENSE.md) ©
|
|
30
30
|
[Appsemble](https://appsemble.com)
|
package/api/paths/apps.js
CHANGED
|
@@ -345,6 +345,12 @@ export const paths = {
|
|
|
345
345
|
description: 'Whether to include resources for an app.',
|
|
346
346
|
in: 'query',
|
|
347
347
|
},
|
|
348
|
+
{
|
|
349
|
+
name: 'assets',
|
|
350
|
+
schema: { type: 'boolean' },
|
|
351
|
+
description: 'Whether to include assets in the export file',
|
|
352
|
+
in: 'query',
|
|
353
|
+
},
|
|
348
354
|
],
|
|
349
355
|
responses: {
|
|
350
356
|
200: {
|
package/api/paths/oauth2Login.js
CHANGED
package/examples.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
import { type Remappers, type UserInfo } from '@appsemble/types';
|
|
3
|
+
import { type RemapperContext } from './remap.js';
|
|
4
|
+
export interface RemapperExample {
|
|
5
|
+
input: unknown;
|
|
6
|
+
remapper: unknown;
|
|
7
|
+
result: unknown;
|
|
8
|
+
skip?: boolean;
|
|
9
|
+
}
|
|
10
|
+
type CustomRemapperKeys = 'app.id' | 'app.locale' | 'app.url' | 'array.map.1' | 'if.else' | 'if.then' | 'None';
|
|
11
|
+
export type RemapperExampleKeys = CustomRemapperKeys | Exclude<keyof Remappers, 'app' | 'if'>;
|
|
12
|
+
export declare const examples: Record<RemapperExampleKeys, RemapperExample>;
|
|
13
|
+
/**
|
|
14
|
+
* @param remapper The remapper example to use.
|
|
15
|
+
* @param options The options specifying how to display the example.
|
|
16
|
+
* @returns Example based on the input options.
|
|
17
|
+
*/
|
|
18
|
+
export declare function schemaExample(remapper: keyof typeof examples, options?: {
|
|
19
|
+
input?: 'inline' | 'pretty';
|
|
20
|
+
result?: 'inline' | 'pretty';
|
|
21
|
+
exclude?: ('input' | 'remapper' | 'result')[];
|
|
22
|
+
}): string;
|
|
23
|
+
export declare function createExampleContext(url: URL, lang: string, userInfo?: UserInfo, history?: []): RemapperContext;
|
|
24
|
+
export {};
|