Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add not-yet-public API for defining additional spec.json fields with plugin-config #390

Closed
chrispcampbell opened this issue Nov 13, 2023 · 0 comments · Fixed by #391 or #392
Closed
Assignees

Comments

@chrispcampbell
Copy link
Contributor

Currently in the UserConfig interface (used by the build package), the user must define the modelSpec which is typically provided by the plugin-config package. The plugin-config package reads csv config files and generates an object that is used to build the spec.json file used by the compiler. Right now there is no way to define additional spec.json fields like directData that are necessary if a model uses GET DIRECT ... functions with the indirect tag (?data) syntax.

We should add a field to ConfigProcessorOptions that allows for setting these additional fields:

  /**
   * Additional options included with the SDE `spec.json` file.
   * @hidden This is not part of the public API because we are aiming to merge
   * the `spec.json` file format with the `sde.config.js` format.  This is exposed
   * temporarily to allow for configuring additional settings like `directData`
   * for which we don't currently have a way to configure via config files.
   */
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  spec?: { [key: string]: any }

I'm hiding it from the public API for now because I want to rename (and generally redo) spec.json file handling, see #327. Hopefully once we reconsider the config file arrangement, we won't need this mostly untyped field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment