1
1
## @conjoon/extjs-dev-webmailsim ![ MIT] ( https://img.shields.io/npm/l/@conjoon/extjs-dev-webmailsim ) [ ![ npm version] ( https://badge.fury.io/js/@conjoon%2Fextjs-dev-webmailsim.svg )] ( https://badge.fury.io/js/@conjoon%2Fextjs-dev-webmailsim )
2
2
3
- This Sencha ExtJS NPM package contains mock data for development of [ conjoon/extjs-app-webmail] ( https://github.com/conjoon/extjs-app-webmail ) .
4
- When using this package, all backend requests of ` extjs-app-webmail ` will be replaced with mocks.
3
+ This Sencha Ext JS NPM package contains mock data for development of [ conjoon/extjs-app-webmail] ( https://github.com/conjoon/extjs-app-webmail ) .
4
+ When using this package, configured urls will be intercepted and static data is returned in
5
+ the responses.
5
6
6
7
## Installation
7
8
``` bash
@@ -18,11 +19,9 @@ Testing environment will then be available via
18
19
$ npm test
19
20
```
20
21
21
- For using the package as an external dependency in an application, use
22
- ``` bash
23
- $ npm install --save-prod @conjoon/extjs-dev-webmailsim
24
- ```
25
- In your ` app.json ` , add this package as a requirement, and make sure your ExtJS ` workspace.json `
22
+ For using the package as an external dependency in an application:
23
+ <br >
24
+ In your ` app.json ` , add this package as a requirement, and make sure your Ext JS ` workspace.json `
26
25
is properly configured to look up local repositories in the ` node_modules ` -directory.
27
26
28
27
Example (` workspace.json ` ) :
@@ -34,66 +33,32 @@ Example (`workspace.json`) :
34
33
}
35
34
}
36
35
```
37
- ## Usage
38
- Simply update the app.json of the ** conjoon** -application
39
- by specifying this package in the ` uses ` -property in either the ` development ` and/or ` prodution ` section:
36
+ Update the ` app.json ` of the application by specifying this package in the ` uses ` -property in
37
+ either the ` development ` and/or ` prodution ` section:
40
38
41
39
* Example:*
42
40
``` json
43
41
{
44
42
"development" : {
45
43
"uses" : [
46
- " extjs-app-webmail " ,
44
+ " extjs-dev-imapusersim " ,
47
45
" extjs-app-imapuser" ,
48
- " extjs-dev-webmailsim " ,
49
- " extjs-dev-imapusersim "
46
+ " extjs-app-webmail " ,
47
+ " extjs-dev-webmailsim "
50
48
]
51
49
},
52
50
"production" : {
53
51
"uses" : [
54
- " extjs-app-webmail " ,
55
- " extjs-app-imapuser "
52
+ " extjs-app-imapuser " ,
53
+ " extjs-app-webmail "
56
54
]
57
55
}
58
56
}
59
57
```
60
- In order to properly intercept outgoing requests to the services as described in ** conjoon/rest-api-description/rest-imap** ,
61
- the package needs to be configured with a regular expression representing the urls to catch.
62
- The package is pre-configured so that it catches urls in the form of ` https://php-ms-imapuser.ddev.site/rest-imap/api/v1/* ` .
63
- A custom configuration can be placed in the resources-folder of the application using the package.
64
58
65
- The following is a snapshot of the configuration and not guaranteed to work in future versions. It should be used as
66
- an example - consult the ` package.json ` for an up to date configuration.
67
- ``` json
68
- {
69
- "mailAccount" : {
70
- "url" : " https://php-ms-imapuser.ddev.site/rest-imap/api/v.*?/\/ MailAccounts(\/\\ d+)?" ,
71
- "enabled" : true ,
72
- "delay" : 250
73
- },
74
- "mailFolder" : {
75
- "url" : " https://php-ms-imapuser.ddev.site/rest-imap/api/v.*?/\/ MailAccounts\/ (.+)\/ MailFolders(\/ .*)?" ,
76
- "enabled" : true ,
77
- "delay" : 250
78
- },
79
- "attachment" : {
80
- "url" : " https://php-ms-imapuser.ddev.site/rest-imap/api/v.*?/\/ MailAccounts\/ (.+)\/ MailFolders\/ (.+)\/ MessageItems\/ (.+)\/ Attachments(\/ .*)?" ,
81
- "enabled" : true ,
82
- "delay" : 250
83
- },
84
- "messageItem" : {
85
- "url" : " https://php-ms-imapuser.ddev.site/rest-imap/api/v.*?/\/ MailAccounts\/ (.+)\/ MailFolders\/ (.+)\/ MessageItems(\/ .*)?" ,
86
- "enabled" : true ,
87
- "delay" : 250
88
- },
89
- "sendMessage" : {
90
- "url" : " https://php-ms-imapuser.ddev.site/rest-imap/api/v.*?/\/ SendMessage(\/\\ d+)?" ,
91
- "enabled" : true ,
92
- "delay" : 250
93
- }
94
- }
95
- ```
96
- If this package is used in your environment, intercepting urls can be enabled/disabled by changing the property ` enabled `
97
- to either ` true ` or ` false ` .
98
- <br >Please refer to the documentation of [ extjs-lib-core] ( https://github.com/coon-js/extjs-lib-core ) on how to
99
- create package-specific configurations.
59
+
60
+ ## Configuration and Usage
61
+ For more information on how to configure and use the package, refer to the [ documentation] ( ./docs/README.md ) .
62
+
63
+ ## Tests
64
+ Tests are written with [ Siesta] ( https://bryntum.com/siesta ) . Documentation can be found [ here] ( ./tests/README.md ) .
0 commit comments