Skip to content

Commit 0e31a79

Browse files
committed
Merge branch 'release/0.5.0' into released
2 parents 13e6357 + 52e72ca commit 0e31a79

65 files changed

Lines changed: 2542 additions & 1295 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,8 @@ version: 2
66
jobs:
77
build:
88
docker:
9-
# specify the version you desire here
109
- image: circleci/node:11.0
11-
12-
# Specify service dependencies here if necessary
13-
# CircleCI maintains a library of pre-built images
14-
# documented at https://circleci.com/docs/2.0/circleci-images/
15-
# - image: circleci/mongo:3.4.4
16-
1710
working_directory: ~/repo
18-
1911
steps:
2012
# build holoflows-kit
2113
- checkout
@@ -24,14 +16,13 @@ jobs:
2416
- build-cache
2517
- restore_cache:
2618
keys:
27-
- v1-dependencies-{{ checksum "package.json" }}
28-
# fallback to using the latest cache if no exact match is found
19+
- v1-dependencies-{{ checksum "yarn.lock" }}
2920
- v1-dependencies-
3021
- run: yarn install
3122
- save_cache:
3223
paths:
3324
- node_modules
34-
key: v1-dependencies-{{ checksum "package.json" }}
25+
key: v1-dependencies-{{ checksum "yarn.lock" }}
3526
- run: yarn build
3627
- save_cache:
3728
paths:
@@ -48,3 +39,21 @@ jobs:
4839
- store_artifacts:
4940
path: esmodule.zip
5041
destination: /esmodule.zip
42+
test:
43+
docker:
44+
- image: circleci/node:11.0
45+
working_directory: ~/repo
46+
steps:
47+
- checkout
48+
- restore_cache:
49+
keys:
50+
- v1-dependencies-{{ checksum "yarn.lock" }}
51+
- v1-dependencies-
52+
- run: yarn
53+
- run: yarn test
54+
workflows:
55+
version: 2
56+
main:
57+
jobs:
58+
- build
59+
- test

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
# Settings
3+
/.vscode/tasks.json
4+
25
# temp file
36
/temp
47
.rpt2_cache

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"search.exclude": {
33
"**/api-documents": true
4-
}
4+
},
5+
"typescript.tsdk": "node_modules\\typescript\\lib"
56
}

