-
-
diff --git a/nightwatch.conf.js b/nightwatch.conf.js
index 94eb173661e..f575ffe778c 100644
--- a/nightwatch.conf.js
+++ b/nightwatch.conf.js
@@ -5,7 +5,7 @@ const withHttp = url => (/^https?:\/\//i.test(url) ? url : `http://${url}`)
const RUN_WITH_LDAP = !!process.env.RUN_WITH_LDAP
const RUN_ON_OCIS = !!process.env.RUN_ON_OCIS
const LOCAL_LAUNCH_URL = withHttp(
- process.env.SERVER_HOST || (RUN_ON_OCIS ? 'https://localhost:9200' : 'http://localhost:8300')
+ process.env.SERVER_HOST || (RUN_ON_OCIS ? 'https://localhost:9200' : 'http://localhost:9100')
)
const LOCAL_BACKEND_URL = withHttp(
process.env.BACKEND_HOST || (RUN_ON_OCIS ? 'https://localhost:9200' : 'http://localhost:8080')
diff --git a/package.json b/package.json
index 5f99568d879..a4d52970a69 100644
--- a/package.json
+++ b/package.json
@@ -1,87 +1,57 @@
{
- "name": "owncloud_web",
- "title": "ownCloud Web",
- "icon": "folder",
- "description": "A safe home for all your data",
- "main": "core/core.bundle.js",
+ "version": "1.0.2",
+ "private": true,
+ "workspaces": [
+ "packages/web-app-draw-io",
+ "packages/web-app-files",
+ "packages/web-app-markdown-editor",
+ "packages/web-app-media-viewer",
+ "packages/web-runtime"
+ ],
"scripts": {
- "build:dev": "webpack -d --config webpack.dev.js",
- "build:dev-ocis": "yarn run build:dev && rm -Rf dist/apps/*; mkdir -p dist/apps; cd apps; for APP in *; do rm -Rf ../dist/$APP; ln -s ../../apps/$APP/dist ../dist/apps/$APP; done",
- "build": "webpack -p --config webpack.prod.js",
- "dist": "run-s clean-all install-all build-all",
- "clean-all": "rimraf apps/*/node_modules apps/*/dist node_modules dist/",
- "ncu-all": "node build/run-for-all.js npm-check-updates -a",
- "upgrade-all": "node build/run-for-all.js yarn upgrade",
- "install-all": "yarn install --frozen-lockfile && node build/run-for-all.js yarn install --frozen-lockfile",
- "build-all": "node build/run-for-all.js yarn build",
- "watch-all": "node build/run-for-all.js -p yarn watch",
- "watch-all-ocis": "yarn run build:dev-ocis && node build/run-for-all.js -p yarn watch",
- "watch": "yarn run build:dev && webpack-dev-server --progress --colors --watch --config webpack.dev.js --public $SERVER_HOST",
- "lint": "eslint src apps/*/src tests build --ext vue --ext js --color",
- "lint-fix": "eslint src apps/*/src tests build --ext vue --ext js --color --fix",
- "accessibility-tests": "node node_modules/axe-cli/axe-cli --exit --disable page-has-heading-one,meta-viewport",
- "accessibility-tests-drone": "node node_modules/axe-cli/axe-cli --exit --disable page-has-heading-one,meta-viewport",
- "install": "cd node_modules/cucumber; yarn install --frozen-lockfile",
- "acceptance-tests": "cucumber-js --require-module @babel/register --require-module @babel/polyfill --require tests/acceptance/setup.js --require tests/acceptance/stepDefinitions --format node_modules/cucumber-pretty -t \"${TEST_TAGS:-not @skip and not @skipOnOC10}\"",
- "acceptance-tests-ocis": "WEB_UI_CONFIG='./tests/acceptance/ocis-mac-config.json' SERVER_HOST='https://host.docker.internal:9200' BACKEND_HOST='https://host.docker.internal:9200' NODE_TLS_REJECT_UNAUTHORIZED=0 RUN_ON_OCIS=true cucumber-js --require-module @babel/register --require-module @babel/polyfill --require tests/acceptance/setup.js --require tests/acceptance/stepDefinitions --format node_modules/cucumber-pretty -t \"${TEST_TAGS:-not @skip and not @skipOnOCIS}\"",
- "acceptance-tests-with-ldap": "RUN_ON_OCIS=true RUN_WITH_LDAP=true cucumber-js --require-module @babel/register --require-module @babel/polyfill --require tests/acceptance/setup.js --require tests/acceptance/stepDefinitions --format node_modules/cucumber-pretty -t \"${TEST_TAGS:-not @skip and not @skipOnOCIS}\"",
- "acceptance-tests-drone": "cucumber-js --retry 1 --require-module @babel/register --require-module @babel/polyfill --require tests/acceptance/setup.js --require tests/acceptance/stepDefinitions --format node_modules/cucumber-pretty ${TEST_PATHS:-tests/acceptance/features/$TEST_CONTEXT} -t \"${TEST_TAGS}\"",
- "selenium": "docker run --rm -d --network=\"host\" -v /dev/shm:/dev/shm -v ${REMOTE_UPLOAD_DIR:-$PWD/tests/acceptance/filesForUpload}:${LOCAL_UPLOAD_DIR:-/uploads}:ro --name web-tests-selenium selenium/standalone-chrome-debug",
- "selenium:mac": "docker run --rm -d -p ${SELENIUM_PORT:-4444}:4444 -p 5900:5900 -v /dev/shm:/dev/shm -v ${REMOTE_UPLOAD_DIR:-$PWD/tests/acceptance/filesForUpload}:${LOCAL_UPLOAD_DIR:-/uploads}:ro --name web-tests-selenium selenium/standalone-chrome-debug",
- "ldap-server": "docker run --rm -d -p 127.0.0.1:389:389 -p 636:636 --hostname ldap.my-company.com -e LDAP_TLS_VERIFY_CLIENT=never -e LDAP_DOMAIN=owncloud.com -e LDAP_ORGANISATION=ownCloud -e LDAP_ADMIN_PASSWORD=admin --name web-tests-slapd osixia/openldap",
- "redis-server": "docker run --rm -d -p 6379:6379 -e REDIS_DATABASES=1 --name web-tests-redis webhippie/redis:latest",
- "killall": "yarn run ocis-kill; yarn run docker-kill",
- "ocis-kill": "killall ocis",
- "docker-kill": "docker kill web-tests-selenium web-tests-redis",
- "testing-app": "if [ -d tests/testing-app ]; then (cd tests/testing-app && git pull && pwd); else git clone --depth 1 https://github.com/owncloud/testing.git tests/testing-app; fi;",
- "build-ocis": "if [ -d tests/ocis ]; then (cd tests/ocis && git reset --hard master && git pull); else git clone --depth 1 https://github.com/owncloud/ocis.git tests/ocis; fi; cd tests/ocis/ocis; make clean; make generate build",
- "ocis": "yarn run build-ocis; PROXY_ENABLE_BASIC_AUTH=true STORAGE_HOME_DRIVER=owncloud STORAGE_USERS_DRIVER=owncloud REVA_STORAGE_HOME_EXPOSE_DATA_SERVER=1 REVA_STORAGE_OC_EXPOSE_DATA_SERVER=1 WEB_ASSET_PATH='./dist' tests/ocis/ocis/bin/ocis server &",
- "ocis:mac": "yarn run build-ocis; STORAGE_HOME_DATA_SERVER_URL='http://host.docker.internal:9155/data' STORAGE_DATAGATEWAY_PUBLIC_URL='https://host.docker.internal:9200/data' STORAGE_USERS_DATA_SERVER_URL='http://host.docker.internal:9158/data' STORAGE_FRONTEND_PUBLIC_URL='https://host.docker.internal:9200' PROXY_ENABLE_BASIC_AUTH=true PROXY_OIDC_ISSUER='https://host.docker.internal:9200' KONNECTD_INSECURE='true' KONNECTD_IDENTIFIER_REGISTRATION_CONF='./tests/acceptance/mac-identifier-registration.yml' KONNECTD_ISS='https://host.docker.internal:9200' KONNECTD_TLS='true' WEB_UI_CONFIG='./tests/acceptance/ocis-mac-config.json' WEB_ASSET_PATH='./dist' ./tests/ocis/ocis/bin/ocis server &",
- "test-requirements:ocis": "yarn run redis-server; yarn run selenium; yarn run testing-app; yarn run ocis",
- "test-requirements:ocis:mac": "yarn run redis-server; yarn run selenium:mac; yarn run testing-app; yarn run ocis:mac",
+ "build": "rollup -c",
+ "build:w": "rollup -c -w",
+ "depcheck": "depcheck",
+ "lint": "eslint packages/*/src tests --ext vue --ext js --color",
+ "serve": "SERVER=true yarn build:w",
+ "test:acceptance:drone": "cucumber-js --retry 1 --require-module @babel/register --require-module @babel/polyfill --require tests/acceptance/setup.js --require tests/acceptance/stepDefinitions --format node_modules/cucumber-pretty ${TEST_PATHS:-tests/acceptance/features/$TEST_CONTEXT} -t \"${TEST_TAGS}\"",
+ "test:acceptance:oc10": "cucumber-js --require-module @babel/register --require-module @babel/polyfill --require tests/acceptance/setup.js --require tests/acceptance/stepDefinitions --format node_modules/cucumber-pretty -t \"${TEST_TAGS:-not @skip and not @skipOnOC10}\"",
+ "test:acceptance:ocis": "NODE_TLS_REJECT_UNAUTHORIZED=0 RUN_ON_OCIS=true cucumber-js --require-module @babel/register --require-module @babel/polyfill --require tests/acceptance/setup.js --require tests/acceptance/stepDefinitions --format node_modules/cucumber-pretty -t \"${TEST_TAGS:-not @skip and not @skipOnOCIS and not @notToImplementOnOCIS}\"",
"test:unit": "jest --coverage --config ./tests/unit/config/jest.config.js"
},
"author": "ownCloud",
"license": "AGPL-3.0",
"homepage": "https://github.com/owncloud/web",
- "dependencies": {
- "filesize": "^6.1.0"
- },
+ "browserslist": [
+ "last 2 version",
+ "> .2%",
+ "not dead",
+ "not IE 11",
+ "not IE_Mob 11"
+ ],
"devDependencies": {
- "@babel/cli": "^7.6.0",
"@babel/core": "^7.12.10",
- "@babel/plugin-proposal-class-properties": "^7.5.5",
- "@babel/plugin-proposal-export-default-from": "^7.5.2",
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3",
- "@babel/plugin-proposal-optional-chaining": "^7.8.3",
- "@babel/plugin-syntax-dynamic-import": "^7.2.0",
- "@babel/plugin-transform-classes": "^7.5.5",
- "@babel/plugin-transform-runtime": "^7.6.0",
- "@babel/polyfill": "^7.8.7",
+ "@babel/polyfill": "^7.12.1",
"@babel/preset-env": "^7.12.11",
- "@babel/register": "^7.6.0",
+ "@babel/register": "^7.12.10",
+ "@erquhart/rollup-plugin-node-builtins": "^2.1.5",
+ "@rollup/plugin-commonjs": "^17.0.0",
+ "@rollup/plugin-html": "^0.2.0",
+ "@rollup/plugin-json": "^4.1.0",
"@vue/test-utils": "^1.1.2",
"archiver": "^3.0.0",
- "axe-cli": "^3.1.0",
"babel-core": "^7.0.0-bridge.0",
- "babel-eslint": "^10.0.2",
+ "babel-eslint": "^10.1.0",
"babel-jest": "^26.6.3",
- "babel-loader": "^8.0.6",
- "babel-plugin-transform-es2015-arrow-functions": "^6.22.0",
- "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1",
"chromedriver": "^87.0.0",
- "copy-webpack-plugin": "^5.0.3",
- "core-js": "3.8.0",
- "css-loader": "^3.1.0",
+ "core-js": "3",
"cucumber": ">=6.0.5",
"cucumber-pretty": ">=6.0.0",
- "deepmerge": "^4.2.1",
- "easygettext": "2.9.0",
+ "depcheck": "^1.3.1",
+ "ejs": "^3.1.5",
"eslint": "6.8.0",
"eslint-config-prettier": "^6.10.0",
"eslint-config-standard": "^14.1.0",
- "eslint-loader": "^3.0.0",
- "eslint-plugin-compat": "^3.2.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jest": "^24.1.3",
"eslint-plugin-node": "^11.0.0",
@@ -89,86 +59,39 @@
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^6.2.2",
- "execa": "^4.0.0",
- "file-loader": "^5.1.0",
- "filter-obj": "^2.0.1",
- "html-webpack-plugin": "^3.2.0",
- "husky": ">=3.0.5",
- "inert-polyfill": "^0.2.5",
+ "fs-extra": "^9.0.1",
"jest": "^26.6.3",
"jest-serializer-vue": "^2.0.2",
"jest-svg-transformer": "^1.0.0",
"join-path": "^1.1.1",
- "ldap": "^0.7.1",
- "lint-staged": ">=9",
+ "ldapjs": "^2.2.3",
"lodash": "^4.17.15",
- "mini-css-extract-plugin": "^0.9.0",
"nightwatch": "1.3.4",
"nightwatch-api": "3.0.1",
"nightwatch-vrt": "^0.2.10",
"node-fetch": "^2.6.1",
- "node-fs-extra": "^0.8.2",
- "node-sass": "^5.0.0",
- "npm-run-all": "^4.1.5",
- "oidc-client": "^1.9.1",
- "owncloud-design-system": "^2.1.2",
- "owncloud-sdk": "^1.0.0-740",
"p-limit": "^2.2.1",
- "p-queue": "^6.1.1",
- "parse-json": "^5.0.0",
- "path": "^0.12.7",
+ "postcss": "^8.2.2",
"requirejs": "^2.3.6",
- "rimraf": "^3.0.0",
- "sass-loader": "^10.1.1",
- "start-server-and-test": "^1.9.1",
- "style-loader": "^1.0.0",
- "tus-js-client": "^1.8.0",
+ "rollup": "^2.34.2",
+ "rollup-plugin-babel": "^4.4.0",
+ "rollup-plugin-copy-watch": "^0.0.1",
+ "rollup-plugin-delete": "^2.0.0",
+ "rollup-plugin-gzip": "^2.5.0",
+ "rollup-plugin-modify": "^3.0.0",
+ "rollup-plugin-node-globals": "^1.4.0",
+ "rollup-plugin-node-resolve": "^5.2.0",
+ "rollup-plugin-postcss": "^4.0.0",
+ "rollup-plugin-progress": "^1.1.2",
+ "rollup-plugin-serve": "^1.1.0",
+ "rollup-plugin-terser": "^7.0.2",
+ "rollup-plugin-visualizer": "^4.2.0",
+ "rollup-plugin-vue": "^5.1.4",
"url-search-params-polyfill": "^8.0.0",
- "vue": "^2.6.10",
- "vue-clipboard2": "^0.3.1",
- "vue-drag-drop": "^1.1.4",
- "vue-events": "^3.1.0",
- "vue-gettext": "^2.1.5",
"vue-jest": "^3.0.7",
- "vue-loader": "^15.7.1",
- "vue-meta": "^2.2.2",
- "vue-resize": "^0.4.5",
- "vue-router": "^3.1.3",
- "vue-scrollto": "^2.15.0",
- "vue-style-loader": "^4.1.2",
- "vue-template-compiler": "^2.6.10",
- "vue2-touch-events": "^2.2.1",
- "vuex": "^3.1.1",
- "vuex-persist": "2.0.1",
- "vuex-router-sync": "^5.0.0",
- "webpack": "^4.36.1",
- "webpack-cli": "^3.3.8",
- "webpack-copy-plugin": "^0.0.4",
- "webpack-dev-server": "^3.7.2",
- "webpack-merge": "^4.2.2",
- "webpack-version-file-plugin": "^0.4.0",
- "whatwg-fetch": "^3.0.0",
- "wicked-good-xpath": "^1.3.0",
+ "vue-template-compiler": "^2.6.12",
"xml-js": "^1.6.11"
},
- "browserslist": [
- "last 2 version",
- "> .2%",
- "not dead",
- "not IE 11",
- "not IE_Mob 11"
- ],
- "husky": {
- "hooks": {
- "pre-commit": "lint-staged"
- }
- },
- "lint-staged": {
- "*.{vue,js}": [
- "yarn lint --fix",
- "git add"
- ]
- },
"engines": {
"node": ">=10 <13"
}
diff --git a/apps/draw-io/l10n/.tx/config b/packages/web-app-draw-io/l10n/.tx/config
similarity index 100%
rename from apps/draw-io/l10n/.tx/config
rename to packages/web-app-draw-io/l10n/.tx/config
diff --git a/apps/draw-io/l10n/translations.json b/packages/web-app-draw-io/l10n/translations.json
similarity index 100%
rename from apps/draw-io/l10n/translations.json
rename to packages/web-app-draw-io/l10n/translations.json
diff --git a/packages/web-app-draw-io/package.json b/packages/web-app-draw-io/package.json
new file mode 100644
index 00000000000..d6b7a5037ea
--- /dev/null
+++ b/packages/web-app-draw-io/package.json
@@ -0,0 +1,11 @@
+{
+ "name": "draw-io",
+ "license": "AGPL-3.0",
+ "version": "0.0.0",
+ "description": "ownCloud web draw.io integration",
+ "devDependencies": {
+ "moment": "^2.24.0",
+ "query-string": "^6.8.3",
+ "vuex": "3.1.3"
+ }
+}
diff --git a/apps/draw-io/src/DrawIoEditor.vue b/packages/web-app-draw-io/src/App.vue
similarity index 100%
rename from apps/draw-io/src/DrawIoEditor.vue
rename to packages/web-app-draw-io/src/App.vue
diff --git a/apps/draw-io/src/app.js b/packages/web-app-draw-io/src/index.js
similarity index 83%
rename from apps/draw-io/src/app.js
rename to packages/web-app-draw-io/src/index.js
index 028a9b56d03..1471b4941af 100644
--- a/apps/draw-io/src/app.js
+++ b/packages/web-app-draw-io/src/index.js
@@ -1,15 +1,12 @@
-import 'core-js/stable'
-import 'regenerator-runtime/runtime'
-
import translationsJson from '../l10n/translations'
-import DrawIoEditor from './DrawIoEditor.vue'
+import App from './App.vue'
const routes = [
{
name: 'draw-io-edit',
path: '/edit/:filePath',
components: {
- fullscreen: DrawIoEditor
+ fullscreen: App
},
meta: { hideHeadbar: true }
}
@@ -46,8 +43,8 @@ const appInfo = {
}
const translations = translationsJson
-export default define({
+export default {
appInfo,
routes,
translations
-})
+}
diff --git a/apps/files/l10n/.tx/config b/packages/web-app-files/l10n/.tx/config
similarity index 100%
rename from apps/files/l10n/.tx/config
rename to packages/web-app-files/l10n/.tx/config
diff --git a/apps/files/l10n/translations.json b/packages/web-app-files/l10n/translations.json
similarity index 100%
rename from apps/files/l10n/translations.json
rename to packages/web-app-files/l10n/translations.json
diff --git a/packages/web-app-files/package.json b/packages/web-app-files/package.json
new file mode 100644
index 00000000000..a55d8413a0f
--- /dev/null
+++ b/packages/web-app-files/package.json
@@ -0,0 +1,20 @@
+{
+ "name": "files",
+ "version": "0.0.0",
+ "description": "ownCloud web files",
+ "license": "AGPL-3.0",
+ "devDependencies": {
+ "copy-to-clipboard": "^3.3.1",
+ "filesize": "^6.1.0",
+ "filter-obj": "^2.0.1",
+ "lodash": "^4.17.20",
+ "lodash-es": "^4.17.20",
+ "moment": "^2.24.0",
+ "p-queue": "^6.6.2",
+ "query-string": "^6.8.3",
+ "vue": "^2.6.10",
+ "vue-virtual-scroller": "^1.0.0-rc.2",
+ "vue2-dropzone": "^3.6.0",
+ "vuex": "^3.1.1"
+ }
+}
diff --git a/apps/files/src/components/AllFilesList.vue b/packages/web-app-files/src/components/AllFilesList.vue
similarity index 95%
rename from apps/files/src/components/AllFilesList.vue
rename to packages/web-app-files/src/components/AllFilesList.vue
index 3d67aded946..ef3ecd9048c 100644
--- a/apps/files/src/components/AllFilesList.vue
+++ b/packages/web-app-files/src/components/AllFilesList.vue
@@ -106,23 +106,20 @@