@powerlines/plugin-i18next 0.1.68 → 0.1.70

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 (60) hide show
  1. package/README.md +304 -0
  2. package/dist/index.cjs +9 -9
  3. package/dist/index.mjs +9 -9
  4. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/get-object-tag.cjs +15 -0
  5. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/get-object-tag.mjs +14 -0
  6. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-empty.cjs +20 -0
  7. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-empty.mjs +20 -0
  8. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-non-null-object.cjs +16 -0
  9. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-non-null-object.mjs +16 -0
  10. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-null.cjs +12 -0
  11. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-null.mjs +11 -0
  12. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-object.cjs +19 -0
  13. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-object.mjs +19 -0
  14. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-plain-object.cjs +63 -0
  15. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-plain-object.mjs +63 -0
  16. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-set-object.cjs +19 -0
  17. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-set-object.mjs +19 -0
  18. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-set.cjs +19 -0
  19. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-set.mjs +19 -0
  20. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-string.cjs +12 -0
  21. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-string.mjs +11 -0
  22. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-undefined.cjs +8 -0
  23. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-undefined.mjs +7 -0
  24. package/dist/types/i18n.cjs +0 -0
  25. package/dist/types/i18n.mjs +1 -0
  26. package/dist/types/index.cjs +0 -0
  27. package/dist/types/index.d.cts +3 -0
  28. package/dist/types/index.d.mts +2 -1
  29. package/dist/types/index.mjs +1 -0
  30. package/dist/types/plugin.cjs +0 -0
  31. package/dist/types/plugin.mjs +1 -0
  32. package/package.json +7 -7
  33. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/get-object-tag.cjs +0 -6
  34. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/get-object-tag.mjs +0 -5
  35. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-date.cjs +0 -8
  36. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-date.mjs +0 -8
  37. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-empty.cjs +0 -27
  38. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-empty.mjs +0 -27
  39. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-function.cjs +0 -19
  40. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-function.mjs +0 -19
  41. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-non-null-object.cjs +0 -8
  42. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-non-null-object.mjs +0 -8
  43. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-null.cjs +0 -12
  44. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-null.mjs +0 -11
  45. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-number.cjs +0 -12
  46. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-number.mjs +0 -11
  47. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-object.cjs +0 -13
  48. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-object.mjs +0 -13
  49. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-plain-object.cjs +0 -14
  50. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-plain-object.mjs +0 -13
  51. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-set-object.cjs +0 -13
  52. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-set-object.mjs +0 -13
  53. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-set.cjs +0 -13
  54. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-set.mjs +0 -13
  55. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-string.cjs +0 -12
  56. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-string.mjs +0 -11
  57. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-symbol.cjs +0 -12
  58. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-symbol.mjs +0 -11
  59. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-undefined.cjs +0 -6
  60. package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-undefined.mjs +0 -5
