<commit_before>/**
 * @file index.js
 * XSD Schema to HTML5 Web Form
 * @author <NAME> <<EMAIL>>
 * @copyright Copyright (C) 2017 EEA, Eworx, <NAME>. All rights reserved.
 */
//TODO:
// Add a file with all files checksums  - Check if files have been changed after build
// File 1 checksum = something
// File 2 checksum = something
// Total checksum (File1 checksum, File2 checksum)
// https://github.com/alexgorbatchev/node-crc
// https://github.com/dshaw/checksum
// https://www.npmjs.com/package/crc32-java - https://npm.runkit.com/crc32-java - https://runkit.com/embed/ae2bwnaq5oth | + nodemon like app server side(?) + git it as timemachine(?)
// Check 1: If "nodemon" has been triggered=>log envriroment user, file etc=>git commit changes (rollback + staging capability + image/clone new server on the fly + update server farm on the fly + farm auto synch, works with database too? +database farm synch - constant pull mode)
// Check 2: check total checksum=>nodes(app area) checksum=>each file checksum - Can check remote files (e.g. html files source) 
// Total Checksum => each app checksum (e.g. webforms) => each webform file
// Stealth Mode: flag true. Don't accept changes. If something change, rollback => alert.
// Don't know: TOTEST: file created(can only be copied pasted?) datetime numeric stamp + ":" + text crc  = Unique?

// Translation Server (possible method) 
// crc phrace "Insert value into [field] to blah blah"
// client replace in your request field title with generic [field]
// client send phrase to server=>server textToCrc=>select by crc
// client check translation server for field if available and replace [field] with translated text
// Server Database: Id, crc, text
// Create crc map => En[thiscrc]+{id} => Fr[thatcrc]+{id} and so on
// in case of duplicate crc (if returns array) then match entire text to find the correct one (server side)
// ?
// phrase 1: This is a test 
// phrase 2: It is not
// word[This]=>word[is]=>word[a]=>word[test]
// word[It]=>=>word[is]=>word[not]
// is=>[a, not] One instance each word as an object=>multiple connections (polymorphic type?)
// $this.$is a javascript class/object
// $go(=action, expects:type confirmation).$there(=location, action:()=>{moveThere(), define:()=>{getDefinition()}, answer:()=>{getLocation();}}})
// $what(=definintionquestion, expects: type answer.$is(=definition).$there(..)
// $where(=locationquestion, expects: type answer.$are(=definition).$you

'use strict';

import fs from 'fs';
import path from 'path';
import ncp from 'ncp';<commit_msg>TODO comments update<commit_after>/**
 * @file index.js
 * XSD Schema to HTML5 Web Form
 * @author <NAME> <<EMAIL>>
 * @copyright Copyright (C) 2017 EEA, Eworx, George Bouris. All rights reserved.
 */
//TODO:
// Add a file with all files checksums  - Check if files have been changed after build
// File 1 checksum = something
// File 2 checksum = something
// Total checksum (File1 checksum, File2 checksum)
// https://github.com/alexgorbatchev/node-crc
// https://github.com/dshaw/checksum
// https://www.npmjs.com/package/crc32-java - https://npm.runkit.com/crc32-java - https://runkit.com/embed/ae2bwnaq5oth | + nodemon like app server side(?) + git it as timemachine(?)
// Check 1: If "nodemon" has been triggered=>log envriroment user, file etc=>git commit changes (rollback + staging capability + image/clone new server on the fly + update server farm on the fly + farm auto synch, works with database too? +database farm synch - constant pull mode)
// Check 2: check total checksum=>nodes(app area) checksum=>each file checksum - Can check remote files (e.g. html files source) 
// Total Checksum => each app checksum (e.g. webforms) => each webform file
// Stealth Mode: flag true. Don't accept changes. If something change, rollback => alert.
// Don't know: TOTEST: file created(can only be copied pasted?) datetime numeric stamp + ":" + text crc  = Unique?

// Translation Server (possible method) 
// crc phrace "Insert value into [field] to blah blah"
// client replace in your request field title with generic [field]
// client send phrase to server=>server textToCrc=>select by crc
// client check translation server for field if available and replace [field] with translated text
// Server Database: Id, crc, text
// Create crc map => En[thiscrc]+{id} => Fr[thatcrc]+{id} and so on
// in case of duplicate crc (if returns array) then match entire text to find the correct one (server side)
// ?
// phrase 1: This is a test 
// phrase 2: It is not
// word[This]=>word[is]=>word[a]=>word[test]
// word[It]=>=>word[is]=>word[not]
// is=>[a, not] One instance each word as an object=>multiple connections (polymorphic type?)
// $this.$is a javascript class/object
// $go(=action, expects:type confirmation).$there(=location, action:()=>{moveThere(), define:()=>{getDefinition()}, answer:()=>{getLocation();}}})
// $what(=question.definintion, expects: type answer.$is(=definition).$there(..)
// $where(=question.location, expects: type answer.$are(=definition).$you

'use strict';

import fs from 'fs';
import path from 'path';
import ncp from 'ncp';
{'fraction_non_alphanumeric': 0.14291307752545027, 'fraction_numerical': 0.0074393108848864525, 'mean_word_length': 4.245379876796714, 'pattern_counts': {'":': 2, '<': 10, '<?xml version=': 0, '>': 54, 'https://': 10, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '64971', 'n_tokens_mistral': 1603, 'n_tokens_neox': 1536, 'n_words': 592}