intermediate-component-sa 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app.server.js +7 -0
- package/client/css/main.css +1 -0
- package/{src/client → client}/index.html +6 -40
- package/client/js/app.js +1 -0
- package/client/js/shims.js +17 -0
- package/{src/client → client}/tsconfig.json +0 -0
- package/package.json +75 -340
- package/{src/server/config/app.config.ts → server/config/app.config.js} +47 -57
- package/server/config/jwt.config.js +4 -0
- package/{src/server/config/logger.config.ts → server/config/logger.config.js} +142 -161
- package/server/config/mssql.config.js +32 -0
- package/server/config/redis.config.js +8 -0
- package/server/config/server.config.js +12 -0
- package/server/config/templates.config.js +23 -0
- package/server/crypt.js +29 -0
- package/server/customRequest.js +370 -0
- package/server/index.js +125 -0
- package/server/interfaces/cleaner.interface.js +2 -0
- package/server/interfaces/supervisor.interface.js +2 -0
- package/{src/server/routes-centralized.ts → server/routes-centralized.js} +37 -36
- package/server/routes.js +7 -0
- package/server/services/index.js +8 -0
- package/server/services/routes.service.js +18 -0
- package/server/shared/file-manager.js +616 -0
- package/server/shared/http.shared.js +39 -0
- package/server/shared/promises.shared.js +14 -0
- package/server/shared/security.shared.js +52 -0
- package/{src/server → server}/ssl/star_inconcertcc_com.key +0 -0
- package/{src/server → server}/ssl/star_inconcertcc_com.pem +0 -0
- package/CHANGELOG.md +0 -11
- package/README.md +0 -1
- package/build-dev.bat +0 -2
- package/build-prod-aot.bat +0 -2
- package/build-prod-rollup-aot.bat +0 -2
- package/build-prod.bat +0 -2
- package/config.ts +0 -4
- package/gulpfile.ts +0 -172
- package/index.js +0 -12
- package/karma.conf.js +0 -124
- package/postgrator-test.json +0 -9
- package/postgrator.json +0 -9
- package/src/app.server.ts +0 -4
- package/src/client/app/app.component.ts +0 -37
- package/src/client/app/app.html +0 -6
- package/src/client/app/app.module.ts +0 -36
- package/src/client/app/app.routing.ts +0 -7
- package/src/client/app/hot_loader_main.ts +0 -14
- package/src/client/app/main-aot.ts +0 -8
- package/src/client/app/main.ts +0 -8
- package/src/client/app/rxjs-operators.ts +0 -15
- package/src/server/config/jwt.config.ts +0 -4
- package/src/server/config/mssql.config.ts +0 -30
- package/src/server/config/redis.config.ts +0 -10
- package/src/server/config/server.config.ts +0 -20
- package/src/server/config/templates.config.ts +0 -41
- package/src/server/crypt.ts +0 -37
- package/src/server/customRequest.ts +0 -609
- package/src/server/index.ts +0 -231
- package/src/server/interfaces/cleaner.interface.ts +0 -3
- package/src/server/interfaces/supervisor.interface.ts +0 -3
- package/src/server/routes.ts +0 -6
- package/src/server/services/index.ts +0 -10
- package/src/server/services/routes.service.ts +0 -11
- package/src/server/shared/file-manager.ts +0 -1007
- package/src/server/shared/http.shared.ts +0 -49
- package/src/server/shared/promises.shared.ts +0 -13
- package/src/server/shared/security.shared.ts +0 -90
- package/src/server/tsconfig.json +0 -38
- package/tools/build.js.prod.ts +0 -40
- package/tools/config/project.config.ts +0 -718
- package/tools/config.ts +0 -4
- package/tools/database/SchemaZen.exe +0 -0
- package/tools/database/generate-all-data-scripts.bat +0 -32
- package/tools/database/generate-database-scripts.bat +0 -36
- package/tools/debug.ts +0 -17
- package/tools/env/base.ts +0 -8
- package/tools/env/dev.ts +0 -9
- package/tools/env/env-config.interface.ts +0 -1
- package/tools/env/prod.ts +0 -10
- package/tools/manual_typings/project/sample.package.d.ts +0 -3
- package/tools/manual_typings/seed/angular2-hot-loader.d.ts +0 -9
- package/tools/manual_typings/seed/autoprefixer.d.ts +0 -13
- package/tools/manual_typings/seed/colorguard.d.ts +0 -15
- package/tools/manual_typings/seed/connect-livereload.d.ts +0 -5
- package/tools/manual_typings/seed/cssnano.d.ts +0 -18
- package/tools/manual_typings/seed/doiuse.d.ts +0 -16
- package/tools/manual_typings/seed/express-history-api-fallback.d.ts +0 -18
- package/tools/manual_typings/seed/istream.d.ts +0 -10
- package/tools/manual_typings/seed/karma.d.ts +0 -12
- package/tools/manual_typings/seed/merge-stream.d.ts +0 -8
- package/tools/manual_typings/seed/open.d.ts +0 -8
- package/tools/manual_typings/seed/postcss-reporter.d.ts +0 -20
- package/tools/manual_typings/seed/slash.d.ts +0 -5
- package/tools/manual_typings/seed/stylelint.d.ts +0 -16
- package/tools/manual_typings/seed/systemjs-builder.d.ts +0 -10
- package/tools/manual_typings/seed/tildify.d.ts +0 -5
- package/tools/manual_typings/seed/tiny-lr.d.ts +0 -10
- package/tools/manual_typings/seed/walk.d.ts +0 -10
- package/tools/scripts/install.speech-analytic.sh +0 -35
- package/tools/tasks/build.app.server.ts +0 -57
- package/tools/tasks/build.assets.dev.ts +0 -19
- package/tools/tasks/build.assets.prod.ts +0 -31
- package/tools/tasks/build.bundles.app.aot.ts +0 -31
- package/tools/tasks/build.bundles.app.rollup.aot.ts +0 -101
- package/tools/tasks/build.bundles.app.ts +0 -31
- package/tools/tasks/build.bundles.ts +0 -45
- package/tools/tasks/build.database.scripts.runner.ts +0 -137
- package/tools/tasks/build.database.scripts.ts +0 -27
- package/tools/tasks/build.flags.ts +0 -9
- package/tools/tasks/build.fonts.ts +0 -9
- package/tools/tasks/build.html_css.ts +0 -126
- package/tools/tasks/build.index.dev.ts +0 -68
- package/tools/tasks/build.index.prod.ts +0 -64
- package/tools/tasks/build.js.dev.ts +0 -66
- package/tools/tasks/build.js.prod.aot.ts +0 -44
- package/tools/tasks/build.js.prod.rollup.aot.ts +0 -50
- package/tools/tasks/build.js.prod.ts +0 -40
- package/tools/tasks/build.packages.prod.ts +0 -19
- package/tools/tasks/build.server.dev.ts +0 -59
- package/tools/tasks/build.server.prod.ts +0 -31
- package/tools/tasks/build.server.statics.ts +0 -24
- package/tools/tasks/build.skins.ts +0 -51
- package/tools/tasks/build.sme.prod.aot.ts +0 -6
- package/tools/tasks/build.sme.prod.rollup.aot.ts +0 -6
- package/tools/tasks/build.sme.prod.ts +0 -6
- package/tools/tasks/build.tar.prod.ts +0 -17
- package/tools/tasks/build.test.database.scripts.ts +0 -52
- package/tools/tasks/clean.dev.ts +0 -7
- package/tools/tasks/clean.prod.ts +0 -7
- package/tools/tasks/compile.ahead.prod.ts +0 -65
- package/tools/tasks/copy.client.js.prod.rollup.aot.ts +0 -33
- package/tools/tasks/copy.client.js.prod.ts +0 -18
- package/tools/tasks/copy.server.assets.ts +0 -38
- package/tools/tasks/copy.server.js.prod.ts +0 -16
- package/tools/tasks/css-lint.ts +0 -58
- package/tools/tasks/e2e.ts +0 -32
- package/tools/tasks/karma.run.ts +0 -18
- package/tools/tasks/karma.watch.ts +0 -9
- package/tools/tasks/minify.server.statics.ts +0 -52
- package/tools/tasks/server.prod.ts +0 -6
- package/tools/tasks/server.start.ts +0 -6
- package/tools/tasks/test.database.ts +0 -6
- package/tools/tasks/transpile.bundles.rollup.aot.ts +0 -43
- package/tools/tasks/tslint.ts +0 -64
- package/tools/tasks/watch.file.changes.dev.ts +0 -37
- package/tools/tasks/watch.key.press.dev.ts +0 -116
- package/tools/tasks/webdriver.ts +0 -6
- package/tools/utils/project/sample_util.ts +0 -18
- package/tools/utils/project.utils.ts +0 -4
- package/tools/utils/seed/build_optimizer.ts +0 -26
- package/tools/utils/seed/clean.ts +0 -35
- package/tools/utils/seed/code_change_tools.ts +0 -38
- package/tools/utils/seed/karma.start.ts +0 -10
- package/tools/utils/seed/server.ts +0 -43
- package/tools/utils/seed/sme.ts +0 -51
- package/tools/utils/seed/tasks_tools.ts +0 -70
- package/tools/utils/seed/template_locals.ts +0 -64
- package/tools/utils/seed/tsproject.ts +0 -25
- package/tools/utils/seed.utils.ts +0 -11
- package/tools/utils.ts +0 -5
- package/tsconfig.json +0 -33
- package/tslint.json +0 -120
- package/utils.ts +0 -5
package/tools/config.ts
DELETED
|
Binary file
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
@ECHO OFF
|
|
2
|
-
|
|
3
|
-
REM Datos de acceso al SQL de desarrollo
|
|
4
|
-
SET DATABASE_HOST=192.168.2.199
|
|
5
|
-
SET DATABASE_NAME=Testing_Billing
|
|
6
|
-
SET DATABASE_USER=usraccmw
|
|
7
|
-
SET DATABASE_PASSWORD=inc2001
|
|
8
|
-
SET DATABASE_TIMEOUT=600
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
REM Armo el connection string
|
|
12
|
-
SET DATABASE_CONNECTION_STRING="Server=%DATABASE_HOST%;Database=%DATABASE_NAME%;User Id=%DATABASE_USER%;Password=%DATABASE_PASSWORD%;Connection Timeout=%DATABASE_TIMEOUT%;Timeout=%DATABASE_TIMEOUT%;"
|
|
13
|
-
|
|
14
|
-
REM Datos del repositorio local
|
|
15
|
-
SET TARGET_DIR=..\..\dist\tmp_database\mssql
|
|
16
|
-
|
|
17
|
-
REM Limpio los scripts actuales
|
|
18
|
-
RMDIR %TARGET_DIR%\data /S /Q
|
|
19
|
-
RMDIR %TARGET_DIR%\functions /S /Q
|
|
20
|
-
RMDIR %TARGET_DIR%\procedures /S /Q
|
|
21
|
-
RMDIR %TARGET_DIR%\tables /S /Q
|
|
22
|
-
RMDIR %TARGET_DIR%\users /S /Q
|
|
23
|
-
|
|
24
|
-
REM Ejecuto generador de scripts
|
|
25
|
-
SchemaZen.exe script^
|
|
26
|
-
--connectionString %DATABASE_CONNECTION_STRING%^
|
|
27
|
-
--scriptDir %TARGET_DIR%^
|
|
28
|
-
--overwrite=true^
|
|
29
|
-
--verbose=true^
|
|
30
|
-
--dataTablesPattern=(.*)
|
|
31
|
-
|
|
32
|
-
PAUSE
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
@ECHO OFF
|
|
2
|
-
|
|
3
|
-
REM Datos de acceso al SQL de desarrollo
|
|
4
|
-
SET DATABASE_HOST=192.168.2.199
|
|
5
|
-
SET DATABASE_NAME=Testing_Billing
|
|
6
|
-
SET DATABASE_USER=usraccmw
|
|
7
|
-
SET DATABASE_PASSWORD=inc2001
|
|
8
|
-
SET DATABASE_TIMEOUT=600
|
|
9
|
-
|
|
10
|
-
REM Armo el connection string
|
|
11
|
-
SET DATABASE_CONNECTION_STRING="Server=%DATABASE_HOST%;Database=%DATABASE_NAME%;User Id=%DATABASE_USER%;Password=%DATABASE_PASSWORD%;Connection Timeout=%DATABASE_TIMEOUT%;Timeout=%DATABASE_TIMEOUT%;"
|
|
12
|
-
|
|
13
|
-
REM Datos del repositorio local
|
|
14
|
-
SET TARGET_DIR=..\..\src\database\mssql
|
|
15
|
-
|
|
16
|
-
REM Tablas para las que quiero incluir los scripts de data
|
|
17
|
-
SET DATA_TABLES=Task
|
|
18
|
-
|
|
19
|
-
REM Limpio los scripts actuales
|
|
20
|
-
RMDIR %TARGET_DIR%\data /S /Q
|
|
21
|
-
RMDIR %TARGET_DIR%\functions /S /Q
|
|
22
|
-
RMDIR %TARGET_DIR%\procedures /S /Q
|
|
23
|
-
RMDIR %TARGET_DIR%\tables /S /Q
|
|
24
|
-
RMDIR %TARGET_DIR%\users /S /Q
|
|
25
|
-
|
|
26
|
-
REM Ejecuto generador de scripts
|
|
27
|
-
SchemaZen.exe script^
|
|
28
|
-
--connectionString %DATABASE_CONNECTION_STRING%^
|
|
29
|
-
--scriptDir %TARGET_DIR%^
|
|
30
|
-
--overwrite=true^
|
|
31
|
-
--verbose=true^
|
|
32
|
-
--dataTables=%DATA_TABLES%
|
|
33
|
-
|
|
34
|
-
PAUSE
|
|
35
|
-
|
|
36
|
-
REM Para exportar data de todas las tablas --> --dataTablesPattern=(.*)
|
package/tools/debug.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as gulp from 'gulp';
|
|
2
|
-
import { argv } from 'yargs';
|
|
3
|
-
|
|
4
|
-
require('../gulpfile');
|
|
5
|
-
|
|
6
|
-
const TASK = argv['task'];
|
|
7
|
-
|
|
8
|
-
if (!TASK) {
|
|
9
|
-
throw new Error('You must specify a task name.');
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
console.log('**********************');
|
|
13
|
-
console.log('* angular2-seed tools ');
|
|
14
|
-
console.log('* debugging task:', TASK);
|
|
15
|
-
console.log('**********************');
|
|
16
|
-
|
|
17
|
-
gulp.start(TASK);
|
package/tools/env/base.ts
DELETED
package/tools/env/dev.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { EnvConfig } from '../../src/client/shared/config/env.config';
|
package/tools/env/prod.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
declare module 'colorguard' {
|
|
2
|
-
|
|
3
|
-
interface IOptions {
|
|
4
|
-
ignore?: string[];
|
|
5
|
-
threshold?: number;
|
|
6
|
-
whitelist?: [string, string][];
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface IColorguard {
|
|
10
|
-
(opts?: IOptions): NodeJS.ReadWriteStream;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const colorguard: IColorguard;
|
|
14
|
-
export = colorguard;
|
|
15
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
declare module 'cssnano' {
|
|
2
|
-
|
|
3
|
-
interface IOptions {
|
|
4
|
-
discardComments?: {
|
|
5
|
-
removeAll: boolean;
|
|
6
|
-
};
|
|
7
|
-
discardUnused?: boolean;
|
|
8
|
-
zindex?: boolean;
|
|
9
|
-
reduceIdents?: boolean;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
interface ICssnano {
|
|
13
|
-
(opts?: IOptions): NodeJS.ReadWriteStream;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const cssnano: ICssnano;
|
|
17
|
-
export = cssnano;
|
|
18
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
declare module 'doiuse' {
|
|
2
|
-
|
|
3
|
-
interface IOptions {
|
|
4
|
-
browsers?: string[];
|
|
5
|
-
ignore?: string[];
|
|
6
|
-
ignoreFiles?: string[];
|
|
7
|
-
onFeatureUsage?: Function;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface IDoiuse {
|
|
11
|
-
(opts?: IOptions): NodeJS.ReadWriteStream;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const doiuse: IDoiuse;
|
|
15
|
-
export = doiuse;
|
|
16
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
declare module 'express-history-api-fallback' {
|
|
2
|
-
|
|
3
|
-
import { RequestHandler } from 'express';
|
|
4
|
-
|
|
5
|
-
interface IOptions {
|
|
6
|
-
maxAge?: number;
|
|
7
|
-
root?: string;
|
|
8
|
-
lastModified?: number;
|
|
9
|
-
headers?: { [key: string]: string; };
|
|
10
|
-
dotfiles?: boolean;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function fallback(index: string, options?: IOptions): RequestHandler;
|
|
14
|
-
|
|
15
|
-
module fallback {}
|
|
16
|
-
|
|
17
|
-
export = fallback;
|
|
18
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// Use this minimalistic definition file as bluebird dependency
|
|
2
|
-
// generate a lot of errors.
|
|
3
|
-
|
|
4
|
-
declare module 'karma' {
|
|
5
|
-
var karma: IKarma;
|
|
6
|
-
export = karma;
|
|
7
|
-
interface IKarma {
|
|
8
|
-
server: {
|
|
9
|
-
start(options: any, callback: Function): void
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
declare module 'merge-stream' {
|
|
2
|
-
function mergeStream(...streams: NodeJS.ReadWriteStream[]): MergeStream;
|
|
3
|
-
interface MergeStream extends NodeJS.ReadWriteStream {
|
|
4
|
-
add(stream: NodeJS.ReadWriteStream): MergeStream;
|
|
5
|
-
}
|
|
6
|
-
module mergeStream {}
|
|
7
|
-
export = mergeStream;
|
|
8
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
declare module 'postcss-reporter' {
|
|
2
|
-
|
|
3
|
-
interface IOptions {
|
|
4
|
-
clearMessages?: boolean;
|
|
5
|
-
formatter?: Function;
|
|
6
|
-
plugins?: string[];
|
|
7
|
-
throwError?: boolean;
|
|
8
|
-
sortByPosition?: boolean;
|
|
9
|
-
positionless?: string;
|
|
10
|
-
noIcon?: boolean;
|
|
11
|
-
noPlugin?: boolean;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface IPostcssReporter {
|
|
15
|
-
(opts?: IOptions): NodeJS.ReadWriteStream;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const postcssReporter: IPostcssReporter;
|
|
19
|
-
export = postcssReporter;
|
|
20
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
declare module 'stylelint' {
|
|
2
|
-
|
|
3
|
-
interface IOptions {
|
|
4
|
-
config?: Object;
|
|
5
|
-
configFile?: string;
|
|
6
|
-
configBasedir?: string;
|
|
7
|
-
configOverrides?: Object;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface IStylelint {
|
|
11
|
-
(opts?: IOptions): NodeJS.ReadWriteStream;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const stylelint: IStylelint;
|
|
15
|
-
export = stylelint;
|
|
16
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
declare module 'systemjs-builder' {
|
|
2
|
-
class Builder {
|
|
3
|
-
constructor(configObject?: any, baseUrl?: string, configPath?: string);
|
|
4
|
-
bundle(source: string, target: string, options?: any): Promise<any>;
|
|
5
|
-
buildStatic(source: string, target: string, options?: any): Promise<any>;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
module Builder {}
|
|
9
|
-
export = Builder;
|
|
10
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
###################################
|
|
4
|
-
# Descomprimo e instalo servicio #
|
|
5
|
-
###################################
|
|
6
|
-
|
|
7
|
-
# Obtengo directorio de trabajo
|
|
8
|
-
wwwdir=/var/www
|
|
9
|
-
|
|
10
|
-
# Obtengo nombre del archivo a descomprimir
|
|
11
|
-
tarfile=`ls -t $wwwdir/*.tar.gz | grep -v backup | head -1`
|
|
12
|
-
|
|
13
|
-
# Me paro en directorio base
|
|
14
|
-
cd $wwwdir
|
|
15
|
-
|
|
16
|
-
# Hago backup de la carpeta actual
|
|
17
|
-
# tar zcvf $appName-backup.tar.gz $appName
|
|
18
|
-
|
|
19
|
-
# Descomprimo el paquete
|
|
20
|
-
if [ $appName != "speech-analytic" ]; then
|
|
21
|
-
mv $appName speech-analytic
|
|
22
|
-
fi
|
|
23
|
-
tar zxvf $tarfile
|
|
24
|
-
if [ $appName != "speech-analytic" ]; then
|
|
25
|
-
mv speech-analytic $appName
|
|
26
|
-
fi
|
|
27
|
-
cd $appName
|
|
28
|
-
|
|
29
|
-
#########################
|
|
30
|
-
# Reinicio el servicio #
|
|
31
|
-
#########################
|
|
32
|
-
|
|
33
|
-
# Reinicio la aplicacion
|
|
34
|
-
cd ..
|
|
35
|
-
pm2 restart $appName
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import * as gulp from 'gulp';
|
|
2
|
-
import * as gulpLoadPlugins from 'gulp-load-plugins';
|
|
3
|
-
import * as merge from 'merge-stream';
|
|
4
|
-
import * as log from 'fancy-log';
|
|
5
|
-
import { Chalk } from 'chalk';
|
|
6
|
-
import { join, resolve } from 'path';
|
|
7
|
-
|
|
8
|
-
import { APP_SERVER_SRC, APP_SERVER_DEST, TOOLS_DIR, TEMPLATE_CONFIG } from '../config';
|
|
9
|
-
import { makeTsProject, TemplateLocalsBuilder } from '../utils';
|
|
10
|
-
|
|
11
|
-
// Obtengo plugins de gulp
|
|
12
|
-
const chalk: Chalk = require('chalk');
|
|
13
|
-
const plugins = <any>gulpLoadPlugins();
|
|
14
|
-
|
|
15
|
-
// Flag de primera ejecución
|
|
16
|
-
let firstTime: boolean = true;
|
|
17
|
-
|
|
18
|
-
// Ejecuta transpile del app.server
|
|
19
|
-
export = () => {
|
|
20
|
-
// Proyecto de compilación TS
|
|
21
|
-
let tsProject: any;
|
|
22
|
-
// Archivos de typings locales
|
|
23
|
-
let typings = gulp.src([
|
|
24
|
-
TOOLS_DIR + '/manual_typings/**/*.d.ts'
|
|
25
|
-
]);
|
|
26
|
-
// Archivos a compilar
|
|
27
|
-
let projectFiles = gulp.src([
|
|
28
|
-
join(APP_SERVER_SRC, '../app.server.ts'),
|
|
29
|
-
], {base : 'src'});
|
|
30
|
-
|
|
31
|
-
// Solo uso los typings en la primer compilación
|
|
32
|
-
if (firstTime) {
|
|
33
|
-
// La primera vez ejecuto build usando los typings manuales
|
|
34
|
-
tsProject = makeTsProject({}, APP_SERVER_SRC);
|
|
35
|
-
projectFiles = merge(typings, projectFiles);
|
|
36
|
-
} else {
|
|
37
|
-
// Las siguientes los hago typeless para acelerar
|
|
38
|
-
tsProject = makeTsProject({ /* isolatedModules: true */ }, APP_SERVER_SRC);
|
|
39
|
-
projectFiles = projectFiles.pipe(plugins.cached());
|
|
40
|
-
log('Fastbuild ' + chalk.cyan('Ejecutando compilación typeless.'));
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// Actualizo flag
|
|
44
|
-
firstTime = false;
|
|
45
|
-
|
|
46
|
-
// Inicializo proyecto
|
|
47
|
-
let result: any = projectFiles
|
|
48
|
-
.pipe(plugins.plumber())
|
|
49
|
-
.pipe(plugins.sourcemaps.init())
|
|
50
|
-
.pipe(tsProject());
|
|
51
|
-
|
|
52
|
-
// Ejecuto la compilación y copio el resultado en carpeta destino
|
|
53
|
-
return result.js
|
|
54
|
-
.pipe(plugins.sourcemaps.write({ includeContent: false, sourceRoot: resolve('./src') }))
|
|
55
|
-
.pipe(plugins.template(new TemplateLocalsBuilder().withStringifiedSystemConfigDev().build(), TEMPLATE_CONFIG))
|
|
56
|
-
.pipe(gulp.dest(resolve(APP_SERVER_DEST, '..')));
|
|
57
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as gulp from 'gulp';
|
|
2
|
-
import { join } from 'path';
|
|
3
|
-
|
|
4
|
-
import { APP_CLIENT_DEST, APP_CLIENT_SRC, TEMP_FILES } from '../config';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Executes the build process, copying the assets located in `src/client` over to the appropriate
|
|
8
|
-
* `dist/dev` directory.
|
|
9
|
-
*/
|
|
10
|
-
export = () => {
|
|
11
|
-
let paths: string[] = [
|
|
12
|
-
join(APP_CLIENT_SRC, '**'),
|
|
13
|
-
'!' + join(APP_CLIENT_SRC, '**', '*.ts'),
|
|
14
|
-
'!' + join(APP_CLIENT_SRC, '**', '*.scss')
|
|
15
|
-
].concat(TEMP_FILES.map((p) => { return '!' + p; }));
|
|
16
|
-
|
|
17
|
-
return gulp.src(paths)
|
|
18
|
-
.pipe(gulp.dest(APP_CLIENT_DEST));
|
|
19
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as gulp from 'gulp';
|
|
2
|
-
import { join } from 'path';
|
|
3
|
-
|
|
4
|
-
import { APP_CLIENT_DEST, APP_CLIENT_SRC, ASSETS_SRC, TEMP_FILES } from '../config';
|
|
5
|
-
|
|
6
|
-
// TODO There should be more elegant to prevent empty directories from copying
|
|
7
|
-
let es: any = require('event-stream');
|
|
8
|
-
var onlyDirs = function (es: any) {
|
|
9
|
-
return es.map(function (file: any, cb: any) {
|
|
10
|
-
if (file.stat.isFile()) {
|
|
11
|
-
return cb(null, file);
|
|
12
|
-
} else {
|
|
13
|
-
return cb();
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Executes the build process, copying the assets located in `src/client` over to the appropriate
|
|
20
|
-
* `dist/prod` directory.
|
|
21
|
-
*/
|
|
22
|
-
export = () => {
|
|
23
|
-
return gulp.src([
|
|
24
|
-
join(APP_CLIENT_SRC, '**'),
|
|
25
|
-
'!' + join(APP_CLIENT_SRC, '**', '*.ts'),
|
|
26
|
-
'!' + join(APP_CLIENT_SRC, '**', '*.html'),
|
|
27
|
-
'!' + join(APP_CLIENT_SRC, '**', '*.scss')
|
|
28
|
-
].concat(TEMP_FILES.map((p) => { return '!' + p; })),{base:APP_CLIENT_SRC})
|
|
29
|
-
.pipe(onlyDirs(es))
|
|
30
|
-
.pipe(gulp.dest(APP_CLIENT_DEST));
|
|
31
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { join } from 'path';
|
|
2
|
-
import * as Builder from 'systemjs-builder';
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
BOOTSTRAP_MODULE_AOT,
|
|
6
|
-
JS_PROD_APP_BUNDLE,
|
|
7
|
-
JS_DEST,
|
|
8
|
-
SYSTEM_JS_CONFIG_PROD,
|
|
9
|
-
TMP_CLIENT_DIR,
|
|
10
|
-
PRESERVE_SOURCE_MAPS,
|
|
11
|
-
} from '../config';
|
|
12
|
-
|
|
13
|
-
const BUNDLER_OPTIONS = {
|
|
14
|
-
format: 'cjs',
|
|
15
|
-
minify: true,
|
|
16
|
-
mangle: false,
|
|
17
|
-
sourceMaps: PRESERVE_SOURCE_MAPS,
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Executes the build process, bundling the JavaScript files using the SystemJS builder.
|
|
22
|
-
*/
|
|
23
|
-
export = (done: any) => {
|
|
24
|
-
let builder = new Builder(SYSTEM_JS_CONFIG_PROD);
|
|
25
|
-
builder
|
|
26
|
-
.buildStatic(join(TMP_CLIENT_DIR, BOOTSTRAP_MODULE_AOT),
|
|
27
|
-
join(JS_DEST, JS_PROD_APP_BUNDLE),
|
|
28
|
-
BUNDLER_OPTIONS)
|
|
29
|
-
.then(() => done())
|
|
30
|
-
.catch((err: any) => done(err));
|
|
31
|
-
};
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { parallel } from 'async';
|
|
2
|
-
import { writeFile } from 'fs';
|
|
3
|
-
import { join } from 'path';
|
|
4
|
-
|
|
5
|
-
import { TMP_CLIENT_DIR, BOOTSTRAP_MODULE_AOT, ROLLUP_INCLUDE_DIR, ROLLUP_INCLUDES, ROLLUP_NAMED_EXPORTS, PRESERVE_SOURCE_MAPS } from '../config';
|
|
6
|
-
|
|
7
|
-
const rollup = require('rollup');
|
|
8
|
-
const globals = require('rollup-plugin-node-globals');
|
|
9
|
-
const builtins = require('rollup-plugin-node-builtins');
|
|
10
|
-
const json = require('rollup-plugin-json');
|
|
11
|
-
const includePaths = require('rollup-plugin-includepaths');
|
|
12
|
-
const nodeResolve = require('rollup-plugin-node-resolve');
|
|
13
|
-
const commonjs = require('rollup-plugin-commonjs');
|
|
14
|
-
|
|
15
|
-
const config = {
|
|
16
|
-
input: join(TMP_CLIENT_DIR, BOOTSTRAP_MODULE_AOT),
|
|
17
|
-
treeshake: true,
|
|
18
|
-
output: {
|
|
19
|
-
sourcemap: false,
|
|
20
|
-
name: 'main',
|
|
21
|
-
},
|
|
22
|
-
onwarn: function(warning) {
|
|
23
|
-
// Evito los warning que se generan por el codigo compilado
|
|
24
|
-
if ((warning.code === 'THIS_IS_UNDEFINED') ||
|
|
25
|
-
(warning.code === 'CIRCULAR_DEPENDENCY' && !warning.importer.indexOf('node_modules\\moment\\'))
|
|
26
|
-
) return;
|
|
27
|
-
// Cualquier otro mensaje lo logueo
|
|
28
|
-
console.warn(warning.message);
|
|
29
|
-
},
|
|
30
|
-
plugins: [
|
|
31
|
-
globals(),
|
|
32
|
-
builtins(),
|
|
33
|
-
json({
|
|
34
|
-
include: 'node_modules/**',
|
|
35
|
-
exclude: [],
|
|
36
|
-
preferConst: true,
|
|
37
|
-
indent: ' '
|
|
38
|
-
}),
|
|
39
|
-
includePaths({
|
|
40
|
-
include: ROLLUP_INCLUDES,
|
|
41
|
-
paths: [join(TMP_CLIENT_DIR, 'app')],
|
|
42
|
-
external: [],
|
|
43
|
-
extensions: ['.js', '.json', '.html', '.ts']
|
|
44
|
-
}),
|
|
45
|
-
nodeResolve({
|
|
46
|
-
jsnext: true,
|
|
47
|
-
main: true,
|
|
48
|
-
module: false,
|
|
49
|
-
browser: true,
|
|
50
|
-
preferBuiltins: true,
|
|
51
|
-
modulesOnly: false,
|
|
52
|
-
}),
|
|
53
|
-
commonjs({
|
|
54
|
-
include: ROLLUP_INCLUDE_DIR,
|
|
55
|
-
namedExports: ROLLUP_NAMED_EXPORTS,
|
|
56
|
-
}),
|
|
57
|
-
]
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export = (done: any) => {
|
|
61
|
-
rollup
|
|
62
|
-
.rollup(config)
|
|
63
|
-
.then((bundle: any) => bundle.generate({
|
|
64
|
-
format: 'iife',
|
|
65
|
-
sourcemap: PRESERVE_SOURCE_MAPS,
|
|
66
|
-
})
|
|
67
|
-
)
|
|
68
|
-
.then((result: any) => {
|
|
69
|
-
const path = join(TMP_CLIENT_DIR, 'bundle.js');
|
|
70
|
-
|
|
71
|
-
parallel(getTasks(path, result), (error: any, results: boolean[]) => {
|
|
72
|
-
if (error && results.indexOf(false) === -1) {
|
|
73
|
-
console.error(error);
|
|
74
|
-
process.exit(0);
|
|
75
|
-
}
|
|
76
|
-
done();
|
|
77
|
-
});
|
|
78
|
-
})
|
|
79
|
-
.catch((error: any) => {
|
|
80
|
-
console.error(error);
|
|
81
|
-
process.exit(0);
|
|
82
|
-
});
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
function getTasks(path: string, result: any): any[] {
|
|
86
|
-
const tasks = [
|
|
87
|
-
(callback: any) => {
|
|
88
|
-
return writeFile(
|
|
89
|
-
path,
|
|
90
|
-
result.code + (PRESERVE_SOURCE_MAPS ? '\n//# sourceMappingURL=bundle.js.map' : ''),
|
|
91
|
-
(error: any) => callback(null, !error)
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
];
|
|
95
|
-
if (PRESERVE_SOURCE_MAPS) {
|
|
96
|
-
tasks.push((callback: any) =>
|
|
97
|
-
writeFile(path + '.map', result.map.toString(), (error: any) => callback(null, !error))
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
return tasks;
|
|
101
|
-
}
|