rm js fns

This commit is contained in:
2026-01-16 17:44:14 -06:00
parent ac91495679
commit b46406f755
42 changed files with 1954 additions and 2335 deletions

10
link.ce
View File

@@ -108,11 +108,11 @@ if (cmd == 'list') {
// Resolve target if it's a local path
if (target == '.' || fd.is_dir(target)) {
target = fd.realpath(target)
} else if (target.startsWith('./') || target.startsWith('../')) {
} else if (starts_with(target, './') || starts_with(target, '../')) {
// Relative path that doesn't exist yet - try to resolve anyway
var cwd = fd.realpath('.')
if (target.startsWith('./')) {
target = cwd + target.substring(1)
if (starts_with(target, './')) {
target = cwd + text(target, 1)
} else {
// For ../ paths, var fd.realpath handle it if possible
target = fd.realpath(target) || target
@@ -127,7 +127,7 @@ if (cmd == 'list') {
// Resolve path
if (target == '.' || fd.is_dir(target)) {
target = fd.realpath(target)
} else if (target.startsWith('./') || target.startsWith('../')) {
} else if (starts_with(target, './') || starts_with(target, '../')) {
target = fd.realpath(target) || target
}
@@ -158,7 +158,7 @@ if (cmd == 'list') {
}
// Validate: if target is a local path, it must have cell.toml
if (target.startsWith('/')) {
if (starts_with(target, '/')) {
if (!fd.is_file(target + '/cell.toml')) {
log.console("Error: " + target + " is not a valid package (no cell.toml)")
$stop()