@breadstone-tools/localizator-app 0.0.12-beta.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 (86) hide show
  1. package/Cli/Arguments/AnalyzeCommandArgs.d.ts +2 -0
  2. package/Cli/Arguments/AnalyzeCommandArgs.d.ts.map +1 -0
  3. package/Cli/Arguments/AnalyzeCommandArgs.js +127 -0
  4. package/Cli/Arguments/AnalyzeCommandArgs.js.map +1 -0
  5. package/Cli/Arguments/Configurations/IAnalyzeCommandArgsConfig.d.ts +2 -0
  6. package/Cli/Arguments/Configurations/IAnalyzeCommandArgsConfig.d.ts.map +1 -0
  7. package/Cli/Arguments/Configurations/IAnalyzeCommandArgsConfig.js +32 -0
  8. package/Cli/Arguments/Configurations/IAnalyzeCommandArgsConfig.js.map +1 -0
  9. package/Cli/Arguments/Configurations/ICliArgsConfig.d.ts +2 -0
  10. package/Cli/Arguments/Configurations/ICliArgsConfig.d.ts.map +1 -0
  11. package/Cli/Arguments/Configurations/ICliArgsConfig.js +13 -0
  12. package/Cli/Arguments/Configurations/ICliArgsConfig.js.map +1 -0
  13. package/Cli/Arguments/Configurations/IDetectCommandArgsConfig.d.ts +2 -0
  14. package/Cli/Arguments/Configurations/IDetectCommandArgsConfig.d.ts.map +1 -0
  15. package/Cli/Arguments/Configurations/IDetectCommandArgsConfig.js +18 -0
  16. package/Cli/Arguments/Configurations/IDetectCommandArgsConfig.js.map +1 -0
  17. package/Cli/Arguments/Configurations/IGenerateCommandArgsConfig.d.ts +2 -0
  18. package/Cli/Arguments/Configurations/IGenerateCommandArgsConfig.d.ts.map +1 -0
  19. package/Cli/Arguments/Configurations/IGenerateCommandArgsConfig.js +24 -0
  20. package/Cli/Arguments/Configurations/IGenerateCommandArgsConfig.js.map +1 -0
  21. package/Cli/Arguments/Configurations/IInfoCommandArgsConfig.d.ts +2 -0
  22. package/Cli/Arguments/Configurations/IInfoCommandArgsConfig.d.ts.map +1 -0
  23. package/Cli/Arguments/Configurations/IInfoCommandArgsConfig.js +12 -0
  24. package/Cli/Arguments/Configurations/IInfoCommandArgsConfig.js.map +1 -0
  25. package/Cli/Arguments/Configurations/ISortCommandArgsConfig.d.ts +2 -0
  26. package/Cli/Arguments/Configurations/ISortCommandArgsConfig.d.ts.map +1 -0
  27. package/Cli/Arguments/Configurations/ISortCommandArgsConfig.js +16 -0
  28. package/Cli/Arguments/Configurations/ISortCommandArgsConfig.js.map +1 -0
  29. package/Cli/Arguments/Configurations/ITransformCommandArgsConfig.d.ts +2 -0
  30. package/Cli/Arguments/Configurations/ITransformCommandArgsConfig.d.ts.map +1 -0
  31. package/Cli/Arguments/Configurations/ITransformCommandArgsConfig.js +16 -0
  32. package/Cli/Arguments/Configurations/ITransformCommandArgsConfig.js.map +1 -0
  33. package/Cli/Arguments/GenerateCommandArgs.d.ts +2 -0
  34. package/Cli/Arguments/GenerateCommandArgs.d.ts.map +1 -0
  35. package/Cli/Arguments/GenerateCommandArgs.js +206 -0
  36. package/Cli/Arguments/GenerateCommandArgs.js.map +1 -0
  37. package/Cli/Arguments/InfoCommandArgs.d.ts +2 -0
  38. package/Cli/Arguments/InfoCommandArgs.d.ts.map +1 -0
  39. package/Cli/Arguments/InfoCommandArgs.js +13 -0
  40. package/Cli/Arguments/InfoCommandArgs.js.map +1 -0
  41. package/Cli/Cli.d.ts +2 -0
  42. package/Cli/Cli.d.ts.map +1 -0
  43. package/Cli/Cli.js +67 -0
  44. package/Cli/Cli.js.map +1 -0
  45. package/Cli/CliArgs.d.ts +2 -0
  46. package/Cli/CliArgs.d.ts.map +1 -0
  47. package/Cli/CliArgs.js +82 -0
  48. package/Cli/CliArgs.js.map +1 -0
  49. package/Cli/CliRun.d.ts +2 -0
  50. package/Cli/CliRun.d.ts.map +1 -0
  51. package/Cli/CliRun.js +37 -0
  52. package/Cli/CliRun.js.map +1 -0
  53. package/Cli/Commands/AnalyzeCommand.d.ts +2 -0
  54. package/Cli/Commands/AnalyzeCommand.d.ts.map +1 -0
  55. package/Cli/Commands/AnalyzeCommand.js +84 -0
  56. package/Cli/Commands/AnalyzeCommand.js.map +1 -0
  57. package/Cli/Commands/DetectCommand.d.ts +2 -0
  58. package/Cli/Commands/DetectCommand.d.ts.map +1 -0
  59. package/Cli/Commands/DetectCommand.js +81 -0
  60. package/Cli/Commands/DetectCommand.js.map +1 -0
  61. package/Cli/Commands/GenerateCommand.d.ts +2 -0
  62. package/Cli/Commands/GenerateCommand.d.ts.map +1 -0
  63. package/Cli/Commands/GenerateCommand.js +81 -0
  64. package/Cli/Commands/GenerateCommand.js.map +1 -0
  65. package/Cli/Commands/InfoCommand.d.ts +2 -0
  66. package/Cli/Commands/InfoCommand.d.ts.map +1 -0
  67. package/Cli/Commands/InfoCommand.js +91 -0
  68. package/Cli/Commands/InfoCommand.js.map +1 -0
  69. package/Cli/Commands/SortCommand.d.ts +2 -0
  70. package/Cli/Commands/SortCommand.d.ts.map +1 -0
  71. package/Cli/Commands/SortCommand.js +75 -0
  72. package/Cli/Commands/SortCommand.js.map +1 -0
  73. package/Cli/Commands/TransformCommand.d.ts +2 -0
  74. package/Cli/Commands/TransformCommand.d.ts.map +1 -0
  75. package/Cli/Commands/TransformCommand.js +87 -0
  76. package/Cli/Commands/TransformCommand.js.map +1 -0
  77. package/Index.d.ts +4 -0
  78. package/Index.d.ts.map +1 -0
  79. package/Index.js +8 -0
  80. package/Index.js.map +1 -0
  81. package/LICENSE +21 -0
  82. package/Run2.d.ts +55 -0
  83. package/Run2.d.ts.map +1 -0
  84. package/Run2.js +192 -0
  85. package/Run2.js.map +1 -0
  86. package/package.json +25 -0
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ // #region Imports
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.SortCommand = void 0;
5
+ const utilities_1 = require("@breadstone-infrastructure/utilities");
6
+ const localizator_core_1 = require("@breadstone-tools/localizator-core");
7
+ // #endregion
8
+ /**
9
+ * A command that sorts the resources.
10
+ *
11
+ * @internal
12
+ */
13
+ class SortCommand extends utilities_1.ProgramCommandBase {
14
+ // #region Fields
15
+ _logger;
16
+ _fileSystem;
17
+ _resourceScanner;
18
+ _resourceSorter;
19
+ // #endregion
20
+ // #region Ctor
21
+ /**
22
+ * Constructs a new instance of the `SortCommand` class.
23
+ *
24
+ * @public
25
+ */
26
+ constructor(config, logger, fileSystem) {
27
+ super(config);
28
+ this._logger = logger;
29
+ this._fileSystem = fileSystem;
30
+ this._resourceScanner = new localizator_core_1.ResourceScanner(logger, fileSystem);
31
+ this._resourceSorter = new localizator_core_1.ResourceSorter(logger, fileSystem, {
32
+ dryRun: config.dryRun,
33
+ order: config.order
34
+ });
35
+ }
36
+ // #endregion
37
+ // #region Properties
38
+ /**
39
+ * Gets the command name.
40
+ *
41
+ * @public
42
+ * @readonly
43
+ */
44
+ get name() {
45
+ throw new Error('Method not implemented.');
46
+ }
47
+ /**
48
+ * Gets the optional arguments.
49
+ *
50
+ * @public
51
+ * @readonly
52
+ */
53
+ get args() {
54
+ throw new Error('Method not implemented.');
55
+ }
56
+ // #endregion
57
+ // #region Methods
58
+ /**
59
+ * Configures the command.
60
+ *
61
+ * @public
62
+ * @override
63
+ */
64
+ execute() {
65
+ const resources = this._resourceScanner.scan(this.config.resourceRoot, this.config.type);
66
+ const result = this._resourceSorter
67
+ .sort(resources);
68
+ return Promise.resolve({
69
+ canceled: false,
70
+ result: result
71
+ });
72
+ }
73
+ }
74
+ exports.SortCommand = SortCommand;
75
+ //# sourceMappingURL=SortCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SortCommand.js","sourceRoot":"","sources":["../../../src/Cli/Commands/SortCommand.ts"],"names":[],"mappings":";AAAA,kBAAkB;;;AAElB,oEAAuJ;AAEvJ,yEAAyG;AAEzG,aAAa;AAEb;;;;GAIG;AACH,MAAa,WAAY,SAAQ,8BAA0C;IAEvE,iBAAiB;IAEA,OAAO,CAAU;IACjB,WAAW,CAAc;IACzB,gBAAgB,CAAkB;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ceRoot":"","sources":["../../../src/Cli/Commands/TransformCommand.ts"],"names":[],"mappings":""}
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ // #region Imports
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TransformCommand = void 0;
5
+ const utilities_1 = require("@breadstone-infrastructure/utilities");
6
+ const localizator_core_1 = require("@breadstone-tools/localizator-core");
7
+ // #endregion
8
+ /**
9
+ * A command that transforms the resources.
10
+ *
11
+ * @internal
12
+ */
13
+ class TransformCommand extends utilities_1.ProgramCommandBase {
14
+ // #region Fields
15
+ _logger;
16
+ _fileSystem;
17
+ _resourceTransformer;
18
+ _resourceScanner;
19
+ // #endregion
20
+ // #region Ctor
21
+ /**
22
+ * Constructs a new instance of the `TransformCommand` class.
23
+ *
24
+ * @public
25
+ */
26
+ constructor(config, logger, fileSystem) {
27
+ super(config);
28
+ this._logger = logger;
29
+ this._fileSystem = fileSystem;
30
+ this._resourceScanner = new localizator_core_1.ResourceScanner(logger, fileSystem);
31
+ this._resourceTransformer = new localizator_core_1.ResourceTransformer(logger);
32
+ }
33
+ // #endregion
34
+ // #region Properties
35
+ /**
36
+ * Gets the command name.
37
+ *
38
+ * @public
39
+ * @readonly
40
+ */
41
+ get name() {
42
+ throw new Error('Method not implemented.');
43
+ }
44
+ /**
45
+ * Gets the optional arguments.
46
+ *
47
+ * @public
48
+ * @readonly
49
+ */
50
+ get args() {
51
+ throw new Error('Method not implemented.');
52
+ }
53
+ // #endregion
54
+ // #region Methods
55
+ /**
56
+ * @public
57
+ * @override
58
+ */
59
+ async execute() {
60
+ const resources = this._resourceScanner.scan(this.config.resourceRoot, this.config.type);
61
+ const transformerResults = [];
62
+ for (const type of this.config.types) {
63
+ for (const r of resources) {
64
+ const models = this._resourceTransformer.transform(r);
65
+ const targetResource = this._resourceTransformer.serialize(models, {
66
+ name: this._fileSystem.changeExtension(r.name, type),
67
+ path: this._fileSystem.changeExtension(r.path, type),
68
+ locale: r.locale,
69
+ target: type
70
+ });
71
+ if (!this.config.dryRun) {
72
+ this._fileSystem.writeAllText(targetResource.path, targetResource.toString());
73
+ }
74
+ transformerResults.push({
75
+ originalResource: r,
76
+ transformedResource: targetResource
77
+ });
78
+ }
79
+ }
80
+ return Promise.resolve({
81
+ canceled: false,
82
+ result: transformerResults
83
+ });
84
+ }
85
+ }
86
+ exports.TransformCommand = TransformCommand;
87
+ //# sourceMappingURL=TransformCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransformCommand.js","sourceRoot":"","sources":["../../../src/Cli/Commands/TransformCommand.ts"],"names":[],"mappings":";AAAA,kBAAkB;;;AAElB,oEAAuJ;AAEvJ,yEAA2H;AAE3H,aAAa;AAEb;;;;GAIG;AACH,MAAa,gBAAiB,SAAQ,8BAA+C;IAEjF,iBAAiB;IAEA,OAAO,CAAU;IACjB,WAAW,CAAc;IACzB,oBAAoB,CAAsB;IAC1C,gBAAgB,CAAkB;IAEnD,aAAa;IAEb,eAAe;IAEf;;;;OAIG;IACH,YAAmB,MAAmC,EAAE,MAAe,EAAE,UAAuB;QAC5F,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAI,CAAC,gBAAgB,GAAG,IAAI,kCAAe,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QAChE,IAAI,CAAC,oBAAoB,GAAG,IAAI,sCAAmB,CAAC,MAAM,CAAC,CAAC;IAChE,CAAC;IAED,aAAa;IAEb,qBAAqB;IAErB;;;;;OAKG;IACH,IAAoB,IAAI;QACpB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IAED;;;;;OAKG;IACH,IAAoB,IAAI;QACpB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IAED,aAAa;IAEb,kBAAkB;IAElB;;;OAGG;IACa,KAAK,CAAC,OAAO;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li.js';
2
+ export type { IRunResult2, IRunConfig2 } from './Run2.js';
3
+ export { run2 } from './Run2.js';
4
+ //# sourceMappingURL=Index.d.ts.map
package/Index.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Index.d.ts","sourceRoot":"","sources":["../src/Index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC"}
package/Index.js ADDED
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.run2 = exports.Cli = void 0;
4
+ var Cli_js_1 = require("./Cli/Cli.js");
5
+ Object.defineProperty(exports, "Cli", { enumerable: true, get: function () { return Cli_js_1.Cli; } });
6
+ var Run2_js_1 = require("./Run2.js");
7
+ Object.defineProperty(exports, "run2", { enumerable: true, get: function () { return Run2_js_1.run2; } });
8
+ //# sourceMappingURL=Index.js.map
package/Index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Index.js","sourceRoot":"","sources":["../src/Index.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AAA1B,6FAAA,GAAG,OAAA;AAEZ,qCAAiC;AAAxB,+FAAA,IAAI,OAAA"}
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Breadstone
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/Run2.d.ts ADDED
@@ -0,0 +1,55 @@
1
+ import { Presets, ResourceMode, type ILocalizationProcessorEventMap, type IProcessOptions, type ResourceType, type ILocalizationProcessorResult, type IAnalyzerTaskResult, type IResourceTransformerResult, type IResourceInfo } from '@breadstone-tools/localizator-core';
2
+ import type { IResourceGeneratorResult } from '@breadstone-tools/localizator-ai';
3
+ export interface IRunConfig2 {
4
+ cwd: string;
5
+ output: string;
6
+ dryRun?: boolean;
7
+ detect?: IProcessOptions & {
8
+ languages?: Array<string>;
9
+ root?: string;
10
+ resourceRoot?: string;
11
+ preset?: Presets;
12
+ type?: ResourceMode;
13
+ };
14
+ sort?: {
15
+ enabled?: boolean;
16
+ order?: 'asc' | 'desc';
17
+ };
18
+ analyze?: {
19
+ enabled?: boolean;
20
+ rules?: Array<string>;
21
+ };
22
+ cache?: {
23
+ enabled?: boolean;
24
+ dirPath?: string;
25
+ };
26
+ transform?: {
27
+ enabled?: boolean;
28
+ types?: Array<ResourceType>;
29
+ };
30
+ generate?: {
31
+ enabled?: boolean;
32
+ apiKey?: string;
33
+ model?: string;
34
+ temperature?: number;
35
+ locales?: Array<string>;
36
+ baseLocale?: string;
37
+ chunkSize?: number;
38
+ extendedInstruction?: string;
39
+ onlyNew?: boolean;
40
+ strategy?: string;
41
+ };
42
+ callback?: {
43
+ onDetected?: (...args: ILocalizationProcessorEventMap['detected']) => void;
44
+ onFailed?: (...args: ILocalizationProcessorEventMap['failed']) => void;
45
+ };
46
+ }
47
+ export interface IRunResult2 {
48
+ localizations?: Array<ILocalizationProcessorResult>;
49
+ analyze?: Array<IAnalyzerTaskResult>;
50
+ generate?: Array<IResourceGeneratorResult>;
51
+ transform?: Array<IResourceTransformerResult>;
52
+ sort?: Array<IResourceInfo>;
53
+ }
54
+ export declare function run2(config: IRunConfig2): Promise<IRunResult2>;
55
+ //# sourceMappingURL=Run2.d.ts.map
package/Run2.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Run2.d.ts","sourceRoot":"","sources":["../src/Run2.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,8BAA8B,EAAE,KAAK,eAAe,EAAE,KAAK,YAAY,EAAE,KAAK,4BAA4B,EAAE,KAAK,mBAAmB,EAAE,KAAK,0BAA0B,EAAE,KAAK,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAM3Q,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAOjF,MAAM,WAAW,WAAW;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,eAAe,GAAG;QACvB,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,IAAI,CAAC,EAAE,YAAY,CAAC;KACvB,CAAC;IACF,IAAI,CAAC,EAAE;QACH,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;KAC1B,CAAC;IACF,OAAO,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,KAAK,CAAC,EAAE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C/B;AAED,wBAAsB,IAAI,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAqCpE"}
package/Run2.js ADDED
@@ -0,0 +1,192 @@
1
+ "use strict";
2
+ /* eslint-disable complexity */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.run2 = run2;
5
+ // #region Imports
6
+ const localizator_core_1 = require("@breadstone-tools/localizator-core");
7
+ const utilities_1 = require("@breadstone-infrastructure/utilities");
8
+ const AnalyzeCommand_1 = require("./Cli/Commands/AnalyzeCommand");
9
+ const GenerateCommand_1 = require("./Cli/Commands/GenerateCommand");
10
+ const TransformCommand_1 = require("./Cli/Commands/TransformCommand");
11
+ const SortCommand_1 = require("./Cli/Commands/SortCommand");
12
+ const DetectCommand_1 = require("./Cli/Commands/DetectCommand");
13
+ const IGenerateCommandArgsConfig_1 = require("./Cli/Arguments/Configurations/IGenerateCommandArgsConfig");
14
+ async function run2(config) {
15
+ const container = utilities_1.Container.instance
16
+ .provideFactory('config', () => prepareConfig(config))
17
+ .provideFactory('logger', () => console)
18
+ .provideFactory('fileSystem', () => new utilities_1.FileSystem());
19
+ const type = getType(container.get('config'));
20
+ const result = await executeCommand(type, container.get('config'), container.get('logger'), container.get('fileSystem'));
21
+ if (result.canceled) {
22
+ throw new Error((0, utilities_1.t) `Canceled.`);
23
+ }
24
+ switch (type) {
25
+ case 'analyze':
26
+ return {
27
+ analyze: result.result
28
+ };
29
+ case 'generate':
30
+ return {
31
+ generate: result.result
32
+ };
33
+ case 'transform':
34
+ return {
35
+ transform: result.result
36
+ };
37
+ case 'sort':
38
+ return {
39
+ sort: result.result
40
+ };
41
+ case 'detect':
42
+ return {
43
+ localizations: result.result
44
+ };
45
+ default:
46
+ throw new Error((0, utilities_1.t) `Unknown command type: ${type}`);
47
+ }
48
+ }
49
+ async function executeCommand(type, config, logger, fileSystem) {
50
+ switch (type) {
51
+ case 'analyze':
52
+ return new AnalyzeCommand_1.AnalyzeCommand({
53
+ baseLocale: config.generate.baseLocale,
54
+ languages: config.detect.languages,
55
+ preset: config.detect.preset,
56
+ root: utilities_1.Path.combine(config.cwd, config.detect.root),
57
+ type: config.detect.type,
58
+ resourceRoot: utilities_1.Path.combine(config.cwd, config.detect.root, config.detect.resourceRoot),
59
+ resourceKey: config.detect.resourceKey,
60
+ rules: config.analyze.rules,
61
+ cwd: config.cwd,
62
+ debug: config.dryRun,
63
+ dryRun: config.dryRun,
64
+ emoji: true,
65
+ resourceKeyPrefix: config.detect.resourceKey.prefix,
66
+ resourceKeySuffix: config.detect.resourceKey.suffix
67
+ }, logger, fileSystem)
68
+ .execute();
69
+ case 'generate':
70
+ return new GenerateCommand_1.GenerateCommand({
71
+ apiKey: config.generate.apiKey,
72
+ baseLocale: config.generate.baseLocale,
73
+ chunkSize: config.generate.chunkSize,
74
+ cwd: config.cwd,
75
+ debug: config.dryRun,
76
+ dryRun: config.dryRun,
77
+ emoji: true,
78
+ extendedInstruction: config.generate.extendedInstruction,
79
+ locales: config.generate.locales,
80
+ model: config.generate.model,
81
+ onlyNew: config.generate.onlyNew,
82
+ resourceRoot: utilities_1.Path.combine(config.cwd, config.detect.root, config.detect.resourceRoot),
83
+ strategy: config.generate.strategy,
84
+ temperature: config.generate.temperature,
85
+ type: config.detect.type
86
+ }, logger, fileSystem)
87
+ .execute();
88
+ case 'transform':
89
+ return new TransformCommand_1.TransformCommand({
90
+ cwd: config.cwd,
91
+ debug: config.dryRun,
92
+ dryRun: config.dryRun,
93
+ emoji: true,
94
+ resourceRoot: utilities_1.Path.combine(config.cwd, config.detect.root, config.detect.resourceRoot),
95
+ types: config.transform.types,
96
+ type: config.detect.type
97
+ }, logger, fileSystem)
98
+ .execute();
99
+ case 'sort':
100
+ return new SortCommand_1.SortCommand({
101
+ cwd: config.cwd,
102
+ debug: config.dryRun,
103
+ dryRun: config.dryRun,
104
+ emoji: true,
105
+ order: config.sort.order,
106
+ resourceRoot: utilities_1.Path.combine(config.cwd, config.detect.root, config.detect.resourceRoot),
107
+ type: config.detect.type
108
+ }, logger, fileSystem)
109
+ .execute();
110
+ case 'detect':
111
+ return new DetectCommand_1.DetectCommand({
112
+ cwd: config.cwd,
113
+ debug: config.dryRun,
114
+ dryRun: config.dryRun,
115
+ emoji: true,
116
+ preset: config.detect.preset,
117
+ resourceKeyPrefix: config.detect.resourceKey.prefix,
118
+ resourceKeySuffix: config.detect.resourceKey.suffix,
119
+ root: utilities_1.Path.combine(config.cwd, config.detect.root),
120
+ type: config.detect.type
121
+ }, logger, fileSystem)
122
+ .execute();
123
+ default:
124
+ throw new Error((0, utilities_1.t) `Unknown command type: ${type}`);
125
+ }
126
+ }
127
+ function getType(config) {
128
+ if (config.analyze?.enabled) {
129
+ return 'analyze';
130
+ }
131
+ if (config.generate?.enabled) {
132
+ return 'generate';
133
+ }
134
+ if (config.transform?.enabled) {
135
+ return 'transform';
136
+ }
137
+ if (config.sort?.enabled) {
138
+ return 'sort';
139
+ }
140
+ return 'detect';
141
+ }
142
+ function prepareConfig(baseConfig) {
143
+ return {
144
+ cwd: baseConfig.cwd,
145
+ output: baseConfig.output,
146
+ dryRun: baseConfig.dryRun ?? false,
147
+ detect: {
148
+ languages: baseConfig.detect?.languages ?? [],
149
+ type: baseConfig.detect?.type ?? localizator_core_1.ResourceMode.Json,
150
+ root: baseConfig.detect?.root ?? '',
151
+ resourceRoot: baseConfig.detect?.resourceRoot ?? '',
152
+ preset: baseConfig.detect?.preset ?? localizator_core_1.Presets.Lit,
153
+ resourceKey: {
154
+ prefix: baseConfig.detect?.resourceKey?.prefix ?? '',
155
+ suffix: baseConfig.detect?.resourceKey?.suffix ?? ''
156
+ }
157
+ },
158
+ sort: {
159
+ enabled: baseConfig.sort?.enabled ?? false,
160
+ order: baseConfig.sort?.order ?? 'asc'
161
+ },
162
+ analyze: {
163
+ enabled: baseConfig.analyze?.enabled ?? false,
164
+ rules: baseConfig.analyze?.rules ?? []
165
+ },
166
+ cache: {
167
+ enabled: baseConfig.cache?.enabled ?? false,
168
+ dirPath: baseConfig.cache?.dirPath ?? ''
169
+ },
170
+ transform: {
171
+ enabled: baseConfig.transform?.enabled ?? false,
172
+ types: baseConfig.transform?.types ?? []
173
+ },
174
+ generate: {
175
+ enabled: baseConfig.generate?.enabled ?? false,
176
+ apiKey: baseConfig.generate?.apiKey ?? IGenerateCommandArgsConfig_1.DEFAULT_GENERATE_COMMAND_ARGS_CONFIG.apiKey,
177
+ model: baseConfig.generate?.model ?? IGenerateCommandArgsConfig_1.DEFAULT_GENERATE_COMMAND_ARGS_CONFIG.model,
178
+ temperature: baseConfig.generate?.temperature ?? IGenerateCommandArgsConfig_1.DEFAULT_GENERATE_COMMAND_ARGS_CONFIG.temperature,
179
+ locales: baseConfig.generate?.locales ?? IGenerateCommandArgsConfig_1.DEFAULT_GENERATE_COMMAND_ARGS_CONFIG.locales,
180
+ baseLocale: baseConfig.generate?.baseLocale ?? IGenerateCommandArgsConfig_1.DEFAULT_GENERATE_COMMAND_ARGS_CONFIG.baseLocale,
181
+ chunkSize: baseConfig.generate?.chunkSize ?? IGenerateCommandArgsConfig_1.DEFAULT_GENERATE_COMMAND_ARGS_CONFIG.chunkSize,
182
+ extendedInstruction: baseConfig.generate?.extendedInstruction ?? IGenerateCommandArgsConfig_1.DEFAULT_GENERATE_COMMAND_ARGS_CONFIG.extendedInstruction,
183
+ onlyNew: baseConfig.generate?.onlyNew ?? IGenerateCommandArgsConfig_1.DEFAULT_GENERATE_COMMAND_ARGS_CONFIG.onlyNew,
184
+ strategy: baseConfig.generate?.strategy ?? IGenerateCommandArgsConfig_1.DEFAULT_GENERATE_COMMAND_ARGS_CONFIG.strategy
185
+ },
186
+ callback: {
187
+ onDetected: baseConfig.callback?.onDetected ?? (() => { }),
188
+ onFailed: baseConfig.callback?.onFailed ?? (() => { })
189
+ }
190
+ };
191
+ }
192
+ //# sourceMappingURL=Run2.js.map
package/Run2.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Run2.js","sourceRoot":"","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C,CAAC,OAAO;YACrF,QAAQ,EAAE,UAAU,CAAC,QAAQ,EAAE,QAAQ,IAAI,iEAAoC,CAAC,QAAQ;SAC3F;QACD,QAAQ,EAAE;YACN,UAAU,EAAE,UAAU,CAAC,QAAQ,EAAE,UAAU,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YAC1D,QAAQ,EAAE,UAAU,CAAC,QAAQ,EAAE,QAAQ,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;SACzD;KACJ,CAAC;AACN,CAAC"}
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@breadstone-tools/localizator-app",
3
+ "description": "Localizator app/cli",
4
+ "version": "0.0.12-beta.0",
5
+ "license": "MIT",
6
+ "author": "andre.wehlert <awehlert@breadstone.de> (https://www.breadstone.de)",
7
+ "repository": {
8
+ "url": "git+ssh://git@github.com/RueDeRennes/mosaik.git"
9
+ },
10
+ "type": "commonjs",
11
+ "main": "./Index.js",
12
+ "commonjs": "./Index.js",
13
+ "module": "./Index.js",
14
+ "types": "./Index.d.ts",
15
+ "bin": {
16
+ "localizator": "./bin/localizator.js"
17
+ },
18
+ "dependencies": {
19
+ "@breadstone-infrastructure/utilities": "^0.0.12-beta.0",
20
+ "@breadstone-tools/localizator-ai": "^0.0.12-beta.0",
21
+ "@breadstone-tools/localizator-core": "^0.0.12-beta.0",
22
+ "cheerio": "^1.0.0",
23
+ "type-fest": "^4.40.1"
24
+ }
25
+ }