@twilio/conversations 2.0.1-rc.5 → 2.0.1-rc.9
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 +33 -0
- package/{dist → builds}/browser.js +1 -1
- package/{dist → builds}/browser.js.map +0 -0
- package/{dist → builds}/lib.d.ts +0 -0
- package/{dist → builds}/lib.js +1 -1
- package/{dist → builds}/lib.js.map +0 -0
- package/{dist → builds}/twilio-conversations.js +8 -188
- package/{dist → builds}/twilio-conversations.min.js +2 -2
- package/dist/aggregated-delivery-receipt.js +227 -0
- package/dist/aggregated-delivery-receipt.js.map +1 -0
- package/dist/client.js +872 -0
- package/dist/client.js.map +1 -0
- package/dist/command-executor.js +203 -0
- package/dist/command-executor.js.map +1 -0
- package/dist/configuration.js +196 -0
- package/dist/configuration.js.map +1 -0
- package/dist/conversation.js +973 -0
- package/dist/conversation.js.map +1 -0
- package/dist/data/conversations.js +443 -0
- package/dist/data/conversations.js.map +1 -0
- package/dist/data/messages.js +341 -0
- package/dist/data/messages.js.map +1 -0
- package/dist/data/participants.js +313 -0
- package/dist/data/participants.js.map +1 -0
- package/dist/data/users.js +228 -0
- package/dist/data/users.js.map +1 -0
- package/dist/detailed-delivery-receipt.js +154 -0
- package/dist/detailed-delivery-receipt.js.map +1 -0
- package/dist/index.js +167 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/notification-types.js +143 -0
- package/dist/interfaces/notification-types.js.map +1 -0
- package/dist/logger.js +190 -0
- package/dist/logger.js.map +1 -0
- package/dist/media.js +213 -0
- package/dist/media.js.map +1 -0
- package/dist/message-builder.js +209 -0
- package/dist/message-builder.js.map +1 -0
- package/dist/message.js +450 -0
- package/dist/message.js.map +1 -0
- package/dist/node_modules/tslib/tslib.es6.js +161 -0
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/packages/conversations/package.json.js +136 -0
- package/dist/packages/conversations/package.json.js.map +1 -0
- package/dist/participant.js +346 -0
- package/dist/participant.js.map +1 -0
- package/dist/push-notification.js +152 -0
- package/dist/push-notification.js.map +1 -0
- package/dist/rest-paginator.js +175 -0
- package/dist/rest-paginator.js.map +1 -0
- package/dist/services/network.js +205 -0
- package/dist/services/network.js.map +1 -0
- package/dist/services/typing-indicator.js +235 -0
- package/dist/services/typing-indicator.js.map +1 -0
- package/dist/unsent-message.js +159 -0
- package/dist/unsent-message.js.map +1 -0
- package/dist/user.js +392 -0
- package/dist/user.js.map +1 -0
- package/dist/util/deferred.js +154 -0
- package/dist/util/deferred.js.map +1 -0
- package/dist/util/index.js +206 -0
- package/dist/util/index.js.map +1 -0
- package/{dist/docs → docs}/assets/css/main.css +0 -0
- package/{dist/docs → docs}/assets/images/icons.png +0 -0
- package/{dist/docs → docs}/assets/images/icons@2x.png +0 -0
- package/{dist/docs → docs}/assets/images/widgets.png +0 -0
- package/{dist/docs → docs}/assets/images/widgets@2x.png +0 -0
- package/{dist/docs → docs}/assets/js/main.js +0 -0
- package/{dist/docs → docs}/assets/js/search.js +0 -0
- package/{dist/docs → docs}/classes/AggregatedDeliveryReceipt.html +0 -0
- package/{dist/docs → docs}/classes/Client.html +0 -0
- package/{dist/docs → docs}/classes/Conversation.html +0 -0
- package/{dist/docs → docs}/classes/DetailedDeliveryReceipt.html +0 -0
- package/{dist/docs → docs}/classes/Media.html +0 -0
- package/{dist/docs → docs}/classes/Message.html +0 -0
- package/{dist/docs → docs}/classes/MessageBuilder.html +0 -0
- package/{dist/docs → docs}/classes/Participant.html +0 -0
- package/{dist/docs → docs}/classes/PushNotification.html +0 -0
- package/{dist/docs → docs}/classes/RestPaginator.html +0 -0
- package/{dist/docs → docs}/classes/UnsentMessage.html +0 -0
- package/{dist/docs → docs}/classes/User.html +0 -0
- package/{dist/docs → docs}/index.html +0 -0
- package/{dist/docs → docs}/interfaces/ClientOptions.html +0 -0
- package/{dist/docs → docs}/interfaces/ConversationState.html +0 -0
- package/{dist/docs → docs}/interfaces/CreateConversationOptions.html +0 -0
- package/{dist/docs → docs}/interfaces/LastMessage.html +0 -0
- package/{dist/docs → docs}/interfaces/Paginator.html +0 -0
- package/{dist/docs → docs}/interfaces/PushNotificationData.html +0 -0
- package/{dist/docs → docs}/interfaces/SendEmailOptions.html +0 -0
- package/{dist/docs → docs}/interfaces/SendMediaOptions.html +0 -0
- package/{dist/docs → docs}/modules.html +0 -0
- package/package.json +23 -24
- package/dist/post-install.js +0 -29
- package/dist/react-native.js +0 -4035
- package/dist/react-native.js.map +0 -1
@@ -0,0 +1,206 @@
|
|
1
|
+
/*
|
2
|
+
@license
|
3
|
+
The following license applies to all parts of this software except as
|
4
|
+
documented below.
|
5
|
+
|
6
|
+
Copyright (c) 2019, Twilio, inc.
|
7
|
+
All rights reserved.
|
8
|
+
|
9
|
+
Redistribution and use in source and binary forms, with or without
|
10
|
+
modification, are permitted provided that the following conditions are
|
11
|
+
met:
|
12
|
+
|
13
|
+
1. Redistributions of source code must retain the above copyright
|
14
|
+
notice, this list of conditions and the following disclaimer.
|
15
|
+
|
16
|
+
2. Redistributions in binary form must reproduce the above copyright
|
17
|
+
notice, this list of conditions and the following disclaimer in
|
18
|
+
the documentation and/or other materials provided with the
|
19
|
+
distribution.
|
20
|
+
|
21
|
+
3. Neither the name of Twilio nor the names of its contributors may
|
22
|
+
be used to endorse or promote products derived from this software
|
23
|
+
without specific prior written permission.
|
24
|
+
|
25
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
26
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
27
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
28
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
29
|
+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
30
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
31
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
32
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
33
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
34
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
35
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
36
|
+
|
37
|
+
This software includes javascript-state-machine under the following license.
|
38
|
+
|
39
|
+
Copyright (c) 2012, 2013, 2014, 2015, Jake Gordon and contributors
|
40
|
+
|
41
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
42
|
+
of this software and associated documentation files (the "Software"), to deal
|
43
|
+
in the Software without restriction, including without limitation the rights
|
44
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
45
|
+
copies of the Software, and to permit persons to whom the Software is
|
46
|
+
furnished to do so, subject to the following conditions:
|
47
|
+
|
48
|
+
The above copyright notice and this permission notice shall be included in all
|
49
|
+
copies or substantial portions of the Software.
|
50
|
+
|
51
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
52
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
53
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
54
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
55
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
56
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
57
|
+
|
58
|
+
This software includes loglevel under the following license.
|
59
|
+
|
60
|
+
Copyright (c) 2013 Tim Perry
|
61
|
+
|
62
|
+
Permission is hereby granted, free of charge, to any person
|
63
|
+
obtaining a copy of this software and associated documentation
|
64
|
+
files (the "Software"), to deal in the Software without
|
65
|
+
restriction, including without limitation the rights to use,
|
66
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
67
|
+
copies of the Software, and to permit persons to whom the
|
68
|
+
Software is furnished to do so, subject to the following
|
69
|
+
conditions:
|
70
|
+
|
71
|
+
The above copyright notice and this permission notice shall be
|
72
|
+
included in all copies or substantial portions of the Software.
|
73
|
+
|
74
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
75
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
76
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
77
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
78
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
79
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
80
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
81
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
82
|
+
|
83
|
+
This software includes q under the following license.
|
84
|
+
|
85
|
+
Copyright 2009–2014 Kristopher Michael Kowal. All rights reserved.
|
86
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
87
|
+
of this software and associated documentation files (the "Software"), to
|
88
|
+
deal in the Software without restriction, including without limitation the
|
89
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
90
|
+
sell copies of the Software, and to permit persons to whom the Software is
|
91
|
+
furnished to do so, subject to the following conditions:
|
92
|
+
|
93
|
+
The above copyright notice and this permission notice shall be included in
|
94
|
+
all copies or substantial portions of the Software.
|
95
|
+
|
96
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
97
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
98
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
99
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
100
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
101
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
102
|
+
IN THE SOFTWARE.
|
103
|
+
|
104
|
+
This software includes platform.js under the following license.
|
105
|
+
|
106
|
+
Copyright 2014 Benjamin Tan <https://d10.github.io/>
|
107
|
+
Copyright 2011-2015 John-David Dalton <http://allyoucanleet.com/>
|
108
|
+
|
109
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
110
|
+
a copy of this software and associated documentation files (the
|
111
|
+
"Software"), to deal in the Software without restriction, including
|
112
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
113
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
114
|
+
permit persons to whom the Software is furnished to do so, subject to
|
115
|
+
the following conditions:
|
116
|
+
|
117
|
+
The above copyright notice and this permission notice shall be
|
118
|
+
included in all copies or substantial portions of the Software.
|
119
|
+
|
120
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
121
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
122
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
123
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
124
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
125
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
126
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
127
|
+
|
128
|
+
*/
|
129
|
+
'use strict';
|
130
|
+
|
131
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
132
|
+
|
133
|
+
/**
|
134
|
+
* Deep-clone an object. Note that this does not work on object containing
|
135
|
+
* functions.
|
136
|
+
* @param {object} obj - the object to deep-clone
|
137
|
+
* @returns {object}
|
138
|
+
*/
|
139
|
+
function deepClone(obj) {
|
140
|
+
return JSON.parse(JSON.stringify(obj));
|
141
|
+
}
|
142
|
+
function parseToNumber(value) {
|
143
|
+
if (typeof value !== 'undefined' && !isNaN(Number(value))) {
|
144
|
+
return Number(value);
|
145
|
+
}
|
146
|
+
return null;
|
147
|
+
}
|
148
|
+
// timeString cannot be typed `string` because in member.ts
|
149
|
+
// call to parseTime(data.lastReadTimestamp) uses number not a string for timestamp.
|
150
|
+
function parseTime(timeString) {
|
151
|
+
try {
|
152
|
+
return new Date(timeString);
|
153
|
+
}
|
154
|
+
catch (e) {
|
155
|
+
return null;
|
156
|
+
}
|
157
|
+
}
|
158
|
+
function parseAttributes(rawAttributes, warningMessage, log) {
|
159
|
+
let attributes = {};
|
160
|
+
if (rawAttributes) {
|
161
|
+
try {
|
162
|
+
attributes = JSON.parse(rawAttributes);
|
163
|
+
}
|
164
|
+
catch (e) {
|
165
|
+
log.warn(warningMessage, e);
|
166
|
+
}
|
167
|
+
}
|
168
|
+
return attributes;
|
169
|
+
}
|
170
|
+
/**
|
171
|
+
* Construct URI with query parameters
|
172
|
+
*/
|
173
|
+
class UriBuilder {
|
174
|
+
constructor(base) {
|
175
|
+
this.base = base.replace(/\/$/, '');
|
176
|
+
this.args = [];
|
177
|
+
this.paths = [];
|
178
|
+
}
|
179
|
+
arg(name, value) {
|
180
|
+
if (typeof value !== 'undefined') {
|
181
|
+
this.args.push(encodeURIComponent(name) + '=' + encodeURIComponent(value));
|
182
|
+
}
|
183
|
+
return this;
|
184
|
+
}
|
185
|
+
path(name) {
|
186
|
+
this.paths.push(encodeURIComponent(name));
|
187
|
+
return this;
|
188
|
+
}
|
189
|
+
build() {
|
190
|
+
let result = this.base;
|
191
|
+
if (this.paths.length) {
|
192
|
+
result += '/' + this.paths.join('/');
|
193
|
+
}
|
194
|
+
if (this.args.length) {
|
195
|
+
result += '?' + this.args.join('&');
|
196
|
+
}
|
197
|
+
return result;
|
198
|
+
}
|
199
|
+
}
|
200
|
+
|
201
|
+
exports.UriBuilder = UriBuilder;
|
202
|
+
exports.deepClone = deepClone;
|
203
|
+
exports.parseAttributes = parseAttributes;
|
204
|
+
exports.parseTime = parseTime;
|
205
|
+
exports.parseToNumber = parseToNumber;
|
206
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/util/index.ts"],"sourcesContent":["import { Logger } from '../logger';\n\n/**\n * Deep-clone an object. Note that this does not work on object containing\n * functions.\n * @param {object} obj - the object to deep-clone\n * @returns {object}\n */\nfunction deepClone<T>(obj: T): T {\n return JSON.parse(JSON.stringify(obj)) as T;\n}\n\nfunction parseToNumber(value) {\n if (typeof value !== 'undefined' && !isNaN(Number(value))) {\n return Number(value);\n }\n return null;\n}\n\n// timeString cannot be typed `string` because in member.ts\n// call to parseTime(data.lastReadTimestamp) uses number not a string for timestamp.\nfunction parseTime(timeString): Date {\n try {\n return new Date(timeString);\n } catch (e) {\n return null;\n }\n}\n\nfunction parseAttributes(rawAttributes, warningMessage: string, log: Logger): Object {\n let attributes = {};\n if (rawAttributes) {\n try {\n attributes = JSON.parse(rawAttributes);\n } catch (e) {\n log.warn(warningMessage, e);\n }\n }\n\n return attributes;\n}\n\n/**\n * Construct URI with query parameters\n */\nclass UriBuilder {\n private base: string;\n private args: string[];\n private paths: string[];\n\n constructor(base: string) {\n this.base = base.replace(/\\/$/, '');\n this.args = [];\n this.paths = [];\n }\n\n public arg(name: string, value: any): UriBuilder {\n if (typeof value !== 'undefined') {\n this.args.push(encodeURIComponent(name) + '=' + encodeURIComponent(value));\n }\n return this;\n }\n\n public path(name: string): UriBuilder {\n this.paths.push(encodeURIComponent(name));\n return this;\n }\n\n public build(): string {\n let result = this.base;\n if (this.paths.length) {\n result += '/' + this.paths.join('/');\n }\n\n if (this.args.length) {\n result += '?' + this.args.join('&');\n }\n return result;\n }\n}\n\nexport { deepClone, UriBuilder, parseToNumber, parseTime, parseAttributes };\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;;;;;AAMA,SAAS,SAAS,CAAI,GAAM;IAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAM,CAAC;AAC9C,CAAC;AAED,SAAS,aAAa,CAAC,KAAK;IAC1B,IAAI,OAAO,KAAK,KAAK,WAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;QACzD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;KACtB;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;AACA;AACA,SAAS,SAAS,CAAC,UAAU;IAC3B,IAAI;QACF,OAAO,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC;KAC7B;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,IAAI,CAAC;KACb;AACH,CAAC;AAED,SAAS,eAAe,CAAC,aAAa,EAAE,cAAsB,EAAE,GAAW;IACzE,IAAI,UAAU,GAAG,EAAE,CAAC;IACpB,IAAI,aAAa,EAAE;QACjB,IAAI;YACF,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;SACxC;QAAC,OAAO,CAAC,EAAE;YACV,GAAG,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;SAC7B;KACF;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;AAGA,MAAM,UAAU;IAKd,YAAY,IAAY;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACpC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;QACf,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;KACjB;IAEM,GAAG,CAAC,IAAY,EAAE,KAAU;QACjC,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;YAChC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC;SAC5E;QACD,OAAO,IAAI,CAAC;KACb;IAEM,IAAI,CAAC,IAAY;QACtB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1C,OAAO,IAAI,CAAC;KACb;IAEM,KAAK;QACV,IAAI,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC;QACvB,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;YACrB,MAAM,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACtC;QAED,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YACpB,MAAM,IAAI,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACrC;QACD,OAAO,MAAM,CAAC;KACf;;;;;;;;;"}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
package/package.json
CHANGED
@@ -1,52 +1,52 @@
|
|
1
1
|
{
|
2
2
|
"name": "@twilio/conversations",
|
3
|
-
"version": "2.0.1-rc.
|
3
|
+
"version": "2.0.1-rc.9",
|
4
4
|
"description": "Twilio Conversations client library",
|
5
|
-
"main": "./
|
6
|
-
"browser": "./
|
7
|
-
"
|
5
|
+
"main": "./builds/lib.js",
|
6
|
+
"browser": "./builds/browser.js",
|
7
|
+
"react-native": "./dist/index.js",
|
8
|
+
"types": "./builds/lib.d.ts",
|
8
9
|
"author": "Twilio",
|
9
10
|
"license": "MIT",
|
10
11
|
"files": [
|
11
|
-
"
|
12
|
-
"dist
|
13
|
-
"
|
14
|
-
"
|
15
|
-
"
|
12
|
+
"docs",
|
13
|
+
"dist",
|
14
|
+
"builds/**/*.d.ts",
|
15
|
+
"builds/**/*.js",
|
16
|
+
"builds/**/*.map",
|
16
17
|
"README.md",
|
17
18
|
"LICENSE"
|
18
19
|
],
|
19
20
|
"scripts": {
|
20
|
-
"clean": "rm -rf ./coverage ./dist",
|
21
|
+
"clean": "rm -rf ./coverage ./dist ./builds ./docs",
|
21
22
|
"lint": "npx tslint -p ./tslint.json",
|
22
23
|
"lint:fix": "npx tslint -p ./tslint.json --fix",
|
23
24
|
"test:unit": "env FORCE_COLOR=1 NODE_ENV=test npx nyc --report-dir coverage/unit ./node_modules/.bin/mocha test/unit/index.ts",
|
24
25
|
"test:integration": "env FORCE_COLOR=1 NODE_ENV=test npx nyc --report-dir coverage/integration ./node_modules/.bin/mocha test/integration/index.ts",
|
25
26
|
"build": "npx rollup -c",
|
26
27
|
"ssri": "yarn ssri:bundle && yarn ssri:min",
|
27
|
-
"ssri:bundle": "openssl dgst -sha256 -binary ./
|
28
|
-
"ssri:min": "openssl dgst -sha256 -binary ./
|
29
|
-
"sourceMapReport:html": "npx source-map-explorer@2.5.2 ./
|
30
|
-
"sourceMapReport:json": "npx source-map-explorer@2.5.2 ./
|
28
|
+
"ssri:bundle": "openssl dgst -sha256 -binary ./builds/twilio-conversations.js | openssl base64 -A | (printf \"sha256-\" && cat) > ./builds/twilio-conversations.sri",
|
29
|
+
"ssri:min": "openssl dgst -sha256 -binary ./builds/twilio-conversations.min.js | openssl base64 -A | (printf \"sha256-\" && cat) > ./builds/twilio-conversations.min.sri",
|
30
|
+
"sourceMapReport:html": "npx source-map-explorer@2.5.2 ./builds/lib.js --html ./builds/lib.report.html",
|
31
|
+
"sourceMapReport:json": "npx source-map-explorer@2.5.2 ./builds/lib.js --json ./builds/lib.report.json",
|
31
32
|
"docs": "npx typedoc && npx ts-node docs-postprocess.ts",
|
32
|
-
"ci": "yarn clean && yarn lint && yarn build && yarn ssri && yarn sourceMapReport:html && yarn sourceMapReport:json && yarn docs"
|
33
|
-
"postinstall": "node -e \"if (require('fs').existsSync('./dist/post-install.js')) require('child_process').exec('node ./dist/post-install.js', console.log);\""
|
33
|
+
"ci": "yarn clean && yarn lint && yarn build && yarn ssri && yarn sourceMapReport:html && yarn sourceMapReport:json && yarn docs"
|
34
34
|
},
|
35
35
|
"dependencies": {
|
36
36
|
"@babel/runtime": "^7.14.5",
|
37
|
-
"@twilio/declarative-type-validator": "^0.1.10-rc.
|
38
|
-
"@twilio/mcs-client": "^0.5.2-rc.
|
39
|
-
"@twilio/notifications": "^1.0.4-rc.
|
40
|
-
"@twilio/operation-retrier": "^4.0.6-rc.
|
41
|
-
"@twilio/replay-event-emitter": "^0.2.3-rc.
|
37
|
+
"@twilio/declarative-type-validator": "^0.1.10-rc.4",
|
38
|
+
"@twilio/mcs-client": "^0.5.2-rc.4",
|
39
|
+
"@twilio/notifications": "^1.0.4-rc.6",
|
40
|
+
"@twilio/operation-retrier": "^4.0.6-rc.4",
|
41
|
+
"@twilio/replay-event-emitter": "^0.2.3-rc.4",
|
42
42
|
"core-js": "^3.17.3",
|
43
43
|
"glob": "^7.1.7",
|
44
44
|
"iso8601-duration": "=1.2.0",
|
45
45
|
"lodash.isequal": "^4.5.0",
|
46
46
|
"loglevel": "^1.6.6",
|
47
47
|
"platform": "^1.3.6",
|
48
|
-
"twilio-sync": "^3.0.6-rc.
|
49
|
-
"twilsock": "^0.12.1-rc.
|
48
|
+
"twilio-sync": "^3.0.6-rc.6",
|
49
|
+
"twilsock": "^0.12.1-rc.6",
|
50
50
|
"uuid": "^3.4.0"
|
51
51
|
},
|
52
52
|
"devDependencies": {
|
@@ -83,7 +83,6 @@
|
|
83
83
|
"nyc": "^14.1.1",
|
84
84
|
"path": "^0.12.7",
|
85
85
|
"rollup": "^2.51.1",
|
86
|
-
"rollup-plugin-copy": "^3.4.0",
|
87
86
|
"rollup-plugin-polyfill-node": "^0.6.2",
|
88
87
|
"rollup-plugin-terser": "^7.0.2",
|
89
88
|
"rollup-plugin-ts": "^1.4.0",
|
package/dist/post-install.js
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
// Abort if the script is being run after "npm install" or "yarn" is executed on
|
2
|
-
// the monorepo project itself.
|
3
|
-
try {
|
4
|
-
const monorepoPackageJson = require("../../../package.json");
|
5
|
-
|
6
|
-
if (monorepoPackageJson.name === "root") {
|
7
|
-
return;
|
8
|
-
}
|
9
|
-
} catch {}
|
10
|
-
|
11
|
-
// Change the "browser" property to "./dist/react-native.js" if React Native
|
12
|
-
// is detected.
|
13
|
-
const fs = require("fs");
|
14
|
-
|
15
|
-
const mainProjectPackageJsonPath =
|
16
|
-
require.main.paths[0].split("node_modules")[0] + "package.json";
|
17
|
-
const mainProjectPackageJson = require(mainProjectPackageJsonPath);
|
18
|
-
const dependencyPackageJsonPath = `${__dirname}/../package.json`;
|
19
|
-
const dependencyPackageJson = require(dependencyPackageJsonPath);
|
20
|
-
|
21
|
-
if (
|
22
|
-
typeof mainProjectPackageJson?.dependencies?.["react-native"] !== "undefined"
|
23
|
-
) {
|
24
|
-
dependencyPackageJson["browser"] = "./dist/react-native.js";
|
25
|
-
fs.writeFileSync(
|
26
|
-
dependencyPackageJsonPath,
|
27
|
-
JSON.stringify(dependencyPackageJson, null, 2)
|
28
|
-
);
|
29
|
-
}
|