@pipeline-builder/api-core 0.0.1
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/LICENSE +202 -0
- package/README.md +98 -0
- package/lib/constants/ai-providers.d.ts +52 -0
- package/lib/constants/ai-providers.js +129 -0
- package/lib/constants/http-status.d.ts +20 -0
- package/lib/constants/http-status.js +26 -0
- package/lib/constants/index.d.ts +3 -0
- package/lib/constants/index.js +6 -0
- package/lib/constants/time.d.ts +10 -0
- package/lib/constants/time.js +13 -0
- package/lib/errors/app-errors.d.ts +30 -0
- package/lib/errors/app-errors.js +53 -0
- package/lib/errors/index.d.ts +1 -0
- package/lib/errors/index.js +4 -0
- package/lib/helpers/access-helpers.d.ts +63 -0
- package/lib/helpers/access-helpers.js +82 -0
- package/lib/helpers/crud-helpers.d.ts +9 -0
- package/lib/helpers/crud-helpers.js +23 -0
- package/lib/helpers/index.d.ts +6 -0
- package/lib/helpers/index.js +9 -0
- package/lib/helpers/org-hierarchy-http.d.ts +74 -0
- package/lib/helpers/org-hierarchy-http.js +144 -0
- package/lib/helpers/org-hierarchy.d.ts +57 -0
- package/lib/helpers/org-hierarchy.js +110 -0
- package/lib/helpers/restore-helpers.d.ts +49 -0
- package/lib/helpers/restore-helpers.js +78 -0
- package/lib/helpers/sse-helpers.d.ts +20 -0
- package/lib/helpers/sse-helpers.js +45 -0
- package/lib/index.d.ts +58 -0
- package/lib/index.js +71 -0
- package/lib/middleware/auth.d.ts +208 -0
- package/lib/middleware/auth.js +588 -0
- package/lib/middleware/index.d.ts +3 -0
- package/lib/middleware/index.js +6 -0
- package/lib/middleware/mongo-sanitize.d.ts +32 -0
- package/lib/middleware/mongo-sanitize.js +100 -0
- package/lib/middleware/step-up.d.ts +45 -0
- package/lib/middleware/step-up.js +138 -0
- package/lib/openapi/extend-zod.d.ts +1 -0
- package/lib/openapi/extend-zod.js +6 -0
- package/lib/openapi/index.d.ts +2 -0
- package/lib/openapi/index.js +5 -0
- package/lib/openapi/registry.d.ts +17 -0
- package/lib/openapi/registry.js +38 -0
- package/lib/openapi/routes/ask-routes.d.ts +7 -0
- package/lib/openapi/routes/ask-routes.js +62 -0
- package/lib/openapi/routes/billing-routes.d.ts +1 -0
- package/lib/openapi/routes/billing-routes.js +66 -0
- package/lib/openapi/routes/image-registry-routes.d.ts +7 -0
- package/lib/openapi/routes/image-registry-routes.js +98 -0
- package/lib/openapi/routes/index.d.ts +5 -0
- package/lib/openapi/routes/index.js +28 -0
- package/lib/openapi/routes/message-routes.d.ts +1 -0
- package/lib/openapi/routes/message-routes.js +105 -0
- package/lib/openapi/routes/pipeline-routes.d.ts +1 -0
- package/lib/openapi/routes/pipeline-routes.js +105 -0
- package/lib/openapi/routes/pipeline-template-routes.d.ts +1 -0
- package/lib/openapi/routes/pipeline-template-routes.js +61 -0
- package/lib/openapi/routes/plugin-routes.d.ts +1 -0
- package/lib/openapi/routes/plugin-routes.js +96 -0
- package/lib/openapi/routes/quota-routes.d.ts +1 -0
- package/lib/openapi/routes/quota-routes.js +62 -0
- package/lib/openapi/schema-registry.d.ts +25 -0
- package/lib/openapi/schema-registry.js +91 -0
- package/lib/routes/health.d.ts +41 -0
- package/lib/routes/health.js +82 -0
- package/lib/routes/index.d.ts +1 -0
- package/lib/routes/index.js +4 -0
- package/lib/services/audit-spool.d.ts +80 -0
- package/lib/services/audit-spool.js +172 -0
- package/lib/services/cache-service.d.ts +124 -0
- package/lib/services/cache-service.js +276 -0
- package/lib/services/circuit-breaker.d.ts +45 -0
- package/lib/services/circuit-breaker.js +138 -0
- package/lib/services/compliance-client.d.ts +46 -0
- package/lib/services/compliance-client.js +128 -0
- package/lib/services/compliance-event-subscriber.d.ts +16 -0
- package/lib/services/compliance-event-subscriber.js +72 -0
- package/lib/services/durable-event-bus.d.ts +96 -0
- package/lib/services/durable-event-bus.js +204 -0
- package/lib/services/entity-events.d.ts +48 -0
- package/lib/services/entity-events.js +79 -0
- package/lib/services/env-redis.d.ts +44 -0
- package/lib/services/env-redis.js +94 -0
- package/lib/services/http-client.d.ts +143 -0
- package/lib/services/http-client.js +335 -0
- package/lib/services/index.d.ts +18 -0
- package/lib/services/index.js +20 -0
- package/lib/services/leader-lock.d.ts +45 -0
- package/lib/services/leader-lock.js +85 -0
- package/lib/services/quota.d.ts +130 -0
- package/lib/services/quota.js +264 -0
- package/lib/services/remote-audit-client.d.ts +160 -0
- package/lib/services/remote-audit-client.js +390 -0
- package/lib/services/retry-strategy.d.ts +74 -0
- package/lib/services/retry-strategy.js +118 -0
- package/lib/services/scheduler.d.ts +41 -0
- package/lib/services/scheduler.js +86 -0
- package/lib/services/service-boot.d.ts +20 -0
- package/lib/services/service-boot.js +28 -0
- package/lib/services/sse-ticket-store.d.ts +51 -0
- package/lib/services/sse-ticket-store.js +130 -0
- package/lib/services/token-revocation.d.ts +52 -0
- package/lib/services/token-revocation.js +120 -0
- package/lib/testing/tier-mock.d.ts +44 -0
- package/lib/testing/tier-mock.js +65 -0
- package/lib/types/audit-events.d.ts +69 -0
- package/lib/types/audit-events.js +4 -0
- package/lib/types/catalog-metadata.d.ts +36 -0
- package/lib/types/catalog-metadata.js +21 -0
- package/lib/types/common.d.ts +255 -0
- package/lib/types/common.js +41 -0
- package/lib/types/error-codes.d.ts +54 -0
- package/lib/types/error-codes.js +107 -0
- package/lib/types/feature-flags.d.ts +36 -0
- package/lib/types/feature-flags.js +128 -0
- package/lib/types/http.d.ts +27 -0
- package/lib/types/http.js +4 -0
- package/lib/types/index.d.ts +11 -0
- package/lib/types/index.js +14 -0
- package/lib/types/permissions.d.ts +65 -0
- package/lib/types/permissions.js +131 -0
- package/lib/types/pipeline-template.d.ts +30 -0
- package/lib/types/pipeline-template.js +13 -0
- package/lib/types/pipeline.d.ts +59 -0
- package/lib/types/pipeline.js +31 -0
- package/lib/types/quota-tiers.d.ts +79 -0
- package/lib/types/quota-tiers.js +221 -0
- package/lib/types/visibility.d.ts +20 -0
- package/lib/types/visibility.js +22 -0
- package/lib/utils/alias-resolver.d.ts +37 -0
- package/lib/utils/alias-resolver.js +68 -0
- package/lib/utils/audit.d.ts +15 -0
- package/lib/utils/audit.js +39 -0
- package/lib/utils/aws-scrub.d.ts +11 -0
- package/lib/utils/aws-scrub.js +67 -0
- package/lib/utils/compliance-attributes.d.ts +6 -0
- package/lib/utils/compliance-attributes.js +69 -0
- package/lib/utils/concurrency.d.ts +9 -0
- package/lib/utils/concurrency.js +29 -0
- package/lib/utils/crash-handlers.d.ts +18 -0
- package/lib/utils/crash-handlers.js +36 -0
- package/lib/utils/env.d.ts +28 -0
- package/lib/utils/env.js +54 -0
- package/lib/utils/headers.d.ts +18 -0
- package/lib/utils/headers.js +21 -0
- package/lib/utils/identity.d.ts +40 -0
- package/lib/utils/identity.js +51 -0
- package/lib/utils/index.d.ts +17 -0
- package/lib/utils/index.js +20 -0
- package/lib/utils/logger.d.ts +38 -0
- package/lib/utils/logger.js +174 -0
- package/lib/utils/metric-emitter.d.ts +36 -0
- package/lib/utils/metric-emitter.js +32 -0
- package/lib/utils/object.d.ts +13 -0
- package/lib/utils/object.js +18 -0
- package/lib/utils/params.d.ts +150 -0
- package/lib/utils/params.js +206 -0
- package/lib/utils/response.d.ts +117 -0
- package/lib/utils/response.js +223 -0
- package/lib/utils/safe-require.d.ts +13 -0
- package/lib/utils/safe-require.js +19 -0
- package/lib/utils/secret-encryption.d.ts +176 -0
- package/lib/utils/secret-encryption.js +374 -0
- package/lib/utils/ssrf.d.ts +30 -0
- package/lib/utils/ssrf.js +106 -0
- package/lib/validation/ai-schemas.d.ts +56 -0
- package/lib/validation/ai-schemas.js +78 -0
- package/lib/validation/common-schemas.d.ts +133 -0
- package/lib/validation/common-schemas.js +94 -0
- package/lib/validation/index.d.ts +7 -0
- package/lib/validation/index.js +10 -0
- package/lib/validation/message-schemas.d.ts +160 -0
- package/lib/validation/message-schemas.js +156 -0
- package/lib/validation/middleware.d.ts +72 -0
- package/lib/validation/middleware.js +65 -0
- package/lib/validation/pipeline-schemas.d.ts +181 -0
- package/lib/validation/pipeline-schemas.js +101 -0
- package/lib/validation/pipeline-template-schemas.d.ts +155 -0
- package/lib/validation/pipeline-template-schemas.js +66 -0
- package/lib/validation/plugin-schemas.d.ts +171 -0
- package/lib/validation/plugin-schemas.js +81 -0
- package/openapi.yaml +292 -0
- package/package.json +167 -0
package/package.json
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pipeline-builder/api-core",
|
|
3
|
+
"description": "Core server-side utilities (auth middleware, response helpers, error codes, quota service, HTTP client, logging, AI provider catalog) shared by every Pipeline Builder backend service.",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "git+https://github.com/mwashburn160/pipeline-builder.git"
|
|
7
|
+
},
|
|
8
|
+
"devDependencies": {
|
|
9
|
+
"@jest/globals": "30.4.1",
|
|
10
|
+
"@stylistic/eslint-plugin": "^2",
|
|
11
|
+
"@types/express": "5.0.6",
|
|
12
|
+
"@types/jsonwebtoken": "9.0.10",
|
|
13
|
+
"@types/node": "26.1.2",
|
|
14
|
+
"@typescript-eslint/eslint-plugin": "^8",
|
|
15
|
+
"@typescript-eslint/parser": "^8",
|
|
16
|
+
"@typescript/native": "npm:typescript@^7.0.2",
|
|
17
|
+
"eslint": "^9",
|
|
18
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
19
|
+
"eslint-plugin-import": "^2.32.0",
|
|
20
|
+
"jest": "30.4.2",
|
|
21
|
+
"jest-junit": "^17",
|
|
22
|
+
"ts-jest": "29.4.12",
|
|
23
|
+
"typescript": "npm:@typescript/typescript6@^6.0.2"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@asteasolutions/zod-to-openapi": "9.1.0",
|
|
27
|
+
"@aws-sdk/client-kms": "3.1101.0",
|
|
28
|
+
"@aws-sdk/client-sts": "3.1101.0",
|
|
29
|
+
"@aws-sdk/credential-providers": "3.1101.0",
|
|
30
|
+
"express": "5.2.1",
|
|
31
|
+
"ioredis": "6.0.0",
|
|
32
|
+
"jsonwebtoken": "9.0.3",
|
|
33
|
+
"winston": "3.19.0",
|
|
34
|
+
"zod": "4.4.3"
|
|
35
|
+
},
|
|
36
|
+
"keywords": [
|
|
37
|
+
"ci-cd",
|
|
38
|
+
"cicd",
|
|
39
|
+
"continuous-delivery",
|
|
40
|
+
"devops",
|
|
41
|
+
"self-service",
|
|
42
|
+
"platform-engineering",
|
|
43
|
+
"internal-developer-platform",
|
|
44
|
+
"developer-platform",
|
|
45
|
+
"aws",
|
|
46
|
+
"aws-cdk",
|
|
47
|
+
"cdk",
|
|
48
|
+
"codepipeline",
|
|
49
|
+
"codebuild",
|
|
50
|
+
"cloudformation",
|
|
51
|
+
"pipeline",
|
|
52
|
+
"pipeline-as-code",
|
|
53
|
+
"infrastructure-as-code",
|
|
54
|
+
"iac",
|
|
55
|
+
"compliance",
|
|
56
|
+
"policy-as-code",
|
|
57
|
+
"governance",
|
|
58
|
+
"golden-paths",
|
|
59
|
+
"multi-tenant",
|
|
60
|
+
"rbac",
|
|
61
|
+
"ai",
|
|
62
|
+
"ai-pipeline-generation",
|
|
63
|
+
"llm",
|
|
64
|
+
"bedrock",
|
|
65
|
+
"plugins",
|
|
66
|
+
"plugin-marketplace",
|
|
67
|
+
"containerized",
|
|
68
|
+
"docker",
|
|
69
|
+
"kubernetes",
|
|
70
|
+
"typescript",
|
|
71
|
+
"cli"
|
|
72
|
+
],
|
|
73
|
+
"engines": {
|
|
74
|
+
"node": ">= 24.14.0"
|
|
75
|
+
},
|
|
76
|
+
"devEngines": {
|
|
77
|
+
"packageManager": {
|
|
78
|
+
"name": "pnpm",
|
|
79
|
+
"version": ">=10",
|
|
80
|
+
"onFail": "ignore"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"main": "lib/index.js",
|
|
84
|
+
"license": "Apache-2.0",
|
|
85
|
+
"homepage": "https://mwashburn160.github.io/pipeline-builder/",
|
|
86
|
+
"publishConfig": {
|
|
87
|
+
"access": "public",
|
|
88
|
+
"registry": "https://registry.npmjs.org/"
|
|
89
|
+
},
|
|
90
|
+
"version": "0.0.1",
|
|
91
|
+
"bugs": {
|
|
92
|
+
"url": "https://github.com/mwashburn160/pipeline-builder/issues"
|
|
93
|
+
},
|
|
94
|
+
"jest": {
|
|
95
|
+
"coverageProvider": "v8",
|
|
96
|
+
"testMatch": [
|
|
97
|
+
"<rootDir>/@(src|test)/**/*(*.)@(spec|test).ts?(x)",
|
|
98
|
+
"<rootDir>/@(src|test)/**/__tests__/**/*.ts?(x)"
|
|
99
|
+
],
|
|
100
|
+
"clearMocks": true,
|
|
101
|
+
"collectCoverage": true,
|
|
102
|
+
"coverageReporters": [
|
|
103
|
+
"json",
|
|
104
|
+
"lcov",
|
|
105
|
+
"clover",
|
|
106
|
+
"cobertura",
|
|
107
|
+
"text"
|
|
108
|
+
],
|
|
109
|
+
"coverageDirectory": "coverage",
|
|
110
|
+
"coveragePathIgnorePatterns": [
|
|
111
|
+
"/node_modules/"
|
|
112
|
+
],
|
|
113
|
+
"testPathIgnorePatterns": [
|
|
114
|
+
"/node_modules/"
|
|
115
|
+
],
|
|
116
|
+
"watchPathIgnorePatterns": [
|
|
117
|
+
"/node_modules/"
|
|
118
|
+
],
|
|
119
|
+
"reporters": [
|
|
120
|
+
"default",
|
|
121
|
+
[
|
|
122
|
+
"jest-junit",
|
|
123
|
+
{
|
|
124
|
+
"outputDirectory": "test-reports"
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
],
|
|
128
|
+
"transform": {
|
|
129
|
+
"^.+\\.[t]sx?$": [
|
|
130
|
+
"ts-jest",
|
|
131
|
+
{
|
|
132
|
+
"useESM": true,
|
|
133
|
+
"tsconfig": "tsconfig.dev.json",
|
|
134
|
+
"diagnostics": {
|
|
135
|
+
"ignoreCodes": [
|
|
136
|
+
151002
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
"extensionsToTreatAsEsm": [
|
|
143
|
+
".ts",
|
|
144
|
+
".tsx"
|
|
145
|
+
],
|
|
146
|
+
"moduleNameMapper": {
|
|
147
|
+
"^uuid$": "<rootDir>/../../jest-uuid-stub.js",
|
|
148
|
+
"^(\\.{1,2}/.*)\\.js$": "$1"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"types": "lib/index.d.ts",
|
|
152
|
+
"type": "module",
|
|
153
|
+
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"pnpm dlx projen\".",
|
|
154
|
+
"scripts": {
|
|
155
|
+
"build": "pnpm dlx projen build",
|
|
156
|
+
"compile": "pnpm dlx projen compile",
|
|
157
|
+
"default": "pnpm dlx projen default",
|
|
158
|
+
"eslint": "pnpm dlx projen eslint",
|
|
159
|
+
"package": "pnpm dlx projen package",
|
|
160
|
+
"post-compile": "pnpm dlx projen post-compile",
|
|
161
|
+
"pre-compile": "pnpm dlx projen pre-compile",
|
|
162
|
+
"test": "pnpm dlx projen test",
|
|
163
|
+
"test:watch": "pnpm dlx projen test:watch",
|
|
164
|
+
"watch": "pnpm dlx projen watch",
|
|
165
|
+
"projen": "pnpm dlx projen"
|
|
166
|
+
}
|
|
167
|
+
}
|