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

@bfwk/baas-server

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bfwk/baas-server

[![npm](https://img.shields.io/npm/v/@bfwk/baas-server)](https://www.npmjs.com/package/@bfwk/baas-server)

  • 0.10.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

@bfwk/baas-service

npm

OOTB set up for an offcore LWR builder based on bfwk.

Example usage:

import { dirname, resolve } from 'path';
import { fileURLToPath } from 'url';
import { createBaasServer } from '@bfwk/baas-server';
import {
  ComponentShapeMetadataService,
  ViewMetadataServiceImpl,
  TemplateMetadataServiceImpl,
  DeclarativeTypeMetadataService,
  DataProviderMetadataService,
  ActionMetadataService,
} from './metadata-services';

const __dirname = dirname(fileURLToPath(import.meta.url));

createBaasServer({
  rootCmp: 'sample_builder/builder',
  lwrConfig: {
    lwc: {
      modules: [
        {
          dir: resolve(__dirname, '../../src', 'metadata/components'),
        },
      ],
    },
  },
  metadataServices: [
    new ComponentShapeMetadataService(),
    new ViewMetadataServiceImpl(),
    new TemplateMetadataServiceImpl(),
    new DataProviderMetadataService(),
    new DeclarativeTypeMetadataService(),
    new ActionMetadataService(),
  ],
});

Metadata Service

Every metadata service added to the initial configuration will automatically have an express route exposed following a set route scheme.

Example: The following MetadataService is accessible on the client via the endpoint /metadata/view/

export class ViewMetadataServiceImpl extends FilebasedMetadataServiceImpl<
  ViewResource
> {
  constructor() {
    super('view', {
      read: {
        dirs: ['**/metadata/tmp/**'],
      },
      write: {
        dir: SAMPLE_VIEW_SAVE_DIR,
      },
    });
  }
}

FAQs

Package last updated on 22 Sep 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