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

Support standard object types for command plugins + options for templater types #958

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

mandelsoft
Copy link
Contributor

@mandelsoft mandelsoft commented Oct 14, 2024

What this PR does / why we need it

  • Support standard object types for command plugins
    The CLI supports verbs on objects (e.g, get component). For such object names aliases are used
    (e.g. for componentversions, it is possible to use component or cv, instead)
    A CLI command provided by a plugin may use such a standard object name. The new integration takes the aliases provided
    by the CLI into account.
  • Options for templater types
    Templaters are used by the CLI to process the constructor files, but possible also by direct lib users.
    So far, templaters are created for a value set, but without other arbitrary type specific optional parameters.
    The templater configuration now offers settings passed to the templater constructor. This is used by spiff
    to enable or restrict the OS mode. By default, file system access is enabled,. OS access is enabled if no virtual filesystem
    is used. With this configuration option, the user of the templater may configure tis behaviour.

Which issue(s) this PR fixes

Copy link
Contributor

@fabianburth fabianburth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description does not explain, why we need it. Please provide more information on that?

In regards to the templater, for which commands is it used on the command line?

@mandelsoft mandelsoft merged commit 13bde23 into open-component-model:main Oct 14, 2024
14 of 15 checks passed
@mandelsoft mandelsoft deleted the fix branch October 14, 2024 14:17
@mandelsoft mandelsoft restored the fix branch October 17, 2024 06:49
Skarlso pushed a commit that referenced this pull request Oct 22, 2024
…ater types (#958)

<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it
- Support standard object types for command plugins 
The CLI supports verbs on objects (e.g, get component). For such object
names aliases are used
(e.g. for componentversions, it is possible to use component or cv,
instead)
A CLI command provided by a plugin may use such a standard object name.
The new integration takes the aliases provided
  by the CLI into account.
- Options for templater types
Templaters are used by the CLI to process the constructor files, but
possible also by direct lib users.
So far, templaters are created for a value set, but without other
arbitrary type specific optional parameters.
The templater configuration now offers settings passed to the templater
constructor. This is used by spiff
to enable or restrict the OS mode. By default, file system access is
enabled,. OS access is enabled if no virtual filesystem
is used. With this configuration option, the user of the templater may
configure tis behaviour.
#### Which issue(s) this PR fixes
<!--
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants