1.4.0 • Published 3 days ago

edifice-ts-client v1.4.0

Weekly downloads
-
License
AGPL-3.0
Repository
github
Last release
3 days ago

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

1.5.0-develop.2

10 days ago

1.5.0-develop.1

11 days ago

1.5.4-develop.0

10 days ago

1.5.4-develop.2

10 days ago

1.4.0

11 days ago

1.4.0-develop.1

16 days ago

1.3.0

2 months ago

1.3.0-develop.2

2 months ago

1.3.0-develop.1

2 months ago

1.2.0

2 months ago

1.2.0-develop.3

2 months ago

1.2.0-develop.4

2 months ago

1.2.0-develop.1

3 months ago

1.2.0-develop.2

3 months ago

1.1.1

3 months ago

1.1.1-develop.1

3 months ago

1.1.0

3 months ago

1.1.0-develop.10

4 months ago

1.1.0-develop.9

4 months ago

1.1.0-develop.7

4 months ago

1.1.0-develop.8

4 months ago

1.1.0-develop.6

4 months ago

1.1.0-develop.5

4 months ago

1.1.0-develop.3

4 months ago

1.1.0-develop.4

4 months ago

1.1.0-develop.2

4 months ago

1.1.0-develop.1

4 months ago

1.0.3-develop.1

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.5-develop.1

7 months ago

1.0.4-develop.1

7 months ago

1.0.2

7 months ago

1.0.1-develop.1

7 months ago

1.0.1

7 months ago

1.0.0

8 months ago

1.0.1-develop.2

7 months ago

1.0.0-develop.10

8 months ago

1.0.0-develop.9

9 months ago

1.0.0-develop.8

9 months ago

1.0.0-develop.7

9 months ago

1.0.0-develop.6

9 months ago

1.0.0-develop.5

9 months ago

1.0.0-develop.4

9 months ago

1.0.0-develop.3

9 months ago

1.0.0-develop.2

9 months ago

1.0.0-develop.1

9 months ago