outline: 0.85.1 -> 0.86.1 (#432857)
This commit is contained in:
commit
1ede77b84a
@ -10,6 +10,7 @@ const path = require('path')
|
||||
const lockfile = require('./yarnpkg-lockfile.js')
|
||||
const { promisify } = require('util')
|
||||
const url = require('url')
|
||||
const { URL } = url;
|
||||
const { urlToName } = require('./common.js')
|
||||
|
||||
const execFile = promisify(child_process.execFile)
|
||||
@ -20,7 +21,7 @@ const exec = async (...args) => {
|
||||
return res
|
||||
}
|
||||
|
||||
const downloadFileHttps = (fileName, url, expectedHash, hashType = 'sha1') => {
|
||||
const downloadFileHttps = (fileName, url, expectedHash, verbose, hashType = 'sha1') => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const get = (url, redirects = 0) => https.get(url, (res) => {
|
||||
if(redirects > 10) {
|
||||
@ -28,7 +29,9 @@ const downloadFileHttps = (fileName, url, expectedHash, hashType = 'sha1') => {
|
||||
return;
|
||||
}
|
||||
if(res.statusCode === 301 || res.statusCode === 302) {
|
||||
return get(res.headers.location, redirects + 1)
|
||||
const location = new URL(res.headers.location, url);
|
||||
if (verbose) console.log('following redirect to ' + location);
|
||||
return get(location, redirects + 1);
|
||||
}
|
||||
const file = fs.createWriteStream(fileName)
|
||||
const hash = crypto.createHash(hashType)
|
||||
@ -119,9 +122,9 @@ const downloadPkg = (pkg, verbose) => {
|
||||
} else if (url.startsWith('https://')) {
|
||||
if (typeof pkg.integrity === 'string' || pkg.integrity instanceof String) {
|
||||
const [ type, checksum ] = pkg.integrity.split('-')
|
||||
return downloadFileHttps(fileName, url, Buffer.from(checksum, 'base64').toString('hex'), type)
|
||||
return downloadFileHttps(fileName, url, Buffer.from(checksum, 'base64').toString('hex'), verbose, type)
|
||||
}
|
||||
return downloadFileHttps(fileName, url, hash)
|
||||
return downloadFileHttps(fileName, url, hash, verbose)
|
||||
} else if (url.startsWith('file:')) {
|
||||
console.warn(`ignoring unsupported file:path url "${url}"`)
|
||||
} else {
|
||||
|
@ -14,13 +14,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "outline";
|
||||
version = "0.85.1";
|
||||
version = "0.86.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "outline";
|
||||
repo = "outline";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-lErNsYzxqZYVl1MAQdMk062nBORjQGd3C+UbGbZMzvA=";
|
||||
hash = "sha256-lsiwTpmb9E6C5FuYFfko4PqulDcqWU9sQnzSEJ3Y4NE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
yarnOfflineCache = fetchYarnDeps {
|
||||
yarnLock = "${src}/yarn.lock";
|
||||
hash = "sha256-/CXIZKI8eeK21PRIVZnRMOkwNNbj0vC0PZuT6rZBwG4=";
|
||||
hash = "sha256-9xJ+N+UaHTlBzXvFPyYgB4jNwdiWCkvCSN22kEGuIxI=";
|
||||
};
|
||||
|
||||
configurePhase = ''
|
||||
|
@ -10234,7 +10234,7 @@ with pkgs;
|
||||
outline = callPackage ../servers/web-apps/outline (
|
||||
lib.fix (super: {
|
||||
yarn = yarn.override { inherit (super) nodejs; };
|
||||
nodejs = nodejs_20;
|
||||
nodejs = nodejs_22;
|
||||
})
|
||||
);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user