Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import fsp from 'fs/promises';

import { hashElement } from 'folder-hash';

import { exists } from './common';
import { exists } from './common.js';

export class Cache {
folder: string;
Expand Down
10 changes: 5 additions & 5 deletions scripts/ci/codegen/createGitHubReleases.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ensureGitHubToken, getOctokit, OWNER, run, setVerbose, toAbsolutePath } from '../../common';
import { isPreRelease } from '../../release/versionsHistory';
import type { Language } from '../../types';
import { cloneRepository } from '../utils';
import { ensureGitHubToken, getOctokit, OWNER, run, setVerbose, toAbsolutePath } from '../../common.js';
import { isPreRelease } from '../../release/versionsHistory.js';
import type { Language } from '../../types.js';
import { cloneRepository } from '../utils.js';

import { commitStartRelease } from './text';
import { commitStartRelease } from './text.js';

async function createGitHubRelease(lang: Language): Promise<void> {
// **Full Changelog**:
Expand Down
10 changes: 5 additions & 5 deletions scripts/ci/codegen/waitForAllReleases.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { components } from '@octokit/openapi-types';

import { exists, getOctokit, run, setVerbose, toAbsolutePath } from '../../common';
import { getClientsConfigField, getLanguageFolder } from '../../config';
import { getTargetBranch } from '../../release/common';
import type { Language } from '../../types';
import { exists, getOctokit, run, setVerbose, toAbsolutePath } from '../../common.js';
import { getClientsConfigField, getLanguageFolder } from '../../config.js';
import { getTargetBranch } from '../../release/common.js';
import type { Language } from '../../types.js';

import { commitStartRelease } from './text';
import { commitStartRelease } from './text.js';

type Run = {
language: Language;
Expand Down
4 changes: 2 additions & 2 deletions scripts/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import { CI, CLIENTS, LANGUAGES, run, setVerbose, toAbsolutePath } from '../comm
import { getLanguageFolder } from '../config.js';
import { ctsGenerateMany } from '../cts/generate.js';
import { runCts } from '../cts/runCts.js';
import { startTestServer } from '../cts/testServer';
import { startTestServer } from '../cts/testServer/index.js';
import { docsGenerateMany } from '../docs/generate.js';
import { formatter } from '../formatter.js';
import { generate } from '../generate.js';
import { playground } from '../playground.js';
import { createReleasePR } from '../release/createReleasePR.js';
import { generateVersionsHistory } from '../release/versionsHistory.js';
import { buildSpecs } from '../specs';
import { buildSpecs } from '../specs/index.js';
import type { Language } from '../types.js';

import { existsSync } from 'node:fs';
Expand Down
8 changes: 4 additions & 4 deletions scripts/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import { remove } from 'fs-extra';
import clientsConfig from '../config/clients.config.json' assert { type: 'json' };
import releaseConfig from '../config/release.config.json' assert { type: 'json' };

import { Cache } from './cache';
import { getDockerImage } from './config';
import { generateOpenapitools } from './pre-gen';
import { Cache } from './cache.js';
import { getDockerImage } from './config.js';
import { generateOpenapitools } from './pre-gen/index.js';
import { getGitAuthor } from './release/common.js';
import { buildSpecs } from './specs';
import { buildSpecs } from './specs/index.js';
import { createSpinner } from './spinners.js';
import type { Generator, GeneratorMode, Language, RunOptions } from './types.js';

Expand Down
2 changes: 1 addition & 1 deletion scripts/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import clientsConfig from '../config/clients.config.json' assert { type: 'json' };

import { CI } from './common';
import { CI } from './common.js';
import type { Language, LanguageConfig } from './types.js';

export function getClientsConfigField(
Expand Down
2 changes: 1 addition & 1 deletion scripts/cts/runCts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { getTestOutputFolder } from '../config.js';
import { createSpinner } from '../spinners.js';
import type { Language } from '../types.js';

import { startTestServer } from './testServer';
import { printBenchmarkReport } from './testServer/benchmark.js';
import { assertChunkWrapperValid } from './testServer/chunkWrapper.js';
import { startTestServer } from './testServer/index.js';
import { assertValidReplaceAllObjects } from './testServer/replaceAllObjects.js';
import { assertValidTimeouts } from './testServer/timeout.js';
import { assertValidWaitForApiKey } from './testServer/waitFor.js';
Expand Down
2 changes: 1 addition & 1 deletion scripts/cts/testServer/apiKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Server } from 'http';
import { expect } from 'chai';
import type { Express, Request, Response } from 'express';

import { setupServer } from '.';
import { setupServer } from './index.js';

// Checks that the client sends a different API key after the first request.
function addRoutes(app: Express): void {
Expand Down
4 changes: 2 additions & 2 deletions scripts/cts/testServer/benchmark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import chalk from 'chalk';
import type { Express } from 'express';
import express from 'express';

import { CI, toAbsolutePath } from '../../common';
import { CI, toAbsolutePath } from '../../common.js';

import { setupServer } from '.';
import { setupServer } from './index.js';

const benchmarkStatus: Record<
string,
Expand Down
2 changes: 1 addition & 1 deletion scripts/cts/testServer/chunkWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { expect } from 'chai';
import type { Express } from 'express';
import express from 'express';

import { setupServer } from '.';
import { setupServer } from './index.js';

const chunkWrapperState: Record<string, any> = {};

Expand Down
4 changes: 2 additions & 2 deletions scripts/cts/testServer/gzip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import zlib from 'node:zlib';
import crc32 from 'crc/crc32';
import type { Express } from 'express';

import { retryHandler } from './timeout';
import { retryHandler } from './timeout.js';

import { setupServer } from '.';
import { setupServer } from './index.js';

function addRoutes(app: Express): void {
app.get('/1/test/retry/:lang', retryHandler(0, 'ok test server response'));
Expand Down
20 changes: 10 additions & 10 deletions scripts/cts/testServer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import type { Server } from 'http';
import type { Express } from 'express';
import express from 'express';

import { createSpinner } from '../../spinners';
import type { CTSType } from '../runCts';
import { createSpinner } from '../../spinners.js';
import type { CTSType } from '../runCts.js';

import { apiKeyServer } from './apiKey';
import { benchmarkServer } from './benchmark';
import { chunkWrapperServer } from './chunkWrapper';
import { gzipServer } from './gzip';
import { replaceAllObjectsServer } from './replaceAllObjects';
import { timeoutServer } from './timeout';
import { timeoutServerBis } from './timeoutBis';
import { waitForApiKeyServer } from './waitFor';
import { apiKeyServer } from './apiKey.js';
import { benchmarkServer } from './benchmark.js';
import { chunkWrapperServer } from './chunkWrapper.js';
import { gzipServer } from './gzip.js';
import { replaceAllObjectsServer } from './replaceAllObjects.js';
import { timeoutServer } from './timeout.js';
import { timeoutServerBis } from './timeoutBis.js';
import { waitForApiKeyServer } from './waitFor.js';

export async function startTestServer(suites: Record<CTSType, boolean>): Promise<() => Promise<void>> {
const toStart: Array<Promise<Server>> = [];
Expand Down
2 changes: 1 addition & 1 deletion scripts/cts/testServer/replaceAllObjects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { expect } from 'chai';
import type { Express } from 'express';
import express from 'express';

import { setupServer } from '.';
import { setupServer } from './index.js';

const raoState: Record<
string,
Expand Down
2 changes: 1 addition & 1 deletion scripts/cts/testServer/timeout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Server } from 'http';
import { expect } from 'chai';
import type express from 'express';

import { setupServer } from '.';
import { setupServer } from './index.js';

const timeoutState: Record<string, { timestamp: number[]; duration: number[]; hangCount: number }> = {};

Expand Down
4 changes: 2 additions & 2 deletions scripts/cts/testServer/timeoutBis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import type { Server } from 'http';

import type express from 'express';

import { retryHandler } from './timeout';
import { retryHandler } from './timeout.js';

import { setupServer } from '.';
import { setupServer } from './index.js';

function addRoutes(app: express.Express): void {
// this endpoint is also defined in the gzip server but without the timeout
Expand Down
2 changes: 1 addition & 1 deletion scripts/cts/testServer/waitFor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Server } from 'http';
import { expect } from 'chai';
import type { Express } from 'express';

import { setupServer } from '.';
import { setupServer } from './index.js';

const retryCount: Record<
string,
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { callGenerator, setupAndGen } from './common.js';
import { getLanguageFolder } from './config.js';
import { formatter } from './formatter.js';
import { removeExistingCodegen } from './pre-gen';
import { removeExistingCodegen } from './pre-gen/index.js';
import type { Generator } from './types.js';

async function preGen(gen: Generator): Promise<void> {
Expand Down
4 changes: 2 additions & 2 deletions scripts/specs/__tests__/snippets.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, expect, it } from 'vitest';

import { transformCodeSamplesToGuideMethods } from '../snippets';
import { SnippetSamples } from '../types';
import { transformCodeSamplesToGuideMethods } from '../snippets.js';
import { SnippetSamples } from '../types.js';

describe('init', () => {
it('parses a multi line import', () => {
Expand Down
2 changes: 1 addition & 1 deletion scripts/specs/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Language } from '../types';
import type { Language } from '../types.js';

export type BaseBuildSpecsOptions = {
outputFormat: 'json' | 'yml';
Expand Down
2 changes: 1 addition & 1 deletion scripts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "../config/base.tsconfig.json",
"compilerOptions": {
"module": "esnext",
"module": "nodenext",
"target": "esnext",
"typeRoots": ["../node_modules/@types"],
"types": ["node"],
Expand Down
2 changes: 1 addition & 1 deletion scripts/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type config from '../config/clients.config.json';

import type { CodeSamples } from './specs/types';
import type { CodeSamples } from './specs/types.js';

/**
* Config.
Expand Down
Loading