0.48.7 • Published 19 days ago

@causal/compiler v0.48.7

Weekly downloads
-
License
Proprietary
Repository
-
Last release
19 days ago

Causal Compiler

Causal is an integrated product analytics, feature flags, and A/B testing platform. It is designed to help you write more maintainable code, collect better data, and optimize your product quickly.

Causal replaces your session tracking, feature management, and A/B testing tools into one integrated system so you can focus on your competitive advantage, not building robust data pipelines.

Full Documentation available at docs.causallabs.io

Installation

The Causal Compiler should be added as a dev depenenency to your project. This will allow you to run the compiler from the command line.

npm install --save-dev @causal/compiler

If you have a non-node project you can use the following command when you need to run the compiler:

npx @causal/compiler

Usage

After updating your FDL file, you can run the compiler to generate the appropriate code for your project. The compiler will generate a file for each platform you have enabled using the appropriate command line flag.

For example, to generate a typescript client for your project, you can run the following command:

npx @causal/compiler --push-fdl --typescript {your/project/path/components/}causal.ts fdl/causal.fdl

Command Line Flags

--compiler-classpath

Where the Java system compiler gets the Causal runtime and dependencies when compiling FDL java classes. Default is to use the current classpath, which is correct in most situations. Same format as the -cp option to javac. You should not need to change this unless you are launching the compiler in a non-standard way, for example from a Spring application.

Default: $CLASSPATH (or %CLASSPATH% on Windows)

--delete

When using --partial. In addition to replacing the specified files, delete this file. May be used more than once on the command line.

Default: []

--environment

The environment for which we are generating code.

Default: Production

--force-requery

Force grabbing data from tools.causallabs.io. Die if we cannot connect.

Default: false

--help

Print command line documentation

Default: false

--hive

File to write Hive warehouse ddl file. Will emit Hive statements, unless --redshift-schema is specified, in which case redshift DDL is emitted

Default: Not provided

--java

Directory to write java code. Default is not to emit java.

Default: Not provided

--kotlin

Directory to write kotlin code for the Android client. Default is not to emit kotlin.

Default: Not provided

--no-compatibility-check

Do not check if the current control values are incompatible with the FDL file. Setting this to true will allow you to compile FDL files that are not compatible with your current production configuration, potentially breaking your production environment

Default: false

--no-control-check Only warn if the current control values are incompatible with the FDL file. Default is a compile error.

Default: false

--number-of-days-of-partitions

This parameter controls the number of days to look back for partitions when generating DDL statements to define the data warehouse.

Default: 14

--partial

Add (or replace) the given files with those that have already been pushed to Causal. This allows you to compile a subset of files for your project, leaving everything else in place. The files you specify will be added or replace the server-side files, which are stored locally in the .causal/fdl directory. Can be combined with --push-fdl to do the same on the server. See partial compilation.

Default: false

--push-fdl

Push the fdl code to the tools endpoint after compiling succeeds.

Default: false

--redshift

File to write Redshift warehouse ddl file. Will emit Redshift PSQL statements. You must also specify --redshift-schema.

Default: Not provided

--redshift-schema

Defines the redshift external schema in which we should generate Causal external tables.

Default: Not provided

--ruby

File to write ruby API code. Default is not to emit ruby.

Default: Not provided

--snowflake

File to write Snowflake warehouse ddl file. Will emit snowsql statements.

Default: Not provided

--swift

Directory to write swift code for the iOS client. Default is not to emit swift.

Default: Not provided

--kotlin Directory to write kotlin code for the Android client. Default is not to emit kotlin.

Default: Not provided

--template

Expand a user supplied mustache template file. The API available to the mustache template is defined in the io.causallabs.mustache.Context class.

Default: Not provided

--template-out

Where a user supplies mustache template is expanded into.

Default: Standard out

--template-params

Name of json file to feed to the template in the 'params' context. The file should contain a single JSON object, and the object's fields are available as top level variables in the template.

Default: Not provided

--token

The authorization token with which to access data on Causal.

Default: Not provided

--ts-react-split

EXPERIMENTAL: Intend for use with react server components. Write three typescript files, a base file, one for server components, and one for client components. The provided name is the base name and the server and client files will be suffixed with .server.ts and .client.ts

Default: false

--typescript

Write the typescript module to the given file.

Default: Not provided

--version

Print the compiler version and exit.

Default: false

--warn

Only warn on warehouse compatibility checks, do not error out. Default is to error out. Using this setting in production can break your warehouse.

Default: false

--warn-on-error

Only warn on warn on compatibility checks, do not error out. Default will error when compatability fails in a staging environment for an entity in use in a production environment.

Default: false

0.48.7

19 days ago

0.48.6

1 month ago

0.48.5

1 month ago

0.48.4

2 months ago

0.48.3

2 months ago

0.48.2

2 months ago

0.48.1

3 months ago

0.48.0

3 months ago

0.47.1

3 months ago

0.47.0

4 months ago

0.46.0

4 months ago

0.45.0

5 months ago

0.44.2

5 months ago

0.44.1

5 months ago

0.44.0

5 months ago

0.43.5

6 months ago

0.43.6

5 months ago

0.43.0

7 months ago

0.41.0

8 months ago

0.42.0

7 months ago

0.42.1

7 months ago

0.43.1

6 months ago

0.43.2

6 months ago

0.38.0

10 months ago

0.39.1

10 months ago

0.39.0

10 months ago

0.39.3

10 months ago

0.39.2

10 months ago

0.40.2

9 months ago

0.40.0

9 months ago

0.40.1

9 months ago

0.37.1

11 months ago

0.36.3

11 months ago

0.36.2

11 months ago

0.36.1

11 months ago

0.36.0

11 months ago

0.37.0

11 months ago

0.34.10

1 year ago

0.34.11

1 year ago

0.34.12

1 year ago

0.34.13

12 months ago

0.35.5

12 months ago

0.35.4

12 months ago

0.35.3

12 months ago

0.35.2

12 months ago

0.35.1

12 months ago

0.35.0

12 months ago

0.35.6

12 months ago

0.34.6

1 year ago

0.34.5

1 year ago

0.34.4

1 year ago

0.34.3

1 year ago

0.34.2

1 year ago

0.34.1

1 year ago

0.34.0

1 year ago

0.34.9

1 year ago

0.34.7

1 year ago

0.32.0

1 year ago

0.33.0

1 year ago

0.31.1

1 year ago

0.31.0

1 year ago

0.30.0

1 year ago

0.29.9

1 year ago

0.29.8

1 year ago

0.29.7

1 year ago

0.29.6

1 year ago

0.29.5

1 year ago

0.29.4

1 year ago

0.29.3

1 year ago

0.29.2

1 year ago

0.29.1

1 year ago

0.29.0

1 year ago

0.27.2

1 year ago

0.27.1

1 year ago

0.27.6

1 year ago

0.27.5

1 year ago

0.27.4

1 year ago

0.27.3

1 year ago

0.28.1

1 year ago

0.28.0

1 year ago

0.28.6

1 year ago

0.28.5

1 year ago

0.28.4

1 year ago

0.28.3

1 year ago

0.28.2

1 year ago

0.27.0

1 year ago

0.25.4

1 year ago

0.25.3

1 year ago

0.25.2

1 year ago

0.25.1

1 year ago

0.25.0

1 year ago

0.25.5

1 year ago

0.26.3

1 year ago

0.26.2

1 year ago

0.26.1

1 year ago

0.26.0

1 year ago

0.26.4

1 year ago

0.23.8

2 years ago

0.23.7

2 years ago

0.24.5

2 years ago

0.24.4

2 years ago

0.24.3

2 years ago

0.24.2

2 years ago

0.24.1

2 years ago

0.24.0

2 years ago

0.24.6

2 years ago

0.22.0

2 years ago

0.23.6

2 years ago

0.23.5

2 years ago

0.23.4

2 years ago

0.23.3

2 years ago

0.23.2

2 years ago

0.23.1

2 years ago

0.23.0

2 years ago

0.20.1

2 years ago

0.20.0

2 years ago

0.17.3

2 years ago

0.17.4

2 years ago

0.21.2

2 years ago

0.21.1

2 years ago

0.21.0

2 years ago

0.18.1

2 years ago

0.18.2

2 years ago

0.18.3

2 years ago

0.18.4

2 years ago

0.18.0

2 years ago

0.19.0

2 years ago

0.19.1

2 years ago

0.20.4

2 years ago

0.20.3

2 years ago

0.20.2

2 years ago

0.17.2

2 years ago

0.13.0

2 years ago

0.17.0

2 years ago

0.17.1

2 years ago

0.14.0

2 years ago

0.11.0

2 years ago

0.15.0

2 years ago

0.15.1

2 years ago

0.15.2

2 years ago

0.9.0

2 years ago

0.12.0

2 years ago

0.12.1

2 years ago

0.12.2

2 years ago

0.16.0

2 years ago

0.16.1

2 years ago

0.7.2

2 years ago

0.7.1

2 years ago

0.7.3

2 years ago

0.7.0

2 years ago

0.7.6

2 years ago

0.7.5

2 years ago

0.7.7

2 years ago

0.8.1

2 years ago

0.8.0

2 years ago

0.5.3

2 years ago

0.5.0

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.4.2

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.4

2 years ago

0.3.1

2 years ago

0.1.5

2 years ago

0.1.3

2 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago