Skip to content

Commit

Permalink
Merge branch 'typescript' into trunk
Browse files Browse the repository at this point in the history
Signed-off-by: Hrishikesh Patil <[email protected]>
  • Loading branch information
riskycase committed Mar 29, 2021
2 parents 236d560 + 8d44330 commit 933ace3
Show file tree
Hide file tree
Showing 29 changed files with 925 additions and 566 deletions.
5 changes: 2 additions & 3 deletions .cli-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

const http = require('http');
const path = require('path');
const broadcastemCore = require('./index');
const broadcastemCore = require('./dist/index');
const fs = require('fs');
const os = require('os');

Expand Down Expand Up @@ -124,8 +124,7 @@ function onListening() {
* Start Express app from the CLI flags
*/

broadcastemCore
.init(argv)
broadcastemCore(argv)
.then(app => {
/**
* Create HTTP server.
Expand Down
5 changes: 5 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ Build Latest:
needs: []
script:
- yarn install --frozen-lockfile
- yarn global add typescript
- tsc
artifacts:
paths:
- dist/

Test Latest API:
stage: testing
Expand Down
14 changes: 10 additions & 4 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ bower_components

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
dist

# Dependency directories
node_modules/
Expand Down Expand Up @@ -62,11 +61,18 @@ typings/
.next

# uploaded files
uploads/*
uploads/

# test files
tests/*
dummy/*
tests/
dummy/

# source files
src/

# dot files
.*
tsconfig.json

#Junit test results
test-results.xml
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
v5.0.0

Migrate main files of module to typescript
Hotfix for uploads broken in browser in v4.0.0
Change module load method

v4.0.0

Remove inbuilt CLI file
Expand Down
133 changes: 0 additions & 133 deletions middleware/uploadManager.js

This file was deleted.

13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "broadcastem-core",
"version": "4.0.0",
"version": "5.0.0",
"description": "The core module for Broadcast 'em application",
"keywords": [
"broadcast",
Expand All @@ -9,7 +9,8 @@
"file share",
"cli"
],
"main": "index.js",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"scripts": {
"dev:cli": "node .cli-dev.js",
"test:Startup": "node tests/Startup/index.js",
Expand All @@ -23,21 +24,27 @@
"license": "MIT",
"homepage": "https://gitlab.com/riskycase/broadcastem-core/-/wikis/home",
"dependencies": {
"archiver": "^5.3.0",
"busboy": "^0.3.1",
"express": "^4.17.1",
"express-easy-zip": "^1.1.5",
"morgan": "^1.10.0",
"uikit": "^3.6.5",
"unzip-stream": "^0.3.1"
},
"devDependencies": {
"@types/archiver": "^5.1.0",
"@types/busboy": "^0.2.3",
"@types/express": "^4.17.11",
"@types/morgan": "^1.9.2",
"@types/unzip-stream": "^0.3.0",
"chai": "^4.2.0",
"chai-http": "^4.3.0",
"dev-null": "^0.1.1",
"husky": "^4.3.6",
"mocha": "^8.2.1",
"mocha-junit-reporter": "^2.0.0",
"prettier": "^2.2.1",
"typescript": "^4.2.3",
"yargs": "^16.2.0"
}
}
4 changes: 2 additions & 2 deletions public/script/root.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const bar = document.getElementById('js-progressbar');
*/
function uploadObject(zip) {
return {
url: zip ? '/upload' : '/upload/zip',
url: zip ? '/upload/zip' : '/upload',
multiple: true,
type: 'multipart/form-data',
loadStart: setBarValue,
Expand All @@ -118,7 +118,7 @@ function uploadObject(zip) {
}, 1000);
alert(
`${
zip ? 'Files uploaded' : 'Zips uploaded and extracted'
zip ? 'Zips uploaded and extracted' : 'Files uploaded'
}, will be available for sharing now`
);
loadFiles();
Expand Down
99 changes: 0 additions & 99 deletions routes/download.js

This file was deleted.

16 changes: 0 additions & 16 deletions routes/index.js

This file was deleted.

Loading

0 comments on commit 933ace3

Please sign in to comment.