engine/paths

Project/engine path helpers for the Gingee control plane. Engine-internal — not for sandboxed app require.
Description:
  • Project/engine path helpers for the Gingee control plane. Engine-internal — not for sandboxed app require.

Members

(inner, constant) engineRoot

Description:
  • Absolute path to the Gingee package root (folder containing gingee.js).
Absolute path to the Gingee package root (folder containing gingee.js).

(inner, constant) projectRoot

Description:
  • Absolute path to the consuming project (process.cwd()).
Absolute path to the consuming project (process.cwd()).

Methods

(inner) ensureProjectDirs(rootopt)

Description:
  • Ensure standard project directories exist (logs, settings, backups, temp).
Parameters:
Name Type Attributes Default Description
root string <optional>
projectRoot

(inner) localModulesPathsFromConfig(config, rootopt) → {Array.<string>}

Description:
  • Absolute local_modules roots from a loaded config (prefers pre-resolved list).
Parameters:
Name Type Attributes Default Description
config object | null | undefined gingee.json config
root string <optional>
projectRoot
Returns:
Type
Array.<string>

(inner) resolveLocalModulesPaths(entries, rootopt) → {Array.<string>}

Description:
  • Resolve gingee.json → box.local_modules to absolute roots under the project. v1: relative paths only; absolute entries are rejected. Roots must be strict descendants of the project root (not the project root itself).
Parameters:
Name Type Attributes Default Description
entries string | Array.<string> | null | undefined from box.local_modules
root string <optional>
projectRoot
Throws:
on absolute path, escape outside project, or project-root entry
Type
Error
Returns:
absolute directory paths (may not exist yet)
Type
Array.<string>

(inner) resolveWebPath(configWebPathopt, rootopt) → {string}

Description:
  • Resolve web_root from config to an absolute directory path.
Parameters:
Name Type Attributes Default Description
configWebPath string <optional>
'./web'
root string <optional>
projectRoot
Returns:
Type
string