@adviser/cement 0.1.11 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. package/base_sys_abstraction-BCdXJHNa.d.ts +21 -0
  2. package/base_sys_abstraction-BYZvxqsW.d.cts +21 -0
  3. package/chunk-J2IM7FHM.js +65 -0
  4. package/chunk-J2IM7FHM.js.map +1 -0
  5. package/chunk-MWAFFTM4.js +82 -0
  6. package/chunk-MWAFFTM4.js.map +1 -0
  7. package/chunk-PZTL4UNG.js +233 -0
  8. package/chunk-PZTL4UNG.js.map +1 -0
  9. package/index.cjs +986 -0
  10. package/index.cjs.map +1 -0
  11. package/index.d.cts +196 -0
  12. package/index.d.ts +196 -11
  13. package/index.js +610 -26
  14. package/index.js.map +1 -1
  15. package/node/index.cjs +436 -0
  16. package/node/index.cjs.map +1 -0
  17. package/node/index.d.cts +47 -0
  18. package/node/index.d.ts +47 -4
  19. package/node/index.js +215 -17
  20. package/node/index.js.map +1 -1
  21. package/package.json +34 -8
  22. package/sys_abstraction-CjljYIkv.d.cts +65 -0
  23. package/sys_abstraction-CjljYIkv.d.ts +65 -0
  24. package/utils/index.cjs +270 -0
  25. package/utils/index.cjs.map +1 -0
  26. package/utils/index.d.cts +33 -0
  27. package/utils/index.d.ts +33 -6
  28. package/utils/index.js +232 -20
  29. package/utils/index.js.map +1 -1
  30. package/web/index.cjs +286 -0
  31. package/web/index.cjs.map +1 -0
  32. package/web/index.d.cts +6 -0
  33. package/web/index.d.ts +6 -2
  34. package/web/index.js +7 -16
  35. package/web/index.js.map +1 -1
  36. package/base_sys_abstraction.d.ts +0 -79
  37. package/base_sys_abstraction.d.ts.map +0 -1
  38. package/base_sys_abstraction.js +0 -186
  39. package/base_sys_abstraction.js.map +0 -1
  40. package/base_sys_abstraction.test.d.ts +0 -2
  41. package/base_sys_abstraction.test.d.ts.map +0 -1
  42. package/base_sys_abstraction.test.js +0 -77
  43. package/base_sys_abstraction.test.js.map +0 -1
  44. package/file_service.d.ts +0 -18
  45. package/file_service.d.ts.map +0 -1
  46. package/file_service.js +0 -3
  47. package/file_service.js.map +0 -1
  48. package/future.d.ts +0 -8
  49. package/future.d.ts.map +0 -1
  50. package/future.js +0 -42
  51. package/future.js.map +0 -1
  52. package/future.test.d.ts +0 -2
  53. package/future.test.d.ts.map +0 -1
  54. package/future.test.js +0 -30
  55. package/future.test.js.map +0 -1
  56. package/index.d.ts.map +0 -1
  57. package/logger.d.ts +0 -36
  58. package/logger.d.ts.map +0 -1
  59. package/logger.js +0 -11
  60. package/logger.js.map +0 -1
  61. package/logger.test.d.ts +0 -2
  62. package/logger.test.d.ts.map +0 -1
  63. package/logger.test.js +0 -372
  64. package/logger.test.js.map +0 -1
  65. package/logger_impl.d.ts +0 -64
  66. package/logger_impl.d.ts.map +0 -1
  67. package/logger_impl.js +0 -331
  68. package/logger_impl.js.map +0 -1
  69. package/node/index.d.ts.map +0 -1
  70. package/node/mock_file_service.d.ts +0 -11
  71. package/node/mock_file_service.d.ts.map +0 -1
  72. package/node/mock_file_service.js +0 -38
  73. package/node/mock_file_service.js.map +0 -1
  74. package/node/mock_file_service.test.d.ts +0 -2
  75. package/node/mock_file_service.test.d.ts.map +0 -1
  76. package/node/mock_file_service.test.js +0 -19
  77. package/node/mock_file_service.test.js.map +0 -1
  78. package/node/node_file_service.d.ts +0 -16
  79. package/node/node_file_service.d.ts.map +0 -1
  80. package/node/node_file_service.js +0 -84
  81. package/node/node_file_service.js.map +0 -1
  82. package/node/node_sys_abstraction.d.ts +0 -21
  83. package/node/node_sys_abstraction.d.ts.map +0 -1
  84. package/node/node_sys_abstraction.js +0 -101
  85. package/node/node_sys_abstraction.js.map +0 -1
  86. package/node/node_sys_abstraction.test.d.ts +0 -2
  87. package/node/node_sys_abstraction.test.d.ts.map +0 -1
  88. package/node/node_sys_abstraction.test.js +0 -57
  89. package/node/node_sys_abstraction.test.js.map +0 -1
  90. package/option.d.ts +0 -25
  91. package/option.d.ts.map +0 -1
  92. package/option.js +0 -53
  93. package/option.js.map +0 -1
  94. package/result.d.ts +0 -31
  95. package/result.d.ts.map +0 -1
  96. package/result.js +0 -69
  97. package/result.js.map +0 -1
  98. package/result.test.d.ts +0 -2
  99. package/result.test.d.ts.map +0 -1
  100. package/result.test.js +0 -39
  101. package/result.test.js.map +0 -1
  102. package/sys_abstraction.d.ts +0 -35
  103. package/sys_abstraction.d.ts.map +0 -1
  104. package/sys_abstraction.js +0 -35
  105. package/sys_abstraction.js.map +0 -1
  106. package/test/log_collector.d.ts +0 -22
  107. package/test/log_collector.d.ts.map +0 -1
  108. package/test/log_collector.js +0 -66
  109. package/test/log_collector.js.map +0 -1
  110. package/test/mock_logger.d.ts +0 -13
  111. package/test/mock_logger.d.ts.map +0 -1
  112. package/test/mock_logger.js +0 -30
  113. package/test/mock_logger.js.map +0 -1
  114. package/test/mock_logger.test.d.ts +0 -2
  115. package/test/mock_logger.test.d.ts.map +0 -1
  116. package/test/mock_logger.test.js +0 -49
  117. package/test/mock_logger.test.js.map +0 -1
  118. package/test/test-exit-handler.d.ts +0 -1
  119. package/test/test-exit-handler.d.ts.map +0 -1
  120. package/test/test-exit-handler.js +0 -76
  121. package/test/test-exit-handler.js.map +0 -1
  122. package/time.d.ts +0 -13
  123. package/time.d.ts.map +0 -1
  124. package/time.js +0 -18
  125. package/time.js.map +0 -1
  126. package/utils/index.d.ts.map +0 -1
  127. package/utils/rebuffer.d.ts +0 -3
  128. package/utils/rebuffer.d.ts.map +0 -1
  129. package/utils/rebuffer.js +0 -65
  130. package/utils/rebuffer.js.map +0 -1
  131. package/utils/rebuffer.test.d.ts +0 -2
  132. package/utils/rebuffer.test.d.ts.map +0 -1
  133. package/utils/rebuffer.test.js +0 -79
  134. package/utils/rebuffer.test.js.map +0 -1
  135. package/utils/stream2string.d.ts +0 -3
  136. package/utils/stream2string.d.ts.map +0 -1
  137. package/utils/stream2string.js +0 -53
  138. package/utils/stream2string.js.map +0 -1
  139. package/utils/stream2string.test.d.ts +0 -2
  140. package/utils/stream2string.test.d.ts.map +0 -1
  141. package/utils/stream2string.test.js +0 -31
  142. package/utils/stream2string.test.js.map +0 -1
  143. package/utils/stream_map.d.ts +0 -9
  144. package/utils/stream_map.d.ts.map +0 -1
  145. package/utils/stream_map.js +0 -67
  146. package/utils/stream_map.js.map +0 -1
  147. package/utils/stream_map.test.d.ts +0 -2
  148. package/utils/stream_map.test.d.ts.map +0 -1
  149. package/utils/stream_map.test.js +0 -89
  150. package/utils/stream_map.test.js.map +0 -1
  151. package/utils/stream_test_helper.d.ts +0 -15
  152. package/utils/stream_test_helper.d.ts.map +0 -1
  153. package/utils/stream_test_helper.js +0 -42
  154. package/utils/stream_test_helper.js.map +0 -1
  155. package/utils/string2stream.d.ts +0 -3
  156. package/utils/string2stream.d.ts.map +0 -1
  157. package/utils/string2stream.js +0 -18
  158. package/utils/string2stream.js.map +0 -1
  159. package/utils/string2stream.test.d.ts +0 -2
  160. package/utils/string2stream.test.d.ts.map +0 -1
  161. package/utils/string2stream.test.js +0 -9
  162. package/utils/string2stream.test.js.map +0 -1
  163. package/web/index.d.ts.map +0 -1
  164. package/web/web_sys_abstraction.d.ts +0 -4
  165. package/web/web_sys_abstraction.d.ts.map +0 -1
  166. package/web/web_sys_abstraction.js +0 -65
  167. package/web/web_sys_abstraction.js.map +0 -1
