@mecanizou/telemetry-hub 1.0.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/.github/workflows/pull_request.yml +32 -0
- package/.github/workflows/release.yml +129 -0
- package/.prettierignore +5 -0
- package/dist/check-if-is-working.d.ts +1 -0
- package/dist/check-if-is-working.js +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +18 -0
- package/package.json +56 -0
- package/release.config.js +23 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Pull Request
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
- staging
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout code
|
|
14
|
+
uses: actions/checkout@v2
|
|
15
|
+
- name: Setup Node.js
|
|
16
|
+
uses: actions/setup-node@v3
|
|
17
|
+
with:
|
|
18
|
+
node-version: '18.17.*'
|
|
19
|
+
- name: Install npm dependencies
|
|
20
|
+
run: npm install
|
|
21
|
+
env:
|
|
22
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
23
|
+
- name: Build
|
|
24
|
+
run: npm run build
|
|
25
|
+
- name: Unity Test
|
|
26
|
+
run: npm test
|
|
27
|
+
if_merged:
|
|
28
|
+
if: github.event.pull_request.merged == true
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
steps:
|
|
31
|
+
- run: |
|
|
32
|
+
echo The PR was merged
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
name: 🚀 Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
- alpha
|
|
8
|
+
- beta
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
release:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout Repository
|
|
15
|
+
uses: actions/checkout@master
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
persist-credentials: false
|
|
19
|
+
|
|
20
|
+
- name: Send Slack init message
|
|
21
|
+
uses: 8398a7/action-slack@v3
|
|
22
|
+
with:
|
|
23
|
+
status: "custom"
|
|
24
|
+
custom_payload: |
|
|
25
|
+
{
|
|
26
|
+
text: "${{ github.event.repository.name }} build initiated",
|
|
27
|
+
attachments: [{
|
|
28
|
+
color: '#5a9eda',
|
|
29
|
+
fields: [
|
|
30
|
+
{
|
|
31
|
+
title: 'Build initiated',
|
|
32
|
+
value: "<https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.event.commits[0].message }}>",
|
|
33
|
+
short: false,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
title: 'Branch',
|
|
37
|
+
value: "${{ github.ref }}",
|
|
38
|
+
short: true,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
title: 'Project',
|
|
42
|
+
value: "${{ github.event.repository.name }}",
|
|
43
|
+
short: true,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
title: 'Commit',
|
|
47
|
+
value: "<${{ github.event.commits[0].url }}|${{ github.event.commits[0].id }}>",
|
|
48
|
+
short: false,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
title: 'Author',
|
|
52
|
+
value: "${{ github.actor }}",
|
|
53
|
+
short: false,
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
}]
|
|
57
|
+
}
|
|
58
|
+
env:
|
|
59
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
60
|
+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
61
|
+
if: always()
|
|
62
|
+
- name: Setup Node.js
|
|
63
|
+
uses: actions/setup-node@v3
|
|
64
|
+
with:
|
|
65
|
+
node-version: "24.11.*"
|
|
66
|
+
|
|
67
|
+
- name: Install dependencies
|
|
68
|
+
run: npm install
|
|
69
|
+
env:
|
|
70
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
71
|
+
# - name: Run Tests
|
|
72
|
+
# run: npm test
|
|
73
|
+
- name: Build
|
|
74
|
+
run: npm run build
|
|
75
|
+
|
|
76
|
+
- name: Semantic Release
|
|
77
|
+
if: success()
|
|
78
|
+
run: npx semantic-release
|
|
79
|
+
env:
|
|
80
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
81
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
82
|
+
|
|
83
|
+
- name: Send Slack finish message
|
|
84
|
+
uses: 8398a7/action-slack@v3
|
|
85
|
+
with:
|
|
86
|
+
status: "custom"
|
|
87
|
+
custom_payload: |
|
|
88
|
+
{
|
|
89
|
+
text: '${{ github.event.repository.name }} build ${{ steps.set_build_details.outputs.status }}',
|
|
90
|
+
attachments: [{
|
|
91
|
+
color: '${{ steps.set_build_details.outputs.color }}',
|
|
92
|
+
fields: [
|
|
93
|
+
{
|
|
94
|
+
title: 'Build ${{ steps.set_build_details.outputs.status }}',
|
|
95
|
+
value: "<https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.event.commits[0].message }}>",
|
|
96
|
+
short: false,
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
title: 'Branch',
|
|
100
|
+
value: "${{ github.ref }}",
|
|
101
|
+
short: true,
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
title: 'Project',
|
|
105
|
+
value: "${{ github.event.repository.name }}",
|
|
106
|
+
short: true,
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
title: 'Commit',
|
|
110
|
+
value: "<${{ github.event.commits[0].url }}|${{ github.event.commits[0].id }}>",
|
|
111
|
+
short: false,
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
title: 'Author',
|
|
115
|
+
value: "${{ github.actor }}",
|
|
116
|
+
short: false,
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
title: 'Duration',
|
|
120
|
+
value: "${{ steps.set_build_details.outputs.time }}",
|
|
121
|
+
short: false,
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
}]
|
|
125
|
+
}
|
|
126
|
+
env:
|
|
127
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
128
|
+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
129
|
+
if: always()
|
package/.prettierignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function checkIfIsWorking(): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkIfIsWorking = checkIfIsWorking;
|
|
4
|
+
function checkIfIsWorking() {
|
|
5
|
+
console.log('I am working');
|
|
6
|
+
return 'I am working';
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2staWYtaXMtd29ya2luZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9jaGVjay1pZi1pcy13b3JraW5nLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsNENBR0M7QUFIRCxTQUFnQixnQkFBZ0I7SUFDOUIsT0FBTyxDQUFDLEdBQUcsQ0FBQyxjQUFjLENBQUMsQ0FBQztJQUM1QixPQUFPLGNBQWMsQ0FBQztBQUN4QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGZ1bmN0aW9uIGNoZWNrSWZJc1dvcmtpbmcoKSB7XG4gIGNvbnNvbGUubG9nKCdJIGFtIHdvcmtpbmcnKTtcbiAgcmV0dXJuICdJIGFtIHdvcmtpbmcnO1xufVxuIl19
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './check-if-is-working';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./check-if-is-working"), exports);
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLHdEQUFzQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vY2hlY2staWYtaXMtd29ya2luZyc7XG4iXX0=
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mecanizou/telemetry-hub",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Mecanizou telemetry lib",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"config": {
|
|
8
|
+
"commitizen": {
|
|
9
|
+
"path": "./node_modules/cz-conventional-changelog"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"@commitlint/cli": "^20.1.0",
|
|
14
|
+
"@commitlint/config-conventional": "^20.0.0",
|
|
15
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
16
|
+
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
17
|
+
"@semantic-release/git": "^10.0.1",
|
|
18
|
+
"@semantic-release/github": "^12.0.2",
|
|
19
|
+
"@semantic-release/npm": "^13.1.2",
|
|
20
|
+
"@semantic-release/release-notes-generator": "^14.1.0",
|
|
21
|
+
"commitizen": "^4.3.0",
|
|
22
|
+
"cz-conventional-changelog": "^3.3.0",
|
|
23
|
+
"eslint": "^9.39.0",
|
|
24
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
25
|
+
"prettier": "^3.6.2",
|
|
26
|
+
"semantic-release": "^25.0.2",
|
|
27
|
+
"vitest": "^4.0.13"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"axios": "^1.13.2"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"check": "npx prettier --check .",
|
|
34
|
+
"build": "tsc",
|
|
35
|
+
"fix": "npx prettier --write .",
|
|
36
|
+
"lint": "npx eslint .",
|
|
37
|
+
"test": "npm run test:common -- run",
|
|
38
|
+
"test:tsc": "npx tsc --noEmit",
|
|
39
|
+
"test:common": "npx vitest",
|
|
40
|
+
"test:verbose": "npm run test:common",
|
|
41
|
+
"test:coverage": "npm run test:common -- --coverage",
|
|
42
|
+
"test:watch": "npm run test:common -- --watch",
|
|
43
|
+
"test:debug": "node --inspect-brk -r ts-node/register node_modules/.bin/vitest --runInBand --no-cache --watch",
|
|
44
|
+
"prepublishOnly": "npm run build"
|
|
45
|
+
},
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "git+https://github.com/mecanizou-eco/telemetry-hub.git"
|
|
49
|
+
},
|
|
50
|
+
"author": "",
|
|
51
|
+
"license": "ISC",
|
|
52
|
+
"bugs": {
|
|
53
|
+
"url": "https://github.com/mecanizou-eco/telemetry-hub/issues"
|
|
54
|
+
},
|
|
55
|
+
"homepage": "https://github.com/mecanizou-eco/telemetry-hub#readme"
|
|
56
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
branches: [
|
|
3
|
+
'+([0-9])?(.{+([0-9]),x}).x',
|
|
4
|
+
'master',
|
|
5
|
+
'next',
|
|
6
|
+
{
|
|
7
|
+
name: 'beta',
|
|
8
|
+
prerelease: true,
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
name: 'alpha',
|
|
12
|
+
prerelease: true,
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
plugins: [
|
|
16
|
+
'@semantic-release/commit-analyzer',
|
|
17
|
+
'@semantic-release/release-notes-generator',
|
|
18
|
+
'@semantic-release/changelog',
|
|
19
|
+
'@semantic-release/npm',
|
|
20
|
+
'@semantic-release/git',
|
|
21
|
+
'@semantic-release/github',
|
|
22
|
+
],
|
|
23
|
+
};
|