npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@norce/admin-chunk

v0.0.8

Published

Angular library extracted from [commerce-admin](https://github.com/NorceTech/commerce-admin). Independently built and published package for parts of the Norce Commerce Admin UI.

Downloads

1,177

Readme

@norce/admin-chunk

Angular library extracted from commerce-admin. Independently built and published package for parts of the Norce Commerce Admin UI.

PrimeNG (unstyled) for component behavior, custom SCSS with --norce-* design tokens for visuals. See CLAUDE.md for development conventions and component guidelines.

Getting started

git clone [email protected]:NorceTech/admin-chunk.git
cd admin-chunk
npm install
npm run build

Release

One command bumps the version, rebuilds dist/, commits, tags, publishes to npm, and pushes the commit and tag:

npm version patch    # 0.0.6 → 0.0.7
npm version minor    # 0.0.6 → 0.1.0
npm version major    # 0.0.6 → 1.0.0

This is wired through the standard version / postversion lifecycle hooks in package.json. npm version itself refuses to run if the working tree is dirty.

Prerequisites

  • Logged in to npm with publish rights to @norce: npm login
  • A current 2FA OTP from your authenticator (npm prompts mid-publish)
  • On main with a clean working tree

Recovery

If publish fails after the version bump (typical cause: expired OTP, network blip), you have a local commit + tag for an unpublished version. Either retry the publish + push manually, or roll back and start over:

# Retry path
npm publish ./dist --otp=<fresh-otp> && git push --follow-tags

# Roll-back path
git tag -d v<new-version>
git reset --hard HEAD~1

If publish succeeded but push didn't, just git push --follow-tags manually — the tarball is already public on npm.

Updating the host

# In commerce-admin/Storm.Admin.UI
npm install @norce/admin-chunk@<new-version>

API client regeneration

When the backend API changes:

# 1. Refresh openapi-spec.json from a running local Admin.API
#    (defaults to http://localhost:5021/openapi/admin.v1.json)
npm run generate:spec
# 2. Regenerate services and models
npm run generate:api
# 3. Build and verify
npm run build

context-header.interceptor.ts is hand-written and will NOT be overwritten.

Local development with the host

The host (commerce-admin/Storm.Admin.UI) already has preserveSymlinks: true in its angular.json build options, so linking is a one-liner per side:

# Terminal 1 — library
npm run build
cd dist && npm link
cd .. && npm run watch

# Terminal 2 — host (commerce-admin/Storm.Admin.UI)
npm link @norce/admin-chunk
ng serve

To unlink and go back to published:

npm unlink @norce/admin-chunk
npm install @norce/admin-chunk

preserveSymlinks can stay on — it's harmless with a real node_modules install.

Host integration

After npm install @norce/admin-chunk primeng, the host needs 5 changes:

1. Include the global theme stylesheet

File: angular.json — add to the styles array (before src/styles.scss):

"node_modules/@norce/admin-chunk/styles/norce-theme.css"

2. Provide library configuration

File: src/main.ts — call provideNorceAdminChunk({ basePath }) in applicationProviders. This configures the API client and PrimeNG unstyled mode in a single call. The basePath varies by environment; see the host branch for the current implementation.

3. Register the interceptor

File: src/app/core/core.module.ts — add contextHeaderInterceptor to the existing withInterceptors() array. It only processes requests with /admin-api in the URL.

4. Push context from ContextService

File: src/app/core/context.service.ts — inject NorceContextStore, call .update() in setContext() after this.context.isLoaded = true. Maps legacy context fields to NorceContext. See src/lib/core/norce-context.ts for the interface.

5. Wire up routes and navigation

  • src/app/app.routing.ts — lazy route: import('@norce/admin-chunk').then(m => m.norceRoutes) under /norce with AuthGuard
  • src/app/app.component.ts — add nav entries for Dashboard and Suppliers

The host provides auth, routing, base URL, and context. The library handles everything else.

Caveats

  1. API path prefix — generated services build URLs as ${basePath}${path}, where path already starts with /api/.... The host's provideNorceAdminChunk({ basePath }) must therefore be the API root only — /admin-api in dev, <apiUrl>/admin-api in prod. Setting it to /admin-api/api makes every request 404 as /admin-api/api/api/....
  2. preserveSymlinks — required with npm link, remove when using the published package.
  3. Publish from dist/ — the root package.json has devDependencies that should not be published.