Skip to content

Commit

Permalink
introduce platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed Jul 26, 2019
1 parent 25c7ee9 commit 50142ac
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 56 deletions.
3 changes: 3 additions & 0 deletions cli/prisma2/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
migration-engine
query-engine*
yarn-error.log
dist
build
Expand All @@ -11,3 +12,5 @@ photogen_prisma_ncc_build
examples
prisma-test-utils_ncc
tmp

prisma
12 changes: 6 additions & 6 deletions cli/prisma2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
"prisma2": "build/index.js"
},
"prisma": {
"version": "4f33077038a490e4b2c1c260f109309e4a447181"
"version": "789d98baeec978df37c4faa30d4aba715c230c4d"
},
"devDependencies": {
"@prisma/cli": "^0.0.36",
"@prisma/fetch-engine": "^0.0.40",
"@prisma/introspection": "0.0.43",
"@prisma/lift": "0.0.160",
"@prisma/photon": "^0.0.183",
"@prisma/cli": "^0.0.38",
"@prisma/fetch-engine": "^0.1.3",
"@prisma/introspection": "0.0.45",
"@prisma/lift": "0.1.0",
"@prisma/photon": "^0.1.1",
"@sentry/node": "5",
"@types/mocha": "^5.2.7",
"@zeit/ncc": "^0.18.5",
Expand Down
1 change: 1 addition & 0 deletions cli/prisma2/scripts/copy-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ mkdir -p runtime
mkdir -p nexus_prisma_ncc_build
mkdir -p prisma-test-utils_ncc
cp -R node_modules/@prisma/photon/runtime/* runtime
rm -rf runtime/prisma
cp -R node_modules/nexus-prisma/nexus_prisma_ncc_build/* nexus_prisma_ncc_build
# cp -R node_modules/prisma-test-utils/prisma-test-utils_ncc/* prisma-test-utils_ncc
cp node_modules/@prisma/lift/dist/GeneratorWorker.js build/GeneratorWorker.js
Expand Down
16 changes: 10 additions & 6 deletions cli/prisma2/scripts/download.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
const path = require('path')
const { ensureQueryEngineBinary, ensureMigrationBinary } = require('@prisma/fetch-engine')
const { download } = require('@prisma/fetch-engine')
const pkg = require('../package.json')

const runtimePath = eval(`path.join(__dirname, '../runtime')`)
const migrationBinaryPath = eval(`path.join(__dirname, '../')`)
const binaryPath = eval(`require('path').join(__dirname, '../')`)

const version = (pkg && pkg.prisma && pkg.prisma.version) || 'latest'

ensureQueryEngineBinary(runtimePath, version)
ensureMigrationBinary(migrationBinaryPath, version)
download({
binaries: {
'query-engine': binaryPath,
'migration-engine': binaryPath,
},
showProgress: true,
version,
})
2 changes: 1 addition & 1 deletion cli/prisma2/scripts/updateTag.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ async function main() {
fs.writeFileSync(path.join(__dirname, '../package.json'), JSON.stringify(pkg, null, 2))
}

// main()
main()
133 changes: 90 additions & 43 deletions cli/prisma2/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -308,31 +308,35 @@
resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b"
integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==

"@prisma/cli@0.0.36", "@prisma/cli@^0.0.36":
version "0.0.36"
resolved "https://registry.yarnpkg.com/@prisma/cli/-/cli-0.0.36.tgz#408ee1271b2666d3ab8061bca9f90dd85c62db45"
integrity sha512-Rd9Ts2kidwUr0TOZ3tlXmd4eLu04j5poE9SDQdOBISonhphH8M5zZAWhyS9FC6qLiSRp5aq24gnyEdM3BRGxwg==
"@prisma/cli@0.0.38", "@prisma/cli@^0.0.38":
version "0.0.38"
resolved "https://registry.yarnpkg.com/@prisma/cli/-/cli-0.0.38.tgz#2fd3d0310eb533025636e61b565ce459c9c69001"
integrity sha512-EdYJBrcpXzTf2CVRF03RxAVUATgEyLu7hhy1Yum4XJ0J2WNWZsl2fVaRBQJ8g1fcLgcgFrC266F8hC+kN/uscA==
dependencies:
arg "^4.1.0"
chalk "^2.4.2"
strip-indent "^3.0.0"

"@prisma/engine-core@0.0.69":
version "0.0.69"
resolved "https://registry.yarnpkg.com/@prisma/engine-core/-/engine-core-0.0.69.tgz#900260938c1afb675b187417db4fcd4a9ea3cfbe"
integrity sha512-6H9DXcovUjbSB4vLkBZ3tYDyteZv1b06sWT2hkvnjpH+mug89ci9uP91sexUjgkgfm5wFDRVXaEXmyA0GI6Jzw==
"@prisma/engine-core@0.0.71":
version "0.0.71"
resolved "https://registry.yarnpkg.com/@prisma/engine-core/-/engine-core-0.0.71.tgz#428c78f9b426b2700e915dfb6e2a4fabdbe68ae9"
integrity sha512-TLpVNQNEewVZQtwxWXOqSbNBP1/ckbFCgGvxDyteK4zvEDLRs3QNHp4u+BBqGjsJk3+PXTq5uIuj+GjH1ceG4Q==
dependencies:
"@prisma/cli" "^0.0.38"
"@prisma/get-platform" "^0.0.3"
chalk "^2.4.2"
cross-fetch "^3.0.2"
debug "^4.1.1"
deferral "2.0.4"
got "^9.6.0"
through2 "3.0.1"

"@prisma/fetch-engine@^0.0.40":
version "0.0.40"
resolved "https://registry.yarnpkg.com/@prisma/fetch-engine/-/fetch-engine-0.0.40.tgz#8c35767a2e8b771722f52a6059166457b1d1deec"
integrity sha512-R14CZgZ6Jlm57VgV8WMJIJ8I54G+iMGh8DAsPoD3CUPrptxb5Zydb67Q55AG1ePq5Ka4BDM8JS7adP5p2KC8SA==
"@prisma/fetch-engine@^0.1.3":
version "0.1.3"
resolved "https://registry.yarnpkg.com/@prisma/fetch-engine/-/fetch-engine-0.1.3.tgz#6599a1e1c872d0a0c41eccd304d0803feee77e74"
integrity sha512-r7YMTlqSyrBxnG2oMwm7brBUJHHXsHd/NX99yiM5+Rxtd3GgdCXfX0Kb2sc1o5OYHOuJ9inRe0kt9R4zpGlJtA==
dependencies:
"@prisma/get-platform" "^0.0.2"
chalk "^2.4.2"
death "^1.1.0"
debug "^4.1.1"
Expand All @@ -341,13 +345,28 @@
htmlparser2 "^3.10.1"
make-dir "^3.0.0"
node-fetch "^2.6.0"
p-map "^3.0.0"
p-retry "^4.1.0"
progress "^2.0.3"

"@prisma/introspection@0.0.43":
version "0.0.43"
resolved "https://registry.yarnpkg.com/@prisma/introspection/-/introspection-0.0.43.tgz#a0001d9f19501dcc0cc305f25c553df0271bd5cb"
integrity sha512-eDI/Ptiq3Ihl2wQ0BXeABjqz/dB24B2zQH/VOoBfAt5uPbrNrvEB2ZpAmRLLbwHCC3xnGoCH4rUiwruKgByQiw==
"@prisma/get-platform@^0.0.2":
version "0.0.2"
resolved "https://registry.yarnpkg.com/@prisma/get-platform/-/get-platform-0.0.2.tgz#06f252c84ea146c292b89d809a85e2d1a7b2a924"
integrity sha512-3+dCuVnKWnlV5Kc57K75i/GTTG/N27cHGBg+4lSg8GK2TaF1Em2/vA63/7DpIMScHjRyvZjoJ9G7B1oy/xndoQ==
dependencies:
debug "^4.1.1"

"@prisma/get-platform@^0.0.3":
version "0.0.3"
resolved "https://registry.yarnpkg.com/@prisma/get-platform/-/get-platform-0.0.3.tgz#4c2a24f58cbc2a21d853272551b3e792d134e033"
integrity sha512-Juwu8g0X7JUvvIJG2w639xUYBrI8Lz0GudaoUj9SSaCqeB4GCjIDZI5QjV02xEt2niuHoGf5K8UZvoP0FhzD5A==
dependencies:
debug "^4.1.1"

"@prisma/introspection@0.0.45":
version "0.0.45"
resolved "https://registry.yarnpkg.com/@prisma/introspection/-/introspection-0.0.45.tgz#8fb9c998c6a5fb4d3379004f24312f7dc38b74ad"
integrity sha512-IjwFxbNP1FqW97meUiNE+ONqYOBdF225DTZZeW3xyAkaxpNZAU/4wNkJESNzk64ZgP/iTQqWr3QrjHWcrHo0gA==
dependencies:
ajv "^6.10.0"
chalk "^2.4.2"
Expand All @@ -370,13 +389,14 @@
tar "^4.4.10"
tmp "^0.1.0"

"@prisma/lift@0.0.160":
version "0.0.160"
resolved "https://registry.yarnpkg.com/@prisma/lift/-/lift-0.0.160.tgz#d83477b93e08abb01b636e85121eb637542f3da2"
integrity sha512-jiqnRwhIMnKloTg+ZJrXSNaM+J7e91fTZpPXcmJ6uoTdfksoFoi+AOVQwVsO+zLKVGNwSjot5sUgrdfnXAiOqA==
"@prisma/lift@0.1.0":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@prisma/lift/-/lift-0.1.0.tgz#4a5bb24c63ed0bc9ba0360c178a0176972a46116"
integrity sha512-9zfGYXFzeeVfkIsS9A5T/AmDJoCVO1uo84/MnPJlh4WMdum9Hps4g06R3SFmD7FnVwcMDizZS9asopBtxBuLhw==
dependencies:
"@prisma/fetch-engine" "^0.0.40"
"@prisma/studio-server" "^0.22.0"
"@prisma/fetch-engine" "^0.1.3"
"@prisma/get-platform" "^0.0.2"
"@prisma/studio-server" "^0.31.0"
"@types/execa" "^0.9.0"
arg "^4.1.0"
array-flat-polyfill "^1.0.1"
Expand Down Expand Up @@ -418,15 +438,15 @@
dependencies:
tslib "^1.9.3"

"@prisma/photon@^0.0.183":
version "0.0.183"
resolved "https://registry.yarnpkg.com/@prisma/photon/-/photon-0.0.183.tgz#e64257ce9bd5a74194025a717679ef8ec73d15d3"
integrity sha512-k+18GXmkKczfymm/fGhuQwCKTIjf0bPgprDefwLtx9yNJu5pXPktuKj0vtSkRz0NbUdB2w1+QzgsqXP5Y9AuJQ==
"@prisma/photon@^0.1.1":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@prisma/photon/-/photon-0.1.1.tgz#b5d0437f115174870b8f243a96d9baf2164760c8"
integrity sha512-1fnp1s8yMJ+HWE5//ZDRsj5CcXj+bYOOfb0ZcKqCA98/BLywhQrN+CQ7Uy49AWDL6q67luFKCk5S3+VC+FbIJA==
dependencies:
"@apexearth/copy" "^1.4.2"
"@prisma/cli" "0.0.36"
"@prisma/engine-core" "0.0.69"
"@prisma/fetch-engine" "^0.0.40"
"@prisma/cli" "0.0.38"
"@prisma/engine-core" "0.0.71"
"@prisma/fetch-engine" "^0.1.3"
chalk "^2.4.2"
cpy "^7.3.0"
dotenv "^8.0.0"
Expand All @@ -446,25 +466,27 @@
terminal-link "^1.3.0"
wtfnode "0.8.0"

"@prisma/studio-server@^0.22.0":
version "0.22.0"
resolved "https://registry.yarnpkg.com/@prisma/studio-server/-/studio-server-0.22.0.tgz#70919d11ae35da7210d9b693302d100530ad22a3"
integrity sha512-1qNmwKaEzCbwwZMS2qAv3Gi7ZWjBb3SXjvGtERlWFaVpx7LnI7i2rcynxmYxbQEYhiRctSB+k2RlArgnXcpdNA==
"@prisma/studio-server@^0.31.0":
version "0.31.0"
resolved "https://registry.yarnpkg.com/@prisma/studio-server/-/studio-server-0.31.0.tgz#7cd5eb08087b9bee49a2c84a99e09092de2b9e05"
integrity sha512-y2OKq3Qlwr4qQtrFB9U3HT56HxEXMedZfyB8gKaPX1zKukGf4e3nL06PmHtgyzTGYQTw420RnPB4a1m02vnJSA==
dependencies:
"@prisma/studio" "^0.22.0"
"@prisma/studio-transports" "^0.22.0"
"@prisma/studio" "^0.31.0"
"@prisma/studio-transports" "^0.31.0"
express "^4.17.1"
express-ws "^4.0.0"

"@prisma/studio-transports@^0.22.0":
version "0.22.0"
resolved "https://registry.yarnpkg.com/@prisma/studio-transports/-/studio-transports-0.22.0.tgz#2fc9b89ecb1159c6958a6e1f3130b39b6f077872"
integrity sha512-CENECvPVMN6pNt3VIlW9rfeMY5gBO9GFYZAZch6jFehdmlADijYvdZFfKco5gsrs38Zxm32ltJ47ldmv3l+Fuw==
"@prisma/studio-transports@^0.31.0":
version "0.31.0"
resolved "https://registry.yarnpkg.com/@prisma/studio-transports/-/studio-transports-0.31.0.tgz#d0c4dbb3fec43a23cb899a1e5fbf25aad256fc21"
integrity sha512-+1VCynyaNGmkwc1jyhj9fJnXsQ0p1nIPcMCATr0ivv2jtsdpXRYbM2s2yOb2wrwZgr63fp44PifW7WLbyvvb7Q==
dependencies:
strip-ansi "^5.2.0"

"@prisma/studio@^0.22.0":
version "0.22.0"
resolved "https://registry.yarnpkg.com/@prisma/studio/-/studio-0.22.0.tgz#973f9dd57ee503f109ba82c993e1a84da191e13a"
integrity sha512-VrVdCCM8WuVwKfR8x8QP3Dk3y5/eYzg5yyzI8FrcawVVDILKtyY4Wasw8sp2uUihT5L6Yps98xjL97eZnHLffw==
"@prisma/studio@^0.31.0":
version "0.31.0"
resolved "https://registry.yarnpkg.com/@prisma/studio/-/studio-0.31.0.tgz#c1843ae1e375cba507875e4876aaf0f94cd45195"
integrity sha512-KDuHkT+DjkpAg/4lNEpYrkwMQVdgwjB94FQy9gGeUNFPDRh8I4D5NYTcqlqz7ZqNRP9siZ4mnFwO83trsiuhWQ==

"@sentry/core@5.5.0":
version "5.5.0"
Expand Down Expand Up @@ -760,6 +782,14 @@ agent-base@4, agent-base@^4.1.0, agent-base@^4.3.0:
dependencies:
es6-promisify "^5.0.0"

aggregate-error@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.0.0.tgz#5b5a3c95e9095f311c9ab16c19fb4f3527cd3f79"
integrity sha512-yKD9kEoJIR+2IFqhMwayIBgheLYbB3PS2OBhWae1L/ODTd/JF/30cW0bc9TqzRL3k4U41Dieu3BF4I29p8xesA==
dependencies:
clean-stack "^2.0.0"
indent-string "^3.2.0"

ajv@5:
version "5.5.2"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965"
Expand Down Expand Up @@ -1218,6 +1248,11 @@ class-utils@^0.3.5:
isobject "^3.0.0"
static-extend "^0.1.1"

clean-stack@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.1.0.tgz#9e7fec7f3f8340a2ab4f127c80273085e8fbbdd0"
integrity sha512-uQWrpRm+iZZUCAp7ZZJQbd4Za9I3AjR/3YTjmcnAtkauaIm/T5CT6U8zVI6e60T6OANqBFAzuR9/HB3NzuZCRA==

cli-cursor@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5"
Expand Down Expand Up @@ -2611,6 +2646,11 @@ imurmurhash@^0.1.4:
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=

indent-string@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289"
integrity sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=

indent-string@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251"
Expand Down Expand Up @@ -4386,6 +4426,13 @@ p-map@^2.0.0, p-map@^2.1.0:
resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175"
integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==

p-map@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/p-map/-/p-map-3.0.0.tgz#d704d9af8a2ba684e2600d9a215983d4141a979d"
integrity sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==
dependencies:
aggregate-error "^3.0.0"

p-reduce@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa"
Expand Down

0 comments on commit 50142ac

Please sign in to comment.