File Explorer

/var/runtime/node_modules/@aws-sdk/client-appconfigdata/dist-cjs

This explorer reads the filesystem of the server it runs on, so /workspace/user isn't present here. Browsing and the terminal still work against this server's own disk from /.

2 dirs
3 files
index.js22.2 KB · 593 lines
"use strict";var __defProp = Object.defineProperty;var __getOwnPropDesc = Object.getOwnPropertyDescriptor;var __getOwnPropNames = Object.getOwnPropertyNames;var __hasOwnProp = Object.prototype.hasOwnProperty;var __name = (target, value) => __defProp(target, "name", { value, configurable: true });var __export = (target, all) => {  for (var name in all)    __defProp(target, name, { get: all[name], enumerable: true });};var __copyProps = (to, from, except, desc) => {  if (from && typeof from === "object" || typeof from === "function") {    for (let key of __getOwnPropNames(from))      if (!__hasOwnProp.call(to, key) && key !== except)        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });  }  return to;};var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.tsvar index_exports = {};__export(index_exports, {  AppConfigData: () => AppConfigData,  AppConfigDataClient: () => AppConfigDataClient,  AppConfigDataServiceException: () => AppConfigDataServiceException,  BadRequestDetails: () => BadRequestDetails,  BadRequestException: () => BadRequestException,  BadRequestReason: () => BadRequestReason,  GetLatestConfigurationCommand: () => GetLatestConfigurationCommand,  GetLatestConfigurationResponseFilterSensitiveLog: () => GetLatestConfigurationResponseFilterSensitiveLog,  InternalServerException: () => InternalServerException,  InvalidParameterProblem: () => InvalidParameterProblem,  ResourceNotFoundException: () => ResourceNotFoundException,  ResourceType: () => ResourceType,  StartConfigurationSessionCommand: () => StartConfigurationSessionCommand,  ThrottlingException: () => ThrottlingException,  __Client: () => import_smithy_client.Client});module.exports = __toCommonJS(index_exports); // src/AppConfigDataClient.tsvar import_middleware_host_header = require("@aws-sdk/middleware-host-header");var import_middleware_logger = require("@aws-sdk/middleware-logger");var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");var import_config_resolver = require("@smithy/config-resolver");var import_core = require("@smithy/core");var import_middleware_content_length = require("@smithy/middleware-content-length");var import_middleware_endpoint = require("@smithy/middleware-endpoint");var import_middleware_retry = require("@smithy/middleware-retry"); var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider"); // src/endpoint/EndpointParameters.tsvar resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {  return Object.assign(options, {    useDualstackEndpoint: options.useDualstackEndpoint ?? false,    useFipsEndpoint: options.useFipsEndpoint ?? false,    defaultSigningName: "appconfig"  });}, "resolveClientEndpointParameters");var commonParams = {  UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },  Endpoint: { type: "builtInParams", name: "endpoint" },  Region: { type: "builtInParams", name: "region" },  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }}; // src/AppConfigDataClient.tsvar import_runtimeConfig = require("././runtimeConfig"); // src/runtimeExtensions.tsvar import_region_config_resolver = require("@aws-sdk/region-config-resolver");var import_protocol_http = require("@smithy/protocol-http");var import_smithy_client = require("@smithy/smithy-client"); // src/auth/httpAuthExtensionConfiguration.tsvar getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {  const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;  let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;  let _credentials = runtimeConfig.credentials;  return {    setHttpAuthScheme(httpAuthScheme) {      const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);      if (index === -1) {        _httpAuthSchemes.push(httpAuthScheme);      } else {        _httpAuthSchemes.splice(index, 1, httpAuthScheme);      }    },    httpAuthSchemes() {      return _httpAuthSchemes;    },    setHttpAuthSchemeProvider(httpAuthSchemeProvider) {      _httpAuthSchemeProvider = httpAuthSchemeProvider;    },    httpAuthSchemeProvider() {      return _httpAuthSchemeProvider;    },    setCredentials(credentials) {      _credentials = credentials;    },    credentials() {      return _credentials;    }  };}, "getHttpAuthExtensionConfiguration");var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {  return {    httpAuthSchemes: config.httpAuthSchemes(),    httpAuthSchemeProvider: config.httpAuthSchemeProvider(),    credentials: config.credentials()  };}, "resolveHttpAuthRuntimeConfig"); // src/runtimeExtensions.tsvar resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {  const extensionConfiguration = Object.assign(    (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),    (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),    (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),    getHttpAuthExtensionConfiguration(runtimeConfig)  );  extensions.forEach((extension) => extension.configure(extensionConfiguration));  return Object.assign(    runtimeConfig,    (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),    (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),    (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),    resolveHttpAuthRuntimeConfig(extensionConfiguration)  );}, "resolveRuntimeExtensions"); // src/AppConfigDataClient.tsvar AppConfigDataClient = class extends import_smithy_client.Client {  static {    __name(this, "AppConfigDataClient");  }  /**   * The resolved configuration of AppConfigDataClient class. This is resolved and normalized from the {@link AppConfigDataClientConfig | constructor configuration interface}.   */  config;  constructor(...[configuration]) {    const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});    super(_config_0);    this.initConfig = _config_0;    const _config_1 = resolveClientEndpointParameters(_config_0);    const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);    const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);    const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);    const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);    const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);    const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);    const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);    this.config = _config_8;    this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));    this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));    this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));    this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));    this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));    this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));    this.middlewareStack.use(      (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {        httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultAppConfigDataHttpAuthSchemeParametersProvider,        identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({          "aws.auth#sigv4": config.credentials        }), "identityProviderConfigProvider")      })    );    this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));  }  /**   * Destroy underlying resources, like sockets. It's usually not necessary to do this.   * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.   * Otherwise, sockets might stay open for quite a long time before the server terminates them.   */  destroy() {    super.destroy();  }}; // src/AppConfigData.ts  // src/commands/GetLatestConfigurationCommand.ts var import_middleware_serde = require("@smithy/middleware-serde");  // src/models/models_0.ts  // src/models/AppConfigDataServiceException.ts var AppConfigDataServiceException = class _AppConfigDataServiceException extends import_smithy_client.ServiceException {  static {    __name(this, "AppConfigDataServiceException");  }  /**   * @internal   */  constructor(options) {    super(options);    Object.setPrototypeOf(this, _AppConfigDataServiceException.prototype);  }}; // src/models/models_0.tsvar InvalidParameterProblem = {  /**   * The parameter was corrupted and could not be understood by the service.   */  CORRUPTED: "Corrupted",  /**   * The parameter was expired and can no longer be used.   */  EXPIRED: "Expired",  /**   * The client called the service before the time specified in the poll interval.   */  POLL_INTERVAL_NOT_SATISFIED: "PollIntervalNotSatisfied"};var BadRequestDetails;((BadRequestDetails2) => {  BadRequestDetails2.visit = /* @__PURE__ */ __name((value, visitor) => {    if (value.InvalidParameters !== void 0) return visitor.InvalidParameters(value.InvalidParameters);    return visitor._(value.$unknown[0], value.$unknown[1]);  }, "visit");})(BadRequestDetails || (BadRequestDetails = {}));var BadRequestReason = {  /**   * Indicates there was a problem with one or more of the parameters.   * See InvalidParameters in the BadRequestDetails for more information.   */  INVALID_PARAMETERS: "InvalidParameters"};var BadRequestException = class _BadRequestException extends AppConfigDataServiceException {  static {    __name(this, "BadRequestException");  }  name = "BadRequestException";  $fault = "client";  Message;  /**   * <p>Code indicating the reason the request was invalid.</p>   * @public   */  Reason;  /**   * <p>Details describing why the request was invalid.</p>   * @public   */  Details;  /**   * @internal   */  constructor(opts) {    super({      name: "BadRequestException",      $fault: "client",      ...opts    });    Object.setPrototypeOf(this, _BadRequestException.prototype);    this.Message = opts.Message;    this.Reason = opts.Reason;    this.Details = opts.Details;  }};var InternalServerException = class _InternalServerException extends AppConfigDataServiceException {  static {    __name(this, "InternalServerException");  }  name = "InternalServerException";  $fault = "server";  Message;  /**   * @internal   */  constructor(opts) {    super({      name: "InternalServerException",      $fault: "server",      ...opts    });    Object.setPrototypeOf(this, _InternalServerException.prototype);    this.Message = opts.Message;  }};var ResourceType = {  /**   * Resource type value for the Application resource.   */  APPLICATION: "Application",  /**   * Resource type value for the Configuration resource.   */  CONFIGURATION: "Configuration",  /**   * Resource type value for the ConfigurationProfile resource.   */  CONFIGURATION_PROFILE: "ConfigurationProfile",  /**   * Resource type value for the Deployment resource.   */  DEPLOYMENT: "Deployment",  /**   * Resource type value for the Environment resource.   */  ENVIRONMENT: "Environment"};var ResourceNotFoundException = class _ResourceNotFoundException extends AppConfigDataServiceException {  static {    __name(this, "ResourceNotFoundException");  }  name = "ResourceNotFoundException";  $fault = "client";  Message;  /**   * <p>The type of resource that was not found.</p>   * @public   */  ResourceType;  /**   * <p>A map indicating which parameters in the request reference the resource that was not   *          found.</p>   * @public   */  ReferencedBy;  /**   * @internal   */  constructor(opts) {    super({      name: "ResourceNotFoundException",      $fault: "client",      ...opts    });    Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);    this.Message = opts.Message;    this.ResourceType = opts.ResourceType;    this.ReferencedBy = opts.ReferencedBy;  }};var ThrottlingException = class _ThrottlingException extends AppConfigDataServiceException {  static {    __name(this, "ThrottlingException");  }  name = "ThrottlingException";  $fault = "client";  Message;  /**   * @internal   */  constructor(opts) {    super({      name: "ThrottlingException",      $fault: "client",      ...opts    });    Object.setPrototypeOf(this, _ThrottlingException.prototype);    this.Message = opts.Message;  }};var GetLatestConfigurationResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({  ...obj,  ...obj.Configuration && { Configuration: import_smithy_client.SENSITIVE_STRING }}), "GetLatestConfigurationResponseFilterSensitiveLog"); // src/protocols/Aws_restJson1.tsvar import_core2 = require("@aws-sdk/core");  var se_GetLatestConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {  const b = (0, import_core.requestBuilder)(input, context);  const headers = {};  b.bp("/configuration");  const query = (0, import_smithy_client.map)({    [_ct]: [, (0, import_smithy_client.expectNonNull)(input[_CT], `ConfigurationToken`)]  });  let body;  b.m("GET").h(headers).q(query).b(body);  return b.build();}, "se_GetLatestConfigurationCommand");var se_StartConfigurationSessionCommand = /* @__PURE__ */ __name(async (input, context) => {  const b = (0, import_core.requestBuilder)(input, context);  const headers = {    "content-type": "application/json"  };  b.bp("/configurationsessions");  let body;  body = JSON.stringify(    (0, import_smithy_client.take)(input, {      ApplicationIdentifier: [],      ConfigurationProfileIdentifier: [],      EnvironmentIdentifier: [],      RequiredMinimumPollIntervalInSeconds: []    })  );  b.m("POST").h(headers).b(body);  return b.build();}, "se_StartConfigurationSessionCommand");var de_GetLatestConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode !== 200 && output.statusCode >= 300) {    return de_CommandError(output, context);  }  const contents = (0, import_smithy_client.map)({    $metadata: deserializeMetadata(output),    [_NPCT]: [, output.headers[_npct]],    [_NPIIS]: [() => void 0 !== output.headers[_npiis], () => (0, import_smithy_client.strictParseInt32)(output.headers[_npiis])],    [_CTo]: [, output.headers[_ct_]],    [_VL]: [, output.headers[_vl]]  });  const data = await (0, import_smithy_client.collectBody)(output.body, context);  contents.Configuration = data;  return contents;}, "de_GetLatestConfigurationCommand");var de_StartConfigurationSessionCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode !== 201 && output.statusCode >= 300) {    return de_CommandError(output, context);  }  const contents = (0, import_smithy_client.map)({    $metadata: deserializeMetadata(output)  });  const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");  const doc = (0, import_smithy_client.take)(data, {    InitialConfigurationToken: import_smithy_client.expectString  });  Object.assign(contents, doc);  return contents;}, "de_StartConfigurationSessionCommand");var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {  const parsedOutput = {    ...output,    body: await (0, import_core2.parseJsonErrorBody)(output.body, context)  };  const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);  switch (errorCode) {    case "BadRequestException":    case "com.amazonaws.appconfigdata#BadRequestException":      throw await de_BadRequestExceptionRes(parsedOutput, context);    case "InternalServerException":    case "com.amazonaws.appconfigdata#InternalServerException":      throw await de_InternalServerExceptionRes(parsedOutput, context);    case "ResourceNotFoundException":    case "com.amazonaws.appconfigdata#ResourceNotFoundException":      throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);    case "ThrottlingException":    case "com.amazonaws.appconfigdata#ThrottlingException":      throw await de_ThrottlingExceptionRes(parsedOutput, context);    default:      const parsedBody = parsedOutput.body;      return throwDefaultError({        output,        parsedBody,        errorCode      });  }}, "de_CommandError");var throwDefaultError = (0, import_smithy_client.withBaseException)(AppConfigDataServiceException);var de_BadRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    Details: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)((0, import_core2.awsExpectUnion)(_)), "Details"),    Message: import_smithy_client.expectString,    Reason: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new BadRequestException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_BadRequestExceptionRes");var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    Message: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new InternalServerException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_InternalServerExceptionRes");var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    Message: import_smithy_client.expectString,    ReferencedBy: import_smithy_client._json,    ResourceType: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new ResourceNotFoundException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_ResourceNotFoundExceptionRes");var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    Message: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new ThrottlingException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_ThrottlingExceptionRes");var deserializeMetadata = /* @__PURE__ */ __name((output) => ({  httpStatusCode: output.statusCode,  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],  extendedRequestId: output.headers["x-amz-id-2"],  cfId: output.headers["x-amz-cf-id"]}), "deserializeMetadata");var _CT = "ConfigurationToken";var _CTo = "ContentType";var _NPCT = "NextPollConfigurationToken";var _NPIIS = "NextPollIntervalInSeconds";var _VL = "VersionLabel";var _ct = "configuration_token";var _ct_ = "content-type";var _npct = "next-poll-configuration-token";var _npiis = "next-poll-interval-in-seconds";var _vl = "version-label"; // src/commands/GetLatestConfigurationCommand.tsvar GetLatestConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("AppConfigData", "GetLatestConfiguration", {}).n("AppConfigDataClient", "GetLatestConfigurationCommand").f(void 0, GetLatestConfigurationResponseFilterSensitiveLog).ser(se_GetLatestConfigurationCommand).de(de_GetLatestConfigurationCommand).build() {  static {    __name(this, "GetLatestConfigurationCommand");  }}; // src/commands/StartConfigurationSessionCommand.ts   var StartConfigurationSessionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("AppConfigData", "StartConfigurationSession", {}).n("AppConfigDataClient", "StartConfigurationSessionCommand").f(void 0, void 0).ser(se_StartConfigurationSessionCommand).de(de_StartConfigurationSessionCommand).build() {  static {    __name(this, "StartConfigurationSessionCommand");  }}; // src/AppConfigData.tsvar commands = {  GetLatestConfigurationCommand,  StartConfigurationSessionCommand};var AppConfigData = class extends AppConfigDataClient {  static {    __name(this, "AppConfigData");  }};(0, import_smithy_client.createAggregatedClient)(commands, AppConfigData);// Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = {  AppConfigDataServiceException,  __Client,  AppConfigDataClient,  AppConfigData,  $Command,  GetLatestConfigurationCommand,  StartConfigurationSessionCommand,  InvalidParameterProblem,  BadRequestDetails,  BadRequestReason,  BadRequestException,  InternalServerException,  ResourceType,  ResourceNotFoundException,  ThrottlingException,  GetLatestConfigurationResponseFilterSensitiveLog});