@adobe-csc/shared

v0.0.2

Published

Shared utilities, types, and interfaces for Adobe CSC projects

Downloads

6

Readme

Content Supply Chain Commons - Shared Libs

A collection of classes, interfaces, types, etc that are designed to be shared across multiple Content Supply Chain packages.

Using this library

  • Install the package using npm install @adobe-csc/shared.

Included

  • Adobe Runtime Actions wrapper

Initialize the library using the following code snippet:

import { Action, HTTP_METHODS } from "@adobe-csc/shared";

export class ImsClient extends Action {
  constructor() {
    super(HTTP_METHODS.GET, async (params, context) => {
      return {
        statusCode: 200,
        body: {
          message: "Hello, world!",
        },
      };
    });
  }
}

export const main = (params: any, context: any) => {
  new ImsClient();
  return {
    statusCode: 200,
    body: {
      message: "Hello, world!",
    },
  };
};

Local Development Setup

  • Clone the mono repo
  • Install the dependencies using npm install
  • Run the tests using npm test