npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@causal/compiler

v0.48.11

Published

Causal command line compiler for FDL files.

Downloads

501

Readme

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