Skip to content

Commit e170a4a

Browse files
committed
Merge branch 'master' into dependabot/npm_and_yarn/aws-sdk/client-ecs-3.908.0
2 parents 2fe7837 + 700b3a0 commit e170a4a

19 files changed

+37280
-83201
lines changed

.github/workflows/notifications.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ jobs:
5858
with:
5959
payload: |
6060
{
61-
"Notification Type": "Pull Request",
62-
"Notification URL":"${{ github.event.pull_request.html_url }}",
63-
"GitHub Repo": "${{ github.repository }}",
64-
"Notification Title": "${{ steps.sanitize-title.outputs.safe-title }}"
61+
"Notification_Type": "Pull Request",
62+
"Notification_URL":"${{ github.event.pull_request.html_url }}",
63+
"GitHub_Repo": "${{ github.repository }}",
64+
"Notification_Title": "${{ steps.sanitize-title.outputs.safe-title }}"
6565
}
6666
env:
6767
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
@@ -72,10 +72,10 @@ jobs:
7272
with:
7373
payload: |
7474
{
75-
"Notification Type": "Issue",
76-
"Notification URL":"${{ github.event.issue.html_url }}",
77-
"GitHub Repo": "${{ github.repository }}",
78-
"Notification Title": "${{ steps.sanitize-title.outputs.safe-title }}"
75+
"Notification_Type": "Issue",
76+
"Notification_URL":"${{ github.event.issue.html_url }}",
77+
"GitHub_Repo": "${{ github.repository }}",
78+
"Notification_Title": "${{ steps.sanitize-title.outputs.safe-title }}"
7979
}
8080
env:
8181
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
@@ -86,10 +86,10 @@ jobs:
8686
with:
8787
payload: |
8888
{
89-
"Notification Type": "Issue comment",
90-
"Notification URL":"${{ github.event.comment.html_url }}",
91-
"GitHub Repo": "${{ github.repository }}",
92-
"Notification Title": "${{ steps.sanitize-title.outputs.safe-title }}"
89+
"Notification_Type": "Issue comment",
90+
"Notification_URL":"${{ github.event.comment.html_url }}",
91+
"GitHub_Repo": "${{ github.repository }}",
92+
"Notification_Title": "${{ steps.sanitize-title.outputs.safe-title }}"
9393
}
9494
env:
95-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
95+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

dist/136.index.js

Lines changed: 1233 additions & 0 deletions
Large diffs are not rendered by default.

dist/333.index.js

Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
"use strict";
2+
exports.id = 333;
3+
exports.ids = [333];
4+
exports.modules = {
5+
6+
/***/ 13333:
7+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8+
9+
10+
11+
var utilUtf8 = __webpack_require__(60791);
12+
13+
class EventStreamSerde {
14+
marshaller;
15+
serializer;
16+
deserializer;
17+
serdeContext;
18+
defaultContentType;
19+
constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, }) {
20+
this.marshaller = marshaller;
21+
this.serializer = serializer;
22+
this.deserializer = deserializer;
23+
this.serdeContext = serdeContext;
24+
this.defaultContentType = defaultContentType;
25+
}
26+
async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {
27+
const marshaller = this.marshaller;
28+
const eventStreamMember = requestSchema.getEventStreamMember();
29+
const unionSchema = requestSchema.getMemberSchema(eventStreamMember);
30+
const serializer = this.serializer;
31+
const defaultContentType = this.defaultContentType;
32+
const initialRequestMarker = Symbol("initialRequestMarker");
33+
const eventStreamIterable = {
34+
async *[Symbol.asyncIterator]() {
35+
if (initialRequest) {
36+
const headers = {
37+
":event-type": { type: "string", value: "initial-request" },
38+
":message-type": { type: "string", value: "event" },
39+
":content-type": { type: "string", value: defaultContentType },
40+
};
41+
serializer.write(requestSchema, initialRequest);
42+
const body = serializer.flush();
43+
yield {
44+
[initialRequestMarker]: true,
45+
headers,
46+
body,
47+
};
48+
}
49+
for await (const page of eventStream) {
50+
yield page;
51+
}
52+
},
53+
};
54+
return marshaller.serialize(eventStreamIterable, (event) => {
55+
if (event[initialRequestMarker]) {
56+
return {
57+
headers: event.headers,
58+
body: event.body,
59+
};
60+
}
61+
const unionMember = Object.keys(event).find((key) => {
62+
return key !== "__type";
63+
}) ?? "";
64+
const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event);
65+
const headers = {
66+
":event-type": { type: "string", value: eventType },
67+
":message-type": { type: "string", value: "event" },
68+
":content-type": { type: "string", value: explicitPayloadContentType ?? defaultContentType },
69+
...additionalHeaders,
70+
};
71+
return {
72+
headers,
73+
body,
74+
};
75+
});
76+
}
77+
async deserializeEventStream({ response, responseSchema, initialResponseContainer, }) {
78+
const marshaller = this.marshaller;
79+
const eventStreamMember = responseSchema.getEventStreamMember();
80+
const unionSchema = responseSchema.getMemberSchema(eventStreamMember);
81+
const memberSchemas = unionSchema.getMemberSchemas();
82+
const initialResponseMarker = Symbol("initialResponseMarker");
83+
const asyncIterable = marshaller.deserialize(response.body, async (event) => {
84+
const unionMember = Object.keys(event).find((key) => {
85+
return key !== "__type";
86+
}) ?? "";
87+
if (unionMember === "initial-response") {
88+
const dataObject = await this.deserializer.read(responseSchema, event[unionMember].body);
89+
delete dataObject[eventStreamMember];
90+
return {
91+
[initialResponseMarker]: true,
92+
...dataObject,
93+
};
94+
}
95+
else if (unionMember in memberSchemas) {
96+
const eventStreamSchema = memberSchemas[unionMember];
97+
return {
98+
[unionMember]: await this.deserializer.read(eventStreamSchema, event[unionMember].body),
99+
};
100+
}
101+
else {
102+
return {
103+
$unknown: event,
104+
};
105+
}
106+
});
107+
const asyncIterator = asyncIterable[Symbol.asyncIterator]();
108+
const firstEvent = await asyncIterator.next();
109+
if (firstEvent.done) {
110+
return asyncIterable;
111+
}
112+
if (firstEvent.value?.[initialResponseMarker]) {
113+
if (!responseSchema) {
114+
throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");
115+
}
116+
for (const [key, value] of Object.entries(firstEvent.value)) {
117+
initialResponseContainer[key] = value;
118+
}
119+
}
120+
return {
121+
async *[Symbol.asyncIterator]() {
122+
if (!firstEvent?.value?.[initialResponseMarker]) {
123+
yield firstEvent.value;
124+
}
125+
while (true) {
126+
const { done, value } = await asyncIterator.next();
127+
if (done) {
128+
break;
129+
}
130+
yield value;
131+
}
132+
},
133+
};
134+
}
135+
writeEventBody(unionMember, unionSchema, event) {
136+
const serializer = this.serializer;
137+
let eventType = unionMember;
138+
let explicitPayloadMember = null;
139+
let explicitPayloadContentType;
140+
const isKnownSchema = (() => {
141+
const struct = unionSchema.getSchema();
142+
return struct[4].includes(unionMember);
143+
})();
144+
const additionalHeaders = {};
145+
if (!isKnownSchema) {
146+
const [type, value] = event[unionMember];
147+
eventType = type;
148+
serializer.write(15, value);
149+
}
150+
else {
151+
const eventSchema = unionSchema.getMemberSchema(unionMember);
152+
if (eventSchema.isStructSchema()) {
153+
for (const [memberName, memberSchema] of eventSchema.structIterator()) {
154+
const { eventHeader, eventPayload } = memberSchema.getMergedTraits();
155+
if (eventPayload) {
156+
explicitPayloadMember = memberName;
157+
break;
158+
}
159+
else if (eventHeader) {
160+
const value = event[unionMember][memberName];
161+
let type = "binary";
162+
if (memberSchema.isNumericSchema()) {
163+
if ((-2) ** 31 <= value && value <= 2 ** 31 - 1) {
164+
type = "integer";
165+
}
166+
else {
167+
type = "long";
168+
}
169+
}
170+
else if (memberSchema.isTimestampSchema()) {
171+
type = "timestamp";
172+
}
173+
else if (memberSchema.isStringSchema()) {
174+
type = "string";
175+
}
176+
else if (memberSchema.isBooleanSchema()) {
177+
type = "boolean";
178+
}
179+
if (value != null) {
180+
additionalHeaders[memberName] = {
181+
type,
182+
value,
183+
};
184+
delete event[unionMember][memberName];
185+
}
186+
}
187+
}
188+
if (explicitPayloadMember !== null) {
189+
const payloadSchema = eventSchema.getMemberSchema(explicitPayloadMember);
190+
if (payloadSchema.isBlobSchema()) {
191+
explicitPayloadContentType = "application/octet-stream";
192+
}
193+
else if (payloadSchema.isStringSchema()) {
194+
explicitPayloadContentType = "text/plain";
195+
}
196+
serializer.write(payloadSchema, event[unionMember][explicitPayloadMember]);
197+
}
198+
else {
199+
serializer.write(eventSchema, event[unionMember]);
200+
}
201+
}
202+
else {
203+
throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.");
204+
}
205+
}
206+
const messageSerialization = serializer.flush();
207+
const body = typeof messageSerialization === "string"
208+
? (this.serdeContext?.utf8Decoder ?? utilUtf8.fromUtf8)(messageSerialization)
209+
: messageSerialization;
210+
return {
211+
body,
212+
eventType,
213+
explicitPayloadContentType,
214+
additionalHeaders,
215+
};
216+
}
217+
}
218+
219+
exports.EventStreamSerde = EventStreamSerde;
220+
221+
222+
/***/ })
223+
224+
};
225+
;

