@rtrentjones/greenlight 0.6.0 → 0.6.1

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/dist/bin.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  scanSqlFiles,
10
10
  toExportResult,
11
11
  verifyAll
12
- } from "./chunk-FZH2YQPJ.js";
12
+ } from "./chunk-MDG3MT34.js";
13
13
  import "./chunk-HX7VA25D.js";
14
14
  import "./chunk-N3IKUCSF.js";
15
15
  import "./chunk-KP3Y6WRU.js";
@@ -602,7 +602,7 @@ function tokensForTool(tool) {
602
602
  }
603
603
 
604
604
  // src/version.ts
605
- var MODULE_REF = "v0.6.0";
605
+ var MODULE_REF = "v0.6.1";
606
606
  var MODULE_SOURCE_BASE = "git::https://github.com/RTrentJones/greenlight.git//infra/modules";
607
607
  function moduleSource(module, ref = MODULE_REF) {
608
608
  return `${MODULE_SOURCE_BASE}/${module}?ref=${ref}`;
@@ -1121,6 +1121,14 @@ function setGitHubSecret(repo, env, key, value) {
1121
1121
  throw new Error(`failed to set ${key}${detail ? `: ${detail}` : " (check `gh auth status`)"}`);
1122
1122
  }
1123
1123
  }
1124
+ function appSecretsToGather(entry, packs) {
1125
+ const packKeys = new Set(
1126
+ packs.flatMap(
1127
+ (p) => p.tokens.map((t) => secretKeyFor(t, entry.name ?? "", entry.tokenOverrides))
1128
+ )
1129
+ );
1130
+ return (entry.tokens ?? []).filter((k) => !packKeys.has(k));
1131
+ }
1124
1132
  async function gatherSecrets(name, repo, env, prefill) {
1125
1133
  const { config } = await loadManifest();
1126
1134
  const entry = resolveEntry(config, name);
@@ -1179,6 +1187,29 @@ async function gatherSecrets(name, repo, env, prefill) {
1179
1187
  pushed++;
1180
1188
  }
1181
1189
  }
1190
+ const appSecrets = appSecretsToGather(entry, packs);
1191
+ if (appSecrets.length) {
1192
+ console.log(`\u2500\u2500 ${name} (app secrets)`);
1193
+ for (const key of appSecrets) {
1194
+ const pre = prefill?.get(key);
1195
+ if (pre) {
1196
+ setGitHubSecret(repo, env, key, pre);
1197
+ console.log(` \u2714 ${existing?.has(key) ? "overrode" : "pushed"} ${key} \u2190 prefill`);
1198
+ pushed++;
1199
+ continue;
1200
+ }
1201
+ const state = existing ? existing.has(key) ? " [already set]" : " [not set]" : "";
1202
+ const value = await prompt.ask(` ${key}${state}
1203
+ value: `);
1204
+ if (!value) {
1205
+ console.log(existing?.has(key) ? " \xB7 kept existing" : " \xB7 skipped");
1206
+ continue;
1207
+ }
1208
+ setGitHubSecret(repo, env, key, value);
1209
+ console.log(` \u2714 ${existing?.has(key) ? "overrode" : "pushed"} ${key} \u2192 ${repo}`);
1210
+ pushed++;
1211
+ }
1212
+ }
1182
1213
  } finally {
1183
1214
  prompt.close();
1184
1215
  }
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { GreenlightConfig, defineConfig, loadConfig } from '@rtrentjones/greenlight-shared';
1
+ export { GreenlightConfig, ResolveUrlOptions, defineConfig, loadConfig, resolveUrl } from '@rtrentjones/greenlight-shared';
2
2
  export { VerifySpec, defineVerify } from '@rtrentjones/greenlight-verify';
package/dist/index.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  defineConfig,
3
3
  defineVerify,
4
- loadConfig
5
- } from "./chunk-FZH2YQPJ.js";
4
+ loadConfig,
5
+ resolveUrl
6
+ } from "./chunk-MDG3MT34.js";
6
7
  import "./chunk-HX7VA25D.js";
7
8
  import "./chunk-N3IKUCSF.js";
8
9
  import "./chunk-KP3Y6WRU.js";
@@ -12,5 +13,6 @@ import "./chunk-QFKE5JKC.js";
12
13
  export {
13
14
  defineConfig,
14
15
  defineVerify,
15
- loadConfig
16
+ loadConfig,
17
+ resolveUrl
16
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtrentjones/greenlight",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Greenlight CLI — setup and lifecycle for the harness.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -31,10 +31,10 @@
31
31
  "@anthropic-ai/sdk": "^0.69.0"
32
32
  },
33
33
  "devDependencies": {
34
- "@rtrentjones/greenlight-adapters": "0.6.0",
35
- "@rtrentjones/greenlight-shared": "0.6.0",
36
- "@rtrentjones/greenlight-verify": "0.6.0",
37
- "@rtrentjones/greenlight-loop": "0.6.0"
34
+ "@rtrentjones/greenlight-adapters": "0.6.1",
35
+ "@rtrentjones/greenlight-loop": "0.6.1",
36
+ "@rtrentjones/greenlight-shared": "0.6.1",
37
+ "@rtrentjones/greenlight-verify": "0.6.1"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "node scripts/copy-assets.mjs && tsup",
File without changes