@webiny/project-aws 6.5.0-beta.0 → 6.5.0-beta.10
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/extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.d.ts +1 -1
- package/extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.js +1 -2
- package/extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.js.map +1 -1
- package/extensions/ProjectAws/EnsureAwsCredentialsBeforeDeploy.js +1 -1
- package/extensions/ProjectAws/EnsureAwsCredentialsBeforeDeploy.js.map +1 -1
- package/extensions/definitions.d.ts +1 -1
- package/extensions/definitions.js.map +1 -1
- package/package.json +17 -17
- package/project.d.ts +15 -18
- package/pulumi/apps/api/ApiCloudfront.js +2 -1
- package/pulumi/apps/api/ApiCloudfront.js.map +1 -1
- package/pulumi/apps/awsUtils.d.ts +1 -1
- package/pulumi/apps/blueGreen/domains/resolveDomains.js +1 -1
- package/pulumi/apps/blueGreen/domains/resolveDomains.js.map +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApiAfterDeploy } from "@webiny/project/abstractions/index.js";
|
|
2
2
|
import { UiService } from "@webiny/project/abstractions/services/UiService.js";
|
|
3
3
|
import { LoggerService } from "@webiny/project/abstractions/services/LoggerService.js";
|
|
4
|
-
import { GetProjectConfigService } from "@webiny/project/abstractions";
|
|
4
|
+
import { GetProjectConfigService } from "@webiny/project/abstractions/index.js";
|
|
5
5
|
import { ApiGqlClient } from "../../../abstractions/ApiGqlClient.js";
|
|
6
6
|
declare class AutoInstallAfterApiDeployImpl implements ApiAfterDeploy.Interface {
|
|
7
7
|
private apiGqlClient;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { ApiAfterDeploy } from "@webiny/project/abstractions/index.js";
|
|
1
|
+
import { ApiAfterDeploy, GetProjectConfigService } from "@webiny/project/abstractions/index.js";
|
|
2
2
|
import { UiService } from "@webiny/project/abstractions/services/UiService.js";
|
|
3
3
|
import { LoggerService } from "@webiny/project/abstractions/services/LoggerService.js";
|
|
4
|
-
import { GetProjectConfigService } from "@webiny/project/abstractions";
|
|
5
4
|
import { ApiGqlClient } from "../../../abstractions/ApiGqlClient.js";
|
|
6
5
|
const IS_INSTALLED_QUERY = `
|
|
7
6
|
query IsSystemInstalled {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.js","sources":["../../../../src/extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.ts"],"sourcesContent":["import { ApiAfterDeploy } from \"@webiny/project/abstractions/index.js\";\nimport { UiService } from \"@webiny/project/abstractions/services/UiService.js\";\nimport { LoggerService } from \"@webiny/project/abstractions/services/LoggerService.js\";\nimport { GetProjectConfigService } from \"@webiny/project/abstractions\";\nimport { ApiGqlClient } from \"~/abstractions/ApiGqlClient.js\";\n\nconst IS_INSTALLED_QUERY = `\n query IsSystemInstalled {\n system {\n isSystemInstalled {\n data\n error {\n message\n code\n }\n }\n }\n }\n`;\n\nconst INSTALL_MUTATION = `\n mutation InstallSystem($installationInput: JSON!) {\n system {\n installSystem(installationInput: $installationInput) {\n data\n error {\n message\n code\n }\n }\n }\n }\n`;\n\ninterface IsInstalledResponse {\n system: {\n isSystemInstalled: {\n data: boolean;\n error?: {\n message: string;\n code: string;\n };\n };\n };\n}\n\ninterface InstallResponse {\n system: {\n installSystem: {\n data: boolean;\n error?: {\n message: string;\n code: string;\n };\n };\n };\n}\n\nclass AutoInstallAfterApiDeployImpl implements ApiAfterDeploy.Interface {\n constructor(\n private apiGqlClient: ApiGqlClient.Interface,\n private ui: UiService.Interface,\n private getProjectConfig: GetProjectConfigService.Interface,\n private logger: LoggerService.Interface\n ) {}\n\n async execute(params: ApiAfterDeploy.Params): Promise<void> {\n if (params.preview) {\n // Skip auto-install on preview deployments\n return;\n }\n\n const projectConfig = await this.getProjectConfig.execute();\n const adminAutoInstallExtensions = projectConfig.extensionsByType(\"Project/AutoInstall\");\n\n if (adminAutoInstallExtensions.length === 0) {\n return;\n }\n\n const config = adminAutoInstallExtensions[0].params;\n\n // Check if system is already installed\n this.ui.info(\"Checking if system is already installed...\");\n\n try {\n const isInstalledResponse = await this.apiGqlClient.query<IsInstalledResponse>({\n query: IS_INSTALLED_QUERY\n });\n\n if (isInstalledResponse.data?.system.isSystemInstalled.data === true) {\n this.ui.info(\"System is already installed, skipping auto-install.\");\n return;\n }\n } catch (error: any) {\n this.logger.error(\"Failed to check installation status\", { error });\n this.ui.warning(`Could not check installation status: ${error.message}`);\n return;\n }\n\n this.ui.info(\"Auto-installing...\");\n /**\n * Type Error introduced with Zod v4. V3 had any type.\n */\n // @ts-expect-error\n const adminUser = config.adminUser || {\n firstName: \"John\",\n lastName: \"Smith\",\n email: \"admin@webiny.com\",\n password: \"12345678\"\n };\n\n const variables = {\n installationInput: [\n {\n app: \"Cognito\",\n data: adminUser\n }\n ]\n };\n\n const installResponse = await this.apiGqlClient.mutation<InstallResponse>({\n mutation: INSTALL_MUTATION,\n variables\n });\n\n if (installResponse.data?.system.installSystem.error) {\n const { message, code } = installResponse.data.system.installSystem.error;\n this.logger.error(\"Installation failed\", { message, code });\n this.ui.error(`Installation failed: ${message} (${code})`);\n throw new Error(message);\n }\n\n this.ui.success(\"System installed successfully!\");\n this.ui.info(\"Admin credentials:\");\n this.ui.info(` Email: ${adminUser.email}`);\n this.ui.info(` Password: ${adminUser.password}`);\n }\n}\n\nexport const AutoInstallAfterApiDeploy = ApiAfterDeploy.createImplementation({\n implementation: AutoInstallAfterApiDeployImpl,\n dependencies: [ApiGqlClient, UiService, GetProjectConfigService, LoggerService]\n});\n"],"names":["IS_INSTALLED_QUERY","INSTALL_MUTATION","AutoInstallAfterApiDeployImpl","apiGqlClient","ui","getProjectConfig","logger","params","projectConfig","adminAutoInstallExtensions","config","isInstalledResponse","error","adminUser","variables","installResponse","message","code","Error","AutoInstallAfterApiDeploy","ApiAfterDeploy","ApiGqlClient","UiService","GetProjectConfigService","LoggerService"],"mappings":"
|
|
1
|
+
{"version":3,"file":"extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.js","sources":["../../../../src/extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.ts"],"sourcesContent":["import { ApiAfterDeploy } from \"@webiny/project/abstractions/index.js\";\nimport { UiService } from \"@webiny/project/abstractions/services/UiService.js\";\nimport { LoggerService } from \"@webiny/project/abstractions/services/LoggerService.js\";\nimport { GetProjectConfigService } from \"@webiny/project/abstractions/index.js\";\nimport { ApiGqlClient } from \"~/abstractions/ApiGqlClient.js\";\n\nconst IS_INSTALLED_QUERY = `\n query IsSystemInstalled {\n system {\n isSystemInstalled {\n data\n error {\n message\n code\n }\n }\n }\n }\n`;\n\nconst INSTALL_MUTATION = `\n mutation InstallSystem($installationInput: JSON!) {\n system {\n installSystem(installationInput: $installationInput) {\n data\n error {\n message\n code\n }\n }\n }\n }\n`;\n\ninterface IsInstalledResponse {\n system: {\n isSystemInstalled: {\n data: boolean;\n error?: {\n message: string;\n code: string;\n };\n };\n };\n}\n\ninterface InstallResponse {\n system: {\n installSystem: {\n data: boolean;\n error?: {\n message: string;\n code: string;\n };\n };\n };\n}\n\nclass AutoInstallAfterApiDeployImpl implements ApiAfterDeploy.Interface {\n constructor(\n private apiGqlClient: ApiGqlClient.Interface,\n private ui: UiService.Interface,\n private getProjectConfig: GetProjectConfigService.Interface,\n private logger: LoggerService.Interface\n ) {}\n\n async execute(params: ApiAfterDeploy.Params): Promise<void> {\n if (params.preview) {\n // Skip auto-install on preview deployments\n return;\n }\n\n const projectConfig = await this.getProjectConfig.execute();\n const adminAutoInstallExtensions = projectConfig.extensionsByType(\"Project/AutoInstall\");\n\n if (adminAutoInstallExtensions.length === 0) {\n return;\n }\n\n const config = adminAutoInstallExtensions[0].params;\n\n // Check if system is already installed\n this.ui.info(\"Checking if system is already installed...\");\n\n try {\n const isInstalledResponse = await this.apiGqlClient.query<IsInstalledResponse>({\n query: IS_INSTALLED_QUERY\n });\n\n if (isInstalledResponse.data?.system.isSystemInstalled.data === true) {\n this.ui.info(\"System is already installed, skipping auto-install.\");\n return;\n }\n } catch (error: any) {\n this.logger.error(\"Failed to check installation status\", { error });\n this.ui.warning(`Could not check installation status: ${error.message}`);\n return;\n }\n\n this.ui.info(\"Auto-installing...\");\n /**\n * Type Error introduced with Zod v4. V3 had any type.\n */\n // @ts-expect-error\n const adminUser = config.adminUser || {\n firstName: \"John\",\n lastName: \"Smith\",\n email: \"admin@webiny.com\",\n password: \"12345678\"\n };\n\n const variables = {\n installationInput: [\n {\n app: \"Cognito\",\n data: adminUser\n }\n ]\n };\n\n const installResponse = await this.apiGqlClient.mutation<InstallResponse>({\n mutation: INSTALL_MUTATION,\n variables\n });\n\n if (installResponse.data?.system.installSystem.error) {\n const { message, code } = installResponse.data.system.installSystem.error;\n this.logger.error(\"Installation failed\", { message, code });\n this.ui.error(`Installation failed: ${message} (${code})`);\n throw new Error(message);\n }\n\n this.ui.success(\"System installed successfully!\");\n this.ui.info(\"Admin credentials:\");\n this.ui.info(` Email: ${adminUser.email}`);\n this.ui.info(` Password: ${adminUser.password}`);\n }\n}\n\nexport const AutoInstallAfterApiDeploy = ApiAfterDeploy.createImplementation({\n implementation: AutoInstallAfterApiDeployImpl,\n dependencies: [ApiGqlClient, UiService, GetProjectConfigService, LoggerService]\n});\n"],"names":["IS_INSTALLED_QUERY","INSTALL_MUTATION","AutoInstallAfterApiDeployImpl","apiGqlClient","ui","getProjectConfig","logger","params","projectConfig","adminAutoInstallExtensions","config","isInstalledResponse","error","adminUser","variables","installResponse","message","code","Error","AutoInstallAfterApiDeploy","ApiAfterDeploy","ApiGqlClient","UiService","GetProjectConfigService","LoggerService"],"mappings":";;;;AAMA,MAAMA,qBAAqB,CAAC;;;;;;;;;;;;AAY5B,CAAC;AAED,MAAMC,mBAAmB,CAAC;;;;;;;;;;;;AAY1B,CAAC;AA0BD,MAAMC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AEC,IAAI,EAAE,GAAGF,gBAAgB,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK;YACzE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,uBAAuB;gBAAEC;gBAASC;YAAK;YACzD,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,qBAAqB,EAAED,QAAQ,EAAE,EAAEC,KAAK,CAAC,CAAC;YACzD,MAAM,IAAIC,MAAMF;QACpB;QAEA,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC;QAChB,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC;QACb,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAEH,UAAU,KAAK,EAAE;QACzC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAEA,UAAU,QAAQ,EAAE;IACnD;AACJ;AAEO,MAAMM,4BAA4BC,eAAe,oBAAoB,CAAC;IACzE,gBAAgBlB;IAChB,cAAc;QAACmB;QAAcC;QAAWC;QAAyBC;KAAc;AACnF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BeforeDeploy, LoggerService } from "@webiny/project/abstractions/index.js";
|
|
2
2
|
import { GracefulError } from "@webiny/project";
|
|
3
|
-
import { STS } from "@webiny/aws-sdk/client-sts";
|
|
3
|
+
import { STS } from "@webiny/aws-sdk/client-sts/index.js";
|
|
4
4
|
class EnsureAwsCredentialsBeforeDeployImpl {
|
|
5
5
|
constructor(loggerService){
|
|
6
6
|
this.loggerService = loggerService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions/ProjectAws/EnsureAwsCredentialsBeforeDeploy.js","sources":["../../../src/extensions/ProjectAws/EnsureAwsCredentialsBeforeDeploy.ts"],"sourcesContent":["import { BeforeDeploy, LoggerService } from \"@webiny/project/abstractions/index.js\";\nimport { GracefulError } from \"@webiny/project\";\nimport { STS } from \"@webiny/aws-sdk/client-sts\";\n\nclass EnsureAwsCredentialsBeforeDeployImpl implements BeforeDeploy.Interface {\n constructor(private loggerService: LoggerService.Interface) {}\n\n async execute() {\n process.env.AWS_SDK_LOAD_CONFIG = \"true\";\n const sts = new STS({});\n\n try {\n await sts.getCallerIdentity({});\n } catch (err) {\n this.loggerService.debug({ err }, \"AWS credentials error.\");\n throw GracefulError.from(\n new Error(\"AWS credentials are not configured correctly.\"),\n 'No valid AWS credentials were found. Run \"aws configure\" or set the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables before deploying. Learn more: https://webiny.link/aws-credentials'\n );\n }\n\n const region = await sts.config.region();\n if (!region) {\n throw GracefulError.from(\n new Error(\"AWS region is not defined.\"),\n \"No AWS region is set. Define the AWS_REGION environment variable or set a default region in your AWS profile. Learn more: https://webiny.link/aws-region\"\n );\n }\n\n process.env.AWS_REGION = region;\n\n const { accessKeyId } = await sts.config.credentials();\n const profile = process.env.AWS_PROFILE;\n\n if (profile) {\n this.loggerService.info(`Using profile \"${profile}\" in \"${region}\" region.`);\n } else {\n this.loggerService.info(`Using access key ID \"${accessKeyId}\" in \"${region}\" region.`);\n }\n }\n}\n\nexport const EnsureAwsCredentialsBeforeDeploy = BeforeDeploy.createImplementation({\n implementation: EnsureAwsCredentialsBeforeDeployImpl,\n dependencies: [LoggerService]\n});\n"],"names":["EnsureAwsCredentialsBeforeDeployImpl","loggerService","process","sts","STS","err","GracefulError","Error","region","accessKeyId","profile","EnsureAwsCredentialsBeforeDeploy","BeforeDeploy","LoggerService"],"mappings":";;;AAIA,MAAMA;IACF,YAAoBC,aAAsC,CAAE;aAAxCA,aAAa,GAAbA;IAAyC;IAE7D,MAAM,UAAU;QACZC,QAAQ,GAAG,CAAC,mBAAmB,GAAG;QAClC,MAAMC,MAAM,IAAIC,IAAI,CAAC;QAErB,IAAI;YACA,MAAMD,IAAI,iBAAiB,CAAC,CAAC;QACjC,EAAE,OAAOE,KAAK;YACV,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;gBAAEA;YAAI,GAAG;YAClC,MAAMC,cAAc,IAAI,CACpB,IAAIC,MAAM,kDACV;QAER;QAEA,MAAMC,SAAS,MAAML,IAAI,MAAM,CAAC,MAAM;QACtC,IAAI,CAACK,QACD,MAAMF,cAAc,IAAI,CACpB,IAAIC,MAAM,+BACV;QAIRL,QAAQ,GAAG,CAAC,UAAU,GAAGM;QAEzB,MAAM,EAAEC,WAAW,EAAE,GAAG,MAAMN,IAAI,MAAM,CAAC,WAAW;QACpD,MAAMO,UAAUR,QAAQ,GAAG,CAAC,WAAW;QAEvC,IAAIQ,SACA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,eAAe,EAAEA,QAAQ,MAAM,EAAEF,OAAO,SAAS,CAAC;aAE3E,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,qBAAqB,EAAEC,YAAY,MAAM,EAAED,OAAO,SAAS,CAAC;IAE7F;AACJ;AAEO,MAAMG,mCAAmCC,aAAa,oBAAoB,CAAC;IAC9E,gBAAgBZ;IAChB,cAAc;QAACa;KAAc;AACjC"}
|
|
1
|
+
{"version":3,"file":"extensions/ProjectAws/EnsureAwsCredentialsBeforeDeploy.js","sources":["../../../src/extensions/ProjectAws/EnsureAwsCredentialsBeforeDeploy.ts"],"sourcesContent":["import { BeforeDeploy, LoggerService } from \"@webiny/project/abstractions/index.js\";\nimport { GracefulError } from \"@webiny/project\";\nimport { STS } from \"@webiny/aws-sdk/client-sts/index.js\";\n\nclass EnsureAwsCredentialsBeforeDeployImpl implements BeforeDeploy.Interface {\n constructor(private loggerService: LoggerService.Interface) {}\n\n async execute() {\n process.env.AWS_SDK_LOAD_CONFIG = \"true\";\n const sts = new STS({});\n\n try {\n await sts.getCallerIdentity({});\n } catch (err) {\n this.loggerService.debug({ err }, \"AWS credentials error.\");\n throw GracefulError.from(\n new Error(\"AWS credentials are not configured correctly.\"),\n 'No valid AWS credentials were found. Run \"aws configure\" or set the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables before deploying. Learn more: https://webiny.link/aws-credentials'\n );\n }\n\n const region = await sts.config.region();\n if (!region) {\n throw GracefulError.from(\n new Error(\"AWS region is not defined.\"),\n \"No AWS region is set. Define the AWS_REGION environment variable or set a default region in your AWS profile. Learn more: https://webiny.link/aws-region\"\n );\n }\n\n process.env.AWS_REGION = region;\n\n const { accessKeyId } = await sts.config.credentials();\n const profile = process.env.AWS_PROFILE;\n\n if (profile) {\n this.loggerService.info(`Using profile \"${profile}\" in \"${region}\" region.`);\n } else {\n this.loggerService.info(`Using access key ID \"${accessKeyId}\" in \"${region}\" region.`);\n }\n }\n}\n\nexport const EnsureAwsCredentialsBeforeDeploy = BeforeDeploy.createImplementation({\n implementation: EnsureAwsCredentialsBeforeDeployImpl,\n dependencies: [LoggerService]\n});\n"],"names":["EnsureAwsCredentialsBeforeDeployImpl","loggerService","process","sts","STS","err","GracefulError","Error","region","accessKeyId","profile","EnsureAwsCredentialsBeforeDeploy","BeforeDeploy","LoggerService"],"mappings":";;;AAIA,MAAMA;IACF,YAAoBC,aAAsC,CAAE;aAAxCA,aAAa,GAAbA;IAAyC;IAE7D,MAAM,UAAU;QACZC,QAAQ,GAAG,CAAC,mBAAmB,GAAG;QAClC,MAAMC,MAAM,IAAIC,IAAI,CAAC;QAErB,IAAI;YACA,MAAMD,IAAI,iBAAiB,CAAC,CAAC;QACjC,EAAE,OAAOE,KAAK;YACV,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;gBAAEA;YAAI,GAAG;YAClC,MAAMC,cAAc,IAAI,CACpB,IAAIC,MAAM,kDACV;QAER;QAEA,MAAMC,SAAS,MAAML,IAAI,MAAM,CAAC,MAAM;QACtC,IAAI,CAACK,QACD,MAAMF,cAAc,IAAI,CACpB,IAAIC,MAAM,+BACV;QAIRL,QAAQ,GAAG,CAAC,UAAU,GAAGM;QAEzB,MAAM,EAAEC,WAAW,EAAE,GAAG,MAAMN,IAAI,MAAM,CAAC,WAAW;QACpD,MAAMO,UAAUR,QAAQ,GAAG,CAAC,WAAW;QAEvC,IAAIQ,SACA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,eAAe,EAAEA,QAAQ,MAAM,EAAEF,OAAO,SAAS,CAAC;aAE3E,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,qBAAqB,EAAEC,YAAY,MAAM,EAAED,OAAO,SAAS,CAAC;IAE7F;AACJ;AAEO,MAAMG,mCAAmCC,aAAa,oBAAoB,CAAC;IAC9E,gBAAgBZ;IAChB,cAAc;QAACa;KAAc;AACjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions/definitions.js","sources":["../../src/extensions/definitions.ts"],"sourcesContent":["import { ApiLambdaFunction } from \"./ApiLambdaFunction.js\";\nimport { ApiRoute } from \"./ApiRoute.js\";\nimport { OpenSearch } from \"./OpenSearch.js\";\nimport { Encryption } from \"./Encryption.js\";\nimport { Smtp as MailerSmtp } from \"./Mailer/Smtp.js\";\nimport { type ExtensionDefinitionModel } from \"@webiny/project/defineExtension\";\n\nconst definitions = [\n ApiLambdaFunction.def,\n ApiRoute.def,\n OpenSearch.def,\n Encryption.def,\n MailerSmtp.def\n] as unknown as ExtensionDefinitionModel<any>[];\n\nexport default definitions;\n"],"names":["definitions","ApiLambdaFunction","ApiRoute","OpenSearch","Encryption","MailerSmtp"],"mappings":";;;;;AAOA,MAAMA,cAAc;IAChBC,kBAAkB,GAAG;IACrBC,SAAS,GAAG;IACZC,WAAW,GAAG;IACdC,WAAW,GAAG;IACdC,KAAAA,GAAc;CACjB;AAED,+BAAeL"}
|
|
1
|
+
{"version":3,"file":"extensions/definitions.js","sources":["../../src/extensions/definitions.ts"],"sourcesContent":["import { ApiLambdaFunction } from \"./ApiLambdaFunction.js\";\nimport { ApiRoute } from \"./ApiRoute.js\";\nimport { OpenSearch } from \"./OpenSearch.js\";\nimport { Encryption } from \"./Encryption.js\";\nimport { Smtp as MailerSmtp } from \"./Mailer/Smtp.js\";\nimport { type ExtensionDefinitionModel } from \"@webiny/project/defineExtension/index.js\";\n\nconst definitions = [\n ApiLambdaFunction.def,\n ApiRoute.def,\n OpenSearch.def,\n Encryption.def,\n MailerSmtp.def\n] as unknown as ExtensionDefinitionModel<any>[];\n\nexport default definitions;\n"],"names":["definitions","ApiLambdaFunction","ApiRoute","OpenSearch","Encryption","MailerSmtp"],"mappings":";;;;;AAOA,MAAMA,cAAc;IAChBC,kBAAkB,GAAG;IACrBC,SAAS,GAAG;IACZC,WAAW,GAAG;IACdC,WAAW,GAAG;IACdC,KAAAA,GAAc;CACjB;AAED,+BAAeL"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/project-aws",
|
|
3
|
-
"version": "6.5.0-beta.
|
|
3
|
+
"version": "6.5.0-beta.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -17,18 +17,18 @@
|
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@pulumi/aws": "^7.
|
|
21
|
-
"@pulumi/pulumi": "^3.
|
|
22
|
-
"@pulumi/random": "4.21.
|
|
23
|
-
"@webiny/api-headless-cms": "6.5.0-beta.
|
|
24
|
-
"@webiny/aws-layers": "6.5.0-beta.
|
|
25
|
-
"@webiny/aws-sdk": "6.5.0-beta.
|
|
26
|
-
"@webiny/cli-core": "6.5.0-beta.
|
|
27
|
-
"@webiny/di": "1.0
|
|
28
|
-
"@webiny/project": "6.5.0-beta.
|
|
29
|
-
"@webiny/pulumi": "6.5.0-beta.
|
|
30
|
-
"@webiny/utils": "6.5.0-beta.
|
|
31
|
-
"chalk": "
|
|
20
|
+
"@pulumi/aws": "^7.48.0",
|
|
21
|
+
"@pulumi/pulumi": "^3.267.0",
|
|
22
|
+
"@pulumi/random": "4.21.2",
|
|
23
|
+
"@webiny/api-headless-cms": "6.5.0-beta.10",
|
|
24
|
+
"@webiny/aws-layers": "6.5.0-beta.10",
|
|
25
|
+
"@webiny/aws-sdk": "6.5.0-beta.10",
|
|
26
|
+
"@webiny/cli-core": "6.5.0-beta.10",
|
|
27
|
+
"@webiny/di": "1.1.0",
|
|
28
|
+
"@webiny/project": "6.5.0-beta.10",
|
|
29
|
+
"@webiny/pulumi": "6.5.0-beta.10",
|
|
30
|
+
"@webiny/utils": "6.5.0-beta.10",
|
|
31
|
+
"chalk": "6.0.1",
|
|
32
32
|
"email-addresses": "5.0.0",
|
|
33
33
|
"find-up": "8.0.0",
|
|
34
34
|
"invariant": "2.2.4",
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
"react": "18.3.1",
|
|
38
38
|
"replace-in-path": "1.1.0",
|
|
39
39
|
"ts-morph": "28.0.0",
|
|
40
|
-
"zod": "4.
|
|
40
|
+
"zod": "4.6.5"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@types/lodash": "4.17.
|
|
43
|
+
"@types/lodash": "4.17.25",
|
|
44
44
|
"@types/ncp": "2.0.8",
|
|
45
|
-
"@webiny/build-tools": "6.5.0-beta.
|
|
45
|
+
"@webiny/build-tools": "6.5.0-beta.10",
|
|
46
46
|
"typescript": "7.0.2",
|
|
47
|
-
"vitest": "
|
|
47
|
+
"vitest": "5.0.3"
|
|
48
48
|
},
|
|
49
49
|
"adio": {
|
|
50
50
|
"ignoreDirs": [
|
package/project.d.ts
CHANGED
|
@@ -28,25 +28,22 @@ export declare const Project: {
|
|
|
28
28
|
fileManager: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
29
29
|
threatDetection: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
30
30
|
}, import("zod/v4/core").$strip>>;
|
|
31
|
-
aiPowerups: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
pageGeneration: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
36
|
-
pageTranslation: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
37
|
-
}, import("zod/v4/core").$strip>>;
|
|
38
|
-
fileManager: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
39
|
-
imageEnrichment: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
40
|
-
}, import("zod/v4/core").$strip>>;
|
|
41
|
-
lexicalGeneration: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
42
|
-
remoteComponents: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
43
|
-
cms: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
44
|
-
entryGeneration: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
45
|
-
entryComparison: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
46
|
-
entryTranslation: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
47
|
-
}, import("zod/v4/core").$strip>>;
|
|
31
|
+
aiPowerups: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodBoolean, import("zod").ZodObject<{
|
|
32
|
+
websiteBuilder: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
33
|
+
pageGeneration: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
34
|
+
pageTranslation: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
48
35
|
}, import("zod/v4/core").$strip>>;
|
|
49
|
-
|
|
36
|
+
fileManager: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
37
|
+
imageEnrichment: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
38
|
+
}, import("zod/v4/core").$strip>>;
|
|
39
|
+
lexicalGeneration: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
40
|
+
remoteComponents: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
41
|
+
cms: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
42
|
+
entryGeneration: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
43
|
+
entryComparison: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
44
|
+
entryTranslation: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
45
|
+
}, import("zod/v4/core").$strip>>;
|
|
46
|
+
}, import("zod/v4/core").$strip>]>>;
|
|
50
47
|
abTesting: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
51
48
|
collaboration: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodBoolean, import("zod").ZodObject<{
|
|
52
49
|
comments: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
@@ -17,7 +17,8 @@ const ApiCloudfront = createAppModule({
|
|
|
17
17
|
"Accept",
|
|
18
18
|
"Accept-Language",
|
|
19
19
|
"X-Tenant",
|
|
20
|
-
"X-Webiny-Sdk"
|
|
20
|
+
"X-Webiny-Sdk",
|
|
21
|
+
"X-Webiny-Debug"
|
|
21
22
|
];
|
|
22
23
|
return app.addResource(__rspack_external__pulumi_aws_9e2bee2d.cloudfront.Distribution, {
|
|
23
24
|
name: "api-cloudfront",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pulumi/apps/api/ApiCloudfront.js","sources":["../../../../src/pulumi/apps/api/ApiCloudfront.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport type { PulumiApp, PulumiAppModule } from \"@webiny/pulumi\";\nimport { createAppModule } from \"@webiny/pulumi\";\n\nimport { ApiGateway } from \"./ApiGateway.js\";\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 = [\n \"Origin\",\n \"Authorization\",\n \"Accept\",\n \"Accept-Language\",\n \"X-Tenant\",\n \"X-Webiny-Sdk\"\n ];\n\n return app.addResource(aws.cloudfront.Distribution, {\n name: \"api-cloudfront\",\n config: {\n httpVersion: \"http2and3\",\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: forwardHeaders,\n queryString: true\n },\n pathPattern: \"/cms*\",\n viewerProtocolPolicy: \"allow-all\",\n targetOriginId: gateway.api.output.name\n },\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: forwardHeaders,\n queryString: true\n },\n pathPattern: \"/wb/*\",\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"],"names":["ApiCloudfront","createAppModule","app","gateway","ApiGateway","cookies","forwardHeaders","aws","url","URL"],"mappings":";;;AAQO,MAAMA,gBAAgBC,gBAAgB;IACzC,MAAM;IACN,QAAOC,GAAc;QACjB,MAAMC,UAAUD,IAAI,SAAS,CAACE;QAE9B,MAAMC,UAAU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;4BAAQ;4BAAO;yBAAU;wBACzC,iBAAiB;4BACb,SAAS;gCACL,SAAS;4BACb;4BACA,SAASG;4BACT,aAAa;wBACjB;wBAEA,QAAQ;wBACR,YAAY;wBACZ,QAAQ;wBACR,aAAa;wBACb,sBAAsB;wBACtB,gBAAgBH,QAAQ,GAAG,CAAC,MAAM,CAAC,IAAI;oBAC3C;oBACA;wBACI,gBAAgB;4BAAC;4BAAQ;4BAAO;yBAAU;wBAC1C,eAAe;4BAAC;4BAAQ;4BAAO;yBAAU;wBACzC,iBAAiB;4BACb,SAASE;4BACT,SAASC;4BACT,aAAa;wBACjB;wBAEA,QAAQ;wBACR,YAAY;wBACZ,QAAQ;wBACR,aAAa;wBACb,sBAAsB;wBACtB,gBAAgBH,QAAQ,GAAG,CAAC,MAAM,CAAC,IAAI;oBAC3C;iBACH;gBACD,SAAS;oBACL;wBACI,YAAYA,QAAQ,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAC5C,CAACK,MAAgB,IAAIC,IAAID,KAAK,QAAQ;wBAE1C,YAAYL,QAAQ,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAC5C,CAACK,MAAgB,IAAIC,IAAID,KAAK,QAAQ;wBAE1C,UAAUL,QAAQ,GAAG,CAAC,MAAM,CAAC,IAAI;wBACjC,oBAAoB;4BAChB,UAAU;4BACV,WAAW;4BACX,sBAAsB;4BACtB,oBAAoB;gCAAC;6BAAU;wBACnC;oBACJ;iBACH;gBACD,cAAc;oBACV,gBAAgB;wBACZ,iBAAiB;oBACrB;gBACJ;gBACA,mBAAmB;oBACf,8BAA8B;gBAClC;YACJ;YACA,MAAM;gBAaF,eAAe;oBAAC;iBAAU;YAC9B;QACJ;IACJ;AACJ"}
|
|
1
|
+
{"version":3,"file":"pulumi/apps/api/ApiCloudfront.js","sources":["../../../../src/pulumi/apps/api/ApiCloudfront.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport type { PulumiApp, PulumiAppModule } from \"@webiny/pulumi\";\nimport { createAppModule } from \"@webiny/pulumi\";\n\nimport { ApiGateway } from \"./ApiGateway.js\";\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 = [\n \"Origin\",\n \"Authorization\",\n \"Accept\",\n \"Accept-Language\",\n \"X-Tenant\",\n \"X-Webiny-Sdk\",\n \"X-Webiny-Debug\"\n ];\n\n return app.addResource(aws.cloudfront.Distribution, {\n name: \"api-cloudfront\",\n config: {\n httpVersion: \"http2and3\",\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: forwardHeaders,\n queryString: true\n },\n pathPattern: \"/cms*\",\n viewerProtocolPolicy: \"allow-all\",\n targetOriginId: gateway.api.output.name\n },\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: forwardHeaders,\n queryString: true\n },\n pathPattern: \"/wb/*\",\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"],"names":["ApiCloudfront","createAppModule","app","gateway","ApiGateway","cookies","forwardHeaders","aws","url","URL"],"mappings":";;;AAQO,MAAMA,gBAAgBC,gBAAgB;IACzC,MAAM;IACN,QAAOC,GAAc;QACjB,MAAMC,UAAUD,IAAI,SAAS,CAACE;QAE9B,MAAMC,UAAU;YACZ,SAAS;YACT,kBAAkB;gBAAC;aAAe;QACtC;QAEA,MAAMC,iBAAiB;YACnB;YACA;YACA;YACA;YACA;YACA;YACA;SACH;QAED,OAAOJ,IAAI,WAAW,CAACK,uCAAAA,UAAAA,CAAAA,YAA2B,EAAE;YAChD,MAAM;YACN,QAAQ;gBACJ,aAAa;gBACb,mBAAmB;gBACnB,eAAe;gBACf,SAAS;gBACT,sBAAsB;oBAClB,UAAU;oBACV,gBAAgB;wBAAC;wBAAO;wBAAQ;wBAAW;wBAAO;wBAAQ;wBAAS;qBAAS;oBAC5E,eAAe;wBAAC;wBAAO;wBAAQ;qBAAU;oBACzC,iBAAiB;wBACbF;wBACA,SAASC;wBACT,aAAa;oBACjB;oBAEA,QAAQ;oBACR,YAAY;oBACZ,QAAQ;oBACR,gBAAgBH,QAAQ,GAAG,CAAC,MAAM,CAAC,IAAI;oBACvC,sBAAsB;gBAC1B;gBACA,uBAAuB;oBACnB;wBACI,UAAU;wBACV,gBAAgB;4BACZ;4BACA;4BACA;4BACA;4BACA;4BACA;4BACA;yBACH;wBACD,eAAe;4BAAC;4BAAO;4BAAQ;yBAAU;wBACzC,iBAAiB;4BACb,SAAS;gCACL,SAAS;4BACb;4BACA,SAASG;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AE1C,UAAUL,QAAQ,GAAG,CAAC,MAAM,CAAC,IAAI;wBACjC,oBAAoB;4BAChB,UAAU;4BACV,WAAW;4BACX,sBAAsB;4BACtB,oBAAoB;gCAAC;6BAAU;wBACnC;oBACJ;iBACH;gBACD,cAAc;oBACV,gBAAgB;wBACZ,iBAAiB;oBACrB;gBACJ;gBACA,mBAAmB;oBACf,8BAA8B;gBAClC;YACJ;YACA,MAAM;gBAaF,eAAe;oBAAC;iBAAU;YAC9B;QACJ;IACJ;AACJ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type PulumiApp } from "@webiny/pulumi";
|
|
2
2
|
import { type AppName } from "@webiny/project";
|
|
3
3
|
export declare function getAwsAccountId(app: PulumiApp): import("@pulumi/pulumi").Output<string>;
|
|
4
|
-
export declare function getAwsRegion(app: PulumiApp): import("@pulumi/pulumi").Output<"af-south-1" | "ap-east-1" | "ap-east-2" | "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" | "ap-southeast-5" | "ap-southeast-7" | "ca-central-1" | "ca-west-1" | "cn-north-1" | "cn-northwest-1" | "eu-central-1" | "eu-central-2" | "eu-isoe-west-1" | "eu-north-1" | "eu-south-1" | "eu-south-2" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "il-central-1" | "me-central-1" | "me-south-1" | "mx-central-1" | "sa-east-1" | "us-east-1" | "us-east-2" | "us-gov-east-1" | "us-gov-west-1" | "us-iso-east-1" | "us-iso-west-1" | "us-isob-east-1" | "us-west-1" | "us-west-2">;
|
|
4
|
+
export declare function getAwsRegion(app: PulumiApp): import("@pulumi/pulumi").Output<"af-south-1" | "ap-east-1" | "ap-east-2" | "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" | "ap-southeast-5" | "ap-southeast-6" | "ap-southeast-7" | "ca-central-1" | "ca-west-1" | "cn-north-1" | "cn-northwest-1" | "eu-central-1" | "eu-central-2" | "eu-isoe-west-1" | "eu-north-1" | "eu-south-1" | "eu-south-2" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eusc-de-east-1" | "il-central-1" | "me-central-1" | "me-south-1" | "mx-central-1" | "sa-east-1" | "us-east-1" | "us-east-2" | "us-gov-east-1" | "us-gov-west-1" | "us-iso-east-1" | "us-iso-west-1" | "us-isob-east-1" | "us-isob-west-1" | "us-isof-east-1" | "us-isof-south-1" | "us-west-1" | "us-west-2">;
|
|
5
5
|
export declare function applyAwsResourceTags(appName: AppName): Promise<void>;
|
|
@@ -6,7 +6,7 @@ const resolveDomains = (params)=>{
|
|
|
6
6
|
return types.reduce((output, type)=>{
|
|
7
7
|
const value = domains[type];
|
|
8
8
|
if (!value) return output;
|
|
9
|
-
if (0 === value.length) throw new Error(`Missing domains for "${type}" deployment.`);
|
|
9
|
+
else if (0 === value.length) throw new Error(`Missing domains for "${type}" deployment.`);
|
|
10
10
|
for (const domain of deploymentsDomains){
|
|
11
11
|
const target = domain.domains[type];
|
|
12
12
|
if (!target) throw new Error(`Missing "${type}" domain in deployment "${domain.name}".`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pulumi/apps/blueGreen/domains/resolveDomains.js","sources":["../../../../../src/pulumi/apps/blueGreen/domains/resolveDomains.ts"],"sourcesContent":["import type {\n IAttachedDomainKey,\n IAttachedDomains,\n IDeploymentsDomains,\n IResolvedDomains\n} from \"../types.js\";\n\nexport interface IResolveDomainsParams {\n attachedDomains: IAttachedDomains;\n deploymentsDomains: IDeploymentsDomains;\n}\n\nexport const resolveDomains = (params: IResolveDomainsParams): IResolvedDomains => {\n const { attachedDomains, deploymentsDomains } = params;\n\n const domains = attachedDomains.domains;\n\n if (!domains) {\n return [];\n }\n const types = Object.keys(domains).filter(key => {\n return !!domains[key as IAttachedDomainKey];\n }) as IAttachedDomainKey[];\n\n return types.reduce<IResolvedDomains>((output, type) => {\n const value = domains[type];\n /**\n * Should not happen because we are filtering out undefined values when creating the `types` array.\n */\n if (!value) {\n return output;\n } else if (value.length === 0) {\n throw new Error(`Missing domains for \"${type}\" deployment.`);\n }\n for (const domain of deploymentsDomains) {\n const target = domain.domains[type];\n if (!target) {\n throw new Error(`Missing \"${type}\" domain in deployment \"${domain.name}\".`);\n }\n\n output.push({\n type,\n env: domain.env,\n variant: domain.variant,\n name: domain.name,\n sources: value,\n target\n });\n }\n\n return output;\n }, []);\n};\n"],"names":["resolveDomains","params","attachedDomains","deploymentsDomains","domains","types","Object","key","output","type","value","Error","domain","target"],"mappings":"AAYO,MAAMA,iBAAiB,CAACC;IAC3B,MAAM,EAAEC,eAAe,EAAEC,kBAAkB,EAAE,GAAGF;IAEhD,MAAMG,UAAUF,gBAAgB,OAAO;IAEvC,IAAI,CAACE,SACD,OAAO,EAAE;IAEb,MAAMC,QAAQC,OAAO,IAAI,CAACF,SAAS,MAAM,CAACG,CAAAA,MAC/B,CAAC,CAACH,OAAO,CAACG,IAA0B;IAG/C,OAAOF,MAAM,MAAM,CAAmB,CAACG,QAAQC;QAC3C,MAAMC,QAAQN,OAAO,CAACK,KAAK;QAI3B,IAAI,CAACC,OACD,OAAOF;
|
|
1
|
+
{"version":3,"file":"pulumi/apps/blueGreen/domains/resolveDomains.js","sources":["../../../../../src/pulumi/apps/blueGreen/domains/resolveDomains.ts"],"sourcesContent":["import type {\n IAttachedDomainKey,\n IAttachedDomains,\n IDeploymentsDomains,\n IResolvedDomains\n} from \"../types.js\";\n\nexport interface IResolveDomainsParams {\n attachedDomains: IAttachedDomains;\n deploymentsDomains: IDeploymentsDomains;\n}\n\nexport const resolveDomains = (params: IResolveDomainsParams): IResolvedDomains => {\n const { attachedDomains, deploymentsDomains } = params;\n\n const domains = attachedDomains.domains;\n\n if (!domains) {\n return [];\n }\n const types = Object.keys(domains).filter(key => {\n return !!domains[key as IAttachedDomainKey];\n }) as IAttachedDomainKey[];\n\n return types.reduce<IResolvedDomains>((output, type) => {\n const value = domains[type];\n /**\n * Should not happen because we are filtering out undefined values when creating the `types` array.\n */\n if (!value) {\n return output;\n } else if (value.length === 0) {\n throw new Error(`Missing domains for \"${type}\" deployment.`);\n }\n for (const domain of deploymentsDomains) {\n const target = domain.domains[type];\n if (!target) {\n throw new Error(`Missing \"${type}\" domain in deployment \"${domain.name}\".`);\n }\n\n output.push({\n type,\n env: domain.env,\n variant: domain.variant,\n name: domain.name,\n sources: value,\n target\n });\n }\n\n return output;\n }, []);\n};\n"],"names":["resolveDomains","params","attachedDomains","deploymentsDomains","domains","types","Object","key","output","type","value","Error","domain","target"],"mappings":"AAYO,MAAMA,iBAAiB,CAACC;IAC3B,MAAM,EAAEC,eAAe,EAAEC,kBAAkB,EAAE,GAAGF;IAEhD,MAAMG,UAAUF,gBAAgB,OAAO;IAEvC,IAAI,CAACE,SACD,OAAO,EAAE;IAEb,MAAMC,QAAQC,OAAO,IAAI,CAACF,SAAS,MAAM,CAACG,CAAAA,MAC/B,CAAC,CAACH,OAAO,CAACG,IAA0B;IAG/C,OAAOF,MAAM,MAAM,CAAmB,CAACG,QAAQC;QAC3C,MAAMC,QAAQN,OAAO,CAACK,KAAK;QAI3B,IAAI,CAACC,OACD,OAAOF;aACJ,IAAIE,AAAiB,MAAjBA,MAAM,MAAM,EACnB,MAAM,IAAIC,MAAM,CAAC,qBAAqB,EAAEF,KAAK,aAAa,CAAC;QAE/D,KAAK,MAAMG,UAAUT,mBAAoB;YACrC,MAAMU,SAASD,OAAO,OAAO,CAACH,KAAK;YACnC,IAAI,CAACI,QACD,MAAM,IAAIF,MAAM,CAAC,SAAS,EAAEF,KAAK,wBAAwB,EAAEG,OAAO,IAAI,CAAC,EAAE,CAAC;YAG9EJ,OAAO,IAAI,CAAC;gBACRC;gBACA,KAAKG,OAAO,GAAG;gBACf,SAASA,OAAO,OAAO;gBACvB,MAAMA,OAAO,IAAI;gBACjB,SAASF;gBACTG;YACJ;QACJ;QAEA,OAAOL;IACX,GAAG,EAAE;AACT"}
|