<commit_before>"use strict";

(function() {

    const act = require('./action');
    const s   = require('./space');

    /*~
     * The base class/interface for commands.
     */
    class Command
    {
	constructor(platform) {
	    this.platform = platform;
            this._verbose = false;
	}


	verbose(v) {
	    if ( v === undefined ) {
		return this._verbose;
	    }
	    else {
		this._verbose = v;
	    }
	}

	prepare(path, base, callback) {
            this.path  = path;
	    this.space = s.Space.load(this.platform, path, base);
	    this.platform.space = this.space;
	}

	execute(callback) {
	    throw new Error('Command.execute is abstract');
	}

	summary() {
	    throw new Error('Command.summary is abstract');
	}
    }

    /*~
     * Display the resolved space.
     */
    class DebugCommand extends Command
    {
	prepare(path, base, callback) {
	    super.prepare(path, base, callback);
	    callback();
	}

	execute(callback) {
	    var _ = this.platform;
	    _.log(_.green('Databases') + ':');
	    _.log(this.space.databases());
	    _.log(_.green('Database IDs') + ':');
	    _.log(Object.keys(this.space._dbIds));
	    _.log(_.green('Database names') + ':');
	    _.log(Object.keys(this.space._dbNames));
	    _.log(_.green('Servers') + ':');
	    _.log(this.space.servers());
	    _.log(_.green('Servers IDs') + ':');
	    _.log(Object.keys(this.space._srvIds));
	    _.log(_.green('Servers names') + ':');
	    _.log(Object.keys(this.space._srvNames));
	    callback();
	}

	summary() {<commit_msg>Remove access to fields that do not exist anymore.<commit_after>"use strict";

(function() {

    const act = require('./action');
    const s   = require('./space');

    /*~
     * The base class/interface for commands.
     */
    class Command
    {
	constructor(platform) {
	    this.platform = platform;
            this._verbose = false;
	}


	verbose(v) {
	    if ( v === undefined ) {
		return this._verbose;
	    }
	    else {
		this._verbose = v;
	    }
	}

	prepare(path, base, callback) {
            this.path  = path;
	    this.space = s.Space.load(this.platform, path, base);
	    this.platform.space = this.space;
	}

	execute(callback) {
	    throw new Error('Command.execute is abstract');
	}

	summary() {
	    throw new Error('Command.summary is abstract');
	}
    }

    /*~
     * Display the resolved space.
     */
    class DebugCommand extends Command
    {
	prepare(path, base, callback) {
	    super.prepare(path, base, callback);
	    callback();
	}

	execute(callback) {
	    var _ = this.platform;
	    _.log(_.green('Databases') + ':');
	    _.log(this.space.databases());
	    _.log(_.green('Servers') + ':');
	    _.log(this.space.servers());
	    callback();
	}

	summary() {
{'fraction_non_alphanumeric': 0.16818679314118934, 'fraction_numerical': 0.0, 'mean_word_length': 2.3935643564356437, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '2078323', 'n_tokens_mistral': 939, 'n_tokens_neox': 864, 'n_words': 174}