@webiny/project-aws 6.3.0-beta.2 → 6.3.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_templates/appTemplates/admin/webiny.application.ts +1 -1
- package/_templates/appTemplates/api/graphql/src/extensions.ts +1 -1
- package/_templates/appTemplates/api/graphql/src/index.ts +2 -2
- package/_templates/appTemplates/api/webiny.application.ts +1 -1
- package/_templates/appTemplates/blueGreen/webiny.application.ts +1 -1
- package/_templates/appTemplates/core/webiny.application.ts +1 -1
- package/_templates/appTemplates/syncSystem/webiny.application.ts +1 -1
- package/_templates/extensions/OpenSearch/api/graphql/src/index.ts +3 -3
- package/abstractions/features/pulumi/AdminPulumi.d.ts +9 -0
- package/abstractions/features/pulumi/AdminPulumi.js +4 -0
- package/abstractions/features/pulumi/AdminPulumi.js.map +1 -0
- package/abstractions/features/pulumi/ApiPulumi.d.ts +9 -0
- package/abstractions/features/pulumi/ApiPulumi.js +4 -0
- package/abstractions/features/pulumi/ApiPulumi.js.map +1 -0
- package/abstractions/features/pulumi/CorePulumi.d.ts +9 -0
- package/abstractions/features/pulumi/CorePulumi.js +4 -0
- package/abstractions/features/pulumi/CorePulumi.js.map +1 -0
- package/abstractions/features/pulumi/index.d.ts +3 -0
- package/abstractions/features/pulumi/index.js +5 -0
- package/abstractions/features/pulumi/index.js.map +1 -0
- package/abstractions/index.d.ts +1 -0
- package/abstractions/index.js +1 -0
- package/abstractions/index.js.map +1 -1
- package/api.d.ts +19 -4
- package/api.js +8 -0
- package/api.js.map +1 -1
- package/exports/infra/admin.d.ts +1 -0
- package/exports/infra/admin.js +1 -0
- package/exports/infra/admin.js.map +1 -1
- package/exports/infra/api.d.ts +1 -0
- package/exports/infra/api.js +1 -0
- package/exports/infra/api.js.map +1 -1
- package/exports/infra/core.d.ts +1 -0
- package/exports/infra/core.js +1 -0
- package/exports/infra/core.js.map +1 -1
- package/extensions/ApiLambdaFunction.d.ts +1 -1
- package/extensions/ApiLambdaFunction.js +2 -2
- package/extensions/ApiLambdaFunction.js.map +1 -1
- package/extensions/ApiRoute.d.ts +5 -5
- package/extensions/ApiRoute.js +2 -2
- package/extensions/ApiRoute.js.map +1 -1
- package/extensions/Cms/ModelFieldCompression.d.ts +4 -0
- package/extensions/Cms/ModelFieldCompression.js +23 -0
- package/extensions/Cms/ModelFieldCompression.js.map +1 -0
- package/extensions/Mailer/Smtp.d.ts +8 -0
- package/extensions/Mailer/Smtp.js +20 -0
- package/extensions/Mailer/Smtp.js.map +1 -0
- package/extensions/Mailer/Smtp.test.d.ts +1 -0
- package/extensions/Mailer/Smtp.test.js +141 -0
- package/extensions/Mailer/Smtp.test.js.map +1 -0
- package/extensions/Mailer/SmtpParamsSchema.d.ts +9 -0
- package/extensions/Mailer/SmtpParamsSchema.js +20 -0
- package/extensions/Mailer/SmtpParamsSchema.js.map +1 -0
- package/extensions/ProjectAws/SetDatabaseSetupOutput.d.ts +5 -3
- package/extensions/ProjectAws/SetDatabaseSetupOutput.js +2 -1
- package/extensions/ProjectAws/SetDatabaseSetupOutput.js.map +1 -1
- package/extensions/ProjectAws.js +1 -1
- package/extensions/ProjectAws.js.map +1 -1
- package/extensions/RegisterRoutesPulumi.d.ts +5 -3
- package/extensions/RegisterRoutesPulumi.js +2 -1
- package/extensions/RegisterRoutesPulumi.js.map +1 -1
- package/extensions/definitions.js +2 -1
- package/extensions/definitions.js.map +1 -1
- package/extensions/index.d.ts +1 -0
- package/extensions/index.js +1 -0
- package/extensions/index.js.map +1 -1
- package/infra.d.ts +9 -0
- package/infra.js +8 -3
- package/infra.js.map +1 -1
- package/package.json +20 -19
- package/pulumi/apps/admin/createAdminPulumiApp.js +3 -1
- package/pulumi/apps/admin/createAdminPulumiApp.js.map +1 -1
- package/pulumi/apps/api/ApiGateway.js +3 -0
- package/pulumi/apps/api/ApiGateway.js.map +1 -1
- package/pulumi/apps/api/createApiPulumiApp.js +3 -1
- package/pulumi/apps/api/createApiPulumiApp.js.map +1 -1
- package/pulumi/apps/blueGreen/functions/handler.js +1 -0
- package/pulumi/apps/blueGreen/functions/handler.js.map +1 -1
- package/pulumi/apps/core/CoreOpenSearch.d.ts +2 -0
- package/pulumi/apps/core/CoreOpenSearch.js +18 -4
- package/pulumi/apps/core/CoreOpenSearch.js.map +1 -1
- package/pulumi/apps/core/createCorePulumiApp.js +16 -2
- package/pulumi/apps/core/createCorePulumiApp.js.map +1 -1
- package/pulumi/apps/syncSystem/SyncSystemLambda.js +0 -1
- package/pulumi/apps/syncSystem/SyncSystemLambda.js.map +1 -1
- package/pulumi/extensions/AdminPulumi.d.ts +4 -0
- package/pulumi/extensions/AdminPulumi.js +25 -0
- package/pulumi/extensions/AdminPulumi.js.map +1 -0
- package/pulumi/extensions/ApiPulumi.d.ts +4 -0
- package/pulumi/extensions/ApiPulumi.js +25 -0
- package/pulumi/extensions/ApiPulumi.js.map +1 -0
- package/pulumi/extensions/CorePulumi.d.ts +4 -0
- package/pulumi/extensions/CorePulumi.js +25 -0
- package/pulumi/extensions/CorePulumi.js.map +1 -0
- package/pulumi/extensions/index.d.ts +8 -0
- package/pulumi/extensions/index.js +7 -1
- package/pulumi/extensions/index.js.map +1 -1
- package/pulumi/features/AdminPulumi/AdminPulumi.d.ts +7 -0
- package/pulumi/features/AdminPulumi/AdminPulumi.js +21 -0
- package/pulumi/features/AdminPulumi/AdminPulumi.js.map +1 -0
- package/pulumi/features/AdminPulumi/index.d.ts +1 -0
- package/pulumi/features/AdminPulumi/index.js +3 -0
- package/pulumi/features/AdminPulumi/index.js.map +1 -0
- package/pulumi/features/ApiPulumi/ApiPulumi.d.ts +7 -0
- package/pulumi/features/ApiPulumi/ApiPulumi.js +21 -0
- package/pulumi/features/ApiPulumi/ApiPulumi.js.map +1 -0
- package/pulumi/features/ApiPulumi/index.d.ts +1 -0
- package/pulumi/features/ApiPulumi/index.js +3 -0
- package/pulumi/features/ApiPulumi/index.js.map +1 -0
- package/pulumi/features/CorePulumi/CorePulumi.d.ts +7 -0
- package/pulumi/features/CorePulumi/CorePulumi.js +21 -0
- package/pulumi/features/CorePulumi/CorePulumi.js.map +1 -0
- package/pulumi/features/CorePulumi/index.d.ts +1 -0
- package/pulumi/features/CorePulumi/index.js +3 -0
- package/pulumi/features/CorePulumi/index.js.map +1 -0
- package/pulumi/features/index.d.ts +3 -0
- package/pulumi/features/index.js +5 -0
- package/pulumi/features/index.js.map +1 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest";
|
|
2
|
+
import { SmtpParamsSchema as schema } from "./SmtpParamsSchema.js";
|
|
3
|
+
const validParams = {
|
|
4
|
+
host: "smtp.example.com",
|
|
5
|
+
port: 587,
|
|
6
|
+
user: "smtp-user",
|
|
7
|
+
password: "secret",
|
|
8
|
+
from: "Webiny <test@webiny.com>",
|
|
9
|
+
replyTo: "No-reply <no-reply@webiny.com>"
|
|
10
|
+
};
|
|
11
|
+
describe("Smtp paramsSchema", () => {
|
|
12
|
+
describe("valid inputs", () => {
|
|
13
|
+
it("accepts a complete valid config", async () => {
|
|
14
|
+
const result = await schema.safeParseAsync(validParams);
|
|
15
|
+
expect(result.success).toBe(true);
|
|
16
|
+
});
|
|
17
|
+
it("accepts config without replyTo (it is optional)", async () => {
|
|
18
|
+
const {
|
|
19
|
+
replyTo: _,
|
|
20
|
+
...params
|
|
21
|
+
} = validParams;
|
|
22
|
+
const result = await schema.safeParseAsync(params);
|
|
23
|
+
expect(result.success).toBe(true);
|
|
24
|
+
});
|
|
25
|
+
it("accepts bare addr-spec for from and replyTo", async () => {
|
|
26
|
+
const result = await schema.safeParseAsync({
|
|
27
|
+
...validParams,
|
|
28
|
+
from: "test@webiny.com",
|
|
29
|
+
replyTo: "no-reply@webiny.com"
|
|
30
|
+
});
|
|
31
|
+
expect(result.success).toBe(true);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
describe("react-properties serialization bug", () => {
|
|
35
|
+
// When process.env.SMTP_PASSWORD is undefined at build time,
|
|
36
|
+
// react-properties' buildRoots treats value===undefined as "no value, build from
|
|
37
|
+
// children". The password Property has no children, so buildRoots returns {}.
|
|
38
|
+
// Zod then validates {} against z.string() → "expected string, received object".
|
|
39
|
+
it("password={} reproduces the 'expected string, received object' error", async () => {
|
|
40
|
+
const result = await schema.safeParseAsync({
|
|
41
|
+
...validParams,
|
|
42
|
+
password: {}
|
|
43
|
+
});
|
|
44
|
+
expect(result.success).toBe(false);
|
|
45
|
+
const issue = result.error?.issues[0];
|
|
46
|
+
expect(issue?.code).toBe("invalid_type");
|
|
47
|
+
expect(issue?.path).toEqual(["password"]);
|
|
48
|
+
expect(issue?.message).toBe("Invalid input: expected string, received object");
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
describe("required string fields", () => {
|
|
52
|
+
it("rejects missing host", async () => {
|
|
53
|
+
const {
|
|
54
|
+
host: _,
|
|
55
|
+
...params
|
|
56
|
+
} = validParams;
|
|
57
|
+
const result = await schema.safeParseAsync(params);
|
|
58
|
+
expect(result.success).toBe(false);
|
|
59
|
+
});
|
|
60
|
+
it("rejects empty host", async () => {
|
|
61
|
+
const result = await schema.safeParseAsync({
|
|
62
|
+
...validParams,
|
|
63
|
+
host: ""
|
|
64
|
+
});
|
|
65
|
+
expect(result.success).toBe(false);
|
|
66
|
+
});
|
|
67
|
+
it("rejects missing user", async () => {
|
|
68
|
+
const {
|
|
69
|
+
user: _,
|
|
70
|
+
...params
|
|
71
|
+
} = validParams;
|
|
72
|
+
const result = await schema.safeParseAsync(params);
|
|
73
|
+
expect(result.success).toBe(false);
|
|
74
|
+
});
|
|
75
|
+
it("rejects empty user", async () => {
|
|
76
|
+
const result = await schema.safeParseAsync({
|
|
77
|
+
...validParams,
|
|
78
|
+
user: ""
|
|
79
|
+
});
|
|
80
|
+
expect(result.success).toBe(false);
|
|
81
|
+
});
|
|
82
|
+
it("rejects missing password", async () => {
|
|
83
|
+
const {
|
|
84
|
+
password: _,
|
|
85
|
+
...params
|
|
86
|
+
} = validParams;
|
|
87
|
+
const result = await schema.safeParseAsync(params);
|
|
88
|
+
expect(result.success).toBe(false);
|
|
89
|
+
});
|
|
90
|
+
it("rejects empty password", async () => {
|
|
91
|
+
const result = await schema.safeParseAsync({
|
|
92
|
+
...validParams,
|
|
93
|
+
password: ""
|
|
94
|
+
});
|
|
95
|
+
expect(result.success).toBe(false);
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
describe("port validation", () => {
|
|
99
|
+
it("rejects port 0", async () => {
|
|
100
|
+
const result = await schema.safeParseAsync({
|
|
101
|
+
...validParams,
|
|
102
|
+
port: 0
|
|
103
|
+
});
|
|
104
|
+
expect(result.success).toBe(false);
|
|
105
|
+
});
|
|
106
|
+
it("rejects negative port", async () => {
|
|
107
|
+
const result = await schema.safeParseAsync({
|
|
108
|
+
...validParams,
|
|
109
|
+
port: -1
|
|
110
|
+
});
|
|
111
|
+
expect(result.success).toBe(false);
|
|
112
|
+
});
|
|
113
|
+
it("rejects fractional port", async () => {
|
|
114
|
+
const result = await schema.safeParseAsync({
|
|
115
|
+
...validParams,
|
|
116
|
+
port: 587.5
|
|
117
|
+
});
|
|
118
|
+
expect(result.success).toBe(false);
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
describe("email address validation", () => {
|
|
122
|
+
it("rejects invalid from address", async () => {
|
|
123
|
+
const result = await schema.safeParseAsync({
|
|
124
|
+
...validParams,
|
|
125
|
+
from: "not-an-email"
|
|
126
|
+
});
|
|
127
|
+
expect(result.success).toBe(false);
|
|
128
|
+
expect(result.error?.issues[0].message).toBe("Invalid email address.");
|
|
129
|
+
});
|
|
130
|
+
it("rejects invalid replyTo address", async () => {
|
|
131
|
+
const result = await schema.safeParseAsync({
|
|
132
|
+
...validParams,
|
|
133
|
+
replyTo: "not-an-email"
|
|
134
|
+
});
|
|
135
|
+
expect(result.success).toBe(false);
|
|
136
|
+
expect(result.error?.issues[0].message).toBe("Invalid email address.");
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
//# sourceMappingURL=Smtp.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["describe","it","expect","SmtpParamsSchema","schema","validParams","host","port","user","password","from","replyTo","result","safeParseAsync","success","toBe","_","params","issue","error","issues","code","path","toEqual","message"],"sources":["Smtp.test.ts"],"sourcesContent":["import { describe, it, expect } from \"vitest\";\nimport { SmtpParamsSchema as schema } from \"./SmtpParamsSchema.js\";\n\nconst validParams = {\n host: \"smtp.example.com\",\n port: 587,\n user: \"smtp-user\",\n password: \"secret\",\n from: \"Webiny <test@webiny.com>\",\n replyTo: \"No-reply <no-reply@webiny.com>\"\n};\n\ndescribe(\"Smtp paramsSchema\", () => {\n describe(\"valid inputs\", () => {\n it(\"accepts a complete valid config\", async () => {\n const result = await schema.safeParseAsync(validParams);\n expect(result.success).toBe(true);\n });\n\n it(\"accepts config without replyTo (it is optional)\", async () => {\n const { replyTo: _, ...params } = validParams;\n const result = await schema.safeParseAsync(params);\n expect(result.success).toBe(true);\n });\n\n it(\"accepts bare addr-spec for from and replyTo\", async () => {\n const result = await schema.safeParseAsync({\n ...validParams,\n from: \"test@webiny.com\",\n replyTo: \"no-reply@webiny.com\"\n });\n expect(result.success).toBe(true);\n });\n });\n\n describe(\"react-properties serialization bug\", () => {\n // When process.env.SMTP_PASSWORD is undefined at build time,\n // react-properties' buildRoots treats value===undefined as \"no value, build from\n // children\". The password Property has no children, so buildRoots returns {}.\n // Zod then validates {} against z.string() → \"expected string, received object\".\n it(\"password={} reproduces the 'expected string, received object' error\", async () => {\n const result = await schema.safeParseAsync({ ...validParams, password: {} });\n expect(result.success).toBe(false);\n const issue = result.error?.issues[0];\n expect(issue?.code).toBe(\"invalid_type\");\n expect(issue?.path).toEqual([\"password\"]);\n expect(issue?.message).toBe(\"Invalid input: expected string, received object\");\n });\n });\n\n describe(\"required string fields\", () => {\n it(\"rejects missing host\", async () => {\n const { host: _, ...params } = validParams;\n const result = await schema.safeParseAsync(params);\n expect(result.success).toBe(false);\n });\n\n it(\"rejects empty host\", async () => {\n const result = await schema.safeParseAsync({ ...validParams, host: \"\" });\n expect(result.success).toBe(false);\n });\n\n it(\"rejects missing user\", async () => {\n const { user: _, ...params } = validParams;\n const result = await schema.safeParseAsync(params);\n expect(result.success).toBe(false);\n });\n\n it(\"rejects empty user\", async () => {\n const result = await schema.safeParseAsync({ ...validParams, user: \"\" });\n expect(result.success).toBe(false);\n });\n\n it(\"rejects missing password\", async () => {\n const { password: _, ...params } = validParams;\n const result = await schema.safeParseAsync(params);\n expect(result.success).toBe(false);\n });\n\n it(\"rejects empty password\", async () => {\n const result = await schema.safeParseAsync({ ...validParams, password: \"\" });\n expect(result.success).toBe(false);\n });\n });\n\n describe(\"port validation\", () => {\n it(\"rejects port 0\", async () => {\n const result = await schema.safeParseAsync({ ...validParams, port: 0 });\n expect(result.success).toBe(false);\n });\n\n it(\"rejects negative port\", async () => {\n const result = await schema.safeParseAsync({ ...validParams, port: -1 });\n expect(result.success).toBe(false);\n });\n\n it(\"rejects fractional port\", async () => {\n const result = await schema.safeParseAsync({ ...validParams, port: 587.5 });\n expect(result.success).toBe(false);\n });\n });\n\n describe(\"email address validation\", () => {\n it(\"rejects invalid from address\", async () => {\n const result = await schema.safeParseAsync({ ...validParams, from: \"not-an-email\" });\n expect(result.success).toBe(false);\n expect(result.error?.issues[0].message).toBe(\"Invalid email address.\");\n });\n\n it(\"rejects invalid replyTo address\", async () => {\n const result = await schema.safeParseAsync({\n ...validParams,\n replyTo: \"not-an-email\"\n });\n expect(result.success).toBe(false);\n expect(result.error?.issues[0].message).toBe(\"Invalid email address.\");\n });\n });\n});\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,EAAE,EAAEC,MAAM,QAAQ,QAAQ;AAC7C,SAASC,gBAAgB,IAAIC,MAAM;AAEnC,MAAMC,WAAW,GAAG;EAChBC,IAAI,EAAE,kBAAkB;EACxBC,IAAI,EAAE,GA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resses from "email-addresses";
|
|
3
|
+
|
|
4
|
+
// Accept both addr-spec ("foo@bar.com") and name-addr ("Foo <foo@bar.com>") forms.
|
|
5
|
+
const isMailboxAddress = value => {
|
|
6
|
+
return emailAddresses.parseOneAddress(value) !== null;
|
|
7
|
+
};
|
|
8
|
+
const mailboxAddress = z.string().refine(isMailboxAddress, {
|
|
9
|
+
message: "Invalid email address."
|
|
10
|
+
});
|
|
11
|
+
export const SmtpParamsSchema = z.object({
|
|
12
|
+
host: z.string().min(1).describe("SMTP server hostname."),
|
|
13
|
+
port: z.number().int().positive().describe("SMTP server port."),
|
|
14
|
+
user: z.string().min(1).describe("SMTP authentication username."),
|
|
15
|
+
password: z.string().min(1).describe("SMTP authentication password. Pass via env var (e.g. `process.env.SMTP_PASSWORD!`), never hard-code."),
|
|
16
|
+
from: mailboxAddress.describe("Default 'from' address."),
|
|
17
|
+
replyTo: mailboxAddress.optional().describe("Default 'reply-to' address.")
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=SmtpParamsSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["z","emailAddresses","isMailboxAddress","value","parseOneAddress","mailboxAddress","string","refine","message","SmtpParamsSchema","object","host","min","describe","port","number","int","positive","user","password","from","replyTo","optional"],"sources":["SmtpParamsSchema.ts"],"sourcesContent":["import { z } from \"zod\";\nimport emailAddresses from \"email-addresses\";\n\n// Accept both addr-spec (\"foo@bar.com\") and name-addr (\"Foo <foo@bar.com>\") forms.\nconst isMailboxAddress = (value: string): boolean => {\n return emailAddresses.parseOneAddress(value) !== null;\n};\n\nconst mailboxAddress = z.string().refine(isMailboxAddress, { message: \"Invalid email address.\" });\n\nexport const SmtpParamsSchema = z.object({\n host: z.string().min(1).describe(\"SMTP server hostname.\"),\n port: z.number().int().positive().describe(\"SMTP server port.\"),\n user: z.string().min(1).describe(\"SMTP authentication username.\"),\n password: z\n .string()\n .min(1)\n .describe(\n \"SMTP authentication password. Pass via env var (e.g. `process.env.SMTP_PASSWORD!`), never hard-code.\"\n ),\n from: mailboxAddress.describe(\"Default 'from' address.\"),\n replyTo: mailboxAddress.optional().describe(\"Default 'reply-to' address.\")\n});\n"],"mappings":"AAAA,SAASA,CAAC,QAAQ,KAAK;AACvB,OAAOC,cAAc,MAAM,iBAAiB;;AAE5C;AACA,MAAMC,gBAAgB,GAAIC,KAAa,IAAc;EACjD,OAAOF,cAAc,CAACG,eAAe,CAACD,KAAK,CAAC,KAAK,IAAI;AACzD,CAAC;AAED,MAAME,cAAc,GAAGL,CAAC,CAACM,MAAM,CAAC,CAAC,CAACC,MAAM,CAACL,gBAAgB,EAAE;EAAEM,OAAO,EAAE;AAAyB,CAAC,CAAC;AAEjG,OAAO,MAAMC,gBAAgB,GAAGT,CAAC,CAACU,MAAM,CAAC;EACrCC,IAAI,EAAEX,CAAC,CAACM,MAAM,CAAC,CAAC,CAACM,GAAG,CAAC,CAAC,CAAC,CAACC,QAAQ,CAAC,uBAAuB,CAAC;EACzDC,IAAI,EAAEd,CAAC,CAACe,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,CAACJ,QAAQ,CAAC,mBAAmB,CAAC;EAC/DK,IAAI,EAAElB,CAAC,CAACM,MAAM,CAAC,CAAC,CAACM,GAAG,CAAC,CAAC,CAAC,CAACC,QAAQ,CAAC,+BAA+B,CAAC;EACjEM,QAAQ,EAAEnB,CAAC,CACNM,MAAM,CAAC,CAAC,CACRM,GAAG,CAAC,CAAC,CAAC,CACNC,QAAQ,CACL,sGACJ,CAAC;EACLO,IAAI,EAAEf,cAAc,CAACQ,QAAQ,CAAC,yBAAyB,CAAC;EACxDQ,OAAO,EAAEhB,cAAc,CAACiB,QAAQ,CAAC,CAAC,CAACT,QAAQ,CAAC,6BAA6B;AAC7E,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GetProjectConfigService } from "@webiny/project/abstractions/index.js";
|
|
2
|
+
import { CorePulumi } from "../../abstractions/features/pulumi/index.js";
|
|
3
|
+
import type { CorePulumiApp } from "../../pulumi/apps/core/createCorePulumiApp.js";
|
|
2
4
|
declare class SetDatabaseSetupOutputImpl implements CorePulumi.Interface {
|
|
3
5
|
private getProjectConfigService;
|
|
4
6
|
constructor(getProjectConfigService: GetProjectConfigService.Interface);
|
|
5
|
-
execute(app:
|
|
7
|
+
execute(app: CorePulumiApp): Promise<void>;
|
|
6
8
|
}
|
|
7
9
|
export declare const SetDatabaseSetupOutput: typeof SetDatabaseSetupOutputImpl & {
|
|
8
|
-
__abstraction: import("@webiny/di").Abstraction<import("
|
|
10
|
+
__abstraction: import("@webiny/di").Abstraction<import("~/abstractions/features/pulumi/index.js").ICorePulumi>;
|
|
9
11
|
};
|
|
10
12
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GetProjectConfigService } from "@webiny/project/abstractions/index.js";
|
|
2
2
|
import { DatabaseSetup } from "@webiny/project/extensions/index.js";
|
|
3
|
+
import { CorePulumi } from "../../abstractions/features/pulumi/index.js";
|
|
3
4
|
class SetDatabaseSetupOutputImpl {
|
|
4
5
|
constructor(getProjectConfigService) {
|
|
5
6
|
this.getProjectConfigService = getProjectConfigService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["GetProjectConfigService","DatabaseSetup","CorePulumi","SetDatabaseSetupOutputImpl","constructor","getProjectConfigService","execute","app","projectConfig","databaseSetupExtension","extensionsByType","databaseSetup","params","setupName","addOutputs","SetDatabaseSetupOutput","createImplementation","implementation","dependencies"],"sources":["SetDatabaseSetupOutput.ts"],"sourcesContent":["import { GetProjectConfigService } from \"@webiny/project/abstractions/index.js\";\nimport { DatabaseSetup } from \"@webiny/project/extensions/index.js\";\nimport { CorePulumi } from \"~/abstractions/features/pulumi/index.js\";\nimport type { CorePulumiApp } from \"~/pulumi/apps/core/createCorePulumiApp.js\";\n\nclass SetDatabaseSetupOutputImpl implements CorePulumi.Interface {\n constructor(private getProjectConfigService: GetProjectConfigService.Interface) {}\n\n async execute(app: CorePulumiApp): Promise<void> {\n // Get the DatabaseSetup extension value\n const projectConfig = await this.getProjectConfigService.execute();\n\n const [databaseSetupExtension] = projectConfig.extensionsByType(DatabaseSetup);\n\n if (databaseSetupExtension) {\n const databaseSetup = databaseSetupExtension.params.setupName;\n app.addOutputs({\n databaseSetup\n });\n } else {\n // Default to 'ddb' if no DatabaseSetup extension is found\n app.addOutputs({\n databaseSetup: \"ddb\"\n });\n }\n }\n}\n\nexport const SetDatabaseSetupOutput = CorePulumi.createImplementation({\n implementation: SetDatabaseSetupOutputImpl,\n dependencies: [GetProjectConfigService]\n});\n"],"mappings":"AAAA,SAASA,uBAAuB,QAAQ,uCAAuC;AAC/E,SAASC,aAAa,QAAQ,qCAAqC;AACnE,SAASC,UAAU;AAGnB,MAAMC,0BAA0B,CAAiC;EAC7DC,WAAWA,CAASC,uBAA0D,EAAE;IAAA,KAA5DA,uBAA0D,GAA1DA,uBAA0D;EAAG;EAEjF,MAAMC,OAAOA,CAACC,GAAkB,EAAiB;IAC7C;IACA,MAAMC,aAAa,GAAG,MAAM,IAAI,CAACH,uBAAuB,CAACC,OAAO,CAAC,CAAC;IAElE,MAAM,CAACG,sBAAsB,CAAC,GAAGD,aAAa,CAACE,gBAAgB,CAACT,aAAa,CAAC;IAE9E,IAAIQ,sBAAsB,EAAE;MACxB,MAAME,aAAa,GAAGF,sBAAsB,CAACG,MAAM,CAACC,SAAS;MAC7DN,GAAG,CAACO,UAAU,CAAC;QACXH;MACJ,CAAC,CAAC;IACN,CAAC,MAAM;MACH;MACAJ,GAAG,CAACO,UAAU,CAAC;QACXH,aAAa,EAAE;MACnB,CAAC,CAAC;IACN;EACJ;AACJ;AAEA,OAAO,MAAMI,sBAAsB,GAAGb,UAAU,CAACc,oBAAoB,CAAC;EAClEC,cAAc,EAAEd,0BAA0B;EAC1Ce,YAAY,EAAE,CAAClB,uBAAuB;AAC1C,CAAC,CAAC","ignoreList":[]}
|
package/extensions/ProjectAws.js
CHANGED
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { AdminAfterDeploy, AdminBeforeBuild, AdminBeforeWatch, AfterDeploy, ApiAfterDeploy, BeforeDeploy, DatabaseSetup, ExtensionDefinitions, Project, ProjectDecorator, ProjectImplementation } from "@webiny/project/extensions/index.js";
|
|
3
3
|
import { createPathResolver } from "@webiny/project";
|
|
4
4
|
import { CliCommand } from "@webiny/cli-core/extensions/index.js";
|
|
5
|
-
import { CorePulumi } from "
|
|
5
|
+
import { CorePulumi } from "../pulumi/extensions/CorePulumi.js";
|
|
6
6
|
const p = createPathResolver(import.meta.dirname);
|
|
7
7
|
export const ProjectAws = () => {
|
|
8
8
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Project, null), /*#__PURE__*/React.createElement(ProjectDecorator, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","AdminAfterDeploy","AdminBeforeBuild","AdminBeforeWatch","AfterDeploy","ApiAfterDeploy","BeforeDeploy","DatabaseSetup","ExtensionDefinitions","Project","ProjectDecorator","ProjectImplementation","createPathResolver","CliCommand","CorePulumi","p","import","meta","dirname","ProjectAws","createElement","Fragment","src","setupName","singleton"],"sources":["ProjectAws.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n AdminAfterDeploy,\n AdminBeforeBuild,\n AdminBeforeWatch,\n AfterDeploy,\n ApiAfterDeploy,\n BeforeDeploy,\n DatabaseSetup,\n ExtensionDefinitions,\n Project,\n ProjectDecorator,\n ProjectImplementation\n} from \"@webiny/project/extensions/index.js\";\nimport { createPathResolver } from \"@webiny/project\";\nimport { CliCommand } from \"@webiny/cli-core/extensions/index.js\";\nimport { CorePulumi } from \"
|
|
1
|
+
{"version":3,"names":["React","AdminAfterDeploy","AdminBeforeBuild","AdminBeforeWatch","AfterDeploy","ApiAfterDeploy","BeforeDeploy","DatabaseSetup","ExtensionDefinitions","Project","ProjectDecorator","ProjectImplementation","createPathResolver","CliCommand","CorePulumi","p","import","meta","dirname","ProjectAws","createElement","Fragment","src","setupName","singleton"],"sources":["ProjectAws.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n AdminAfterDeploy,\n AdminBeforeBuild,\n AdminBeforeWatch,\n AfterDeploy,\n ApiAfterDeploy,\n BeforeDeploy,\n DatabaseSetup,\n ExtensionDefinitions,\n Project,\n ProjectDecorator,\n ProjectImplementation\n} from \"@webiny/project/extensions/index.js\";\nimport { createPathResolver } from \"@webiny/project\";\nimport { CliCommand } from \"@webiny/cli-core/extensions/index.js\";\nimport { CorePulumi } from \"~/pulumi/extensions/CorePulumi.js\";\n\nconst p = createPathResolver(import.meta.dirname);\n\nexport const ProjectAws = () => {\n return (\n <>\n <Project />\n <ProjectDecorator src={p(\"ProjectAws/BuildAppWorkspace.js\")} />\n\n {/* Database Setup - default to DynamoDB only */}\n <DatabaseSetup setupName=\"ddb\" />\n\n {/* Set database setup output value in Core stack */}\n <CorePulumi src={p(\"ProjectAws/SetDatabaseSetupOutput.js\")} />\n\n {/* Stack Output Services */}\n <ProjectImplementation src={p(\"ProjectAws/CoreStackOutputService.js\")} singleton />\n <ProjectImplementation src={p(\"ProjectAws/ApiStackOutputService.js\")} singleton />\n <ProjectImplementation src={p(\"ProjectAws/AdminStackOutputService.js\")} singleton />\n\n <ProjectImplementation src={p(\"../features/InvokeLambdaFunction.js\")} singleton />\n <ProjectImplementation src={p(\"../features/ApiGqlClient.js\")} singleton />\n\n <AdminAfterDeploy src={p(\"ProjectAws/UploadAdminAppToS3.js\")} />\n\n <ApiAfterDeploy src={p(\"ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.js\")} />\n <ExtensionDefinitions src={p(\"definitions.js\")} />\n <ExtensionDefinitions src={p(\"ProjectAws/definitions.js\")} />\n\n {/* Admin env vars */}\n <AdminBeforeBuild src={p(\"ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeBuild.js\")} />\n <AdminBeforeWatch src={p(\"ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeWatch.js\")} />\n\n {/* AWS credentials check */}\n <BeforeDeploy src={p(\"ProjectAws/EnsureAwsCredentialsBeforeDeploy.js\")} />\n\n {/* Blue-green */}\n <CliCommand src={p(\"ProjectAws/BlueGreenDeployments/SetPrimaryVariantCliCommand.js\")} />\n <BeforeDeploy src={p(\"ProjectAws/BlueGreenDeployments/EnsureVariantBeforeDeploy.js\")} />\n <AfterDeploy\n src={p(\"ProjectAws/BlueGreenDeployments/PrintDeploymentInfoAfterDeploy.js\")}\n />\n </>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACIC,gBAAgB,EAChBC,gBAAgB,EAChBC,gBAAgB,EAChBC,WAAW,EACXC,cAAc,EACdC,YAAY,EACZC,aAAa,EACbC,oBAAoB,EACpBC,OAAO,EACPC,gBAAgB,EAChBC,qBAAqB,QAClB,qCAAqC;AAC5C,SAASC,kBAAkB,QAAQ,iBAAiB;AACpD,SAASC,UAAU,QAAQ,sCAAsC;AACjE,SAASC,UAAU;AAEnB,MAAMC,CAAC,GAAGH,kBAAkB,CAACI,MAAM,CAACC,IAAI,CAACC,OAAO,CAAC;AAEjD,OAAO,MAAMC,UAAU,GAAGA,CAAA,KAAM;EAC5B,oBACInB,KAAA,CAAAoB,aAAA,CAAApB,KAAA,CAAAqB,QAAA,qBACIrB,KAAA,CAAAoB,aAAA,CAACX,OAAO,MAAE,CAAC,eACXT,KAAA,CAAAoB,aAAA,CAACV,gBAAgB;IAACY,GAAG,EAAEP,CAAC,CAAC,iCAAiC;EAAE,CAAE,CAAC,eAG/Df,KAAA,CAAAoB,aAAA,CAACb,aAAa;IAACgB,SAAS,EAAC;EAAK,CAAE,CAAC,eAGjCvB,KAAA,CAAAoB,aAAA,CAACN,UAAU;IAACQ,GAAG,EAAE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EAAE,CAAE,CAAC,eAGxFf,KAAA,CAAAoB,aAAA,CAACd,YAAY;IAACgB,GAAG,EAAEP,CAAC,CAAC,gDAAgD;EAAE,CAAE,CAAC,eAG1Ef,KAAA,CAAAoB,aAAA,CAACP,UAAU;IAACS,GAAG,EAAEP,CAAC,CAAC,gEAAgE;EAAE,CAAE,CAAC,eACxFf,KAAA,CAAAoB,aAAA,CAACd,YAAY;IAACgB,GAAG,EAAEP,CAAC,CAAC,8DAA8D;EAAE,CAAE,CAAC,eACxFf,KAAA,CAAAoB,aAAA,CAAChB,WAAW;IACRkB,GAAG,EAAEP,CAAC,CAAC,mEAAmE;EAAE,CAC/E,CACH,CAAC;AAEX,CAAC","ignoreList":[]}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GetProjectConfigService } from "@webiny/project/abstractions/index.js";
|
|
2
|
+
import { ApiPulumi } from "../abstractions/features/pulumi/index.js";
|
|
3
|
+
import type { ApiPulumiApp } from "../pulumi/apps/api/createApiPulumiApp.js";
|
|
2
4
|
declare class RegisterRoutesPulumiImpl implements ApiPulumi.Interface {
|
|
3
5
|
private getProjectConfigService;
|
|
4
6
|
constructor(getProjectConfigService: GetProjectConfigService.Interface);
|
|
5
|
-
execute(app:
|
|
7
|
+
execute(app: ApiPulumiApp): Promise<void>;
|
|
6
8
|
}
|
|
7
9
|
export declare const RegisterRoutesPulumi: typeof RegisterRoutesPulumiImpl & {
|
|
8
|
-
__abstraction: import("@webiny/di").Abstraction<import("
|
|
10
|
+
__abstraction: import("@webiny/di").Abstraction<import("~/abstractions/features/pulumi/index.js").IApiPulumi>;
|
|
9
11
|
};
|
|
10
12
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GetProjectConfigService } from "@webiny/project/abstractions/index.js";
|
|
2
|
+
import { ApiPulumi } from "../abstractions/features/pulumi/index.js";
|
|
2
3
|
import { ApiRoute } from "./ApiRoute.js";
|
|
3
4
|
import { ApiGraphql } from "../pulumi/apps/api/ApiGraphql.js";
|
|
4
5
|
function deriveRouteName(routePath, method) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["GetProjectConfigService","ApiPulumi","ApiRoute","ApiGraphql","deriveRouteName","routePath","method","pathPart","replace","toLowerCase","RegisterRoutesPulumiImpl","constructor","getProjectConfigService","execute","app","projectConfig","routeExtensions","extensionsByType","length","graphqlModule","getModule","ext","path","routeName","params","name","addRoute","RegisterRoutesPulumi","createImplementation","implementation","dependencies"],"sources":["RegisterRoutesPulumi.ts"],"sourcesContent":["import { GetProjectConfigService } from \"@webiny/project/abstractions/index.js\";\nimport { ApiPulumi } from \"~/abstractions/features/pulumi/index.js\";\nimport type { ApiPulumiApp } from \"~/pulumi/apps/api/createApiPulumiApp.js\";\nimport { ApiRoute } from \"./ApiRoute.js\";\nimport { ApiGraphql } from \"~/pulumi/apps/api/ApiGraphql.js\";\n\nfunction deriveRouteName(routePath: string, method: string): string {\n // /asd/{id}/xs + POST → asd-xs-post\n const pathPart = routePath\n .replace(/^\\//, \"\")\n .replace(/\\{[^}]*\\}/g, \"\")\n .replace(/\\/+/g, \"-\")\n .replace(/^-+|-+$/g, \"\")\n .toLowerCase();\n\n return `${pathPart}-${method.toLowerCase()}`;\n}\n\nclass RegisterRoutesPulumiImpl implements ApiPulumi.Interface {\n constructor(private getProjectConfigService: GetProjectConfigService.Interface) {}\n\n async execute(app: ApiPulumiApp): Promise<void> {\n // No tags filter — finds ApiRestRoute extensions regardless of their runtimeContext.\n const projectConfig = await this.getProjectConfigService.execute();\n const routeExtensions = projectConfig.extensionsByType(ApiRoute);\n\n if (!routeExtensions.length) {\n return;\n }\n\n const graphqlModule = app.getModule(ApiGraphql);\n\n for (const ext of routeExtensions) {\n const { path: routePath, method, routeName } = ext.params;\n const name = routeName ?? deriveRouteName(routePath, method);\n graphqlModule.addRoute({\n name,\n path: routePath as `/${string}`,\n method\n });\n }\n }\n}\n\nexport const RegisterRoutesPulumi = ApiPulumi.createImplementation({\n implementation: RegisterRoutesPulumiImpl,\n dependencies: [GetProjectConfigService]\n});\n"],"mappings":"AAAA,SAASA,uBAAuB,QAAQ,uCAAuC;AAC/E,SAASC,SAAS;AAElB,SAASC,QAAQ;AACjB,SAASC,UAAU;AAEnB,SAASC,eAAeA,CAACC,SAAiB,EAAEC,MAAc,EAAU;EAChE;EACA,MAAMC,QAAQ,GAAGF,SAAS,CACrBG,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAClBA,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CACzBA,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CACpBA,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CACvBC,WAAW,CAAC,CAAC;EAElB,OAAO,GAAGF,QAAQ,IAAID,MAAM,CAACG,WAAW,CAAC,CAAC,EAAE;AAChD;AAEA,MAAMC,wBAAwB,CAAgC;EAC1DC,WAAWA,CAASC,uBAA0D,EAAE;IAAA,KAA5DA,uBAA0D,GAA1DA,uBAA0D;EAAG;EAEjF,MAAMC,OAAOA,CAACC,GAAiB,EAAiB;IAC5C;IACA,MAAMC,aAAa,GAAG,MAAM,IAAI,CAACH,uBAAuB,CAACC,OAAO,CAAC,CAAC;IAClE,MAAMG,eAAe,GAAGD,aAAa,CAACE,gBAAgB,CAACf,QAAQ,CAAC;IAEhE,IAAI,CAACc,eAAe,CAACE,MAAM,EAAE;MACzB;IACJ;IAEA,MAAMC,aAAa,GAAGL,GAAG,CAACM,SAAS,CAACjB,UAAU,CAAC;IAE/C,KAAK,MAAMkB,GAAG,IAAIL,eAAe,EAAE;MAC/B,MAAM;QAAEM,IAAI,EAAEjB,SAAS;QAAEC,MAAM;QAAEiB;MAAU,CAAC,GAAGF,GAAG,CAACG,MAAM;MACzD,MAAMC,IAAI,GAAGF,SAAS,IAAInB,eAAe,CAACC,SAAS,EAAEC,MAAM,CAAC;MAC5Da,aAAa,CAACO,QAAQ,CAAC;QACnBD,IAAI;QACJH,IAAI,EAAEjB,SAAyB;QAC/BC;MACJ,CAAC,CAAC;IACN;EACJ;AACJ;AAEA,OAAO,MAAMqB,oBAAoB,GAAG1B,SAAS,CAAC2B,oBAAoB,CAAC;EAC/DC,cAAc,EAAEnB,wBAAwB;EACxCoB,YAAY,EAAE,CAAC9B,uBAAuB;AAC1C,CAAC,CAAC","ignoreList":[]}
|
|
@@ -2,7 +2,8 @@ import { ApiLambdaFunction } from "./ApiLambdaFunction.js";
|
|
|
2
2
|
import { ApiRoute } from "./ApiRoute.js";
|
|
3
3
|
import { OpenSearch } from "./OpenSearch.js";
|
|
4
4
|
import { Encryption } from "./Encryption.js";
|
|
5
|
-
|
|
5
|
+
import { Smtp as MailerSmtp } from "./Mailer/Smtp.js";
|
|
6
|
+
const definitions = [ApiLambdaFunction.def, ApiRoute.def, OpenSearch.def, Encryption.def, MailerSmtp.def];
|
|
6
7
|
export default definitions;
|
|
7
8
|
|
|
8
9
|
//# sourceMappingURL=definitions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ApiLambdaFunction","ApiRoute","OpenSearch","Encryption","definitions","def"],"sources":["definitions.ts"],"sourcesContent":["import { ApiLambdaFunction } from \"./ApiLambdaFunction.js\";\nimport { ApiRoute } from \"./ApiRoute.js\";\nimport { OpenSearch } from \"./OpenSearch.js\";\nimport { Encryption } from \"./Encryption.js\";\nimport { type ExtensionDefinitionModel } from \"@webiny/project/defineExtension\";\n\nconst definitions = [\n ApiLambdaFunction.def,\n ApiRoute.def,\n OpenSearch.def,\n Encryption.def\n] as unknown as ExtensionDefinitionModel<any>[];\n\nexport default definitions;\n"],"mappings":"AAAA,SAASA,iBAAiB;AAC1B,SAASC,QAAQ;AACjB,SAASC,UAAU;AACnB,SAASC,UAAU;
|
|
1
|
+
{"version":3,"names":["ApiLambdaFunction","ApiRoute","OpenSearch","Encryption","Smtp","MailerSmtp","definitions","def"],"sources":["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"],"mappings":"AAAA,SAASA,iBAAiB;AAC1B,SAASC,QAAQ;AACjB,SAASC,UAAU;AACnB,SAASC,UAAU;AACnB,SAASC,IAAI,IAAIC,UAAU;AAG3B,MAAMC,WAAW,GAAG,CAChBN,iBAAiB,CAACO,GAAG,EACrBN,QAAQ,CAACM,GAAG,EACZL,UAAU,CAACK,GAAG,EACdJ,UAAU,CAACI,GAAG,EACdF,UAAU,CAACE,GAAG,CAC6B;AAE/C,eAAeD,WAAW","ignoreList":[]}
|
package/extensions/index.d.ts
CHANGED
package/extensions/index.js
CHANGED
package/extensions/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./OpenSearch.js\";\nexport * from \"./AwsDefaultRegion.js\";\nexport * from \"./ProjectAws/AutoInstall.js\";\nexport * from \"./ProjectAws.js\";\nexport * from \"./ApiLambdaFunction.js\";\nexport * from \"./ApiRoute.js\";\nexport * from \"./Encryption.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["Smtp","MailerSmtp"],"sources":["index.ts"],"sourcesContent":["export * from \"./OpenSearch.js\";\nexport * from \"./AwsDefaultRegion.js\";\nexport * from \"./ProjectAws/AutoInstall.js\";\nexport * from \"./ProjectAws.js\";\nexport * from \"./ApiLambdaFunction.js\";\nexport * from \"./ApiRoute.js\";\nexport * from \"./Encryption.js\";\nexport { Smtp as MailerSmtp } from \"./Mailer/Smtp.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,IAAI,IAAIC,UAAU","ignoreList":[]}
|
package/infra.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { useEnv } from "@webiny/project/extensions/infra/index.js";
|
|
2
|
+
export { useEnv };
|
|
1
3
|
export declare const Infra: {
|
|
2
4
|
Encryption: import("@webiny/project/defineExtension/defineExtension.js").ExtensionComponent<import("zod").ZodObject<{
|
|
3
5
|
passphrase: import("zod").ZodString;
|
|
@@ -73,8 +75,15 @@ export declare const Infra: {
|
|
|
73
75
|
}, import("zod/v4/core").$strip>>;
|
|
74
76
|
};
|
|
75
77
|
Env: {
|
|
78
|
+
useEnv: () => string;
|
|
76
79
|
Is: import("react").FC<import("@webiny/project/extensions/infra/Env.js").EnvIsProps>;
|
|
77
80
|
IsNot: import("react").FC<import("@webiny/project/extensions/infra/Env.js").EnvIsProps>;
|
|
81
|
+
IsProd: import("react").FC<{
|
|
82
|
+
children: React.ReactNode;
|
|
83
|
+
}>;
|
|
84
|
+
IsNotProd: import("react").FC<{
|
|
85
|
+
children: React.ReactNode;
|
|
86
|
+
}>;
|
|
78
87
|
};
|
|
79
88
|
Ci: {
|
|
80
89
|
Is: import("react").FC<import("@webiny/project/extensions/infra/Ci.js").CiIsProps>;
|
package/infra.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { AdminAfterBuild, AdminAfterDeploy, AdminBeforeBuild, AdminBeforeDeploy, AdminBeforeWatch,
|
|
1
|
+
import { AdminAfterBuild, AdminAfterDeploy, AdminBeforeBuild, AdminBeforeDeploy, AdminBeforeWatch, AdminStackOutputValue, ApiAfterBuild, ApiAfterDeploy, ApiBeforeBuild, ApiBeforeDeploy, ApiBeforeWatch, ApiStackOutputValue, CoreAfterBuild, CoreAfterDeploy, CoreBeforeBuild, CoreBeforeDeploy, CoreBeforeWatch, CoreStackOutputValue, ProductionEnvironments, PulumiResourceNamePrefix } from "@webiny/project/extensions/index.js";
|
|
2
|
+
import { CorePulumi, ApiPulumi, AdminPulumi } from "./pulumi/extensions/index.js";
|
|
2
3
|
import { AdminCustomDomains, ApiCustomDomains, AwsTags, BlueGreenDeployments, Vpc } from "./pulumi/extensions/index.js";
|
|
3
4
|
import { OpenSearch } from "./extensions/OpenSearch.js";
|
|
4
5
|
import { AwsDefaultRegion } from "./extensions/AwsDefaultRegion.js";
|
|
5
6
|
import { Encryption } from "./extensions/Encryption.js";
|
|
6
7
|
import { ApiLambdaFunction } from "./extensions/ApiLambdaFunction.js";
|
|
7
8
|
import { EnvVar } from "@webiny/project/extensions/index.js";
|
|
8
|
-
import { EnvIs, EnvIsNot, CiIs, CiIsNot } from "@webiny/project/extensions/infra/index.js";
|
|
9
|
+
import { EnvIs, EnvIsNot, EnvIsProd, EnvIsNotProd, useEnv, CiIs, CiIsNot } from "@webiny/project/extensions/infra/index.js";
|
|
10
|
+
export { useEnv };
|
|
9
11
|
export const Infra = {
|
|
10
12
|
Encryption,
|
|
11
13
|
Vpc,
|
|
@@ -19,8 +21,11 @@ export const Infra = {
|
|
|
19
21
|
Tags: AwsTags
|
|
20
22
|
},
|
|
21
23
|
Env: {
|
|
24
|
+
useEnv,
|
|
22
25
|
Is: EnvIs,
|
|
23
|
-
IsNot: EnvIsNot
|
|
26
|
+
IsNot: EnvIsNot,
|
|
27
|
+
IsProd: EnvIsProd,
|
|
28
|
+
IsNotProd: EnvIsNotProd
|
|
24
29
|
},
|
|
25
30
|
Ci: {
|
|
26
31
|
Is: CiIs,
|
package/infra.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AdminAfterBuild","AdminAfterDeploy","AdminBeforeBuild","AdminBeforeDeploy","AdminBeforeWatch","
|
|
1
|
+
{"version":3,"names":["AdminAfterBuild","AdminAfterDeploy","AdminBeforeBuild","AdminBeforeDeploy","AdminBeforeWatch","AdminStackOutputValue","ApiAfterBuild","ApiAfterDeploy","ApiBeforeBuild","ApiBeforeDeploy","ApiBeforeWatch","ApiStackOutputValue","CoreAfterBuild","CoreAfterDeploy","CoreBeforeBuild","CoreBeforeDeploy","CoreBeforeWatch","CoreStackOutputValue","ProductionEnvironments","PulumiResourceNamePrefix","CorePulumi","ApiPulumi","AdminPulumi","AdminCustomDomains","ApiCustomDomains","AwsTags","BlueGreenDeployments","Vpc","OpenSearch","AwsDefaultRegion","Encryption","ApiLambdaFunction","EnvVar","EnvIs","EnvIsNot","EnvIsProd","EnvIsNotProd","useEnv","CiIs","CiIsNot","Infra","Aws","DefaultRegion","Tags","Env","Is","IsNot","IsProd","IsNotProd","Ci","Admin","BeforeBuild","BeforeDeploy","BeforeWatch","AfterBuild","AfterDeploy","Pulumi","CustomDomains","StackOutputValue","Api","LambdaFunction","Core"],"sources":["infra.ts"],"sourcesContent":["import {\n AdminAfterBuild,\n AdminAfterDeploy,\n AdminBeforeBuild,\n AdminBeforeDeploy,\n AdminBeforeWatch,\n AdminStackOutputValue,\n ApiAfterBuild,\n ApiAfterDeploy,\n ApiBeforeBuild,\n ApiBeforeDeploy,\n ApiBeforeWatch,\n ApiStackOutputValue,\n CoreAfterBuild,\n CoreAfterDeploy,\n CoreBeforeBuild,\n CoreBeforeDeploy,\n CoreBeforeWatch,\n CoreStackOutputValue,\n ProductionEnvironments,\n PulumiResourceNamePrefix\n} from \"@webiny/project/extensions/index.js\";\n\nimport { CorePulumi, ApiPulumi, AdminPulumi } from \"./pulumi/extensions/index.js\";\n\nimport {\n AdminCustomDomains,\n ApiCustomDomains,\n AwsTags,\n BlueGreenDeployments,\n Vpc\n} from \"./pulumi/extensions/index.js\";\n\nimport { OpenSearch } from \"./extensions/OpenSearch.js\";\nimport { AwsDefaultRegion } from \"./extensions/AwsDefaultRegion.js\";\nimport { Encryption } from \"./extensions/Encryption.js\";\nimport { ApiLambdaFunction } from \"./extensions/ApiLambdaFunction.js\";\nimport { EnvVar } from \"@webiny/project/extensions/index.js\";\nimport {\n EnvIs,\n EnvIsNot,\n EnvIsProd,\n EnvIsNotProd,\n useEnv,\n CiIs,\n CiIsNot\n} from \"@webiny/project/extensions/infra/index.js\";\n\nexport { useEnv };\n\nexport const Infra = {\n Encryption,\n Vpc,\n BlueGreenDeployments,\n OpenSearch,\n PulumiResourceNamePrefix,\n ProductionEnvironments,\n EnvVar,\n Aws: {\n DefaultRegion: AwsDefaultRegion,\n Tags: AwsTags\n },\n Env: {\n useEnv,\n Is: EnvIs,\n IsNot: EnvIsNot,\n IsProd: EnvIsProd,\n IsNotProd: EnvIsNotProd\n },\n Ci: {\n Is: CiIs,\n IsNot: CiIsNot\n },\n Admin: {\n BeforeBuild: AdminBeforeBuild,\n BeforeDeploy: AdminBeforeDeploy,\n BeforeWatch: AdminBeforeWatch,\n AfterBuild: AdminAfterBuild,\n AfterDeploy: AdminAfterDeploy,\n Pulumi: AdminPulumi,\n CustomDomains: AdminCustomDomains,\n StackOutputValue: AdminStackOutputValue\n },\n Api: {\n BeforeBuild: ApiBeforeBuild,\n BeforeDeploy: ApiBeforeDeploy,\n BeforeWatch: ApiBeforeWatch,\n AfterBuild: ApiAfterBuild,\n AfterDeploy: ApiAfterDeploy,\n Pulumi: ApiPulumi,\n CustomDomains: ApiCustomDomains,\n StackOutputValue: ApiStackOutputValue,\n LambdaFunction: ApiLambdaFunction\n },\n Core: {\n BeforeBuild: CoreBeforeBuild,\n BeforeDeploy: CoreBeforeDeploy,\n BeforeWatch: CoreBeforeWatch,\n AfterBuild: CoreAfterBuild,\n AfterDeploy: CoreAfterDeploy,\n Pulumi: CorePulumi,\n StackOutputValue: CoreStackOutputValue\n }\n};\n"],"mappings":"AAAA,SACIA,eAAe,EACfC,gBAAgB,EAChBC,gBAAgB,EAChBC,iBAAiB,EACjBC,gBAAgB,EAChBC,qBAAqB,EACrBC,aAAa,EACbC,cAAc,EACdC,cAAc,EACdC,eAAe,E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R,WAAW,EAAE3C,cAAc;IAC3B4C,YAAY,EAAE3C,eAAe;IAC7B4C,WAAW,EAAE3C,cAAc;IAC3B4C,UAAU,EAAEhD,aAAa;IACzBiD,WAAW,EAAEhD,cAAc;IAC3BiD,MAAM,EAAEnC,SAAS;IACjBoC,aAAa,EAAEjC,gBAAgB;IAC/BkC,gBAAgB,EAAE/C,mBAAmB;IACrCiD,cAAc,EAAE7B;EACpB,CAAC;EACD8B,IAAI,EAAE;IACFV,WAAW,EAAErC,eAAe;IAC5BsC,YAAY,EAAErC,gBAAgB;IAC9BsC,WAAW,EAAErC,eAAe;IAC5BsC,UAAU,EAAE1C,cAAc;IAC1B2C,WAAW,EAAE1C,eAAe;IAC5B2C,MAAM,EAAEpC,UAAU;IAClBsC,gBAAgB,EAAEzC;EACtB;AACJ,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/project-aws",
|
|
3
|
-
"version": "6.3.0-beta.
|
|
3
|
+
"version": "6.3.0-beta.3",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"
|
|
5
|
+
"exports": {
|
|
6
|
+
".": "./index.js",
|
|
7
|
+
"./*": "./*"
|
|
8
|
+
},
|
|
6
9
|
"repository": {
|
|
7
10
|
"type": "git",
|
|
8
11
|
"url": "https://github.com/webiny/webiny-js.git"
|
|
@@ -15,17 +18,19 @@
|
|
|
15
18
|
"directory": "dist"
|
|
16
19
|
},
|
|
17
20
|
"dependencies": {
|
|
18
|
-
"@pulumi/aws": "^7.
|
|
19
|
-
"@pulumi/pulumi": "^3.
|
|
21
|
+
"@pulumi/aws": "^7.28.0",
|
|
22
|
+
"@pulumi/pulumi": "^3.234.0",
|
|
20
23
|
"@pulumi/random": "4.19.2",
|
|
21
|
-
"@webiny/api-headless-cms": "6.3.0-beta.
|
|
22
|
-
"@webiny/aws-layers": "6.3.0-beta.
|
|
23
|
-
"@webiny/aws-sdk": "6.3.0-beta.
|
|
24
|
-
"@webiny/cli-core": "6.3.0-beta.
|
|
25
|
-
"@webiny/
|
|
26
|
-
"@webiny/
|
|
27
|
-
"@webiny/
|
|
24
|
+
"@webiny/api-headless-cms": "6.3.0-beta.3",
|
|
25
|
+
"@webiny/aws-layers": "6.3.0-beta.3",
|
|
26
|
+
"@webiny/aws-sdk": "6.3.0-beta.3",
|
|
27
|
+
"@webiny/cli-core": "6.3.0-beta.3",
|
|
28
|
+
"@webiny/di": "0.2.3",
|
|
29
|
+
"@webiny/project": "6.3.0-beta.3",
|
|
30
|
+
"@webiny/pulumi": "6.3.0-beta.3",
|
|
31
|
+
"@webiny/utils": "6.3.0-beta.3",
|
|
28
32
|
"chalk": "5.6.2",
|
|
33
|
+
"email-addresses": "5.0.0",
|
|
29
34
|
"find-up": "8.0.0",
|
|
30
35
|
"invariant": "2.2.4",
|
|
31
36
|
"lodash": "4.18.1",
|
|
@@ -38,8 +43,9 @@
|
|
|
38
43
|
"devDependencies": {
|
|
39
44
|
"@types/lodash": "4.17.24",
|
|
40
45
|
"@types/ncp": "2.0.8",
|
|
41
|
-
"@webiny/build-tools": "6.3.0-beta.
|
|
42
|
-
"typescript": "6.0.3"
|
|
46
|
+
"@webiny/build-tools": "6.3.0-beta.3",
|
|
47
|
+
"typescript": "6.0.3",
|
|
48
|
+
"vitest": "4.1.5"
|
|
43
49
|
},
|
|
44
50
|
"adio": {
|
|
45
51
|
"ignoreDirs": [
|
|
@@ -47,14 +53,9 @@
|
|
|
47
53
|
],
|
|
48
54
|
"ignore": {
|
|
49
55
|
"src": [
|
|
50
|
-
"listr2",
|
|
51
56
|
"cloudfront"
|
|
52
|
-
],
|
|
53
|
-
"dependencies": [
|
|
54
|
-
"@pulumi/pulumi",
|
|
55
|
-
"@pulumi/aws"
|
|
56
57
|
]
|
|
57
58
|
}
|
|
58
59
|
},
|
|
59
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "e154ec3326903876c357d35422dc60d29e061419"
|
|
60
61
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createReactPulumiApp } from "../index.js";
|
|
2
2
|
import { getProjectSdk } from "@webiny/project";
|
|
3
|
-
import { AdminPulumi } from "
|
|
3
|
+
import { AdminPulumi } from "../../../abstractions/features/pulumi/index.js";
|
|
4
|
+
import { adminPulumi } from "../../features/AdminPulumi/index.js";
|
|
4
5
|
import { AdminCustomDomains as adminCustomDomainsExt } from "../../extensions/AdminCustomDomains.js";
|
|
5
6
|
import { withServiceManifest } from "../../index.js";
|
|
6
7
|
export const createAdminPulumiApp = async () => {
|
|
@@ -28,6 +29,7 @@ export const createAdminPulumiApp = async () => {
|
|
|
28
29
|
pulumi: async app => {
|
|
29
30
|
// Overrides must be applied via a handler, registered at the very start of the program.
|
|
30
31
|
// By doing this, we're ensuring user's adjustments are not applied to late.
|
|
32
|
+
sdk.getContainer().registerComposite(adminPulumi);
|
|
31
33
|
const pulumiHandlers = sdk.getContainer().resolve(AdminPulumi);
|
|
32
34
|
app.addHandler(() => {
|
|
33
35
|
return pulumiHandlers.execute(app);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createReactPulumiApp","getProjectSdk","AdminPulumi","AdminCustomDomains","adminCustomDomainsExt","withServiceManifest","createAdminPulumiApp","sdk","projectConfig","getProjectConfig","baseApp","name","folder","domains","adminDomains","extensionsByType","sslMethod","certificateArn","params","sslSupportMethod","acmCertificateArn","undefined","pulumi","app","
|
|
1
|
+
{"version":3,"names":["createReactPulumiApp","getProjectSdk","AdminPulumi","adminPulumi","AdminCustomDomains","adminCustomDomainsExt","withServiceManifest","createAdminPulumiApp","sdk","projectConfig","getProjectConfig","baseApp","name","folder","domains","adminDomains","extensionsByType","sslMethod","certificateArn","params","sslSupportMethod","acmCertificateArn","undefined","pulumi","app","getContainer","registerComposite","pulumiHandlers","resolve","addHandler","execute","addServiceManifest","manifest","cloudfront","distributionId","resources","output","id","domain","domainName","apply","v"],"sources":["createAdminPulumiApp.ts"],"sourcesContent":["import { createReactPulumiApp } from \"~/pulumi/apps/index.js\";\nimport { getProjectSdk } from \"@webiny/project\";\nimport { AdminPulumi } from \"~/abstractions/features/pulumi/index.js\";\nimport { adminPulumi } from \"~/pulumi/features/AdminPulumi/index.js\";\nimport { AdminCustomDomains as adminCustomDomainsExt } from \"~/pulumi/extensions/AdminCustomDomains.js\";\nimport { withServiceManifest } from \"~/pulumi/index.js\";\n\nexport type AdminPulumiApp = ReturnType<typeof createReactPulumiApp>;\n\nexport const createAdminPulumiApp = async () => {\n const sdk = await getProjectSdk();\n const projectConfig = await sdk.getProjectConfig();\n const baseApp = createReactPulumiApp({\n name: \"admin\",\n folder: \"apps/admin\",\n domains: () => {\n const [adminDomains] = projectConfig.extensionsByType(adminCustomDomainsExt);\n\n if (adminDomains) {\n const { domains, sslMethod, certificateArn } = adminDomains.params;\n return {\n domains,\n sslSupportMethod: sslMethod,\n acmCertificateArn: certificateArn\n };\n }\n\n return undefined;\n },\n pulumi: async app => {\n // Overrides must be applied via a handler, registered at the very start of the program.\n // By doing this, we're ensuring user's adjustments are not applied to late.\n sdk.getContainer().registerComposite(adminPulumi);\n const pulumiHandlers = sdk.getContainer().resolve(AdminPulumi);\n\n app.addHandler(() => {\n return pulumiHandlers.execute(app as AdminPulumiApp);\n });\n }\n });\n\n const app = withServiceManifest(baseApp);\n\n app.addHandler(() => {\n app.addServiceManifest({\n name: \"admin\",\n manifest: {\n cloudfront: {\n distributionId: baseApp.resources.cloudfront.output.id,\n domain: baseApp.resources.cloudfront.output.domainName.apply(\n v => `https://${v}`\n )\n }\n }\n });\n });\n\n return app;\n};\n"],"mappings":"AAAA,SAASA,oBAAoB;AAC7B,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,WAAW;AACpB,SAASC,WAAW;AACpB,SAASC,kBAAkB,IAAIC,qBAAqB;AACpD,SAASC,mBAAmB;AAI5B,OAAO,MAAMC,oBAAoB,GAAG,MAAAA,CAAA,KAAY;EAC5C,MAAMC,GA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