@webiny/pulumi-aws 5.40.6 → 5.40.7-beta.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/apps/api/ApiCloudfront.js +15 -0
- package/apps/api/ApiCloudfront.js.map +1 -1
- package/apps/awsUtils.d.ts +1 -1
- package/apps/react/createReactPulumiApp.js +15 -0
- package/apps/react/createReactPulumiApp.js.map +1 -1
- package/apps/website/createWebsitePulumiApp.js +19 -0
- package/apps/website/createWebsitePulumiApp.js.map +1 -1
- package/package.json +10 -10
|
@@ -105,6 +105,21 @@ const ApiCloudfront = exports.ApiCloudfront = (0, _pulumi.createAppModule)({
|
|
|
105
105
|
viewerCertificate: {
|
|
106
106
|
cloudfrontDefaultCertificate: true
|
|
107
107
|
}
|
|
108
|
+
},
|
|
109
|
+
opts: {
|
|
110
|
+
// We are ignoring changes to the "staging" property. This is because of the following.
|
|
111
|
+
// With the 5.41.0 release of Webiny, we also upgraded Pulumi to v6. This introduced a change
|
|
112
|
+
// with how Cloudfront distributions are deployed, where Pulumi now also controls the new
|
|
113
|
+
// `staging` property.
|
|
114
|
+
// If not set, Pulumi will default it to `false`. Which is fine, but, the problem is
|
|
115
|
+
// that, because this property did not exist before, it will always be considered as a change
|
|
116
|
+
// upon deployment.
|
|
117
|
+
// We might think this is fine, but, the problem is that a change in this property causes
|
|
118
|
+
// a full replacement of the Cloudfront distribution, which is not acceptable. Especially
|
|
119
|
+
// if a custom domain has already been associated with the distribution. This then would
|
|
120
|
+
// require the user to disassociate the domain, wait for the distribution to be replaced,
|
|
121
|
+
// and then re-associate the domain. This is not a good experience.
|
|
122
|
+
ignoreChanges: ["staging"]
|
|
108
123
|
}
|
|
109
124
|
});
|
|
110
125
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["aws","_interopRequireWildcard","require","_pulumi","_ApiGateway","ApiCloudfront","exports","createAppModule","name","config","app","gateway","getModule","ApiGateway","cookies","forward","whitelistedNames","forwardHeaders","addResource","cloudfront","Distribution","waitForDeployment","isIpv6Enabled","enabled","defaultCacheBehavior","compress","allowedMethods","cachedMethods","forwardedValues","headers","queryString","minTtl","defaultTtl","maxTtl","targetOriginId","api","output","viewerProtocolPolicy","orderedCacheBehaviors","pathPattern","origins","domainName","stage","invokeUrl","apply","url","URL","hostname","originPath","pathname","originId","customOriginConfig","httpPort","httpsPort","originProtocolPolicy","originSslProtocols","restrictions","geoRestriction","restrictionType","viewerCertificate","cloudfrontDefaultCertificate"],"sources":["ApiCloudfront.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport { createAppModule, PulumiApp, PulumiAppModule } from \"@webiny/pulumi\";\n\nimport { ApiGateway } from \"./ApiGateway\";\n\nexport type ApiCloudfront = PulumiAppModule<typeof ApiCloudfront>;\n\nexport const ApiCloudfront = createAppModule({\n name: \"ApiCloudfront\",\n config(app: PulumiApp) {\n const gateway = app.getModule(ApiGateway);\n\n const cookies = {\n forward: \"whitelist\",\n whitelistedNames: [\"wby-id-token\"]\n };\n\n const forwardHeaders = [\"Origin\", \"Accept\", \"Accept-Language\"];\n\n return app.addResource(aws.cloudfront.Distribution, {\n name: \"api-cloudfront\",\n config: {\n waitForDeployment: false,\n isIpv6Enabled: true,\n enabled: true,\n defaultCacheBehavior: {\n compress: true,\n allowedMethods: [\"GET\", \"HEAD\", \"OPTIONS\", \"PUT\", \"POST\", \"PATCH\", \"DELETE\"],\n cachedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n forwardedValues: {\n cookies,\n headers: forwardHeaders,\n queryString: true\n },\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 0,\n maxTtl: 86400,\n targetOriginId: gateway.api.output.name,\n viewerProtocolPolicy: \"allow-all\"\n },\n orderedCacheBehaviors: [\n {\n compress: true,\n allowedMethods: [\n \"GET\",\n \"HEAD\",\n \"OPTIONS\",\n \"PUT\",\n \"POST\",\n \"PATCH\",\n \"DELETE\"\n ],\n cachedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n forwardedValues: {\n cookies: {\n forward: \"none\"\n },\n headers: [\"Accept\", \"Accept-Language\"],\n queryString: true\n },\n pathPattern: \"/cms*\",\n viewerProtocolPolicy: \"allow-all\",\n targetOriginId: gateway.api.output.name\n },\n {\n allowedMethods: [\"HEAD\", \"GET\", \"OPTIONS\"],\n cachedMethods: [\"HEAD\", \"GET\", \"OPTIONS\"],\n forwardedValues: {\n cookies: {\n forward: \"none\"\n },\n headers: forwardHeaders,\n queryString: true\n },\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 0,\n maxTtl: 2592000,\n pathPattern: \"/files/*\",\n viewerProtocolPolicy: \"allow-all\",\n targetOriginId: gateway.api.output.name\n },\n {\n allowedMethods: [\"HEAD\", \"GET\", \"OPTIONS\"],\n cachedMethods: [\"HEAD\", \"GET\", \"OPTIONS\"],\n forwardedValues: {\n cookies: cookies,\n headers: forwardHeaders,\n queryString: true\n },\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 0,\n maxTtl: 2592000,\n pathPattern: \"/private/*\",\n viewerProtocolPolicy: \"allow-all\",\n targetOriginId: gateway.api.output.name\n }\n ],\n origins: [\n {\n domainName: gateway.stage.output.invokeUrl.apply(\n (url: string) => new URL(url).hostname\n ),\n originPath: gateway.stage.output.invokeUrl.apply(\n (url: string) => new URL(url).pathname\n ),\n originId: gateway.api.output.name,\n customOriginConfig: {\n httpPort: 80,\n httpsPort: 443,\n originProtocolPolicy: \"https-only\",\n originSslProtocols: [\"TLSv1.2\"]\n }\n }\n ],\n restrictions: {\n geoRestriction: {\n restrictionType: \"none\"\n }\n },\n viewerCertificate: {\n cloudfrontDefaultCertificate: true\n }\n }\n });\n }\n});\n"],"mappings":";;;;;;;AAAA,IAAAA,GAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAA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ACL;UACIC,UAAU,EAAE9B,OAAO,CAAC+B,KAAK,CAACN,MAAM,CAACO,SAAS,CAACC,KAAK,CAC3CC,GAAW,IAAK,IAAIC,GAAG,CAACD,GAAG,CAAC,CAACE,QAClC,CAAC;UACDC,UAAU,EAAErC,OAAO,CAAC+B,KAAK,CAACN,MAAM,CAACO,SAAS,CAACC,KAAK,CAC3CC,GAAW,IAAK,IAAIC,GAAG,CAACD,GAAG,CAAC,CAACI,QAClC,CAAC;UACDC,QAAQ,EAAEvC,OAAO,CAACwB,GAAG,CAACC,MAAM,CAAC5B,IAAI;UACjC2C,kBAAkB,EAAE;YAChBC,QAAQ,EAAE,EAAE;YACZC,SAAS,EAAE,GAAG;YACdC,oBAAoB,EAAE,YAAY;YAClCC,kBAAkB,EAAE,CAAC,SAAS;UAClC;QACJ,CAAC,CACJ;QACDC,YAAY,EAAE;UACVC,cAAc,EAAE;YACZC,eAAe,EAAE;UACrB;QACJ,CAAC;QACDC,iBAAiB,EAAE;UACfC,4BAA4B,EAAE;QAClC;MACJ;IACJ,CAAC,CAAC;EACN;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["aws","_interopRequireWildcard","require","_pulumi","_ApiGateway","ApiCloudfront","exports","createAppModule","name","config","app","gateway","getModule","ApiGateway","cookies","forward","whitelistedNames","forwardHeaders","addResource","cloudfront","Distribution","waitForDeployment","isIpv6Enabled","enabled","defaultCacheBehavior","compress","allowedMethods","cachedMethods","forwardedValues","headers","queryString","minTtl","defaultTtl","maxTtl","targetOriginId","api","output","viewerProtocolPolicy","orderedCacheBehaviors","pathPattern","origins","domainName","stage","invokeUrl","apply","url","URL","hostname","originPath","pathname","originId","customOriginConfig","httpPort","httpsPort","originProtocolPolicy","originSslProtocols","restrictions","geoRestriction","restrictionType","viewerCertificate","cloudfrontDefaultCertificate","opts","ignoreChanges"],"sources":["ApiCloudfront.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport { createAppModule, PulumiApp, PulumiAppModule } from \"@webiny/pulumi\";\n\nimport { ApiGateway } from \"./ApiGateway\";\n\nexport type ApiCloudfront = PulumiAppModule<typeof ApiCloudfront>;\n\nexport const ApiCloudfront = createAppModule({\n name: \"ApiCloudfront\",\n config(app: PulumiApp) {\n const gateway = app.getModule(ApiGateway);\n\n const cookies = {\n forward: \"whitelist\",\n whitelistedNames: [\"wby-id-token\"]\n };\n\n const forwardHeaders = [\"Origin\", \"Accept\", \"Accept-Language\"];\n\n return app.addResource(aws.cloudfront.Distribution, {\n name: \"api-cloudfront\",\n config: {\n waitForDeployment: false,\n isIpv6Enabled: true,\n enabled: true,\n defaultCacheBehavior: {\n compress: true,\n allowedMethods: [\"GET\", \"HEAD\", \"OPTIONS\", \"PUT\", \"POST\", \"PATCH\", \"DELETE\"],\n cachedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n forwardedValues: {\n cookies,\n headers: forwardHeaders,\n queryString: true\n },\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 0,\n maxTtl: 86400,\n targetOriginId: gateway.api.output.name,\n viewerProtocolPolicy: \"allow-all\"\n },\n orderedCacheBehaviors: [\n {\n compress: true,\n allowedMethods: [\n \"GET\",\n \"HEAD\",\n \"OPTIONS\",\n \"PUT\",\n \"POST\",\n \"PATCH\",\n \"DELETE\"\n ],\n cachedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n forwardedValues: {\n cookies: {\n forward: \"none\"\n },\n headers: [\"Accept\", \"Accept-Language\"],\n queryString: true\n },\n pathPattern: \"/cms*\",\n viewerProtocolPolicy: \"allow-all\",\n targetOriginId: gateway.api.output.name\n },\n {\n allowedMethods: [\"HEAD\", \"GET\", \"OPTIONS\"],\n cachedMethods: [\"HEAD\", \"GET\", \"OPTIONS\"],\n forwardedValues: {\n cookies: {\n forward: \"none\"\n },\n headers: forwardHeaders,\n queryString: true\n },\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 0,\n maxTtl: 2592000,\n pathPattern: \"/files/*\",\n viewerProtocolPolicy: \"allow-all\",\n targetOriginId: gateway.api.output.name\n },\n {\n allowedMethods: [\"HEAD\", \"GET\", \"OPTIONS\"],\n cachedMethods: [\"HEAD\", \"GET\", \"OPTIONS\"],\n forwardedValues: {\n cookies: cookies,\n headers: forwardHeaders,\n queryString: true\n },\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 0,\n maxTtl: 2592000,\n pathPattern: \"/private/*\",\n viewerProtocolPolicy: \"allow-all\",\n targetOriginId: gateway.api.output.name\n }\n ],\n origins: [\n {\n domainName: gateway.stage.output.invokeUrl.apply(\n (url: string) => new URL(url).hostname\n ),\n originPath: gateway.stage.output.invokeUrl.apply(\n (url: string) => new URL(url).pathname\n ),\n originId: gateway.api.output.name,\n customOriginConfig: {\n httpPort: 80,\n httpsPort: 443,\n originProtocolPolicy: \"https-only\",\n originSslProtocols: [\"TLSv1.2\"]\n }\n }\n ],\n restrictions: {\n geoRestriction: {\n restrictionType: \"none\"\n }\n },\n viewerCertificate: {\n cloudfrontDefaultCertificate: true\n }\n },\n opts: {\n // We are ignoring changes to the \"staging\" property. This is because of the following.\n // With the 5.41.0 release of Webiny, we also upgraded Pulumi to v6. This introduced a change\n // with how Cloudfront distributions are deployed, where Pulumi now also controls the new\n // `staging` property.\n // If not set, Pulumi will default it to `false`. Which is fine, but, the problem is\n // that, because this property did not exist before, it will always be considered as a change\n // upon deployment.\n // We might think this is fine, but, the problem is that a change in this property causes\n // a full replacement of the Cloudfront distribution, which is not acceptable. Especially\n // if a custom domain has already been associated with the distribution. This then would\n // require the user to disassociate the domain, wait for the distribution to be replaced,\n // and then re-associate the domain. This is not a good experience.\n ignoreChanges: [\"staging\"]\n }\n });\n }\n});\n"],"mappings":";;;;;;;AAAA,IAAAA,GAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,O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ACIC,UAAU,EAAE9B,OAAO,CAAC+B,KAAK,CAACN,MAAM,CAACO,SAAS,CAACC,KAAK,CAC3CC,GAAW,IAAK,IAAIC,GAAG,CAACD,GAAG,CAAC,CAACE,QAClC,CAAC;UACDC,UAAU,EAAErC,OAAO,CAAC+B,KAAK,CAACN,MAAM,CAACO,SAAS,CAACC,KAAK,CAC3CC,GAAW,IAAK,IAAIC,GAAG,CAACD,GAAG,CAAC,CAACI,QAClC,CAAC;UACDC,QAAQ,EAAEvC,OAAO,CAACwB,GAAG,CAACC,MAAM,CAAC5B,IAAI;UACjC2C,kBAAkB,EAAE;YAChBC,QAAQ,EAAE,EAAE;YACZC,SAAS,EAAE,GAAG;YACdC,oBAAoB,EAAE,YAAY;YAClCC,kBAAkB,EAAE,CAAC,SAAS;UAClC;QACJ,CAAC,CACJ;QACDC,YAAY,EAAE;UACVC,cAAc,EAAE;YACZC,eAAe,EAAE;UACrB;QACJ,CAAC;QACDC,iBAAiB,EAAE;UACfC,4BAA4B,EAAE;QAClC;MACJ,CAAC;MACDC,IAAI,EAAE;QACF;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACAC,aAAa,EAAE,CAAC,SAAS;MAC7B;IACJ,CAAC,CAAC;EACN;AACJ,CAAC,CAAC","ignoreList":[]}
|
package/apps/awsUtils.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PulumiApp } from "@webiny/pulumi";
|
|
2
2
|
export declare function getAwsAccountId(app: PulumiApp): import("@pulumi/pulumi").Output<string>;
|
|
3
|
-
export declare function getAwsRegion(app: PulumiApp): import("@pulumi/pulumi").Output<"
|
|
3
|
+
export declare function getAwsRegion(app: PulumiApp): import("@pulumi/pulumi").Output<"af-south-1" | "ap-east-1" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ap-south-1" | "ap-south-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-southeast-3" | "ap-southeast-4" | "ca-central-1" | "ca-west-1" | "cn-north-1" | "cn-northwest-1" | "eu-central-1" | "eu-central-2" | "eu-north-1" | "eu-south-1" | "eu-south-2" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "me-central-1" | "me-south-1" | "sa-east-1" | "us-gov-east-1" | "us-gov-west-1" | "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2">;
|
|
@@ -81,6 +81,21 @@ const createReactPulumiApp = projectAppParams => {
|
|
|
81
81
|
viewerCertificate: {
|
|
82
82
|
cloudfrontDefaultCertificate: true
|
|
83
83
|
}
|
|
84
|
+
},
|
|
85
|
+
opts: {
|
|
86
|
+
// We are ignoring changes to the "staging" property. This is because of the following.
|
|
87
|
+
// With the 5.41.0 release of Webiny, we also upgraded Pulumi to v6. This introduced a change
|
|
88
|
+
// with how Cloudfront distributions are deployed, where Pulumi now also controls the new
|
|
89
|
+
// `staging` property.
|
|
90
|
+
// If not set, Pulumi will default it to `false`. Which is fine, but, the problem is
|
|
91
|
+
// that, because this property did not exist before, it will always be considered as a change
|
|
92
|
+
// upon deployment.
|
|
93
|
+
// We might think this is fine, but, the problem is that a change in this property causes
|
|
94
|
+
// a full replacement of the Cloudfront distribution, which is not acceptable. Especially
|
|
95
|
+
// if a custom domain has already been associated with the distribution. This then would
|
|
96
|
+
// require the user to disassociate the domain, wait for the distribution to be replaced,
|
|
97
|
+
// and then re-associate the domain. This is not a good experience.
|
|
98
|
+
ignoreChanges: ["staging"]
|
|
84
99
|
}
|
|
85
100
|
});
|
|
86
101
|
const domains = app.getParam(projectAppParams.domains);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["aws","_interopRequireWildcard","require","pulumi","_pulumi2","_utils","_createAppBucket","_customDomain","_withServiceManifest","_","createReactPulumiApp","projectAppParams","app","createPulumiApp","name","path","folder","config","program","pulumiResourceNamePrefix","getParam","onResource","resource","startsWith","core","addModule","CoreOutput","ApiOutput","addHandler","bucket","createPrivateAppBucket","cloudfront","addResource","Distribution","enabled","waitForDeployment","origins","origin","defaultRootObject","defaultCacheBehavior","compress","targetOriginId","originId","viewerProtocolPolicy","allowedMethods","cachedMethods","forwardedValues","cookies","forward","queryString","minTtl","defaultTtl","maxTtl","priceClass","customErrorResponses","errorCode","responseCode","responsePagePath","restrictions","geoRestriction","restrictionType","viewerCertificate","cloudfrontDefaultCertificate","domains","applyCustomDomain","addOutput","output","id","addDomainsUrlsOutputs","cloudfrontDistribution","map","distributionDomain","distributionUrl","usedDomain","usedUrl","tagResources","WbyAppName","WbyProjectName","String","process","env","WbyEnvironment","dynamodb","TableItem","tableName","primaryDynamodbTableName","hashKey","primaryDynamodbTableHashKey","rangeKey","primaryDynamodbTableRangeKey","apply","key","item","interpolate","params","run","variant","domainName","value","withServiceManifest","exports"],"sources":["createReactPulumiApp.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport * as pulumi from \"@pulumi/pulumi\";\nimport { createPulumiApp, PulumiAppParam, PulumiAppParamCallback } from \"@webiny/pulumi\";\nimport { addDomainsUrlsOutputs, tagResources } from \"~/utils\";\nimport { createPrivateAppBucket } from \"../createAppBucket\";\nimport { applyCustomDomain, CustomDomainParams } from \"../customDomain\";\nimport { withServiceManifest } from \"~/utils/withServiceManifest\";\nimport { ApiOutput, CoreOutput } from \"~/apps\";\n\nexport type ReactPulumiApp = ReturnType<typeof createReactPulumiApp>;\n\nexport interface CreateReactPulumiAppParams {\n /**\n * A name of the app, e.g., \"user-area\"\n */\n name: string;\n\n /**\n * A folder where the app is located, e.g., \"apps/user-area\"\n */\n folder: string;\n\n /** Custom domain configuration */\n domains?: PulumiAppParamCallback<CustomDomainParams>;\n\n /**\n * Provides a way to adjust existing Pulumi code (cloud infrastructure resources)\n * or add additional ones into the mix.\n */\n pulumi?: (app: ReactPulumiApp) => void | Promise<void>;\n\n /**\n * Prefixes names of all Pulumi cloud infrastructure resource with given prefix.\n */\n pulumiResourceNamePrefix?: PulumiAppParam<string>;\n\n /**\n * Treats provided environments as production environments, which\n * are deployed in production deployment mode.\n * https://www.webiny.com/docs/architecture/deployment-modes/production\n */\n productionEnvironments?: PulumiAppParam<string[]>;\n}\n\nexport const createReactPulumiApp = (projectAppParams: CreateReactPulumiAppParams) => {\n const app = createPulumiApp({\n name: projectAppParams.name,\n path: projectAppParams.folder,\n config: projectAppParams,\n program: async app => {\n const pulumiResourceNamePrefix = app.getParam(\n projectAppParams.pulumiResourceNamePrefix\n );\n if (pulumiResourceNamePrefix) {\n app.onResource(resource => {\n if (!resource.name.startsWith(pulumiResourceNamePrefix)) {\n resource.name = `${pulumiResourceNamePrefix}${resource.name}`;\n }\n });\n }\n\n const { name } = projectAppParams;\n\n // Register core output as a module available for all other modules\n const core = app.addModule(CoreOutput);\n app.addModule(ApiOutput);\n\n // Overrides must be applied via a handler, registered at the very start of the program.\n // By doing this, we're ensuring user's adjustments are not applied to late.\n if (projectAppParams.pulumi) {\n app.addHandler(() => {\n return projectAppParams.pulumi!(app as unknown as ReactPulumiApp);\n });\n }\n\n const bucket = createPrivateAppBucket(app, `${name}-app`);\n\n const cloudfront = app.addResource(aws.cloudfront.Distribution, {\n name: `${name}-app-cdn`,\n config: {\n enabled: true,\n waitForDeployment: false,\n origins: [bucket.origin],\n defaultRootObject: \"index.html\",\n defaultCacheBehavior: {\n compress: true,\n targetOriginId: bucket.origin.originId,\n viewerProtocolPolicy: \"redirect-to-https\",\n allowedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n cachedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n forwardedValues: {\n cookies: { forward: \"none\" },\n queryString: false\n },\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 600,\n maxTtl: 600\n },\n priceClass: \"PriceClass_100\",\n customErrorResponses: [\n { errorCode: 404, responseCode: 404, responsePagePath: \"/index.html\" }\n ],\n restrictions: {\n geoRestriction: {\n restrictionType: \"none\"\n }\n },\n viewerCertificate: {\n cloudfrontDefaultCertificate: true\n }\n }\n });\n\n const domains = app.getParam(projectAppParams.domains);\n if (domains) {\n applyCustomDomain(cloudfront, domains);\n }\n\n app.addOutput(\"appStorage\", bucket.bucket.output.id);\n\n app.addHandler(() => {\n addDomainsUrlsOutputs({\n app,\n cloudfrontDistribution: cloudfront,\n map: {\n distributionDomain: \"cloudfrontAppDomain\",\n distributionUrl: \"cloudfrontAppUrl\",\n usedDomain: \"appDomain\",\n usedUrl: \"appUrl\"\n }\n });\n });\n\n tagResources({\n WbyAppName: name,\n WbyProjectName: String(process.env[\"WEBINY_PROJECT_NAME\"]),\n WbyEnvironment: String(process.env[\"WEBINY_ENV\"])\n });\n\n /**\n * We need to store the appUrl to the admin settings item in the dynamodb\n */\n app.addResource(aws.dynamodb.TableItem, {\n name: \"adminSettings\",\n config: {\n tableName: core.primaryDynamodbTableName,\n hashKey: core.primaryDynamodbTableHashKey,\n rangeKey: pulumi\n .output(core.primaryDynamodbTableRangeKey)\n .apply(key => key || \"SK\"),\n item: pulumi.interpolate`{\n \"PK\": {\"S\": \"ADMIN#SETTINGS\"},\n \"SK\": {\"S\": \"${app.params.run.variant || \"default\"}\"},\n \"data\": {\n \"M\": {\n \"appUrl\": {\n \"S\": \"${cloudfront.output.domainName.apply(\n value => `https://${value}`\n )}\"\n }\n }\n }\n }`\n }\n });\n\n return {\n ...bucket,\n cloudfront\n };\n }\n });\n\n return withServiceManifest(app);\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,GAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,oBAAA,GAAAN,OAAA;AACA,IAAAO,CAAA,GAAAP,OAAA;AAqCO,MAAMQ,oBAAoB,GAAIC,gBAA4C,IAAK;EAClF,MAAMC,GAAG,GAAG,IAAAC,wBAAe,EAAC;I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AC;MAEF,IAAAC,mBAAY,EAAC;QACTC,UAAU,EAAE9D,IAAI;QAChB+D,cAAc,EAAEC,MAAM,CAACC,OAAO,CAACC,GAAG,CAAC,qBAAqB,CAAC,CAAC;QAC1DC,cAAc,EAAEH,MAAM,CAACC,OAAO,CAACC,GAAG,CAAC,YAAY,CAAC;MACpD,CAAC,CAAC;;MAEF;AACZ;AACA;MACYpE,GAAG,CAACoB,WAAW,CAAChC,GAAG,CAACkF,QAAQ,CAACC,SAAS,EAAE;QACpCrE,IAAI,EAAE,eAAe;QACrBG,MAAM,EAAE;UACJmE,SAAS,EAAE5D,IAAI,CAAC6D,wBAAwB;UACxCC,OAAO,EAAE9D,IAAI,CAAC+D,2BAA2B;UACzCC,QAAQ,EAAErF,MAAM,CACX+D,MAAM,CAAC1C,IAAI,CAACiE,4BAA4B,CAAC,CACzCC,KAAK,CAACC,GAAG,IAAIA,GAAG,IAAI,IAAI,CAAC;UAC9BC,IAAI,EAAEzF,MAAM,CAAC0F,WAAY;AAC7C;AACA,yCAAyCjF,GAAG,CAACkF,MAAM,CAACC,GAAG,CAACC,OAAO,IAAI,SAAU;AAC7E;AACA;AACA;AACA,wCAAwCjE,UAAU,CAACmC,MAAM,CAAC+B,UAAU,CAACP,KAAK,CACtCQ,KAAK,IAAK,WAAUA,KAAM,EAC9B,CAAE;AAClC;AACA;AACA;AACA;QACgB;MACJ,CAAC,CAAC;MAEF,OAAO;QACH,GAAGrE,MAAM;QACTE;MACJ,CAAC;IACL;EACJ,CAAC,CAAC;EAEF,OAAO,IAAAoE,wCAAmB,EAACvF,GAAG,CAAC;AACnC,CAAC;AAACwF,OAAA,CAAA1F,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["aws","_interopRequireWildcard","require","pulumi","_pulumi2","_utils","_createAppBucket","_customDomain","_withServiceManifest","_","createReactPulumiApp","projectAppParams","app","createPulumiApp","name","path","folder","config","program","pulumiResourceNamePrefix","getParam","onResource","resource","startsWith","core","addModule","CoreOutput","ApiOutput","addHandler","bucket","createPrivateAppBucket","cloudfront","addResource","Distribution","enabled","waitForDeployment","origins","origin","defaultRootObject","defaultCacheBehavior","compress","targetOriginId","originId","viewerProtocolPolicy","allowedMethods","cachedMethods","forwardedValues","cookies","forward","queryString","minTtl","defaultTtl","maxTtl","priceClass","customErrorResponses","errorCode","responseCode","responsePagePath","restrictions","geoRestriction","restrictionType","viewerCertificate","cloudfrontDefaultCertificate","opts","ignoreChanges","domains","applyCustomDomain","addOutput","output","id","addDomainsUrlsOutputs","cloudfrontDistribution","map","distributionDomain","distributionUrl","usedDomain","usedUrl","tagResources","WbyAppName","WbyProjectName","String","process","env","WbyEnvironment","dynamodb","TableItem","tableName","primaryDynamodbTableName","hashKey","primaryDynamodbTableHashKey","rangeKey","primaryDynamodbTableRangeKey","apply","key","item","interpolate","params","run","variant","domainName","value","withServiceManifest","exports"],"sources":["createReactPulumiApp.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport * as pulumi from \"@pulumi/pulumi\";\nimport { createPulumiApp, PulumiAppParam, PulumiAppParamCallback } from \"@webiny/pulumi\";\nimport { addDomainsUrlsOutputs, tagResources } from \"~/utils\";\nimport { createPrivateAppBucket } from \"../createAppBucket\";\nimport { applyCustomDomain, CustomDomainParams } from \"../customDomain\";\nimport { withServiceManifest } from \"~/utils/withServiceManifest\";\nimport { ApiOutput, CoreOutput } from \"~/apps\";\n\nexport type ReactPulumiApp = ReturnType<typeof createReactPulumiApp>;\n\nexport interface CreateReactPulumiAppParams {\n /**\n * A name of the app, e.g., \"user-area\"\n */\n name: string;\n\n /**\n * A folder where the app is located, e.g., \"apps/user-area\"\n */\n folder: string;\n\n /** Custom domain configuration */\n domains?: PulumiAppParamCallback<CustomDomainParams>;\n\n /**\n * Provides a way to adjust existing Pulumi code (cloud infrastructure resources)\n * or add additional ones into the mix.\n */\n pulumi?: (app: ReactPulumiApp) => void | Promise<void>;\n\n /**\n * Prefixes names of all Pulumi cloud infrastructure resource with given prefix.\n */\n pulumiResourceNamePrefix?: PulumiAppParam<string>;\n\n /**\n * Treats provided environments as production environments, which\n * are deployed in production deployment mode.\n * https://www.webiny.com/docs/architecture/deployment-modes/production\n */\n productionEnvironments?: PulumiAppParam<string[]>;\n}\n\nexport const createReactPulumiApp = (projectAppParams: CreateReactPulumiAppParams) => {\n const app = createPulumiApp({\n name: projectAppParams.name,\n path: projectAppParams.folder,\n config: projectAppParams,\n program: async app => {\n const pulumiResourceNamePrefix = app.getParam(\n projectAppParams.pulumiResourceNamePrefix\n );\n if (pulumiResourceNamePrefix) {\n app.onResource(resource => {\n if (!resource.name.startsWith(pulumiResourceNamePrefix)) {\n resource.name = `${pulumiResourceNamePrefix}${resource.name}`;\n }\n });\n }\n\n const { name } = projectAppParams;\n\n // Register core output as a module available for all other modules\n const core = app.addModule(CoreOutput);\n app.addModule(ApiOutput);\n\n // Overrides must be applied via a handler, registered at the very start of the program.\n // By doing this, we're ensuring user's adjustments are not applied to late.\n if (projectAppParams.pulumi) {\n app.addHandler(() => {\n return projectAppParams.pulumi!(app as unknown as ReactPulumiApp);\n });\n }\n\n const bucket = createPrivateAppBucket(app, `${name}-app`);\n\n const cloudfront = app.addResource(aws.cloudfront.Distribution, {\n name: `${name}-app-cdn`,\n config: {\n enabled: true,\n waitForDeployment: false,\n origins: [bucket.origin],\n defaultRootObject: \"index.html\",\n defaultCacheBehavior: {\n compress: true,\n targetOriginId: bucket.origin.originId,\n viewerProtocolPolicy: \"redirect-to-https\",\n allowedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n cachedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n forwardedValues: {\n cookies: { forward: \"none\" },\n queryString: false\n },\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 600,\n maxTtl: 600\n },\n priceClass: \"PriceClass_100\",\n customErrorResponses: [\n { errorCode: 404, responseCode: 404, responsePagePath: \"/index.html\" }\n ],\n restrictions: {\n geoRestriction: {\n restrictionType: \"none\"\n }\n },\n viewerCertificate: {\n cloudfrontDefaultCertificate: true\n }\n },\n opts: {\n // We are ignoring changes to the \"staging\" property. This is because of the following.\n // With the 5.41.0 release of Webiny, we also upgraded Pulumi to v6. This introduced a change\n // with how Cloudfront distributions are deployed, where Pulumi now also controls the new\n // `staging` property.\n // If not set, Pulumi will default it to `false`. Which is fine, but, the problem is\n // that, because this property did not exist before, it will always be considered as a change\n // upon deployment.\n // We might think this is fine, but, the problem is that a change in this property causes\n // a full replacement of the Cloudfront distribution, which is not acceptable. Especially\n // if a custom domain has already been associated with the distribution. This then would\n // require the user to disassociate the domain, wait for the distribution to be replaced,\n // and then re-associate the domain. This is not a good experience.\n ignoreChanges: [\"staging\"]\n }\n });\n\n const domains = app.getParam(projectAppParams.domains);\n if (domains) {\n applyCustomDomain(cloudfront, domains);\n }\n\n app.addOutput(\"appStorage\", bucket.bucket.output.id);\n\n app.addHandler(() => {\n addDomainsUrlsOutputs({\n app,\n cloudfrontDistribution: cloudfront,\n map: {\n distributionDomain: \"cloudfrontAppDomain\",\n distributionUrl: \"cloudfrontAppUrl\",\n usedDomain: \"appDomain\",\n usedUrl: \"appUrl\"\n }\n });\n });\n\n tagResources({\n WbyAppName: name,\n WbyProjectName: String(process.env[\"WEBINY_PROJECT_NAME\"]),\n WbyEnvironment: String(process.env[\"WEBINY_ENV\"])\n });\n\n /**\n * We need to store the appUrl to the admin settings item in the dynamodb\n */\n app.addResource(aws.dynamodb.TableItem, {\n name: \"adminSettings\",\n config: {\n tableName: core.primaryDynamodbTableName,\n hashKey: core.primaryDynamodbTableHashKey,\n rangeKey: pulumi\n .output(core.primaryDynamodbTableRangeKey)\n .apply(key => key || \"SK\"),\n item: pulumi.interpolate`{\n \"PK\": {\"S\": \"ADMIN#SETTINGS\"},\n \"SK\": {\"S\": \"${app.params.run.variant || \"default\"}\"},\n \"data\": {\n \"M\": {\n \"appUrl\": {\n \"S\": \"${cloudfront.output.domainName.apply(\n value => `https://${value}`\n )}\"\n }\n }\n }\n }`\n }\n });\n\n return {\n ...bucket,\n cloudfront\n };\n }\n });\n\n return withServiceManifest(app);\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,GAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,oBAAA,GAAAN,OAAA;AACA,IAAAO,CAAA,GAAAP,OAAA;AAqCO,MAAMQ,oBAAoB,GAAIC,gBAA4C,IAAK;EAClF,MAAMC,GAAG,GAAG,IAAAC,wBAAe,EAAC;IACxBC,IAAI,EAAEH,gBAAgB,CAACG,IAAI;IAC3BC,IAAI,EAAEJ,gBAAgB,CAACK,MAAM;IAC7BC,MAAM,EAAEN,gBAAgB;IACxBO,OAAO,EAAE,MAAMN,GAAG,IAAI;MAClB,MAAMO,wBAAwB,GAAGP,GAAG,CAACQ,QAAQ,CACzCT,gBAAgB,CAACQ,wBACrB,CAAC;MACD,IAAIA,wBAAwB,EAAE;QAC1BP,GAAG,CAACS,UAAU,CAACC,QAAQ,IAAI;UACvB,IAAI,CAACA,QAAQ,CAACR,IAAI,CAACS,UAAU,CAACJ,wBAAwB,CAAC,EAAE;YACrDG,QAAQ,CAACR,IAAI,GAAI,GAAEK,wBAAyB,GAAEG,QAAQ,CAACR,IAAK,EAAC;UACjE;QACJ,CAAC,CAAC;MACN;MAEA,MAAM;QAAEA;MAAK,CAAC,GAAGH,gBAAgB;;MAEjC;MACA,MAAMa,IAAI,GAAGZ,GAAG,CAACa,SAAS,CAACC,YAAU,CAAC;MACtCd,GAAG,CAACa,SAAS,CAACE,WAAS,CAAC;;MAExB;MACA;MACA,IAAIhB,gBAAgB,CAACR,MAAM,EAAE;QACzBS,GAAG,CAACgB,UAAU,CAAC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;AAC7C;AACA,yCAAyCnF,GAAG,CAACoF,MAAM,CAACC,GAAG,CAACC,OAAO,IAAI,SAAU;AAC7E;AACA;AACA;AACA,wCAAwCnE,UAAU,CAACqC,MAAM,CAAC+B,UAAU,CAACP,KAAK,CACtCQ,KAAK,IAAK,WAAUA,KAAM,EAC9B,CAAE;AAClC;AACA;AACA;AACA;QACgB;MACJ,CAAC,CAAC;MAEF,OAAO;QACH,GAAGvE,MAAM;QACTE;MACJ,CAAC;IACL;EACJ,CAAC,CAAC;EAEF,OAAO,IAAAsE,wCAAmB,EAACzF,GAAG,CAAC;AACnC,CAAC;AAAC0F,OAAA,CAAA5F,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -91,6 +91,21 @@ const createWebsitePulumiApp = (projectAppParams = {}) => {
|
|
|
91
91
|
viewerCertificate: {
|
|
92
92
|
cloudfrontDefaultCertificate: true
|
|
93
93
|
}
|
|
94
|
+
},
|
|
95
|
+
opts: {
|
|
96
|
+
// We are ignoring changes to the "staging" property. This is because of the following.
|
|
97
|
+
// With the 5.41.0 release of Webiny, we also upgraded Pulumi to v6. This introduced a change
|
|
98
|
+
// with how Cloudfront distributions are deployed, where Pulumi now also controls the new
|
|
99
|
+
// `staging` property.
|
|
100
|
+
// If not set, Pulumi will default it to `false`. Which is fine, but, the problem is
|
|
101
|
+
// that, because this property did not exist before, it will always be considered as a change
|
|
102
|
+
// upon deployment.
|
|
103
|
+
// We might think this is fine, but, the problem is that a change in this property causes
|
|
104
|
+
// a full replacement of the Cloudfront distribution, which is not acceptable. Especially
|
|
105
|
+
// if a custom domain has already been associated with the distribution. This then would
|
|
106
|
+
// require the user to disassociate the domain, wait for the distribution to be replaced,
|
|
107
|
+
// and then re-associate the domain. This is not a good experience.
|
|
108
|
+
ignoreChanges: ["staging"]
|
|
94
109
|
}
|
|
95
110
|
});
|
|
96
111
|
const deliveryBucket = (0, _createAppBucket.createPrivateAppBucket)(app, "delivery");
|
|
@@ -171,6 +186,10 @@ const createWebsitePulumiApp = (projectAppParams = {}) => {
|
|
|
171
186
|
viewerCertificate: {
|
|
172
187
|
cloudfrontDefaultCertificate: true
|
|
173
188
|
}
|
|
189
|
+
},
|
|
190
|
+
opts: {
|
|
191
|
+
// Check the comment in the `appCloudfront` resource above for more info.
|
|
192
|
+
ignoreChanges: ["staging"]
|
|
174
193
|
}
|
|
175
194
|
});
|
|
176
195
|
const prerendering = (0, _WebsitePrerendering.createPrerenderingService)(app, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["pulumi","_interopRequireWildcard","require","aws","_fs","_interopRequireDefault","_pulumi2","_createAppBucket","_customDomain","_WebsitePrerendering","_","_utils","_tenantRouter","_withServiceManifest","_constants","createWebsitePulumiApp","projectAppParams","baseApp","createPulumiApp","name","path","config","program","app","pulumiResourceNamePrefix","getParam","onResource","resource","startsWith","addHandler","productionEnvironments","params","create","DEFAULT_PROD_ENV_NAMES","isProduction","includes","run","env","core","addModule","CoreOutput","ApiOutput","vpcEnabled","vpc","VpcConfig","enabled","appBucket","createPrivateAppBucket","appCloudfront","addResource","cloudfront","Distribution","waitForDeployment","origins","origin","defaultRootObject","defaultCacheBehavior","compress","targetOriginId","originId","viewerProtocolPolicy","allowedMethods","cachedMethods","forwardedValues","cookies","forward","queryString","minTtl","defaultTtl","maxTtl","priceClass","customErrorResponses","errorCode","responseCode","responsePagePath","restrictions","geoRestriction","restrictionType","viewerCertificate","cloudfrontDefaultCertificate","deliveryBucket","viewerRequest","Function","runtime","publish","code","fs","readFileSync","__dirname","deliveryCloudfront","originRequestPolicyId","functionAssociations","functionArn","output","arn","eventType","orderedCacheBehaviors","headers","pathPattern","prerendering","createPrerenderingService","dbTableName","primaryDynamodbTableName","dbTableHashKey","primaryDynamodbTableHashKey","dbTableRangeKey","primaryDynamodbTableRangeKey","appUrl","interpolate","domainName","deliveryUrl","bucket","cloudfrontId","id","domains","applyCustomDomain","previewDomains","process","WCP_PROJECT_ENVIRONMENT","WEBINY_MULTI_TENANCY","originLambda","applyTenantRouter","addOutputs","websiteRouterOriginRequestFunction","appId","appStorage","deliveryId","deliveryStorage","addDomainsUrlsOutputs","cloudfrontDistribution","map","distributionDomain","distributionUrl","usedDomain","usedUrl","tagResources","WbyProjectName","String","WbyEnvironment","preview","delivery","withServiceManifest","withCommonLambdaEnvVariables","resources","addServiceManifest","manifest","distributionId","bucketDomainName","bucketRegionalDomainName","exports"],"sources":["createWebsitePulumiApp.ts"],"sourcesContent":["import * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport fs from \"fs\";\nimport { createPulumiApp, PulumiAppParamCallback, PulumiAppParam } from \"@webiny/pulumi\";\nimport { createPrivateAppBucket } from \"../createAppBucket\";\nimport { applyCustomDomain, CustomDomainParams } from \"../customDomain\";\nimport { createPrerenderingService } from \"./WebsitePrerendering\";\nimport { CoreOutput, ApiOutput, VpcConfig } from \"~/apps\";\nimport { addDomainsUrlsOutputs, tagResources, withCommonLambdaEnvVariables } from \"~/utils\";\nimport { applyTenantRouter } from \"~/apps/tenantRouter\";\nimport { withServiceManifest } from \"~/utils/withServiceManifest\";\nimport { DEFAULT_PROD_ENV_NAMES } from \"~/constants\";\n\nexport type WebsitePulumiApp = ReturnType<typeof createWebsitePulumiApp>;\n\nexport interface CreateWebsitePulumiAppParams {\n /**\n * Custom domain(s) configuration.\n */\n domains?: PulumiAppParamCallback<CustomDomainParams>;\n\n /**\n * Custom preview domain(s) configuration.\n */\n previewDomains?: PulumiAppParamCallback<CustomDomainParams>;\n\n /**\n * Enables or disables VPC for the API.\n * For VPC to work you also have to enable it in the `core` application.\n */\n vpc?: PulumiAppParam<boolean | undefined>;\n\n /**\n * Provides a way to adjust existing Pulumi code (cloud infrastructure resources)\n * or add additional ones into the mix.\n */\n pulumi?: (app: WebsitePulumiApp) => void | Promise<void>;\n\n /**\n * Prefixes names of all Pulumi cloud infrastructure resource with given prefix.\n */\n pulumiResourceNamePrefix?: PulumiAppParam<string>;\n\n /**\n * Treats provided environments as production environments, which\n * are deployed in production deployment mode.\n * https://www.webiny.com/docs/architecture/deployment-modes/production\n */\n productionEnvironments?: PulumiAppParam<string[]>;\n}\n\nexport const createWebsitePulumiApp = (projectAppParams: CreateWebsitePulumiAppParams = {}) => {\n const baseApp = createPulumiApp({\n name: \"website\",\n path: \"apps/website\",\n config: projectAppParams,\n program: async app => {\n const pulumiResourceNamePrefix = app.getParam(\n projectAppParams.pulumiResourceNamePrefix\n );\n if (pulumiResourceNamePrefix) {\n app.onResource(resource => {\n if (!resource.name.startsWith(pulumiResourceNamePrefix)) {\n resource.name = `${pulumiResourceNamePrefix}${resource.name}`;\n }\n });\n }\n\n // Overrides must be applied via a handler, registered at the very start of the program.\n // By doing this, we're ensuring user's adjustments are not applied to late.\n if (projectAppParams.pulumi) {\n app.addHandler(() => {\n return projectAppParams.pulumi!(app as WebsitePulumiApp);\n });\n }\n\n const productionEnvironments =\n app.params.create.productionEnvironments || DEFAULT_PROD_ENV_NAMES;\n const isProduction = productionEnvironments.includes(app.params.run.env);\n\n // Register core and api output as a module, to be available to all other modules.\n const core = app.addModule(CoreOutput);\n app.addModule(ApiOutput);\n\n // Register VPC config module to be available to other modules.\n const vpcEnabled = app.getParam(projectAppParams?.vpc) ?? isProduction;\n app.addModule(VpcConfig, { enabled: vpcEnabled });\n\n const appBucket = createPrivateAppBucket(app, \"app\");\n\n const appCloudfront = app.addResource(aws.cloudfront.Distribution, {\n name: \"app\",\n config: {\n enabled: true,\n waitForDeployment: true,\n origins: [appBucket.origin],\n defaultRootObject: \"index.html\",\n defaultCacheBehavior: {\n compress: true,\n targetOriginId: appBucket.origin.originId,\n viewerProtocolPolicy: \"redirect-to-https\",\n allowedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n cachedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n forwardedValues: {\n cookies: { forward: \"none\" },\n queryString: false\n },\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 0,\n maxTtl: 0\n },\n priceClass: \"PriceClass_100\",\n customErrorResponses: [\n { errorCode: 404, responseCode: 404, responsePagePath: \"/index.html\" }\n ],\n restrictions: {\n geoRestriction: {\n restrictionType: \"none\"\n }\n },\n viewerCertificate: {\n cloudfrontDefaultCertificate: true\n }\n }\n });\n\n const deliveryBucket = createPrivateAppBucket(app, \"delivery\");\n\n /**\n * We need to have a Cloudfront Function to perform a simple request rewrite, so the request always includes\n * an \"/index.html\". This is necessary because our buckets are not \"website\" buckets, and we need to\n * have an exact object key when requesting page paths.\n */\n const viewerRequest = app.addResource(aws.cloudfront.Function, {\n name: \"cfViewerRequest\",\n config: {\n runtime: \"cloudfront-js-1.0\",\n publish: true,\n code: fs.readFileSync(__dirname + `/deliveryViewerRequest.js`, \"utf8\")\n }\n });\n\n const deliveryCloudfront = app.addResource(aws.cloudfront.Distribution, {\n name: \"delivery\",\n config: {\n enabled: true,\n waitForDeployment: true,\n origins: [deliveryBucket.origin, appBucket.origin],\n defaultRootObject: \"index.html\",\n defaultCacheBehavior: {\n compress: true,\n targetOriginId: deliveryBucket.origin.originId,\n viewerProtocolPolicy: \"redirect-to-https\",\n allowedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n cachedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n originRequestPolicyId: \"\",\n forwardedValues: {\n cookies: { forward: \"none\" },\n queryString: true\n },\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 30,\n maxTtl: 30,\n functionAssociations: [\n { functionArn: viewerRequest.output.arn, eventType: \"viewer-request\" }\n ]\n },\n orderedCacheBehaviors: [\n {\n compress: true,\n allowedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n cachedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n forwardedValues: {\n cookies: {\n forward: \"none\"\n },\n headers: [],\n queryString: false\n },\n pathPattern: \"/static/*\",\n viewerProtocolPolicy: \"allow-all\",\n targetOriginId: appBucket.origin.originId,\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 2592000, // 30 days\n maxTtl: 2592000\n }\n ],\n customErrorResponses: [\n {\n errorCode: 404,\n responseCode: 404,\n responsePagePath: \"/_NOT_FOUND_PAGE_/index.html\"\n }\n ],\n priceClass: \"PriceClass_100\",\n restrictions: {\n geoRestriction: {\n restrictionType: \"none\"\n }\n },\n viewerCertificate: {\n cloudfrontDefaultCertificate: true\n }\n }\n });\n\n const prerendering = createPrerenderingService(app, {\n dbTableName: core.primaryDynamodbTableName,\n dbTableHashKey: core.primaryDynamodbTableHashKey,\n dbTableRangeKey: core.primaryDynamodbTableRangeKey,\n appUrl: pulumi.interpolate`https://${appCloudfront.output.domainName}`,\n deliveryUrl: pulumi.interpolate`https://${deliveryCloudfront.output.domainName}`,\n bucket: deliveryBucket.bucket.output.bucket,\n cloudfrontId: deliveryCloudfront.output.id\n });\n\n const domains = app.getParam(projectAppParams.domains);\n if (domains) {\n applyCustomDomain(deliveryCloudfront, domains);\n }\n\n const previewDomains = app.getParam(projectAppParams.previewDomains);\n if (previewDomains) {\n applyCustomDomain(appCloudfront, previewDomains);\n }\n\n if (\n process.env.WCP_PROJECT_ENVIRONMENT ||\n process.env.WEBINY_MULTI_TENANCY === \"true\"\n ) {\n const { originLambda } = applyTenantRouter(app, deliveryCloudfront);\n\n app.addHandler(() => {\n app.addOutputs({\n websiteRouterOriginRequestFunction: originLambda.output.name\n });\n });\n }\n\n app.addOutputs({\n // Cloudfront and S3 bucket used to host the single-page application (SPA). The URL of the distribution is mainly\n // utilized by the Page Builder app's prerendering engine. Using this URL, it accesses the SPA and creates HTML snapshots.\n // The files that are generated in that process are stored in the `deliveryStorage` S3 bucket further below.\n appId: appCloudfront.output.id,\n appStorage: appBucket.bucket.output.id,\n\n // These are the Cloudfront and S3 bucket that will deliver static pages to the actual website visitors.\n // The static HTML snapshots delivered from them still rely on the app's S3 bucket\n // defined above, for serving static assets (JS, CSS, images).\n deliveryId: deliveryCloudfront.output.id,\n deliveryStorage: deliveryBucket.bucket.output.id\n });\n\n app.addHandler(() => {\n addDomainsUrlsOutputs({\n app,\n cloudfrontDistribution: appCloudfront,\n map: {\n distributionDomain: \"cloudfrontAppDomain\",\n distributionUrl: \"cloudfrontAppUrl\",\n usedDomain: \"appDomain\",\n usedUrl: \"appUrl\"\n }\n });\n\n addDomainsUrlsOutputs({\n app,\n cloudfrontDistribution: deliveryCloudfront,\n map: {\n distributionDomain: \"cloudfrontDeliveryDomain\",\n distributionUrl: \"cloudfrontDeliveryUrl\",\n usedDomain: \"deliveryDomain\",\n usedUrl: \"deliveryUrl\"\n }\n });\n });\n\n tagResources({\n WbyProjectName: String(process.env[\"WEBINY_PROJECT_NAME\"]),\n WbyEnvironment: String(process.env[\"WEBINY_ENV\"])\n });\n\n return {\n prerendering,\n\n // \"preview\" and \"app\" are the same.\n // We introduced \"preview\" just because it's the word we use when talking about\n // Page Builder and \"previewing\" pages. In other words, the \"preview\" property\n // contains all resources related to serving page previews, unlike \"delivery\",\n // which is used to serve published pages to actual website visitors.\n // The \"app\" property was still left here just for backwards compatibility.\n preview: {\n ...appBucket,\n cloudfront: appCloudfront\n },\n app: {\n ...appBucket,\n cloudfront: appCloudfront\n },\n\n delivery: {\n ...deliveryBucket,\n cloudfront: deliveryCloudfront\n }\n };\n }\n });\n\n const app = withServiceManifest(withCommonLambdaEnvVariables(baseApp));\n\n app.addHandler(() => {\n const preview = baseApp.resources.preview;\n const delivery = baseApp.resources.delivery;\n\n app.addServiceManifest({\n name: \"website\",\n manifest: {\n preview: {\n cloudfront: {\n distributionId: preview.cloudfront.output.id,\n domainName: preview.cloudfront.output.domainName\n },\n bucket: {\n name: preview.bucket.output.id,\n arn: preview.bucket.output.arn,\n bucketDomainName: preview.bucket.output.bucketDomainName,\n bucketRegionalDomainName: preview.bucket.output.bucketRegionalDomainName\n }\n },\n delivery: {\n cloudfront: {\n distributionId: delivery.cloudfront.output.id,\n domainName: delivery.cloudfront.output.domainName\n },\n bucket: {\n name: delivery.bucket.output.id,\n arn: delivery.bucket.output.arn,\n bucketDomainName: delivery.bucket.output.bucketDomainName,\n bucketRegionalDomainName: delivery.bucket.output.bucketRegionalDomainName\n }\n }\n }\n });\n });\n\n return app;\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,GAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,GAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,oBAAA,GAAAP,OAAA;AACA,IAAAQ,CAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,aAAA,GAAAV,OAAA;AACA,IAAAW,oBAAA,GAAAX,OAAA;AACA,IAAAY,UAAA,GAAAZ,OAAA;AAwCO,MAAMa,sBAAsB,GAAGA,CAACC,gBAA8C,GAAG,CAAC,CAAC,KAAK;EAC3F,MAAMC,OAAO,GAAG,IAAAC,wBAAe,EAAC;IAC5BC,IAAI,EAAE,SAAS;IACfC,IAAI,EAAE,cAAc;IACpBC,MAAM,EAAEL,gBAAgB;IACxBM,OAAO,EAAE,MAAMC,GAAG,IAAI;MAClB,MAAMC,wBAAwB,GAAGD,GAAG,CAACE,QAAQ,CACzCT,gBAAgB,CAACQ,wBACrB,CAAC;MACD,IAAIA,wBAAwB,EAAE;QAC1BD,GAAG,CAACG,UAAU,CAACC,QAAQ,IAAI;UACvB,IAAI,CAACA,QAAQ,CAACR,IAAI,CAACS,UAAU,CAACJ,wBAAwB,CAAC,EAAE;YACrDG,QAAQ,CAACR,IAAI,GAAI,GAAEK,wBAAyB,GAAEG,QAAQ,CAACR,IAAK,EAAC;UACjE;QACJ,CAAC,CAAC;MACN;;MAEA;MACA;MACA,IAAIH,gBAAgB,CAAChB,MA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,MAAM,CAAClB,MAAM,CAACoB,EAAE;YAC/BnB,GAAG,EAAE8C,QAAQ,CAAC7B,MAAM,CAAClB,MAAM,CAACC,GAAG;YAC/BqD,gBAAgB,EAAEP,QAAQ,CAAC7B,MAAM,CAAClB,MAAM,CAACsD,gBAAgB;YACzDC,wBAAwB,EAAER,QAAQ,CAAC7B,MAAM,CAAClB,MAAM,CAACuD;UACrD;QACJ;MACJ;IACJ,CAAC,CAAC;EACN,CAAC,CAAC;EAEF,OAAO7H,GAAG;AACd,CAAC;AAAC8H,OAAA,CAAAtI,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["pulumi","_interopRequireWildcard","require","aws","_fs","_interopRequireDefault","_pulumi2","_createAppBucket","_customDomain","_WebsitePrerendering","_","_utils","_tenantRouter","_withServiceManifest","_constants","createWebsitePulumiApp","projectAppParams","baseApp","createPulumiApp","name","path","config","program","app","pulumiResourceNamePrefix","getParam","onResource","resource","startsWith","addHandler","productionEnvironments","params","create","DEFAULT_PROD_ENV_NAMES","isProduction","includes","run","env","core","addModule","CoreOutput","ApiOutput","vpcEnabled","vpc","VpcConfig","enabled","appBucket","createPrivateAppBucket","appCloudfront","addResource","cloudfront","Distribution","waitForDeployment","origins","origin","defaultRootObject","defaultCacheBehavior","compress","targetOriginId","originId","viewerProtocolPolicy","allowedMethods","cachedMethods","forwardedValues","cookies","forward","queryString","minTtl","defaultTtl","maxTtl","priceClass","customErrorResponses","errorCode","responseCode","responsePagePath","restrictions","geoRestriction","restrictionType","viewerCertificate","cloudfrontDefaultCertificate","opts","ignoreChanges","deliveryBucket","viewerRequest","Function","runtime","publish","code","fs","readFileSync","__dirname","deliveryCloudfront","originRequestPolicyId","functionAssociations","functionArn","output","arn","eventType","orderedCacheBehaviors","headers","pathPattern","prerendering","createPrerenderingService","dbTableName","primaryDynamodbTableName","dbTableHashKey","primaryDynamodbTableHashKey","dbTableRangeKey","primaryDynamodbTableRangeKey","appUrl","interpolate","domainName","deliveryUrl","bucket","cloudfrontId","id","domains","applyCustomDomain","previewDomains","process","WCP_PROJECT_ENVIRONMENT","WEBINY_MULTI_TENANCY","originLambda","applyTenantRouter","addOutputs","websiteRouterOriginRequestFunction","appId","appStorage","deliveryId","deliveryStorage","addDomainsUrlsOutputs","cloudfrontDistribution","map","distributionDomain","distributionUrl","usedDomain","usedUrl","tagResources","WbyProjectName","String","WbyEnvironment","preview","delivery","withServiceManifest","withCommonLambdaEnvVariables","resources","addServiceManifest","manifest","distributionId","bucketDomainName","bucketRegionalDomainName","exports"],"sources":["createWebsitePulumiApp.ts"],"sourcesContent":["import * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport fs from \"fs\";\nimport { createPulumiApp, PulumiAppParamCallback, PulumiAppParam } from \"@webiny/pulumi\";\nimport { createPrivateAppBucket } from \"../createAppBucket\";\nimport { applyCustomDomain, CustomDomainParams } from \"../customDomain\";\nimport { createPrerenderingService } from \"./WebsitePrerendering\";\nimport { CoreOutput, ApiOutput, VpcConfig } from \"~/apps\";\nimport { addDomainsUrlsOutputs, tagResources, withCommonLambdaEnvVariables } from \"~/utils\";\nimport { applyTenantRouter } from \"~/apps/tenantRouter\";\nimport { withServiceManifest } from \"~/utils/withServiceManifest\";\nimport { DEFAULT_PROD_ENV_NAMES } from \"~/constants\";\n\nexport type WebsitePulumiApp = ReturnType<typeof createWebsitePulumiApp>;\n\nexport interface CreateWebsitePulumiAppParams {\n /**\n * Custom domain(s) configuration.\n */\n domains?: PulumiAppParamCallback<CustomDomainParams>;\n\n /**\n * Custom preview domain(s) configuration.\n */\n previewDomains?: PulumiAppParamCallback<CustomDomainParams>;\n\n /**\n * Enables or disables VPC for the API.\n * For VPC to work you also have to enable it in the `core` application.\n */\n vpc?: PulumiAppParam<boolean | undefined>;\n\n /**\n * Provides a way to adjust existing Pulumi code (cloud infrastructure resources)\n * or add additional ones into the mix.\n */\n pulumi?: (app: WebsitePulumiApp) => void | Promise<void>;\n\n /**\n * Prefixes names of all Pulumi cloud infrastructure resource with given prefix.\n */\n pulumiResourceNamePrefix?: PulumiAppParam<string>;\n\n /**\n * Treats provided environments as production environments, which\n * are deployed in production deployment mode.\n * https://www.webiny.com/docs/architecture/deployment-modes/production\n */\n productionEnvironments?: PulumiAppParam<string[]>;\n}\n\nexport const createWebsitePulumiApp = (projectAppParams: CreateWebsitePulumiAppParams = {}) => {\n const baseApp = createPulumiApp({\n name: \"website\",\n path: \"apps/website\",\n config: projectAppParams,\n program: async app => {\n const pulumiResourceNamePrefix = app.getParam(\n projectAppParams.pulumiResourceNamePrefix\n );\n if (pulumiResourceNamePrefix) {\n app.onResource(resource => {\n if (!resource.name.startsWith(pulumiResourceNamePrefix)) {\n resource.name = `${pulumiResourceNamePrefix}${resource.name}`;\n }\n });\n }\n\n // Overrides must be applied via a handler, registered at the very start of the program.\n // By doing this, we're ensuring user's adjustments are not applied to late.\n if (projectAppParams.pulumi) {\n app.addHandler(() => {\n return projectAppParams.pulumi!(app as WebsitePulumiApp);\n });\n }\n\n const productionEnvironments =\n app.params.create.productionEnvironments || DEFAULT_PROD_ENV_NAMES;\n const isProduction = productionEnvironments.includes(app.params.run.env);\n\n // Register core and api output as a module, to be available to all other modules.\n const core = app.addModule(CoreOutput);\n app.addModule(ApiOutput);\n\n // Register VPC config module to be available to other modules.\n const vpcEnabled = app.getParam(projectAppParams?.vpc) ?? isProduction;\n app.addModule(VpcConfig, { enabled: vpcEnabled });\n\n const appBucket = createPrivateAppBucket(app, \"app\");\n\n const appCloudfront = app.addResource(aws.cloudfront.Distribution, {\n name: \"app\",\n config: {\n enabled: true,\n waitForDeployment: true,\n origins: [appBucket.origin],\n defaultRootObject: \"index.html\",\n defaultCacheBehavior: {\n compress: true,\n targetOriginId: appBucket.origin.originId,\n viewerProtocolPolicy: \"redirect-to-https\",\n allowedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n cachedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n forwardedValues: {\n cookies: { forward: \"none\" },\n queryString: false\n },\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 0,\n maxTtl: 0\n },\n priceClass: \"PriceClass_100\",\n customErrorResponses: [\n { errorCode: 404, responseCode: 404, responsePagePath: \"/index.html\" }\n ],\n restrictions: {\n geoRestriction: {\n restrictionType: \"none\"\n }\n },\n viewerCertificate: {\n cloudfrontDefaultCertificate: true\n }\n },\n opts: {\n // We are ignoring changes to the \"staging\" property. This is because of the following.\n // With the 5.41.0 release of Webiny, we also upgraded Pulumi to v6. This introduced a change\n // with how Cloudfront distributions are deployed, where Pulumi now also controls the new\n // `staging` property.\n // If not set, Pulumi will default it to `false`. Which is fine, but, the problem is\n // that, because this property did not exist before, it will always be considered as a change\n // upon deployment.\n // We might think this is fine, but, the problem is that a change in this property causes\n // a full replacement of the Cloudfront distribution, which is not acceptable. Especially\n // if a custom domain has already been associated with the distribution. This then would\n // require the user to disassociate the domain, wait for the distribution to be replaced,\n // and then re-associate the domain. This is not a good experience.\n ignoreChanges: [\"staging\"]\n }\n });\n\n const deliveryBucket = createPrivateAppBucket(app, \"delivery\");\n\n /**\n * We need to have a Cloudfront Function to perform a simple request rewrite, so the request always includes\n * an \"/index.html\". This is necessary because our buckets are not \"website\" buckets, and we need to\n * have an exact object key when requesting page paths.\n */\n const viewerRequest = app.addResource(aws.cloudfront.Function, {\n name: \"cfViewerRequest\",\n config: {\n runtime: \"cloudfront-js-1.0\",\n publish: true,\n code: fs.readFileSync(__dirname + `/deliveryViewerRequest.js`, \"utf8\")\n }\n });\n\n const deliveryCloudfront = app.addResource(aws.cloudfront.Distribution, {\n name: \"delivery\",\n config: {\n enabled: true,\n waitForDeployment: true,\n origins: [deliveryBucket.origin, appBucket.origin],\n defaultRootObject: \"index.html\",\n defaultCacheBehavior: {\n compress: true,\n targetOriginId: deliveryBucket.origin.originId,\n viewerProtocolPolicy: \"redirect-to-https\",\n allowedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n cachedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n originRequestPolicyId: \"\",\n forwardedValues: {\n cookies: { forward: \"none\" },\n queryString: true\n },\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 30,\n maxTtl: 30,\n functionAssociations: [\n { functionArn: viewerRequest.output.arn, eventType: \"viewer-request\" }\n ]\n },\n orderedCacheBehaviors: [\n {\n compress: true,\n allowedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n cachedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n forwardedValues: {\n cookies: {\n forward: \"none\"\n },\n headers: [],\n queryString: false\n },\n pathPattern: \"/static/*\",\n viewerProtocolPolicy: \"allow-all\",\n targetOriginId: appBucket.origin.originId,\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 2592000, // 30 days\n maxTtl: 2592000\n }\n ],\n customErrorResponses: [\n {\n errorCode: 404,\n responseCode: 404,\n responsePagePath: \"/_NOT_FOUND_PAGE_/index.html\"\n }\n ],\n priceClass: \"PriceClass_100\",\n restrictions: {\n geoRestriction: {\n restrictionType: \"none\"\n }\n },\n viewerCertificate: {\n cloudfrontDefaultCertificate: true\n }\n },\n opts: {\n // Check the comment in the `appCloudfront` resource above for more info.\n ignoreChanges: [\"staging\"]\n }\n });\n\n const prerendering = createPrerenderingService(app, {\n dbTableName: core.primaryDynamodbTableName,\n dbTableHashKey: core.primaryDynamodbTableHashKey,\n dbTableRangeKey: core.primaryDynamodbTableRangeKey,\n appUrl: pulumi.interpolate`https://${appCloudfront.output.domainName}`,\n deliveryUrl: pulumi.interpolate`https://${deliveryCloudfront.output.domainName}`,\n bucket: deliveryBucket.bucket.output.bucket,\n cloudfrontId: deliveryCloudfront.output.id\n });\n\n const domains = app.getParam(projectAppParams.domains);\n if (domains) {\n applyCustomDomain(deliveryCloudfront, domains);\n }\n\n const previewDomains = app.getParam(projectAppParams.previewDomains);\n if (previewDomains) {\n applyCustomDomain(appCloudfront, previewDomains);\n }\n\n if (\n process.env.WCP_PROJECT_ENVIRONMENT ||\n process.env.WEBINY_MULTI_TENANCY === \"true\"\n ) {\n const { originLambda } = applyTenantRouter(app, deliveryCloudfront);\n\n app.addHandler(() => {\n app.addOutputs({\n websiteRouterOriginRequestFunction: originLambda.output.name\n });\n });\n }\n\n app.addOutputs({\n // Cloudfront and S3 bucket used to host the single-page application (SPA). The URL of the distribution is mainly\n // utilized by the Page Builder app's prerendering engine. Using this URL, it accesses the SPA and creates HTML snapshots.\n // The files that are generated in that process are stored in the `deliveryStorage` S3 bucket further below.\n appId: appCloudfront.output.id,\n appStorage: appBucket.bucket.output.id,\n\n // These are the Cloudfront and S3 bucket that will deliver static pages to the actual website visitors.\n // The static HTML snapshots delivered from them still rely on the app's S3 bucket\n // defined above, for serving static assets (JS, CSS, images).\n deliveryId: deliveryCloudfront.output.id,\n deliveryStorage: deliveryBucket.bucket.output.id\n });\n\n app.addHandler(() => {\n addDomainsUrlsOutputs({\n app,\n cloudfrontDistribution: appCloudfront,\n map: {\n distributionDomain: \"cloudfrontAppDomain\",\n distributionUrl: \"cloudfrontAppUrl\",\n usedDomain: \"appDomain\",\n usedUrl: \"appUrl\"\n }\n });\n\n addDomainsUrlsOutputs({\n app,\n cloudfrontDistribution: deliveryCloudfront,\n map: {\n distributionDomain: \"cloudfrontDeliveryDomain\",\n distributionUrl: \"cloudfrontDeliveryUrl\",\n usedDomain: \"deliveryDomain\",\n usedUrl: \"deliveryUrl\"\n }\n });\n });\n\n tagResources({\n WbyProjectName: String(process.env[\"WEBINY_PROJECT_NAME\"]),\n WbyEnvironment: String(process.env[\"WEBINY_ENV\"])\n });\n\n return {\n prerendering,\n\n // \"preview\" and \"app\" are the same.\n // We introduced \"preview\" just because it's the word we use when talking about\n // Page Builder and \"previewing\" pages. In other words, the \"preview\" property\n // contains all resources related to serving page previews, unlike \"delivery\",\n // which is used to serve published pages to actual website visitors.\n // The \"app\" property was still left here just for backwards compatibility.\n preview: {\n ...appBucket,\n cloudfront: appCloudfront\n },\n app: {\n ...appBucket,\n cloudfront: appCloudfront\n },\n\n delivery: {\n ...deliveryBucket,\n cloudfront: deliveryCloudfront\n }\n };\n }\n });\n\n const app = withServiceManifest(withCommonLambdaEnvVariables(baseApp));\n\n app.addHandler(() => {\n const preview = baseApp.resources.preview;\n const delivery = baseApp.resources.delivery;\n\n app.addServiceManifest({\n name: \"website\",\n manifest: {\n preview: {\n cloudfront: {\n distributionId: preview.cloudfront.output.id,\n domainName: preview.cloudfront.output.domainName\n },\n bucket: {\n name: preview.bucket.output.id,\n arn: preview.bucket.output.arn,\n bucketDomainName: preview.bucket.output.bucketDomainName,\n bucketRegionalDomainName: preview.bucket.output.bucketRegionalDomainName\n }\n },\n delivery: {\n cloudfront: {\n distributionId: delivery.cloudfront.output.id,\n domainName: delivery.cloudfront.output.domainName\n },\n bucket: {\n name: delivery.bucket.output.id,\n arn: delivery.bucket.output.arn,\n bucketDomainName: delivery.bucket.output.bucketDomainName,\n bucketRegionalDomainName: delivery.bucket.output.bucketRegionalDomainName\n }\n }\n }\n });\n });\n\n return app;\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,GAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,GAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,oBAAA,GAAAP,OAAA;AACA,IAAAQ,CAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,aAAA,GAAAV,OAAA;AACA,IAAAW,oBAAA,GAAAX,OAAA;AACA,IAAAY,UAAA,GAAAZ,OAAA;AAwCO,MAAMa,sBAAsB,GAAGA,CAACC,gBAA8C,GAAG,CAAC,CAAC,KAAK;EAC3F,M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+
"version": "5.40.7-beta.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/webiny/webiny-js.git"
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"@pulumi/aws": "^6.48.0",
|
|
17
17
|
"@pulumi/pulumi": "^3.128.0",
|
|
18
18
|
"@pulumi/random": "4.16.3",
|
|
19
|
-
"@webiny/aws-sdk": "5.40.
|
|
20
|
-
"@webiny/cli-plugin-deploy-pulumi": "5.40.
|
|
21
|
-
"@webiny/pulumi": "5.40.
|
|
19
|
+
"@webiny/aws-sdk": "5.40.7-beta.0",
|
|
20
|
+
"@webiny/cli-plugin-deploy-pulumi": "5.40.7-beta.0",
|
|
21
|
+
"@webiny/pulumi": "5.40.7-beta.0",
|
|
22
22
|
"form-data": "4.0.0",
|
|
23
23
|
"node-fetch": "2.7.0"
|
|
24
24
|
},
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"@babel/preset-env": "7.24.3",
|
|
29
29
|
"@babel/preset-typescript": "7.24.1",
|
|
30
30
|
"@babel/runtime": "7.24.1",
|
|
31
|
-
"@webiny/api-page-builder": "5.40.
|
|
32
|
-
"@webiny/aws-layers": "5.40.
|
|
33
|
-
"@webiny/cli": "5.40.
|
|
34
|
-
"@webiny/feature-flags": "5.40.
|
|
35
|
-
"@webiny/project-utils": "5.40.
|
|
31
|
+
"@webiny/api-page-builder": "5.40.7-beta.0",
|
|
32
|
+
"@webiny/aws-layers": "5.40.7-beta.0",
|
|
33
|
+
"@webiny/cli": "5.40.7-beta.0",
|
|
34
|
+
"@webiny/feature-flags": "5.40.7-beta.0",
|
|
35
|
+
"@webiny/project-utils": "5.40.7-beta.0",
|
|
36
36
|
"chalk": "4.1.2",
|
|
37
37
|
"lodash": "4.17.21",
|
|
38
38
|
"mime": "2.6.0",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
]
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "7236a5d93457a1dda87e880de76d6d859d49f283"
|
|
60
60
|
}
|