Skip to content

Commit 8c72af5

Browse files
hello GCP connector
1 parent ada98f0 commit 8c72af5

File tree

11 files changed

+583
-0
lines changed

11 files changed

+583
-0
lines changed

package-lock.json

Lines changed: 442 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/connectors/gcp/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 elbWalker GmbH
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

packages/connectors/gcp/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# GCP connector for walkerOS
2+
3+
Made to be used with
4+
[node client](https://www.npmjs.com/package/@elbwalker/client-node) from
5+
[walkerOS](https://github.com/elbwalker/walkerOS).
6+
7+
More detailed information and examples can be found in the
8+
[documentation](https://www.elbwalker.com/docs/connectors/gcp).
9+
10+
## 🤓 Usage
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const commonConfig = require('@elbwalker/jest/node.config');
2+
3+
const config = {};
4+
5+
module.exports = { ...commonConfig, ...config };
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"name": "@elbwalker/connector-gcp",
3+
"description": "GCP connector for walkerOS",
4+
"version": "0.0.0",
5+
"license": "MIT",
6+
"main": "dist/index.js",
7+
"module": "dist/index.mjs",
8+
"types": "dist/index.d.ts",
9+
"files": [
10+
"dist/**",
11+
"CHANGELOG.md"
12+
],
13+
"scripts": {
14+
"build": "tsup",
15+
"build:dev": "tsup --config tsup.dev.config.ts",
16+
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
17+
"dev": "jest --watchAll --colors",
18+
"lint": "tsc && eslint \"**/*.ts*\"",
19+
"test": "jest --colors --coverage",
20+
"update": "npx npm-check-updates -u && npm update"
21+
},
22+
"dependencies": {
23+
"@elbwalker/walker.js": "3.1.0"
24+
},
25+
"devDependencies": {
26+
"@elbwalker/tsup": "0.0.1",
27+
"@elbwalker/types": "3.1.0",
28+
"@google-cloud/functions-framework": "^3.4.2"
29+
},
30+
"repository": {
31+
"url": "git+https://github.com/elbwalker/walkerOS.git",
32+
"directory": "packages/connectors/gcp"
33+
},
34+
"author": "elbwalker <[email protected]>",
35+
"homepage": "https://github.com/elbwalker/walkerOS#readme",
36+
"bugs": {
37+
"url": "https://github.com/elbwalker/walkerOS/issues"
38+
},
39+
"keywords": [
40+
"elb",
41+
"elbwalker",
42+
"walker",
43+
"walkerOS",
44+
"analytics",
45+
"tracking",
46+
"GCP",
47+
"Google Clout Platform"
48+
],
49+
"funding": [
50+
{
51+
"type": "GitHub Sponsors",
52+
"url": "https://github.com/sponsors/elbwalker"
53+
}
54+
]
55+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { connectorGCPHttpFunction } from '..';
2+
3+
describe('connector GCP', () => {
4+
beforeEach(() => {});
5+
6+
test('init new', () => {
7+
expect(connectorGCPHttpFunction).toBeDefined();
8+
});
9+
});
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import type { Request } from '@google-cloud/functions-framework';
2+
3+
export * as ConnectorGCP from './types';
4+
5+
export function connectorGCPHttpFunction(request: Request): undefined {
6+
console.log('🚀 ~ request:', request);
7+
return;
8+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import type { Request as GCPRequest } from '@google-cloud/functions-framework';
2+
3+
export type Request = GCPRequest;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "@elbwalker/tsconfig/node.json",
3+
"compilerOptions": {
4+
"outDir": "dist",
5+
"sourceMap": true
6+
},
7+
"exclude": ["node_modules", "dist", "**/*.test.*"]
8+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { config, defineConfig } from '@elbwalker/tsup';
2+
3+
export default defineConfig([
4+
// Modules
5+
{
6+
...config,
7+
dts: true,
8+
format: ['cjs', 'esm'],
9+
sourcemap: true,
10+
},
11+
]);

0 commit comments

Comments
 (0)