intermediate-component-sa 1.0.4 → 1.1.0
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/CHANGELOG.md +11 -0
- package/README.md +1 -20
- package/build-dev.bat +2 -0
- package/build-prod-aot.bat +2 -0
- package/build-prod-rollup-aot.bat +2 -0
- package/build-prod.bat +2 -0
- package/config.ts +4 -0
- package/gulpfile.ts +172 -0
- package/index.js +10 -1
- package/karma.conf.js +124 -0
- package/package.json +340 -15
- package/postgrator-test.json +9 -0
- package/postgrator.json +9 -0
- package/src/app.server.ts +4 -0
- package/src/client/app/app.component.ts +37 -0
- package/src/client/app/app.html +6 -0
- package/src/client/app/app.module.ts +36 -0
- package/src/client/app/app.routing.ts +7 -0
- package/src/client/app/hot_loader_main.ts +14 -0
- package/src/client/app/main-aot.ts +8 -0
- package/src/client/app/main.ts +8 -0
- package/src/client/app/rxjs-operators.ts +15 -0
- package/src/client/index.html +90 -0
- package/src/client/tsconfig.json +44 -0
- package/src/server/config/app.config.ts +57 -0
- package/src/server/config/jwt.config.ts +4 -0
- package/src/server/config/logger.config.ts +161 -0
- package/src/server/config/mssql.config.ts +30 -0
- package/src/server/config/redis.config.ts +10 -0
- package/src/server/config/server.config.ts +20 -0
- package/src/server/config/templates.config.ts +41 -0
- package/src/server/crypt.ts +37 -0
- package/src/server/customRequest.ts +609 -0
- package/src/server/index.ts +231 -0
- package/src/server/interfaces/cleaner.interface.ts +3 -0
- package/src/server/interfaces/supervisor.interface.ts +3 -0
- package/src/server/routes-centralized.ts +36 -0
- package/src/server/routes.ts +6 -0
- package/src/server/services/index.ts +10 -0
- package/src/server/services/routes.service.ts +11 -0
- package/src/server/shared/file-manager.ts +1007 -0
- package/src/server/shared/http.shared.ts +49 -0
- package/src/server/shared/promises.shared.ts +13 -0
- package/src/server/shared/security.shared.ts +90 -0
- package/src/server/ssl/star_inconcertcc_com.key +28 -0
- package/src/server/ssl/star_inconcertcc_com.pem +62 -0
- package/src/server/tsconfig.json +38 -0
- package/tools/build.js.prod.ts +40 -0
- package/tools/config/project.config.ts +718 -0
- package/tools/config.ts +4 -0
- package/tools/database/SchemaZen.exe +0 -0
- package/tools/database/generate-all-data-scripts.bat +32 -0
- package/tools/database/generate-database-scripts.bat +36 -0
- package/tools/debug.ts +17 -0
- package/tools/env/base.ts +8 -0
- package/tools/env/dev.ts +9 -0
- package/tools/env/env-config.interface.ts +1 -0
- package/tools/env/prod.ts +10 -0
- package/tools/manual_typings/project/sample.package.d.ts +3 -0
- package/tools/manual_typings/seed/angular2-hot-loader.d.ts +9 -0
- package/tools/manual_typings/seed/autoprefixer.d.ts +13 -0
- package/tools/manual_typings/seed/colorguard.d.ts +15 -0
- package/tools/manual_typings/seed/connect-livereload.d.ts +5 -0
- package/tools/manual_typings/seed/cssnano.d.ts +18 -0
- package/tools/manual_typings/seed/doiuse.d.ts +16 -0
- package/tools/manual_typings/seed/express-history-api-fallback.d.ts +18 -0
- package/tools/manual_typings/seed/istream.d.ts +10 -0
- package/tools/manual_typings/seed/karma.d.ts +12 -0
- package/tools/manual_typings/seed/merge-stream.d.ts +8 -0
- package/tools/manual_typings/seed/open.d.ts +8 -0
- package/tools/manual_typings/seed/postcss-reporter.d.ts +20 -0
- package/tools/manual_typings/seed/slash.d.ts +5 -0
- package/tools/manual_typings/seed/stylelint.d.ts +16 -0
- package/tools/manual_typings/seed/systemjs-builder.d.ts +10 -0
- package/tools/manual_typings/seed/tildify.d.ts +5 -0
- package/tools/manual_typings/seed/tiny-lr.d.ts +10 -0
- package/tools/manual_typings/seed/walk.d.ts +10 -0
- package/tools/scripts/install.speech-analytic.sh +35 -0
- package/tools/tasks/build.app.server.ts +57 -0
- package/tools/tasks/build.assets.dev.ts +19 -0
- package/tools/tasks/build.assets.prod.ts +31 -0
- package/tools/tasks/build.bundles.app.aot.ts +31 -0
- package/tools/tasks/build.bundles.app.rollup.aot.ts +101 -0
- package/tools/tasks/build.bundles.app.ts +31 -0
- package/tools/tasks/build.bundles.ts +45 -0
- package/tools/tasks/build.database.scripts.runner.ts +137 -0
- package/tools/tasks/build.database.scripts.ts +27 -0
- package/tools/tasks/build.flags.ts +9 -0
- package/tools/tasks/build.fonts.ts +9 -0
- package/tools/tasks/build.html_css.ts +126 -0
- package/tools/tasks/build.index.dev.ts +68 -0
- package/tools/tasks/build.index.prod.ts +64 -0
- package/tools/tasks/build.js.dev.ts +66 -0
- package/tools/tasks/build.js.prod.aot.ts +44 -0
- package/tools/tasks/build.js.prod.rollup.aot.ts +50 -0
- package/tools/tasks/build.js.prod.ts +40 -0
- package/tools/tasks/build.packages.prod.ts +19 -0
- package/tools/tasks/build.server.dev.ts +59 -0
- package/tools/tasks/build.server.prod.ts +31 -0
- package/tools/tasks/build.server.statics.ts +24 -0
- package/tools/tasks/build.skins.ts +51 -0
- package/tools/tasks/build.sme.prod.aot.ts +6 -0
- package/tools/tasks/build.sme.prod.rollup.aot.ts +6 -0
- package/tools/tasks/build.sme.prod.ts +6 -0
- package/tools/tasks/build.tar.prod.ts +17 -0
- package/tools/tasks/build.test.database.scripts.ts +52 -0
- package/tools/tasks/clean.dev.ts +7 -0
- package/tools/tasks/clean.prod.ts +7 -0
- package/tools/tasks/compile.ahead.prod.ts +65 -0
- package/tools/tasks/copy.client.js.prod.rollup.aot.ts +33 -0
- package/tools/tasks/copy.client.js.prod.ts +18 -0
- package/tools/tasks/copy.server.assets.ts +38 -0
- package/tools/tasks/copy.server.js.prod.ts +16 -0
- package/tools/tasks/css-lint.ts +58 -0
- package/tools/tasks/e2e.ts +32 -0
- package/tools/tasks/karma.run.ts +18 -0
- package/tools/tasks/karma.watch.ts +9 -0
- package/tools/tasks/minify.server.statics.ts +52 -0
- package/tools/tasks/server.prod.ts +6 -0
- package/tools/tasks/server.start.ts +6 -0
- package/tools/tasks/test.database.ts +6 -0
- package/tools/tasks/transpile.bundles.rollup.aot.ts +43 -0
- package/tools/tasks/tslint.ts +64 -0
- package/tools/tasks/watch.file.changes.dev.ts +37 -0
- package/tools/tasks/watch.key.press.dev.ts +116 -0
- package/tools/tasks/webdriver.ts +6 -0
- package/tools/utils/project/sample_util.ts +18 -0
- package/tools/utils/project.utils.ts +4 -0
- package/tools/utils/seed/build_optimizer.ts +26 -0
- package/tools/utils/seed/clean.ts +35 -0
- package/tools/utils/seed/code_change_tools.ts +38 -0
- package/tools/utils/seed/karma.start.ts +10 -0
- package/tools/utils/seed/server.ts +43 -0
- package/tools/utils/seed/sme.ts +51 -0
- package/tools/utils/seed/tasks_tools.ts +70 -0
- package/tools/utils/seed/template_locals.ts +64 -0
- package/tools/utils/seed/tsproject.ts +25 -0
- package/tools/utils/seed.utils.ts +11 -0
- package/tools/utils.ts +5 -0
- package/tsconfig.json +33 -0
- package/tslint.json +120 -0
- package/utils.ts +5 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as log from 'fancy-log';
|
|
2
|
+
import { argv } from 'yargs';
|
|
3
|
+
import { join } from 'path';
|
|
4
|
+
import { Chalk } from 'chalk';
|
|
5
|
+
|
|
6
|
+
import * as Config from '../../config';
|
|
7
|
+
|
|
8
|
+
// Obtengo plugins de gulp
|
|
9
|
+
const chalk: Chalk = require('chalk');
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Builds an object consisting of the base configuration provided by confg/config.ts, the additional
|
|
13
|
+
* project specific overrides as defined in config/project.config.ts and including the base environment config as defined in env/base.ts
|
|
14
|
+
* and the environment specific overrides (for instance if env=dev then as defined in env/dev.ts).
|
|
15
|
+
*/
|
|
16
|
+
export class TemplateLocalsBuilder {
|
|
17
|
+
private stringifySystemConfigDev = false;
|
|
18
|
+
private stringifyEnvConfig = true;
|
|
19
|
+
|
|
20
|
+
withStringifiedSystemConfigDev() {
|
|
21
|
+
this.stringifySystemConfigDev = true;
|
|
22
|
+
return this;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
withoutStringifiedEnvConfig() {
|
|
26
|
+
this.stringifyEnvConfig = false;
|
|
27
|
+
return this;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
build() {
|
|
31
|
+
const configEnvName = argv['env-config'] || argv['config-env'] || 'dev';
|
|
32
|
+
const configPath = Config.getPluginConfig('environment-config');
|
|
33
|
+
const envOnlyConfig = this.getConfig(configPath, configEnvName);
|
|
34
|
+
const baseConfig = this.getConfig(configPath, 'base');
|
|
35
|
+
|
|
36
|
+
if (!envOnlyConfig) {
|
|
37
|
+
throw new Error(configEnvName + ' is an invalid configuration name');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const envConfig = Object.assign({}, baseConfig, envOnlyConfig);
|
|
41
|
+
|
|
42
|
+
let locals = Object.assign({},
|
|
43
|
+
Config,
|
|
44
|
+
{ ENV_CONFIG: this.stringifyEnvConfig ? JSON.stringify(envConfig) : envConfig }
|
|
45
|
+
);
|
|
46
|
+
if (this.stringifySystemConfigDev) {
|
|
47
|
+
Object.assign(locals, {SYSTEM_JS_CONFIG_DEV: JSON.stringify(Config.SYSTEM_JS_CONFIG_DEV)});
|
|
48
|
+
}
|
|
49
|
+
return locals;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
private getConfig(path: string, env: string) {
|
|
53
|
+
const configPath = join(path, env);
|
|
54
|
+
let config: any;
|
|
55
|
+
try {
|
|
56
|
+
config = JSON.parse(JSON.stringify(require(configPath)));
|
|
57
|
+
} catch (e) {
|
|
58
|
+
config = null;
|
|
59
|
+
log(chalk.red(e.message));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return config;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as gulpLoadPlugins from 'gulp-load-plugins';
|
|
2
|
+
import { join } from 'path';
|
|
3
|
+
import ts = require('gulp-typescript/release/main');
|
|
4
|
+
|
|
5
|
+
import { APP_CLIENT_SRC, APP_NAME } from '../../config';
|
|
6
|
+
|
|
7
|
+
const plugins = <any>gulpLoadPlugins();
|
|
8
|
+
|
|
9
|
+
let tsProjects: any = {};
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Creates a TypeScript project with the given options using the gulp typescript plugin.
|
|
13
|
+
* @param {Object} options - The additional options for the project configuration.
|
|
14
|
+
*/
|
|
15
|
+
export function makeTsProject(options: ts.Settings = {}, pathToTsConfig: string = APP_CLIENT_SRC, projectName = 'tsconfig.json') {
|
|
16
|
+
let optionsHash = JSON.stringify(options);
|
|
17
|
+
if (!tsProjects[optionsHash]) {
|
|
18
|
+
let config = Object.assign({
|
|
19
|
+
typescript: require('typescript')
|
|
20
|
+
}, options);
|
|
21
|
+
tsProjects[optionsHash] =
|
|
22
|
+
plugins.typescript.createProject(join(pathToTsConfig, projectName), config);
|
|
23
|
+
}
|
|
24
|
+
return tsProjects[optionsHash];
|
|
25
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This barrel file provides the export for the utilities provided by the seed.
|
|
3
|
+
*/
|
|
4
|
+
export * from './seed/build_optimizer';
|
|
5
|
+
export * from './seed/clean';
|
|
6
|
+
export * from './seed/code_change_tools';
|
|
7
|
+
export * from './seed/server';
|
|
8
|
+
export * from './seed/sme';
|
|
9
|
+
export * from './seed/tasks_tools';
|
|
10
|
+
export * from './seed/template_locals';
|
|
11
|
+
export * from './seed/tsproject';
|
package/tools/utils.ts
ADDED
package/tsconfig.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es5",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"declaration": false,
|
|
6
|
+
"removeComments": true,
|
|
7
|
+
"noLib": false,
|
|
8
|
+
"emitDecoratorMetadata": true,
|
|
9
|
+
"experimentalDecorators": true,
|
|
10
|
+
"lib": ["es6", "es2015", "dom"],
|
|
11
|
+
"sourceMap": true,
|
|
12
|
+
"pretty": true,
|
|
13
|
+
"allowUnreachableCode": false,
|
|
14
|
+
"allowUnusedLabels": false,
|
|
15
|
+
"noImplicitAny": false,
|
|
16
|
+
"noImplicitReturns": true,
|
|
17
|
+
"noImplicitUseStrict": false,
|
|
18
|
+
"noFallthroughCasesInSwitch": true,
|
|
19
|
+
"typeRoots": [
|
|
20
|
+
"./node_modules/@types",
|
|
21
|
+
"./node_modules"
|
|
22
|
+
],
|
|
23
|
+
"types": [
|
|
24
|
+
"node"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"exclude": [
|
|
28
|
+
"node_modules",
|
|
29
|
+
"dist",
|
|
30
|
+
"src"
|
|
31
|
+
],
|
|
32
|
+
"compileOnSave": false
|
|
33
|
+
}
|
package/tslint.json
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rulesDirectory": [
|
|
3
|
+
"node_modules/codelyzer",
|
|
4
|
+
"node_modules/rxjs-tslint"
|
|
5
|
+
],
|
|
6
|
+
"rules": {
|
|
7
|
+
"class-name": true,
|
|
8
|
+
"curly": false,
|
|
9
|
+
"eofline": true,
|
|
10
|
+
"indent": [false],
|
|
11
|
+
"max-line-length": [true, 2000],
|
|
12
|
+
"member-ordering": [false,
|
|
13
|
+
{
|
|
14
|
+
"order": [
|
|
15
|
+
"static-field",
|
|
16
|
+
"instance-field",
|
|
17
|
+
"constructor",
|
|
18
|
+
"public-instance-method",
|
|
19
|
+
"protected-instance-method",
|
|
20
|
+
"private-instance-method"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"no-arg": true,
|
|
25
|
+
"no-construct": true,
|
|
26
|
+
"no-duplicate-variable": true,
|
|
27
|
+
"no-empty": false,
|
|
28
|
+
"no-eval": true,
|
|
29
|
+
"no-trailing-whitespace": true,
|
|
30
|
+
"no-unused-expression": true,
|
|
31
|
+
"no-unused-variable": false,
|
|
32
|
+
"no-use-before-declare": true,
|
|
33
|
+
"one-line": [true,
|
|
34
|
+
"check-open-brace",
|
|
35
|
+
"check-catch",
|
|
36
|
+
"check-else",
|
|
37
|
+
"check-whitespace"
|
|
38
|
+
],
|
|
39
|
+
"quotemark": [true, "single"],
|
|
40
|
+
"semicolon": [true, "always"],
|
|
41
|
+
"trailing-comma": [true, "always"],
|
|
42
|
+
"triple-equals": true,
|
|
43
|
+
"variable-name": false,
|
|
44
|
+
"directive-selector": [true, "attribute", "", "camelCase"],
|
|
45
|
+
"directive-class-suffix": true,
|
|
46
|
+
"component-selector": [true, "element", "", "kebab-case"],
|
|
47
|
+
"component-class-suffix": true,
|
|
48
|
+
"use-input-property-decorator": true,
|
|
49
|
+
"use-output-property-decorator": true,
|
|
50
|
+
"use-host-property-decorator": true,
|
|
51
|
+
"no-input-rename": false,
|
|
52
|
+
"no-output-rename": false,
|
|
53
|
+
"use-pipe-transform-interface": true,
|
|
54
|
+
"rxjs-collapse-imports": true,
|
|
55
|
+
"rxjs-pipeable-operators-only": true,
|
|
56
|
+
"rxjs-no-static-observable-methods": true,
|
|
57
|
+
"rxjs-proper-imports": true
|
|
58
|
+
},
|
|
59
|
+
"jsRules": {
|
|
60
|
+
"align": [true,
|
|
61
|
+
"parameters",
|
|
62
|
+
"statements"
|
|
63
|
+
],
|
|
64
|
+
"class-name": true,
|
|
65
|
+
"curly": false,
|
|
66
|
+
"eofline": true,
|
|
67
|
+
"forin": true,
|
|
68
|
+
"indent": [true, "spaces"],
|
|
69
|
+
"jsdoc-format": true,
|
|
70
|
+
"label-position": true,
|
|
71
|
+
"max-line-length": [true, 5000],
|
|
72
|
+
"new-parens": true,
|
|
73
|
+
"no-arg": true,
|
|
74
|
+
"no-bitwise": false,
|
|
75
|
+
"no-conditional-assignment": false,
|
|
76
|
+
"no-consecutive-blank-lines": [true],
|
|
77
|
+
"no-console": false,
|
|
78
|
+
"no-construct": true,
|
|
79
|
+
"no-debugger": true,
|
|
80
|
+
"no-duplicate-variable": false,
|
|
81
|
+
"no-empty": true,
|
|
82
|
+
"no-eval": true,
|
|
83
|
+
"no-reference": true,
|
|
84
|
+
"no-shadowed-variable": true,
|
|
85
|
+
"no-string-literal": false,
|
|
86
|
+
"no-switch-case-fall-through": false,
|
|
87
|
+
"no-trailing-whitespace": true,
|
|
88
|
+
"no-unused-expression": true,
|
|
89
|
+
"no-use-before-declare": false,
|
|
90
|
+
"object-literal-sort-keys": false,
|
|
91
|
+
"one-line": [true,
|
|
92
|
+
"check-catch",
|
|
93
|
+
"check-else",
|
|
94
|
+
"check-finally",
|
|
95
|
+
"check-open-brace",
|
|
96
|
+
"check-whitespace"
|
|
97
|
+
],
|
|
98
|
+
"one-variable-per-declaration": [true, "ignore-for-loop"],
|
|
99
|
+
"quotemark": [true, "double", "avoid-escape"],
|
|
100
|
+
"radix": false,
|
|
101
|
+
"semicolon": [true, "always"],
|
|
102
|
+
"switch-default": true,
|
|
103
|
+
"trailing-comma": [true, "always"],
|
|
104
|
+
"triple-equals": [true, "allow-null-check"],
|
|
105
|
+
"use-isnan": true,
|
|
106
|
+
"variable-name": [true,
|
|
107
|
+
"ban-keywords",
|
|
108
|
+
"check-format",
|
|
109
|
+
"allow-pascal-case"
|
|
110
|
+
],
|
|
111
|
+
"whitespace": [true,
|
|
112
|
+
"check-branch",
|
|
113
|
+
"check-decl",
|
|
114
|
+
"check-operator",
|
|
115
|
+
"check-separator",
|
|
116
|
+
"check-type",
|
|
117
|
+
"check-typecast"
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
}
|