1.0.14 • Published 1 year ago

jitterbit-script v1.0.14

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Jitterbit Script

tests

Community-made Node.js package for static code analysis and execution of Jitterbit scripts.

Provides language support capabilities for Jitterbit VS Code extension.

Usage

Static analysis

Create a typed AST along with detected errors and warnings.

import {Diagnostic, Parser, Typechecker} from 'jitterbit-script';

const script = '<trans> $hi = "hello world!" </trans>';
const diagnostics: Diagnostic[] = [];
const parser = new Parser();

const ast = parser.parse(script, diagnostics);
const analysis = Typechecker.analyze(ast, diagnostics);

The above code should never throw, if it does please raise an issue with a bug report.

Runtime

Execute a script.

import {evaluate, Parser, Scope} from 'jitterbit-script';

async function run(script: string) {
  const parser = new Parser();
  try {
    const ast = parser.parse(script);
    return await evaluate(ast, new Scope());
  } catch(err) {
    // error handling
  }
}

const result = run('<trans> $hi = "hello world!" </trans>');

Disclaimer

Please note this is not official Jitterbit tooling. It does differ in behaviour and support from the original Jitterbit runtimes executing scripts in Jitterbit Harmony.

The static analysis system was redesigned to provide static typing and improve problem reporting for better DX and high quality code development.

Currently the support for runtime APIs is limited. See README for details on runtime API support.

The runtime implementation's behaviour is based on the cloud agent and editor versions below.

ComponentVersion
Cloud agent11.23.0.9
Jitterbit Studio10.55.0.27

This repo is a fork of tlaceby/guide-to-interpreters-series.

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.2

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago