Skip to content

Commit 7498893

Browse files
committed
Merge branch 'main' into release/20260122
2 parents 2487cd1 + 8f1c99f commit 7498893

File tree

5 files changed

+11
-16
lines changed

5 files changed

+11
-16
lines changed

api-versions.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# ECOM v26.2
12
assignments-oas-v1=1.0.38
23
campaigns-oas-v1=1.0.40
34
catalogs-oas-v1=1.0.46
@@ -26,4 +27,4 @@ shopper-search-oas-v1=1.5.4
2627
shopper-seo-oas-v1=1.0.17
2728
shopper-stores-oas-v1=1.0.19
2829
slas-admin-oas-v1=1.14.1
29-
source-code-groups-oas-v1=1.0.40
30+
source-code-groups-oas-v1=1.0.40

src/lib/config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* SPDX-License-Identifier: BSD-3-Clause
55
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
7+
import path from "path";
8+
79
export const TYPESCRIPT_DTO_EXT = ".types.ts";
810
export const PRIMITIVE_DATA_TYPE_MAP = {
911
"http://www.w3.org/2001/XMLSchema#string": "string",
@@ -14,3 +16,5 @@ export const PRIMITIVE_DATA_TYPE_MAP = {
1416
};
1517

1618
export const PRODUCTION_API_PATH = `${__dirname}/../../apis`;
19+
export const API_VERSIONS_FILE = path.join(__dirname, "../../api-versions.txt");
20+
export const ORG_ID = "893f605e-10e2-423a-bdb4-f952f56eb6d8";

src/lib/utils.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import path from "path";
99
import { expect } from "chai";
1010
import sinon from "sinon";
1111
import * as utils from "./utils";
12-
const { readApiVersions, API_VERSIONS_FILE, downloadApisWithAnypointCli } =
13-
utils;
12+
import { API_VERSIONS_FILE } from "./config";
13+
const { readApiVersions, downloadApisWithAnypointCli } = utils;
1414

1515
describe("download-apis", () => {
1616
const mockApiId =

src/lib/utils.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,10 @@ import { execSync } from "child_process";
99
import path from "path";
1010
import fs from "fs-extra";
1111
import AdmZip from "adm-zip";
12-
13-
export const API_VERSIONS_FILE = path.join(__dirname, "../../api-versions.txt");
14-
export const ORG_ID = "893f605e-10e2-423a-bdb4-f952f56eb6d8";
12+
import { API_VERSIONS_FILE } from "./config";
1513

1614
/**
1715
* Wrapper around execSync to simplify stubbing in tests.
18-
* @param command
19-
* @param options
2016
*/
2117
export const runExecSync = (
2218
command: string,
@@ -26,7 +22,6 @@ export const runExecSync = (
2622
/**
2723
* Small wrapper to create an AdmZip instance.
2824
* Abstracted for easier stubbing in tests.
29-
* @param zipPath
3025
*/
3126
export const createAdmZip = (zipPath: string) => new AdmZip(zipPath);
3227

src/updateApis.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,14 @@
77

88
import path from "path";
99
import fs from "fs-extra";
10-
import {
11-
downloadApisWithAnypointCli,
12-
readApiVersions,
13-
ORG_ID,
14-
} from "./lib/utils";
15-
import { PRODUCTION_API_PATH } from "./lib/config";
10+
import { downloadApisWithAnypointCli, readApiVersions } from "./lib/utils";
11+
import { PRODUCTION_API_PATH, ORG_ID } from "./lib/config";
1612
import dotenv from "dotenv";
1713
import { removeInternalOas } from "./removeInternalOas";
1814

1915
dotenv.config();
2016

2117
// Constants
22-
// const PRODUCTION_API_PATH = path.join(__dirname, '../apis');
2318
const OLD_APIS_PATH = path.join(__dirname, "../temp/oldApis");
2419

2520
/**

0 commit comments

Comments
 (0)