New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

amps-client-javascript-build-env

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amps-client-javascript-build-env

AMPS JavaScript Client Library Dev Environment

  • 1.0.0
  • unpublished
  • beta
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

amps-client-javascript

This is the official TypeScript/JavaScript client for AMPS server.

Supported features:

  • very few external dependencies (WebSocket and Promise);
  • a fully asynchronous Promise-based interface;
  • convenience methods for common commands, such as publish, subscribe, sow, deltaSubscribe;
  • heartbeat mode for quickly detecting connection failures.
  • the Command interface for fine-grained control over commands and their options;
  • support of enterprise authentication systems, such as Kerberos, NTLM, and Basic Auth;
  • support of Authenticators for custom authentication scenarios.
  • HAClient functionality

Development

  • Install required dependencies: npm install --save
  • source code and dependencies are located in the src directory.

Tests

Tests require a running AMPS instance. The configuration file for that instance is provided: tests/docker/amps-config.xml

The library should be tested in both Browser and Node.js environment, that's why it provides a set of universal tests and the dev web server.

  • Browser Environment: use web server: npm start Open http://localhost:8888 in your browser to run browser environment tests.

  • Node.js Environment: npm test

Test results will also be stored in the JUnit XML format, in order to support automatic builds (junit_tests_output.xml).

Docker

In order to run tests, a running AMPS server instance is required. The testing config is located in tests/docker/amps-config.xml. A dockerfile provided to start AMPS Server using docker on your Mac or Windows machine:

  • Navigate to ./tests/docker
  • Build the AMPS server container in Terminal: docker build .
  • Run the built container: docker run -p 8085:8085 -p 9000:9000 -p 9001:9001 -p 9002:9002 -p 9003:9003 -p 9004:9004 -p 9005:9005 -p 9100:9100 <container_id>
  • The server will be available at localhost

Build amps.js and amps.d.ts (typings) - for testing and development

This command will validate formatting and and syntax of .ts files. Settings are available in deployment/tslint.json

npm run gen

Build distrubution package

The following command will build, minify, generage documentation, and archive the project:

npm run build

The output will be placed in the amps-javascript-client-.tar.gz file.

Alternatively you can:

  • just build documentation files: npm run docbuild (will be available in build/docs)
  • lint the project files: npm run lint
  • clear build files: npm run clear
  • run tests in the Node.js environment: npm test

Running lint and tests is recommended before building a client package.

FAQs

Package last updated on 21 Mar 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc