diff --git a/.angular-cli.json b/.angular-cli.json deleted file mode 100644 index 1b67a41..0000000 --- a/.angular-cli.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "project": { - "name": "youtube-dl-material" - }, - "apps": [ - { - "root": "src", - "outDir": "dist", - "assets": [ - "assets", - "favicon.ico", - "backend/audio", - "backend/video", - "backend", - { "glob": "default.json", "input": "./", "output": "../backend/config/", "allowOutsideOutDir": true } - ], - "index": "index.html", - "main": "main.ts", - "polyfills": "polyfills.ts", - "test": "test.ts", - "tsconfig": "tsconfig.app.json", - "testTsconfig": "tsconfig.spec.json", - "prefix": "app", - "styles": [ - "styles.css" - ], - "scripts": [], - "environmentSource": "environments/environment.ts", - "environments": { - "dev": "environments/environment.ts", - "prod": "environments/environment.prod.ts" - } - } - ], - "e2e": { - "protractor": { - "config": "./protractor.conf.js" - } - }, - "lint": [ - { - "project": "src/tsconfig.app.json" - }, - { - "project": "src/tsconfig.spec.json" - }, - { - "project": "e2e/tsconfig.e2e.json" - } - ], - "test": { - "karma": { - "config": "./karma.conf.js" - } - }, - "defaults": { - "styleExt": "css", - "component": {} - } -} diff --git a/angular.json b/angular.json new file mode 100644 index 0000000..9ab9eda --- /dev/null +++ b/angular.json @@ -0,0 +1,134 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "youtube-dl-material": { + "root": "", + "sourceRoot": "src", + "projectType": "application", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "outputPath": "dist", + "index": "src/index.html", + "main": "src/main.ts", + "tsConfig": "src/tsconfig.app.json", + "polyfills": "src/polyfills.ts", + "assets": [ + "src/assets", + "src/favicon.ico", + "src/backend/audio", + "src/backend/video", + "src/backend" + ], + "styles": [ + "src/styles.css" + ], + "scripts": [] + }, + "configurations": { + "production": { + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "extractCss": true, + "namedChunks": false, + "aot": true, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true, + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + } + ] + } + } + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "options": { + "browserTarget": "youtube-dl-material:build" + }, + "configurations": { + "production": { + "browserTarget": "youtube-dl-material:build:production" + } + } + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "browserTarget": "youtube-dl-material:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "main": "src/test.ts", + "karmaConfig": "./karma.conf.js", + "polyfills": "src/polyfills.ts", + "tsConfig": "src/tsconfig.spec.json", + "scripts": [], + "styles": [ + "src/styles.css" + ], + "assets": [ + "src/assets", + "src/favicon.ico", + "src/backend/audio", + "src/backend/video", + "src/backend" + ] + } + }, + "lint": { + "builder": "@angular-devkit/build-angular:tslint", + "options": { + "tsConfig": [ + "src/tsconfig.app.json", + "src/tsconfig.spec.json" + ], + "exclude": [] + } + } + } + }, + "youtube-dl-material-e2e": { + "root": "e2e", + "sourceRoot": "e2e", + "projectType": "application", + "architect": { + "e2e": { + "builder": "@angular-devkit/build-angular:protractor", + "options": { + "protractorConfig": "./protractor.conf.js", + "devServerTarget": "youtube-dl-material:serve" + } + }, + "lint": { + "builder": "@angular-devkit/build-angular:tslint", + "options": { + "tsConfig": [ + "e2e/tsconfig.e2e.json" + ], + "exclude": [] + } + } + } + } + }, + "defaultProject": "youtube-dl-material", + "schematics": { + "@schematics/angular:component": { + "prefix": "app", + "styleext": "css" + }, + "@schematics/angular:directive": { + "prefix": "app" + } + } +} \ No newline at end of file diff --git a/backend/aria2c.exe b/backend/aria2c.exe new file mode 100644 index 0000000..18b2b7b Binary files /dev/null and b/backend/aria2c.exe differ diff --git a/browserslist b/browserslist new file mode 100644 index 0000000..8084853 --- /dev/null +++ b/browserslist @@ -0,0 +1,12 @@ +# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. +# For additional information regarding the format and rule options, please see: +# https://github.com/browserslist/browserslist#queries + +# You can see what browsers were selected by your queries by running: +# npx browserslist + +> 0.5% +last 2 versions +Firefox ESR +not dead +not IE 9-11 # For IE 9-11 support, remove 'not'. \ No newline at end of file diff --git a/karma.conf.js b/karma.conf.js index 4d9ab9d..063e678 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -4,24 +4,22 @@ module.exports = function (config) { config.set({ basePath: '', - frameworks: ['jasmine', '@angular/cli'], + frameworks: ['jasmine', '@angular-devkit/build-angular'], plugins: [ require('karma-jasmine'), require('karma-chrome-launcher'), require('karma-jasmine-html-reporter'), require('karma-coverage-istanbul-reporter'), - require('@angular/cli/plugins/karma') + require('@angular-devkit/build-angular/plugins/karma') ], client:{ clearContext: false // leave Jasmine Spec Runner output visible in browser }, coverageIstanbulReporter: { - reports: [ 'html', 'lcovonly' ], + dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ], fixWebpackSourcePaths: true }, - angularCli: { - environment: 'dev' - }, + reporters: ['progress', 'kjhtml'], port: 9876, colors: true, diff --git a/package.json b/package.json index 69fb417..b6acba8 100644 --- a/package.json +++ b/package.json @@ -13,29 +13,32 @@ "private": true, "dependencies": { "@angular-devkit/core": "^8.3.12", - "@angular/animations": "^5.2.0", - "@angular/cdk": "^5.0.4", - "@angular/common": "^5.2.0", - "@angular/compiler": "^5.2.0", - "@angular/core": "^5.2.0", - "@angular/forms": "^5.0.0", + "@angular/animations": "^8.2.11", + "@angular/cdk": "^8.2.3", + "@angular/common": "^8.2.11", + "@angular/compiler": "^8.2.11", + "@angular/core": "^8.2.11", + "@angular/forms": "^8.2.11", "@angular/http": "^7.2.15", - "@angular/material": "^5.0.4", - "@angular/platform-browser": "^5.0.0", - "@angular/platform-browser-dynamic": "^5.0.0", - "@angular/router": "^5.0.0", + "@angular/material": "^8.2.3", + "@angular/platform-browser": "^8.2.11", + "@angular/platform-browser-dynamic": "^8.2.11", + "@angular/router": "^8.2.11", "core-js": "^2.4.1", "ng4-configure": "^0.1.7", - "rxjs": "^5.5.3", - "zone.js": "^0.8.4" + "rxjs": "^6.5.3", + "rxjs-compat": "^6.0.0-rc.0", + "tslib": "^1.10.0", + "zone.js": "~0.9.1" }, "devDependencies": { + "@angular-devkit/build-angular": "~0.803.12", "@angular/cli": "^8.3.12", - "@angular/compiler-cli": "^5.0.0", - "@angular/language-service": "^4.0.0", + "@angular/compiler-cli": "^8.2.11", + "@angular/language-service": "^8.2.11", "@types/jasmine": "2.5.45", "@types/node": "~6.0.60", - "codelyzer": "^5.1.2", + "codelyzer": "^5.0.1", "jasmine-core": "~2.6.2", "jasmine-spec-reporter": "~4.1.0", "karma": "~1.7.0", @@ -47,6 +50,6 @@ "protractor": "~5.1.2", "ts-node": "~3.0.4", "tslint": "~5.3.2", - "typescript": "~2.5.3" + "typescript": "~3.5.3" } } diff --git a/src/assets/default.json b/src/assets/default.json new file mode 100644 index 0000000..211296a --- /dev/null +++ b/src/assets/default.json @@ -0,0 +1,22 @@ +{ + "YoutubeDLMaterial": { + "Host": { + "frontendurl": "http://localhost:4200", + "backendurl": "http://localhost:17442/" + }, + "Encryption": { + "use-encryption": false, + "cert-file-path": "/etc/letsencrypt/live/example.com/fullchain.pem", + "key-file-path": "/etc/letsencrypt/live/example.com/privkey.pem" + }, + "Downloader": { + "path-base": "http://localhost:17442/", + "path-audio": "audio/", + "path-video": "video/" + }, + "Extra": { + "title_top": "Youtube Downloader", + "file_manager_enabled": true + } + } + } diff --git a/src/polyfills.ts b/src/polyfills.ts index fd01cc9..8dbf098 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -43,7 +43,6 @@ /** Evergreen browsers require these. **/ import 'core-js/es6/reflect'; -import 'core-js/es7/reflect'; /** ALL Firefox browsers require the following to support `@angular/animation`. **/ diff --git a/src/tsconfig.app.json b/src/tsconfig.app.json index 5e2507d..cf49d7f 100644 --- a/src/tsconfig.app.json +++ b/src/tsconfig.app.json @@ -2,7 +2,6 @@ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../out-tsc/app", - "module": "es2015", "baseUrl": "", "types": [] }, diff --git a/src/tsconfig.spec.json b/src/tsconfig.spec.json index 510e3f1..f3ce00c 100644 --- a/src/tsconfig.spec.json +++ b/src/tsconfig.spec.json @@ -1,20 +1,19 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/spec", - "module": "commonjs", - "target": "es5", - "baseUrl": "", - "types": [ - "jasmine", - "node" - ] - }, - "files": [ - "test.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] -} +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/spec", + "baseUrl": "", + "types": [ + "jasmine", + "node" + ] + }, + "files": [ + "test.ts", "polyfills.ts" + + ], + "include": [ + "**/*.spec.ts", + "**/*.d.ts" + ] +} diff --git a/tsconfig.json b/tsconfig.json index a35a8ee..1c0a9ed 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,8 @@ { "compileOnSave": false, "compilerOptions": { + "downlevelIteration": true, + "importHelpers": true, "outDir": "./dist/out-tsc", "baseUrl": "src", "sourceMap": true, @@ -8,13 +10,16 @@ "moduleResolution": "node", "emitDecoratorMetadata": true, "experimentalDecorators": true, - "target": "es5", + "target": "es2015", + "resolveJsonModule": true, + "esModuleInterop": true, "typeRoots": [ "node_modules/@types" ], "lib": [ "es2016", "dom" - ] + ], + "module": "esnext" } -} +} \ No newline at end of file