@leancodepl/intl 9.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +154 -0
  3. package/package.json +25 -0
  4. package/src/TranslationsServiceClient.d.ts +13 -0
  5. package/src/TranslationsServiceClient.js +3 -0
  6. package/src/TranslationsServiceClient.js.map +1 -0
  7. package/src/bin.d.ts +2 -0
  8. package/src/bin.js +129 -0
  9. package/src/bin.js.map +1 -0
  10. package/src/commands/diff.d.ts +9 -0
  11. package/src/commands/diff.js +35 -0
  12. package/src/commands/diff.js.map +1 -0
  13. package/src/commands/download.d.ts +10 -0
  14. package/src/commands/download.js +39 -0
  15. package/src/commands/download.js.map +1 -0
  16. package/src/commands/local.d.ts +11 -0
  17. package/src/commands/local.js +117 -0
  18. package/src/commands/local.js.map +1 -0
  19. package/src/commands/sync.d.ts +12 -0
  20. package/src/commands/sync.js +34 -0
  21. package/src/commands/sync.js.map +1 -0
  22. package/src/commands/upload.d.ts +10 -0
  23. package/src/commands/upload.js +32 -0
  24. package/src/commands/upload.js.map +1 -0
  25. package/src/formatjs.d.ts +21 -0
  26. package/src/formatjs.js +60 -0
  27. package/src/formatjs.js.map +1 -0
  28. package/src/index.d.ts +6 -0
  29. package/src/index.js +16 -0
  30. package/src/index.js.map +1 -0
  31. package/src/mergeWithEnv.d.ts +7 -0
  32. package/src/mergeWithEnv.js +14 -0
  33. package/src/mergeWithEnv.js.map +1 -0
  34. package/src/mkTranslationsServiceClient.d.ts +5 -0
  35. package/src/mkTranslationsServiceClient.js +14 -0
  36. package/src/mkTranslationsServiceClient.js.map +1 -0
  37. package/src/poeditor/POEditorClient.d.ts +19 -0
  38. package/src/poeditor/POEditorClient.js +88 -0
  39. package/src/poeditor/POEditorClient.js.map +1 -0
  40. package/src/poeditor/api.generated/api.d.ts +2570 -0
  41. package/src/poeditor/api.generated/api.js +2586 -0
  42. package/src/poeditor/api.generated/api.js.map +1 -0
  43. package/src/poeditor/api.generated/base.d.ts +66 -0
  44. package/src/poeditor/api.generated/base.js +70 -0
  45. package/src/poeditor/api.generated/base.js.map +1 -0
  46. package/src/poeditor/api.generated/common.d.ts +65 -0
  47. package/src/poeditor/api.generated/common.js +146 -0
  48. package/src/poeditor/api.generated/common.js.map +1 -0
  49. package/src/poeditor/api.generated/configuration.d.ts +91 -0
  50. package/src/poeditor/api.generated/configuration.js +100 -0
  51. package/src/poeditor/api.generated/configuration.js.map +1 -0
  52. package/src/poeditor/api.generated/index.d.ts +13 -0
  53. package/src/poeditor/api.generated/index.js +18 -0
  54. package/src/poeditor/api.generated/index.js.map +1 -0
  55. package/src/poeditor/generatePoeditorClient.d.ts +1 -0
  56. package/src/poeditor/generatePoeditorClient.js +54 -0
  57. package/src/poeditor/generatePoeditorClient.js.map +1 -0
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * API V2
6
+ * Connect your software to POEditor with this simple API
7
+ *
8
+ * The version of the OpenAPI document: 1.0.6
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.Configuration = void 0;
17
+ class Configuration {
18
+ /**
19
+ * parameter for apiKey security
20
+ * @param name security name
21
+ * @memberof Configuration
22
+ */
23
+ apiKey;
24
+ /**
25
+ * parameter for basic security
26
+ *
27
+ * @type {string}
28
+ * @memberof Configuration
29
+ */
30
+ username;
31
+ /**
32
+ * parameter for basic security
33
+ *
34
+ * @type {string}
35
+ * @memberof Configuration
36
+ */
37
+ password;
38
+ /**
39
+ * parameter for oauth2 security
40
+ * @param name security name
41
+ * @param scopes oauth2 scope
42
+ * @memberof Configuration
43
+ */
44
+ accessToken;
45
+ /**
46
+ * override base path
47
+ *
48
+ * @type {string}
49
+ * @memberof Configuration
50
+ */
51
+ basePath;
52
+ /**
53
+ * override server index
54
+ *
55
+ * @type {number}
56
+ * @memberof Configuration
57
+ */
58
+ serverIndex;
59
+ /**
60
+ * base options for axios calls
61
+ *
62
+ * @type {any}
63
+ * @memberof Configuration
64
+ */
65
+ baseOptions;
66
+ /**
67
+ * The FormData constructor that will be used to create multipart form data
68
+ * requests. You can inject this here so that execution environments that
69
+ * do not support the FormData class can still run the generated client.
70
+ *
71
+ * @type {new () => FormData}
72
+ */
73
+ formDataCtor;
74
+ constructor(param = {}) {
75
+ this.apiKey = param.apiKey;
76
+ this.username = param.username;
77
+ this.password = param.password;
78
+ this.accessToken = param.accessToken;
79
+ this.basePath = param.basePath;
80
+ this.serverIndex = param.serverIndex;
81
+ this.baseOptions = param.baseOptions;
82
+ this.formDataCtor = param.formDataCtor;
83
+ }
84
+ /**
85
+ * Check if the given MIME is a JSON MIME.
86
+ * JSON MIME examples:
87
+ * application/json
88
+ * application/json; charset=UTF8
89
+ * APPLICATION/JSON
90
+ * application/vnd.company+json
91
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
92
+ * @return True if the given MIME is JSON, false otherwise.
93
+ */
94
+ isJsonMime(mime) {
95
+ const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
96
+ return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
97
+ }
98
+ }
99
+ exports.Configuration = Configuration;
100
+ //# sourceMappingURL=configuration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../../../../packages/intl/src/poeditor/api.generated/configuration.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;AAcH,MAAa,aAAa;IACtB;;;;OAIG;IACH,MAAM,CAA+F;IACrG;;;;;OAKG;IACH,QAAQ,CAAU;IAClB;;;;;OAKG;IACH,QAAQ,CAAU;IAClB;;;;;OAKG;IACH,WAAW,CAAuI;IAClJ;;;;;OAKG;IACH,QAAQ,CAAU;IAClB;;;;;OAKG;IACH,WAAW,CAAU;IACrB;;;;;OAKG;IACH,WAAW,CAAO;IAClB;;;;;;OAMG;IACH,YAAY,CAAiB;IAE7B,YAAY,QAAiC,EAAE;QAC3C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QACrC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QACrC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;IAC3C,CAAC;IAED;;;;;;;;;OASG;IACI,UAAU,CAAC,IAAY;QAC1B,MAAM,QAAQ,GAAW,IAAI,MAAM,CAAC,+DAA+D,EAAE,GAAG,CAAC,CAAC;QAC1G,OAAO,IAAI,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,WAAW,EAAE,KAAK,6BAA6B,CAAC,CAAC;IAC1G,CAAC;CACJ;AAnFD,sCAmFC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * API V2
3
+ * Connect your software to POEditor with this simple API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.6
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ export * from "./api";
13
+ export * from "./configuration";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const tslib_1 = require("tslib");
5
+ /**
6
+ * API V2
7
+ * Connect your software to POEditor with this simple API
8
+ *
9
+ * The version of the OpenAPI document: 1.0.6
10
+ *
11
+ *
12
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
13
+ * https://openapi-generator.tech
14
+ * Do not edit the class manually.
15
+ */
16
+ tslib_1.__exportStar(require("./api"), exports);
17
+ tslib_1.__exportStar(require("./configuration"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/intl/src/poeditor/api.generated/index.ts"],"names":[],"mappings":";AAAA,oBAAoB;;;AAEpB;;;;;;;;;;GAUG;AAGH,gDAAsB;AACtB,0DAAgC"}
@@ -0,0 +1 @@
1
+ export declare function generatePOEditorClient(): Promise<void>;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generatePOEditorClient = generatePOEditorClient;
4
+ const child_process_1 = require("child_process");
5
+ const fs_1 = require("fs");
6
+ const promises_1 = require("fs/promises");
7
+ const path_1 = require("path");
8
+ const swaggerUrl = "https://poeditor.com/public/api/swagger.yaml";
9
+ const schemaDir = "./src/poeditor/openapi-schema";
10
+ try {
11
+ generatePOEditorClient();
12
+ }
13
+ catch (error) {
14
+ console.error("Error:", error);
15
+ process.exit(1);
16
+ }
17
+ async function generatePOEditorClient() {
18
+ await downloadSwaggerFile();
19
+ generateApiClient();
20
+ }
21
+ async function downloadSwaggerFile() {
22
+ console.log("Downloading POEditor swagger file...");
23
+ const response = await fetch(swaggerUrl);
24
+ if (!response.ok) {
25
+ throw new Error(`Failed to download swagger file: ${response.statusText}`);
26
+ }
27
+ const content = await response.text();
28
+ await (0, promises_1.mkdir)(schemaDir, { recursive: true });
29
+ const filePath = (0, path_1.join)(schemaDir, "swagger.yaml");
30
+ (0, fs_1.writeFileSync)(filePath, content);
31
+ console.log(`Swagger file saved to ${filePath}`);
32
+ }
33
+ function generateApiClient() {
34
+ console.log("Generating API client...");
35
+ try {
36
+ const command = [
37
+ "npx",
38
+ "@openapitools/openapi-generator-cli",
39
+ "generate",
40
+ "-g",
41
+ "typescript-axios",
42
+ "-i",
43
+ "./src/poeditor/openapi-schema/swagger.yaml",
44
+ "-o",
45
+ "./src/poeditor/api.generated",
46
+ ].join(" ");
47
+ (0, child_process_1.execSync)(command);
48
+ console.log("API client generated successfully!");
49
+ }
50
+ catch (error) {
51
+ throw new Error(`API client generation failed. Error: ${error}`);
52
+ }
53
+ }
54
+ //# sourceMappingURL=generatePoeditorClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generatePoeditorClient.js","sourceRoot":"","sources":["../../../../../packages/intl/src/poeditor/generatePoeditorClient.ts"],"names":[],"mappings":";;AAeA,wDAGC;AAlBD,iDAAwC;AACxC,2BAAkC;AAClC,0CAAmC;AACnC,+BAA2B;AAE3B,MAAM,UAAU,GAAG,8CAA8C,CAAA;AACjE,MAAM,SAAS,GAAG,+BAA+B,CAAA;AAEjD,IAAI,CAAC;IACH,sBAAsB,EAAE,CAAA;AAC1B,CAAC;AAAC,OAAO,KAAK,EAAE,CAAC;IACf,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;IAC9B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC;AAEM,KAAK,UAAU,sBAAsB;IAC1C,MAAM,mBAAmB,EAAE,CAAA;IAC3B,iBAAiB,EAAE,CAAA;AACrB,CAAC;AAED,KAAK,UAAU,mBAAmB;IAChC,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAA;IAEnD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,UAAU,CAAC,CAAA;IACxC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAA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