Skip to content

Commit 3044aa6

Browse files
committed
undo the changes in clients/
1 parent 5fea0fc commit 3044aa6

File tree

7 files changed

+560
-0
lines changed

7 files changed

+560
-0
lines changed
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
{
2+
"name": "@aws-sdk/client-accessanalyzer",
3+
"description": "AWS SDK for JavaScript Accessanalyzer Client for Node.js, Browser and React Native",
4+
"version": "3.741.0",
5+
"scripts": {
6+
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7+
"build:cjs": "node ../../scripts/compilation/inline client-accessanalyzer",
8+
"build:es": "tsc -p tsconfig.es.json",
9+
"build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
10+
"build:types": "tsc -p tsconfig.types.json",
11+
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
12+
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
13+
"extract:docs": "api-extractor run --local",
14+
"generate:client": "node ../../scripts/generate-clients/single-service --solo accessanalyzer"
15+
},
16+
"main": "./dist-cjs/index.js",
17+
"types": "./dist-types/index.d.ts",
18+
"module": "./dist-es/index.js",
19+
"sideEffects": false,
20+
"dependencies": {
21+
"@aws-crypto/sha256-browser": "5.2.0",
22+
"@aws-crypto/sha256-js": "5.2.0",
23+
"@aws-sdk/core": "*",
24+
"@aws-sdk/credential-provider-node": "*",
25+
"@aws-sdk/middleware-host-header": "*",
26+
"@aws-sdk/middleware-logger": "*",
27+
"@aws-sdk/middleware-recursion-detection": "*",
28+
"@aws-sdk/middleware-user-agent": "*",
29+
"@aws-sdk/region-config-resolver": "*",
30+
"@aws-sdk/types": "*",
31+
"@aws-sdk/util-endpoints": "*",
32+
"@aws-sdk/util-user-agent-browser": "*",
33+
"@aws-sdk/util-user-agent-node": "*",
34+
"@smithy/config-resolver": "^4.0.1",
35+
"@smithy/core": "^3.1.1",
36+
"@smithy/fetch-http-handler": "^5.0.1",
37+
"@smithy/hash-node": "^4.0.1",
38+
"@smithy/invalid-dependency": "^4.0.1",
39+
"@smithy/middleware-content-length": "^4.0.1",
40+
"@smithy/middleware-endpoint": "^4.0.2",
41+
"@smithy/middleware-retry": "^4.0.3",
42+
"@smithy/middleware-serde": "^4.0.1",
43+
"@smithy/middleware-stack": "^4.0.1",
44+
"@smithy/node-config-provider": "^4.0.1",
45+
"@smithy/node-http-handler": "^4.0.2",
46+
"@smithy/protocol-http": "^5.0.1",
47+
"@smithy/smithy-client": "^4.1.2",
48+
"@smithy/types": "^4.1.0",
49+
"@smithy/url-parser": "^4.0.1",
50+
"@smithy/util-base64": "^4.0.0",
51+
"@smithy/util-body-length-browser": "^4.0.0",
52+
"@smithy/util-body-length-node": "^4.0.0",
53+
"@smithy/util-defaults-mode-browser": "^4.0.3",
54+
"@smithy/util-defaults-mode-node": "^4.0.3",
55+
"@smithy/util-endpoints": "^3.0.1",
56+
"@smithy/util-middleware": "^4.0.1",
57+
"@smithy/util-retry": "^4.0.1",
58+
"@smithy/util-utf8": "^4.0.0",
59+
"@types/uuid": "^9.0.1",
60+
"tslib": "^2.6.2",
61+
"uuid": "^9.0.1"
62+
},
63+
"devDependencies": {
64+
"@tsconfig/node18": "18.2.4",
65+
"@types/node": "^18.19.69",
66+
"concurrently": "7.0.0",
67+
"downlevel-dts": "0.10.1",
68+
"rimraf": "3.0.2",
69+
"typescript": "~5.2.2"
70+
},
71+
"engines": {
72+
"node": ">=18.0.0"
73+
},
74+
"typesVersions": {
75+
"<4.0": {
76+
"dist-types/*": [
77+
"dist-types/ts3.4/*"
78+
]
79+
}
80+
},
81+
"files": [
82+
"dist-*/**"
83+
],
84+
"author": {
85+
"name": "AWS SDK for JavaScript Team",
86+
"url": "https://aws.amazon.com/javascript/"
87+
},
88+
"license": "Apache-2.0",
89+
"browser": {
90+
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
91+
},
92+
"react-native": {
93+
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
94+
},
95+
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-accessanalyzer",
96+
"repository": {
97+
"type": "git",
98+
"url": "https://github.com/aws/aws-sdk-js-v3.git",
99+
"directory": "clients/client-accessanalyzer"
100+
}
101+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// smithy-typescript generated code
2+
/* eslint-disable */
3+
/**
4+
* <p>Identity and Access Management Access Analyzer helps you to set, verify, and refine your IAM policies by providing
5+
* a suite of capabilities. Its features include findings for external and unused access,
6+
* basic and custom policy checks for validating policies, and policy generation to generate
7+
* fine-grained policies. To start using IAM Access Analyzer to identify external or unused access,
8+
* you first need to create an analyzer.</p>
9+
* <p>
10+
* <b>External access analyzers</b> help identify potential risks
11+
* of accessing resources by enabling you to identify any resource policies that grant access
12+
* to an external principal. It does this by using logic-based reasoning to analyze
13+
* resource-based policies in your Amazon Web Services environment. An external principal can be another
14+
* Amazon Web Services account, a root user, an IAM user or role, a federated user, an Amazon Web Services service, or an
15+
* anonymous user. You can also use IAM Access Analyzer to preview public and cross-account access
16+
* to your resources before deploying permissions changes.</p>
17+
* <p>
18+
* <b>Unused access analyzers</b> help identify potential
19+
* identity access risks by enabling you to identify unused IAM roles, unused access keys,
20+
* unused console passwords, and IAM principals with unused service and action-level
21+
* permissions.</p>
22+
* <p>Beyond findings, IAM Access Analyzer provides basic and custom policy checks to validate IAM
23+
* policies before deploying permissions changes. You can use policy generation to refine
24+
* permissions by attaching a policy generated using access activity logged in CloudTrail logs. </p>
25+
* <p>This guide describes the IAM Access Analyzer operations that you can call programmatically.
26+
* For general information about IAM Access Analyzer, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/what-is-access-analyzer.html">Identity and Access Management Access Analyzer</a> in the
27+
* <b>IAM User Guide</b>.</p>
28+
*
29+
* @packageDocumentation
30+
*/
31+
export * from "./AccessAnalyzerClient";
32+
export * from "./AccessAnalyzer";
33+
export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters";
34+
export type { RuntimeExtension } from "./runtimeExtensions";
35+
export type { AccessAnalyzerExtensionConfiguration } from "./extensionConfiguration";
36+
export * from "./commands";
37+
export * from "./pagination";
38+
export * from "./models";
39+
40+
export { AccessAnalyzerServiceException } from "./models/AccessAnalyzerServiceException";
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// smithy-typescript generated code
2+
// @ts-ignore: package.json will be imported from dist folders
3+
import packageInfo from "../package.json"; // eslint-disable-line
4+
5+
import { Sha256 } from "@aws-crypto/sha256-browser";
6+
import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser";
7+
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver";
8+
import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
9+
import { invalidProvider } from "@smithy/invalid-dependency";
10+
import { calculateBodyLength } from "@smithy/util-body-length-browser";
11+
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry";
12+
import { AccessAnalyzerClientConfig } from "./AccessAnalyzerClient";
13+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
14+
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
15+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
16+
17+
/**
18+
* @internal
19+
*/
20+
export const getRuntimeConfig = (config: AccessAnalyzerClientConfig) => {
21+
const defaultsMode = resolveDefaultsModeConfig(config);
22+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
23+
const clientSharedValues = getSharedRuntimeConfig(config);
24+
return {
25+
...clientSharedValues,
26+
...config,
27+
runtime: "browser",
28+
defaultsMode,
29+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
30+
credentialDefaultProvider:
31+
config?.credentialDefaultProvider ?? ((_: unknown) => () => Promise.reject(new Error("Credential is missing"))),
32+
defaultUserAgentProvider:
33+
config?.defaultUserAgentProvider ??
34+
createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
35+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
36+
region: config?.region ?? invalidProvider("Region is missing"),
37+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
38+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
39+
sha256: config?.sha256 ?? Sha256,
40+
streamCollector: config?.streamCollector ?? streamCollector,
41+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
42+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
43+
};
44+
};
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
// smithy-typescript generated code
2+
// @ts-ignore: package.json will be imported from dist folders
3+
import packageInfo from "../package.json"; // eslint-disable-line
4+
5+
import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
6+
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
7+
import { NODE_APP_ID_CONFIG_OPTIONS, createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-node";
8+
import {
9+
NODE_REGION_CONFIG_FILE_OPTIONS,
10+
NODE_REGION_CONFIG_OPTIONS,
11+
NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,
12+
NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,
13+
} from "@smithy/config-resolver";
14+
import { Hash } from "@smithy/hash-node";
15+
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
16+
import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
17+
import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
18+
import { calculateBodyLength } from "@smithy/util-body-length-node";
19+
import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
20+
import { AccessAnalyzerClientConfig } from "./AccessAnalyzerClient";
21+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
22+
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
23+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
24+
import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client";
25+
26+
/**
27+
* @internal
28+
*/
29+
export const getRuntimeConfig = (config: AccessAnalyzerClientConfig) => {
30+
emitWarningIfUnsupportedVersion(process.version);
31+
const defaultsMode = resolveDefaultsModeConfig(config);
32+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
33+
const clientSharedValues = getSharedRuntimeConfig(config);
34+
awsCheckVersion(process.version);
35+
const profileConfig = { profile: config?.profile };
36+
return {
37+
...clientSharedValues,
38+
...config,
39+
runtime: "node",
40+
defaultsMode,
41+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
42+
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
43+
defaultUserAgentProvider:
44+
config?.defaultUserAgentProvider ??
45+
createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
46+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
47+
region:
48+
config?.region ??
49+
loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...profileConfig }),
50+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
51+
retryMode:
52+
config?.retryMode ??
53+
loadNodeConfig(
54+
{
55+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
56+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
57+
},
58+
config
59+
),
60+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
61+
streamCollector: config?.streamCollector ?? streamCollector,
62+
useDualstackEndpoint:
63+
config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, profileConfig),
64+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, profileConfig),
65+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, profileConfig),
66+
};
67+
};
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const fs = require("fs");
2+
const path = require("path");
3+
4+
// Read the package.json file
5+
const packageJson = require("../../package.json");
6+
7+
// Create the version file content
8+
const versionFileContent = `{ "version":"${packageJson.version}" }`;
9+
10+
// Write to a new file
11+
const outputPath = path.join(__dirname, "../../version.json");
12+
fs.writeFileSync(outputPath, versionFileContent);

0 commit comments

Comments
 (0)