@autohq/cli 0.1.277 → 0.1.279
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/agent-bridge.js +1 -1
- package/dist/index.js +18 -12
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -23353,7 +23353,7 @@ Object.assign(lookup, {
|
|
|
23353
23353
|
// package.json
|
|
23354
23354
|
var package_default = {
|
|
23355
23355
|
name: "@autohq/cli",
|
|
23356
|
-
version: "0.1.
|
|
23356
|
+
version: "0.1.279",
|
|
23357
23357
|
license: "SEE LICENSE IN README.md",
|
|
23358
23358
|
publishConfig: {
|
|
23359
23359
|
access: "public"
|
package/dist/index.js
CHANGED
|
@@ -19881,8 +19881,9 @@ function parseTemplateImportSpecifier(importPath) {
|
|
|
19881
19881
|
subpath: subpath ?? ""
|
|
19882
19882
|
};
|
|
19883
19883
|
}
|
|
19884
|
-
function templateInjectionKey(name, subpath) {
|
|
19885
|
-
|
|
19884
|
+
function templateInjectionKey(name, track, subpath) {
|
|
19885
|
+
const pkg = track.kind === "pinned" ? `${name}@${track.version}` : name;
|
|
19886
|
+
return subpath ? `${TEMPLATE_INJECTION_PREFIX}/${pkg}/${subpath}` : `${TEMPLATE_INJECTION_PREFIX}/${pkg}`;
|
|
19886
19887
|
}
|
|
19887
19888
|
var TEMPLATE_INJECTION_PREFIX, SPECIFIER_PATTERN;
|
|
19888
19889
|
var init_specifier = __esm({
|
|
@@ -22979,7 +22980,7 @@ var init_package = __esm({
|
|
|
22979
22980
|
"package.json"() {
|
|
22980
22981
|
package_default = {
|
|
22981
22982
|
name: "@autohq/cli",
|
|
22982
|
-
version: "0.1.
|
|
22983
|
+
version: "0.1.279",
|
|
22983
22984
|
license: "SEE LICENSE IN README.md",
|
|
22984
22985
|
publishConfig: {
|
|
22985
22986
|
access: "public"
|
|
@@ -24040,7 +24041,7 @@ function resolveTemplateImportPath(importPath, fileIndex) {
|
|
|
24040
24041
|
);
|
|
24041
24042
|
}
|
|
24042
24043
|
const key = normalizeSourcePath(
|
|
24043
|
-
templateInjectionKey(specifier.name, specifier.subpath)
|
|
24044
|
+
templateInjectionKey(specifier.name, specifier.track, specifier.subpath)
|
|
24044
24045
|
);
|
|
24045
24046
|
if (!fileIndex.has(key)) {
|
|
24046
24047
|
throw new Error(`Agent import not found: ${importPath}`);
|
|
@@ -24871,22 +24872,26 @@ var init_assets = __esm({
|
|
|
24871
24872
|
// ../../packages/schemas/src/project-apply-files/template-injection.ts
|
|
24872
24873
|
import { createHash as createHash4 } from "crypto";
|
|
24873
24874
|
function injectManagedTemplateFiles(input) {
|
|
24874
|
-
const references =
|
|
24875
|
-
if (references.
|
|
24875
|
+
const references = collectInjectableTemplateReferences(input.files);
|
|
24876
|
+
if (references.length === 0) {
|
|
24876
24877
|
return input.files;
|
|
24877
24878
|
}
|
|
24878
24879
|
const present = new Set(
|
|
24879
24880
|
input.files.map((file2) => normalizeSourcePath(file2.path))
|
|
24880
24881
|
);
|
|
24881
24882
|
const injected = [];
|
|
24882
|
-
for (const reference of references
|
|
24883
|
+
for (const reference of references) {
|
|
24883
24884
|
const version2 = resolveTemplateVersion(input.registry, reference);
|
|
24884
24885
|
if (!version2) {
|
|
24885
24886
|
continue;
|
|
24886
24887
|
}
|
|
24887
24888
|
for (const file2 of version2.files) {
|
|
24888
24889
|
const key = normalizeSourcePath(
|
|
24889
|
-
templateInjectionKey(
|
|
24890
|
+
templateInjectionKey(
|
|
24891
|
+
reference.name,
|
|
24892
|
+
reference.track,
|
|
24893
|
+
normalizeSourcePath(file2.path)
|
|
24894
|
+
)
|
|
24890
24895
|
);
|
|
24891
24896
|
if (present.has(key)) {
|
|
24892
24897
|
continue;
|
|
@@ -24904,17 +24909,18 @@ function resolveTemplateVersion(registry2, reference) {
|
|
|
24904
24909
|
return null;
|
|
24905
24910
|
}
|
|
24906
24911
|
}
|
|
24907
|
-
function
|
|
24912
|
+
function collectInjectableTemplateReferences(files) {
|
|
24908
24913
|
const references = /* @__PURE__ */ new Map();
|
|
24909
24914
|
for (const file2 of files) {
|
|
24910
24915
|
for (const importPath of templateImportsInFile(file2)) {
|
|
24911
24916
|
const specifier = parseTemplateImportSpecifier(importPath);
|
|
24912
|
-
|
|
24913
|
-
|
|
24917
|
+
const key = templateInjectionKey(specifier.name, specifier.track, "");
|
|
24918
|
+
if (!references.has(key)) {
|
|
24919
|
+
references.set(key, specifier);
|
|
24914
24920
|
}
|
|
24915
24921
|
}
|
|
24916
24922
|
}
|
|
24917
|
-
return references;
|
|
24923
|
+
return [...references.values()];
|
|
24918
24924
|
}
|
|
24919
24925
|
function templateImportsInFile(file2) {
|
|
24920
24926
|
try {
|