Skip to content

Commit bd5a449

Browse files
committed
Move nested lib files to src root
1 parent c05a8d2 commit bd5a449

File tree

12 files changed

+19
-18
lines changed

12 files changed

+19
-18
lines changed

src/browser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export * from './types'
22
export * from './errors'
3-
export * from './lib'
4-
import { MeiliSearch } from './lib/clients/browser-client'
3+
export * from './indexes'
4+
import { MeiliSearch } from './clients/browser-client'
55

66
export { MeiliSearch }
77
export default MeiliSearch

src/lib/clients/browser-client.ts renamed to src/clients/browser-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Client } from './client'
2-
import { Config } from '../../types'
2+
import { Config } from '../types'
33

44
class MeiliSearch extends Client {
55
constructor(config: Config) {

src/lib/clients/client.ts renamed to src/clients/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {
2424
Result,
2525
TokenSearchRules,
2626
TokenOptions,
27-
} from '../../types'
27+
} from '../types'
2828
import { HttpRequests } from '../http-requests'
2929
import { TaskClient } from '../task'
3030

src/lib/clients/node-client.ts renamed to src/clients/node-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Client } from './client'
2-
import { Config, TokenSearchRules, TokenOptions } from '../../types'
2+
import { Config, TokenSearchRules, TokenOptions } from '../types'
33
import { Token } from '../token'
44

55
class MeiliSearch extends Client {

src/lib/http-requests.ts renamed to src/http-requests.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import 'cross-fetch/polyfill'
22

3-
import { Config, EnqueuedTask } from '../types'
3+
import { Config, EnqueuedTask } from './types'
44

55
import {
66
MeiliSearchError,
77
httpResponseErrorHandler,
88
httpErrorHandler,
9-
} from '../errors'
9+
} from './errors'
1010

1111
import { addTrailingSlash, addProtocolIfNotPresent } from './utils'
1212

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export * from './types'
22
export * from './errors'
3-
export * from './lib'
4-
import { MeiliSearch } from './lib/clients/node-client'
3+
export * from './indexes'
4+
import { MeiliSearch } from './clients/node-client'
55

66
export { MeiliSearch }
77
export default MeiliSearch

src/lib/indexes.ts renamed to src/indexes.ts

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

88
'use strict'
99

10-
import { MeiliSearchError } from '../errors'
10+
import { MeiliSearchError } from './errors'
1111

1212
import {
1313
Config,
@@ -35,7 +35,7 @@ import {
3535
DisplayedAttributes,
3636
TypoTolerance,
3737
Result,
38-
} from '../types'
38+
} from './types'
3939
import { removeUndefinedFromObject } from './utils'
4040
import { HttpRequests } from './http-requests'
4141
import { TaskClient } from './task'

src/lib/index.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/lib/task.ts renamed to src/task.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { MeiliSearchTimeOutError } from '../errors'
2-
import { Config, Task, WaitOptions, TaskStatus, Result } from '../types'
1+
import { MeiliSearchTimeOutError } from './errors'
2+
import { Config, Task, WaitOptions, TaskStatus, Result } from './types'
33
import { HttpRequests } from './http-requests'
44
import { sleep } from './utils'
55

src/lib/token.ts renamed to src/token.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Config, TokenSearchRules, TokenOptions } from '../types'
1+
import { Config, TokenSearchRules, TokenOptions } from './types'
22
import crypto from 'crypto'
33

44
function encode64(data: any) {

0 commit comments

Comments
 (0)