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

@lsw-abpvue/core

v0.1.0

Published

The kernel of the ABP Vue UI: dependency injection, application state, localization and routing.

Readme

@lsw-abpvue/core

The kernel of Lsw.Abp.VueUI, an unofficial Vue UI for the ABP Framework. Everything else in the project — themes, the extension system, the module pages — is built on the dependency injection this package provides.

pnpm add @lsw-abpvue/core

Milestones M1 and M2 are complete: dependency injection, application state, HTTP, localization, permissions, the session, multi-tenancy, the route tree, the /router entry point, and the authentication contract that @lsw-abpvue/oauth fills in.

Dependency injection

A service is a factory and a name. It is built on first injection, once per root injector, and it can inject other services while it is being built.

import { defineService, inject, type ServiceOf } from '@lsw-abpvue/core';

export const GreeterService = defineService('GreeterService', () => {
  const template = inject(GREETING_TEMPLATE);
  return { greet: (name: string) => interpolate(template, [name]) };
});
export type GreeterService = ServiceOf<typeof GreeterService>;

export const useGreeter = () => inject(GreeterService);

Applications bootstrap through createAbpApp, which owns the root injector and waits for the registered initializers before mounting:

const { mount } = await createAbpApp(App, {
  providers: [
    { provide: GREETING_TEMPLATE, useValue: 'Hei {0}.' },
    provideAppInitializer(() => inject(ConfigStateService).refreshAppState()),
  ],
});

mount('#app');

A page overrides a service for itself and its children with one call. The injector it returns is the escape hatch for callbacks, which have no injection context of their own:

<script setup lang="ts">
const injector = provideAbp([{ provide: GreeterService, useFactory: createMyGreeter }]);

const onClick = () => injector.get(GreeterService).greet('a click handler');
</script>

inject() is synchronous, exactly as in Angular: the context ends at the first await. Capture the injector before awaiting, or resolve everything up front.

What else is in it

| | | |---|---| | ConfigStateService | Everything /api/abp/application-configuration returns, as reactive state. Refreshed after a login, a logout or a tenant switch, which is what makes menus and permission checks recompute on their own. | | RestService / HttpClient | fetch with an interceptor onion. Failures arrive as one AbpHttpError carrying ABP's error envelope. | | LocalizationService / $t | Resource::Key resolution with ABP's rules, plus texts shipped with the application. A language change re-renders what used it; nothing is remounted. | | PermissionService | A && B, A \|\| C and — unlike the Angular UI — the two mixed with parentheses. | | RoutesService | The menu, built from what routes declare in meta.routes and filtered by the granted policies. | | useListService | Paging, sorting and debounced filtering for a table, with the answer to a superseded request dropped. | | AuthService / TokenStorage | The authentication contract, with nothing behind it: @lsw-abpvue/oauth provides the OIDC implementation, and a host with its own scheme provides another. | | @lsw-abpvue/core/router | provideAbpRouter, the auth and permission guards, lazyRoutes, the title strategy, AbpDynamicLayout. |

Object extension mapping

@lsw-abpvue/core/object-extensions is a pure secondary entry point for mapExtensionProperty and OBJECT_EXTENSION_TYPES. It imports no Vue, router or DI code, so Node tools and runtime controls can use the same type, lookup, enum and visibility rules. The CLI's doctor and the extensible components consume this entry point.

How it lines up with the Angular UI

| ABP Angular | Here | |---|---| | @Injectable({ providedIn: 'root' }) | defineService(name, factory) | | new InjectionToken<T>() | defineToken<T>(name) | | inject(Service) | inject(Service) or the useXxx() wrapper | | A component's providers: [] | provideAbp([...]) in <script setup> | | provideAppInitializer | provideAppInitializer | | bootstrapApplication(App, appConfig) | createAbpApp(App, { providers }) | | makeEnvironmentProviders / withXxx() features | same, via defineFeature | | Injector.get(token) for getInjected | injector.get(token) |

Decorators, reflect-metadata and deps arrays are gone: a factory calls inject() instead. Nothing is registered by importing it, so a service nobody injects is dropped by the bundler.

License

MIT. Not affiliated with or endorsed by Volosoft or the ABP Framework team.