Skip to content

Commit 18a47be

Browse files
committed
update test files and lint
1 parent 386682c commit 18a47be

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

.nycrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"src/updateApis.ts",
77
"src/lib/config.ts",
88
"src/generate-oas.ts",
9+
"src/removeInternalOas.ts",
910
"src/static/helpers/index.ts",
1011
"src/lib/utils.ts"
1112
],

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
"lint:dev": "sort-package-json && eslint . --ext .ts --fix",
3333
"prepack": "npm run build",
3434
"prepare": "snyk protect",
35-
"renderTemplates": "PACKAGE_VERSION=$(node -p \"require('./package.json').version\") ts-node src/generate-oas.ts",
3635
"removeInternalOas": "ts-node src/removeInternalOas.ts",
36+
"renderTemplates": "PACKAGE_VERSION=$(node -p \"require('./package.json').version\") ts-node src/generate-oas.ts",
3737
"snyk:auth": "snyk auth",
3838
"pretest": "npm run lint && npm run depcheck",
3939
"test": "nyc mocha \"src/**/*.test.ts\"",

src/generate-oas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function appendVersionIfV2(name: string, version: string): string {
4747
*/
4848
export function resolveApiName(name: string, version: string): string {
4949
if (name === "Shopper Baskets OAS" && version === "v2") {
50-
return "ShopperBasketsV2"
50+
return "ShopperBasketsV2";
5151
}
5252
if (name === "CDN API - Process APIs OAS") {
5353
return "CDNZones";

src/removeInternalOas.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ export function removeInternalOas(directoryPath: string): void {
2121

2222
const items = fs.readdirSync(directoryPath);
2323

24-
items.forEach(item => {
24+
items.forEach((item) => {
2525
const fullPath = path.join(directoryPath, item);
2626
const stat = fs.statSync(fullPath);
2727

2828
if (stat.isDirectory()) {
2929
// Recursively process subdirectories
3030
removeInternalOas(fullPath);
31-
} else if (stat.isFile() && item.endsWith('-internal.yaml')) {
31+
} else if (stat.isFile() && item.endsWith("-internal.yaml")) {
3232
// Remove internal files
3333
fs.removeSync(fullPath);
3434
console.log(`Removed internal file: ${fullPath}`);
@@ -40,5 +40,5 @@ export function removeInternalOas(directoryPath: string): void {
4040
if (require.main === module) {
4141
console.log(`Removing internal OAS files from: ${PRODUCTION_API_PATH}`);
4242
removeInternalOas(PRODUCTION_API_PATH);
43-
console.log('Internal OAS files removal completed.');
43+
console.log("Internal OAS files removal completed.");
4444
}

0 commit comments

Comments
 (0)