Skip to content

Commit 68d39ef

Browse files
authored
Merge pull request #88 from dolittle/21.0.0-gimli
Gimli: New SDK setup configuration, Dependency Injection, Version Compatibility Check, Express integration
2 parents 615236a + 0ceb59a commit 68d39ef

File tree

680 files changed

+13622
-6276
lines changed

Some content is hidden

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

680 files changed

+13622
-6276
lines changed

.github/workflows/workflow.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: TypeScript Library CI/CD
22

33
env:
4-
PRERELEASE_BRANCHES: legolas # Comma separated list of prerelease branch names. 'alpha,rc, ...'
4+
PRERELEASE_BRANCHES: legolas, gimli # Comma separated list of prerelease branch names. 'alpha,rc, ...'
55

66
on:
77
push:
@@ -22,15 +22,12 @@ jobs:
2222
with:
2323
node-version: 12.x
2424
registry-url: 'https://registry.npmjs.org'
25-
- run: yarn
26-
- run: yarn ci
2725

2826
- name: Establish context
2927
id: context
3028
uses: dolittle/establish-context-action@v2
3129
with:
3230
prerelease-branches: ${{ env.PRERELEASE_BRANCHES }}
33-
3431
- name: Increment version
3532
id: increment-version
3633
if: ${{ steps.context.outputs.should-publish == 'true' }}
@@ -39,6 +36,15 @@ jobs:
3936
version: ${{ steps.context.outputs.current-version }}
4037
release-type: ${{ steps.context.outputs.release-type }}
4138

39+
- name: Update VersionInfo
40+
uses: dolittle/update-version-info-action@v1
41+
with:
42+
version: ${{ steps.increment-version.outputs.next-version || '0.0.0-prerelease' }}
43+
files-to-update: Source/sdk/VersionInfo.ts
44+
45+
- run: yarn
46+
- run: yarn ci
47+
4248
- name: Prepend to Changelog
4349
if: ${{ steps.context.outputs.should-publish == 'true' && steps.context.outputs.release-type != 'prerelease' }}
4450
uses: dolittle/add-to-changelog-action@v2

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,4 @@ package-lock.json
6464
Samples/**/data
6565
Source/**/Distribution
6666
Samples/**/Distribution
67+
Source/**/README.md

.vscode/launch.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,35 @@
4343
"<node_internals>/**",
4444
"node_modules/**"
4545
]
46+
},
47+
{
48+
"type": "node",
49+
"request": "launch",
50+
"name": "Debug Tutorial - Getting Started",
51+
"program": "${workspaceFolder}/Samples/Tutorials/GettingStarted/Distribution/index.js",
52+
"cwd": "${workspaceFolder}/Samples/Tutorials/GettingStarted",
53+
"preLaunchTask": "tsc: build - Samples/Tutorials/GettingStarted/tsconfig.json",
54+
"outputCapture": "std",
55+
"internalConsoleOptions": "openOnSessionStart",
56+
"outFiles": [
57+
"${workspaceFolder}/Samples/Tutorials/GettingStarted/Distribution/**/*.js",
58+
"${workspaceFolder}/Source/*/Distribution/**/*.js",
59+
]
60+
},
61+
{
62+
"type": "node",
63+
"request": "launch",
64+
"name": "Debug 'events' Tests",
65+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
66+
"cwd": "${workspaceFolder}/Source/events",
67+
"args": [
68+
"-r",
69+
"ts-node/register",
70+
"--timeout",
71+
"999999",
72+
"--colors",
73+
"${workspaceFolder}/Source/events/**/for_*/**/*.ts",
74+
],
4675
}
4776
]
4877
}

Assets/PACKAGE-README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
![Dolittle](https://raw.githubusercontent.com/dolittle/Runtime/master/Documentation/dolittle_negativ_horisontal_RGB.svg "Dolittle")
2+
3+
Dolittle is a decentralized, distributed, event-driven microservice platform built to harness the power of events.
4+
5+
This is our JavaScript and TypeScript SDK, install it with:
6+
```shell
7+
$ npm install @dolittle/sdk
8+
```
9+
10+
# Get Started
11+
- Try our [getting started tutorial](https://dolittle.io/docs/tutorials/getting_started/)
12+
- Check out our [documentation](https://dolittle.io)
13+
14+
# Want to try another language?
15+
- Check out the [.NET SDK](https://github.com/dolittle/DotNet.SDK)
16+
17+
# Issues and Contributing
18+
Issues and contributions are always welcome!
19+
20+
To learn how to contribute, please read our [contributing](https://dolittle.io/docs/contributing/) guide.

Assets/copy-readme.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// Copyright (c) Dolittle. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
4+
const path = require('path');
5+
const fs = require('fs');
6+
7+
(async () => {
8+
const readmePath = path.resolve(__dirname, 'PACKAGE-README.md');
9+
const readmeFile = await new Promise((resolve, reject) =>
10+
fs.readFile(readmePath, (error, data) => {
11+
if (error) {
12+
console.error('Failed to open README from', readmePath);
13+
reject(error);
14+
} else {
15+
resolve(data);
16+
}
17+
}));
18+
19+
const destinations = process.argv.slice(2);
20+
21+
if (destinations.length < 1) {
22+
throw new Error('No desitionations specified to copy the README.md file to.');
23+
}
24+
25+
for (const destination of destinations) {
26+
const destinationPath = path.resolve(destination, 'README.md');
27+
await new Promise((resolve, reject) =>
28+
fs.writeFile(destinationPath, readmeFile, (error) => {
29+
if (error) {
30+
console.error('Failed to copy to', destinationPath, error);
31+
reject(error);
32+
} else {
33+
resolve();
34+
}
35+
}));
36+
}
37+
})().catch(error => {
38+
console.error(error);
39+
process.exit(1);
40+
});

Samples/Advanced/MyEvent.ts

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

Samples/Advanced/MyEventHandler.ts

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

Samples/Advanced/index.ts

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

Samples/Advanced/package.json

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

Samples/Container/MyEvent.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@ import { eventType } from '@dolittle/sdk.events';
55

66
@eventType('c7b37f26-ffe4-4ffc-9a53-8d67acbecd4d')
77
export class MyEvent {
8-
anInteger!: number;
9-
aString!: string;
8+
constructor(readonly aNumber: number, readonly aString: string) {}
109
}

0 commit comments

Comments
 (0)