lingo.dev 0.90.0 → 0.90.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 +36 -23
- package/build/cli.cjs.map +1 -1
- package/build/cli.mjs +30 -17
- package/build/cli.mjs.map +1 -1
- package/package.json +4 -4
package/build/cli.mjs
CHANGED
|
@@ -3821,7 +3821,6 @@ async function trackEvent(distinctId, event, properties) {
|
|
|
3821
3821
|
}
|
|
3822
3822
|
try {
|
|
3823
3823
|
const { PostHog } = await import("posthog-node");
|
|
3824
|
-
console.log("--- ---");
|
|
3825
3824
|
const safeProperties = properties ? JSON.parse(
|
|
3826
3825
|
JSON.stringify(properties, (key, value) => {
|
|
3827
3826
|
if (value instanceof Error) {
|
|
@@ -3842,7 +3841,6 @@ async function trackEvent(distinctId, event, properties) {
|
|
|
3842
3841
|
flushInterval: 0
|
|
3843
3842
|
}
|
|
3844
3843
|
);
|
|
3845
|
-
console.log("--- ---");
|
|
3846
3844
|
await posthog.capture({
|
|
3847
3845
|
distinctId,
|
|
3848
3846
|
event,
|
|
@@ -3854,9 +3852,7 @@ async function trackEvent(distinctId, event, properties) {
|
|
|
3854
3852
|
}
|
|
3855
3853
|
}
|
|
3856
3854
|
});
|
|
3857
|
-
console.log("--- ---");
|
|
3858
3855
|
await posthog.shutdown();
|
|
3859
|
-
console.log("--- ---");
|
|
3860
3856
|
} catch (error) {
|
|
3861
3857
|
if (process.env.DEBUG) {
|
|
3862
3858
|
console.error(error);
|
|
@@ -4970,6 +4966,22 @@ var InBranchFlow = class extends IntegrationFlow {
|
|
|
4970
4966
|
}
|
|
4971
4967
|
return true;
|
|
4972
4968
|
}
|
|
4969
|
+
async returnToOriginalBranch() {
|
|
4970
|
+
const originalBranch = this.platformKit.platformConfig.baseBranchName;
|
|
4971
|
+
if (originalBranch) {
|
|
4972
|
+
this.ora.start(`Returning to original branch: ${originalBranch}`);
|
|
4973
|
+
try {
|
|
4974
|
+
execSync(`git checkout ${originalBranch}`, {
|
|
4975
|
+
stdio: "inherit",
|
|
4976
|
+
encoding: "utf8"
|
|
4977
|
+
});
|
|
4978
|
+
this.ora.succeed(`Returned to original branch: ${originalBranch}`);
|
|
4979
|
+
} catch (error) {
|
|
4980
|
+
const errorMessage = error instanceof Error ? error.message : "Unknown error occurred";
|
|
4981
|
+
this.ora.fail(`Failed to return to original branch: ${errorMessage}`);
|
|
4982
|
+
}
|
|
4983
|
+
}
|
|
4984
|
+
}
|
|
4973
4985
|
};
|
|
4974
4986
|
|
|
4975
4987
|
// src/cli/cmd/ci/flows/pull-request.ts
|
|
@@ -5548,24 +5560,25 @@ var ci_default = new Command10().command("ci").description("Run Lingo.dev CI/CD
|
|
|
5548
5560
|
LINGODOTDEV_PROCESS_OWN_COMMITS: options.processOwnCommits.toString()
|
|
5549
5561
|
}
|
|
5550
5562
|
};
|
|
5551
|
-
console.log("--- config ---");
|
|
5552
|
-
console.log(env);
|
|
5553
|
-
console.log("--- ---");
|
|
5554
5563
|
process.env = { ...process.env, ...env };
|
|
5555
5564
|
const ora = createOra();
|
|
5556
5565
|
const platformKit = getPlatformKit();
|
|
5557
5566
|
const { isPullRequestMode } = platformKit.config;
|
|
5558
5567
|
ora.info(`Pull request mode: ${isPullRequestMode ? "on" : "off"}`);
|
|
5559
5568
|
const flow = isPullRequestMode ? new PullRequestFlow(ora, platformKit) : new InBranchFlow(ora, platformKit);
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5569
|
+
try {
|
|
5570
|
+
const canRun = await flow.preRun?.();
|
|
5571
|
+
if (canRun === false) {
|
|
5572
|
+
return;
|
|
5573
|
+
}
|
|
5574
|
+
const hasChanges = await flow.run();
|
|
5575
|
+
if (!hasChanges) {
|
|
5576
|
+
return;
|
|
5577
|
+
}
|
|
5578
|
+
await flow.postRun?.();
|
|
5579
|
+
} finally {
|
|
5580
|
+
await flow.returnToOriginalBranch?.();
|
|
5567
5581
|
}
|
|
5568
|
-
await flow.postRun?.();
|
|
5569
5582
|
});
|
|
5570
5583
|
|
|
5571
5584
|
// src/cli/cmd/status.ts
|
|
@@ -5988,7 +6001,7 @@ function validateParams2(i18nConfig, flags) {
|
|
|
5988
6001
|
// package.json
|
|
5989
6002
|
var package_default = {
|
|
5990
6003
|
name: "lingo.dev",
|
|
5991
|
-
version: "0.90.
|
|
6004
|
+
version: "0.90.1",
|
|
5992
6005
|
description: "Lingo.dev CLI",
|
|
5993
6006
|
private: false,
|
|
5994
6007
|
publishConfig: {
|
|
@@ -6047,7 +6060,7 @@ var package_default = {
|
|
|
6047
6060
|
dependencies: {
|
|
6048
6061
|
"@ai-sdk/anthropic": "^1.2.6",
|
|
6049
6062
|
"@ai-sdk/openai": "^1.3.7",
|
|
6050
|
-
"@datocms/cma-client-node": "^
|
|
6063
|
+
"@datocms/cma-client-node": "^4.0.1",
|
|
6051
6064
|
"@gitbeaker/rest": "^39.34.3",
|
|
6052
6065
|
"@inquirer/prompts": "^7.4.1",
|
|
6053
6066
|
"@lingo.dev/_sdk": "workspace:*",
|