@shopware/api-gen 1.5.1 → 1.5.2

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.
Files changed (3) hide show
  1. package/README.md +9 -15
  2. package/dist/cli.mjs +1404 -2574
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -33,7 +33,7 @@ deno install --dev npm:@shopware/api-gen
33
33
 
34
34
  ## Features
35
35
 
36
- Generator will create a new directory `api-types` with TypeScript schemas inside. Depending on the `apiType` parameter it will create `storeApiTypes.ts` or `adminApiTypes.ts` file.
36
+ Generator will create a new directory `api-types` with TypeScript schemas inside. Depending on the `apiType` parameter it will create `storeApiTypes.d.ts` or `adminApiTypes.d.ts` file.
37
37
 
38
38
  ### Overriding
39
39
 
@@ -156,7 +156,7 @@ You could also use multiple patches and add your own overrides on top:
156
156
  }
157
157
  ```
158
158
 
159
- and then inside the `storeApiTypes.overrides.json` file you can add your patches:
159
+ and then inside the `./api-types/myOwnPatches.overrides.json` file you can add your patches:
160
160
 
161
161
  ```json
162
162
  {
@@ -281,7 +281,7 @@ pnpx @shopware/api-gen validateJson --help
281
281
  pnpx @shopware/api-gen validateJson --apiType=store
282
282
  ```
283
283
 
284
- this searches for `api-types/storeApiTypes.json` file and validates it. Use [loadSchema](#loadSchema) command first to fetch your JSON file.
284
+ this searches for `api-types/storeApiSchema.json` file and validates it. Use [loadSchema](#loadSchema) command first to fetch your JSON file.
285
285
 
286
286
  Prepare your config file named **api-gen.config.json**:
287
287
 
@@ -340,7 +340,7 @@ import { generate } from "@shopware/api-gen";
340
340
 
341
341
  await generate({
342
342
  cwd: process.cwd(),
343
- filename: "storeApiTypes.ts",
343
+ filename: "storeApiSchema.json",
344
344
  apiType: "store",
345
345
  debug: true,
346
346
  logPatches: true,
@@ -354,7 +354,7 @@ import { loadSchema } from "@shopware/api-gen";
354
354
 
355
355
  await loadSchema({
356
356
  cwd: process.cwd(),
357
- filename: "storeApiTypes.json",
357
+ filename: "storeApiSchema.json",
358
358
  apiType: "store",
359
359
  });
360
360
  ```
@@ -366,7 +366,7 @@ import { validateJson } from "@shopware/api-gen";
366
366
 
367
367
  await validateJson({
368
368
  cwd: process.cwd(),
369
- filename: "storeApiTypes.json",
369
+ filename: "storeApiSchema.json",
370
370
  apiType: "store",
371
371
  logPatches: true,
372
372
  debug: true,
@@ -401,15 +401,9 @@ await split({
401
401
 
402
402
  Full changelog for stable version is available [here](https://github.com/shopware/frontends/blob/main/packages/api-gen/CHANGELOG.md)
403
403
 
404
- ### Latest changes: 1.5.1
404
+ ### Latest changes: 1.5.2
405
405
 
406
406
  ### Patch Changes
407
407
 
408
- - [#2575](https://github.com/shopware/frontends/pull/2575) [`1e8a64c`](https://github.com/shopware/frontends/commit/1e8a64c71197484e2c8d2a2f148f3f29ab63bccd) Thanks [@patzick](https://github.com/patzick)! - Support OpenAPI `const` schema values during type generation.
409
-
410
- - [#2515](https://github.com/shopware/frontends/pull/2515) [`978b02c`](https://github.com/shopware/frontends/commit/978b02c969ca4b16f5fc1d7a953ec4cce3d98173) Thanks [@patzick](https://github.com/patzick)! - Generate `customFields` properties with a dedicated `CustomFields` type instead of the broader `GenericRecord` type.
411
-
412
- - [#2516](https://github.com/shopware/frontends/pull/2516) [`13a3766`](https://github.com/shopware/frontends/commit/13a37660fbbf63054b9e7d02f39d161bb7f2b065) Thanks [@patzick](https://github.com/patzick)! - Use `oxfmt` instead of Prettier for generated API files.
413
-
414
- - Updated dependencies [[`b767721`](https://github.com/shopware/frontends/commit/b767721847bf3391f9067eca7a045089fb22fce0), [`978b02c`](https://github.com/shopware/frontends/commit/978b02c969ca4b16f5fc1d7a953ec4cce3d98173), [`33facb1`](https://github.com/shopware/frontends/commit/33facb178792c8cb26b47ab984ac48c08ab4b72b), [`9137475`](https://github.com/shopware/frontends/commit/91374753cedb2034385f642e6af11314f2971caa), [`474d3fe`](https://github.com/shopware/frontends/commit/474d3fed346816135b0c7c797990b215a8b691c0)]:
415
- - @shopware/api-client@1.5.1
408
+ - Updated dependencies [[`183c183`](https://github.com/shopware/frontends/commit/183c183f905486c27fa770fd0f4cd9993e86c20e), [`458494e`](https://github.com/shopware/frontends/commit/458494e8bd2be88d4fbf161636a109c8f4efc443)]:
409
+ - @shopware/api-client@1.6.0