direxio-deployer 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/scripts/destroy.ps1 +2 -31
- package/scripts/lib/windows-paths.ps1 +45 -0
- package/scripts/orchestrate.ps1 +2 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "direxio-deployer",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Versioned Direxio deployer agent skill and portable deployment orchestration tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"scripts/"
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
|
-
"test": "bash tests/npm_skill_distribution_test.sh && bash tests/skill_structure_test.sh && bash tests/private_file_permissions_test.sh && bash tests/eip_preflight_test.sh && bash tests/mcp_tools_runtime_check_test.sh && bash tests/runtime_summary_check_test.sh && bash tests/s6_wire_local_test.sh && bash tests/render_userdata_remote_nodes_test.sh"
|
|
21
|
+
"test": "bash tests/npm_skill_distribution_test.sh && bash tests/skill_structure_test.sh && bash tests/windows_path_wrappers_test.sh && bash tests/private_file_permissions_test.sh && bash tests/eip_preflight_test.sh && bash tests/mcp_tools_runtime_check_test.sh && bash tests/runtime_summary_check_test.sh && bash tests/s6_wire_local_test.sh && bash tests/render_userdata_remote_nodes_test.sh"
|
|
22
22
|
},
|
|
23
23
|
"engines": {
|
|
24
24
|
"node": ">=18"
|
package/scripts/destroy.ps1
CHANGED
|
@@ -7,6 +7,7 @@ $ErrorActionPreference = 'Stop'
|
|
|
7
7
|
|
|
8
8
|
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
9
9
|
$RepoRoot = Split-Path -Parent $ScriptDir
|
|
10
|
+
. (Join-Path $ScriptDir 'lib\windows-paths.ps1')
|
|
10
11
|
|
|
11
12
|
function Find-GitBash {
|
|
12
13
|
$candidates = @(
|
|
@@ -23,43 +24,13 @@ function Find-GitBash {
|
|
|
23
24
|
throw "Git Bash was not found. Install Git for Windows or run scripts/destroy.sh from a POSIX shell."
|
|
24
25
|
}
|
|
25
26
|
|
|
26
|
-
function ConvertTo-GitBashPath([string] $Path) {
|
|
27
|
-
$normalized = $Path.Replace('\', '/')
|
|
28
|
-
if ($normalized -match '^/[A-Za-z]/') {
|
|
29
|
-
return $normalized
|
|
30
|
-
}
|
|
31
|
-
if ($normalized -match '^/mnt/[A-Za-z]/') {
|
|
32
|
-
$drive = $normalized.Substring(5, 1).ToLowerInvariant()
|
|
33
|
-
$rest = $normalized.Substring(6)
|
|
34
|
-
return "/$drive$rest"
|
|
35
|
-
}
|
|
36
|
-
$full = [System.IO.Path]::GetFullPath($Path)
|
|
37
|
-
$drive = $full.Substring(0, 1).ToLowerInvariant()
|
|
38
|
-
$rest = $full.Substring(2).Replace('\', '/')
|
|
39
|
-
return "/$drive$rest"
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function Convert-ArgumentForGitBash([string] $Value) {
|
|
43
|
-
if ($Value -match '^[A-Za-z]:[\\/]') {
|
|
44
|
-
return ConvertTo-GitBashPath $Value
|
|
45
|
-
}
|
|
46
|
-
if ($Value -match '^\.{1,2}[\\/]') {
|
|
47
|
-
return ConvertTo-GitBashPath (Join-Path (Get-Location).ProviderPath $Value)
|
|
48
|
-
}
|
|
49
|
-
return $Value
|
|
50
|
-
}
|
|
51
|
-
|
|
52
27
|
function Quote-BashArg([string] $Value) {
|
|
53
28
|
return "'" + ($Value -replace "'", "'\''") + "'"
|
|
54
29
|
}
|
|
55
30
|
|
|
56
31
|
$bash = Find-GitBash
|
|
57
32
|
|
|
58
|
-
$windowsDirexioHome =
|
|
59
|
-
$env:DIREXIO_HOME
|
|
60
|
-
} else {
|
|
61
|
-
Join-Path $env:USERPROFILE '.direxio'
|
|
62
|
-
}
|
|
33
|
+
$windowsDirexioHome = Resolve-WindowsDirexioHome
|
|
63
34
|
$env:DIREXIO_WINDOWS_HOME = $windowsDirexioHome
|
|
64
35
|
$env:DIREXIO_HOME = ConvertTo-GitBashPath $windowsDirexioHome
|
|
65
36
|
$env:DIREXIO_LOCAL_PATH_STYLE = 'windows'
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
function ConvertTo-GitBashPath([string] $Path) {
|
|
2
|
+
if ([string]::IsNullOrWhiteSpace($Path)) {
|
|
3
|
+
return $Path
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
$normalized = $Path.Replace('\', '/')
|
|
7
|
+
if ($normalized -match '^/[A-Za-z](/|$)') {
|
|
8
|
+
return $normalized
|
|
9
|
+
}
|
|
10
|
+
if ($normalized -match '^/mnt/[A-Za-z](/|$)') {
|
|
11
|
+
$drive = $normalized.Substring(5, 1).ToLowerInvariant()
|
|
12
|
+
$rest = $normalized.Substring(6)
|
|
13
|
+
return "/$drive$rest"
|
|
14
|
+
}
|
|
15
|
+
if ($normalized -match '^[A-Za-z]:/') {
|
|
16
|
+
$drive = $normalized.Substring(0, 1).ToLowerInvariant()
|
|
17
|
+
$rest = $normalized.Substring(2)
|
|
18
|
+
return "/$drive$rest"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
$full = [System.IO.Path]::GetFullPath($Path)
|
|
22
|
+
$drive = $full.Substring(0, 1).ToLowerInvariant()
|
|
23
|
+
$rest = $full.Substring(2).Replace('\', '/')
|
|
24
|
+
return "/$drive$rest"
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function Resolve-WindowsDirexioHome {
|
|
28
|
+
if ($env:DIREXIO_HOME) {
|
|
29
|
+
$normalized = $env:DIREXIO_HOME.Replace('\', '/')
|
|
30
|
+
if ($normalized -notmatch '^/[A-Za-z](/|$)' -and $normalized -notmatch '^/mnt/[A-Za-z](/|$)') {
|
|
31
|
+
return $env:DIREXIO_HOME
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return Join-Path $env:USERPROFILE '.direxio'
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function Convert-ArgumentForGitBash([string] $Value) {
|
|
38
|
+
if ($Value -match '^[A-Za-z]:[\\/]') {
|
|
39
|
+
return ConvertTo-GitBashPath $Value
|
|
40
|
+
}
|
|
41
|
+
if ($Value -match '^\.{1,2}[\\/]') {
|
|
42
|
+
return ConvertTo-GitBashPath (Join-Path (Get-Location).ProviderPath $Value)
|
|
43
|
+
}
|
|
44
|
+
return $Value
|
|
45
|
+
}
|
package/scripts/orchestrate.ps1
CHANGED
|
@@ -7,6 +7,7 @@ $ErrorActionPreference = 'Stop'
|
|
|
7
7
|
|
|
8
8
|
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
9
9
|
$RepoRoot = Split-Path -Parent $ScriptDir
|
|
10
|
+
. (Join-Path $ScriptDir 'lib\windows-paths.ps1')
|
|
10
11
|
|
|
11
12
|
function Find-GitBash {
|
|
12
13
|
$candidates = @(
|
|
@@ -23,13 +24,6 @@ function Find-GitBash {
|
|
|
23
24
|
throw "Git Bash was not found. Install Git for Windows or run scripts/orchestrate.sh from a POSIX shell."
|
|
24
25
|
}
|
|
25
26
|
|
|
26
|
-
function ConvertTo-GitBashPath([string] $Path) {
|
|
27
|
-
$full = [System.IO.Path]::GetFullPath($Path)
|
|
28
|
-
$drive = $full.Substring(0, 1).ToLowerInvariant()
|
|
29
|
-
$rest = $full.Substring(2).Replace('\', '/')
|
|
30
|
-
return "/$drive$rest"
|
|
31
|
-
}
|
|
32
|
-
|
|
33
27
|
function Quote-BashArg([string] $Value) {
|
|
34
28
|
return "'" + ($Value -replace "'", "'\''") + "'"
|
|
35
29
|
}
|
|
@@ -72,7 +66,7 @@ function Set-AgentCommandIfMissing([string[]] $EnvNames, [string[]] $CommandName
|
|
|
72
66
|
|
|
73
67
|
$bash = Find-GitBash
|
|
74
68
|
|
|
75
|
-
$windowsDirexioHome =
|
|
69
|
+
$windowsDirexioHome = Resolve-WindowsDirexioHome
|
|
76
70
|
$env:DIREXIO_WINDOWS_HOME = $windowsDirexioHome
|
|
77
71
|
$env:DIREXIO_HOME = ConvertTo-GitBashPath $windowsDirexioHome
|
|
78
72
|
$env:DIREXIO_LOCAL_PATH_STYLE = 'windows'
|