Comparing version 2.0.3 to 2.1.0
@@ -180,7 +180,4 @@ 'use strict'; | ||
res.body.forEach(function (item) { | ||
// strip first two segments of the path (that might start with leading /) | ||
var mpath = item.path[0] === '/' ? item.path.substr(1) : item.path; | ||
mpath = mpath.split('/').slice(2).join('/'); | ||
prefixes.forEach(function (prefix) { | ||
if (mpath.startsWith(prefix.name)) { | ||
if (item.path.indexOf(prefix.name) !== -1) { | ||
urls.push(item.url); | ||
@@ -275,2 +272,2 @@ prefix.found = true; | ||
exports.default = _module; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi90YXNrLmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsIm9wdGlvbnMiLCJjb25maWciLCJkb3dubG9hZEVycm9yIiwiRVhJVF9DT0RFIiwic2NoZWR1bGVOZXh0IiwiX3NhdmUiLCJsYXN0IiwiX2xhc3QiLCJjZmdGaWxlIiwid3JpdGUiLCJjb25zb2xlIiwiaW5mbyIsInByb2Nlc3MiLCJleGl0Iiwic2V0VGltZW91dCIsInJ1biIsImludGVydmFsIiwic3RhcnRTY3JpcHQiLCJzY3JpcHRGaWxlIiwicmVzb2x2ZSIsInNjcmlwdCIsIl90YXJnZXQiLCJjd2QiLCJkaXJuYW1lIiwic3Rkb3V0Iiwib24iLCJkYXRhIiwidG9TdHJpbmciLCJzdGRlcnIiLCJ3YXJuIiwiZXJyIiwiZXJyb3IiLCJKU09OIiwic3RyaW5naWZ5IiwiY29kZSIsImUiLCJtZXNzYWdlIiwiY2NpRG93bmxvYWRPbmUiLCJfdXJscyIsImxlbmd0aCIsInVybCIsInBvcCIsImZpbGVuYW1lIiwic3BsaXQiLCJzdHJlYW1OYW1lIiwiam9pbiIsInN0cmVhbSIsImNyZWF0ZVdyaXRlU3RyZWFtIiwic3RhcnQiLCJEYXRlIiwiZ2V0VGltZSIsImdldCIsInF1ZXJ5IiwidG9rZW4iLCJ0aW1lb3V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ICB9XG4gIGNvbnN0IGFwaVBhdGggPSBbJy9hcGkvdjEuMS9wcm9qZWN0JywgY29uZmlnLmhvc3RpbmcsIGNvbmZpZy5vcmdhbmlzYXRpb24sIGNvbmZpZy5wcm9qZWN0LCAndHJlZScsIGNvbmZpZy5icmFuY2hdLmpvaW4oJy8nKTtcbiAgY29uc29sZS5sb2coJ0dldHRpbmcgaW5mbyBhYm91dCBsYXN0IHN1Y2Nlc3NmdWwgYnVpbGQgb2YgJyArIGNvbmZpZy5fbmFtZSArICcuJyk7XG4gIHJlcXVlc3RcbiAgICAuZ2V0KCdodHRwczovL2NpcmNsZWNpLmNvbScgKyBhcGlQYXRoKVxuICAgIC5xdWVyeSh7ICdjaXJjbGUtdG9rZW4nOiBjb25maWcudG9rZW4sIGZpbHRlcjogJ3N1Y2Nlc3NmdWwnLCBsaW1pdDogMSB9KVxuICAgIC5zZXQoJ0FjY2VwdCcsICdhcHBsaWNhdGlvbi9qc29uJylcbiAgICAudGltZW91dChjb25maWcudGltZW91dCAqIDEwMDApXG4gICAgLmVuZChjY2lCdWlsZEluZm9IYW5kbGVyKTtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IG1vZHVsZTtcbiJdfQ== |
@@ -7,3 +7,3 @@ 'use strict'; | ||
// generated code, please see package.json | ||
exports.default = '2.0.3'; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi92ZXJzaW9uLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUE7a0JBQ2UsTyIsImZpbGUiOiJ2ZXJzaW9uLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gZ2VuZXJhdGVkIGNvZGUsIHBsZWFzZSBzZWUgcGFja2FnZS5qc29uXG5leHBvcnQgZGVmYXVsdCAnMi4wLjMnO1xuIl19 | ||
exports.default = '2.1.0'; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi92ZXJzaW9uLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUE7a0JBQ2UsTyIsImZpbGUiOiJ2ZXJzaW9uLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gZ2VuZXJhdGVkIGNvZGUsIHBsZWFzZSBzZWUgcGFja2FnZS5qc29uXG5leHBvcnQgZGVmYXVsdCAnMi4xLjAnO1xuIl19 |
{ | ||
"name": "cci-pingu", | ||
"version": "2.0.3", | ||
"version": "2.1.0", | ||
"description": "Periodically check for new builds (artifacts) on CircleCI and install them in turn", | ||
@@ -38,3 +38,3 @@ "license": "MIT", | ||
"babel-preset-stage-0": "^6.24.1", | ||
"eslint": "^4.9.0", | ||
"eslint": "^4.10.0", | ||
"eslint-config-standard": "^10.2.1", | ||
@@ -41,0 +41,0 @@ "eslint-plugin-import": "^2.8.0", |
@@ -32,3 +32,3 @@ [![Dependency Status](https://img.shields.io/david/salsita/cci-pingu.svg)](https://david-dm.org/salsita/cci-pingu) | ||
| branch | * | string| | The project repository branch to monitor. | | ||
| artifacts | * | array of strings | | List of artifact names that will be downloaded for successful build. Actually, it is list of artifact name *prefixes* so that you can have "test" string in the `artifacts` array and it would match "test-1.2.3.tgz" artifact on CircleCI. | | ||
| artifacts | * | array of strings | | List of artifact names that will be downloaded for successful build. Actually, it is list of artifact name *substrings* so that you can have "test" string in the `artifacts` array and it would match "test-1.2.3.tgz" artifact on CircleCI. | | ||
| script | * | string | | Filename of executable (typically script) that is able to install the artifacts locally. | | ||
@@ -50,3 +50,3 @@ | interval | | integer | 60 | When running in continuous mode, this number specifies the number of seconds between two consecutive checks on CircleCI. | | ||
When the tool finds out that the latest CircleCI build (or the build provided on command line explicitly) is not installed locally, it retrieves the information about given build, including the artifacts of the build, and then compiles a list of artifacts that needs to be downloaded by comparing the list of artifacts listed in configuration file. As mentioned above, the list from configuration file is actually list of artifact name *prefixes*, so when you have "test" in the `artifacts` array of the configuration file, and the build info indicates that there are two artifacts on CircleCI, "test-1.2.3.tgz" and "test-db-0.1.2.dump", then both the artifacts will match the prefix and will be added to the list of artifacts to be donwloaded. | ||
When the tool finds out that the latest CircleCI build (or the build provided on command line explicitly) is not installed locally, it retrieves the information about given build, including the artifacts of the build, and then compiles a list of artifacts that needs to be downloaded by comparing the list of artifacts listed in configuration file. As mentioned above, the list from configuration file is actually list of artifact name *substrings*, so when you have "test" in the `artifacts` array of the configuration file, and the build info indicates that there are two artifacts on CircleCI, "test-1.2.3.tgz" and "test-db-0.1.2.dump", then both the artifacts will match the substring and will be added to the list of artifacts to be donwloaded. | ||
@@ -53,0 +53,0 @@ Once we know the list of the artifacts, the tool will create a new directory under `directory` from the config file. The name of the directory is `build-<CCI-build-number>[.installation-attempt-number]`. The installation attempt number is only used in case there already was some attempt to install the exact same build, but it failed for any reason. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80733
604