arri 0.67.0 → 0.69.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 (3) hide show
  1. package/dist/cli.cjs +42 -0
  2. package/dist/cli.mjs +42 -0
  3. package/package.json +10 -10
package/dist/cli.cjs CHANGED
@@ -551,6 +551,19 @@ const use = citty.defineCommand({
551
551
  );
552
552
  }
553
553
  await Promise.all(cargoTomlTasks);
554
+ consola__default.info("Checking for go dependencies");
555
+ const goModFiles = await globby(["go.mod", "**/go.mod"]);
556
+ const goModFileTasks = [];
557
+ for (const file of goModFiles) {
558
+ goModFileTasks.push(
559
+ promises.readFile(path__default.resolve(file), "utf8").then((content) => {
560
+ const result = updateGoMod(content, version);
561
+ if (result.updated) {
562
+ fileMap[file] = result.content;
563
+ }
564
+ })
565
+ );
566
+ }
554
567
  const updateTasks = [];
555
568
  for (const key of Object.keys(fileMap)) {
556
569
  updateTasks.push(
@@ -756,6 +769,35 @@ function updateCargoToml(fileContent, version) {
756
769
  }
757
770
  return { updated, content: newLines.join("\n") };
758
771
  }
772
+ function updateGoMod(fileContent, version) {
773
+ const lines = fileContent.split("\n");
774
+ const newLines = [];
775
+ let updated = false;
776
+ for (const line of lines) {
777
+ if (!line.includes("github.com/modiimedia/arri")) {
778
+ newLines.push(line);
779
+ continue;
780
+ }
781
+ updated = true;
782
+ const lineParts = line.split(" ");
783
+ const updatedLineParts = [];
784
+ for (const part of lineParts) {
785
+ if (part.startsWith("v") && isNumberChar(part[1] ?? "")) {
786
+ updatedLineParts.push(`v${version}`);
787
+ continue;
788
+ }
789
+ updatedLineParts.push(part);
790
+ }
791
+ newLines.push(updatedLineParts.join(" "));
792
+ }
793
+ return {
794
+ updated,
795
+ content: newLines.join("\n")
796
+ };
797
+ }
798
+ function isNumberChar(char) {
799
+ return !Number.isNaN(Number(char));
800
+ }
759
801
 
760
802
  const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.cjs', document.baseURI).href)));
761
803
  const __dirname$1 = path__default.dirname(__filename$1);
package/dist/cli.mjs CHANGED
@@ -539,6 +539,19 @@ const use = defineCommand({
539
539
  );
540
540
  }
541
541
  await Promise.all(cargoTomlTasks);
542
+ consola.info("Checking for go dependencies");
543
+ const goModFiles = await globby(["go.mod", "**/go.mod"]);
544
+ const goModFileTasks = [];
545
+ for (const file of goModFiles) {
546
+ goModFileTasks.push(
547
+ readFile(path.resolve(file), "utf8").then((content) => {
548
+ const result = updateGoMod(content, version);
549
+ if (result.updated) {
550
+ fileMap[file] = result.content;
551
+ }
552
+ })
553
+ );
554
+ }
542
555
  const updateTasks = [];
543
556
  for (const key of Object.keys(fileMap)) {
544
557
  updateTasks.push(
@@ -744,6 +757,35 @@ function updateCargoToml(fileContent, version) {
744
757
  }
745
758
  return { updated, content: newLines.join("\n") };
746
759
  }
760
+ function updateGoMod(fileContent, version) {
761
+ const lines = fileContent.split("\n");
762
+ const newLines = [];
763
+ let updated = false;
764
+ for (const line of lines) {
765
+ if (!line.includes("github.com/modiimedia/arri")) {
766
+ newLines.push(line);
767
+ continue;
768
+ }
769
+ updated = true;
770
+ const lineParts = line.split(" ");
771
+ const updatedLineParts = [];
772
+ for (const part of lineParts) {
773
+ if (part.startsWith("v") && isNumberChar(part[1] ?? "")) {
774
+ updatedLineParts.push(`v${version}`);
775
+ continue;
776
+ }
777
+ updatedLineParts.push(part);
778
+ }
779
+ newLines.push(updatedLineParts.join(" "));
780
+ }
781
+ return {
782
+ updated,
783
+ content: newLines.join("\n")
784
+ };
785
+ }
786
+ function isNumberChar(char) {
787
+ return !Number.isNaN(Number(char));
788
+ }
747
789
 
748
790
  const __filename = fileURLToPath(import.meta.url);
749
791
  const __dirname = path.dirname(__filename);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arri",
3
- "version": "0.67.0",
3
+ "version": "0.69.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -26,7 +26,6 @@
26
26
  ],
27
27
  "dependencies": {
28
28
  "@joshmossas/listhen": "^1.11.1",
29
- "ofetch": "^1.4.1",
30
29
  "c12": "^2.0.1",
31
30
  "chokidar": "^4.0.1",
32
31
  "citty": "^0.1.6",
@@ -37,15 +36,16 @@
37
36
  "esbuild-plugin-replace": "^1.4.0",
38
37
  "globby": "^14.0.2",
39
38
  "h3": "^1.13.0",
39
+ "ofetch": "^1.4.1",
40
40
  "pathe": "^1.1.2",
41
- "prettier": "^3.3.3",
42
- "@arrirpc/codegen-kotlin": "0.67.0",
43
- "@arrirpc/codegen-rust": "0.67.0",
44
- "@arrirpc/schema": "0.67.0",
45
- "@arrirpc/codegen-dart": "0.67.0",
46
- "@arrirpc/codegen-ts": "0.67.0",
47
- "@arrirpc/codegen-utils": "0.67.0",
48
- "@arrirpc/codegen-swift": "0.67.0"
41
+ "prettier": "^3.4.1",
42
+ "@arrirpc/codegen-dart": "0.69.0",
43
+ "@arrirpc/codegen-kotlin": "0.69.0",
44
+ "@arrirpc/codegen-rust": "0.69.0",
45
+ "@arrirpc/codegen-swift": "0.69.0",
46
+ "@arrirpc/codegen-ts": "0.69.0",
47
+ "@arrirpc/codegen-utils": "0.69.0",
48
+ "@arrirpc/schema": "0.69.0"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/degit": "^2.8.6"