dist/360.index.js

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
"use strict";
2+
exports.id = 360;
3+
exports.ids = [360];
4+
exports.modules = {
5+
6+
/***/ 5360:
7+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8+
9+
10+
11+
var sharedIniFileLoader = __webpack_require__(4964);
12+
var propertyProvider = __webpack_require__(1238);
13+
var child_process = __webpack_require__(5317);
14+
var util = __webpack_require__(9023);
15+
var client = __webpack_require__(5152);
16+
17+
const getValidatedProcessCredentials = (profileName, data, profiles) => {
18+
if (data.Version !== 1) {
19+
throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
20+
}
21+
if (data.AccessKeyId === undefined || data.SecretAccessKey === undefined) {
22+
throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);
23+
}
24+
if (data.Expiration) {
25+
const currentTime = new Date();
26+
const expireTime = new Date(data.Expiration);
27+
if (expireTime < currentTime) {
28+
throw Error(`Profile ${profileName} credential_process returned expired credentials.`);
29+
}
30+
}
31+
let accountId = data.AccountId;
32+
if (!accountId && profiles?.[profileName]?.aws_account_id) {
33+
accountId = profiles[profileName].aws_account_id;
34+
}
35+
const credentials = {
36+
accessKeyId: data.AccessKeyId,
37+
secretAccessKey: data.SecretAccessKey,
38+
...(data.SessionToken && { sessionToken: data.SessionToken }),
39+
...(data.Expiration && { expiration: new Date(data.Expiration) }),
40+
...(data.CredentialScope && { credentialScope: data.CredentialScope }),
41+
...(accountId && { accountId }),
42+
};
43+
client.setCredentialFeature(credentials, "CREDENTIALS_PROCESS", "w");
44+
return credentials;
45+
};
46+
47+
const resolveProcessCredentials = async (profileName, profiles, logger) => {
48+
const profile = profiles[profileName];
49+
if (profiles[profileName]) {
50+
const credentialProcess = profile["credential_process"];
51+
if (credentialProcess !== undefined) {
52+
const execPromise = util.promisify(sharedIniFileLoader.externalDataInterceptor?.getTokenRecord?.().exec ?? child_process.exec);
53+
try {
54+
const { stdout } = await execPromise(credentialProcess);
55+
let data;
56+
try {
57+
data = JSON.parse(stdout.trim());
58+
}
59+
catch {
60+
throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);
61+
}
62+
return getValidatedProcessCredentials(profileName, data, profiles);
63+
}
64+
catch (error) {
65+
throw new propertyProvider.CredentialsProviderError(error.message, { logger });
66+
}
67+
}
68+
else {
69+
throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });
70+
}
71+
}
72+
else {
73+
throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {
74+
logger,
75+
});
76+
}
77+
};
78+
79+
const fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => {
80+
init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");
81+
const profiles = await sharedIniFileLoader.parseKnownFiles(init);
82+
return resolveProcessCredentials(sharedIniFileLoader.getProfileName({
83+
profile: init.profile ?? callerClientConfig?.profile,
84+
}), profiles, init.logger);
85+
};
86+
87+
exports.fromProcess = fromProcess;
88+
89+
90+
/***/ })
91+
92+
};
93+
;

0 commit comments

Comments
 (0)