Skip to content

Commit

Permalink
Merge branch 'master' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
Wojciech Krysiak authored and Wojciech Krysiak committed Sep 15, 2020
2 parents cae3b84 + c68e88b commit 0718b3f
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 76 deletions.
2 changes: 1 addition & 1 deletion example-app/models/index.js
Expand Up @@ -20,7 +20,7 @@ fs
.readdirSync(__dirname)
.filter(file => (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js'))
.forEach((file) => {
const model = sequelize.import(path.join(__dirname, file))
const model = require(path.join(__dirname, file))(sequelize, Sequelize.DataTypes)
db[model.name] = model
})

Expand Down
12 changes: 6 additions & 6 deletions example-app/package.json
Expand Up @@ -16,13 +16,13 @@
"@admin-bro/design-system": "^1.3.2",
"@types/sequelize": "^4.28.8",
"nodemon": "^2.0.2",
"sequelize-cli": "^5.5.1"
"sequelize-cli": "^6.2.0"
},
"dependencies": {
"admin-bro": "^3.2.2",
"@admin-bro/express": "^3.0.0-beta.3",
"@admin-bro/mongoose": "^1.0.0-beta.3",
"@admin-bro/sequelize": "^1.0.0-beta.2",
"admin-bro": "latest",
"@admin-bro/express": "latest",
"@admin-bro/mongoose": "latest",
"@admin-bro/sequelize": "latest",
"argon2": "^0.26.2",
"connect-mongo": "^3.2.0",
"cypress": "^4.4.1",
Expand All @@ -32,6 +32,6 @@
"express-session": "^1.17.0",
"mongoose": "^5.9.7",
"pg": "^8.0.3",
"sequelize": "^5.21.7"
"sequelize": "^6.3.5"
}
}
130 changes: 62 additions & 68 deletions example-app/yarn.lock
Expand Up @@ -24,24 +24,24 @@
react-datepicker "^3.1.3"
styled-system "^5.1.4"

"@admin-bro/express@^3.0.0-beta.3":
version "3.0.0-beta.3"
resolved "https://registry.yarnpkg.com/@admin-bro/express/-/express-3.0.0-beta.3.tgz#61fe45945712781a50c1092c926b5fe5a7bd3f71"
integrity sha512-ePTC8mFWN1RVSVGn30JxwPZR5v0vH+X/O+bvOURKwHEoIA0x/Ajy7Q/nkfJPVFkO8epi/uEAubpu8LYgAUMRaQ==
"@admin-bro/express@latest":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@admin-bro/express/-/express-3.0.0.tgz#0ac581bbd4511d8854d07409b980e0fff3d9d8e0"
integrity sha512-Ya/a3F/JT//VanaIjlVBeU6gh1afwcjU/q9qhMcETKwy3M+QbVhfmLdOyD1mFqVxwifnkiGnC6gPkupb51C9Pg==

"@admin-bro/mongoose@^1.0.0-beta.3":
version "1.0.0-beta.3"
resolved "https://registry.yarnpkg.com/@admin-bro/mongoose/-/mongoose-1.0.0-beta.3.tgz#2c86b953b186d6490f6d40b7b18775834630c684"
integrity sha512-bPdJRIHszwBNmBu5cH6Dl+tN9Fq8dPAbKmw1chbf49csdhGem2lIxLFqlbwA+kF1r98o9Hk4kYHekaOJBnUdrw==
"@admin-bro/mongoose@latest":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@admin-bro/mongoose/-/mongoose-1.0.0.tgz#4cdfbba15d0bc67d081235887f8c92ef210498e0"
integrity sha512-U85x7Rc8ApadNRFQHQLZkGcDP+f6WFhYJheCMISDzaMHQ+/hSp8eFWQd/2Y/RBvfDwHuzZLqBQkFVazSXUWGCQ==
dependencies:
escape-regexp "0.0.1"
flat "^4.1.0"
lodash "^4.17.11"

