jsii-pacmak

  • Version 1.100.0
  • Published
  • 654 kB
  • 12 dependencies
  • Apache-2.0 license

Install

npm i jsii-pacmak
yarn add jsii-pacmak
pnpm add jsii-pacmak

Overview

A code generation framework for jsii backend languages

Index

Functions

function configureLogging

configureLogging: ({ level: newLevel }: { level: Level }) => void;

    function pacmak

    pacmak: ({
    argv,
    clean,
    codeOnly,
    fingerprint,
    force,
    forceSubdirectory,
    forceTarget,
    inputDirectories,
    outputDirectory,
    parallel,
    recurse,
    rosettaTablet,
    rosettaUnknownSnippets,
    runtimeTypeChecking,
    targets,
    timers,
    updateNpmIgnoreFiles,
    validateAssemblies,
    }: PacmakOptions) => Promise<void>;
    • Generates code in the desired targets.

    Interfaces

    interface PacmakOptions

    interface PacmakOptions {}
    • Options provided to the pacmak function.

    property argv

    readonly argv?: {
    readonly [name: string]: any;
    };
    • All command-line arguments that were provided. This includes target-specific parameters, the handling of which is up to the code generators.

      {}

    property clean

    readonly clean?: boolean;
    • Whether to clean up temporary directories upon completion.

      true

    property codeOnly

    readonly codeOnly?: boolean;
    • Whether to generate source code only (as opposed to built packages).

      false

    property fingerprint

    readonly fingerprint?: boolean;
    • Whether to opportunistically include a fingerprint in generated code, to avoid re-generating code if the source assembly has not changed.

      true

    property force

    readonly force?: boolean;
    • Whether to always re-generate code, even if the fingerprint has not changed.

      false

    property forceSubdirectory

    readonly forceSubdirectory?: boolean;
    • Always emit code in a per-language subdirectory, even if there is only one target language.

      true

    property forceTarget

    readonly forceTarget?: boolean;
    • Always try to generate code for the selected targets, even if those are not configured. Use this option at your own risk, as there are significant chances code generators cannot operate without any configuration.

      false

    property inputDirectories

    readonly inputDirectories: readonly string[];
    • The list of directories to be considered for input assemblies.

    property outputDirectory

    readonly outputDirectory?: string;
    • The directory in which to output generated packages or code (if codeOnly is true).

      - Configured in package.json

    property parallel

    readonly parallel?: boolean;
    • Whether to parallelize code generation. Turning this to false can be beneficial in certain resource-constrained environments, such as free CI/CD offerings, as it reduces the pressure on IO.

      true

    property recurse

    readonly recurse?: boolean;
    • Whether to recursively generate for the selected packages' dependencies.

      false

    property rosettaTablet

    readonly rosettaTablet?: string;
    • A Rosetta tablet file where translations for code examples can be found.

      undefined

    property rosettaUnknownSnippets

    readonly rosettaUnknownSnippets?: UnknownSnippetMode;
    • How rosetta should treat snippets that cannot be loaded from a translation tablet.

      UnknownSnippetMode.VERBATIM

    property runtimeTypeChecking

    readonly runtimeTypeChecking?: boolean;
    • Whether to inject runtime type checks in places where compile-time type checking is not performed.

      true

    property targets

    readonly targets?: readonly TargetName[];
    • The list of targets for which code should be generated. Unless forceTarget is true, a given target will only be generated for assemblies that have configured it.

      Object.values(TargetName)

    property timers

    readonly timers?: Timers;
    • A Timers object, if you are interested in including the rosetta run in a larger set of timed operations.

    property updateNpmIgnoreFiles

    readonly updateNpmIgnoreFiles?: boolean;
    • Whether to update .npmignore files if outputDirectory comes from the package.json files.

      false

    property validateAssemblies

    readonly validateAssemblies?: boolean;
    • Whether assemblies should be validated or not. Validation can be expensive and can be skipped if the assemblies can be assumed to be valid.

      false

    Enums

    enum TargetName

    enum TargetName {
    DOTNET = 'dotnet',
    GO = 'go',
    JAVA = 'java',
    JAVASCRIPT = 'js',
    PYTHON = 'python',
    }

      member DOTNET

      DOTNET = 'dotnet'

        member GO

        GO = 'go'

          member JAVA

          JAVA = 'java'

            member JAVASCRIPT

            JAVASCRIPT = 'js'

              member PYTHON

              PYTHON = 'python'

                Package Files (3)

                Dependencies (12)

                Dev Dependencies (15)

                Peer Dependencies (1)

                Badge

                To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/jsii-pacmak.

                • Markdown
                  [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/jsii-pacmak)
                • HTML
                  <a href="https://www.jsdocs.io/package/jsii-pacmak"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>