@@ -1,89 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const stream_test_helper_1 = require("./stream_test_helper");
4
- const stream_map_1 = require("./stream_map");
5
- it("array2stream", async () => {
6
- const as = (0, stream_map_1.array2stream)([1, 2, 3]);
7
- let i = 0;
8
- const reader = as.getReader();
9
- while (true) {
10
- const { done, value } = await reader.read();
11
- if (done) {
12
- break;
13
- }
14
- expect(1 + i++).toBe(value);
15
- }
16
- });
17
- it("stream2array", async () => {
18
- const as = await (0, stream_map_1.stream2array)(new ReadableStream({
19
- start(controller) {
20
- controller.enqueue(1);
21
- controller.enqueue(2);
22
- controller.enqueue(3);
23
- controller.close();
24
- },
25
- }));
26
- expect(as).toEqual([1, 2, 3]);
27
- });
28
- it("devnull", async () => {
29
- const cnt = await (0, stream_map_1.devnull)((0, stream_map_1.streamMap)((0, stream_map_1.array2stream)([1, 2, 3]), {
30
- Map: (i, idx) => (idx + 1) * 10 + i + 1,
31
- }));
32
- expect(cnt).toBe(3);
33
- });
34
- it("stream_map", async () => {
35
- const closeFn = jest.fn();
36
- const s = await (0, stream_map_1.stream2array)((0, stream_map_1.streamMap)((0, stream_map_1.array2stream)([1, 2, 3]), {
37
- Map: (i, idx) => (idx + 1) * 10 + i + 1,
38
- Close: closeFn,
39
- }));
40
- expect(closeFn).toBeCalledTimes(1);
41
- expect(s).toEqual([12, 23, 34]);
42
- });
43
- it("stream_map async", async () => {
44
- const closeFn = jest.fn();
45
- const s = await (0, stream_map_1.stream2array)((0, stream_map_1.streamMap)((0, stream_map_1.array2stream)([1, 2, 3]), {
46
- Map: (i, idx) => Promise.resolve((idx + 1) * 10 + i + 1),
47
- Close: closeFn,
48
- }));
49
- expect(closeFn).toBeCalledTimes(1);
50
- expect(s).toEqual([12, 23, 34]);
51
- });
52
- it("map types", async () => {
53
- const oo = await (0, stream_map_1.stream2array)((0, stream_map_1.streamMap)((0, stream_map_1.array2stream)([1, 2, 3]), {
54
- Map: (chunk, idx) => {
55
- return "[" + chunk + "/" + idx + "]";
56
- },
57
- }));
58
- expect(oo).toEqual(["[1/0]", "[2/1]", "[3/2]"]);
59
- });
60
- describe("test streaming through streamMap", () => {
61
- const state = {
62
- sendChunks: 10000,
63
- sendChunkSize: 3,
64
- fillCalls: 0,
65
- CollectorFn: jest.fn(),
66
- };
67
- it("does streamMap respect backpressure", async () => {
68
- const ts = new TransformStream(undefined, undefined, { highWaterMark: 2 });
69
- const reb = (0, stream_map_1.streamMap)(ts.readable, {
70
- Map: (chunk) => {
71
- for (let i = 0; i < chunk.length; i++) {
72
- chunk[i] = (chunk[i] + 1) % 256;
73
- }
74
- return chunk;
75
- },
76
- });
77
- await Promise.all([(0, stream_test_helper_1.receiveFromStream)(reb, state), (0, stream_test_helper_1.sendToStream)(ts.writable, state)]);
78
- expect(state.CollectorFn).toBeCalledTimes(state.sendChunks + 1);
79
- expect(state.CollectorFn.mock.calls.slice(-1)[0][0].done).toBeTruthy();
80
- let lastfillCalls = 0;
81
- for (let i = 0; i < state.CollectorFn.mock.calls.length - 1; i++) {
82
- const { fillCalls, reBufferCalls, value } = state.CollectorFn.mock.calls[i][0];
83
- expect(value === null || value === void 0 ? void 0 : value[0]).toBe((i + 1) % 256);
84
- expect(fillCalls * state.sendChunkSize).toBeGreaterThanOrEqual((fillCalls - lastfillCalls) * state.sendChunkSize + reBufferCalls * state.sendChunkSize);
85
- lastfillCalls = fillCalls;
86
- }
87
- });
88
- });
89
- //# sourceMappingURL=stream_map.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stream_map.test.js","sourceRoot":"","sources":["../../src/utils/stream_map.test.ts"],"names":[],"mappings":";;AAAA,6DAA2F;AAC3F,6CAA8E;AAE9E,EAAE,CAAC,cAAc,EAAE,KAAK,IAAI,EAAE;IAC5B,MAAM,EAAE,GAAG,IAAA,yBAAY,EAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACnC,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,MAAM,MAAM,GAAG,EAAE,CAAC,SAAS,EAAE,CAAC;IAC9B,OAAO,IAAI,EAAE,CAAC;QACZ,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;QAC5C,IAAI,IAAI,EAAE,CAAC;YACT,MAAM;QACR,CAAC;QACD,MAAM,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,EAAE,CAAC,cAAc,EAAE,KAAK,IAAI,EAAE;IAC5B,MAAM,EAAE,GAAG,MAAM,IAAA,yBAAY,E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AAC,CAAC,UAAU,EAAE,CAAC;QACvE,IAAI,aAAa,GAAG,CAAC,CAAC;QACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAW,CAAC,EAAE,EAAE,CAAC;YAC1E,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC/E,MAAM,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;YACvC,MAAM,CAAC,SAAS,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,sBAAsB,CAC5D,CAAC,SAAS,GAAG,aAAa,CAAC,GAAG,KAAK,CAAC,aAAa,GAAG,aAAa,GAAG,KAAK,CAAC,aAAa,CACxF,CAAC;YACF,aAAa,GAAG,SAAS,CAAC;QAC5B,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,15 +0,0 @@
1
- /// <reference types="jest" />
2
- export interface streamingTestState {
3
- readonly sendChunks: number;
4
- readonly sendChunkSize: number;
5
- fillCalls: number;
6
- CollectorFn: jest.Mock<void, [{
7
- done: boolean;
8
- value: Uint8Array | undefined;
9
- fillCalls: number;
10
- reBufferCalls: number;
11
- }]>;
12
- }
13
- export declare function receiveFromStream(reb: ReadableStream<Uint8Array>, state: streamingTestState): Promise<void>;
14
- export declare function sendToStream(reb: WritableStream<Uint8Array>, state: streamingTestState): Promise<void>;
15
- //# sourceMappingURL=stream_test_helper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stream_test_helper.d.ts","sourceRoot":"","sources":["../../src/utils/stream_test_helper.ts"],"names":[],"mappings":";AAAA,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,CAAC;CAC5H;AAED,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,kBAAkB,iBAiBjG;AAED,wBAAsB,YAAY,CAAC,GAAG,EAAE,cAAc,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,kBAAkB,iBAiB5F"}
@@ -1,42 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sendToStream = exports.receiveFromStream = void 0;
4
- async function receiveFromStream(reb, state) {
5
- return new Promise((resolve) => {
6
- let reBufferCalls = 0;
7
- const reader = reb.getReader();
8
- function pump() {
9
- reader.read().then(({ done, value }) => {
10
- state.CollectorFn({ done, value, fillCalls: state.fillCalls, reBufferCalls });
11
- reBufferCalls++;
12
- if (done) {
13
- resolve();
14
- return;
15
- }
16
- pump();
17
- });
18
- }
19
- pump();
20
- });
21
- }
22
- exports.receiveFromStream = receiveFromStream;
23
- async function sendToStream(reb, state) {
24
- return new Promise((resolve) => {
25
- const writer = reb.getWriter();
26
- function pump(i) {
27
- if (i >= state.sendChunks) {
28
- writer.close();
29
- resolve();
30
- return;
31
- }
32
- writer.ready.then(() => {
33
- state.fillCalls++;
34
- writer.write(new Uint8Array(Array(state.sendChunkSize).fill(i)));
35
- pump(i + 1);
36
- });
37
- }
38
- pump(0);
39
- });
40
- }
41
- exports.sendToStream = sendToStream;
42
- //# sourceMappingURL=stream_test_helper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stream_test_helper.js","sourceRoot":"","sources":["../../src/utils/stream_test_helper.ts"],"names":[],"mappings":";;;AAOO,KAAK,UAAU,iBAAiB,CAAC,GAA+B,EAAE,KAAyB;IAChG,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;QACnC,IAAI,aAAa,GAAG,CAAC,CAAC;QACtB,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,EAAE,CAAC;QAC/B,SAAS,IAAI;YACX,MAAM,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;gBACrC,KAAK,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,aAAa,EAAE,CAAC,CAAC;gBAC9E,aAAa,EAAE,CAAC;gBAChB,IAAI,IAAI,EAAE,CAAC;oBACT,OAAO,EAAE,CAAC;oBACV,OAAO;gBACT,CAAC;gBACD,IAAI,EAAE,CAAC;YACT,CAAC,CAAC,CAAC;QACL,CAAC;QACD,IAAI,EAAE,CAAC;IACT,CAAC,CAAC,CAAC;AACL,CAAC;AAjBD,8CAiBC;AAEM,KAAK,UAAU,YAAY,CAAC,GAA+B,EAAE,KAAyB;IAC3F,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;QACnC,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,EAAE,CAAC;QAC/B,SAAS,IAAI,CAAC,CAAS;YACrB,IAAI,CAAC,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;gBAC1B,MAAM,CAAC,KAAK,EAAE,CAAC;gBACf,OAAO,EAAE,CAAC;gBACV,OAAO;YACT,CAAC;YACD,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;gBACrB,KAAK,CAAC,SAAS,EAAE,CAAC;gBAClB,MAAM,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACjE,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACd,CAAC,CAAC,CAAC;QACL,CAAC;QACD,IAAI,CAAC,CAAC,CAAC,CAAC;IACV,CAAC,CAAC,CAAC;AACL,CAAC;AAjBD,oCAiBC"}
@@ -1,3 +0,0 @@
1
- export declare function string2stream(str: string): ReadableStream<Uint8Array>;
2
- export declare function uint8array2stream(str: Uint8Array): ReadableStream<Uint8Array>;
3
- //# sourceMappingURL=string2stream.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"string2stream.d.ts","sourceRoot":"","sources":["../../src/utils/string2stream.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAC,UAAU,CAAC,CAGrE;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC,CAO7E"}
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.uint8array2stream = exports.string2stream = void 0;
4
- function string2stream(str) {
5
- const encoder = new TextEncoder();
6
- return uint8array2stream(encoder.encode(str));
7
- }
8
- exports.string2stream = string2stream;
9
- function uint8array2stream(str) {
10
- return new ReadableStream({
11
- start(controller) {
12
- controller.enqueue(str);
13
- controller.close();
14
- },
15
- });
16
- }
17
- exports.uint8array2stream = uint8array2stream;
18
- //# sourceMappingURL=string2stream.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"string2stream.js","sourceRoot":"","sources":["../../src/utils/string2stream.ts"],"names":[],"mappings":";;;AAAA,SAAgB,aAAa,CAAC,GAAW;IACvC,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;IAClC,OAAO,iBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AAChD,CAAC;AAHD,sCAGC;AAED,SAAgB,iBAAiB,CAAC,GAAe;IAC/C,OAAO,IAAI,cAAc,CAAa;QACpC,KAAK,CAAC,UAAU;YACd,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACxB,UAAU,CAAC,KAAK,EAAE,CAAC;QACrB,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAPD,8CAOC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=string2stream.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"string2stream.test.d.ts","sourceRoot":"","sources":["../../src/utils/string2stream.test.ts"],"names":[],"mappings":""}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const stream2string_1 = require("./stream2string");
4
- const string2stream_1 = require("./string2stream");
5
- it("string2stream", async () => {
6
- const inStr = (0, string2stream_1.string2stream)("Hello World!");
7
- expect(await (0, stream2string_1.stream2string)(inStr)).toBe("Hello World!");
8
- });
9
- //# sourceMappingURL=string2stream.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"string2stream.test.js","sourceRoot":"","sources":["../../src/utils/string2stream.test.ts"],"names":[],"mappings":";;AAAA,mDAAgD;AAChD,mDAAgD;AAEhD,EAAE,CAAC,eAAe,EAAE,KAAK,IAAI,EAAE;IAC7B,MAAM,KAAK,GAAG,IAAA,6BAAa,EAAC,cAAc,CAAC,CAAC;IAC5C,MAAM,CAAC,MAAM,IAAA,6BAAa,EAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AAC1D,CAAC,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/web/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
@@ -1,4 +0,0 @@
1
- import { WrapperSysAbstractionParams } from "../base_sys_abstraction";
2
- import { SysAbstraction } from "../sys_abstraction";
3
- export declare function WebSysAbstraction(param?: WrapperSysAbstractionParams): SysAbstraction;
4
- //# sourceMappingURL=web_sys_abstraction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"web_sys_abstraction.d.ts","sourceRoot":"","sources":["../../src/web/web_sys_abstraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6C,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAEjH,OAAO,EAAE,cAAc,EAA2B,MAAM,oBAAoB,CAAC;AAkE7E,wBAAgB,iBAAiB,CAAC,KAAK,CAAC,EAAE,2BAA2B,GAAG,cAAc,CAQrF"}
@@ -1,65 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WebSysAbstraction = void 0;
4
- const base_sys_abstraction_1 = require("../base_sys_abstraction");
5
- class WebFileService {
6
- get baseDir() {
7
- throw new Error("basedir-Method not implemented.");
8
- }
9
- create(fname) {
10
- throw new Error("create-Method not implemented.");
11
- }
12
- readFileString(fname) {
13
- throw new Error("readFileString-Method not implemented.");
14
- }
15
- writeFileString(fname, content) {
16
- throw new Error("writeFileString-Method not implemented.");
17
- }
18
- abs(fname) {
19
- throw new Error("abs-Method not implemented.");
20
- }
21
- join(...paths) {
22
- throw new Error("join-Method not implemented.");
23
- }
24
- relative(from, to) {
25
- throw new Error("relative-Method not implemented.");
26
- }
27
- dirname(fname) {
28
- throw new Error("dirname-Method not implemented.");
29
- }
30
- basename(fname) {
31
- throw new Error("basename-Method not implemented.");
32
- }
33
- nodeImport(fname) {
34
- throw new Error("nodeImport-Method not implemented.");
35
- }
36
- isAbsolute(fname) {
37
- throw new Error("isAbsolute-Method not implemented.");
38
- }
39
- }
40
- class WebSystemService {
41
- Env() {
42
- throw new Error("Env-Method not implemented.");
43
- }
44
- Args() {
45
- throw new Error("Args-Method not implemented.");
46
- }
47
- OnExit(hdl) {
48
- throw new Error("OnExit-Method not implemented.");
49
- }
50
- Exit(code) {
51
- throw new Error("Exit-Method not implemented.");
52
- }
53
- }
54
- let my = undefined;
55
- function WebSysAbstraction(param) {
56
- if (!my) {
57
- my = new base_sys_abstraction_1.BaseSysAbstraction({
58
- FileSystem: new WebFileService(),
59
- SystemService: new WebSystemService(),
60
- });
61
- }
62
- return new base_sys_abstraction_1.WrapperSysAbstraction(my, param);
63
- }
64
- exports.WebSysAbstraction = WebSysAbstraction;
65
- //# sourceMappingURL=web_sys_abstraction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"web_sys_abstraction.js","sourceRoot":"","sources":["../../src/web/web_sys_abstraction.ts"],"names":[],"mappings":";;;AAAA,kEAAiH;AAIjH,MAAM,cAAc;IAClB,IAAI,OAAO;QACT,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACrD,CAAC;IAED,MAAM,CAAC,KAAa;QAClB,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACpD,CAAC;IAED,cAAc,CAAC,KAAa;QAC1B,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;IAC5D,CAAC;IAED,eAAe,CAAC,KAAa,EAAE,OAAe;QAC5C,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC7D,CAAC;IAED,GAAG,CAAC,KAAa;QACf,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACjD,CAAC;IAED,IAAI,CAAC,GAAG,KAAe;QACrB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAClD,CAAC;IAED,QAAQ,CAAC,IAAY,EAAE,EAAuB;QAC5C,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACtD,CAAC;IAED,OAAO,CAAC,KAAa;QACnB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACrD,CAAC;IAED,QAAQ,CAAC,KAAa;QACpB,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACtD,CAAC;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