"@admin-bro/sequelize@^1.0.0-beta.2":
version "1.0.0-beta.2"
resolved "https://registry.yarnpkg.com/@admin-bro/sequelize/-/sequelize-1.0.0-beta.2.tgz#6d136e3d9ebbb74a7223f49e2691236f3ae6e4f8"
integrity sha512-c4HaD94lajCcICwHgo/Kw8ikR65r6A/DIEH+ud5UG1/rinjI3Hm6cM5ltOKmG40vPE9IamNLiXgeGvD6aGfGSA==
"@admin-bro/sequelize@latest":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@admin-bro/sequelize/-/sequelize-1.1.0.tgz#ddd9556a64b04a487bedc98424456afe3a7fe387"
integrity sha512-uCJI7Slm4zjQWxF+Ey/317SJ6QbNi24+VOx/tGq39id9x2oxs6ofkWdTwisntzngRxLWd6FR0u311bODi4LWJg==
dependencies:
escape-regexp "0.0.1"
flat "^5.0.0"
Expand Down Expand Up @@ -1465,10 +1465,10 @@ accepts@~1.3.7:
mime-types "~2.1.24"
negotiator "0.6.2"

admin-bro@^3.2.2:
version "3.2.2"
resolved "https://registry.yarnpkg.com/admin-bro/-/admin-bro-3.2.2.tgz#b7a35f702211e5c8a541419283fbf049cfc91a37"
integrity sha512-GHg/UCoTgtn7T9z2641XJ4MOtkb0wg/kTFM4KJevW4PSEHfljCei7sI8qKxXw8xXEcwDXEisQu/GEYZaNvkoWA==
admin-bro@latest:
version "3.2.4"
resolved "https://registry.yarnpkg.com/admin-bro/-/admin-bro-3.2.4.tgz#48a77012ffd438896af04f062d292840973d665b"
integrity sha512-Ob5uROea93vqM5cZcIa/cAKQhptgw/TDhDQ1KZpbYEwHcu+H1PxjCuKBRUrC1cdLfPjunaqbFz/rLGDtEl7BqA==
dependencies:
"@admin-bro/design-system" "^1.3.3"
"@babel/core" "^7.10.2"
Expand Down Expand Up @@ -1737,7 +1737,7 @@ bluebird@3.5.1:
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9"
integrity sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==

bluebird@3.7.2, bluebird@^3.5.0, bluebird@^3.5.3, bluebird@^3.7.2:
bluebird@3.7.2, bluebird@^3.7.2:
version "3.7.2"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
Expand Down Expand Up @@ -2030,14 +2030,6 @@ clone@^1.0.2:
resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e"
integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4=

cls-bluebird@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/cls-bluebird/-/cls-bluebird-2.1.0.tgz#37ef1e080a8ffb55c2f4164f536f1919e7968aee"
integrity sha1-N+8eCAqP+1XC9BZPU28ZGeeWiu4=
dependencies:
is-bluebird "^1.0.2"
shimmer "^1.1.0"

code-point-at@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
Expand Down Expand Up @@ -3293,11 +3285,6 @@ is-binary-path@~2.1.0:
dependencies:
binary-extensions "^2.0.0"

is-bluebird@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-bluebird/-/is-bluebird-1.0.2.tgz#096439060f4aa411abee19143a84d6a55346d6e2"
integrity sha1-CWQ5Bg9KpBGr7hkUOoTWpVNG1uI=

is-buffer@~2.0.3, is-buffer@~2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623"
Expand Down Expand Up @@ -3879,10 +3866,10 @@ mkdirp@~1.0.3:
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==

moment-timezone@^0.5.21:
version "0.5.28"
resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.28.tgz#f093d789d091ed7b055d82aa81a82467f72e4338"
integrity sha512-TDJkZvAyKIVWg5EtVqRzU97w0Rb0YVbfpqyjgu6GwXCAohVRqwZjf4fOzDE6p1Ch98Sro/8hQQi65WDXW5STPw==
moment-timezone@^0.5.31:
version "0.5.31"
resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.31.tgz#9c40d8c5026f0c7ab46eda3d63e49c155148de05"
integrity sha512-+GgHNg8xRhMXfEbv81iDtrVeTcWt0kWmTEY1XQK14dICTXnWJnT0dxdlPspwqF3keKMVPXwayEsk1DI0AA/jdA==
dependencies:
moment ">= 2.9.0"

Expand All @@ -3891,11 +3878,16 @@ moment@2.24.0:
resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b"
integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==

