lingo.dev 0.129.0 → 0.130.1
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.
- package/build/cli.cjs +56 -8
- package/build/cli.cjs.map +1 -1
- package/build/cli.mjs +55 -7
- package/build/cli.mjs.map +1 -1
- package/package.json +1 -1
package/build/cli.mjs
CHANGED
|
@@ -12653,19 +12653,39 @@ function createAiSdkLocalizer(params) {
|
|
|
12653
12653
|
message: "Hola, mundo!"
|
|
12654
12654
|
}
|
|
12655
12655
|
}
|
|
12656
|
+
],
|
|
12657
|
+
[
|
|
12658
|
+
{
|
|
12659
|
+
sourceLocale: "en",
|
|
12660
|
+
targetLocale: "es",
|
|
12661
|
+
data: {
|
|
12662
|
+
spring: "Spring"
|
|
12663
|
+
},
|
|
12664
|
+
hints: {
|
|
12665
|
+
spring: ["A source of water"]
|
|
12666
|
+
}
|
|
12667
|
+
},
|
|
12668
|
+
{
|
|
12669
|
+
sourceLocale: "en",
|
|
12670
|
+
targetLocale: "es",
|
|
12671
|
+
data: {
|
|
12672
|
+
spring: "Manantial"
|
|
12673
|
+
}
|
|
12674
|
+
}
|
|
12656
12675
|
]
|
|
12657
12676
|
];
|
|
12677
|
+
const hasHints = input2.hints && Object.keys(input2.hints).length > 0;
|
|
12658
12678
|
const payload = {
|
|
12659
12679
|
sourceLocale: input2.sourceLocale,
|
|
12660
12680
|
targetLocale: input2.targetLocale,
|
|
12661
|
-
data: input2.processableData
|
|
12681
|
+
data: input2.processableData,
|
|
12682
|
+
...hasHints && { hints: input2.hints }
|
|
12662
12683
|
};
|
|
12663
12684
|
const response = await generateText2({
|
|
12664
12685
|
model,
|
|
12665
12686
|
...params.settings,
|
|
12666
12687
|
messages: [
|
|
12667
12688
|
{ role: "system", content: systemPrompt },
|
|
12668
|
-
{ role: "user", content: "OK" },
|
|
12669
12689
|
...shots.flatMap(
|
|
12670
12690
|
([userShot, assistantShot]) => [
|
|
12671
12691
|
{ role: "user", content: JSON.stringify(userShot) },
|
|
@@ -13804,8 +13824,9 @@ var InBranchFlow = class extends IntegrationFlow {
|
|
|
13804
13824
|
this.ora.start("Committing changes");
|
|
13805
13825
|
execSync2(`git add .`, { stdio: "inherit" });
|
|
13806
13826
|
execSync2(`git status --porcelain`, { stdio: "inherit" });
|
|
13827
|
+
const signFlag = this.platformKit.config.gpgSign ? "-S " : "";
|
|
13807
13828
|
execSync2(
|
|
13808
|
-
`git commit -m ${escapeShellArg(
|
|
13829
|
+
`git commit ${signFlag}-m ${escapeShellArg(
|
|
13809
13830
|
this.platformKit.config.commitMessage
|
|
13810
13831
|
)} --no-verify`,
|
|
13811
13832
|
{
|
|
@@ -13856,6 +13877,21 @@ var InBranchFlow = class extends IntegrationFlow {
|
|
|
13856
13877
|
execSync2(`git config --global safe.directory ${process.cwd()}`);
|
|
13857
13878
|
execSync2(`git config user.name "${gitConfig.userName}"`);
|
|
13858
13879
|
execSync2(`git config user.email "${gitConfig.userEmail}"`);
|
|
13880
|
+
if (this.platformKit.config.gpgSign) {
|
|
13881
|
+
try {
|
|
13882
|
+
const signingKey = execSync2(`git config user.signingkey`, {
|
|
13883
|
+
encoding: "utf8"
|
|
13884
|
+
}).trim();
|
|
13885
|
+
if (!signingKey) {
|
|
13886
|
+
throw new Error("No signing key configured");
|
|
13887
|
+
}
|
|
13888
|
+
} catch {
|
|
13889
|
+
throw new Error(
|
|
13890
|
+
"GPG signing is enabled but no signing key is configured. Import a GPG key (e.g., using crazy-max/ghaction-import-gpg) before running this action, or set gpg-sign to false."
|
|
13891
|
+
);
|
|
13892
|
+
}
|
|
13893
|
+
execSync2(`git config commit.gpgsign true`);
|
|
13894
|
+
}
|
|
13859
13895
|
this.platformKit?.gitConfig();
|
|
13860
13896
|
execSync2(`git fetch origin ${baseBranchName}`, { stdio: "inherit" });
|
|
13861
13897
|
execSync2(`git checkout ${baseBranchName} --`, { stdio: "inherit" });
|
|
@@ -14052,8 +14088,9 @@ var PullRequestFlow = class extends InBranchFlow {
|
|
|
14052
14088
|
const hasChanges = this.checkCommitableChanges();
|
|
14053
14089
|
if (hasChanges) {
|
|
14054
14090
|
execSync3("git add .", { stdio: "inherit" });
|
|
14091
|
+
const signFlag = this.platformKit.config.gpgSign ? "-S " : "";
|
|
14055
14092
|
execSync3(
|
|
14056
|
-
`git commit -m "chore: sync with ${this.platformKit.platformConfig.baseBranchName}" --no-verify`,
|
|
14093
|
+
`git commit ${signFlag}-m "chore: sync with ${this.platformKit.platformConfig.baseBranchName}" --no-verify`,
|
|
14057
14094
|
{
|
|
14058
14095
|
stdio: "inherit"
|
|
14059
14096
|
}
|
|
@@ -14115,6 +14152,10 @@ var PlatformKit = class {
|
|
|
14115
14152
|
LINGODOTDEV_PROCESS_OWN_COMMITS: Z6.preprocess(
|
|
14116
14153
|
(val) => val === "true" || val === true,
|
|
14117
14154
|
Z6.boolean()
|
|
14155
|
+
).optional(),
|
|
14156
|
+
LINGODOTDEV_GPG_SIGN: Z6.preprocess(
|
|
14157
|
+
(val) => val === "true" || val === true,
|
|
14158
|
+
Z6.boolean()
|
|
14118
14159
|
).optional()
|
|
14119
14160
|
}).parse(process.env);
|
|
14120
14161
|
return {
|
|
@@ -14125,7 +14166,8 @@ var PlatformKit = class {
|
|
|
14125
14166
|
commitAuthorName: env.LINGODOTDEV_COMMIT_AUTHOR_NAME || "Lingo.dev",
|
|
14126
14167
|
commitAuthorEmail: env.LINGODOTDEV_COMMIT_AUTHOR_EMAIL || "support@lingo.dev",
|
|
14127
14168
|
workingDir: env.LINGODOTDEV_WORKING_DIRECTORY || ".",
|
|
14128
|
-
processOwnCommits: env.LINGODOTDEV_PROCESS_OWN_COMMITS || false
|
|
14169
|
+
processOwnCommits: env.LINGODOTDEV_PROCESS_OWN_COMMITS || false,
|
|
14170
|
+
gpgSign: env.LINGODOTDEV_GPG_SIGN || false
|
|
14129
14171
|
};
|
|
14130
14172
|
}
|
|
14131
14173
|
};
|
|
@@ -14475,9 +14517,12 @@ var ci_default = new Command18().command("ci").description("Run localization pip
|
|
|
14475
14517
|
"--process-own-commits [boolean]",
|
|
14476
14518
|
"Allow processing commits made by this CI user (bypasses infinite loop prevention)",
|
|
14477
14519
|
parseBooleanArg
|
|
14520
|
+
).option(
|
|
14521
|
+
"--gpg-sign [boolean]",
|
|
14522
|
+
"Sign commits with GPG. Requires GPG to be configured in the environment",
|
|
14523
|
+
parseBooleanArg
|
|
14478
14524
|
).action(async (options) => {
|
|
14479
14525
|
const settings = getSettings(options.apiKey);
|
|
14480
|
-
console.log(options);
|
|
14481
14526
|
if (!settings.auth.apiKey) {
|
|
14482
14527
|
console.error("No API key provided");
|
|
14483
14528
|
return;
|
|
@@ -14511,6 +14556,9 @@ var ci_default = new Command18().command("ci").description("Run localization pip
|
|
|
14511
14556
|
},
|
|
14512
14557
|
...options.processOwnCommits && {
|
|
14513
14558
|
LINGODOTDEV_PROCESS_OWN_COMMITS: options.processOwnCommits.toString()
|
|
14559
|
+
},
|
|
14560
|
+
...options.gpgSign && {
|
|
14561
|
+
LINGODOTDEV_GPG_SIGN: options.gpgSign.toString()
|
|
14514
14562
|
}
|
|
14515
14563
|
};
|
|
14516
14564
|
process.env = { ...process.env, ...env };
|
|
@@ -15174,7 +15222,7 @@ async function renderHero2() {
|
|
|
15174
15222
|
// package.json
|
|
15175
15223
|
var package_default = {
|
|
15176
15224
|
name: "lingo.dev",
|
|
15177
|
-
version: "0.
|
|
15225
|
+
version: "0.130.1",
|
|
15178
15226
|
description: "Lingo.dev CLI",
|
|
15179
15227
|
private: false,
|
|
15180
15228
|
repository: {
|