.vscode/tasks.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @holoflows/kit · ![GitHub license](https://img.shields.io/badge/license-AGPL-blue.svg?style=flat-square) [![npm version](https://img.shields.io/npm/v/@holoflows/kit.svg?style=flat-square)](https://www.npmjs.com/package/@holoflows/kit) ![Ciecle CI](https://img.shields.io/circleci/project/github/DimensionDev/holoflows-kit.svg?style=flat-square&logo=circleci)
22

3-
Toolkit for modern web browser extension developing.
3+
Toolkit for modern Webflows development.
44

55
## Documentation
66

api-documents/kit.asynccall.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ Async call between different context.
99
<b>Signature:</b>
1010

1111
```typescript
12-
export declare function AsyncCall<OtherSideImplementedFunctions = {}>(implementation?: Record<string, (...args: any[]) => any>, options?: Partial<AsyncCallOptions>): OtherSideImplementedFunctions;
12+
export declare function AsyncCall<OtherSideImplementedFunctions = {}>(implementation?: object, options?: Partial<AsyncCallOptions>): MakeAllFunctionsAsync<OtherSideImplementedFunctions>;
1313
```
1414

1515
## Parameters
1616

1717
| Parameter | Type | Description |
1818
| --- | --- | --- |
19-
| implementation | <code>Record&lt;string, (...args: any[]) =&gt; any&gt;</code> | Implementation of this side. |
19+
| implementation | <code>object</code> | Implementation of this side. |
2020
| options | <code>Partial&lt;AsyncCallOptions&gt;</code> | Define your own serializer, MessageCenter or other options. |
2121

2222
<b>Returns:</b>
2323

24-
`OtherSideImplementedFunctions`
24+
`MakeAllFunctionsAsync<OtherSideImplementedFunctions>`
2525

2626
## Remarks
2727

api-documents/kit.asynccalloptions.log.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ log: {
1313
beCalled?: boolean;
1414
localError?: boolean;
1515
remoteError?: boolean;
16+
sendLocalStack?: boolean;
1617
type?: 'basic' | 'pretty';
1718
} | boolean;
1819
```

api-documents/kit.asynccalloptions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ export interface AsyncCallOptions
1717
| Property | Type | Description |
1818
| --- | --- | --- |
1919
| [key](./kit.asynccalloptions.key.md) | <code>string</code> | A key to prevent collision with other AsyncCalls. Can be anything, but need to be the same on the both side. |
20-
| [log](./kit.asynccalloptions.log.md) | <code>{</code><br/><code> beCalled?: boolean;</code><br/><code> localError?: boolean;</code><br/><code> remoteError?: boolean;</code><br/><code> type?: 'basic' &#124; 'pretty';</code><br/><code> } &#124; boolean</code> | Log what to console |
20+
| [log](./kit.asynccalloptions.log.md) | <code>{</code><br/><code> beCalled?: boolean;</code><br/><code> localError?: boolean;</code><br/><code> remoteError?: boolean;</code><br/><code> sendLocalStack?: boolean;</code><br/><code> type?: 'basic' &#124; 'pretty';</code><br/><code> } &#124; boolean</code> | Log what to console |
2121
| [messageChannel](./kit.asynccalloptions.messagechannel.md) | <code>{</code><br/><code> on(event: string, callback: (data: unknown) =&gt; void): void;</code><br/><code> emit(event: string, data: unknown): void;</code><br/><code> }</code> | A class that can let you transfer messages between two sides |
2222
| [parameterStructures](./kit.asynccalloptions.parameterstructures.md) | <code>'by-position' &#124; 'by-name'</code> | How parameters passed to remote https://www.jsonrpc.org/specification\#parameter\_structures |
23+
| [preferLocalImplementation](./kit.asynccalloptions.preferlocalimplementation.md) | <code>boolean</code> | If <code>implementation</code> has the function required, call it directly instead of send it to remote. |
2324
| [serializer](./kit.asynccalloptions.serializer.md) | <code>Serialization</code> | How to serialization and deserialization parameters and return values |
2425
| [strict](./kit.asynccalloptions.strict.md) | <code>{</code><br/><code> methodNotFound?: boolean;</code><br/><code> noUndefined?: boolean;</code><br/><code> unknownMessage?: boolean;</code><br/><code> } &#124; boolean</code> | Strict options |
2526

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@holoflows/kit](./kit.md) &gt; [AsyncCallOptions](./kit.asynccalloptions.md) &gt; [preferLocalImplementation](./kit.asynccalloptions.preferlocalimplementation.md)
4+
5+
## AsyncCallOptions.preferLocalImplementation property
6+
7+
If `implementation` has the function required, call it directly instead of send it to remote.
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
preferLocalImplementation: boolean;
13+
```
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@holoflows/kit](./kit.md) &gt; [AsyncGeneratorCall](./kit.asyncgeneratorcall.md)
4+
5+
## AsyncGeneratorCall() function
6+
7+
This function provides the async generator version of the AsyncCall
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
export declare function AsyncGeneratorCall<OtherSideImplementedFunctions = {}>(implementation?: object, options?: Partial<AsyncCallOptions>): MakeAllGeneratorFunctionsAsync<OtherSideImplementedFunctions>;
13+
```
14+
15+
## Parameters
16+
17+
| Parameter | Type | Description |
18+
| --- | --- | --- |
19+
| implementation | <code>object</code> | |
20+
| options | <code>Partial&lt;AsyncCallOptions&gt;</code> | |
21+
22+
<b>Returns:</b>
23+
24+
`MakeAllGeneratorFunctionsAsync<OtherSideImplementedFunctions>`
25+

0 commit comments

Comments
 (0)