@dynamods/dynamo-pm-wizard
v0.0.27
Published
Dynamo Package Manager Publish Wizard
Keywords
Readme
Package Publish Wizard
Overview
The Package Publish Wizard is a React-based UI component designed to facilitate the creation and management of packages in Dynamo. It is hosted inside the Dynamo Package Manager and provides an intuitive interface for users to create, update, and publish packages.
A package in Dynamo is a structured collection of files and folders that extends Dynamo's capabilities. The wizard enables users to create a package from scratch or update an existing package. Packages can be stored locally or published online. Once a package is published, only the original creator can update it, ensuring controlled versioning.
Features
- Create a new package: Initialize a package with metadata, dependencies, and contents.
- Update an existing package: Modify and increment the version of an already published package.
- Local package management: Save and manage packages directly on disk.
- Online publishing: Upload and maintain packages via the Dynamo Package Manager.
- Version control: Ensure package integrity with incremental versioning.
Installation
Ensure you have Node.js and npm installed before proceeding.
npm installRunning the Project
To start the development server:
npm startThis runs the project using Vite.
To build the project:
npm run buildThis compiles the application and processes it for production use. bundle.js and index.html will be exported in the dist folder. Only use the index.html for Dynamo.
To clean the build directory:
npm run cleanDynamo Integration
The react component is hosted inside Dynamo in a WebView2 wpf component. Due to a known limitation of 2Mb, we serve a single file injecting the resulting bundle.js inside the index.html file.
- use 'inline-bundle.js' to inject the bundle.js into the index.html. The resulting file also contains the embeddesFonts location - make sure this is well coordinated with the location on Dynamo's side
Running Tests
The project includes both unit and end-to-end tests.
To run unit tests:
npm run test:unitTo run all tests:
npm run testLinting - ignore
To check for linting errors:
npm run lint:checkTo automatically fix linting issues:
npm run lint:fixLicense Compliance
This project uses Autodesk's adsk-npm-license-puller to manage dependencies. To generate direct and transitive dependency reports:
npm run licenseVersioning
To increment the package version (patch release):
npm run version:patchDeployment - Release Process
The Package Publish Wizard is a component that is consumed in the Dynamo Desktop. The component is published internally to npm.autodesk.com, to publish a new version for the component follow these steps:
- Make sure that the latest changes are reviewed and merged to the
masterbranch. - Create a new release branch based on the master branch.The new release branch needs to be named using the following convention:
- Start the branch name with
release/ - If it is a major release, follow it by the major numeric version and the keyword
-major. Example: release/2-major - If it is a minor release, follow it by the major versions and a variable minor version denoted by
xfollowed by the keyword-minor. Example: release/2.x-minor - If it is a patch release, follow it by the major, minor numeric versions and a variable patch version denoted by
xfollowed by the keyword-patch. Example: release/2.1.x-patch - In Jenkins, select the branch and click Build now or Build with Parameters to trigger a new build.
- After a successful build, a new npm package version will be published to the internal autodesk artifactory (npm.autodesk.com).
- A PR will be created by the build service user, post build, to merge the new version from the release branch to master. Review and merge to ensure that master is always up-to-date with the latest released version.
(Note: The version of the package depends upon the version specified in the
pipeline.ymlfile, the version in the branch name is purely for record-keeping)
- Start the branch name with
Release Types It is mandatory to include at-least one of the release types in the branch name.
- Use patch for a new patch release (backwards-compatible bug fixes, security patches).
- Use minor for a new minor release (add functionality in a backwards-compatible manner).
- Use major for a new major release (incompatible API changes/breaking changes).
Examples: | Branch Name | Current Version | New Version | | --------------------- | ------------- | ------------- | | release/4.6.x-patch | 4.6.1 | 4.6.2 | | release/4.x-minor | 4.6.2 | 4.7.0 | | release/5-major | 4.7.0 | 5.0.0 |
Learn more about semantic versioning
Package Publish Wizard - Usage
The package can be installed using npm, by running the following command:
npm install @dynamo/dynamo-pm-wizard@latestIn the above command latest can be replaced by a specific version to fetch it.
Make sure to have a .npmrc file at the root level of the project before running the above command as the package in internal, and you will need it to point your npm installation to the internal Autodesk registry.
.npmrc
@adsk:registry=https://npm.autodesk.com/artifactory/api/npm/autodesk-npm/
registry=https://npm.autodesk.com/artifactory/api/npm/autodesk-npm-virtual/These steps ensure that the package is built and deployed correctly using the configurations defined in the pipeline.yml file.
Dependencies
Core Dependencies
- React 18.3.1 - Core library for building UI components
- React Hook Form - Form validation and management
- Sass - Stylesheet preprocessor for styling
- Weave MUI Components - UI components for a consistent design system
- React-Intl - Internationalization support
Weave MUI Library
Weave MUI is an internal Autodesk library, thus we need to make sure to include an .npmrc file with the following content:
@adsk:registry=https://npm.autodesk.com/artifactory/api/npm/autodesk-npm/
registry=https://npm.autodesk.com/artifactory/api/npm/autodesk-npm-virtual/Can only be used when under Autodesk environment (Autodesk computer or VPN).
Development Dependencies
- Vite - Build and development server
- Jest - Testing framework
- ESLint - Linter for maintaining code quality
- TypeScript - Strongly-typed JavaScript
Contribution
To contribute to the project:
- Clone the repository.
- Install dependencies:
npm install - Create a new feature branch.
- Submit a pull request after implementing changes.
Author
Developed by Autodesk Inc.
License
This project is licensed under the ISC License.
