%global npm_name @openshift/dynamic-plugin-sdk Name: nodejs-openshift-dynamic-plugin-sdk Version: 5.0.1 Release: 3%{?dist} Summary: Allows loading, managing and interpreting dynamic plugins License: Apache-2.0 Group: Development/Libraries URL: https://github.com/openshift/dynamic-plugin-sdk#readme Source0: https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.7.tgz Source1: https://registry.npmjs.org/@openshift/dynamic-plugin-sdk/-/dynamic-plugin-sdk-5.0.1.tgz Source2: https://registry.npmjs.org/@types/lodash/-/lodash-4.17.24.tgz Source3: https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz Source4: https://registry.npmjs.org/lodash-es/-/lodash-es-4.18.1.tgz Source5: https://registry.npmjs.org/nanoclone/-/nanoclone-0.2.1.tgz Source6: https://registry.npmjs.org/property-expr/-/property-expr-2.0.6.tgz Source7: https://registry.npmjs.org/semver/-/semver-7.8.5.tgz Source8: https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz Source9: https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz Source10: https://registry.npmjs.org/yup/-/yup-0.32.11.tgz Source11: nodejs-openshift-dynamic-plugin-sdk-%{version}-package-lock.json BuildRequires: npm >= 7 BuildRequires: nodejs-packaging # The prep section runs node directly, so this is needed unconditionally. It # also works around https://issues.redhat.com/browse/RHEL-137712 on RHEL 10 # before 10.3, where the nodejs major version macro does not resolve without # node in the buildroot. BuildRequires: /usr/bin/node BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch Provides: npm(%{npm_name}) = %{version} Provides: bundled(npm(@babel/runtime)) = 7.29.7 Provides: bundled(npm(@openshift/dynamic-plugin-sdk)) = 5.0.1 Provides: bundled(npm(@types/lodash)) = 4.17.24 Provides: bundled(npm(lodash)) = 4.18.1 Provides: bundled(npm(lodash-es)) = 4.18.1 Provides: bundled(npm(nanoclone)) = 0.2.1 Provides: bundled(npm(property-expr)) = 2.0.6 Provides: bundled(npm(semver)) = 7.8.5 Provides: bundled(npm(toposort)) = 2.0.2 Provides: bundled(npm(uuid)) = 8.3.2 Provides: bundled(npm(yup)) = 0.32.11 AutoReq: no AutoProv: no %define npm_cache_dir npm_cache_%{name}-%{version}-%{release} %description %{summary} %prep mkdir -p %{npm_cache_dir} # npm ci installs the tree recorded in the lockfile: every entry carries a # resolved URL and an integrity hash, and npm serves the tarballs from the # cache primed here by content hash. No registry access is needed. for src in %{sources}; do case "$src" in *.tgz) npm cache add --cache %{npm_cache_dir} "$src" ;; *-package-lock.json) cp "$src" package-lock.json ;; esac done # Derive package.json from the lockfile so the two cannot disagree. node -e ' const fs = require("fs"); const lock = JSON.parse(fs.readFileSync("package-lock.json")); fs.writeFileSync("package.json", JSON.stringify({ name: lock.name, version: lock.version, dependencies: lock.packages[""].dependencies }, null, 2) + "\n"); ' %build npm ci --legacy-peer-deps --offline --cache %{_builddir}/%{npm_cache_dir} --omit optional %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pfr node_modules/%{npm_name}/node_modules %{buildroot}%{nodejs_sitelib}/%{npm_name} # npm creates a scope directory for every scope named in the lockfile, including # scopes whose packages were all omitted, which leaves empty dirs behind. # -delete implies -depth, so nested empties go bottom-up in a single pass. find %{buildroot}%{nodejs_sitelib}/%{npm_name} -type d -empty -delete cp -pfr node_modules/%{npm_name}/dist %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pfr node_modules/%{npm_name}/package.json %{buildroot}%{nodejs_sitelib}/%{npm_name} %clean rm -rf %{buildroot} %{npm_cache_dir} %files %{nodejs_sitelib}/%{npm_name} %doc node_modules/%{npm_name}/CHANGELOG.md %doc node_modules/%{npm_name}/README.md %changelog * Thu Jul 30 2026 Zach Huntington-Meath 5.0.1-3 - Update to 5.0.1 * Tue Mar 03 2026 Evgeni Golov 5.0.1-2 - Rebuild to update vendored dependencies * Wed Jul 09 2025 root 5.0.1-1 - Add nodejs-openshift-dynamic-plugin-sdk generated by npm2rpm using the bundle strategy