Skip to content

Commit 5b77f7f

Browse files
authored
Merge pull request #54 from mitre-attack/51-bug-fix-zod-nonempty-strings
51 bug fix zod nonempty strings
2 parents 203092c + d90c046 commit 5b77f7f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1524
-973
lines changed

src/refinements/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import { attackIdExamples, attackIdPatterns } from '@/schemas/common/attack-id.js';
1+
import { z } from 'zod/v4';
22
import {
33
attackDomainSchema,
4+
attackIdExamples,
5+
attackIdPatterns,
46
type Aliases,
57
type AttackObject,
68
type ExternalReferences,
@@ -19,8 +21,7 @@ import {
1921
type XMitreRemoteSupport,
2022
type XMitreSystemRequirements,
2123
type XMitreTacticType,
22-
} from '@/schemas/index.js';
23-
import { z } from 'zod/v4';
24+
} from '../schemas/index.js';
2425

2526
/**
2627
* Creates a refinement for validating that the first alias matches the object's name

src/schemas/common/attack-base-object.ts renamed to src/schemas/common/attack-core.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { z } from 'zod/v4';
2-
import { stixDomainObjectSchema } from './stix-core.js';
32
import {
43
nameSchema,
54
xMitreAttackSpecVersionSchema,
65
xMitreDeprecatedSchema,
76
xMitreOldAttackIdSchema,
87
xMitreVersionSchema,
9-
} from './common-properties.js';
8+
} from './property-schemas/index.js';
9+
import { stixDomainObjectSchema } from './stix-core.js';
1010

1111
// Define the new properties
1212
const attackBaseObjectSchema = stixDomainObjectSchema.extend({

src/schemas/common/attack-id.ts

Lines changed: 0 additions & 159 deletions
This file was deleted.

0 commit comments

Comments
 (0)