@venturekit/infra 0.0.0-dev.20260311071358 → 0.0.0-dev.20260312002737
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/dist/cdk/index.d.ts +8 -0
- package/dist/cdk/index.d.ts.map +1 -0
- package/dist/cdk/index.js +11 -0
- package/dist/cdk/index.js.map +1 -0
- package/dist/cdk/stack.d.ts +29 -0
- package/dist/cdk/stack.d.ts.map +1 -0
- package/dist/cdk/stack.js +301 -0
- package/dist/cdk/stack.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/venture.d.ts +10 -2
- package/dist/venture.d.ts.map +1 -1
- package/dist/venture.js +10 -166
- package/dist/venture.js.map +1 -1
- package/package.json +19 -6
- package/dist/constructs/api.d.ts +0 -77
- package/dist/constructs/api.d.ts.map +0 -1
- package/dist/constructs/api.js +0 -101
- package/dist/constructs/api.js.map +0 -1
- package/dist/constructs/index.d.ts +0 -7
- package/dist/constructs/index.d.ts.map +0 -1
- package/dist/constructs/index.js +0 -23
- package/dist/constructs/index.js.map +0 -1
- package/dist/constructs/lambda.d.ts +0 -48
- package/dist/constructs/lambda.d.ts.map +0 -1
- package/dist/constructs/lambda.js +0 -50
- package/dist/constructs/lambda.js.map +0 -1
- package/dist/constructs/vpc.d.ts +0 -38
- package/dist/constructs/vpc.d.ts.map +0 -1
- package/dist/constructs/vpc.js +0 -35
- package/dist/constructs/vpc.js.map +0 -1
- package/dist/translators/auth.d.ts +0 -21
- package/dist/translators/auth.d.ts.map +0 -1
- package/dist/translators/auth.js +0 -69
- package/dist/translators/auth.js.map +0 -1
- package/dist/translators/cache.d.ts +0 -22
- package/dist/translators/cache.d.ts.map +0 -1
- package/dist/translators/cache.js +0 -38
- package/dist/translators/cache.js.map +0 -1
- package/dist/translators/database.d.ts +0 -33
- package/dist/translators/database.d.ts.map +0 -1
- package/dist/translators/database.js +0 -89
- package/dist/translators/database.js.map +0 -1
- package/dist/translators/index.d.ts +0 -16
- package/dist/translators/index.d.ts.map +0 -1
- package/dist/translators/index.js +0 -26
- package/dist/translators/index.js.map +0 -1
- package/dist/translators/orchestrator.d.ts +0 -19
- package/dist/translators/orchestrator.d.ts.map +0 -1
- package/dist/translators/orchestrator.js +0 -95
- package/dist/translators/orchestrator.js.map +0 -1
- package/dist/translators/queue.d.ts +0 -20
- package/dist/translators/queue.d.ts.map +0 -1
- package/dist/translators/queue.js +0 -39
- package/dist/translators/queue.js.map +0 -1
- package/dist/translators/schedule.d.ts +0 -19
- package/dist/translators/schedule.d.ts.map +0 -1
- package/dist/translators/schedule.js +0 -45
- package/dist/translators/schedule.js.map +0 -1
- package/dist/translators/storage.d.ts +0 -20
- package/dist/translators/storage.d.ts.map +0 -1
- package/dist/translators/storage.js +0 -49
- package/dist/translators/storage.js.map +0 -1
package/dist/constructs/vpc.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* VentureKit VPC Construct
|
|
4
|
-
*
|
|
5
|
-
* Creates a VPC with configurable subnets, NAT gateways, and flow logs.
|
|
6
|
-
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.createVpcConfig = createVpcConfig;
|
|
9
|
-
exports.getVpcCidr = getVpcCidr;
|
|
10
|
-
exports.isVpcRequired = isVpcRequired;
|
|
11
|
-
/**
|
|
12
|
-
* Create VPC configuration for SST
|
|
13
|
-
*
|
|
14
|
-
* This returns the configuration object that SST's Vpc component expects.
|
|
15
|
-
* The actual VPC creation is handled by SST.
|
|
16
|
-
*/
|
|
17
|
-
function createVpcConfig(name, config) {
|
|
18
|
-
return {
|
|
19
|
-
nat: config.natGateways > 0 ? 'managed' : undefined,
|
|
20
|
-
bastion: false,
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Get VPC CIDR configuration
|
|
25
|
-
*/
|
|
26
|
-
function getVpcCidr(config) {
|
|
27
|
-
return config.cidr;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Check if VPC is needed based on config
|
|
31
|
-
*/
|
|
32
|
-
function isVpcRequired(lambdaVpcEnabled) {
|
|
33
|
-
return lambdaVpcEnabled;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=vpc.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vpc.js","sourceRoot":"","sources":["../../src/constructs/vpc.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAwBH,0CAWC;AAKD,gCAEC;AAKD,sCAEC;AA/BD;;;;;GAKG;AACH,SAAgB,eAAe,CAC7B,IAAY,EACZ,MAAoB;IAKpB,OAAO;QACL,GAAG,EAAE,MAAM,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;QACnD,OAAO,EAAE,KAAK;KACf,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,UAAU,CAAC,MAAoB;IAC7C,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,SAAgB,aAAa,CAAC,gBAAyB;IACrD,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Auth Intent Translator
|
|
3
|
-
*
|
|
4
|
-
* Translates AuthIntent to SST Cognito resources.
|
|
5
|
-
* This file isolates all SST/Cognito-specific logic.
|
|
6
|
-
*/
|
|
7
|
-
import type { AuthIntent } from '@venturekit/core';
|
|
8
|
-
/**
|
|
9
|
-
* Auth output after creation
|
|
10
|
-
*/
|
|
11
|
-
export interface AuthOutput {
|
|
12
|
-
userPoolId: string;
|
|
13
|
-
userPoolArn: string;
|
|
14
|
-
clientId: string;
|
|
15
|
-
domain?: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Translate AuthIntent to SST Cognito UserPool
|
|
19
|
-
*/
|
|
20
|
-
export declare function translateAuth(intent: AuthIntent, sst: any, projectName: string): Promise<AuthOutput>;
|
|
21
|
-
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/translators/auth.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAwBD;;GAEG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,UAAU,EAClB,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,UAAU,CAAC,CAwCrB"}
|
package/dist/translators/auth.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Auth Intent Translator
|
|
4
|
-
*
|
|
5
|
-
* Translates AuthIntent to SST Cognito resources.
|
|
6
|
-
* This file isolates all SST/Cognito-specific logic.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.translateAuth = translateAuth;
|
|
10
|
-
/**
|
|
11
|
-
* Map password strength to Cognito password policy
|
|
12
|
-
*/
|
|
13
|
-
function getPasswordPolicy(strength = 'standard') {
|
|
14
|
-
if (strength === 'strong') {
|
|
15
|
-
return {
|
|
16
|
-
minLength: 12,
|
|
17
|
-
requireLowercase: true,
|
|
18
|
-
requireUppercase: true,
|
|
19
|
-
requireDigits: true,
|
|
20
|
-
requireSymbols: true,
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
return {
|
|
24
|
-
minLength: 8,
|
|
25
|
-
requireLowercase: true,
|
|
26
|
-
requireUppercase: true,
|
|
27
|
-
requireDigits: true,
|
|
28
|
-
requireSymbols: false,
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Translate AuthIntent to SST Cognito UserPool
|
|
33
|
-
*/
|
|
34
|
-
async function translateAuth(intent, sst, projectName) {
|
|
35
|
-
const resourceName = `${projectName}-${intent.id}`;
|
|
36
|
-
// Build user pool configuration
|
|
37
|
-
// The `sst` parameter here is the aws namespace (sst.aws)
|
|
38
|
-
const userPoolConfig = {};
|
|
39
|
-
if (intent.signInWith && intent.signInWith.length > 0) {
|
|
40
|
-
userPoolConfig.usernames = intent.signInWith;
|
|
41
|
-
}
|
|
42
|
-
// MFA configuration
|
|
43
|
-
if (intent.mfa && intent.mfa !== 'off') {
|
|
44
|
-
userPoolConfig.mfa = intent.mfa;
|
|
45
|
-
}
|
|
46
|
-
// Create user pool (SST v3: sst.aws.CognitoUserPool)
|
|
47
|
-
const userPool = new sst.CognitoUserPool(resourceName, userPoolConfig);
|
|
48
|
-
// Create clients using .addClient() method (SST v3 pattern)
|
|
49
|
-
let primaryClientId = '';
|
|
50
|
-
if (intent.clients && intent.clients.length > 0) {
|
|
51
|
-
for (const client of intent.clients) {
|
|
52
|
-
const appClient = userPool.addClient(client.name);
|
|
53
|
-
if (!primaryClientId) {
|
|
54
|
-
primaryClientId = appClient.id;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
// Create default client
|
|
60
|
-
const defaultClient = userPool.addClient('default');
|
|
61
|
-
primaryClientId = defaultClient.id;
|
|
62
|
-
}
|
|
63
|
-
return {
|
|
64
|
-
userPoolId: userPool.id,
|
|
65
|
-
userPoolArn: userPool.arn,
|
|
66
|
-
clientId: primaryClientId,
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=auth.js.map
|
|
@@ -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I,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAChD,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACpC,MAAM,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAClD,IAAI,CAAC,eAAe,EAAE,CAAC;gBACrB,eAAe,GAAG,SAAS,CAAC,EAAE,CAAC;YACjC,CAAC;QACH,CAAC;IACH,CAAC;SAAM,CAAC;QACN,wBAAwB;QACxB,MAAM,aAAa,GAAG,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QACpD,eAAe,GAAG,aAAa,CAAC,EAAE,CAAC;IACrC,CAAC;IAED,OAAO;QACL,UAAU,EAAE,QAAQ,CAAC,EAAE;QACvB,WAAW,EAAE,QAAQ,CAAC,GAAG;QACzB,QAAQ,EAAE,eAAe;KAC1B,CAAC;AACJ,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cache Intent Translator
|
|
3
|
-
*
|
|
4
|
-
* Translates CacheIntent to SST cache resources.
|
|
5
|
-
* This file isolates all SST/ElastiCache-specific logic.
|
|
6
|
-
*/
|
|
7
|
-
import type { CacheIntent } from '@venturekit/core';
|
|
8
|
-
/**
|
|
9
|
-
* Cache output after creation
|
|
10
|
-
*/
|
|
11
|
-
export interface CacheOutput {
|
|
12
|
-
endpoint: string;
|
|
13
|
-
port: number;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Translate CacheIntent to SST cache resource
|
|
17
|
-
*
|
|
18
|
-
* Note: SST v3 uses different constructs for Redis.
|
|
19
|
-
* This translator abstracts those differences.
|
|
20
|
-
*/
|
|
21
|
-
export declare function translateCache(intent: CacheIntent, sst: any, projectName: string): Promise<CacheOutput>;
|
|
22
|
-
//# sourceMappingURL=cache.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/translators/cache.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAgB,MAAM,kBAAkB,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAeD;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,WAAW,EACnB,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,WAAW,CAAC,CAWtB"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Cache Intent Translator
|
|
4
|
-
*
|
|
5
|
-
* Translates CacheIntent to SST cache resources.
|
|
6
|
-
* This file isolates all SST/ElastiCache-specific logic.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.translateCache = translateCache;
|
|
10
|
-
/**
|
|
11
|
-
* Map size to cache node type
|
|
12
|
-
*/
|
|
13
|
-
function sizeToNodeType(size) {
|
|
14
|
-
const mapping = {
|
|
15
|
-
small: 'cache.t3.micro',
|
|
16
|
-
medium: 'cache.t3.small',
|
|
17
|
-
large: 'cache.t3.medium',
|
|
18
|
-
xlarge: 'cache.t3.large',
|
|
19
|
-
};
|
|
20
|
-
return mapping[size];
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Translate CacheIntent to SST cache resource
|
|
24
|
-
*
|
|
25
|
-
* Note: SST v3 uses different constructs for Redis.
|
|
26
|
-
* This translator abstracts those differences.
|
|
27
|
-
*/
|
|
28
|
-
async function translateCache(intent, sst, projectName) {
|
|
29
|
-
const resourceName = `${projectName}-${intent.id}`;
|
|
30
|
-
// SST v3: sst.aws.Redis
|
|
31
|
-
// The `sst` parameter here is the aws namespace (sst.aws)
|
|
32
|
-
const redis = new sst.Redis(resourceName, {});
|
|
33
|
-
return {
|
|
34
|
-
endpoint: redis.host,
|
|
35
|
-
port: redis.port,
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=cache.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../src/translators/cache.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AA+BH,wCAeC;AAlCD;;GAEG;AACH,SAAS,cAAc,CAAC,IAAkB;IACxC,MAAM,OAAO,GAAiC;QAC5C,KAAK,EAAE,gBAAgB;QACvB,MAAM,EAAE,gBAAgB;QACxB,KAAK,EAAE,iBAAiB;QACxB,MAAM,EAAE,gBAAgB;KACzB,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;AACvB,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,cAAc,CAClC,MAAmB,EACnB,GAAQ,EACR,WAAmB;IAEnB,MAAM,YAAY,GAAG,GAAG,WAAW,IAAI,MAAM,CAAC,EAAE,EAAE,CAAC;IAEnD,wBAAwB;IACxB,0DAA0D;IAC1D,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;IAE9C,OAAO;QACL,QAAQ,EAAE,KAAK,CAAC,IAAI;QACpB,IAAI,EAAE,KAAK,CAAC,IAAI;KACjB,CAAC;AACJ,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Database Intent Translator
|
|
3
|
-
*
|
|
4
|
-
* Translates DatabaseIntent to SST RDS resources.
|
|
5
|
-
* This file isolates all SST/RDS-specific logic.
|
|
6
|
-
*/
|
|
7
|
-
import type { DatabaseIntent } from '@venturekit/core';
|
|
8
|
-
/**
|
|
9
|
-
* Database output after creation
|
|
10
|
-
*/
|
|
11
|
-
export interface DatabaseOutput {
|
|
12
|
-
endpoint: string;
|
|
13
|
-
port: number;
|
|
14
|
-
secretArn: string;
|
|
15
|
-
databaseName: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Translate DatabaseIntent to SST RDS configuration
|
|
19
|
-
*
|
|
20
|
-
* @param intent - The high-level database intent
|
|
21
|
-
* @param sst - The SST module (passed in to avoid import issues)
|
|
22
|
-
* @param projectName - The project name for resource naming
|
|
23
|
-
* @returns The created database output
|
|
24
|
-
*/
|
|
25
|
-
export declare function translateDatabase(intent: DatabaseIntent, sst: any, projectName: string): Promise<DatabaseOutput>;
|
|
26
|
-
/**
|
|
27
|
-
* Translate DatabaseIntent to SST configuration object
|
|
28
|
-
* (Alternative: returns config instead of creating resource)
|
|
29
|
-
*
|
|
30
|
-
* Use this when you need to defer resource creation.
|
|
31
|
-
*/
|
|
32
|
-
export declare function translateDatabaseConfig(intent: DatabaseIntent, projectName: string): Record<string, unknown>;
|
|
33
|
-
//# sourceMappingURL=database.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../src/translators/database.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAgB,MAAM,kBAAkB,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB;AAoCD;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,cAAc,CAAC,CAqBzB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,cAAc,EACtB,WAAW,EAAE,MAAM,GAClB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAazB"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Database Intent Translator
|
|
4
|
-
*
|
|
5
|
-
* Translates DatabaseIntent to SST RDS resources.
|
|
6
|
-
* This file isolates all SST/RDS-specific logic.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.translateDatabase = translateDatabase;
|
|
10
|
-
exports.translateDatabaseConfig = translateDatabaseConfig;
|
|
11
|
-
/**
|
|
12
|
-
* Map size preset to RDS instance class
|
|
13
|
-
* This mapping is the ONLY place that knows about AWS instance types
|
|
14
|
-
*/
|
|
15
|
-
function sizeToInstanceClass(size, engine) {
|
|
16
|
-
const mapping = {
|
|
17
|
-
small: 'db.t3.micro',
|
|
18
|
-
medium: 'db.t3.small',
|
|
19
|
-
large: 'db.t3.medium',
|
|
20
|
-
xlarge: 'db.t3.large',
|
|
21
|
-
};
|
|
22
|
-
return mapping[size];
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Map size preset to storage allocation
|
|
26
|
-
*/
|
|
27
|
-
function sizeToStorage(size) {
|
|
28
|
-
const mapping = {
|
|
29
|
-
small: 20,
|
|
30
|
-
medium: 50,
|
|
31
|
-
large: 100,
|
|
32
|
-
xlarge: 200,
|
|
33
|
-
};
|
|
34
|
-
return mapping[size];
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Get default port for engine
|
|
38
|
-
*/
|
|
39
|
-
function getDefaultPort(engine) {
|
|
40
|
-
return engine === 'postgres' ? 5432 : 3306;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Translate DatabaseIntent to SST RDS configuration
|
|
44
|
-
*
|
|
45
|
-
* @param intent - The high-level database intent
|
|
46
|
-
* @param sst - The SST module (passed in to avoid import issues)
|
|
47
|
-
* @param projectName - The project name for resource naming
|
|
48
|
-
* @returns The created database output
|
|
49
|
-
*/
|
|
50
|
-
async function translateDatabase(intent, sst, projectName) {
|
|
51
|
-
const resourceName = `${projectName}-${intent.id}`;
|
|
52
|
-
// Translate intent to SST v3 Postgres component
|
|
53
|
-
// The `sst` parameter here is the aws namespace (sst.aws)
|
|
54
|
-
const scaling = {
|
|
55
|
-
min: intent.size === 'small' ? '0.5 ACU' : intent.size === 'medium' ? '1 ACU' : '2 ACU',
|
|
56
|
-
max: intent.size === 'small' ? '2 ACU' : intent.size === 'medium' ? '4 ACU' : '8 ACU',
|
|
57
|
-
};
|
|
58
|
-
const rds = new sst.Postgres(resourceName, {
|
|
59
|
-
scaling,
|
|
60
|
-
database: intent.name,
|
|
61
|
-
});
|
|
62
|
-
return {
|
|
63
|
-
endpoint: rds.host,
|
|
64
|
-
port: rds.port,
|
|
65
|
-
secretArn: rds.secretArn ?? '',
|
|
66
|
-
databaseName: intent.name,
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Translate DatabaseIntent to SST configuration object
|
|
71
|
-
* (Alternative: returns config instead of creating resource)
|
|
72
|
-
*
|
|
73
|
-
* Use this when you need to defer resource creation.
|
|
74
|
-
*/
|
|
75
|
-
function translateDatabaseConfig(intent, projectName) {
|
|
76
|
-
return {
|
|
77
|
-
name: `${projectName}-${intent.id}`,
|
|
78
|
-
engine: intent.type,
|
|
79
|
-
instanceClass: sizeToInstanceClass(intent.size, intent.type),
|
|
80
|
-
allocatedStorage: sizeToStorage(intent.size),
|
|
81
|
-
databaseName: intent.name,
|
|
82
|
-
multiAz: intent.highAvailability ?? false,
|
|
83
|
-
storageEncrypted: intent.encrypted ?? true,
|
|
84
|
-
backupRetentionPeriod: intent.backups !== false ? (intent.backupRetentionDays ?? 7) : 0,
|
|
85
|
-
performanceInsightsEnabled: intent.performanceInsights ?? false,
|
|
86
|
-
port: getDefaultPort(intent.type),
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
//# sourceMappingURL=database.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"database.js","sour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
|
6
|
-
*
|
|
7
|
-
* When SST releases a new version, only this file needs updating.
|
|
8
|
-
*/
|
|
9
|
-
export { translateDatabase } from './database.js';
|
|
10
|
-
export { translateStorage } from './storage.js';
|
|
11
|
-
export { translateAuth } from './auth.js';
|
|
12
|
-
export { translateQueue } from './queue.js';
|
|
13
|
-
export { translateCache } from './cache.js';
|
|
14
|
-
export { translateSchedule } from './schedule.js';
|
|
15
|
-
export { translateAllIntents } from './orchestrator.js';
|
|
16
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/translators/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Intent Translators
|
|
4
|
-
*
|
|
5
|
-
* Translates VentureKit intents to SST resources.
|
|
6
|
-
* This is the ONLY place where SST-specific code lives.
|
|
7
|
-
*
|
|
8
|
-
* When SST releases a new version, only this file needs updating.
|
|
9
|
-
*/
|
|
10
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.translateAllIntents = exports.translateSchedule = exports.translateCache = exports.translateQueue = exports.translateAuth = exports.translateStorage = exports.translateDatabase = void 0;
|
|
12
|
-
var database_js_1 = require("./database.js");
|
|
13
|
-
Object.defineProperty(exports, "translateDatabase", { enumerable: true, get: function () { return database_js_1.translateDatabase; } });
|
|
14
|
-
var storage_js_1 = require("./storage.js");
|
|
15
|
-
Object.defineProperty(exports, "translateStorage", { enumerable: true, get: function () { return storage_js_1.translateStorage; } });
|
|
16
|
-
var auth_js_1 = require("./auth.js");
|
|
17
|
-
Object.defineProperty(exports, "translateAuth", { enumerable: true, get: function () { return auth_js_1.translateAuth; } });
|
|
18
|
-
var queue_js_1 = require("./queue.js");
|
|
19
|
-
Object.defineProperty(exports, "translateQueue", { enumerable: true, get: function () { return queue_js_1.translateQueue; } });
|
|
20
|
-
var cache_js_1 = require("./cache.js");
|
|
21
|
-
Object.defineProperty(exports, "translateCache", { enumerable: true, get: function () { return cache_js_1.translateCache; } });
|
|
22
|
-
var schedule_js_1 = require("./schedule.js");
|
|
23
|
-
Object.defineProperty(exports, "translateSchedule", { enumerable: true, get: function () { return schedule_js_1.translateSchedule; } });
|
|
24
|
-
var orchestrator_js_1 = require("./orchestrator.js");
|
|
25
|
-
Object.defineProperty(exports, "translateAllIntents", { enumerable: true, get: function () { return orchestrator_js_1.translateAllIntents; } });
|
|
26
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/translators/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAEH,6CAAkD;AAAzC,gHAAA,iBAAiB,OAAA;AAC1B,2CAAgD;AAAvC,8GAAA,gBAAgB,OAAA;AACzB,qCAA0C;AAAjC,wGAAA,aAAa,OAAA;AACtB,uCAA4C;AAAnC,0GAAA,cAAc,OAAA;AACvB,uCAA4C;AAAnC,0GAAA,cAAc,OAAA;AACvB,6CAAkD;AAAzC,gHAAA,iBAAiB,OAAA;AAC1B,qDAAwD;AAA/C,sHAAA,mBAAmB,OAAA"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Intent Orchestrator
|
|
3
|
-
*
|
|
4
|
-
* Orchestrates the translation of all intents to SST resources.
|
|
5
|
-
* This is the main entry point for intent-based infrastructure creation.
|
|
6
|
-
*/
|
|
7
|
-
import type { VentureIntent, IntentOutputs } from '@venturekit/core';
|
|
8
|
-
/**
|
|
9
|
-
* Translate all intents to SST resources
|
|
10
|
-
*
|
|
11
|
-
* This function is the single point where SST is imported and used.
|
|
12
|
-
* When SST releases a new version, only the translator files need updating.
|
|
13
|
-
*
|
|
14
|
-
* @param intents - The high-level infrastructure intents
|
|
15
|
-
* @param projectName - The project name for resource naming
|
|
16
|
-
* @returns Outputs from all created resources
|
|
17
|
-
*/
|
|
18
|
-
export declare function translateAllIntents(intents: VentureIntent, projectName: string): Promise<IntentOutputs>;
|
|
19
|
-
//# sourceMappingURL=orchestrator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../src/translators/orchestrator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAQrE;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,aAAa,EACtB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,aAAa,CAAC,CA4ExB"}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Intent Orchestrator
|
|
4
|
-
*
|
|
5
|
-
* Orchestrates the translation of all intents to SST resources.
|
|
6
|
-
* This is the main entry point for intent-based infrastructure creation.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.translateAllIntents = translateAllIntents;
|
|
10
|
-
const database_js_1 = require("./database.js");
|
|
11
|
-
const storage_js_1 = require("./storage.js");
|
|
12
|
-
const auth_js_1 = require("./auth.js");
|
|
13
|
-
const queue_js_1 = require("./queue.js");
|
|
14
|
-
const cache_js_1 = require("./cache.js");
|
|
15
|
-
const schedule_js_1 = require("./schedule.js");
|
|
16
|
-
/**
|
|
17
|
-
* Translate all intents to SST resources
|
|
18
|
-
*
|
|
19
|
-
* This function is the single point where SST is imported and used.
|
|
20
|
-
* When SST releases a new version, only the translator files need updating.
|
|
21
|
-
*
|
|
22
|
-
* @param intents - The high-level infrastructure intents
|
|
23
|
-
* @param projectName - The project name for resource naming
|
|
24
|
-
* @returns Outputs from all created resources
|
|
25
|
-
*/
|
|
26
|
-
async function translateAllIntents(intents, projectName) {
|
|
27
|
-
// Dynamic import of SST v3 - isolated to this file
|
|
28
|
-
const sst = await import('sst');
|
|
29
|
-
const aws = sst.aws ?? sst;
|
|
30
|
-
const outputs = {
|
|
31
|
-
databases: {},
|
|
32
|
-
storage: {},
|
|
33
|
-
auth: {},
|
|
34
|
-
queues: {},
|
|
35
|
-
caches: {},
|
|
36
|
-
};
|
|
37
|
-
// Translate databases
|
|
38
|
-
if (intents.databases) {
|
|
39
|
-
for (const intent of intents.databases) {
|
|
40
|
-
const result = await (0, database_js_1.translateDatabase)(intent, aws, projectName);
|
|
41
|
-
outputs.databases[intent.id] = {
|
|
42
|
-
endpoint: result.endpoint,
|
|
43
|
-
port: result.port,
|
|
44
|
-
secretArn: result.secretArn,
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
// Translate storage
|
|
49
|
-
if (intents.storage) {
|
|
50
|
-
for (const intent of intents.storage) {
|
|
51
|
-
const result = await (0, storage_js_1.translateStorage)(intent, aws, projectName);
|
|
52
|
-
outputs.storage[intent.id] = {
|
|
53
|
-
bucketName: result.bucketName,
|
|
54
|
-
cdnUrl: result.cdnUrl,
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
// Translate auth
|
|
59
|
-
if (intents.auth) {
|
|
60
|
-
for (const intent of intents.auth) {
|
|
61
|
-
const result = await (0, auth_js_1.translateAuth)(intent, aws, projectName);
|
|
62
|
-
outputs.auth[intent.id] = {
|
|
63
|
-
userPoolId: result.userPoolId,
|
|
64
|
-
clientId: result.clientId,
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
// Translate queues
|
|
69
|
-
if (intents.queues) {
|
|
70
|
-
for (const intent of intents.queues) {
|
|
71
|
-
const result = await (0, queue_js_1.translateQueue)(intent, aws, projectName);
|
|
72
|
-
outputs.queues[intent.id] = {
|
|
73
|
-
queueUrl: result.queueUrl,
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
// Translate caches
|
|
78
|
-
if (intents.caches) {
|
|
79
|
-
for (const intent of intents.caches) {
|
|
80
|
-
const result = await (0, cache_js_1.translateCache)(intent, aws, projectName);
|
|
81
|
-
outputs.caches[intent.id] = {
|
|
82
|
-
endpoint: result.endpoint,
|
|
83
|
-
port: result.port,
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
// Translate schedules (no output needed, they're event-driven)
|
|
88
|
-
if (intents.schedules) {
|
|
89
|
-
for (const intent of intents.schedules) {
|
|
90
|
-
await (0, schedule_js_1.translateSchedule)(intent, aws, projectName);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return outputs;
|
|
94
|
-
}
|
|
95
|
-
//# sourceMappingURL=orchestrator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator.js","sourceRoot":"","sources":["../../src/translators/orchestrator.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAoBH,kDA+EC;AAhGD,+CAAkD;AAClD,6CAAgD;AAChD,uCAA0C;AAC1C,yCAA4C;AAC5C,yCAA4C;AAC5C,+CAAkD;AAElD;;;;;;;;;GASG;AACI,KAAK,UAAU,mBAAmB,CACvC,OAAsB,EACtB,WAAmB;IAEnB,mDAAmD;IACnD,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,KAAK,CAAQ,CAAC;IACvC,MAAM,GAAG,GAAG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QS resources.
|
|
5
|
-
* This file isolates all SST/SQS-specific logic.
|
|
6
|
-
*/
|
|
7
|
-
import type { QueueIntent } from '@venturekit/core';
|
|
8
|
-
/**
|
|
9
|
-
* Queue output after creation
|
|
10
|
-
*/
|
|
11
|
-
export interface QueueOutput {
|
|
12
|
-
queueUrl: string;
|
|
13
|
-
queueArn: string;
|
|
14
|
-
deadLetterQueueUrl?: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Translate QueueIntent to SST Queue
|
|
18
|
-
*/
|
|
19
|
-
export declare function translateQueue(intent: QueueIntent, sst: any, projectName: string): Promise<QueueOutput>;
|
|
20
|
-
//# sourceMappingURL=queue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../src/translators/queue.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,WAAW,EACnB,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,WAAW,CAAC,CA8BtB"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Queue Intent Translator
|
|
4
|
-
*
|
|
5
|
-
* Translates QueueIntent to SST SQS resources.
|
|
6
|
-
* This file isolates all SST/SQS-specific logic.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.translateQueue = translateQueue;
|
|
10
|
-
/**
|
|
11
|
-
* Translate QueueIntent to SST Queue
|
|
12
|
-
*/
|
|
13
|
-
async function translateQueue(intent, sst, projectName) {
|
|
14
|
-
const resourceName = `${projectName}-${intent.id}`;
|
|
15
|
-
// Build queue configuration
|
|
16
|
-
const queueConfig = {
|
|
17
|
-
fifo: intent.type === 'fifo',
|
|
18
|
-
};
|
|
19
|
-
if (intent.visibilityTimeoutSeconds) {
|
|
20
|
-
queueConfig.visibilityTimeout = `${intent.visibilityTimeoutSeconds} seconds`;
|
|
21
|
-
}
|
|
22
|
-
// Create dead letter queue if requested
|
|
23
|
-
let dlqUrl;
|
|
24
|
-
if (intent.deadLetterQueue) {
|
|
25
|
-
const dlq = new sst.Queue(`${resourceName}-dlq`, {
|
|
26
|
-
fifo: intent.type === 'fifo',
|
|
27
|
-
});
|
|
28
|
-
queueConfig.dlq = dlq.arn;
|
|
29
|
-
dlqUrl = dlq.url;
|
|
30
|
-
}
|
|
31
|
-
// Create main queue
|
|
32
|
-
const queue = new sst.Queue(resourceName, queueConfig);
|
|
33
|
-
return {
|
|
34
|
-
queueUrl: queue.url,
|
|
35
|
-
queueArn: queue.arn,
|
|
36
|
-
deadLetterQueueUrl: dlqUrl,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=queue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queue.js","sourceRoot":"","sources":["../../src/translators/queue.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAgBH,wCAkCC;AArCD;;GAEG;AACI,KAAK,UAAU,cAAc,CAClC,MAAmB,EACnB,GAAQ,EACR,WAAmB;IAEnB,MAAM,YAAY,GAAG,GAAG,WAAW,IAAI,MAAM,CAAC,EAAE,EAAE,CAAC;IAEnD,4BAA4B;IAC5B,MAAM,WAAW,GAA4B;QAC3C,IAAI,EAAE,MAAM,CAAC,IAAI,KAAK,MAAM;KAC7B,CAAC;IAEF,IAAI,MAAM,CAAC,wBAAwB,EAAE,CAAC;QACpC,WAAW,CAAC,iBAAiB,GAAG,GAAG,MAAM,CAAC,wBAAwB,UAAU,CAAC;IAC/E,CAAC;IAED,wCAAwC;IACxC,IAAI,MAA0B,CAAC;IAC/B,IAAI,MAAM,CAAC,eAAe,EAAE,CAAC;QAC3B,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,YAAY,MAAM,EAAE;YAC/C,IAAI,EAAE,MAAM,CAAC,IAAI,KAAK,MAAM;SAC7B,CAAC,CAAC;QACH,WAAW,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC;QAC1B,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC;IACnB,CAAC;IAED,oBAAoB;IACpB,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;IAEvD,OAAO;QACL,QAAQ,EAAE,KAAK,CAAC,GAAG;QACnB,QAAQ,EAAE,KAAK,CAAC,GAAG;QACnB,kBAAkB,EAAE,MAAM;KAC3B,CAAC;AACJ,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Schedule Intent Translator
|
|
3
|
-
*
|
|
4
|
-
* Translates ScheduleIntent to SST Cron resources.
|
|
5
|
-
* This file isolates all SST/EventBridge-specific logic.
|
|
6
|
-
*/
|
|
7
|
-
import type { ScheduleIntent } from '@venturekit/core';
|
|
8
|
-
/**
|
|
9
|
-
* Schedule output after creation
|
|
10
|
-
*/
|
|
11
|
-
export interface ScheduleOutput {
|
|
12
|
-
ruleArn: string;
|
|
13
|
-
ruleName: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Translate ScheduleIntent to SST Cron
|
|
17
|
-
*/
|
|
18
|
-
export declare function translateSchedule(intent: ScheduleIntent, sst: any, projectName: string): Promise<ScheduleOutput>;
|
|
19
|
-
//# sourceMappingURL=schedule.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../src/translators/schedule.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAkBD;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,cAAc,CAAC,CAqBzB"}
|