criticalmanufacturing / cli Goto Github PK
View Code? Open in Web Editor NEWCritical Manufacturing Projects Command Line Tool
Home Page: https://criticalmanufacturing.github.io/cli/
License: BSD 3-Clause "New" or "Revised" License
Critical Manufacturing Projects Command Line Tool
Home Page: https://criticalmanufacturing.github.io/cli/
License: BSD 3-Clause "New" or "Revised" License
The basic case for the global cli installations is currently not working. Steps to reproduce:
npm i -g @criticalmanufacturing/cli
DEBUG=cmf:*
cmf -h
No help menu is shown because the node shim that invokes the cli binary thinks it was installed locally and not globally.
This is due to a bug with sindresorhus/is-installed-globally. In this case, npm
is installed inside %APPDATA%
and not under the node prefix, which by default is C:\Program Files\nodejs
but is-installed-globally
does not account for this scenario.
A simple fix could be checking if the node shim is inside %APPDATA%
.
Asssemble Command Generated Dependencies File is Adding Local Data Package, when it should add only remote
Would be great to have a command that will check the dependecies and the project itself and update the GUI package json cmfLinkDependencies to the correct relative paths
Bump should be locally scoped.
Bump should only look at the specific package that is executed.
deprecate --all option
when a new version is available of the cli or any of the installed plugins, a notification should appear to the user.
something like:
a new version of cmf-cli is available: URL
Example:
My package depends on a package that has to be installed in the system, but I don't want to ship it in the same package as my feature package
CMF pack
if (!dependencyFound) { if (dependency.Mandatory) { throw new CliException(string.Format(CliMessages.MissingMandatoryDependency, dependency)); } else { Log.Warning(string.Format(CliMessages.MissingMandatoryDependency, dependency)); } }
to add new strategies to SecurityPortal, cli needs to support this new PackageType.
manifest.xml example:
<packageType>Generic</packageType>
<targetDirectory>SecurityPortal</targetDirectory>
<targetLayer>securityportal</targetLayer>
This method is causing some problems when some properties (isInstallable, isUniqueInstall, xmlInjection) doesn't exist in the cmfpackage.json file.
We need to refactor this logic and maybe remove that method.
A good test for this issue is run cmf pack in Test Package without that properties.
We have some packages that assemble shouldn't take care, because we have the assumption that packages are already installed.
In case that are not installed the installation will fail.
Maybe also the publish command
The build of Data should check if the DEEs can be compiled. Right now someone can change a DEE merge with development and then the fact the DEE is not compilable will only be caught by a Business PR.
Also Business Compiling should be explicitly be project and not by solution, because right now it's compiling the DEEs even though they are not part of the Business package
The JsonIgnore tag that was placed so it would not serialize certain properties is impacting the property deserialization
for standardization proposes all commands, should always run in the scope of the package in the working directory.
cli needs a few enhancements to be fully compatible with DevOps Center (DOC) deployments
init
should be able to accept DOC environment parameters instead of a Deployment Framework (DF) export as a configuration source (solved by #41)init
should accept a base path used for all the package repository shares in GlobalVariables
Assemble command is always assuming include test false. Assemble needs to retrieve the test packages that are explicitly part of the CmfPackage.json
Environment: Microsoft Azure Cloud Agents: ubuntu-latest
Issue:
cli is installing at /home/vsts/work/[node_modules/.bin/cmf-cli/cmf]
when it should be installed at /home/vsts/work/_temp/[node_modules/.bin/cmf-cli/cmf]
. The temp path is expected when running the build
and pack
commands, which is causing pipelines to fail.
Logs:
Debug info did not provide anything useful and a manual Linux install does not present the same issue
Currently, for all commands the only way of exiting with a non-zero exit code is by throwing an exception, which polutes the logs quite a bit. In dotnet/command-line-api
, it should be possible for the handler to provide the exit code, but our handlers return void. This should possibly be refactored.
Also, there is no reason for our handlers to be public, though this has been a convention since the beginning.
When deploying more than one help package to the same documentation site, there are collisions with the menu item IDs, as they are fixed (and hardcoded). This needs to change to include the package id as part of the menu group and items ids.
The first action on the CMF HTML scaffolding should be validate that the path to the html package is correctly mounted
i.e cmf new html --version 1.0.0 --htmlPackage D:\packages\Cmf.Presentation.HTML.8.2.2.zip
First action should be validate, this exists -> D:\packages\Cmf.Presentation.HTML.8.2.2.zip
Some IoT specific commands were placed incorrectly in the command tree. These should be changed to:
bumpIoTConfiguration -> bump iot configuration
bumpIoTCustomization -> bump iot customization
This option in the majority of the cases is called with this option as true, based on that the defaultvalue of skipDependencies option on pack command should set as true.
This cause the previous "magic" cast from String to DirevtoryInfo done by System.CommandLine to return nulls. We need to implement parseArgument in these cases
Some shells (e.g. Powershell) interpret the double dash (--) in command arguments. Currently the plugin command expects plugin parameters to be specified after a double dash, like cmf [cli options] -- [plugin options]
.
However, because some shells interpret and then strip the double dash, the invocation needs to actually be something like cmf [cli options] '--' [plugin options]
which isn't ideal.
As the cli options are currently not used for the plugin commands, the double dash requirement could, in theory, be dropped. However, System.CommandLine
expects any command options to be explicitly declared, so a work around would be needed.
To resolve this, we'd need to
Legend:
Assumption
Arguments/Options
Logic
We should use the new assemble command in CI-Publish.
The dependencies file should be included in the Configurations artifact.
CI-Release must obtain the file from the artifact and use it to download all dependencies: this is necessary, at least, for DevOps Center installations
Currently pack command is not logging the final path of the package
when using the bump command with --all option if the dependency packages versions doesn't match the error is pointing to the wrong version.
repro steps:
have a root package with a dependency:
"dependencies": [ { "id": "PackageA", "version": "1.0.0" }]
have the package with another version:
{ "packageId": "PackageA", "version": "1.0.1", }
running the cmf bump --all:
Hi,
If I am involved in two different projects that use different cli versions, what's your suggestion on how to handle it? v2 introduces breaking changes from v1, so when I install it locally it may affect the project that still depends on cli v1.
Thank you.
As plugins to the cli start getting published, as a user I want a way, like a cli command, to search for available plugins.
As a reminder, even manually (i.e. not searchable/published) installed plugins will always work. To have a cmf-cli plugin, just place a cmf- binary somewhere in your PATH. Check the PluginCommand for more details on which formats are supported.
The current design draft (which can undergo changes when implementing) is:
cmf-cli-plugin
search
npm install -g
, there's no need to add a wrapper around thisInstead of throw an error: https://github.com/criticalmanufacturing/cli/blob/4b1b5ab8836436f70ca281cf5b6227f1d4f15597/cmf-cli/Objects/CmfPackage.cs#L264, we should force the Data packages to set isUniqueInstall as true.
cmf init documentation states the following:
Usage:
cmf init [options] [ []]
Arguments:
[default: Cmf.Custom.Package]
Working Directory [default: .]
However, if I try, for example, the following:
cmf init "MyProject"
I have an error because --customPackageName is mandatory
Hi all,
It would be great to have a command that would check my business dependencies (internal or remote) and deploy them to my local environment. This way, when generating the LBOs I would know everything is consistent
The package dependency tree is being used for ls
, pack
and publish
with some slight differences. This logic is also mixed with the actual command execution, e.g. we are building the tree while we are packing.
To help with testing and simplifying our logic, the dependency tree should be built first and be usable by all commands
IoT bump should be consistent between all packages that are under the same root
Hi,
I'm not sure I did something wrong, but after running cmf init, it generated the GlobalVariables.yml file without the values filled.
Trying to fill them, I searched for documentation on what it means, but I couldn't find anything. There are some fields that are self-explanatory, but I don't know what these mean:
CmfCliRepository (I looked for an example and the value should be 'https://registry.npmjs.com')
CmfPipelineRepository
CmfPipelineVersion
Thank you and best regards.
When invoking GetContentToPack it is creating target folders if they don't exist. When JSON validator was invoking this it is creating a folder in the pack.
After project init and generate new Test package, the package type is not correct.
is being set as "Test" instead of "Tests"
File system is being instantiated more than once in the code, breaking the test file emulator
If the PackageType is equal to Data the Build command should validate the json and xml files are valid
As a user, I want to scaffold a new repository structure, step by step. This includes:
The MDL GUI supports loading Master Data archives in the format:
The DF packages support multiple master data files, so that we can ship this by feature. As such, an end user that would need to manually load Master Data archives needs to transform the DF package to several MD archives.
Currently, the cli is using the Powershell Installer approach to generate Master Data packages. Starting with MES v8.2, all need functionality is supported by the Deployment Framework. So, migrate and remove the Powershell Installer from the cli.
This is a breaking change.
Help in new command is missing artifacts folder
All the file and directory searching is using the SearchPattern from DIrectoryInfo.
This Pattern doesn't support glob strings and usually returns more files/directories than needed.
When running cmf init without an output directory, the following error is shown:
"Rerun the command and pass --force to accept and create."
However, documentation does not mention this
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.