@doordeck/doordeck-headless-sdk 0.104.0 → 0.106.0

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.
Files changed (29) hide show
  1. package/README.md +1 -1
  2. package/kotlin/Kermit-kermit-core.js +316 -0
  3. package/kotlin/Kermit-kermit.js +51 -0
  4. package/kotlin/Kotlin-DateTime-library-kotlinx-datetime.js +1399 -1399
  5. package/kotlin/KotlinMultiplatformLibsodium-multiplatform-crypto-libsodium-bindings.js +17 -17
  6. package/kotlin/MultiplatformSettings-multiplatform-settings.js +10 -10
  7. package/kotlin/doordeck-sdk.d.ts +4 -2
  8. package/kotlin/doordeck-sdk.js +9905 -9672
  9. package/kotlin/kotlin-kotlin-stdlib.js +167 -158
  10. package/kotlin/kotlinx-atomicfu.js +13 -13
  11. package/kotlin/kotlinx-coroutines-core.js +2086 -1904
  12. package/kotlin/kotlinx-io-kotlinx-io-bytestring.js +32 -32
  13. package/kotlin/kotlinx-io-kotlinx-io-core.js +427 -427
  14. package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +1738 -1738
  15. package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +1346 -1346
  16. package/kotlin/ktor-ktor-client-ktor-client-core.js +2314 -1913
  17. package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-auth.js +254 -254
  18. package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-content-negotiation.js +151 -151
  19. package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-logging.js +3131 -2
  20. package/kotlin/ktor-ktor-http-ktor-http-cio.js +350 -350
  21. package/kotlin/ktor-ktor-http.js +730 -715
  22. package/kotlin/ktor-ktor-io.js +805 -630
  23. package/kotlin/ktor-ktor-shared-ktor-events.js +9 -9
  24. package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx-ktor-serialization-kotlinx-json.js +7 -7
  25. package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx.js +146 -146
  26. package/kotlin/ktor-ktor-shared-ktor-serialization.js +68 -68
  27. package/kotlin/ktor-ktor-shared-ktor-websockets.js +40 -40
  28. package/kotlin/ktor-ktor-utils.js +1182 -577
  29. package/package.json +1 -1
