Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed Aug 22, 2019
1 parent dafb311 commit 588e4d9
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 36 deletions.
6 changes: 3 additions & 3 deletions cli/introspection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"types": "dist/index.d.ts",
"license": "Apache-2.0",
"devDependencies": {
"@prisma/cli": "^0.0.46",
"@prisma/lift": "^0.2.3",
"@prisma/photon": "^0.2.4",
"@prisma/cli": "^0.0.47",
"@prisma/lift": "^0.2.5",
"@prisma/photon": "^0.2.8",
"@types/dotenv": "^6.1.1",
"@types/figures": "^3.0.1",
"@types/fs-extra": "^7.0.0",
Expand Down
10 changes: 6 additions & 4 deletions cli/introspection/src/introspect/util.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Env } from '@prisma/cli'
import { DataSource } from '@prisma/lift'
import { isdlToDatamodel2, getConfig } from '@prisma/photon'
import { isdlToDatamodel2, getConfig, DataSource } from '@prisma/photon'
import chalk from 'chalk'
import { existsSync, readFileSync } from 'fs'
import { MongoClient } from 'mongodb'
Expand Down Expand Up @@ -81,7 +80,10 @@ export async function introspect({
name: 'db',
config: {},
connectorType: databaseTypeToConnectorType(credentials.type),
url: credentialsToUri(credentials),
url: {
value: credentialsToUri(credentials),
fromEnvVar: null,
},
},
]

Expand Down Expand Up @@ -158,7 +160,7 @@ export async function getCredentialsFromExistingDatamodel(env: Env): Promise<und
)
}
if (datasources && datasources.length > 0) {
const uri = datasources[0].url
const uri = datasources[0].url.value
return uriToCredentials(uri)
}
}
Expand Down
56 changes: 28 additions & 28 deletions cli/introspection/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,10 @@
resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b"
integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==

"@prisma/cli@0.0.46", "@prisma/cli@^0.0.46":
version "0.0.46"
resolved "https://registry.yarnpkg.com/@prisma/cli/-/cli-0.0.46.tgz#dcf77887ba1840729e4c7c0d01c1fbed8c179064"
integrity sha512-OrymhOayv9joMbdXJdvQCOtZoYBG0UpNo8eTTUOpBMvWwDmWV+30DxLbrIWQylacS2LQDkapcm4no4fu3rUWGQ==
"@prisma/cli@0.0.47", "@prisma/cli@^0.0.47":
version "0.0.47"
resolved "https://registry.yarnpkg.com/@prisma/cli/-/cli-0.0.47.tgz#802d000fd03e0f3fca525888438a10f9051cc239"
integrity sha512-s1lnFS5hQEQDY7/GJS5r56XF4evHw5/ARas95WvtBaiRIw2d95YhA8+FE4C1UthyWubGkckHOHuSUOA7nHWdWQ==
dependencies:
arg "^4.1.0"
chalk "^2.4.2"
Expand Down Expand Up @@ -372,14 +372,14 @@
dependencies:
debug "^4.1.1"

"@prisma/lift@^0.2.3":
version "0.2.3"
resolved "https://registry.yarnpkg.com/@prisma/lift/-/lift-0.2.3.tgz#4ba45146628b44e6d737993716f66c49a82023f7"
integrity sha512-m0YzyT3ivImMvlm2vILRON6w83tFmI8m+ULQ7znEh4OpTSuSxPpJB6257rrL2ZMGoGNtMWvBZe50Sb1ltWeSow==
"@prisma/lift@^0.2.5":
version "0.2.5"
resolved "https://registry.yarnpkg.com/@prisma/lift/-/lift-0.2.5.tgz#1cbb500a786dfa680db17692230065750bc2dcad"
integrity sha512-MmSF5DzNFmVGTwaMlvuKG4lFOkUwz7lPxy0iSnL8Wq1YjU03Vc4zj25BYhhDLm3UATVwqWD1XSSdznWgBqTmnw==
dependencies:
"@prisma/fetch-engine" "^0.1.3"
"@prisma/get-platform" "^0.0.3"
"@prisma/studio-server" "^0.63.0"
"@prisma/studio-server" "^0.64.0"
"@types/execa" "^0.9.0"
arg "^4.1.0"
array-flat-polyfill "^1.0.1"
Expand Down Expand Up @@ -413,13 +413,13 @@
strip-indent "^3.0.0"
supports-hyperlinks "^1.0.1"

