Skip to content
Closed
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
13 changes: 11 additions & 2 deletions dist/src/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 14 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import { join, dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import type { z } from 'zod';
import { enabledResources } from './enabledResources.js';
import { enabledResources } from '../generator/enabledResources.js';

Check failure on line 20 in src/index.ts

View workflow job for this annotation

GitHub Actions / test (windows-latest, 20.x)

Cannot find module '../generator/enabledResources.js' or its corresponding type declarations.

Check failure on line 20 in src/index.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest, 20.x)

Cannot find module '../generator/enabledResources.js' or its corresponding type declarations.

Check failure on line 20 in src/index.ts

View workflow job for this annotation

GitHub Actions / test (macos-latest, 20.x)

Cannot find module '../generator/enabledResources.js' or its corresponding type declarations.
import { PostmanAPIClient } from './clients/postman.js';

const SUPPORTED_REGIONS = {
Expand Down Expand Up @@ -135,7 +135,19 @@
}
}

dotenv.config();
const dotEnvOutput = dotenv.config({ quiet: true });

if (dotEnvOutput.error) {
if ((dotEnvOutput.error as NodeJS.ErrnoException).code !== 'ENOENT') {
log('error', `Error loading .env file: ${dotEnvOutput.error}`);
process.exit(1);
}
} else {
log(
'info',
`Environment variables loaded: ${dotEnvOutput.parsed ? Object.keys(dotEnvOutput.parsed).length : 0} environment variables: ${Object.keys(dotEnvOutput.parsed || {}).join(', ')}`
);
}

const SERVER_NAME = packageJson.name;
const APP_VERSION = packageJson.version;
Expand Down
Loading