"moment@>= 2.9.0", moment@^2.24.0:
"moment@>= 2.9.0":
version "2.25.1"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.25.1.tgz#1cb546dca1eccdd607c9324747842200b683465d"
integrity sha512-nRKMf9wDS4Fkyd0C9LXh2FFXinD+iwbJ5p/lh3CHitW9kZbRbJ8hCruiadiIXZVbeAqKZzqcTvHnK3mRhFjb6w==

moment@^2.26.0:
version "2.27.0"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.27.0.tgz#8bff4e3e26a236220dfe3e36de756b6ebaa0105d"
integrity sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ==

mongodb@3.5.6, mongodb@^3.1.0:
version "3.5.6"
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.5.6.tgz#a1be2d9796c8a8a5b0e6bcbc6baaaa406bd5c0d5"
Expand Down Expand Up @@ -5119,6 +5111,11 @@ semver@^6.0.0, semver@^6.2.0, semver@^6.3.0:
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==

semver@^7.3.2:
version "7.3.2"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938"
integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==

send@0.17.1:
version "0.17.1"
resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8"
Expand All @@ -5138,45 +5135,42 @@ send@0.17.1:
range-parser "~1.2.1"
statuses "~1.5.0"

sequelize-cli@^5.5.1:
version "5.5.1"
resolved "https://registry.yarnpkg.com/sequelize-cli/-/sequelize-cli-5.5.1.tgz#0b9c2fc04d082cc8ae0a8fe270b96bb606152bab"
integrity sha512-ZM4kUZvY3y14y+Rq3cYxGH7YDJz11jWHcN2p2x7rhAIemouu4CEXr5ebw30lzTBtyXV4j2kTO+nUjZOqzG7k+Q==
sequelize-cli@^6.2.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/sequelize-cli/-/sequelize-cli-6.2.0.tgz#fd02bfeae23b8226872f9947f3f8212cc49a4771"
integrity sha512-6WQ2x91hg30dUn66mXHnzvHATZ4pyI1GHSNbS/TNN/vRR4BLRSLijadeMgC8zqmKDsL0VqzVVopJWfJakuP++Q==
dependencies:
bluebird "^3.5.3"
cli-color "^1.4.0"
fs-extra "^7.0.1"
js-beautify "^1.8.8"
lodash "^4.17.5"
resolve "^1.5.0"
umzug "^2.1.0"
umzug "^2.3.0"
yargs "^13.1.0"

sequelize-pool@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/sequelize-pool/-/sequelize-pool-2.3.0.tgz#64f1fe8744228172c474f530604b6133be64993d"
integrity sha512-Ibz08vnXvkZ8LJTiUOxRcj1Ckdn7qafNZ2t59jYHMX1VIebTAOYefWdRYFt6z6+hy52WGthAHAoLc9hvk3onqA==
sequelize-pool@^6.0.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/sequelize-pool/-/sequelize-pool-6.1.0.tgz#caaa0c1e324d3c2c3a399fed2c7998970925d668"
integrity sha512-4YwEw3ZgK/tY/so+GfnSgXkdwIJJ1I32uZJztIEgZeAO6HMgj64OzySbWLgxj+tXhZCJnzRfkY9gINw8Ft8ZMg==

sequelize@^5.21.7:
version "5.21.7"
resolved "https://registry.yarnpkg.com/sequelize/-/sequelize-5.21.7.tgz#ea0ef177d7d6228b1c3b6efdac2db31e05e3441a"
integrity sha512-+JrS5Co7CN53cOFFFaUb+xqQP00wD1Ag9xGLBLoUko2KhRZxjm+UDkqAVPHTUp87McLwJaCPkKv61GPhBVloRQ==
sequelize@^6.3.5:
version "6.3.5"
resolved "https://registry.yarnpkg.com/sequelize/-/sequelize-6.3.5.tgz#80e3db7ac8b76d98c45ca93334197eb6e2335158"
integrity sha512-MiwiPkYSA8NWttRKAXdU9h0TxP6HAc1fl7qZmMO/VQqQOND83G4nZLXd0kWILtAoT9cxtZgFqeb/MPYgEeXwsw==
dependencies:
bluebird "^3.5.0"
cls-bluebird "^2.1.0"
debug "^4.1.1"
dottie "^2.0.0"
inflection "1.12.0"
lodash "^4.17.15"
moment "^2.24.0"
moment-timezone "^0.5.21"
moment "^2.26.0"
moment-timezone "^0.5.31"
retry-as-promised "^3.2.0"
semver "^6.3.0"
sequelize-pool "^2.3.0"
semver "^7.3.2"
sequelize-pool "^6.0.0"
toposort-class "^1.0.1"
uuid "^3.3.3"
uuid "^8.1.0"
validator "^10.11.0"
wkx "^0.4.8"
wkx "^0.5.0"

