@blokjs/trigger-pubsub 0.2.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/CHANGELOG.md +22 -0
- package/dist/PubSubTrigger.d.ts +116 -0
- package/dist/PubSubTrigger.js +219 -0
- package/dist/adapters/AWSSNSAdapter.d.ts +67 -0
- package/dist/adapters/AWSSNSAdapter.js +257 -0
- package/dist/adapters/AzureServiceBusAdapter.d.ts +55 -0
- package/dist/adapters/AzureServiceBusAdapter.js +229 -0
- package/dist/adapters/GCPPubSubAdapter.d.ts +59 -0
- package/dist/adapters/GCPPubSubAdapter.js +201 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.js +64 -0
- package/package.json +53 -0
- package/src/PubSubTrigger.test.ts +151 -0
- package/src/PubSubTrigger.ts +337 -0
- package/src/adapters/AWSSNSAdapter.ts +258 -0
- package/src/adapters/AzureServiceBusAdapter.ts +220 -0
- package/src/adapters/GCPPubSubAdapter.ts +196 -0
- package/src/index.ts +68 -0
- package/template/.env.example +8 -0
- package/template/package.json +44 -0
- package/template/src/Nodes.ts +10 -0
- package/template/src/Workflows.ts +8 -0
- package/template/src/index.ts +41 -0
- package/template/src/runner/PubSubServer.ts +39 -0
- package/template/src/runner/types/Workflows.ts +7 -0
- package/template/src/workflows/messages/on-message.ts +44 -0
- package/template/tsconfig.json +31 -0
- package/template/vitest.config.ts +39 -0
- package/tsconfig.json +32 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ts-node": {
|
|
3
|
+
"transpileOnly": true
|
|
4
|
+
},
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"target": "ES2022",
|
|
7
|
+
"module": "es2022",
|
|
8
|
+
"moduleResolution": "bundler",
|
|
9
|
+
"rootDir": "./src",
|
|
10
|
+
"baseUrl": ".",
|
|
11
|
+
"paths": {
|
|
12
|
+
"@nodes/*": ["./src/nodes/*"],
|
|
13
|
+
"@src/*": ["src/*"]
|
|
14
|
+
},
|
|
15
|
+
"allowJs": true,
|
|
16
|
+
"declaration": true,
|
|
17
|
+
"declarationMap": true,
|
|
18
|
+
"sourceMap": true,
|
|
19
|
+
"outDir": "./dist",
|
|
20
|
+
"esModuleInterop": true,
|
|
21
|
+
"forceConsistentCasingInFileNames": true,
|
|
22
|
+
"strict": true,
|
|
23
|
+
"noUnusedLocals": true,
|
|
24
|
+
"noImplicitReturns": true,
|
|
25
|
+
"skipLibCheck": true,
|
|
26
|
+
"resolveJsonModule": true
|
|
27
|
+
},
|
|
28
|
+
"compileOnSave": true,
|
|
29
|
+
"include": ["./src", "./src/nodes/**/*.json", "./src/nodes/**/*.md"],
|
|
30
|
+
"exclude": ["src/nodes/**/test/*.ts", "**/*.test.ts", "node_modules", "dist"]
|
|
31
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { defineConfig } from "vitest/config";
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
test: {
|
|
6
|
+
globals: true,
|
|
7
|
+
environment: "node",
|
|
8
|
+
coverage: {
|
|
9
|
+
provider: "istanbul",
|
|
10
|
+
reporter: ["text", "json", "html", "lcov"],
|
|
11
|
+
exclude: [
|
|
12
|
+
"node_modules/",
|
|
13
|
+
"dist/",
|
|
14
|
+
"**/*.d.ts",
|
|
15
|
+
"**/*.config.ts",
|
|
16
|
+
"__tests__/",
|
|
17
|
+
"src/nodes/",
|
|
18
|
+
"src/workflows/",
|
|
19
|
+
"src/runner/types/",
|
|
20
|
+
"src/runner/metrics/",
|
|
21
|
+
],
|
|
22
|
+
thresholds: {
|
|
23
|
+
lines: 90,
|
|
24
|
+
functions: 90,
|
|
25
|
+
branches: 85,
|
|
26
|
+
statements: 90,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
include: ["__tests__/**/*.test.ts"],
|
|
30
|
+
exclude: ["node_modules", "dist"],
|
|
31
|
+
testTimeout: 10000,
|
|
32
|
+
hookTimeout: 10000,
|
|
33
|
+
},
|
|
34
|
+
resolve: {
|
|
35
|
+
alias: {
|
|
36
|
+
"@": path.resolve(__dirname, "./src"),
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
});
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ts-node": {
|
|
3
|
+
"transpileOnly": true
|
|
4
|
+
},
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"target": "ES2022",
|
|
7
|
+
"module": "es2022",
|
|
8
|
+
"lib": ["ES2022"],
|
|
9
|
+
"declaration": true,
|
|
10
|
+
"strict": true,
|
|
11
|
+
"noImplicitAny": true,
|
|
12
|
+
"strictNullChecks": true,
|
|
13
|
+
"noImplicitThis": true,
|
|
14
|
+
"alwaysStrict": true,
|
|
15
|
+
"noUnusedLocals": false,
|
|
16
|
+
"noUnusedParameters": false,
|
|
17
|
+
"noImplicitReturns": true,
|
|
18
|
+
"noFallthroughCasesInSwitch": false,
|
|
19
|
+
"inlineSourceMap": true,
|
|
20
|
+
"inlineSources": true,
|
|
21
|
+
"experimentalDecorators": true,
|
|
22
|
+
"emitDecoratorMetadata": true,
|
|
23
|
+
"skipLibCheck": true,
|
|
24
|
+
"esModuleInterop": true,
|
|
25
|
+
"resolveJsonModule": true,
|
|
26
|
+
"outDir": "./dist",
|
|
27
|
+
"rootDir": "./src",
|
|
28
|
+
"moduleResolution": "bundler"
|
|
29
|
+
},
|
|
30
|
+
"include": ["src/**/*"],
|
|
31
|
+
"exclude": ["node_modules", "dist", "**/*.test.ts"]
|
|
32
|
+
}
|