package/README.md ADDED
@@ -0,0 +1,304 @@
1
+ <!-- START header -->
2
+ <!-- prettier-ignore-start -->
3
+ <!-- markdownlint-disable -->
4
+
5
+
6
+ <div align="center">
7
+ <picture>
8
+ <source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/powerlines/banner-1280x640-dark.gif">
9
+ <source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/powerlines/banner-1280x640-light.gif">
10
+ <img src="https://public.storm-cdn.com/powerlines/banner-1280x640-dark.gif" width="100%" alt="Powerlines" />
11
+ </picture>
12
+ </div>
13
+ <br />
14
+
15
+ <div align="center">
16
+ <b>
17
+ <a href="https://stormsoftware.com" target="_blank">Website</a> •
18
+ <a href="https://github.com/storm-software/powerlines" target="_blank">GitHub</a> •
19
+ <a href="https://discord.gg/MQ6YVzakM5">Discord</a> • <a href="https://stormstack.github.io/stormstack/" target="_blank">Docs</a> • <a href="https://stormsoftware.com/contact" target="_blank">Contact</a> •
20
+ <a href="https://github.com/storm-software/powerlines/issues/new?assignees=&labels=bug&template=bug-report.yml&title=Bug Report%3A+">Report a Bug</a>
21
+ </b>
22
+ </div>
23
+
24
+ <br />
25
+ This package is part of the 🔌 <b>Powerlines</b> monorepo. Powerlines packages include CLI utility applications, tools, and various libraries used to create modern, scalable web applications.
26
+ <br />
27
+
28
+ <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
29
+
30
+ [![Version](https://img.shields.io/badge/version-0.2.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/powerlines/release.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
31
+
32
+ <!-- prettier-ignore-start -->
33
+ <!-- markdownlint-disable -->
34
+
35
+ > [!IMPORTANT]
36
+ > This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be available through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.
37
+
38
+ <!-- markdownlint-restore -->
39
+ <!-- prettier-ignore-end -->
40
+
41
+ <div align="center">
42
+ <a href="https://github.com/storm-software/powerlines" target="_blank"><b>Be sure to ⭐ this repository on GitHub so you can keep up to date with it's progress!</b></a>
43
+ </div>
44
+
45
+ <br />
46
+
47
+ <!-- markdownlint-restore -->
48
+ <!-- prettier-ignore-end -->
49
+
50
+ <!-- END header -->
51
+
52
+ # Powerlines - i18next Plugin
53
+
54
+ A Powerlines plugin to generate project code with [i18next](https://www.i18next.com).
55
+
56
+ <!-- START doctoc -->
57
+ <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
58
+ ## Table of Contents
59
+
60
+ - [Powerlines - i18next Plugin](#powerlines---i18next-plugin)
61
+ - [Table of Contents](#table-of-contents)
62
+ - [Installing](#installing)
63
+ - [Reduced Package Size](#reduced-package-size)
64
+ - [Development](#development)
65
+ - [Building](#building)
66
+ - [Running unit tests](#running-unit-tests)
67
+ - [Linting](#linting)
68
+ - [Storm Workspaces](#storm-workspaces)
69
+ - [Roadmap](#roadmap)
70
+ - [Support](#support)
71
+ - [License](#license)
72
+ - [Changelog](#changelog)
73
+ - [Contributing](#contributing)
74
+ - [Contributors](#contributors)
75
+
76
+ <!-- END doctoc -->
77
+
78
+ ## Installing
79
+
80
+ Using [pnpm](http://pnpm.io):
81
+
82
+ ```bash
83
+ pnpm add @powerlines/plugin-i18next
84
+ ```
85
+
86
+ <details>
87
+ <summary>Using npm</summary>
88
+
89
+ ```bash
90
+ npm install @powerlines/plugin-i18next
91
+ ```
92
+
93
+ </details>
94
+
95
+ <details>
96
+ <summary>Using yarn</summary>
97
+
98
+ ```bash
99
+ yarn add @powerlines/plugin-i18next
100
+ ```
101
+
102
+ </details>
103
+
104
+ ## Reduced Package Size
105
+
106
+ This project uses [tsup](https://tsup.egoist.dev/) to package the source code
107
+ due to its ability to remove unused code and ship smaller javascript files
108
+ thanks to code splitting. This helps to greatly reduce the size of the package
109
+ and to make it easier to use in other projects.
110
+
111
+ ## Development
112
+
113
+ This project is built using [Nx](https://nx.dev). As a result, many of the usual
114
+ commands are available to assist in development.
115
+
116
+ ### Building
117
+
118
+ Run `nx build plugin-i18next` to build the library.
119
+
120
+ ### Running unit tests
121
+
122
+ Run `nx test plugin-i18next` to execute the unit tests via
123
+ [Jest](https://jestjs.io).
124
+
125
+ ### Linting
126
+
127
+ Run `nx lint plugin-i18next` to run
128
+ [ESLint](https://eslint.org/) on the package.
129
+
130
+ <!-- START footer -->
131
+ <!-- prettier-ignore-start -->
132
+ <!-- markdownlint-disable -->
133
+
134
+
135
+ ## Storm Workspaces
136
+
137
+ Storm workspaces are built using
138
+ <a href="https://nx.dev/" target="_blank">Nx</a>, a set of extensible dev tools
139
+ for monorepos, which helps you develop like Google, Facebook, and Microsoft.
140
+ Building on top of Nx, the Open System provides a set of tools and patterns that
141
+ help you scale your monorepo to many teams while keeping the codebase
142
+ maintainable.
143
+
144
+ <div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
145
+ <br />
146
+
147
+ ## Roadmap
148
+
149
+ See the [open issues](https://github.com/storm-software/powerlines/issues) for
150
+ a list of proposed features (and known issues).
151
+
152
+ - [Top Feature Requests](https://github.com/storm-software/powerlines/issues?q=label%3Aenhancement+is%3Aopen+sort%3Areactions-%2B1-desc)
153
+ (Add your votes using the 👍 reaction)
154
+ - [Top Bugs](https://github.com/storm-software/powerlines/issues?q=is%3Aissue+is%3Aopen+label%3Abug+sort%3Areactions-%2B1-desc)
155
+ (Add your votes using the 👍 reaction)
156
+ - [Newest Bugs](https://github.com/storm-software/powerlines/issues?q=is%3Aopen+is%3Aissue+label%3Abug)
157
+
158
+ <div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
159
+ <br />
160
+
161
+ ## Support
162
+
163
+ Reach out to the maintainer at one of the following places:
164
+
165
+ - [Contact](https://stormsoftware.com/contact)
166
+ - [GitHub discussions](https://github.com/storm-software/powerlines/discussions)
167
+ - <support@stormsoftware.com>
168
+
169
+ <div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
170
+ <br />
171
+
172
+ ## License
173
+
174
+ This project is licensed under the **Apache License 2.0**. Feel free to edit and
175
+ distribute this template as you like.
176
+
177
+ See [LICENSE](LICENSE) for more information.
178
+
179
+ <div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
180
+ <br />
181
+
182
+ ## Changelog
183
+
184
+ This project adheres to
185
+ [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Every release, along
186
+ with the migration instructions, is documented in the [CHANGELOG](CHANGELOG.md)
187
+ file
188
+
189
+ <div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
190
+ <br />
191
+
192
+ ## Contributing
193
+
194
+ First off, thanks for taking the time to contribute! Contributions are what
195
+ makes the open-source community such an amazing place to learn, inspire, and
196
+ create. Any contributions you make will benefit everybody else and are **greatly
197
+ appreciated**.
198
+
199
+ Please try to create bug reports that are:
200
+
201
+ - _Reproducible._ Include steps to reproduce the problem.
202
+ - _Specific._ Include as much detail as possible: which version, what
203
+ environment, etc.
204
+ - _Unique._ Do not duplicate existing opened issues.
205
+ - _Scoped to a Single Bug._ One bug per report.
206
+
207
+ Please adhere to this project's [code of conduct](.github/CODE_OF_CONDUCT.md).
208
+
209
+ You can use
210
+ [markdownlint-cli](https://github.com/storm-software/powerlines/markdownlint-cli)
211
+ to check for common markdown style inconsistency.
212
+
213
+ <div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
214
+ <br />
215
+
216
+ ## Contributors
217
+
218
+ Thanks goes to these wonderful people
219
+ ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
220
+
221
+ <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
222
+
223
+ <table>
224
+ <tbody>
225
+ <tr>
226
+ <td align="center" valign="top" width="14.28%"><a href="http://www.sullypat.com/"><img src="https://avatars.githubusercontent.com/u/99053093?v=4?s=100" width="100px;" alt="Patrick Sullivan"/><br /><sub><b>Patrick Sullivan</b></sub></a><br /><a href="#design-sullivanpj" title="Design">🎨</a> <a href="https://github.com/storm-software/powerlines/commits?author=sullivanpj" title="Code">💻</a> <a href="#tool-sullivanpj" title="Tools">🔧</a> <a href="https://github.com/storm-software/powerlines/commits?author=sullivanpj" title="Documentation">📖</a> <a href="https://github.com/storm-software/powerlines/commits?author=sullivanpj" title="Tests">⚠️</a></td>
227
+ <td align="center" valign="top" width="14.28%"><a href="https://tylerbenning.com/"><img src="https://avatars.githubusercontent.com/u/7265547?v=4?s=100" width="100px;" alt="Tyler Benning"/><br /><sub><b>Tyler Benning</b></sub></a><br /><a href="#design-tbenning" title="Design">🎨</a></td>
228
+ <td align="center" valign="top" width="14.28%"><a href="http://stormsoftware.com"><img src="https://avatars.githubusercontent.com/u/149802440?v=4?s=100" width="100px;" alt="Stormie"/><br /><sub><b>Stormie</b></sub></a><br /><a href="#maintenance-stormie-bot" title="Maintenance">🚧</a></td>
229
+ </tr>
230
+ </tbody>
231
+ <tfoot>
232
+ <tr>
233
+ <td align="center" size="13px" colspan="7">
234
+ <img src="https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg" alt="All Contributors">
235
+ <a href="https://all-contributors.js.org/docs/en/bot/usage">Add your contributions</a>
236
+ </img>
237
+ </td>
238
+ </tr>
239
+ </tfoot>
240
+ </table>
241
+
242
+ <!-- ALL-CONTRIBUTORS-LIST:END -->
243
+
244
+ This project follows the
245
+ [all-contributors](https://github.com/all-contributors/all-contributors)
246
+ specification. Contributions of any kind welcome!
247
+
248
+ <div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
249
+ <br />
250
+
251
+ <hr />
252
+ <br />
253
+
254
+ <div align="center">
255
+ <picture>
256
+ <source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x320-dark.webp">
257
+ <source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x320-light.webp">
258
+ <img src="https://public.storm-cdn.com/storm-software/banner-1280x320-dark.webp" width="100%" alt="Storm Software" />
259
+ </picture>
260
+ </div>
261
+ <br />
262
+
263
+ <div align="center">
264
+ <a href="https://stormsoftware.com" target="_blank">Website</a> • <a href="https://stormsoftware.com/contact" target="_blank">Contact</a> • <a href="https://linkedin.com/in/patrick-sullivan-865526b0" target="_blank">LinkedIn</a> • <a href="https://medium.com/@pat.joseph.sullivan" target="_blank">Medium</a> • <a href="https://github.com/storm-software" target="_blank">GitHub</a> • <a href="https://keybase.io/sullivanp" target="_blank">OpenPGP Key</a>
265
+ </div>
266
+
267
+ <div align="center">
268
+ <b>Fingerprint:</b> 1BD2 7192 7770 2549 F4C9 F238 E6AD C420 DA5C 4C2D
269
+ </div>
270
+ <br />
271
+
272
+ Storm Software is an open source software development organization and creator
273
+ of Acidic, StormStack and StormCloud.
274
+
275
+ Our mission is to make software development more accessible. Our ideal future is
276
+ one where anyone can create software without years of prior development
277
+ experience serving as a barrier to entry. We hope to achieve this via LLMs,
278
+ Generative AI, and intuitive, high-level data modeling/programming languages.
279
+
280
+ Join us on [Discord](https://discord.gg/MQ6YVzakM5) to chat with the team,
281
+ receive release notifications, ask questions, and get involved.
282
+
283
+ If this sounds interesting, and you would like to help us in creating the next
284
+ generation of development tools, please reach out on our
285
+ [website](https://stormsoftware.com/contact) or join our
286
+ [Slack channel](https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA)!
287
+
288
+ <br />
289
+
290
+ <div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://public.storm-cdn.com/icon-fill.png" alt="Storm Software" width="200px"/></a></div>
291
+ <br />
292
+ <div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://public.storm-cdn.com/visit-us-text.svg" alt="Visit us at stormsoftware.com" height="90px"/></a></div>
293
+
294
+ <br />
295
+
296
+ <div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
297
+ <br />
298
+ <br />
299
+
300
+
301
+ <!-- markdownlint-restore -->
302
+ <!-- prettier-ignore-end -->
303
+
304
+ <!-- END footer -->
package/dist/index.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
  const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
3
- const require_is_set = require('./node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-set.cjs');
4
- const require_is_set_object = require('./node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-set-object.cjs');
5
- const require_is_string = require('./node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-string.cjs');
3
+ const require_is_set = require('./node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-set.cjs');
4
+ const require_is_set_object = require('./node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-set-object.cjs');
5
+ const require_is_string = require('./node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-string.cjs');
6
6
  const require_config_utils = require('./helpers/config-utils.cjs');
7
7
  let __stryke_fs_list_files = require("@stryke/fs/list-files");
8
8
  let __stryke_path_append = require("@stryke/path/append");
@@ -51,7 +51,7 @@ const plugin = (options = {}) => {
51
51
  locales: []
52
52
  });
53
53
  if (!i18next.locales || i18next.locales.length === 0) i18next.locales = [i18next.extract.primaryLanguage || "en"];
54
- if (!require_is_set.t(i18next.types.indentation)) i18next.types.indentation = i18next.extract.indentation;
54
+ if (!require_is_set.isSet(i18next.types.indentation)) i18next.types.indentation = i18next.extract.indentation;
55
55
  return { i18next };
56
56
  },
57
57
  async configResolved() {},
@@ -78,13 +78,13 @@ const plugin = (options = {}) => {
78
78
  for (const file of await (0, __stryke_fs_list_files.listFiles)(require_config_utils.getOutputPath(this.config.i18next.extract.output, this.config.i18next.extract.primaryLanguage, "*"))) {
79
79
  const namespace = (0, __stryke_path_file_path_fns.findFileName)(file, { withExtension: false });
80
80
  const parsedContent = await this.resolver.import(file);
81
- if (this.config.i18next.extract.mergeNamespaces && require_is_set_object.t(parsedContent)) {
82
- if (Object.keys(parsedContent).filter((k) => require_is_set_object.t(parsedContent[k])).length > 0) {
83
- for (const nsName of Object.keys(parsedContent).filter((k) => require_is_set_object.t(parsedContent[k]))) resources.push({
81
+ if (this.config.i18next.extract.mergeNamespaces && require_is_set_object.isSetObject(parsedContent)) {
82
+ if (Object.keys(parsedContent).filter((k) => require_is_set_object.isSetObject(parsedContent[k])).length > 0) {
83
+ for (const nsName of Object.keys(parsedContent).filter((k) => require_is_set_object.isSetObject(parsedContent[k]))) resources.push({
84
84
  name: nsName,
85
85
  resources: parsedContent[nsName]
86
86
  });
87
- if (Object.keys(parsedContent).filter((k) => !require_is_set_object.t(parsedContent[k])).length > 0) this.warn(`The file ${file} contains top-level keys that are not objects (${Object.keys(parsedContent).filter((k) => !require_is_set_object.t(parsedContent[k])).join(", ")}). When 'mergeNamespaces' is enabled, top-level keys are treated as namespaces. These keys will be ignored.`);
87
+ if (Object.keys(parsedContent).filter((k) => !require_is_set_object.isSetObject(parsedContent[k])).length > 0) this.warn(`The file ${file} contains top-level keys that are not objects (${Object.keys(parsedContent).filter((k) => !require_is_set_object.isSetObject(parsedContent[k])).join(", ")}). When 'mergeNamespaces' is enabled, top-level keys are treated as namespaces. These keys will be ignored.`);
88
88
  continue;
89
89
  }
90
90
  }
@@ -112,7 +112,7 @@ ${(0, i18next_resources_for_ts.mergeResourcesAsInterface)(resources, {
112
112
  */
113
113
  declare module 'i18next' {
114
114
  interface CustomTypeOptions {
115
- enableSelector: ${require_is_string.e(this.config.i18next.types.enableSelector) ? `"${this.config.i18next.types.enableSelector}"` : this.config.i18next.types.enableSelector};
115
+ enableSelector: ${require_is_string.isString(this.config.i18next.types.enableSelector) ? `"${this.config.i18next.types.enableSelector}"` : this.config.i18next.types.enableSelector};
116
116
  defaultNS: ${this.config.i18next.extract.defaultNS === false ? "false" : `'${this.config.i18next.extract.defaultNS || "translation"}'`};
117
117
  resources: Resources;
118
118
  }
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { t } from "./node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-set.mjs";
2
- import { t as t$1 } from "./node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-set-object.mjs";
3
- import { e } from "./node_modules/.pnpm/@stryke_type-checks@0.5.17/node_modules/@stryke/type-checks/dist/is-string.mjs";
1
+ import { isSet } from "./node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-set.mjs";
2
+ import { isSetObject } from "./node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-set-object.mjs";
3
+ import { isString } from "./node_modules/.pnpm/@stryke_type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-string.mjs";
4
4
  import { getOutputPath } from "./helpers/config-utils.mjs";
5
5
  import { listFiles } from "@stryke/fs/list-files";
6
6
  import { appendPath } from "@stryke/path/append";
@@ -48,7 +48,7 @@ const plugin = (options = {}) => {
48
48
  locales: []
49
49
  });
50
50
  if (!i18next.locales || i18next.locales.length === 0) i18next.locales = [i18next.extract.primaryLanguage || "en"];
51
- if (!t(i18next.types.indentation)) i18next.types.indentation = i18next.extract.indentation;
51
+ if (!isSet(i18next.types.indentation)) i18next.types.indentation = i18next.extract.indentation;
52
52
  return { i18next };
53
53
  },
54
54
  async configResolved() {},
@@ -75,13 +75,13 @@ const plugin = (options = {}) => {
75
75
  for (const file of await listFiles(getOutputPath(this.config.i18next.extract.output, this.config.i18next.extract.primaryLanguage, "*"))) {
76
76
  const namespace = findFileName(file, { withExtension: false });
77
77
  const parsedContent = await this.resolver.import(file);
78
- if (this.config.i18next.extract.mergeNamespaces && t$1(parsedContent)) {
79
- if (Object.keys(parsedContent).filter((k) => t$1(parsedContent[k])).length > 0) {
80
- for (const nsName of Object.keys(parsedContent).filter((k) => t$1(parsedContent[k]))) resources.push({
78
+ if (this.config.i18next.extract.mergeNamespaces && isSetObject(parsedContent)) {
79
+ if (Object.keys(parsedContent).filter((k) => isSetObject(parsedContent[k])).length > 0) {
80
+ for (const nsName of Object.keys(parsedContent).filter((k) => isSetObject(parsedContent[k]))) resources.push({
81
81
  name: nsName,
82
82
  resources: parsedContent[nsName]
83
83
  });
84
- if (Object.keys(parsedContent).filter((k) => !t$1(parsedContent[k])).length > 0) this.warn(`The file ${file} contains top-level keys that are not objects (${Object.keys(parsedContent).filter((k) => !t$1(parsedContent[k])).join(", ")}). When 'mergeNamespaces' is enabled, top-level keys are treated as namespaces. These keys will be ignored.`);
84
+ if (Object.keys(parsedContent).filter((k) => !isSetObject(parsedContent[k])).length > 0) this.warn(`The file ${file} contains top-level keys that are not objects (${Object.keys(parsedContent).filter((k) => !isSetObject(parsedContent[k])).join(", ")}). When 'mergeNamespaces' is enabled, top-level keys are treated as namespaces. These keys will be ignored.`);
85
85
  continue;
86
86
  }
87
87
  }
@@ -109,7 +109,7 @@ ${mergeResourcesAsInterface(resources, {
109
109
  */
110
110
  declare module 'i18next' {
111
111
  interface CustomTypeOptions {
112
- enableSelector: ${e(this.config.i18next.types.enableSelector) ? `"${this.config.i18next.types.enableSelector}"` : this.config.i18next.types.enableSelector};
112
+ enableSelector: ${isString(this.config.i18next.types.enableSelector) ? `"${this.config.i18next.types.enableSelector}"` : this.config.i18next.types.enableSelector};
113
113
  defaultNS: ${this.config.i18next.extract.defaultNS === false ? "false" : `'${this.config.i18next.extract.defaultNS || "translation"}'`};
114
114
  resources: Resources;
115
115
  }
@@ -0,0 +1,15 @@
1
+
2
+ //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.19/node_modules/@stryke/type-checks/dist/get-object-tag.mjs
3
+ /**
4
+ * Gets the `toStringTag` of `obj`.
5
+ *
6
+ * @param value - The obj to query.
7
+ * @returns Returns the `toStringTag`.
8
+ */
9
+ const getObjectTag = (value) => {
10
+ if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
11
+ return Object.prototype.toString.call(value);
12
+ };
13
+
14
+ //#endregion
15
+ exports.getObjectTag = getObjectTag;
@@ -0,0 +1,14 @@
1
+ //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.19/node_modules/@stryke/type-checks/dist/get-object-tag.mjs
2
+ /**
3
+ * Gets the `toStringTag` of `obj`.
4
+ *
5
+ * @param value - The obj to query.
6
+ * @returns Returns the `toStringTag`.
7
+ */
8
+ const getObjectTag = (value) => {
9
+ if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
10
+ return Object.prototype.toString.call(value);
11
+ };
12
+
13
+ //#endregion
14
+ export { getObjectTag };
@@ -0,0 +1,20 @@
1
+ const require_is_null = require('./is-null.cjs');
2
+ const require_is_undefined = require('./is-undefined.cjs');
3
+
4
+ //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-empty.mjs
5
+ /**
6
+ * Check if the provided value's type is `null` or `undefined`
7
+ *
8
+ * @param value - The value to type check
9
+ * @returns An indicator specifying if the value provided is of type `null` or `undefined`
10
+ */
11
+ const isEmpty = (value) => {
12
+ try {
13
+ return require_is_undefined.isUndefined(value) || require_is_null.isNull(value);
14
+ } catch {
15
+ return false;
16
+ }
17
+ };
18
+
19
+ //#endregion
20
+ exports.isEmpty = isEmpty;
@@ -0,0 +1,20 @@
1
+ import { isNull } from "./is-null.mjs";
2
+ import { isUndefined } from "./is-undefined.mjs";
3
+
4
+ //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-empty.mjs
5
+ /**
6
+ * Check if the provided value's type is `null` or `undefined`
7
+ *
8
+ * @param value - The value to type check
9
+ * @returns An indicator specifying if the value provided is of type `null` or `undefined`
10
+ */
11
+ const isEmpty = (value) => {
12
+ try {
13
+ return isUndefined(value) || isNull(value);
14
+ } catch {
15
+ return false;
16
+ }
17
+ };
18
+
19
+ //#endregion
20
+ export { isEmpty };
@@ -0,0 +1,16 @@
1
+ const require_is_set = require('./is-set.cjs');
2
+ const require_is_object = require('./is-object.cjs');
3
+
4
+ //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-non-null-object.mjs
5
+ /**
6
+ * Check if the provided value's type is `Object` and is not `null` or `undefined`
7
+ *
8
+ * @param value - The value to type check
9
+ * @returns An indicator specifying if the value provided is of type `Object` and is not `null` or `undefined`
10
+ */
11
+ const isNonNullObject = (value) => {
12
+ return require_is_set.isSet(value) && require_is_object.isObject(value);
13
+ };
14
+
15
+ //#endregion
16
+ exports.isNonNullObject = isNonNullObject;
@@ -0,0 +1,16 @@
1
+ import { isSet } from "./is-set.mjs";
2
+ import { isObject } from "./is-object.mjs";
3
+
4
+ //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-non-null-object.mjs
5
+ /**
6
+ * Check if the provided value's type is `Object` and is not `null` or `undefined`
7
+ *
8
+ * @param value - The value to type check
9
+ * @returns An indicator specifying if the value provided is of type `Object` and is not `null` or `undefined`
10
+ */
11
+ const isNonNullObject = (value) => {
12
+ return isSet(value) && isObject(value);
13
+ };
14
+
15
+ //#endregion
16
+ export { isNonNullObject };
@@ -0,0 +1,12 @@
1
+
2
+ //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-null.mjs
3
+ const isNull = (value) => {
4
+ try {
5
+ return value === null;
6
+ } catch {
7
+ return false;
8
+ }
9
+ };
10
+
11
+ //#endregion
12
+ exports.isNull = isNull;
@@ -0,0 +1,11 @@
1
+ //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-null.mjs
2
+ const isNull = (value) => {
3
+ try {
4
+ return value === null;
5
+ } catch {
6
+ return false;
7
+ }
8
+ };
9
+
10
+ //#endregion
11
+ export { isNull };
@@ -0,0 +1,19 @@
1
+ const require_is_plain_object = require('./is-plain-object.cjs');
2
+
3
+ //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-object.mjs
4
+ /**
5
+ * Check if the provided value's type is `Object`
6
+ *
7
+ * @param value - The value to type check
8
+ * @returns An indicator specifying if the value provided is of type `Object`
9
+ */
10
+ const isObject = (value) => {
11
+ try {
12
+ return typeof value === "object" || Boolean(value) && value?.constructor === Object || require_is_plain_object.isPlainObject(value);
13
+ } catch {
14
+ return false;
15
+ }
16
+ };
17
+
18
+ //#endregion
19
+ exports.isObject = isObject;
@@ -0,0 +1,19 @@
1
+ import { isPlainObject } from "./is-plain-object.mjs";
2
+
3
+ //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-object.mjs
4
+ /**
5
+ * Check if the provided value's type is `Object`
6
+ *
7
+ * @param value - The value to type check
8
+ * @returns An indicator specifying if the value provided is of type `Object`
9
+ */
10
+ const isObject = (value) => {
11
+ try {
12
+ return typeof value === "object" || Boolean(value) && value?.constructor === Object || isPlainObject(value);
13
+ } catch {
14
+ return false;
15
+ }
16
+ };
17
+
18
+ //#endregion
19
+ export { isObject };
@@ -0,0 +1,63 @@
1
+ const require_get_object_tag = require('./get-object-tag.cjs');
2
+
3
+ //#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.19/node_modules/@stryke/type-checks/dist/is-plain-object.mjs
4
+ /**
5
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
6
+ * and has a `typeof` result of "object".
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * isObjectLike({})
11
+ * // => true
12
+ *
13
+ * isObjectLike([1, 2, 3])
14
+ * // => true
15
+ *
16
+ * isObjectLike(Function)
17
+ * // => false
18
+ *
19
+ * isObjectLike(null)
20
+ * // => false
21
+ * ```
22
+ *
23
+ * @param value - The value to check.
24
+ * @returns Returns `true` if `value` is object-like, else `false`.
25
+ */
26
+ const isObjectLike = (obj) => {
27
+ return typeof obj === "object" && obj !== null;
28
+ };
29
+ /**
30
+ * Checks if `obj` is a plain object, that is, an object created by the `Object` constructor or one with a `[[Prototype]]` of `null`.
31
+ *
32
+ * @example
33
+ * ```typescript
34
+ * function Foo() {
35
+ * this.a = 1
36
+ * }
37
+ *
38
+ * isPlainObject(new Foo)
39
+ * // => false
40
+ *
41
+ * isPlainObject([1, 2, 3])
42
+ * // => false
43
+ *
44
+ * isPlainObject({ 'x': 0, 'y': 0 })
45
+ * // => true
46
+ *
47
+ * isPlainObject(Object.create(null))
48
+ * // => true
49
+ * ```
50
+ *
51
+ * @param obj - The value to check.
52
+ * @returns Returns `true` if `obj` is a plain object, else `false`.
53
+ */
54
+ const isPlainObject = (obj) => {
55
+ if (!isObjectLike(obj) || require_get_object_tag.getObjectTag(obj) !== "[object Object]") return false;
56
+ if (Object.getPrototypeOf(obj) === null) return true;
57
+ let proto = obj;
58
+ while (Object.getPrototypeOf(proto) !== null) proto = Object.getPrototypeOf(proto);
59
+ return Object.getPrototypeOf(obj) === proto;
60
+ };
61
+
62
+ //#endregion
63
+ exports.isPlainObject = isPlainObject;