@synergenius/flow-weaver 0.17.15 → 0.19.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/cli/flow-weaver.mjs +348 -253
- package/dist/cli/index.js +9 -2
- package/dist/cli/pack-commands.d.ts +13 -0
- package/dist/cli/pack-commands.js +75 -0
- package/dist/generated-version.d.ts +1 -1
- package/dist/generated-version.js +1 -1
- package/dist/marketplace/index.d.ts +1 -1
- package/dist/marketplace/types.d.ts +30 -0
- package/dist/mcp/pack-tools.d.ts +9 -0
- package/dist/mcp/pack-tools.js +36 -0
- package/dist/mcp/server.js +2 -0
- package/package.json +1 -1
package/dist/cli/flow-weaver.mjs
CHANGED
|
@@ -935,7 +935,7 @@ var require_command = __commonJS({
|
|
|
935
935
|
"node_modules/commander/lib/command.js"(exports2) {
|
|
936
936
|
var EventEmitter2 = __require("events").EventEmitter;
|
|
937
937
|
var childProcess = __require("child_process");
|
|
938
|
-
var
|
|
938
|
+
var path56 = __require("path");
|
|
939
939
|
var fs53 = __require("fs");
|
|
940
940
|
var process6 = __require("process");
|
|
941
941
|
var { Argument: Argument2, humanReadableArgName } = require_argument();
|
|
@@ -1759,9 +1759,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1759
1759
|
let launchWithNode = false;
|
|
1760
1760
|
const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
|
|
1761
1761
|
function findFile(baseDir, baseName) {
|
|
1762
|
-
const localBin =
|
|
1762
|
+
const localBin = path56.resolve(baseDir, baseName);
|
|
1763
1763
|
if (fs53.existsSync(localBin)) return localBin;
|
|
1764
|
-
if (sourceExt.includes(
|
|
1764
|
+
if (sourceExt.includes(path56.extname(baseName))) return void 0;
|
|
1765
1765
|
const foundExt = sourceExt.find((ext2) => fs53.existsSync(`${localBin}${ext2}`));
|
|
1766
1766
|
if (foundExt) return `${localBin}${foundExt}`;
|
|
1767
1767
|
return void 0;
|
|
@@ -1777,19 +1777,19 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1777
1777
|
} catch (err) {
|
|
1778
1778
|
resolvedScriptPath = this._scriptPath;
|
|
1779
1779
|
}
|
|
1780
|
-
executableDir =
|
|
1780
|
+
executableDir = path56.resolve(path56.dirname(resolvedScriptPath), executableDir);
|
|
1781
1781
|
}
|
|
1782
1782
|
if (executableDir) {
|
|
1783
1783
|
let localFile = findFile(executableDir, executableFile);
|
|
1784
1784
|
if (!localFile && !subcommand._executableFile && this._scriptPath) {
|
|
1785
|
-
const legacyName =
|
|
1785
|
+
const legacyName = path56.basename(this._scriptPath, path56.extname(this._scriptPath));
|
|
1786
1786
|
if (legacyName !== this._name) {
|
|
1787
1787
|
localFile = findFile(executableDir, `${legacyName}-${subcommand._name}`);
|
|
1788
1788
|
}
|
|
1789
1789
|
}
|
|
1790
1790
|
executableFile = localFile || executableFile;
|
|
1791
1791
|
}
|
|
1792
|
-
launchWithNode = sourceExt.includes(
|
|
1792
|
+
launchWithNode = sourceExt.includes(path56.extname(executableFile));
|
|
1793
1793
|
let proc2;
|
|
1794
1794
|
if (process6.platform !== "win32") {
|
|
1795
1795
|
if (launchWithNode) {
|
|
@@ -2572,7 +2572,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2572
2572
|
* @return {Command}
|
|
2573
2573
|
*/
|
|
2574
2574
|
nameFromFilename(filename) {
|
|
2575
|
-
this._name =
|
|
2575
|
+
this._name = path56.basename(filename, path56.extname(filename));
|
|
2576
2576
|
return this;
|
|
2577
2577
|
}
|
|
2578
2578
|
/**
|
|
@@ -2586,9 +2586,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2586
2586
|
* @param {string} [path]
|
|
2587
2587
|
* @return {string|null|Command}
|
|
2588
2588
|
*/
|
|
2589
|
-
executableDir(
|
|
2590
|
-
if (
|
|
2591
|
-
this._executableDir =
|
|
2589
|
+
executableDir(path57) {
|
|
2590
|
+
if (path57 === void 0) return this._executableDir;
|
|
2591
|
+
this._executableDir = path57;
|
|
2592
2592
|
return this;
|
|
2593
2593
|
}
|
|
2594
2594
|
/**
|
|
@@ -7088,12 +7088,12 @@ var init_esm4 = __esm({
|
|
|
7088
7088
|
/**
|
|
7089
7089
|
* Get the Path object referenced by the string path, resolved from this Path
|
|
7090
7090
|
*/
|
|
7091
|
-
resolve(
|
|
7092
|
-
if (!
|
|
7091
|
+
resolve(path56) {
|
|
7092
|
+
if (!path56) {
|
|
7093
7093
|
return this;
|
|
7094
7094
|
}
|
|
7095
|
-
const rootPath = this.getRootString(
|
|
7096
|
-
const dir =
|
|
7095
|
+
const rootPath = this.getRootString(path56);
|
|
7096
|
+
const dir = path56.substring(rootPath.length);
|
|
7097
7097
|
const dirParts = dir.split(this.splitSep);
|
|
7098
7098
|
const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts);
|
|
7099
7099
|
return result;
|
|
@@ -7845,8 +7845,8 @@ var init_esm4 = __esm({
|
|
|
7845
7845
|
/**
|
|
7846
7846
|
* @internal
|
|
7847
7847
|
*/
|
|
7848
|
-
getRootString(
|
|
7849
|
-
return win32.parse(
|
|
7848
|
+
getRootString(path56) {
|
|
7849
|
+
return win32.parse(path56).root;
|
|
7850
7850
|
}
|
|
7851
7851
|
/**
|
|
7852
7852
|
* @internal
|
|
@@ -7892,8 +7892,8 @@ var init_esm4 = __esm({
|
|
|
7892
7892
|
/**
|
|
7893
7893
|
* @internal
|
|
7894
7894
|
*/
|
|
7895
|
-
getRootString(
|
|
7896
|
-
return
|
|
7895
|
+
getRootString(path56) {
|
|
7896
|
+
return path56.startsWith("/") ? "/" : "";
|
|
7897
7897
|
}
|
|
7898
7898
|
/**
|
|
7899
7899
|
* @internal
|
|
@@ -7982,11 +7982,11 @@ var init_esm4 = __esm({
|
|
|
7982
7982
|
/**
|
|
7983
7983
|
* Get the depth of a provided path, string, or the cwd
|
|
7984
7984
|
*/
|
|
7985
|
-
depth(
|
|
7986
|
-
if (typeof
|
|
7987
|
-
|
|
7985
|
+
depth(path56 = this.cwd) {
|
|
7986
|
+
if (typeof path56 === "string") {
|
|
7987
|
+
path56 = this.cwd.resolve(path56);
|
|
7988
7988
|
}
|
|
7989
|
-
return
|
|
7989
|
+
return path56.depth();
|
|
7990
7990
|
}
|
|
7991
7991
|
/**
|
|
7992
7992
|
* Return the cache of child entries. Exposed so subclasses can create
|
|
@@ -8473,9 +8473,9 @@ var init_esm4 = __esm({
|
|
|
8473
8473
|
process6();
|
|
8474
8474
|
return results;
|
|
8475
8475
|
}
|
|
8476
|
-
chdir(
|
|
8476
|
+
chdir(path56 = this.cwd) {
|
|
8477
8477
|
const oldCwd = this.cwd;
|
|
8478
|
-
this.cwd = typeof
|
|
8478
|
+
this.cwd = typeof path56 === "string" ? this.cwd.resolve(path56) : path56;
|
|
8479
8479
|
this.cwd[setAsCwd](oldCwd);
|
|
8480
8480
|
}
|
|
8481
8481
|
};
|
|
@@ -8850,8 +8850,8 @@ var init_processor = __esm({
|
|
|
8850
8850
|
}
|
|
8851
8851
|
// match, absolute, ifdir
|
|
8852
8852
|
entries() {
|
|
8853
|
-
return [...this.store.entries()].map(([
|
|
8854
|
-
|
|
8853
|
+
return [...this.store.entries()].map(([path56, n]) => [
|
|
8854
|
+
path56,
|
|
8855
8855
|
!!(n & 2),
|
|
8856
8856
|
!!(n & 1)
|
|
8857
8857
|
]);
|
|
@@ -9064,9 +9064,9 @@ var init_walker = __esm({
|
|
|
9064
9064
|
signal;
|
|
9065
9065
|
maxDepth;
|
|
9066
9066
|
includeChildMatches;
|
|
9067
|
-
constructor(patterns,
|
|
9067
|
+
constructor(patterns, path56, opts) {
|
|
9068
9068
|
this.patterns = patterns;
|
|
9069
|
-
this.path =
|
|
9069
|
+
this.path = path56;
|
|
9070
9070
|
this.opts = opts;
|
|
9071
9071
|
this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/";
|
|
9072
9072
|
this.includeChildMatches = opts.includeChildMatches !== false;
|
|
@@ -9085,11 +9085,11 @@ var init_walker = __esm({
|
|
|
9085
9085
|
});
|
|
9086
9086
|
}
|
|
9087
9087
|
}
|
|
9088
|
-
#ignored(
|
|
9089
|
-
return this.seen.has(
|
|
9088
|
+
#ignored(path56) {
|
|
9089
|
+
return this.seen.has(path56) || !!this.#ignore?.ignored?.(path56);
|
|
9090
9090
|
}
|
|
9091
|
-
#childrenIgnored(
|
|
9092
|
-
return !!this.#ignore?.childrenIgnored?.(
|
|
9091
|
+
#childrenIgnored(path56) {
|
|
9092
|
+
return !!this.#ignore?.childrenIgnored?.(path56);
|
|
9093
9093
|
}
|
|
9094
9094
|
// backpressure mechanism
|
|
9095
9095
|
pause() {
|
|
@@ -9304,8 +9304,8 @@ var init_walker = __esm({
|
|
|
9304
9304
|
};
|
|
9305
9305
|
GlobWalker = class extends GlobUtil {
|
|
9306
9306
|
matches = /* @__PURE__ */ new Set();
|
|
9307
|
-
constructor(patterns,
|
|
9308
|
-
super(patterns,
|
|
9307
|
+
constructor(patterns, path56, opts) {
|
|
9308
|
+
super(patterns, path56, opts);
|
|
9309
9309
|
}
|
|
9310
9310
|
matchEmit(e) {
|
|
9311
9311
|
this.matches.add(e);
|
|
@@ -9342,8 +9342,8 @@ var init_walker = __esm({
|
|
|
9342
9342
|
};
|
|
9343
9343
|
GlobStream = class extends GlobUtil {
|
|
9344
9344
|
results;
|
|
9345
|
-
constructor(patterns,
|
|
9346
|
-
super(patterns,
|
|
9345
|
+
constructor(patterns, path56, opts) {
|
|
9346
|
+
super(patterns, path56, opts);
|
|
9347
9347
|
this.results = new Minipass({
|
|
9348
9348
|
signal: this.signal,
|
|
9349
9349
|
objectMode: true
|
|
@@ -9671,7 +9671,7 @@ var VERSION;
|
|
|
9671
9671
|
var init_generated_version = __esm({
|
|
9672
9672
|
"src/generated-version.ts"() {
|
|
9673
9673
|
"use strict";
|
|
9674
|
-
VERSION = "0.
|
|
9674
|
+
VERSION = "0.19.0";
|
|
9675
9675
|
}
|
|
9676
9676
|
});
|
|
9677
9677
|
|
|
@@ -12783,7 +12783,7 @@ var require_util = __commonJS({
|
|
|
12783
12783
|
var normalize2 = createSafeHandler((url2) => {
|
|
12784
12784
|
});
|
|
12785
12785
|
exports2.normalize = normalize2;
|
|
12786
|
-
function
|
|
12786
|
+
function join29(aRoot, aPath) {
|
|
12787
12787
|
const pathType = getURLType(aPath);
|
|
12788
12788
|
const rootType = getURLType(aRoot);
|
|
12789
12789
|
aRoot = ensureDirectory(aRoot);
|
|
@@ -12813,7 +12813,7 @@ var require_util = __commonJS({
|
|
|
12813
12813
|
const newPath = withBase(aPath, withBase(aRoot, base));
|
|
12814
12814
|
return computeRelativeURL(base, newPath);
|
|
12815
12815
|
}
|
|
12816
|
-
exports2.join =
|
|
12816
|
+
exports2.join = join29;
|
|
12817
12817
|
function relative9(rootURL, targetURL) {
|
|
12818
12818
|
const result = relativeIfPossible(rootURL, targetURL);
|
|
12819
12819
|
return typeof result === "string" ? result : normalize2(targetURL);
|
|
@@ -12842,8 +12842,8 @@ var require_util = __commonJS({
|
|
|
12842
12842
|
sourceURL = sourceURL.replace(/^\//, "");
|
|
12843
12843
|
}
|
|
12844
12844
|
let url2 = normalize2(sourceURL || "");
|
|
12845
|
-
if (sourceRoot) url2 =
|
|
12846
|
-
if (sourceMapURL) url2 =
|
|
12845
|
+
if (sourceRoot) url2 = join29(sourceRoot, url2);
|
|
12846
|
+
if (sourceMapURL) url2 = join29(trimFilename(sourceMapURL), url2);
|
|
12847
12847
|
return url2;
|
|
12848
12848
|
}
|
|
12849
12849
|
exports2.computeSourceURL = computeSourceURL;
|
|
@@ -13395,10 +13395,10 @@ var require_read_wasm = __commonJS({
|
|
|
13395
13395
|
"node_modules/source-map/lib/read-wasm.js"(exports2, module2) {
|
|
13396
13396
|
"use strict";
|
|
13397
13397
|
var fs53 = __require("fs");
|
|
13398
|
-
var
|
|
13398
|
+
var path56 = __require("path");
|
|
13399
13399
|
module2.exports = function readWasm() {
|
|
13400
13400
|
return new Promise((resolve37, reject2) => {
|
|
13401
|
-
const wasmPath =
|
|
13401
|
+
const wasmPath = path56.join(__dirname, "mappings.wasm");
|
|
13402
13402
|
fs53.readFile(wasmPath, null, (error2, data) => {
|
|
13403
13403
|
if (error2) {
|
|
13404
13404
|
reject2(error2);
|
|
@@ -16273,7 +16273,7 @@ ${file}:${line}:${column}: ERROR: ${pluginText}${e.text}`;
|
|
|
16273
16273
|
}
|
|
16274
16274
|
var fs53 = __require("fs");
|
|
16275
16275
|
var os3 = __require("os");
|
|
16276
|
-
var
|
|
16276
|
+
var path56 = __require("path");
|
|
16277
16277
|
var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH;
|
|
16278
16278
|
var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild";
|
|
16279
16279
|
var packageDarwin_arm64 = "@esbuild/darwin-arm64";
|
|
@@ -16332,19 +16332,19 @@ ${file}:${line}:${column}: ERROR: ${pluginText}${e.text}`;
|
|
|
16332
16332
|
}
|
|
16333
16333
|
function pkgForSomeOtherPlatform() {
|
|
16334
16334
|
const libMainJS = __require.resolve("esbuild");
|
|
16335
|
-
const nodeModulesDirectory =
|
|
16336
|
-
if (
|
|
16335
|
+
const nodeModulesDirectory = path56.dirname(path56.dirname(path56.dirname(libMainJS)));
|
|
16336
|
+
if (path56.basename(nodeModulesDirectory) === "node_modules") {
|
|
16337
16337
|
for (const unixKey in knownUnixlikePackages) {
|
|
16338
16338
|
try {
|
|
16339
16339
|
const pkg = knownUnixlikePackages[unixKey];
|
|
16340
|
-
if (fs53.existsSync(
|
|
16340
|
+
if (fs53.existsSync(path56.join(nodeModulesDirectory, pkg))) return pkg;
|
|
16341
16341
|
} catch {
|
|
16342
16342
|
}
|
|
16343
16343
|
}
|
|
16344
16344
|
for (const windowsKey in knownWindowsPackages) {
|
|
16345
16345
|
try {
|
|
16346
16346
|
const pkg = knownWindowsPackages[windowsKey];
|
|
16347
|
-
if (fs53.existsSync(
|
|
16347
|
+
if (fs53.existsSync(path56.join(nodeModulesDirectory, pkg))) return pkg;
|
|
16348
16348
|
} catch {
|
|
16349
16349
|
}
|
|
16350
16350
|
}
|
|
@@ -16352,8 +16352,8 @@ ${file}:${line}:${column}: ERROR: ${pluginText}${e.text}`;
|
|
|
16352
16352
|
return null;
|
|
16353
16353
|
}
|
|
16354
16354
|
function downloadedBinPath(pkg, subpath) {
|
|
16355
|
-
const esbuildLibDir =
|
|
16356
|
-
return
|
|
16355
|
+
const esbuildLibDir = path56.dirname(__require.resolve("esbuild"));
|
|
16356
|
+
return path56.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path56.basename(subpath)}`);
|
|
16357
16357
|
}
|
|
16358
16358
|
function generateBinPath() {
|
|
16359
16359
|
if (isValidBinaryPath(ESBUILD_BINARY_PATH)) {
|
|
@@ -16443,15 +16443,15 @@ for your current platform.`);
|
|
|
16443
16443
|
}
|
|
16444
16444
|
if (pnpapi) {
|
|
16445
16445
|
const root2 = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation;
|
|
16446
|
-
const binTargetPath =
|
|
16446
|
+
const binTargetPath = path56.join(
|
|
16447
16447
|
root2,
|
|
16448
16448
|
"node_modules",
|
|
16449
16449
|
".cache",
|
|
16450
16450
|
"esbuild",
|
|
16451
|
-
`pnpapi-${pkg.replace("/", "-")}-${"0.27.3"}-${
|
|
16451
|
+
`pnpapi-${pkg.replace("/", "-")}-${"0.27.3"}-${path56.basename(subpath)}`
|
|
16452
16452
|
);
|
|
16453
16453
|
if (!fs53.existsSync(binTargetPath)) {
|
|
16454
|
-
fs53.mkdirSync(
|
|
16454
|
+
fs53.mkdirSync(path56.dirname(binTargetPath), { recursive: true });
|
|
16455
16455
|
fs53.copyFileSync(binPath, binTargetPath);
|
|
16456
16456
|
fs53.chmodSync(binTargetPath, 493);
|
|
16457
16457
|
}
|
|
@@ -18055,9 +18055,9 @@ var init_port_tag_utils = __esm({
|
|
|
18055
18055
|
});
|
|
18056
18056
|
|
|
18057
18057
|
// src/sugar-optimizer.ts
|
|
18058
|
-
function validatePathMacro(
|
|
18058
|
+
function validatePathMacro(path56, connections, instances) {
|
|
18059
18059
|
const instanceIds = new Set(instances.map((inst) => inst.id));
|
|
18060
|
-
for (const step of
|
|
18060
|
+
for (const step of path56.steps) {
|
|
18061
18061
|
if (step.node === "Start" || step.node === "Exit") continue;
|
|
18062
18062
|
if (!instanceIds.has(step.node)) return false;
|
|
18063
18063
|
}
|
|
@@ -18067,9 +18067,9 @@ function validatePathMacro(path54, connections, instances) {
|
|
|
18067
18067
|
connKeys.add(`${conn.from.node}.${conn.from.port}->${conn.to.node}.${conn.to.port}`);
|
|
18068
18068
|
}
|
|
18069
18069
|
}
|
|
18070
|
-
for (let i = 0; i <
|
|
18071
|
-
const current2 =
|
|
18072
|
-
const next =
|
|
18070
|
+
for (let i = 0; i < path56.steps.length - 1; i++) {
|
|
18071
|
+
const current2 = path56.steps[i];
|
|
18072
|
+
const next = path56.steps[i + 1];
|
|
18073
18073
|
const route = current2.route || "ok";
|
|
18074
18074
|
let expectedKey;
|
|
18075
18075
|
if (current2.node === "Start") {
|
|
@@ -18173,12 +18173,12 @@ function detectSugarPatterns(connections, instances, existingMacros, nodeTypes,
|
|
|
18173
18173
|
}
|
|
18174
18174
|
const candidateRoutes = [];
|
|
18175
18175
|
const MAX_ROUTES = 20;
|
|
18176
|
-
function dfs(node,
|
|
18176
|
+
function dfs(node, path56, visited) {
|
|
18177
18177
|
if (candidateRoutes.length >= MAX_ROUTES) return;
|
|
18178
18178
|
if (node === "Exit") {
|
|
18179
|
-
|
|
18180
|
-
candidateRoutes.push([...
|
|
18181
|
-
|
|
18179
|
+
path56.push({ node: "Exit" });
|
|
18180
|
+
candidateRoutes.push([...path56]);
|
|
18181
|
+
path56.pop();
|
|
18182
18182
|
return;
|
|
18183
18183
|
}
|
|
18184
18184
|
if (visited.has(node)) return;
|
|
@@ -18190,15 +18190,15 @@ function detectSugarPatterns(connections, instances, existingMacros, nodeTypes,
|
|
|
18190
18190
|
}
|
|
18191
18191
|
if (edges.ok && !coveredByExistingMacro.has(edges.ok === "Exit" ? "" : edges.ok)) {
|
|
18192
18192
|
const step = node === "Start" ? { node: "Start" } : { node };
|
|
18193
|
-
|
|
18194
|
-
dfs(edges.ok,
|
|
18195
|
-
|
|
18193
|
+
path56.push(step);
|
|
18194
|
+
dfs(edges.ok, path56, visited);
|
|
18195
|
+
path56.pop();
|
|
18196
18196
|
}
|
|
18197
18197
|
if (edges.fail && !coveredByExistingMacro.has(edges.fail === "Exit" ? "" : edges.fail)) {
|
|
18198
18198
|
const step = { node, route: "fail" };
|
|
18199
|
-
|
|
18200
|
-
dfs(edges.fail,
|
|
18201
|
-
|
|
18199
|
+
path56.push(step);
|
|
18200
|
+
dfs(edges.fail, path56, visited);
|
|
18201
|
+
path56.pop();
|
|
18202
18202
|
}
|
|
18203
18203
|
visited.delete(node);
|
|
18204
18204
|
}
|
|
@@ -21787,11 +21787,11 @@ var init_toKey = __esm({
|
|
|
21787
21787
|
});
|
|
21788
21788
|
|
|
21789
21789
|
// node_modules/lodash-es/_baseGet.js
|
|
21790
|
-
function baseGet(object3,
|
|
21791
|
-
|
|
21792
|
-
var index = 0, length =
|
|
21790
|
+
function baseGet(object3, path56) {
|
|
21791
|
+
path56 = castPath_default(path56, object3);
|
|
21792
|
+
var index = 0, length = path56.length;
|
|
21793
21793
|
while (object3 != null && index < length) {
|
|
21794
|
-
object3 = object3[toKey_default(
|
|
21794
|
+
object3 = object3[toKey_default(path56[index++])];
|
|
21795
21795
|
}
|
|
21796
21796
|
return index && index == length ? object3 : void 0;
|
|
21797
21797
|
}
|
|
@@ -21805,8 +21805,8 @@ var init_baseGet = __esm({
|
|
|
21805
21805
|
});
|
|
21806
21806
|
|
|
21807
21807
|
// node_modules/lodash-es/get.js
|
|
21808
|
-
function get(object3,
|
|
21809
|
-
var result = object3 == null ? void 0 : baseGet_default(object3,
|
|
21808
|
+
function get(object3, path56, defaultValue) {
|
|
21809
|
+
var result = object3 == null ? void 0 : baseGet_default(object3, path56);
|
|
21810
21810
|
return result === void 0 ? defaultValue : result;
|
|
21811
21811
|
}
|
|
21812
21812
|
var get_default;
|
|
@@ -23169,11 +23169,11 @@ var init_baseHasIn = __esm({
|
|
|
23169
23169
|
});
|
|
23170
23170
|
|
|
23171
23171
|
// node_modules/lodash-es/_hasPath.js
|
|
23172
|
-
function hasPath(object3,
|
|
23173
|
-
|
|
23174
|
-
var index = -1, length =
|
|
23172
|
+
function hasPath(object3, path56, hasFunc) {
|
|
23173
|
+
path56 = castPath_default(path56, object3);
|
|
23174
|
+
var index = -1, length = path56.length, result = false;
|
|
23175
23175
|
while (++index < length) {
|
|
23176
|
-
var key = toKey_default(
|
|
23176
|
+
var key = toKey_default(path56[index]);
|
|
23177
23177
|
if (!(result = object3 != null && hasFunc(object3, key))) {
|
|
23178
23178
|
break;
|
|
23179
23179
|
}
|
|
@@ -23199,8 +23199,8 @@ var init_hasPath = __esm({
|
|
|
23199
23199
|
});
|
|
23200
23200
|
|
|
23201
23201
|
// node_modules/lodash-es/hasIn.js
|
|
23202
|
-
function hasIn(object3,
|
|
23203
|
-
return object3 != null && hasPath_default(object3,
|
|
23202
|
+
function hasIn(object3, path56) {
|
|
23203
|
+
return object3 != null && hasPath_default(object3, path56, baseHasIn_default);
|
|
23204
23204
|
}
|
|
23205
23205
|
var hasIn_default;
|
|
23206
23206
|
var init_hasIn = __esm({
|
|
@@ -23212,13 +23212,13 @@ var init_hasIn = __esm({
|
|
|
23212
23212
|
});
|
|
23213
23213
|
|
|
23214
23214
|
// node_modules/lodash-es/_baseMatchesProperty.js
|
|
23215
|
-
function baseMatchesProperty(
|
|
23216
|
-
if (isKey_default(
|
|
23217
|
-
return matchesStrictComparable_default(toKey_default(
|
|
23215
|
+
function baseMatchesProperty(path56, srcValue) {
|
|
23216
|
+
if (isKey_default(path56) && isStrictComparable_default(srcValue)) {
|
|
23217
|
+
return matchesStrictComparable_default(toKey_default(path56), srcValue);
|
|
23218
23218
|
}
|
|
23219
23219
|
return function(object3) {
|
|
23220
|
-
var objValue = get_default(object3,
|
|
23221
|
-
return objValue === void 0 && objValue === srcValue ? hasIn_default(object3,
|
|
23220
|
+
var objValue = get_default(object3, path56);
|
|
23221
|
+
return objValue === void 0 && objValue === srcValue ? hasIn_default(object3, path56) : baseIsEqual_default(srcValue, objValue, COMPARE_PARTIAL_FLAG6 | COMPARE_UNORDERED_FLAG4);
|
|
23222
23222
|
};
|
|
23223
23223
|
}
|
|
23224
23224
|
var COMPARE_PARTIAL_FLAG6, COMPARE_UNORDERED_FLAG4, baseMatchesProperty_default;
|
|
@@ -23251,9 +23251,9 @@ var init_baseProperty = __esm({
|
|
|
23251
23251
|
});
|
|
23252
23252
|
|
|
23253
23253
|
// node_modules/lodash-es/_basePropertyDeep.js
|
|
23254
|
-
function basePropertyDeep(
|
|
23254
|
+
function basePropertyDeep(path56) {
|
|
23255
23255
|
return function(object3) {
|
|
23256
|
-
return baseGet_default(object3,
|
|
23256
|
+
return baseGet_default(object3, path56);
|
|
23257
23257
|
};
|
|
23258
23258
|
}
|
|
23259
23259
|
var basePropertyDeep_default;
|
|
@@ -23265,8 +23265,8 @@ var init_basePropertyDeep = __esm({
|
|
|
23265
23265
|
});
|
|
23266
23266
|
|
|
23267
23267
|
// node_modules/lodash-es/property.js
|
|
23268
|
-
function property(
|
|
23269
|
-
return isKey_default(
|
|
23268
|
+
function property(path56) {
|
|
23269
|
+
return isKey_default(path56) ? baseProperty_default(toKey_default(path56)) : basePropertyDeep_default(path56);
|
|
23270
23270
|
}
|
|
23271
23271
|
var property_default;
|
|
23272
23272
|
var init_property = __esm({
|
|
@@ -23885,8 +23885,8 @@ var init_baseHas = __esm({
|
|
|
23885
23885
|
});
|
|
23886
23886
|
|
|
23887
23887
|
// node_modules/lodash-es/has.js
|
|
23888
|
-
function has(object3,
|
|
23889
|
-
return object3 != null && hasPath_default(object3,
|
|
23888
|
+
function has(object3, path56) {
|
|
23889
|
+
return object3 != null && hasPath_default(object3, path56, baseHas_default);
|
|
23890
23890
|
}
|
|
23891
23891
|
var has_default;
|
|
23892
23892
|
var init_has = __esm({
|
|
@@ -24092,14 +24092,14 @@ var init_negate = __esm({
|
|
|
24092
24092
|
});
|
|
24093
24093
|
|
|
24094
24094
|
// node_modules/lodash-es/_baseSet.js
|
|
24095
|
-
function baseSet(object3,
|
|
24095
|
+
function baseSet(object3, path56, value2, customizer) {
|
|
24096
24096
|
if (!isObject_default(object3)) {
|
|
24097
24097
|
return object3;
|
|
24098
24098
|
}
|
|
24099
|
-
|
|
24100
|
-
var index = -1, length =
|
|
24099
|
+
path56 = castPath_default(path56, object3);
|
|
24100
|
+
var index = -1, length = path56.length, lastIndex = length - 1, nested = object3;
|
|
24101
24101
|
while (nested != null && ++index < length) {
|
|
24102
|
-
var key = toKey_default(
|
|
24102
|
+
var key = toKey_default(path56[index]), newValue = value2;
|
|
24103
24103
|
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
24104
24104
|
return object3;
|
|
24105
24105
|
}
|
|
@@ -24107,7 +24107,7 @@ function baseSet(object3, path54, value2, customizer) {
|
|
|
24107
24107
|
var objValue = nested[key];
|
|
24108
24108
|
newValue = customizer ? customizer(objValue, key, nested) : void 0;
|
|
24109
24109
|
if (newValue === void 0) {
|
|
24110
|
-
newValue = isObject_default(objValue) ? objValue : isIndex_default(
|
|
24110
|
+
newValue = isObject_default(objValue) ? objValue : isIndex_default(path56[index + 1]) ? [] : {};
|
|
24111
24111
|
}
|
|
24112
24112
|
}
|
|
24113
24113
|
assignValue_default(nested, key, newValue);
|
|
@@ -24131,9 +24131,9 @@ var init_baseSet = __esm({
|
|
|
24131
24131
|
function basePickBy(object3, paths, predicate) {
|
|
24132
24132
|
var index = -1, length = paths.length, result = {};
|
|
24133
24133
|
while (++index < length) {
|
|
24134
|
-
var
|
|
24135
|
-
if (predicate(value2,
|
|
24136
|
-
baseSet_default(result, castPath_default(
|
|
24134
|
+
var path56 = paths[index], value2 = baseGet_default(object3, path56);
|
|
24135
|
+
if (predicate(value2, path56)) {
|
|
24136
|
+
baseSet_default(result, castPath_default(path56, object3), value2);
|
|
24137
24137
|
}
|
|
24138
24138
|
}
|
|
24139
24139
|
return result;
|
|
@@ -24157,8 +24157,8 @@ function pickBy(object3, predicate) {
|
|
|
24157
24157
|
return [prop];
|
|
24158
24158
|
});
|
|
24159
24159
|
predicate = baseIteratee_default(predicate);
|
|
24160
|
-
return basePickBy_default(object3, props, function(value2,
|
|
24161
|
-
return predicate(value2,
|
|
24160
|
+
return basePickBy_default(object3, props, function(value2, path56) {
|
|
24161
|
+
return predicate(value2, path56[0]);
|
|
24162
24162
|
});
|
|
24163
24163
|
}
|
|
24164
24164
|
var pickBy_default;
|
|
@@ -26905,12 +26905,12 @@ function assignCategoriesMapProp(tokenTypes) {
|
|
|
26905
26905
|
singleAssignCategoriesToksMap([], currTokType);
|
|
26906
26906
|
});
|
|
26907
26907
|
}
|
|
26908
|
-
function singleAssignCategoriesToksMap(
|
|
26909
|
-
forEach_default(
|
|
26908
|
+
function singleAssignCategoriesToksMap(path56, nextNode) {
|
|
26909
|
+
forEach_default(path56, (pathNode) => {
|
|
26910
26910
|
nextNode.categoryMatchesMap[pathNode.tokenTypeIdx] = true;
|
|
26911
26911
|
});
|
|
26912
26912
|
forEach_default(nextNode.CATEGORIES, (nextCategory) => {
|
|
26913
|
-
const newPath =
|
|
26913
|
+
const newPath = path56.concat(nextNode);
|
|
26914
26914
|
if (!includes_default(newPath, nextCategory)) {
|
|
26915
26915
|
singleAssignCategoriesToksMap(newPath, nextCategory);
|
|
26916
26916
|
}
|
|
@@ -28080,10 +28080,10 @@ var init_interpreter = __esm({
|
|
|
28080
28080
|
init_rest();
|
|
28081
28081
|
init_api2();
|
|
28082
28082
|
AbstractNextPossibleTokensWalker = class extends RestWalker {
|
|
28083
|
-
constructor(topProd,
|
|
28083
|
+
constructor(topProd, path56) {
|
|
28084
28084
|
super();
|
|
28085
28085
|
this.topProd = topProd;
|
|
28086
|
-
this.path =
|
|
28086
|
+
this.path = path56;
|
|
28087
28087
|
this.possibleTokTypes = [];
|
|
28088
28088
|
this.nextProductionName = "";
|
|
28089
28089
|
this.nextProductionOccurrence = 0;
|
|
@@ -28127,9 +28127,9 @@ var init_interpreter = __esm({
|
|
|
28127
28127
|
}
|
|
28128
28128
|
};
|
|
28129
28129
|
NextAfterTokenWalker = class extends AbstractNextPossibleTokensWalker {
|
|
28130
|
-
constructor(topProd,
|
|
28131
|
-
super(topProd,
|
|
28132
|
-
this.path =
|
|
28130
|
+
constructor(topProd, path56) {
|
|
28131
|
+
super(topProd, path56);
|
|
28132
|
+
this.path = path56;
|
|
28133
28133
|
this.nextTerminalName = "";
|
|
28134
28134
|
this.nextTerminalOccurrence = 0;
|
|
28135
28135
|
this.nextTerminalName = this.path.lastTok.name;
|
|
@@ -28370,10 +28370,10 @@ function initializeArrayOfArrays(size) {
|
|
|
28370
28370
|
}
|
|
28371
28371
|
return result;
|
|
28372
28372
|
}
|
|
28373
|
-
function pathToHashKeys(
|
|
28373
|
+
function pathToHashKeys(path56) {
|
|
28374
28374
|
let keys2 = [""];
|
|
28375
|
-
for (let i = 0; i <
|
|
28376
|
-
const tokType =
|
|
28375
|
+
for (let i = 0; i < path56.length; i++) {
|
|
28376
|
+
const tokType = path56[i];
|
|
28377
28377
|
const longerKeys = [];
|
|
28378
28378
|
for (let j = 0; j < keys2.length; j++) {
|
|
28379
28379
|
const currShorterKey = keys2[j];
|
|
@@ -28676,7 +28676,7 @@ function validateRuleIsOverridden(ruleName, definedRulesNames, className) {
|
|
|
28676
28676
|
}
|
|
28677
28677
|
return errors2;
|
|
28678
28678
|
}
|
|
28679
|
-
function validateNoLeftRecursion(topRule, currRule, errMsgProvider,
|
|
28679
|
+
function validateNoLeftRecursion(topRule, currRule, errMsgProvider, path56 = []) {
|
|
28680
28680
|
const errors2 = [];
|
|
28681
28681
|
const nextNonTerminals = getFirstNoneTerminal(currRule.definition);
|
|
28682
28682
|
if (isEmpty_default(nextNonTerminals)) {
|
|
@@ -28688,15 +28688,15 @@ function validateNoLeftRecursion(topRule, currRule, errMsgProvider, path54 = [])
|
|
|
28688
28688
|
errors2.push({
|
|
28689
28689
|
message: errMsgProvider.buildLeftRecursionError({
|
|
28690
28690
|
topLevelRule: topRule,
|
|
28691
|
-
leftRecursionPath:
|
|
28691
|
+
leftRecursionPath: path56
|
|
28692
28692
|
}),
|
|
28693
28693
|
type: ParserDefinitionErrorType.LEFT_RECURSION,
|
|
28694
28694
|
ruleName
|
|
28695
28695
|
});
|
|
28696
28696
|
}
|
|
28697
|
-
const validNextSteps = difference_default(nextNonTerminals,
|
|
28697
|
+
const validNextSteps = difference_default(nextNonTerminals, path56.concat([topRule]));
|
|
28698
28698
|
const errorsFromNextSteps = flatMap_default(validNextSteps, (currRefRule) => {
|
|
28699
|
-
const newPath = clone_default(
|
|
28699
|
+
const newPath = clone_default(path56);
|
|
28700
28700
|
newPath.push(currRefRule);
|
|
28701
28701
|
return validateNoLeftRecursion(topRule, currRefRule, errMsgProvider, newPath);
|
|
28702
28702
|
});
|
|
@@ -39026,13 +39026,13 @@ Add '@param ${fromPort}' to the workflow JSDoc and include it in the params obje
|
|
|
39026
39026
|
connections.filter((c) => c.from.node === c.to.node).map((c) => c.from.node)
|
|
39027
39027
|
);
|
|
39028
39028
|
const nonSelfLoopConnections = connections.filter((c) => c.from.node !== c.to.node);
|
|
39029
|
-
const dfs = (nodeName,
|
|
39029
|
+
const dfs = (nodeName, path56) => {
|
|
39030
39030
|
if (recursionStack.has(nodeName)) {
|
|
39031
39031
|
if (selfLoopNodes.has(nodeName)) {
|
|
39032
39032
|
return false;
|
|
39033
39033
|
}
|
|
39034
|
-
const cycleStart =
|
|
39035
|
-
const cyclePath = [...
|
|
39034
|
+
const cycleStart = path56.indexOf(nodeName);
|
|
39035
|
+
const cyclePath = [...path56.slice(cycleStart), nodeName];
|
|
39036
39036
|
const cycleNodes = cyclePath.slice(0, -1);
|
|
39037
39037
|
const sortedCycle = [...cycleNodes].sort();
|
|
39038
39038
|
const cycleKey = sortedCycle.join(",");
|
|
@@ -39054,7 +39054,7 @@ Add '@param ${fromPort}' to the workflow JSDoc and include it in the params obje
|
|
|
39054
39054
|
return false;
|
|
39055
39055
|
}
|
|
39056
39056
|
recursionStack.add(nodeName);
|
|
39057
|
-
const newPath = [...
|
|
39057
|
+
const newPath = [...path56, nodeName];
|
|
39058
39058
|
const instance = instances.find((n) => n.id === nodeName);
|
|
39059
39059
|
if (!instance) {
|
|
39060
39060
|
recursionStack.delete(nodeName);
|
|
@@ -40314,7 +40314,7 @@ function processResult(result, scope) {
|
|
|
40314
40314
|
}
|
|
40315
40315
|
return result !== NOTHING ? result : void 0;
|
|
40316
40316
|
}
|
|
40317
|
-
function finalize(rootScope, value2,
|
|
40317
|
+
function finalize(rootScope, value2, path56) {
|
|
40318
40318
|
if (isFrozen(value2))
|
|
40319
40319
|
return value2;
|
|
40320
40320
|
const useStrictIteration = rootScope.immer_.shouldUseStrictIteration();
|
|
@@ -40322,7 +40322,7 @@ function finalize(rootScope, value2, path54) {
|
|
|
40322
40322
|
if (!state) {
|
|
40323
40323
|
each(
|
|
40324
40324
|
value2,
|
|
40325
|
-
(key, childValue) => finalizeProperty(rootScope, state, value2, key, childValue,
|
|
40325
|
+
(key, childValue) => finalizeProperty(rootScope, state, value2, key, childValue, path56),
|
|
40326
40326
|
useStrictIteration
|
|
40327
40327
|
);
|
|
40328
40328
|
return value2;
|
|
@@ -40352,16 +40352,16 @@ function finalize(rootScope, value2, path54) {
|
|
|
40352
40352
|
result,
|
|
40353
40353
|
key,
|
|
40354
40354
|
childValue,
|
|
40355
|
-
|
|
40355
|
+
path56,
|
|
40356
40356
|
isSet22
|
|
40357
40357
|
),
|
|
40358
40358
|
useStrictIteration
|
|
40359
40359
|
);
|
|
40360
40360
|
maybeFreeze(rootScope, result, false);
|
|
40361
|
-
if (
|
|
40361
|
+
if (path56 && rootScope.patches_) {
|
|
40362
40362
|
getPlugin("Patches").generatePatches_(
|
|
40363
40363
|
state,
|
|
40364
|
-
|
|
40364
|
+
path56,
|
|
40365
40365
|
rootScope.patches_,
|
|
40366
40366
|
rootScope.inversePatches_
|
|
40367
40367
|
);
|
|
@@ -40383,9 +40383,9 @@ function finalizeProperty(rootScope, parentState, targetObject, prop, childValue
|
|
|
40383
40383
|
if (process.env.NODE_ENV !== "production" && childValue === targetObject)
|
|
40384
40384
|
die(5);
|
|
40385
40385
|
if (isDraft(childValue)) {
|
|
40386
|
-
const
|
|
40386
|
+
const path56 = rootPath && parentState && parentState.type_ !== 3 && // Set objects are atomic since they have no keys.
|
|
40387
40387
|
!has2(parentState.assigned_, prop) ? rootPath.concat(prop) : void 0;
|
|
40388
|
-
const res = finalize(rootScope, childValue,
|
|
40388
|
+
const res = finalize(rootScope, childValue, path56);
|
|
40389
40389
|
set(targetObject, prop, res);
|
|
40390
40390
|
if (isDraft(res)) {
|
|
40391
40391
|
rootScope.canAutoFreeze_ = false;
|
|
@@ -49966,14 +49966,14 @@ function waypointsToSvgPath(waypoints, cornerRadius) {
|
|
|
49966
49966
|
radii[i + 1] *= scale;
|
|
49967
49967
|
}
|
|
49968
49968
|
}
|
|
49969
|
-
let
|
|
49969
|
+
let path56 = `M ${waypoints[0][0]},${waypoints[0][1]}`;
|
|
49970
49970
|
for (let i = 1; i < waypoints.length - 1; i++) {
|
|
49971
49971
|
const prev = waypoints[i - 1];
|
|
49972
49972
|
const curr = waypoints[i];
|
|
49973
49973
|
const next = waypoints[i + 1];
|
|
49974
49974
|
const r = radii[i];
|
|
49975
49975
|
if (r < 2) {
|
|
49976
|
-
|
|
49976
|
+
path56 += ` L ${curr[0]},${curr[1]}`;
|
|
49977
49977
|
continue;
|
|
49978
49978
|
}
|
|
49979
49979
|
const dPrev = [prev[0] - curr[0], prev[1] - curr[1]];
|
|
@@ -49986,12 +49986,12 @@ function waypointsToSvgPath(waypoints, cornerRadius) {
|
|
|
49986
49986
|
const arcEnd = [curr[0] + uNext[0] * r, curr[1] + uNext[1] * r];
|
|
49987
49987
|
const cross = dPrev[0] * dNext[1] - dPrev[1] * dNext[0];
|
|
49988
49988
|
const sweep = cross > 0 ? 0 : 1;
|
|
49989
|
-
|
|
49990
|
-
|
|
49989
|
+
path56 += ` L ${arcStart[0]},${arcStart[1]}`;
|
|
49990
|
+
path56 += ` A ${r} ${r} 0 0 ${sweep} ${arcEnd[0]},${arcEnd[1]}`;
|
|
49991
49991
|
}
|
|
49992
49992
|
const last2 = waypoints[waypoints.length - 1];
|
|
49993
|
-
|
|
49994
|
-
return
|
|
49993
|
+
path56 += ` L ${last2[0]},${last2[1]}`;
|
|
49994
|
+
return path56;
|
|
49995
49995
|
}
|
|
49996
49996
|
function computeWaypoints(from, to, nodeBoxes, sourceNodeId, targetNodeId, padding, exitStub, entryStub, allocator) {
|
|
49997
49997
|
const isSelfConnection = sourceNodeId === targetNodeId;
|
|
@@ -50138,7 +50138,7 @@ function calculateOrthogonalPath(from, to, nodeBoxes, sourceNodeId, targetNodeId
|
|
|
50138
50138
|
}
|
|
50139
50139
|
function calculateOrthogonalPathSafe(from, to, nodeBoxes, sourceNodeId, targetNodeId, options, allocator) {
|
|
50140
50140
|
try {
|
|
50141
|
-
const
|
|
50141
|
+
const path56 = calculateOrthogonalPath(
|
|
50142
50142
|
from,
|
|
50143
50143
|
to,
|
|
50144
50144
|
nodeBoxes,
|
|
@@ -50147,8 +50147,8 @@ function calculateOrthogonalPathSafe(from, to, nodeBoxes, sourceNodeId, targetNo
|
|
|
50147
50147
|
options,
|
|
50148
50148
|
allocator
|
|
50149
50149
|
);
|
|
50150
|
-
if (!
|
|
50151
|
-
return
|
|
50150
|
+
if (!path56 || path56.length < 5) return null;
|
|
50151
|
+
return path56;
|
|
50152
50152
|
} catch {
|
|
50153
50153
|
return null;
|
|
50154
50154
|
}
|
|
@@ -50372,13 +50372,13 @@ function computeConnectionPath(sx, sy, tx, ty) {
|
|
|
50372
50372
|
const deUy = deY / deLen;
|
|
50373
50373
|
const [cx, cy] = quadCurveControl(bx, by, dx, dy, -deUx, -deUy);
|
|
50374
50374
|
const [fx, fy] = quadCurveControl(gx, gy, ex, ey, deUx, deUy);
|
|
50375
|
-
let
|
|
50376
|
-
|
|
50377
|
-
|
|
50378
|
-
|
|
50379
|
-
|
|
50380
|
-
|
|
50381
|
-
return
|
|
50375
|
+
let path56 = `M ${cx},${cy} M ${ax},${ay}`;
|
|
50376
|
+
path56 += ` L ${bx},${by}`;
|
|
50377
|
+
path56 += ` Q ${cx},${cy} ${dx},${dy}`;
|
|
50378
|
+
path56 += ` L ${ex},${ey}`;
|
|
50379
|
+
path56 += ` Q ${fx},${fy} ${gx},${gy}`;
|
|
50380
|
+
path56 += ` L ${hx},${hy}`;
|
|
50381
|
+
return path56;
|
|
50382
50382
|
}
|
|
50383
50383
|
function orderedPorts(ports, direction) {
|
|
50384
50384
|
const cloned = {};
|
|
@@ -50668,7 +50668,7 @@ function finalizeScopePositions(parentNode, ast, theme = "dark") {
|
|
|
50668
50668
|
function buildConnection(fromNode, fromPort, toNode, toPort, sourcePort, targetPort, theme = "dark") {
|
|
50669
50669
|
const sourceColor = getPortColor(sourcePort.dataType, sourcePort.isFailure, theme);
|
|
50670
50670
|
const targetColor = getPortColor(targetPort.dataType, targetPort.isFailure, theme);
|
|
50671
|
-
const
|
|
50671
|
+
const path56 = computeConnectionPath(sourcePort.cx, sourcePort.cy, targetPort.cx, targetPort.cy);
|
|
50672
50672
|
return {
|
|
50673
50673
|
fromNode,
|
|
50674
50674
|
fromPort,
|
|
@@ -50677,7 +50677,7 @@ function buildConnection(fromNode, fromPort, toNode, toPort, sourcePort, targetP
|
|
|
50677
50677
|
sourceColor,
|
|
50678
50678
|
targetColor,
|
|
50679
50679
|
isStepConnection: sourcePort.dataType === "STEP",
|
|
50680
|
-
path:
|
|
50680
|
+
path: path56
|
|
50681
50681
|
};
|
|
50682
50682
|
}
|
|
50683
50683
|
function portsColumnHeight(count) {
|
|
@@ -51109,7 +51109,7 @@ function buildDiagramGraph(ast, options = {}) {
|
|
|
51109
51109
|
const dy = ty - sy;
|
|
51110
51110
|
const distance = Math.sqrt(dx * dx + dy * dy);
|
|
51111
51111
|
const useCurve = forceCurveSet.has(pc2);
|
|
51112
|
-
let
|
|
51112
|
+
let path56;
|
|
51113
51113
|
if (!useCurve && distance > ORTHOGONAL_DISTANCE_THRESHOLD) {
|
|
51114
51114
|
const orthoPath = calculateOrthogonalPathSafe(
|
|
51115
51115
|
[sx, sy],
|
|
@@ -51120,9 +51120,9 @@ function buildDiagramGraph(ast, options = {}) {
|
|
|
51120
51120
|
{ fromPortIndex: pc2.fromPortIndex, toPortIndex: pc2.toPortIndex },
|
|
51121
51121
|
allocator
|
|
51122
51122
|
);
|
|
51123
|
-
|
|
51123
|
+
path56 = orthoPath ?? computeConnectionPath(sx, sy, tx, ty);
|
|
51124
51124
|
} else {
|
|
51125
|
-
|
|
51125
|
+
path56 = computeConnectionPath(sx, sy, tx, ty);
|
|
51126
51126
|
}
|
|
51127
51127
|
const sourceColor = getPortColor(pc2.sourcePort.dataType, pc2.sourcePort.isFailure, themeName);
|
|
51128
51128
|
const targetColor = getPortColor(pc2.targetPort.dataType, pc2.targetPort.isFailure, themeName);
|
|
@@ -51134,7 +51134,7 @@ function buildDiagramGraph(ast, options = {}) {
|
|
|
51134
51134
|
sourceColor,
|
|
51135
51135
|
targetColor,
|
|
51136
51136
|
isStepConnection: pc2.sourcePort.dataType === "STEP",
|
|
51137
|
-
path:
|
|
51137
|
+
path: path56
|
|
51138
51138
|
});
|
|
51139
51139
|
}
|
|
51140
51140
|
for (const node of nodes) {
|
|
@@ -51214,12 +51214,12 @@ function resolveDefaultIcon(nt) {
|
|
|
51214
51214
|
if (nt.variant === "WORKFLOW" || nt.variant === "IMPORTED_WORKFLOW") return "flow";
|
|
51215
51215
|
return "code";
|
|
51216
51216
|
}
|
|
51217
|
-
function pathExtent(
|
|
51217
|
+
function pathExtent(path56) {
|
|
51218
51218
|
let minX = Infinity, minY = Infinity;
|
|
51219
51219
|
let maxX = -Infinity, maxY = -Infinity;
|
|
51220
51220
|
const pattern = /(-?[\d.]+),(-?[\d.]+)/g;
|
|
51221
51221
|
let m;
|
|
51222
|
-
while ((m = pattern.exec(
|
|
51222
|
+
while ((m = pattern.exec(path56)) !== null) {
|
|
51223
51223
|
const x = parseFloat(m[1]);
|
|
51224
51224
|
const y = parseFloat(m[2]);
|
|
51225
51225
|
minX = Math.min(minX, x);
|
|
@@ -54736,15 +54736,15 @@ var require_route = __commonJS({
|
|
|
54736
54736
|
};
|
|
54737
54737
|
}
|
|
54738
54738
|
function wrapConversion(toModel, graph) {
|
|
54739
|
-
const
|
|
54739
|
+
const path56 = [graph[toModel].parent, toModel];
|
|
54740
54740
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
54741
54741
|
let cur = graph[toModel].parent;
|
|
54742
54742
|
while (graph[cur].parent) {
|
|
54743
|
-
|
|
54743
|
+
path56.unshift(graph[cur].parent);
|
|
54744
54744
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
54745
54745
|
cur = graph[cur].parent;
|
|
54746
54746
|
}
|
|
54747
|
-
fn.conversion =
|
|
54747
|
+
fn.conversion = path56;
|
|
54748
54748
|
return fn;
|
|
54749
54749
|
}
|
|
54750
54750
|
module2.exports = function(fromModel) {
|
|
@@ -67050,8 +67050,8 @@ var require_utils = __commonJS({
|
|
|
67050
67050
|
}
|
|
67051
67051
|
return ind;
|
|
67052
67052
|
}
|
|
67053
|
-
function removeDotSegments(
|
|
67054
|
-
let input =
|
|
67053
|
+
function removeDotSegments(path56) {
|
|
67054
|
+
let input = path56;
|
|
67055
67055
|
const output = [];
|
|
67056
67056
|
let nextSlash = -1;
|
|
67057
67057
|
let len = 0;
|
|
@@ -67250,8 +67250,8 @@ var require_schemes = __commonJS({
|
|
|
67250
67250
|
wsComponent.secure = void 0;
|
|
67251
67251
|
}
|
|
67252
67252
|
if (wsComponent.resourceName) {
|
|
67253
|
-
const [
|
|
67254
|
-
wsComponent.path =
|
|
67253
|
+
const [path56, query] = wsComponent.resourceName.split("?");
|
|
67254
|
+
wsComponent.path = path56 && path56 !== "/" ? path56 : void 0;
|
|
67255
67255
|
wsComponent.query = query;
|
|
67256
67256
|
wsComponent.resourceName = void 0;
|
|
67257
67257
|
}
|
|
@@ -71649,8 +71649,8 @@ var init_generator = __esm({
|
|
|
71649
71649
|
doc.paths["/health"] = this.generateHealthEndpoint();
|
|
71650
71650
|
doc.paths["/workflows"] = this.generateListEndpoint();
|
|
71651
71651
|
for (const endpoint of endpoints) {
|
|
71652
|
-
const
|
|
71653
|
-
doc.paths[
|
|
71652
|
+
const path56 = options.basePath ? `${options.basePath}${endpoint.path}` : endpoint.path;
|
|
71653
|
+
doc.paths[path56] = this.generateWorkflowEndpoint(endpoint);
|
|
71654
71654
|
}
|
|
71655
71655
|
return doc;
|
|
71656
71656
|
}
|
|
@@ -72789,6 +72789,66 @@ var init_deployment = __esm({
|
|
|
72789
72789
|
}
|
|
72790
72790
|
});
|
|
72791
72791
|
|
|
72792
|
+
// src/cli/pack-commands.ts
|
|
72793
|
+
var pack_commands_exports = {};
|
|
72794
|
+
__export(pack_commands_exports, {
|
|
72795
|
+
registerPackCommands: () => registerPackCommands
|
|
72796
|
+
});
|
|
72797
|
+
import * as path55 from "path";
|
|
72798
|
+
function deriveNamespace(packageName) {
|
|
72799
|
+
const base = packageName.replace(/^@[^/]+\//, "");
|
|
72800
|
+
return base.replace(/^flowweaver-pack-/, "");
|
|
72801
|
+
}
|
|
72802
|
+
async function registerPackCommands(program3) {
|
|
72803
|
+
const projectDir = process.cwd();
|
|
72804
|
+
let packages;
|
|
72805
|
+
try {
|
|
72806
|
+
packages = await listInstalledPackages(projectDir);
|
|
72807
|
+
} catch {
|
|
72808
|
+
return;
|
|
72809
|
+
}
|
|
72810
|
+
for (const pkg of packages) {
|
|
72811
|
+
const manifest = pkg.manifest;
|
|
72812
|
+
if (!manifest.cliEntrypoint || !manifest.cliCommands?.length) continue;
|
|
72813
|
+
const namespace = deriveNamespace(pkg.name);
|
|
72814
|
+
const entrypointPath = path55.join(pkg.path, manifest.cliEntrypoint);
|
|
72815
|
+
const group = program3.command(namespace).description(`Commands from ${pkg.name}`);
|
|
72816
|
+
for (const cmd of manifest.cliCommands) {
|
|
72817
|
+
const sub = group.command(cmd.name).description(cmd.description);
|
|
72818
|
+
if (cmd.usage) {
|
|
72819
|
+
sub.argument(cmd.usage);
|
|
72820
|
+
}
|
|
72821
|
+
if (cmd.options) {
|
|
72822
|
+
for (const opt of cmd.options) {
|
|
72823
|
+
if (opt.default !== void 0) {
|
|
72824
|
+
sub.option(opt.flags, opt.description, String(opt.default));
|
|
72825
|
+
} else {
|
|
72826
|
+
sub.option(opt.flags, opt.description);
|
|
72827
|
+
}
|
|
72828
|
+
}
|
|
72829
|
+
}
|
|
72830
|
+
sub.allowUnknownOption(true);
|
|
72831
|
+
sub.action(async (...actionArgs) => {
|
|
72832
|
+
try {
|
|
72833
|
+
const bridge = await import(entrypointPath);
|
|
72834
|
+
const rawArgs = sub.args ?? [];
|
|
72835
|
+
await bridge.handleCommand(cmd.name, rawArgs);
|
|
72836
|
+
} catch (err) {
|
|
72837
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
72838
|
+
console.error(`Error running ${namespace} ${cmd.name}: ${msg}`);
|
|
72839
|
+
process.exit(1);
|
|
72840
|
+
}
|
|
72841
|
+
});
|
|
72842
|
+
}
|
|
72843
|
+
}
|
|
72844
|
+
}
|
|
72845
|
+
var init_pack_commands = __esm({
|
|
72846
|
+
"src/cli/pack-commands.ts"() {
|
|
72847
|
+
"use strict";
|
|
72848
|
+
init_registry();
|
|
72849
|
+
}
|
|
72850
|
+
});
|
|
72851
|
+
|
|
72792
72852
|
// src/cli/env-setup.ts
|
|
72793
72853
|
if (process.env.FORCE_COLOR === "0") {
|
|
72794
72854
|
process.env.NO_COLOR = "1";
|
|
@@ -74507,17 +74567,17 @@ function buildAdjacency(ast) {
|
|
|
74507
74567
|
function enumeratePaths(ast) {
|
|
74508
74568
|
const { fromStart, toExit, edges } = buildAdjacency(ast);
|
|
74509
74569
|
const paths = [];
|
|
74510
|
-
function dfs(current2,
|
|
74570
|
+
function dfs(current2, path56, visited) {
|
|
74511
74571
|
if (toExit.has(current2)) {
|
|
74512
|
-
paths.push([...
|
|
74572
|
+
paths.push([...path56, "Exit"]);
|
|
74513
74573
|
}
|
|
74514
74574
|
const targets = edges.get(current2) || [];
|
|
74515
74575
|
for (const next of targets) {
|
|
74516
74576
|
if (!visited.has(next)) {
|
|
74517
74577
|
visited.add(next);
|
|
74518
|
-
|
|
74519
|
-
dfs(next,
|
|
74520
|
-
|
|
74578
|
+
path56.push(next);
|
|
74579
|
+
dfs(next, path56, visited);
|
|
74580
|
+
path56.pop();
|
|
74521
74581
|
visited.delete(next);
|
|
74522
74582
|
}
|
|
74523
74583
|
}
|
|
@@ -74531,22 +74591,22 @@ function enumeratePaths(ast) {
|
|
|
74531
74591
|
function buildGraph(ast) {
|
|
74532
74592
|
const { fromStart, toExit, edges } = buildAdjacency(ast);
|
|
74533
74593
|
const lines = [];
|
|
74534
|
-
function dfs(current2,
|
|
74594
|
+
function dfs(current2, path56, visited) {
|
|
74535
74595
|
if (toExit.has(current2)) {
|
|
74536
|
-
lines.push([...
|
|
74596
|
+
lines.push([...path56, "Exit"].join(" -> "));
|
|
74537
74597
|
}
|
|
74538
74598
|
const targets = edges.get(current2) || [];
|
|
74539
74599
|
for (const next of targets) {
|
|
74540
74600
|
if (!visited.has(next)) {
|
|
74541
74601
|
visited.add(next);
|
|
74542
|
-
|
|
74543
|
-
dfs(next,
|
|
74544
|
-
|
|
74602
|
+
path56.push(next);
|
|
74603
|
+
dfs(next, path56, visited);
|
|
74604
|
+
path56.pop();
|
|
74545
74605
|
visited.delete(next);
|
|
74546
74606
|
}
|
|
74547
74607
|
}
|
|
74548
74608
|
if (targets.length === 0 && !toExit.has(current2)) {
|
|
74549
|
-
lines.push(
|
|
74609
|
+
lines.push(path56.join(" -> "));
|
|
74550
74610
|
}
|
|
74551
74611
|
}
|
|
74552
74612
|
fromStart.forEach((startNode) => {
|
|
@@ -81319,12 +81379,12 @@ function parse4(str2) {
|
|
|
81319
81379
|
uri.queryKey = queryKey(uri, uri["query"]);
|
|
81320
81380
|
return uri;
|
|
81321
81381
|
}
|
|
81322
|
-
function pathNames(obj,
|
|
81323
|
-
const regx = /\/{2,9}/g, names =
|
|
81324
|
-
if (
|
|
81382
|
+
function pathNames(obj, path56) {
|
|
81383
|
+
const regx = /\/{2,9}/g, names = path56.replace(regx, "/").split("/");
|
|
81384
|
+
if (path56.slice(0, 1) == "/" || path56.length === 0) {
|
|
81325
81385
|
names.splice(0, 1);
|
|
81326
81386
|
}
|
|
81327
|
-
if (
|
|
81387
|
+
if (path56.slice(-1) == "/") {
|
|
81328
81388
|
names.splice(names.length - 1, 1);
|
|
81329
81389
|
}
|
|
81330
81390
|
return names;
|
|
@@ -81942,7 +82002,7 @@ var protocol2 = Socket.protocol;
|
|
|
81942
82002
|
// node_modules/socket.io-client/build/esm-debug/url.js
|
|
81943
82003
|
var import_debug7 = __toESM(require_src(), 1);
|
|
81944
82004
|
var debug7 = (0, import_debug7.default)("socket.io-client:url");
|
|
81945
|
-
function url(uri,
|
|
82005
|
+
function url(uri, path56 = "", loc) {
|
|
81946
82006
|
let obj = uri;
|
|
81947
82007
|
loc = loc || typeof location !== "undefined" && location;
|
|
81948
82008
|
if (null == uri)
|
|
@@ -81976,7 +82036,7 @@ function url(uri, path54 = "", loc) {
|
|
|
81976
82036
|
obj.path = obj.path || "/";
|
|
81977
82037
|
const ipv62 = obj.host.indexOf(":") !== -1;
|
|
81978
82038
|
const host = ipv62 ? "[" + obj.host + "]" : obj.host;
|
|
81979
|
-
obj.id = obj.protocol + "://" + host + ":" + obj.port +
|
|
82039
|
+
obj.id = obj.protocol + "://" + host + ":" + obj.port + path56;
|
|
81980
82040
|
obj.href = obj.protocol + "://" + host + (loc && loc.port === obj.port ? "" : ":" + obj.port);
|
|
81981
82041
|
return obj;
|
|
81982
82042
|
}
|
|
@@ -83603,8 +83663,8 @@ function lookup(uri, opts) {
|
|
|
83603
83663
|
const parsed = url(uri, opts.path || "/socket.io");
|
|
83604
83664
|
const source = parsed.source;
|
|
83605
83665
|
const id = parsed.id;
|
|
83606
|
-
const
|
|
83607
|
-
const sameNamespace = cache[id] &&
|
|
83666
|
+
const path56 = parsed.path;
|
|
83667
|
+
const sameNamespace = cache[id] && path56 in cache[id]["nsps"];
|
|
83608
83668
|
const newConnection = opts.forceNew || opts["force new connection"] || false === opts.multiplex || sameNamespace;
|
|
83609
83669
|
let io;
|
|
83610
83670
|
if (newConnection) {
|
|
@@ -85323,8 +85383,8 @@ function getErrorMap() {
|
|
|
85323
85383
|
|
|
85324
85384
|
// node_modules/zod/v3/helpers/parseUtil.js
|
|
85325
85385
|
var makeIssue = (params) => {
|
|
85326
|
-
const { data, path:
|
|
85327
|
-
const fullPath = [...
|
|
85386
|
+
const { data, path: path56, errorMaps, issueData } = params;
|
|
85387
|
+
const fullPath = [...path56, ...issueData.path || []];
|
|
85328
85388
|
const fullIssue = {
|
|
85329
85389
|
...issueData,
|
|
85330
85390
|
path: fullPath
|
|
@@ -85440,11 +85500,11 @@ var errorUtil;
|
|
|
85440
85500
|
|
|
85441
85501
|
// node_modules/zod/v3/types.js
|
|
85442
85502
|
var ParseInputLazyPath = class {
|
|
85443
|
-
constructor(parent, value2,
|
|
85503
|
+
constructor(parent, value2, path56, key) {
|
|
85444
85504
|
this._cachedPath = [];
|
|
85445
85505
|
this.parent = parent;
|
|
85446
85506
|
this.data = value2;
|
|
85447
|
-
this._path =
|
|
85507
|
+
this._path = path56;
|
|
85448
85508
|
this._key = key;
|
|
85449
85509
|
}
|
|
85450
85510
|
get path() {
|
|
@@ -89081,10 +89141,10 @@ function assignProp(target, prop, value2) {
|
|
|
89081
89141
|
configurable: true
|
|
89082
89142
|
});
|
|
89083
89143
|
}
|
|
89084
|
-
function getElementAtPath(obj,
|
|
89085
|
-
if (!
|
|
89144
|
+
function getElementAtPath(obj, path56) {
|
|
89145
|
+
if (!path56)
|
|
89086
89146
|
return obj;
|
|
89087
|
-
return
|
|
89147
|
+
return path56.reduce((acc, key) => acc?.[key], obj);
|
|
89088
89148
|
}
|
|
89089
89149
|
function promiseAllObject(promisesObj) {
|
|
89090
89150
|
const keys2 = Object.keys(promisesObj);
|
|
@@ -89404,11 +89464,11 @@ function aborted(x, startIndex = 0) {
|
|
|
89404
89464
|
}
|
|
89405
89465
|
return false;
|
|
89406
89466
|
}
|
|
89407
|
-
function prefixIssues(
|
|
89467
|
+
function prefixIssues(path56, issues) {
|
|
89408
89468
|
return issues.map((iss) => {
|
|
89409
89469
|
var _a2;
|
|
89410
89470
|
(_a2 = iss).path ?? (_a2.path = []);
|
|
89411
|
-
iss.path.unshift(
|
|
89471
|
+
iss.path.unshift(path56);
|
|
89412
89472
|
return iss;
|
|
89413
89473
|
});
|
|
89414
89474
|
}
|
|
@@ -103091,6 +103151,34 @@ function registerPrompts(mcp) {
|
|
|
103091
103151
|
}));
|
|
103092
103152
|
}
|
|
103093
103153
|
|
|
103154
|
+
// src/mcp/pack-tools.ts
|
|
103155
|
+
init_registry();
|
|
103156
|
+
import * as path44 from "path";
|
|
103157
|
+
async function registerPackMcpTools(mcp) {
|
|
103158
|
+
const projectDir = process.cwd();
|
|
103159
|
+
let packages;
|
|
103160
|
+
try {
|
|
103161
|
+
packages = await listInstalledPackages(projectDir);
|
|
103162
|
+
} catch {
|
|
103163
|
+
return;
|
|
103164
|
+
}
|
|
103165
|
+
for (const pkg of packages) {
|
|
103166
|
+
const manifest = pkg.manifest;
|
|
103167
|
+
if (!manifest.mcpEntrypoint || !manifest.mcpTools?.length) continue;
|
|
103168
|
+
const entrypointPath = path44.join(pkg.path, manifest.mcpEntrypoint);
|
|
103169
|
+
try {
|
|
103170
|
+
const mod = await import(entrypointPath);
|
|
103171
|
+
if (typeof mod.registerMcpTools === "function") {
|
|
103172
|
+
await mod.registerMcpTools(mcp);
|
|
103173
|
+
}
|
|
103174
|
+
} catch (err) {
|
|
103175
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
103176
|
+
process.stderr.write(`[mcp] Failed to load pack tools from ${pkg.name}: ${msg}
|
|
103177
|
+
`);
|
|
103178
|
+
}
|
|
103179
|
+
}
|
|
103180
|
+
}
|
|
103181
|
+
|
|
103094
103182
|
// src/mcp/server.ts
|
|
103095
103183
|
function parseEventFilterFromEnv() {
|
|
103096
103184
|
const filter3 = {};
|
|
@@ -103143,6 +103231,7 @@ async function startMcpServer(options) {
|
|
|
103143
103231
|
registerContextTools(mcp);
|
|
103144
103232
|
registerResources(mcp, connection, buffer);
|
|
103145
103233
|
registerPrompts(mcp);
|
|
103234
|
+
await registerPackMcpTools(mcp);
|
|
103146
103235
|
if (!options._testDeps && options.stdio) {
|
|
103147
103236
|
const transport = new StdioServerTransport();
|
|
103148
103237
|
await mcp.connect(transport);
|
|
@@ -103320,7 +103409,7 @@ async function grammarCommand(options = {}) {
|
|
|
103320
103409
|
|
|
103321
103410
|
// src/cli/commands/run.ts
|
|
103322
103411
|
init_workflow_executor();
|
|
103323
|
-
import * as
|
|
103412
|
+
import * as path45 from "path";
|
|
103324
103413
|
import * as fs41 from "fs";
|
|
103325
103414
|
import * as readline8 from "readline";
|
|
103326
103415
|
init_query();
|
|
@@ -103328,7 +103417,7 @@ init_logger();
|
|
|
103328
103417
|
init_error_utils();
|
|
103329
103418
|
init_api6();
|
|
103330
103419
|
function displayPath2(filePath) {
|
|
103331
|
-
const rel =
|
|
103420
|
+
const rel = path45.relative(process.cwd(), filePath);
|
|
103332
103421
|
if (rel && !rel.startsWith("..") && rel.length < filePath.length) {
|
|
103333
103422
|
return rel;
|
|
103334
103423
|
}
|
|
@@ -103347,7 +103436,7 @@ async function runCommand(input, options) {
|
|
|
103347
103436
|
await runCommandInner(input, options);
|
|
103348
103437
|
}
|
|
103349
103438
|
async function runCommandInner(input, options) {
|
|
103350
|
-
const filePath =
|
|
103439
|
+
const filePath = path45.resolve(input);
|
|
103351
103440
|
if (!fs41.existsSync(filePath)) {
|
|
103352
103441
|
throw new Error(`File not found: ${displayPath2(filePath)}`);
|
|
103353
103442
|
}
|
|
@@ -103359,7 +103448,7 @@ async function runCommandInner(input, options) {
|
|
|
103359
103448
|
throw new Error(`Invalid JSON in --params: ${options.params}`);
|
|
103360
103449
|
}
|
|
103361
103450
|
} else if (options.paramsFile) {
|
|
103362
|
-
const paramsFilePath =
|
|
103451
|
+
const paramsFilePath = path45.resolve(options.paramsFile);
|
|
103363
103452
|
if (!fs41.existsSync(paramsFilePath)) {
|
|
103364
103453
|
throw new Error(`Params file not found: ${paramsFilePath}`);
|
|
103365
103454
|
}
|
|
@@ -103378,7 +103467,7 @@ async function runCommandInner(input, options) {
|
|
|
103378
103467
|
throw new Error(`Invalid JSON in --mocks: ${options.mocks}`);
|
|
103379
103468
|
}
|
|
103380
103469
|
} else if (options.mocksFile) {
|
|
103381
|
-
const mocksFilePath =
|
|
103470
|
+
const mocksFilePath = path45.resolve(options.mocksFile);
|
|
103382
103471
|
if (!fs41.existsSync(mocksFilePath)) {
|
|
103383
103472
|
throw new Error(`Mocks file not found: ${mocksFilePath}`);
|
|
103384
103473
|
}
|
|
@@ -103960,7 +104049,7 @@ function promptForInput(question) {
|
|
|
103960
104049
|
}
|
|
103961
104050
|
|
|
103962
104051
|
// src/cli/commands/serve.ts
|
|
103963
|
-
import * as
|
|
104052
|
+
import * as path46 from "path";
|
|
103964
104053
|
import * as fs43 from "fs";
|
|
103965
104054
|
|
|
103966
104055
|
// src/server/workflow-registry.ts
|
|
@@ -104395,7 +104484,7 @@ var WebhookServer = class {
|
|
|
104395
104484
|
// src/cli/commands/serve.ts
|
|
104396
104485
|
init_logger();
|
|
104397
104486
|
async function serveCommand(dir, options) {
|
|
104398
|
-
const workflowDir =
|
|
104487
|
+
const workflowDir = path46.resolve(dir || ".");
|
|
104399
104488
|
if (!fs43.existsSync(workflowDir)) {
|
|
104400
104489
|
throw new Error(`Directory not found: ${workflowDir}`);
|
|
104401
104490
|
}
|
|
@@ -104444,7 +104533,7 @@ async function serveCommand(dir, options) {
|
|
|
104444
104533
|
// src/export/index.ts
|
|
104445
104534
|
init_compile();
|
|
104446
104535
|
init_parser2();
|
|
104447
|
-
import * as
|
|
104536
|
+
import * as path47 from "path";
|
|
104448
104537
|
import * as fs44 from "fs";
|
|
104449
104538
|
import * as os2 from "os";
|
|
104450
104539
|
async function exportWorkflow(options) {
|
|
@@ -104457,8 +104546,8 @@ async function exportWorkflow(options) {
|
|
|
104457
104546
|
available.length === 0 ? `No export targets installed. Install a target pack (e.g. npm install flowweaver-pack-${options.target})` : `Unknown target "${options.target}". Installed: ${available.join(", ")}`
|
|
104458
104547
|
);
|
|
104459
104548
|
}
|
|
104460
|
-
const inputPath =
|
|
104461
|
-
const outputDir =
|
|
104549
|
+
const inputPath = path47.resolve(options.input);
|
|
104550
|
+
const outputDir = path47.resolve(options.output);
|
|
104462
104551
|
const isDryRun = options.dryRun ?? false;
|
|
104463
104552
|
if (options.multi) {
|
|
104464
104553
|
return exportMultiWorkflowViaRegistry(
|
|
@@ -104482,7 +104571,7 @@ async function exportSingleWorkflowViaRegistry(target, inputPath, outputDir, isD
|
|
|
104482
104571
|
throw new Error(`Input file not found: ${inputPath}`);
|
|
104483
104572
|
}
|
|
104484
104573
|
const parser3 = new AnnotationParser();
|
|
104485
|
-
const projectDir =
|
|
104574
|
+
const projectDir = path47.dirname(inputPath);
|
|
104486
104575
|
await parser3.loadPackHandlers(projectDir);
|
|
104487
104576
|
const parseResult = parser3.parse(inputPath);
|
|
104488
104577
|
if (parseResult.workflows.length === 0) {
|
|
@@ -104512,7 +104601,7 @@ async function exportSingleWorkflowViaRegistry(target, inputPath, outputDir, isD
|
|
|
104512
104601
|
);
|
|
104513
104602
|
let compiledContent;
|
|
104514
104603
|
if (needsCompiledWorkflow) {
|
|
104515
|
-
const workDir = isDryRun ?
|
|
104604
|
+
const workDir = isDryRun ? path47.join(os2.tmpdir(), `fw-export-dryrun-${Date.now()}`) : outputDir;
|
|
104516
104605
|
fs44.mkdirSync(workDir, { recursive: true });
|
|
104517
104606
|
try {
|
|
104518
104607
|
const compiledPath = await compileToOutput(
|
|
@@ -104532,16 +104621,16 @@ async function exportSingleWorkflowViaRegistry(target, inputPath, outputDir, isD
|
|
|
104532
104621
|
}
|
|
104533
104622
|
}
|
|
104534
104623
|
const files = artifacts.files.map((f) => ({
|
|
104535
|
-
path:
|
|
104624
|
+
path: path47.join(outputDir, f.relativePath),
|
|
104536
104625
|
content: f.content
|
|
104537
104626
|
}));
|
|
104538
104627
|
if (compiledContent) {
|
|
104539
|
-
const workflowOutputPath =
|
|
104628
|
+
const workflowOutputPath = path47.join(outputDir, "workflow.ts");
|
|
104540
104629
|
files.push({ path: workflowOutputPath, content: compiledContent });
|
|
104541
104630
|
}
|
|
104542
104631
|
if (!isDryRun) {
|
|
104543
104632
|
for (const file of files) {
|
|
104544
|
-
const dirPath =
|
|
104633
|
+
const dirPath = path47.dirname(file.path);
|
|
104545
104634
|
fs44.mkdirSync(dirPath, { recursive: true });
|
|
104546
104635
|
fs44.writeFileSync(file.path, file.content, "utf-8");
|
|
104547
104636
|
}
|
|
@@ -104559,7 +104648,7 @@ async function exportMultiWorkflowViaRegistry(target, inputPath, outputDir, isDr
|
|
|
104559
104648
|
throw new Error(`Input file not found: ${inputPath}`);
|
|
104560
104649
|
}
|
|
104561
104650
|
const parser3 = new AnnotationParser();
|
|
104562
|
-
const projectDir =
|
|
104651
|
+
const projectDir = path47.dirname(inputPath);
|
|
104563
104652
|
await parser3.loadPackHandlers(projectDir);
|
|
104564
104653
|
const parseResult = parser3.parse(inputPath);
|
|
104565
104654
|
if (parseResult.workflows.length === 0) {
|
|
@@ -104575,7 +104664,7 @@ async function exportMultiWorkflowViaRegistry(target, inputPath, outputDir, isDr
|
|
|
104575
104664
|
throw new Error(`None of the requested workflows found. Available: ${available}`);
|
|
104576
104665
|
}
|
|
104577
104666
|
}
|
|
104578
|
-
const serviceName =
|
|
104667
|
+
const serviceName = path47.basename(options.input, path47.extname(options.input)) + "-service";
|
|
104579
104668
|
const bundleWorkflows = selectedWorkflows.map((w) => ({
|
|
104580
104669
|
name: w.name,
|
|
104581
104670
|
functionName: w.functionName,
|
|
@@ -104600,13 +104689,13 @@ async function exportMultiWorkflowViaRegistry(target, inputPath, outputDir, isDr
|
|
|
104600
104689
|
});
|
|
104601
104690
|
const files = artifacts.files.map(
|
|
104602
104691
|
(f) => ({
|
|
104603
|
-
path:
|
|
104692
|
+
path: path47.join(outputDir, f.relativePath),
|
|
104604
104693
|
content: f.content
|
|
104605
104694
|
})
|
|
104606
104695
|
);
|
|
104607
104696
|
if (!isDryRun) {
|
|
104608
104697
|
for (const file of files) {
|
|
104609
|
-
const dirPath =
|
|
104698
|
+
const dirPath = path47.dirname(file.path);
|
|
104610
104699
|
fs44.mkdirSync(dirPath, { recursive: true });
|
|
104611
104700
|
fs44.writeFileSync(file.path, file.content, "utf-8");
|
|
104612
104701
|
}
|
|
@@ -104620,7 +104709,7 @@ async function exportMultiWorkflowViaRegistry(target, inputPath, outputDir, isDr
|
|
|
104620
104709
|
};
|
|
104621
104710
|
}
|
|
104622
104711
|
async function compileToOutput(inputPath, functionName, outputDir, production) {
|
|
104623
|
-
const outputPath =
|
|
104712
|
+
const outputPath = path47.join(outputDir, "workflow.ts");
|
|
104624
104713
|
fs44.copyFileSync(inputPath, outputPath);
|
|
104625
104714
|
await compileWorkflow(outputPath, {
|
|
104626
104715
|
write: true,
|
|
@@ -104749,12 +104838,12 @@ async function exportCommand(input, options) {
|
|
|
104749
104838
|
}
|
|
104750
104839
|
|
|
104751
104840
|
// src/cli/commands/openapi.ts
|
|
104752
|
-
import * as
|
|
104841
|
+
import * as path48 from "path";
|
|
104753
104842
|
import * as fs45 from "fs";
|
|
104754
104843
|
init_generator();
|
|
104755
104844
|
init_logger();
|
|
104756
104845
|
async function openapiCommand(dir, options) {
|
|
104757
|
-
const workflowDir =
|
|
104846
|
+
const workflowDir = path48.resolve(dir);
|
|
104758
104847
|
if (!fs45.existsSync(workflowDir)) {
|
|
104759
104848
|
throw new Error(`Directory not found: ${workflowDir}`);
|
|
104760
104849
|
}
|
|
@@ -104779,7 +104868,7 @@ async function openapiCommand(dir, options) {
|
|
|
104779
104868
|
const format = options.format || "json";
|
|
104780
104869
|
const spec = format === "yaml" ? generateOpenAPIYaml(endpoints, generatorOptions) : generateOpenAPIJson(endpoints, generatorOptions);
|
|
104781
104870
|
if (options.output) {
|
|
104782
|
-
const outputPath =
|
|
104871
|
+
const outputPath = path48.resolve(options.output);
|
|
104783
104872
|
fs45.writeFileSync(outputPath, spec);
|
|
104784
104873
|
logger.success(`OpenAPI specification written to ${outputPath}`);
|
|
104785
104874
|
} else {
|
|
@@ -104790,7 +104879,7 @@ async function openapiCommand(dir, options) {
|
|
|
104790
104879
|
// src/cli/commands/plugin.ts
|
|
104791
104880
|
init_logger();
|
|
104792
104881
|
import * as fs46 from "fs";
|
|
104793
|
-
import * as
|
|
104882
|
+
import * as path49 from "path";
|
|
104794
104883
|
var PLUGIN_NAME_RE = /^[a-zA-Z0-9][-a-zA-Z0-9_.]*$/;
|
|
104795
104884
|
var VALID_AREAS = ["sidebar", "main", "toolbar", "modal", "panel"];
|
|
104796
104885
|
function validatePluginName(name) {
|
|
@@ -104917,12 +105006,12 @@ async function pluginInitCommand(name, options) {
|
|
|
104917
105006
|
}
|
|
104918
105007
|
return;
|
|
104919
105008
|
}
|
|
104920
|
-
const targetDir =
|
|
105009
|
+
const targetDir = path49.resolve("plugins", name);
|
|
104921
105010
|
const filesCreated = [];
|
|
104922
105011
|
const filesSkipped = [];
|
|
104923
105012
|
for (const [relativePath, content] of Object.entries(files)) {
|
|
104924
|
-
const absPath =
|
|
104925
|
-
const dir =
|
|
105013
|
+
const absPath = path49.join(targetDir, relativePath);
|
|
105014
|
+
const dir = path49.dirname(absPath);
|
|
104926
105015
|
fs46.mkdirSync(dir, { recursive: true });
|
|
104927
105016
|
if (fs46.existsSync(absPath) && !force) {
|
|
104928
105017
|
filesSkipped.push(relativePath);
|
|
@@ -104950,7 +105039,7 @@ init_esm5();
|
|
|
104950
105039
|
init_api6();
|
|
104951
105040
|
init_generate_in_place();
|
|
104952
105041
|
import * as fs47 from "fs";
|
|
104953
|
-
import * as
|
|
105042
|
+
import * as path50 from "path";
|
|
104954
105043
|
init_logger();
|
|
104955
105044
|
init_error_utils();
|
|
104956
105045
|
async function migrateCommand(globPattern, options = {}) {
|
|
@@ -104969,7 +105058,7 @@ async function migrateCommand(globPattern, options = {}) {
|
|
|
104969
105058
|
let skippedCount = 0;
|
|
104970
105059
|
let errorCount = 0;
|
|
104971
105060
|
for (const file of files) {
|
|
104972
|
-
const filePath =
|
|
105061
|
+
const filePath = path50.resolve(file);
|
|
104973
105062
|
try {
|
|
104974
105063
|
const sourceCode = fs47.readFileSync(filePath, "utf8");
|
|
104975
105064
|
const parseResult = await parseWorkflow(filePath);
|
|
@@ -105140,13 +105229,13 @@ init_esm5();
|
|
|
105140
105229
|
init_generate_in_place();
|
|
105141
105230
|
init_logger();
|
|
105142
105231
|
import * as fs48 from "fs";
|
|
105143
|
-
import * as
|
|
105232
|
+
import * as path51 from "path";
|
|
105144
105233
|
async function stripCommand(input, options = {}) {
|
|
105145
105234
|
const { output, dryRun = false, verbose = false } = options;
|
|
105146
105235
|
let pattern = input;
|
|
105147
105236
|
try {
|
|
105148
105237
|
if (fs48.existsSync(input) && fs48.statSync(input).isDirectory()) {
|
|
105149
|
-
pattern =
|
|
105238
|
+
pattern = path51.join(input, "**/*.ts");
|
|
105150
105239
|
}
|
|
105151
105240
|
} catch {
|
|
105152
105241
|
}
|
|
@@ -105170,24 +105259,24 @@ async function stripCommand(input, options = {}) {
|
|
|
105170
105259
|
if (!hasInPlaceMarkers(content)) {
|
|
105171
105260
|
skipped++;
|
|
105172
105261
|
if (verbose) {
|
|
105173
|
-
logger.info(`Skipped (no markers): ${
|
|
105262
|
+
logger.info(`Skipped (no markers): ${path51.relative(process.cwd(), filePath)}`);
|
|
105174
105263
|
}
|
|
105175
105264
|
continue;
|
|
105176
105265
|
}
|
|
105177
105266
|
const result = stripGeneratedSections(content);
|
|
105178
105267
|
if (dryRun) {
|
|
105179
|
-
logger.info(`Would strip: ${
|
|
105268
|
+
logger.info(`Would strip: ${path51.relative(process.cwd(), filePath)}`);
|
|
105180
105269
|
stripped++;
|
|
105181
105270
|
continue;
|
|
105182
105271
|
}
|
|
105183
|
-
const outPath = output ?
|
|
105272
|
+
const outPath = output ? path51.join(path51.resolve(output), path51.basename(filePath)) : filePath;
|
|
105184
105273
|
if (output) {
|
|
105185
|
-
fs48.mkdirSync(
|
|
105274
|
+
fs48.mkdirSync(path51.dirname(outPath), { recursive: true });
|
|
105186
105275
|
}
|
|
105187
105276
|
fs48.writeFileSync(outPath, result);
|
|
105188
105277
|
stripped++;
|
|
105189
105278
|
if (verbose) {
|
|
105190
|
-
logger.success(`Stripped: ${
|
|
105279
|
+
logger.success(`Stripped: ${path51.relative(process.cwd(), outPath)}`);
|
|
105191
105280
|
}
|
|
105192
105281
|
}
|
|
105193
105282
|
const verb = dryRun ? "would be stripped" : "stripped";
|
|
@@ -105323,14 +105412,14 @@ init_validator();
|
|
|
105323
105412
|
init_logger();
|
|
105324
105413
|
init_error_utils();
|
|
105325
105414
|
import * as fs50 from "fs";
|
|
105326
|
-
import * as
|
|
105415
|
+
import * as path52 from "path";
|
|
105327
105416
|
function formatPortList(ports) {
|
|
105328
105417
|
return Object.entries(ports).filter(([name]) => name !== "execute" && name !== "onSuccess" && name !== "onFailure").map(([name, port]) => `${name}(${port.dataType.toLowerCase()})`);
|
|
105329
105418
|
}
|
|
105330
105419
|
async function statusCommand(input, options = {}) {
|
|
105331
105420
|
const { workflowName, json: json2 = false } = options;
|
|
105332
105421
|
try {
|
|
105333
|
-
const filePath =
|
|
105422
|
+
const filePath = path52.resolve(input);
|
|
105334
105423
|
if (!fs50.existsSync(filePath)) {
|
|
105335
105424
|
if (json2) {
|
|
105336
105425
|
console.log(JSON.stringify({ error: `File not found: ${input}` }));
|
|
@@ -105428,7 +105517,7 @@ init_annotation_generator();
|
|
|
105428
105517
|
init_logger();
|
|
105429
105518
|
init_error_utils();
|
|
105430
105519
|
import * as fs51 from "fs";
|
|
105431
|
-
import * as
|
|
105520
|
+
import * as path53 from "path";
|
|
105432
105521
|
function findDeclareFunction2(source, functionName) {
|
|
105433
105522
|
const lines = source.split("\n");
|
|
105434
105523
|
const escaped = functionName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
@@ -105450,7 +105539,7 @@ function findDeclareFunction2(source, functionName) {
|
|
|
105450
105539
|
async function implementCommand(input, nodeName, options = {}) {
|
|
105451
105540
|
const { workflowName, preview = false } = options;
|
|
105452
105541
|
try {
|
|
105453
|
-
const filePath =
|
|
105542
|
+
const filePath = path53.resolve(input);
|
|
105454
105543
|
if (!fs51.existsSync(filePath)) {
|
|
105455
105544
|
logger.error(`File not found: ${input}`);
|
|
105456
105545
|
process.exit(1);
|
|
@@ -105497,7 +105586,7 @@ async function implementCommand(input, nodeName, options = {}) {
|
|
|
105497
105586
|
} else {
|
|
105498
105587
|
const updated = source.replace(found.match, replacement);
|
|
105499
105588
|
fs51.writeFileSync(filePath, updated, "utf8");
|
|
105500
|
-
logger.success(`Implemented ${stubNodeType.functionName} in ${
|
|
105589
|
+
logger.success(`Implemented ${stubNodeType.functionName} in ${path53.basename(filePath)}`);
|
|
105501
105590
|
}
|
|
105502
105591
|
} catch (error2) {
|
|
105503
105592
|
logger.error(`Implement failed: ${getErrorMessage(error2)}`);
|
|
@@ -105508,7 +105597,7 @@ async function implementCommand(input, nodeName, options = {}) {
|
|
|
105508
105597
|
// src/cli/commands/market.ts
|
|
105509
105598
|
init_logger();
|
|
105510
105599
|
import * as fs52 from "fs";
|
|
105511
|
-
import * as
|
|
105600
|
+
import * as path54 from "path";
|
|
105512
105601
|
import { execSync as execSync7 } from "child_process";
|
|
105513
105602
|
init_error_utils();
|
|
105514
105603
|
async function marketInitCommand(name, options = {}) {
|
|
@@ -105517,7 +105606,7 @@ async function marketInitCommand(name, options = {}) {
|
|
|
105517
105606
|
logger.warn(`Name should follow "flowweaver-pack-*" convention, using "${suggested}"`);
|
|
105518
105607
|
name = suggested;
|
|
105519
105608
|
}
|
|
105520
|
-
const targetDir =
|
|
105609
|
+
const targetDir = path54.resolve(name);
|
|
105521
105610
|
if (fs52.existsSync(targetDir)) {
|
|
105522
105611
|
const stat2 = fs52.statSync(targetDir);
|
|
105523
105612
|
if (stat2.isDirectory()) {
|
|
@@ -105536,10 +105625,10 @@ async function marketInitCommand(name, options = {}) {
|
|
|
105536
105625
|
logger.newline();
|
|
105537
105626
|
const dirs = [
|
|
105538
105627
|
targetDir,
|
|
105539
|
-
|
|
105540
|
-
|
|
105541
|
-
|
|
105542
|
-
|
|
105628
|
+
path54.join(targetDir, "src"),
|
|
105629
|
+
path54.join(targetDir, "src", "node-types"),
|
|
105630
|
+
path54.join(targetDir, "src", "workflows"),
|
|
105631
|
+
path54.join(targetDir, "src", "patterns")
|
|
105543
105632
|
];
|
|
105544
105633
|
for (const dir of dirs) {
|
|
105545
105634
|
fs52.mkdirSync(dir, { recursive: true });
|
|
@@ -105574,7 +105663,7 @@ async function marketInitCommand(name, options = {}) {
|
|
|
105574
105663
|
files: ["dist", "flowweaver.manifest.json", "README.md", "LICENSE"]
|
|
105575
105664
|
};
|
|
105576
105665
|
fs52.writeFileSync(
|
|
105577
|
-
|
|
105666
|
+
path54.join(targetDir, "package.json"),
|
|
105578
105667
|
JSON.stringify(pkg, null, 2) + "\n"
|
|
105579
105668
|
);
|
|
105580
105669
|
const tsconfig = {
|
|
@@ -105593,7 +105682,7 @@ async function marketInitCommand(name, options = {}) {
|
|
|
105593
105682
|
exclude: ["node_modules", "dist"]
|
|
105594
105683
|
};
|
|
105595
105684
|
fs52.writeFileSync(
|
|
105596
|
-
|
|
105685
|
+
path54.join(targetDir, "tsconfig.json"),
|
|
105597
105686
|
JSON.stringify(tsconfig, null, 2) + "\n"
|
|
105598
105687
|
);
|
|
105599
105688
|
const sampleNodeType = `/**
|
|
@@ -105611,21 +105700,21 @@ export function sample(execute: () => void, data: string): { result: string } {
|
|
|
105611
105700
|
return { result: data.toUpperCase() };
|
|
105612
105701
|
}
|
|
105613
105702
|
`;
|
|
105614
|
-
fs52.writeFileSync(
|
|
105703
|
+
fs52.writeFileSync(path54.join(targetDir, "src", "node-types", "sample.ts"), sampleNodeType);
|
|
105615
105704
|
fs52.writeFileSync(
|
|
105616
|
-
|
|
105705
|
+
path54.join(targetDir, "src", "node-types", "index.ts"),
|
|
105617
105706
|
"export { sample } from './sample.js';\n"
|
|
105618
105707
|
);
|
|
105619
105708
|
fs52.writeFileSync(
|
|
105620
|
-
|
|
105709
|
+
path54.join(targetDir, "src", "workflows", "index.ts"),
|
|
105621
105710
|
"// Export workflows here\n"
|
|
105622
105711
|
);
|
|
105623
105712
|
fs52.writeFileSync(
|
|
105624
|
-
|
|
105713
|
+
path54.join(targetDir, "src", "patterns", "index.ts"),
|
|
105625
105714
|
"// Export patterns here\n"
|
|
105626
105715
|
);
|
|
105627
105716
|
fs52.writeFileSync(
|
|
105628
|
-
|
|
105717
|
+
path54.join(targetDir, "src", "index.ts"),
|
|
105629
105718
|
[
|
|
105630
105719
|
"export * from './node-types/index.js';",
|
|
105631
105720
|
"export * from './workflows/index.js';",
|
|
@@ -105658,9 +105747,9 @@ npm run pack # Generate flowweaver.manifest.json
|
|
|
105658
105747
|
npm publish # Publish to npm
|
|
105659
105748
|
\`\`\`
|
|
105660
105749
|
`;
|
|
105661
|
-
fs52.writeFileSync(
|
|
105750
|
+
fs52.writeFileSync(path54.join(targetDir, "README.md"), readme);
|
|
105662
105751
|
fs52.writeFileSync(
|
|
105663
|
-
|
|
105752
|
+
path54.join(targetDir, ".gitignore"),
|
|
105664
105753
|
["node_modules", "dist", "*.tgz", ""].join("\n")
|
|
105665
105754
|
);
|
|
105666
105755
|
logger.success("Created package.json");
|
|
@@ -105680,7 +105769,7 @@ npm publish # Publish to npm
|
|
|
105680
105769
|
logger.newline();
|
|
105681
105770
|
}
|
|
105682
105771
|
async function marketPackCommand(directory, options = {}) {
|
|
105683
|
-
const dir =
|
|
105772
|
+
const dir = path54.resolve(directory ?? ".");
|
|
105684
105773
|
const { json: json2 = false, verbose = false } = options;
|
|
105685
105774
|
if (!json2) {
|
|
105686
105775
|
logger.section("Packing Marketplace Package");
|
|
@@ -105721,21 +105810,21 @@ async function marketPackCommand(directory, options = {}) {
|
|
|
105721
105810
|
}
|
|
105722
105811
|
const outPath = writeManifest(dir, manifest);
|
|
105723
105812
|
logger.newline();
|
|
105724
|
-
logger.success(`Manifest written to ${
|
|
105813
|
+
logger.success(`Manifest written to ${path54.relative(dir, outPath)}`);
|
|
105725
105814
|
if (warnings.length > 0) {
|
|
105726
105815
|
logger.warn(`${warnings.length} warning(s) \u2014 consider fixing before publishing`);
|
|
105727
105816
|
}
|
|
105728
105817
|
logger.newline();
|
|
105729
105818
|
}
|
|
105730
105819
|
async function marketPublishCommand(directory, options = {}) {
|
|
105731
|
-
const dir =
|
|
105820
|
+
const dir = path54.resolve(directory ?? ".");
|
|
105732
105821
|
const { dryRun = false, tag } = options;
|
|
105733
105822
|
logger.section("Publishing Marketplace Package");
|
|
105734
105823
|
await marketPackCommand(dir, { json: false });
|
|
105735
|
-
if (!fs52.existsSync(
|
|
105824
|
+
if (!fs52.existsSync(path54.join(dir, "LICENSE"))) {
|
|
105736
105825
|
logger.warn("LICENSE file not found \u2014 consider adding one");
|
|
105737
105826
|
}
|
|
105738
|
-
const pkg = JSON.parse(fs52.readFileSync(
|
|
105827
|
+
const pkg = JSON.parse(fs52.readFileSync(path54.join(dir, "package.json"), "utf-8"));
|
|
105739
105828
|
logger.info(`Publishing ${pkg.name}@${pkg.version}`);
|
|
105740
105829
|
const npmArgs = ["publish"];
|
|
105741
105830
|
if (dryRun) npmArgs.push("--dry-run");
|
|
@@ -105771,7 +105860,7 @@ async function marketInstallCommand(packageSpec, options = {}) {
|
|
|
105771
105860
|
return;
|
|
105772
105861
|
}
|
|
105773
105862
|
const packageName = resolvePackageName2(packageSpec);
|
|
105774
|
-
const manifest = readManifest(
|
|
105863
|
+
const manifest = readManifest(path54.join(process.cwd(), "node_modules", packageName));
|
|
105775
105864
|
if (json2) {
|
|
105776
105865
|
console.log(JSON.stringify({
|
|
105777
105866
|
success: true,
|
|
@@ -105862,7 +105951,7 @@ async function marketListCommand(options = {}) {
|
|
|
105862
105951
|
}
|
|
105863
105952
|
function resolvePackageName2(spec) {
|
|
105864
105953
|
if (spec.endsWith(".tgz") || spec.endsWith(".tar.gz")) {
|
|
105865
|
-
const base =
|
|
105954
|
+
const base = path54.basename(spec, spec.endsWith(".tar.gz") ? ".tar.gz" : ".tgz");
|
|
105866
105955
|
const match2 = base.match(/^(.+)-\d+\.\d+\.\d+/);
|
|
105867
105956
|
return match2 ? match2[1] : base;
|
|
105868
105957
|
}
|
|
@@ -105913,7 +106002,7 @@ function displayInstalledPackage(pkg) {
|
|
|
105913
106002
|
// src/cli/index.ts
|
|
105914
106003
|
init_logger();
|
|
105915
106004
|
init_error_utils();
|
|
105916
|
-
var version2 = true ? "0.
|
|
106005
|
+
var version2 = true ? "0.19.0" : "0.0.0-dev";
|
|
105917
106006
|
var program2 = new Command();
|
|
105918
106007
|
program2.name("flow-weaver").description("Flow Weaver Annotations - Compile and validate workflow files").option("-v, --version", "Output the current version").option("--no-color", "Disable colors").option("--color", "Force colors").on("option:version", () => {
|
|
105919
106008
|
logger.banner(version2);
|
|
@@ -106137,7 +106226,13 @@ if (!process.argv.slice(2).length) {
|
|
|
106137
106226
|
console.log();
|
|
106138
106227
|
process.exit(0);
|
|
106139
106228
|
}
|
|
106140
|
-
|
|
106229
|
+
if (!process.env["VITEST"]) {
|
|
106230
|
+
(async () => {
|
|
106231
|
+
const { registerPackCommands: registerPackCommands2 } = await Promise.resolve().then(() => (init_pack_commands(), pack_commands_exports));
|
|
106232
|
+
await registerPackCommands2(program2);
|
|
106233
|
+
program2.parse(process.argv);
|
|
106234
|
+
})();
|
|
106235
|
+
}
|
|
106141
106236
|
/*! Bundled license information:
|
|
106142
106237
|
|
|
106143
106238
|
lodash-es/lodash.js:
|