mirror of
https://github.com/tcgdex/compiler.git
synced 2025-04-22 10:42:09 +00:00
Marged some commits
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
f1f97054fc
commit
bfd0856a84
31
.drone.yml
31
.drone.yml
@ -3,50 +3,47 @@ name: default
|
||||
type: docker
|
||||
|
||||
steps:
|
||||
- name: submodules
|
||||
- name: Submodules
|
||||
image: alpine/git
|
||||
commands:
|
||||
- git submodule update --init --recursive
|
||||
- git submodule foreach git checkout master
|
||||
- git submodule foreach git pull origin master
|
||||
|
||||
- name: prepare
|
||||
- name: Prepare
|
||||
image: node:alpine
|
||||
commands:
|
||||
- apk -q add yarn
|
||||
- yarn
|
||||
# - yarn db:compile
|
||||
- yarn db:compile
|
||||
|
||||
- name: compile
|
||||
- name: Compile
|
||||
image: node:alpine
|
||||
commands:
|
||||
- apk -q add yarn
|
||||
# - yarn gen:all
|
||||
- yarn gen:all
|
||||
- CARDLANG=fr yarn gen:all
|
||||
|
||||
- name: push
|
||||
- name: Push
|
||||
image: alpine/git
|
||||
commands:
|
||||
- cd dist
|
||||
- git config --global user.email "$PUSH_EMAIL"
|
||||
- git config --global user.name "$PUSH_NAME"
|
||||
# - git add .
|
||||
# - git commit -m "Updated API"
|
||||
# - git push -u origin master
|
||||
- git add .
|
||||
- git commit -m "Updated API"
|
||||
- git push -u origin master
|
||||
environment:
|
||||
PUSH_EMAIL:
|
||||
from_secret: PUSH_EMAIL
|
||||
PUSH_NAME:
|
||||
from_secret: PUSH_NAME
|
||||
- name: upload
|
||||
image: alpine
|
||||
|
||||
- name: Upload
|
||||
image: node:alpine
|
||||
commands:
|
||||
- apk -q add openssh-client sshpass
|
||||
- mkdir -p ~/.ssh/
|
||||
- echo $KNOWN_HOST > ~/.ssh/known_host
|
||||
- ./upload.sh
|
||||
- node upload.js
|
||||
environment:
|
||||
KNOWN_HOST:
|
||||
from_secret: KNOWN_HOST
|
||||
UPLOAD_USERNAME:
|
||||
from_secret: UPLOAD_USERNAME
|
||||
UPLOAD_PASSWORD:
|
||||
|
2
db
2
db
@ -1 +1 @@
|
||||
Subproject commit a44b94c8543de57e0672a9f0f5d5b4783f37cca9
|
||||
Subproject commit 9f61871fe96e476831cb34ac0298eca580fcc23f
|
@ -23,7 +23,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@tcgdex/sdk": "next",
|
||||
"glob": "^7.1.6"
|
||||
"glob": "^7.1.6",
|
||||
"ssh2-sftp-client": "^5.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/glob": "^7.1.1",
|
||||
|
37
upload.js
Normal file
37
upload.js
Normal file
@ -0,0 +1,37 @@
|
||||
'use strict';
|
||||
|
||||
// Example of using the uploadDir() method to upload a directory
|
||||
// to a remote SFTP server
|
||||
|
||||
const path = require('path');
|
||||
const SftpClient = require('ssh2-sftp-client');
|
||||
|
||||
const config = {
|
||||
host: process.env.UPLOAD_REMOTE,
|
||||
username: process.env.UPLOAD_USERNAME,
|
||||
password: process.env.UPLOAD_PASSWORD ,
|
||||
port: 22
|
||||
};
|
||||
|
||||
async function main() {
|
||||
const client = new SftpClient();
|
||||
const src = path.join(__dirname, 'dist');
|
||||
const dst = process.env.UPLOAD_DIST;
|
||||
|
||||
try {
|
||||
await client.connect(config);
|
||||
client.on('upload', info => {
|
||||
console.log(`${info.source} => ${info.destination}`);
|
||||
});
|
||||
let rslt = await client.uploadDir(src, dst);
|
||||
return rslt;
|
||||
} finally {
|
||||
client.end();
|
||||
}
|
||||
}
|
||||
|
||||
main().then(msg => {
|
||||
console.log(msg);
|
||||
}).catch(err => {
|
||||
console.log(`main error: ${err.message}`);
|
||||
});
|
@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
sshpass -p $UPLOAD_PASSWORD sftp -vvv $UPLOAD_USERNAME@$UPLOAD_REMOTE <<EOF
|
||||
cd net/tcgdex/api
|
||||
put -r dist/*
|
||||
exit
|
||||
EOF
|
104
yarn.lock
104
yarn.lock
@ -2,7 +2,7 @@
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@tcgdex/sdk@^1.2.1":
|
||||
"@tcgdex/sdk@next":
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@tcgdex/sdk/-/sdk-1.2.1.tgz#c25f9b26ab632db935c6c11a50a75b8768c64ba2"
|
||||
integrity sha512-gzGvKzZoMx66QJ0z6fsXy1i8hKzVImHYRXwu5p996ERRA7XCg8zx0TA0soZ0XEP3azRdF74SR1pQ6zyqtRalIg==
|
||||
@ -38,11 +38,25 @@ arg@^4.1.0:
|
||||
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089"
|
||||
integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==
|
||||
|
||||
asn1@~0.2.0:
|
||||
version "0.2.4"
|
||||
resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136"
|
||||
integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==
|
||||
dependencies:
|
||||
safer-buffer "~2.1.0"
|
||||
|
||||
balanced-match@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
|
||||
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
|
||||
|
||||
bcrypt-pbkdf@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e"
|
||||
integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=
|
||||
dependencies:
|
||||
tweetnacl "^0.14.3"
|
||||
|
||||
brace-expansion@^1.1.7:
|
||||
version "1.1.11"
|
||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
||||
@ -61,6 +75,16 @@ concat-map@0.0.1:
|
||||
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
||||
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
|
||||
|
||||
concat-stream@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-2.0.0.tgz#414cf5af790a48c60ab9be4527d56d5e41133cb1"
|
||||
integrity sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==
|
||||
dependencies:
|
||||
buffer-from "^1.0.0"
|
||||
inherits "^2.0.3"
|
||||
readable-stream "^3.0.2"
|
||||
typedarray "^0.0.6"
|
||||
|
||||
diff@^4.0.1:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d"
|
||||
@ -91,7 +115,7 @@ inflight@^1.0.4:
|
||||
once "^1.3.0"
|
||||
wrappy "1"
|
||||
|
||||
inherits@2:
|
||||
inherits@2, inherits@^2.0.3:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||
@ -133,6 +157,30 @@ path-is-absolute@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
||||
integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
|
||||
|
||||
readable-stream@^3.0.2:
|
||||
version "3.6.0"
|
||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198"
|
||||
integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==
|
||||
dependencies:
|
||||
inherits "^2.0.3"
|
||||
string_decoder "^1.1.1"
|
||||
util-deprecate "^1.0.1"
|
||||
|
||||
retry@^0.12.0:
|
||||
version "0.12.0"
|
||||
resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b"
|
||||
integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=
|
||||
|
||||
safe-buffer@~5.2.0:
|
||||
version "5.2.0"
|
||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519"
|
||||
integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==
|
||||
|
||||
safer-buffer@~2.1.0:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
|
||||
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
||||
|
||||
source-map-support@^0.5.6:
|
||||
version "0.5.16"
|
||||
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042"
|
||||
@ -146,6 +194,43 @@ source-map@^0.6.0:
|
||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
||||
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
|
||||
|
||||
ssh2-sftp-client@^5.1.1:
|
||||
version "5.1.1"
|
||||
resolved "https://registry.yarnpkg.com/ssh2-sftp-client/-/ssh2-sftp-client-5.1.1.tgz#6fb349d56868a5adba84e1672583d86de98250f8"
|
||||
integrity sha512-IxdwcaipuWyLcGCZ/mIVsrZraSbWV5clmN5xSWPvjNDWrxmLp8lU+A56J9aeBkWhlO1mtgoN6m8xeyb93/U4Sg==
|
||||
dependencies:
|
||||
concat-stream "^2.0.0"
|
||||
retry "^0.12.0"
|
||||
ssh2 "^0.8.8"
|
||||
|
||||
ssh2-streams@~0.4.10:
|
||||
version "0.4.10"
|
||||
resolved "https://registry.yarnpkg.com/ssh2-streams/-/ssh2-streams-0.4.10.tgz#48ef7e8a0e39d8f2921c30521d56dacb31d23a34"
|
||||
integrity sha512-8pnlMjvnIZJvmTzUIIA5nT4jr2ZWNNVHwyXfMGdRJbug9TpI3kd99ffglgfSWqujVv/0gxwMsDn9j9RVst8yhQ==
|
||||
dependencies:
|
||||
asn1 "~0.2.0"
|
||||
bcrypt-pbkdf "^1.0.2"
|
||||
streamsearch "~0.1.2"
|
||||
|
||||
ssh2@^0.8.8:
|
||||
version "0.8.9"
|
||||
resolved "https://registry.yarnpkg.com/ssh2/-/ssh2-0.8.9.tgz#54da3a6c4ba3daf0d8477a538a481326091815f3"
|
||||
integrity sha512-GmoNPxWDMkVpMFa9LVVzQZHF6EW3WKmBwL+4/GeILf2hFmix5Isxm7Amamo8o7bHiU0tC+wXsGcUXOxp8ChPaw==
|
||||
dependencies:
|
||||
ssh2-streams "~0.4.10"
|
||||
|
||||
streamsearch@~0.1.2:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-0.1.2.tgz#808b9d0e56fc273d809ba57338e929919a1a9f1a"
|
||||
integrity sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo=
|
||||
|
||||
string_decoder@^1.1.1:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e"
|
||||
integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==
|
||||
dependencies:
|
||||
safe-buffer "~5.2.0"
|
||||
|
||||
ts-node@^8.6.2:
|
||||
version "8.6.2"
|
||||
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.6.2.tgz#7419a01391a818fbafa6f826a33c1a13e9464e35"
|
||||
@ -157,6 +242,16 @@ ts-node@^8.6.2:
|
||||
source-map-support "^0.5.6"
|
||||
yn "3.1.1"
|
||||
|
||||
tweetnacl@^0.14.3:
|
||||
version "0.14.5"
|
||||
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
|
||||
integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=
|
||||
|
||||
typedarray@^0.0.6:
|
||||
version "0.0.6"
|
||||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
|
||||
|
||||
typescript@^3.7.5:
|
||||
version "3.8.3"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061"
|
||||
@ -167,6 +262,11 @@ unfetch@^4.0.0:
|
||||
resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.1.0.tgz#6ec2dd0de887e58a4dee83a050ded80ffc4137db"
|
||||
integrity sha512-crP/n3eAPUJxZXM9T80/yv0YhkTEx2K1D3h7D1AJM6fzsWZrxdyRuLN0JH/dkZh1LNH8LxCnBzoPFCPbb2iGpg==
|
||||
|
||||
util-deprecate@^1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
||||
integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
|
||||
|
||||
wrappy@1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||
|
Loading…
x
Reference in New Issue
Block a user