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

@iebh/tera-fy

Package Overview
Dependencies
Maintainers
4
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iebh/tera-fy

TERA website worker

  • 1.9.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
128
decreased by-26.01%
Maintainers
4
Weekly downloads
 
Created
Source

TERA-fy

TERA website worker, intended to be embedded with TERA tools.

  • TERA-fy API (API explorer)
  • TERA-fy API (Markdown, single page)
  • API playground
  • TERA-Explorer - A simple example project using TERA-fy
  • File Hints reference
  • Changelog

TERA-fy is a add-on module which extends 3rd party tools with functionality from the TERA project. It provides various functionality like data sync with the parent TERA instance, file upload/download, citation library access and other utilities.

Quick Start

import TeraFy from '@iebh/tera-fy';
import TerafyVue from '@iebh/tera-fy/plugins/vue';
let terafy = new TeraFy()
	.set('devMode', true) // Set this option to see debugging messages
	.use(TerafyVue); // Add the Vue plugin

// Initialize everything
await terafy.init();

// Require that the active session has a project selected
await terafy.requireProject();

// Go fetch the state of the active project
let projectState = await terafy.getProjectState(); //= Object representing the active project

// See https://iebh.github.io/TERA-fy/ for a full API list

Included Files

Generally importing the source code TERA-fy client (import terafy from '@iebh/tera-fy';) should be sufficient but multiple versions of this client are shipped for compatibility with older or more annoying build systems:

ImportStandardDescription
@iebh/tera-fySource CodeBasic, plain JS to be transformed however your build path requires
@iebh/tera-fy/dist/terafy.es2019.jsESM + ES2019@vue/cli-service compatible version for older versions of Babel
@iebh/tera-fy/dist/plugin.vue2.es2019.jsESM + ES2019@vue/cli-service compatible version of the Vue@2 plugin

More versions can be added upon request or PR of the build command in the scripts section of package.json.

Plugins

This module exports various plugins which are availble as import from '@iebh/tera-fy/plugins/*'.

@iebh/tera-fy/plugins/vue2

FIXME: To add documentation

@iebh/tera-fy/plugins/vue3

FIXME: To add documentation

@iebh/tera-fy/plugins/vite

A plugin for Vite which boots a local proxy server to route traffic to/from localhost:7334 to tera-tools.com. This is to work around the issue where a local website is usually forbidden from talking to TERA-tools.com unless its running with a HTTPS context.

Example Usage within vite.config.js:

// ... Other imports ... //
import pluginTeraFy from '@iebh/tera-fy/plugins/vite';

export default {
	plugins: [
		// ... other plugin config ... //

		pluginTeraFy(), // ... or add an options object to override the defaults
	],
}

Configuration options:

OptionTypeDefaultDescription
forceBooleanfalseRestart the server even if its apparently running
autoStartBooleantrueAutomatically start the proxy without calling Plugin.start()
hostString'0.0.0.0'Host IP to listen on
portNumber7334Host port to listen on
targetProtocolString'https'Target protocol to forward to
targetHostString'tera-tools.com'Target host to forward to
targetPortNumber443Target port to forward to

FAQs

Package last updated on 06 Jun 2024

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