@infoxchange/make-it-so 2.9.0-internal-testing-set-http-proxy-env-var-2.1 → 2.9.0-internal-testing-set-http-proxy-env-var-2.3
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-constructs/IxNextjsSite.d.ts.map +1 -1
- package/dist/cdk-constructs/IxNextjsSite.js +3 -0
- package/dist/lib/site/support.d.ts.map +1 -1
- package/dist/lib/site/support.js +6 -0
- package/package.json +1 -1
- package/src/cdk-constructs/IxNextjsSite.ts +7 -0
- package/src/lib/site/support.ts +6 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IxNextjsSite.d.ts","sourceRoot":"","sources":["../../src/cdk-constructs/IxNextjsSite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EACL,KAAK,uBAAuB,EAe7B,MAAM,wBAAwB,CAAC;AAEhC,KAAK,cAAc,GAAG,qBAAqB,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAClE,KAAK,WAAW,GAAG,qBAAqB,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/D,KAAK,cAAc,GAAG,uBAAuB,CAAC;AAE9C,qBAAa,YAAa,SAAQ,UAAU;gBAExC,KAAK,EAAE,cAAc,EACrB,EAAE,EAAE,WAAW,EACf,KAAK,GAAE,cAAmB;
|
|
1
|
+
{"version":3,"file":"IxNextjsSite.d.ts","sourceRoot":"","sources":["../../src/cdk-constructs/IxNextjsSite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EACL,KAAK,uBAAuB,EAe7B,MAAM,wBAAwB,CAAC;AAEhC,KAAK,cAAc,GAAG,qBAAqB,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAClE,KAAK,WAAW,GAAG,qBAAqB,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/D,KAAK,cAAc,GAAG,uBAAuB,CAAC;AAE9C,qBAAa,YAAa,SAAQ,UAAU;gBAExC,KAAK,EAAE,cAAc,EACrB,EAAE,EAAE,WAAW,EACf,KAAK,GAAE,cAAmB;IAyB5B,IAAW,aAAa,IAAI,MAAM,EAAE,CAEnC;IAED,IAAW,mBAAmB,IAAI,MAAM,GAAG,IAAI,CAE9C;IAED,IAAW,WAAW,IAAI,MAAM,GAAG,IAAI,CAEtC;IAED,IAAW,kBAAkB,IAAI,MAAM,EAAE,CAExC;IAED,IAAW,aAAa,IAAI,MAAM,GAAG,IAAI,CAExC;IAED,IAAW,aAAa,IAAI,MAAM,GAAG,IAAI,CAExC;CACF"}
|
|
@@ -4,13 +4,16 @@ import { getAliasDomain, getAlternativeDomains, getCustomDomains, getPrimaryCust
|
|
|
4
4
|
export class IxNextjsSite extends NextjsSite {
|
|
5
5
|
constructor(scope, id, props = {}) {
|
|
6
6
|
if (ixDeployConfig.isIxDeploy) {
|
|
7
|
+
console.log("props before", props);
|
|
7
8
|
props = setupVpcDetails(scope, id, props);
|
|
9
|
+
console.log("props after", props);
|
|
8
10
|
props = setupCustomDomain(scope, id, props);
|
|
9
11
|
props = setupCertificate(scope, id, props);
|
|
10
12
|
props = setupDomainAliasRedirect(scope, id, props);
|
|
11
13
|
}
|
|
12
14
|
props = setupDefaultEnvVars(scope, id, props);
|
|
13
15
|
props = applyConditionalEnvironmentVariables(scope, id, props);
|
|
16
|
+
console.log("parentCompatibleSsrProps(props)", parentCompatibleSsrProps(props));
|
|
14
17
|
super(scope, id, parentCompatibleSsrProps(props));
|
|
15
18
|
if (ixDeployConfig.isIxDeploy) {
|
|
16
19
|
setupDnsRecords(this, scope, id, props);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"support.d.ts","sourceRoot":"","sources":["../../../src/lib/site/support.ts"],"names":[],"mappings":"AAAA,OA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|
|
71
71
|
export function setupVpcDetails(scope, id, props) {
|
|
72
72
|
const updatedProps = { ...props };
|
|
73
73
|
const vpcDetails = new IxVpcDetails(scope, id + "-IxVpcDetails");
|
|
74
|
+
console.log("updatedProps.cdk", updatedProps.cdk);
|
|
74
75
|
if (!updatedProps.cdk?.server || !("vpc" in updatedProps.cdk.server)) {
|
|
76
|
+
console.log("adding vpc for default server");
|
|
75
77
|
updatedProps.cdk = updatedProps.cdk ?? {};
|
|
76
78
|
updatedProps.cdk.server = {
|
|
77
79
|
...updatedProps.cdk.server,
|
|
@@ -80,6 +82,9 @@ export function setupVpcDetails(scope, id, props) {
|
|
|
80
82
|
if (!ixDeployConfig.vpcHttpProxy) {
|
|
81
83
|
console.warn(`Attempting to add HTTP proxy environment variables to ${id} but the VPC_HTTP_PROXY env var is not configured.`);
|
|
82
84
|
}
|
|
85
|
+
// If we're using the AWS runner then the build stage will already be inside the VPC and required the proxy but
|
|
86
|
+
// the HTTP proxy environment variables will be already set in the environment by the pipeline and so the build
|
|
87
|
+
// stage will inherit that.
|
|
83
88
|
updatedProps.environment = {
|
|
84
89
|
HTTP_PROXY: { runtime: ixDeployConfig.vpcHttpProxy },
|
|
85
90
|
HTTPS_PROXY: { runtime: ixDeployConfig.vpcHttpProxy },
|
|
@@ -90,6 +95,7 @@ export function setupVpcDetails(scope, id, props) {
|
|
|
90
95
|
}
|
|
91
96
|
if (!updatedProps.cdk?.revalidation ||
|
|
92
97
|
!("vpc" in updatedProps.cdk.revalidation)) {
|
|
98
|
+
console.log("adding vpc for revalidation server");
|
|
93
99
|
updatedProps.cdk = props.cdk ?? {};
|
|
94
100
|
updatedProps.cdk.revalidation = {
|
|
95
101
|
...updatedProps.cdk.revalidation,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infoxchange/make-it-so",
|
|
3
|
-
"version": "2.9.0-internal-testing-set-http-proxy-env-var-2.
|
|
3
|
+
"version": "2.9.0-internal-testing-set-http-proxy-env-var-2.3",
|
|
4
4
|
"description": "Makes deploying services to IX infra easy",
|
|
5
5
|
"repository": "github:infoxchange/make-it-so",
|
|
6
6
|
"type": "module",
|
|
@@ -29,7 +29,9 @@ export class IxNextjsSite extends NextjsSite {
|
|
|
29
29
|
props: ConstructProps = {},
|
|
30
30
|
) {
|
|
31
31
|
if (ixDeployConfig.isIxDeploy) {
|
|
32
|
+
console.log("props before", props);
|
|
32
33
|
props = setupVpcDetails(scope, id, props);
|
|
34
|
+
console.log("props after", props);
|
|
33
35
|
props = setupCustomDomain(scope, id, props);
|
|
34
36
|
props = setupCertificate(scope, id, props);
|
|
35
37
|
props = setupDomainAliasRedirect(scope, id, props);
|
|
@@ -37,6 +39,11 @@ export class IxNextjsSite extends NextjsSite {
|
|
|
37
39
|
props = setupDefaultEnvVars(scope, id, props);
|
|
38
40
|
props = applyConditionalEnvironmentVariables(scope, id, props);
|
|
39
41
|
|
|
42
|
+
console.log(
|
|
43
|
+
"parentCompatibleSsrProps(props)",
|
|
44
|
+
parentCompatibleSsrProps(props),
|
|
45
|
+
);
|
|
46
|
+
|
|
40
47
|
super(scope, id, parentCompatibleSsrProps(props));
|
|
41
48
|
|
|
42
49
|
if (ixDeployConfig.isIxDeploy) {
|
package/src/lib/site/support.ts
CHANGED
|
@@ -142,7 +142,9 @@ export function setupVpcDetails<Props extends ExtendedNextjsSiteProps>(
|
|
|
142
142
|
): Props {
|
|
143
143
|
const updatedProps: Props = { ...props };
|
|
144
144
|
const vpcDetails = new IxVpcDetails(scope, id + "-IxVpcDetails");
|
|
145
|
+
console.log("updatedProps.cdk", updatedProps.cdk);
|
|
145
146
|
if (!updatedProps.cdk?.server || !("vpc" in updatedProps.cdk.server)) {
|
|
147
|
+
console.log("adding vpc for default server");
|
|
146
148
|
updatedProps.cdk = updatedProps.cdk ?? {};
|
|
147
149
|
updatedProps.cdk.server = {
|
|
148
150
|
...updatedProps.cdk.server,
|
|
@@ -155,6 +157,9 @@ export function setupVpcDetails<Props extends ExtendedNextjsSiteProps>(
|
|
|
155
157
|
);
|
|
156
158
|
}
|
|
157
159
|
|
|
160
|
+
// If we're using the AWS runner then the build stage will already be inside the VPC and required the proxy but
|
|
161
|
+
// the HTTP proxy environment variables will be already set in the environment by the pipeline and so the build
|
|
162
|
+
// stage will inherit that.
|
|
158
163
|
updatedProps.environment = {
|
|
159
164
|
HTTP_PROXY: { runtime: ixDeployConfig.vpcHttpProxy },
|
|
160
165
|
HTTPS_PROXY: { runtime: ixDeployConfig.vpcHttpProxy },
|
|
@@ -167,6 +172,7 @@ export function setupVpcDetails<Props extends ExtendedNextjsSiteProps>(
|
|
|
167
172
|
!updatedProps.cdk?.revalidation ||
|
|
168
173
|
!("vpc" in updatedProps.cdk.revalidation)
|
|
169
174
|
) {
|
|
175
|
+
console.log("adding vpc for revalidation server");
|
|
170
176
|
updatedProps.cdk = props.cdk ?? {};
|
|
171
177
|
updatedProps.cdk.revalidation = {
|
|
172
178
|
...updatedProps.cdk.revalidation,
|