@misterhuydo/sentinel 1.0.18 → 1.0.20

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.
@@ -1,6 +1,6 @@
1
1
  {
2
- "message": "Auto-checkpoint at 2026-03-21T18:38:32.740Z",
3
- "checkpoint_at": "2026-03-21T18:38:32.741Z",
2
+ "message": "Auto-checkpoint at 2026-03-21T18:58:50.927Z",
3
+ "checkpoint_at": "2026-03-21T18:58:50.928Z",
4
4
  "active_files": [],
5
5
  "notes": [],
6
6
  "mtime_snapshot": {}
package/lib/generate.js CHANGED
@@ -117,18 +117,39 @@ for project_dir in "$WORKSPACE"/*/; do
117
117
  [[ -f "$project_dir/start.sh" ]] || continue
118
118
 
119
119
  # Must have at least one repo-config with a valid GitHub REPO_URL
120
+ repo_configs_dir="$project_dir/config/repo-configs"
121
+ if [[ ! -d "$repo_configs_dir" ]]; then
122
+ echo "[sentinel] Skipping $name — config/repo-configs/ directory not found"
123
+ skipped=$((skipped + 1))
124
+ continue
125
+ fi
126
+
127
+ has_config=false
120
128
  valid_repo=false
121
- for props in "$project_dir/config/repo-configs/"*.properties; do
129
+ for props in "$repo_configs_dir/"*.properties; do
122
130
  [[ -f "$props" ]] || continue
123
131
  [[ "$(basename "$props")" == _* ]] && continue
132
+ has_config=true
124
133
  if grep -qE "^REPO_URL[[:space:]]*=[[:space:]]*(git@github\.com:|https://github\.com/)" "$props"; then
125
134
  valid_repo=true
126
135
  break
136
+ else
137
+ repo_url=$(grep -E "^REPO_URL[[:space:]]*=" "$props" | head -1 | cut -d= -f2- | xargs 2>/dev/null || true)
138
+ if [[ -z "$repo_url" ]]; then
139
+ echo "[sentinel] Skipping $name — REPO_URL not set in $(basename \"$props\")"
140
+ else
141
+ echo "[sentinel] Skipping $name — REPO_URL in $(basename \"$props\") is not a GitHub URL: $repo_url"
142
+ fi
127
143
  fi
128
144
  done
129
145
 
146
+ if [[ "$has_config" == "false" ]]; then
147
+ echo "[sentinel] Skipping $name — no .properties files in config/repo-configs/ (only _example?)"
148
+ skipped=$((skipped + 1))
149
+ continue
150
+ fi
151
+
130
152
  if [[ "$valid_repo" == "false" ]]; then
131
- echo "[sentinel] Skipping $name — no valid REPO_URL found in config/repo-configs/"
132
153
  skipped=$((skipped + 1))
133
154
  continue
134
155
  fi
package/lib/init.js CHANGED
@@ -221,14 +221,14 @@ function readExistingConfig(workspace) {
221
221
  if (!fs.existsSync(propsPath)) return {};
222
222
  const result = {};
223
223
  try {
224
- fs.readFileSync(propsPath, 'utf8').split('
225
- ').forEach(line => {
226
- line = line.trim();
227
- if (!line || line.startsWith('#')) return;
224
+ const lines = fs.readFileSync(propsPath, 'utf8').split(/\r?\n/);
225
+ for (const raw of lines) {
226
+ const line = raw.trim();
227
+ if (!line || line.startsWith('#')) continue;
228
228
  const idx = line.indexOf('=');
229
- if (idx === -1) return;
229
+ if (idx === -1) continue;
230
230
  result[line.slice(0, idx).trim()] = line.slice(idx + 1).trim();
231
- });
231
+ }
232
232
  } catch (_) {}
233
233
  return result;
234
234
  }
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
- {
2
- "name": "@misterhuydo/sentinel",
3
- "version": "1.0.18",
4
- "description": "Sentinel — Autonomous DevOps Agent installer and manager",
5
- "bin": {
6
- "sentinel": "./bin/sentinel.js"
7
- },
8
- "scripts": {
9
- "prepublishOnly": "node scripts/bundle.js"
10
- },
11
- "dependencies": {
12
- "chalk": "^4.1.2",
13
- "fs-extra": "^11.2.0",
14
- "prompts": "^2.4.2"
15
- },
16
- "engines": {
17
- "node": ">=16"
18
- },
19
- "author": "misterhuydo",
20
- "license": "MIT"
21
- }
1
+ {
2
+ "name": "@misterhuydo/sentinel",
3
+ "version": "1.0.20",
4
+ "description": "Sentinel — Autonomous DevOps Agent installer and manager",
5
+ "bin": {
6
+ "sentinel": "./bin/sentinel.js"
7
+ },
8
+ "scripts": {
9
+ "prepublishOnly": "node scripts/bundle.js"
10
+ },
11
+ "dependencies": {
12
+ "chalk": "^4.1.2",
13
+ "fs-extra": "^11.2.0",
14
+ "prompts": "^2.4.2"
15
+ },
16
+ "engines": {
17
+ "node": ">=16"
18
+ },
19
+ "author": "misterhuydo",
20
+ "license": "MIT"
21
+ }