Skip to content

Commit

Permalink
update project name
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmossas committed Aug 11, 2024
1 parent 7faf580 commit 80bbcb4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 8 additions & 2 deletions internal/scripts/scaffold-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const main = defineCommand({
choices: ["codegen", "tooling"],
},
]);
let projectName: string;
let pkgName: string;
let pkgLocation: string;
let depth: number;
Expand Down Expand Up @@ -57,6 +58,7 @@ const main = defineCommand({
await mkdir(langDir);
}
pkgName = `@arrirpc/codegen-${lang}`;
projectName = `codegen-${lang}`;
pkgLocation = `languages/${lang}/${lang}-codegen`;

depth = 3;
Expand All @@ -77,6 +79,9 @@ const main = defineCommand({
]);
isCodegen = false;
pkgName = kebabCase(inputResult.name);
projectName = kebabCase(
inputResult.name.replace("@arrirpc/", ""),
);
pkgLocation = `tooling/${pkgName}`;
depth = 2;
outDir = path.resolve(__dirname, "../../tooling", pkgName);
Expand Down Expand Up @@ -104,7 +109,7 @@ const main = defineCommand({
),
writeFile(
path.resolve(outDir, "project.json"),
projectJsonTemplate(pkgName, pkgLocation, depth),
projectJsonTemplate(projectName, pkgName, pkgLocation, depth),
),
writeFile(
path.resolve(outDir, "README.md"),
Expand Down Expand Up @@ -187,6 +192,7 @@ function packageJsonTemplate(
}

function projectJsonTemplate(
projectName: string,
packageName: string,
packageLocation: string,
depth: number,
Expand All @@ -196,7 +202,7 @@ function projectJsonTemplate(
prefix += "../";
}
return `{
"name": "${packageName}",
"name": "${projectName}",
"$schema": "${prefix}node_modules/nx/schemas/project-schema.json",
"sourceRoot": "${packageLocation}/src",
"projectType": "library",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ extension HTTPField.Name {
static let clientVersionHeader = Self("client-version")!
}


public func parsedArriHttpRequest<TParams: ArriClientModel, TResponse: ArriClientModel>(
http: ArriHTTPClient,
url: String,
Expand Down

0 comments on commit 80bbcb4

Please sign in to comment.