@dynamods/dynamo-pm-wizard 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,163 @@
1
+
2
+ # Package Publish Wizard
3
+
4
+ ## Overview
5
+ 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.
6
+
7
+ 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.
8
+
9
+ ## Features
10
+ - **Create a new package**: Initialize a package with metadata, dependencies, and contents.
11
+ - **Update an existing package**: Modify and increment the version of an already published package.
12
+ - **Local package management**: Save and manage packages directly on disk.
13
+ - **Online publishing**: Upload and maintain packages via the Dynamo Package Manager.
14
+ - **Version control**: Ensure package integrity with incremental versioning.
15
+
16
+ ## Installation
17
+ Ensure you have **Node.js** and **npm** installed before proceeding.
18
+
19
+ ```sh
20
+ npm install
21
+ ```
22
+
23
+ ## Running the Project
24
+ To start the development server:
25
+ ```sh
26
+ npm start
27
+ ```
28
+ This runs the project using **Vite**.
29
+
30
+ To build the project:
31
+ ```sh
32
+ npm run build
33
+ ```
34
+ This 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.
35
+
36
+ To clean the build directory:
37
+ ```sh
38
+ npm run clean
39
+ ```
40
+
41
+ ## Dynamo Integration
42
+ 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.
43
+
44
+ - 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
45
+
46
+ ## Running Tests
47
+ The project includes both unit and end-to-end tests.
48
+
49
+ To run unit tests:
50
+ ```sh
51
+ npm run test:unit
52
+ ```
53
+
54
+ To run all tests:
55
+ ```sh
56
+ npm run test
57
+ ```
58
+
59
+ ## Linting - ignore
60
+ To check for linting errors:
61
+ ```sh
62
+ npm run lint:check
63
+ ```
64
+
65
+ To automatically fix linting issues:
66
+ ```sh
67
+ npm run lint:fix
68
+ ```
69
+
70
+ ## License Compliance
71
+ This project uses Autodesk's **adsk-npm-license-puller** to manage dependencies.
72
+ To generate direct and transitive dependency reports:
73
+ ```sh
74
+ npm run license
75
+ ```
76
+
77
+ ## Versioning
78
+ To increment the package version (patch release):
79
+ ```sh
80
+ npm run version:patch
81
+ ```
82
+
83
+ ## Deployment - Release Process
84
+
85
+ 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:
86
+ - Make sure that the latest changes are reviewed and merged to the `master` branch.
87
+ - Create a new release branch based on the master branch.The new release branch needs to be named using the following convention:
88
+ - Start the branch name with `release/`
89
+ - If it is a major release, follow it by the major numeric version and the keyword `-major`. Example: release/2-major
90
+ - If it is a minor release, follow it by the major versions and a variable minor version denoted by `x` followed by the keyword `-minor`. Example: release/2.x-minor
91
+ - If it is a patch release, follow it by the major, minor numeric versions and a variable patch version denoted by `x` followed by the keyword `-patch`. Example: release/2.1.x-patch
92
+ - In [Jenkins](https://master-5.jenkins.autodesk.com/job/Dynamo/job/PackagePublishWizard/), select the branch and click Build now or Build with Parameters to trigger a new build.
93
+ - After a successful build, a new npm package version will be published to the internal autodesk artifactory (npm.autodesk.com).
94
+ - 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.
95
+ (*Note: The version of the package depends upon the version specified in the `pipeline.yml` file, the version in the branch name is purely for record-keeping*)
96
+
97
+ **Release Types**
98
+ It is **mandatory** to include at-least one of the release types in the branch name.
99
+ - Use **patch** for a new patch release (backwards-compatible bug fixes, security patches).
100
+ - Use **minor** for a new minor release (add functionality in a backwards-compatible manner).
101
+ - Use **major** for a new major release (incompatible API changes/breaking changes).
102
+
103
+ Examples:
104
+ | Branch Name | Current Version | New Version |
105
+ | --------------------- | ------------- | ------------- |
106
+ | release/4.6.x-patch | 4.6.1 | 4.6.2 |
107
+ | release/4.x-minor | 4.6.2 | 4.7.0 |
108
+ | release/5-major | 4.7.0 | 5.0.0 |
109
+
110
+ [Learn more about semantic versioning](semver.org)
111
+
112
+ #### Package Publish Wizard - Usage
113
+
114
+ The package can be installed using `npm`, by running the following command:
115
+ ```
116
+ npm install @dynamo/dynamo-pm-wizard@latest
117
+ ```
118
+ In the above command `latest` can be replaced by a specific version to fetch it.
119
+ 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.
120
+
121
+ **.npmrc**
122
+ ```
123
+ @adsk:registry=https://npm.autodesk.com/artifactory/api/npm/autodesk-npm/
124
+ registry=https://npm.autodesk.com/artifactory/api/npm/autodesk-npm-virtual/
125
+ ```
126
+
127
+ These steps ensure that the package is built and deployed correctly using the configurations defined in the `pipeline.yml` file.
128
+
129
+ ## Dependencies
130
+ ### Core Dependencies
131
+ - **React 18.3.1** - Core library for building UI components
132
+ - **React Hook Form** - Form validation and management
133
+ - **Sass** - Stylesheet preprocessor for styling
134
+ - **Weave MUI Components** - UI components for a consistent design system
135
+ - **React-Intl** - Internationalization support
136
+
137
+ #### Weave MUI Library
138
+ Weave MUI is an internal Autodesk library, thus we need to make sure to include an .npmrc file with the following content:
139
+ ```
140
+ @adsk:registry=https://npm.autodesk.com/artifactory/api/npm/autodesk-npm/
141
+ registry=https://npm.autodesk.com/artifactory/api/npm/autodesk-npm-virtual/
142
+ ```
143
+ Can only be used when under Autodesk environment (Autodesk computer or VPN).
144
+
145
+ ### Development Dependencies
146
+ - **Vite** - Build and development server
147
+ - **Jest** - Testing framework
148
+ - **ESLint** - Linter for maintaining code quality
149
+ - **TypeScript** - Strongly-typed JavaScript
150
+
151
+ ## Contribution
152
+ To contribute to the project:
153
+ 1. Clone the repository.
154
+ 2. Install dependencies: `npm install`
155
+ 3. Create a new feature branch.
156
+ 4. Submit a pull request after implementing changes.
157
+
158
+ ## Author
159
+ Developed by **Autodesk Inc.**
160
+
161
+ ## License
162
+ This project is licensed under the **ISC License**.
163
+