{"id":20598594,"url":"https://github.com/scottdurow/dataverse-gen","last_synced_at":"2025-04-15T00:23:29.875Z","repository":{"id":39975858,"uuid":"257690009","full_name":"scottdurow/dataverse-gen","owner":"scottdurow","description":"Early-bound types generator for CDS/Dataverse","archived":false,"fork":false,"pushed_at":"2024-12-05T05:39:03.000Z","size":4987,"stargazers_count":22,"open_issues_count":12,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-28T12:21:10.336Z","etag":null,"topics":["cds","codegen","common-data-service","dataverse"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scottdurow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-04-21T19:04:24.000Z","updated_at":"2025-02-26T08:08:36.000Z","dependencies_parsed_at":"2023-02-08T20:31:08.566Z","dependency_job_id":"294837ab-e327-4d0d-836d-8e75526dd9f6","html_url":"https://github.com/scottdurow/dataverse-gen","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottdurow%2Fdataverse-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottdurow%2Fdataverse-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottdurow%2Fdataverse-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottdurow%2Fdataverse-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scottdurow","download_url":"https://codeload.github.com/scottdurow/dataverse-gen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248982072,"owners_count":21193330,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cds","codegen","common-data-service","dataverse"],"created_at":"2024-11-16T08:27:30.123Z","updated_at":"2025-04-15T00:23:29.837Z","avatar_url":"https://github.com/scottdurow.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dataverse-gen\n\nCreates early bound TypeScript interfaces to work with `dataverse-ify`.\nFor more information see the [dataverse-ify project](https://github.com/scottdurow/dataverse-ify/wiki)\n\n## Usage\n\n1.  Add authentication for your Microsoft Dataverse Environment:\\\n`~$ npx dataverse-auth [environment]`\\\nE.g.\\\n`~$ npx dataverse-auth contosoorg.crm.dynamics.com`\n\n1. Initialise dataverse-ify to create .dataverse-gen.json config file:\\\n`~$ npx dataverse-gen init`\n\n1. At any time, you can re-generate the early bound types using:\\\n`~$ npx dataverse-gen`\n\n## `.dataverse-gen.json`\nThe configuration for dataverse-gen is stored in the `.dataverse-gen.json` file. You can edit this manually if you want rather than use `npx dataverse-gen init`.  This is the only file that is needed to run `npx dataverse-gen`.\n\nThe standard templates use references to the dataverse-ify types, and so unless you edit the templates (see below) you will need to install these types using:\n\n```shell\nnpm install --save dataverse-ify\n```\n## Custom Templates\nIf you wanted to just generate Attribute `enum` constants and stop there, you can easily customise the scripts to suit your needs by using:\n\n```shell\nnpx dataverse-gen eject\n```\n\nThis will create a step of templates ready to customise in the `_templates` folder. Once you have made your updates, just run `npx dataverse-gen` again. The templates use the awesome [ejs](https://ejs.co/) project. E.g.\n\n```typescript\n// Attribute constants\nexport const enum \u003c%- locals.SchemaName %\u003eAttributes {\n\u003c%locals.Properties \u0026\u0026 locals.Properties.forEach(function(property){ _%\u003e\n \u003c%- property.SchemaName %\u003e = \"\u003c%- property.Name %\u003e\",\n\u003c%})_%\u003e\n}\n```\n\nIf you wanted to revert back to the standard templates, just delete the  `_templates` folder\n## Installing Globally\nIf you would rather install dataverse-gen globally you can use:\\\n`~$ npm install -g dataverse-gen dataverse-auth`\n\nThis will then allow you to simply use:\\\n`~$ dataverse-auth`\\\n`~$ dataverse-gen`\n\nFor more information see the [dataverse-ify project](https://github.com/scottdurow/dataverse-ify/wiki)\n\nNotes:\n1. Files differ by case only. If you get an error from the imports in the generated types, it is likely that your file names have the wrong case. dataverse-gen will remember re-use the file name if it exsts when generating - even if the casing is different. The solution is to completely remove all your generated files and regenerated them to get the correct casing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottdurow%2Fdataverse-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscottdurow%2Fdataverse-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottdurow%2Fdataverse-gen/lists"}