@leancodepl/intl 9.7.2 → 9.7.3

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 (88) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/LICENSE +201 -0
  3. package/README.md +68 -7
  4. package/{src → dist}/TranslationsServiceClient.d.ts +9 -1
  5. package/dist/TranslationsServiceClient.d.ts.map +1 -0
  6. package/dist/bin.cjs +2 -0
  7. package/dist/bin.d.ts +3 -0
  8. package/dist/bin.d.ts.map +1 -0
  9. package/dist/bin.js +103 -0
  10. package/{src → dist}/commands/diff.d.ts +3 -2
  11. package/dist/commands/diff.d.ts.map +1 -0
  12. package/{src → dist}/commands/download.d.ts +3 -2
  13. package/dist/commands/download.d.ts.map +1 -0
  14. package/{src → dist}/commands/local.d.ts +3 -2
  15. package/dist/commands/local.d.ts.map +1 -0
  16. package/{src → dist}/commands/sync.d.ts +3 -2
  17. package/dist/commands/sync.d.ts.map +1 -0
  18. package/{src → dist}/commands/upload.d.ts +3 -2
  19. package/dist/commands/upload.d.ts.map +1 -0
  20. package/{src → dist}/formatjs.d.ts +1 -0
  21. package/dist/formatjs.d.ts.map +1 -0
  22. package/dist/index.cjs +1 -0
  23. package/dist/index.d.ts +7 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +9 -0
  26. package/dist/loadConfig.d.ts +12 -0
  27. package/dist/loadConfig.d.ts.map +1 -0
  28. package/dist/logger.d.ts +9 -0
  29. package/dist/logger.d.ts.map +1 -0
  30. package/{src → dist}/mergeWithEnv.d.ts +1 -0
  31. package/dist/mergeWithEnv.d.ts.map +1 -0
  32. package/dist/mkTranslationsServiceClient-CYeFDsNC.cjs +5 -0
  33. package/dist/mkTranslationsServiceClient-D62VGNcU.js +1578 -0
  34. package/{src → dist}/mkTranslationsServiceClient.d.ts +2 -1
  35. package/dist/mkTranslationsServiceClient.d.ts.map +1 -0
  36. package/{src → dist}/poeditor/POEditorClient.d.ts +8 -2
  37. package/dist/poeditor/POEditorClient.d.ts.map +1 -0
  38. package/{src → dist}/poeditor/api.generated/api.d.ts +30 -41
  39. package/dist/poeditor/api.generated/api.d.ts.map +1 -0
  40. package/{src → dist}/poeditor/api.generated/base.d.ts +3 -13
  41. package/dist/poeditor/api.generated/base.d.ts.map +1 -0
  42. package/{src → dist}/poeditor/api.generated/common.d.ts +4 -14
  43. package/dist/poeditor/api.generated/common.d.ts.map +1 -0
  44. package/{src → dist}/poeditor/api.generated/configuration.d.ts +1 -0
  45. package/dist/poeditor/api.generated/configuration.d.ts.map +1 -0
  46. package/{src → dist}/poeditor/api.generated/index.d.ts +3 -2
  47. package/dist/poeditor/api.generated/index.d.ts.map +1 -0
  48. package/{src → dist}/poeditor/generatePoeditorClient.d.ts +1 -0
  49. package/dist/poeditor/generatePoeditorClient.d.ts.map +1 -0
  50. package/package.json +25 -7
  51. package/src/TranslationsServiceClient.js +0 -3
  52. package/src/TranslationsServiceClient.js.map +0 -1
  53. package/src/bin.d.ts +0 -2
  54. package/src/bin.js +0 -129
  55. package/src/bin.js.map +0 -1
  56. package/src/commands/diff.js +0 -35
  57. package/src/commands/diff.js.map +0 -1
  58. package/src/commands/download.js +0 -39
  59. package/src/commands/download.js.map +0 -1
  60. package/src/commands/local.js +0 -117
  61. package/src/commands/local.js.map +0 -1
  62. package/src/commands/sync.js +0 -34
  63. package/src/commands/sync.js.map +0 -1
  64. package/src/commands/upload.js +0 -32
  65. package/src/commands/upload.js.map +0 -1
  66. package/src/formatjs.js +0 -60
  67. package/src/formatjs.js.map +0 -1
  68. package/src/index.d.ts +0 -6
  69. package/src/index.js +0 -16
  70. package/src/index.js.map +0 -1
  71. package/src/mergeWithEnv.js +0 -14
  72. package/src/mergeWithEnv.js.map +0 -1
  73. package/src/mkTranslationsServiceClient.js +0 -14
  74. package/src/mkTranslationsServiceClient.js.map +0 -1
  75. package/src/poeditor/POEditorClient.js +0 -88
  76. package/src/poeditor/POEditorClient.js.map +0 -1
  77. package/src/poeditor/api.generated/api.js +0 -2654
  78. package/src/poeditor/api.generated/api.js.map +0 -1
  79. package/src/poeditor/api.generated/base.js +0 -69
  80. package/src/poeditor/api.generated/base.js.map +0 -1
  81. package/src/poeditor/api.generated/common.js +0 -146
  82. package/src/poeditor/api.generated/common.js.map +0 -1
  83. package/src/poeditor/api.generated/configuration.js +0 -100
  84. package/src/poeditor/api.generated/configuration.js.map +0 -1
  85. package/src/poeditor/api.generated/index.js +0 -18
  86. package/src/poeditor/api.generated/index.js.map +0 -1
  87. package/src/poeditor/generatePoeditorClient.js +0 -54
  88. package/src/poeditor/generatePoeditorClient.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,34 @@
