opkg 0.9.2 → 0.9.3
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/package.json +3 -1
- package/packages/cli/dist/add-U44SL3OR.js +624 -0
- package/packages/cli/dist/add-U44SL3OR.js.map +7 -0
- package/packages/cli/dist/chunk-4B5HJLP2.js +48 -0
- package/packages/cli/dist/chunk-4B5HJLP2.js.map +7 -0
- package/packages/cli/dist/chunk-BROJ6OUT.js +631 -0
- package/packages/cli/dist/chunk-BROJ6OUT.js.map +7 -0
- package/packages/cli/dist/chunk-CVA64SXK.js +1136 -0
- package/packages/cli/dist/chunk-CVA64SXK.js.map +7 -0
- package/packages/cli/dist/chunk-D6LEPODL.js +413 -0
- package/packages/cli/dist/chunk-D6LEPODL.js.map +7 -0
- package/packages/cli/dist/chunk-HTYHJA3B.js +61 -0
- package/packages/cli/dist/chunk-HTYHJA3B.js.map +7 -0
- package/packages/cli/dist/chunk-KI7FDU3H.js +99 -0
- package/packages/cli/dist/chunk-KI7FDU3H.js.map +7 -0
- package/packages/cli/dist/chunk-PSQXKAL4.js +371 -0
- package/packages/cli/dist/chunk-PSQXKAL4.js.map +7 -0
- package/packages/cli/dist/chunk-PUDRKDVZ.js +1419 -0
- package/packages/cli/dist/chunk-PUDRKDVZ.js.map +7 -0
- package/packages/cli/dist/chunk-U7FW7SXX.js +568 -0
- package/packages/cli/dist/chunk-U7FW7SXX.js.map +7 -0
- package/packages/cli/dist/configure-3AZUMDJZ.js +107 -0
- package/packages/cli/dist/configure-3AZUMDJZ.js.map +7 -0
- package/packages/cli/dist/index.js +15 -15
- package/packages/cli/dist/install-EZNWMLJR.js +7581 -0
- package/packages/cli/dist/install-EZNWMLJR.js.map +7 -0
- package/packages/cli/dist/list-XR7RSJFS.js +327 -0
- package/packages/cli/dist/list-XR7RSJFS.js.map +7 -0
- package/packages/cli/dist/login-NRKHXZKM.js +150 -0
- package/packages/cli/dist/login-NRKHXZKM.js.map +7 -0
- package/packages/cli/dist/logout-SYHXCVCQ.js +40 -0
- package/packages/cli/dist/logout-SYHXCVCQ.js.map +7 -0
- package/packages/cli/dist/new-F46OSD72.js +277 -0
- package/packages/cli/dist/new-F46OSD72.js.map +7 -0
- package/packages/cli/dist/publish-4H43PCSG.js +619 -0
- package/packages/cli/dist/publish-4H43PCSG.js.map +7 -0
- package/packages/cli/dist/remove-BD52BHR2.js +542 -0
- package/packages/cli/dist/remove-BD52BHR2.js.map +7 -0
- package/packages/cli/dist/save-N3QWF2WN.js +1728 -0
- package/packages/cli/dist/save-N3QWF2WN.js.map +7 -0
- package/packages/cli/dist/search-ABROK3UO.js +157 -0
- package/packages/cli/dist/search-ABROK3UO.js.map +7 -0
- package/packages/cli/dist/set-NGM2FIKF.js +251 -0
- package/packages/cli/dist/set-NGM2FIKF.js.map +7 -0
- package/packages/cli/dist/uninstall-Q3CP4UN5.js +539 -0
- package/packages/cli/dist/uninstall-Q3CP4UN5.js.map +7 -0
- package/packages/cli/dist/unpublish-VBTNTMS5.js +245 -0
- package/packages/cli/dist/unpublish-VBTNTMS5.js.map +7 -0
- package/packages/cli/dist/view-MXRBMXOG.js +488 -0
- package/packages/cli/dist/view-MXRBMXOG.js.map +7 -0
- package/packages/cli/package.json +2 -0
- package/packages/core/dist/core/install/conflicts/file-conflict-resolver.d.ts +5 -4
- package/packages/core/dist/core/install/conflicts/file-conflict-resolver.d.ts.map +1 -1
- package/packages/core/dist/core/install/conflicts/file-conflict-resolver.js +6 -5
- package/packages/core/dist/core/install/conflicts/file-conflict-resolver.js.map +1 -1
- package/packages/core/dist/core/install/install-reporting.js +1 -1
- package/packages/core/dist/core/install/install-reporting.js.map +1 -1
- package/packages/core/dist/core/install/list-handler.d.ts.map +1 -1
- package/packages/core/dist/core/install/list-handler.js +7 -0
- package/packages/core/dist/core/install/list-handler.js.map +1 -1
- package/packages/core/dist/core/install/marketplace-handler.d.ts.map +1 -1
- package/packages/core/dist/core/install/marketplace-handler.js.map +1 -1
- package/packages/core/dist/core/install/operations/conflict-handler.d.ts +2 -1
- package/packages/core/dist/core/install/operations/conflict-handler.d.ts.map +1 -1
- package/packages/core/dist/core/install/operations/conflict-handler.js +2 -2
- package/packages/core/dist/core/install/operations/conflict-handler.js.map +1 -1
- package/packages/core/dist/core/install/orchestrator/orchestrator.d.ts.map +1 -1
- package/packages/core/dist/core/install/orchestrator/orchestrator.js +22 -14
- package/packages/core/dist/core/install/orchestrator/orchestrator.js.map +1 -1
- package/packages/core/dist/core/install/orchestrator/strategies/git-strategy.d.ts +1 -0
- package/packages/core/dist/core/install/orchestrator/strategies/git-strategy.d.ts.map +1 -1
- package/packages/core/dist/core/install/orchestrator/strategies/git-strategy.js +11 -24
- package/packages/core/dist/core/install/orchestrator/strategies/git-strategy.js.map +1 -1
- package/packages/core/dist/core/install/orchestrator/strategies/path-strategy.d.ts +2 -0
- package/packages/core/dist/core/install/orchestrator/strategies/path-strategy.d.ts.map +1 -1
- package/packages/core/dist/core/install/orchestrator/strategies/path-strategy.js +14 -14
- package/packages/core/dist/core/install/orchestrator/strategies/path-strategy.js.map +1 -1
- package/packages/core/dist/core/install/orchestrator/strategies/registry-strategy.d.ts +7 -0
- package/packages/core/dist/core/install/orchestrator/strategies/registry-strategy.d.ts.map +1 -1
- package/packages/core/dist/core/install/orchestrator/strategies/registry-strategy.js +28 -0
- package/packages/core/dist/core/install/orchestrator/strategies/registry-strategy.js.map +1 -1
- package/packages/core/dist/core/install/platform-resolution.d.ts +3 -0
- package/packages/core/dist/core/install/platform-resolution.d.ts.map +1 -1
- package/packages/core/dist/core/install/platform-resolution.js +5 -2
- package/packages/core/dist/core/install/platform-resolution.js.map +1 -1
- package/packages/core/dist/core/install/preprocessing/context-population.d.ts +18 -0
- package/packages/core/dist/core/install/preprocessing/context-population.d.ts.map +1 -0
- package/packages/core/dist/core/install/preprocessing/context-population.js +36 -0
- package/packages/core/dist/core/install/preprocessing/context-population.js.map +1 -0
- package/packages/core/dist/core/install/preprocessing/convenience-preprocessor.d.ts +23 -0
- package/packages/core/dist/core/install/preprocessing/convenience-preprocessor.d.ts.map +1 -1
- package/packages/core/dist/core/install/preprocessing/convenience-preprocessor.js +44 -0
- package/packages/core/dist/core/install/preprocessing/convenience-preprocessor.js.map +1 -1
- package/packages/core/dist/core/install/sources/path-source.d.ts.map +1 -1
- package/packages/core/dist/core/install/sources/path-source.js +8 -0
- package/packages/core/dist/core/install/sources/path-source.js.map +1 -1
- package/packages/core/dist/core/install/unified/context-builders.d.ts +5 -0
- package/packages/core/dist/core/install/unified/context-builders.d.ts.map +1 -1
- package/packages/core/dist/core/install/unified/context-builders.js +13 -0
- package/packages/core/dist/core/install/unified/context-builders.js.map +1 -1
- package/packages/core/dist/core/install/unified/context-helpers.d.ts.map +1 -1
- package/packages/core/dist/core/install/unified/context-helpers.js +5 -0
- package/packages/core/dist/core/install/unified/context-helpers.js.map +1 -1
- package/packages/core/dist/core/install/unified/context.d.ts +6 -0
- package/packages/core/dist/core/install/unified/context.d.ts.map +1 -1
- package/packages/core/dist/core/install/unified/multi-context-pipeline.d.ts.map +1 -1
- package/packages/core/dist/core/install/unified/multi-context-pipeline.js +0 -2
- package/packages/core/dist/core/install/unified/multi-context-pipeline.js.map +1 -1
- package/packages/core/dist/core/install/unified/phases/conflicts.d.ts.map +1 -1
- package/packages/core/dist/core/install/unified/phases/conflicts.js +1 -1
- package/packages/core/dist/core/install/unified/phases/conflicts.js.map +1 -1
- package/packages/core/dist/core/install/unified/phases/execute.d.ts.map +1 -1
- package/packages/core/dist/core/install/unified/phases/execute.js +2 -1
- package/packages/core/dist/core/install/unified/phases/execute.js.map +1 -1
- package/packages/core/dist/core/install/unified/phases/report.js +1 -1
- package/packages/core/dist/core/install/unified/phases/report.js.map +1 -1
- package/packages/core/dist/core/install/unified/pipeline.d.ts.map +1 -1
- package/packages/core/dist/core/install/unified/pipeline.js +5 -2
- package/packages/core/dist/core/install/unified/pipeline.js.map +1 -1
- package/packages/core/dist/core/ports/resolve.d.ts +0 -13
- package/packages/core/dist/core/ports/resolve.d.ts.map +1 -1
- package/packages/core/dist/core/ports/resolve.js +0 -28
- package/packages/core/dist/core/ports/resolve.js.map +1 -1
- package/packages/core/dist/core/remove/removal-confirmation.d.ts +4 -1
- package/packages/core/dist/core/remove/removal-confirmation.d.ts.map +1 -1
- package/packages/core/dist/core/remove/removal-confirmation.js +5 -4
- package/packages/core/dist/core/remove/removal-confirmation.js.map +1 -1
- package/packages/core/dist/core/remove/remove-from-source-pipeline.d.ts.map +1 -1
- package/packages/core/dist/core/remove/remove-from-source-pipeline.js +1 -10
- package/packages/core/dist/core/remove/remove-from-source-pipeline.js.map +1 -1
- package/packages/core/dist/core/uninstall/uninstall-executor.js +1 -1
- package/packages/core/dist/core/uninstall/uninstall-executor.js.map +1 -1
- package/packages/core/dist/core/uninstall/uninstall-reporter.d.ts +2 -2
- package/packages/core/dist/core/uninstall/uninstall-reporter.d.ts.map +1 -1
- package/packages/core/dist/core/uninstall/uninstall-reporter.js +4 -4
- package/packages/core/dist/core/uninstall/uninstall-reporter.js.map +1 -1
- package/packages/core/dist/index.d.ts +1 -1
- package/packages/core/dist/index.d.ts.map +1 -1
- package/packages/core/dist/types/execution-context.d.ts +24 -10
- package/packages/core/dist/types/execution-context.d.ts.map +1 -1
|
@@ -0,0 +1,568 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
flattenResourceGroups,
|
|
4
|
+
getChildPrefix,
|
|
5
|
+
renderFlatResourceList
|
|
6
|
+
} from "./chunk-HTYHJA3B.js";
|
|
7
|
+
import {
|
|
8
|
+
classifySourceKey,
|
|
9
|
+
scanUntrackedFiles
|
|
10
|
+
} from "./chunk-YXLKLL3V.js";
|
|
11
|
+
import {
|
|
12
|
+
RESOURCE_TYPE_ORDER,
|
|
13
|
+
getResourceTypeDef,
|
|
14
|
+
toPluralKey
|
|
15
|
+
} from "./chunk-2PMMVTRN.js";
|
|
16
|
+
import {
|
|
17
|
+
getTargetPath
|
|
18
|
+
} from "./chunk-SHKYQQJJ.js";
|
|
19
|
+
import {
|
|
20
|
+
getWorkspaceIndexPath,
|
|
21
|
+
readWorkspaceIndex
|
|
22
|
+
} from "./chunk-GP5FJYSS.js";
|
|
23
|
+
import {
|
|
24
|
+
getLocalOpenPackageDir,
|
|
25
|
+
getLocalPackageYmlPath
|
|
26
|
+
} from "./chunk-BCYZDID6.js";
|
|
27
|
+
import {
|
|
28
|
+
stripExtension
|
|
29
|
+
} from "./chunk-6YZNE3MU.js";
|
|
30
|
+
import {
|
|
31
|
+
resolveDeclaredPath
|
|
32
|
+
} from "./chunk-FRYA3JAQ.js";
|
|
33
|
+
import {
|
|
34
|
+
formatScopeBadge
|
|
35
|
+
} from "./chunk-4B5HJLP2.js";
|
|
36
|
+
import {
|
|
37
|
+
resolveOutput
|
|
38
|
+
} from "./chunk-BROJ6OUT.js";
|
|
39
|
+
import {
|
|
40
|
+
parsePackageYml
|
|
41
|
+
} from "./chunk-QTQYI4L5.js";
|
|
42
|
+
import {
|
|
43
|
+
stripPlatformSuffixFromFilename
|
|
44
|
+
} from "./chunk-UDAWJRKD.js";
|
|
45
|
+
import {
|
|
46
|
+
getAllPlatforms,
|
|
47
|
+
getPlatformDefinition,
|
|
48
|
+
isPlatformId,
|
|
49
|
+
normalizePlatforms
|
|
50
|
+
} from "./chunk-GKEHDSL4.js";
|
|
51
|
+
import {
|
|
52
|
+
DIR_TO_TYPE
|
|
53
|
+
} from "./chunk-J4IFFBLP.js";
|
|
54
|
+
import {
|
|
55
|
+
exists,
|
|
56
|
+
isDirectory
|
|
57
|
+
} from "./chunk-S47F4OG4.js";
|
|
58
|
+
import {
|
|
59
|
+
ValidationError
|
|
60
|
+
} from "./chunk-ID4SVDQZ.js";
|
|
61
|
+
import {
|
|
62
|
+
logger
|
|
63
|
+
} from "./chunk-5EFWGD33.js";
|
|
64
|
+
|
|
65
|
+
// ../core/src/core/list/view-metadata.ts
|
|
66
|
+
function extractMetadataFromManifest(manifest) {
|
|
67
|
+
let entries = [], push = (key, value) => {
|
|
68
|
+
value != null && value !== "" && entries.push({ key, value });
|
|
69
|
+
};
|
|
70
|
+
if (push("name", manifest.name), push("version", manifest.version), push("description", manifest.description), push("keywords", manifest.keywords), push("author", manifest.author), push("license", manifest.license), push("homepage", manifest.homepage), manifest.repository) {
|
|
71
|
+
let repo = manifest.repository, repoStr = repo.directory ? `${repo.url} (${repo.directory})` : repo.url;
|
|
72
|
+
push("repository", repoStr);
|
|
73
|
+
}
|
|
74
|
+
return manifest.private === !0 && push("private", !0), manifest.partial === !0 && push("partial", !0), entries;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// ../core/src/core/list/list-printers.ts
|
|
78
|
+
function printMetadataSection(metadata, output) {
|
|
79
|
+
let out = output ?? resolveOutput();
|
|
80
|
+
out.info(sectionHeader("Metadata", metadata.length)), metadata.forEach((entry) => {
|
|
81
|
+
let valueStr = Array.isArray(entry.value) ? entry.value.join(", ") : String(entry.value);
|
|
82
|
+
out.info(`${dim(entry.key + ":")} ${valueStr}`);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
var DIM = "\x1B[2m", RESET = "\x1B[0m", RED = "\x1B[31m", CYAN = "\x1B[36m";
|
|
86
|
+
function dim(text) {
|
|
87
|
+
return `${DIM}${text}${RESET}`;
|
|
88
|
+
}
|
|
89
|
+
function cyan(text) {
|
|
90
|
+
return `${CYAN}${text}${RESET}`;
|
|
91
|
+
}
|
|
92
|
+
function red(text) {
|
|
93
|
+
return `${RED}${text}${RESET}`;
|
|
94
|
+
}
|
|
95
|
+
function sectionHeader(title, count) {
|
|
96
|
+
return `${cyan(`[${title}]`)} ${dim(`(${count})`)}`;
|
|
97
|
+
}
|
|
98
|
+
function formatPackageLine(pkg) {
|
|
99
|
+
let version = pkg.version && pkg.version !== "0.0.0" ? `@${pkg.version}` : "", stateSuffix = "";
|
|
100
|
+
return pkg.state === "missing" && (stateSuffix = dim(" (missing)")), `${pkg.name}${version}${stateSuffix}`;
|
|
101
|
+
}
|
|
102
|
+
function formatFilePath(file) {
|
|
103
|
+
return file.scope === "global" && !file.target.startsWith("~") ? `~/${file.target}` : file.target;
|
|
104
|
+
}
|
|
105
|
+
function printFileList(files, prefix, out) {
|
|
106
|
+
let sortedFiles = [...files].sort((a, b) => a.target.localeCompare(b.target));
|
|
107
|
+
for (let i = 0; i < sortedFiles.length; i++) {
|
|
108
|
+
let file = sortedFiles[i], connector = i === sortedFiles.length - 1 ? "\u2514\u2500\u2500 " : "\u251C\u2500\u2500 ", label = file.exists ? dim(file.target) : `${dim(file.target)} ${red("[MISSING]")}`;
|
|
109
|
+
out.info(`${prefix}${connector}${label}`);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function printDepTreeNode(node, prefix, isLast, showFiles, out) {
|
|
113
|
+
let hasChildren = node.children.length > 0, hasFiles = showFiles && node.report.fileList && node.report.fileList.length > 0, hasBranches = hasChildren || hasFiles, connector = isLast ? hasBranches ? "\u2514\u2500\u252C " : "\u2514\u2500\u2500 " : hasBranches ? "\u251C\u2500\u252C " : "\u251C\u2500\u2500 ", childPrefix = getChildPrefix(prefix, isLast);
|
|
114
|
+
out.info(`${prefix}${connector}${formatPackageLine(node.report)}`), hasFiles && printFileList(node.report.fileList, childPrefix, out), node.children.forEach((child, index) => {
|
|
115
|
+
let isLastChild = index === node.children.length - 1;
|
|
116
|
+
printDepTreeNode(child, childPrefix, isLastChild, showFiles, out);
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
function printDepsView(results, showFiles, headerInfo, output) {
|
|
120
|
+
let out = output ?? resolveOutput(), packageMap = /* @__PURE__ */ new Map();
|
|
121
|
+
for (let { scope, result } of results)
|
|
122
|
+
for (let node of result.tree) {
|
|
123
|
+
let key = node.report.name;
|
|
124
|
+
packageMap.has(key) ? packageMap.get(key).scopes.add(scope) : packageMap.set(key, {
|
|
125
|
+
report: node.report,
|
|
126
|
+
children: node.children,
|
|
127
|
+
scopes: /* @__PURE__ */ new Set([scope])
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
if (packageMap.size === 0) {
|
|
131
|
+
out.info(dim("No packages installed."));
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
let workspaceEntry;
|
|
135
|
+
if (headerInfo?.type === "workspace" && headerInfo.name && (workspaceEntry = packageMap.get(headerInfo.name), workspaceEntry && packageMap.delete(headerInfo.name)), headerInfo) {
|
|
136
|
+
let version = headerInfo.version ? `@${headerInfo.version}` : "", typeTag = dim(`[${headerInfo.type}]`);
|
|
137
|
+
out.info(`${headerInfo.name}${version} ${dim(`(${headerInfo.path})`)} ${typeTag}`);
|
|
138
|
+
} else if (results.length > 0) {
|
|
139
|
+
let firstResult = results[0].result, version = firstResult.headerVersion ? `@${firstResult.headerVersion}` : "", typeTag = dim(`[${firstResult.headerType}]`);
|
|
140
|
+
out.info(`${firstResult.headerName}${version} ${dim(`(${firstResult.headerPath})`)} ${typeTag}`);
|
|
141
|
+
}
|
|
142
|
+
let entries = Array.from(packageMap.values()).sort((a, b) => a.report.name.localeCompare(b.report.name));
|
|
143
|
+
out.info(sectionHeader("Dependencies", entries.length)), workspaceEntry && showFiles && workspaceEntry.report.fileList && workspaceEntry.report.fileList.length > 0 && printFileList(workspaceEntry.report.fileList, "", out);
|
|
144
|
+
for (let i = 0; i < entries.length; i++) {
|
|
145
|
+
let entry = entries[i], isLast = i === entries.length - 1, hasChildren = entry.children.length > 0, hasFiles = showFiles && entry.report.fileList && entry.report.fileList.length > 0, hasBranches = hasChildren || hasFiles, scopeBadge = dim(formatScopeBadge(entry.scopes)), connector = isLast ? hasBranches ? "\u2514\u2500\u252C " : "\u2514\u2500\u2500 " : hasBranches ? "\u251C\u2500\u252C " : "\u251C\u2500\u2500 ", childPrefix = getChildPrefix("", isLast);
|
|
146
|
+
out.info(`${connector}${formatPackageLine(entry.report)} ${scopeBadge}`), hasFiles && printFileList(entry.report.fileList, childPrefix, out);
|
|
147
|
+
for (let ci = 0; ci < entry.children.length; ci++) {
|
|
148
|
+
let child = entry.children[ci], isLastChild = ci === entry.children.length - 1;
|
|
149
|
+
printDepTreeNode(child, childPrefix, isLastChild, showFiles, out);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
function printResourcesView(groups, showFiles, headerInfo, output) {
|
|
154
|
+
let out = output ?? resolveOutput();
|
|
155
|
+
if (headerInfo) {
|
|
156
|
+
let version = headerInfo.version ? `@${headerInfo.version}` : "", typeTag = dim(`[${headerInfo.type}]`);
|
|
157
|
+
out.info(`${headerInfo.name}${version} ${dim(`(${headerInfo.path})`)} ${typeTag}`);
|
|
158
|
+
}
|
|
159
|
+
let showPackageLabels = headerInfo?.type !== "package" && process.env.OPKG_LIST_SHOW_PACKAGE_LABELS === "true", config = {
|
|
160
|
+
formatPath: (file) => formatFilePath(file),
|
|
161
|
+
isMissing: (file) => file.status === "missing",
|
|
162
|
+
sortFiles: (a, b) => formatFilePath(a).localeCompare(formatFilePath(b)),
|
|
163
|
+
getResourceBadge: (scopes) => scopes ? dim(formatScopeBadge(scopes)) : "",
|
|
164
|
+
...showPackageLabels && {
|
|
165
|
+
getResourcePackageLabels: (packages) => !packages || packages.size === 0 ? [] : Array.from(packages).sort().map((pkg) => dim(`(${pkg})`))
|
|
166
|
+
}
|
|
167
|
+
}, flatResources = flattenResourceGroups(groups);
|
|
168
|
+
out.info(sectionHeader("Installed", flatResources.length)), renderFlatResourceList(flatResources, "", showFiles, config);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// ../core/src/core/resources/resource-namespace.ts
|
|
172
|
+
function getPathUnderCategory(path2, categoryDir) {
|
|
173
|
+
let parts = path2.replace(/\\/g, "/").replace(/\/$/, "").split("/"), idx = parts.indexOf(categoryDir);
|
|
174
|
+
if (idx < 0) return null;
|
|
175
|
+
let remaining = parts.slice(idx + 1);
|
|
176
|
+
return remaining.length > 0 ? remaining.join("/") : "";
|
|
177
|
+
}
|
|
178
|
+
function deriveNamespace(pathUnderCategory, resourceType) {
|
|
179
|
+
if (!pathUnderCategory || pathUnderCategory === "") return "unnamed";
|
|
180
|
+
let parts = pathUnderCategory.split("/");
|
|
181
|
+
if (resourceType === "skill")
|
|
182
|
+
return parts[0] || "unnamed";
|
|
183
|
+
let strippedParts = stripPlatformSuffixFromFilename(pathUnderCategory).split("/"), lastSegment = strippedParts[strippedParts.length - 1] ?? "", nameWithoutExt = stripExtension(lastSegment);
|
|
184
|
+
if (strippedParts.length === 1)
|
|
185
|
+
return nameWithoutExt || lastSegment;
|
|
186
|
+
let subpath = strippedParts.slice(0, -1).join("/");
|
|
187
|
+
return subpath ? `${subpath}/${nameWithoutExt}` : nameWithoutExt;
|
|
188
|
+
}
|
|
189
|
+
function deriveResourceFullName(path2, resourceType) {
|
|
190
|
+
let normalizedType = resourceType;
|
|
191
|
+
if (normalizedType === "mcp")
|
|
192
|
+
return "mcps/configs";
|
|
193
|
+
if (normalizedType === "other")
|
|
194
|
+
return "other";
|
|
195
|
+
let categoryDir = getResourceTypeDef(normalizedType).dirName;
|
|
196
|
+
if (!categoryDir)
|
|
197
|
+
return `other/${deriveNamespace(path2, "other")}`;
|
|
198
|
+
let pathUnder = getPathUnderCategory(path2, categoryDir);
|
|
199
|
+
if (pathUnder === null) {
|
|
200
|
+
let pluralKey2 = toPluralKey(normalizedType), fallback = path2.replace(/\\/g, "/").split("/").pop() ?? "unnamed";
|
|
201
|
+
return `${pluralKey2}/${stripExtension(fallback)}`;
|
|
202
|
+
}
|
|
203
|
+
let namespace = deriveNamespace(pathUnder, normalizedType);
|
|
204
|
+
return `${toPluralKey(normalizedType)}/${namespace}`;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// ../core/src/core/list/list-pipeline.ts
|
|
208
|
+
import path from "path";
|
|
209
|
+
function extractRootPrefixFromToPattern(pattern) {
|
|
210
|
+
let parts = pattern.replace(/\\/g, "/").split("/");
|
|
211
|
+
if (parts.length < 2 || !parts[0].startsWith(".")) return null;
|
|
212
|
+
let nonGlobParts = [];
|
|
213
|
+
for (let part of parts) {
|
|
214
|
+
if (part.includes("*") || part.includes("{")) break;
|
|
215
|
+
nonGlobParts.push(part);
|
|
216
|
+
}
|
|
217
|
+
if (nonGlobParts.length < 2) return nonGlobParts.length === 1 ? nonGlobParts[0] : null;
|
|
218
|
+
let resourceDirs = new Set(Object.keys(DIR_TO_TYPE)), prefixParts = [];
|
|
219
|
+
for (let part of nonGlobParts) {
|
|
220
|
+
if (resourceDirs.has(part) || part.includes(".") && part !== nonGlobParts[0]) break;
|
|
221
|
+
prefixParts.push(part);
|
|
222
|
+
}
|
|
223
|
+
return prefixParts.length > 0 ? prefixParts.join("/") : null;
|
|
224
|
+
}
|
|
225
|
+
function collectToPatternsFromFlow(toField) {
|
|
226
|
+
if (typeof toField == "string") return [toField];
|
|
227
|
+
if (typeof toField == "object" && toField !== null) {
|
|
228
|
+
if ("$switch" in toField) {
|
|
229
|
+
let sw = toField.$switch, patterns = [];
|
|
230
|
+
for (let c of sw?.cases ?? []) {
|
|
231
|
+
let v = c.value;
|
|
232
|
+
typeof v == "string" ? patterns.push(v) : typeof v == "object" && v && "pattern" in v && patterns.push(v.pattern);
|
|
233
|
+
}
|
|
234
|
+
let d = sw?.default;
|
|
235
|
+
return typeof d == "string" ? patterns.push(d) : typeof d == "object" && d && "pattern" in d && patterns.push(d.pattern), patterns;
|
|
236
|
+
}
|
|
237
|
+
if ("pattern" in toField && typeof toField.pattern == "string")
|
|
238
|
+
return [toField.pattern];
|
|
239
|
+
}
|
|
240
|
+
return [];
|
|
241
|
+
}
|
|
242
|
+
var rootDirCacheMap = /* @__PURE__ */ new Map();
|
|
243
|
+
function getRootDirToPlatformMap(targetDir) {
|
|
244
|
+
let cached = rootDirCacheMap.get(targetDir);
|
|
245
|
+
if (cached) return cached;
|
|
246
|
+
let map = /* @__PURE__ */ new Map();
|
|
247
|
+
for (let platform of getAllPlatforms({ includeDisabled: !0 }, targetDir)) {
|
|
248
|
+
let definition = getPlatformDefinition(platform, targetDir);
|
|
249
|
+
if (definition.export)
|
|
250
|
+
for (let flow of definition.export)
|
|
251
|
+
for (let pattern of collectToPatternsFromFlow(flow.to)) {
|
|
252
|
+
let prefix = extractRootPrefixFromToPattern(pattern);
|
|
253
|
+
prefix && !map.has(prefix) && map.set(prefix, platform);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
return rootDirCacheMap.set(targetDir, map), map;
|
|
257
|
+
}
|
|
258
|
+
function extractPlatformFromPath(targetPath, targetDir) {
|
|
259
|
+
let normalized = targetPath.replace(/\\/g, "/"), sortedEntries = [...getRootDirToPlatformMap(targetDir).entries()].sort((a, b) => b[0].length - a[0].length);
|
|
260
|
+
for (let [rootDir, platform] of sortedEntries)
|
|
261
|
+
if (normalized === rootDir || normalized.startsWith(rootDir + "/"))
|
|
262
|
+
return platform;
|
|
263
|
+
let parts = normalized.split("/"), nameParts = parts[parts.length - 1].split(".");
|
|
264
|
+
if (nameParts.length >= 3) {
|
|
265
|
+
let possiblePlatform = nameParts[nameParts.length - 2];
|
|
266
|
+
if (isPlatformId(possiblePlatform, targetDir))
|
|
267
|
+
return possiblePlatform;
|
|
268
|
+
}
|
|
269
|
+
return null;
|
|
270
|
+
}
|
|
271
|
+
function groupFilesIntoResources(fileList) {
|
|
272
|
+
let resourceMap = /* @__PURE__ */ new Map();
|
|
273
|
+
for (let file of fileList) {
|
|
274
|
+
let { resourceType } = classifySourceKey(file.source), fullName = deriveResourceFullName(file.source, resourceType), key = fullName;
|
|
275
|
+
resourceMap.has(key) || resourceMap.set(key, {
|
|
276
|
+
name: fullName,
|
|
277
|
+
resourceType,
|
|
278
|
+
files: []
|
|
279
|
+
}), resourceMap.get(key).files.push(file);
|
|
280
|
+
}
|
|
281
|
+
let typeGroupMap = /* @__PURE__ */ new Map();
|
|
282
|
+
for (let resource of resourceMap.values())
|
|
283
|
+
typeGroupMap.has(resource.resourceType) || typeGroupMap.set(resource.resourceType, []), typeGroupMap.get(resource.resourceType).push(resource);
|
|
284
|
+
let typeOrder = RESOURCE_TYPE_ORDER, groups = [];
|
|
285
|
+
for (let type of typeOrder) {
|
|
286
|
+
let resources = typeGroupMap.get(type);
|
|
287
|
+
if (!resources || resources.length === 0) continue;
|
|
288
|
+
resources.sort((a, b) => a.name.localeCompare(b.name));
|
|
289
|
+
for (let resource of resources)
|
|
290
|
+
resource.files.sort((a, b) => a.target.localeCompare(b.target));
|
|
291
|
+
let pluralLabel = toPluralKey(type);
|
|
292
|
+
groups.push({ resourceType: pluralLabel, resources });
|
|
293
|
+
}
|
|
294
|
+
for (let [type, resources] of typeGroupMap)
|
|
295
|
+
if (!typeOrder.includes(type)) {
|
|
296
|
+
resources.sort((a, b) => a.name.localeCompare(b.name));
|
|
297
|
+
for (let resource of resources)
|
|
298
|
+
resource.files.sort((a, b) => a.target.localeCompare(b.target));
|
|
299
|
+
groups.push({ resourceType: `${type}s`, resources });
|
|
300
|
+
}
|
|
301
|
+
return groups;
|
|
302
|
+
}
|
|
303
|
+
async function checkPackageStatus(targetDir, pkgName, entry, includeFileList = !1, platformsFilter) {
|
|
304
|
+
let totalTargets = entry.files ? Object.values(entry.files).reduce((s, arr) => s + (Array.isArray(arr) ? arr.length : 0), 0) : 0, sourceRoot = resolveDeclaredPath(entry.path, targetDir).absolute, sourceExists = await exists(sourceRoot), canDeriveFromFiles = totalTargets > 0;
|
|
305
|
+
if (!sourceExists && !canDeriveFromFiles)
|
|
306
|
+
return {
|
|
307
|
+
name: pkgName,
|
|
308
|
+
version: entry.version,
|
|
309
|
+
path: entry.path,
|
|
310
|
+
state: "missing",
|
|
311
|
+
totalFiles: 0,
|
|
312
|
+
existingFiles: 0,
|
|
313
|
+
fileList: includeFileList ? [] : void 0
|
|
314
|
+
};
|
|
315
|
+
let totalFiles = 0, existingFiles = 0, fileList = [], filesMapping = entry.files || {}, normalizedPlatforms = platformsFilter ? normalizePlatforms(platformsFilter) : null;
|
|
316
|
+
for (let [sourceKey, targets] of Object.entries(filesMapping))
|
|
317
|
+
if (!(!Array.isArray(targets) || targets.length === 0))
|
|
318
|
+
for (let mapping of targets) {
|
|
319
|
+
let targetPath = getTargetPath(mapping);
|
|
320
|
+
if (normalizedPlatforms && normalizedPlatforms.length > 0) {
|
|
321
|
+
let filePlatform = extractPlatformFromPath(targetPath, targetDir);
|
|
322
|
+
if (filePlatform && !normalizedPlatforms.includes(filePlatform.toLowerCase()))
|
|
323
|
+
continue;
|
|
324
|
+
}
|
|
325
|
+
let absPath = path.join(targetDir, targetPath);
|
|
326
|
+
totalFiles++;
|
|
327
|
+
let fileExists = await exists(absPath);
|
|
328
|
+
fileExists && existingFiles++, includeFileList && fileList.push({
|
|
329
|
+
source: sourceKey,
|
|
330
|
+
target: targetPath,
|
|
331
|
+
exists: fileExists
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
let state = existingFiles === totalFiles ? "synced" : "partial", dependencies = entry.dependencies;
|
|
335
|
+
if (!dependencies || dependencies.length === 0)
|
|
336
|
+
try {
|
|
337
|
+
let pkgManifestPath = path.join(sourceRoot, "openpackage.yml");
|
|
338
|
+
if (await exists(pkgManifestPath)) {
|
|
339
|
+
let pkgManifest = await parsePackageYml(pkgManifestPath);
|
|
340
|
+
dependencies = [
|
|
341
|
+
...pkgManifest.dependencies || [],
|
|
342
|
+
...pkgManifest["dev-dependencies"] || []
|
|
343
|
+
].map((dep) => dep.name);
|
|
344
|
+
}
|
|
345
|
+
} catch (error) {
|
|
346
|
+
logger.debug(`Failed to read package manifest for ${pkgName}: ${error}`);
|
|
347
|
+
}
|
|
348
|
+
let allFilesForGrouping = includeFileList ? fileList : [];
|
|
349
|
+
if (!includeFileList) {
|
|
350
|
+
for (let [sourceKey, targets] of Object.entries(filesMapping))
|
|
351
|
+
if (!(!Array.isArray(targets) || targets.length === 0))
|
|
352
|
+
for (let mapping of targets) {
|
|
353
|
+
let targetPath = getTargetPath(mapping);
|
|
354
|
+
if (normalizedPlatforms && normalizedPlatforms.length > 0) {
|
|
355
|
+
let filePlatform = extractPlatformFromPath(targetPath, targetDir);
|
|
356
|
+
if (filePlatform && !normalizedPlatforms.includes(filePlatform.toLowerCase()))
|
|
357
|
+
continue;
|
|
358
|
+
}
|
|
359
|
+
allFilesForGrouping.push({
|
|
360
|
+
source: sourceKey,
|
|
361
|
+
target: targetPath,
|
|
362
|
+
exists: !0
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
let resourceGroups = allFilesForGrouping.length > 0 ? groupFilesIntoResources(allFilesForGrouping) : void 0;
|
|
367
|
+
return {
|
|
368
|
+
name: pkgName,
|
|
369
|
+
version: entry.version,
|
|
370
|
+
path: entry.path,
|
|
371
|
+
state,
|
|
372
|
+
totalFiles,
|
|
373
|
+
existingFiles,
|
|
374
|
+
fileList: includeFileList ? fileList : void 0,
|
|
375
|
+
resourceGroups,
|
|
376
|
+
dependencies
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
function buildDependencyTree(rootNames, reportMap, all) {
|
|
380
|
+
let visited = /* @__PURE__ */ new Set();
|
|
381
|
+
function buildNode(pkgName, depth) {
|
|
382
|
+
let report = reportMap.get(pkgName);
|
|
383
|
+
if (!report) return null;
|
|
384
|
+
if (visited.has(pkgName))
|
|
385
|
+
return {
|
|
386
|
+
report: { ...report, name: `${report.name} (circular)` },
|
|
387
|
+
children: []
|
|
388
|
+
};
|
|
389
|
+
visited.add(pkgName);
|
|
390
|
+
let children = [];
|
|
391
|
+
return all && report.dependencies && report.dependencies.length > 0 && (children = report.dependencies.map((depName) => buildNode(depName, depth + 1)).filter((node) => node !== null)), visited.delete(pkgName), { report, children };
|
|
392
|
+
}
|
|
393
|
+
return rootNames.map((name) => buildNode(name, 0)).filter((node) => node !== null);
|
|
394
|
+
}
|
|
395
|
+
async function runListPipeline(packageName, execContext, options = {}) {
|
|
396
|
+
let { includeFiles = !1, all = !1, tracked = !1, untracked = !1, platforms } = options, targetDir = execContext.targetDir, indexPath = getWorkspaceIndexPath(targetDir);
|
|
397
|
+
if (tracked && untracked)
|
|
398
|
+
throw new ValidationError("Cannot use --tracked and --untracked together.");
|
|
399
|
+
if (untracked) {
|
|
400
|
+
if (!await exists(indexPath))
|
|
401
|
+
throw new ValidationError(
|
|
402
|
+
`No workspace index found at ${indexPath}. Cannot scan for untracked files.`
|
|
403
|
+
);
|
|
404
|
+
let untrackedFiles2 = await scanUntrackedFiles(targetDir, platforms);
|
|
405
|
+
return {
|
|
406
|
+
success: !0,
|
|
407
|
+
data: {
|
|
408
|
+
packages: [],
|
|
409
|
+
tree: [],
|
|
410
|
+
rootPackageNames: [],
|
|
411
|
+
trackedCount: 0,
|
|
412
|
+
missingCount: 0,
|
|
413
|
+
untrackedCount: untrackedFiles2.totalFiles,
|
|
414
|
+
untrackedFiles: untrackedFiles2
|
|
415
|
+
}
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
let openpkgDir = getLocalOpenPackageDir(targetDir), manifestPath = getLocalPackageYmlPath(targetDir);
|
|
419
|
+
if (!await exists(openpkgDir) || !await exists(manifestPath))
|
|
420
|
+
throw new ValidationError(
|
|
421
|
+
`No .openpackage/openpackage.yml found in ${targetDir}.`
|
|
422
|
+
);
|
|
423
|
+
let { index } = await readWorkspaceIndex(targetDir), packages = index.packages || {}, reports = [], reportMap = /* @__PURE__ */ new Map(), rootPackageNames = [], workspacePackageName;
|
|
424
|
+
try {
|
|
425
|
+
let config = await parsePackageYml(manifestPath);
|
|
426
|
+
workspacePackageName = config.name, rootPackageNames = [
|
|
427
|
+
...config.dependencies || [],
|
|
428
|
+
...config["dev-dependencies"] || []
|
|
429
|
+
].map((dep) => dep.name), workspacePackageName && packages[workspacePackageName] && (rootPackageNames = [workspacePackageName, ...rootPackageNames]);
|
|
430
|
+
} catch (error) {
|
|
431
|
+
logger.warn(`Failed to read workspace manifest: ${error}`);
|
|
432
|
+
}
|
|
433
|
+
if (packageName) {
|
|
434
|
+
let pkgEntry = packages[packageName];
|
|
435
|
+
if (!pkgEntry)
|
|
436
|
+
return {
|
|
437
|
+
success: !0,
|
|
438
|
+
data: { packages: [], rootPackageNames: [], trackedCount: 0, missingCount: 0, untrackedCount: 0 }
|
|
439
|
+
};
|
|
440
|
+
let targetPackage;
|
|
441
|
+
try {
|
|
442
|
+
targetPackage = await checkPackageStatus(targetDir, packageName, pkgEntry, !0, platforms), reports.push(targetPackage), reportMap.set(packageName, targetPackage);
|
|
443
|
+
} catch (error) {
|
|
444
|
+
logger.warn(`Failed to check package ${packageName}: ${error}`), targetPackage = {
|
|
445
|
+
name: packageName,
|
|
446
|
+
version: pkgEntry?.version,
|
|
447
|
+
path: pkgEntry?.path ?? "",
|
|
448
|
+
state: "missing",
|
|
449
|
+
totalFiles: 0,
|
|
450
|
+
existingFiles: 0,
|
|
451
|
+
fileList: [],
|
|
452
|
+
dependencies: pkgEntry?.dependencies
|
|
453
|
+
}, reports.push(targetPackage), reportMap.set(packageName, targetPackage);
|
|
454
|
+
}
|
|
455
|
+
let depNames = targetPackage.dependencies || [];
|
|
456
|
+
for (let depName of depNames) {
|
|
457
|
+
if (reportMap.has(depName)) continue;
|
|
458
|
+
let depEntry = packages[depName];
|
|
459
|
+
if (depEntry)
|
|
460
|
+
try {
|
|
461
|
+
let depReport = await checkPackageStatus(targetDir, depName, depEntry, includeFiles, platforms);
|
|
462
|
+
reportMap.set(depName, depReport);
|
|
463
|
+
} catch (error) {
|
|
464
|
+
logger.debug(`Failed to load dependency ${depName}: ${error}`);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
if (all) {
|
|
468
|
+
let loadNestedDeps = async (names) => {
|
|
469
|
+
for (let name of names) {
|
|
470
|
+
let report = reportMap.get(name);
|
|
471
|
+
if (report?.dependencies)
|
|
472
|
+
for (let nestedDepName of report.dependencies) {
|
|
473
|
+
if (reportMap.has(nestedDepName)) continue;
|
|
474
|
+
let nestedEntry = packages[nestedDepName];
|
|
475
|
+
if (nestedEntry)
|
|
476
|
+
try {
|
|
477
|
+
let nestedReport = await checkPackageStatus(targetDir, nestedDepName, nestedEntry, includeFiles, platforms);
|
|
478
|
+
reportMap.set(nestedDepName, nestedReport), nestedReport.dependencies && nestedReport.dependencies.length > 0 && await loadNestedDeps([nestedDepName]);
|
|
479
|
+
} catch (error) {
|
|
480
|
+
logger.debug(`Failed to load nested dependency ${nestedDepName}: ${error}`);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
};
|
|
485
|
+
await loadNestedDeps(depNames);
|
|
486
|
+
}
|
|
487
|
+
let tree2 = buildDependencyTree(depNames, reportMap, all), treeWithTarget = [{
|
|
488
|
+
report: targetPackage,
|
|
489
|
+
children: tree2
|
|
490
|
+
}], trackedCount2 = reports.reduce((sum, r) => sum + r.existingFiles, 0), missingCount2 = reports.reduce((sum, r) => sum + (r.totalFiles - r.existingFiles), 0), untrackedFiles2, untrackedCount2 = 0;
|
|
491
|
+
return tracked || (untrackedFiles2 = await scanUntrackedFiles(targetDir, platforms), untrackedCount2 = untrackedFiles2.totalFiles), {
|
|
492
|
+
success: !0,
|
|
493
|
+
data: { packages: reports, tree: treeWithTarget, rootPackageNames: depNames, targetPackage, trackedCount: trackedCount2, missingCount: missingCount2, untrackedCount: untrackedCount2, untrackedFiles: untrackedFiles2 }
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
for (let [pkgName, pkgEntry] of Object.entries(packages))
|
|
497
|
+
try {
|
|
498
|
+
let report = await checkPackageStatus(targetDir, pkgName, pkgEntry, includeFiles, platforms);
|
|
499
|
+
reports.push(report), reportMap.set(pkgName, report);
|
|
500
|
+
} catch (error) {
|
|
501
|
+
logger.warn(`Failed to check package ${pkgName}: ${error}`);
|
|
502
|
+
let errorReport = {
|
|
503
|
+
name: pkgName,
|
|
504
|
+
version: pkgEntry?.version,
|
|
505
|
+
path: pkgEntry?.path ?? "",
|
|
506
|
+
state: "missing",
|
|
507
|
+
totalFiles: 0,
|
|
508
|
+
existingFiles: 0,
|
|
509
|
+
dependencies: pkgEntry?.dependencies
|
|
510
|
+
};
|
|
511
|
+
reports.push(errorReport), reportMap.set(pkgName, errorReport);
|
|
512
|
+
}
|
|
513
|
+
let tree = buildDependencyTree(rootPackageNames, reportMap, all), trackedCount = reports.reduce((sum, r) => sum + r.existingFiles, 0), missingCount = reports.reduce((sum, r) => sum + (r.totalFiles - r.existingFiles), 0), untrackedFiles, untrackedCount = 0;
|
|
514
|
+
return tracked || (untrackedFiles = await scanUntrackedFiles(targetDir, platforms), untrackedCount = untrackedFiles.totalFiles), {
|
|
515
|
+
success: !0,
|
|
516
|
+
data: { packages: reports, tree, rootPackageNames, trackedCount, missingCount, untrackedCount, untrackedFiles }
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
// ../core/src/utils/entity-detector.ts
|
|
521
|
+
import { join } from "path";
|
|
522
|
+
async function detectEntityType(path2) {
|
|
523
|
+
let workspaceMarker = join(path2, ".openpackage", "openpackage.yml");
|
|
524
|
+
if (await exists(workspaceMarker))
|
|
525
|
+
return "workspace";
|
|
526
|
+
let packageMarker = join(path2, "openpackage.yml");
|
|
527
|
+
if (await exists(packageMarker))
|
|
528
|
+
return "package";
|
|
529
|
+
let claudePluginMarker = join(path2, ".claude-plugin", "plugin.json");
|
|
530
|
+
if (await exists(claudePluginMarker))
|
|
531
|
+
return "package";
|
|
532
|
+
let packageDirs = ["agents", "skills", "commands", "rules", "hooks"];
|
|
533
|
+
for (let dir of packageDirs) {
|
|
534
|
+
let dirPath = join(path2, dir);
|
|
535
|
+
if (await exists(dirPath) && await isDirectory(dirPath))
|
|
536
|
+
return "package";
|
|
537
|
+
}
|
|
538
|
+
return "resource";
|
|
539
|
+
}
|
|
540
|
+
async function getEntityDisplayName(path2, fallbackName) {
|
|
541
|
+
let entityType = await detectEntityType(path2);
|
|
542
|
+
if (entityType === "package" || entityType === "workspace")
|
|
543
|
+
try {
|
|
544
|
+
let { parsePackageYml: parsePackageYml2 } = await import("./package-yml-33CZZC3T.js"), manifestPath = entityType === "workspace" ? join(path2, ".openpackage", "openpackage.yml") : join(path2, "openpackage.yml");
|
|
545
|
+
if (await exists(manifestPath)) {
|
|
546
|
+
let manifest = await parsePackageYml2(manifestPath);
|
|
547
|
+
if (manifest.name)
|
|
548
|
+
return manifest.name;
|
|
549
|
+
}
|
|
550
|
+
} catch {
|
|
551
|
+
}
|
|
552
|
+
return fallbackName;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
export {
|
|
556
|
+
deriveResourceFullName,
|
|
557
|
+
groupFilesIntoResources,
|
|
558
|
+
runListPipeline,
|
|
559
|
+
detectEntityType,
|
|
560
|
+
getEntityDisplayName,
|
|
561
|
+
extractMetadataFromManifest,
|
|
562
|
+
printMetadataSection,
|
|
563
|
+
dim,
|
|
564
|
+
sectionHeader,
|
|
565
|
+
printDepsView,
|
|
566
|
+
printResourcesView
|
|
567
|
+
};
|
|
568
|
+
//# sourceMappingURL=chunk-U7FW7SXX.js.map
|