@oisincoveney/pipeline 1.10.0 → 1.10.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/index.js +9 -1
- package/dist/pipeline-init.js +5 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -152,7 +152,7 @@ const BUILTIN_PIPE_COMMANDS = new Set([
|
|
|
152
152
|
"runner-job"
|
|
153
153
|
]);
|
|
154
154
|
function createCliProgram() {
|
|
155
|
-
const configuredPipeline =
|
|
155
|
+
const configuredPipeline = tryLoadConfiguredEntrypoints(process.env.PIPELINE_TARGET_PATH ?? process.cwd());
|
|
156
156
|
const program = new Command();
|
|
157
157
|
program.name("@oisincoveney/pipeline").description("Run and install the oisin pipeline").exitOverride();
|
|
158
158
|
const runAction = async (descriptionParts, flags) => {
|
|
@@ -214,6 +214,14 @@ function createCliProgram() {
|
|
|
214
214
|
} });
|
|
215
215
|
return program;
|
|
216
216
|
}
|
|
217
|
+
function tryLoadConfiguredEntrypoints(cwd) {
|
|
218
|
+
try {
|
|
219
|
+
return tryLoadPipelineConfig(cwd, { allowMissingLintFileReferences: true });
|
|
220
|
+
} catch (err) {
|
|
221
|
+
if (err instanceof PipelineConfigError) return null;
|
|
222
|
+
throw err;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
217
225
|
function registerConfiguredEntrypointCommands(program, config) {
|
|
218
226
|
const registered = /* @__PURE__ */ new Set();
|
|
219
227
|
if (!config) return registered;
|
package/dist/pipeline-init.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PIPELINE_CONFIG_PATH, PROFILES_CONFIG_PATH, RUNNERS_CONFIG_PATH, loadPipelineConfig } from "./config.js";
|
|
2
2
|
import { DEFAULT_MCP_INSTALLS, DEFAULT_SKILL_INSTALLS, defaultMcpJson, installDefaultMcpsWithCli } from "./mcp/bootstrap.js";
|
|
3
|
-
import { existsSync } from "node:fs";
|
|
3
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
5
5
|
import { execa } from "execa";
|
|
6
6
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
@@ -945,7 +945,10 @@ async function initPipelineProject(options = {}) {
|
|
|
945
945
|
const cwd = options.cwd ?? process.cwd();
|
|
946
946
|
const files = defaultPipelineScaffoldFiles();
|
|
947
947
|
const paths = Object.keys(files);
|
|
948
|
-
const conflicts = paths.filter((path) =>
|
|
948
|
+
const conflicts = paths.filter((path) => {
|
|
949
|
+
const target = join(cwd, path);
|
|
950
|
+
return existsSync(target) && readFileSync(target, "utf8") !== files[path];
|
|
951
|
+
});
|
|
949
952
|
if (conflicts.length > 0 && !options.overwrite) throw new PipelineInitError(conflicts);
|
|
950
953
|
const mcpInstallResult = await (options.mcpInstaller ?? installDefaultMcpsWithCli)(DEFAULT_MCP_INSTALLS, cwd);
|
|
951
954
|
await (options.skillInstaller ?? installDefaultSkillsWithCli)(DEFAULT_SKILL_INSTALLS, cwd);
|
package/package.json
CHANGED