1.14.2 • Published 9 months ago

@iebh/tera-fy v1.14.2

Weekly downloads
-
License
mit
Repository
github
Last release
9 months ago

TERA-fy

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

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
1.14.2

9 months ago

1.14.1

9 months ago

1.14.0

9 months ago

1.12.0

1 year ago

1.8.0

1 year ago

1.6.1

1 year ago

1.6.0

1 year ago

1.7.4

1 year ago

1.11.0

1 year ago

1.13.2

1 year ago

1.11.4

1 year ago

1.13.1

1 year ago

1.11.3

1 year ago

1.13.0

1 year ago

1.11.2

1 year ago

1.11.1

1 year ago

1.13.4

12 months ago

1.13.3

1 year ago

1.11.5

1 year ago

1.9.1

1 year ago

1.7.3

1 year ago

1.9.0

1 year ago

1.7.2

1 year ago

1.7.1

1 year ago

1.7.0

1 year ago

1.10.0

1 year ago

1.4.4

1 year ago

1.4.3

1 year ago

1.5.0

1 year ago

1.4.2

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.2

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.0

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.1.0

1 year ago

1.0.24

1 year ago

1.0.21

1 year ago

1.0.23

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.20

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago