@vc-shell/api-client-generator 2.0.6 → 2.0.7-pr236.cccb3a4
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 +10 -7
- package/dist/api-client-generator.js +247 -209
- package/package.json +8 -3
- package/CHANGELOG.md +0 -2566
package/README.md
CHANGED
|
@@ -56,13 +56,13 @@ Add the dependencies to your project's **package.json**:
|
|
|
56
56
|
|
|
57
57
|
The options are listed in the table below:
|
|
58
58
|
|
|
59
|
-
| Options | Description
|
|
60
|
-
| ---------------------------- |
|
|
61
|
-
| `--APP_PLATFORM_MODULES` | Platform modules to generate API client.<br>{==string[]==} <br>
|
|
62
|
-
| `--APP_API_CLIENT_DIRECTORY` | Output directory for generated API clients. <br>{==string==}
|
|
63
|
-
| `--APP_PLATFORM_URL` | Platform URL to obtain client API configs. <br>{==string==}
|
|
64
|
-
| `--APP_TYPE_STYLE` | Sets the type style for generated DTOs. Can be 'Class' or 'Interface'.<br>{==string==}
|
|
65
|
-
| `--VERBOSE` | Enable verbose logging. <br>{==boolean==}
|
|
59
|
+
| Options | Description | Example |
|
|
60
|
+
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
|
|
61
|
+
| `--APP_PLATFORM_MODULES` | Platform modules to generate API client.<br>{==string[]==} <br> **Always quote the value** so the shell does not split it: `'[Module1, Module2]'`. Spaces inside quotes are fine. The generator validates the value and fails fast with a quoting hint if it looks truncated. | `--APP_PLATFORM_MODULES='[VirtoCommerce.Catalog, VirtoCommerce.Orders]'` |
|
|
62
|
+
| `--APP_API_CLIENT_DIRECTORY` | Output directory for generated API clients. <br>{==string==} | `--APP_API_CLIENT_DIRECTORY=./src/api_client/` |
|
|
63
|
+
| `--APP_PLATFORM_URL` | Platform URL to obtain client API configs. <br>{==string==} | `--APP_PLATFORM_URL=https://vcmp-dev.govirto.com/` |
|
|
64
|
+
| `--APP_TYPE_STYLE` | Sets the type style for generated DTOs. Can be 'Class' or 'Interface'.<br>{==string==} | `--APP_TYPE_STYLE=Interface` |
|
|
65
|
+
| `--VERBOSE` | Enable verbose logging. <br>{==boolean==} | `--VERBOSE=true` |
|
|
66
66
|
|
|
67
67
|
!!! note
|
|
68
68
|
For the `--APP_TYPE_STYLE` parameter, use **exactly** `"Class"` or `"Interface"` (case-sensitive). Any other value will cause an error.
|
|
@@ -70,6 +70,9 @@ Add the dependencies to your project's **package.json**:
|
|
|
70
70
|
!!! tip
|
|
71
71
|
Use `--APP_TYPE_STYLE=Interface` for better TypeScript integration and smaller bundle sizes. Use `--APP_TYPE_STYLE=Class` when you need runtime type checking or class-specific features.
|
|
72
72
|
|
|
73
|
+
!!! warning
|
|
74
|
+
When passing `--APP_PLATFORM_MODULES` on the command line, wrap the value in quotes. Without quotes, the shell splits `[A, B]` on the space and only the first module is seen — the generator now detects this and exits with an error instead of silently generating a partial client.
|
|
75
|
+
|
|
73
76
|
3. Configure Platform URL and other settings in your project's **.env** file:
|
|
74
77
|
|
|
75
78
|
```title="vc-app-extend/.env"
|