Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@kubev2v/types
Advanced tools
Manual and auto generated typescript models and constants for Forklift controller.
Subdirectory | Auto generated | Description | Contents |
---|---|---|---|
constants | Auto | Contains auto-generated Openshift Web Console model constants. | Auto-generated models, that can be manually adjusted. |
models | Auto | Contains auto-generated types for Kubernetes (k8s) models used in the project. | Kubernetes (k8s) models used in the project, auto-generated from API definitions or other sources. |
types | Manual | Contains manually created helper types and non-Kubernetes types used by the inventory API. | - Helper types: Manually created types that assist in various tasks within the project. - Non-Kubernetes types: Types that are used by the inventory API. |
The typescript files are auto generated using forklift CRDs available from /ci/yaml/crds.
to generate new API version, update the CRDs in /ci/yaml/crds, and then:
a. run
bash ./ci/update-types-package.sh
b. manually cleanup the generated code. c. manually create or clean generated index files d. run linter fix for final touch.
npm run lint:fix
CRD | Ref |
---|---|
Openshift | https://github.com/openshift/api/tree/master/console/v1 |
Forklift | https://github.com/kubev2v/forklift/tree/main/operator/config/crd/bases |
The script use the CRDs to generate OpenAPI file, and use that file to create model files.
Auto generated files will contain linting errors, you can run npm run lint:fix
to cleanup the code after auto-re-generation.
After auto generation is done, some manual tweeks can be done.
The model constant is auto generated with abbr
that defaults to first two letters of the kind, and undefined color
.
It is sometimes advisable to manual change the defaults.
for example:
export const HostModel = {
label: 'Host',
labelPlural: 'Hosts',
abbr: 'HO',
color: undefined,
...
};
can be manually edited to:
export const HostModel = {
label: 'Forklift Host',
labelPlural: 'Forklift Hosts',
abbr: 'H',
color: '#f00',
...
};
The auto generation script update-types-package is a bash script that run the auto generation proccess.
Tools | Descroption | URL |
---|---|---|
crdtoapi | create OpenAPI file from CRDs | https://github.com/yaacov/crdtoapi |
crdtomodel | create k8s model constants from CRDs | https://github.com/yaacov/crdtoapi |
openapi-generator-cli | create typescript interfaces from the OpenAPI file | https://github.com/OpenAPITools/openapi-generator-cli |
FAQs
Typescript interfaces and types for forklift-console-plugin
The npm package @kubev2v/types receives a total of 50 weekly downloads. As such, @kubev2v/types popularity was classified as not popular.
We found that @kubev2v/types demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.