Socket
Book a DemoInstallSign in
Socket

@edifice.io/ts-client

Package Overview
Dependencies
Maintainers
0
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@edifice.io/ts-client

Edifice TypeScript Client Library

unpublished
latest
Source
npmnpm
Version
2.0.0-develop-rc.7
Version published
Maintainers
0
Created
Source

Edifice TypeScript Client Library

Edifice TypeScript Client library exposes frameworks for interacting with entcore-based servers APIs. It is written in TypeScript, with minimal dependencies (axios).

Prerequisites

  • pnpm: >= 9.x.x
  • node: >= 20

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 !

Keywords

client

FAQs

Package last updated on 25 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts