Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V0.0.4 #25

Merged
merged 70 commits into from
Dec 11, 2023
Merged

V0.0.4 #25

merged 70 commits into from
Dec 11, 2023

Commits on Dec 8, 2023

  1. Rename class and file 'install' to 'Installer'

    The class 'install' and corresponding file have been renamed to 'Installer'. Adjustments have been made to reflect that the class is a constructor, improving both readability and comprehensibility of the code. Additionally, module exports have been updated accordingly.
    erikyo committed Dec 8, 2023
    Configuration menu
    Copy the full SHA
    3791575 View commit details
    Browse the repository at this point in the history
  2. Add Database.js file with upload and dump methods

    A new file 'Database.js' has been added featuring a Database class. This class includes two methods, 'uploadDatabase' and 'dumpDatabase', meant to handle respective operations on a MySQL database. The 'getConnectionSettings' utility function is used for obtaining database connection configurations. The file utilizes 'mysql2/promise' and 'mysqldump' packages for database operations.
    erikyo committed Dec 8, 2023
    Configuration menu
    Copy the full SHA
    45ec2e0 View commit details
    Browse the repository at this point in the history
  3. Refactor package installation classes into separate files

    Separated existing installation package classes (WordPressPackage, PluginPackage, ThemePackage) from `package.js` into their own files(`WpPackage.js`, `PluginPackage.js`, `ThemePackage.js`). This refactoring improves code organization, clarity, and separation of concerns. The classes are now directly exported from their files, making it easier to import them separately where necessary.
    erikyo committed Dec 8, 2023
    Configuration menu
    Copy the full SHA
    daa727a View commit details
    Browse the repository at this point in the history
  4. Add Updater.js with update methods for plugins, themes and WordPress

    Added a new file `Updater.js` including methods to update plugins, themes, and WordPress core using the configurations. This class improves the structured and guided update process by providing dedicated methods to perform the updates separately, handling configuration validation and logging errors effectively during the update process.
    erikyo committed Dec 8, 2023
    Configuration menu
    Copy the full SHA
    ac8af1d View commit details
    Browse the repository at this point in the history
  5. Refactor utils.js, moving functions into newly created utils/index.js

    Moved all functions in utils.js to a newly created index.js file within the utils directory. This refactoring effort improves code organization by defining utility functions in their respective context, under the utils directory. Meanwhile, ‘fs.js’ was renamed and moved to ‘utils/fs.js’ to maintain consistency. These changes do not alter any functionality.
    erikyo committed Dec 8, 2023
    Configuration menu
    Copy the full SHA
    ec94d27 View commit details
    Browse the repository at this point in the history
  6. Refactor code and enhance database functionality

    Refactored the code by moving functions to newly created utils/index.js, improving the organization of utility functions. Added `getInfo` function to the utils import. Renamed WordPressInstaller to Installer, WordPressConfigDump to Dump, and added Database class for handling new database operations. Furthermore, the handling of the 'dump' and 'init' actions have been updated along with the addition of actions for 'upload-database' and 'dump-database'.
    erikyo committed Dec 8, 2023
    Configuration menu
    Copy the full SHA
    0aeb047 View commit details
    Browse the repository at this point in the history
  7. Update package version and add new dependencies

    Increased the version number of package.json and package-lock.json. Also, added 'mysql2' and 'mysqldump' to the package dependencies list for improved database operations support.
    erikyo committed Dec 8, 2023
    Configuration menu
    Copy the full SHA
    41fd51d View commit details
    Browse the repository at this point in the history
  8. Add typings for WPMMconfig object properties

    Introduced detailed JSDoc typedefs for the WPMMconfig object and its subprocesses. This includes definitions for WordPress configuration, package data, and website details to improve code clarity and maintainability.
    erikyo committed Dec 8, 2023
    Configuration menu
    Copy the full SHA
    0426834 View commit details
    Browse the repository at this point in the history
  9. Refactor getConfig function for better typing

    Added param typing and updated JSDoc comments in the getConfig function to improve readability and maintainability. It now provides a clear understanding of the data types used and the structure of the WPMMconfig object.
    erikyo committed Dec 8, 2023
    Configuration menu
    Copy the full SHA
    9b2d987 View commit details
    Browse the repository at this point in the history
  10. Improve code documentation and implement proper naming

    The commit introduced explicit types for parameters to improve code readibility and maintainability. Furthermore, JSDoc comments were added providing clear descriptions of the function, their parameters, and expected return types. Renamed file initialize.js to Initialize.js for consistency in the code base.
    erikyo committed Dec 8, 2023
    Configuration menu
    Copy the full SHA
    29655bf View commit details
    Browse the repository at this point in the history
  11. Add comprehensive JSDoc comments and refactor variable names

    The update significantly improves code clarity and readability by adding comprehensive JSDoc comments to classes, functions, and variables across multiple files. In addition, it includes refactoring of parameters and variables for consistent naming conventions and precise type clarity with the introduction of explicit typing. The file initialize.js was also renamed to Initialize.js to maintain codebase consistency and adhere to naming standards.
    erikyo committed Dec 8, 2023
    Configuration menu
    Copy the full SHA
    ccca816 View commit details
    Browse the repository at this point in the history
  12. Refactor codebase for clarity and add JSDoc comments

    This commit introduces comprehensive JSDoc comments to classes, functions, and variables for better understanding of the code and its functionality. It ensures parameters and variables follow a consistent naming convention and enhances type clarity with specific typing. It also includes a minor renaming of a file from initialize.js to Initialize.js for consistency.
    erikyo committed Dec 8, 2023
    Configuration menu
    Copy the full SHA
    33fba9c View commit details
    Browse the repository at this point in the history

Commits on Dec 9, 2023

  1. Add user locale function and improve code readability

    Added a function to fetch user locale, removed unused functions, improved some variable labels and made small enhancements in scripts for better readability. Also replaced manual string concatenations with template literals.
    
    Took 3 hours 18 minutes
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    e68283e View commit details
    Browse the repository at this point in the history
  2. Create WordPress configuration utility functions

    Added new utility functions in the wpConfig.js file. These functions are used to fetch and modify the WordPress configuration details such as getting the latest version of WordPress, getting the WordPress installation paths, fetching the current WordPress version and locale information, replacing database constants in wp-config.php, generating salt codes, and replacing empty salts in the configuration.
    
    Took 14 seconds
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    fa8c1ec View commit details
    Browse the repository at this point in the history
  3. Refactor Dump class for WordPress configuration

    Upgraded the Dump class constructor to utilize new configuration utility functions. Ensured the class utilizes these functions to fetch the current WordPress version and locale information, and also to set the root, theme, and plugins folders. This results in cleaner, more efficient, and maintainable code.
    
    Took 9 seconds
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    d3b28f6 View commit details
    Browse the repository at this point in the history
  4. Correct typo in Initialize.js comments

    Corrected a typo in the comment on Initialize.js where WordPress was spelt as 'Wordpress'. Providing correct information in comments is essential for maintaining readability and understanding of the code.
    
    Took 23 seconds
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    d75d1e9 View commit details
    Browse the repository at this point in the history
  5. Refactor WordPress installer in Installer.js

    The Installer.js class has been streamlined by introducing utility functions and generalizing Package class for WordPress, plugin, and theme installation. This refactoring provides a more modular approach which can now handle installing WordPress and its plugins and themes more efficiently. It also improves readability and maintainability of the code.
    
    Took 13 seconds
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    96386a7 View commit details
    Browse the repository at this point in the history
  6. Refactor Package class and remove Plugin/Theme specific classes

    Removed PluginPackage.js and ThemePackage.js, and refactored Package.js to generalize the handling of plugin and theme installation. This update results in a more cohesive approach, increasing code maintainability and enhancing the efficiency of installing WordPress, plugins, and themes.
    
    Took 12 seconds
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    c34e7e2 View commit details
    Browse the repository at this point in the history
  7. Refactor WpPackage setup and configuration

    Updated WpPackage class logic in lib/WpPackage.js to improve setup and configuration. This refactor includes better management of WordPress configuration and download links through improved handling of this.pkgInfo object. The changes focus on unifying paths, streamlining the process, and simplifying the code.
    
    Took 11 seconds
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    15e6a95 View commit details
    Browse the repository at this point in the history
  8. Refactor WordPress paths utility and action functions

    Enhancements have been made to the WordPress paths utility in lib/index.js for better path management. More concise action function descriptions and improved handling of default 'install' action command were also incorporated. This refactoring aims to streamline processes, simplify codes and provide a more intuitive user experience.
    
    Took 8 seconds
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    bc80770 View commit details
    Browse the repository at this point in the history
  9. Update package version and dependencies in package-lock.json

    Several package dependencies also have been updated, new ones have been added including 'axios' and 'node-fetch', and 'eslint-plugin-import' has been removed. Additionally, numerous dependencies shifted to a peer dependency. These changes enhance the compatibility and operability of the package.
    
    Took 32 seconds
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    0282cdc View commit details
    Browse the repository at this point in the history
  10. : Simplify wp-package.json and reorganize tests

    The main wp-package.json configuration file has been simplified to remove unnecessary values and clean up host settings. This included nullifying the WordPress version and language, while updating the database user and password details. Also, a new file tests/assets/wp-package.json has been created to separate the testing configuration. Moreover, the tests/utils.test.js file has been updated to reflect these changes.
    
    Took 1 minute
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    25421ce View commit details
    Browse the repository at this point in the history
  11. Refactor and simplify utility test file imports

    The utility test file imports in tests/utils.test.js were restructured for improved legibility and clarity. Specific utilities were moved to a separate import from ../lib/utils/wpConfig, enhancing separation of concerns. This coincides with the simplification of the main wp-package.json configuration file and the creation of a new test configuration file in tests/assets/wp-package.json.
    
    Took 2 minutes
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    ebfb655 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    6e54259 View commit details
    Browse the repository at this point in the history
  13. Add post-install command runner function

    A new utility function has been added in lib/utils/index.js for executing commands asynchronously after installation. This addition allows post-install commands to be defined and run, useful for tasks that should occur only once the installation process is completed. Additionally, code organization is improved by moving the runPostInstallCommands implementation to the utils library.
    
    Took 9 minutes
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    b19665a View commit details
    Browse the repository at this point in the history
  14. chore

    Took 4 minutes
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    263a661 View commit details
    Browse the repository at this point in the history
  15. : Implement remote config loading

    The logic for handling the --template option has been improved. Now, in addition to using a local file, we can also get a configuration file from a remote source with axios, offering more flexibility. Error handling is provided in case a remote source fails to load properly.
    
    Took 53 minutes
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    6ee55c1 View commit details
    Browse the repository at this point in the history
  16. Update baseFolder for WordPress installation

    The baseFolder for WordPress installation has been updated to use a constant instead of a hardcoded value. This change makes it more flexible and easier to maintain because you can change the default WordPress install folder by simply updating the constant in one place.
    
    Took 12 seconds
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    d1484b4 View commit details
    Browse the repository at this point in the history
  17. Add lib/constants.js file for WordPress install

    Created a new lib/constants.js file containing the default settings for WordPress installation. This refactoring improves the code maintainability by centralizing the configuration values for the WordPress install folder, language, and default config settings in one place.
    
    Took 10 seconds
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    86c4c55 View commit details
    Browse the repository at this point in the history
  18. Refactor WordPress config generation in Initialize.js

    Updated the constructor and the 'generateConfig' method in Initialize.js to rely on default configuration values sourced from lib/constants.js. This makes the code cleaner and centralizes default settings for WordPress installation.
    
    Took 33 seconds
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    1036322 View commit details
    Browse the repository at this point in the history
  19. Implement WordPress package update functionality

    The codebase now includes an "update" feature which updates WordPress packages based on command line arguments. This feature includes conditions for updating themes, plugins, WordPress itself, or all together. Refactoring was also done to improve code neatness and configuration handling.
    
    Took 24 seconds
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    99afe09 View commit details
    Browse the repository at this point in the history
  20. Refactor Dump.js and improve WordPress version handling

    This update refactors the "Dump.js" file to better handle WordPress versions. Specifically, it imports a new function called "getLastWpVersion" from the "wpConfig" module and uses it to get the latest WordPress version if no version is set. It also simplifies the initialisation process by removing redundant console log outputs.
    
    Took 11 seconds
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    9b2bf81 View commit details
    Browse the repository at this point in the history
  21. Add husky for git hooks and update scripts

    Husky has been added to handle pre-commit hook that runs lint and tests automatically. The scripts in the package.json file have been updated to reflect these changes by adding a "prepare" script for Husky installation. Furthermore, paths in the "lint" script have been corrected.
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    44cd7f6 View commit details
    Browse the repository at this point in the history
  22. Implement Updater class and adjust update functionality

    An Updater class is now required and utilized within the update method in lib/index.js. The method's logic has been expanded and reorganized to deal with different update scenarios using a new 'updateObject'. This structure improves code readability, provides more explicit control, and enhances maintainability.
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    b08953c View commit details
    Browse the repository at this point in the history
  23. Refactor update method with Updater class and 'updateObject'

    Introduced an Updater class to the update method in lib/index.js. The update functionality has been restructured with the use of a new 'updateObject' for handling diverse update cases. This enhances the code's readability, improves control over individual update conditions, and improves maintenance.
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    b854a04 View commit details
    Browse the repository at this point in the history
  24. Refactor updater logic by moving it to Updater class

    Moved updater logic from lib/index.js to the Updater class in lib/Updater.js, ensuring clearer and maintainable code. This refactor introduces an 'updateObject' that handles diverse update cases, improving control over individual update conditions and enhancing code readability.
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    7b46e00 View commit details
    Browse the repository at this point in the history
  25. Update and organize Initialize class methods

    Rearranged methods in Initialize class, redefined and repurposed the `generateConfig` method to return an object output and introduced `writeConfig` method to conduct the writing operation. The modifications were made to improve functional clarity and explicitness. Adaptations within `lib/index.js` were executed to reflect these changes.
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    adee258 View commit details
    Browse the repository at this point in the history
  26. Refactor dependency paths and constructor in Installer class

    Changes include updating the paths of imported functions in lib/Installer.js and altering the constructor of the class. The bootstrap fields now depend on an externally provided 'paths' object rather
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    b02291d View commit details
    Browse the repository at this point in the history
  27. Refactor lib/utils module and update Installer class

    The utility functions in lib/utils have been refactored and relocated into different files. The installer class dependency paths in lib/Installer.js and its constructor have also been updated. Consequently, the bootstrap fields in Installer now depend on an externally provided 'paths' object.
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    3d64e4e View commit details
    Browse the repository at this point in the history
  28. Refactor utility functions and update Installer constructor

    Utility functions in the lib/utils module now reside in separate categorised files for better maintenance, which include 'actions.js', 'data.js' and 'fs.js'. Meanwhile, an additional object 'paths' is updated to the Installer class constructor in lib/Installer.js to specify dependency paths and enhance reusability.
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    255e610 View commit details
    Browse the repository at this point in the history
  29. Remove wp-package.json and refactor utility imports

    `wp-package.json` has been entirely removed and implements a more modular approach for managing utility functions. File `utils.test.js` has been adjusted to import functions from `data.js` and `wpConfig.js`. Constants have also been updated to reflect this structural change.
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    caa1dee View commit details
    Browse the repository at this point in the history
  30. Refactor code to consolidate utility imports

    Removed redundant import statements and streamlined the way utility functions are imported in various files. This includes changes in 'Dump.js', 'actions.js', 'Installer.js', and 'Database.js'. The refactoring aims to improve code modularity and maintainability.
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    f82e789 View commit details
    Browse the repository at this point in the history
  31. Update base folder definition and refactor file imports

    Changed the definition of base folder in 'Package.js' and 'WpPackage.js'. File 'wpConfig.js' was renamed to 'wordpress.js', and all references to this file were updated. Removed redundant import statements and refactored the way functions are imported from utility files. This is done to simplify the code and improve its maintainability. Removed the function 'geVarFromPHPFile' from 'data.js' and moved it to 'wordpress.js'.
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    a6ae21a View commit details
    Browse the repository at this point in the history
  32. Refactor function name and add new tests to utils.test.js

    Renamed the function 'getVarFromPHPFile' to 'getDataFromFile'. This change better reflects the function's purpose and improves code clarity. Added new tests for this function in 'tests/utils.test.js' to ensure it correctly extracts data from PHP files. Additionally, adjusted import statements to reflect these changes in 'lib/utils/wordpress.js'.
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    2a795b4 View commit details
    Browse the repository at this point in the history
  33. Add WordPress configuration parsing functionality and related tests

    Introduced a function to parse WordPress configuration file (wp-config.php) in `lib/utils/wordpress.js`. This function extracts defined constants and variables, providing crucial information for further operations. Additionally, created new test files to ensure the accuracy of this parsing function. Furthermore, some command names and function calls were updated for consistency.
    erikyo committed Dec 9, 2023
    Configuration menu
    Copy the full SHA
    c78c061 View commit details
    Browse the repository at this point in the history

Commits on Dec 10, 2023

  1. Add initConfig function to data.js

    The code diff reveals added functionality to the 'lib/utils/data.js' file. A new function `initConfig` initializes the configuration for a provided base folder. If the base folder doesn't exist, it gets created, and a default config is generated and written into this template file.
    erikyo committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    33fa39f View commit details
    Browse the repository at this point in the history
  2. Refactor getConfig function and connection settings in data.js

    The getConfig function in 'data.js' file has been refactored to handle scenarios when a template is not provided and add an "initConfig" function for initialising the configuration with the base folder. The parameters in the getConnectionSettings function have also been modified to align with the new configuration settings format.
    erikyo committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    06758fe View commit details
    Browse the repository at this point in the history
  3. Add axiosFetch function to wordpress.js

    A new function, axiosFetch, has been added to wordpress.js for fetching data from a specified URL using Axios. This function includes headers for 'User-Agent', 'Content-Type', 'Accept', 'Accept-Encoding', 'Connection', and 'Pragma'. If the fetch is successful, it resolves with the fetched data; in the case of an error, it logs the error to the console.
    erikyo committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    f71f110 View commit details
    Browse the repository at this point in the history
  4. Replace axios.get with axiosFetch in getLastWp function

    The getLastWp function in wordpress.js has been updated to use the axiosFetch function instead of axios.get. In addition to the replacement, error handling has been improved: now in case of an error or if no offers are received from the WordPress API, an appropriate message is logged to the console instead of throwing an exception.
    erikyo committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    0841b18 View commit details
    Browse the repository at this point in the history
  5. Add getWpConfigContent function in wordpress.js

    A new utility function called getWpConfigContent has been added to the wordpress.js file. This function reads the 'wp-config.php' content from any given WordPress folder. It includes proper error handling for cases where the file is not found or is empty, logging appropriate warning messages.
    erikyo committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    5af2e3c View commit details
    Browse the repository at this point in the history
  6. Fix constant names and improve function parsers in wordpress.js

    Updated the naming of constants to be in Pascal case as per code style conventions. Changes also include improvements to how files and variables are parsed in functions, and code readability has also been enhanced by removing unnecessary comments and reformatting the code structures.
    erikyo committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    575bc94 View commit details
    Browse the repository at this point in the history
  7. Refactor database dump method and improve error handling

    The existing `dumpDatabase` method has been overhauled to improve user experience. The change includes generating filenames based on database name and date, creating the backup directory if it doesn't exist, and better error handling. The readability of the code has also been improved with some restructuring.
    erikyo committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    9d79a14 View commit details
    Browse the repository at this point in the history
  8. Update Dump class in lib/Dump.js

    The `parseWpConfig` method in the Dump class has been updated to use the `getWpConfigContent` method. The configuration details are now included in the result, combining both constant and variable values.
    erikyo committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    1b4993f View commit details
    Browse the repository at this point in the history
  9. Update casing of constant declarations in lib/constants.js

    All names of the declared constants were updated to use upper camel casing. This ensures consistency with other declarations in the code and adheres to the chosen coding style conventions.
    erikyo committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    130c25c View commit details
    Browse the repository at this point in the history
  10. Adapt lib/index.js to handle asynchronous configuration loading

    The library entry point lib/index.js has been refactored to handle asynchronous loading of configuration data properly. The configuration object is now fetched using a promise, and operations dependent on that configuration are processed within the 'then' clause. All other changes are related: variable declarations were moved inside the 'then' clause and usage of the 'actions' object was wrapped in a condition to prevent premature invocation.
    erikyo committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    120d1ad View commit details
    Browse the repository at this point in the history
  11. Refactor code to use async functions and rename constants

    The code in lib/Initialize.js was refactored to use async functions, providing clearer asynchronous control flow. This implies transforming some synchronous operations into asynchronous ones. At the same time, the names of the constants coming from "constants.js" have been capitalized to follow naming conventions more closely. Furthermore, minor changes have been made to improve code readability and structure, including the addition of default parameters and clarification of folder paths.
    erikyo committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    c3bfc09 View commit details
    Browse the repository at this point in the history
  12. Update parseWpConfig tests and move test assets to fixtures

    Modified parseWpConfig tests to read actual file content instead of mocking it in the wpConfig.test.js file. Furthermore, test assets have been moved from the "assets" directory to a new "fixtures" directory. This change enhances test configuration and better reflects real-world scenarios by using actual files instead of mocked instances.
    erikyo committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    719d2c0 View commit details
    Browse the repository at this point in the history
  13. Add directory existence validation to scanDirectory method

    Added a check within the `scanDirectory` method in `lib/Dump.js` to validate whether a directory exists before attempting to read its content. This will prevent errors from occurring when a directory is not found, instead returning an empty result set.
    erikyo committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    c63a8d1 View commit details
    Browse the repository at this point in the history
  14. Refactor WordPress configuration definitions and simplify action invo…

    …cations
    
    Reorganized WordPress and package configuration definitions, moving them from `lib/index.js` to `lib/constants.js`. Streamlined how actions such as installation and update are invoked in `lib/index.js`, improving code readability and maintainability. As a result, the `actions` object in `lib/index.js` is now cleaner and operations are displayed in a more logical order.
    erikyo committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    3b633b7 View commit details
    Browse the repository at this point in the history
  15. Add actions.js file with WordPress management functionalities

    Introduced `actions.js` that centralizes all WordPress management actions. This new file encapsulates functions for retrieving information, initializing WordPress installation, installing and updating WordPress, dumping data and database, among others. This centralization is intended to facilitate maintenance and improve extendibility.
    erikyo committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    57cbbb7 View commit details
    Browse the repository at this point in the history
  16. Refactor actions in actions.js and index.js

    Adjusted argument intake in `actions.js` and `index.js` files for better encapsulation. In `actions.js` we replaced `actions` with `wpmmActions` to reflect consolidated function. Similarly, in `index.js`, the actionLauncher now takes an object containing both config and paths. These changes focused on improving code maintainability and readability.
    erikyo committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    98f741d View commit details
    Browse the repository at this point in the history
  17. Refactor code for clarity and error handling in data.js

    Replaced the direct use of axios's get method in `data.js` with `axiosFetch` from `wordpress.js` to improve consistency and readability of code. This also aids in error handling and response data extraction, making the code easier to understand and maintain.
    erikyo committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    c982e82 View commit details
    Browse the repository at this point in the history
  18. Refactor code and update documentation

    Refactored action functions by renaming certain modules and improving error handling. Updated comments and parameter types across multiple modules for better code readability and understanding. Integrated new method descriptions and enhanced the clarity of existing ones.
    erikyo committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    aabc72d View commit details
    Browse the repository at this point in the history
  19. Update project dependencies and introduce TypeScript

    Added TypeScript along with necessary TypeScript definitions to the project. Removed 'node-fetch' and other unused dependencies. The operation includes the generation of a new tsconfig.json file.
    erikyo committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    6a29c76 View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2023

  1. Refactor and optimize WordPress installation configuration

    The commit encompasses several important changes targeted towards WordPress package installation and configuration. It first optimizes the WpPackage.js file for more streamlined and efficient handling of WordPress installations. It also includes smarter parsing and generation of WordPress and other package config files. Furthermore, it enhances the database.js file to use better defined configurations. Major changes involve movement of parser-related functions to a new utils/parsers.js file, and inclusion of user prompts related to WordPress installation in a new utils/prompts.js file.
    erikyo committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    9973f23 View commit details
    Browse the repository at this point in the history
  2. Add utility functions for WordPress configuration parsing and modific…

    …ation
    
    New functions have been added to a utility file parsers.js to handle parsing and modification of WordPress config files. These functions include parsing the wp-config.php file, replacing database constants and empty salts, and generating salt codes. Also, certain configurations related to WordPress installation have been moved to this utility for better structuring and ease of use.
    erikyo committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    bb8be61 View commit details
    Browse the repository at this point in the history
  3. Add utility prompts for WordPress configuration and dump options

    Introducing new utility file prompts.js which contains two asynchronous functions; one that prompts the user for their new WordPress installation details for configuration initialization and another that checks if the user wants to dump installation. These prompts help to improve the user experience by allowing interactive customization for WordPress installations and dump handling, and serve to better structure the codebase.
    erikyo committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    3f8eb28 View commit details
    Browse the repository at this point in the history
  4. Refactor utility imports and update test configurations

    The commit organizes the imports from utils directory by moving data processing functions to parsers.js. Also, it updates the test configurations by replacing the deprecated method getConfig with initConfig and changes parameters to make it more representative of deploy conditions. This results in a neater, more intuitive import schema and test set-up, enhancing code readability and understanding.
    erikyo committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    c635334 View commit details
    Browse the repository at this point in the history
  5. Modify typescript target, update eslint script and add dependencies

    This commit modifies the typescript target to "es5" for maximum compatibility and updates the "lint" script in package.json to automatically fix problems. It also introduces new dependencies including "inquirer" and corresponding types, as well as the "prettier" code formatter, and updated typescript and "lint" configurations to reflect these changes. These updates enhance the linting process, introduce user inquiry functionality, and ensure consistent code style.
    erikyo committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    da2a62d View commit details
    Browse the repository at this point in the history
  6. Update configuration handling and refactor prompts

    This commit updates handling of configuration in data.js by adjusting the method of creating a new WordPress installation if template file does not exist. It moves the configuration initialization process to data.js from prompts.js, for consistent handling of configuration. The look and feel of prompts.js are simplified by removing the process of calling initConfig() function and unnecessary results handling. These changes lead to better code organization and simplified logic in the prompt functionality.
    erikyo committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    0999c8a View commit details
    Browse the repository at this point in the history