Socket
Socket
Sign inDemoInstall

oci-common

Package Overview
Dependencies
Maintainers
4
Versions
192
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oci-common - npm Package Compare versions

Comparing version 2.84.0 to 2.84.2

4

lib/auth/abstract-federation-client-authenticated-details-provider-builder.js

@@ -33,2 +33,3 @@ "use strict";

const circuit_breaker_1 = __importDefault(require("../circuit-breaker"));
const log_1 = require("../log");
const INSTANCE_PRINCIPAL_GENERIC_ERROR = "Instance principals authentication can only be used on OCI compute instances. Please confirm this code is running on an OCI compute instance. See https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm for more info.";

@@ -169,3 +170,4 @@ class AbstractFederationClientAuthenticationDetailsProviderBuilder {

catch (e) {
console.log(`
if (log_1.LOG.logger)
log_1.LOG.logger.error(`
failed reason: ${e},

@@ -172,0 +174,0 @@ Region not supported by this version of the SDK, registering region ${regionId} under OC1

@@ -18,2 +18,3 @@ "use strict";

const retrier_1 = require("./retrier");
const log_1 = require("./log");
const Breaker = require("opossum");

@@ -46,3 +47,4 @@ function FetchWrapper(req, options, targetService, operationName, timestamp, endpoint, apiReferenceLink) {

function defaultErrorFilterFunction(e) {
console.log("error from defaultErrorFunction: ", e);
if (log_1.LOG.logger)
log_1.LOG.logger.error("error from defaultErrorFunction: ", e);
// Only consider client side errors or retry-able server errors

@@ -67,12 +69,16 @@ if (e.code || (e.errorObject && retrier_1.DefaultRetryCondition.shouldBeRetried(e.errorObject))) {

this.circuit.on("open", () => {
console.log("circuit breaker is now in OPEN state");
if (log_1.LOG.logger)
log_1.LOG.logger.debug("circuit breaker is now in OPEN state");
});
this.circuit.on("halfOpen", () => {
console.log("circuit breaker is now in HALF OPEN state");
if (log_1.LOG.logger)
log_1.LOG.logger.debug("circuit breaker is now in HALF OPEN state");
});
this.circuit.on("close", () => {
console.log("circuit breaker is now in CLOSE state");
if (log_1.LOG.logger)
log_1.LOG.logger.debug("circuit breaker is now in CLOSE state");
});
this.circuit.on("shutdown", () => {
console.log("circuit breaker is now SHUTDOWN");
if (log_1.LOG.logger)
log_1.LOG.logger.debug("circuit breaker is now SHUTDOWN");
});

@@ -79,0 +85,0 @@ }

@@ -16,2 +16,3 @@ "use strict";

const config_file_reader_1 = require("./config-file-reader");
const log_1 = require("./log");
const OCI_DEVELOPER_TOOL_CONFIGURATION_FILE_PATH = "OCI_DEVELOPER_TOOL_CONFIGURATION_FILE_PATH";

@@ -52,6 +53,7 @@ const OCI_ALLOW_ONLY_DEVELOPER_TOOL_CONFIGURATION_REGIONS = "OCI_ALLOW_ONLY_DEVELOPER_TOOL_CONFIGURATION_REGIONS";

catch (error) {
console.log("Failure while parsing DeveloperToolConfiguration config file: " +
configFilePath +
" ex:" +
error);
if (log_1.LOG.logger)
log_1.LOG.logger.error("Failure while parsing DeveloperToolConfiguration config file: " +
configFilePath +
" ex:" +
error);
}

@@ -79,12 +81,14 @@ if (developerToolConfig !== undefined) {

if (error.code === "ENOENT") {
console.log("DeveloperToolConfiguration config file not found at " +
configFilePath +
", enabling all OCI services as default");
if (log_1.LOG.logger)
log_1.LOG.logger.error("DeveloperToolConfiguration config file not found at " +
configFilePath +
", enabling all OCI services as default");
return;
}
else {
console.log("Enabling all OCI services as failsafe. There was an exception while trying to read or de-serialize the DeveloperToolConfiguration config file at: " +
configFilePath +
" ex:" +
error);
if (log_1.LOG.logger)
log_1.LOG.logger.error("Enabling all OCI services as failsafe. There was an exception while trying to read or de-serialize the DeveloperToolConfiguration config file at: " +
configFilePath +
" ex:" +
error);
}

@@ -105,3 +109,4 @@ }

if (ociEnabledServiceSet.size == 0) {
console.log("The OciEnabledServiceSet is empty, all OCI services are enabled");
if (log_1.LOG.logger)
log_1.LOG.logger.debug("The OciEnabledServiceSet is empty, all OCI services are enabled");
return true;

@@ -108,0 +113,0 @@ }

@@ -10,2 +10,3 @@ "use strict";

const realm_1 = require("./realm");
const log_1 = require("./log");
class EndpointBuilder {

@@ -39,7 +40,9 @@ static createEndpointFromRegion(template, region, endpointServiceName, serviceEndpointTemplatePerRealm, useRealmSpecificEndpointTemplate) {

if (serviceEndpointTemplatePerRealm[realmId]) {
console.log(`Using ${serviceEndpointTemplatePerRealm[realmId]} as the realm specific endpoint template`);
if (log_1.LOG.logger)
log_1.LOG.logger.info(`Using ${serviceEndpointTemplatePerRealm[realmId]} as the realm specific endpoint template`);
return serviceEndpointTemplatePerRealm[realmId];
}
}
console.log(`Realm specific endpoint template for realm ${realmId} does not exist. Falling back to endpoint template : ${defaultTemplate}`);
if (log_1.LOG.logger)
log_1.LOG.logger.info(`Realm specific endpoint template for realm ${realmId} does not exist. Falling back to endpoint template : ${defaultTemplate}`);
return defaultTemplate;

@@ -66,3 +69,4 @@ }

: realm_1.Realm.OC1.secondLevelDomain;
console.log(`Unknown regionId [${regionId}], falling back to using ${secondLevelDomain} as the second level domain.`);
if (log_1.LOG.logger)
log_1.LOG.logger.info(`Unknown regionId [${regionId}], falling back to using ${secondLevelDomain} as the second level domain.`);
return EndpointBuilder.createEndpointFromRegionIdAndSecondLevelDomain(templateToUse, regionId, secondLevelDomain);

@@ -69,0 +73,0 @@ }

@@ -32,2 +32,3 @@ /**

static OC26: Realm;
static OC15: Realm;
static values(): Realm[];

@@ -34,0 +35,0 @@ static register(realmId: string, secondLevelDomain: string, isDeveloperToolConfigurationRealm?: boolean): Realm;

@@ -76,2 +76,3 @@ "use strict";

Realm.OC26 = Realm.register("oc26", "oraclecloud26.com");
Realm.OC15 = Realm.register("oc15", "oraclecloud15.com");
//# sourceMappingURL=realm.js.map

@@ -101,2 +101,3 @@ /**

static ME_ABUDHABI_3: Region;
static AP_DCC_GAZIPUR_1: Region;
/**

@@ -103,0 +104,0 @@ * Return all known Regions in this version of the SDK, except possibly the region returned by IMDS (Instance Metadata

@@ -42,2 +42,3 @@ "use strict";

const developerToolConfiguration = __importStar(require("./developertoolconfiguration"));
const log_1 = require("./log");
class Region {

@@ -76,3 +77,4 @@ constructor(regionId, realm, regionCode, isDeveloperToolConfigurationRegion = false) {

if (!Region.hasCalledForImds && !Region.hasWarnedAboutValuesWithoutInstanceMetadataService) {
console.log("Call to Regions.values() without having contacted IMDS (Instance Metadata Service, only available on OCI instances); if you do need the region from IMDS, call Region.enableInstanceMetadata() before calling Region.values()");
if (log_1.LOG.logger)
log_1.LOG.logger.info("Call to Regions.values() without having contacted IMDS (Instance Metadata Service, only available on OCI instances); if you do need the region from IMDS, call Region.enableInstanceMetadata() before calling Region.values()");
Region.hasWarnedAboutValuesWithoutInstanceMetadataService = true;

@@ -151,3 +153,4 @@ }

catch (error) {
console.log("error reading or parsing region developertoolConfiguration file");
if (log_1.LOG.logger)
log_1.LOG.logger.error("error reading or parsing region developertoolConfiguration file");
}

@@ -175,3 +178,4 @@ }

catch (error) {
console.log("error reading or parsing region config file");
if (log_1.LOG.logger)
log_1.LOG.logger.error("error reading or parsing region config file");
}

@@ -194,3 +198,4 @@ }

catch (error) {
console.log("error reading or parsing region metadata env var config file");
if (log_1.LOG.logger)
log_1.LOG.logger.error("error reading or parsing region metadata env var config file");
}

@@ -231,3 +236,4 @@ }

catch (error) {
console.log("Unable to retrieve region metadata from instance metadata service, reason :" + error);
if (log_1.LOG.logger)
log_1.LOG.logger.error("Unable to retrieve region metadata from instance metadata service, reason :" + error);
}

@@ -396,2 +402,4 @@ }

Region.ME_ABUDHABI_3 = Region.register("me-abudhabi-3", realm_1.Realm.OC26, "ahu");
// OC15
Region.AP_DCC_GAZIPUR_1 = Region.register("ap-dcc-gazipur-1", realm_1.Realm.OC15, "dac");
//# sourceMappingURL=region.js.map
{
"name": "oci-common",
"version": "2.84.0",
"version": "2.84.2",
"description": "OCI Common module for NodeJS",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc