@webiny/project-aws 6.6.0-alpha.11 → 6.6.0-alpha.13

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.
Files changed (194) hide show
  1. package/_templates/appTemplates/api/graphql/package.json +2 -2
  2. package/_templates/appTemplates/api/graphql/src/index.ts +2 -2
  3. package/_templates/appTemplates/api/graphql/src/web.ts +15 -0
  4. package/_templates/appTemplates/api/graphql/webiny.config.ts +6 -1
  5. package/_templates/extensions/OpenSearch/api/graphql/src/index.ts +2 -2
  6. package/_templates/extensions/OpenSearch/api/graphql/src/web.ts +15 -0
  7. package/_templates/extensions/Postgres/api/graphql/src/index.ts +17 -0
  8. package/_templates/extensions/Postgres/api/graphql/src/web.ts +15 -0
  9. package/api.d.ts +6 -6
  10. package/api.js +3 -2
  11. package/api.js.map +1 -1
  12. package/apps/createApiApp.d.ts +18 -1
  13. package/apps/createCoreApp.d.ts +1 -1
  14. package/decorators/GetPulumiServiceWithDownloadInfo.d.ts +1 -3
  15. package/decorators/GetPulumiServiceWithDownloadInfo.js +15 -11
  16. package/decorators/GetPulumiServiceWithDownloadInfo.js.map +1 -1
  17. package/extensions/ApiRoute.d.ts +2 -1
  18. package/extensions/ApiRoute.js.map +1 -1
  19. package/extensions/AuroraPostgresCluster.d.ts +12 -0
  20. package/extensions/AuroraPostgresCluster.js +30 -0
  21. package/extensions/AuroraPostgresCluster.js.map +1 -0
  22. package/extensions/Postgres/AddCorePostgres.d.ts +27 -0
  23. package/extensions/Postgres/AddCorePostgres.js +52 -0
  24. package/extensions/Postgres/AddCorePostgres.js.map +1 -0
  25. package/extensions/Postgres/CopyPgModulesAfterApiBuild.d.ts +16 -0
  26. package/extensions/Postgres/CopyPgModulesAfterApiBuild.js +42 -0
  27. package/extensions/Postgres/CopyPgModulesAfterApiBuild.js.map +1 -0
  28. package/extensions/Postgres/ReplaceApiLambdaFnHandlers.d.ts +17 -0
  29. package/extensions/Postgres/ReplaceApiLambdaFnHandlers.js +33 -0
  30. package/extensions/Postgres/ReplaceApiLambdaFnHandlers.js.map +1 -0
  31. package/extensions/Postgres/ValidatePostgresBeforeCoreDeploy.d.ts +23 -0
  32. package/extensions/Postgres/ValidatePostgresBeforeCoreDeploy.js +41 -0
  33. package/extensions/Postgres/ValidatePostgresBeforeCoreDeploy.js.map +1 -0
  34. package/extensions/Postgres/copyPgRuntimeModules.d.ts +27 -0
  35. package/extensions/Postgres/copyPgRuntimeModules.js +124 -0
  36. package/extensions/Postgres/copyPgRuntimeModules.js.map +1 -0
  37. package/extensions/Postgres/rds-ca-bundle.pem +2888 -0
  38. package/extensions/Postgres/rdsCaBundle.d.ts +13 -0
  39. package/extensions/Postgres/rdsCaBundle.js +7 -0
  40. package/extensions/Postgres/rdsCaBundle.js.map +1 -0
  41. package/extensions/ProjectAws/EnsurePostgresSetupUnchanged.d.ts +20 -0
  42. package/extensions/ProjectAws/EnsurePostgresSetupUnchanged.js +34 -0
  43. package/extensions/ProjectAws/EnsurePostgresSetupUnchanged.js.map +1 -0
  44. package/extensions/ProjectAws/RefuseApiWatchWithPostgres.d.ts +20 -0
  45. package/extensions/ProjectAws/RefuseApiWatchWithPostgres.js +27 -0
  46. package/extensions/ProjectAws/RefuseApiWatchWithPostgres.js.map +1 -0
  47. package/extensions/ProjectAws.js +4 -0
  48. package/extensions/ProjectAws.js.map +1 -1
  49. package/extensions/definitions.js +3 -1
  50. package/extensions/definitions.js.map +1 -1
  51. package/extensions/index.d.ts +4 -1
  52. package/extensions/index.js +3 -2
  53. package/extensions/registerExtensionImplementations.js +3 -1
  54. package/extensions/registerExtensionImplementations.js.map +1 -1
  55. package/extensions/toCloudFrontPathPattern.d.ts +5 -0
  56. package/extensions/toCloudFrontPathPattern.js +8 -0
  57. package/extensions/toCloudFrontPathPattern.js.map +1 -0
  58. package/features/Watch/AwsWatch.js +1 -0
  59. package/features/Watch/AwsWatch.js.map +1 -1
  60. package/features/Watch/forwarder/createForwarderZip.d.ts +8 -0
  61. package/features/Watch/forwarder/createForwarderZip.js +19 -0
  62. package/features/Watch/forwarder/createForwarderZip.js.map +1 -0
  63. package/features/Watch/forwarder/lambdaHandler.cjs +124 -0
  64. package/features/Watch/forwarder/lambdaHandler.d.cts +1 -0
  65. package/features/Watch/forwarder/mqtt.cjs +4 -0
  66. package/features/Watch/forwarder/mqtt.d.cts +1 -0
  67. package/features/Watch/forwarder/webHandler.d.mts +1 -0
  68. package/features/Watch/forwarder/webHandler.mjs +298 -0
  69. package/features/Watch/replaceLambdaFunctions.d.ts +2 -0
  70. package/features/Watch/replaceLambdaFunctions.js +44 -3
  71. package/features/Watch/replaceLambdaFunctions.js.map +1 -1
  72. package/features/Watch/replaceWebFunction.d.ts +44 -0
  73. package/features/Watch/replaceWebFunction.js +119 -0
  74. package/features/Watch/replaceWebFunction.js.map +1 -0
  75. package/infra.d.ts +13 -0
  76. package/infra.js +8 -6
  77. package/infra.js.map +1 -1
  78. package/package.json +21 -17
  79. package/project.d.ts +1 -0
  80. package/pulumi/apps/admin/createAdminPulumiApp.js +1 -2
  81. package/pulumi/apps/admin/createAdminPulumiApp.js.map +1 -1
  82. package/pulumi/apps/api/ApiCloudfront.d.ts +5 -0
  83. package/pulumi/apps/api/ApiCloudfront.js +71 -198
  84. package/pulumi/apps/api/ApiCloudfront.js.map +1 -1
  85. package/pulumi/apps/api/ApiFileManager.d.ts +8 -1
  86. package/pulumi/apps/api/ApiFileManager.js +11 -1
  87. package/pulumi/apps/api/ApiFileManager.js.map +1 -1
  88. package/pulumi/apps/api/ApiGraphql.d.ts +1 -1
  89. package/pulumi/apps/api/ApiGraphql.js +78 -69
  90. package/pulumi/apps/api/ApiGraphql.js.map +1 -1
  91. package/pulumi/apps/api/ApiGraphqlWeb.d.ts +45 -0
  92. package/pulumi/apps/api/ApiGraphqlWeb.js +280 -0
  93. package/pulumi/apps/api/ApiGraphqlWeb.js.map +1 -0
  94. package/pulumi/apps/api/ApiOutput.d.ts +1 -0
  95. package/pulumi/apps/api/ApiOutput.js +2 -1
  96. package/pulumi/apps/api/ApiOutput.js.map +1 -1
  97. package/pulumi/apps/api/ApiSchemaSetup.d.ts +86 -0
  98. package/pulumi/apps/api/ApiSchemaSetup.js +139 -0
  99. package/pulumi/apps/api/ApiSchemaSetup.js.map +1 -0
  100. package/pulumi/apps/api/apiDynamoDb.d.ts +6 -0
  101. package/pulumi/apps/api/apiDynamoDb.js +20 -0
  102. package/pulumi/apps/api/apiDynamoDb.js.map +1 -0
  103. package/pulumi/apps/api/apiServiceManifests.d.ts +24 -0
  104. package/pulumi/apps/api/apiServiceManifests.js +27 -0
  105. package/pulumi/apps/api/apiServiceManifests.js.map +1 -0
  106. package/pulumi/apps/api/backgroundTask/types.js.map +1 -1
  107. package/pulumi/apps/api/cloudfront/addWebRouteBehavior.d.ts +8 -0
  108. package/pulumi/apps/api/cloudfront/addWebRouteBehavior.js +26 -0
  109. package/pulumi/apps/api/cloudfront/addWebRouteBehavior.js.map +1 -0
  110. package/pulumi/apps/api/cloudfront/allowFunctionUrlInvoke.d.ts +17 -0
  111. package/pulumi/apps/api/cloudfront/allowFunctionUrlInvoke.js +27 -0
  112. package/pulumi/apps/api/cloudfront/allowFunctionUrlInvoke.js.map +1 -0
  113. package/pulumi/apps/api/cloudfront/allowWebFunctionInvoke.d.ts +8 -0
  114. package/pulumi/apps/api/cloudfront/allowWebFunctionInvoke.js +31 -0
  115. package/pulumi/apps/api/cloudfront/allowWebFunctionInvoke.js.map +1 -0
  116. package/pulumi/apps/api/cloudfront/constants.d.ts +24 -0
  117. package/pulumi/apps/api/cloudfront/constants.js +43 -0
  118. package/pulumi/apps/api/cloudfront/constants.js.map +1 -0
  119. package/pulumi/apps/api/cloudfront/createFilesRouting.d.ts +10 -0
  120. package/pulumi/apps/api/cloudfront/createFilesRouting.js +35 -0
  121. package/pulumi/apps/api/cloudfront/createFilesRouting.js.map +1 -0
  122. package/pulumi/apps/api/cloudfront/createGatewayRouting.d.ts +10 -0
  123. package/pulumi/apps/api/cloudfront/createGatewayRouting.js +48 -0
  124. package/pulumi/apps/api/cloudfront/createGatewayRouting.js.map +1 -0
  125. package/pulumi/apps/api/cloudfront/createStreamRouting.d.ts +10 -0
  126. package/pulumi/apps/api/cloudfront/createStreamRouting.js +87 -0
  127. package/pulumi/apps/api/cloudfront/createStreamRouting.js.map +1 -0
  128. package/pulumi/apps/api/cloudfront/createWebRouting.d.ts +13 -0
  129. package/pulumi/apps/api/cloudfront/createWebRouting.js +140 -0
  130. package/pulumi/apps/api/cloudfront/createWebRouting.js.map +1 -0
  131. package/pulumi/apps/api/createApiPulumiApp.d.ts +22 -4
  132. package/pulumi/apps/api/createApiPulumiApp.js +122 -81
  133. package/pulumi/apps/api/createApiPulumiApp.js.map +1 -1
  134. package/pulumi/apps/api/index.d.ts +2 -0
  135. package/pulumi/apps/api/index.js +2 -0
  136. package/pulumi/apps/api/isRouteNameAllowed.d.ts +7 -0
  137. package/pulumi/apps/api/isRouteNameAllowed.js +6 -0
  138. package/pulumi/apps/api/isRouteNameAllowed.js.map +1 -0
  139. package/pulumi/apps/common/CoreOutput.d.ts +13 -0
  140. package/pulumi/apps/common/CoreOutput.js +17 -2
  141. package/pulumi/apps/common/CoreOutput.js.map +1 -1
  142. package/pulumi/apps/core/CoreCognito.d.ts +14 -0
  143. package/pulumi/apps/core/CoreCognito.js +34 -1
  144. package/pulumi/apps/core/CoreCognito.js.map +1 -1
  145. package/pulumi/apps/core/CoreOpenSearch.js +12 -6
  146. package/pulumi/apps/core/CoreOpenSearch.js.map +1 -1
  147. package/pulumi/apps/core/CorePostgres.d.ts +48 -0
  148. package/pulumi/apps/core/CorePostgres.js +262 -0
  149. package/pulumi/apps/core/CorePostgres.js.map +1 -0
  150. package/pulumi/apps/core/cognitoIdentityProviders/configure.js +11 -0
  151. package/pulumi/apps/core/cognitoIdentityProviders/configure.js.map +1 -1
  152. package/pulumi/apps/core/coreDynamoDb.d.ts +19 -0
  153. package/pulumi/apps/core/coreDynamoDb.js +34 -0
  154. package/pulumi/apps/core/coreDynamoDb.js.map +1 -0
  155. package/pulumi/apps/core/coreServiceManifests.d.ts +31 -0
  156. package/pulumi/apps/core/coreServiceManifests.js +31 -0
  157. package/pulumi/apps/core/coreServiceManifests.js.map +1 -0
  158. package/pulumi/apps/core/coreVpcEndpoints.d.ts +14 -0
  159. package/pulumi/apps/core/coreVpcEndpoints.js +55 -0
  160. package/pulumi/apps/core/coreVpcEndpoints.js.map +1 -0
  161. package/pulumi/apps/core/createCorePulumiApp.d.ts +1 -1
  162. package/pulumi/apps/core/createCorePulumiApp.js +18 -78
  163. package/pulumi/apps/core/createCorePulumiApp.js.map +1 -1
  164. package/pulumi/apps/core/index.d.ts +1 -0
  165. package/pulumi/apps/core/index.js +1 -0
  166. package/pulumi/apps/extensions/getPostgresConfigFromExtension.d.ts +15 -0
  167. package/pulumi/apps/extensions/getPostgresConfigFromExtension.js +16 -0
  168. package/pulumi/apps/extensions/getPostgresConfigFromExtension.js.map +1 -0
  169. package/pulumi/apps/extensions/getVpcConfigFromExtension.d.ts +4 -0
  170. package/pulumi/apps/extensions/isWebFunctionEnabled.d.ts +5 -0
  171. package/pulumi/apps/extensions/isWebFunctionEnabled.js +9 -0
  172. package/pulumi/apps/extensions/isWebFunctionEnabled.js.map +1 -0
  173. package/pulumi/apps/extensions/projectUsesPostgres.d.ts +2 -0
  174. package/pulumi/apps/extensions/projectUsesPostgres.js +10 -0
  175. package/pulumi/apps/extensions/projectUsesPostgres.js.map +1 -0
  176. package/pulumi/apps/react/adminSettingsItem.d.ts +17 -0
  177. package/pulumi/apps/react/adminSettingsItem.js +28 -0
  178. package/pulumi/apps/react/adminSettingsItem.js.map +1 -0
  179. package/pulumi/apps/react/createReactPulumiApp.js +6 -19
  180. package/pulumi/apps/react/createReactPulumiApp.js.map +1 -1
  181. package/pulumi/extensions/index.d.ts +12 -45
  182. package/pulumi/extensions/index.js +2 -1
  183. package/pulumi/extensions/index.js.map +1 -1
  184. package/pulumi/types.d.ts +5 -0
  185. package/pulumi/utils/lambdaEnvVariables.js +2 -2
  186. package/pulumi/utils/lambdaEnvVariables.js.map +1 -1
  187. package/pulumi/utils/tagResources.js +2 -0
  188. package/pulumi/utils/tagResources.js.map +1 -1
  189. package/pulumi/utils/withServiceManifest.d.ts +35 -1
  190. package/pulumi/utils/withServiceManifest.js +53 -9
  191. package/pulumi/utils/withServiceManifest.js.map +1 -1
  192. package/services/PulumiGetStackOutputService/mapStackOutput.js +1 -1
  193. package/services/PulumiGetStackOutputService/mapStackOutput.js.map +1 -1
  194. package/features/Watch/handler/handler.zip +0 -0