"@prisma/photon@^0.2.4":
version "0.2.4"
resolved "https://registry.yarnpkg.com/@prisma/photon/-/photon-0.2.4.tgz#dc048b2e68e363cad721d7de051cda6e8114764d"
integrity sha512-SOi7Ci/DzKLwYtKK6bNRyKsz6qQO8bz6uu7eqoF8mAi/1hsvSaYhcT6DCfZ9slaXOZ9MQBYw9OQ6uEzCMFqM6Q==
"@prisma/photon@^0.2.8":
version "0.2.8"
resolved "https://registry.yarnpkg.com/@prisma/photon/-/photon-0.2.8.tgz#490485f872517404bf227afc8460525061ccd42b"
integrity sha512-cdydif6Ob04ylFyVK1NRSozrKCni43aNDFbuQK34hNXTf8YRwui3WQ7lIpTfU4EUwIuvRFH/rm96u0ipxy22FQ==
dependencies:
"@apexearth/copy" "^1.4.2"
"@prisma/cli" "0.0.46"
"@prisma/cli" "0.0.47"
"@prisma/engine-core" "0.0.84"
"@prisma/fetch-engine" "^0.1.6"
chalk "^2.4.2"
Expand All @@ -444,27 +444,27 @@
terminal-link "^1.3.0"
wtfnode "0.8.0"

"@prisma/studio-server@^0.63.0":
version "0.63.0"
resolved "https://registry.yarnpkg.com/@prisma/studio-server/-/studio-server-0.63.0.tgz#eccfa83c26a9d0746330c6f020790f063a2a921a"
integrity sha512-lrweZlYgN32wIsS4tNLQGHAbz4Bf/vVKR8pMaCfKo3FhuNaRgTSyTBhck1/R69EyR4e3R/jfPQKk7SSZJBB4OQ==
"@prisma/studio-server@^0.64.0":
version "0.64.0"
resolved "https://registry.yarnpkg.com/@prisma/studio-server/-/studio-server-0.64.0.tgz#c68aba420a9946f7cdc07c081078967ff12b379c"
integrity sha512-C7OezywE0HK0BHhsyMB186bNC454GmS9cif9CzP7DhMSn+QdPE9Ia7ZZmJPQXbpl6RhNpVXF3jU2V+OydyTqhg==
dependencies:
"@prisma/studio" "0.63.0"
"@prisma/studio-transports" "0.63.0"
"@prisma/studio" "0.64.0"
"@prisma/studio-transports" "0.64.0"
express "^4.17.1"
express-ws "^4.0.0"

"@prisma/studio-transports@0.63.0":
version "0.63.0"
resolved "https://registry.yarnpkg.com/@prisma/studio-transports/-/studio-transports-0.63.0.tgz#92023f5aa2c3c7297d2b610bc4da026a03fb94ca"
integrity sha512-zdLdRQFkriaqLNXIi49oHsFGhPyVE2R4GI0PZx/NaYgaxrXv8RAF7szE7D/Gzpz35sfIaypZC+l5J0VehiWvzQ==
"@prisma/studio-transports@0.64.0":
version "0.64.0"
resolved "https://registry.yarnpkg.com/@prisma/studio-transports/-/studio-transports-0.64.0.tgz#280679ab888842782b49289c1d0ba64875f7ea10"
integrity sha512-OAO4Wk/bExHYfK1I7zRk1F5L2/yy5msOodXbGLD8n/Q4b8+hjCp/o1osRjL38NPtU1RaSTjeSZzIRI5Rgl8tdg==
dependencies:
strip-ansi "^5.2.0"

"@prisma/studio@0.63.0":
version "0.63.0"
resolved "https://registry.yarnpkg.com/@prisma/studio/-/studio-0.63.0.tgz#b19c5fb8c5ae8c67e25e1104d410577cf8c1c730"
integrity sha512-aH7SbSyTQk6sC2CO6fuI2uxegfg0pZTYs0EJ390UMELVp36x9uSdWOvSuXjBAaHC6ZX4kfju7Bp7tOmRsVj1nA==
"@prisma/studio@0.64.0":
version "0.64.0"
resolved "https://registry.yarnpkg.com/@prisma/studio/-/studio-0.64.0.tgz#40aff0abfe96f2884be3165eacfd1971e3ddf40a"
integrity sha512-qU7LMo2q00Ef08nNFhb8JXHyFkh7Hd4hAixNy79fXPmT0leq9A5beOziKjpDjR4XkyIBpZSBoUIyAiR9c6DXEg==

"@sindresorhus/is@^0.14.0":
version "0.14.0"
Expand Down
5 changes: 4 additions & 1 deletion cli/prisma2/src/__tests__/integrate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ async function generate(isdl: ISDL) {
{
name: 'pg',
connectorType: 'postgresql',
url: `${host}?schema=public`,
url: {
value: `${host}?schema=public`,
fromEnvVar: null,
},
config: {},
},
])
Expand Down

0 comments on commit 588e4d9

Please sign in to comment.