Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aire-ux/aire-condensation

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aire-ux/aire-condensation

Client-side serialization library for Aire-UX

  • 0.1.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-92.86%
Maintainers
1
Weekly downloads
 
Created
Source

Overview

Condensation is a library that allows transparent client-server communication for @aire-ux/component widgets.

Usage

Define the AireServlet

    @Bean public ServletRegistrationBean<AireDesignerServlet> aireServlet() {
        return new ServletRegistrationBean(AireDesignerServlet, "context");  // servlet will be registered at "/web-context/context"
    }

DTO

Define a data-transfer object:

@RootElement
class Address {
  @Property({
    type: Number,
    read: {
      alias: "room-count",
    },
  })
  roomCount: number;

  @Property(String)
  city: string;
}

@RootElement
class Person {
  @Property(String)
  name: string | undefined;
  @Property({
    type: Address,
    read: {
      alias: "home-addresses",
    },
  })
  addresses: Address[];
}

@RootElement
class Group {
  @Property(Person)
  members: Person[] | undefined;
}

Define a Remotable Object

import { Receive, Remotable } from "./remotable";

@Remotable
class RemotableGroup {
  /**
   * @param group the group to construct this from
   */
  constructor(@Receive(Group) group: Group) {}

  addMember(@Receive(Person) member: Person): void {
    this.group.members.push(member); // addMember can be called from the server-side
  }
}

const group = Condensation.newContext().bind(RemotableGroup);

Keywords

FAQs

Package last updated on 09 Jun 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