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

deep-app

v0.2.0

Published

isomorphic app management tools for deepjs

Downloads

7

Readme

deep-app

Proposition for isomorphic app management (login/logout/impersonate/session/...) management through deep.context and deep.Modes/deep.modes usage.

Login Sequence

The login sequence is expressed both sides (client or server or shell) with same rules pattern (mainly with two customs functions : loggedIn and sessionModes), and consist in :

login({ /* email/password */ }) or impersonate({ id:... })
==> check validity server side - do a remote call client side) 
	==> if valid : place logged user in session 
		==> call loggedIn(session)
			decorate/manipulate session (do differents things client or server side)
	==> call sessionModes(session)
		define current OCM modes accordingly to current session (global modes client side - context's modes server side).

Login familly chained API and "app" config object

Usage example with OCM restful stores (valid browser, server or shell side) :

deep.app().login({ email:"[email protected]", password:"something" }) // login as and so endorse [email protected] privileges
.restful("myStore")
.get() // get-all with [email protected] privileges
.done(function(objects){
	//...
})
.impersonate({ id:"an_id" }) // as a login with email + password 
.resftul("myOtherStore")
.post() // post something as user with id = an_id
.session({ /*...*/ }) // endorse privileges dependending on session
.restful("myThirdStore")
.put("hello world", "e123/title")  // update an object with provided session's rights
.log();

Really usefull for manipulating objects, testing or debugging by endorseing a particular identity.

Both, single-context and concurrent-contexts "chained login" API, use (almost) the same config pattern.

You would use "single-context login chained API" from within your single page application. Keep in mind than browser side, you are in a single window environnement. So, here, login/logout/session/impersonate manages deep.Modes (aka global modes) and the current deep.context (normally the unique one) and so really modify your application login state.

Shell or server side, you would use concurrent context login chained API to manage concurrent requests or processes with contextualised (through deep.context and deep.modes) promise chains.

Server and shell side

Here, as you should manage concurrents requests/processes with differents login modes, each time you use a login familly tools, you start a new contextualised (with a new context) promise chain which hold for

Licence

LGPL 3.0