Skip to content

Commit 933ace3

Browse files
committed
Merge branch 'typescript' into trunk
Signed-off-by: Hrishikesh Patil <[email protected]>
2 parents 236d560 + 8d44330 commit 933ace3

29 files changed

+925
-566
lines changed

.cli-dev.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
const http = require('http');
88
const path = require('path');
9-
const broadcastemCore = require('./index');
9+
const broadcastemCore = require('./dist/index');
1010
const fs = require('fs');
1111
const os = require('os');
1212

@@ -124,8 +124,7 @@ function onListening() {
124124
* Start Express app from the CLI flags
125125
*/
126126

127-
broadcastemCore
128-
.init(argv)
127+
broadcastemCore(argv)
129128
.then(app => {
130129
/**
131130
* Create HTTP server.

.gitlab-ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ Build Latest:
2121
needs: []
2222
script:
2323
- yarn install --frozen-lockfile
24+
- yarn global add typescript
25+
- tsc
26+
artifacts:
27+
paths:
28+
- dist/
2429

2530
Test Latest API:
2631
stage: testing

.npmignore

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ bower_components
3131

3232
# Compiled binary addons (https://nodejs.org/api/addons.html)
3333
build/Release
34-
dist
3534

3635
# Dependency directories
3736
node_modules/
@@ -62,11 +61,18 @@ typings/
6261
.next
6362

6463
# uploaded files
65-
uploads/*
64+
uploads/
6665

6766
# test files
68-
tests/*
69-
dummy/*
67+
tests/
68+
dummy/
69+
70+
# source files
71+
src/
72+
73+
# dot files
74+
.*
75+
tsconfig.json
7076

7177
#Junit test results
7278
test-results.xml

CHANGELOG

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
v5.0.0
2+
3+
Migrate main files of module to typescript
4+
Hotfix for uploads broken in browser in v4.0.0
5+
Change module load method
6+
17
v4.0.0
28

39
Remove inbuilt CLI file

middleware/uploadManager.js

Lines changed: 0 additions & 133 deletions
This file was deleted.

package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "broadcastem-core",
3-
"version": "4.0.0",
3+
"version": "5.0.0",
44
"description": "The core module for Broadcast 'em application",
55
"keywords": [
66
"broadcast",
@@ -9,7 +9,8 @@
99
"file share",
1010
"cli"
1111
],
12-
"main": "index.js",
12+
"main": "dist/index.js",
13+
"typings": "dist/index.d.ts",
1314
"scripts": {
1415
"dev:cli": "node .cli-dev.js",
1516
"test:Startup": "node tests/Startup/index.js",
@@ -23,21 +24,27 @@
2324
"license": "MIT",
2425
"homepage": "https://gitlab.com/riskycase/broadcastem-core/-/wikis/home",
2526
"dependencies": {
27+
"archiver": "^5.3.0",
2628
"busboy": "^0.3.1",
2729
"express": "^4.17.1",
28-
"express-easy-zip": "^1.1.5",
2930
"morgan": "^1.10.0",
3031
"uikit": "^3.6.5",
3132
"unzip-stream": "^0.3.1"
3233
},
3334
"devDependencies": {
35+
"@types/archiver": "^5.1.0",
36+
"@types/busboy": "^0.2.3",
37+
"@types/express": "^4.17.11",
38+
"@types/morgan": "^1.9.2",
39+
"@types/unzip-stream": "^0.3.0",
3440
"chai": "^4.2.0",
3541
"chai-http": "^4.3.0",
3642
"dev-null": "^0.1.1",
3743
"husky": "^4.3.6",
3844
"mocha": "^8.2.1",
3945
"mocha-junit-reporter": "^2.0.0",
4046
"prettier": "^2.2.1",
47+
"typescript": "^4.2.3",
4148
"yargs": "^16.2.0"
4249
}
4350
}

public/script/root.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ const bar = document.getElementById('js-progressbar');
106106
*/
107107
function uploadObject(zip) {
108108
return {
109-
url: zip ? '/upload' : '/upload/zip',
109+
url: zip ? '/upload/zip' : '/upload',
110110
multiple: true,
111111
type: 'multipart/form-data',
112112
loadStart: setBarValue,
@@ -118,7 +118,7 @@ function uploadObject(zip) {
118118
}, 1000);
119119
alert(
120120
`${
121-
zip ? 'Files uploaded' : 'Zips uploaded and extracted'
121+
zip ? 'Zips uploaded and extracted' : 'Files uploaded'
122122
}, will be available for sharing now`
123123
);
124124
loadFiles();

routes/download.js

Lines changed: 0 additions & 99 deletions
This file was deleted.

routes/index.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)