serialize-javascript@^3.0.0:
version "3.1.0"
Expand Down Expand Up @@ -5222,11 +5216,6 @@ shebang-regex@^1.0.0:
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=

shimmer@^1.1.0:
version "1.2.1"
resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337"
integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==

sift@7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/sift/-/sift-7.0.1.tgz#47d62c50b159d316f1372f8b53f9c10cd21a4b08"
Expand Down Expand Up @@ -5677,7 +5666,7 @@ uid-safe@~2.1.5:
dependencies:
random-bytes "~1.0.0"

umzug@^2.1.0:
umzug@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/umzug/-/umzug-2.3.0.tgz#0ef42b62df54e216b05dcaf627830a6a8b84a184"
integrity sha512-Z274K+e8goZK8QJxmbRPhl89HPO1K+ORFtm6rySPhFKfKc5GHhqdzD0SGhSWHkzoXasqJuItdhorSvY7/Cgflw==
Expand Down Expand Up @@ -5787,11 +5776,16 @@ utils-merge@1.0.1:
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=

uuid@^3.3.2, uuid@^3.3.3:
uuid@^3.3.2:
version "3.4.0"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==

uuid@^8.1.0:
version "8.3.0"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.0.tgz#ab738085ca22dc9a8c92725e459b1d507df5d6ea"
integrity sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==

validator@^10.11.0:
version "10.11.0"
resolved "https://registry.yarnpkg.com/validator/-/validator-10.11.0.tgz#003108ea6e9a9874d31ccc9e5006856ccd76b228"
Expand Down Expand Up @@ -5861,10 +5855,10 @@ widest-line@^3.1.0:
dependencies:
string-width "^4.0.0"

wkx@^0.4.8:
version "0.4.8"
resolved "https://registry.yarnpkg.com/wkx/-/wkx-0.4.8.tgz#a092cf088d112683fdc7182fd31493b2c5820003"
integrity sha512-ikPXMM9IR/gy/LwiOSqWlSL3X/J5uk9EO2hHNRXS41eTLXaUFEVw9fn/593jW/tE5tedNg8YjT5HkCa4FqQZyQ==
wkx@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/wkx/-/wkx-0.5.0.tgz#c6c37019acf40e517cc6b94657a25a3d4aa33e8c"
integrity sha512-Xng/d4Ichh8uN4l0FToV/258EjMGU9MGcA0HV2d9B/ZpZB3lqQm7nkOdZdm5GhKtLLhAE7PiVQwN4eN+2YJJUg==
dependencies:
"@types/node" "*"

Expand Down
1 change: 1 addition & 0 deletions index.d.ts
Expand Up @@ -9,6 +9,7 @@ export * from '@admin-bro/design-system'
export * from './types/src/frontend/store/store'
export * from './types/src/backend/utils/build-feature'
export * from './types/src/backend/utils/layout-element-parser'
export * from './types/src/backend/utils/uploaded-file.type'
export * from './types/src/frontend/utils/overridable-component'

export { default as Router } from './types/src/backend/router'
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "admin-bro",
"version": "3.2.4-beta.1",
"version": "3.2.5",
"description": "Admin panel for apps written in node.js",
"main": "index.js",
"types": "index.d.ts",
Expand Down
27 changes: 27 additions & 0 deletions src/backend/utils/uploaded-file.type.ts
@@ -0,0 +1,27 @@
/**
* File uploaded via FormData to the backend.
*
* @memberof AdminBro
* @alias UploadedFile
*/
export type UploadedFile = {
/**
* The size of the uploaded file in bytes.
* this property says how many bytes of the file have been written to disk yet.
*/
size: number;
/**
* The path this file is being written to.
*/
path: string;

/**
* The mime type of this file, according to the uploading client.
*/
type: string;

/**
* The name this file had according to the uploading client.
*/
name: string | null;
}

0 comments on commit 0718b3f

Please sign in to comment.