Skip to content

Commit 016ac36

Browse files
committed
refactor: rename devRegistry to userRegistry for clarity in registry handling
1 parent 7387031 commit 016ac36

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

packages/project/src/registry.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ export class Registry {
7979
registryUri: string[] | undefined,
8080
public getRequest: RequestFunction,
8181
logger: Logger,
82-
devRegistry?: string
82+
userRegistry?: string
8383
) {
8484
this.registryUri = registryUri || DefaultRegistryUrl;
8585
this.logger = logger;
86-
if (devRegistry) {
87-
this.registryUri.unshift(devRegistry);
86+
if (userRegistry) {
87+
this.registryUri.unshift(userRegistry);
8888
}
8989
}
9090

packages/tools/src/commands/lib-install.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@ import { logger } from "../logger.js";
1010
const cmd = new Command("Install Jaculus libraries base on project's package.json", {
1111
action: async (options: Record<string, string | boolean>, args: Record<string, string>) => {
1212
const libraryName = args["library"] as string;
13-
const devRegistry = options["dev-registry"] as string | undefined;
13+
const userRegistry = options["user-registry"] as string | undefined;
1414
const projectPath = process.cwd();
1515

1616
const pkg = await loadPackageJson(fs, path.join(projectPath, "package.json"));
1717
const project = new Project(fs, projectPath, logger);
1818

19-
console.log("Using registry:", devRegistry);
20-
21-
const registry = new Registry(pkg.jaculus?.registry, uriRequest, logger, devRegistry);
19+
const registry = new Registry(pkg.jaculus?.registry, uriRequest, logger, userRegistry);
2220

2321
const { name, version } = splitLibraryNameVersion(libraryName);
2422
if (name && version) {
@@ -37,9 +35,12 @@ const cmd = new Command("Install Jaculus libraries base on project's package.jso
3735
),
3836
],
3937
options: {
40-
"dev-registry": new Opt(`Force to use development registry (provided URI)`, {
41-
required: false,
42-
}),
38+
"user-registry": new Opt(
39+
`Preferred registry URI. If a package exists in multiple registries, this one is used first.`,
40+
{
41+
required: false,
42+
}
43+
),
4344
},
4445
chainable: true,
4546
});

0 commit comments

Comments
 (0)