infra-foundry 1.0.4 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/rds/component.d.ts +13 -0
- package/dist/rds/component.d.ts.map +1 -0
- package/dist/rds/component.js +65 -0
- package/dist/rds/component.js.map +1 -0
- package/dist/rds/index.d.ts +3 -0
- package/dist/rds/index.d.ts.map +1 -0
- package/dist/rds/index.js +19 -0
- package/dist/rds/index.js.map +1 -0
- package/dist/rds/types.d.ts +25 -0
- package/dist/rds/types.d.ts.map +1 -0
- package/dist/rds/types.js +3 -0
- package/dist/rds/types.js.map +1 -0
- package/dist/vercel/component.d.ts +13 -0
- package/dist/vercel/component.d.ts.map +1 -0
- package/dist/vercel/component.js +50 -0
- package/dist/vercel/component.js.map +1 -0
- package/dist/vercel/index.d.ts +3 -0
- package/dist/vercel/index.d.ts.map +1 -0
- package/dist/vercel/index.js +19 -0
- package/dist/vercel/index.js.map +1 -0
- package/dist/vercel/types.d.ts +16 -0
- package/dist/vercel/types.d.ts.map +1 -0
- package/dist/vercel/types.js +3 -0
- package/dist/vercel/types.js.map +1 -0
- package/package.json +7 -2
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,MAAM,MAAM,CAAA;AAC1B,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,KAAK,GAAG,MAAM,OAAO,CAAA;AAC5B,OAAO,KAAK,GAAG,MAAM,OAAO,CAAA;AAC5B,OAAO,KAAK,GAAG,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MAAM,iBAAiB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -33,8 +33,10 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.context = exports.commonTags = exports.addEnvSuffix = exports.EnvironmentUtils = exports.domainUtils = exports.secret = exports.image = exports.ecr = exports.vpc = exports.ecs = exports.ses = exports.route53 = exports.s3 = exports.cloudflare = exports.amplify = void 0;
|
|
36
|
+
exports.context = exports.commonTags = exports.addEnvSuffix = exports.EnvironmentUtils = exports.domainUtils = exports.secret = exports.image = exports.ecr = exports.vpc = exports.ecs = exports.ses = exports.route53 = exports.s3 = exports.cloudflare = exports.vercel = exports.amplify = exports.rds = void 0;
|
|
37
|
+
exports.rds = __importStar(require("./rds"));
|
|
37
38
|
exports.amplify = __importStar(require("./amplify"));
|
|
39
|
+
exports.vercel = __importStar(require("./vercel"));
|
|
38
40
|
exports.cloudflare = __importStar(require("./cloudflare"));
|
|
39
41
|
exports.s3 = __importStar(require("./s3"));
|
|
40
42
|
exports.route53 = __importStar(require("./route53"));
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAoC;AACpC,2DAA0C;AAC1C,2CAA0B;AAC1B,qDAAoC;AACpC,6CAA4B;AAC5B,6CAA4B;AAC5B,6CAA4B;AAC5B,6CAA4B;AAC5B,iDAAgC;AAChC,mDAAkC;AAElC,8DAA6C;AAC7C,wEAAuD;AAEvD,qDAAmD;AAA1C,4GAAA,YAAY,OAAA;AACrB,iDAA+C;AAAtC,wGAAA,UAAU,OAAA;AACnB,2CAAkD;AAAhC,kGAAA,OAAO,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA4B;AAC5B,qDAAoC;AACpC,mDAAkC;AAClC,2DAA0C;AAC1C,2CAA0B;AAC1B,qDAAoC;AACpC,6CAA4B;AAC5B,6CAA4B;AAC5B,6CAA4B;AAC5B,6CAA4B;AAC5B,iDAAgC;AAChC,mDAAkC;AAElC,8DAA6C;AAC7C,wEAAuD;AAEvD,qDAAmD;AAA1C,4GAAA,YAAY,OAAA;AACrB,iDAA+C;AAAtC,wGAAA,UAAU,OAAA;AACnB,2CAAkD;AAAhC,kGAAA,OAAO,OAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { rds } from '@pulumi/aws';
|
|
2
|
+
import { Output, ComponentResource, ComponentResourceOptions } from '@pulumi/pulumi';
|
|
3
|
+
import { RdsInstanceArgs } from './types';
|
|
4
|
+
export declare class RdsInstance extends ComponentResource {
|
|
5
|
+
readonly dbInstance: rds.Instance;
|
|
6
|
+
readonly endpoint: Output<string>;
|
|
7
|
+
readonly address: Output<string>;
|
|
8
|
+
readonly port: Output<number>;
|
|
9
|
+
constructor({ name, ...args }: RdsInstanceArgs, opts?: ComponentResourceOptions);
|
|
10
|
+
private getDefaultArgs;
|
|
11
|
+
private createAllowAllSecurityGroup;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/rds/component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAO,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AAEpF,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAEzC,qBAAa,WAAY,SAAQ,iBAAiB;IAChD,SAAgB,UAAU,EAAE,GAAG,CAAC,QAAQ,CAAA;IACxC,SAAgB,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;IACxC,SAAgB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;IACvC,SAAgB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;gBAExB,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,eAAe,EAAE,IAAI,CAAC,EAAE,wBAAwB;IA0B/E,OAAO,CAAC,cAAc;IA2BtB,OAAO,CAAC,2BAA2B;CA+BpC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RdsInstance = void 0;
|
|
4
|
+
const aws_1 = require("@pulumi/aws");
|
|
5
|
+
const pulumi_1 = require("@pulumi/pulumi");
|
|
6
|
+
class RdsInstance extends pulumi_1.ComponentResource {
|
|
7
|
+
constructor({ name, ...args }, opts) {
|
|
8
|
+
super('infra-foundry:rds:RdsInstance', name, {}, opts);
|
|
9
|
+
const securityGroup = this.createAllowAllSecurityGroup(name, args.tags || {});
|
|
10
|
+
this.dbInstance = new aws_1.rds.Instance(`${name}-instance`, {
|
|
11
|
+
...this.getDefaultArgs(args),
|
|
12
|
+
...args,
|
|
13
|
+
vpcSecurityGroupIds: [securityGroup.id],
|
|
14
|
+
identifier: `${name}-instance`,
|
|
15
|
+
}, { parent: this, ignoreChanges: ['identifier'] });
|
|
16
|
+
this.endpoint = this.dbInstance.endpoint;
|
|
17
|
+
this.address = this.dbInstance.address;
|
|
18
|
+
this.port = this.dbInstance.port;
|
|
19
|
+
this.registerOutputs({
|
|
20
|
+
endpoint: this.endpoint,
|
|
21
|
+
address: this.address,
|
|
22
|
+
port: this.port,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
getDefaultArgs(args) {
|
|
26
|
+
return {
|
|
27
|
+
instanceClass: args.instanceClass || 'db.t3.micro',
|
|
28
|
+
allocatedStorage: args.allocatedStorage || 20,
|
|
29
|
+
storageType: args.storageType || 'gp3',
|
|
30
|
+
backupRetentionPeriod: args.backupRetentionPeriod || 7,
|
|
31
|
+
backupWindow: args.backupWindow || '03:00-04:00',
|
|
32
|
+
maintenanceWindow: args.maintenanceWindow || 'mon:04:00-mon:05:00',
|
|
33
|
+
multiAz: args.multiAz || false,
|
|
34
|
+
publiclyAccessible: args.publiclyAccessible || true,
|
|
35
|
+
skipFinalSnapshot: args.skipFinalSnapshot || true,
|
|
36
|
+
performanceInsightsEnabled: args.performanceInsightsEnabled || false,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
createAllowAllSecurityGroup(name, tags) {
|
|
40
|
+
return new aws_1.ec2.SecurityGroup(`${name}-sg`, {
|
|
41
|
+
description: `Allow all inbound/outbound traffic for ${name} RDS`,
|
|
42
|
+
ingress: [
|
|
43
|
+
{
|
|
44
|
+
protocol: '-1',
|
|
45
|
+
fromPort: 0,
|
|
46
|
+
toPort: 0,
|
|
47
|
+
cidrBlocks: ['0.0.0.0/0'],
|
|
48
|
+
ipv6CidrBlocks: ['::/0'],
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
egress: [
|
|
52
|
+
{
|
|
53
|
+
protocol: '-1',
|
|
54
|
+
fromPort: 0,
|
|
55
|
+
toPort: 0,
|
|
56
|
+
cidrBlocks: ['0.0.0.0/0'],
|
|
57
|
+
ipv6CidrBlocks: ['::/0'],
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
tags,
|
|
61
|
+
}, { parent: this });
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.RdsInstance = RdsInstance;
|
|
65
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../src/rds/component.ts"],"names":[],"mappings":";;;AAAA,qCAAsC;AACtC,2CAAoF;AAIpF,MAAa,WAAY,SAAQ,0BAAiB;IAMhD,YAAY,EAAE,IAAI,EAAE,G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C,iBAAiB,IAAI,qBAAqB;YAClE,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,KAAK;YAC9B,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,IAAI,IAAI;YACnD,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,IAAI,IAAI;YACjD,0BAA0B,EAAE,IAAI,CAAC,0BAA0B,IAAI,KAAK;SACrE,CAAA;IACH,CAAC;IAEO,2BAA2B,CACjC,IAAY,EACZ,IAA6B;QAE7B,OAAO,IAAI,SAAG,CAAC,aAAa,CAC1B,GAAG,IAAI,KAAK,EACZ;YACE,WAAW,EAAE,0CAA0C,IAAI,MAAM;YACjE,OAAO,EAAE;gBACP;oBACE,QAAQ,EAAE,IAAI;oBACd,QAAQ,EAAE,CAAC;oBACX,MAAM,EAAE,CAAC;oBACT,UAAU,EAAE,CAAC,WAAW,CAAC;oBACzB,cAAc,EAAE,CAAC,MAAM,CAAC;iBACzB;aACF;YACD,MAAM,EAAE;gBACN;oBACE,QAAQ,EAAE,IAAI;oBACd,QAAQ,EAAE,CAAC;oBACX,MAAM,EAAE,CAAC;oBACT,UAAU,EAAE,CAAC,WAAW,CAAC;oBACzB,cAAc,EAAE,CAAC,MAAM,CAAC;iBACzB;aACF;YACD,IAAI;SACL,EACD,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB,CAAA;IACH,CAAC;CACF;AA1FD,kCA0FC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rds/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./component"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rds/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,0CAAuB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Input } from '@pulumi/pulumi';
|
|
2
|
+
export interface RdsInstanceArgs {
|
|
3
|
+
name: string;
|
|
4
|
+
engine: Input<string>;
|
|
5
|
+
engineVersion: Input<string>;
|
|
6
|
+
instanceClass?: Input<string>;
|
|
7
|
+
allocatedStorage?: Input<number>;
|
|
8
|
+
storageType?: Input<string>;
|
|
9
|
+
dbName: Input<string>;
|
|
10
|
+
username: Input<string>;
|
|
11
|
+
password: Input<string>;
|
|
12
|
+
dbSubnetGroupName?: Input<string>;
|
|
13
|
+
publiclyAccessible?: Input<boolean>;
|
|
14
|
+
backupRetentionPeriod?: Input<number>;
|
|
15
|
+
backupWindow?: Input<string>;
|
|
16
|
+
maintenanceWindow?: Input<string>;
|
|
17
|
+
multiAz?: Input<boolean>;
|
|
18
|
+
enabledCloudwatchLogsExports?: Input<Input<string>[]>;
|
|
19
|
+
performanceInsightsEnabled?: Input<boolean>;
|
|
20
|
+
skipFinalSnapshot?: Input<boolean>;
|
|
21
|
+
tags?: Input<{
|
|
22
|
+
[key: string]: Input<string>;
|
|
23
|
+
}>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/rds/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAEtC,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IAEZ,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACrB,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAC5B,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAC7B,gBAAgB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAChC,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAE3B,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACrB,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACvB,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAEvB,iBAAiB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACjC,kBAAkB,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IAEnC,qBAAqB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACrC,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAC5B,iBAAiB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAEjC,OAAO,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IACxB,4BAA4B,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;IACrD,0BAA0B,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IAE3C,iBAAiB,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IAClC,IAAI,CAAC,EAAE,KAAK,CAAC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAA;KAAE,CAAC,CAAA;CAC/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/rds/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentResource, ComponentResourceOptions, Output } from '@pulumi/pulumi';
|
|
2
|
+
import { Project, ProjectEnvironmentVariable, ProjectDomain } from '@pulumiverse/vercel';
|
|
3
|
+
import { VercelProjectConfig } from './types';
|
|
4
|
+
export declare class VercelProject extends ComponentResource {
|
|
5
|
+
readonly project: Project;
|
|
6
|
+
readonly environmentVariables: ProjectEnvironmentVariable[];
|
|
7
|
+
readonly domainResource?: ProjectDomain;
|
|
8
|
+
readonly projectId: Output<string>;
|
|
9
|
+
readonly projectName: Output<string>;
|
|
10
|
+
readonly domain: Output<string>;
|
|
11
|
+
constructor(name: string, config: VercelProjectConfig, opts?: ComponentResourceOptions);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/vercel/component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACpF,OAAO,EAAE,OAAO,EAAE,0BAA0B,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExF,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAE7C,qBAAa,aAAc,SAAQ,iBAAiB;IAClD,SAAgB,OAAO,EAAE,OAAO,CAAA;IAChC,SAAgB,oBAAoB,EAAE,0BAA0B,EAAE,CAAA;IAClE,SAAgB,cAAc,CAAC,EAAE,aAAa,CAAA;IAC9C,SAAgB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;IACzC,SAAgB,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;IAC3C,SAAgB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;gBAE1B,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,EAAE,IAAI,CAAC,EAAE,wBAAwB;CAiEvF"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VercelProject = void 0;
|
|
4
|
+
const pulumi_1 = require("@pulumi/pulumi");
|
|
5
|
+
const vercel_1 = require("@pulumiverse/vercel");
|
|
6
|
+
class VercelProject extends pulumi_1.ComponentResource {
|
|
7
|
+
constructor(name, config, opts) {
|
|
8
|
+
super('infra-foundry:vercel:VercelProject', name, {}, opts);
|
|
9
|
+
const { framework = 'nextjs', teamId, customDomain, gitRepo, environmentVariables = [], } = config;
|
|
10
|
+
this.project = new vercel_1.Project(name, {
|
|
11
|
+
name: config.name,
|
|
12
|
+
framework,
|
|
13
|
+
...(gitRepo ? { gitRepository: { type: 'github', repo: gitRepo } } : {}),
|
|
14
|
+
...(teamId ? { teamId } : {}),
|
|
15
|
+
}, { parent: this });
|
|
16
|
+
this.environmentVariables = environmentVariables.map((envVar) => {
|
|
17
|
+
const resourceName = `${name}-env-${envVar.key.toLowerCase().replace(/_/g, '-')}-${envVar.targets.join('-')}`;
|
|
18
|
+
return new vercel_1.ProjectEnvironmentVariable(resourceName, {
|
|
19
|
+
projectId: this.project.id,
|
|
20
|
+
key: envVar.key,
|
|
21
|
+
value: envVar.value,
|
|
22
|
+
targets: envVar.targets,
|
|
23
|
+
...(envVar.sensitive ? { sensitive: envVar.sensitive } : {}),
|
|
24
|
+
...(teamId ? { teamId } : {}),
|
|
25
|
+
}, { parent: this.project });
|
|
26
|
+
});
|
|
27
|
+
if (customDomain) {
|
|
28
|
+
this.domainResource = new vercel_1.ProjectDomain(`${name}-domain`, {
|
|
29
|
+
projectId: this.project.id,
|
|
30
|
+
domain: customDomain,
|
|
31
|
+
...(teamId ? { teamId } : {}),
|
|
32
|
+
}, { parent: this.project });
|
|
33
|
+
}
|
|
34
|
+
this.projectId = this.project.id;
|
|
35
|
+
this.projectName = this.project.name;
|
|
36
|
+
this.domain = this.domainResource
|
|
37
|
+
? this.domainResource.domain
|
|
38
|
+
: pulumi_1.Output.create(`${config.name}.vercel.app`);
|
|
39
|
+
this.registerOutputs({
|
|
40
|
+
project: this.project,
|
|
41
|
+
environmentVariables: this.environmentVariables,
|
|
42
|
+
domainResource: this.domainResource,
|
|
43
|
+
projectId: this.projectId,
|
|
44
|
+
projectName: this.projectName,
|
|
45
|
+
domain: this.domain,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.VercelProject = VercelProject;
|
|
50
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../src/vercel/component.ts"],"names":[],"mappings":";;;AAAA,2CAAoF;AACpF,gDAAwF;AAIxF,MAAa,aAAc,SAAQ,0BAAiB;IAQlD,YAAY,IAAY,EAAE,MAA2B,EAAE,IAA+B;QACpF,KAAK,CAAC,oCAAoC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,CAAA;QAE3D,MAAM,EACJ,SAAS,GAAG,QAAQ,EACpB,MAAM,EACN,YAAY,EACZ,OAAO,EACP,oBAAoB,GAAG,EAAE,GAC1B,GAAG,MAAM,CAAA;QAEV,IAAI,CAAC,OAAO,GAAG,IAAI,gBAAO,CACxB,IAAI,EACJ;YACE,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,SAAS;YACT,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,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AAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAC9B,EACD,EAAE,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,CACzB,CAAA;QACH,CAAC;QAED,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,CAAA;QAChC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAA;QACpC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,cAAc;YAC/B,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM;YAC5B,CAAC,CAAC,eAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,aAAa,CAAC,CAAA;QAE9C,IAAI,CAAC,eAAe,CAAC;YACnB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,oBAAoB,EAAE,IAAI,CAAC,oBAAoB;YAC/C,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAA;IACJ,CAAC;CACF;AAzED,sCAyEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vercel/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./component"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/vercel/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,0CAAuB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Input } from '@pulumi/pulumi';
|
|
2
|
+
export interface VercelEnvVar {
|
|
3
|
+
key: string;
|
|
4
|
+
value: Input<string>;
|
|
5
|
+
targets: Array<'production' | 'preview' | 'development'>;
|
|
6
|
+
sensitive?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface VercelProjectConfig {
|
|
9
|
+
name: string;
|
|
10
|
+
framework?: string;
|
|
11
|
+
teamId?: string;
|
|
12
|
+
customDomain?: string;
|
|
13
|
+
gitRepo?: string;
|
|
14
|
+
environmentVariables?: VercelEnvVar[];
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/vercel/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAEtC,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACpB,OAAO,EAAE,KAAK,CAAC,YAAY,GAAG,SAAS,GAAG,aAAa,CAAC,CAAA;IACxD,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,oBAAoB,CAAC,EAAE,YAAY,EAAE,CAAA;CACtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/vercel/types.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "infra-foundry",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Production-ready cloud infrastructure components for modern applications, built with TypeScript and Pulumi.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -47,14 +47,19 @@
|
|
|
47
47
|
"@pulumi/aws": "^6.0.0",
|
|
48
48
|
"@pulumi/awsx": "^2.0.0",
|
|
49
49
|
"@pulumi/cloudflare": "^6.0.0",
|
|
50
|
-
"@pulumi/pulumi": "^3.0.0"
|
|
50
|
+
"@pulumi/pulumi": "^3.0.0",
|
|
51
|
+
"@pulumiverse/vercel": "^1.0.0"
|
|
51
52
|
},
|
|
52
53
|
"peerDependenciesMeta": {
|
|
53
54
|
"@pulumi/cloudflare": {
|
|
54
55
|
"optional": true
|
|
56
|
+
},
|
|
57
|
+
"@pulumiverse/vercel": {
|
|
58
|
+
"optional": true
|
|
55
59
|
}
|
|
56
60
|
},
|
|
57
61
|
"dependencies": {
|
|
62
|
+
"@pulumiverse/vercel": "^4.6.1",
|
|
58
63
|
"typescript": "^5.0.0"
|
|
59
64
|
},
|
|
60
65
|
"devDependencies": {
|