package/README.md CHANGED
@@ -27,4 +27,4 @@ The SDK supports a range of targets for different platforms:
27
27
  To start using the Doordeck Headless SDK, refer to the [documentation index](https://github.com/doordeck/doordeck-headless-sdk/blob/main/docs/01_INDEX.md#index) for detailed setup and usage instructions tailored to your platform.
28
28
 
29
29
  ## Samples
30
- We provide samples for different targets, where you can see how the SDK can be used in fully functional projects. For more information, please see the [samples page](https://github.com/doordeck/doordeck-headless-sdk/blob/main/docs/15_SAMPLES.md).
30
+ We provide samples for different targets, where you can see how the SDK can be used in fully functional projects. For more information, please see the [samples page](https://github.com/doordeck/doordeck-headless-sdk/blob/main/docs/15_SAMPLES.md).
@@ -0,0 +1,316 @@
1
+ (function (_, kotlin_kotlin) {
2
+ 'use strict';
3
+ //region block: imports
4
+ var protoOf = kotlin_kotlin.$_$.ub;
5
+ var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.a2;
6
+ var isInterface = kotlin_kotlin.$_$.hb;
7
+ var Unit_instance = kotlin_kotlin.$_$.k5;
8
+ var initMetadataForClass = kotlin_kotlin.$_$.sa;
9
+ var initMetadataForObject = kotlin_kotlin.$_$.ya;
10
+ var VOID = kotlin_kotlin.$_$.h;
11
+ var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.j1;
12
+ var charSequenceLength = kotlin_kotlin.$_$.ha;
13
+ var initMetadataForInterface = kotlin_kotlin.$_$.wa;
14
+ var getStringHashCode = kotlin_kotlin.$_$.qa;
15
+ var THROW_CCE = kotlin_kotlin.$_$.sf;
16
+ var toList = kotlin_kotlin.$_$.u8;
17
+ var Enum = kotlin_kotlin.$_$.hf;
18
+ var objectCreate = kotlin_kotlin.$_$.tb;
19
+ var stackTraceToString = kotlin_kotlin.$_$.tg;
20
+ var noWhenBranchMatchedException = kotlin_kotlin.$_$.rg;
21
+ //endregion
22
+ //region block: pre-declaration
23
+ initMetadataForClass(BaseLogger, 'BaseLogger');
24
+ initMetadataForClass(LogWriter, 'LogWriter');
25
+ function formatSeverity(severity) {
26
+ return severity.toString() + ':';
27
+ }
28
+ function formatTag(tag) {
29
+ return '(' + _Tag___get_tag__impl__7z9hd6(tag) + ')';
30
+ }
31
+ function formatMessage(severity, tag, message) {
32
+ var tmp;
33
+ if (severity == null) {
34
+ var tmp_0 = tag;
35
+ tmp = (tmp_0 == null ? null : new Tag(tmp_0)) == null;
36
+ } else {
37
+ tmp = false;
38
+ }
39
+ if (tmp)
40
+ return _Message___get_message__impl__3t69n4(message);
41
+ var sb = StringBuilder_init_$Create$();
42
+ if (!(severity == null)) {
43
+ sb.r8(this.e6g(severity)).r8(' ');
44
+ }
45
+ var tmp_1;
46
+ var tmp_2 = tag;
47
+ if (!((tmp_2 == null ? null : new Tag(tmp_2)) == null)) {
48
+ // Inline function 'kotlin.text.isNotEmpty' call
49
+ var this_0 = _Tag___get_tag__impl__7z9hd6(tag);
50
+ tmp_1 = charSequenceLength(this_0) > 0;
51
+ } else {
52
+ tmp_1 = false;
53
+ }
54
+ if (tmp_1) {
55
+ sb.r8(this.c6g(tag)).r8(' ');
56
+ }
57
+ sb.r8(_Message___get_message__impl__3t69n4(message));
58
+ return sb.toString();
59
+ }
60
+ initMetadataForInterface(MessageStringFormatter, 'MessageStringFormatter');
61
+ initMetadataForObject(NoTagFormatter, 'NoTagFormatter', VOID, VOID, [MessageStringFormatter]);
62
+ initMetadataForObject(DefaultFormatter, 'DefaultFormatter', VOID, VOID, [MessageStringFormatter]);
63
+ initMetadataForClass(Tag, 'Tag');
64
+ initMetadataForInterface(MutableLoggerConfig, 'MutableLoggerConfig');
65
+ initMetadataForClass(Severity, 'Severity', VOID, Enum);
66
+ initMetadataForClass(ConsoleWriter, 'ConsoleWriter', ConsoleWriter_init_$Create$, LogWriter);
67
+ initMetadataForClass(JsMutableLoggerConfig, 'JsMutableLoggerConfig', VOID, VOID, [MutableLoggerConfig]);
68
+ initMetadataForObject(ConsoleActual, 'ConsoleActual');
69
+ //endregion
70
+ function get_DEFAULT_MIN_SEVERITY() {
71
+ _init_properties_BaseLogger_kt__lobnq7();
72
+ return DEFAULT_MIN_SEVERITY;
73
+ }
74
+ var DEFAULT_MIN_SEVERITY;
75
+ function BaseLogger(config) {
76
+ this.w6f_1 = config;
77
+ }
78
+ protoOf(BaseLogger).v3h = function () {
79
+ return this.w6f_1;
80
+ };
81
+ protoOf(BaseLogger).x6f = function () {
82
+ // Inline function 'kotlin.let' call
83
+ var it = this.v3h();
84
+ if (!isInterface(it, MutableLoggerConfig)) {
85
+ throw IllegalStateException_init_$Create$('Logger config is not mutable');
86
+ }
87
+ return it;
88
+ };
89
+ protoOf(BaseLogger).y6f = function (severity, tag, throwable, message) {
90
+ // Inline function 'kotlin.collections.forEach' call
91
+ var _iterator__ex2g4s = this.v3h().z6f().p();
92
+ while (_iterator__ex2g4s.q()) {
93
+ var element = _iterator__ex2g4s.r();
94
+ if (element.b6g(tag, severity)) {
95
+ element.a6g(severity, message, tag, throwable);
96
+ }
97
+ }
98
+ };
99
+ var properties_initialized_BaseLogger_kt_e6qv19;
100
+ function _init_properties_BaseLogger_kt__lobnq7() {
101
+ if (!properties_initialized_BaseLogger_kt_e6qv19) {
102
+ properties_initialized_BaseLogger_kt_e6qv19 = true;
103
+ DEFAULT_MIN_SEVERITY = Severity_Verbose_getInstance();
104
+ }
105
+ }
106
+ function LogWriter() {
107
+ }
108
+ protoOf(LogWriter).b6g = function (tag, severity) {
109
+ return true;
110
+ };
111
+ function NoTagFormatter() {
112
+ }
113
+ protoOf(NoTagFormatter).c6g = function (tag) {
114
+ return '';
115
+ };
116
+ protoOf(NoTagFormatter).d6g = function (severity, tag, message) {
117
+ return formatMessage.call(this, severity, null, message);
118
+ };
119
+ var NoTagFormatter_instance;
120
+ function NoTagFormatter_getInstance() {
121
+ return NoTagFormatter_instance;
122
+ }
123
+ function MessageStringFormatter() {
124
+ }
125
+ function DefaultFormatter() {
126
+ }
127
+ var DefaultFormatter_instance;
128
+ function DefaultFormatter_getInstance() {
129
+ return DefaultFormatter_instance;
130
+ }
131
+ function _Tag___init__impl__opaqzl(tag) {
132
+ return tag;
133
+ }
134
+ function _Tag___get_tag__impl__7z9hd6($this) {
135
+ return $this;
136
+ }
137
+ function Tag__toString_impl_tvevk7($this) {
138
+ return 'Tag(tag=' + $this + ')';
139
+ }
140
+ function Tag__hashCode_impl_848yrc($this) {
141
+ return getStringHashCode($this);
142
+ }
143
+ function Tag__equals_impl_6ocp5g($this, other) {
144
+ if (!(other instanceof Tag))
145
+ return false;
146
+ if (!($this === (other instanceof Tag ? other.f6g_1 : THROW_CCE())))
147
+ return false;
148
+ return true;
149
+ }
150
+ function Tag(tag) {
151
+ this.f6g_1 = tag;
152
+ }
153
+ protoOf(Tag).toString = function () {
154
+ return Tag__toString_impl_tvevk7(this.f6g_1);
155
+ };
156
+ protoOf(Tag).hashCode = function () {
157
+ return Tag__hashCode_impl_848yrc(this.f6g_1);
158
+ };
159
+ protoOf(Tag).equals = function (other) {
160
+ return Tag__equals_impl_6ocp5g(this.f6g_1, other);
161
+ };
162
+ function _Message___init__impl__p3e8y6(message) {
163
+ return message;
164
+ }
165
+ function _Message___get_message__impl__3t69n4($this) {
166
+ return $this;
167
+ }
168
+ function MutableLoggerConfig() {
169
+ }
170
+ function mutableLoggerConfigInit(logWriters, minSeverity) {
171
+ minSeverity = minSeverity === VOID ? get_DEFAULT_MIN_SEVERITY() : minSeverity;
172
+ // Inline function 'kotlin.also' call
173
+ var this_0 = mutableLoggerConfigInit_0(toList(logWriters));
174
+ this_0.g6g(minSeverity);
175
+ return this_0;
176
+ }
177
+ var Severity_Verbose_instance;
178
+ var Severity_Debug_instance;
179
+ var Severity_Info_instance;
180
+ var Severity_Warn_instance;
181
+ var Severity_Error_instance;
182
+ var Severity_Assert_instance;
183
+ var Severity_entriesInitialized;
184
+ function Severity_initEntries() {
185
+ if (Severity_entriesInitialized)
186
+ return Unit_instance;
187
+ Severity_entriesInitialized = true;
188
+ Severity_Verbose_instance = new Severity('Verbose', 0);
189
+ Severity_Debug_instance = new Severity('Debug', 1);
190
+ Severity_Info_instance = new Severity('Info', 2);
191
+ Severity_Warn_instance = new Severity('Warn', 3);
192
+ Severity_Error_instance = new Severity('Error', 4);
193
+ Severity_Assert_instance = new Severity('Assert', 5);
194
+ }
195
+ function Severity(name, ordinal) {
196
+ Enum.call(this, name, ordinal);
197
+ }
198
+ function Severity_Verbose_getInstance() {
199
+ Severity_initEntries();
200
+ return Severity_Verbose_instance;
201
+ }
202
+ function Severity_Debug_getInstance() {
203
+ Severity_initEntries();
204
+ return Severity_Debug_instance;
205
+ }
206
+ function Severity_Error_getInstance() {
207
+ Severity_initEntries();
208
+ return Severity_Error_instance;
209
+ }
210
+ function Severity_Assert_getInstance() {
211
+ Severity_initEntries();
212
+ return Severity_Assert_instance;
213
+ }
214
+ function ConsoleWriter_init_$Init$(messageStringFormatter, $this) {
215
+ messageStringFormatter = messageStringFormatter === VOID ? DefaultFormatter_instance : messageStringFormatter;
216
+ ConsoleWriter.call($this, messageStringFormatter, ConsoleActual_instance);
217
+ return $this;
218
+ }
219
+ function ConsoleWriter_init_$Create$(messageStringFormatter) {
220
+ return ConsoleWriter_init_$Init$(messageStringFormatter, objectCreate(protoOf(ConsoleWriter)));
221
+ }
222
+ function ConsoleWriter(messageStringFormatter, console) {
223
+ LogWriter.call(this);
224
+ this.h6g_1 = messageStringFormatter;
225
+ this.i6g_1 = console;
226
+ }
227
+ protoOf(ConsoleWriter).a6g = function (severity, message, tag, throwable) {
228
+ var output = this.h6g_1.d6g(null, _Tag___init__impl__opaqzl(tag), _Message___init__impl__p3e8y6(message));
229
+ if (throwable == null)
230
+ null;
231
+ else {
232
+ // Inline function 'kotlin.let' call
233
+ output = output + (' ' + stackTraceToString(throwable));
234
+ }
235
+ switch (severity.r2_1) {
236
+ case 5:
237
+ case 4:
238
+ this.i6g_1.j6g(output);
239
+ break;
240
+ case 3:
241
+ this.i6g_1.k6g(output);
242
+ break;
243
+ case 2:
244
+ this.i6g_1.l6g(output);
245
+ break;
246
+ case 1:
247
+ case 0:
248
+ this.i6g_1.n4z(output);
249
+ break;
250
+ default:
251
+ noWhenBranchMatchedException();
252
+ break;
253
+ }
254
+ };
255
+ function JsMutableLoggerConfig(logWriters) {
256
+ this.m6g_1 = get_DEFAULT_MIN_SEVERITY();
257
+ this.n6g_1 = logWriters;
258
+ }
259
+ protoOf(JsMutableLoggerConfig).g6g = function (_set____db54di) {
260
+ this.m6g_1 = _set____db54di;
261
+ };
262
+ protoOf(JsMutableLoggerConfig).o6g = function () {
263
+ return this.m6g_1;
264
+ };
265
+ protoOf(JsMutableLoggerConfig).z6f = function () {
266
+ return this.n6g_1;
267
+ };
268
+ function mutableLoggerConfigInit_0(logWriters) {
269
+ return new JsMutableLoggerConfig(logWriters);
270
+ }
271
+ function platformLogWriter(messageStringFormatter) {
272
+ messageStringFormatter = messageStringFormatter === VOID ? DefaultFormatter_instance : messageStringFormatter;
273
+ return ConsoleWriter_init_$Create$();
274
+ }
275
+ function ConsoleActual() {
276
+ }
277
+ protoOf(ConsoleActual).j6g = function (output) {
278
+ console.error(output);
279
+ };
280
+ protoOf(ConsoleActual).k6g = function (output) {
281
+ console.warn(output);
282
+ };
283
+ protoOf(ConsoleActual).l6g = function (output) {
284
+ console.info(output);
285
+ };
286
+ protoOf(ConsoleActual).n4z = function (output) {
287
+ console.log(output);
288
+ };
289
+ var ConsoleActual_instance;
290
+ function ConsoleActual_getInstance() {
291
+ return ConsoleActual_instance;
292
+ }
293
+ //region block: post-declaration
294
+ protoOf(NoTagFormatter).e6g = formatSeverity;
295
+ protoOf(DefaultFormatter).e6g = formatSeverity;
296
+ protoOf(DefaultFormatter).c6g = formatTag;
297
+ protoOf(DefaultFormatter).d6g = formatMessage;
298
+ //endregion
299
+ //region block: init
300
+ NoTagFormatter_instance = new NoTagFormatter();
301
+ DefaultFormatter_instance = new DefaultFormatter();
302
+ ConsoleActual_instance = new ConsoleActual();
303
+ //endregion
304
+ //region block: exports
305
+ _.$_$ = _.$_$ || {};
306
+ _.$_$.a = BaseLogger;
307
+ _.$_$.b = mutableLoggerConfigInit;
308
+ _.$_$.c = mutableLoggerConfigInit_0;
309
+ _.$_$.d = platformLogWriter;
310
+ _.$_$.e = Severity_Assert_getInstance;
311
+ _.$_$.f = Severity_Debug_getInstance;
312
+ _.$_$.g = Severity_Error_getInstance;
313
+ _.$_$.h = NoTagFormatter_instance;
314
+ //endregion
315
+ return _;
316
+ }(module.exports, require('./kotlin-kotlin-stdlib.js')));
@@ -0,0 +1,51 @@
1
+ (function (_, kotlin_co_touchlab_kermit_core, kotlin_kotlin) {
2
+ 'use strict';
3
+ //region block: imports
4
+ var platformLogWriter = kotlin_co_touchlab_kermit_core.$_$.d;
5
+ var listOf = kotlin_kotlin.$_$.v7;
6
+ var mutableLoggerConfigInit = kotlin_co_touchlab_kermit_core.$_$.c;
7
+ var protoOf = kotlin_kotlin.$_$.ub;
8
+ var initMetadataForCompanion = kotlin_kotlin.$_$.ta;
9
+ var BaseLogger = kotlin_co_touchlab_kermit_core.$_$.a;
10
+ var VOID = kotlin_kotlin.$_$.h;
11
+ var initMetadataForClass = kotlin_kotlin.$_$.sa;
12
+ //endregion
13
+ //region block: pre-declaration
14
+ initMetadataForClass(Logger, 'Logger', VOID, BaseLogger);
15
+ initMetadataForCompanion(Companion, Logger);
16
+ //endregion
17
+ function Companion() {
18
+ Companion_instance = this;
19
+ Logger.call(this, mutableLoggerConfigInit(listOf(platformLogWriter())), '');
20
+ }
21
+ protoOf(Companion).r6g = function () {
22
+ return get_defaultTag();
23
+ };
24
+ var Companion_instance;
25
+ function Companion_getInstance() {
26
+ if (Companion_instance == null)
27
+ new Companion();
28
+ return Companion_instance;
29
+ }
30
+ function Logger(config, tag) {
31
+ Companion_getInstance();
32
+ tag = tag === VOID ? '' : tag;
33
+ BaseLogger.call(this, config);
34
+ this.t6g_1 = tag;
35
+ }
36
+ protoOf(Logger).r6g = function () {
37
+ return this.t6g_1;
38
+ };
39
+ function get_defaultTag() {
40
+ return defaultTag;
41
+ }
42
+ var defaultTag;
43
+ //region block: init
44
+ defaultTag = '';
45
+ //endregion
46
+ //region block: exports
47
+ _.$_$ = _.$_$ || {};
48
+ _.$_$.a = Logger;
49
+ //endregion
50
+ return _;
51
+ }(module.exports, require('./Kermit-kermit-core.js'), require('./kotlin-kotlin-stdlib.js')));