@callstack/repack-dev-server 1.0.0-next.3 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/docs/README.md +28 -0
- package/docs/enums/Internal.EventTypes.md +41 -0
- package/docs/functions/createServer.md +21 -0
- package/docs/interfaces/CodeFrame.md +48 -0
- package/docs/interfaces/CompilerDelegate.md +83 -0
- package/docs/interfaces/HmrDelegate.md +51 -0
- package/docs/interfaces/InputStackFrame.md +76 -0
- package/docs/interfaces/ProgressData.md +34 -0
- package/docs/interfaces/ReactNativeStackFrame.md +58 -0
- package/docs/interfaces/Server.Api.Asset.md +36 -0
- package/docs/interfaces/Server.Api.CompilationStats.md +9 -0
- package/docs/interfaces/Server.Api.Delegate.md +75 -0
- package/docs/interfaces/Server.Config.md +49 -0
- package/docs/interfaces/Server.Delegate.md +88 -0
- package/docs/interfaces/Server.DelegateContext.md +134 -0
- package/docs/interfaces/Server.LoggerDelegate.md +33 -0
- package/docs/interfaces/Server.MessagesDelegate.md +44 -0
- package/docs/interfaces/Server.Options.md +70 -0
- package/docs/interfaces/StackFrame.md +85 -0
- package/docs/interfaces/SymbolicatorDelegate.md +77 -0
- package/docs/interfaces/SymbolicatorResults.md +30 -0
- package/docs/modules/Internal.md +11 -0
- package/docs/modules/Server.Api.md +11 -0
- package/docs/modules/Server.md +16 -0
- package/docs/types/SendProgress.md +26 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# @callstack/repack-dev-server
|
|
2
2
|
|
|
3
|
+
## 1.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#308](https://github.com/callstack/repack/pull/308) [`ad9581a`](https://github.com/callstack/repack/commit/ad9581a6d690b128991a9d64374ecb4b8d49c413) Thanks [@jbroma](https://github.com/jbroma)! - Make all packages compatible with Node v18
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`ad9581a`](https://github.com/callstack/repack/commit/ad9581a6d690b128991a9d64374ecb4b8d49c413)]:
|
|
10
|
+
- @callstack/repack-debugger-app@1.0.2
|
|
11
|
+
|
|
12
|
+
## 1.0.0
|
|
13
|
+
|
|
14
|
+
### Major Changes
|
|
15
|
+
|
|
16
|
+
- [#186](https://github.com/callstack/repack/pull/186) [`05d126e`](https://github.com/callstack/repack/commit/05d126e63802f0702a9e353e762f8b6a77fcd73e) Thanks [@zamotany](https://github.com/zamotany)! - ### Bundler-agnostic development server
|
|
17
|
+
|
|
18
|
+
Extracted development server from `@callstack/repack` into a separate package and made it bundler-agnostic.
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
- [#189](https://github.com/callstack/repack/pull/189) [`bc42023`](https://github.com/callstack/repack/commit/bc420236687047752cf1ee42204b2f510aec144a) Thanks [@zamotany](https://github.com/zamotany)! - ### Development server API
|
|
23
|
+
|
|
24
|
+
Added API endpoints to `@callstack/repack-dev-server`:
|
|
25
|
+
|
|
26
|
+
- `GET /api/platforms` - List all platforms with active compilations
|
|
27
|
+
- `GET /api/:platform/assets` - List all assets (`name` and `size`) for a given compilation
|
|
28
|
+
- `GET /api/:platform/stats` - Get compilation stats
|
|
29
|
+
- Websocket server under `/api` URI for logs and compilations events
|
|
30
|
+
|
|
31
|
+
* [#230](https://github.com/callstack/repack/pull/230) [`e6dc69d`](https://github.com/callstack/repack/commit/e6dc69d35f287af08d09944edd8e6d12f28484cf) Thanks [@jbinda](https://github.com/jbinda)! - Introduce `fastify-favicon` plugin to prevent server logger from emitting error log related to `GET 400 /favicon.ico` when requesting bundles via browser.
|
|
32
|
+
|
|
33
|
+
- [#239](https://github.com/callstack/repack/pull/239) [`6d65156`](https://github.com/callstack/repack/commit/6d65156366bc88edefdae7a3d0310ddbcdf48886) Thanks [@jbinda](https://github.com/jbinda)! - Expose favicon.ico in devserver
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- [#238](https://github.com/callstack/repack/pull/238) [`b913b89`](https://github.com/callstack/repack/commit/b913b8981334854cc13076af2a9c8a12bc465d1b) Thanks [@jbinda](https://github.com/jbinda)! - Add `archive` script in dev-server
|
|
38
|
+
|
|
39
|
+
* [#200](https://github.com/callstack/repack/pull/200) [`c75cdc7`](https://github.com/callstack/repack/commit/c75cdc7a44351bb4702232e603031e2880f2839d) Thanks [@zamotany](https://github.com/zamotany)! - Prevent server logger from emitting log to API WS server before WS servers are created.
|
|
40
|
+
|
|
41
|
+
* Updated dependencies [[`05d126e`](https://github.com/callstack/repack/commit/05d126e63802f0702a9e353e762f8b6a77fcd73e)]:
|
|
42
|
+
- @callstack/repack-debugger-app@1.0.0
|
|
43
|
+
|
|
3
44
|
## 1.0.0-next.3
|
|
4
45
|
|
|
5
46
|
### Minor Changes
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# @callstack/repack-dev-server
|
|
2
|
+
|
|
3
|
+
## Table of contents
|
|
4
|
+
|
|
5
|
+
### Namespaces
|
|
6
|
+
|
|
7
|
+
- [Internal](modules/Internal.md)
|
|
8
|
+
- [Server](modules/Server.md)
|
|
9
|
+
|
|
10
|
+
### Interfaces
|
|
11
|
+
|
|
12
|
+
- [CodeFrame](interfaces/CodeFrame.md)
|
|
13
|
+
- [CompilerDelegate](interfaces/CompilerDelegate.md)
|
|
14
|
+
- [HmrDelegate](interfaces/HmrDelegate.md)
|
|
15
|
+
- [InputStackFrame](interfaces/InputStackFrame.md)
|
|
16
|
+
- [ProgressData](interfaces/ProgressData.md)
|
|
17
|
+
- [ReactNativeStackFrame](interfaces/ReactNativeStackFrame.md)
|
|
18
|
+
- [StackFrame](interfaces/StackFrame.md)
|
|
19
|
+
- [SymbolicatorDelegate](interfaces/SymbolicatorDelegate.md)
|
|
20
|
+
- [SymbolicatorResults](interfaces/SymbolicatorResults.md)
|
|
21
|
+
|
|
22
|
+
### Type Aliases
|
|
23
|
+
|
|
24
|
+
- [SendProgress](types/SendProgress.md)
|
|
25
|
+
|
|
26
|
+
### Functions
|
|
27
|
+
|
|
28
|
+
- [createServer](functions/createServer.md)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Enumeration: EventTypes
|
|
2
|
+
|
|
3
|
+
[Internal](../modules/Internal.md).EventTypes
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Enumeration Members
|
|
8
|
+
|
|
9
|
+
- [BuildEnd](Internal.EventTypes.md#buildend)
|
|
10
|
+
- [BuildStart](Internal.EventTypes.md#buildstart)
|
|
11
|
+
- [HmrEvent](Internal.EventTypes.md#hmrevent)
|
|
12
|
+
|
|
13
|
+
## Enumeration Members
|
|
14
|
+
|
|
15
|
+
### BuildEnd
|
|
16
|
+
|
|
17
|
+
• **BuildEnd**
|
|
18
|
+
|
|
19
|
+
#### Defined in
|
|
20
|
+
|
|
21
|
+
[types.ts:200](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L200)
|
|
22
|
+
|
|
23
|
+
___
|
|
24
|
+
|
|
25
|
+
### BuildStart
|
|
26
|
+
|
|
27
|
+
• **BuildStart**
|
|
28
|
+
|
|
29
|
+
#### Defined in
|
|
30
|
+
|
|
31
|
+
[types.ts:199](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L199)
|
|
32
|
+
|
|
33
|
+
___
|
|
34
|
+
|
|
35
|
+
### HmrEvent
|
|
36
|
+
|
|
37
|
+
• **HmrEvent**
|
|
38
|
+
|
|
39
|
+
#### Defined in
|
|
40
|
+
|
|
41
|
+
[types.ts:201](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L201)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Function: createServer
|
|
2
|
+
|
|
3
|
+
▸ **createServer**(`config`): `Promise`<{ `instance`: `FastifyInstance`<`Server`, `IncomingMessage`, `ServerResponse`, `FastifyLoggerInstance`\> & `PromiseLike`<`FastifyInstance`<`Server`, `IncomingMessage`, `ServerResponse`, `FastifyLoggerInstance`\>\> ; `start`: () => `Promise`<`void`\> ; `stop`: () => `Promise`<`void`\> }\>
|
|
4
|
+
|
|
5
|
+
Create instance of development server, powered by Fastify.
|
|
6
|
+
|
|
7
|
+
#### Parameters
|
|
8
|
+
|
|
9
|
+
| Name | Type | Description |
|
|
10
|
+
| :------ | :------ | :------ |
|
|
11
|
+
| `config` | [`Config`](../interfaces/Server.Config.md) | Server configuration. |
|
|
12
|
+
|
|
13
|
+
#### Returns
|
|
14
|
+
|
|
15
|
+
`Promise`<{ `instance`: `FastifyInstance`<`Server`, `IncomingMessage`, `ServerResponse`, `FastifyLoggerInstance`\> & `PromiseLike`<`FastifyInstance`<`Server`, `IncomingMessage`, `ServerResponse`, `FastifyLoggerInstance`\>\> ; `start`: () => `Promise`<`void`\> ; `stop`: () => `Promise`<`void`\> }\>
|
|
16
|
+
|
|
17
|
+
`start` and `stop` functions as well as an underlying Fastify `instance`.
|
|
18
|
+
|
|
19
|
+
#### Defined in
|
|
20
|
+
|
|
21
|
+
[createServer.ts:21](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/createServer.ts#L21)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Interface: CodeFrame
|
|
2
|
+
|
|
3
|
+
Represents [@babel/core-frame](https://babeljs.io/docs/en/babel-code-frame).
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Properties
|
|
8
|
+
|
|
9
|
+
- [content](CodeFrame.md#content)
|
|
10
|
+
- [fileName](CodeFrame.md#filename)
|
|
11
|
+
- [location](CodeFrame.md#location)
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### content
|
|
16
|
+
|
|
17
|
+
• **content**: `string`
|
|
18
|
+
|
|
19
|
+
#### Defined in
|
|
20
|
+
|
|
21
|
+
[plugins/symbolicate/types.ts:29](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/symbolicate/types.ts#L29)
|
|
22
|
+
|
|
23
|
+
___
|
|
24
|
+
|
|
25
|
+
### fileName
|
|
26
|
+
|
|
27
|
+
• **fileName**: `string`
|
|
28
|
+
|
|
29
|
+
#### Defined in
|
|
30
|
+
|
|
31
|
+
[plugins/symbolicate/types.ts:34](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/symbolicate/types.ts#L34)
|
|
32
|
+
|
|
33
|
+
___
|
|
34
|
+
|
|
35
|
+
### location
|
|
36
|
+
|
|
37
|
+
• **location**: `Object`
|
|
38
|
+
|
|
39
|
+
#### Type declaration
|
|
40
|
+
|
|
41
|
+
| Name | Type |
|
|
42
|
+
| :------ | :------ |
|
|
43
|
+
| `column` | `number` |
|
|
44
|
+
| `row` | `number` |
|
|
45
|
+
|
|
46
|
+
#### Defined in
|
|
47
|
+
|
|
48
|
+
[plugins/symbolicate/types.ts:30](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/symbolicate/types.ts#L30)
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Interface: CompilerDelegate
|
|
2
|
+
|
|
3
|
+
Delegate with implementation for compiler-specific functions.
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Methods
|
|
8
|
+
|
|
9
|
+
- [getAsset](CompilerDelegate.md#getasset)
|
|
10
|
+
- [getMimeType](CompilerDelegate.md#getmimetype)
|
|
11
|
+
- [inferPlatform](CompilerDelegate.md#inferplatform)
|
|
12
|
+
|
|
13
|
+
## Methods
|
|
14
|
+
|
|
15
|
+
### getAsset
|
|
16
|
+
|
|
17
|
+
▸ **getAsset**(`filename`, `platform`, `sendProgress?`): `Promise`<`string` \| `Buffer`\>
|
|
18
|
+
|
|
19
|
+
Get compiled asset content.
|
|
20
|
+
|
|
21
|
+
If the compilation is in progress, it should wait until compilation finishes and then return the asset.
|
|
22
|
+
|
|
23
|
+
#### Parameters
|
|
24
|
+
|
|
25
|
+
| Name | Type | Description |
|
|
26
|
+
| :------ | :------ | :------ |
|
|
27
|
+
| `filename` | `string` | Filename of the asset to get. |
|
|
28
|
+
| `platform` | `string` | Platform of the asset to get. |
|
|
29
|
+
| `sendProgress?` | [`SendProgress`](../types/SendProgress.md) | Function to notify the client who requested the asset about compilation progress. |
|
|
30
|
+
|
|
31
|
+
#### Returns
|
|
32
|
+
|
|
33
|
+
`Promise`<`string` \| `Buffer`\>
|
|
34
|
+
|
|
35
|
+
#### Defined in
|
|
36
|
+
|
|
37
|
+
[plugins/compiler/types.ts:16](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/compiler/types.ts#L16)
|
|
38
|
+
|
|
39
|
+
___
|
|
40
|
+
|
|
41
|
+
### getMimeType
|
|
42
|
+
|
|
43
|
+
▸ **getMimeType**(`filename`, `platform`, `data`): `string`
|
|
44
|
+
|
|
45
|
+
Detect MIME type of the asset from `filename`, `platform` or `data` (or from combination of either).
|
|
46
|
+
|
|
47
|
+
#### Parameters
|
|
48
|
+
|
|
49
|
+
| Name | Type | Description |
|
|
50
|
+
| :------ | :------ | :------ |
|
|
51
|
+
| `filename` | `string` | Filename of the asset. |
|
|
52
|
+
| `platform` | `string` | Platform of the asset. |
|
|
53
|
+
| `data` | `string` \| `Buffer` | Asset's content. |
|
|
54
|
+
|
|
55
|
+
#### Returns
|
|
56
|
+
|
|
57
|
+
`string`
|
|
58
|
+
|
|
59
|
+
#### Defined in
|
|
60
|
+
|
|
61
|
+
[plugins/compiler/types.ts:29](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/compiler/types.ts#L29)
|
|
62
|
+
|
|
63
|
+
___
|
|
64
|
+
|
|
65
|
+
### inferPlatform
|
|
66
|
+
|
|
67
|
+
▸ `Optional` **inferPlatform**(`uri`): `undefined` \| `string`
|
|
68
|
+
|
|
69
|
+
Detect the platform from the URI - either from filename, query params or both.
|
|
70
|
+
|
|
71
|
+
#### Parameters
|
|
72
|
+
|
|
73
|
+
| Name | Type | Description |
|
|
74
|
+
| :------ | :------ | :------ |
|
|
75
|
+
| `uri` | `string` | URI string. |
|
|
76
|
+
|
|
77
|
+
#### Returns
|
|
78
|
+
|
|
79
|
+
`undefined` \| `string`
|
|
80
|
+
|
|
81
|
+
#### Defined in
|
|
82
|
+
|
|
83
|
+
[plugins/compiler/types.ts:40](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/compiler/types.ts#L40)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Interface: HmrDelegate
|
|
2
|
+
|
|
3
|
+
Delegate with implementation for HMR-specific functions.
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Methods
|
|
8
|
+
|
|
9
|
+
- [getUriPath](HmrDelegate.md#geturipath)
|
|
10
|
+
- [onClientConnected](HmrDelegate.md#onclientconnected)
|
|
11
|
+
|
|
12
|
+
## Methods
|
|
13
|
+
|
|
14
|
+
### getUriPath
|
|
15
|
+
|
|
16
|
+
▸ **getUriPath**(): `string`
|
|
17
|
+
|
|
18
|
+
Get URI under which HMR server will be running, e.g: `/hmr`
|
|
19
|
+
|
|
20
|
+
#### Returns
|
|
21
|
+
|
|
22
|
+
`string`
|
|
23
|
+
|
|
24
|
+
#### Defined in
|
|
25
|
+
|
|
26
|
+
[plugins/wss/types.ts:6](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/wss/types.ts#L6)
|
|
27
|
+
|
|
28
|
+
___
|
|
29
|
+
|
|
30
|
+
### onClientConnected
|
|
31
|
+
|
|
32
|
+
▸ **onClientConnected**(`platform`, `clientId`): `void`
|
|
33
|
+
|
|
34
|
+
Callback for when the new HMR client is connected.
|
|
35
|
+
|
|
36
|
+
Useful for running initial synchronization or any other side effect.
|
|
37
|
+
|
|
38
|
+
#### Parameters
|
|
39
|
+
|
|
40
|
+
| Name | Type | Description |
|
|
41
|
+
| :------ | :------ | :------ |
|
|
42
|
+
| `platform` | `string` | Platform of the connected client. |
|
|
43
|
+
| `clientId` | `string` | Id of the connected client. |
|
|
44
|
+
|
|
45
|
+
#### Returns
|
|
46
|
+
|
|
47
|
+
`void`
|
|
48
|
+
|
|
49
|
+
#### Defined in
|
|
50
|
+
|
|
51
|
+
[plugins/wss/types.ts:16](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/wss/types.ts#L16)
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Interface: InputStackFrame
|
|
2
|
+
|
|
3
|
+
React Native stack frame used as input when processing by {@link Symbolicator}.
|
|
4
|
+
|
|
5
|
+
## Hierarchy
|
|
6
|
+
|
|
7
|
+
- [`ReactNativeStackFrame`](ReactNativeStackFrame.md)
|
|
8
|
+
|
|
9
|
+
↳ **`InputStackFrame`**
|
|
10
|
+
|
|
11
|
+
↳↳ [`StackFrame`](StackFrame.md)
|
|
12
|
+
|
|
13
|
+
## Table of contents
|
|
14
|
+
|
|
15
|
+
### Properties
|
|
16
|
+
|
|
17
|
+
- [column](InputStackFrame.md#column)
|
|
18
|
+
- [file](InputStackFrame.md#file)
|
|
19
|
+
- [lineNumber](InputStackFrame.md#linenumber)
|
|
20
|
+
- [methodName](InputStackFrame.md#methodname)
|
|
21
|
+
|
|
22
|
+
## Properties
|
|
23
|
+
|
|
24
|
+
### column
|
|
25
|
+
|
|
26
|
+
• **column**: ``null`` \| `number`
|
|
27
|
+
|
|
28
|
+
#### Inherited from
|
|
29
|
+
|
|
30
|
+
[ReactNativeStackFrame](ReactNativeStackFrame.md).[column](ReactNativeStackFrame.md#column)
|
|
31
|
+
|
|
32
|
+
#### Defined in
|
|
33
|
+
|
|
34
|
+
[plugins/symbolicate/types.ts:6](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/symbolicate/types.ts#L6)
|
|
35
|
+
|
|
36
|
+
___
|
|
37
|
+
|
|
38
|
+
### file
|
|
39
|
+
|
|
40
|
+
• **file**: `string`
|
|
41
|
+
|
|
42
|
+
#### Overrides
|
|
43
|
+
|
|
44
|
+
[ReactNativeStackFrame](ReactNativeStackFrame.md).[file](ReactNativeStackFrame.md#file)
|
|
45
|
+
|
|
46
|
+
#### Defined in
|
|
47
|
+
|
|
48
|
+
[plugins/symbolicate/types.ts:15](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/symbolicate/types.ts#L15)
|
|
49
|
+
|
|
50
|
+
___
|
|
51
|
+
|
|
52
|
+
### lineNumber
|
|
53
|
+
|
|
54
|
+
• **lineNumber**: ``null`` \| `number`
|
|
55
|
+
|
|
56
|
+
#### Inherited from
|
|
57
|
+
|
|
58
|
+
[ReactNativeStackFrame](ReactNativeStackFrame.md).[lineNumber](ReactNativeStackFrame.md#linenumber)
|
|
59
|
+
|
|
60
|
+
#### Defined in
|
|
61
|
+
|
|
62
|
+
[plugins/symbolicate/types.ts:5](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/symbolicate/types.ts#L5)
|
|
63
|
+
|
|
64
|
+
___
|
|
65
|
+
|
|
66
|
+
### methodName
|
|
67
|
+
|
|
68
|
+
• **methodName**: `string`
|
|
69
|
+
|
|
70
|
+
#### Inherited from
|
|
71
|
+
|
|
72
|
+
[ReactNativeStackFrame](ReactNativeStackFrame.md).[methodName](ReactNativeStackFrame.md#methodname)
|
|
73
|
+
|
|
74
|
+
#### Defined in
|
|
75
|
+
|
|
76
|
+
[plugins/symbolicate/types.ts:8](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/symbolicate/types.ts#L8)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Interface: ProgressData
|
|
2
|
+
|
|
3
|
+
Representation of the compilation progress.
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Properties
|
|
8
|
+
|
|
9
|
+
- [completed](ProgressData.md#completed)
|
|
10
|
+
- [total](ProgressData.md#total)
|
|
11
|
+
|
|
12
|
+
## Properties
|
|
13
|
+
|
|
14
|
+
### completed
|
|
15
|
+
|
|
16
|
+
• **completed**: `number`
|
|
17
|
+
|
|
18
|
+
Number of modules built.
|
|
19
|
+
|
|
20
|
+
#### Defined in
|
|
21
|
+
|
|
22
|
+
[types.ts:178](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L178)
|
|
23
|
+
|
|
24
|
+
___
|
|
25
|
+
|
|
26
|
+
### total
|
|
27
|
+
|
|
28
|
+
• **total**: `number`
|
|
29
|
+
|
|
30
|
+
Total number of modules detect as part of compilation.
|
|
31
|
+
|
|
32
|
+
#### Defined in
|
|
33
|
+
|
|
34
|
+
[types.ts:181](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L181)
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Interface: ReactNativeStackFrame
|
|
2
|
+
|
|
3
|
+
Raw React Native stack frame.
|
|
4
|
+
|
|
5
|
+
## Hierarchy
|
|
6
|
+
|
|
7
|
+
- **`ReactNativeStackFrame`**
|
|
8
|
+
|
|
9
|
+
↳ [`InputStackFrame`](InputStackFrame.md)
|
|
10
|
+
|
|
11
|
+
## Table of contents
|
|
12
|
+
|
|
13
|
+
### Properties
|
|
14
|
+
|
|
15
|
+
- [column](ReactNativeStackFrame.md#column)
|
|
16
|
+
- [file](ReactNativeStackFrame.md#file)
|
|
17
|
+
- [lineNumber](ReactNativeStackFrame.md#linenumber)
|
|
18
|
+
- [methodName](ReactNativeStackFrame.md#methodname)
|
|
19
|
+
|
|
20
|
+
## Properties
|
|
21
|
+
|
|
22
|
+
### column
|
|
23
|
+
|
|
24
|
+
• **column**: ``null`` \| `number`
|
|
25
|
+
|
|
26
|
+
#### Defined in
|
|
27
|
+
|
|
28
|
+
[plugins/symbolicate/types.ts:6](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/symbolicate/types.ts#L6)
|
|
29
|
+
|
|
30
|
+
___
|
|
31
|
+
|
|
32
|
+
### file
|
|
33
|
+
|
|
34
|
+
• **file**: ``null`` \| `string`
|
|
35
|
+
|
|
36
|
+
#### Defined in
|
|
37
|
+
|
|
38
|
+
[plugins/symbolicate/types.ts:7](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/symbolicate/types.ts#L7)
|
|
39
|
+
|
|
40
|
+
___
|
|
41
|
+
|
|
42
|
+
### lineNumber
|
|
43
|
+
|
|
44
|
+
• **lineNumber**: ``null`` \| `number`
|
|
45
|
+
|
|
46
|
+
#### Defined in
|
|
47
|
+
|
|
48
|
+
[plugins/symbolicate/types.ts:5](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/symbolicate/types.ts#L5)
|
|
49
|
+
|
|
50
|
+
___
|
|
51
|
+
|
|
52
|
+
### methodName
|
|
53
|
+
|
|
54
|
+
• **methodName**: `string`
|
|
55
|
+
|
|
56
|
+
#### Defined in
|
|
57
|
+
|
|
58
|
+
[plugins/symbolicate/types.ts:8](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/symbolicate/types.ts#L8)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Interface: Asset
|
|
2
|
+
|
|
3
|
+
[Server](../modules/Server.md).[Api](../modules/Server.Api.md).Asset
|
|
4
|
+
|
|
5
|
+
A compilation asset representation for API clients.
|
|
6
|
+
|
|
7
|
+
## Indexable
|
|
8
|
+
|
|
9
|
+
▪ [key: `string`]: `any`
|
|
10
|
+
|
|
11
|
+
## Table of contents
|
|
12
|
+
|
|
13
|
+
### Properties
|
|
14
|
+
|
|
15
|
+
- [name](Server.Api.Asset.md#name)
|
|
16
|
+
- [size](Server.Api.Asset.md#size)
|
|
17
|
+
|
|
18
|
+
## Properties
|
|
19
|
+
|
|
20
|
+
### name
|
|
21
|
+
|
|
22
|
+
• **name**: `string`
|
|
23
|
+
|
|
24
|
+
#### Defined in
|
|
25
|
+
|
|
26
|
+
[types.ts:141](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L141)
|
|
27
|
+
|
|
28
|
+
___
|
|
29
|
+
|
|
30
|
+
### size
|
|
31
|
+
|
|
32
|
+
• **size**: `number`
|
|
33
|
+
|
|
34
|
+
#### Defined in
|
|
35
|
+
|
|
36
|
+
[types.ts:142](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L142)
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Interface: Delegate
|
|
2
|
+
|
|
3
|
+
[Server](../modules/Server.md).[Api](../modules/Server.Api.md).Delegate
|
|
4
|
+
|
|
5
|
+
Delegate with implementation for API endpoints.
|
|
6
|
+
|
|
7
|
+
## Table of contents
|
|
8
|
+
|
|
9
|
+
### Methods
|
|
10
|
+
|
|
11
|
+
- [getAssets](Server.Api.Delegate.md#getassets)
|
|
12
|
+
- [getCompilationStats](Server.Api.Delegate.md#getcompilationstats)
|
|
13
|
+
- [getPlatforms](Server.Api.Delegate.md#getplatforms)
|
|
14
|
+
|
|
15
|
+
## Methods
|
|
16
|
+
|
|
17
|
+
### getAssets
|
|
18
|
+
|
|
19
|
+
▸ **getAssets**(`platform`): `Promise`<[`Asset`](Server.Api.Asset.md)[]\>
|
|
20
|
+
|
|
21
|
+
Get all assets from compilation for given platform.
|
|
22
|
+
Should return `[]` if the compilation does not exists for given platform.
|
|
23
|
+
|
|
24
|
+
#### Parameters
|
|
25
|
+
|
|
26
|
+
| Name | Type |
|
|
27
|
+
| :------ | :------ |
|
|
28
|
+
| `platform` | `string` |
|
|
29
|
+
|
|
30
|
+
#### Returns
|
|
31
|
+
|
|
32
|
+
`Promise`<[`Asset`](Server.Api.Asset.md)[]\>
|
|
33
|
+
|
|
34
|
+
#### Defined in
|
|
35
|
+
|
|
36
|
+
[types.ts:162](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L162)
|
|
37
|
+
|
|
38
|
+
___
|
|
39
|
+
|
|
40
|
+
### getCompilationStats
|
|
41
|
+
|
|
42
|
+
▸ **getCompilationStats**(`platform`): `Promise`<``null`` \| [`CompilationStats`](Server.Api.CompilationStats.md)\>
|
|
43
|
+
|
|
44
|
+
Get compilation stats for a given platform.
|
|
45
|
+
Should return `null` if the compilation does not exists for given platform.
|
|
46
|
+
|
|
47
|
+
#### Parameters
|
|
48
|
+
|
|
49
|
+
| Name | Type |
|
|
50
|
+
| :------ | :------ |
|
|
51
|
+
| `platform` | `string` |
|
|
52
|
+
|
|
53
|
+
#### Returns
|
|
54
|
+
|
|
55
|
+
`Promise`<``null`` \| [`CompilationStats`](Server.Api.CompilationStats.md)\>
|
|
56
|
+
|
|
57
|
+
#### Defined in
|
|
58
|
+
|
|
59
|
+
[types.ts:168](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L168)
|
|
60
|
+
|
|
61
|
+
___
|
|
62
|
+
|
|
63
|
+
### getPlatforms
|
|
64
|
+
|
|
65
|
+
▸ **getPlatforms**(): `Promise`<`string`[]\>
|
|
66
|
+
|
|
67
|
+
Get all platforms - either with already existing compilations or all supported platforms.
|
|
68
|
+
|
|
69
|
+
#### Returns
|
|
70
|
+
|
|
71
|
+
`Promise`<`string`[]\>
|
|
72
|
+
|
|
73
|
+
#### Defined in
|
|
74
|
+
|
|
75
|
+
[types.ts:156](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L156)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Interface: Config
|
|
2
|
+
|
|
3
|
+
[Server](../modules/Server.md).Config
|
|
4
|
+
|
|
5
|
+
Development server configuration.
|
|
6
|
+
|
|
7
|
+
## Table of contents
|
|
8
|
+
|
|
9
|
+
### Properties
|
|
10
|
+
|
|
11
|
+
- [options](Server.Config.md#options)
|
|
12
|
+
|
|
13
|
+
### Methods
|
|
14
|
+
|
|
15
|
+
- [delegate](Server.Config.md#delegate)
|
|
16
|
+
|
|
17
|
+
## Properties
|
|
18
|
+
|
|
19
|
+
### options
|
|
20
|
+
|
|
21
|
+
• **options**: [`Options`](Server.Options.md)
|
|
22
|
+
|
|
23
|
+
Development server options to configure e.g: `port`, `host` etc.
|
|
24
|
+
|
|
25
|
+
#### Defined in
|
|
26
|
+
|
|
27
|
+
[types.ts:21](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L21)
|
|
28
|
+
|
|
29
|
+
## Methods
|
|
30
|
+
|
|
31
|
+
### delegate
|
|
32
|
+
|
|
33
|
+
▸ **delegate**(`context`): [`Delegate`](Server.Delegate.md)
|
|
34
|
+
|
|
35
|
+
Function to create a delegate, which implements crucial functionalities.
|
|
36
|
+
|
|
37
|
+
#### Parameters
|
|
38
|
+
|
|
39
|
+
| Name | Type |
|
|
40
|
+
| :------ | :------ |
|
|
41
|
+
| `context` | [`DelegateContext`](Server.DelegateContext.md) |
|
|
42
|
+
|
|
43
|
+
#### Returns
|
|
44
|
+
|
|
45
|
+
[`Delegate`](Server.Delegate.md)
|
|
46
|
+
|
|
47
|
+
#### Defined in
|
|
48
|
+
|
|
49
|
+
[types.ts:24](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L24)
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Interface: Delegate
|
|
2
|
+
|
|
3
|
+
[Server](../modules/Server.md).Delegate
|
|
4
|
+
|
|
5
|
+
A complete delegate with implementations for all server functionalities.
|
|
6
|
+
|
|
7
|
+
## Table of contents
|
|
8
|
+
|
|
9
|
+
### Properties
|
|
10
|
+
|
|
11
|
+
- [api](Server.Delegate.md#api)
|
|
12
|
+
- [compiler](Server.Delegate.md#compiler)
|
|
13
|
+
- [hmr](Server.Delegate.md#hmr)
|
|
14
|
+
- [logger](Server.Delegate.md#logger)
|
|
15
|
+
- [messages](Server.Delegate.md#messages)
|
|
16
|
+
- [symbolicator](Server.Delegate.md#symbolicator)
|
|
17
|
+
|
|
18
|
+
## Properties
|
|
19
|
+
|
|
20
|
+
### api
|
|
21
|
+
|
|
22
|
+
• `Optional` **api**: [`Delegate`](Server.Api.Delegate.md)
|
|
23
|
+
|
|
24
|
+
An API delegate.
|
|
25
|
+
|
|
26
|
+
#### Defined in
|
|
27
|
+
|
|
28
|
+
[types.ts:71](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L71)
|
|
29
|
+
|
|
30
|
+
___
|
|
31
|
+
|
|
32
|
+
### compiler
|
|
33
|
+
|
|
34
|
+
• **compiler**: [`CompilerDelegate`](CompilerDelegate.md)
|
|
35
|
+
|
|
36
|
+
A compiler delegate.
|
|
37
|
+
|
|
38
|
+
#### Defined in
|
|
39
|
+
|
|
40
|
+
[types.ts:56](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L56)
|
|
41
|
+
|
|
42
|
+
___
|
|
43
|
+
|
|
44
|
+
### hmr
|
|
45
|
+
|
|
46
|
+
• **hmr**: [`HmrDelegate`](HmrDelegate.md)
|
|
47
|
+
|
|
48
|
+
An HMR delegate.
|
|
49
|
+
|
|
50
|
+
#### Defined in
|
|
51
|
+
|
|
52
|
+
[types.ts:65](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L65)
|
|
53
|
+
|
|
54
|
+
___
|
|
55
|
+
|
|
56
|
+
### logger
|
|
57
|
+
|
|
58
|
+
• **logger**: [`LoggerDelegate`](Server.LoggerDelegate.md)
|
|
59
|
+
|
|
60
|
+
A logger delegate.
|
|
61
|
+
|
|
62
|
+
#### Defined in
|
|
63
|
+
|
|
64
|
+
[types.ts:62](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L62)
|
|
65
|
+
|
|
66
|
+
___
|
|
67
|
+
|
|
68
|
+
### messages
|
|
69
|
+
|
|
70
|
+
• **messages**: [`MessagesDelegate`](Server.MessagesDelegate.md)
|
|
71
|
+
|
|
72
|
+
An messages delegate.
|
|
73
|
+
|
|
74
|
+
#### Defined in
|
|
75
|
+
|
|
76
|
+
[types.ts:68](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L68)
|
|
77
|
+
|
|
78
|
+
___
|
|
79
|
+
|
|
80
|
+
### symbolicator
|
|
81
|
+
|
|
82
|
+
• **symbolicator**: [`SymbolicatorDelegate`](SymbolicatorDelegate.md)
|
|
83
|
+
|
|
84
|
+
A symbolicator delegate.
|
|
85
|
+
|
|
86
|
+
#### Defined in
|
|
87
|
+
|
|
88
|
+
[types.ts:59](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L59)
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Interface: DelegateContext
|
|
2
|
+
|
|
3
|
+
[Server](../modules/Server.md).DelegateContext
|
|
4
|
+
|
|
5
|
+
A delegate context used in `delegate` builder in [Config](Server.Config.md).
|
|
6
|
+
|
|
7
|
+
Allows to emit logs, notify about compilation events and broadcast events to connected clients.
|
|
8
|
+
|
|
9
|
+
## Table of contents
|
|
10
|
+
|
|
11
|
+
### Properties
|
|
12
|
+
|
|
13
|
+
- [log](Server.DelegateContext.md#log)
|
|
14
|
+
|
|
15
|
+
### Methods
|
|
16
|
+
|
|
17
|
+
- [broadcastToHmrClients](Server.DelegateContext.md#broadcasttohmrclients)
|
|
18
|
+
- [broadcastToMessageClients](Server.DelegateContext.md#broadcasttomessageclients)
|
|
19
|
+
- [notifyBuildEnd](Server.DelegateContext.md#notifybuildend)
|
|
20
|
+
- [notifyBuildStart](Server.DelegateContext.md#notifybuildstart)
|
|
21
|
+
|
|
22
|
+
## Properties
|
|
23
|
+
|
|
24
|
+
### log
|
|
25
|
+
|
|
26
|
+
• **log**: `FastifyLoggerInstance`
|
|
27
|
+
|
|
28
|
+
A logger instance, useful for emitting logs from the delegate.
|
|
29
|
+
|
|
30
|
+
#### Defined in
|
|
31
|
+
|
|
32
|
+
[types.ts:81](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L81)
|
|
33
|
+
|
|
34
|
+
## Methods
|
|
35
|
+
|
|
36
|
+
### broadcastToHmrClients
|
|
37
|
+
|
|
38
|
+
▸ **broadcastToHmrClients**<`E`\>(`event`, `platform`, `clientIds?`): `void`
|
|
39
|
+
|
|
40
|
+
Broadcast arbitrary event to all connected HMR clients for given `platform`.
|
|
41
|
+
|
|
42
|
+
#### Type parameters
|
|
43
|
+
|
|
44
|
+
| Name | Type |
|
|
45
|
+
| :------ | :------ |
|
|
46
|
+
| `E` | `any` |
|
|
47
|
+
|
|
48
|
+
#### Parameters
|
|
49
|
+
|
|
50
|
+
| Name | Type | Description |
|
|
51
|
+
| :------ | :------ | :------ |
|
|
52
|
+
| `event` | `E` | Arbitrary event to broadcast. |
|
|
53
|
+
| `platform` | `string` | Platform of the clients to which broadcast should be sent. |
|
|
54
|
+
| `clientIds?` | `string`[] | Ids of the client to which broadcast should be sent. If `undefined` the broadcast will be sent to all connected clients for the given `platform`. |
|
|
55
|
+
|
|
56
|
+
#### Returns
|
|
57
|
+
|
|
58
|
+
`void`
|
|
59
|
+
|
|
60
|
+
#### Defined in
|
|
61
|
+
|
|
62
|
+
[types.ts:97](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L97)
|
|
63
|
+
|
|
64
|
+
___
|
|
65
|
+
|
|
66
|
+
### broadcastToMessageClients
|
|
67
|
+
|
|
68
|
+
▸ **broadcastToMessageClients**<`E`\>(`event`): `void`
|
|
69
|
+
|
|
70
|
+
Broadcast arbitrary method-like event to all connected message clients.
|
|
71
|
+
|
|
72
|
+
#### Type parameters
|
|
73
|
+
|
|
74
|
+
| Name | Type |
|
|
75
|
+
| :------ | :------ |
|
|
76
|
+
| `E` | extends `Object` |
|
|
77
|
+
|
|
78
|
+
#### Parameters
|
|
79
|
+
|
|
80
|
+
| Name | Type | Description |
|
|
81
|
+
| :------ | :------ | :------ |
|
|
82
|
+
| `event` | `E` | Arbitrary method-like event to broadcast. |
|
|
83
|
+
|
|
84
|
+
#### Returns
|
|
85
|
+
|
|
86
|
+
`void`
|
|
87
|
+
|
|
88
|
+
#### Defined in
|
|
89
|
+
|
|
90
|
+
[types.ts:108](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L108)
|
|
91
|
+
|
|
92
|
+
___
|
|
93
|
+
|
|
94
|
+
### notifyBuildEnd
|
|
95
|
+
|
|
96
|
+
▸ **notifyBuildEnd**(`platform`): `void`
|
|
97
|
+
|
|
98
|
+
Send notification about compilation end for given `platform`.
|
|
99
|
+
|
|
100
|
+
#### Parameters
|
|
101
|
+
|
|
102
|
+
| Name | Type |
|
|
103
|
+
| :------ | :------ |
|
|
104
|
+
| `platform` | `string` |
|
|
105
|
+
|
|
106
|
+
#### Returns
|
|
107
|
+
|
|
108
|
+
`void`
|
|
109
|
+
|
|
110
|
+
#### Defined in
|
|
111
|
+
|
|
112
|
+
[types.ts:87](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L87)
|
|
113
|
+
|
|
114
|
+
___
|
|
115
|
+
|
|
116
|
+
### notifyBuildStart
|
|
117
|
+
|
|
118
|
+
▸ **notifyBuildStart**(`platform`): `void`
|
|
119
|
+
|
|
120
|
+
Send notification about compilation start for given `platform`.
|
|
121
|
+
|
|
122
|
+
#### Parameters
|
|
123
|
+
|
|
124
|
+
| Name | Type |
|
|
125
|
+
| :------ | :------ |
|
|
126
|
+
| `platform` | `string` |
|
|
127
|
+
|
|
128
|
+
#### Returns
|
|
129
|
+
|
|
130
|
+
`void`
|
|
131
|
+
|
|
132
|
+
#### Defined in
|
|
133
|
+
|
|
134
|
+
[types.ts:84](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L84)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Interface: LoggerDelegate
|
|
2
|
+
|
|
3
|
+
[Server](../modules/Server.md).LoggerDelegate
|
|
4
|
+
|
|
5
|
+
Delegate with implementation for logging functions.
|
|
6
|
+
|
|
7
|
+
## Table of contents
|
|
8
|
+
|
|
9
|
+
### Methods
|
|
10
|
+
|
|
11
|
+
- [onMessage](Server.LoggerDelegate.md#onmessage)
|
|
12
|
+
|
|
13
|
+
## Methods
|
|
14
|
+
|
|
15
|
+
### onMessage
|
|
16
|
+
|
|
17
|
+
▸ **onMessage**(`log`): `void`
|
|
18
|
+
|
|
19
|
+
Callback for when a new log is emitted.
|
|
20
|
+
|
|
21
|
+
#### Parameters
|
|
22
|
+
|
|
23
|
+
| Name | Type | Description |
|
|
24
|
+
| :------ | :------ | :------ |
|
|
25
|
+
| `log` | `any` | An object with log data. |
|
|
26
|
+
|
|
27
|
+
#### Returns
|
|
28
|
+
|
|
29
|
+
`void`
|
|
30
|
+
|
|
31
|
+
#### Defined in
|
|
32
|
+
|
|
33
|
+
[types.ts:124](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L124)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Interface: MessagesDelegate
|
|
2
|
+
|
|
3
|
+
[Server](../modules/Server.md).MessagesDelegate
|
|
4
|
+
|
|
5
|
+
Delegate with implementation for messages used in route handlers.
|
|
6
|
+
|
|
7
|
+
## Table of contents
|
|
8
|
+
|
|
9
|
+
### Methods
|
|
10
|
+
|
|
11
|
+
- [getHello](Server.MessagesDelegate.md#gethello)
|
|
12
|
+
- [getStatus](Server.MessagesDelegate.md#getstatus)
|
|
13
|
+
|
|
14
|
+
## Methods
|
|
15
|
+
|
|
16
|
+
### getHello
|
|
17
|
+
|
|
18
|
+
▸ **getHello**(): `string`
|
|
19
|
+
|
|
20
|
+
Get message to send as a reply for `GET /` route.
|
|
21
|
+
|
|
22
|
+
#### Returns
|
|
23
|
+
|
|
24
|
+
`string`
|
|
25
|
+
|
|
26
|
+
#### Defined in
|
|
27
|
+
|
|
28
|
+
[types.ts:132](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L132)
|
|
29
|
+
|
|
30
|
+
___
|
|
31
|
+
|
|
32
|
+
### getStatus
|
|
33
|
+
|
|
34
|
+
▸ **getStatus**(): `string`
|
|
35
|
+
|
|
36
|
+
Get message to send as a reply for `GET /status` route.
|
|
37
|
+
|
|
38
|
+
#### Returns
|
|
39
|
+
|
|
40
|
+
`string`
|
|
41
|
+
|
|
42
|
+
#### Defined in
|
|
43
|
+
|
|
44
|
+
[types.ts:135](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L135)
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Interface: Options
|
|
2
|
+
|
|
3
|
+
[Server](../modules/Server.md).Options
|
|
4
|
+
|
|
5
|
+
Development server options.
|
|
6
|
+
|
|
7
|
+
## Table of contents
|
|
8
|
+
|
|
9
|
+
### Properties
|
|
10
|
+
|
|
11
|
+
- [host](Server.Options.md#host)
|
|
12
|
+
- [https](Server.Options.md#https)
|
|
13
|
+
- [port](Server.Options.md#port)
|
|
14
|
+
- [rootDir](Server.Options.md#rootdir)
|
|
15
|
+
|
|
16
|
+
## Properties
|
|
17
|
+
|
|
18
|
+
### host
|
|
19
|
+
|
|
20
|
+
• `Optional` **host**: `string`
|
|
21
|
+
|
|
22
|
+
Hostname or IP address under which to run the development server.
|
|
23
|
+
When left unspecified, it will listen on all available network interfaces, similarly to listening on '0.0.0.0'.
|
|
24
|
+
|
|
25
|
+
#### Defined in
|
|
26
|
+
|
|
27
|
+
[types.ts:39](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L39)
|
|
28
|
+
|
|
29
|
+
___
|
|
30
|
+
|
|
31
|
+
### https
|
|
32
|
+
|
|
33
|
+
• `Optional` **https**: `Object`
|
|
34
|
+
|
|
35
|
+
Options for running the server as HTTPS. If `undefined`, the server will run as HTTP.
|
|
36
|
+
|
|
37
|
+
#### Type declaration
|
|
38
|
+
|
|
39
|
+
| Name | Type | Description |
|
|
40
|
+
| :------ | :------ | :------ |
|
|
41
|
+
| `cert?` | `string` | Path to certificate when running server as HTTPS. |
|
|
42
|
+
| `key?` | `string` | Path to certificate key when running server as HTTPS. |
|
|
43
|
+
|
|
44
|
+
#### Defined in
|
|
45
|
+
|
|
46
|
+
[types.ts:42](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L42)
|
|
47
|
+
|
|
48
|
+
___
|
|
49
|
+
|
|
50
|
+
### port
|
|
51
|
+
|
|
52
|
+
• **port**: `number`
|
|
53
|
+
|
|
54
|
+
Port under which to run the development server.
|
|
55
|
+
|
|
56
|
+
#### Defined in
|
|
57
|
+
|
|
58
|
+
[types.ts:33](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L33)
|
|
59
|
+
|
|
60
|
+
___
|
|
61
|
+
|
|
62
|
+
### rootDir
|
|
63
|
+
|
|
64
|
+
• **rootDir**: `string`
|
|
65
|
+
|
|
66
|
+
Root directory of the project.
|
|
67
|
+
|
|
68
|
+
#### Defined in
|
|
69
|
+
|
|
70
|
+
[types.ts:30](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L30)
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Interface: StackFrame
|
|
2
|
+
|
|
3
|
+
Final symbolicated stack frame.
|
|
4
|
+
|
|
5
|
+
## Hierarchy
|
|
6
|
+
|
|
7
|
+
- [`InputStackFrame`](InputStackFrame.md)
|
|
8
|
+
|
|
9
|
+
↳ **`StackFrame`**
|
|
10
|
+
|
|
11
|
+
## Table of contents
|
|
12
|
+
|
|
13
|
+
### Properties
|
|
14
|
+
|
|
15
|
+
- [collapse](StackFrame.md#collapse)
|
|
16
|
+
- [column](StackFrame.md#column)
|
|
17
|
+
- [file](StackFrame.md#file)
|
|
18
|
+
- [lineNumber](StackFrame.md#linenumber)
|
|
19
|
+
- [methodName](StackFrame.md#methodname)
|
|
20
|
+
|
|
21
|
+
## Properties
|
|
22
|
+
|
|
23
|
+
### collapse
|
|
24
|
+
|
|
25
|
+
• **collapse**: `boolean`
|
|
26
|
+
|
|
27
|
+
#### Defined in
|
|
28
|
+
|
|
29
|
+
[plugins/symbolicate/types.ts:22](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/symbolicate/types.ts#L22)
|
|
30
|
+
|
|
31
|
+
___
|
|
32
|
+
|
|
33
|
+
### column
|
|
34
|
+
|
|
35
|
+
• **column**: ``null`` \| `number`
|
|
36
|
+
|
|
37
|
+
#### Inherited from
|
|
38
|
+
|
|
39
|
+
[InputStackFrame](InputStackFrame.md).[column](InputStackFrame.md#column)
|
|
40
|
+
|
|
41
|
+
#### Defined in
|
|
42
|
+
|
|
43
|
+
[plugins/symbolicate/types.ts:6](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/symbolicate/types.ts#L6)
|
|
44
|
+
|
|
45
|
+
___
|
|
46
|
+
|
|
47
|
+
### file
|
|
48
|
+
|
|
49
|
+
• **file**: `string`
|
|
50
|
+
|
|
51
|
+
#### Inherited from
|
|
52
|
+
|
|
53
|
+
[InputStackFrame](InputStackFrame.md).[file](InputStackFrame.md#file)
|
|
54
|
+
|
|
55
|
+
#### Defined in
|
|
56
|
+
|
|
57
|
+
[plugins/symbolicate/types.ts:15](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/symbolicate/types.ts#L15)
|
|
58
|
+
|
|
59
|
+
___
|
|
60
|
+
|
|
61
|
+
### lineNumber
|
|
62
|
+
|
|
63
|
+
• **lineNumber**: ``null`` \| `number`
|
|
64
|
+
|
|
65
|
+
#### Inherited from
|
|
66
|
+
|
|
67
|
+
[InputStackFrame](InputStackFrame.md).[lineNumber](InputStackFrame.md#linenumber)
|
|
68
|
+
|
|
69
|
+
#### Defined in
|
|
70
|
+
|
|
71
|
+
[plugins/symbolicate/types.ts:5](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/symbolicate/types.ts#L5)
|
|
72
|
+
|
|
73
|
+
___
|
|
74
|
+
|
|
75
|
+
### methodName
|
|
76
|
+
|
|
77
|
+
• **methodName**: `string`
|
|
78
|
+
|
|
79
|
+
#### Inherited from
|
|
80
|
+
|
|
81
|
+
[InputStackFrame](InputStackFrame.md).[methodName](InputStackFrame.md#methodname)
|
|
82
|
+
|
|
83
|
+
#### Defined in
|
|
84
|
+
|
|
85
|
+
[plugins/symbolicate/types.ts:8](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/symbolicate/types.ts#L8)
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Interface: SymbolicatorDelegate
|
|
2
|
+
|
|
3
|
+
Delegate with implementation for symbolication functions.
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Methods
|
|
8
|
+
|
|
9
|
+
- [getSource](SymbolicatorDelegate.md#getsource)
|
|
10
|
+
- [getSourceMap](SymbolicatorDelegate.md#getsourcemap)
|
|
11
|
+
- [shouldIncludeFrame](SymbolicatorDelegate.md#shouldincludeframe)
|
|
12
|
+
|
|
13
|
+
## Methods
|
|
14
|
+
|
|
15
|
+
### getSource
|
|
16
|
+
|
|
17
|
+
▸ **getSource**(`fileUrl`): `Promise`<`string` \| `Buffer`\>
|
|
18
|
+
|
|
19
|
+
Get source code of file in the URL.
|
|
20
|
+
|
|
21
|
+
#### Parameters
|
|
22
|
+
|
|
23
|
+
| Name | Type | Description |
|
|
24
|
+
| :------ | :------ | :------ |
|
|
25
|
+
| `fileUrl` | `string` | A full URL pointing to a file. |
|
|
26
|
+
|
|
27
|
+
#### Returns
|
|
28
|
+
|
|
29
|
+
`Promise`<`string` \| `Buffer`\>
|
|
30
|
+
|
|
31
|
+
#### Defined in
|
|
32
|
+
|
|
33
|
+
[plugins/symbolicate/types.ts:54](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/symbolicate/types.ts#L54)
|
|
34
|
+
|
|
35
|
+
___
|
|
36
|
+
|
|
37
|
+
### getSourceMap
|
|
38
|
+
|
|
39
|
+
▸ **getSourceMap**(`fileUrl`): `Promise`<`string` \| `Buffer`\>
|
|
40
|
+
|
|
41
|
+
Get source map for the file in the URL.
|
|
42
|
+
|
|
43
|
+
#### Parameters
|
|
44
|
+
|
|
45
|
+
| Name | Type | Description |
|
|
46
|
+
| :------ | :------ | :------ |
|
|
47
|
+
| `fileUrl` | `string` | A full (usually `http:`) URL pointing to a compiled file. The URL points to a file for which to return source map, not to the source map file itself, e.g: `http://localhost:8081/index.bundle?platform=ios`. |
|
|
48
|
+
|
|
49
|
+
#### Returns
|
|
50
|
+
|
|
51
|
+
`Promise`<`string` \| `Buffer`\>
|
|
52
|
+
|
|
53
|
+
#### Defined in
|
|
54
|
+
|
|
55
|
+
[plugins/symbolicate/types.ts:63](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/symbolicate/types.ts#L63)
|
|
56
|
+
|
|
57
|
+
___
|
|
58
|
+
|
|
59
|
+
### shouldIncludeFrame
|
|
60
|
+
|
|
61
|
+
▸ **shouldIncludeFrame**(`frame`): `boolean`
|
|
62
|
+
|
|
63
|
+
Check if given stack frame should be included in the new symbolicated stack.
|
|
64
|
+
|
|
65
|
+
#### Parameters
|
|
66
|
+
|
|
67
|
+
| Name | Type | Description |
|
|
68
|
+
| :------ | :------ | :------ |
|
|
69
|
+
| `frame` | [`StackFrame`](StackFrame.md) | Stack frame to check. |
|
|
70
|
+
|
|
71
|
+
#### Returns
|
|
72
|
+
|
|
73
|
+
`boolean`
|
|
74
|
+
|
|
75
|
+
#### Defined in
|
|
76
|
+
|
|
77
|
+
[plugins/symbolicate/types.ts:70](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/symbolicate/types.ts#L70)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Interface: SymbolicatorResults
|
|
2
|
+
|
|
3
|
+
Represents results of running {@link process} method on {@link Symbolicator} instance.
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Properties
|
|
8
|
+
|
|
9
|
+
- [codeFrame](SymbolicatorResults.md#codeframe)
|
|
10
|
+
- [stack](SymbolicatorResults.md#stack)
|
|
11
|
+
|
|
12
|
+
## Properties
|
|
13
|
+
|
|
14
|
+
### codeFrame
|
|
15
|
+
|
|
16
|
+
• **codeFrame**: ``null`` \| [`CodeFrame`](CodeFrame.md)
|
|
17
|
+
|
|
18
|
+
#### Defined in
|
|
19
|
+
|
|
20
|
+
[plugins/symbolicate/types.ts:41](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/symbolicate/types.ts#L41)
|
|
21
|
+
|
|
22
|
+
___
|
|
23
|
+
|
|
24
|
+
### stack
|
|
25
|
+
|
|
26
|
+
• **stack**: [`StackFrame`](StackFrame.md)[]
|
|
27
|
+
|
|
28
|
+
#### Defined in
|
|
29
|
+
|
|
30
|
+
[plugins/symbolicate/types.ts:42](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/plugins/symbolicate/types.ts#L42)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Namespace: Api
|
|
2
|
+
|
|
3
|
+
[Server](Server.md).Api
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Interfaces
|
|
8
|
+
|
|
9
|
+
- [Asset](../interfaces/Server.Api.Asset.md)
|
|
10
|
+
- [CompilationStats](../interfaces/Server.Api.CompilationStats.md)
|
|
11
|
+
- [Delegate](../interfaces/Server.Api.Delegate.md)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Namespace: Server
|
|
2
|
+
|
|
3
|
+
## Table of contents
|
|
4
|
+
|
|
5
|
+
### Namespaces
|
|
6
|
+
|
|
7
|
+
- [Api](Server.Api.md)
|
|
8
|
+
|
|
9
|
+
### Interfaces
|
|
10
|
+
|
|
11
|
+
- [Config](../interfaces/Server.Config.md)
|
|
12
|
+
- [Delegate](../interfaces/Server.Delegate.md)
|
|
13
|
+
- [DelegateContext](../interfaces/Server.DelegateContext.md)
|
|
14
|
+
- [LoggerDelegate](../interfaces/Server.LoggerDelegate.md)
|
|
15
|
+
- [MessagesDelegate](../interfaces/Server.MessagesDelegate.md)
|
|
16
|
+
- [Options](../interfaces/Server.Options.md)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Type alias: SendProgress
|
|
2
|
+
|
|
3
|
+
Ƭ **SendProgress**: (`data`: [`ProgressData`](../interfaces/ProgressData.md)) => `void`
|
|
4
|
+
|
|
5
|
+
#### Type declaration
|
|
6
|
+
|
|
7
|
+
▸ (`data`): `void`
|
|
8
|
+
|
|
9
|
+
Type representing a function to send the progress.
|
|
10
|
+
|
|
11
|
+
Used by [CompilerDelegate](../interfaces/CompilerDelegate.md) in `getAsset` function to send the compilation
|
|
12
|
+
progress to the client who requested the asset.
|
|
13
|
+
|
|
14
|
+
##### Parameters
|
|
15
|
+
|
|
16
|
+
| Name | Type |
|
|
17
|
+
| :------ | :------ |
|
|
18
|
+
| `data` | [`ProgressData`](../interfaces/ProgressData.md) |
|
|
19
|
+
|
|
20
|
+
##### Returns
|
|
21
|
+
|
|
22
|
+
`void`
|
|
23
|
+
|
|
24
|
+
#### Defined in
|
|
25
|
+
|
|
26
|
+
[types.ts:190](https://github.com/callstack/repack/blob/81f067f/packages/dev-server/src/types.ts#L190)
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@callstack/repack-dev-server",
|
|
3
3
|
"description": "A bundler-agnostic development server for React Native applications as part of @callstack/repack.",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.1",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@babel/code-frame": "^7.16.7",
|
|
49
|
-
"@callstack/repack-debugger-app": "^1.0.
|
|
49
|
+
"@callstack/repack-debugger-app": "^1.0.2",
|
|
50
50
|
"@fastify/sensible": "^4.1.0",
|
|
51
51
|
"@fastify/static": "^5.0.2",
|
|
52
|
-
"fastify": "^3.29.
|
|
52
|
+
"fastify": "^3.29.5",
|
|
53
53
|
"fastify-favicon": "^3.2.0",
|
|
54
54
|
"fastify-plugin": "^3.0.1",
|
|
55
55
|
"metro-inspector-proxy": "^0.71.0",
|