blendsdk 5.33.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 (538) hide show
  1. package/README.md +125 -0
  2. package/dist/cmdline/cmdline.d.ts +144 -0
  3. package/dist/cmdline/cmdline.d.ts.map +1 -0
  4. package/dist/cmdline/cmdline.js +683 -0
  5. package/dist/cmdline/cmdline.js.map +1 -0
  6. package/dist/cmdline/errors.d.ts +105 -0
  7. package/dist/cmdline/errors.d.ts.map +1 -0
  8. package/dist/cmdline/errors.js +153 -0
  9. package/dist/cmdline/errors.js.map +1 -0
  10. package/dist/cmdline/index.d.ts +5 -0
  11. package/dist/cmdline/index.d.ts.map +1 -0
  12. package/dist/cmdline/index.js +5 -0
  13. package/dist/cmdline/index.js.map +1 -0
  14. package/dist/cmdline/types.d.ts +260 -0
  15. package/dist/cmdline/types.d.ts.map +1 -0
  16. package/dist/cmdline/types.js +9 -0
  17. package/dist/cmdline/types.js.map +1 -0
  18. package/dist/cmdline/validators.d.ts +28 -0
  19. package/dist/cmdline/validators.d.ts.map +1 -0
  20. package/dist/cmdline/validators.js +211 -0
  21. package/dist/cmdline/validators.js.map +1 -0
  22. package/dist/codegen/database/index.d.ts +3 -0
  23. package/dist/codegen/database/index.d.ts.map +1 -0
  24. package/dist/codegen/database/index.js +3 -0
  25. package/dist/codegen/database/index.js.map +1 -0
  26. package/dist/codegen/database/introspect/index.d.ts +3 -0
  27. package/dist/codegen/database/introspect/index.d.ts.map +1 -0
  28. package/dist/codegen/database/introspect/index.js +3 -0
  29. package/dist/codegen/database/introspect/index.js.map +1 -0
  30. package/dist/codegen/database/introspect/introspect-query.d.ts +2 -0
  31. package/dist/codegen/database/introspect/introspect-query.d.ts.map +1 -0
  32. package/dist/codegen/database/introspect/introspect-query.js +416 -0
  33. package/dist/codegen/database/introspect/introspect-query.js.map +1 -0
  34. package/dist/codegen/database/introspect/introspect-types.d.ts +45 -0
  35. package/dist/codegen/database/introspect/introspect-types.d.ts.map +1 -0
  36. package/dist/codegen/database/introspect/introspect-types.js +2 -0
  37. package/dist/codegen/database/introspect/introspect-types.js.map +1 -0
  38. package/dist/codegen/database/introspect/introspect.d.ts +21 -0
  39. package/dist/codegen/database/introspect/introspect.d.ts.map +1 -0
  40. package/dist/codegen/database/introspect/introspect.js +223 -0
  41. package/dist/codegen/database/introspect/introspect.js.map +1 -0
  42. package/dist/codegen/database/schema/check-constraint.d.ts +8 -0
  43. package/dist/codegen/database/schema/check-constraint.d.ts.map +1 -0
  44. package/dist/codegen/database/schema/check-constraint.js +12 -0
  45. package/dist/codegen/database/schema/check-constraint.js.map +1 -0
  46. package/dist/codegen/database/schema/column-schema.d.ts +7 -0
  47. package/dist/codegen/database/schema/column-schema.d.ts.map +1 -0
  48. package/dist/codegen/database/schema/column-schema.js +9 -0
  49. package/dist/codegen/database/schema/column-schema.js.map +1 -0
  50. package/dist/codegen/database/schema/constraint-base.d.ts +13 -0
  51. package/dist/codegen/database/schema/constraint-base.d.ts.map +1 -0
  52. package/dist/codegen/database/schema/constraint-base.js +32 -0
  53. package/dist/codegen/database/schema/constraint-base.js.map +1 -0
  54. package/dist/codegen/database/schema/database-schema.d.ts +19 -0
  55. package/dist/codegen/database/schema/database-schema.d.ts.map +1 -0
  56. package/dist/codegen/database/schema/database-schema.js +48 -0
  57. package/dist/codegen/database/schema/database-schema.js.map +1 -0
  58. package/dist/codegen/database/schema/dataobject-schema.d.ts +9 -0
  59. package/dist/codegen/database/schema/dataobject-schema.d.ts.map +1 -0
  60. package/dist/codegen/database/schema/dataobject-schema.js +18 -0
  61. package/dist/codegen/database/schema/dataobject-schema.js.map +1 -0
  62. package/dist/codegen/database/schema/fkey-constraints.d.ts +21 -0
  63. package/dist/codegen/database/schema/fkey-constraints.d.ts.map +1 -0
  64. package/dist/codegen/database/schema/fkey-constraints.js +58 -0
  65. package/dist/codegen/database/schema/fkey-constraints.js.map +1 -0
  66. package/dist/codegen/database/schema/index-constraint.d.ts +34 -0
  67. package/dist/codegen/database/schema/index-constraint.d.ts.map +1 -0
  68. package/dist/codegen/database/schema/index-constraint.js +79 -0
  69. package/dist/codegen/database/schema/index-constraint.js.map +1 -0
  70. package/dist/codegen/database/schema/index.d.ts +5 -0
  71. package/dist/codegen/database/schema/index.d.ts.map +1 -0
  72. package/dist/codegen/database/schema/index.js +5 -0
  73. package/dist/codegen/database/schema/index.js.map +1 -0
  74. package/dist/codegen/database/schema/primarykey-constraint.d.ts +4 -0
  75. package/dist/codegen/database/schema/primarykey-constraint.d.ts.map +1 -0
  76. package/dist/codegen/database/schema/primarykey-constraint.js +4 -0
  77. package/dist/codegen/database/schema/primarykey-constraint.js.map +1 -0
  78. package/dist/codegen/database/schema/relation-schema.d.ts +16 -0
  79. package/dist/codegen/database/schema/relation-schema.d.ts.map +1 -0
  80. package/dist/codegen/database/schema/relation-schema.js +32 -0
  81. package/dist/codegen/database/schema/relation-schema.js.map +1 -0
  82. package/dist/codegen/database/schema/table-column-schema.d.ts +59 -0
  83. package/dist/codegen/database/schema/table-column-schema.d.ts.map +1 -0
  84. package/dist/codegen/database/schema/table-column-schema.js +137 -0
  85. package/dist/codegen/database/schema/table-column-schema.js.map +1 -0
  86. package/dist/codegen/database/schema/table-schema.d.ts +48 -0
  87. package/dist/codegen/database/schema/table-schema.d.ts.map +1 -0
  88. package/dist/codegen/database/schema/table-schema.js +219 -0
  89. package/dist/codegen/database/schema/table-schema.js.map +1 -0
  90. package/dist/codegen/database/schema/types.d.ts +13 -0
  91. package/dist/codegen/database/schema/types.d.ts.map +1 -0
  92. package/dist/codegen/database/schema/types.js +175 -0
  93. package/dist/codegen/database/schema/types.js.map +1 -0
  94. package/dist/codegen/database/schema/unique-constraint.d.ts +4 -0
  95. package/dist/codegen/database/schema/unique-constraint.d.ts.map +1 -0
  96. package/dist/codegen/database/schema/unique-constraint.js +4 -0
  97. package/dist/codegen/database/schema/unique-constraint.js.map +1 -0
  98. package/dist/codegen/database/schema/view-schema.d.ts +14 -0
  99. package/dist/codegen/database/schema/view-schema.d.ts.map +1 -0
  100. package/dist/codegen/database/schema/view-schema.js +32 -0
  101. package/dist/codegen/database/schema/view-schema.js.map +1 -0
  102. package/dist/codegen/generator/ctype-generator.d.ts +5 -0
  103. package/dist/codegen/generator/ctype-generator.d.ts.map +1 -0
  104. package/dist/codegen/generator/ctype-generator.js +26 -0
  105. package/dist/codegen/generator/ctype-generator.js.map +1 -0
  106. package/dist/codegen/generator/generator.d.ts +17 -0
  107. package/dist/codegen/generator/generator.d.ts.map +1 -0
  108. package/dist/codegen/generator/generator.js +57 -0
  109. package/dist/codegen/generator/generator.js.map +1 -0
  110. package/dist/codegen/generator/index.d.ts +8 -0
  111. package/dist/codegen/generator/index.d.ts.map +1 -0
  112. package/dist/codegen/generator/index.js +8 -0
  113. package/dist/codegen/generator/index.js.map +1 -0
  114. package/dist/codegen/generator/openapi-generator.d.ts +239 -0
  115. package/dist/codegen/generator/openapi-generator.d.ts.map +1 -0
  116. package/dist/codegen/generator/openapi-generator.js +434 -0
  117. package/dist/codegen/generator/openapi-generator.js.map +1 -0
  118. package/dist/codegen/generator/openapi-types.d.ts +263 -0
  119. package/dist/codegen/generator/openapi-types.d.ts.map +1 -0
  120. package/dist/codegen/generator/openapi-types.js +11 -0
  121. package/dist/codegen/generator/openapi-types.js.map +1 -0
  122. package/dist/codegen/generator/postgres-schema-generator.d.ts +48 -0
  123. package/dist/codegen/generator/postgres-schema-generator.d.ts.map +1 -0
  124. package/dist/codegen/generator/postgres-schema-generator.js +339 -0
  125. package/dist/codegen/generator/postgres-schema-generator.js.map +1 -0
  126. package/dist/codegen/generator/type-generator.d.ts +113 -0
  127. package/dist/codegen/generator/type-generator.d.ts.map +1 -0
  128. package/dist/codegen/generator/type-generator.js +249 -0
  129. package/dist/codegen/generator/type-generator.js.map +1 -0
  130. package/dist/codegen/generator/zod-generator.d.ts +15 -0
  131. package/dist/codegen/generator/zod-generator.d.ts.map +1 -0
  132. package/dist/codegen/generator/zod-generator.js +86 -0
  133. package/dist/codegen/generator/zod-generator.js.map +1 -0
  134. package/dist/codegen/generator/zod-to-openapi.d.ts +69 -0
  135. package/dist/codegen/generator/zod-to-openapi.d.ts.map +1 -0
  136. package/dist/codegen/generator/zod-to-openapi.js +480 -0
  137. package/dist/codegen/generator/zod-to-openapi.js.map +1 -0
  138. package/dist/codegen/index.d.ts +4 -0
  139. package/dist/codegen/index.d.ts.map +1 -0
  140. package/dist/codegen/index.js +4 -0
  141. package/dist/codegen/index.js.map +1 -0
  142. package/dist/codegen/schema/any-schema.d.ts +6 -0
  143. package/dist/codegen/schema/any-schema.d.ts.map +1 -0
  144. package/dist/codegen/schema/any-schema.js +12 -0
  145. package/dist/codegen/schema/any-schema.js.map +1 -0
  146. package/dist/codegen/schema/boolean-schema.d.ts +6 -0
  147. package/dist/codegen/schema/boolean-schema.d.ts.map +1 -0
  148. package/dist/codegen/schema/boolean-schema.js +12 -0
  149. package/dist/codegen/schema/boolean-schema.js.map +1 -0
  150. package/dist/codegen/schema/date-schema.d.ts +6 -0
  151. package/dist/codegen/schema/date-schema.d.ts.map +1 -0
  152. package/dist/codegen/schema/date-schema.js +12 -0
  153. package/dist/codegen/schema/date-schema.js.map +1 -0
  154. package/dist/codegen/schema/index.d.ts +10 -0
  155. package/dist/codegen/schema/index.d.ts.map +1 -0
  156. package/dist/codegen/schema/index.js +10 -0
  157. package/dist/codegen/schema/index.js.map +1 -0
  158. package/dist/codegen/schema/object-schema.d.ts +10 -0
  159. package/dist/codegen/schema/object-schema.d.ts.map +1 -0
  160. package/dist/codegen/schema/object-schema.js +21 -0
  161. package/dist/codegen/schema/object-schema.js.map +1 -0
  162. package/dist/codegen/schema/primitive-schema.d.ts +20 -0
  163. package/dist/codegen/schema/primitive-schema.d.ts.map +1 -0
  164. package/dist/codegen/schema/primitive-schema.js +48 -0
  165. package/dist/codegen/schema/primitive-schema.js.map +1 -0
  166. package/dist/codegen/schema/ref-schema.d.ts +6 -0
  167. package/dist/codegen/schema/ref-schema.d.ts.map +1 -0
  168. package/dist/codegen/schema/ref-schema.js +11 -0
  169. package/dist/codegen/schema/ref-schema.js.map +1 -0
  170. package/dist/codegen/schema/schema-container.d.ts +14 -0
  171. package/dist/codegen/schema/schema-container.d.ts.map +1 -0
  172. package/dist/codegen/schema/schema-container.js +38 -0
  173. package/dist/codegen/schema/schema-container.js.map +1 -0
  174. package/dist/codegen/schema/schema-object.d.ts +42 -0
  175. package/dist/codegen/schema/schema-object.d.ts.map +1 -0
  176. package/dist/codegen/schema/schema-object.js +90 -0
  177. package/dist/codegen/schema/schema-object.js.map +1 -0
  178. package/dist/codegen/schema/schema-scope.d.ts +23 -0
  179. package/dist/codegen/schema/schema-scope.d.ts.map +1 -0
  180. package/dist/codegen/schema/schema-scope.js +67 -0
  181. package/dist/codegen/schema/schema-scope.js.map +1 -0
  182. package/dist/codegen/schema/utils.d.ts +17 -0
  183. package/dist/codegen/schema/utils.d.ts.map +1 -0
  184. package/dist/codegen/schema/utils.js +47 -0
  185. package/dist/codegen/schema/utils.js.map +1 -0
  186. package/dist/dbcore/crud-statement.d.ts +67 -0
  187. package/dist/dbcore/crud-statement.d.ts.map +1 -0
  188. package/dist/dbcore/crud-statement.js +75 -0
  189. package/dist/dbcore/crud-statement.js.map +1 -0
  190. package/dist/dbcore/database.d.ts +272 -0
  191. package/dist/dbcore/database.d.ts.map +1 -0
  192. package/dist/dbcore/database.js +53 -0
  193. package/dist/dbcore/database.js.map +1 -0
  194. package/dist/dbcore/dataservice-base.d.ts +18 -0
  195. package/dist/dbcore/dataservice-base.d.ts.map +1 -0
  196. package/dist/dbcore/dataservice-base.js +19 -0
  197. package/dist/dbcore/dataservice-base.js.map +1 -0
  198. package/dist/dbcore/delete-statement.d.ts +29 -0
  199. package/dist/dbcore/delete-statement.d.ts.map +1 -0
  200. package/dist/dbcore/delete-statement.js +30 -0
  201. package/dist/dbcore/delete-statement.js.map +1 -0
  202. package/dist/dbcore/filterable-statement.d.ts +126 -0
  203. package/dist/dbcore/filterable-statement.d.ts.map +1 -0
  204. package/dist/dbcore/filterable-statement.js +178 -0
  205. package/dist/dbcore/filterable-statement.js.map +1 -0
  206. package/dist/dbcore/from-statement.d.ts +120 -0
  207. package/dist/dbcore/from-statement.d.ts.map +1 -0
  208. package/dist/dbcore/from-statement.js +150 -0
  209. package/dist/dbcore/from-statement.js.map +1 -0
  210. package/dist/dbcore/index.d.ts +21 -0
  211. package/dist/dbcore/index.d.ts.map +1 -0
  212. package/dist/dbcore/index.js +21 -0
  213. package/dist/dbcore/index.js.map +1 -0
  214. package/dist/dbcore/insert-statement.d.ts +48 -0
  215. package/dist/dbcore/insert-statement.d.ts.map +1 -0
  216. package/dist/dbcore/insert-statement.js +52 -0
  217. package/dist/dbcore/insert-statement.js.map +1 -0
  218. package/dist/dbcore/query-dataservice.d.ts +144 -0
  219. package/dist/dbcore/query-dataservice.d.ts.map +1 -0
  220. package/dist/dbcore/query-dataservice.js +144 -0
  221. package/dist/dbcore/query-dataservice.js.map +1 -0
  222. package/dist/dbcore/statement.d.ts +133 -0
  223. package/dist/dbcore/statement.d.ts.map +1 -0
  224. package/dist/dbcore/statement.js +138 -0
  225. package/dist/dbcore/statement.js.map +1 -0
  226. package/dist/dbcore/update-statement.d.ts +48 -0
  227. package/dist/dbcore/update-statement.d.ts.map +1 -0
  228. package/dist/dbcore/update-statement.js +52 -0
  229. package/dist/dbcore/update-statement.js.map +1 -0
  230. package/dist/expression/builders/comparison-builder.d.ts +47 -0
  231. package/dist/expression/builders/comparison-builder.d.ts.map +1 -0
  232. package/dist/expression/builders/comparison-builder.js +197 -0
  233. package/dist/expression/builders/comparison-builder.js.map +1 -0
  234. package/dist/expression/builders/query-builder.d.ts +80 -0
  235. package/dist/expression/builders/query-builder.d.ts.map +1 -0
  236. package/dist/expression/builders/query-builder.js +229 -0
  237. package/dist/expression/builders/query-builder.js.map +1 -0
  238. package/dist/expression/compiler/postgresql-compiler.d.ts +56 -0
  239. package/dist/expression/compiler/postgresql-compiler.d.ts.map +1 -0
  240. package/dist/expression/compiler/postgresql-compiler.js +217 -0
  241. package/dist/expression/compiler/postgresql-compiler.js.map +1 -0
  242. package/dist/expression/core/ast-node.d.ts +47 -0
  243. package/dist/expression/core/ast-node.d.ts.map +1 -0
  244. package/dist/expression/core/ast-node.js +154 -0
  245. package/dist/expression/core/ast-node.js.map +1 -0
  246. package/dist/expression/core/parameter-manager.d.ts +84 -0
  247. package/dist/expression/core/parameter-manager.d.ts.map +1 -0
  248. package/dist/expression/core/parameter-manager.js +164 -0
  249. package/dist/expression/core/parameter-manager.js.map +1 -0
  250. package/dist/expression/core/query-builder-interfaces.d.ts +188 -0
  251. package/dist/expression/core/query-builder-interfaces.d.ts.map +1 -0
  252. package/dist/expression/core/query-builder-interfaces.js +6 -0
  253. package/dist/expression/core/query-builder-interfaces.js.map +1 -0
  254. package/dist/expression/core/types.d.ts +239 -0
  255. package/dist/expression/core/types.d.ts.map +1 -0
  256. package/dist/expression/core/types.js +121 -0
  257. package/dist/expression/core/types.js.map +1 -0
  258. package/dist/expression/index.d.ts +11 -0
  259. package/dist/expression/index.d.ts.map +1 -0
  260. package/dist/expression/index.js +11 -0
  261. package/dist/expression/index.js.map +1 -0
  262. package/dist/i18n/content-file-source.d.ts +109 -0
  263. package/dist/i18n/content-file-source.d.ts.map +1 -0
  264. package/dist/i18n/content-file-source.js +218 -0
  265. package/dist/i18n/content-file-source.js.map +1 -0
  266. package/dist/i18n/index.d.ts +19 -0
  267. package/dist/i18n/index.d.ts.map +1 -0
  268. package/dist/i18n/index.js +21 -0
  269. package/dist/i18n/index.js.map +1 -0
  270. package/dist/i18n/json-file-source.d.ts +96 -0
  271. package/dist/i18n/json-file-source.d.ts.map +1 -0
  272. package/dist/i18n/json-file-source.js +258 -0
  273. package/dist/i18n/json-file-source.js.map +1 -0
  274. package/dist/i18n/merge-catalogs.d.ts +20 -0
  275. package/dist/i18n/merge-catalogs.d.ts.map +1 -0
  276. package/dist/i18n/merge-catalogs.js +34 -0
  277. package/dist/i18n/merge-catalogs.js.map +1 -0
  278. package/dist/i18n/node.d.ts +20 -0
  279. package/dist/i18n/node.d.ts.map +1 -0
  280. package/dist/i18n/node.js +19 -0
  281. package/dist/i18n/node.js.map +1 -0
  282. package/dist/i18n/translation-source.d.ts +35 -0
  283. package/dist/i18n/translation-source.d.ts.map +1 -0
  284. package/dist/i18n/translation-source.js +2 -0
  285. package/dist/i18n/translation-source.js.map +1 -0
  286. package/dist/i18n/translator.d.ts +162 -0
  287. package/dist/i18n/translator.d.ts.map +1 -0
  288. package/dist/i18n/translator.js +259 -0
  289. package/dist/i18n/translator.js.map +1 -0
  290. package/dist/i18n/types.d.ts +80 -0
  291. package/dist/i18n/types.d.ts.map +1 -0
  292. package/dist/i18n/types.js +2 -0
  293. package/dist/i18n/types.js.map +1 -0
  294. package/dist/postgresql/database.d.ts +204 -0
  295. package/dist/postgresql/database.d.ts.map +1 -0
  296. package/dist/postgresql/database.js +321 -0
  297. package/dist/postgresql/database.js.map +1 -0
  298. package/dist/postgresql/delete-statement.d.ts +36 -0
  299. package/dist/postgresql/delete-statement.d.ts.map +1 -0
  300. package/dist/postgresql/delete-statement.js +54 -0
  301. package/dist/postgresql/delete-statement.js.map +1 -0
  302. package/dist/postgresql/index.d.ts +12 -0
  303. package/dist/postgresql/index.d.ts.map +1 -0
  304. package/dist/postgresql/index.js +12 -0
  305. package/dist/postgresql/index.js.map +1 -0
  306. package/dist/postgresql/insert-statement.d.ts +34 -0
  307. package/dist/postgresql/insert-statement.d.ts.map +1 -0
  308. package/dist/postgresql/insert-statement.js +48 -0
  309. package/dist/postgresql/insert-statement.js.map +1 -0
  310. package/dist/postgresql/update-statement.d.ts +38 -0
  311. package/dist/postgresql/update-statement.d.ts.map +1 -0
  312. package/dist/postgresql/update-statement.js +75 -0
  313. package/dist/postgresql/update-statement.js.map +1 -0
  314. package/dist/stdlib/formatString.d.ts +52 -0
  315. package/dist/stdlib/formatString.d.ts.map +1 -0
  316. package/dist/stdlib/formatString.js +118 -0
  317. package/dist/stdlib/formatString.js.map +1 -0
  318. package/dist/stdlib/index.d.ts +8 -0
  319. package/dist/stdlib/index.d.ts.map +1 -0
  320. package/dist/stdlib/index.js +8 -0
  321. package/dist/stdlib/index.js.map +1 -0
  322. package/dist/stdlib/isBoolean.d.ts +15 -0
  323. package/dist/stdlib/isBoolean.d.ts.map +1 -0
  324. package/dist/stdlib/isBoolean.js +17 -0
  325. package/dist/stdlib/isBoolean.js.map +1 -0
  326. package/dist/stdlib/isNullOrUndef.d.ts +24 -0
  327. package/dist/stdlib/isNullOrUndef.d.ts.map +1 -0
  328. package/dist/stdlib/isNullOrUndef.js +28 -0
  329. package/dist/stdlib/isNullOrUndef.js.map +1 -0
  330. package/dist/stdlib/isNumeric.d.ts +20 -0
  331. package/dist/stdlib/isNumeric.d.ts.map +1 -0
  332. package/dist/stdlib/isNumeric.js +39 -0
  333. package/dist/stdlib/isNumeric.js.map +1 -0
  334. package/dist/stdlib/isString.d.ts +15 -0
  335. package/dist/stdlib/isString.d.ts.map +1 -0
  336. package/dist/stdlib/isString.js +17 -0
  337. package/dist/stdlib/isString.js.map +1 -0
  338. package/dist/stdlib/isTemplateString.d.ts +18 -0
  339. package/dist/stdlib/isTemplateString.d.ts.map +1 -0
  340. package/dist/stdlib/isTemplateString.js +38 -0
  341. package/dist/stdlib/isTemplateString.js.map +1 -0
  342. package/dist/stdlib/wrapInArray.d.ts +14 -0
  343. package/dist/stdlib/wrapInArray.d.ts.map +1 -0
  344. package/dist/stdlib/wrapInArray.js +17 -0
  345. package/dist/stdlib/wrapInArray.js.map +1 -0
  346. package/dist/webafx/application/application-settings.d.ts +129 -0
  347. package/dist/webafx/application/application-settings.d.ts.map +1 -0
  348. package/dist/webafx/application/application-settings.js +162 -0
  349. package/dist/webafx/application/application-settings.js.map +1 -0
  350. package/dist/webafx/application/base-controller.d.ts +128 -0
  351. package/dist/webafx/application/base-controller.d.ts.map +1 -0
  352. package/dist/webafx/application/base-controller.js +122 -0
  353. package/dist/webafx/application/base-controller.js.map +1 -0
  354. package/dist/webafx/application/console-logger.d.ts +81 -0
  355. package/dist/webafx/application/console-logger.d.ts.map +1 -0
  356. package/dist/webafx/application/console-logger.js +111 -0
  357. package/dist/webafx/application/console-logger.js.map +1 -0
  358. package/dist/webafx/application/controller-registry.d.ts +34 -0
  359. package/dist/webafx/application/controller-registry.d.ts.map +1 -0
  360. package/dist/webafx/application/controller-registry.js +32 -0
  361. package/dist/webafx/application/controller-registry.js.map +1 -0
  362. package/dist/webafx/application/error-handler-middleware.d.ts +22 -0
  363. package/dist/webafx/application/error-handler-middleware.d.ts.map +1 -0
  364. package/dist/webafx/application/error-handler-middleware.js +70 -0
  365. package/dist/webafx/application/error-handler-middleware.js.map +1 -0
  366. package/dist/webafx/application/index.d.ts +13 -0
  367. package/dist/webafx/application/index.d.ts.map +1 -0
  368. package/dist/webafx/application/index.js +13 -0
  369. package/dist/webafx/application/index.js.map +1 -0
  370. package/dist/webafx/application/logger.d.ts +2 -0
  371. package/dist/webafx/application/logger.d.ts.map +1 -0
  372. package/dist/webafx/application/logger.js +2 -0
  373. package/dist/webafx/application/logger.js.map +1 -0
  374. package/dist/webafx/application/plugin.d.ts +73 -0
  375. package/dist/webafx/application/plugin.d.ts.map +1 -0
  376. package/dist/webafx/application/plugin.js +90 -0
  377. package/dist/webafx/application/plugin.js.map +1 -0
  378. package/dist/webafx/application/rate-limiter.d.ts +35 -0
  379. package/dist/webafx/application/rate-limiter.d.ts.map +1 -0
  380. package/dist/webafx/application/rate-limiter.js +74 -0
  381. package/dist/webafx/application/rate-limiter.js.map +1 -0
  382. package/dist/webafx/application/request-context.d.ts +62 -0
  383. package/dist/webafx/application/request-context.d.ts.map +1 -0
  384. package/dist/webafx/application/request-context.js +54 -0
  385. package/dist/webafx/application/request-context.js.map +1 -0
  386. package/dist/webafx/application/request-id-middleware.d.ts +30 -0
  387. package/dist/webafx/application/request-id-middleware.d.ts.map +1 -0
  388. package/dist/webafx/application/request-id-middleware.js +57 -0
  389. package/dist/webafx/application/request-id-middleware.js.map +1 -0
  390. package/dist/webafx/application/route-builder.d.ts +231 -0
  391. package/dist/webafx/application/route-builder.d.ts.map +1 -0
  392. package/dist/webafx/application/route-builder.js +182 -0
  393. package/dist/webafx/application/route-builder.js.map +1 -0
  394. package/dist/webafx/application/service-container.d.ts +144 -0
  395. package/dist/webafx/application/service-container.d.ts.map +1 -0
  396. package/dist/webafx/application/service-container.js +192 -0
  397. package/dist/webafx/application/service-container.js.map +1 -0
  398. package/dist/webafx/application/services.d.ts +27 -0
  399. package/dist/webafx/application/services.d.ts.map +1 -0
  400. package/dist/webafx/application/services.js +33 -0
  401. package/dist/webafx/application/services.js.map +1 -0
  402. package/dist/webafx/application/structured-logger.d.ts +99 -0
  403. package/dist/webafx/application/structured-logger.d.ts.map +1 -0
  404. package/dist/webafx/application/structured-logger.js +132 -0
  405. package/dist/webafx/application/structured-logger.js.map +1 -0
  406. package/dist/webafx/application/type.d.ts +29 -0
  407. package/dist/webafx/application/type.d.ts.map +1 -0
  408. package/dist/webafx/application/type.js +2 -0
  409. package/dist/webafx/application/type.js.map +1 -0
  410. package/dist/webafx/application/web-application.d.ts +257 -0
  411. package/dist/webafx/application/web-application.d.ts.map +1 -0
  412. package/dist/webafx/application/web-application.js +611 -0
  413. package/dist/webafx/application/web-application.js.map +1 -0
  414. package/dist/webafx/errors/api-error.d.ts +21 -0
  415. package/dist/webafx/errors/api-error.d.ts.map +1 -0
  416. package/dist/webafx/errors/api-error.js +38 -0
  417. package/dist/webafx/errors/api-error.js.map +1 -0
  418. package/dist/webafx/errors/http-errors.d.ts +56 -0
  419. package/dist/webafx/errors/http-errors.d.ts.map +1 -0
  420. package/dist/webafx/errors/http-errors.js +74 -0
  421. package/dist/webafx/errors/http-errors.js.map +1 -0
  422. package/dist/webafx/errors/index.d.ts +4 -0
  423. package/dist/webafx/errors/index.d.ts.map +1 -0
  424. package/dist/webafx/errors/index.js +4 -0
  425. package/dist/webafx/errors/index.js.map +1 -0
  426. package/dist/webafx/errors/types.d.ts +42 -0
  427. package/dist/webafx/errors/types.d.ts.map +1 -0
  428. package/dist/webafx/errors/types.js +2 -0
  429. package/dist/webafx/errors/types.js.map +1 -0
  430. package/dist/webafx/index.d.ts +3 -0
  431. package/dist/webafx/index.d.ts.map +1 -0
  432. package/dist/webafx/index.js +3 -0
  433. package/dist/webafx/index.js.map +1 -0
  434. package/dist/webafx-auth/abstract-auth-provider.d.ts +178 -0
  435. package/dist/webafx-auth/abstract-auth-provider.d.ts.map +1 -0
  436. package/dist/webafx-auth/abstract-auth-provider.js +240 -0
  437. package/dist/webafx-auth/abstract-auth-provider.js.map +1 -0
  438. package/dist/webafx-auth/index.d.ts +27 -0
  439. package/dist/webafx-auth/index.d.ts.map +1 -0
  440. package/dist/webafx-auth/index.js +32 -0
  441. package/dist/webafx-auth/index.js.map +1 -0
  442. package/dist/webafx-auth/jwt-auth-provider.d.ts +100 -0
  443. package/dist/webafx-auth/jwt-auth-provider.d.ts.map +1 -0
  444. package/dist/webafx-auth/jwt-auth-provider.js +154 -0
  445. package/dist/webafx-auth/jwt-auth-provider.js.map +1 -0
  446. package/dist/webafx-auth/memory-auth-provider.d.ts +100 -0
  447. package/dist/webafx-auth/memory-auth-provider.d.ts.map +1 -0
  448. package/dist/webafx-auth/memory-auth-provider.js +122 -0
  449. package/dist/webafx-auth/memory-auth-provider.js.map +1 -0
  450. package/dist/webafx-auth/types.d.ts +333 -0
  451. package/dist/webafx-auth/types.d.ts.map +1 -0
  452. package/dist/webafx-auth/types.js +24 -0
  453. package/dist/webafx-auth/types.js.map +1 -0
  454. package/dist/webafx-cache/abstract-cache-provider.d.ts +185 -0
  455. package/dist/webafx-cache/abstract-cache-provider.d.ts.map +1 -0
  456. package/dist/webafx-cache/abstract-cache-provider.js +133 -0
  457. package/dist/webafx-cache/abstract-cache-provider.js.map +1 -0
  458. package/dist/webafx-cache/abstract-pubsub-provider.d.ts +170 -0
  459. package/dist/webafx-cache/abstract-pubsub-provider.d.ts.map +1 -0
  460. package/dist/webafx-cache/abstract-pubsub-provider.js +132 -0
  461. package/dist/webafx-cache/abstract-pubsub-provider.js.map +1 -0
  462. package/dist/webafx-cache/cache-plugin.d.ts +114 -0
  463. package/dist/webafx-cache/cache-plugin.d.ts.map +1 -0
  464. package/dist/webafx-cache/cache-plugin.js +176 -0
  465. package/dist/webafx-cache/cache-plugin.js.map +1 -0
  466. package/dist/webafx-cache/index.d.ts +33 -0
  467. package/dist/webafx-cache/index.d.ts.map +1 -0
  468. package/dist/webafx-cache/index.js +44 -0
  469. package/dist/webafx-cache/index.js.map +1 -0
  470. package/dist/webafx-cache/memory-cache-provider.d.ts +99 -0
  471. package/dist/webafx-cache/memory-cache-provider.d.ts.map +1 -0
  472. package/dist/webafx-cache/memory-cache-provider.js +251 -0
  473. package/dist/webafx-cache/memory-cache-provider.js.map +1 -0
  474. package/dist/webafx-cache/memory-pubsub-provider.d.ts +124 -0
  475. package/dist/webafx-cache/memory-pubsub-provider.d.ts.map +1 -0
  476. package/dist/webafx-cache/memory-pubsub-provider.js +195 -0
  477. package/dist/webafx-cache/memory-pubsub-provider.js.map +1 -0
  478. package/dist/webafx-cache/pubsub-plugin.d.ts +128 -0
  479. package/dist/webafx-cache/pubsub-plugin.d.ts.map +1 -0
  480. package/dist/webafx-cache/pubsub-plugin.js +182 -0
  481. package/dist/webafx-cache/pubsub-plugin.js.map +1 -0
  482. package/dist/webafx-cache/redis-cache-provider.d.ts +81 -0
  483. package/dist/webafx-cache/redis-cache-provider.d.ts.map +1 -0
  484. package/dist/webafx-cache/redis-cache-provider.js +209 -0
  485. package/dist/webafx-cache/redis-cache-provider.js.map +1 -0
  486. package/dist/webafx-cache/redis-pubsub-provider.d.ts +164 -0
  487. package/dist/webafx-cache/redis-pubsub-provider.d.ts.map +1 -0
  488. package/dist/webafx-cache/redis-pubsub-provider.js +329 -0
  489. package/dist/webafx-cache/redis-pubsub-provider.js.map +1 -0
  490. package/dist/webafx-cache/types.d.ts +206 -0
  491. package/dist/webafx-cache/types.d.ts.map +1 -0
  492. package/dist/webafx-cache/types.js +27 -0
  493. package/dist/webafx-cache/types.js.map +1 -0
  494. package/dist/webafx-i18n/i18n-plugin.d.ts +29 -0
  495. package/dist/webafx-i18n/i18n-plugin.d.ts.map +1 -0
  496. package/dist/webafx-i18n/i18n-plugin.js +145 -0
  497. package/dist/webafx-i18n/i18n-plugin.js.map +1 -0
  498. package/dist/webafx-i18n/index.d.ts +12 -0
  499. package/dist/webafx-i18n/index.d.ts.map +1 -0
  500. package/dist/webafx-i18n/index.js +12 -0
  501. package/dist/webafx-i18n/index.js.map +1 -0
  502. package/dist/webafx-i18n/locale-resolver.d.ts +33 -0
  503. package/dist/webafx-i18n/locale-resolver.d.ts.map +1 -0
  504. package/dist/webafx-i18n/locale-resolver.js +67 -0
  505. package/dist/webafx-i18n/locale-resolver.js.map +1 -0
  506. package/dist/webafx-i18n/postgresql-source.d.ts +101 -0
  507. package/dist/webafx-i18n/postgresql-source.d.ts.map +1 -0
  508. package/dist/webafx-i18n/postgresql-source.js +101 -0
  509. package/dist/webafx-i18n/postgresql-source.js.map +1 -0
  510. package/dist/webafx-i18n/types.d.ts +70 -0
  511. package/dist/webafx-i18n/types.d.ts.map +1 -0
  512. package/dist/webafx-i18n/types.js +2 -0
  513. package/dist/webafx-i18n/types.js.map +1 -0
  514. package/dist/webafx-mailer/abstract-mail-provider.d.ts +55 -0
  515. package/dist/webafx-mailer/abstract-mail-provider.d.ts.map +1 -0
  516. package/dist/webafx-mailer/abstract-mail-provider.js +37 -0
  517. package/dist/webafx-mailer/abstract-mail-provider.js.map +1 -0
  518. package/dist/webafx-mailer/index.d.ts +24 -0
  519. package/dist/webafx-mailer/index.d.ts.map +1 -0
  520. package/dist/webafx-mailer/index.js +34 -0
  521. package/dist/webafx-mailer/index.js.map +1 -0
  522. package/dist/webafx-mailer/mail-plugin.d.ts +98 -0
  523. package/dist/webafx-mailer/mail-plugin.d.ts.map +1 -0
  524. package/dist/webafx-mailer/mail-plugin.js +155 -0
  525. package/dist/webafx-mailer/mail-plugin.js.map +1 -0
  526. package/dist/webafx-mailer/memory-mail-provider.d.ts +85 -0
  527. package/dist/webafx-mailer/memory-mail-provider.d.ts.map +1 -0
  528. package/dist/webafx-mailer/memory-mail-provider.js +111 -0
  529. package/dist/webafx-mailer/memory-mail-provider.js.map +1 -0
  530. package/dist/webafx-mailer/smtp-mail-provider.d.ts +65 -0
  531. package/dist/webafx-mailer/smtp-mail-provider.d.ts.map +1 -0
  532. package/dist/webafx-mailer/smtp-mail-provider.js +113 -0
  533. package/dist/webafx-mailer/smtp-mail-provider.js.map +1 -0
  534. package/dist/webafx-mailer/types.d.ts +136 -0
  535. package/dist/webafx-mailer/types.d.ts.map +1 -0
  536. package/dist/webafx-mailer/types.js +13 -0
  537. package/dist/webafx-mailer/types.js.map +1 -0
  538. package/package.json +159 -0
@@ -0,0 +1,75 @@
1
+ import { UpdateStatement } from '../dbcore/index.js';
2
+ /**
3
+ * Provides PostgreSQL-specific implementation for UPDATE statement construction.
4
+ * Builds parameterized UPDATE queries with SET, WHERE, and RETURNING clauses.
5
+ * Extends the base UpdateStatement class with PostgreSQL syntax.
6
+ *
7
+ * @export
8
+ * @class PostgreSQLUpdateStatement
9
+ * @template TableType - The type representing the table structure for type-safe updates
10
+ * @template FilterType - The type representing the filter criteria for the WHERE clause
11
+ * @extends {UpdateStatement<TableType, FilterType>}
12
+ */
13
+ export class PostgreSQLUpdateStatement extends UpdateStatement {
14
+ /**
15
+ * Constructs the PostgreSQL UPDATE query string with SET, WHERE, and RETURNING clauses.
16
+ * Generates parameterized query with named parameters for values (prefixed with 'v_')
17
+ * and uses expression builder for complex WHERE conditions.
18
+ * Supports optional RETURNING clause to retrieve updated row data.
19
+ *
20
+ * @protected
21
+ * @return {string} The complete UPDATE query string
22
+ * @memberof PostgreSQLUpdateStatement
23
+ */
24
+ buildQuery() {
25
+ const keys = Object.keys(this._values);
26
+ // Validate that values are provided — empty SET clause is invalid SQL
27
+ if (keys.length === 0) {
28
+ throw new Error(`Cannot build UPDATE statement for table "${this.tableName}": no values provided. ` +
29
+ 'Call .values() with at least one column before executing.');
30
+ }
31
+ let queryStr = `UPDATE ${this.tableName} SET `;
32
+ const setClauses = [];
33
+ // Build SET clause from values to update
34
+ // Each value key becomes a parameterized assignment with 'v_' prefix (e.g., column = :v_column)
35
+ Object.keys(this._values).forEach(key => {
36
+ setClauses.push(`${key} = :v_${key}`);
37
+ });
38
+ // Append SET clause with comma-separated assignments
39
+ queryStr += setClauses.join(', ');
40
+ // Build WHERE clause from cached compiled expression
41
+ const compiled = this.getCompiledExpression();
42
+ if (compiled?.sql) {
43
+ queryStr += ` WHERE ${compiled.sql}`;
44
+ }
45
+ // Add RETURNING clause if specified to retrieve updated row data
46
+ if (this._returning.length > 0) {
47
+ queryStr += ` RETURNING ${this._returning.join(', ')}`;
48
+ }
49
+ return queryStr.trim();
50
+ }
51
+ /**
52
+ * Builds the parameter object for the UPDATE query.
53
+ * Combines value parameters (prefixed with 'v_') and expression parameters.
54
+ * Returns an object mapping parameter names to their values for query execution.
55
+ *
56
+ * @protected
57
+ * @return {Object} Object containing named parameters for both values and WHERE clause
58
+ * @memberof PostgreSQLUpdateStatement
59
+ */
60
+ buildParameters() {
61
+ const params = {};
62
+ // Add values parameters with 'v_' prefix (columns to update)
63
+ // This prevents conflicts with expression parameters
64
+ Object.keys(this._values).forEach(key => {
65
+ params[`v_${key}`] = this._values[key];
66
+ });
67
+ // Get parameters from cached compiled expression
68
+ const compiled = this.getCompiledExpression();
69
+ if (compiled) {
70
+ Object.assign(params, compiled.params);
71
+ }
72
+ return params;
73
+ }
74
+ }
75
+ //# sourceMappingURL=update-statement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-statement.js","sourceRoot":"","sources":["../src/update-statement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;;;;;;;;GAUG;AACH,MAAM,OAAO,yBAAiD,SAAQ,eAGrE;IACC;;;;;;;;;OASG;IACO,UAAU;QAClB,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAEvC,sEAAsE;QACtE,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CACb,4CAA4C,IAAI,CAAC,SAAS,yBAAyB;gBACjF,2DAA2D,CAC9D,CAAC;QACJ,CAAC;QAED,IAAI,QAAQ,GAAG,UAAU,IAAI,CAAC,SAAS,OAAO,CAAC;QAC/C,MAAM,UAAU,GAAa,EAAE,CAAC;QAEhC,yCAAyC;QACzC,gGAAgG;QAChG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YACtC,UAAU,CAAC,IAAI,CAAC,GAAG,GAAG,SAAS,GAAG,EAAE,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;QAEH,qDAAqD;QACrD,QAAQ,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAElC,qDAAqD;QACrD,MAAM,QAAQ,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC9C,IAAI,QAAQ,EAAE,GAAG,EAAE,CAAC;YAClB,QAAQ,IAAI,UAAU,QAAQ,CAAC,GAAG,EAAE,CAAC;QACvC,CAAC;QAED,iEAAiE;QACjE,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC/B,QAAQ,IAAI,cAAc,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACzD,CAAC;QAED,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;IACzB,CAAC;IAED;;;;;;;;OAQG;IACO,eAAe;QACvB,MAAM,MAAM,GAA2B,EAAE,CAAC;QAE1C,6DAA6D;QAC7D,qDAAqD;QACrD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YACtC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC,GAAI,IAAI,CAAC,OAAe,CAAC,GAAG,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;QAEH,iDAAiD;QACjD,MAAM,QAAQ,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC9C,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;QACzC,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Format a string by replacing ${...} placeholders with values from a params object.
3
+ *
4
+ * Supported placeholder syntax:
5
+ * - `${name}` — Simple substitution from params.name
6
+ * - `${name|default}` — Use "default" if params.name is undefined/null/empty
7
+ * - `${user.name}` — Dot-notation for nested object access
8
+ * - `${user.name|Anonymous}` — Dot-notation with default value
9
+ *
10
+ * Behavior:
11
+ * - If a key is found in params and is not null/undefined/empty-string, its string value is used
12
+ * - If a key is not found and a default is provided, the default is used
13
+ * - If a key is not found and no default is provided, the raw placeholder is kept
14
+ * (e.g., "${unknown}" stays as "${unknown}")
15
+ * - Zero (0) and false are valid values — they are converted to string
16
+ * - Empty string ("") is treated as missing — falls through to default
17
+ *
18
+ * @param template - The template string containing ${...} placeholders
19
+ * @param params - Object with values to substitute (supports nested objects)
20
+ * @returns The formatted string with placeholders replaced
21
+ *
22
+ * @example
23
+ * // Simple substitution
24
+ * formatString("Hello ${name}", { name: "John" })
25
+ * // → "Hello John"
26
+ *
27
+ * // Default value
28
+ * formatString("Hello ${name|Guest}")
29
+ * // → "Hello Guest"
30
+ *
31
+ * // With provided value (default ignored)
32
+ * formatString("Hello ${name|Guest}", { name: "John" })
33
+ * // → "Hello John"
34
+ *
35
+ * // Dot-notation
36
+ * formatString("${user.name} lives in ${user.city}", { user: { name: "Alice", city: "Amsterdam" } })
37
+ * // → "Alice lives in Amsterdam"
38
+ *
39
+ * // Missing key (no default) — placeholder kept
40
+ * formatString("Hello ${unknown}")
41
+ * // → "Hello ${unknown}"
42
+ *
43
+ * // Numeric values
44
+ * formatString("Found ${count} items", { count: 42 })
45
+ * // → "Found 42 items"
46
+ *
47
+ * // Empty string with default
48
+ * formatString("Hello ${name|Guest}", { name: "" })
49
+ * // → "Hello Guest"
50
+ */
51
+ export declare function formatString(template: string, params?: Record<string, unknown>): string;
52
+ //# sourceMappingURL=formatString.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatString.d.ts","sourceRoot":"","sources":["../src/formatString.ts"],"names":[],"mappings":"AA0CA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CA+BvF"}
@@ -0,0 +1,118 @@
1
+ /**
2
+ * Global regex for matching all ${...} placeholders in a template.
3
+ * Uses the 'g' flag to match all occurrences.
4
+ *
5
+ * Pattern breakdown:
6
+ * \$\{ — literal ${
7
+ * \s* — optional whitespace inside braces
8
+ * ( — capture group 1: the full expression
9
+ * [\w.]+ — one or more word chars or dots (the key path)
10
+ * (?:\s*\|[^}]*)? — optional: pipe + default value (anything except })
11
+ * )
12
+ * \s* — optional trailing whitespace
13
+ * \} — literal }
14
+ *
15
+ * Capture groups:
16
+ * - Group 1: The full expression inside ${ } (e.g., "name|default")
17
+ */
18
+ const PLACEHOLDER_REGEX_G = /\$\{\s*([\w.]+(?:\s*\|[^}]*)?)\s*\}/g;
19
+ /**
20
+ * Resolve a dot-notation path against a nested object.
21
+ *
22
+ * Walks each segment of the dot-separated path, returning `undefined`
23
+ * if any intermediate segment is null or undefined.
24
+ *
25
+ * @param obj - The root object to resolve against
26
+ * @param path - Dot-separated path (e.g., "user.name", "address.city")
27
+ * @returns The resolved value, or undefined if any segment is missing
28
+ *
29
+ * @example
30
+ * resolveNestedKey({ user: { name: "Alice" } }, "user.name") // → "Alice"
31
+ * resolveNestedKey({ user: { name: "Alice" } }, "user.age") // → undefined
32
+ * resolveNestedKey({ name: "Bob" }, "name") // → "Bob"
33
+ */
34
+ function resolveNestedKey(obj, path) {
35
+ return path.split(".").reduce((current, segment) => {
36
+ // Bail out early if we hit a null/undefined intermediate
37
+ if (current === null || current === undefined)
38
+ return undefined;
39
+ return current[segment];
40
+ }, obj);
41
+ }
42
+ /**
43
+ * Format a string by replacing ${...} placeholders with values from a params object.
44
+ *
45
+ * Supported placeholder syntax:
46
+ * - `${name}` — Simple substitution from params.name
47
+ * - `${name|default}` — Use "default" if params.name is undefined/null/empty
48
+ * - `${user.name}` — Dot-notation for nested object access
49
+ * - `${user.name|Anonymous}` — Dot-notation with default value
50
+ *
51
+ * Behavior:
52
+ * - If a key is found in params and is not null/undefined/empty-string, its string value is used
53
+ * - If a key is not found and a default is provided, the default is used
54
+ * - If a key is not found and no default is provided, the raw placeholder is kept
55
+ * (e.g., "${unknown}" stays as "${unknown}")
56
+ * - Zero (0) and false are valid values — they are converted to string
57
+ * - Empty string ("") is treated as missing — falls through to default
58
+ *
59
+ * @param template - The template string containing ${...} placeholders
60
+ * @param params - Object with values to substitute (supports nested objects)
61
+ * @returns The formatted string with placeholders replaced
62
+ *
63
+ * @example
64
+ * // Simple substitution
65
+ * formatString("Hello ${name}", { name: "John" })
66
+ * // → "Hello John"
67
+ *
68
+ * // Default value
69
+ * formatString("Hello ${name|Guest}")
70
+ * // → "Hello Guest"
71
+ *
72
+ * // With provided value (default ignored)
73
+ * formatString("Hello ${name|Guest}", { name: "John" })
74
+ * // → "Hello John"
75
+ *
76
+ * // Dot-notation
77
+ * formatString("${user.name} lives in ${user.city}", { user: { name: "Alice", city: "Amsterdam" } })
78
+ * // → "Alice lives in Amsterdam"
79
+ *
80
+ * // Missing key (no default) — placeholder kept
81
+ * formatString("Hello ${unknown}")
82
+ * // → "Hello ${unknown}"
83
+ *
84
+ * // Numeric values
85
+ * formatString("Found ${count} items", { count: 42 })
86
+ * // → "Found 42 items"
87
+ *
88
+ * // Empty string with default
89
+ * formatString("Hello ${name|Guest}", { name: "" })
90
+ * // → "Hello Guest"
91
+ */
92
+ export function formatString(template, params) {
93
+ // Fast path: no placeholders in template at all
94
+ if (!template.includes("${")) {
95
+ return template;
96
+ }
97
+ // Use empty object when no params provided — defaults still need to be resolved
98
+ const resolvedParams = params ?? {};
99
+ return template.replace(PLACEHOLDER_REGEX_G, (match, expression) => {
100
+ // Split on first pipe to separate key from default value
101
+ const pipeIndex = expression.indexOf("|");
102
+ const key = (pipeIndex >= 0 ? expression.slice(0, pipeIndex) : expression).trim();
103
+ const defaultValue = pipeIndex >= 0 ? expression.slice(pipeIndex + 1) : undefined;
104
+ // Resolve the value from params (supports dot-notation paths)
105
+ const value = resolveNestedKey(resolvedParams, key);
106
+ // Use the value if it's defined, not null, and not empty string
107
+ if (value !== undefined && value !== null && value !== "") {
108
+ return String(value);
109
+ }
110
+ // Fall back to default value if provided (pipe was present)
111
+ if (defaultValue !== undefined) {
112
+ return defaultValue;
113
+ }
114
+ // No value and no default — keep the raw placeholder unchanged
115
+ return match;
116
+ });
117
+ }
118
+ //# sourceMappingURL=formatString.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatString.js","sourceRoot":"","sources":["../src/formatString.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,mBAAmB,GAAG,sCAAsC,CAAC;AAEnE;;;;;;;;;;;;;;GAcG;AACH,SAAS,gBAAgB,CAAC,GAA4B,EAAE,IAAY;IAChE,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAU,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;QACxD,yDAAyD;QACzD,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS;YAAE,OAAO,SAAS,CAAC;QAChE,OAAQ,OAAmC,CAAC,OAAO,CAAC,CAAC;IACzD,CAAC,EAAE,GAAG,CAAC,CAAC;AACZ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,MAAM,UAAU,YAAY,CAAC,QAAgB,EAAE,MAAgC;IAC3E,gDAAgD;IAChD,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3B,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED,gFAAgF;IAChF,MAAM,cAAc,GAAG,MAAM,IAAI,EAAE,CAAC;IAEpC,OAAO,QAAQ,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC,KAAK,EAAE,UAAkB,EAAE,EAAE;QACvE,yDAAyD;QACzD,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC1C,MAAM,GAAG,GAAG,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,IAAI,EAAE,CAAC;QAClF,MAAM,YAAY,GAAG,SAAS,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAElF,8DAA8D;QAC9D,MAAM,KAAK,GAAG,gBAAgB,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;QAEpD,gEAAgE;QAChE,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;YACxD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC;QAED,4DAA4D;QAC5D,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;YAC7B,OAAO,YAAY,CAAC;QACxB,CAAC;QAED,+DAA+D;QAC/D,OAAO,KAAK,CAAC;IACjB,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,8 @@
1
+ export * from './formatString.js';
2
+ export * from './isBoolean.js';
3
+ export * from './isNullOrUndef.js';
4
+ export * from './isNumeric.js';
5
+ export * from './isString.js';
6
+ export * from './isTemplateString.js';
7
+ export * from './wrapInArray.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,8 @@
1
+ export * from './formatString.js';
2
+ export * from './isBoolean.js';
3
+ export * from './isNullOrUndef.js';
4
+ export * from './isNumeric.js';
5
+ export * from './isString.js';
6
+ export * from './isTemplateString.js';
7
+ export * from './wrapInArray.js';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Tests whether the given value is a boolean primitive.
3
+ *
4
+ * Uses a type predicate so TypeScript narrows the type to `boolean`
5
+ * inside conditional blocks after calling this function.
6
+ *
7
+ * Note: `new Boolean(true)` creates an object wrapper, not a primitive,
8
+ * so this function returns `false` for Boolean object wrappers.
9
+ *
10
+ * @export
11
+ * @param {unknown} value - The value to test.
12
+ * @returns {boolean} True if the value is a boolean primitive, false otherwise.
13
+ */
14
+ export declare function isBoolean(value: unknown): value is boolean;
15
+ //# sourceMappingURL=isBoolean.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isBoolean.d.ts","sourceRoot":"","sources":["../src/isBoolean.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,OAAO,CAE1D"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Tests whether the given value is a boolean primitive.
3
+ *
4
+ * Uses a type predicate so TypeScript narrows the type to `boolean`
5
+ * inside conditional blocks after calling this function.
6
+ *
7
+ * Note: `new Boolean(true)` creates an object wrapper, not a primitive,
8
+ * so this function returns `false` for Boolean object wrappers.
9
+ *
10
+ * @export
11
+ * @param {unknown} value - The value to test.
12
+ * @returns {boolean} True if the value is a boolean primitive, false otherwise.
13
+ */
14
+ export function isBoolean(value) {
15
+ return typeof value === "boolean";
16
+ }
17
+ //# sourceMappingURL=isBoolean.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isBoolean.js","sourceRoot":"","sources":["../src/isBoolean.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc;IACpC,OAAO,OAAO,KAAK,KAAK,SAAS,CAAC;AACtC,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Tests whether the given value is null or undefined.
3
+ *
4
+ * Uses a type predicate to narrow the type in TypeScript conditional blocks.
5
+ * After calling `if (!isNullOrUndef(value))`, TypeScript knows `value` is
6
+ * neither `null` nor `undefined`.
7
+ *
8
+ * @export
9
+ * @param {unknown} value - The value to test.
10
+ * @returns {boolean} True if the value is null or undefined, false otherwise.
11
+ */
12
+ export declare function isNullOrUndef(value: unknown): value is null | undefined;
13
+ /**
14
+ * Tests whether the given value is null or undefined and returns
15
+ * a default value if so.
16
+ *
17
+ * @export
18
+ * @template ReturnType
19
+ * @param {ReturnType} value - The value to test.
20
+ * @param {ReturnType} defaultValue - The fallback value to return when value is null/undefined.
21
+ * @returns {ReturnType} The original value if defined, otherwise the default value.
22
+ */
23
+ export declare function isNullOrUndefDefault<ReturnType>(value: ReturnType, defaultValue: ReturnType): ReturnType;
24
+ //# sourceMappingURL=isNullOrUndef.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isNullOrUndef.d.ts","sourceRoot":"","sources":["../src/isNullOrUndef.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,IAAI,GAAG,SAAS,CAEvE;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,GAAG,UAAU,CAExG"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Tests whether the given value is null or undefined.
3
+ *
4
+ * Uses a type predicate to narrow the type in TypeScript conditional blocks.
5
+ * After calling `if (!isNullOrUndef(value))`, TypeScript knows `value` is
6
+ * neither `null` nor `undefined`.
7
+ *
8
+ * @export
9
+ * @param {unknown} value - The value to test.
10
+ * @returns {boolean} True if the value is null or undefined, false otherwise.
11
+ */
12
+ export function isNullOrUndef(value) {
13
+ return value === null || value === undefined;
14
+ }
15
+ /**
16
+ * Tests whether the given value is null or undefined and returns
17
+ * a default value if so.
18
+ *
19
+ * @export
20
+ * @template ReturnType
21
+ * @param {ReturnType} value - The value to test.
22
+ * @param {ReturnType} defaultValue - The fallback value to return when value is null/undefined.
23
+ * @returns {ReturnType} The original value if defined, otherwise the default value.
24
+ */
25
+ export function isNullOrUndefDefault(value, defaultValue) {
26
+ return isNullOrUndef(value) ? defaultValue : value;
27
+ }
28
+ //# sourceMappingURL=isNullOrUndef.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isNullOrUndef.js","sourceRoot":"","sources":["../src/isNullOrUndef.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,aAAa,CAAC,KAAc;IACxC,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AACjD,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,oBAAoB,CAAa,KAAiB,EAAE,YAAwB;IACxF,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC;AACvD,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Tests whether the given value is numeric.
3
+ *
4
+ * Accepts finite numbers and strings that represent valid, complete numbers.
5
+ * Unlike the previous implementation that used `parseFloat` (which would
6
+ * accept "42px" or "3.14em"), this implementation requires the entire
7
+ * value to be a valid number.
8
+ *
9
+ * Specifically:
10
+ * - Returns `true` for finite number primitives (not NaN, not Infinity).
11
+ * - Returns `true` for string representations of finite numbers (e.g., "42", "3.14", "-100", "1e10").
12
+ * - Returns `false` for NaN, Infinity, booleans, null, undefined, objects, arrays, etc.
13
+ * - Returns `false` for partial numeric strings like "42px", "3.14em", "100%".
14
+ *
15
+ * @export
16
+ * @param {unknown} value - The value to test.
17
+ * @returns {boolean} True if the value is a finite number or a string that fully represents one.
18
+ */
19
+ export declare function isNumeric(value: unknown): boolean;
20
+ //# sourceMappingURL=isNumeric.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isNumeric.d.ts","sourceRoot":"","sources":["../src/isNumeric.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAsBjD"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Tests whether the given value is numeric.
3
+ *
4
+ * Accepts finite numbers and strings that represent valid, complete numbers.
5
+ * Unlike the previous implementation that used `parseFloat` (which would
6
+ * accept "42px" or "3.14em"), this implementation requires the entire
7
+ * value to be a valid number.
8
+ *
9
+ * Specifically:
10
+ * - Returns `true` for finite number primitives (not NaN, not Infinity).
11
+ * - Returns `true` for string representations of finite numbers (e.g., "42", "3.14", "-100", "1e10").
12
+ * - Returns `false` for NaN, Infinity, booleans, null, undefined, objects, arrays, etc.
13
+ * - Returns `false` for partial numeric strings like "42px", "3.14em", "100%".
14
+ *
15
+ * @export
16
+ * @param {unknown} value - The value to test.
17
+ * @returns {boolean} True if the value is a finite number or a string that fully represents one.
18
+ */
19
+ export function isNumeric(value) {
20
+ // Handle number primitives directly: must be finite (rejects NaN and Infinity)
21
+ if (typeof value === "number") {
22
+ return Number.isFinite(value);
23
+ }
24
+ // Handle string values: must fully represent a finite number
25
+ if (typeof value === "string") {
26
+ // Reject empty or whitespace-only strings
27
+ const trimmed = value.trim();
28
+ if (trimmed === "") {
29
+ return false;
30
+ }
31
+ // Use the unary + operator which converts the full string to a number.
32
+ // Unlike parseFloat, +"42px" returns NaN (not 42).
33
+ const num = +trimmed;
34
+ return Number.isFinite(num);
35
+ }
36
+ // All other types (boolean, null, undefined, objects, arrays, symbols, bigint, etc.)
37
+ return false;
38
+ }
39
+ //# sourceMappingURL=isNumeric.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isNumeric.js","sourceRoot":"","sources":["../src/isNumeric.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc;IACpC,+EAA+E;IAC/E,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC5B,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAED,6DAA6D;IAC7D,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC5B,0CAA0C;QAC1C,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;QAC7B,IAAI,OAAO,KAAK,EAAE,EAAE,CAAC;YACjB,OAAO,KAAK,CAAC;QACjB,CAAC;QAED,uEAAuE;QACvE,mDAAmD;QACnD,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;QACrB,OAAO,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;IAED,qFAAqF;IACrF,OAAO,KAAK,CAAC;AACjB,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Tests whether the given value is a string primitive.
3
+ *
4
+ * Uses a type predicate so TypeScript narrows the type to `string`
5
+ * inside conditional blocks after calling this function.
6
+ *
7
+ * Note: `new String("hello")` creates an object wrapper, not a primitive,
8
+ * so this function returns `false` for String object wrappers.
9
+ *
10
+ * @export
11
+ * @param {unknown} value - The value to test.
12
+ * @returns {boolean} True if the value is a string primitive, false otherwise.
13
+ */
14
+ export declare function isString(value: unknown): value is string;
15
+ //# sourceMappingURL=isString.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isString.d.ts","sourceRoot":"","sources":["../src/isString.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAExD"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Tests whether the given value is a string primitive.
3
+ *
4
+ * Uses a type predicate so TypeScript narrows the type to `string`
5
+ * inside conditional blocks after calling this function.
6
+ *
7
+ * Note: `new String("hello")` creates an object wrapper, not a primitive,
8
+ * so this function returns `false` for String object wrappers.
9
+ *
10
+ * @export
11
+ * @param {unknown} value - The value to test.
12
+ * @returns {boolean} True if the value is a string primitive, false otherwise.
13
+ */
14
+ export function isString(value) {
15
+ return typeof value === "string";
16
+ }
17
+ //# sourceMappingURL=isString.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isString.js","sourceRoot":"","sources":["../src/isString.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AACrC,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Check if a string contains ${...} template placeholders.
3
+ *
4
+ * Returns true if the string contains at least one valid placeholder
5
+ * matching the ${key}, ${key|default}, or ${path.to.key} syntax.
6
+ *
7
+ * @param value - The string to check
8
+ * @returns true if the string contains at least one ${...} placeholder
9
+ *
10
+ * @example
11
+ * isTemplateString("Hello ${name}") // → true
12
+ * isTemplateString("Hello ${name|World}") // → true
13
+ * isTemplateString("${user.name}") // → true
14
+ * isTemplateString("Hello world") // → false
15
+ * isTemplateString("") // → false
16
+ */
17
+ export declare function isTemplateString(value: string): boolean;
18
+ //# sourceMappingURL=isTemplateString.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isTemplateString.d.ts","sourceRoot":"","sources":["../src/isTemplateString.ts"],"names":[],"mappings":"AAmBA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEvD"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Regex pattern for detecting ${...} placeholders in a string.
3
+ *
4
+ * Matches: ${name}, ${name|default}, ${user.name}, ${user.name|fallback}
5
+ *
6
+ * Pattern breakdown:
7
+ * \$\{ — literal ${
8
+ * \s* — optional whitespace
9
+ * [\w.]+ — one or more word chars or dots (the key path)
10
+ * \s* — optional whitespace
11
+ * (?:\|[^}]*)? — optional: pipe + default value (anything except })
12
+ * \s* — optional whitespace
13
+ * \} — literal }
14
+ *
15
+ * Does NOT use the 'g' flag — we only need to find one match to confirm
16
+ * the string is a template.
17
+ */
18
+ const PLACEHOLDER_REGEX = /\$\{\s*[\w.]+\s*(?:\|[^}]*)?\s*\}/;
19
+ /**
20
+ * Check if a string contains ${...} template placeholders.
21
+ *
22
+ * Returns true if the string contains at least one valid placeholder
23
+ * matching the ${key}, ${key|default}, or ${path.to.key} syntax.
24
+ *
25
+ * @param value - The string to check
26
+ * @returns true if the string contains at least one ${...} placeholder
27
+ *
28
+ * @example
29
+ * isTemplateString("Hello ${name}") // → true
30
+ * isTemplateString("Hello ${name|World}") // → true
31
+ * isTemplateString("${user.name}") // → true
32
+ * isTemplateString("Hello world") // → false
33
+ * isTemplateString("") // → false
34
+ */
35
+ export function isTemplateString(value) {
36
+ return PLACEHOLDER_REGEX.test(value);
37
+ }
38
+ //# sourceMappingURL=isTemplateString.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isTemplateString.js","sourceRoot":"","sources":["../src/isTemplateString.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,iBAAiB,GAAG,mCAAmC,CAAC;AAE9D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC1C,OAAO,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACzC,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Wraps the given value in an array if it is not already an array.
3
+ *
4
+ * Returns an empty array if the value is null or undefined.
5
+ * Returns the value unchanged if it is already an array.
6
+ * Otherwise wraps the value in a single-element array.
7
+ *
8
+ * @export
9
+ * @template T - The type of elements in the resulting array.
10
+ * @param {unknown} obj - The value to wrap.
11
+ * @returns {Array<T>} An array containing the value, or the value itself if already an array.
12
+ */
13
+ export declare function wrapInArray<T>(obj: unknown): T[];
14
+ //# sourceMappingURL=wrapInArray.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wrapInArray.d.ts","sourceRoot":"","sources":["../src/wrapInArray.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,GAAG,CAAC,EAAE,CAEhD"}
@@ -0,0 +1,17 @@
1
+ import { isNullOrUndef } from "./isNullOrUndef.js";
2
+ /**
3
+ * Wraps the given value in an array if it is not already an array.
4
+ *
5
+ * Returns an empty array if the value is null or undefined.
6
+ * Returns the value unchanged if it is already an array.
7
+ * Otherwise wraps the value in a single-element array.
8
+ *
9
+ * @export
10
+ * @template T - The type of elements in the resulting array.
11
+ * @param {unknown} obj - The value to wrap.
12
+ * @returns {Array<T>} An array containing the value, or the value itself if already an array.
13
+ */
14
+ export function wrapInArray(obj) {
15
+ return Array.isArray(obj) ? obj : isNullOrUndef(obj) ? [] : [obj];
16
+ }
17
+ //# sourceMappingURL=wrapInArray.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wrapInArray.js","sourceRoot":"","sources":["../src/wrapInArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,WAAW,CAAI,GAAY;IACvC,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAQ,CAAC,CAAC;AAC3E,CAAC"}