@venturekit/core 0.0.0-dev.20260701100017 → 0.0.0-dev.20260704225856
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/README.md +9 -25
- package/dist/auth-attributes.d.ts +48 -0
- package/dist/auth-attributes.d.ts.map +1 -0
- package/dist/auth-attributes.js +67 -0
- package/dist/auth-attributes.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/resolve.d.ts +2 -3
- package/dist/resolve.d.ts.map +1 -1
- package/dist/resolve.js +2 -5
- package/dist/resolve.js.map +1 -1
- package/dist/types/api.d.ts +16 -0
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/base.d.ts +2 -2
- package/dist/types/base.js +1 -1
- package/dist/types/env.d.ts +7 -1
- package/dist/types/env.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/intents.d.ts +183 -7
- package/dist/types/intents.d.ts.map +1 -1
- package/dist/types/resolved.d.ts +1 -6
- package/dist/types/resolved.d.ts.map +1 -1
- package/dist/types/resolved.js +1 -1
- package/dist/validate.d.ts +0 -5
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +0 -38
- package/dist/validate.js.map +1 -1
- package/package.json +6 -2
- package/dist/types/security.d.ts +0 -55
- package/dist/types/security.d.ts.map +0 -1
- package/dist/types/security.js +0 -8
- package/dist/types/security.js.map +0 -1
package/README.md
CHANGED
|
@@ -14,9 +14,9 @@ npm install @venturekit/core@dev
|
|
|
14
14
|
|
|
15
15
|
`@venturekit/core` is the foundation of the VentureKit framework. It provides:
|
|
16
16
|
|
|
17
|
-
- **Type definitions** for all configuration layers (base,
|
|
17
|
+
- **Type definitions** for all configuration layers (base, environment)
|
|
18
18
|
- **Presets** for quick environment sizing (`nano`, `micro`, `medium`, `large`)
|
|
19
|
-
- **Configuration resolution** that merges base +
|
|
19
|
+
- **Configuration resolution** that merges base + environment into a single resolved config
|
|
20
20
|
- **Validation** utilities for all configuration types
|
|
21
21
|
- **Infrastructure intent types** for declarative resource provisioning
|
|
22
22
|
|
|
@@ -29,9 +29,13 @@ VentureKit uses a layered configuration system:
|
|
|
29
29
|
| Layer | Purpose | Changes per environment? |
|
|
30
30
|
|-------|---------|--------------------------|
|
|
31
31
|
| `BaseConfig` | Project identity (name, region) | No |
|
|
32
|
-
| `SecurityConfig` | OAuth scopes, app clients | No |
|
|
33
32
|
| `EnvConfigInput` | Resource sizing, scaling | Yes |
|
|
34
33
|
|
|
34
|
+
Authentication pools and app clients are declared as `auth` intents in
|
|
35
|
+
`vk.config.ts` (see Infrastructure Intents below). Authorization scopes
|
|
36
|
+
are enforced server-side by `@venturekit/runtime`'s scope gate — they
|
|
37
|
+
are application policy, not project configuration.
|
|
38
|
+
|
|
35
39
|
### Base Config
|
|
36
40
|
|
|
37
41
|
```typescript
|
|
@@ -44,26 +48,6 @@ const base: BaseConfig = {
|
|
|
44
48
|
};
|
|
45
49
|
```
|
|
46
50
|
|
|
47
|
-
### Security Config
|
|
48
|
-
|
|
49
|
-
```typescript
|
|
50
|
-
import type { SecurityConfig } from '@venturekit/core';
|
|
51
|
-
|
|
52
|
-
const security: SecurityConfig = {
|
|
53
|
-
scopes: [
|
|
54
|
-
{ name: 'api.read', description: 'Read API data' },
|
|
55
|
-
{ name: 'api.write', description: 'Write API data' },
|
|
56
|
-
],
|
|
57
|
-
appClients: [
|
|
58
|
-
{
|
|
59
|
-
name: 'web-app',
|
|
60
|
-
allowedScopes: ['api.read', 'api.write'],
|
|
61
|
-
supportsRefreshTokens: true,
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
};
|
|
65
|
-
```
|
|
66
|
-
|
|
67
51
|
### Environment Config
|
|
68
52
|
|
|
69
53
|
```typescript
|
|
@@ -96,14 +80,14 @@ const preset = getPreset('nano'); // Returns full PresetConfig
|
|
|
96
80
|
```typescript
|
|
97
81
|
import { resolveConfig } from '@venturekit/core';
|
|
98
82
|
|
|
99
|
-
const resolved = resolveConfig(base,
|
|
83
|
+
const resolved = resolveConfig(base, 'dev', devEnvInput);
|
|
100
84
|
// Returns a fully resolved ResolvedConfig with no undefined values
|
|
101
85
|
```
|
|
102
86
|
|
|
103
87
|
## Validation
|
|
104
88
|
|
|
105
89
|
```typescript
|
|
106
|
-
import { validateBaseConfig,
|
|
90
|
+
import { validateBaseConfig, assertValid } from '@venturekit/core';
|
|
107
91
|
|
|
108
92
|
const result = validateBaseConfig(base);
|
|
109
93
|
assertValid(result); // Throws if invalid
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature-implied Cognito custom attributes.
|
|
3
|
+
*
|
|
4
|
+
* Several VentureKit features read or write `custom:*` attributes at
|
|
5
|
+
* runtime and therefore need them DECLARED on the user pool schema —
|
|
6
|
+
* an undeclared custom attribute makes real Cognito reject the write
|
|
7
|
+
* with `InvalidParameterException` (cognito-local is permissive, so
|
|
8
|
+
* the mismatch only surfaces in production). Consumers shouldn't have
|
|
9
|
+
* to know that contract; declaring the feature implies the schema.
|
|
10
|
+
*
|
|
11
|
+
* Rules (all additive, deduplicated, user-declared names first):
|
|
12
|
+
*
|
|
13
|
+
* - single-tenant pools → `role`
|
|
14
|
+
* The conventional single-valued role claim every non-tenant
|
|
15
|
+
* consumer ends up declaring.
|
|
16
|
+
* - `federated: [<p>, …]` → `federated_provider` + `<p>Sub` per provider
|
|
17
|
+
* `signInAsFederatedUser` unconditionally records
|
|
18
|
+
* `custom:federated_provider` on first creation, and apps store
|
|
19
|
+
* the provider's stable subject (`profile.externalId`) in
|
|
20
|
+
* `custom:<provider>Sub` (e.g. `linkedinSub`) via
|
|
21
|
+
* `initialCustomAttributes`.
|
|
22
|
+
* - `tenancy: true` → `tenantId` + `tenantRoles`, REPLACING `role`
|
|
23
|
+
* In a multi-tenant pool roles are per tenant — the packed
|
|
24
|
+
* `custom:tenantRoles` map (read by `@venturekit-pro/tenancy`'s
|
|
25
|
+
* tenant-user-scopes middleware) subsumes the single-valued
|
|
26
|
+
* claim, and a lone `custom:role` is a cross-tenant confusion
|
|
27
|
+
* hazard. Multi-tenant apps that still want it can declare
|
|
28
|
+
* `role` explicitly in `customAttributes`.
|
|
29
|
+
*
|
|
30
|
+
* Applied once, inside `defineVenture()`'s `_resolveInfrastructure`,
|
|
31
|
+
* so every consumer of the resolved intent — the CDK identity stack,
|
|
32
|
+
* `vk dev`'s cognito-local provisioning, the dev Cognito UI — sees
|
|
33
|
+
* the same effective schema. Cognito custom attributes can be ADDED
|
|
34
|
+
* to an existing pool but never removed or altered, so widening the
|
|
35
|
+
* list is always a safe, non-replacing update.
|
|
36
|
+
*/
|
|
37
|
+
import type { AuthIntent } from './types/intents.js';
|
|
38
|
+
/**
|
|
39
|
+
* Compute the effective `customAttributes` for an auth intent:
|
|
40
|
+
* the user-declared list plus every feature-implied attribute,
|
|
41
|
+
* order-stable and deduplicated. Redeclaring an implied name (or
|
|
42
|
+
* duplicating one within `customAttributes`) is never an error —
|
|
43
|
+
* first occurrence wins, the rest are ignored, so a Cognito schema
|
|
44
|
+
* never sees the same attribute twice. Pure — the input intent is
|
|
45
|
+
* not mutated.
|
|
46
|
+
*/
|
|
47
|
+
export declare function resolveAuthCustomAttributes(intent: AuthIntent): string[];
|
|
48
|
+
//# sourceMappingURL=auth-attributes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-attributes.d.ts","sourceRoot":"","sources":["../src/auth-attributes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,EAAE,CAmBxE"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature-implied Cognito custom attributes.
|
|
3
|
+
*
|
|
4
|
+
* Several VentureKit features read or write `custom:*` attributes at
|
|
5
|
+
* runtime and therefore need them DECLARED on the user pool schema —
|
|
6
|
+
* an undeclared custom attribute makes real Cognito reject the write
|
|
7
|
+
* with `InvalidParameterException` (cognito-local is permissive, so
|
|
8
|
+
* the mismatch only surfaces in production). Consumers shouldn't have
|
|
9
|
+
* to know that contract; declaring the feature implies the schema.
|
|
10
|
+
*
|
|
11
|
+
* Rules (all additive, deduplicated, user-declared names first):
|
|
12
|
+
*
|
|
13
|
+
* - single-tenant pools → `role`
|
|
14
|
+
* The conventional single-valued role claim every non-tenant
|
|
15
|
+
* consumer ends up declaring.
|
|
16
|
+
* - `federated: [<p>, …]` → `federated_provider` + `<p>Sub` per provider
|
|
17
|
+
* `signInAsFederatedUser` unconditionally records
|
|
18
|
+
* `custom:federated_provider` on first creation, and apps store
|
|
19
|
+
* the provider's stable subject (`profile.externalId`) in
|
|
20
|
+
* `custom:<provider>Sub` (e.g. `linkedinSub`) via
|
|
21
|
+
* `initialCustomAttributes`.
|
|
22
|
+
* - `tenancy: true` → `tenantId` + `tenantRoles`, REPLACING `role`
|
|
23
|
+
* In a multi-tenant pool roles are per tenant — the packed
|
|
24
|
+
* `custom:tenantRoles` map (read by `@venturekit-pro/tenancy`'s
|
|
25
|
+
* tenant-user-scopes middleware) subsumes the single-valued
|
|
26
|
+
* claim, and a lone `custom:role` is a cross-tenant confusion
|
|
27
|
+
* hazard. Multi-tenant apps that still want it can declare
|
|
28
|
+
* `role` explicitly in `customAttributes`.
|
|
29
|
+
*
|
|
30
|
+
* Applied once, inside `defineVenture()`'s `_resolveInfrastructure`,
|
|
31
|
+
* so every consumer of the resolved intent — the CDK identity stack,
|
|
32
|
+
* `vk dev`'s cognito-local provisioning, the dev Cognito UI — sees
|
|
33
|
+
* the same effective schema. Cognito custom attributes can be ADDED
|
|
34
|
+
* to an existing pool but never removed or altered, so widening the
|
|
35
|
+
* list is always a safe, non-replacing update.
|
|
36
|
+
*/
|
|
37
|
+
/**
|
|
38
|
+
* Compute the effective `customAttributes` for an auth intent:
|
|
39
|
+
* the user-declared list plus every feature-implied attribute,
|
|
40
|
+
* order-stable and deduplicated. Redeclaring an implied name (or
|
|
41
|
+
* duplicating one within `customAttributes`) is never an error —
|
|
42
|
+
* first occurrence wins, the rest are ignored, so a Cognito schema
|
|
43
|
+
* never sees the same attribute twice. Pure — the input intent is
|
|
44
|
+
* not mutated.
|
|
45
|
+
*/
|
|
46
|
+
export function resolveAuthCustomAttributes(intent) {
|
|
47
|
+
const out = [];
|
|
48
|
+
const add = (name) => {
|
|
49
|
+
if (!out.includes(name))
|
|
50
|
+
out.push(name);
|
|
51
|
+
};
|
|
52
|
+
for (const name of intent.customAttributes ?? [])
|
|
53
|
+
add(name);
|
|
54
|
+
if (!intent.tenancy)
|
|
55
|
+
add('role');
|
|
56
|
+
const federated = intent.federated ?? [];
|
|
57
|
+
if (federated.length > 0)
|
|
58
|
+
add('federated_provider');
|
|
59
|
+
for (const provider of federated)
|
|
60
|
+
add(`${provider}Sub`);
|
|
61
|
+
if (intent.tenancy) {
|
|
62
|
+
add('tenantId');
|
|
63
|
+
add('tenantRoles');
|
|
64
|
+
}
|
|
65
|
+
return out;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=auth-attributes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-attributes.js","sourceRoot":"","sources":["../src/auth-attributes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAIH;;;;;;;;GAQG;AACH,MAAM,UAAU,2BAA2B,CAAC,MAAkB;IAC5D,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,MAAM,GAAG,GAAG,CAAC,IAAY,EAAQ,EAAE;QACjC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;YAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC,CAAC;IACF,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,gBAAgB,IAAI,EAAE;QAAE,GAAG,CAAC,IAAI,CAAC,CAAC;IAE5D,IAAI,CAAC,MAAM,CAAC,OAAO;QAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAEjC,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC;IACzC,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC;QAAE,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACpD,KAAK,MAAM,QAAQ,IAAI,SAAS;QAAE,GAAG,CAAC,GAAG,QAAQ,KAAK,CAAC,CAAC;IAExD,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,GAAG,CAAC,UAAU,CAAC,CAAC;QAChB,GAAG,CAAC,aAAa,CAAC,CAAC;IACrB,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './types/index.js';
|
|
|
7
7
|
export { PRESET_FREE, PRESET_NANO, PRESET_MICRO, PRESET_MEDIUM, PRESET_LARGE, getPreset, DEFAULT_DATA_SAFETY, DATA_SAFETY_CONFIG, } from './presets.js';
|
|
8
8
|
export type { PresetConfig } from './presets.js';
|
|
9
9
|
export { resolveConfig, resolveEnvConfig } from './resolve.js';
|
|
10
|
-
export {
|
|
10
|
+
export { resolveAuthCustomAttributes } from './auth-attributes.js';
|
|
11
|
+
export { validateBaseConfig, validateEnvConfigInput, assertValid, ValidationError, } from './validate.js';
|
|
11
12
|
export type { ValidationResult } from './validate.js';
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,cAAc,kBAAkB,CAAC;AAGjC,OAAO,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,SAAS,EACT,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAGjD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,cAAc,kBAAkB,CAAC;AAGjC,OAAO,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,SAAS,EACT,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAGjD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAGnE,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,WAAW,EACX,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,7 @@ export * from './types/index.js';
|
|
|
9
9
|
export { PRESET_FREE, PRESET_NANO, PRESET_MICRO, PRESET_MEDIUM, PRESET_LARGE, getPreset, DEFAULT_DATA_SAFETY, DATA_SAFETY_CONFIG, } from './presets.js';
|
|
10
10
|
// Resolution
|
|
11
11
|
export { resolveConfig, resolveEnvConfig } from './resolve.js';
|
|
12
|
+
export { resolveAuthCustomAttributes } from './auth-attributes.js';
|
|
12
13
|
// Validation
|
|
13
|
-
export { validateBaseConfig,
|
|
14
|
+
export { validateBaseConfig, validateEnvConfigInput, assertValid, ValidationError, } from './validate.js';
|
|
14
15
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,QAAQ;AACR,cAAc,kBAAkB,CAAC;AAEjC,UAAU;AACV,OAAO,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,SAAS,EACT,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAGtB,aAAa;AACb,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,QAAQ;AACR,cAAc,kBAAkB,CAAC;AAEjC,UAAU;AACV,OAAO,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,SAAS,EACT,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAGtB,aAAa;AACb,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAEnE,aAAa;AACb,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,WAAW,EACX,eAAe,GAChB,MAAM,eAAe,CAAC"}
|
package/dist/resolve.d.ts
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
* - Final config has no undefined values (except where explicitly typed)
|
|
12
12
|
*/
|
|
13
13
|
import { BaseConfig } from './types/base.js';
|
|
14
|
-
import { SecurityConfig } from './types/security.js';
|
|
15
14
|
import { EnvConfig, EnvConfigInput, Environment } from './types/env.js';
|
|
16
15
|
import { ResolvedConfig } from './types/resolved.js';
|
|
17
16
|
/**
|
|
@@ -30,7 +29,7 @@ export declare function resolveEnvConfig(env: Environment, input: EnvConfigInput
|
|
|
30
29
|
/**
|
|
31
30
|
* Resolve full configuration
|
|
32
31
|
*
|
|
33
|
-
* Merges base config +
|
|
32
|
+
* Merges base config + env config into a complete ResolvedConfig.
|
|
34
33
|
*/
|
|
35
|
-
export declare function resolveConfig(base: BaseConfig,
|
|
34
|
+
export declare function resolveConfig(base: BaseConfig, env: Environment, envInput: EnvConfigInput): ResolvedConfig;
|
|
36
35
|
//# sourceMappingURL=resolve.d.ts.map
|
package/dist/resolve.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,WAAW,EAAc,MAAM,gBAAgB,CAAC;AAMpF,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAuJrD;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,WAAW,EAChB,KAAK,EAAE,cAAc,GACpB,SAAS,CAsBX;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,WAAW,EAChB,QAAQ,EAAE,cAAc,GACvB,cAAc,CAyBhB"}
|
package/dist/resolve.js
CHANGED
|
@@ -165,18 +165,15 @@ export function resolveEnvConfig(env, input) {
|
|
|
165
165
|
/**
|
|
166
166
|
* Resolve full configuration
|
|
167
167
|
*
|
|
168
|
-
* Merges base config +
|
|
168
|
+
* Merges base config + env config into a complete ResolvedConfig.
|
|
169
169
|
*/
|
|
170
|
-
export function resolveConfig(base,
|
|
170
|
+
export function resolveConfig(base, env, envInput) {
|
|
171
171
|
const envConfig = resolveEnvConfig(env, envInput);
|
|
172
172
|
return {
|
|
173
173
|
// From base
|
|
174
174
|
name: base.name,
|
|
175
175
|
displayName: base.displayName,
|
|
176
176
|
region: base.region,
|
|
177
|
-
// From security
|
|
178
|
-
scopes: security.scopes,
|
|
179
|
-
appClients: security.appClients,
|
|
180
177
|
// From env
|
|
181
178
|
env: envConfig.env,
|
|
182
179
|
dataSafety: envConfig.dataSafety,
|
package/dist/resolve.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAUH,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAgB,MAAM,cAAc,CAAC;AAE5E;;GAEG;AACH,SAAS,aAAa,CACpB,MAAoB,EACpB,KAA+B;IAE/B,IAAI,CAAC,KAAK;QAAE,OAAO,MAAM,CAAC,MAAM,CAAC;IAEjC,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAE/B,OAAO;QACL,GAAG,MAAM,CAAC,MAAM;QAChB,GAAG,IAAI;QACP,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;YACT,iBAAiB,EAAE,GAAG,CAAC,iBAAiB,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,iBAAiB;YAC/E,gBAAgB,EAAE,GAAG,CAAC,gBAAgB,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB;SAC7E,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG;KACtB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,UAAU,CAC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C,IAAI;YAClB,WAAW,EAAE,GAAG;YAChB,SAAS,EAAE,YAAY;SACxB;KACF,CAAC;AACJ,CAAC"}
|
package/dist/types/api.d.ts
CHANGED
|
@@ -44,6 +44,22 @@ export interface ApiEnvConfig {
|
|
|
44
44
|
cors: CorsConfig | undefined;
|
|
45
45
|
/** Custom domain (undefined = use default API Gateway domain) */
|
|
46
46
|
customDomain: CustomDomainConfig | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Disable the default `*.execute-api.<region>.amazonaws.com` endpoint.
|
|
49
|
+
*
|
|
50
|
+
* When `undefined` (the default), VentureKit disables it automatically
|
|
51
|
+
* once a custom domain with a resolvable certificate is configured, so
|
|
52
|
+
* clients can only reach the API through the domain-scoped path (and
|
|
53
|
+
* any controls bound to it). Set explicitly to override:
|
|
54
|
+
* - `false` — keep the raw execute-api URL reachable (e.g. during a
|
|
55
|
+
* custom-domain DNS/cert rollout, or when no domain is used).
|
|
56
|
+
* - `true` — always disable it (only safe with a working custom
|
|
57
|
+
* domain, otherwise the API becomes unreachable).
|
|
58
|
+
*
|
|
59
|
+
* Optional so presets don't declare it and existing configs stay
|
|
60
|
+
* valid; resolve.ts preserves it through `...rest` when supplied.
|
|
61
|
+
*/
|
|
62
|
+
disableExecuteApiEndpoint?: boolean;
|
|
47
63
|
}
|
|
48
64
|
/**
|
|
49
65
|
* API configuration input (for user overrides)
|
package/dist/types/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/types/api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,0DAA0D;IAC1D,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,2BAA2B;IAC3B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,sBAAsB;IACtB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,wBAAwB;IACxB,gBAAgB,EAAE,OAAO,CAA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AAU,GAAG,SAAS,CAAC;IAE7B,iEAAiE;IACjE,YAAY,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAE7C;;;;;;;;;;;;;;OAcG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc,CAAC,CAAC,GAAG;IACrF,IAAI,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAC3B,YAAY,CAAC,EAAE,kBAAkB,CAAC;CACnC,CAAC"}
|
package/dist/types/base.d.ts
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* VentureKit Base Configuration Types
|
|
3
3
|
*
|
|
4
4
|
* Project identity that NEVER changes between environments.
|
|
5
|
-
* Keep this minimal
|
|
5
|
+
* Keep this minimal.
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
8
8
|
* Base configuration - project identity constant across all environments
|
|
9
9
|
*
|
|
10
10
|
* This configuration is defined ONCE and shared across dev/stage/prod.
|
|
11
11
|
* Environment-specific settings (capacity, scaling) go in EnvConfig.
|
|
12
|
-
*
|
|
12
|
+
* Auth pools / app clients are declared as `auth` intents in vk.config.ts.
|
|
13
13
|
*/
|
|
14
14
|
export interface BaseConfig {
|
|
15
15
|
/** Project name (lowercase, no spaces, used in resource naming) */
|
package/dist/types/base.js
CHANGED
package/dist/types/env.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { ApiEnvConfig, ApiEnvConfigInput } from './api.js';
|
|
|
14
14
|
import { VpcEnvConfig, VpcEnvConfigInput } from './vpc.js';
|
|
15
15
|
import { ObservabilityEnvConfig, ObservabilityEnvConfigInput } from './observability.js';
|
|
16
16
|
import { WebSocketEnvConfig, WebSocketEnvConfigInput } from './websocket.js';
|
|
17
|
-
import type { DatabaseOverride, StorageOverride, AuthOverride, QueueOverride, CacheOverride, ScheduleOverride, FunctionOverride, MonitoringOverride, SecretsOverride, EnvVarIntent, DomainOverride, NotifyOverride } from './intents.js';
|
|
17
|
+
import type { DatabaseOverride, StorageOverride, AuthOverride, QueueOverride, CacheOverride, ScheduleOverride, FunctionOverride, MonitoringOverride, SecretsOverride, EnvVarIntent, DomainOverride, NotifyOverride, EventsOverride } from './intents.js';
|
|
18
18
|
/**
|
|
19
19
|
* Well-known environment names. These are the values VentureKit ships
|
|
20
20
|
* sensible defaults for (data safety level, preset selection, etc).
|
|
@@ -122,5 +122,11 @@ export interface EnvConfigInput {
|
|
|
122
122
|
* here without copying the whole {@link NotifyIntent}.
|
|
123
123
|
*/
|
|
124
124
|
notify?: NotifyOverride[];
|
|
125
|
+
/**
|
|
126
|
+
* Events overrides (matched by id). Per-stage tweaks like a different
|
|
127
|
+
* `external.busName` or an extra subscription go here without copying
|
|
128
|
+
* the whole {@link EventsIntent}.
|
|
129
|
+
*/
|
|
130
|
+
events?: EventsOverride[];
|
|
125
131
|
}
|
|
126
132
|
//# sourceMappingURL=env.d.ts.map
|
package/dist/types/env.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/types/env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACzF,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,eAA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B,SAAS,CAAC,EAAE,uBAAuB,CAAC;IAMpC,yCAAyC;IACzC,SAAS,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAE/B,wCAAwC;IACxC,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAE5B,qCAAqC;IACrC,IAAI,CAAC,EAAE,YAAY,EAAE,CAAC;IAEtB,sCAAsC;IACtC,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC;IAEzB,sCAAsC;IACtC,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC;IAEzB,yCAAyC;IACzC,SAAS,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAE/B,yCAAyC;IACzC,SAAS,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAE/B,2CAA2C;IAC3C,UAAU,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAElC,uCAAuC;IACvC,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAE5B,qDAAqD;IACrD,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IAEzB,uCAAuC;IACvC,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAE3B;;;;OAIG;IACH,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;IAE1B;;;;OAIG;IACH,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;CAC3B"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* Re-exports all configuration types.
|
|
5
5
|
*/
|
|
6
6
|
export type { BaseConfig } from './base.js';
|
|
7
|
-
export type { SecurityConfig, OAuthScope, AppClient } from './security.js';
|
|
8
7
|
export type { EnvConfig, EnvConfigInput, Environment, Preset, DataSafety } from './env.js';
|
|
9
8
|
export type { LambdaEnvConfig, LambdaEnvConfigInput, LambdaRuntime, LambdaArchitecture, LambdaIamConfig, IamPolicyStatement, } from './lambda.js';
|
|
10
9
|
export type { ApiEnvConfig, ApiEnvConfigInput, CorsConfig, CustomDomainConfig } from './api.js';
|
|
@@ -12,5 +11,5 @@ export type { VpcEnvConfig, VpcEnvConfigInput, SubnetConfig, SecurityGroupRule,
|
|
|
12
11
|
export type { ObservabilityEnvConfig, ObservabilityEnvConfigInput, LogGroupConfig, MetricsConfig, AlarmConfig, TracingConfig, } from './observability.js';
|
|
13
12
|
export type { WebSocketEnvConfig, WebSocketEnvConfigInput } from './websocket.js';
|
|
14
13
|
export type { ResolvedConfig } from './resolved.js';
|
|
15
|
-
export type { ResourceSize, DatabaseIntent, StorageIntent, AuthIntent, QueueIntent, CacheIntent, ScheduleIntent, FunctionIntent, MonitoringIntent, AlarmIntent, SecretsIntent, EnvVarIntent, DomainIntent, NotifyIntent, NotifyChannel, VentureIntent, IntentOutputs, DatabaseOverride, StorageOverride, AuthOverride, QueueOverride, CacheOverride, ScheduleOverride, FunctionOverride, MonitoringOverride, SecretsOverride, DomainOverride, NotifyOverride, } from './intents.js';
|
|
14
|
+
export type { ResourceSize, DatabaseIntent, StorageIntent, AuthIntent, QueueIntent, CacheIntent, ScheduleIntent, FunctionIntent, MonitoringIntent, AlarmIntent, SecretsIntent, EnvVarIntent, DomainIntent, NotifyIntent, NotifyChannel, EventsIntent, EventSubscriptionIntent, VentureIntent, IntentOutputs, DatabaseOverride, StorageOverride, AuthOverride, QueueOverride, CacheOverride, ScheduleOverride, FunctionOverride, MonitoringOverride, SecretsOverride, DomainOverride, NotifyOverride, EventsOverride, } from './intents.js';
|
|
16
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG5C,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG5C,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG3F,YAAY,EACV,eAAe,EACf,oBAAoB,EACpB,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAGrB,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGhG,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,OAAO,GACR,MAAM,UAAU,CAAC;AAGlB,YAAY,EACV,sBAAsB,EACtB,2BAA2B,EAC3B,cAAc,EACd,aAAa,EACb,WAAW,EACX,aAAa,GACd,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAGlF,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpD,YAAY,EACV,YAAY,EACZ,cAAc,EACd,aAAa,EACb,UAAU,EACV,WAAW,EACX,WAAW,EACX,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,uBAAuB,EACvB,aAAa,EACb,aAAa,EAEb,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,GACf,MAAM,cAAc,CAAC"}
|
package/dist/types/intents.d.ts
CHANGED
|
@@ -90,6 +90,22 @@ export interface StorageIntent {
|
|
|
90
90
|
* distribution will be deployed at its auto-generated
|
|
91
91
|
* `*.cloudfront.net` hostname until the ARN is filled in. */
|
|
92
92
|
cdnCertificateArn?: string;
|
|
93
|
+
/**
|
|
94
|
+
* CloudFront price class for the CDN distribution — the cost vs.
|
|
95
|
+
* global-latency tradeoff of which edge locations serve content:
|
|
96
|
+
* - `'100'` (default) — North America + Europe. Cheapest.
|
|
97
|
+
* - `'200'` — adds Asia, the Middle East, and Africa.
|
|
98
|
+
* - `'all'` — every edge, including South America + Oceania.
|
|
99
|
+
* Accepts the bare value or the full `PRICE_CLASS_*` name.
|
|
100
|
+
*/
|
|
101
|
+
cdnPriceClass?: '100' | '200' | 'all' | 'PRICE_CLASS_100' | 'PRICE_CLASS_200' | 'PRICE_CLASS_ALL';
|
|
102
|
+
/**
|
|
103
|
+
* Enable CloudFront standard access logging for this distribution.
|
|
104
|
+
* Default `false`. When `true`, VentureKit provisions a private,
|
|
105
|
+
* encrypted, lifecycle-expired S3 log bucket (retention follows the
|
|
106
|
+
* env log-retention window) and points the distribution's logs at it.
|
|
107
|
+
*/
|
|
108
|
+
cdnAccessLogs?: boolean;
|
|
93
109
|
/** Allowed origins for CORS (empty = no CORS) */
|
|
94
110
|
corsOrigins?: string[];
|
|
95
111
|
}
|
|
@@ -110,21 +126,35 @@ export interface AuthIntent {
|
|
|
110
126
|
mfa?: 'off' | 'optional' | 'required';
|
|
111
127
|
/** Password strength */
|
|
112
128
|
passwordStrength?: 'standard' | 'strong';
|
|
113
|
-
/**
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
129
|
+
/**
|
|
130
|
+
* App clients to create. One Cognito User Pool client per entry;
|
|
131
|
+
* defaults to a single client named 'default' when omitted.
|
|
132
|
+
*
|
|
133
|
+
* Authorization scopes are NOT declared here: VentureKit's model is
|
|
134
|
+
* server-side scope enforcement (the runtime scope gate + per-request
|
|
135
|
+
* scope-granting middleware), not Cognito OAuth resource servers —
|
|
136
|
+
* cookie'd ID tokens never carry OAuth scope claims.
|
|
137
|
+
*/
|
|
119
138
|
clients?: Array<{
|
|
120
139
|
name: string;
|
|
121
|
-
scopes: string[];
|
|
122
140
|
}>;
|
|
123
141
|
/**
|
|
124
142
|
* Cognito custom user attributes to declare on the pool, listed
|
|
125
143
|
* WITHOUT the mandatory `custom:` prefix (Cognito itself prepends it
|
|
126
144
|
* at issue-time so JWT claims appear as `custom:tenantId` etc.).
|
|
127
145
|
*
|
|
146
|
+
* Feature-implied attributes are declared AUTOMATICALLY — list only
|
|
147
|
+
* the attributes your own application code invents (see
|
|
148
|
+
* `resolveAuthCustomAttributes` in `@venturekit/core`):
|
|
149
|
+
*
|
|
150
|
+
* - `role` — the conventional single-valued role claim, unless
|
|
151
|
+
* {@link AuthIntent.tenancy} is `true` (roles are per tenant
|
|
152
|
+
* there — see below)
|
|
153
|
+
* - `federated_provider` + `<provider>Sub` per entry in
|
|
154
|
+
* {@link AuthIntent.federated} (e.g. `linkedinSub`)
|
|
155
|
+
* - `tenantId` + `tenantRoles` when {@link AuthIntent.tenancy}
|
|
156
|
+
* is `true`
|
|
157
|
+
*
|
|
128
158
|
* All attributes are created as mutable strings (length 1..2048),
|
|
129
159
|
* which covers the overwhelmingly common case of small textual claims
|
|
130
160
|
* (`tenantId`, `role`, …). Pools that need numeric / immutable / wider
|
|
@@ -136,6 +166,28 @@ export interface AuthIntent {
|
|
|
136
166
|
* claims your application code reads in production.
|
|
137
167
|
*/
|
|
138
168
|
customAttributes?: string[];
|
|
169
|
+
/**
|
|
170
|
+
* Declare that this pool serves a MULTI-TENANT application — users
|
|
171
|
+
* belong to one or more tenants (communities, workspaces,
|
|
172
|
+
* organizations, …) and hold a role per tenant.
|
|
173
|
+
*
|
|
174
|
+
* Effect: auto-declares the `tenantId` and `tenantRoles` custom
|
|
175
|
+
* attributes on the pool schema, REPLACING the default `role`
|
|
176
|
+
* attribute — in a multi-tenant pool roles live per tenant in the
|
|
177
|
+
* packed map, and a single-valued `custom:role` is a cross-tenant
|
|
178
|
+
* confusion hazard. Declare `role` explicitly in
|
|
179
|
+
* {@link AuthIntent.customAttributes} if your app still wants it.
|
|
180
|
+
*
|
|
181
|
+
* - `custom:tenantId` — the conventional login-tenant claim,
|
|
182
|
+
* written by the app at sign-in.
|
|
183
|
+
* - `custom:tenantRoles` — the packed per-tenant role map
|
|
184
|
+
* (`"<tenantId>:<role>|…"`) that `@venturekit-pro/tenancy`'s
|
|
185
|
+
* `createTenantUserScopesMiddleware` reads to grant scopes
|
|
186
|
+
* without a store query. The app writes it on every tenant-user
|
|
187
|
+
* mutation — see `tenant-roles-claim.ts` in that package for
|
|
188
|
+
* the write-path contract.
|
|
189
|
+
*/
|
|
190
|
+
tenancy?: boolean;
|
|
139
191
|
/**
|
|
140
192
|
* Third-party identity providers to enable for federated sign-in.
|
|
141
193
|
*
|
|
@@ -171,6 +223,14 @@ export interface AuthIntent {
|
|
|
171
223
|
* as Google: scopes default to `openid profile email`, the `id_token`
|
|
172
224
|
* returned at the token endpoint carries a verified `email` claim, and
|
|
173
225
|
* `sub` is the stable LinkedIn member ID.
|
|
226
|
+
*
|
|
227
|
+
* Each declared provider also auto-declares custom attributes on
|
|
228
|
+
* the pool schema: `federated_provider` (written unconditionally by
|
|
229
|
+
* `signInAsFederatedUser` on first creation — real Cognito rejects
|
|
230
|
+
* writes to undeclared attributes) and `<provider>Sub` (the
|
|
231
|
+
* conventional slot for the provider's stable subject, passed by
|
|
232
|
+
* the app via `initialCustomAttributes`, e.g.
|
|
233
|
+
* `{ linkedinSub: profile.externalId }`).
|
|
174
234
|
*/
|
|
175
235
|
federated?: Array<'google' | 'facebook' | 'apple' | 'linkedin'>;
|
|
176
236
|
}
|
|
@@ -507,6 +567,108 @@ export interface FunctionIntent {
|
|
|
507
567
|
/** Description */
|
|
508
568
|
description?: string;
|
|
509
569
|
}
|
|
570
|
+
/**
|
|
571
|
+
* Events Intent
|
|
572
|
+
*
|
|
573
|
+
* Declares a generic domain-event bus (EventBridge custom bus) plus the
|
|
574
|
+
* rules that route matched events to in-venture targets. This is
|
|
575
|
+
* VentureKit's pub/sub primitive, complementing `queues` (point-to-point
|
|
576
|
+
* work) and `schedules` (time-driven): one published event can fan out
|
|
577
|
+
* to many subscribers, including subscribers in OTHER ventures.
|
|
578
|
+
*
|
|
579
|
+
* Two roles, often combined on one intent:
|
|
580
|
+
*
|
|
581
|
+
* - OWNER — a venture that declares `{ id }` (optionally `source` /
|
|
582
|
+
* `busName`) gets an `AWS::Events::EventBus` created in the
|
|
583
|
+
* messaging tier. The app tier grants the shared Lambda role
|
|
584
|
+
* `events:PutEvents` on it and injects `VENTURE_EVENT_BUS_NAME`
|
|
585
|
+
* (primary) + `EVENT_BUS_<ID>_NAME` so handlers publish via
|
|
586
|
+
* `@venturekit/runtime`'s `publishEvent()`.
|
|
587
|
+
*
|
|
588
|
+
* - SUBSCRIBER — `subscriptions[]` each become an EventBridge `Rule`
|
|
589
|
+
* on the bus, targeting exactly one in-venture queue or function.
|
|
590
|
+
* To attach rules to a bus owned by a DIFFERENT venture (same
|
|
591
|
+
* account + region), set `external: { busName }`: the rule
|
|
592
|
+
* references the bus by name, so deploy the owner venture first.
|
|
593
|
+
*
|
|
594
|
+
* Cross-venture routing is the headline use case — a control-plane
|
|
595
|
+
* venture publishes `tenant.created`; a vertical venture subscribes its
|
|
596
|
+
* `tenant-events` queue to that bus. Neither venture calls the other
|
|
597
|
+
* directly; the bus is the only coupling.
|
|
598
|
+
*
|
|
599
|
+
* Convention:
|
|
600
|
+
* - `events: [{ id: 'domain' }]` → bus `{project}-{stage}-domain`.
|
|
601
|
+
*/
|
|
602
|
+
export interface EventsIntent {
|
|
603
|
+
/** Unique identifier; the physical bus name defaults to `{project}-{stage}-{id}`. */
|
|
604
|
+
id: string;
|
|
605
|
+
/**
|
|
606
|
+
* Override the physical EventBus name. Rarely needed — set it only to
|
|
607
|
+
* pin a name an external system already targets.
|
|
608
|
+
*/
|
|
609
|
+
busName?: string;
|
|
610
|
+
/**
|
|
611
|
+
* Attach rules to a bus owned by ANOTHER venture instead of creating
|
|
612
|
+
* one here. Same-account + same-region only: the rule references the
|
|
613
|
+
* bus by name (`events.EventBus.fromEventBusName`). When set, this
|
|
614
|
+
* venture does NOT create the bus and is NOT granted `PutEvents` —
|
|
615
|
+
* it is a pure subscriber. Deploy the owner venture first so the bus
|
|
616
|
+
* exists when the rule is created.
|
|
617
|
+
*/
|
|
618
|
+
external?: {
|
|
619
|
+
/** Physical name of the existing bus (the owner's `{project}-{stage}-{id}`). */
|
|
620
|
+
busName: string;
|
|
621
|
+
};
|
|
622
|
+
/**
|
|
623
|
+
* Default `source` stamped on published events and matched by rules
|
|
624
|
+
* that don't override it. Defaults to the publishing project name.
|
|
625
|
+
*/
|
|
626
|
+
source?: string;
|
|
627
|
+
/** Event subscriptions — each becomes one EventBridge rule → target. */
|
|
628
|
+
subscriptions?: EventSubscriptionIntent[];
|
|
629
|
+
/** Description. */
|
|
630
|
+
description?: string;
|
|
631
|
+
}
|
|
632
|
+
/**
|
|
633
|
+
* One EventBridge rule on an {@link EventsIntent} bus, routing matched
|
|
634
|
+
* events to a single in-venture target.
|
|
635
|
+
*/
|
|
636
|
+
export interface EventSubscriptionIntent {
|
|
637
|
+
/** Unique id within the venture (used as the rule-name component). */
|
|
638
|
+
id: string;
|
|
639
|
+
/**
|
|
640
|
+
* `detail-type` values to match — the domain-event names, e.g.
|
|
641
|
+
* `['tenant.created', 'tenant.suspended']`. Omit to match any
|
|
642
|
+
* detail-type (and filter by `sources` / `pattern` instead).
|
|
643
|
+
*/
|
|
644
|
+
detailTypes?: string[];
|
|
645
|
+
/**
|
|
646
|
+
* `source` values to match. Defaults to the bus `source`. Set
|
|
647
|
+
* explicitly when subscribing to events published by a venture whose
|
|
648
|
+
* source differs from this venture's.
|
|
649
|
+
*/
|
|
650
|
+
sources?: string[];
|
|
651
|
+
/**
|
|
652
|
+
* Raw EventBridge event-pattern escape hatch, shallow-merged OVER the
|
|
653
|
+
* `detailTypes` / `sources` shorthands. Use for content-based
|
|
654
|
+
* filtering on `detail` fields (e.g. `{ detail: { vertical: ['school'] } }`).
|
|
655
|
+
*/
|
|
656
|
+
pattern?: Record<string, unknown>;
|
|
657
|
+
/**
|
|
658
|
+
* Delivery target — exactly one of:
|
|
659
|
+
* - `{ queue }` — a `queues[]` intent id in THIS venture. The
|
|
660
|
+
* event is delivered as an SQS message, so the
|
|
661
|
+
* queue's `queueBatchHandler` consumer receives
|
|
662
|
+
* it like any other message (at-least-once).
|
|
663
|
+
* - `{ function }` — a `functions[]` (or `src/functions/`-discovered)
|
|
664
|
+
* Lambda id in THIS venture, invoked asynchronously.
|
|
665
|
+
*/
|
|
666
|
+
target: {
|
|
667
|
+
queue: string;
|
|
668
|
+
} | {
|
|
669
|
+
function: string;
|
|
670
|
+
};
|
|
671
|
+
}
|
|
510
672
|
/**
|
|
511
673
|
* Complete VentureKit Infrastructure Intent
|
|
512
674
|
*
|
|
@@ -543,6 +705,14 @@ export interface VentureIntent {
|
|
|
543
705
|
* `@venturekit/notify`. Most projects need exactly one (`id: 'main'`).
|
|
544
706
|
*/
|
|
545
707
|
notify?: NotifyIntent[];
|
|
708
|
+
/**
|
|
709
|
+
* Domain-event buses (EventBridge) + their subscriptions — see
|
|
710
|
+
* {@link EventsIntent}. Owners get a custom bus + `events:PutEvents`
|
|
711
|
+
* grant; subscribers get one rule per `subscriptions[]` entry routing
|
|
712
|
+
* matched events to an in-venture queue / function. The pub/sub
|
|
713
|
+
* complement to point-to-point `queues`.
|
|
714
|
+
*/
|
|
715
|
+
events?: EventsIntent[];
|
|
546
716
|
}
|
|
547
717
|
/** Per-env override for DatabaseIntent — matched by id */
|
|
548
718
|
export type DatabaseOverride = Pick<DatabaseIntent, 'id'> & Partial<Omit<DatabaseIntent, 'id'>>;
|
|
@@ -566,6 +736,8 @@ export type SecretsOverride = Pick<SecretsIntent, 'id'> & Partial<Omit<SecretsIn
|
|
|
566
736
|
export type DomainOverride = Pick<DomainIntent, 'id'> & Partial<Omit<DomainIntent, 'id'>>;
|
|
567
737
|
/** Per-env override for NotifyIntent — matched by id */
|
|
568
738
|
export type NotifyOverride = Pick<NotifyIntent, 'id'> & Partial<Omit<NotifyIntent, 'id'>>;
|
|
739
|
+
/** Per-env override for EventsIntent — matched by id */
|
|
740
|
+
export type EventsOverride = Pick<EventsIntent, 'id'> & Partial<Omit<EventsIntent, 'id'>>;
|
|
569
741
|
/**
|
|
570
742
|
* Intent output references
|
|
571
743
|
*
|
|
@@ -605,6 +777,10 @@ export interface IntentOutputs {
|
|
|
605
777
|
arn: string;
|
|
606
778
|
name: string;
|
|
607
779
|
}>;
|
|
780
|
+
eventBuses: Record<string, {
|
|
781
|
+
busName: string;
|
|
782
|
+
busArn: string;
|
|
783
|
+
}>;
|
|
608
784
|
notify: Record<string, {
|
|
609
785
|
/** From address used when no per-call override is provided. */
|
|
610
786
|
defaultFrom?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intents.d.ts","sourceRoot":"","sources":["../../src/types/intents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEnE;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,0CAA0C;IAC1C,EAAE,EAAE,MAAM,CAAC;IAEX,sBAAsB;IACtB,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC;IAE3B,yGAAyG;IACzG,IAAI,CAAC,EAAE,YAAY,CAAC;IAEpB,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IAEb,0CAA0C;IAC1C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,+BAA+B;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,4CAA4C;IAC5C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B,gCAAgC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,kCAAkC;IAClC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,mBAAmB,CAAC,EAAE,MAAM,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KAClB,CAAC,CAAC;IAEH,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE;QACrB,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;IAEH,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE;QACxB,YAAY,EAAE,MAAM,CAAC;QACrB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC,CAAC;IAEH,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE;QACzB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,SAAS,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC,CAAC;IAEH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE;QACtB,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;IAEH,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE;QACzB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;IAEH,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE;QACrB,+DAA+D;QAC/D,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,sEAAsE;QACtE,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,kCAAkC;QAClC,oBAAoB,EAAE,MAAM,CAAC;QAC7B,6DAA6D;QAC7D,cAAc,EAAE,MAAM,CAAC;QACvB,8DAA8D;QAC9D,sBAAsB,CAAC,EAAE,MAAM,CAAC;KACjC,CAAC,CAAC;CACJ"}
|
package/dist/types/resolved.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Resolved VentureKit Configuration
|
|
3
3
|
*
|
|
4
|
-
* Complete configuration after merging base +
|
|
4
|
+
* Complete configuration after merging base + environment.
|
|
5
5
|
* This is what infra constructs receive and consume.
|
|
6
6
|
*/
|
|
7
|
-
import { OAuthScope, AppClient } from './security.js';
|
|
8
7
|
import { Environment, DataSafety } from './env.js';
|
|
9
8
|
import { LambdaEnvConfig } from './lambda.js';
|
|
10
9
|
import { ApiEnvConfig } from './api.js';
|
|
@@ -30,10 +29,6 @@ export interface ResolvedConfig {
|
|
|
30
29
|
tags: Record<string, string>;
|
|
31
30
|
/** Data safety level (from env config) */
|
|
32
31
|
dataSafety: DataSafety;
|
|
33
|
-
/** All OAuth scopes (from security) */
|
|
34
|
-
scopes: OAuthScope[];
|
|
35
|
-
/** App clients (from security) */
|
|
36
|
-
appClients: AppClient[];
|
|
37
32
|
/** Lambda configuration (resolved) */
|
|
38
33
|
lambda: LambdaEnvConfig;
|
|
39
34
|
/** API Gateway configuration (resolved) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolved.d.ts","sourceRoot":"","sources":["../../src/types/resolved.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"resolved.d.ts","sourceRoot":"","sources":["../../src/types/resolved.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IAEb,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC;IAEpB,oCAAoC;IACpC,GAAG,EAAE,WAAW,CAAC;IAEjB,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAC;IAEf,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE7B,0CAA0C;IAC1C,UAAU,EAAE,UAAU,CAAC;IAEvB,sCAAsC;IACtC,MAAM,EAAE,eAAe,CAAC;IAExB,2CAA2C;IAC3C,GAAG,EAAE,YAAY,CAAC;IAElB,mCAAmC;IACnC,GAAG,EAAE,YAAY,CAAC;IAElB,6CAA6C;IAC7C,aAAa,EAAE,sBAAsB,CAAC;IAEtC,yCAAyC;IACzC,SAAS,EAAE,kBAAkB,CAAC;CAC/B"}
|
package/dist/types/resolved.js
CHANGED
package/dist/validate.d.ts
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Catches errors early with clear, actionable messages.
|
|
6
6
|
*/
|
|
7
7
|
import type { BaseConfig } from './types/base.js';
|
|
8
|
-
import type { SecurityConfig } from './types/security.js';
|
|
9
8
|
import type { EnvConfigInput, Environment } from './types/env.js';
|
|
10
9
|
/**
|
|
11
10
|
* Validation error
|
|
@@ -27,10 +26,6 @@ export interface ValidationResult {
|
|
|
27
26
|
* Validate base configuration
|
|
28
27
|
*/
|
|
29
28
|
export declare function validateBaseConfig(config: BaseConfig): ValidationResult;
|
|
30
|
-
/**
|
|
31
|
-
* Validate security configuration
|
|
32
|
-
*/
|
|
33
|
-
export declare function validateSecurityConfig(config: SecurityConfig): ValidationResult;
|
|
34
29
|
/**
|
|
35
30
|
* Validate environment configuration input
|
|
36
31
|
*/
|
package/dist/validate.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElE;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;aAEtB,KAAK,EAAE,MAAM;aACb,OAAO,EAAE,MAAM;aACf,KAAK,CAAC,EAAE,OAAO;gBAFf,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,OAAO,YAAA;CAKlC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B;AAwBD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,gBAAgB,CAqCvE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,GAAG,gBAAgB,CAwIjG;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAK1D"}
|
package/dist/validate.js
CHANGED
|
@@ -66,44 +66,6 @@ export function validateBaseConfig(config) {
|
|
|
66
66
|
}
|
|
67
67
|
return errors.length > 0 ? fail(errors) : ok();
|
|
68
68
|
}
|
|
69
|
-
/**
|
|
70
|
-
* Validate security configuration
|
|
71
|
-
*/
|
|
72
|
-
export function validateSecurityConfig(config) {
|
|
73
|
-
const errors = [];
|
|
74
|
-
// Scopes validation
|
|
75
|
-
if (!config.scopes || config.scopes.length === 0) {
|
|
76
|
-
errors.push(new ValidationError('scopes', 'At least one OAuth scope is required'));
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
config.scopes.forEach((scope, i) => {
|
|
80
|
-
if (!scope.name) {
|
|
81
|
-
errors.push(new ValidationError(`scopes[${i}].name`, 'Scope name is required'));
|
|
82
|
-
}
|
|
83
|
-
else if (!/^[a-z][a-z0-9.]*$/.test(scope.name)) {
|
|
84
|
-
errors.push(new ValidationError(`scopes[${i}].name`, 'Scope name must be lowercase with dots (e.g., projects.read)', scope.name));
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
// App clients validation
|
|
89
|
-
if (!config.appClients || config.appClients.length === 0) {
|
|
90
|
-
errors.push(new ValidationError('appClients', 'At least one app client is required'));
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
const scopeNames = new Set(config.scopes?.map(s => s.name) || []);
|
|
94
|
-
config.appClients.forEach((client, i) => {
|
|
95
|
-
if (!client.name) {
|
|
96
|
-
errors.push(new ValidationError(`appClients[${i}].name`, 'Client name is required'));
|
|
97
|
-
}
|
|
98
|
-
client.allowedScopes.forEach((scope, j) => {
|
|
99
|
-
if (!scopeNames.has(scope)) {
|
|
100
|
-
errors.push(new ValidationError(`appClients[${i}].allowedScopes[${j}]`, `Scope "${scope}" is not defined in scopes`, scope));
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
return errors.length > 0 ? fail(errors) : ok();
|
|
106
|
-
}
|
|
107
69
|
/**
|
|
108
70
|
* Validate environment configuration input
|
|
109
71
|
*/
|
package/dist/validate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAEtB;IACA;IACA;IAHlB,YACkB,KAAa,EACb,OAAe,EACf,KAAe;QAE/B,KAAK,CAAC,GAAG,KAAK,KAAK,OAAO,EAAE,CAAC,CAAC;QAJd,UAAK,GAAL,KAAK,CAAQ;QACb,YAAO,GAAP,OAAO,CAAQ;QACf,UAAK,GAAL,KAAK,CAAU;QAG/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CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AACjD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,MAAwB;IAClD,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAClB,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnF,MAAM,IAAI,KAAK,CAAC,qCAAqC,QAAQ,EAAE,CAAC,CAAC;IACnE,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venturekit/core",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.20260704225856",
|
|
4
4
|
"description": "VentureKit core types, presets, and configuration resolution.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,9 +16,13 @@
|
|
|
16
16
|
],
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
|
-
"url": "https://github.com/venturekit-dev/venturekit.
|
|
19
|
+
"url": "https://github.com/venturekit-dev/venturekit.git",
|
|
20
20
|
"directory": "packages/core"
|
|
21
21
|
},
|
|
22
|
+
"homepage": "https://venturekit.dev",
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/venturekit-dev/venturekit/issues"
|
|
25
|
+
},
|
|
22
26
|
"publishConfig": {
|
|
23
27
|
"registry": "https://registry.npmjs.org",
|
|
24
28
|
"access": "public"
|
package/dist/types/security.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* VentureKit Security Configuration Types
|
|
3
|
-
*
|
|
4
|
-
* OAuth scopes, app clients, and authentication settings.
|
|
5
|
-
* Separated from base.ts to keep config files manageable.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* OAuth scope definition
|
|
9
|
-
*/
|
|
10
|
-
export interface OAuthScope {
|
|
11
|
-
/** Scope name (e.g., 'projects.read', 'users.write') */
|
|
12
|
-
name: string;
|
|
13
|
-
/** Scope description */
|
|
14
|
-
description: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* App client configuration
|
|
18
|
-
*/
|
|
19
|
-
export interface AppClient {
|
|
20
|
-
/** Client name (e.g., 'web-app', 'mobile-app', 'admin-dashboard') */
|
|
21
|
-
name: string;
|
|
22
|
-
/** Allowed OAuth scopes for this client */
|
|
23
|
-
allowedScopes: string[];
|
|
24
|
-
/** Whether this client supports refresh tokens */
|
|
25
|
-
supportsRefreshTokens: boolean;
|
|
26
|
-
/** Generate client secret (true for server-side, false for SPA/mobile) */
|
|
27
|
-
generateSecret?: boolean;
|
|
28
|
-
/** Access token validity in hours (default: 1) */
|
|
29
|
-
accessTokenValidityHours?: number;
|
|
30
|
-
/** Refresh token validity in days (default: 30) */
|
|
31
|
-
refreshTokenValidityDays?: number;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Security configuration - authentication and authorization settings
|
|
35
|
-
*
|
|
36
|
-
* Defined ONCE and shared across all environments.
|
|
37
|
-
* Keep separate from base.ts to avoid config file bloat.
|
|
38
|
-
*/
|
|
39
|
-
export interface SecurityConfig {
|
|
40
|
-
/** All available OAuth scopes for this project */
|
|
41
|
-
scopes: OAuthScope[];
|
|
42
|
-
/** App clients and their allowed scopes */
|
|
43
|
-
appClients: AppClient[];
|
|
44
|
-
/** MFA setting (default: 'optional') */
|
|
45
|
-
mfa?: 'off' | 'optional' | 'required';
|
|
46
|
-
/** Password policy */
|
|
47
|
-
passwordPolicy?: {
|
|
48
|
-
minLength?: number;
|
|
49
|
-
requireUppercase?: boolean;
|
|
50
|
-
requireLowercase?: boolean;
|
|
51
|
-
requireNumbers?: boolean;
|
|
52
|
-
requireSymbols?: boolean;
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL=security.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../src/types/security.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB;IACxB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,kDAAkD;IAClD,qBAAqB,EAAE,OAAO,CAAC;IAC/B,0EAA0E;IAC1E,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kDAAkD;IAClD,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,mDAAmD;IACnD,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,kDAAkD;IAClD,MAAM,EAAE,UAAU,EAAE,CAAC;IAErB,2CAA2C;IAC3C,UAAU,EAAE,SAAS,EAAE,CAAC;IAExB,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,GAAG,UAAU,GAAG,UAAU,CAAC;IAEtC,sBAAsB;IACtB,cAAc,CAAC,EAAE;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B,CAAC;CACH"}
|
package/dist/types/security.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"security.js","sourceRoot":"","sources":["../../src/types/security.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|