@oak-digital/types-4-strapi-2 1.0.2 → 1.0.4

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.
@@ -15,6 +15,8 @@ jobs:
15
15
  steps:
16
16
  - name: Checkout
17
17
  uses: actions/checkout@v3
18
+ with:
19
+ fetch-depth: 0
18
20
 
19
21
  - uses: pnpm/action-setup@v2
20
22
  name: Install pnpm
package/README.md CHANGED
@@ -172,7 +172,5 @@ pnpm run build
172
172
  ## Publishing
173
173
 
174
174
  ```bash
175
- pnpm version # major | minor | patch
176
- pnpm run build
177
- pnpm publish
175
+ pnpm run release
178
176
  ```
@@ -58,7 +58,8 @@ class Attributes {
58
58
  deps.forEach((dep) => dependencies.add(dep));
59
59
  break;
60
60
  case 'relation':
61
- if (attr.relation === 'morphToMany') {
61
+ if (attr.relation === 'morphToMany' ||
62
+ attr.relation === 'morphToOne') {
62
63
  break;
63
64
  }
64
65
  dependencies.add(attr.target);
@@ -109,7 +110,8 @@ class Attributes {
109
110
  str += newAttrs.toString() + nullableString;
110
111
  break;
111
112
  case 'relation':
112
- if (attr.relation === 'morphToMany') {
113
+ if (attr.relation === 'morphToMany' ||
114
+ attr.relation === 'morphToOne') {
113
115
  str += 'any';
114
116
  break;
115
117
  }
@@ -7,11 +7,11 @@ export declare enum Events {
7
7
  BeforeInjectDependencies = "BeforeInjectDependencies",
8
8
  AfterInjectDependencies = "AfterInjectDependencies"
9
9
  }
10
- export declare type SchemasType = {
10
+ export type SchemasType = {
11
11
  apiSchemas: Record<string, any>[];
12
12
  componentSchemas: Record<string, any>[];
13
13
  };
14
- export declare type EventTypes = {
14
+ export type EventTypes = {
15
15
  BeforeReadSchema: SchemasType;
16
16
  AfterReadSchema: SchemasType;
17
17
  };
@@ -10,4 +10,4 @@ var Events;
10
10
  Events["ModifySchemas"] = "ModifySchemas";
11
11
  Events["BeforeInjectDependencies"] = "BeforeInjectDependencies";
12
12
  Events["AfterInjectDependencies"] = "AfterInjectDependencies";
13
- })(Events = exports.Events || (exports.Events = {}));
13
+ })(Events || (exports.Events = Events = {}));
@@ -1,5 +1,5 @@
1
1
  import { caseType } from '../utils/casing';
2
- export declare type RelationNames = Record<string, {
2
+ export type RelationNames = Record<string, {
3
3
  name: string;
4
4
  file: File;
5
5
  }>;