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 🙏

© 2024 – Pkg Stats / Ryan Hefner

edifice-ts-client

v1.6.0

Published

Edifice TypeScript Client

Downloads

2,887

Readme

Edifice TS Client

Edifice TS Client exposes frameworks for interacting with entcore-based servers APIs. It is written in typescript, with minimal dependencies (rxjs and axios at the moment).

Prerequisites

  • pnpm: >= 7 | 8
  • node: >= 16 | 18

Getting Started

pnpm install

Build

pnpm run build

Documentation

As rule of thumb, edifice-ts-client never uses any browser-related technology (no HTMLElement, Document, navigator...). It focus exclusively on data exchange with the servers.

  • IConfigurationFramework is composed of 3 layers

    • Platform (apps, theme, analytics, i18n...)
    • School
    • User (preferences)
  • ISession of the connected user

    • user
    • description
    • currentLanguage
    • notLoggedIn
    • avatarUrl
    • currentApp (the one which initialized the framework)
    • hasWorkflow
    • hasRight
  • INotifyFramework for async messages

    • onLangReady
    • onSessionReady
    • onSkinReady
    • onOverridesReady
    • promisify (generic for creating/resolving/rejecting a Promise)
    • events (a publish/subscribe event broker)
  • ITransportFramework wraps the HTTP protocol

  • IExplorerFramework to look for resources

  • IWidgetFramework dedicated to widgets conf/prefs

  • and specific app frameworks for modeling their data

Browse the full API documentation here

Additional developers notes

4 additional libs are installed by the pnpm install command.

  • ViteJS as a Bundler
  • Typedoc to generate the markdown documentation, in /docs, from the Typescript comments in source code.
  • husky to install a local git pre-commit hook, in order to run the unit-tests and update /docs before every commit. => /docs will always be up-to-date on the git server.

The pnpm run build command will populate the /dist directory

  • /dist/ts contains the JS code and associated .d.ts and .js.map files, later packaged in NPM (done by our CI).
  • /dist/bundle contains the production-ready code/map.

So, you'll just have to write nice documented code, and unit tests where needed !

Push Force

git push --force is not recommended!

After a git history rewrite due to a git push --force, the git tags and notes referencing the commits that were rewritten are lost.

If it happens, read this troubleshooting section: Troubleshooting