Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

kit-image-deployer

Package Overview
Dependencies
Maintainers
12
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kit-image-deployer - npm Package Compare versions

Comparing version 3.3.5-PRERELEASE-github-abuse-updates.0 to 3.3.5

12

package.json
{
"name": "kit-image-deployer",
"version": "3.3.5-PRERELEASE-github-abuse-updates.0",
"version": "3.3.5",
"description": "A service that can be used to update given yaml files within a git repository with a new docker image path.",

@@ -41,11 +41,3 @@ "repository": {

"src"
],
"publishConfig": {
"tag": "PRERELEASE-github-abuse-updates"
},
"release": {
"fallbackTags": {
"PRERELEASE-github-abuse-updates": "latest"
}
}
]
}

2

README.md

@@ -8,2 +8,4 @@ <p align="center">

# kit-image-deployer
**[DEPRECATED] Thanks for using this package, but we will no longer support it.**
[ ![Codeship Status for InVisionApp/kit-image-deployer](https://codeship.com/projects/37301840-0ff1-0134-c5dd-5e067c09569b/status?branch=master)](https://codeship.com/projects/156829)

@@ -10,0 +12,0 @@ [![Docker Repository on Quay](https://quay.io/repository/invision/kit-image-deployer/status "Docker Repository on Quay")](https://quay.io/repository/invision/kit-image-deployer)

@@ -15,3 +15,3 @@ "use strict";

retries: 10,
retryInterval: 30,
retryIncrement: 30, // seconds
docker: {

@@ -67,2 +67,3 @@ registry: undefined,

self.emitter.emit("request", "Getting an image file from github");
return self.github.getContent(imageRequest).then(imageResponse => {

@@ -103,2 +104,8 @@ // get

if (tries > self.options.retries) {
self.emitter.emit(
"error",
`Unable to update the image file after ${
self.options.retries
} attempts final error: ${lastError}`
);
return reject(lastError);

@@ -130,2 +137,3 @@ }

self.emitter.emit("request", "Updating an image file in github");
self.github

@@ -146,13 +154,8 @@ .updateFile({

let errCode = err && err.code ? err.code : undefined;
if (errCode && errCode >= 500) {
// don't retry 500 errors
reject(err);
} else {
self.emitter.emit(
"error",
`Error updating image file status code ${errCode}, will retry after delay`
);
// try again after a delay
self.retryAfterDelay(tries, err, attempt);
}
self.emitter.emit(
"backoff",
`Error updating image file status code ${errCode}, will retry after a delay`
);
// try again after a delay
self.retryAfterDelay(tries, err, attempt);
});

@@ -193,3 +196,3 @@ } else {

self.emitter.emit(
"info",
"request",
`Image file didn't exist creating image file`

@@ -209,18 +212,18 @@ );

})
.catch(() => {
// try again
attempt(err);
.catch(err => {
let errCode = err && err.code ? err.code : undefined;
// try again after a delay
self.emitter.emit(
"backoff",
`Error creating image file status code ${errCode}, will retry after a delay`
);
self.retryAfterDelay(tries, err, attempt);
});
} else {
if (errCode && errCode >= 500) {
// don't retry 500 errors
reject(err);
} else {
self.emitter.emit(
"error",
`Error creating image file status code ${errCode}, will retry after delay`
);
// try again after a delay
self.retryAfterDelay(tries, err, attempt);
}
self.emitter.emit(
"backoff",
`Error getting image file status code ${errCode}, will retry after a delay`
);
// try again after a delay
self.retryAfterDelay(tries, err, attempt);
}

@@ -251,29 +254,29 @@ });

.catch(reject);
} else {
const configRequest = {
user: self.options.github.user,
repo: self.options.github.repo,
path: "kit.yaml"
};
self.github
.getContent(configRequest)
.then(function(configResponse) {
const rawConfig = new Buffer(
configResponse.content,
configResponse.encoding
).toString("ascii");
const config = yaml.safeLoad(rawConfig);
return self.attemptCommit(
config,
image,
branch,
committer,
message,
save
);
})
.then(resolve)
.catch(reject);
}
const configRequest = {
user: self.options.github.user,
repo: self.options.github.repo,
path: "kit.yaml"
};
self.github
.getContent(configRequest)
.then(function(configResponse) {
const rawConfig = new Buffer(
configResponse.content,
configResponse.encoding
).toString("ascii");
const config = yaml.safeLoad(rawConfig);
return self.attemptCommit(
config,
image,
branch,
committer,
message,
save
);
})
.then(resolve)
.catch(reject);
});

@@ -290,3 +293,3 @@ }

retryAfterDelay(attempt, err, func) {
let retryDelay = attempt * this.options.retryInterval * 1000;
let retryDelay = attempt * this.options.retryIncrement * 1000;
return setTimeout(() => {

@@ -293,0 +296,0 @@ return func(err);

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