normalizeRelativePath (install-targets/helpers.js)

ECC · scripts/lib/install-targets/helpers.js · javascript · MIT
infra

Utilities for normalizing paths and planning install operations.

// Source: https://github.com/affaan-m/ECC | License: MIT | Copyright 2026 Affaan Mustafa
// Provided via justclaw.it.com; keep this notice with the code.
const fs = require('fs');
const os = require('os');
const path = require('path');
const {
  CLAUDE_HOOKS_CONFIG_PATH,
  getClaudeSettingsPath,
} = require('../install/claude-settings');
const { METADATA_FILENAME } = require('../hooks-config');

const PLATFORM_SOURCE_PATH_OWNERS = Object.freeze({
  '.claude-plugin': 'claude',
  '.codex': 'codex',
  '.cursor': 'cursor',
  '.gemini': 'gemini',
  '.hermes': 'hermes',
  '.kimi': 'kimi',
  '.kimi-code': 'kimi',
  '.joycode': 'joycode',
  '.opencode': 'opencode',
  '.openclaw': 'openclaw',
  // Pi loads ECC through `pi install`, not install-apply, so `.pi` is
  // foreign to every install targe

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key