@adviser/cement 0.3.19 → 0.4.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 (173) hide show
  1. package/base-sys-abstraction-DgTynXGV.d.cts +95 -0
  2. package/base-sys-abstraction-h0dB3nZ5.d.ts +95 -0
  3. package/cf/index.cjs +232 -283
  4. package/cf/index.cjs.map +1 -1
  5. package/cf/index.d.cts +10 -8
  6. package/cf/index.d.ts +10 -8
  7. package/cf/index.js +6 -41
  8. package/cf/index.js.map +1 -1
  9. package/{chunk-GDTTUMIL.js → chunk-6F3ACVHD.js} +62 -22
  10. package/chunk-6F3ACVHD.js.map +1 -0
  11. package/{chunk-PHS255C5.js → chunk-FOALXQST.js} +1 -68
  12. package/chunk-FOALXQST.js.map +1 -0
  13. package/{chunk-23MCJYE6.js → chunk-X3IV2RYT.js} +422 -602
  14. package/chunk-X3IV2RYT.js.map +1 -0
  15. package/chunk-YKGCONBX.js +677 -0
  16. package/chunk-YKGCONBX.js.map +1 -0
  17. package/{chunk-55W4AK2Z.js → chunk-YVACAIUX.js} +5 -5
  18. package/deno/index.cjs +257 -241
  19. package/deno/index.cjs.map +1 -1
  20. package/deno/index.d.cts +3 -5
  21. package/deno/index.d.ts +3 -5
  22. package/deno/index.js +14 -16
  23. package/deno/index.js.map +1 -1
  24. package/{index-D1j1fPYg.d.ts → index-N0bkrgSt.d.ts} +15 -3
  25. package/{index-Cp1NspHH.d.cts → index-TtYD7HhB.d.cts} +15 -3
  26. package/index.cjs +1851 -1709
  27. package/index.cjs.map +1 -1
  28. package/index.d.cts +9 -8
  29. package/index.d.ts +9 -8
  30. package/index.js +21 -16
  31. package/index.js.map +1 -1
  32. package/metafile-cjs.json +1 -1
  33. package/metafile-esm.json +1 -1
  34. package/node/index.cjs +499 -474
  35. package/node/index.cjs.map +1 -1
  36. package/node/index.d.cts +3 -5
  37. package/node/index.d.ts +3 -5
  38. package/node/index.js +14 -16
  39. package/node/index.js.map +1 -1
  40. package/package.json +6 -6
  41. package/src/base-sys-abstraction.ts +106 -116
  42. package/src/cf/cf-basic-sys-abstraction.ts +79 -0
  43. package/src/cf/index.ts +1 -1
  44. package/src/cf-test-main.ts +10 -1
  45. package/src/deno/deno-basic-sys-abstraction.ts +39 -0
  46. package/src/deno/deno-file-service.ts +1 -1
  47. package/src/deno/deno-sys-abstraction.ts +19 -22
  48. package/src/jsr.json +1 -1
  49. package/src/log-writer-impl.ts +6 -0
  50. package/src/logger-impl.ts +17 -19
  51. package/src/node/node-basic-sys-abstraction.ts +59 -0
  52. package/src/node/node-sys-abstraction.ts +19 -22
  53. package/src/sys-abstraction.ts +12 -6
  54. package/src/test/mock-logger.ts +2 -2
  55. package/src/txt-en-decoder.ts +3 -3
  56. package/src/uri.ts +71 -0
  57. package/src/web/index.ts +1 -1
  58. package/src/web/web-basic-sys-abstraction.ts +105 -0
  59. package/{sys-abstraction-B0x6IE7r.d.ts → sys-abstraction-CeAxxg9H.d.ts} +11 -7
  60. package/{sys-abstraction-BTs3Vzy4.d.cts → sys-abstraction-DDAwGTnk.d.cts} +11 -7
  61. package/test/index.cjs +1534 -1419
  62. package/test/index.cjs.map +1 -1
  63. package/test/index.d.cts +2 -2
  64. package/test/index.d.ts +2 -2
  65. package/test/index.js +4 -5
  66. package/ts/smoke/smoke.js +7 -8
  67. package/ts/smoke/smoke.js.map +1 -1
  68. package/ts/src/base-basic-sys-abstraction.test.d.ts +2 -0
  69. package/ts/src/base-basic-sys-abstraction.test.d.ts.map +1 -0
  70. package/ts/src/{base-sys-abstraction.test.js → base-basic-sys-abstraction.test.js} +9 -9
  71. package/ts/src/base-basic-sys-abstraction.test.js.map +1 -0
  72. package/ts/src/base-sys-abstraction.d.ts +33 -21
  73. package/ts/src/base-sys-abstraction.d.ts.map +1 -1
  74. package/ts/src/base-sys-abstraction.js +54 -67
  75. package/ts/src/base-sys-abstraction.js.map +1 -1
  76. package/ts/src/cf/cf-basic-sys-abstraction.d.ts +14 -0
  77. package/ts/src/cf/cf-basic-sys-abstraction.d.ts.map +1 -0
  78. package/ts/src/cf/cf-basic-sys-abstraction.js +67 -0
  79. package/ts/src/cf/cf-basic-sys-abstraction.js.map +1 -0
  80. package/ts/src/cf/index.d.ts +1 -1
  81. package/ts/src/cf/index.d.ts.map +1 -1
  82. package/ts/src/cf/index.js +1 -1
  83. package/ts/src/cf/index.js.map +1 -1
  84. package/ts/src/cf-test-main.d.ts.map +1 -1
  85. package/ts/src/cf-test-main.js +7 -1
  86. package/ts/src/cf-test-main.js.map +1 -1
  87. package/ts/src/deno/deno-basic-sys-abstraction.d.ts +14 -0
  88. package/ts/src/deno/deno-basic-sys-abstraction.d.ts.map +1 -0
  89. package/ts/src/deno/deno-basic-sys-abstraction.js +35 -0
  90. package/ts/src/deno/deno-basic-sys-abstraction.js.map +1 -0
  91. package/ts/src/deno/deno-file-service.d.ts +1 -1
  92. package/ts/src/deno/deno-file-service.d.ts.map +1 -1
  93. package/ts/src/deno/deno-sys-abstraction.d.ts +3 -6
  94. package/ts/src/deno/deno-sys-abstraction.d.ts.map +1 -1
  95. package/ts/src/deno/deno-sys-abstraction.js +13 -17
  96. package/ts/src/deno/deno-sys-abstraction.js.map +1 -1
  97. package/ts/src/log-writer-impl.d.ts +1 -0
  98. package/ts/src/log-writer-impl.d.ts.map +1 -1
  99. package/ts/src/log-writer-impl.js +1 -0
  100. package/ts/src/log-writer-impl.js.map +1 -1
  101. package/ts/src/logger-impl.d.ts +3 -3
  102. package/ts/src/logger-impl.d.ts.map +1 -1
  103. package/ts/src/logger-impl.js +3 -18
  104. package/ts/src/logger-impl.js.map +1 -1
  105. package/ts/src/logger.test.js +3 -4
  106. package/ts/src/logger.test.js.map +1 -1
  107. package/ts/src/node/node-basic-sys-abstraction.d.ts +25 -0
  108. package/ts/src/node/node-basic-sys-abstraction.d.ts.map +1 -0
  109. package/ts/src/node/node-basic-sys-abstraction.js +44 -0
  110. package/ts/src/node/node-basic-sys-abstraction.js.map +1 -0
  111. package/ts/src/node/node-sys-abstraction.d.ts +3 -6
  112. package/ts/src/node/node-sys-abstraction.d.ts.map +1 -1
  113. package/ts/src/node/node-sys-abstraction.js +13 -17
  114. package/ts/src/node/node-sys-abstraction.js.map +1 -1
  115. package/ts/src/node/node-sys-abstraction.test.js +1 -1
  116. package/ts/src/node/node-sys-abstraction.test.js.map +1 -1
  117. package/ts/src/resolve-once.test.js +1 -1
  118. package/ts/src/sys-abstraction.d.ts +10 -6
  119. package/ts/src/sys-abstraction.d.ts.map +1 -1
  120. package/ts/src/test/mock-logger.d.ts +2 -2
  121. package/ts/src/test/mock-logger.d.ts.map +1 -1
  122. package/ts/src/test/mock-logger.js.map +1 -1
  123. package/ts/src/tracer.test.js +5 -8
  124. package/ts/src/tracer.test.js.map +1 -1
  125. package/ts/src/txt-en-decoder.d.ts.map +1 -1
  126. package/ts/src/txt-en-decoder.js +3 -3
  127. package/ts/src/txt-en-decoder.js.map +1 -1
  128. package/ts/src/uri.d.ts +12 -0
  129. package/ts/src/uri.d.ts.map +1 -1
  130. package/ts/src/uri.js +55 -0
  131. package/ts/src/uri.js.map +1 -1
  132. package/ts/src/uri.test.js +48 -0
  133. package/ts/src/uri.test.js.map +1 -1
  134. package/ts/src/web/index.d.ts +1 -1
  135. package/ts/src/web/index.d.ts.map +1 -1
  136. package/ts/src/web/index.js +1 -1
  137. package/ts/src/web/index.js.map +1 -1
  138. package/ts/src/web/web-basic-sys-abstraction.d.ts +4 -0
  139. package/ts/src/web/web-basic-sys-abstraction.d.ts.map +1 -0
  140. package/ts/src/web/web-basic-sys-abstraction.js +45 -0
  141. package/ts/src/web/web-basic-sys-abstraction.js.map +1 -0
  142. package/ts/vitest.workspace.d.ts +1 -1
  143. package/utils/index.cjs +132 -3
  144. package/utils/index.cjs.map +1 -1
  145. package/utils/index.js +5 -5
  146. package/web/index.cjs +277 -281
  147. package/web/index.cjs.map +1 -1
  148. package/web/index.d.cts +4 -17
  149. package/web/index.d.ts +4 -17
  150. package/web/index.js +4 -7
  151. package/base-sys-abstraction-BnBZ6zd0.d.ts +0 -84
  152. package/base-sys-abstraction-DAZ8tx5F.d.cts +0 -84
  153. package/chunk-23MCJYE6.js.map +0 -1
  154. package/chunk-GDTTUMIL.js.map +0 -1
  155. package/chunk-H6MLKWIZ.js +0 -88
  156. package/chunk-H6MLKWIZ.js.map +0 -1
  157. package/chunk-LXTKPZ6M.js +0 -255
  158. package/chunk-LXTKPZ6M.js.map +0 -1
  159. package/chunk-PHS255C5.js.map +0 -1
  160. package/src/cf/cf-sys-abstraction.ts +0 -34
  161. package/src/web/web-sys-abstraction.ts +0 -80
  162. package/ts/src/base-sys-abstraction.test.d.ts +0 -2
  163. package/ts/src/base-sys-abstraction.test.d.ts.map +0 -1
  164. package/ts/src/base-sys-abstraction.test.js.map +0 -1
  165. package/ts/src/cf/cf-sys-abstraction.d.ts +0 -11
  166. package/ts/src/cf/cf-sys-abstraction.d.ts.map +0 -1
  167. package/ts/src/cf/cf-sys-abstraction.js +0 -30
  168. package/ts/src/cf/cf-sys-abstraction.js.map +0 -1
  169. package/ts/src/web/web-sys-abstraction.d.ts +0 -18
  170. package/ts/src/web/web-sys-abstraction.d.ts.map +0 -1
  171. package/ts/src/web/web-sys-abstraction.js +0 -64
  172. package/ts/src/web/web-sys-abstraction.js.map +0 -1
  173. /package/{chunk-55W4AK2Z.js.map → chunk-YVACAIUX.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { R as Result, K as KeysParam, T as TxtEnDecoder } from './get-params-result-4xHM5s4_.js';
2
2
  import { S as StripCommand } from './stripper-BpBUUZ9p.js';
3
- import { S as SysAbstraction } from './sys-abstraction-B0x6IE7r.js';
3
+ import { B as BasicSysAbstraction } from './sys-abstraction-CeAxxg9H.js';
4
4
 
5
5
  declare abstract class Option<T> {
6
6
  static Some<T>(t: T): Option<T>;
@@ -36,12 +36,22 @@ interface URIInterface<R extends URIInterface<R>> {
36
36
  getParam<T extends string | undefined>(key: string | OneKey<string>, def?: T): T extends string ? string : string | undefined;
37
37
  getParamResult(key: string, msgFn?: (key: string) => string): Result<string>;
38
38
  getParamsResult(...keys: KeysParam): Result<Record<string, string>>;
39
+ match(other: CoerceURI): MatchResult;
39
40
  clone(): R;
40
41
  asURL(): URL;
41
42
  toString(): string;
42
43
  toJSON(): string;
43
44
  asObj(...strips: StripCommand[]): Partial<HostURIObject | PathURIObject>;
44
45
  }
46
+ interface MatchResult {
47
+ readonly score: number;
48
+ readonly protocol: boolean;
49
+ readonly hostname: boolean;
50
+ readonly port: boolean;
51
+ readonly pathname: boolean;
52
+ readonly pathParts: string[];
53
+ readonly params: Record<string, string>;
54
+ }
45
55
  interface URIObject {
46
56
  readonly style: "host" | "path";
47
57
  readonly protocol: string;
@@ -82,6 +92,7 @@ declare class BuildURI implements URIInterface<BuildURI> {
82
92
  private constructor();
83
93
  static is(value: unknown): value is BuildURI;
84
94
  static from(strURLUri?: CoerceURI, defaultProtocol?: string): BuildURI;
95
+ match(other: CoerceURI): MatchResult;
85
96
  port(p: string): BuildURI;
86
97
  hostname(h: string): BuildURI;
87
98
  protocol(p: string): BuildURI;
@@ -109,6 +120,7 @@ declare function isCoerceURI(value: unknown): value is CoerceURI;
109
120
  declare const hasHostPartProtocols: Set<string>;
110
121
  declare class URI implements URIInterface<URI> {
111
122
  static protocolHasHostpart(protocol: string): () => void;
123
+ match(other: CoerceURI): MatchResult;
112
124
  static merge(into: CoerceURI, from: CoerceURI, defaultProtocol?: string): URI;
113
125
  static is(value: unknown): value is URI;
114
126
  static from(strURLUri?: CoerceURI, defaultProtocol?: string): URI;
@@ -264,10 +276,10 @@ interface MockLoggerReturn {
264
276
  readonly logCollector: LogCollector;
265
277
  }
266
278
  declare function MockLogger(params?: {
267
- readonly sys?: SysAbstraction;
279
+ readonly sys?: BasicSysAbstraction;
268
280
  readonly pass?: WritableStreamDefaultWriter<Uint8Array>;
269
281
  moduleName?: string | string[];
270
282
  readonly disableDebug?: boolean;
271
283
  }): MockLoggerReturn;
272
284
 
273
- export { type AsError as A, BuildURI as B, type CoerceURI as C, type FnSerialized as F, type HttpType as H, IsLogger as I, type LogFormatter as L, type MockLoggerReturn as M, None as N, Option as O, type PathURIObject as P, type Serialized as S, type URIInterface as U, type WithLogger as W, type LogSerializable as a, type LevelHandler as b, type Logger as c, Level as d, Future as e, LogValue as f, asyncLogValue as g, type LogValueArg as h, type LogValueState as i, type Sized as j, type Lengthed as k, logValue as l, type SizeOrLength as m, type LoggerInterface as n, LogWriteStream as o, LogCollector as p, MockLogger as q, Some as r, type WithoutOption as s, type URIObject as t, type HostURIObject as u, isURL as v, MutableURL as w, isCoerceURI as x, hasHostPartProtocols as y, URI as z };
285
+ export { type AsError as A, BuildURI as B, type CoerceURI as C, URI as D, type FnSerialized as F, type HttpType as H, IsLogger as I, type LogFormatter as L, type MockLoggerReturn as M, None as N, Option as O, type PathURIObject as P, type Serialized as S, type URIInterface as U, type WithLogger as W, type LogSerializable as a, type LevelHandler as b, type Logger as c, Level as d, Future as e, LogValue as f, asyncLogValue as g, type LogValueArg as h, type LogValueState as i, type Sized as j, type Lengthed as k, logValue as l, type SizeOrLength as m, type LoggerInterface as n, LogWriteStream as o, LogCollector as p, MockLogger as q, Some as r, type WithoutOption as s, type MatchResult as t, type URIObject as u, type HostURIObject as v, isURL as w, MutableURL as x, isCoerceURI as y, hasHostPartProtocols as z };
@@ -1,6 +1,6 @@
1
1
  import { R as Result, K as KeysParam, T as TxtEnDecoder } from './get-params-result-4xHM5s4_.cjs';
2
2
  import { S as StripCommand } from './stripper-BpBUUZ9p.cjs';
3
- import { S as SysAbstraction } from './sys-abstraction-BTs3Vzy4.cjs';
3
+ import { B as BasicSysAbstraction } from './sys-abstraction-DDAwGTnk.cjs';
4
4
 
5
5
  declare abstract class Option<T> {
6
6
  static Some<T>(t: T): Option<T>;
@@ -36,12 +36,22 @@ interface URIInterface<R extends URIInterface<R>> {
36
36
  getParam<T extends string | undefined>(key: string | OneKey<string>, def?: T): T extends string ? string : string | undefined;
37
37
  getParamResult(key: string, msgFn?: (key: string) => string): Result<string>;
38
38
  getParamsResult(...keys: KeysParam): Result<Record<string, string>>;
39
+ match(other: CoerceURI): MatchResult;
39
40
  clone(): R;
40
41
  asURL(): URL;
41
42
  toString(): string;
42
43
  toJSON(): string;
43
44
  asObj(...strips: StripCommand[]): Partial<HostURIObject | PathURIObject>;
44
45
  }
46
+ interface MatchResult {
47
+ readonly score: number;
48
+ readonly protocol: boolean;
49
+ readonly hostname: boolean;
50
+ readonly port: boolean;
51
+ readonly pathname: boolean;
52
+ readonly pathParts: string[];
53
+ readonly params: Record<string, string>;
54
+ }
45
55
  interface URIObject {
46
56
  readonly style: "host" | "path";
47
57
  readonly protocol: string;
@@ -82,6 +92,7 @@ declare class BuildURI implements URIInterface<BuildURI> {
82
92
  private constructor();
83
93
  static is(value: unknown): value is BuildURI;
84
94
  static from(strURLUri?: CoerceURI, defaultProtocol?: string): BuildURI;
95
+ match(other: CoerceURI): MatchResult;
85
96
  port(p: string): BuildURI;
86
97
  hostname(h: string): BuildURI;
87
98
  protocol(p: string): BuildURI;
@@ -109,6 +120,7 @@ declare function isCoerceURI(value: unknown): value is CoerceURI;
109
120
  declare const hasHostPartProtocols: Set<string>;
110
121
  declare class URI implements URIInterface<URI> {
111
122
  static protocolHasHostpart(protocol: string): () => void;
123
+ match(other: CoerceURI): MatchResult;
112
124
  static merge(into: CoerceURI, from: CoerceURI, defaultProtocol?: string): URI;
113
125
  static is(value: unknown): value is URI;
114
126
  static from(strURLUri?: CoerceURI, defaultProtocol?: string): URI;
@@ -264,10 +276,10 @@ interface MockLoggerReturn {
264
276
  readonly logCollector: LogCollector;
265
277
  }
266
278
  declare function MockLogger(params?: {
267
- readonly sys?: SysAbstraction;
279
+ readonly sys?: BasicSysAbstraction;
268
280
  readonly pass?: WritableStreamDefaultWriter<Uint8Array>;
269
281
  moduleName?: string | string[];
270
282
  readonly disableDebug?: boolean;
271
283
  }): MockLoggerReturn;
272
284
 
273
- export { type AsError as A, BuildURI as B, type CoerceURI as C, type FnSerialized as F, type HttpType as H, IsLogger as I, type LogFormatter as L, type MockLoggerReturn as M, None as N, Option as O, type PathURIObject as P, type Serialized as S, type URIInterface as U, type WithLogger as W, type LogSerializable as a, type LevelHandler as b, type Logger as c, Level as d, Future as e, LogValue as f, asyncLogValue as g, type LogValueArg as h, type LogValueState as i, type Sized as j, type Lengthed as k, logValue as l, type SizeOrLength as m, type LoggerInterface as n, LogWriteStream as o, LogCollector as p, MockLogger as q, Some as r, type WithoutOption as s, type URIObject as t, type HostURIObject as u, isURL as v, MutableURL as w, isCoerceURI as x, hasHostPartProtocols as y, URI as z };
285
+ export { type AsError as A, BuildURI as B, type CoerceURI as C, URI as D, type FnSerialized as F, type HttpType as H, IsLogger as I, type LogFormatter as L, type MockLoggerReturn as M, None as N, Option as O, type PathURIObject as P, type Serialized as S, type URIInterface as U, type WithLogger as W, type LogSerializable as a, type LevelHandler as b, type Logger as c, Level as d, Future as e, LogValue as f, asyncLogValue as g, type LogValueArg as h, type LogValueState as i, type Sized as j, type Lengthed as k, logValue as l, type SizeOrLength as m, type LoggerInterface as n, LogWriteStream as o, LogCollector as p, MockLogger as q, Some as r, type WithoutOption as s, type MatchResult as t, type URIObject as u, type HostURIObject as v, isURL as w, MutableURL as x, isCoerceURI as y, hasHostPartProtocols as z };