Skip to content

Commit

Permalink
Merge branch 'main' into originalVersionId
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanHahn committed Aug 24, 2024
2 parents 1e596d5 + 84ff417 commit 9d57f80
Show file tree
Hide file tree
Showing 5 changed files with 137 additions and 1,031 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
issues: write
pull-requests: write
steps:
- name: Use Node.js 14
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 14
node-version: 18
- uses: nearform-actions/optic-release-automation-action@v4
with:
commit-message: 'Release {version}'
Expand Down
57 changes: 50 additions & 7 deletions lib/faker.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ const FAKER_EXTENSIONS = /** @type {const} */ ({
},
}),
id8: () => hexString(8),
comver: () =>
`${Math.floor(Math.random() * 100)}.${Math.floor(Math.random() * 100)}`,
},
})

Expand Down Expand Up @@ -83,11 +85,6 @@ function createFakerSchema(schema) {
mutateWithFakerProperty(s.properties.lon, 'location.longitude')
mutateWithFakerProperty(s.properties.lat, 'location.latitude')

mutateWithFakerProperty(
s.properties.refs.items.properties.id,
'mapeo.versionId',
)

mutateWithFakerProperty(
s.properties.attachments.items.properties.driveDiscoveryId,
'mapeo.id',
Expand All @@ -101,14 +98,40 @@ function createFakerSchema(schema) {
'mapeo.id8',
)

mutateWithFakerProperty(
s.properties.presetRef.properties.docId,
'mapeo.id',
)

mutateWithFakerProperty(
s.properties.presetRef.properties.versionId,
'mapeo.versionId',
)

return s
}
case 'Preset': {
mutateWithFakerProperty(s.properties.fieldIds, 'mapeo.links')
mutateWithFakerProperty(s.properties.iconId, 'mapeo.id')
mutateWithFakerProperty(
s.properties.fieldRefs.items.properties.docId,
'mapeo.id',
)
mutateWithFakerProperty(
s.properties.fieldRefs.items.properties.versionId,
'mapeo.versionId',
)

mutateWithFakerProperty(s.properties.iconRef.properties.docId, 'mapeo.id')
mutateWithFakerProperty(
s.properties.iconRef.properties.versionId,
'mapeo.versionId',
)
return s
}
case 'ProjectSettings': {
mutateWithFakerProperty(
s.properties.configMetadata.properties.fileVersion,
'mapeo.comver',
)
return s
}
case 'Role': {
Expand All @@ -124,6 +147,26 @@ function createFakerSchema(schema) {
)
return s
}
case 'Track': {
mutateWithFakerProperty(
s.properties.observationRefs.items.properties.docId,
'mapeo.id',
)
mutateWithFakerProperty(
s.properties.observationRefs.items.properties.versionId,
'mapeo.versionId',
)
return s
}
case 'translation': {
mutateWithFakerProperty(s.properties.docRef.properties.docId, 'mapeo.id')
mutateWithFakerProperty(
s.properties.docRef.properties.versionId,
'mapeo.versionId',
)

return s
}
}
}

Expand Down
Binary file removed mapeo-schema-3.0.0-next.16.tgz
Binary file not shown.
Loading

0 comments on commit 9d57f80

Please sign in to comment.