package init

This commit is contained in:
wangxiao65 2020-09-07 16:38:07 +08:00
parent 85d26b6dac
commit 6b960b6e6c
4 changed files with 13 additions and 9 deletions

BIN
2.2.0.tar.gz Normal file

Binary file not shown.

View File

@ -8,13 +8,7 @@ Release: 1
Summary: Get and validate the raw body of a readable stream Summary: Get and validate the raw body of a readable stream
License: MIT License: MIT
URL: https://github.com/stream-utils/raw-body URL: https://github.com/stream-utils/raw-body
Source0: http://registry.npmjs.org/raw-body/-/raw-body-%{version}.tgz Source0: https://github.com/stream-utils/raw-body/archive/%{version}.tar.gz
#git clone git://github.com/stream-utils/raw-body.git
#cd raw-body
#git archive --prefix="test/" --format=tar tags/${tag}:test/ \
# | bzip2 > "$pwd"/tests-${tag}.tar.bz2
Source1: tests-%{version}.tar.bz2
ExclusiveArch: %{nodejs_arches} noarch ExclusiveArch: %{nodejs_arches} noarch
BuildArch: noarch BuildArch: noarch
BuildRequires: nodejs-packaging BuildRequires: nodejs-packaging
@ -24,6 +18,12 @@ BuildRequires: npm(bytes) npm(iconv-lite) npm(unpipe)
BuildRequires: npm(bluebird) npm(istanbul) BuildRequires: npm(bluebird) npm(istanbul)
Buildrequires: npm(mocha) Buildrequires: npm(mocha)
BuildRequires: npm(readable-stream) npm(through2) BuildRequires: npm(readable-stream) npm(through2)
# not packaged
# BuildRequires: npm(eslint)
# BuildRequires: npm(eslint-config-standard)
# BuildRequires: npm(eslint-plugin-markdown)
# BuildRequires: npm(eslint-plugin-promise)
# BuildRequires: npm(eslint-plugin-standard)
%endif %endif
%description %description
@ -31,9 +31,10 @@ This module gets the entire buffer of a stream either as a buffer or a string.
It validates the stream's length against an expected length and maximum limit. It validates the stream's length against an expected length and maximum limit.
It is ideal for parsing request bodies. It is ideal for parsing request bodies.
%prep %prep
%setup -q -n package %autosetup -n raw-body-%{version}
%setup -q -T -D -a 1 -n package
%nodejs_fixdep bytes --caret %nodejs_fixdep bytes --caret
%nodejs_fixdep iconv-lite '<0.5.0' %nodejs_fixdep iconv-lite '<0.5.0'
%nodejs_fixdep unpipe --caret %nodejs_fixdep unpipe --caret
@ -41,6 +42,7 @@ It is ideal for parsing request bodies.
%build %build
#nothing to do #nothing to do
%install %install
mkdir -p %{buildroot}%{nodejs_sitelib}/raw-body mkdir -p %{buildroot}%{nodejs_sitelib}/raw-body
cp -pr package.json index.js \ cp -pr package.json index.js \
@ -48,6 +50,7 @@ cp -pr package.json index.js \
%nodejs_symlink_deps %nodejs_symlink_deps
%check %check
%nodejs_symlink_deps --check %nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")' %{__nodejs} -e 'require("./")'
@ -58,6 +61,7 @@ istanbul-js cover mocha -- --trace-deprecation --reporter dot --check-leaks test
istanbul-js cover mocha --report lcovonly -- --trace-deprecation --reporter spec --check-leaks test/ istanbul-js cover mocha --report lcovonly -- --trace-deprecation --reporter spec --check-leaks test/
%endif %endif
%files %files
%doc README.md %doc README.md
%license LICENSE %license LICENSE

Binary file not shown.

Binary file not shown.