@clearlydev/nx-archweave 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/eslint/fsd-boundaries.d.ts +2 -2
- package/dist/generators/add-integration/generator.js +4 -35
- package/dist/generators/doctor/generator.js +4 -35
- package/dist/generators/install-integration/generator.js +5 -37
- package/dist/generators/record-integration/generator.js +5 -36
- package/dist/generators/shared/project-type.js +2 -2
- package/dist/index.js +4 -35
- package/dist/runtime/integrations-composition-root.js +1 -1
- package/package.json +2 -3
- package/src/generators/add-integration/schema.json +1 -1
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ bun nx g @clearlydev/nx-archweave:doctor # bun
|
|
|
32
32
|
- **Requirements:** Node >= 22.18, plus one of npm, pnpm >= 10, yarn (classic or berry) or bun. All four package managers are first-class.
|
|
33
33
|
- Generators detect the workspace's real package manager from its lockfiles.
|
|
34
34
|
- The examples below use `pnpm nx g`. With another package manager, run the same generator the way the `doctor` commands above show.
|
|
35
|
-
- The package ships as a self-contained bundle. Its only runtime
|
|
35
|
+
- The package ships as a self-contained bundle. Its only runtime dependency is `@nx/devkit`.
|
|
36
36
|
|
|
37
37
|
## Quick start
|
|
38
38
|
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* measured source of false positives. Locations are computed from path strings alone: the
|
|
13
13
|
* rule never reads the file system.
|
|
14
14
|
*
|
|
15
|
-
* Self-contained on purpose: no `eslint` import, so the plugin's runtime
|
|
16
|
-
* @nx/devkit
|
|
15
|
+
* Self-contained on purpose: no `eslint` import, so the plugin's only runtime dependency stays
|
|
16
|
+
* @nx/devkit. The handful of ESLint shapes it touches are typed structurally below.
|
|
17
17
|
*/
|
|
18
18
|
export type FsdEnforcementSeverity = 'error' | 'warn';
|
|
19
19
|
export interface FsdBoundariesOptions {
|
|
@@ -104,33 +104,6 @@ function getCatalogEntry(id) {
|
|
|
104
104
|
return PLUGIN_CATALOG.find((entry) => entry.id === id);
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
// ../integrations/dist/catalog/resolve-version.js
|
|
108
|
-
import { get } from "node:https";
|
|
109
|
-
function resolveVersionFromNpmRegistry(npmPackage) {
|
|
110
|
-
const registryUrl = `https://registry.npmjs.org/${encodeURIComponent(npmPackage)}`;
|
|
111
|
-
return new Promise((resolve2, reject) => {
|
|
112
|
-
get(registryUrl, (response) => {
|
|
113
|
-
let body = "";
|
|
114
|
-
response.on("data", (chunk) => {
|
|
115
|
-
body += chunk;
|
|
116
|
-
});
|
|
117
|
-
response.on("end", () => {
|
|
118
|
-
try {
|
|
119
|
-
const parsed = JSON.parse(body);
|
|
120
|
-
const latest = parsed?.["dist-tags"]?.["latest"];
|
|
121
|
-
if (typeof latest !== "string") {
|
|
122
|
-
reject(new Error(`Could not resolve the latest version of ${npmPackage} from the npm registry.`));
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
resolve2(latest);
|
|
126
|
-
} catch (error) {
|
|
127
|
-
reject(error instanceof Error ? error : new Error(String(error)));
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
}).on("error", reject);
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
|
|
134
107
|
// ../integrations/dist/hosts/claude-code/detect.js
|
|
135
108
|
import { existsSync, readFileSync } from "node:fs";
|
|
136
109
|
import { join } from "node:path";
|
|
@@ -171,14 +144,14 @@ var WORKSPACE_FILES_BY_SCOPE = {
|
|
|
171
144
|
local: [".claude/settings.local.json"]
|
|
172
145
|
};
|
|
173
146
|
var DEFAULT_PLUGIN_SCOPE = "project";
|
|
174
|
-
function createClaudeMarketplacePlan(entry
|
|
147
|
+
function createClaudeMarketplacePlan(entry) {
|
|
175
148
|
return async (options) => {
|
|
176
149
|
const distribution = entry.hosts["claude-code"];
|
|
177
150
|
if (options.targetEnvironment !== "claude-code" || distribution === void 0) {
|
|
178
151
|
const supported = Object.entries(entry.hosts).filter(([, value]) => value !== void 0).map(([host]) => host).join(", ");
|
|
179
152
|
throw new Error(`Target environment "${options.targetEnvironment}" is not supported by this integration. Supported: ${supported}.`);
|
|
180
153
|
}
|
|
181
|
-
const resolvedVersion = options.versionRange ??
|
|
154
|
+
const resolvedVersion = options.versionRange ?? VERSION_DECIDED_BY_MARKETPLACE;
|
|
182
155
|
const scope = options.scope ?? DEFAULT_PLUGIN_SCOPE;
|
|
183
156
|
return {
|
|
184
157
|
officialCommand: {
|
|
@@ -605,10 +578,6 @@ function createClaudeMarketplaceVerifier(entry, deps) {
|
|
|
605
578
|
}
|
|
606
579
|
|
|
607
580
|
// ../integrations/dist/catalog/create-catalog-integration.js
|
|
608
|
-
function defaultResolveVersion(entry) {
|
|
609
|
-
const npmPackage = entry.npmPackage;
|
|
610
|
-
return npmPackage === void 0 ? async () => VERSION_DECIDED_BY_MARKETPLACE : () => resolveVersionFromNpmRegistry(npmPackage);
|
|
611
|
-
}
|
|
612
581
|
function createCatalogIntegration(entry, deps) {
|
|
613
582
|
return {
|
|
614
583
|
id: entry.id,
|
|
@@ -618,7 +587,7 @@ function createCatalogIntegration(entry, deps) {
|
|
|
618
587
|
license: entry.license,
|
|
619
588
|
supportedEnvironments: PLUGIN_HOSTS.filter((host) => entry.hosts[host] !== void 0),
|
|
620
589
|
detect: (context) => detectWorkspacePackage(entry, context),
|
|
621
|
-
plan: createClaudeMarketplacePlan(entry
|
|
590
|
+
plan: createClaudeMarketplacePlan(entry),
|
|
622
591
|
install: createClaudeMarketplaceInstall(entry, { runner: deps.runner }),
|
|
623
592
|
verify: createClaudeMarketplaceVerifier(entry, { runner: deps.runner }),
|
|
624
593
|
uninstallInstructions: async () => [...entry.uninstallSteps]
|
|
@@ -795,7 +764,7 @@ var NodeCommandRunner = class {
|
|
|
795
764
|
// src/runtime/integrations-composition-root.ts
|
|
796
765
|
function createIntegrationsCompositionRoot(deps = {}) {
|
|
797
766
|
const runner = deps.runner ?? new NodeCommandRunner();
|
|
798
|
-
const registry = createIntegrationRegistry(createCatalogIntegrations({ runner
|
|
767
|
+
const registry = createIntegrationRegistry(createCatalogIntegrations({ runner }));
|
|
799
768
|
return {
|
|
800
769
|
registry,
|
|
801
770
|
runner,
|
|
@@ -1770,33 +1770,6 @@ var PLUGIN_CATALOG = [
|
|
|
1770
1770
|
];
|
|
1771
1771
|
var PLUGIN_IDS = PLUGIN_CATALOG.map((entry) => entry.id);
|
|
1772
1772
|
|
|
1773
|
-
// ../integrations/dist/catalog/resolve-version.js
|
|
1774
|
-
import { get } from "node:https";
|
|
1775
|
-
function resolveVersionFromNpmRegistry(npmPackage) {
|
|
1776
|
-
const registryUrl = `https://registry.npmjs.org/${encodeURIComponent(npmPackage)}`;
|
|
1777
|
-
return new Promise((resolve2, reject) => {
|
|
1778
|
-
get(registryUrl, (response) => {
|
|
1779
|
-
let body = "";
|
|
1780
|
-
response.on("data", (chunk) => {
|
|
1781
|
-
body += chunk;
|
|
1782
|
-
});
|
|
1783
|
-
response.on("end", () => {
|
|
1784
|
-
try {
|
|
1785
|
-
const parsed = JSON.parse(body);
|
|
1786
|
-
const latest = parsed?.["dist-tags"]?.["latest"];
|
|
1787
|
-
if (typeof latest !== "string") {
|
|
1788
|
-
reject(new Error(`Could not resolve the latest version of ${npmPackage} from the npm registry.`));
|
|
1789
|
-
return;
|
|
1790
|
-
}
|
|
1791
|
-
resolve2(latest);
|
|
1792
|
-
} catch (error) {
|
|
1793
|
-
reject(error instanceof Error ? error : new Error(String(error)));
|
|
1794
|
-
}
|
|
1795
|
-
});
|
|
1796
|
-
}).on("error", reject);
|
|
1797
|
-
});
|
|
1798
|
-
}
|
|
1799
|
-
|
|
1800
1773
|
// ../integrations/dist/hosts/claude-code/detect.js
|
|
1801
1774
|
import { existsSync as existsSync9, readFileSync as readFileSync7 } from "node:fs";
|
|
1802
1775
|
import { join as join9 } from "node:path";
|
|
@@ -1837,14 +1810,14 @@ var WORKSPACE_FILES_BY_SCOPE = {
|
|
|
1837
1810
|
local: [".claude/settings.local.json"]
|
|
1838
1811
|
};
|
|
1839
1812
|
var DEFAULT_PLUGIN_SCOPE = "project";
|
|
1840
|
-
function createClaudeMarketplacePlan(entry
|
|
1813
|
+
function createClaudeMarketplacePlan(entry) {
|
|
1841
1814
|
return async (options) => {
|
|
1842
1815
|
const distribution = entry.hosts["claude-code"];
|
|
1843
1816
|
if (options.targetEnvironment !== "claude-code" || distribution === void 0) {
|
|
1844
1817
|
const supported = Object.entries(entry.hosts).filter(([, value]) => value !== void 0).map(([host]) => host).join(", ");
|
|
1845
1818
|
throw new Error(`Target environment "${options.targetEnvironment}" is not supported by this integration. Supported: ${supported}.`);
|
|
1846
1819
|
}
|
|
1847
|
-
const resolvedVersion = options.versionRange ??
|
|
1820
|
+
const resolvedVersion = options.versionRange ?? VERSION_DECIDED_BY_MARKETPLACE;
|
|
1848
1821
|
const scope = options.scope ?? DEFAULT_PLUGIN_SCOPE;
|
|
1849
1822
|
return {
|
|
1850
1823
|
officialCommand: {
|
|
@@ -2262,10 +2235,6 @@ function createClaudeMarketplaceVerifier(entry, deps) {
|
|
|
2262
2235
|
}
|
|
2263
2236
|
|
|
2264
2237
|
// ../integrations/dist/catalog/create-catalog-integration.js
|
|
2265
|
-
function defaultResolveVersion(entry) {
|
|
2266
|
-
const npmPackage = entry.npmPackage;
|
|
2267
|
-
return npmPackage === void 0 ? async () => VERSION_DECIDED_BY_MARKETPLACE : () => resolveVersionFromNpmRegistry(npmPackage);
|
|
2268
|
-
}
|
|
2269
2238
|
function createCatalogIntegration(entry, deps) {
|
|
2270
2239
|
return {
|
|
2271
2240
|
id: entry.id,
|
|
@@ -2275,7 +2244,7 @@ function createCatalogIntegration(entry, deps) {
|
|
|
2275
2244
|
license: entry.license,
|
|
2276
2245
|
supportedEnvironments: PLUGIN_HOSTS.filter((host) => entry.hosts[host] !== void 0),
|
|
2277
2246
|
detect: (context) => detectWorkspacePackage(entry, context),
|
|
2278
|
-
plan: createClaudeMarketplacePlan(entry
|
|
2247
|
+
plan: createClaudeMarketplacePlan(entry),
|
|
2279
2248
|
install: createClaudeMarketplaceInstall(entry, { runner: deps.runner }),
|
|
2280
2249
|
verify: createClaudeMarketplaceVerifier(entry, { runner: deps.runner }),
|
|
2281
2250
|
uninstallInstructions: async () => [...entry.uninstallSteps]
|
|
@@ -2352,7 +2321,7 @@ var NodeCommandRunner = class {
|
|
|
2352
2321
|
// src/runtime/integrations-composition-root.ts
|
|
2353
2322
|
function createIntegrationsCompositionRoot(deps = {}) {
|
|
2354
2323
|
const runner = deps.runner ?? new NodeCommandRunner();
|
|
2355
|
-
const registry = createIntegrationRegistry(createCatalogIntegrations({ runner
|
|
2324
|
+
const registry = createIntegrationRegistry(createCatalogIntegrations({ runner }));
|
|
2356
2325
|
return {
|
|
2357
2326
|
registry,
|
|
2358
2327
|
runner,
|
|
@@ -247,33 +247,6 @@ function recordMetadataFor(entry) {
|
|
|
247
247
|
return { source: claude.marketplace, repository: entry.repository, method: CLAUDE_MARKETPLACE_METHOD };
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
-
// ../integrations/dist/catalog/resolve-version.js
|
|
251
|
-
import { get } from "node:https";
|
|
252
|
-
function resolveVersionFromNpmRegistry(npmPackage) {
|
|
253
|
-
const registryUrl = `https://registry.npmjs.org/${encodeURIComponent(npmPackage)}`;
|
|
254
|
-
return new Promise((resolve2, reject) => {
|
|
255
|
-
get(registryUrl, (response) => {
|
|
256
|
-
let body = "";
|
|
257
|
-
response.on("data", (chunk) => {
|
|
258
|
-
body += chunk;
|
|
259
|
-
});
|
|
260
|
-
response.on("end", () => {
|
|
261
|
-
try {
|
|
262
|
-
const parsed = JSON.parse(body);
|
|
263
|
-
const latest = parsed?.["dist-tags"]?.["latest"];
|
|
264
|
-
if (typeof latest !== "string") {
|
|
265
|
-
reject(new Error(`Could not resolve the latest version of ${npmPackage} from the npm registry.`));
|
|
266
|
-
return;
|
|
267
|
-
}
|
|
268
|
-
resolve2(latest);
|
|
269
|
-
} catch (error) {
|
|
270
|
-
reject(error instanceof Error ? error : new Error(String(error)));
|
|
271
|
-
}
|
|
272
|
-
});
|
|
273
|
-
}).on("error", reject);
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
|
|
277
250
|
// ../integrations/dist/hosts/claude-code/detect.js
|
|
278
251
|
import { existsSync as existsSync3, readFileSync as readFileSync3 } from "node:fs";
|
|
279
252
|
import { join as join3 } from "node:path";
|
|
@@ -314,14 +287,14 @@ var WORKSPACE_FILES_BY_SCOPE = {
|
|
|
314
287
|
local: [".claude/settings.local.json"]
|
|
315
288
|
};
|
|
316
289
|
var DEFAULT_PLUGIN_SCOPE = "project";
|
|
317
|
-
function createClaudeMarketplacePlan(entry
|
|
290
|
+
function createClaudeMarketplacePlan(entry) {
|
|
318
291
|
return async (options) => {
|
|
319
292
|
const distribution = entry.hosts["claude-code"];
|
|
320
293
|
if (options.targetEnvironment !== "claude-code" || distribution === void 0) {
|
|
321
294
|
const supported = Object.entries(entry.hosts).filter(([, value]) => value !== void 0).map(([host]) => host).join(", ");
|
|
322
295
|
throw new Error(`Target environment "${options.targetEnvironment}" is not supported by this integration. Supported: ${supported}.`);
|
|
323
296
|
}
|
|
324
|
-
const resolvedVersion = options.versionRange ??
|
|
297
|
+
const resolvedVersion = options.versionRange ?? VERSION_DECIDED_BY_MARKETPLACE;
|
|
325
298
|
const scope = options.scope ?? DEFAULT_PLUGIN_SCOPE;
|
|
326
299
|
return {
|
|
327
300
|
officialCommand: {
|
|
@@ -752,10 +725,6 @@ function createClaudeMarketplaceVerifier(entry, deps) {
|
|
|
752
725
|
}
|
|
753
726
|
|
|
754
727
|
// ../integrations/dist/catalog/create-catalog-integration.js
|
|
755
|
-
function defaultResolveVersion(entry) {
|
|
756
|
-
const npmPackage = entry.npmPackage;
|
|
757
|
-
return npmPackage === void 0 ? async () => VERSION_DECIDED_BY_MARKETPLACE : () => resolveVersionFromNpmRegistry(npmPackage);
|
|
758
|
-
}
|
|
759
728
|
function createCatalogIntegration(entry, deps) {
|
|
760
729
|
return {
|
|
761
730
|
id: entry.id,
|
|
@@ -765,7 +734,7 @@ function createCatalogIntegration(entry, deps) {
|
|
|
765
734
|
license: entry.license,
|
|
766
735
|
supportedEnvironments: PLUGIN_HOSTS.filter((host) => entry.hosts[host] !== void 0),
|
|
767
736
|
detect: (context) => detectWorkspacePackage(entry, context),
|
|
768
|
-
plan: createClaudeMarketplacePlan(entry
|
|
737
|
+
plan: createClaudeMarketplacePlan(entry),
|
|
769
738
|
install: createClaudeMarketplaceInstall(entry, { runner: deps.runner }),
|
|
770
739
|
verify: createClaudeMarketplaceVerifier(entry, { runner: deps.runner }),
|
|
771
740
|
uninstallInstructions: async () => [...entry.uninstallSteps]
|
|
@@ -1074,7 +1043,7 @@ var NodeCommandRunner = class {
|
|
|
1074
1043
|
// src/runtime/integrations-composition-root.ts
|
|
1075
1044
|
function createIntegrationsCompositionRoot(deps = {}) {
|
|
1076
1045
|
const runner = deps.runner ?? new NodeCommandRunner();
|
|
1077
|
-
const registry = createIntegrationRegistry(createCatalogIntegrations({ runner
|
|
1046
|
+
const registry = createIntegrationRegistry(createCatalogIntegrations({ runner }));
|
|
1078
1047
|
return {
|
|
1079
1048
|
registry,
|
|
1080
1049
|
runner,
|
|
@@ -1110,8 +1079,7 @@ async function runInstallIntegration(tree, options, deps = {}) {
|
|
|
1110
1079
|
const plan = await integration.plan({
|
|
1111
1080
|
targetEnvironment: target,
|
|
1112
1081
|
versionRange: options.versionRange,
|
|
1113
|
-
scope
|
|
1114
|
-
resolveLatestVersion: false
|
|
1082
|
+
scope
|
|
1115
1083
|
});
|
|
1116
1084
|
const pre = await verifyViaClaudeCli(root.runner, pluginId, tree.root);
|
|
1117
1085
|
let currentState;
|
|
@@ -221,33 +221,6 @@ function recordMetadataFor(entry) {
|
|
|
221
221
|
return { source: claude.marketplace, repository: entry.repository, method: CLAUDE_MARKETPLACE_METHOD };
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
-
// ../integrations/dist/catalog/resolve-version.js
|
|
225
|
-
import { get } from "node:https";
|
|
226
|
-
function resolveVersionFromNpmRegistry(npmPackage) {
|
|
227
|
-
const registryUrl = `https://registry.npmjs.org/${encodeURIComponent(npmPackage)}`;
|
|
228
|
-
return new Promise((resolve2, reject) => {
|
|
229
|
-
get(registryUrl, (response) => {
|
|
230
|
-
let body = "";
|
|
231
|
-
response.on("data", (chunk) => {
|
|
232
|
-
body += chunk;
|
|
233
|
-
});
|
|
234
|
-
response.on("end", () => {
|
|
235
|
-
try {
|
|
236
|
-
const parsed = JSON.parse(body);
|
|
237
|
-
const latest = parsed?.["dist-tags"]?.["latest"];
|
|
238
|
-
if (typeof latest !== "string") {
|
|
239
|
-
reject(new Error(`Could not resolve the latest version of ${npmPackage} from the npm registry.`));
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
resolve2(latest);
|
|
243
|
-
} catch (error) {
|
|
244
|
-
reject(error instanceof Error ? error : new Error(String(error)));
|
|
245
|
-
}
|
|
246
|
-
});
|
|
247
|
-
}).on("error", reject);
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
|
|
251
224
|
// ../integrations/dist/hosts/claude-code/detect.js
|
|
252
225
|
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
253
226
|
import { join as join2 } from "node:path";
|
|
@@ -288,14 +261,14 @@ var WORKSPACE_FILES_BY_SCOPE = {
|
|
|
288
261
|
local: [".claude/settings.local.json"]
|
|
289
262
|
};
|
|
290
263
|
var DEFAULT_PLUGIN_SCOPE = "project";
|
|
291
|
-
function createClaudeMarketplacePlan(entry
|
|
264
|
+
function createClaudeMarketplacePlan(entry) {
|
|
292
265
|
return async (options) => {
|
|
293
266
|
const distribution = entry.hosts["claude-code"];
|
|
294
267
|
if (options.targetEnvironment !== "claude-code" || distribution === void 0) {
|
|
295
268
|
const supported = Object.entries(entry.hosts).filter(([, value]) => value !== void 0).map(([host]) => host).join(", ");
|
|
296
269
|
throw new Error(`Target environment "${options.targetEnvironment}" is not supported by this integration. Supported: ${supported}.`);
|
|
297
270
|
}
|
|
298
|
-
const resolvedVersion = options.versionRange ??
|
|
271
|
+
const resolvedVersion = options.versionRange ?? VERSION_DECIDED_BY_MARKETPLACE;
|
|
299
272
|
const scope = options.scope ?? DEFAULT_PLUGIN_SCOPE;
|
|
300
273
|
return {
|
|
301
274
|
officialCommand: {
|
|
@@ -713,10 +686,6 @@ function createClaudeMarketplaceVerifier(entry, deps) {
|
|
|
713
686
|
}
|
|
714
687
|
|
|
715
688
|
// ../integrations/dist/catalog/create-catalog-integration.js
|
|
716
|
-
function defaultResolveVersion(entry) {
|
|
717
|
-
const npmPackage = entry.npmPackage;
|
|
718
|
-
return npmPackage === void 0 ? async () => VERSION_DECIDED_BY_MARKETPLACE : () => resolveVersionFromNpmRegistry(npmPackage);
|
|
719
|
-
}
|
|
720
689
|
function createCatalogIntegration(entry, deps) {
|
|
721
690
|
return {
|
|
722
691
|
id: entry.id,
|
|
@@ -726,7 +695,7 @@ function createCatalogIntegration(entry, deps) {
|
|
|
726
695
|
license: entry.license,
|
|
727
696
|
supportedEnvironments: PLUGIN_HOSTS.filter((host) => entry.hosts[host] !== void 0),
|
|
728
697
|
detect: (context) => detectWorkspacePackage(entry, context),
|
|
729
|
-
plan: createClaudeMarketplacePlan(entry
|
|
698
|
+
plan: createClaudeMarketplacePlan(entry),
|
|
730
699
|
install: createClaudeMarketplaceInstall(entry, { runner: deps.runner }),
|
|
731
700
|
verify: createClaudeMarketplaceVerifier(entry, { runner: deps.runner }),
|
|
732
701
|
uninstallInstructions: async () => [...entry.uninstallSteps]
|
|
@@ -803,7 +772,7 @@ var NodeCommandRunner = class {
|
|
|
803
772
|
// src/runtime/integrations-composition-root.ts
|
|
804
773
|
function createIntegrationsCompositionRoot(deps = {}) {
|
|
805
774
|
const runner = deps.runner ?? new NodeCommandRunner();
|
|
806
|
-
const registry = createIntegrationRegistry(createCatalogIntegrations({ runner
|
|
775
|
+
const registry = createIntegrationRegistry(createCatalogIntegrations({ runner }));
|
|
807
776
|
return {
|
|
808
777
|
registry,
|
|
809
778
|
runner,
|
|
@@ -858,7 +827,7 @@ async function recordIntegrationGenerator(tree, options, deps = {}) {
|
|
|
858
827
|
if (!metadata) {
|
|
859
828
|
throw new Error(`No manifest metadata is defined for "${options.tool}".`);
|
|
860
829
|
}
|
|
861
|
-
await integration.plan({ targetEnvironment: target
|
|
830
|
+
await integration.plan({ targetEnvironment: target });
|
|
862
831
|
const outcome = await runRecordPipeline({
|
|
863
832
|
id: integration.id,
|
|
864
833
|
runner: root.runner,
|
|
@@ -9,8 +9,8 @@ import { parseJson } from '@nx/devkit';
|
|
|
9
9
|
* application, as in Nx); then `tsconfig.lib.json` → library; `tsconfig.app.json`
|
|
10
10
|
* → application; a readable package.json with none of exports/main/module/bin
|
|
11
11
|
* set → application; anything else — including a missing or unparseable
|
|
12
|
-
* package.json — → library. Mirrored, not imported: the plugin's runtime
|
|
13
|
-
*
|
|
12
|
+
* package.json — → library. Mirrored, not imported: the plugin's only runtime
|
|
13
|
+
* dependency stays @nx/devkit. Not mirrored: the package-json plugin's
|
|
14
14
|
* `workspaceLayout.appsDir`/`libsDir` override, which devkit's tree-based
|
|
15
15
|
* `getProjects` never applies either.
|
|
16
16
|
*/
|
package/dist/index.js
CHANGED
|
@@ -111,33 +111,6 @@ var PLUGIN_CATALOG = [
|
|
|
111
111
|
];
|
|
112
112
|
var PLUGIN_IDS = PLUGIN_CATALOG.map((entry) => entry.id);
|
|
113
113
|
|
|
114
|
-
// ../integrations/dist/catalog/resolve-version.js
|
|
115
|
-
import { get } from "node:https";
|
|
116
|
-
function resolveVersionFromNpmRegistry(npmPackage) {
|
|
117
|
-
const registryUrl = `https://registry.npmjs.org/${encodeURIComponent(npmPackage)}`;
|
|
118
|
-
return new Promise((resolve2, reject) => {
|
|
119
|
-
get(registryUrl, (response) => {
|
|
120
|
-
let body = "";
|
|
121
|
-
response.on("data", (chunk) => {
|
|
122
|
-
body += chunk;
|
|
123
|
-
});
|
|
124
|
-
response.on("end", () => {
|
|
125
|
-
try {
|
|
126
|
-
const parsed = JSON.parse(body);
|
|
127
|
-
const latest = parsed?.["dist-tags"]?.["latest"];
|
|
128
|
-
if (typeof latest !== "string") {
|
|
129
|
-
reject(new Error(`Could not resolve the latest version of ${npmPackage} from the npm registry.`));
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
resolve2(latest);
|
|
133
|
-
} catch (error) {
|
|
134
|
-
reject(error instanceof Error ? error : new Error(String(error)));
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
}).on("error", reject);
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
|
|
141
114
|
// ../integrations/dist/hosts/claude-code/detect.js
|
|
142
115
|
import { existsSync, readFileSync } from "node:fs";
|
|
143
116
|
import { join } from "node:path";
|
|
@@ -178,14 +151,14 @@ var WORKSPACE_FILES_BY_SCOPE = {
|
|
|
178
151
|
local: [".claude/settings.local.json"]
|
|
179
152
|
};
|
|
180
153
|
var DEFAULT_PLUGIN_SCOPE = "project";
|
|
181
|
-
function createClaudeMarketplacePlan(entry
|
|
154
|
+
function createClaudeMarketplacePlan(entry) {
|
|
182
155
|
return async (options) => {
|
|
183
156
|
const distribution = entry.hosts["claude-code"];
|
|
184
157
|
if (options.targetEnvironment !== "claude-code" || distribution === void 0) {
|
|
185
158
|
const supported = Object.entries(entry.hosts).filter(([, value]) => value !== void 0).map(([host]) => host).join(", ");
|
|
186
159
|
throw new Error(`Target environment "${options.targetEnvironment}" is not supported by this integration. Supported: ${supported}.`);
|
|
187
160
|
}
|
|
188
|
-
const resolvedVersion = options.versionRange ??
|
|
161
|
+
const resolvedVersion = options.versionRange ?? VERSION_DECIDED_BY_MARKETPLACE;
|
|
189
162
|
const scope = options.scope ?? DEFAULT_PLUGIN_SCOPE;
|
|
190
163
|
return {
|
|
191
164
|
officialCommand: {
|
|
@@ -603,10 +576,6 @@ function createClaudeMarketplaceVerifier(entry, deps) {
|
|
|
603
576
|
}
|
|
604
577
|
|
|
605
578
|
// ../integrations/dist/catalog/create-catalog-integration.js
|
|
606
|
-
function defaultResolveVersion(entry) {
|
|
607
|
-
const npmPackage = entry.npmPackage;
|
|
608
|
-
return npmPackage === void 0 ? async () => VERSION_DECIDED_BY_MARKETPLACE : () => resolveVersionFromNpmRegistry(npmPackage);
|
|
609
|
-
}
|
|
610
579
|
function createCatalogIntegration(entry, deps) {
|
|
611
580
|
return {
|
|
612
581
|
id: entry.id,
|
|
@@ -616,7 +585,7 @@ function createCatalogIntegration(entry, deps) {
|
|
|
616
585
|
license: entry.license,
|
|
617
586
|
supportedEnvironments: PLUGIN_HOSTS.filter((host) => entry.hosts[host] !== void 0),
|
|
618
587
|
detect: (context) => detectWorkspacePackage(entry, context),
|
|
619
|
-
plan: createClaudeMarketplacePlan(entry
|
|
588
|
+
plan: createClaudeMarketplacePlan(entry),
|
|
620
589
|
install: createClaudeMarketplaceInstall(entry, { runner: deps.runner }),
|
|
621
590
|
verify: createClaudeMarketplaceVerifier(entry, { runner: deps.runner }),
|
|
622
591
|
uninstallInstructions: async () => [...entry.uninstallSteps]
|
|
@@ -693,7 +662,7 @@ var NodeCommandRunner = class {
|
|
|
693
662
|
// src/runtime/integrations-composition-root.ts
|
|
694
663
|
function createIntegrationsCompositionRoot(deps = {}) {
|
|
695
664
|
const runner = deps.runner ?? new NodeCommandRunner();
|
|
696
|
-
const registry = createIntegrationRegistry(createCatalogIntegrations({ runner
|
|
665
|
+
const registry = createIntegrationRegistry(createCatalogIntegrations({ runner }));
|
|
697
666
|
return {
|
|
698
667
|
registry,
|
|
699
668
|
runner,
|
|
@@ -10,7 +10,7 @@ import { NodeCommandRunner } from "./node-command-runner.js";
|
|
|
10
10
|
// equal to it by a test (catalog-schema-enums.spec.ts).
|
|
11
11
|
export function createIntegrationsCompositionRoot(deps = {}) {
|
|
12
12
|
const runner = deps.runner ?? new NodeCommandRunner();
|
|
13
|
-
const registry = createIntegrationRegistry(createCatalogIntegrations({ runner
|
|
13
|
+
const registry = createIntegrationRegistry(createCatalogIntegrations({ runner }));
|
|
14
14
|
return {
|
|
15
15
|
registry,
|
|
16
16
|
runner,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clearlydev/nx-archweave",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Nx generators that make a workspace ready to work on in one preset: FSD Lite structure with enforced module boundaries, AI agent rules, GitHub templates, and optional AI PR review (Claude, Gemini, GPT, Cursor)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "clearlydev (https://github.com/clearlydev)",
|
|
@@ -92,7 +92,6 @@
|
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
"dependencies": {
|
|
95
|
-
"@nx/devkit": "^23.1.0"
|
|
96
|
-
"tslib": "^2.3.0"
|
|
95
|
+
"@nx/devkit": "^23.1.0"
|
|
97
96
|
}
|
|
98
97
|
}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"versionRange": {
|
|
25
25
|
"type": "string",
|
|
26
|
-
"description": "
|
|
26
|
+
"description": "Version to show as requested. Without it, the preview says the marketplace decides — it installs its own latest. No network access."
|
|
27
27
|
},
|
|
28
28
|
"dryRun": {
|
|
29
29
|
"type": "boolean",
|