Global

Members

(constant) git_commands_schema

Schema for clone, fetch, pull and push (from Git 2.30.2)
Source:

Methods

asfm_to_doc(asfm_obj, optionsopt) → {Promise.<Buffer>}

Convert an ASFM object to a Buffer with .docx format
Parameters:
Name Type Attributes Description
asfm_obj Object an ASFM object
options AsfmToDocOptions <optional>
options
Source:
Returns:
Type
Promise.<Buffer>

check_file_is_git_versioned(filename, optionsopt) → {Promise}

Check that a file is versioned by Git
Parameters:
Name Type Attributes Description
filename string filename
options CheckFileIsGitVersionedOptions <optional>
options
Source:
Returns:
a promise
Type
Promise

check_git_command_options(file_system, parsed_git_command)

Check Git command options. Throw an exception when check fails.
Parameters:
Name Type Description
file_system FileSystem a file system
parsed_git_command ParsedGitCommand a parsed Git command
Source:

clang_plus_plus(file_system, compile_commands, optionsopt) → {Promise.<ClangPlusPlusResult>}

run clang++ with JSON AST dump enabled
Parameters:
Name Type Attributes Description
file_system FileSystem a file system
compile_commands Array.<CompileCommand> compile commands
options ClangPlusPlusOptions <optional>
clang options
Source:
Returns:
a promise
Type
Promise.<ClangPlusPlusResult>

command2arguments(command) → {Array.<string>}

Convert a command line to an array of string arguments
Parameters:
Name Type Description
command string a command line string
Source:
Returns:
an array of string arguments
Type
Array.<string>

deep_copy(input) → {*}

Deep copy of a variable
Parameters:
Name Type Description
input * a variable
Source:
Returns:
a copy of variable
Type
*

doc_to_asfm(file_system, file_path, optionsopt) → {Promise.<Object>}

Run doc_to_asfm
Parameters:
Name Type Attributes Description
file_system FileSystem a file system
file_path string a file path
options DocToAsfmOptions <optional>
options
Source:
Returns:
a promise
Type
Promise.<Object>

excavator(file_system, binary, optionsopt) → {Promise.<ExcavatorResult>}

Run Excavator
Parameters:
Name Type Attributes Description
file_system FileSystem a file system
binary string executable binary filename to process
options ExcavatorOptions <optional>
options
Source:
Returns:
a promise
Type
Promise.<ExcavatorResult>

frama_c(file_system, compile_commands, mode, optionsopt) → {Promise.<FramaCResult>}

run frama-c with json plugin and fix pos_path fields
Parameters:
Name Type Attributes Description
file_system FileSystem a file system
compile_commands Array.<CompileCommand> compile commands
mode FramaCMode mode
options FramaCOptions <optional>
Frama-C runner options
Source:
Returns:
a promise
Type
Promise.<FramaCResult>

frama_clang(file_system, compile_commands, optionsopt) → {Promise.<FramaClangResult>}

run frama_clang
Parameters:
Name Type Attributes Description
file_system FileSystem a file system
compile_commands Array.<CompileCommand> compile commands
options FramaClangOptions <optional>
clang options
Source:
Returns:
a promise
Type
Promise.<FramaClangResult>

get_current_git_branch(optionsopt) → {Promise.<string>}

Get current Git branch
Parameters:
Name Type Attributes Description
options GetCurrentGitBranchOptions <optional>
Get current Git branch options
Source:
Returns:
a promise (an empty string means "detached HEAD state")
Type
Promise.<string>

get_git_config(optionsopt) → {Promise.<GitConfig>}

Get Git configuration
Parameters:
Name Type Attributes Description
options GetGitConfigOptions <optional>
Get Git Configuration Options
Source:
Returns:
a promise
Type
Promise.<GitConfig>

get_git_directory(optionsopt) → {Promise.<string>}

Get the Git directory (.git) associated to a Git working tree
Parameters:
Name Type Attributes Description
options GetDirectoryOptions <optional>
options
Source:
Returns:
a promise
Type
Promise.<string>

get_git_head_commit_id(optionsopt) → {Promise.<string>}

Get Git SHA1 ID of HEAD
Parameters:
Name Type Attributes Description
options GetGitHeadCommitIdOptions <optional>
Get Git SHA1 ID of HEAD options
Source:
Returns:
a promise
Type
Promise.<string>

get_git_working_tree(optionsopt) → {Promise.<string>}

Get Git working tree path
Parameters:
Name Type Attributes Description
options GetGitWorkingTreeOptions <optional>
Get working tree options
Source:
Returns:
a promise
Type
Promise.<string>

git(dbName, git_commands, optionsopt) → {Promise}

Run a set of Git commands
Parameters:
Name Type Attributes Description
dbName string database name
git_commands Array.<Array.<string>> some Git commands
options PKMGitOptions <optional>
options
Source:
Returns:
a promise
Type
Promise

git(file_system, git_commands, optionsopt) → {Promise.<Array.<string>>}

Run a set of Git commands within a file system
Parameters:
Name Type Attributes Description
file_system FileSystem a file system
git_commands Array.<GitCommand> some Git commands
options GitOptions <optional>
Git options
Source:
Returns:
a promise
Type
Promise.<Array.<string>>

git_cli(git_command, optionsopt) → {Promise.<GitCliResult>}

Run Git client program
Parameters:
Name Type Attributes Description
git_command Array.<string> Git cli command
options GitCliOptions <optional>
Git Cli options
Source:
Returns:
a promise
Type
Promise.<GitCliResult>

guess_git_protocol(git_remote_url) → {'http'|'https'|'local'|'git'|'ssh'|undefined}

Guess Git protocol from Git repository URL
Parameters:
Name Type Description
git_remote_url string Git repository URL
Source:
Returns:
a Git protocol
Type
'http' | 'https' | 'local' | 'git' | 'ssh' | undefined

list_git_unmerged_files(optionsopt) → {Promise.<Array.<string>>}

List Git versioned files (path relative to the working directory)
Parameters:
Name Type Attributes Description
options ListGitUnmergedFilesOptions <optional>
options
Source:
Returns:
a promise
Type
Promise.<Array.<string>>

list_git_versioned_files(optionsopt) → {Promise.<Array.<string>>}

List Git versioned files (path relative to the working directory)
Parameters:
Name Type Attributes Description
options ListGitVersionedFilesOptions <optional>
options
Source:
Returns:
a promise
Type
Promise.<Array.<string>>

list_git_worktrees(optionsopt) → {Promise.<Array.<string>>}

List Git worktrees
Parameters:
Name Type Attributes Description
options ListGitWorktreesOptions <optional>
options
Source:
Returns:
a promise
Type
Promise.<Array.<string>>

make_anonymous_url(url_text) → {string}

Make anonymous URL (remove user name)
Parameters:
Name Type Description
url_text string URL as text
Source:
Returns:
a URL as text without user name
Type
string

parse_cmdline(option_names) → {Promise}

Parse command line
Parameters:
Name Type Description
option_names Array.<string> valid option names
Source:
Returns:
a promise
Type
Promise

parse_git_command(schema, args) → {ParsedGitCommand}

Parse Git command following a schema
Parameters:
Name Type Description
schema Object schema
args Array.<string> Git arguments
Source:
Returns:
a parsed Git command
Type
ParsedGitCommand

read_password(promptopt)

Read a password
Parameters:
Name Type Attributes Description
prompt string <optional>
a prompt
Source:

scan_and_fix_git_working_trees(file_system, optionsopt) → {Promise.<Array.<GitWorkingTree>>}

Scan Git working trees, then make http/https URLs in Git config remotes anonymous, both in the on-disk Git working trees and the returned PKM Git working trees
Parameters:
Name Type Attributes Description
file_system FileSystem a file system
options ScanGitWorkingTreesOptions <optional>
Scan Git working trees options
Source:
Returns:
a promise
Type
Promise.<Array.<GitWorkingTree>>

set_git_remote_url(remote, url, optionsopt) → {Promise}

Set Git remote URL
Parameters:
Name Type Attributes Description
remote string remote name (e.g. origin)
url string URL as text
options SetGitRemoteUrlOptions <optional>
options
Source:
Returns:
a promise
Type
Promise

test_get_git_remote_server(text_url) → {Promise}

Test GET on Git remote server
Parameters:
Name Type Description
text_url string Git remote server URL as plain text
Source:
Returns:
a promise
Type
Promise

Type Definitions

AsfmToDocOptions

asfm_to_doc options
Type:
  • Object
Properties:
Name Type Description
debug boolean enable/disable debugging messages (default: false)
logger Logger a logger (default: none)
config_xml_path string path to config.xml (doc_to_asfm configuration file)
asfm_dotx_path string path to asfm.dotx (MS Word template file)
Source:

CheckFileIsGitVersionedOptions

Options for checking that a file is versioned by Git
Type:
  • Object
Properties:
Name Type Attributes Description
debug boolean <optional>
enable/disable debugging messages (default: false)
logger Logger <optional>
a logger (default: none)
working_directory string <optional>
git command working directory
Source:

ClangDocumentFixerOptions

clang Document Fixer Options
Type:
  • Object
Properties:
Name Type Description
clang_install_dir_path string clang installation directory (default: none)
aggregate_documents_per_file boolean enable/disable aggregation of documents per file (default: false)
debug boolean enable/disable debugging messages (default: false)
drop_compound_stmts boolean enable/disable dropping of 'CompoundStmt' nodes (default: false)
working_directory string working directory (build directory), absolute or relative to root directory (default: none)
preprocessed_input boolean indicate that input is preprocessed so that if presumedFile or presumedLine are found they replace file or line respectively (default: false)
logger Logger a logger (default: none)
Source:

ClangDocumentSplitterOptions

clang Document Splitter Options
Type:
  • Object
Properties:
Name Type Description
clang_install_dir_path string clang installation directory (default: none)
aggregate_documents_per_file boolean enable/disable aggregation of documents per file (default: false)
debug boolean enable/disable debugging messages (default: false)
drop_compound_stmts boolean enable/disable dropping of 'CompoundStmt' nodes (default: false)
working_directory string working directory (build directory), absolute or relative to root directory (default: none)
preprocessed_input boolean indicate that input is preprocessed so that if presumedFile or presumedLine are found they replace file or line respectively (default: false)
logger Logger a logger (default: none)
Source:

ClangPlusPlusOptions

clang++ options
Type:
  • Object
Properties:
Name Type Description
debug boolean enable/disable debugging messages (default: false)
logger Logger a logger (default: none)
includes_system_files boolean enable/disable inclusion of system files in the result
Source:

ClangPlusPlusResult

clang++ parser result
Type:
  • Object
Properties:
Name Type Description
source_code_documents Array.<Object> source code (AST) documents
Source:

ClangPlusPlusResult

frama-clang parser result
Type:
  • Object
Properties:
Name Type Description
source_code_documents Array.<Object> source code (AST) documents
annotation_documents Array.<Object> annotation documents
comment_documents Array.<Object> comment documents
Source:

CompilationUnit

Compilation Unit
Type:
  • Object
Properties:
Name Type Description
working_directory string working directory from where the preprocessor was invoked
file string filename of preprocessed input
Source:

CppCommentLocation

CppCommentLocation
Type:
  • Object
Properties:
Name Type Description
pos_start Marker start of comment
pos_end Marker end of comment
Source:

CppCommentsDocument

C/C++ Comments Document
Type:
  • Object
Properties:
Name Type Description
sourceFile string source code filename
type string one of CppComment::Types
comments Array.<CppComment> C/C++ comments
Source:

CppCommentsParserOptions

C/C++ preprocessed input comments parser options
Type:
  • Object
Properties:
Name Type Description
clang_install_dir_path string clang installation directory (default: none)
debug boolean enable/disable debugging messages (default: false)
logger Logger a logger (default: none)
Source:

DocToAsfmOptions

doc_to_asfm options
Type:
  • Object
Properties:
Name Type Description
debug boolean enable/disable debugging messages (default: false)
logger Logger a logger (default: none)
Source:

ExcavatorOptions

Excavator options
Type:
  • Object
Properties:
Name Type Description
debug boolean enable/disable debugging messages (default: false)
logger Logger a logger (default: none)
sources Array.<string> the list of compilation units to process; if not specified or empty, it means all compilation units
suppress_types Array.<string> the list of types to suppress while analysis, e.g. types to be considered as compiler builtins
suppress_functions Array.<string> the list of functions to suppress while analysis, e.g. functions to be considered as compiler builtins
output_dir string the output directory of the analysis (default: binary + '_out'); the result of the analysis is a reversed engineered C source codes
Source:

ExcavatorResult

Excavator result
Type:
  • Object
Properties:
Name Type Description
c_source_code_filenames Array.<string> list of generated C source codes filenames
Source:

FileSystemOptions

File system options
Type:
  • Object
Properties:
Name Type Description
encoding string default file encoding ('utf8')
debug boolean enable/disable debugging messages
logger Logger a logger (default: none)
write_mode number default write mode
tmp_dir string temporary directory (default: return value of calling 'os.tmpdir()')
Source:

FindOptions

Find options
Type:
  • Object
Properties:
Name Type Description
filename_regexp RegExp filename regular expression
dirname_regexp RegExp directory name regular expression
exclude_dirpaths Array.<string> directory paths to exclude
type 'file' | 'directory' type
Source:

FramaCDocumentFixerOptions

Frama-C document fixer options
Type:
  • Object
Properties:
Name Type Attributes Description
frama_c_share_path string <optional>
Frama-C share directory (default: none)
debug boolean <optional>
enable/disable debugging messages (default: false)
logger Logger <optional>
a logger (default: none)
Source:

FramaCEVAOptions

Frama-C EVA options
Type:
  • Object
Properties:
Name Type Description
main string main function for EVA
Source:

FramaCEVAResult

Frama-C EVA result
Type:
  • Object
Source:

FramaClangOptions

frama-clang options
Type:
  • Object
Properties:
Name Type Description
debug boolean enable/disable debugging messages (default: false)
logger Logger a logger (default: none)
Source:

FramaCMode

Frama-C mode
Type:
  • Object
Properties:
Name Type Description
parser boolean enable/disable parsing
eva boolean enable/disable EVA
wp boolean enable/disable wp
Source:

FramaCOptions

Frama-C parser options
Type:
  • Object
Properties:
Name Type Description
debug boolean enable/disable debugging messages (default: false)
logger Logger a logger (default: none)
eva FramaCEVAOptions EVA options
wp FramaCWPOptions WP options
includes_system_files boolean enable/disable inclusion of system files in the result
Source:

FramaCParserResult

Frama-C parser result
Type:
  • Object
Properties:
Name Type Description
source_code_documents Array.<Object> source code (AST) documents
annotations_documents Array.<Object> annotations documents
comments_documents Array.<Object> comments documents
Source:

FramaCResult

Frama-C parser result
Type:
  • Object
Properties:
Name Type Description
parser FramaCParserResult parser result
eva FramaCEVAResult EVA result
wp FramaCWPResult WP result
Source:

FramaCWPOptions

Frama-C WP options
Type:
  • Object
Properties:
Name Type Description
wp_fct Array.<string> functions for WP
Source:

FramaCWPResult

Frama-C WP result
Type:
  • Object
Source:

GetCollectionOptions

get_collection options
Type:
  • Object
Properties:
Name Type Description
strict boolean returns an error if the collection does not exist
Source:

GetCurrentGitBranchOptions

Get current Git branch options
Type:
  • Object
Properties:
Name Type Attributes Description
debug boolean <optional>
enable/disable debugging messages (default: false)
logger Logger <optional>
a logger (default: none)
working_directory string <optional>
git command working directory
Source:

GetDirectoryOptions

Getting Git directory options
Type:
  • Object
Properties:
Name Type Attributes Description
debug boolean <optional>
enable/disable debugging messages (default: false)
logger Logger <optional>
a logger (default: none)
working_directory string <optional>
git command working directory
Source:

GetGitConfigOptions

Get Git configuration options
Type:
  • Object
Properties:
Name Type Attributes Description
debug boolean <optional>
enable/disable debugging messages (default: false)
logger Logger <optional>
a logger (default: none)
working_directory string <optional>
git command working directory
Source:

GetGitFilesOptions

Getting Git files options
Type:
  • Object
Properties:
Name Type Description
abbrev boolean abbreviated file (without content)
encoding string text encoding
Source:

GetGitFilesQuery

Getting Git files query
Type:
  • Object
Properties:
Name Type Attributes Description
filename string <optional>
filename (path relative to the Git working tree)
Source:

GetGitFilesQuery

Getting Git files query
Type:
  • Object
Properties:
Name Type Attributes Description
filename string <optional>
filename (path relative to the Git working tree)
Source:

GetGitFileSystemOptions

get_git_file_system options
Type:
  • Object
Properties:
Name Type Description
debug boolean enable/disable debugging messages
logger Logger a logger (default: none)
Source:

GetGitHeadCommitIdOptions

Get Git SHA1 ID of HEAD options
Type:
  • Object
Properties:
Name Type Attributes Description
debug boolean <optional>
enable/disable debugging messages (default: false)
logger Logger <optional>
a logger (default: none)
working_directory string <optional>
git command working directory
Source:

GetGitWorkingTreeFileSystemOptions

get_git_working_tree_file_system options
Type:
  • Object
Properties:
Name Type Description
debug boolean enable/disable debugging messages
logger Logger a logger (default: none)
Source:

GetGitWorkingTreeOptions

Get Git working tree options
Type:
  • Object
Properties:
Name Type Attributes Description
debug boolean <optional>
enable/disable debugging messages (default: false)
logger Logger <optional>
a logger (default: none)
working_directory string <optional>
git command working directory
Source:

GetProjectOptions

Type:
  • Object
Properties:
Name Type Attributes Description
abbrev boolean <optional>
enable/disable project metadata
Source:

GetProjectsOptions

Type:
  • Object
Properties:
Name Type Attributes Description
abbrev boolean <optional>
enable/disable project metadata
Source:

GetUserProjectsOptions

Type:
  • Object
Properties:
Name Type Attributes Description
project_name string <optional>
project name
abbrev boolean <optional>
enable/disable project metadata
Source:

GitCliOptions

Git Cli Options
Type:
  • Object
Properties:
Name Type Attributes Description
git_user_credential GitUserCredential <optional>
Git user's credential
debug boolean <optional>
enable/disable debugging messages (default: false)
logger Logger <optional>
a logger (default: none)
working_directory string <optional>
git command working directory
git_remote_timeout number <optional>
timeout for remote operations (clone, fetch, pull and push) to avoid blocking server on a required authentication
sshpass_args Array.<string> <optional>
Arguments to pass to sshpass
tmp_dir string <optional>
temporary directory
Source:

GitCliResult

Git Cli Result
Type:
  • Object
Properties:
Name Type Description
output string
exit_status number
Source:

GitCommand

Git command (plus cd command)
Type:
  • Array.<string>
Source:

GitOptions

Git Options
Type:
  • Object
Properties:
Name Type Attributes Description
git_user_credential GitUserCredential <optional>
Git user's credential
debug boolean <optional>
enable/disable debugging messages (default: false)
logger Logger <optional>
a logger (default: none)
working_directory string <optional>
git command working directory
git_remote_timeout number <optional>
timeout for remote operations (clone, fetch, pull and push) to avoid blocking server on a required authentication
Source:

InsertUpdateDocumentsOptions

insert_update_documents options
Type:
  • Object
Properties:
Name Type Attributes Description
signature Object <optional>
signature (properties in the signature are the document keys). When unspecified each document is unique whereas when an empty object {}, the collection holds only a singleton document.
custom_id_key string <optional>
custom ID key replicating the MongoDB Object ID field _id. This option applies only when the signature is undefined.
Source:

JobOptions

Job options
Type:
  • Object
Source:

ListGitUnmergedFilesOptions

Options for listing Git unmerged files
Type:
  • Object
Properties:
Name Type Attributes Description
debug boolean <optional>
enable/disable debugging messages (default: false)
logger Logger <optional>
a logger (default: none)
working_directory string <optional>
git command working directory
Source:

ListGitVersionedFilesOptions

Options for listing Git versioned files
Type:
  • Object
Properties:
Name Type Attributes Description
debug boolean <optional>
enable/disable debugging messages (default: false)
logger Logger <optional>
a logger (default: none)
working_directory string <optional>
git command working directory
Source:

ListGitWorktreesOptions

Options for listing Git worktrees
Type:
  • Object
Properties:
Name Type Attributes Description
debug boolean <optional>
enable/disable debugging messages (default: false)
logger Logger <optional>
a logger (default: none)
working_directory string <optional>
git command working directory
Source:

Marker

Marker
Type:
  • Object
Properties:
Name Type Description
pos_path string original source filename
pos_lnum Number line number (in original source file)
pos_cnum Number column number (in preprocessed input)
Source:

ParsedGitCommand

Parsed Git command
Type:
  • Object
Properties:
Name Type Attributes Description
command string Git command name
options Object Git command options
args Array.<string> <optional>
Git command arguments
subcommand ParsedGitCommand <optional>
Git subcommand
Source:

PkmConfig

A PKM configuration
Type:
  • Object
Properties:
Name Type Description
debug boolean flag to enable/disable debug messages
schemas.*.file string filename of collection (*) documents schema
schemas.*.enable boolean flag to enable/disable collection (*) documents validation
db_host string MongoDB host
pkm_db string PKM users database
session_timeout Number user's session expiration time in milliseconds
Source:

PKMGitOptions

PKM Git options
Type:
  • Object
Properties:
Name Type Description
logger Logger a logger (default: none)
Source:

PkmProject

A project. Undocumented additional properties are allowed.
Type:
  • Object
Properties:
Name Type Description
name string project name
project Array.<PkmProjectMember> members
Source:

PkmProject

A project. Undocumented additional properties are allowed.
Type:
  • Object
Properties:
Name Type Description
name string project name
project Array.<PkmProjectMember> members
Source:

PkmProjectMember

A project member. Undocumented additional properties are allowed.
Type:
  • Object
Properties:
Name Type Description
name string member name
owner boolean true if member is owner of the project, otherwise false
member Array.<string> role names
Source:

PkmProjectMember

A project member. Undocumented additional properties are allowed.
Type:
  • Object
Properties:
Name Type Description
name string member name
owner boolean true if member is owner of the project, otherwise false
member Array.<string> role names
Source:

PreprocessedInput

Preprocessed Input
Type:
  • Object
Properties:
Name Type Description
content string content of preprocessed input
pos Number position of current character beging processed in content of preprocessed input
Source:

ReadFileOptions

Read file options
Type:
  • Object
Properties:
Name Type Description
encoding string file encoding (e.g. 'utf8')
mime_type string file MIME type
Source:

Resource

Resource
Type:
  • Object
Properties:
Name Type Description
collection string collection name
Source:

RolePrivilege

Role privilege
Type:
  • Object
Properties:
Name Type Description
resource Resource resource
actions Array.<string> allowed actions on the resource
Source:

ScanGitWorkingTreesOptions

Scan Git working trees options
Type:
  • Object
Properties:
Name Type Attributes Description
debug boolean <optional>
enable/disable debugging messages (default: false)
logger Logger <optional>
a logger (default: none)
working_directory string <optional>
git command working directory
Source:

SetGitRemoteUrlOptions

Set Git remote URL options
Type:
  • Object
Properties:
Name Type Attributes Description
debug boolean <optional>
enable/disable debugging messages (default: false)
logger Logger <optional>
a logger (default: none)
working_directory string <optional>
git command working directory
push boolean <optional>
select/unselect push URL
Source:

WriteFileOptions

Write file options
Type:
  • Object
Properties:
Name Type Description
write_mode number write mode
Source: