mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Merge branch '3.5.x'
This commit is contained in:
Generated
+1250
-587
File diff suppressed because it is too large
Load Diff
+3
-5
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"scripts": {
|
||||
"antora": "node npm/antora.js",
|
||||
"postinstall": "patch-package"
|
||||
"antora": "node npm/antora.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@antora/cli": "3.2.0-alpha.10",
|
||||
@@ -9,10 +8,9 @@
|
||||
"@antora/atlas-extension": "1.0.0-alpha.5",
|
||||
"@springio/antora-extensions": "1.14.7",
|
||||
"@springio/antora-xref-extension": "1.0.0-alpha.4",
|
||||
"@springio/antora-zip-contents-collector-extension": "1.0.0-alpha.8",
|
||||
"@springio/antora-zip-contents-collector-extension": "1.0.0-alpha.9",
|
||||
"@asciidoctor/tabs": "1.0.0-beta.6",
|
||||
"@springio/asciidoctor-extensions": "1.0.0-alpha.17",
|
||||
"patch-package": "^8.0.1"
|
||||
"@springio/asciidoctor-extensions": "1.0.0-alpha.17"
|
||||
},
|
||||
"config": {
|
||||
"ui-bundle-url": "https://github.com/spring-io/antora-ui-spring/releases/download/v0.4.18/ui-bundle.zip"
|
||||
|
||||
@@ -1,285 +0,0 @@
|
||||
diff --git a/node_modules/@vscode/gulp-vinyl-zip/lib/src/index.js b/node_modules/@vscode/gulp-vinyl-zip/lib/src/index.js
|
||||
index 17d902d..0448dec 100644
|
||||
--- a/node_modules/@vscode/gulp-vinyl-zip/lib/src/index.js
|
||||
+++ b/node_modules/@vscode/gulp-vinyl-zip/lib/src/index.js
|
||||
@@ -1,135 +1,157 @@
|
||||
-'use strict';
|
||||
-
|
||||
-var fs = require('fs');
|
||||
-var constants = fs.constants;
|
||||
-var yauzl = require('yauzl');
|
||||
-var File = require('../vinyl-zip');
|
||||
-var queue = require('queue');
|
||||
-var through = require('through');
|
||||
-var map = require('through2').obj;
|
||||
-
|
||||
-function modeFromEntry(entry) {
|
||||
- var attr = entry.externalFileAttributes >> 16 || 33188;
|
||||
-
|
||||
- // The following constants are not available on all platforms:
|
||||
- // 448 = constants.S_IRWXU, 56 = constants.S_IRWXG, 7 = constants.S_IRWXO
|
||||
- return [448, 56, 7]
|
||||
- .map(function (mask) { return attr & mask; })
|
||||
- .reduce(function (a, b) { return a + b; }, attr & constants.S_IFMT);
|
||||
+'use strict'
|
||||
+
|
||||
+// This is fork of vinyl-zip with the following updates:
|
||||
+// - unzipFile has an additional `.on('error'` handler
|
||||
+// - toStream has an additional `zip.on('error'` handler
|
||||
+
|
||||
+const fs = require('fs')
|
||||
+const constants = fs.constants
|
||||
+const yauzl = require('yauzl')
|
||||
+const File = require('vinyl')
|
||||
+const queue = require('queue')
|
||||
+const through = require('through')
|
||||
+const map = require('through2').obj
|
||||
+
|
||||
+function modeFromEntry (entry) {
|
||||
+ const attr = entry.externalFileAttributes >> 16 || 33188
|
||||
+ return [448, 56, 7]
|
||||
+ .map(function (mask) {
|
||||
+ return attr & mask
|
||||
+ })
|
||||
+ .reduce(function (a, b) {
|
||||
+ return a + b
|
||||
+ }, attr & constants.S_IFMT)
|
||||
}
|
||||
|
||||
-function mtimeFromEntry(entry) {
|
||||
- return yauzl.dosDateTimeToDate(entry.lastModFileDate, entry.lastModFileTime);
|
||||
+function mtimeFromEntry (entry) {
|
||||
+ return yauzl.dosDateTimeToDate(entry.lastModFileDate, entry.lastModFileTime)
|
||||
}
|
||||
|
||||
-function toStream(zip) {
|
||||
- var result = through();
|
||||
- var q = queue();
|
||||
- var didErr = false;
|
||||
-
|
||||
- q.on('error', function (err) {
|
||||
- didErr = true;
|
||||
- result.emit('error', err);
|
||||
- });
|
||||
-
|
||||
- zip.on('entry', function (entry) {
|
||||
- if (didErr) { return; }
|
||||
-
|
||||
- var stat = new fs.Stats();
|
||||
- stat.mode = modeFromEntry(entry);
|
||||
- stat.mtime = mtimeFromEntry(entry);
|
||||
-
|
||||
- // directories
|
||||
- if (/\/$/.test(entry.fileName)) {
|
||||
- stat.mode = (stat.mode & ~constants.S_IFMT) | constants.S_IFDIR;
|
||||
- }
|
||||
-
|
||||
- var file = {
|
||||
- path: entry.fileName,
|
||||
- stat: stat
|
||||
- };
|
||||
-
|
||||
- if (stat.isFile()) {
|
||||
- stat.size = entry.uncompressedSize;
|
||||
- if (entry.uncompressedSize === 0) {
|
||||
- file.contents = Buffer.alloc(0);
|
||||
- result.emit('data', new File(file));
|
||||
- } else {
|
||||
- q.push(function (cb) {
|
||||
- zip.openReadStream(entry, function (err, readStream) {
|
||||
- if (err) { return cb(err); }
|
||||
- file.contents = readStream;
|
||||
- result.emit('data', new File(file));
|
||||
- cb();
|
||||
- });
|
||||
- });
|
||||
-
|
||||
- q.start();
|
||||
- }
|
||||
- } else if (stat.isSymbolicLink()) {
|
||||
- stat.size = entry.uncompressedSize;
|
||||
- q.push(function (cb) {
|
||||
- zip.openReadStream(entry, function (err, readStream) {
|
||||
- if (err) { return cb(err); }
|
||||
- file.symlink = '';
|
||||
- readStream.on('data', function (c) { file.symlink += c; });
|
||||
- readStream.on('error', cb);
|
||||
- readStream.on('end', function () {
|
||||
- result.emit('data', new File(file));
|
||||
- cb();
|
||||
- });
|
||||
- });
|
||||
- });
|
||||
-
|
||||
- q.start();
|
||||
- } else if (stat.isDirectory()) {
|
||||
- result.emit('data', new File(file));
|
||||
- } else {
|
||||
- result.emit('data', new File(file));
|
||||
- }
|
||||
- });
|
||||
-
|
||||
- zip.on('end', function () {
|
||||
- if (didErr) {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- if (q.length === 0) {
|
||||
- result.end();
|
||||
- } else {
|
||||
- q.on('end', function () {
|
||||
- result.end();
|
||||
- });
|
||||
- }
|
||||
- });
|
||||
-
|
||||
- return result;
|
||||
+function toStream (zip) {
|
||||
+ const result = through()
|
||||
+ const q = queue()
|
||||
+ let didErr = false
|
||||
+
|
||||
+ q.on('error', function (err) {
|
||||
+ didErr = true
|
||||
+ result.emit('error', err)
|
||||
+ })
|
||||
+
|
||||
+ zip.on('error', function (err) {
|
||||
+ didErr = true
|
||||
+ result.emit('error', err)
|
||||
+ })
|
||||
+
|
||||
+ zip.on('entry', function (entry) {
|
||||
+ if (didErr) {
|
||||
+ return
|
||||
+ }
|
||||
+
|
||||
+ const stat = new fs.Stats()
|
||||
+ stat.mode = modeFromEntry(entry)
|
||||
+ stat.mtime = mtimeFromEntry(entry)
|
||||
+
|
||||
+ // directories
|
||||
+ if (/\/$/.test(entry.fileName)) {
|
||||
+ stat.mode = (stat.mode & ~constants.S_IFMT) | constants.S_IFDIR
|
||||
+ }
|
||||
+
|
||||
+ const file = {
|
||||
+ path: entry.fileName,
|
||||
+ stat,
|
||||
+ }
|
||||
+
|
||||
+ if (stat.isFile()) {
|
||||
+ stat.size = entry.uncompressedSize
|
||||
+ if (entry.uncompressedSize === 0) {
|
||||
+ file.contents = Buffer.alloc(0)
|
||||
+ result.emit('data', new File(file))
|
||||
+ } else {
|
||||
+ q.push(function (cb) {
|
||||
+ zip.openReadStream(entry, function (err, readStream) {
|
||||
+ if (err) {
|
||||
+ return cb(err)
|
||||
+ }
|
||||
+ file.contents = readStream
|
||||
+ result.emit('data', new File(file))
|
||||
+ cb()
|
||||
+ })
|
||||
+ })
|
||||
+
|
||||
+ q.start()
|
||||
+ }
|
||||
+ } else if (stat.isSymbolicLink()) {
|
||||
+ stat.size = entry.uncompressedSize
|
||||
+ q.push(function (cb) {
|
||||
+ zip.openReadStream(entry, function (err, readStream) {
|
||||
+ if (err) {
|
||||
+ return cb(err)
|
||||
+ }
|
||||
+ file.symlink = ''
|
||||
+ readStream.on('data', function (c) {
|
||||
+ file.symlink += c
|
||||
+ })
|
||||
+ readStream.on('error', cb)
|
||||
+ readStream.on('end', function () {
|
||||
+ result.emit('data', new File(file))
|
||||
+ cb()
|
||||
+ })
|
||||
+ })
|
||||
+ })
|
||||
+
|
||||
+ q.start()
|
||||
+ } else if (stat.isDirectory()) {
|
||||
+ result.emit('data', new File(file))
|
||||
+ } else {
|
||||
+ result.emit('data', new File(file))
|
||||
+ }
|
||||
+ })
|
||||
+
|
||||
+ zip.on('end', function () {
|
||||
+ if (didErr) {
|
||||
+ return
|
||||
+ }
|
||||
+
|
||||
+ if (q.length === 0) {
|
||||
+ result.end()
|
||||
+ } else {
|
||||
+ q.on('end', function () {
|
||||
+ result.end()
|
||||
+ })
|
||||
+ }
|
||||
+ })
|
||||
+
|
||||
+ return result
|
||||
}
|
||||
|
||||
-function unzipFile(zipPath) {
|
||||
- var result = through();
|
||||
- yauzl.open(zipPath, function (err, zip) {
|
||||
- if (err) { return result.emit('error', err); }
|
||||
- toStream(zip).pipe(result);
|
||||
- });
|
||||
- return result;
|
||||
+function unzipFile (zipPath) {
|
||||
+ const result = through()
|
||||
+ yauzl.open(zipPath, function (err, zip) {
|
||||
+ if (err) {
|
||||
+ return result.emit('error', err)
|
||||
+ }
|
||||
+ toStream(zip)
|
||||
+ .on('error', (err) => result.emit('error', err))
|
||||
+ .pipe(result)
|
||||
+ })
|
||||
+ return result
|
||||
}
|
||||
|
||||
-function unzip() {
|
||||
- return map(function (file, enc, next) {
|
||||
- if (!file.isBuffer()) return next(new Error('Only supports buffers'));
|
||||
- yauzl.fromBuffer(file.contents, (err, zip) => {
|
||||
- if (err) return this.emit('error', err);
|
||||
- toStream(zip)
|
||||
- .on('error', next)
|
||||
- .on('data', (data) => this.push(data))
|
||||
- .on('end', next);
|
||||
- });
|
||||
- });
|
||||
+function unzip () {
|
||||
+ return map(function (file, enc, next) {
|
||||
+ if (!file.isBuffer()) return next(new Error('Only supports buffers'))
|
||||
+ yauzl.fromBuffer(file.contents, (err, zip) => {
|
||||
+ if (err) return this.emit('error', err)
|
||||
+ toStream(zip)
|
||||
+ .on('error', next)
|
||||
+ .on('data', (data) => this.push(data))
|
||||
+ .on('end', next)
|
||||
+ })
|
||||
+ })
|
||||
}
|
||||
|
||||
-function src(zipPath) {
|
||||
- return zipPath ? unzipFile(zipPath) : unzip();
|
||||
+function src (zipPath) {
|
||||
+ return zipPath ? unzipFile(zipPath) : unzip()
|
||||
}
|
||||
|
||||
-module.exports = src;
|
||||
+module.exports = src
|
||||
Reference in New Issue
Block a user