mirror of
https://github.com/aws-actions/configure-aws-credentials.git
synced 2026-09-04 06:15:07 +09:00
chore: Update dist
This commit is contained in:
+18
-3
@@ -21420,7 +21420,7 @@ var require_core = __commonJS({
|
|||||||
exports2.addPath = addPath;
|
exports2.addPath = addPath;
|
||||||
exports2.getInput = getInput3;
|
exports2.getInput = getInput3;
|
||||||
exports2.getMultilineInput = getMultilineInput;
|
exports2.getMultilineInput = getMultilineInput;
|
||||||
exports2.getBooleanInput = getBooleanInput;
|
exports2.getBooleanInput = getBooleanInput2;
|
||||||
exports2.setOutput = setOutput2;
|
exports2.setOutput = setOutput2;
|
||||||
exports2.setCommandEcho = setCommandEcho;
|
exports2.setCommandEcho = setCommandEcho;
|
||||||
exports2.setFailed = setFailed2;
|
exports2.setFailed = setFailed2;
|
||||||
@@ -21485,7 +21485,7 @@ var require_core = __commonJS({
|
|||||||
}
|
}
|
||||||
return inputs.map((input) => input.trim());
|
return inputs.map((input) => input.trim());
|
||||||
}
|
}
|
||||||
function getBooleanInput(name, options) {
|
function getBooleanInput2(name, options) {
|
||||||
const trueValue = ["true", "True", "TRUE"];
|
const trueValue = ["true", "True", "TRUE"];
|
||||||
const falseValue = ["false", "False", "FALSE"];
|
const falseValue = ["false", "False", "FALSE"];
|
||||||
const val = getInput3(name, options);
|
const val = getInput3(name, options);
|
||||||
@@ -21597,10 +21597,25 @@ var core = __toESM(require_core());
|
|||||||
function errorMessage(error) {
|
function errorMessage(error) {
|
||||||
return error instanceof Error ? error.message : String(error);
|
return error instanceof Error ? error.message : String(error);
|
||||||
}
|
}
|
||||||
|
function getBooleanInput(name, options) {
|
||||||
|
const trueValue = ["true", "True", "TRUE"];
|
||||||
|
const falseValue = ["false", "False", "FALSE"];
|
||||||
|
const optionsWithoutDefault = { ...options };
|
||||||
|
delete optionsWithoutDefault.default;
|
||||||
|
const val = core.getInput(name, optionsWithoutDefault);
|
||||||
|
if (trueValue.includes(val)) return true;
|
||||||
|
if (falseValue.includes(val)) return false;
|
||||||
|
if (val === "") return options?.default ?? false;
|
||||||
|
throw new TypeError(
|
||||||
|
`Input does not meet YAML 1.2 "Core Schema" specification: ${name}
|
||||||
|
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// src/cleanup/index.ts
|
// src/cleanup/index.ts
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
if (core2.getInput("output-env-credentials") !== "false") {
|
const awsProfile = core2.getInput("aws-profile", { required: false });
|
||||||
|
if (getBooleanInput("output-env-credentials", { required: false, default: !awsProfile })) {
|
||||||
try {
|
try {
|
||||||
core2.exportVariable("AWS_ACCESS_KEY_ID", "");
|
core2.exportVariable("AWS_ACCESS_KEY_ID", "");
|
||||||
core2.exportVariable("AWS_SECRET_ACCESS_KEY", "");
|
core2.exportVariable("AWS_SECRET_ACCESS_KEY", "");
|
||||||
|
|||||||
+37
-34
@@ -29258,7 +29258,7 @@ var require_dist_cjs23 = __commonJS({
|
|||||||
var require_dist_cjs24 = __commonJS({
|
var require_dist_cjs24 = __commonJS({
|
||||||
"node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js"(exports2) {
|
"node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js"(exports2) {
|
||||||
"use strict";
|
"use strict";
|
||||||
var core4 = (init_dist_es(), __toCommonJS(dist_es_exports));
|
var core5 = (init_dist_es(), __toCommonJS(dist_es_exports));
|
||||||
var utilEndpoints = require_dist_cjs21();
|
var utilEndpoints = require_dist_cjs21();
|
||||||
var protocolHttp = require_dist_cjs2();
|
var protocolHttp = require_dist_cjs2();
|
||||||
var client = (init_client(), __toCommonJS(client_exports));
|
var client = (init_client(), __toCommonJS(client_exports));
|
||||||
@@ -29271,7 +29271,7 @@ var require_dist_cjs24 = __commonJS({
|
|||||||
return typeof appId === "string" && appId.length <= 50;
|
return typeof appId === "string" && appId.length <= 50;
|
||||||
}
|
}
|
||||||
function resolveUserAgentConfig5(input) {
|
function resolveUserAgentConfig5(input) {
|
||||||
const normalizedAppIdProvider = core4.normalizeProvider(input.userAgentAppId ?? DEFAULT_UA_APP_ID);
|
const normalizedAppIdProvider = core5.normalizeProvider(input.userAgentAppId ?? DEFAULT_UA_APP_ID);
|
||||||
const { customUserAgent } = input;
|
const { customUserAgent } = input;
|
||||||
return Object.assign(input, {
|
return Object.assign(input, {
|
||||||
customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent,
|
customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent,
|
||||||
@@ -29879,14 +29879,14 @@ var require_readFile = __commonJS({
|
|||||||
var promises_1 = require("node:fs/promises");
|
var promises_1 = require("node:fs/promises");
|
||||||
exports2.filePromises = {};
|
exports2.filePromises = {};
|
||||||
exports2.fileIntercept = {};
|
exports2.fileIntercept = {};
|
||||||
var readFile = (path2, options) => {
|
var readFile = (path3, options) => {
|
||||||
if (exports2.fileIntercept[path2] !== void 0) {
|
if (exports2.fileIntercept[path3] !== void 0) {
|
||||||
return exports2.fileIntercept[path2];
|
return exports2.fileIntercept[path3];
|
||||||
}
|
}
|
||||||
if (!exports2.filePromises[path2] || options?.ignoreCache) {
|
if (!exports2.filePromises[path3] || options?.ignoreCache) {
|
||||||
exports2.filePromises[path2] = (0, promises_1.readFile)(path2, "utf8");
|
exports2.filePromises[path3] = (0, promises_1.readFile)(path3, "utf8");
|
||||||
}
|
}
|
||||||
return exports2.filePromises[path2];
|
return exports2.filePromises[path3];
|
||||||
};
|
};
|
||||||
exports2.readFile = readFile;
|
exports2.readFile = readFile;
|
||||||
}
|
}
|
||||||
@@ -29899,7 +29899,7 @@ var require_dist_cjs29 = __commonJS({
|
|||||||
var getHomeDir = require_getHomeDir();
|
var getHomeDir = require_getHomeDir();
|
||||||
var getSSOTokenFilepath = require_getSSOTokenFilepath();
|
var getSSOTokenFilepath = require_getSSOTokenFilepath();
|
||||||
var getSSOTokenFromFile = require_getSSOTokenFromFile();
|
var getSSOTokenFromFile = require_getSSOTokenFromFile();
|
||||||
var path2 = require("path");
|
var path3 = require("path");
|
||||||
var types = require_dist_cjs();
|
var types = require_dist_cjs();
|
||||||
var readFile = require_readFile();
|
var readFile = require_readFile();
|
||||||
var ENV_PROFILE = "AWS_PROFILE";
|
var ENV_PROFILE = "AWS_PROFILE";
|
||||||
@@ -29921,12 +29921,12 @@ var require_dist_cjs29 = __commonJS({
|
|||||||
...data2.default && { default: data2.default }
|
...data2.default && { default: data2.default }
|
||||||
});
|
});
|
||||||
var ENV_CONFIG_PATH = "AWS_CONFIG_FILE";
|
var ENV_CONFIG_PATH = "AWS_CONFIG_FILE";
|
||||||
var getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path2.join(getHomeDir.getHomeDir(), ".aws", "config");
|
var getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path3.join(getHomeDir.getHomeDir(), ".aws", "config");
|
||||||
var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE";
|
var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE";
|
||||||
var getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path2.join(getHomeDir.getHomeDir(), ".aws", "credentials");
|
var getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path3.join(getHomeDir.getHomeDir(), ".aws", "credentials");
|
||||||
var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/;
|
var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/;
|
||||||
var profileNameBlockList = ["__proto__", "profile __proto__"];
|
var profileNameBlockList = ["__proto__", "profile __proto__"];
|
||||||
var parseIni = (iniData) => {
|
var parseIni2 = (iniData) => {
|
||||||
const map2 = {};
|
const map2 = {};
|
||||||
let currentSection;
|
let currentSection;
|
||||||
let currentSubSection;
|
let currentSubSection;
|
||||||
@@ -29978,19 +29978,19 @@ var require_dist_cjs29 = __commonJS({
|
|||||||
const relativeHomeDirPrefix = "~/";
|
const relativeHomeDirPrefix = "~/";
|
||||||
let resolvedFilepath = filepath;
|
let resolvedFilepath = filepath;
|
||||||
if (filepath.startsWith(relativeHomeDirPrefix)) {
|
if (filepath.startsWith(relativeHomeDirPrefix)) {
|
||||||
resolvedFilepath = path2.join(homeDir, filepath.slice(2));
|
resolvedFilepath = path3.join(homeDir, filepath.slice(2));
|
||||||
}
|
}
|
||||||
let resolvedConfigFilepath = configFilepath;
|
let resolvedConfigFilepath = configFilepath;
|
||||||
if (configFilepath.startsWith(relativeHomeDirPrefix)) {
|
if (configFilepath.startsWith(relativeHomeDirPrefix)) {
|
||||||
resolvedConfigFilepath = path2.join(homeDir, configFilepath.slice(2));
|
resolvedConfigFilepath = path3.join(homeDir, configFilepath.slice(2));
|
||||||
}
|
}
|
||||||
const parsedFiles = await Promise.all([
|
const parsedFiles = await Promise.all([
|
||||||
readFile.readFile(resolvedConfigFilepath, {
|
readFile.readFile(resolvedConfigFilepath, {
|
||||||
ignoreCache: init.ignoreCache
|
ignoreCache: init.ignoreCache
|
||||||
}).then(parseIni).then(getConfigData).catch(swallowError$1),
|
}).then(parseIni2).then(getConfigData).catch(swallowError$1),
|
||||||
readFile.readFile(resolvedFilepath, {
|
readFile.readFile(resolvedFilepath, {
|
||||||
ignoreCache: init.ignoreCache
|
ignoreCache: init.ignoreCache
|
||||||
}).then(parseIni).catch(swallowError$1)
|
}).then(parseIni2).catch(swallowError$1)
|
||||||
]);
|
]);
|
||||||
return {
|
return {
|
||||||
configFile: parsedFiles[0],
|
configFile: parsedFiles[0],
|
||||||
@@ -29999,7 +29999,7 @@ var require_dist_cjs29 = __commonJS({
|
|||||||
};
|
};
|
||||||
var getSsoSessionData = (data2) => Object.entries(data2).filter(([key]) => key.startsWith(types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {});
|
var getSsoSessionData = (data2) => Object.entries(data2).filter(([key]) => key.startsWith(types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {});
|
||||||
var swallowError = () => ({});
|
var swallowError = () => ({});
|
||||||
var loadSsoSessionData = async (init = {}) => readFile.readFile(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError);
|
var loadSsoSessionData = async (init = {}) => readFile.readFile(init.configFilepath ?? getConfigFilepath()).then(parseIni2).then(getSsoSessionData).catch(swallowError);
|
||||||
var mergeConfigFiles = (...files) => {
|
var mergeConfigFiles = (...files) => {
|
||||||
const merged = {};
|
const merged = {};
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
@@ -30021,8 +30021,8 @@ var require_dist_cjs29 = __commonJS({
|
|||||||
getFileRecord() {
|
getFileRecord() {
|
||||||
return readFile.fileIntercept;
|
return readFile.fileIntercept;
|
||||||
},
|
},
|
||||||
interceptFile(path3, contents) {
|
interceptFile(path4, contents) {
|
||||||
readFile.fileIntercept[path3] = Promise.resolve(contents);
|
readFile.fileIntercept[path4] = Promise.resolve(contents);
|
||||||
},
|
},
|
||||||
getTokenRecord() {
|
getTokenRecord() {
|
||||||
return getSSOTokenFromFile.tokenIntercept;
|
return getSSOTokenFromFile.tokenIntercept;
|
||||||
@@ -30273,7 +30273,7 @@ var require_dist_cjs32 = __commonJS({
|
|||||||
"use strict";
|
"use strict";
|
||||||
var getEndpointFromConfig = require_getEndpointFromConfig();
|
var getEndpointFromConfig = require_getEndpointFromConfig();
|
||||||
var urlParser = require_dist_cjs18();
|
var urlParser = require_dist_cjs18();
|
||||||
var core4 = (init_dist_es(), __toCommonJS(dist_es_exports));
|
var core5 = (init_dist_es(), __toCommonJS(dist_es_exports));
|
||||||
var utilMiddleware = require_dist_cjs6();
|
var utilMiddleware = require_dist_cjs6();
|
||||||
var middlewareSerde = require_dist_cjs31();
|
var middlewareSerde = require_dist_cjs31();
|
||||||
var resolveParamsForS3 = async (endpointParams) => {
|
var resolveParamsForS3 = async (endpointParams) => {
|
||||||
@@ -30347,8 +30347,8 @@ var require_dist_cjs32 = __commonJS({
|
|||||||
return endpoint.url.href;
|
return endpoint.url.href;
|
||||||
}
|
}
|
||||||
if ("hostname" in endpoint) {
|
if ("hostname" in endpoint) {
|
||||||
const { protocol, hostname, port, path: path2 } = endpoint;
|
const { protocol, hostname, port, path: path3 } = endpoint;
|
||||||
return `${protocol}//${hostname}${port ? ":" + port : ""}${path2}`;
|
return `${protocol}//${hostname}${port ? ":" + port : ""}${path3}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return endpoint;
|
return endpoint;
|
||||||
@@ -30434,7 +30434,7 @@ var require_dist_cjs32 = __commonJS({
|
|||||||
var endpointMiddleware = ({ config, instructions }) => {
|
var endpointMiddleware = ({ config, instructions }) => {
|
||||||
return (next, context) => async (args) => {
|
return (next, context) => async (args) => {
|
||||||
if (config.isCustomEndpoint) {
|
if (config.isCustomEndpoint) {
|
||||||
core4.setFeature(context, "ENDPOINT_OVERRIDE", "N");
|
core5.setFeature(context, "ENDPOINT_OVERRIDE", "N");
|
||||||
}
|
}
|
||||||
const endpoint = await getEndpointFromInstructions(args.input, {
|
const endpoint = await getEndpointFromInstructions(args.input, {
|
||||||
getEndpointParameterInstructions() {
|
getEndpointParameterInstructions() {
|
||||||
@@ -30608,7 +30608,7 @@ var require_dist_cjs33 = __commonJS({
|
|||||||
});
|
});
|
||||||
return expandedMiddlewareList;
|
return expandedMiddlewareList;
|
||||||
};
|
};
|
||||||
const getMiddlewareList = (debug3 = false) => {
|
const getMiddlewareList = (debug4 = false) => {
|
||||||
const normalizedAbsoluteEntries = [];
|
const normalizedAbsoluteEntries = [];
|
||||||
const normalizedRelativeEntries = [];
|
const normalizedRelativeEntries = [];
|
||||||
const normalizedEntriesNameMap = {};
|
const normalizedEntriesNameMap = {};
|
||||||
@@ -30638,7 +30638,7 @@ var require_dist_cjs33 = __commonJS({
|
|||||||
if (entry.toMiddleware) {
|
if (entry.toMiddleware) {
|
||||||
const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];
|
const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];
|
||||||
if (toMiddleware === void 0) {
|
if (toMiddleware === void 0) {
|
||||||
if (debug3) {
|
if (debug4) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
throw new Error(`${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}`);
|
throw new Error(`${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}`);
|
||||||
@@ -33722,12 +33722,12 @@ var require_dist_cjs40 = __commonJS({
|
|||||||
}
|
}
|
||||||
return ["md/nodejs", node_process.versions.node];
|
return ["md/nodejs", node_process.versions.node];
|
||||||
};
|
};
|
||||||
var getNodeModulesParentDirs = (dirname) => {
|
var getNodeModulesParentDirs = (dirname2) => {
|
||||||
const cwd = process.cwd();
|
const cwd = process.cwd();
|
||||||
if (!dirname) {
|
if (!dirname2) {
|
||||||
return [cwd];
|
return [cwd];
|
||||||
}
|
}
|
||||||
const normalizedPath = node_path.normalize(dirname);
|
const normalizedPath = node_path.normalize(dirname2);
|
||||||
const parts = normalizedPath.split(node_path.sep);
|
const parts = normalizedPath.split(node_path.sep);
|
||||||
const nodeModulesIndex = parts.indexOf("node_modules");
|
const nodeModulesIndex = parts.indexOf("node_modules");
|
||||||
const parentDir = nodeModulesIndex !== -1 ? parts.slice(0, nodeModulesIndex).join(node_path.sep) : normalizedPath;
|
const parentDir = nodeModulesIndex !== -1 ? parts.slice(0, nodeModulesIndex).join(node_path.sep) : normalizedPath;
|
||||||
@@ -33775,8 +33775,8 @@ var require_dist_cjs40 = __commonJS({
|
|||||||
tscVersion = null;
|
tscVersion = null;
|
||||||
return void 0;
|
return void 0;
|
||||||
}
|
}
|
||||||
const dirname = typeof __dirname !== "undefined" ? __dirname : void 0;
|
const dirname2 = typeof __dirname !== "undefined" ? __dirname : void 0;
|
||||||
const nodeModulesParentDirs = getNodeModulesParentDirs(dirname);
|
const nodeModulesParentDirs = getNodeModulesParentDirs(dirname2);
|
||||||
let versionFromApp;
|
let versionFromApp;
|
||||||
for (const nodeModulesParentDir of nodeModulesParentDirs) {
|
for (const nodeModulesParentDir of nodeModulesParentDirs) {
|
||||||
try {
|
try {
|
||||||
@@ -34979,7 +34979,7 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const { service, operation: operation2 } = (0, import_util_middleware6.getSmithyContext)(context);
|
const { service, operation: operation2 } = (0, import_util_middleware6.getSmithyContext)(context);
|
||||||
const path2 = `/service/${service}/operation/${operation2}`;
|
const path3 = `/service/${service}/operation/${operation2}`;
|
||||||
if (request.path.endsWith("/")) {
|
if (request.path.endsWith("/")) {
|
||||||
request.path += path3.slice(1);
|
request.path += path3.slice(1);
|
||||||
} else {
|
} else {
|
||||||
@@ -72504,15 +72504,18 @@ async function run() {
|
|||||||
await exportAccountId(credentialsClient, maskAccountId);
|
await exportAccountId(credentialsClient, maskAccountId);
|
||||||
}
|
}
|
||||||
if (awsProfile) {
|
if (awsProfile) {
|
||||||
|
if (!roleCredentials.Credentials) {
|
||||||
|
throw new Error("AssumeRole call succeeded but returned no credentials");
|
||||||
|
}
|
||||||
if (AccessKeyId || !process.env.GITHUB_ACTIONS) {
|
if (AccessKeyId || !process.env.GITHUB_ACTIONS) {
|
||||||
writeProfileFiles(awsProfile, roleCredentials.Credentials || {}, region, true);
|
writeProfileFiles(awsProfile, roleCredentials.Credentials, region, true);
|
||||||
await credentialsClient.validateCredentials(
|
await credentialsClient.validateCredentials(
|
||||||
roleCredentials.Credentials?.AccessKeyId,
|
roleCredentials.Credentials.AccessKeyId,
|
||||||
roleChaining,
|
roleChaining,
|
||||||
expectedAccountIds
|
expectedAccountIds
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
writeProfileFiles(awsProfile, roleCredentials.Credentials || {}, region, overwriteAwsProfile);
|
writeProfileFiles(awsProfile, roleCredentials.Credentials, region, overwriteAwsProfile);
|
||||||
}
|
}
|
||||||
if (outputEnvCredentials) {
|
if (outputEnvCredentials) {
|
||||||
core4.exportVariable("AWS_PROFILE", awsProfile);
|
core4.exportVariable("AWS_PROFILE", awsProfile);
|
||||||
|
|||||||
Reference in New Issue
Block a user