Skip to content

Commit

Permalink
chore: update dependencies to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
pantharshit00 committed Feb 16, 2023
1 parent e8481a3 commit 4be1852
Show file tree
Hide file tree
Showing 11 changed files with 2,554 additions and 4,035 deletions.
45 changes: 23 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,36 +30,37 @@
"url": "https://github.com/pantharshit00/prisma-docs-generator/issues"
},
"dependencies": {
"@prisma/generator-helper": "^3.1.1",
"@prisma/sdk": "^3.1.1",
"express": "^4.17.1",
"indent-string": "^4.0.0",
"kleur": "^4.1.4",
"meow": "^9.0.0",
"@prisma/generator-helper": "^4.10.1",
"@prisma/internals": "^4.10.1",
"express": "^4.18.2",
"indent-string": "^5.0.0",
"kleur": "^4.1.5",
"meow": "9",
"pluralize": "^8.0.0",
"prismjs": "^1.25.0"
"prismjs": "^1.29.0",
"ts-toolbelt": "^9.6.0"
},
"devDependencies": {
"@prisma/client": "^3.1.1",
"@types/express": "4.17.10",
"@types/jest": "^27.0.2",
"@types/node": "^16.9.6",
"@types/prismjs": "^1.16.6",
"cpy-cli": "^3.1.1",
"jest": "^27.2.1",
"prettier": "^2.4.1",
"prisma": "^3.1.1",
"rimraf": "^3.0.2",
"ts-jest": "^27.0.5",
"ts-node": "^10.2.1",
"typescript": "^4.4.3"
"@prisma/client": "^4.10.1",
"@types/express": "4.17.17",
"@types/jest": "^29.4.0",
"@types/node": "^18.13.0",
"@types/prismjs": "^1.26.0",
"cpy-cli": "^4.2.0",
"jest": "^29.4.3",
"prettier": "^2.8.4",
"prisma": "^4.10.1",
"rimraf": "^4.1.2",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
"typescript": "^4.9.5"
},
"scripts": {
"start": "ts-node main.ts",
"generate": "prisma generate",
"clean": "rimraf dist && rimraf styles_generator/dist && rimraf src/styles/main.css",
"build:gen": "tsc -d && cpy src/styles dist/styles",
"build:styles": "cd styles_generator && yarn build && cpy ./dist/main.css ../src/styles/",
"build:gen": "tsc -d && cpy --flat src/styles dist/styles",
"build:styles": "cd styles_generator && yarn build && cpy --flat ./dist/main.css ../src/styles/",
"build": "yarn build:styles && yarn build:gen",
"test": "jest",
"format": "prettier --ignore-path .gitignore src/**/*.ts --write"
Expand Down
7 changes: 5 additions & 2 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import meow from 'meow';
import kleur from 'kleur';
import express from 'express';
import { getSchemaPath, getGenerators } from '@prisma/sdk';
import { getSchemaPath, getGenerators } from '@prisma/internals';
import { Server } from 'http';

const cli = meow(
Expand Down Expand Up @@ -81,7 +81,10 @@ async function execute<T extends meow.AnyFlags>(cli: meow.Result<T>) {
console.error(kleur.red('Unable to find schema.prisma file'));
process.exit(1);
}
const gens = await getGenerators({ schemaPath: schemaPath });
const gens = await getGenerators({
schemaPath: schemaPath,
dataProxy: false,
});
const docsGen = gens.find(
(gen) => gen.manifest?.prettyName === 'Prisma Docs Generator'
);
Expand Down
60 changes: 30 additions & 30 deletions src/tests/__snapshots__/model.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
exports[`model generator renders model directive html correctly 1`] = `
"
<tr>
<td class=\\"px-4 py-2 border\\">
<td class="px-4 py-2 border">
<strong>@@id</strong>
</td>
<td class=\\"px-4 py-2 border\\"> <ul>
<td class="px-4 py-2 border"> <ul>
<li>name</li><li>id</li>
</ul>
</td>
Expand All @@ -17,22 +17,22 @@ exports[`model generator renders model directive html correctly 1`] = `

exports[`model generator renders model field table row correctly 1`] = `
"
<tr id=\\"model-Post-title\\">
<td class=\\"px-4 py-2 border\\">
<tr id="model-Post-title">
<td class="px-4 py-2 border">
title
</td>
<td class=\\"px-4 py-2 border\\">
<td class="px-4 py-2 border">
String?
</td>
<td class=\\"px-4 py-2 border\\">
<td class="px-4 py-2 border">
<ul>
<li> - </li>
</ul>
</td>
<td class=\\"px-4 py-2 border\\">
<td class="px-4 py-2 border">
No
</td>
<td class=\\"px-4 py-2 border\\">
<td class="px-4 py-2 border">
-
</td>
</tr>
Expand All @@ -41,22 +41,22 @@ exports[`model generator renders model field table row correctly 1`] = `

exports[`model generator renders model field table row correctly 2`] = `
"
<tr id=\\"model-User-email\\">
<td class=\\"px-4 py-2 border\\">
<tr id="model-User-email">
<td class="px-4 py-2 border">
email
</td>
<td class=\\"px-4 py-2 border\\">
<td class="px-4 py-2 border">
String
</td>
<td class=\\"px-4 py-2 border\\">
<td class="px-4 py-2 border">
<ul>
<li> - </li>
</ul>
</td>
<td class=\\"px-4 py-2 border\\">
<td class="px-4 py-2 border">
<strong>Yes</strong>
</td>
<td class=\\"px-4 py-2 border\\">
<td class="px-4 py-2 border">
This is some docs
</td>
</tr>
Expand All @@ -65,41 +65,41 @@ exports[`model generator renders model field table row correctly 2`] = `

exports[`model generator renders model operation html correctly 1`] = `
"
<div class=\\"mt-4\\">
<h4 id=\\"model-User-findOne\\" class=\\"mb-2 text-lg font-bold\\">findOne</h4>
<div class="mt-4">
<h4 id="model-User-findOne" class="mb-2 text-lg font-bold">findOne</h4>
<p>Find zero or one user</p>
<div class=\\"mb-2\\">
<div class="mb-2">
<pre
class=\\"language-markup\\"
><code class=\\" language-javascript\\">Example usage</code></pre>
class="language-markup"
><code class=" language-javascript">Example usage</code></pre>
</div>
<h4 class=\\"text-lg mb-2\\">Input</h4>
<table class=\\"table-auto mb-2\\">
<h4 class="text-lg mb-2">Input</h4>
<table class="table-auto mb-2">
<thead>
<tr>
<th class=\\"px-4 py-2 border\\">Name</th>
<th class=\\"px-4 py-2 border\\">Type</th>
<th class=\\"px-4 py-2 border\\">Required</th>
<th class="px-4 py-2 border">Name</th>
<th class="px-4 py-2 border">Type</th>
<th class="px-4 py-2 border">Required</th>
</tr>
</thead>
<tbody>
<tr>
<td class=\\"px-4 py-2 border\\">
<td class="px-4 py-2 border">
where
</td>
<td class=\\"px-4 py-2 border\\">
<a href=\\"#type-inputType-UserWhereInput\\">UserWhereInput</a>
<td class="px-4 py-2 border">
<a href="#type-inputType-UserWhereInput">UserWhereInput</a>
</td>
<td class=\\"px-4 py-2 border\\">
<td class="px-4 py-2 border">
No
</td>
</tr>
</tbody>
</table>
<h4 class=\\"text-lg mb-2\\">Output</h4>
<div><strong>Type: </strong> <a href=\\"#type-outputType-User\\">User</a></div>
<h4 class="text-lg mb-2">Output</h4>
<div><strong>Type: </strong> <a href="#type-outputType-User">User</a></div>
<div><strong>Required: </strong>
Yes</div>
<div><strong>List: </strong>
Expand Down
Loading

0 comments on commit 4be1852

Please sign in to comment.