Sync from SUSE:SLFO:Main local-npm-registry revision 9e9c0c66b4366971ac9b31d3e01f8342

This commit is contained in:
Adrian Schröter 2024-05-03 16:20:48 +02:00
commit bef9ae756a
4 changed files with 108 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,18 @@
-------------------------------------------------------------------
Wed Aug 11 17:06:14 UTC 2021 - Adam Majer <adam.majer@suse.de>
- update to 0.0.3:
* fixes case when npm is stalling when package is not found
-------------------------------------------------------------------
Tue Jan 26 14:43:10 UTC 2021 - Adam Majer <adam.majer@suse.de>
- Update to 0.0.2: fixes uncaught exceptions
- work with quilt when unpacking archive
-------------------------------------------------------------------
Mon Jan 18 16:16:21 UTC 2021 - Adam Majer <adam.majer@suse.de>
- Initial version 0.0.1

64
local-npm-registry.spec Normal file
View File

@ -0,0 +1,64 @@
#
# spec file for package local-npm-registry
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: local-npm-registry
Version: 0.0.3
Release: 0
Summary: Localhost-only version of NPM registry
License: GPL-3.0-or-later
URL: https://github.com/openSUSE/npm-localhost-proxy
Source: https://github.com/openSUSE/npm-localhost-proxy/releases/download/v%{version}/local_npm_registry-v%{version}.tar.gz
Requires: npm-default
BuildArch: noarch
%description
localhost-only npm registry serves NPM packages on localhost
address allowing running of "npm install" in a non-networked
environment
%prep
%autosetup -p1 -n local_npm_registry-v%{version}
%build
# nothing to build, or we end up in a build cycle of 1
%install
mkdir -p %{buildroot}%{_datadir}/%{name}
mkdir -p %{buildroot}%{_bindir}
cp -r dist node_modules %{buildroot}%{_datadir}/%{name}
cat > %{buildroot}%{_bindir}/local-npm-registry << EOF
#!/bin/sh
if [ "x$QUILT_COMMAND" = "xsetup" ]
then
echo "Run in setup mode. 'npm install' skipped. Run 'npm ci' manually."
cp "$RPM_SOURCE_DIR/package-lock.json" .
exit 0
fi
exec %{_bindir}/node %{_datadir}/%{name}/dist/ "\$@"
EOF
%files
%defattr(-,root,root)
%license COPYING
%doc README.md
%attr(755,root,root) %{_bindir}/local-npm-registry
%{_datadir}/%{name}
%changelog

BIN
local_npm_registry-v0.0.3.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.