yellowgrid-api-ts 3.2.42 → 3.2.44

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 (2) hide show
  1. package/getEnums.php +6 -2
  2. package/package.json +1 -1
package/getEnums.php CHANGED
@@ -4,6 +4,10 @@ use App\Contracts\Enums\PublicEnumInterface;
4
4
 
5
5
  require_once __DIR__."/../../../../vendor/autoload.php";
6
6
 
7
+ $dir = __DIR__."/src/models";
8
+ if (!is_dir($dir)) {
9
+ mkdir($dir);
10
+ }
7
11
  foreach (\App\Enums\Router\PublicEnumEnum::cases() as $publicEnum) {
8
12
  $ref = new ReflectionEnum($publicEnum->value);
9
13
  $cases = [];
@@ -22,6 +26,6 @@ foreach (\App\Enums\Router\PublicEnumEnum::cases() as $publicEnum) {
22
26
  $enumName = $ref->getShortName();
23
27
  $enumString = json_encode($cases, JSON_PRETTY_PRINT);
24
28
  $content = "export const $enumName = $enumString as const;".
25
- "\n\n export type $enumName = typeof $enumName;";
26
- file_put_contents(__DIR__."/src/models/$enumName.ts", $content);
29
+ "\n\n export type $enumName = typeof $enumName:);";
30
+ file_put_contents("$dir/$enumName.ts", $content);
27
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yellowgrid-api-ts",
3
- "version": "3.2.42",
3
+ "version": "3.2.44",
4
4
  "description": "OpenAPI client for yellowgrid-api-ts",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {