arri 0.57.4 → 0.57.6
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/dist/cli.cjs +132 -3
- package/dist/cli.mjs +132 -3
- package/package.json +7 -7
package/dist/cli.cjs
CHANGED
|
@@ -96,11 +96,14 @@ async function startBuild(config, skipCodeGen = false) {
|
|
|
96
96
|
);
|
|
97
97
|
const def = JSON.parse(fs.readFileSync(defJson, { encoding: "utf-8" }));
|
|
98
98
|
if (codegenUtils.isAppDefinition(def) && clientCount > 0) {
|
|
99
|
-
|
|
99
|
+
const startTime = (/* @__PURE__ */ new Date()).getTime();
|
|
100
|
+
dev.logger.log(`Generating ${clientCount} client(s)...`);
|
|
100
101
|
await Promise.all(
|
|
101
102
|
config.generators.map((plugin) => plugin.generator(def))
|
|
102
103
|
);
|
|
103
|
-
dev.logger.log(
|
|
104
|
+
dev.logger.log(
|
|
105
|
+
`${clientCount} client(s) generated in ${( new Date()).getTime() - startTime}ms`
|
|
106
|
+
);
|
|
104
107
|
} else {
|
|
105
108
|
dev.logger.warn(
|
|
106
109
|
"No client generators specified. Skipping client codegen."
|
|
@@ -213,7 +216,8 @@ async function createCodegenEntryFile(config) {
|
|
|
213
216
|
writeFileSync(
|
|
214
217
|
path.resolve(__dirname, "../.output", "__definition.json"),
|
|
215
218
|
JSON.stringify(def),
|
|
216
|
-
)
|
|
219
|
+
);
|
|
220
|
+
process.exit(0);`,
|
|
217
221
|
{ tabWidth: 4, parser: "typescript" }
|
|
218
222
|
);
|
|
219
223
|
await fs__default.writeFile(
|
|
@@ -637,6 +641,25 @@ const use = citty.defineCommand({
|
|
|
637
641
|
);
|
|
638
642
|
}
|
|
639
643
|
await Promise.all(pubspecFileTasks);
|
|
644
|
+
consola__default.info("Checking for rust dependencies");
|
|
645
|
+
const cargoTomlFiles = await globby([
|
|
646
|
+
"cargo.toml",
|
|
647
|
+
"Cargo.toml",
|
|
648
|
+
"**/cargo.toml",
|
|
649
|
+
"**/Cargo.toml"
|
|
650
|
+
]);
|
|
651
|
+
const cargoTomlTasks = [];
|
|
652
|
+
for (const file of cargoTomlFiles) {
|
|
653
|
+
cargoTomlTasks.push(
|
|
654
|
+
promises.readFile(path__default.resolve(file), "utf8").then((content) => {
|
|
655
|
+
const result = updateCargoToml(content, version);
|
|
656
|
+
if (result.updated) {
|
|
657
|
+
fileMap[file] = result.content;
|
|
658
|
+
}
|
|
659
|
+
})
|
|
660
|
+
);
|
|
661
|
+
}
|
|
662
|
+
await Promise.all(cargoTomlTasks);
|
|
640
663
|
const updateTasks = [];
|
|
641
664
|
for (const key of Object.keys(fileMap)) {
|
|
642
665
|
updateTasks.push(
|
|
@@ -736,6 +759,112 @@ function updatePubspecYaml(fileContent, version) {
|
|
|
736
759
|
content: output.join("\n")
|
|
737
760
|
};
|
|
738
761
|
}
|
|
762
|
+
schema.a.object("CratesIoPackageResponse", {
|
|
763
|
+
categories: schema.a.array(schema.a.any()),
|
|
764
|
+
crate: schema.a.object("CratesIoCrate", {
|
|
765
|
+
badges: schema.a.array(schema.a.any()),
|
|
766
|
+
categories: schema.a.array(schema.a.string()),
|
|
767
|
+
created_at: schema.a.string(),
|
|
768
|
+
description: schema.a.string(),
|
|
769
|
+
documentation: schema.a.any(),
|
|
770
|
+
downloads: schema.a.uint32(),
|
|
771
|
+
exact_match: schema.a.boolean(),
|
|
772
|
+
homepage: schema.a.string(),
|
|
773
|
+
id: schema.a.string(),
|
|
774
|
+
keywords: schema.a.array(schema.a.string()),
|
|
775
|
+
links: schema.a.object({
|
|
776
|
+
owner_team: schema.a.string(),
|
|
777
|
+
owner_user: schema.a.string(),
|
|
778
|
+
owners: schema.a.string(),
|
|
779
|
+
reverse_dependencies: schema.a.string(),
|
|
780
|
+
version_downloads: schema.a.string(),
|
|
781
|
+
versions: schema.a.nullable(schema.a.any())
|
|
782
|
+
}),
|
|
783
|
+
max_stable_version: schema.a.string(),
|
|
784
|
+
max_version: schema.a.string(),
|
|
785
|
+
name: schema.a.string(),
|
|
786
|
+
newest_version: schema.a.string(),
|
|
787
|
+
recent_downloads: schema.a.uint32(),
|
|
788
|
+
repository: schema.a.string(),
|
|
789
|
+
updated_at: schema.a.string(),
|
|
790
|
+
version: schema.a.array(schema.a.uint32())
|
|
791
|
+
}),
|
|
792
|
+
keywords: schema.a.array(
|
|
793
|
+
schema.a.object({
|
|
794
|
+
crates_cnt: schema.a.uint32(),
|
|
795
|
+
created_at: schema.a.string(),
|
|
796
|
+
id: schema.a.string(),
|
|
797
|
+
keyword: schema.a.string()
|
|
798
|
+
})
|
|
799
|
+
),
|
|
800
|
+
versions: schema.a.array(
|
|
801
|
+
schema.a.object({
|
|
802
|
+
audit_actions: schema.a.array(schema.a.any()),
|
|
803
|
+
bin_names: schema.a.array(schema.a.any()),
|
|
804
|
+
checksum: schema.a.string(),
|
|
805
|
+
crate: schema.a.string(),
|
|
806
|
+
crate_size: schema.a.uint32(),
|
|
807
|
+
created_at: schema.a.string(),
|
|
808
|
+
dl_path: schema.a.string(),
|
|
809
|
+
downloads: schema.a.uint32(),
|
|
810
|
+
features: schema.a.any(),
|
|
811
|
+
has_lib: schema.a.boolean(),
|
|
812
|
+
id: schema.a.uint32(),
|
|
813
|
+
lib_links: schema.a.nullable(schema.a.any()),
|
|
814
|
+
license: schema.a.string(),
|
|
815
|
+
links: schema.a.object({
|
|
816
|
+
authors: schema.a.string(),
|
|
817
|
+
dependencies: schema.a.string(),
|
|
818
|
+
version_downloads: schema.a.string()
|
|
819
|
+
}),
|
|
820
|
+
num: schema.a.string(),
|
|
821
|
+
published_by: schema.a.object({
|
|
822
|
+
avatar: schema.a.string(),
|
|
823
|
+
id: schema.a.uint32(),
|
|
824
|
+
login: schema.a.string(),
|
|
825
|
+
name: schema.a.string(),
|
|
826
|
+
url: schema.a.string()
|
|
827
|
+
}),
|
|
828
|
+
readme_path: schema.a.string(),
|
|
829
|
+
rust_version: schema.a.nullable(schema.a.string()),
|
|
830
|
+
updated_at: schema.a.string(),
|
|
831
|
+
yanked: schema.a.boolean()
|
|
832
|
+
})
|
|
833
|
+
)
|
|
834
|
+
});
|
|
835
|
+
function updateCargoToml(fileContent, version) {
|
|
836
|
+
const lines = fileContent.split("\n");
|
|
837
|
+
let updated = false;
|
|
838
|
+
const newLines = [];
|
|
839
|
+
for (const line of lines) {
|
|
840
|
+
if (line.trim().startsWith("arri_client")) {
|
|
841
|
+
let newLine = "";
|
|
842
|
+
let insertChar = true;
|
|
843
|
+
for (let i = 0; i < line.length; i++) {
|
|
844
|
+
const char = line[i];
|
|
845
|
+
const nextChar = line[i + 1];
|
|
846
|
+
if (!updated && (char === '"' || char === "'") && nextChar && Number.isInteger(Number(nextChar))) {
|
|
847
|
+
newLine += char;
|
|
848
|
+
newLine += version;
|
|
849
|
+
insertChar = false;
|
|
850
|
+
updated = true;
|
|
851
|
+
continue;
|
|
852
|
+
}
|
|
853
|
+
if (!insertChar) {
|
|
854
|
+
if (nextChar && Number.isInteger(Number(char)) && (nextChar === "'" || nextChar === '"')) {
|
|
855
|
+
insertChar = true;
|
|
856
|
+
}
|
|
857
|
+
continue;
|
|
858
|
+
}
|
|
859
|
+
newLine += char;
|
|
860
|
+
}
|
|
861
|
+
newLines.push(newLine);
|
|
862
|
+
continue;
|
|
863
|
+
}
|
|
864
|
+
newLines.push(line);
|
|
865
|
+
}
|
|
866
|
+
return { updated, content: newLines.join("\n") };
|
|
867
|
+
}
|
|
739
868
|
|
|
740
869
|
const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('cli.cjs', document.baseURI).href)));
|
|
741
870
|
const __dirname$1 = path__default.dirname(__filename$1);
|
package/dist/cli.mjs
CHANGED
|
@@ -83,11 +83,14 @@ async function startBuild(config, skipCodeGen = false) {
|
|
|
83
83
|
);
|
|
84
84
|
const def = JSON.parse(readFileSync(defJson, { encoding: "utf-8" }));
|
|
85
85
|
if (isAppDefinition(def) && clientCount > 0) {
|
|
86
|
-
|
|
86
|
+
const startTime = (/* @__PURE__ */ new Date()).getTime();
|
|
87
|
+
logger.log(`Generating ${clientCount} client(s)...`);
|
|
87
88
|
await Promise.all(
|
|
88
89
|
config.generators.map((plugin) => plugin.generator(def))
|
|
89
90
|
);
|
|
90
|
-
logger.log(
|
|
91
|
+
logger.log(
|
|
92
|
+
`${clientCount} client(s) generated in ${( new Date()).getTime() - startTime}ms`
|
|
93
|
+
);
|
|
91
94
|
} else {
|
|
92
95
|
logger.warn(
|
|
93
96
|
"No client generators specified. Skipping client codegen."
|
|
@@ -200,7 +203,8 @@ async function createCodegenEntryFile(config) {
|
|
|
200
203
|
writeFileSync(
|
|
201
204
|
path.resolve(__dirname, "../.output", "__definition.json"),
|
|
202
205
|
JSON.stringify(def),
|
|
203
|
-
)
|
|
206
|
+
);
|
|
207
|
+
process.exit(0);`,
|
|
204
208
|
{ tabWidth: 4, parser: "typescript" }
|
|
205
209
|
);
|
|
206
210
|
await fs.writeFile(
|
|
@@ -624,6 +628,25 @@ const use = defineCommand({
|
|
|
624
628
|
);
|
|
625
629
|
}
|
|
626
630
|
await Promise.all(pubspecFileTasks);
|
|
631
|
+
consola.info("Checking for rust dependencies");
|
|
632
|
+
const cargoTomlFiles = await globby([
|
|
633
|
+
"cargo.toml",
|
|
634
|
+
"Cargo.toml",
|
|
635
|
+
"**/cargo.toml",
|
|
636
|
+
"**/Cargo.toml"
|
|
637
|
+
]);
|
|
638
|
+
const cargoTomlTasks = [];
|
|
639
|
+
for (const file of cargoTomlFiles) {
|
|
640
|
+
cargoTomlTasks.push(
|
|
641
|
+
readFile(path.resolve(file), "utf8").then((content) => {
|
|
642
|
+
const result = updateCargoToml(content, version);
|
|
643
|
+
if (result.updated) {
|
|
644
|
+
fileMap[file] = result.content;
|
|
645
|
+
}
|
|
646
|
+
})
|
|
647
|
+
);
|
|
648
|
+
}
|
|
649
|
+
await Promise.all(cargoTomlTasks);
|
|
627
650
|
const updateTasks = [];
|
|
628
651
|
for (const key of Object.keys(fileMap)) {
|
|
629
652
|
updateTasks.push(
|
|
@@ -723,6 +746,112 @@ function updatePubspecYaml(fileContent, version) {
|
|
|
723
746
|
content: output.join("\n")
|
|
724
747
|
};
|
|
725
748
|
}
|
|
749
|
+
a.object("CratesIoPackageResponse", {
|
|
750
|
+
categories: a.array(a.any()),
|
|
751
|
+
crate: a.object("CratesIoCrate", {
|
|
752
|
+
badges: a.array(a.any()),
|
|
753
|
+
categories: a.array(a.string()),
|
|
754
|
+
created_at: a.string(),
|
|
755
|
+
description: a.string(),
|
|
756
|
+
documentation: a.any(),
|
|
757
|
+
downloads: a.uint32(),
|
|
758
|
+
exact_match: a.boolean(),
|
|
759
|
+
homepage: a.string(),
|
|
760
|
+
id: a.string(),
|
|
761
|
+
keywords: a.array(a.string()),
|
|
762
|
+
links: a.object({
|
|
763
|
+
owner_team: a.string(),
|
|
764
|
+
owner_user: a.string(),
|
|
765
|
+
owners: a.string(),
|
|
766
|
+
reverse_dependencies: a.string(),
|
|
767
|
+
version_downloads: a.string(),
|
|
768
|
+
versions: a.nullable(a.any())
|
|
769
|
+
}),
|
|
770
|
+
max_stable_version: a.string(),
|
|
771
|
+
max_version: a.string(),
|
|
772
|
+
name: a.string(),
|
|
773
|
+
newest_version: a.string(),
|
|
774
|
+
recent_downloads: a.uint32(),
|
|
775
|
+
repository: a.string(),
|
|
776
|
+
updated_at: a.string(),
|
|
777
|
+
version: a.array(a.uint32())
|
|
778
|
+
}),
|
|
779
|
+
keywords: a.array(
|
|
780
|
+
a.object({
|
|
781
|
+
crates_cnt: a.uint32(),
|
|
782
|
+
created_at: a.string(),
|
|
783
|
+
id: a.string(),
|
|
784
|
+
keyword: a.string()
|
|
785
|
+
})
|
|
786
|
+
),
|
|
787
|
+
versions: a.array(
|
|
788
|
+
a.object({
|
|
789
|
+
audit_actions: a.array(a.any()),
|
|
790
|
+
bin_names: a.array(a.any()),
|
|
791
|
+
checksum: a.string(),
|
|
792
|
+
crate: a.string(),
|
|
793
|
+
crate_size: a.uint32(),
|
|
794
|
+
created_at: a.string(),
|
|
795
|
+
dl_path: a.string(),
|
|
796
|
+
downloads: a.uint32(),
|
|
797
|
+
features: a.any(),
|
|
798
|
+
has_lib: a.boolean(),
|
|
799
|
+
id: a.uint32(),
|
|
800
|
+
lib_links: a.nullable(a.any()),
|
|
801
|
+
license: a.string(),
|
|
802
|
+
links: a.object({
|
|
803
|
+
authors: a.string(),
|
|
804
|
+
dependencies: a.string(),
|
|
805
|
+
version_downloads: a.string()
|
|
806
|
+
}),
|
|
807
|
+
num: a.string(),
|
|
808
|
+
published_by: a.object({
|
|
809
|
+
avatar: a.string(),
|
|
810
|
+
id: a.uint32(),
|
|
811
|
+
login: a.string(),
|
|
812
|
+
name: a.string(),
|
|
813
|
+
url: a.string()
|
|
814
|
+
}),
|
|
815
|
+
readme_path: a.string(),
|
|
816
|
+
rust_version: a.nullable(a.string()),
|
|
817
|
+
updated_at: a.string(),
|
|
818
|
+
yanked: a.boolean()
|
|
819
|
+
})
|
|
820
|
+
)
|
|
821
|
+
});
|
|
822
|
+
function updateCargoToml(fileContent, version) {
|
|
823
|
+
const lines = fileContent.split("\n");
|
|
824
|
+
let updated = false;
|
|
825
|
+
const newLines = [];
|
|
826
|
+
for (const line of lines) {
|
|
827
|
+
if (line.trim().startsWith("arri_client")) {
|
|
828
|
+
let newLine = "";
|
|
829
|
+
let insertChar = true;
|
|
830
|
+
for (let i = 0; i < line.length; i++) {
|
|
831
|
+
const char = line[i];
|
|
832
|
+
const nextChar = line[i + 1];
|
|
833
|
+
if (!updated && (char === '"' || char === "'") && nextChar && Number.isInteger(Number(nextChar))) {
|
|
834
|
+
newLine += char;
|
|
835
|
+
newLine += version;
|
|
836
|
+
insertChar = false;
|
|
837
|
+
updated = true;
|
|
838
|
+
continue;
|
|
839
|
+
}
|
|
840
|
+
if (!insertChar) {
|
|
841
|
+
if (nextChar && Number.isInteger(Number(char)) && (nextChar === "'" || nextChar === '"')) {
|
|
842
|
+
insertChar = true;
|
|
843
|
+
}
|
|
844
|
+
continue;
|
|
845
|
+
}
|
|
846
|
+
newLine += char;
|
|
847
|
+
}
|
|
848
|
+
newLines.push(newLine);
|
|
849
|
+
continue;
|
|
850
|
+
}
|
|
851
|
+
newLines.push(line);
|
|
852
|
+
}
|
|
853
|
+
return { updated, content: newLines.join("\n") };
|
|
854
|
+
}
|
|
726
855
|
|
|
727
856
|
const __filename = fileURLToPath(import.meta.url);
|
|
728
857
|
const __dirname = path.dirname(__filename);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arri",
|
|
3
|
-
"version": "0.57.
|
|
3
|
+
"version": "0.57.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"ofetch": "^1.3.4",
|
|
40
40
|
"pathe": "^1.1.2",
|
|
41
41
|
"prettier": "^3.3.3",
|
|
42
|
-
"@arrirpc/codegen-dart": "0.57.
|
|
43
|
-
"@arrirpc/codegen-rust": "0.57.
|
|
44
|
-
"@arrirpc/
|
|
45
|
-
"@arrirpc/
|
|
46
|
-
"@arrirpc/codegen-utils": "0.57.
|
|
47
|
-
"@arrirpc/codegen-ts": "0.57.
|
|
42
|
+
"@arrirpc/codegen-dart": "0.57.6",
|
|
43
|
+
"@arrirpc/codegen-rust": "0.57.6",
|
|
44
|
+
"@arrirpc/codegen-kotlin": "0.57.6",
|
|
45
|
+
"@arrirpc/schema": "0.57.6",
|
|
46
|
+
"@arrirpc/codegen-utils": "0.57.6",
|
|
47
|
+
"@arrirpc/codegen-ts": "0.57.6"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/degit": "^2.8.6"
|