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

@concordant/c-service

v1.2.2

Published

Background service for the Concordant platform

Downloads

8

Readme

Private releases

The C-Service, and the C-CRDTlib it depends on, are delivered as NPM packages. Public releases are published on npmjs, while development releases are published to a private Gitlab Packages registry.

To use development releases, set up NPM as described in the c-crdtlib guide

See also the wiki for documentation.

Go to project root directory and run:

npm install

Build

The build is managed by NPM. Typescript sources (code and tests) are transpiled to JavaScript. NPM targets (set up as scripts in package.json) are as follows:

  • install: install dependencies and prepare (compile)
  • run prepare: lifecycle script (→ build)
  • run build: should be removed (merge with prepare)
  • test: run jest (tests & coverage); DBNAME must be set, and will be used as database name for tests.
  • start: dev server, listens on TCP port 4000
  • run lint: run eslint

Used software

Dev tools

  • tsc: Typescript transpiler (to JavaScript)
  • webpack: JavaScript bundler, used to bundle the ServiceWorker
  • NPM: package/build manager
  • Husky: git hooks manager
  • lint-staged: apply pre-commit hooks to changed files only ; runs:
    • ESlint: linter (static code analyser)
    • Prettier: code formatter
  • Jest: JS testing library tool
  • Gitlab-CI: gitlab Continuous Integration platform

Libraries

  • OpenAPI (aka Swagger): language for RESTful interface description
  • Sofa: generate a REST interface from graphQL
  • Apollo: graphQL library
  • Express: web server
  • PouchDB: JavaScript CouchDB implementation & client
  • C-CRDTlib: our CRDT library

Files

Build, configuration, metadata

  • LICENSE
  • README.md Doc: user
  • README.dev.md Doc: developer
  • .git/ Config: Git
  • .gitignore
  • package.json Config: NPM: metadata, dependencies, scripts, config (lint-staged, Husky)
  • package-lock.json Actual dependency tree (automatically updated)
  • tsconfig.json Config: tsc TypeScript compiler:
    src \ {node_modules, **/__tests__/*} → dist/
  • .babelrc Config: Babel compiler (??)
  • .eslintrc.js Config: ESlint
  • .eslintignore
  • .prettierignore Config: Prettier
  • jest.config.js Config: Jest (roots: src/ & test/ ; TS transformer)
  • .gitlab-ci.yml Config: continuous integration
  • Dockerfile Config: Docker build
  • .dockerignore

Code

  • swagger.yml OpenAPI Specification, auto-generated from GraphQL
  • src/ Code
    • schema.ts GraphQL schema definition
    • service.ts GraphQL resolvers
    • c-service-worker.js Service worker implementation
    • config.json Service Worker configuration
    • database/ storage connectors
  • test/ Tests (Jest)

Artifacts (untracked)

  • node_modules/ Dependencies, created & populated by npm install
  • dist/ JS files, created & populated by npm prepare (tsc)
  • coverage/ Tests coverage, created & populated by npm test (jest)