3
3
  All notable changes to this project will be documented in this file. See
4
4
  [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [9.7.3](https://github.com/leancodepl/js_corelibrary/compare/v9.7.2...v9.7.3) (2026-02-10)
7
+
8
+ ### Bug Fixes
9
+
10
+ - improve confirmation message for term removal in diff command
11
+ ([35576dc](https://github.com/leancodepl/js_corelibrary/commit/35576dc9d8a61983f4439d10606c906ca5b1aa17))
12
+ - intl default config values
13
+ ([87d562d](https://github.com/leancodepl/js_corelibrary/commit/87d562d1fdb3e895912b6c4286fd681e2d53e21e))
14
+ - intl lint ([28c620e](https://github.com/leancodepl/js_corelibrary/commit/28c620ec3905f6e07a8588040c9694faa50485d6))
15
+
16
+ ### Features
17
+
18
+ - add confirmation prompt for term removal in diff command
19
+ ([dc0f4ca](https://github.com/leancodepl/js_corelibrary/commit/dc0f4ca275043ae7cf8da05003a69095c2687835))
20
+ - add Jest setup file to mock esm only inquirer
21
+ ([d86a71d](https://github.com/leancodepl/js_corelibrary/commit/d86a71d2b3f159577ef89cfa597e078f6efe991f))
22
+ - allow using config file for intl package
23
+ ([96d8c93](https://github.com/leancodepl/js_corelibrary/commit/96d8c93ab3038e720ac6747d82cab7327aade98b))
24
+ - term removal functionality using interactive diff
25
+ ([c33b404](https://github.com/leancodepl/js_corelibrary/commit/c33b404d15a7c316729addc309783f2bb8aa9799))
26
+ - translations next to terms
27
+ ([6e31e86](https://github.com/leancodepl/js_corelibrary/commit/6e31e86b722172f19b458fe75ed5169046091e37))
28
+
29
+ # Change Log
30
+
31
+ All notable changes to this project will be documented in this file. See
32
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
33
+
6
34
  ## [9.7.2](https://github.com/leancodepl/js_corelibrary/compare/v9.7.1...v9.7.2) (2026-01-20)
7
35
 
8
36
  **Note:** Version bump only for package @leancodepl/intl
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -18,11 +18,35 @@ npx @leancodepl/intl <command> [options]
18
18
 
19
19
  ## Configuration
20
20
 
21
+ ### Config File
22
+
23
+ Create an `intl.config.js` (or `intl.config.cjs`) file in your project root:
24
+
25
+ ```js
26
+ module.exports = {
27
+ srcPattern: "src/**/!(*.d).{ts,tsx}",
28
+ outputDir: "lang",
29
+ defaultLanguage: "pl",
30
+ languages: ["pl", "en"],
31
+ poeditorProjectId: 123456,
32
+ }
33
+ ```
34
+
35
+ ### Environment Variables
36
+
21
37
  Configure POEditor credentials using environment variables:
22
38
 
23
39
  - `POEDITOR_API_TOKEN` - POEditor API token (required for upload, download, sync, and diff commands)
24
40
  - `POEDITOR_PROJECT_ID` - POEditor project ID (required for upload, download, sync, and diff commands)
25
41
 
42
+ ### Configuration Priority
43
+
44
+ Options are resolved in the following order (highest priority first):
45
+
46
+ 1. CLI arguments
47
+ 2. Environment variables (for POEditor credentials)
48
+ 3. Config file
49
+
26
50
  ## Commands
27
51
 
28
52
  ### `local`
@@ -45,6 +69,7 @@ npx @leancodepl/intl local [options]
45
69
  - `-d, --default-language <lang>` - Default language for translations (required when using POEditor integration)
46
70
  - `-t, --poeditor-api-token <token>` - POEditor API token (overrides `POEDITOR_API_TOKEN` env var)
47
71
  - `-p, --poeditor-project-id <id>` - POEditor project ID (overrides `POEDITOR_PROJECT_ID` env var)
72
+ - `-c, --config <path>` - Path to config file
48
73
 
49
74
  ### `upload`
50
75
 
@@ -62,6 +87,7 @@ npx @leancodepl/intl upload [options]
62
87
  - `-d, --default-language <lang>` - Default language for translations (required)
63
88
  - `-t, --poeditor-api-token <token>` - POEditor API token (overrides `POEDITOR_API_TOKEN` env var, required)
64
89
  - `-p, --poeditor-project-id <id>` - POEditor project ID (overrides `POEDITOR_PROJECT_ID` env var, required)
90
+ - `-c, --config <path>` - Path to config file
65
91
 
66
92
  ### `download`
67
93
 
@@ -79,6 +105,7 @@ npx @leancodepl/intl download [options]
79
105
  - `-l, --languages <langs...>` - Languages to download (space-separated list, required)
80
106
  - `-t, --poeditor-api-token <token>` - POEditor API token (overrides `POEDITOR_API_TOKEN` env var, required)
81
107
  - `-p, --poeditor-project-id <id>` - POEditor project ID (overrides `POEDITOR_PROJECT_ID` env var, required)
108
+ - `-c, --config <path>` - Path to config file
82
109
 
83
110
  ### `sync`
84
111
 
@@ -99,6 +126,7 @@ npx @leancodepl/intl sync [options]
99
126
  - `-d, --default-language <lang>` - Default language for translations (required)
100
127
  - `-t, --poeditor-api-token <token>` - POEditor API token (overrides `POEDITOR_API_TOKEN` env var, required)
101
128
  - `-p, --poeditor-project-id <id>` - POEditor project ID (overrides `POEDITOR_PROJECT_ID` env var, required)
129
+ - `-c, --config <path>` - Path to config file
102
130
 
103
131
  ### `diff`
104
132
 
@@ -116,10 +144,43 @@ npx @leancodepl/intl diff [options]
116
144
  - `-s, --src-pattern <pattern>` - Source file pattern for extraction (default: `"src/**/!(*.d).{ts,tsx}"`)
117
145
  - `-t, --poeditor-api-token <token>` - POEditor API token (overrides `POEDITOR_API_TOKEN` env var, required)
118
146
  - `-p, --poeditor-project-id <id>` - POEditor project ID (overrides `POEDITOR_PROJECT_ID` env var, required)
147
+ - `-c, --config <path>` - Path to config file
148
+
149
+ ## Nx Integration
150
+
151
+ ### Using the Nx Plugin
152
+
153
+ Add the `@leancodepl/nx-plugins/intl` plugin to your `nx.json`:
154
+
155
+ ```json
156
+ {
157
+ "plugins": ["@leancodepl/nx-plugins/intl"]
158
+ }
159
+ ```
160
+
161
+ This will automatically infer targets for any project containing an `intl.config.js` file:
162
+
163
+ - `intl` - runs the local command
164
+ - `intl-upload` - runs the upload command
165
+ - `intl-download` - runs the download command
166
+ - `intl-sync` - runs the sync command
167
+ - `intl-diff` - runs the diff command
168
+
169
+ ### Plugin Options
170
+
171
+ ```json
172
+ {
173
+ "plugins": [
174
+ {
175
+ "plugin": "@leancodepl/nx-plugins/intl"
176
+ }
177
+ ]
178
+ }
179
+ ```
119
180
 
120
- ## Nx Configuration
181
+ ### Manual Nx Configuration
121
182
 
122
- Configure intl commands as Nx target in your `project.json`. Example configuration:
183
+ Alternatively, configure intl commands manually as Nx target in your `project.json`:
123
184
 
124
185
  ```json
125
186
  "intl": {
@@ -127,19 +188,19 @@ Configure intl commands as Nx target in your `project.json`. Example configurati
127
188
  "defaultConfiguration": "local",
128
189
  "configurations": {
129
190
  "local": {
130
- "command": "npx @leancodepl/intl local --src-pattern 'src/**/!(*.d).{ts,tsx}' --output-dir '{projectRoot}/lang' --default-language pl --poeditor-project-id 123456"
191
+ "command": "npx @leancodepl/intl local"
131
192
  },
132
193
  "download": {
133
- "command": "npx @leancodepl/intl download --output-dir '{projectRoot}/lang' --languages pl en --poeditor-project-id 123456"
194
+ "command": "npx @leancodepl/intl download"
134
195
  },
135
196
  "diff": {
136
- "command": "npx @leancodepl/intl diff --src-pattern 'src/**/!(*.d).{ts,tsx}' --poeditor-project-id 123456"
197
+ "command": "npx @leancodepl/intl diff"
137
198
  },
138
199
  "upload": {
139
- "command": "npx @leancodepl/intl upload --src-pattern 'src/**/!(*.d).{ts,tsx}' --default-language pl --poeditor-project-id 123456"
200
+ "command": "npx @leancodepl/intl upload"
140
201
  },
141
202
  "sync": {
142
- "command": "npx @leancodepl/intl sync --src-pattern 'src/**/!(*.d).{ts,tsx}' --output-dir '{projectRoot}/lang' --languages pl en --default-language pl --poeditor-project-id 123456"
203
+ "command": "npx @leancodepl/intl sync"
143
204
  }
144
205
  }
145
206
  }
@@ -1,13 +1,21 @@
1
- import type { ExtractedMessages } from "./formatjs";
1
+ import { ExtractedMessages } from './formatjs';
2
2
  export interface Term {
3
3
  term: string;
4
4
  context?: string;
5
5
  reference?: string;
6
6
  comment?: string;
7
7
  }
8
+ type TermToRemove = Pick<Term, "context" | "term">;
8
9
  export interface TranslationsServiceClient {
9
10
  downloadTranslations(language: string): Promise<Record<string, string>>;
10
11
  uploadTerms(messages: ExtractedMessages): Promise<void>;
11
12
  uploadTranslations(messages: ExtractedMessages, language: string): Promise<void>;
12
13
  downloadTerms(): Promise<Term[]>;
14
+ removeTerms(terms: TermToRemove[]): Promise<void>;
15
+ getTranslationsInDefaultLanguage(terms: Term[]): Promise<{
16
+ term: string;
17
+ translation: string;
18
+ }[]>;
13
19
  }
20
+ export {};
21
+ //# sourceMappingURL=TranslationsServiceClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TranslationsServiceClient.d.ts","sourceRoot":"","sources":["../src/TranslationsServiceClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEnD,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,KAAK,YAAY,GAAG,IAAI,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC,CAAA;AAElD,MAAM,WAAW,yBAAyB;IACxC,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IACvE,WAAW,CAAC,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACvD,kBAAkB,CAAC,QAAQ,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAChF,aAAa,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,CAAA;IAChC,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACjD,gCAAgC,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC,CAAA;CAClG"}
package/dist/bin.cjs ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ "use strict";const p=require("commander"),s=require("zod/v4"),r=require("./mkTranslationsServiceClient-CYeFDsNC.cjs"),f=require("lilconfig"),u="intl",g=s.z.object({srcPattern:s.z.string().optional(),outputDir:s.z.string().optional(),defaultLanguage:s.z.string().optional(),languages:s.z.array(s.z.string()).optional(),poeditorApiToken:s.z.string().optional(),poeditorProjectId:s.z.number().optional()}),m={searchPlaces:[`${u}.config.js`,`${u}.config.cjs`]};function P(o){const e=f.lilconfigSync(u,m),n=o?e.load(o):e.search();if(n)return g.parse(n.config)}function c(o){const e=o.poeditorApiToken||process.env.POEDITOR_API_TOKEN,n=o.poeditorProjectId||(process.env.POEDITOR_PROJECT_ID?Number.parseInt(process.env.POEDITOR_PROJECT_ID,10):void 0);return{...o,poeditorApiToken:e,poeditorProjectId:n}}const d=g.extend({config:s.z.string().optional()});function l(o){const e=P(o.config);return{srcPattern:o.srcPattern??e?.srcPattern??"src/**/!(*.d).{ts,tsx}",outputDir:o.outputDir??e?.outputDir??"lang",defaultLanguage:o.defaultLanguage??e?.defaultLanguage,languages:o.languages??e?.languages,poeditorApiToken:o.poeditorApiToken??e?.poeditorApiToken,poeditorProjectId:o.poeditorProjectId??e?.poeditorProjectId}}p.program.name("intl").description("CLI tool for managing formatjs translations with translation services");p.program.command("local").description("Extract, download from translation service, and compile formatjs translations locally").option("-s, --src-pattern <pattern>","Source file pattern for extraction").option("-o, --output-dir <dir>","Output directory for compiled translations").option("-d, --default-language <lang>","Default language for translations").option("-t, --poeditor-api-token <token>","POEditor API token (can also use POEDITOR_API_TOKEN env var)").option("-p, --poeditor-project-id <id>","POEditor project ID",o=>Number.parseInt(o,10)).option("-c, --config <path>","Path to config file").action(async o=>{const e=d.parse(o),n=l(e),a=r.localCommandOptionsSchema.parse(n),t=c({...n,...a}),i=t.poeditorApiToken&&t.poeditorProjectId?r.mkTranslationsServiceClient({poeditorApiToken:t.poeditorApiToken,poeditorProjectId:t.poeditorProjectId}):void 0;await r.local({srcPattern:t.srcPattern,outputDir:t.outputDir,defaultLanguage:t.defaultLanguage,translationsServiceClient:i})});p.program.command("upload").description("Extract terms and upload to translation service").option("-s, --src-pattern <pattern>","Source file pattern for extraction").option("-t, --poeditor-api-token <token>","POEditor API token (can also use POEDITOR_API_TOKEN env var)").option("-p, --poeditor-project-id <id>","POEditor project ID",o=>Number.parseInt(o,10)).option("-d, --default-language <lang>","Default language for translations").option("-c, --config <path>","Path to config file").action(async o=>{const e=d.parse(o),n=l(e),a=r.uploadCommandOptionsSchema.parse(n),t=c({...n,...a});(!t.poeditorApiToken||!t.poeditorProjectId)&&(r.logger.error("Translation service API token and project ID are required for upload command"),process.exit(1));const i=r.mkTranslationsServiceClient({poeditorApiToken:t.poeditorApiToken,poeditorProjectId:t.poeditorProjectId});await r.upload({srcPattern:t.srcPattern,translationsServiceClient:i,defaultLanguage:t.defaultLanguage})});p.program.command("download").description("Download translations from translation service and compile them").option("-o, --output-dir <dir>","Output directory for compiled translations").option("-l, --languages <langs...>","Languages to download").option("-t, --poeditor-api-token <token>","POEditor API token (can also use POEDITOR_API_TOKEN env var)").option("-p, --poeditor-project-id <id>","POEditor project ID",o=>Number.parseInt(o,10)).option("-c, --config <path>","Path to config file").action(async o=>{const e=d.parse(o),n=l(e),a=r.downloadCommandOptionsSchema.parse(n),t=c({...n,...a}),i=r.mkTranslationsServiceClient({poeditorApiToken:t.poeditorApiToken,poeditorProjectId:t.poeditorProjectId});await r.download({outputDir:t.outputDir,languages:t.languages,translationsServiceClient:i})});p.program.command("sync").description("Upload local changes and download updated translations").option("-s, --src-pattern <pattern>","Source file pattern for extraction").option("-o, --output-dir <dir>","Output directory for compiled translations").option("-l, --languages <langs...>","Languages to download").option("-t, --poeditor-api-token <token>","POEditor API token (can also use POEDITOR_API_TOKEN env var)").option("-p, --poeditor-project-id <id>","POEditor project ID",o=>Number.parseInt(o,10)).option("-d, --default-language <lang>","Default language for translations").option("-c, --config <path>","Path to config file").action(async o=>{const e=d.parse(o),n=l(e),a=r.syncCommandOptionsSchema.parse(n),t=c({...n,...a}),i=r.mkTranslationsServiceClient({poeditorApiToken:t.poeditorApiToken,poeditorProjectId:t.poeditorProjectId});await r.sync({srcPattern:t.srcPattern,outputDir:t.outputDir,languages:t.languages,translationsServiceClient:i,defaultLanguage:t.defaultLanguage})});p.program.command("diff").description("Compare local terms with translation service to find unused terms").option("-s, --src-pattern <pattern>","Source file pattern for extraction").option("-t, --poeditor-api-token <token>","POEditor API token (can also use POEDITOR_API_TOKEN env var)").option("-p, --poeditor-project-id <id>","POEditor project ID",o=>Number.parseInt(o,10)).option("-c, --config <path>","Path to config file").action(async o=>{const e=d.parse(o),n=l(e),a=r.diffCommandOptionsSchema.parse(n),t=c({...n,...a}),i=r.mkTranslationsServiceClient({poeditorApiToken:t.poeditorApiToken,poeditorProjectId:t.poeditorProjectId});await r.diff({srcPattern:t.srcPattern,translationsServiceClient:i})});p.program.parse();
package/dist/bin.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=bin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":""}
package/dist/bin.js ADDED
@@ -0,0 +1,103 @@
1
+ #!/usr/bin/env node
2
+ import { program as s } from "commander";
3
+ import { z as i } from "zod/v4";
4
+ import { b as f, m as p, l as m, c as P, e as I, u as O, f as k, a as T, g as j, s as v, h as A, d as D } from "./mkTranslationsServiceClient-D62VGNcU.js";
5
+ import { lilconfigSync as E } from "lilconfig";
6
+ const u = "intl", g = i.object({
7
+ srcPattern: i.string().optional(),
8
+ outputDir: i.string().optional(),
9
+ defaultLanguage: i.string().optional(),
10
+ languages: i.array(i.string()).optional(),
11
+ poeditorApiToken: i.string().optional(),
12
+ poeditorProjectId: i.number().optional()
13
+ }), h = {
14
+ searchPlaces: [`${u}.config.js`, `${u}.config.cjs`]
15
+ };
16
+ function C(o) {
17
+ const n = E(u, h), e = o ? n.load(o) : n.search();
18
+ if (e)
19
+ return g.parse(e.config);
20
+ }
21
+ function c(o) {
22
+ const n = o.poeditorApiToken || process.env.POEDITOR_API_TOKEN, e = o.poeditorProjectId || (process.env.POEDITOR_PROJECT_ID ? Number.parseInt(process.env.POEDITOR_PROJECT_ID, 10) : void 0);
23
+ return {
24
+ ...o,
25
+ poeditorApiToken: n,
26
+ poeditorProjectId: e
27
+ };
28
+ }
29
+ const d = g.extend({
30
+ config: i.string().optional()
31
+ });
32
+ function l(o) {
33
+ const n = C(o.config);
34
+ return {
35
+ srcPattern: o.srcPattern ?? n?.srcPattern ?? "src/**/!(*.d).{ts,tsx}",
36
+ outputDir: o.outputDir ?? n?.outputDir ?? "lang",
37
+ defaultLanguage: o.defaultLanguage ?? n?.defaultLanguage,
38
+ languages: o.languages ?? n?.languages,
39
+ poeditorApiToken: o.poeditorApiToken ?? n?.poeditorApiToken,
40
+ poeditorProjectId: o.poeditorProjectId ?? n?.poeditorProjectId
41
+ };
42
+ }
43
+ s.name("intl").description("CLI tool for managing formatjs translations with translation services");
44
+ s.command("local").description("Extract, download from translation service, and compile formatjs translations locally").option("-s, --src-pattern <pattern>", "Source file pattern for extraction").option("-o, --output-dir <dir>", "Output directory for compiled translations").option("-d, --default-language <lang>", "Default language for translations").option("-t, --poeditor-api-token <token>", "POEditor API token (can also use POEDITOR_API_TOKEN env var)").option("-p, --poeditor-project-id <id>", "POEditor project ID", (o) => Number.parseInt(o, 10)).option("-c, --config <path>", "Path to config file").action(async (o) => {
45
+ const n = d.parse(o), e = l(n), a = f.parse(e), t = c({ ...e, ...a }), r = t.poeditorApiToken && t.poeditorProjectId ? p({
46
+ poeditorApiToken: t.poeditorApiToken,
47
+ poeditorProjectId: t.poeditorProjectId
48
+ }) : void 0;
49
+ await m({
50
+ srcPattern: t.srcPattern,
51
+ outputDir: t.outputDir,
52
+ defaultLanguage: t.defaultLanguage,
53
+ translationsServiceClient: r
54
+ });
55
+ });
56
+ s.command("upload").description("Extract terms and upload to translation service").option("-s, --src-pattern <pattern>", "Source file pattern for extraction").option("-t, --poeditor-api-token <token>", "POEditor API token (can also use POEDITOR_API_TOKEN env var)").option("-p, --poeditor-project-id <id>", "POEditor project ID", (o) => Number.parseInt(o, 10)).option("-d, --default-language <lang>", "Default language for translations").option("-c, --config <path>", "Path to config file").action(async (o) => {
57
+ const n = d.parse(o), e = l(n), a = P.parse(e), t = c({ ...e, ...a });
58
+ (!t.poeditorApiToken || !t.poeditorProjectId) && (I.error("Translation service API token and project ID are required for upload command"), process.exit(1));
59
+ const r = p({
60
+ poeditorApiToken: t.poeditorApiToken,
61
+ poeditorProjectId: t.poeditorProjectId
62
+ });
63
+ await O({
64
+ srcPattern: t.srcPattern,
65
+ translationsServiceClient: r,
66
+ defaultLanguage: t.defaultLanguage
67
+ });
68
+ });
69
+ s.command("download").description("Download translations from translation service and compile them").option("-o, --output-dir <dir>", "Output directory for compiled translations").option("-l, --languages <langs...>", "Languages to download").option("-t, --poeditor-api-token <token>", "POEditor API token (can also use POEDITOR_API_TOKEN env var)").option("-p, --poeditor-project-id <id>", "POEditor project ID", (o) => Number.parseInt(o, 10)).option("-c, --config <path>", "Path to config file").action(async (o) => {
70
+ const n = d.parse(o), e = l(n), a = k.parse(e), t = c({ ...e, ...a }), r = p({
71
+ poeditorApiToken: t.poeditorApiToken,
72
+ poeditorProjectId: t.poeditorProjectId
73
+ });
74
+ await T({
75
+ outputDir: t.outputDir,
76
+ languages: t.languages,
77
+ translationsServiceClient: r
78
+ });
79
+ });
80
+ s.command("sync").description("Upload local changes and download updated translations").option("-s, --src-pattern <pattern>", "Source file pattern for extraction").option("-o, --output-dir <dir>", "Output directory for compiled translations").option("-l, --languages <langs...>", "Languages to download").option("-t, --poeditor-api-token <token>", "POEditor API token (can also use POEDITOR_API_TOKEN env var)").option("-p, --poeditor-project-id <id>", "POEditor project ID", (o) => Number.parseInt(o, 10)).option("-d, --default-language <lang>", "Default language for translations").option("-c, --config <path>", "Path to config file").action(async (o) => {
81
+ const n = d.parse(o), e = l(n), a = j.parse(e), t = c({ ...e, ...a }), r = p({
82
+ poeditorApiToken: t.poeditorApiToken,
83
+ poeditorProjectId: t.poeditorProjectId
84
+ });
85
+ await v({
86
+ srcPattern: t.srcPattern,
87
+ outputDir: t.outputDir,
88
+ languages: t.languages,
89
+ translationsServiceClient: r,
90
+ defaultLanguage: t.defaultLanguage
91
+ });
92
+ });
93
+ s.command("diff").description("Compare local terms with translation service to find unused terms").option("-s, --src-pattern <pattern>", "Source file pattern for extraction").option("-t, --poeditor-api-token <token>", "POEditor API token (can also use POEDITOR_API_TOKEN env var)").option("-p, --poeditor-project-id <id>", "POEditor project ID", (o) => Number.parseInt(o, 10)).option("-c, --config <path>", "Path to config file").action(async (o) => {
94
+ const n = d.parse(o), e = l(n), a = A.parse(e), t = c({ ...e, ...a }), r = p({
95
+ poeditorApiToken: t.poeditorApiToken,
96
+ poeditorProjectId: t.poeditorProjectId
97
+ });
98
+ await D({
99
+ srcPattern: t.srcPattern,
100
+ translationsServiceClient: r
101
+ });
102
+ });
103
+ s.parse();
@@ -1,5 +1,5 @@
1
- import { z } from "zod/v4";
2
- import type { TranslationsServiceClient } from "../TranslationsServiceClient";
1
+ import { z } from 'zod/v4';
2
+ import { TranslationsServiceClient } from '../TranslationsServiceClient';
3
3
  export declare const diffCommandOptionsSchema: z.ZodObject<{
4
4
  srcPattern: z.ZodString;
5
5
  }, z.core.$strip>;
@@ -7,3 +7,4 @@ export type DiffCommandOptions = z.infer<typeof diffCommandOptionsSchema> & {
7
7
  translationsServiceClient: TranslationsServiceClient;
8
8
  };
9
9
  export declare function diff({ srcPattern, translationsServiceClient }: DiffCommandOptions): Promise<void>;
10
+ //# sourceMappingURL=diff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../src/commands/diff.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAA;AAI7E,eAAO,MAAM,wBAAwB;;iBAEnC,CAAA;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,GAAG;IAC1E,yBAAyB,EAAE,yBAAyB,CAAA;CACrD,CAAA;AAED,wBAAsB,IAAI,CAAC,EAAE,UAAU,EAAE,yBAAyB,EAAE,EAAE,kBAAkB,iBAgDvF"}
@@ -1,5 +1,5 @@
1
- import { z } from "zod/v4";
2
- import type { TranslationsServiceClient } from "../TranslationsServiceClient";
1
+ import { z } from 'zod/v4';
2
+ import { TranslationsServiceClient } from '../TranslationsServiceClient';
3
3
  export declare const downloadCommandOptionsSchema: z.ZodObject<{
4
4
  outputDir: z.ZodString;
5
5
  languages: z.ZodArray<z.ZodString>;
@@ -8,3 +8,4 @@ export type DownloadCommandOptions = z.infer<typeof downloadCommandOptionsSchema
8
8
  translationsServiceClient: TranslationsServiceClient;
9
9
  };
10
10
  export declare function download({ outputDir, languages, translationsServiceClient }: DownloadCommandOptions): Promise<void>;
11
+ //# sourceMappingURL=download.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../src/commands/download.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAA;AAI7E,eAAO,MAAM,4BAA4B;;;iBAGvC,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,GAAG;IAClF,yBAAyB,EAAE,yBAAyB,CAAA;CACrD,CAAA;AAED,wBAAsB,QAAQ,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,yBAAyB,EAAE,EAAE,sBAAsB,iBAiCzG"}
@@ -1,5 +1,5 @@
1
- import { z } from "zod/v4";
2
- import type { TranslationsServiceClient } from "../TranslationsServiceClient";
1
+ import { z } from 'zod/v4';
2
+ import { TranslationsServiceClient } from '../TranslationsServiceClient';
3
3
  export declare const localCommandOptionsSchema: z.ZodObject<{
4
4
  srcPattern: z.ZodString;
5
5
  outputDir: z.ZodString;
@@ -9,3 +9,4 @@ export type LocalCommandOptions = z.infer<typeof localCommandOptionsSchema> & {
9
9
  translationsServiceClient?: TranslationsServiceClient;
10
10
  };
11
11
  export declare function local({ defaultLanguage, outputDir, srcPattern, translationsServiceClient, }: LocalCommandOptions): Promise<void>;
12
+ //# sourceMappingURL=local.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../../src/commands/local.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAA;AAS7E,eAAO,MAAM,yBAAyB;;;;iBAIpC,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,GAAG;IAC5E,yBAAyB,CAAC,EAAE,yBAAyB,CAAA;CACtD,CAAA;AAED,wBAAsB,KAAK,CAAC,EAC1B,eAAe,EACf,SAAS,EACT,UAAU,EACV,yBAAyB,GAC1B,EAAE,mBAAmB,iBAerB"}
@@ -1,5 +1,5 @@
1
- import { z } from "zod/v4";
2
- import type { TranslationsServiceClient } from "../TranslationsServiceClient";
1
+ import { z } from 'zod/v4';
2
+ import { TranslationsServiceClient } from '../TranslationsServiceClient';
3
3
  export declare const syncCommandOptionsSchema: z.ZodObject<{
4
4
  srcPattern: z.ZodString;
5
5
  outputDir: z.ZodString;
@@ -10,3 +10,4 @@ export type SyncCommandOptions = z.infer<typeof syncCommandOptionsSchema> & {
10
10
  translationsServiceClient: TranslationsServiceClient;
11
11
  };
12
12
  export declare function sync({ srcPattern, outputDir, languages, translationsServiceClient, defaultLanguage, }: SyncCommandOptions): Promise<void>;
13
+ //# sourceMappingURL=sync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/commands/sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAA;AAK7E,eAAO,MAAM,wBAAwB;;;;;iBAKnC,CAAA;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,GAAG;IAC1E,yBAAyB,EAAE,yBAAyB,CAAA;CACrD,CAAA;AAED,wBAAsB,IAAI,CAAC,EACzB,UAAU,EACV,SAAS,EACT,SAAS,EACT,yBAAyB,EACzB,eAAe,GAChB,EAAE,kBAAkB,iBAqBpB"}
@@ -1,5 +1,5 @@
1
- import { z } from "zod/v4";
2
- import type { TranslationsServiceClient } from "../TranslationsServiceClient";
1
+ import { z } from 'zod/v4';
2
+ import { TranslationsServiceClient } from '../TranslationsServiceClient';
3
3
  export declare const uploadCommandOptionsSchema: z.ZodObject<{
4
4
  srcPattern: z.ZodString;
5
5
  defaultLanguage: z.ZodString;
@@ -8,3 +8,4 @@ export type UploadCommandOptions = z.infer<typeof uploadCommandOptionsSchema> &
8
8
  translationsServiceClient: TranslationsServiceClient;
9
9
  };
10
10
  export declare function upload({ srcPattern, translationsServiceClient, defaultLanguage }: UploadCommandOptions): Promise<void>;
11
+ //# sourceMappingURL=upload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/commands/upload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAA;AAI7E,eAAO,MAAM,0BAA0B;;;iBAGrC,CAAA;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,GAAG;IAC9E,yBAAyB,EAAE,yBAAyB,CAAA;CACrD,CAAA;AAED,wBAAsB,MAAM,CAAC,EAAE,UAAU,EAAE,yBAAyB,EAAE,eAAe,EAAE,EAAE,oBAAoB,iBA2B5G"}
@@ -19,3 +19,4 @@ export declare function writeTranslationsToTempDir({ translations, language, tem
19
19
  language: string;
20
20
  tempDir: string;
21
21
  }): string;
22
+ //# sourceMappingURL=formatjs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatjs.d.ts","sourceRoot":"","sources":["../src/formatjs.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,gBAAgB;IAC/B,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;AAEhE,wBAAgB,eAAe,CAAC,OAAO,SAAsB,GAAG,iBAAiB,CAuBhF;AAED,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,SAAS,EACT,OAAY,GACb,EAAE;IACD,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAC7C,QAkBA;AAED,wBAAgB,yBAAyB,CAAC,MAAM,SAAU,GAAG,MAAM,CAElE;AAED,wBAAgB,0BAA0B,CAAC,EACzC,YAAY,EACZ,QAAQ,EACR,OAAO,GACR,EAAE;IACD,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACpC,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CAChB,GAAG,MAAM,CAIT"}
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mkTranslationsServiceClient-CYeFDsNC.cjs");exports.diff=e.diff;exports.download=e.download;exports.local=e.local;exports.mkTranslationsServiceClient=e.mkTranslationsServiceClient;exports.sync=e.sync;exports.upload=e.upload;
@@ -0,0 +1,7 @@
1
+ export { diff } from './commands/diff';
2
+ export { download } from './commands/download';
3
+ export { local } from './commands/local';
4
+ export { sync } from './commands/sync';
5
+ export { upload } from './commands/upload';
6
+ export { mkTranslationsServiceClient } from './mkTranslationsServiceClient';
7
+ //# sourceMappingURL=index.d.ts.map