Skip to content

Commit

Permalink
Merge pull request #1 from CEHR2005/main
Browse files Browse the repository at this point in the history
deep-map-object to recursive-object-map
  • Loading branch information
Konard authored Sep 2, 2023
2 parents f422833 + a48fe9f commit dd3671d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions automation/generate-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as TJS from 'typescript-json-schema';
import * as path from 'path'
import * as fs from 'fs'
import _ from 'lodash';
import {deepMapObject} from '@freephoenix888/deep-map-object';
import {recursiveObjectMap} from '@freephoenix888/recursive-object-map';
import yargs from 'yargs/yargs';
import { hideBin } from 'yargs/helpers';
import {capitalCase} from 'case-anything'
Expand Down Expand Up @@ -31,7 +31,7 @@ async function main () {
throw new Error("Failed to generate schema")
}

schema = await deepMapObject(schema, ({key, value}) => ({newKey: key, newValue: (key === 'title') ? capitalCase(value) : value}));
schema = await recursiveObjectMap(schema, (key, value) => ({newKey: key, newValue: (key === 'title') ? capitalCase(value) : value}));
if(cliOptions.outputJsonFilePath) {
fs.writeFileSync(path.resolve(cliOptions.outputJsonFilePath), JSON.stringify(schema, null, 2));
} else {
Expand Down
15 changes: 9 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"@deep-foundation/store": "^0.0.19",
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@freephoenix888/deep-map-object": "^3.0.1",
"@freephoenix888/recursive-object-map": "^1.0.0",
"@google-cloud/speech": "^5.4.0",
"@google-cloud/vision": "^3.1.2",
"@ionic/pwa-elements": "^3.1.1",
Expand Down

0 comments on commit dd3671d

Please sign in to comment.