Skip to content

Commit

Permalink
refactor: Small files to typescript (#30665)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevLehman authored Oct 18, 2023
1 parent f3dd127 commit 0838406
Show file tree
Hide file tree
Showing 21 changed files with 21 additions and 15 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { settings } from '../../../settings/server';

export const getFederationDiscoveryMethod = () => settings.get<string>('FEDERATION_Discovery_Method');
3 changes: 0 additions & 3 deletions apps/meteor/app/federation/server/lib/getFederationDomain.js

This file was deleted.

3 changes: 3 additions & 0 deletions apps/meteor/app/federation/server/lib/getFederationDomain.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { settings } from '../../../settings/server';

export const getFederationDomain = () => settings.get<string>('FEDERATION_Domain').replace('@', '');
3 changes: 0 additions & 3 deletions apps/meteor/app/federation/server/lib/isFederationEnabled.js

This file was deleted.

3 changes: 3 additions & 0 deletions apps/meteor/app/federation/server/lib/isFederationEnabled.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { settings } from '../../../settings/server';

export const isFederationEnabled = () => settings.get<boolean>('FEDERATION_Enabled');
6 changes: 6 additions & 0 deletions apps/meteor/definition/externals/meteor/meteor.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,11 @@ declare module 'meteor/meteor' {
...args: StringifyBuffers<Parameters<TServerMethods[TMethodName]>>
) => ReturnType<TServerMethods[TMethodName]> | Promise<ReturnType<TServerMethods[TMethodName]>>;
}): void;

const AppCache:
| {
config: (config: { onlineOnly: string[] }) => void;
}
| undefined;
}
}
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions apps/meteor/tests/data/api-data.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import supertest from 'supertest';

import { publicChannelName, privateChannelName } from './channel.js';
import { roleNameUsers, roleNameSubscriptions, roleScopeUsers, roleScopeSubscriptions, roleDescription } from './role.js';
import { publicChannelName, privateChannelName } from './channel';
import { roleNameUsers, roleNameSubscriptions, roleScopeUsers, roleScopeSubscriptions, roleDescription } from './role';
import { username, email, adminUsername, adminPassword } from './user';

const apiUrl = process.env.TEST_API_URL || 'http://localhost:3000';
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion apps/meteor/tests/data/uploads.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { after, before, it } from 'mocha';
import { api, request, credentials } from './api-data.js';
import { password } from './user';
import { createUser, login } from './users.helper';
import { imgURL } from './interactions.js';
import { imgURL } from './interactions';
import { updateSetting } from './permissions.helper';
import { createRoom } from './rooms.helper';
import { createVisitor } from './livechat/rooms';
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/tests/end-to-end/api/01-users.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
} from '../../data/api-data.js';
import { MAX_BIO_LENGTH, MAX_NICKNAME_LENGTH } from '../../data/constants.ts';
import { customFieldText, clearCustomFields, setCustomFields } from '../../data/custom-fields.js';
import { imgURL } from '../../data/interactions.js';
import { imgURL } from '../../data/interactions';
import { updatePermission, updateSetting } from '../../data/permissions.helper';
import { createRoom } from '../../data/rooms.helper';
import { adminEmail, preferences, password, adminUsername } from '../../data/user';
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/tests/end-to-end/api/09-rooms.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { after, afterEach, before, beforeEach, describe, it } from 'mocha';
import { sleep } from '../../../lib/utils/sleep';
import { getCredentials, api, request, credentials } from '../../data/api-data.js';
import { sendSimpleMessage, deleteMessage } from '../../data/chat.helper';
import { imgURL } from '../../data/interactions.js';
import { imgURL } from '../../data/interactions';
import { updateEEPermission, updatePermission, updateSetting } from '../../data/permissions.helper';
import { closeRoom, createRoom } from '../../data/rooms.helper';
import { password } from '../../data/user';
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/tests/end-to-end/api/14-assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { expect } from 'chai';
import { before, describe, it } from 'mocha';

import { getCredentials, api, request, credentials } from '../../data/api-data.js';
import { imgURL } from '../../data/interactions.js';
import { imgURL } from '../../data/interactions';

describe('[Assets]', function () {
this.retries(0);
Expand Down

0 comments on commit 0838406

Please sign in to comment.