npm.io
0.0.56 • Published 2d ago

bb-relay

Licence
ISC
Version
0.0.56
Deps
4
Size
233 kB
Vulns
0
Weekly
0

Introduction

This would be used in retrieving data from worldframer app.

APIs

get-mode

This returns the light or dark mode. Use it on iframe load to ensure that the extension has the same theme as the app.

type Response = {
  type: "mode";
  mode: "light" | "dark";
}

get-node

Returns the list of directory and/or files in the specified folder. Empty string will point to the current workspace

type NodeResponse = {
  type: "node";
  root: string;
  node: {
    name: string;
    fullPath: string;
    isDirectory: boolean;
    ext: string;
    size: number;
    createdAt: Date;
    modifiedAt: Date;
    isDiff?: boolean;
    wordCount?: number;
    childrenCount?: number;
    summary?: string;
  }[];
}

Info

Folders and files that starts with underscore are hidden automatically from the UI. If you want to create files that shouldn't appear in the explorer. For example: _data