@@ -22,27 +22,6 @@ export { DynamoDbPitr };
22
22
  export { S3BucketVersioning };
23
23
  export declare const definitions: (import("@webiny/project/defineExtension/index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
24
24
  src: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>;
25
- }, import("zod/v4/core").$strip>> | import("@webiny/project/defineExtension/index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
26
- enabled: import("zod").ZodDefault<import("zod").ZodBoolean>;
27
- useVpcEndpoints: import("zod").ZodOptional<import("zod").ZodBoolean>;
28
- useExistingVpc: import("zod").ZodOptional<import("zod").ZodObject<{
29
- openSearchDomainVpcConfig: import("zod").ZodOptional<import("zod").ZodObject<{
30
- securityGroupIds: import("zod").ZodArray<import("zod").ZodString>;
31
- subnetIds: import("zod").ZodArray<import("zod").ZodString>;
32
- }, import("zod/v4/core").$strip>>;
33
- lambdaFunctionsVpcConfig: import("zod").ZodObject<{
34
- securityGroupIds: import("zod").ZodArray<import("zod").ZodString>;
35
- subnetIds: import("zod").ZodArray<import("zod").ZodString>;
36
- }, import("zod/v4/core").$strip>;
37
- }, import("zod/v4/core").$strip>>;
38
- }, import("zod/v4/core").$strip>> | import("@webiny/project/defineExtension/index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
39
- enabled: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
40
- domainName: import("zod").ZodOptional<import("zod").ZodString>;
41
- indexPrefix: import("zod").ZodOptional<import("zod").ZodString>;
42
- sharedIndexes: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
43
- endpoint: import("zod").ZodOptional<import("zod").ZodString>;
44
- username: import("zod").ZodOptional<import("zod").ZodString>;
45
- password: import("zod").ZodOptional<import("zod").ZodString>;
46
25
  }, import("zod/v4/core").$strip>> | import("@webiny/project/defineExtension/index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
47
26
  domains: import("zod").ZodArray<import("zod").ZodString>;
48
27
  sslMethod: import("zod").ZodDefault<import("zod").ZodEnum<{
@@ -59,10 +38,6 @@ export declare const definitions: (import("@webiny/project/defineExtension/index
59
38
  "TLSv1.2_2021": "TLSv1.2_2021";
60
39
  TLSv1_2016: "TLSv1_2016";
61
40
  }>>;
62
- }, import("zod/v4/core").$strip>> | import("@webiny/project/defineExtension/index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
63
- tags: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
64
- }, import("zod/v4/core").$strip>> | import("@webiny/project/defineExtension/index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
65
- enabled: import("zod").ZodBoolean;
66
41
  }, import("zod/v4/core").$strip>> | import("@webiny/project/defineExtension/index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
67
42
  key: import("zod").ZodString;
68
43
  value: import("zod").ZodAny;
@@ -70,26 +45,10 @@ export declare const definitions: (import("@webiny/project/defineExtension/index
70
45
  size: import("zod").ZodNumber;
71
46
  }, import("zod/v4/core").$strip>> | import("@webiny/project/defineExtension/index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
72
47
  enabled: import("zod").ZodDefault<import("zod").ZodBoolean>;
73
- domains: import("zod").ZodObject<{
74
- acmCertificateArn: import("zod").ZodString;
75
- sslSupportMethod: import("zod").ZodEnum<{
76
- "sni-only": "sni-only";
77
- vip: "vip";
78
- }>;
79
- domains: import("zod").ZodObject<{
80
- api: import("zod").ZodPipe<import("zod").ZodArray<import("zod").ZodString>, import("zod").ZodTransform<[string, ...string[]], string[]>>;
81
- admin: import("zod").ZodPipe<import("zod").ZodArray<import("zod").ZodString>, import("zod").ZodTransform<[string, ...string[]], string[]>>;
82
- }, import("zod/v4/core").$strip>;
83
- }, import("zod/v4/core").$strip>;
84
- deployments: import("zod").ZodTuple<[import("zod").ZodObject<{
85
- name: import("zod").ZodString;
86
- env: import("zod").ZodString;
87
- variant: import("zod").ZodString;
88
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
89
- name: import("zod").ZodString;
90
- env: import("zod").ZodString;
91
- variant: import("zod").ZodString;
92
- }, import("zod/v4/core").$strip>], null>;
48
+ }, import("zod/v4/core").$strip>> | import("@webiny/project/defineExtension/index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
49
+ tags: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
50
+ }, import("zod/v4/core").$strip>> | import("@webiny/project/defineExtension/index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
51
+ enabled: import("zod").ZodBoolean;
93
52
  }, import("zod/v4/core").$strip>> | import("@webiny/project/defineExtension/index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
94
53
  passphrase: import("zod").ZodString;
95
54
  salt: import("zod").ZodOptional<import("zod").ZodString>;
@@ -101,4 +60,12 @@ export declare const definitions: (import("@webiny/project/defineExtension/index
101
60
  }, import("zod/v4/core").$strip>> | import("@webiny/project/defineExtension/index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
102
61
  pepper: import("zod").ZodOptional<import("zod").ZodString>;
103
62
  cost: import("zod").ZodOptional<import("zod").ZodNumber>;
63
+ }, import("zod/v4/core").$strip>> | import("@webiny/project/defineExtension/index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
64
+ enabled: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
65
+ domainName: import("zod").ZodOptional<import("zod").ZodString>;
66
+ indexPrefix: import("zod").ZodOptional<import("zod").ZodString>;
67
+ sharedIndexes: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
68
+ endpoint: import("zod").ZodOptional<import("zod").ZodString>;
69
+ username: import("zod").ZodOptional<import("zod").ZodString>;
70
+ password: import("zod").ZodOptional<import("zod").ZodString>;
104
71
  }, import("zod/v4/core").$strip>>)[];
@@ -1,4 +1,4 @@
1
- import { AdminCustomDomains, AdminStackOutputValue, ApiCustomDomains, ApiMaxBundleSize, ApiStackOutputValue, AwsTags, BlueGreenDeployments, CoreStackOutputValue, DynamoDbPitr, Encryption, Hashing, PulumiOpenSearch, S3BucketVersioning, Vpc } from "@webiny/project-extensions-aws/extensions/index.js";
1
+ import { AdminCustomDomains, AdminStackOutputValue, ApiCustomDomains, ApiMaxBundleSize, ApiStackOutputValue, ApiWebFunction, AwsTags, BlueGreenDeployments, CoreStackOutputValue, DynamoDbPitr, Encryption, Hashing, PulumiOpenSearch, S3BucketVersioning, Vpc } from "@webiny/project-extensions-aws/extensions/index.js";
2
2
  import { CorePulumi } from "./CorePulumi.js";
3
3
  import { ApiPulumi } from "./ApiPulumi.js";
4
4
  import { AdminPulumi } from "./AdminPulumi.js";
@@ -18,6 +18,7 @@ const definitions = [
18
18
  ApiStackOutputValue.def,
19
19
  CoreStackOutputValue.def,
20
20
  ApiMaxBundleSize.def,
21
+ ApiWebFunction.def,
21
22
  Encryption.def,
22
23
  Hashing.def
23
24
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"pulumi/extensions/index.js","sources":["../../../src/pulumi/extensions/index.ts"],"sourcesContent":["import { AwsTags } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { PulumiOpenSearch as OpenSearch } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { Vpc } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { AdminCustomDomains } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { ApiCustomDomains } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { BlueGreenDeployments } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { DynamoDbPitr } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { S3BucketVersioning } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { CorePulumi } from \"./CorePulumi.js\";\nimport { ApiPulumi } from \"./ApiPulumi.js\";\nimport { AdminPulumi } from \"./AdminPulumi.js\";\nimport { Encryption } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { Hashing } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { AdminStackOutputValue } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { ApiStackOutputValue } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { CoreStackOutputValue } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { ApiMaxBundleSize } from \"@webiny/project-extensions-aws/extensions/index.js\";\n\nexport { AwsTags };\nexport { Vpc };\nexport { OpenSearch };\nexport { AdminCustomDomains };\nexport { ApiCustomDomains };\nexport { BlueGreenDeployments };\nexport { CorePulumi };\nexport { ApiPulumi };\nexport { AdminPulumi };\nexport { DynamoDbPitr };\nexport { S3BucketVersioning };\n\nexport const definitions = [\n AwsTags.def,\n Vpc.def,\n OpenSearch.def,\n AdminCustomDomains.def,\n ApiCustomDomains.def,\n BlueGreenDeployments.def,\n CorePulumi.def,\n ApiPulumi.def,\n AdminPulumi.def,\n DynamoDbPitr.def,\n S3BucketVersioning.def,\n AdminStackOutputValue.def,\n ApiStackOutputValue.def,\n CoreStackOutputValue.def,\n ApiMaxBundleSize.def,\n Encryption.def,\n Hashing.def\n];\n"],"names":["definitions","AwsTags","Vpc","OpenSearch","AdminCustomDomains","ApiCustomDomains","BlueGreenDeployments","CorePulumi","ApiPulumi","AdminPulumi","DynamoDbPitr","S3BucketVersioning","AdminStackOutputValue","ApiStackOutputValue","CoreStackOutputValue","ApiMaxBundleSize","Encryption","Hashing"],"mappings":";;;;AA8BO,MAAMA,cAAc;IACvBC,QAAQ,GAAG;IACXC,IAAI,GAAG;IACPC,iBAAAA,GAAc;IACdC,mBAAmB,GAAG;IACtBC,iBAAiB,GAAG;IACpBC,qBAAqB,GAAG;IACxBC,WAAW,GAAG;IACdC,UAAU,GAAG;IACbC,YAAY,GAAG;IACfC,aAAa,GAAG;IAChBC,mBAAmB,GAAG;IACtBC,sBAAsB,GAAG;IACzBC,oBAAoB,GAAG;IACvBC,qBAAqB,GAAG;IACxBC,iBAAiB,GAAG;IACpBC,WAAW,GAAG;IACdC,QAAQ,GAAG;CACd"}
1
+ {"version":3,"file":"pulumi/extensions/index.js","sources":["../../../src/pulumi/extensions/index.ts"],"sourcesContent":["import { AwsTags } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { PulumiOpenSearch as OpenSearch } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { Vpc } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { AdminCustomDomains } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { ApiCustomDomains } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { BlueGreenDeployments } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { DynamoDbPitr } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { S3BucketVersioning } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { CorePulumi } from \"./CorePulumi.js\";\nimport { ApiPulumi } from \"./ApiPulumi.js\";\nimport { AdminPulumi } from \"./AdminPulumi.js\";\nimport { Encryption } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { Hashing } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { AdminStackOutputValue } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { ApiStackOutputValue } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { CoreStackOutputValue } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { ApiMaxBundleSize } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { ApiWebFunction } from \"@webiny/project-extensions-aws/extensions/index.js\";\n\nexport { AwsTags };\nexport { Vpc };\nexport { OpenSearch };\nexport { AdminCustomDomains };\nexport { ApiCustomDomains };\nexport { BlueGreenDeployments };\nexport { CorePulumi };\nexport { ApiPulumi };\nexport { AdminPulumi };\nexport { DynamoDbPitr };\nexport { S3BucketVersioning };\n\nexport const definitions = [\n AwsTags.def,\n Vpc.def,\n OpenSearch.def,\n AdminCustomDomains.def,\n ApiCustomDomains.def,\n BlueGreenDeployments.def,\n CorePulumi.def,\n ApiPulumi.def,\n AdminPulumi.def,\n DynamoDbPitr.def,\n S3BucketVersioning.def,\n AdminStackOutputValue.def,\n ApiStackOutputValue.def,\n CoreStackOutputValue.def,\n ApiMaxBundleSize.def,\n ApiWebFunction.def,\n Encryption.def,\n Hashing.def\n];\n"],"names":["definitions","AwsTags","Vpc","OpenSearch","AdminCustomDomains","ApiCustomDomains","BlueGreenDeployments","CorePulumi","ApiPulumi","AdminPulumi","DynamoDbPitr","S3BucketVersioning","AdminStackOutputValue","ApiStackOutputValue","CoreStackOutputValue","ApiMaxBundleSize","ApiWebFunction","Encryption","Hashing"],"mappings":";;;;AA+BO,MAAMA,cAAc;IACvBC,QAAQ,GAAG;IACXC,IAAI,GAAG;IACPC,iBAAAA,GAAc;IACdC,mBAAmB,GAAG;IACtBC,iBAAiB,GAAG;IACpBC,qBAAqB,GAAG;IACxBC,WAAW,GAAG;IACdC,UAAU,GAAG;IACbC,YAAY,GAAG;IACfC,aAAa,GAAG;IAChBC,mBAAmB,GAAG;IACtBC,sBAAsB,GAAG;IACzBC,oBAAoB,GAAG;IACvBC,qBAAqB,GAAG;IACxBC,iBAAiB,GAAG;IACpBC,eAAe,GAAG;IAClBC,WAAW,GAAG;IACdC,QAAQ,GAAG;CACd"}
package/pulumi/types.d.ts CHANGED
@@ -37,4 +37,9 @@ export interface IDefaultStackOutput extends GetAppStackOutput.StackOutput {
37
37
  appStorage: string;
38
38
  appDomain?: string;
39
39
  deliveryDomain?: string;
40
+ /**
41
+ * The api app's `schema-setup` function. Set with `<Infra.AuroraPostgres />` only: other apps'
42
+ * deploys invoke it to store their service manifests in the database.
43
+ */
44
+ schemaSetupLambdaArn?: string;
40
45
  }
@@ -22,7 +22,7 @@ function withCommonLambdaEnvVariables(app) {
22
22
  app.decorateProgram(async (program, app)=>{
23
23
  const output = await program({
24
24
  ...app,
25
- setCommonLambdaEnvVariables: setCommonLambdaEnvVariables
25
+ setCommonLambdaEnvVariables
26
26
  });
27
27
  app.addHandler(()=>{
28
28
  sealEnvVariables();
@@ -31,7 +31,7 @@ function withCommonLambdaEnvVariables(app) {
31
31
  });
32
32
  return {
33
33
  ...app,
34
- setCommonLambdaEnvVariables: setCommonLambdaEnvVariables
34
+ setCommonLambdaEnvVariables
35
35
  };
36
36
  }
37
37
  export { getCommonLambdaEnvVariables, sealEnvVariables, withCommonLambdaEnvVariables };
@@ -1 +1 @@
1
- {"version":3,"file":"pulumi/utils/lambdaEnvVariables.js","sources":["../../../src/pulumi/utils/lambdaEnvVariables.ts"],"sourcesContent":["import * as pulumi from \"@pulumi/pulumi\";\nimport type { PulumiApp } from \"@webiny/pulumi\";\nimport { pickApiRuntimeEnvVariables } from \"@webiny/project\";\n\ntype EnvVariables = Record<string, string | pulumi.Output<string>>;\n\nconst variablesRegistry: EnvVariables = {};\n\nif (process.env.DEBUG === \"true\") {\n variablesRegistry.NODE_OPTIONS = \"--enable-source-maps\";\n}\n\nexport let sealEnvVariables: () => void;\n\nconst variablesPromise = new Promise<EnvVariables>(resolve => {\n sealEnvVariables = () => {\n // The api runtime allowlist (WEBINY_/WCP_PROJECT_ENVIRONMENT/OKTA_/AUTH0_ + DEBUG) is shared\n // with the standalone hosting type — see @webiny/project's pickApiRuntimeEnvVariables.\n const baseVariables: EnvVariables = {\n ...pickApiRuntimeEnvVariables(),\n // This flag means that Lambda was deployed using the new Pulumi Apps architecture.\n PULUMI_APPS: \"true\"\n };\n\n resolve(Object.assign({}, baseVariables, variablesRegistry));\n };\n});\n\nexport function getCommonLambdaEnvVariables(): pulumi.Output<EnvVariables> {\n return pulumi.output(variablesPromise);\n}\n\nfunction setCommonLambdaEnvVariables(variables: EnvVariables) {\n Object.assign(variablesRegistry, variables);\n}\n\nexport interface SetCommonLambdaEnvVariables {\n (variables: EnvVariables): void;\n}\n\nexport interface WithCommonLambdaEnvVariables {\n /**\n * Set ENV variables that wil be assigned to all Lambda functions in the current Pulumi app.\n */\n setCommonLambdaEnvVariables: SetCommonLambdaEnvVariables;\n}\n\n/**\n * Augment the given app with `setCommonLambdaEnvVariables` functionality.\n * @param {PulumiApp} app\n */\nexport function withCommonLambdaEnvVariables<T extends PulumiApp>(\n app: T\n): T & WithCommonLambdaEnvVariables {\n app.decorateProgram<{ setCommonLambdaEnvVariables: typeof setCommonLambdaEnvVariables }>(\n async (program, app) => {\n const output = await program({\n ...app,\n setCommonLambdaEnvVariables\n });\n\n // Once the program is executed, we need to seal the variables (this will resolve the pulumi.output promise).\n app.addHandler(() => {\n sealEnvVariables();\n });\n\n return output;\n }\n );\n\n // Augment the original PulumiApp.\n return {\n ...app,\n setCommonLambdaEnvVariables\n };\n}\n"],"names":["variablesRegistry","process","sealEnvVariables","variablesPromise","Promise","resolve","baseVariables","pickApiRuntimeEnvVariables","Object","getCommonLambdaEnvVariables","pulumi","setCommonLambdaEnvVariables","variables","withCommonLambdaEnvVariables","app","program","output"],"mappings":";;AAMA,MAAMA,oBAAkC,CAAC;AAEzC,IAAIC,AAAsB,WAAtBA,QAAQ,GAAG,CAAC,KAAK,EACjBD,kBAAkB,YAAY,GAAG;AAG9B,IAAIE;AAEX,MAAMC,mBAAmB,IAAIC,QAAsBC,CAAAA;IAC/CH,mBAAmB;QAGf,MAAMI,gBAA8B;YAChC,GAAGC,4BAA4B;YAE/B,aAAa;QACjB;QAEAF,QAAQG,OAAO,MAAM,CAAC,CAAC,GAAGF,eAAeN;IAC7C;AACJ;AAEO,SAASS;IACZ,OAAOC,0CAAAA,MAAa,CAACP;AACzB;AAEA,SAASQ,4BAA4BC,SAAuB;IACxDJ,OAAO,MAAM,CAACR,mBAAmBY;AACrC;AAiBO,SAASC,6BACZC,GAAM;IAENA,IAAI,eAAe,CACf,OAAOC,SAASD;QACZ,MAAME,SAAS,MAAMD,QAAQ;YACzB,GAAGD,GAAG;YACNH,6BAAAA;QACJ;QAGAG,IAAI,UAAU,CAAC;YACXZ;QACJ;QAEA,OAAOc;IACX;IAIJ,OAAO;QACH,GAAGF,GAAG;QACNH,6BAAAA;IACJ;AACJ"}
1
+ {"version":3,"file":"pulumi/utils/lambdaEnvVariables.js","sources":["../../../src/pulumi/utils/lambdaEnvVariables.ts"],"sourcesContent":["import * as pulumi from \"@pulumi/pulumi\";\nimport type { PulumiApp } from \"@webiny/pulumi\";\nimport { pickApiRuntimeEnvVariables } from \"@webiny/project\";\n\ntype EnvVariables = Record<string, string | pulumi.Output<string>>;\n\nconst variablesRegistry: EnvVariables = {};\n\nif (process.env.DEBUG === \"true\") {\n variablesRegistry.NODE_OPTIONS = \"--enable-source-maps\";\n}\n\nexport let sealEnvVariables: () => void;\n\nconst variablesPromise = new Promise<EnvVariables>(resolve => {\n sealEnvVariables = () => {\n // The api runtime allowlist (WEBINY_/WCP_PROJECT_ENVIRONMENT/OKTA_/AUTH0_ + DEBUG) is shared\n // with the standalone hosting type — see @webiny/project's pickApiRuntimeEnvVariables.\n const baseVariables: EnvVariables = {\n ...pickApiRuntimeEnvVariables(),\n // This flag means that Lambda was deployed using the new Pulumi Apps architecture.\n PULUMI_APPS: \"true\"\n };\n\n resolve(Object.assign({}, baseVariables, variablesRegistry));\n };\n});\n\nexport function getCommonLambdaEnvVariables(): pulumi.Output<EnvVariables> {\n return pulumi.output(variablesPromise);\n}\n\nfunction setCommonLambdaEnvVariables(variables: EnvVariables) {\n Object.assign(variablesRegistry, variables);\n}\n\nexport interface SetCommonLambdaEnvVariables {\n (variables: EnvVariables): void;\n}\n\nexport interface WithCommonLambdaEnvVariables {\n /**\n * Set ENV variables that wil be assigned to all Lambda functions in the current Pulumi app.\n */\n setCommonLambdaEnvVariables: SetCommonLambdaEnvVariables;\n}\n\n/**\n * Augment the given app with `setCommonLambdaEnvVariables` functionality.\n * @param {PulumiApp} app\n */\nexport function withCommonLambdaEnvVariables<T extends PulumiApp>(\n app: T\n): T & WithCommonLambdaEnvVariables {\n app.decorateProgram<{ setCommonLambdaEnvVariables: typeof setCommonLambdaEnvVariables }>(\n async (program, app) => {\n const output = await program({\n ...app,\n setCommonLambdaEnvVariables\n });\n\n // Once the program is executed, we need to seal the variables (this will resolve the pulumi.output promise).\n app.addHandler(() => {\n sealEnvVariables();\n });\n\n return output;\n }\n );\n\n // Augment the original PulumiApp.\n return {\n ...app,\n setCommonLambdaEnvVariables\n };\n}\n"],"names":["variablesRegistry","process","sealEnvVariables","variablesPromise","Promise","resolve","baseVariables","pickApiRuntimeEnvVariables","Object","getCommonLambdaEnvVariables","pulumi","setCommonLambdaEnvVariables","variables","withCommonLambdaEnvVariables","app","program","output"],"mappings":";;AAMA,MAAMA,oBAAkC,CAAC;AAEzC,IAAIC,AAAsB,WAAtBA,QAAQ,GAAG,CAAC,KAAK,EACjBD,kBAAkB,YAAY,GAAG;AAG9B,IAAIE;AAEX,MAAMC,mBAAmB,IAAIC,QAAsBC,CAAAA;IAC/CH,mBAAmB;QAGf,MAAMI,gBAA8B;YAChC,GAAGC,4BAA4B;YAE/B,aAAa;QACjB;QAEAF,QAAQG,OAAO,MAAM,CAAC,CAAC,GAAGF,eAAeN;IAC7C;AACJ;AAEO,SAASS;IACZ,OAAOC,0CAAAA,MAAa,CAACP;AACzB;AAEA,SAASQ,4BAA4BC,SAAuB;IACxDJ,OAAO,MAAM,CAACR,mBAAmBY;AACrC;AAiBO,SAASC,6BACZC,GAAM;IAENA,IAAI,eAAe,CACf,OAAOC,SAASD;QACZ,MAAME,SAAS,MAAMD,QAAQ;YACzB,GAAGD,GAAG;YACNH;QACJ;QAGAG,IAAI,UAAU,CAAC;YACXZ;QACJ;QAEA,OAAOc;IACX;IAIJ,OAAO;QACH,GAAGF,GAAG;QACNH;IACJ;AACJ"}
@@ -169,6 +169,7 @@ const taggableResourceTypes = new Set([
169
169
  "aws:kms/key:Key",
170
170
  "aws:lambda/function:Function",
171
171
  "aws:lambda/eventSourceMapping:EventSourceMapping",
172
+ "aws:lambdaweb/function:Function",
172
173
  "aws:lb/loadBalancer:LoadBalancer",
173
174
  "aws:lb/targetGroup:TargetGroup",
174
175
  "aws:licensemanager/licenseConfiguration:LicenseConfiguration",
@@ -199,6 +200,7 @@ const taggableResourceTypes = new Set([
199
200
  "aws:rds/instance:Instance",
200
201
  "aws:rds/optionGroup:OptionGroup",
201
202
  "aws:rds/parameterGroup:ParameterGroup",
203
+ "aws:rds/proxy:Proxy",
202
204
  "aws:rds/securityGroup:SecurityGroup",
203
205
  "aws:rds/snapshot:Snapshot",
204
206
  "aws:rds/subnetGroup:SubnetGroup",
@@ -1 +1 @@
1
- {"version":3,"file":"pulumi/utils/tagResources.js","sources":["../../../src/pulumi/utils/tagResources.ts"],"sourcesContent":["import * as pulumi from \"@pulumi/pulumi\";\n\n/**\n * Registers a global stack transformation that merges a set\n * of tags with whatever was explicitly set in the resource definition.\n */\nexport function tagResources(tags: Record<string, string>) {\n pulumi.runtime.registerStackTransformation(args => {\n if (isTaggable(args.type)) {\n args.props[\"tags\"] = { ...args.props[\"tags\"], ...tags };\n return { props: args.props, opts: args.opts };\n }\n return undefined;\n });\n}\n\n/**\n * Returns true if the given resource type is an AWS resource that supports tags.\n */\nfunction isTaggable(resourceType: string) {\n return taggableResourceTypes.has(resourceType);\n}\n\n// A list of known AWS type tokens that are taggable.\nconst taggableResourceTypes = new Set([\n \"aws:accessanalyzer/analyzer:Analyzer\",\n \"aws:acm/certificate:Certificate\",\n \"aws:acmpca/certificateAuthority:CertificateAuthority\",\n \"aws:alb/loadBalancer:LoadBalancer\",\n \"aws:alb/targetGroup:TargetGroup\",\n \"aws:apigateway/apiKey:ApiKey\",\n \"aws:apigateway/clientCertificate:ClientCertificate\",\n \"aws:apigateway/domainName:DomainName\",\n \"aws:apigateway/restApi:RestApi\",\n \"aws:apigateway/stage:Stage\",\n \"aws:apigateway/usagePlan:UsagePlan\",\n \"aws:apigateway/vpcLink:VpcLink\",\n \"aws:apigatewayv2/api:Api\",\n \"aws:apigatewayv2/stage:Stage\",\n \"aws:applicationloadbalancing/loadBalancer:LoadBalancer\",\n \"aws:applicationloadbalancing/targetGroup:TargetGroup\",\n \"aws:appmesh/mesh:Mesh\",\n \"aws:appmesh/route:Route\",\n \"aws:appmesh/virtualNode:VirtualNode\",\n \"aws:appmesh/virtualRouter:VirtualRouter\",\n \"aws:appmesh/virtualService:VirtualService\",\n \"aws:appsync/graphQLApi:GraphQLApi\",\n \"aws:athena/workgroup:Workgroup\",\n \"aws:autoscaling/group:Group\",\n \"aws:backup/plan:Plan\",\n \"aws:backup/vault:Vault\",\n \"aws:cfg/aggregateAuthorization:AggregateAuthorization\",\n \"aws:cfg/configurationAggregator:ConfigurationAggregator\",\n \"aws:cfg/rule:Rule\",\n \"aws:cloudformation/stack:Stack\",\n \"aws:cloudformation/stackSet:StackSet\",\n \"aws:cloudfront/distribution:Distribution\",\n \"aws:cloudhsmv2/cluster:Cluster\",\n \"aws:cloudtrail/trail:Trail\",\n \"aws:cloudwatch/eventRule:EventRule\",\n \"aws:cloudwatch/logGroup:LogGroup\",\n \"aws:cloudwatch/metricAlarm:MetricAlarm\",\n \"aws:codebuild/project:Project\",\n \"aws:codecommit/repository:Repository\",\n \"aws:codepipeline/pipeline:Pipeline\",\n \"aws:codepipeline/webhook:Webhook\",\n \"aws:codestarnotifications/notificationRule:NotificationRule\",\n \"aws:cognito/identityPool:IdentityPool\",\n \"aws:cognito/userPool:UserPool\",\n \"aws:datapipeline/pipeline:Pipeline\",\n \"aws:datasync/agent:Agent\",\n \"aws:datasync/efsLocation:EfsLocation\",\n \"aws:datasync/locationSmb:LocationSmb\",\n \"aws:datasync/nfsLocation:NfsLocation\",\n \"aws:datasync/s3Location:S3Location\",\n \"aws:datasync/task:Task\",\n \"aws:dax/cluster:Cluster\",\n \"aws:directconnect/connection:Connection\",\n \"aws:directconnect/hostedPrivateVirtualInterfaceAccepter:HostedPrivateVirtualInterfaceAccepter\",\n \"aws:directconnect/hostedPublicVirtualInterfaceAccepter:HostedPublicVirtualInterfaceAccepter\",\n \"aws:directconnect/hostedTransitVirtualInterfaceAcceptor:HostedTransitVirtualInterfaceAcceptor\",\n \"aws:directconnect/linkAggregationGroup:LinkAggregationGroup\",\n \"aws:directconnect/privateVirtualInterface:PrivateVirtualInterface\",\n \"aws:directconnect/publicVirtualInterface:PublicVirtualInterface\",\n \"aws:directconnect/transitVirtualInterface:TransitVirtualInterface\",\n \"aws:directoryservice/directory:Directory\",\n \"aws:dlm/lifecyclePolicy:LifecyclePolicy\",\n \"aws:dms/endpoint:Endpoint\",\n \"aws:dms/replicationInstance:ReplicationInstance\",\n \"aws:dms/replicationSubnetGroup:ReplicationSubnetGroup\",\n \"aws:dms/replicationTask:ReplicationTask\",\n \"aws:docdb/cluster:Cluster\",\n \"aws:docdb/clusterInstance:ClusterInstance\",\n \"aws:docdb/clusterParameterGroup:ClusterParameterGroup\",\n \"aws:docdb/subnetGroup:SubnetGroup\",\n \"aws:dynamodb/table:Table\",\n \"aws:ebs/snapshot:Snapshot\",\n \"aws:ebs/snapshotCopy:SnapshotCopy\",\n \"aws:ebs/volume:Volume\",\n \"aws:ec2/ami:Ami\",\n \"aws:ec2/amiCopy:AmiCopy\",\n \"aws:ec2/amiFromInstance:AmiFromInstance\",\n \"aws:ec2/capacityReservation:CapacityReservation\",\n \"aws:ec2/customerGateway:CustomerGateway\",\n \"aws:ec2/defaultNetworkAcl:DefaultNetworkAcl\",\n \"aws:ec2/defaultRouteTable:DefaultRouteTable\",\n \"aws:ec2/defaultSecurityGroup:DefaultSecurityGroup\",\n \"aws:ec2/defaultSubnet:DefaultSubnet\",\n \"aws:ec2/defaultVpc:DefaultVpc\",\n \"aws:ec2/defaultVpcDhcpOptions:DefaultVpcDhcpOptions\",\n \"aws:ec2/eip:Eip\",\n \"aws:ec2/fleet:Fleet\",\n \"aws:ec2/instance:Instance\",\n \"aws:ec2/internetGateway:InternetGateway\",\n \"aws:ec2/keyPair:KeyPair\",\n \"aws:ec2/launchTemplate:LaunchTemplate\",\n \"aws:ec2/natGateway:NatGateway\",\n \"aws:ec2/networkAcl:NetworkAcl\",\n \"aws:ec2/networkInterface:NetworkInterface\",\n \"aws:ec2/placementGroup:PlacementGroup\",\n \"aws:ec2/routeTable:RouteTable\",\n \"aws:ec2/securityGroup:SecurityGroup\",\n \"aws:ec2/spotInstanceRequest:SpotInstanceRequest\",\n \"aws:ec2/subnet:Subnet\",\n \"aws:ec2/vpc:Vpc\",\n \"aws:ec2/vpcDhcpOptions:VpcDhcpOptions\",\n \"aws:ec2/vpcEndpoint:VpcEndpoint\",\n \"aws:ec2/vpcEndpointService:VpcEndpointService\",\n \"aws:ec2/vpcPeeringConnection:VpcPeeringConnection\",\n \"aws:ec2/vpcPeeringConnectionAccepter:VpcPeeringConnectionAccepter\",\n \"aws:ec2/vpnConnection:VpnConnection\",\n \"aws:ec2/vpnGateway:VpnGateway\",\n \"aws:ec2clientvpn/endpoint:Endpoint\",\n \"aws:ec2transitgateway/routeTable:RouteTable\",\n \"aws:ec2transitgateway/transitGateway:TransitGateway\",\n \"aws:ec2transitgateway/vpcAttachment:VpcAttachment\",\n \"aws:ec2transitgateway/vpcAttachmentAccepter:VpcAttachmentAccepter\",\n \"aws:ecr/repository:Repository\",\n \"aws:ecs/capacityProvider:CapacityProvider\",\n \"aws:ecs/cluster:Cluster\",\n \"aws:ecs/service:Service\",\n \"aws:ecs/taskDefinition:TaskDefinition\",\n \"aws:efs/fileSystem:FileSystem\",\n \"aws:eks/cluster:Cluster\",\n \"aws:eks/fargateProfile:FargateProfile\",\n \"aws:eks/nodeGroup:NodeGroup\",\n \"aws:elasticache/cluster:Cluster\",\n \"aws:elasticache/replicationGroup:ReplicationGroup\",\n \"aws:elasticbeanstalk/application:Application\",\n \"aws:elasticbeanstalk/applicationVersion:ApplicationVersion\",\n \"aws:elasticbeanstalk/environment:Environment\",\n \"aws:elasticloadbalancing/loadBalancer:LoadBalancer\",\n \"aws:elasticloadbalancingv2/loadBalancer:LoadBalancer\",\n \"aws:elasticloadbalancingv2/targetGroup:TargetGroup\",\n \"aws:elasticsearch/domain:Domain\",\n \"aws:elb/loadBalancer:LoadBalancer\",\n \"aws:emr/cluster:Cluster\",\n \"aws:fsx/lustreFileSystem:LustreFileSystem\",\n \"aws:fsx/windowsFileSystem:WindowsFileSystem\",\n \"aws:gamelift/alias:Alias\",\n \"aws:gamelift/build:Build\",\n \"aws:gamelift/fleet:Fleet\",\n \"aws:gamelift/gameSessionQueue:GameSessionQueue\",\n \"aws:glacier/vault:Vault\",\n \"aws:glue/crawler:Crawler\",\n \"aws:glue/job:Job\",\n \"aws:glue/trigger:Trigger\",\n \"aws:iam/role:Role\",\n \"aws:iam/user:User\",\n \"aws:inspector/resourceGroup:ResourceGroup\",\n \"aws:kinesis/analyticsApplication:AnalyticsApplication\",\n \"aws:kinesis/firehoseDeliveryStream:FirehoseDeliveryStream\",\n \"aws:kinesis/stream:Stream\",\n \"aws:kms/externalKey:ExternalKey\",\n \"aws:kms/key:Key\",\n \"aws:lambda/function:Function\",\n \"aws:lambda/eventSourceMapping:EventSourceMapping\",\n \"aws:lb/loadBalancer:LoadBalancer\",\n \"aws:lb/targetGroup:TargetGroup\",\n \"aws:licensemanager/licenseConfiguration:LicenseConfiguration\",\n \"aws:lightsail/instance:Instance\",\n \"aws:mediaconvert/queue:Queue\",\n \"aws:mediapackage/channel:Channel\",\n \"aws:mediastore/container:Container\",\n \"aws:mq/broker:Broker\",\n \"aws:mq/configuration:Configuration\",\n \"aws:msk/cluster:Cluster\",\n \"aws:neptune/cluster:Cluster\",\n \"aws:neptune/clusterInstance:ClusterInstance\",\n \"aws:neptune/clusterParameterGroup:ClusterParameterGroup\",\n \"aws:neptune/eventSubscription:EventSubscription\",\n \"aws:neptune/parameterGroup:ParameterGroup\",\n \"aws:neptune/subnetGroup:SubnetGroup\",\n \"aws:opsworks/stack:Stack\",\n \"aws:organizations/account:Account\",\n \"aws:pinpoint/app:App\",\n \"aws:qldb/ledger:Ledger\",\n \"aws:ram/resourceShare:ResourceShare\",\n \"aws:rds/cluster:Cluster\",\n \"aws:rds/clusterEndpoint:ClusterEndpoint\",\n \"aws:rds/clusterInstance:ClusterInstance\",\n \"aws:rds/clusterParameterGroup:ClusterParameterGroup\",\n \"aws:rds/clusterSnapshot:ClusterSnapshot\",\n \"aws:rds/eventSubscription:EventSubscription\",\n \"aws:rds/instance:Instance\",\n \"aws:rds/optionGroup:OptionGroup\",\n \"aws:rds/parameterGroup:ParameterGroup\",\n \"aws:rds/securityGroup:SecurityGroup\",\n \"aws:rds/snapshot:Snapshot\",\n \"aws:rds/subnetGroup:SubnetGroup\",\n \"aws:redshift/cluster:Cluster\",\n \"aws:redshift/eventSubscription:EventSubscription\",\n \"aws:redshift/parameterGroup:ParameterGroup\",\n \"aws:redshift/snapshotCopyGrant:SnapshotCopyGrant\",\n \"aws:redshift/snapshotSchedule:SnapshotSchedule\",\n \"aws:redshift/subnetGroup:SubnetGroup\",\n \"aws:resourcegroups/group:Group\",\n \"aws:route53/healthCheck:HealthCheck\",\n \"aws:route53/resolverEndpoint:ResolverEndpoint\",\n \"aws:route53/resolverRule:ResolverRule\",\n \"aws:route53/zone:Zone\",\n \"aws:s3/bucket:Bucket\",\n \"aws:s3/bucketObject:BucketObject\",\n \"aws:sagemaker/endpoint:Endpoint\",\n \"aws:sagemaker/endpointConfiguration:EndpointConfiguration\",\n \"aws:sagemaker/model:Model\",\n \"aws:sagemaker/notebookInstance:NotebookInstance\",\n \"aws:secretsmanager/secret:Secret\",\n \"aws:servicecatalog/portfolio:Portfolio\",\n \"aws:sfn/activity:Activity\",\n \"aws:sfn/stateMachine:StateMachine\",\n \"aws:sns/topic:Topic\",\n \"aws:sqs/queue:Queue\",\n \"aws:ssm/activation:Activation\",\n \"aws:ssm/document:Document\",\n \"aws:ssm/maintenanceWindow:MaintenanceWindow\",\n \"aws:ssm/parameter:Parameter\",\n \"aws:ssm/patchBaseline:PatchBaseline\",\n \"aws:storagegateway/cachesIscsiVolume:CachesIscsiVolume\",\n \"aws:storagegateway/gateway:Gateway\",\n \"aws:storagegateway/nfsFileShare:NfsFileShare\",\n \"aws:storagegateway/smbFileShare:SmbFileShare\",\n \"aws:swf/domain:Domain\",\n \"aws:transfer/server:Server\",\n \"aws:transfer/user:User\",\n \"aws:waf/rateBasedRule:RateBasedRule\",\n \"aws:waf/rule:Rule\",\n \"aws:waf/ruleGroup:RuleGroup\",\n \"aws:waf/webAcl:WebAcl\",\n \"aws:wafregional/rateBasedRule:RateBasedRule\",\n \"aws:wafregional/rule:Rule\",\n \"aws:wafregional/ruleGroup:RuleGroup\",\n \"aws:wafregional/webAcl:WebAcl\",\n \"aws:workspaces/directory:Directory\",\n \"aws:workspaces/ipGroup:IpGroup\"\n]);\n"],"names":["tagResources","tags","pulumi","args","isTaggable","resourceType","taggableResourceTypes","Set"],"mappings":";AAMO,SAASA,aAAaC,IAA4B;IACrDC,0CAAAA,OAAAA,CAAAA,2BAA0C,CAACC,CAAAA;QACvC,IAAIC,WAAWD,KAAK,IAAI,GAAG;YACvBA,KAAK,KAAK,CAAC,OAAO,GAAG;gBAAE,GAAGA,KAAK,KAAK,CAAC,OAAO;gBAAE,GAAGF,IAAI;YAAC;YACtD,OAAO;gBAAE,OAAOE,KAAK,KAAK;gBAAE,MAAMA,KAAK,IAAI;YAAC;QAChD;IAEJ;AACJ;AAKA,SAASC,WAAWC,YAAoB;IACpC,OAAOC,sBAAsB,GAAG,CAACD;AACrC;AAGA,MAAMC,wBAAwB,IAAIC,IAAI;IAClC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACH"}
1
+ {"version":3,"file":"pulumi/utils/tagResources.js","sources":["../../../src/pulumi/utils/tagResources.ts"],"sourcesContent":["import * as pulumi from \"@pulumi/pulumi\";\n\n/**\n * Registers a global stack transformation that merges a set\n * of tags with whatever was explicitly set in the resource definition.\n */\nexport function tagResources(tags: Record<string, string>) {\n pulumi.runtime.registerStackTransformation(args => {\n if (isTaggable(args.type)) {\n args.props[\"tags\"] = { ...args.props[\"tags\"], ...tags };\n return { props: args.props, opts: args.opts };\n }\n return undefined;\n });\n}\n\n/**\n * Returns true if the given resource type is an AWS resource that supports tags.\n */\nfunction isTaggable(resourceType: string) {\n return taggableResourceTypes.has(resourceType);\n}\n\n// A list of known AWS type tokens that are taggable.\nconst taggableResourceTypes = new Set([\n \"aws:accessanalyzer/analyzer:Analyzer\",\n \"aws:acm/certificate:Certificate\",\n \"aws:acmpca/certificateAuthority:CertificateAuthority\",\n \"aws:alb/loadBalancer:LoadBalancer\",\n \"aws:alb/targetGroup:TargetGroup\",\n \"aws:apigateway/apiKey:ApiKey\",\n \"aws:apigateway/clientCertificate:ClientCertificate\",\n \"aws:apigateway/domainName:DomainName\",\n \"aws:apigateway/restApi:RestApi\",\n \"aws:apigateway/stage:Stage\",\n \"aws:apigateway/usagePlan:UsagePlan\",\n \"aws:apigateway/vpcLink:VpcLink\",\n \"aws:apigatewayv2/api:Api\",\n \"aws:apigatewayv2/stage:Stage\",\n \"aws:applicationloadbalancing/loadBalancer:LoadBalancer\",\n \"aws:applicationloadbalancing/targetGroup:TargetGroup\",\n \"aws:appmesh/mesh:Mesh\",\n \"aws:appmesh/route:Route\",\n \"aws:appmesh/virtualNode:VirtualNode\",\n \"aws:appmesh/virtualRouter:VirtualRouter\",\n \"aws:appmesh/virtualService:VirtualService\",\n \"aws:appsync/graphQLApi:GraphQLApi\",\n \"aws:athena/workgroup:Workgroup\",\n \"aws:autoscaling/group:Group\",\n \"aws:backup/plan:Plan\",\n \"aws:backup/vault:Vault\",\n \"aws:cfg/aggregateAuthorization:AggregateAuthorization\",\n \"aws:cfg/configurationAggregator:ConfigurationAggregator\",\n \"aws:cfg/rule:Rule\",\n \"aws:cloudformation/stack:Stack\",\n \"aws:cloudformation/stackSet:StackSet\",\n \"aws:cloudfront/distribution:Distribution\",\n \"aws:cloudhsmv2/cluster:Cluster\",\n \"aws:cloudtrail/trail:Trail\",\n \"aws:cloudwatch/eventRule:EventRule\",\n \"aws:cloudwatch/logGroup:LogGroup\",\n \"aws:cloudwatch/metricAlarm:MetricAlarm\",\n \"aws:codebuild/project:Project\",\n \"aws:codecommit/repository:Repository\",\n \"aws:codepipeline/pipeline:Pipeline\",\n \"aws:codepipeline/webhook:Webhook\",\n \"aws:codestarnotifications/notificationRule:NotificationRule\",\n \"aws:cognito/identityPool:IdentityPool\",\n \"aws:cognito/userPool:UserPool\",\n \"aws:datapipeline/pipeline:Pipeline\",\n \"aws:datasync/agent:Agent\",\n \"aws:datasync/efsLocation:EfsLocation\",\n \"aws:datasync/locationSmb:LocationSmb\",\n \"aws:datasync/nfsLocation:NfsLocation\",\n \"aws:datasync/s3Location:S3Location\",\n \"aws:datasync/task:Task\",\n \"aws:dax/cluster:Cluster\",\n \"aws:directconnect/connection:Connection\",\n \"aws:directconnect/hostedPrivateVirtualInterfaceAccepter:HostedPrivateVirtualInterfaceAccepter\",\n \"aws:directconnect/hostedPublicVirtualInterfaceAccepter:HostedPublicVirtualInterfaceAccepter\",\n \"aws:directconnect/hostedTransitVirtualInterfaceAcceptor:HostedTransitVirtualInterfaceAcceptor\",\n \"aws:directconnect/linkAggregationGroup:LinkAggregationGroup\",\n \"aws:directconnect/privateVirtualInterface:PrivateVirtualInterface\",\n \"aws:directconnect/publicVirtualInterface:PublicVirtualInterface\",\n \"aws:directconnect/transitVirtualInterface:TransitVirtualInterface\",\n \"aws:directoryservice/directory:Directory\",\n \"aws:dlm/lifecyclePolicy:LifecyclePolicy\",\n \"aws:dms/endpoint:Endpoint\",\n \"aws:dms/replicationInstance:ReplicationInstance\",\n \"aws:dms/replicationSubnetGroup:ReplicationSubnetGroup\",\n \"aws:dms/replicationTask:ReplicationTask\",\n \"aws:docdb/cluster:Cluster\",\n \"aws:docdb/clusterInstance:ClusterInstance\",\n \"aws:docdb/clusterParameterGroup:ClusterParameterGroup\",\n \"aws:docdb/subnetGroup:SubnetGroup\",\n \"aws:dynamodb/table:Table\",\n \"aws:ebs/snapshot:Snapshot\",\n \"aws:ebs/snapshotCopy:SnapshotCopy\",\n \"aws:ebs/volume:Volume\",\n \"aws:ec2/ami:Ami\",\n \"aws:ec2/amiCopy:AmiCopy\",\n \"aws:ec2/amiFromInstance:AmiFromInstance\",\n \"aws:ec2/capacityReservation:CapacityReservation\",\n \"aws:ec2/customerGateway:CustomerGateway\",\n \"aws:ec2/defaultNetworkAcl:DefaultNetworkAcl\",\n \"aws:ec2/defaultRouteTable:DefaultRouteTable\",\n \"aws:ec2/defaultSecurityGroup:DefaultSecurityGroup\",\n \"aws:ec2/defaultSubnet:DefaultSubnet\",\n \"aws:ec2/defaultVpc:DefaultVpc\",\n \"aws:ec2/defaultVpcDhcpOptions:DefaultVpcDhcpOptions\",\n \"aws:ec2/eip:Eip\",\n \"aws:ec2/fleet:Fleet\",\n \"aws:ec2/instance:Instance\",\n \"aws:ec2/internetGateway:InternetGateway\",\n \"aws:ec2/keyPair:KeyPair\",\n \"aws:ec2/launchTemplate:LaunchTemplate\",\n \"aws:ec2/natGateway:NatGateway\",\n \"aws:ec2/networkAcl:NetworkAcl\",\n \"aws:ec2/networkInterface:NetworkInterface\",\n \"aws:ec2/placementGroup:PlacementGroup\",\n \"aws:ec2/routeTable:RouteTable\",\n \"aws:ec2/securityGroup:SecurityGroup\",\n \"aws:ec2/spotInstanceRequest:SpotInstanceRequest\",\n \"aws:ec2/subnet:Subnet\",\n \"aws:ec2/vpc:Vpc\",\n \"aws:ec2/vpcDhcpOptions:VpcDhcpOptions\",\n \"aws:ec2/vpcEndpoint:VpcEndpoint\",\n \"aws:ec2/vpcEndpointService:VpcEndpointService\",\n \"aws:ec2/vpcPeeringConnection:VpcPeeringConnection\",\n \"aws:ec2/vpcPeeringConnectionAccepter:VpcPeeringConnectionAccepter\",\n \"aws:ec2/vpnConnection:VpnConnection\",\n \"aws:ec2/vpnGateway:VpnGateway\",\n \"aws:ec2clientvpn/endpoint:Endpoint\",\n \"aws:ec2transitgateway/routeTable:RouteTable\",\n \"aws:ec2transitgateway/transitGateway:TransitGateway\",\n \"aws:ec2transitgateway/vpcAttachment:VpcAttachment\",\n \"aws:ec2transitgateway/vpcAttachmentAccepter:VpcAttachmentAccepter\",\n \"aws:ecr/repository:Repository\",\n \"aws:ecs/capacityProvider:CapacityProvider\",\n \"aws:ecs/cluster:Cluster\",\n \"aws:ecs/service:Service\",\n \"aws:ecs/taskDefinition:TaskDefinition\",\n \"aws:efs/fileSystem:FileSystem\",\n \"aws:eks/cluster:Cluster\",\n \"aws:eks/fargateProfile:FargateProfile\",\n \"aws:eks/nodeGroup:NodeGroup\",\n \"aws:elasticache/cluster:Cluster\",\n \"aws:elasticache/replicationGroup:ReplicationGroup\",\n \"aws:elasticbeanstalk/application:Application\",\n \"aws:elasticbeanstalk/applicationVersion:ApplicationVersion\",\n \"aws:elasticbeanstalk/environment:Environment\",\n \"aws:elasticloadbalancing/loadBalancer:LoadBalancer\",\n \"aws:elasticloadbalancingv2/loadBalancer:LoadBalancer\",\n \"aws:elasticloadbalancingv2/targetGroup:TargetGroup\",\n \"aws:elasticsearch/domain:Domain\",\n \"aws:elb/loadBalancer:LoadBalancer\",\n \"aws:emr/cluster:Cluster\",\n \"aws:fsx/lustreFileSystem:LustreFileSystem\",\n \"aws:fsx/windowsFileSystem:WindowsFileSystem\",\n \"aws:gamelift/alias:Alias\",\n \"aws:gamelift/build:Build\",\n \"aws:gamelift/fleet:Fleet\",\n \"aws:gamelift/gameSessionQueue:GameSessionQueue\",\n \"aws:glacier/vault:Vault\",\n \"aws:glue/crawler:Crawler\",\n \"aws:glue/job:Job\",\n \"aws:glue/trigger:Trigger\",\n \"aws:iam/role:Role\",\n \"aws:iam/user:User\",\n \"aws:inspector/resourceGroup:ResourceGroup\",\n \"aws:kinesis/analyticsApplication:AnalyticsApplication\",\n \"aws:kinesis/firehoseDeliveryStream:FirehoseDeliveryStream\",\n \"aws:kinesis/stream:Stream\",\n \"aws:kms/externalKey:ExternalKey\",\n \"aws:kms/key:Key\",\n \"aws:lambda/function:Function\",\n \"aws:lambda/eventSourceMapping:EventSourceMapping\",\n \"aws:lambdaweb/function:Function\",\n \"aws:lb/loadBalancer:LoadBalancer\",\n \"aws:lb/targetGroup:TargetGroup\",\n \"aws:licensemanager/licenseConfiguration:LicenseConfiguration\",\n \"aws:lightsail/instance:Instance\",\n \"aws:mediaconvert/queue:Queue\",\n \"aws:mediapackage/channel:Channel\",\n \"aws:mediastore/container:Container\",\n \"aws:mq/broker:Broker\",\n \"aws:mq/configuration:Configuration\",\n \"aws:msk/cluster:Cluster\",\n \"aws:neptune/cluster:Cluster\",\n \"aws:neptune/clusterInstance:ClusterInstance\",\n \"aws:neptune/clusterParameterGroup:ClusterParameterGroup\",\n \"aws:neptune/eventSubscription:EventSubscription\",\n \"aws:neptune/parameterGroup:ParameterGroup\",\n \"aws:neptune/subnetGroup:SubnetGroup\",\n \"aws:opsworks/stack:Stack\",\n \"aws:organizations/account:Account\",\n \"aws:pinpoint/app:App\",\n \"aws:qldb/ledger:Ledger\",\n \"aws:ram/resourceShare:ResourceShare\",\n \"aws:rds/cluster:Cluster\",\n \"aws:rds/clusterEndpoint:ClusterEndpoint\",\n \"aws:rds/clusterInstance:ClusterInstance\",\n \"aws:rds/clusterParameterGroup:ClusterParameterGroup\",\n \"aws:rds/clusterSnapshot:ClusterSnapshot\",\n \"aws:rds/eventSubscription:EventSubscription\",\n \"aws:rds/instance:Instance\",\n \"aws:rds/optionGroup:OptionGroup\",\n \"aws:rds/parameterGroup:ParameterGroup\",\n \"aws:rds/proxy:Proxy\",\n \"aws:rds/securityGroup:SecurityGroup\",\n \"aws:rds/snapshot:Snapshot\",\n \"aws:rds/subnetGroup:SubnetGroup\",\n \"aws:redshift/cluster:Cluster\",\n \"aws:redshift/eventSubscription:EventSubscription\",\n \"aws:redshift/parameterGroup:ParameterGroup\",\n \"aws:redshift/snapshotCopyGrant:SnapshotCopyGrant\",\n \"aws:redshift/snapshotSchedule:SnapshotSchedule\",\n \"aws:redshift/subnetGroup:SubnetGroup\",\n \"aws:resourcegroups/group:Group\",\n \"aws:route53/healthCheck:HealthCheck\",\n \"aws:route53/resolverEndpoint:ResolverEndpoint\",\n \"aws:route53/resolverRule:ResolverRule\",\n \"aws:route53/zone:Zone\",\n \"aws:s3/bucket:Bucket\",\n \"aws:s3/bucketObject:BucketObject\",\n \"aws:sagemaker/endpoint:Endpoint\",\n \"aws:sagemaker/endpointConfiguration:EndpointConfiguration\",\n \"aws:sagemaker/model:Model\",\n \"aws:sagemaker/notebookInstance:NotebookInstance\",\n \"aws:secretsmanager/secret:Secret\",\n \"aws:servicecatalog/portfolio:Portfolio\",\n \"aws:sfn/activity:Activity\",\n \"aws:sfn/stateMachine:StateMachine\",\n \"aws:sns/topic:Topic\",\n \"aws:sqs/queue:Queue\",\n \"aws:ssm/activation:Activation\",\n \"aws:ssm/document:Document\",\n \"aws:ssm/maintenanceWindow:MaintenanceWindow\",\n \"aws:ssm/parameter:Parameter\",\n \"aws:ssm/patchBaseline:PatchBaseline\",\n \"aws:storagegateway/cachesIscsiVolume:CachesIscsiVolume\",\n \"aws:storagegateway/gateway:Gateway\",\n \"aws:storagegateway/nfsFileShare:NfsFileShare\",\n \"aws:storagegateway/smbFileShare:SmbFileShare\",\n \"aws:swf/domain:Domain\",\n \"aws:transfer/server:Server\",\n \"aws:transfer/user:User\",\n \"aws:waf/rateBasedRule:RateBasedRule\",\n \"aws:waf/rule:Rule\",\n \"aws:waf/ruleGroup:RuleGroup\",\n \"aws:waf/webAcl:WebAcl\",\n \"aws:wafregional/rateBasedRule:RateBasedRule\",\n \"aws:wafregional/rule:Rule\",\n \"aws:wafregional/ruleGroup:RuleGroup\",\n \"aws:wafregional/webAcl:WebAcl\",\n \"aws:workspaces/directory:Directory\",\n \"aws:workspaces/ipGroup:IpGroup\"\n]);\n"],"names":["tagResources","tags","pulumi","args","isTaggable","resourceType","taggableResourceTypes","Set"],"mappings":";AAMO,SAASA,aAAaC,IAA4B;IACrDC,0CAAAA,OAAAA,CAAAA,2BAA0C,CAACC,CAAAA;QACvC,IAAIC,WAAWD,KAAK,IAAI,GAAG;YACvBA,KAAK,KAAK,CAAC,OAAO,GAAG;gBAAE,GAAGA,KAAK,KAAK,CAAC,OAAO;gBAAE,GAAGF,IAAI;YAAC;YACtD,OAAO;gBAAE,OAAOE,KAAK,KAAK;gBAAE,MAAMA,KAAK,IAAI;YAAC;QAChD;IAEJ;AACJ;AAKA,SAASC,WAAWC,YAAoB;IACpC,OAAOC,sBAAsB,GAAG,CAACD;AACrC;AAGA,MAAMC,wBAAwB,IAAIC,IAAI;IAClC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACH"}
@@ -1,13 +1,47 @@
1
+ import * as pulumi from "@pulumi/pulumi";
1
2
  import type { PulumiApp } from "@webiny/pulumi";
2
3
  import type { ServiceManifest } from "./addServiceManifestTableItem.js";
3
4
  export interface WithServiceManifest {
4
5
  addServiceManifest(manifest: ServiceManifest): void;
6
+ /**
7
+ * Every manifest the app publishes, once all are added. Resolves after the app's handlers have
8
+ * run, also those added while handlers run, so a resource can take it as an input from
9
+ * anywhere in the program.
10
+ */
11
+ getServiceManifests(): pulumi.Output<ServiceManifest[]>;
5
12
  }
6
13
  interface ApplyManifests {
7
- (manifests: ServiceManifest[]): void;
14
+ (manifests: ServiceManifest[]): void | Promise<void>;
8
15
  }
16
+ /** The name of the invocation that stores an app's manifests through the api's schema setup. */
17
+ export declare const SERVICE_MANIFESTS_INVOCATION_NAME = "service-manifests";
18
+ /**
19
+ * Writes each manifest as an item of the core's DynamoDB table, where the API's service discovery
20
+ * reads it from when the project runs on DynamoDB.
21
+ */
22
+ export declare const addServiceManifestTableItems: (app: PulumiApp, manifests: ServiceManifest[]) => void;
23
+ /**
24
+ * The api app's `schema-setup` function, from its stack output. Throws, saying to deploy the api
25
+ * app, when it has none: the api isn't on Postgres yet.
26
+ */
27
+ export declare const getSchemaSetupFunctionArn: (appName: string, apiOutput: {
28
+ schemaSetupLambdaArn?: string;
29
+ }) => string;
30
+ /**
31
+ * With `<Infra.AuroraPostgres />`: stores the manifests in the database by invoking the api app's
32
+ * `schema-setup` function with them (its ARN is in the api stack output). The database is in the
33
+ * VPC's private subnets, where the deploy can't reach it.
34
+ *
35
+ * The invocation's input is the manifests and nothing else, so it runs on the first deploy and
36
+ * again only when a manifest changes. Pulumi invokes with the deployer's credentials, so the
37
+ * function needs no resource policy for it. The setup upserts only the manifests it's given.
38
+ */
39
+ export declare const invokeSchemaSetupWithManifests: (app: PulumiApp, manifests: ServiceManifest[]) => import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/lambda/invocation.js").Invocation> | undefined;
9
40
  /**
10
41
  * Augment the given app with `addServiceManifest` functionality.
42
+ *
43
+ * Without `applyManifests`, the app publishes its manifests as DynamoDB items, or, with
44
+ * `<Infra.AuroraPostgres />`, through the api app's schema-setup function.
11
45
  * @param {PulumiApp} app
12
46
  */
13
47
  export declare function withServiceManifest<T extends PulumiApp>(app: T, applyManifests?: ApplyManifests): T & WithServiceManifest;
@@ -1,7 +1,14 @@
1
1
  import merge from "lodash/merge.js";
2
2
  import { addServiceManifestTableItem } from "./addServiceManifestTableItem.js";
3
- import { CoreOutput } from "../apps/index.js";
4
- const defaultApplyManifests = (app, manifests)=>{
3
+ import { CoreOutput } from "../apps/common/CoreOutput.js";
4
+ import { ApiOutput } from "../apps/api/ApiOutput.js";
5
+ import { createSchemaSetupEvent } from "../apps/api/ApiSchemaSetup.js";
6
+ import { projectUsesPostgres } from "../apps/extensions/projectUsesPostgres.js";
7
+ import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
8
+ import * as __rspack_external__pulumi_pulumi_f3e773ed from "@pulumi/pulumi";
9
+ const SERVICE_MANIFESTS_INVOCATION_NAME = "service-manifests";
10
+ const addServiceManifestTableItems = (app, manifests)=>{
11
+ if (!manifests.length) return;
5
12
  const core = app.getModule(CoreOutput);
6
13
  const table = {
7
14
  tableName: core.primaryDynamodbTableName,
@@ -10,27 +17,64 @@ const defaultApplyManifests = (app, manifests)=>{
10
17
  };
11
18
  manifests.forEach((manifest)=>addServiceManifestTableItem(app, table, manifest));
12
19
  };
20
+ const getSchemaSetupFunctionArn = (appName, apiOutput)=>{
21
+ if (!apiOutput.schemaSetupLambdaArn) throw new Error(`The api app has no schema-setup function, which the "${appName}" app stores its service manifests with on Postgres. Deploy the api app first: \`yarn webiny deploy api\`.`);
22
+ return apiOutput.schemaSetupLambdaArn;
23
+ };
24
+ const invokeSchemaSetupWithManifests = (app, manifests)=>{
25
+ if (!manifests.length) return;
26
+ const api = app.getModule(ApiOutput);
27
+ return app.addResource(__rspack_external__pulumi_aws_9e2bee2d.lambda.Invocation, {
28
+ name: SERVICE_MANIFESTS_INVOCATION_NAME,
29
+ config: {
30
+ functionName: api.apply((output)=>getSchemaSetupFunctionArn(app.name, output)),
31
+ input: __rspack_external__pulumi_pulumi_f3e773ed.output(manifests).apply((resolved)=>JSON.stringify(createSchemaSetupEvent(resolved)))
32
+ }
33
+ });
34
+ };
35
+ const defaultApplyManifests = async (app, manifests)=>{
36
+ if (!manifests.length) return;
37
+ if (await projectUsesPostgres()) return void invokeSchemaSetupWithManifests(app, manifests);
38
+ addServiceManifestTableItems(app, manifests);
39
+ };
13
40
  function withServiceManifest(app, applyManifests) {
14
41
  const manifests = {};
42
+ let resolveManifests = ()=>void 0;
43
+ const finalManifests = __rspack_external__pulumi_pulumi_f3e773ed.output(new Promise((resolve)=>{
44
+ resolveManifests = resolve;
45
+ }));
15
46
  function addServiceManifest(manifest) {
16
47
  manifests[manifest.name] = merge({}, manifests[manifest.name], manifest);
17
48
  }
49
+ function getServiceManifests() {
50
+ return finalManifests;
51
+ }
18
52
  app.decorateProgram(async (program, app)=>{
19
53
  const output = await program({
20
54
  ...app,
21
- addServiceManifest
22
- });
23
- app.addHandler(()=>{
24
- if (!applyManifests) return void defaultApplyManifests(app, Object.values(manifests));
25
- applyManifests(Object.values(manifests));
55
+ addServiceManifest,
56
+ getServiceManifests
26
57
  });
58
+ let queuedAt = 0;
59
+ const collect = async ()=>{
60
+ if (app.handlers.length > queuedAt) {
61
+ queuedAt = app.handlers.push(collect);
62
+ return;
63
+ }
64
+ const all = Object.values(manifests);
65
+ if (applyManifests) await applyManifests(all);
66
+ else await defaultApplyManifests(app, all);
67
+ resolveManifests(all);
68
+ };
69
+ queuedAt = app.handlers.push(collect);
27
70
  return output;
28
71
  });
29
72
  return {
30
73
  ...app,
31
- addServiceManifest
74
+ addServiceManifest,
75
+ getServiceManifests
32
76
  };
33
77
  }
34
- export { withServiceManifest };
78
+ export { SERVICE_MANIFESTS_INVOCATION_NAME, addServiceManifestTableItems, getSchemaSetupFunctionArn, invokeSchemaSetupWithManifests, withServiceManifest };
35
79
 
36
80
  //# sourceMappingURL=withServiceManifest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pulumi/utils/withServiceManifest.js","sources":["../../../src/pulumi/utils/withServiceManifest.ts"],"sourcesContent":["import merge from \"lodash/merge.js\";\nimport type { PulumiApp } from \"@webiny/pulumi\";\nimport type { ServiceManifest, TableDefinition } from \"./addServiceManifestTableItem.js\";\nimport { addServiceManifestTableItem } from \"./addServiceManifestTableItem.js\";\nimport { CoreOutput } from \"~/pulumi/apps/index.js\";\n\nexport interface WithServiceManifest {\n addServiceManifest(manifest: ServiceManifest): void;\n}\n\ninterface ApplyManifests {\n (manifests: ServiceManifest[]): void;\n}\n\nconst defaultApplyManifests = (app: PulumiApp, manifests: ServiceManifest[]) => {\n const core = app.getModule(CoreOutput);\n\n const table: TableDefinition = {\n tableName: core.primaryDynamodbTableName,\n hashKey: core.primaryDynamodbTableHashKey,\n rangeKey: core.primaryDynamodbTableRangeKey\n };\n\n manifests.forEach(manifest => addServiceManifestTableItem(app, table, manifest));\n};\n\n/**\n * Augment the given app with `addServiceManifest` functionality.\n * @param {PulumiApp} app\n */\nexport function withServiceManifest<T extends PulumiApp>(\n app: T,\n applyManifests?: ApplyManifests\n): T & WithServiceManifest {\n const manifests: Record<string, ServiceManifest> = {};\n\n function addServiceManifest(manifest: ServiceManifest) {\n manifests[manifest.name] = merge({}, manifests[manifest.name], manifest);\n }\n\n app.decorateProgram<{ addServiceManifest: typeof addServiceManifest }>(async (program, app) => {\n const output = await program({\n ...app,\n addServiceManifest\n });\n\n app.addHandler(() => {\n if (!applyManifests) {\n defaultApplyManifests(app, Object.values(manifests));\n return;\n }\n\n applyManifests(Object.values(manifests));\n });\n\n return output;\n });\n\n // Augment the original PulumiApp.\n return {\n ...app,\n addServiceManifest\n };\n}\n"],"names":["defaultApplyManifests","app","manifests","core","CoreOutput","table","manifest","addServiceManifestTableItem","withServiceManifest","applyManifests","addServiceManifest","merge","program","output","Object"],"mappings":";;;AAcA,MAAMA,wBAAwB,CAACC,KAAgBC;IAC3C,MAAMC,OAAOF,IAAI,SAAS,CAACG;IAE3B,MAAMC,QAAyB;QAC3B,WAAWF,KAAK,wBAAwB;QACxC,SAASA,KAAK,2BAA2B;QACzC,UAAUA,KAAK,4BAA4B;IAC/C;IAEAD,UAAU,OAAO,CAACI,CAAAA,WAAYC,4BAA4BN,KAAKI,OAAOC;AAC1E;AAMO,SAASE,oBACZP,GAAM,EACNQ,cAA+B;IAE/B,MAAMP,YAA6C,CAAC;IAEpD,SAASQ,mBAAmBJ,QAAyB;QACjDJ,SAAS,CAACI,SAAS,IAAI,CAAC,GAAGK,MAAM,CAAC,GAAGT,SAAS,CAACI,SAAS,IAAI,CAAC,EAAEA;IACnE;IAEAL,IAAI,eAAe,CAAoD,OAAOW,SAASX;QACnF,MAAMY,SAAS,MAAMD,QAAQ;YACzB,GAAGX,GAAG;YACNS;QACJ;QAEAT,IAAI,UAAU,CAAC;YACX,IAAI,CAACQ,gBAAgB,YACjBT,sBAAsBC,KAAKa,OAAO,MAAM,CAACZ;YAI7CO,eAAeK,OAAO,MAAM,CAACZ;QACjC;QAEA,OAAOW;IACX;IAGA,OAAO;QACH,GAAGZ,GAAG;QACNS;IACJ;AACJ"}
1
+ {"version":3,"file":"pulumi/utils/withServiceManifest.js","sources":["../../../src/pulumi/utils/withServiceManifest.ts"],"sourcesContent":["import merge from \"lodash/merge.js\";\nimport * as aws from \"@pulumi/aws\";\nimport * as pulumi from \"@pulumi/pulumi\";\nimport type { PulumiApp } from \"@webiny/pulumi\";\nimport type { ServiceManifest, TableDefinition } from \"./addServiceManifestTableItem.js\";\nimport { addServiceManifestTableItem } from \"./addServiceManifestTableItem.js\";\nimport { CoreOutput } from \"~/pulumi/apps/common/CoreOutput.js\";\nimport { ApiOutput } from \"~/pulumi/apps/api/ApiOutput.js\";\nimport { createSchemaSetupEvent } from \"~/pulumi/apps/api/ApiSchemaSetup.js\";\nimport { projectUsesPostgres } from \"~/pulumi/apps/extensions/projectUsesPostgres.js\";\n\nexport interface WithServiceManifest {\n addServiceManifest(manifest: ServiceManifest): void;\n /**\n * Every manifest the app publishes, once all are added. Resolves after the app's handlers have\n * run, also those added while handlers run, so a resource can take it as an input from\n * anywhere in the program.\n */\n getServiceManifests(): pulumi.Output<ServiceManifest[]>;\n}\n\ninterface ApplyManifests {\n (manifests: ServiceManifest[]): void | Promise<void>;\n}\n\n/** The name of the invocation that stores an app's manifests through the api's schema setup. */\nexport const SERVICE_MANIFESTS_INVOCATION_NAME = \"service-manifests\";\n\n/**\n * Writes each manifest as an item of the core's DynamoDB table, where the API's service discovery\n * reads it from when the project runs on DynamoDB.\n */\nexport const addServiceManifestTableItems = (app: PulumiApp, manifests: ServiceManifest[]) => {\n if (!manifests.length) {\n return;\n }\n\n const core = app.getModule(CoreOutput);\n\n const table: TableDefinition = {\n tableName: core.primaryDynamodbTableName,\n hashKey: core.primaryDynamodbTableHashKey,\n rangeKey: core.primaryDynamodbTableRangeKey\n };\n\n manifests.forEach(manifest => addServiceManifestTableItem(app, table, manifest));\n};\n\n/**\n * The api app's `schema-setup` function, from its stack output. Throws, saying to deploy the api\n * app, when it has none: the api isn't on Postgres yet.\n */\nexport const getSchemaSetupFunctionArn = (\n appName: string,\n apiOutput: { schemaSetupLambdaArn?: string }\n): string => {\n if (!apiOutput.schemaSetupLambdaArn) {\n throw new Error(\n `The api app has no schema-setup function, which the \"${appName}\" app stores its ` +\n \"service manifests with on Postgres. Deploy the api app first: \" +\n \"`yarn webiny deploy api`.\"\n );\n }\n return apiOutput.schemaSetupLambdaArn;\n};\n\n/**\n * With `<Infra.AuroraPostgres />`: stores the manifests in the database by invoking the api app's\n * `schema-setup` function with them (its ARN is in the api stack output). The database is in the\n * VPC's private subnets, where the deploy can't reach it.\n *\n * The invocation's input is the manifests and nothing else, so it runs on the first deploy and\n * again only when a manifest changes. Pulumi invokes with the deployer's credentials, so the\n * function needs no resource policy for it. The setup upserts only the manifests it's given.\n */\nexport const invokeSchemaSetupWithManifests = (app: PulumiApp, manifests: ServiceManifest[]) => {\n if (!manifests.length) {\n return;\n }\n\n const api = app.getModule(ApiOutput);\n\n return app.addResource(aws.lambda.Invocation, {\n name: SERVICE_MANIFESTS_INVOCATION_NAME,\n config: {\n functionName: api.apply(output => getSchemaSetupFunctionArn(app.name, output)),\n input: pulumi\n .output(manifests)\n .apply(resolved =>\n JSON.stringify(createSchemaSetupEvent(resolved as ServiceManifest[]))\n )\n }\n });\n};\n\n/** Picks where the manifests go: the database with `<Infra.AuroraPostgres />`, else DynamoDB. */\nconst defaultApplyManifests = async (app: PulumiApp, manifests: ServiceManifest[]) => {\n if (!manifests.length) {\n return;\n }\n\n if (await projectUsesPostgres()) {\n invokeSchemaSetupWithManifests(app, manifests);\n return;\n }\n\n addServiceManifestTableItems(app, manifests);\n};\n\n/**\n * Augment the given app with `addServiceManifest` functionality.\n *\n * Without `applyManifests`, the app publishes its manifests as DynamoDB items, or, with\n * `<Infra.AuroraPostgres />`, through the api app's schema-setup function.\n * @param {PulumiApp} app\n */\nexport function withServiceManifest<T extends PulumiApp>(\n app: T,\n applyManifests?: ApplyManifests\n): T & WithServiceManifest {\n const manifests: Record<string, ServiceManifest> = {};\n\n let resolveManifests: (manifests: ServiceManifest[]) => void = () => undefined;\n const finalManifests = pulumi.output(\n new Promise<ServiceManifest[]>(resolve => {\n resolveManifests = resolve;\n })\n );\n\n function addServiceManifest(manifest: ServiceManifest) {\n manifests[manifest.name] = merge({}, manifests[manifest.name], manifest);\n }\n\n function getServiceManifests() {\n return finalManifests;\n }\n\n app.decorateProgram<WithServiceManifest>(async (program, app) => {\n const output = await program({\n ...app,\n addServiceManifest,\n getServiceManifests\n });\n\n // Runs after every other handler, so it sees the manifests they add. A handler can add more\n // handlers while it runs (an `ApiPulumi` implementation, for one), and the app runs those\n // after this one: when there are any, it queues itself again behind them.\n let queuedAt = 0;\n const collect = async () => {\n if (app.handlers.length > queuedAt) {\n queuedAt = app.handlers.push(collect);\n return;\n }\n const all = Object.values(manifests);\n if (!applyManifests) {\n await defaultApplyManifests(app, all);\n } else {\n await applyManifests(all);\n }\n resolveManifests(all);\n };\n queuedAt = app.handlers.push(collect);\n\n return output;\n });\n\n // Augment the original PulumiApp.\n return {\n ...app,\n addServiceManifest,\n getServiceManifests\n };\n}\n"],"names":["SERVICE_MANIFESTS_INVOCATION_NAME","addServiceManifestTableItems","app","manifests","core","CoreOutput","table","manifest","addServiceManifestTableItem","getSchemaSetupFunctionArn","appName","apiOutput","Error","invokeSchemaSetupWithManifests","api","ApiOutput","aws","output","pulumi","resolved","JSON","createSchemaSetupEvent","defaultApplyManifests","projectUsesPostgres","withServiceManifest","applyManifests","resolveManifests","undefined","finalManifests","Promise","resolve","addServiceManifest","merge","getServiceManifests","program","queuedAt","collect","all","Object"],"mappings":";;;;;;;;AA0BO,MAAMA,oCAAoC;AAM1C,MAAMC,+BAA+B,CAACC,KAAgBC;IACzD,IAAI,CAACA,UAAU,MAAM,EACjB;IAGJ,MAAMC,OAAOF,IAAI,SAAS,CAACG;IAE3B,MAAMC,QAAyB;QAC3B,WAAWF,KAAK,wBAAwB;QACxC,SAASA,KAAK,2BAA2B;QACzC,UAAUA,KAAK,4BAA4B;IAC/C;IAEAD,UAAU,OAAO,CAACI,CAAAA,WAAYC,4BAA4BN,KAAKI,OAAOC;AAC1E;AAMO,MAAME,4BAA4B,CACrCC,SACAC;IAEA,IAAI,CAACA,UAAU,oBAAoB,EAC/B,MAAM,IAAIC,MACN,CAAC,qDAAqD,EAAEF,QAAQ,0GAAiB,CAAC;IAK1F,OAAOC,UAAU,oBAAoB;AACzC;AAWO,MAAME,iCAAiC,CAACX,KAAgBC;IAC3D,IAAI,CAACA,UAAU,MAAM,EACjB;IAGJ,MAAMW,MAAMZ,IAAI,SAAS,CAACa;IAE1B,OAAOb,IAAI,WAAW,CAACc,uCAAAA,MAAAA,CAAAA,UAAqB,EAAE;QAC1C,MAAMhB;QACN,QAAQ;YACJ,cAAcc,IAAI,KAAK,CAACG,CAAAA,SAAUR,0BAA0BP,IAAI,IAAI,EAAEe;YACtE,OAAOC,0CAAAA,MACI,CAACf,WACP,KAAK,CAACgB,CAAAA,WACHC,KAAK,SAAS,CAACC,uBAAuBF;QAElD;IACJ;AACJ;AAGA,MAAMG,wBAAwB,OAAOpB,KAAgBC;IACjD,IAAI,CAACA,UAAU,MAAM,EACjB;IAGJ,IAAI,MAAMoB,uBAAuB,YAC7BV,+BAA+BX,KAAKC;IAIxCF,6BAA6BC,KAAKC;AACtC;AASO,SAASqB,oBACZtB,GAAM,EACNuB,cAA+B;IAE/B,MAAMtB,YAA6C,CAAC;IAEpD,IAAIuB,mBAA2D,IAAMC;IACrE,MAAMC,iBAAiBV,0CAAAA,MAAa,CAChC,IAAIW,QAA2BC,CAAAA;QAC3BJ,mBAAmBI;IACvB;IAGJ,SAASC,mBAAmBxB,QAAyB;QACjDJ,SAAS,CAACI,SAAS,IAAI,CAAC,GAAGyB,MAAM,CAAC,GAAG7B,SAAS,CAACI,SAAS,IAAI,CAAC,EAAEA;IACnE;IAEA,SAAS0B;QACL,OAAOL;IACX;IAEA1B,IAAI,eAAe,CAAsB,OAAOgC,SAAShC;QACrD,MAAMe,SAAS,MAAMiB,QAAQ;YACzB,GAAGhC,GAAG;YACN6B;YACAE;QACJ;QAKA,IAAIE,WAAW;QACf,MAAMC,UAAU;YACZ,IAAIlC,IAAI,QAAQ,CAAC,MAAM,GAAGiC,UAAU;gBAChCA,WAAWjC,IAAI,QAAQ,CAAC,IAAI,CAACkC;gBAC7B;YACJ;YACA,MAAMC,MAAMC,OAAO,MAAM,CAACnC;YAC1B,IAAKsB,gBAGD,MAAMA,eAAeY;iBAFrB,MAAMf,sBAAsBpB,KAAKmC;YAIrCX,iBAAiBW;QACrB;QACAF,WAAWjC,IAAI,QAAQ,CAAC,IAAI,CAACkC;QAE7B,OAAOnB;IACX;IAGA,OAAO;QACH,GAAGf,GAAG;QACN6B;QACAE;IACJ;AACJ"}
@@ -1,6 +1,6 @@
1
1
  import get from "lodash/get.js";
2
2
  import chalk from "chalk";
3
- const { yellow: yellow } = chalk;
3
+ const { yellow } = chalk;
4
4
  const mapStackOutput = (output, map)=>{
5
5
  const values = {};
6
6
  const regex = /\${(.*)}/;
@@ -1 +1 @@
1
- {"version":3,"file":"services/PulumiGetStackOutputService/mapStackOutput.js","sources":["../../../src/services/PulumiGetStackOutputService/mapStackOutput.ts"],"sourcesContent":["import get from \"lodash/get.js\";\nimport chalk from \"chalk\";\n\nconst { yellow } = chalk;\n\nexport const mapStackOutput = <T extends Record<string, any> = Record<string, any>>(\n output: Record<string, any>,\n map: Record<string, any>\n): T => {\n const values: T = {} as T;\n const regex = /\\${(.*)}/;\n\n Object.keys(map).forEach(key => {\n const valuePattern = map[key];\n const match = regex.exec(valuePattern);\n if (match) {\n const [replace, valuePath] = match;\n const value = get(output, valuePath);\n if (!value) {\n console.log(yellow(`Could not map \"${valuePath}\" to \"${key}\" - value missing.`));\n return;\n }\n /**\n * It is ok to expect error here.\n */\n if (typeof value === \"object\" && value !== null) {\n // @ts-expect-error\n values[key] = valuePattern.replace(replace, JSON.stringify(value));\n } else {\n // @ts-expect-error\n values[key] = valuePattern.replace(replace, value);\n }\n }\n });\n\n return values;\n};\n"],"names":["yellow","chalk","mapStackOutput","output","map","values","regex","Object","key","valuePattern","match","replace","valuePath","value","get","console","JSON"],"mappings":";;AAGA,MAAM,EAAEA,QAAAA,MAAM,EAAE,GAAGC;AAEZ,MAAMC,iBAAiB,CAC1BC,QACAC;IAEA,MAAMC,SAAY,CAAC;IACnB,MAAMC,QAAQ;IAEdC,OAAO,IAAI,CAACH,KAAK,OAAO,CAACI,CAAAA;QACrB,MAAMC,eAAeL,GAAG,CAACI,IAAI;QAC7B,MAAME,QAAQJ,MAAM,IAAI,CAACG;QACzB,IAAIC,OAAO;YACP,MAAM,CAACC,SAASC,UAAU,GAAGF;YAC7B,MAAMG,QAAQC,IAAIX,QAAQS;YAC1B,IAAI,CAACC,OAAO,YACRE,QAAQ,GAAG,CAACf,OAAO,CAAC,eAAe,EAAEY,UAAU,MAAM,EAAEJ,IAAI,kBAAkB,CAAC;YAMlF,IAAI,AAAiB,YAAjB,OAAOK,SAAsBA,AAAU,SAAVA,OAE7BR,MAAM,CAACG,IAAI,GAAGC,aAAa,OAAO,CAACE,SAASK,KAAK,SAAS,CAACH;iBAG3DR,MAAM,CAACG,IAAI,GAAGC,aAAa,OAAO,CAACE,SAASE;QAEpD;IACJ;IAEA,OAAOR;AACX"}
1
+ {"version":3,"file":"services/PulumiGetStackOutputService/mapStackOutput.js","sources":["../../../src/services/PulumiGetStackOutputService/mapStackOutput.ts"],"sourcesContent":["import get from \"lodash/get.js\";\nimport chalk from \"chalk\";\n\nconst { yellow } = chalk;\n\nexport const mapStackOutput = <T extends Record<string, any> = Record<string, any>>(\n output: Record<string, any>,\n map: Record<string, any>\n): T => {\n const values: T = {} as T;\n const regex = /\\${(.*)}/;\n\n Object.keys(map).forEach(key => {\n const valuePattern = map[key];\n const match = regex.exec(valuePattern);\n if (match) {\n const [replace, valuePath] = match;\n const value = get(output, valuePath);\n if (!value) {\n console.log(yellow(`Could not map \"${valuePath}\" to \"${key}\" - value missing.`));\n return;\n }\n /**\n * It is ok to expect error here.\n */\n if (typeof value === \"object\" && value !== null) {\n // @ts-expect-error\n values[key] = valuePattern.replace(replace, JSON.stringify(value));\n } else {\n // @ts-expect-error\n values[key] = valuePattern.replace(replace, value);\n }\n }\n });\n\n return values;\n};\n"],"names":["yellow","chalk","mapStackOutput","output","map","values","regex","Object","key","valuePattern","match","replace","valuePath","value","get","console","JSON"],"mappings":";;AAGA,MAAM,EAAEA,MAAM,EAAE,GAAGC;AAEZ,MAAMC,iBAAiB,CAC1BC,QACAC;IAEA,MAAMC,SAAY,CAAC;IACnB,MAAMC,QAAQ;IAEdC,OAAO,IAAI,CAACH,KAAK,OAAO,CAACI,CAAAA;QACrB,MAAMC,eAAeL,GAAG,CAACI,IAAI;QAC7B,MAAME,QAAQJ,MAAM,IAAI,CAACG;QACzB,IAAIC,OAAO;YACP,MAAM,CAACC,SAASC,UAAU,GAAGF;YAC7B,MAAMG,QAAQC,IAAIX,QAAQS;YAC1B,IAAI,CAACC,OAAO,YACRE,QAAQ,GAAG,CAACf,OAAO,CAAC,eAAe,EAAEY,UAAU,MAAM,EAAEJ,IAAI,kBAAkB,CAAC;YAMlF,IAAI,AAAiB,YAAjB,OAAOK,SAAsBA,AAAU,SAAVA,OAE7BR,MAAM,CAACG,IAAI,GAAGC,aAAa,OAAO,CAACE,SAASK,KAAK,SAAS,CAACH;iBAG3DR,MAAM,CAACG,IAAI,GAAGC,aAAa,OAAO,CAACE,SAASE;QAEpD;IACJ;IAEA,OAAOR;AACX"}
Binary file