@solidactions/cli 1.20.0 → 1.22.0

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/utils/env.js CHANGED
@@ -3,10 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.RESERVED_ENV_PREFIX = void 0;
6
7
  exports.parseEnvFile = parseEnvFile;
7
8
  exports.parseYamlEnvVars = parseYamlEnvVars;
8
9
  exports.getYamlDeclaredVars = getYamlDeclaredVars;
9
10
  exports.loadSolidActionsConfig = loadSolidActionsConfig;
11
+ exports.isReservedEnvName = isReservedEnvName;
12
+ exports.reservedEnvNameError = reservedEnvNameError;
10
13
  const fs_1 = __importDefault(require("fs"));
11
14
  const js_yaml_1 = __importDefault(require("js-yaml"));
12
15
  /**
@@ -91,3 +94,19 @@ function loadSolidActionsConfig(yamlPath) {
91
94
  const content = fs_1.default.readFileSync(yamlPath, 'utf8');
92
95
  return js_yaml_1.default.load(content);
93
96
  }
97
+ /**
98
+ * Reserved runtime env-name prefix. SOLIDACTIONS_* names are set by the
99
+ * platform at dispatch time (SOLIDACTIONS_API_KEY, SOLIDACTIONS_API_URL, run
100
+ * context); a custom variable with such a name clobbers the platform
101
+ * credential — the field failure mode is a bare 401 out of
102
+ * InvokeSystemDatabase.init before any workflow code runs. Case-sensitive,
103
+ * matching the server-side rule (App\Support\ReservedEnvNames).
104
+ */
105
+ exports.RESERVED_ENV_PREFIX = 'SOLIDACTIONS_';
106
+ function isReservedEnvName(key) {
107
+ return key.startsWith(exports.RESERVED_ENV_PREFIX);
108
+ }
109
+ function reservedEnvNameError(key) {
110
+ const suggestion = key.replace(/^SOLIDACTIONS_/, 'MY_');
111
+ return `"${key}" uses the reserved ${exports.RESERVED_ENV_PREFIX} prefix. These names are set by the platform at runtime (API credentials, run context) and a custom variable would clobber them, causing authentication failures. Choose a different name (e.g. "${suggestion}").`;
112
+ }
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.skillTargetDir = skillTargetDir;
7
7
  exports.installSkills = installSkills;
8
8
  exports.fetchAiHelperContent = fetchAiHelperContent;
9
+ exports.hasSolidActionsSkills = hasSolidActionsSkills;
9
10
  const fs_1 = __importDefault(require("fs"));
10
11
  const path_1 = __importDefault(require("path"));
11
12
  const fs_extra_1 = __importDefault(require("fs-extra"));
@@ -58,3 +59,21 @@ async function installSkills(targetDir) {
58
59
  async function fetchAiHelperContent(targetFile) {
59
60
  return (0, github_1.fetchRawFile)(EXAMPLES_OWNER, EXAMPLES_REPO, targetFile);
60
61
  }
62
+ /**
63
+ * True when the project dir already has SolidActions skill files installed
64
+ * (either AI-helper convention). Used by `deploy` for a non-blocking tip —
65
+ * these files are how AI assistants self-rescue on env-scope/deploy traps.
66
+ */
67
+ function hasSolidActionsSkills(projectDir) {
68
+ for (const target of ['CLAUDE.md', 'AGENTS.md']) {
69
+ const dir = skillTargetDir(target, projectDir);
70
+ if (!fs_1.default.existsSync(dir)) {
71
+ continue;
72
+ }
73
+ const entries = fs_1.default.readdirSync(dir);
74
+ if (entries.some((f) => f.startsWith('solidactions-') && f.endsWith('.md'))) {
75
+ return true;
76
+ }
77
+ }
78
+ return false;
79
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidactions/cli",
3
- "version": "1.20.0",
3
+ "version": "1.22.0",
4
4
  "description": "SolidActions CLI - Deploy and manage workflow automation",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -32,7 +32,7 @@
32
32
  "deploy"
33
33
  ],
34
34
  "scripts": {
35
- "build": "tsc",
35
+ "build": "tsc && cp src/commands/dev-shim.mjs dist/commands/dev-shim.mjs",
36
36
  "prepublishOnly": "npm run build",
37
37
  "test": "vitest run",
38
38
  "test:watch": "vitest"