arri 0.0.13 → 0.0.15
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/chunks/index.cjs +19 -19
- package/dist/chunks/index.mjs +19 -19
- package/dist/chunks/index2.cjs +18 -18
- package/dist/chunks/index2.mjs +18 -18
- package/dist/chunks/index3.cjs +1670 -8702
- package/dist/chunks/index3.mjs +1667 -8687
- package/dist/chunks/index4.cjs +256 -0
- package/dist/chunks/index4.mjs +247 -0
- package/dist/chunks/index5.cjs +8854 -0
- package/dist/chunks/index5.mjs +8832 -0
- package/dist/cli.cjs +21663 -19012
- package/dist/cli.mjs +21641 -18993
- package/dist/codegen.cjs +8 -8
- package/dist/codegen.d.cts +1 -1
- package/dist/codegen.d.mts +1 -1
- package/dist/codegen.d.ts +1 -1
- package/dist/codegen.mjs +9 -9
- package/dist/index.cjs +4 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/{arri.d31eb2d5.cjs → arri.9717f131.cjs} +16 -28
- package/dist/shared/{arri.2ff96786.d.cts → arri.bb7e9a4e.d.cts} +55 -60
- package/dist/shared/{arri.2ff96786.d.mts → arri.bb7e9a4e.d.mts} +55 -60
- package/dist/shared/{arri.2ff96786.d.ts → arri.bb7e9a4e.d.ts} +55 -60
- package/dist/shared/{arri.3605a96c.cjs → arri.bfebed73.cjs} +534 -619
- package/dist/shared/{arri.b0ab6d2f.mjs → arri.dab1f9df.mjs} +531 -617
- package/dist/shared/{arri.a90e77aa.mjs → arri.e335c10b.mjs} +10 -22
- package/package.json +6 -4
|
@@ -2,15 +2,15 @@ import { createRequire, builtinModules } from 'module';
|
|
|
2
2
|
import { fileURLToPath, pathToFileURL, URL } from 'url';
|
|
3
3
|
import require$$0, { dirname } from 'path';
|
|
4
4
|
import process4 from 'process';
|
|
5
|
-
import require$$
|
|
5
|
+
import require$$1 from 'os';
|
|
6
6
|
import tty from 'tty';
|
|
7
7
|
import fs$1, { realpathSync, statSync, Stats, writeFileSync } from 'fs';
|
|
8
8
|
import assert4 from 'assert';
|
|
9
9
|
import fs from 'fs/promises';
|
|
10
10
|
import v8 from 'v8';
|
|
11
11
|
import { format, inspect } from 'util';
|
|
12
|
-
import { g as unflattenProcedures, i as isServiceDefinition, p as pascalCase, h as camelCase, a as isProcedureDefinition, d as isJsonSchemaObject, e as isJsonSchemaEnum, c as isJsonSchemaNullType, b as isJsonSchemaScalarType, f as isJsonSchemaArray } from './arri.b0ab6d2f.mjs';
|
|
13
12
|
import { execSync } from 'child_process';
|
|
13
|
+
import { g as unflattenProcedures, i as isServiceDefinition, p as pascalCase, h as camelCase, a as isProcedureDefinition, d as isJsonSchemaObject, e as isJsonSchemaEnum, c as isJsonSchemaNullType, b as isJsonSchemaScalarType, f as isJsonSchemaArray } from './arri.dab1f9df.mjs';
|
|
14
14
|
|
|
15
15
|
const require$1 = createRequire(import.meta.url);
|
|
16
16
|
const __filename$1 = fileURLToPath(import.meta.url);
|
|
@@ -21403,7 +21403,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
21403
21403
|
return min;
|
|
21404
21404
|
}
|
|
21405
21405
|
if (process4.platform === "win32") {
|
|
21406
|
-
const osRelease = require$$
|
|
21406
|
+
const osRelease = require$$1.release().split(".");
|
|
21407
21407
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
21408
21408
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
21409
21409
|
}
|
|
@@ -29051,14 +29051,19 @@ const dartClientGenerator = defineClientGeneratorPlugin(
|
|
|
29051
29051
|
clientName: options.clientName
|
|
29052
29052
|
});
|
|
29053
29053
|
writeFileSync(options.outputFile, result);
|
|
29054
|
-
|
|
29054
|
+
try {
|
|
29055
|
+
execSync(`dart format ${options.outputFile}`);
|
|
29056
|
+
} catch (err) {
|
|
29057
|
+
console.error("Error formatting dart client", err);
|
|
29058
|
+
}
|
|
29055
29059
|
},
|
|
29056
29060
|
options
|
|
29057
29061
|
};
|
|
29058
29062
|
}
|
|
29059
29063
|
);
|
|
29060
|
-
|
|
29064
|
+
let generatedModels = [];
|
|
29061
29065
|
function createDartClient(appDef, opts = { clientName: "Client" }) {
|
|
29066
|
+
generatedModels = [];
|
|
29062
29067
|
const { models, procedures } = appDef;
|
|
29063
29068
|
const serviceParts = [];
|
|
29064
29069
|
const procedureParts = [];
|
|
@@ -29099,7 +29104,6 @@ function createDartClient(appDef, opts = { clientName: "Client" }) {
|
|
|
29099
29104
|
return `// This code was autogenerated by Arri. Do not modify directly.
|
|
29100
29105
|
// For additional documentation visit http://github.com/modiimedia/arri
|
|
29101
29106
|
import "dart:convert";
|
|
29102
|
-
import "package:http/http.dart" as http;
|
|
29103
29107
|
import "package:arri_client/arri_client.dart";
|
|
29104
29108
|
|
|
29105
29109
|
class ${opts.clientName} {
|
|
@@ -29118,22 +29122,6 @@ class ${opts.clientName} {
|
|
|
29118
29122
|
);
|
|
29119
29123
|
}`
|
|
29120
29124
|
).join("\n ")}
|
|
29121
|
-
Future<http.Response> rawRequest(
|
|
29122
|
-
${opts.clientName}Endpoints endpoint, {
|
|
29123
|
-
Map<String, String>? query,
|
|
29124
|
-
dynamic body,
|
|
29125
|
-
Map<String, String>? headers,
|
|
29126
|
-
Encoding? encoding,
|
|
29127
|
-
}) async {
|
|
29128
|
-
return arriRequest(
|
|
29129
|
-
"$_baseUrl\${endpoint.path}",
|
|
29130
|
-
method: endpoint.method,
|
|
29131
|
-
headers: headers ?? _headers,
|
|
29132
|
-
body: body,
|
|
29133
|
-
query: query,
|
|
29134
|
-
encoding: encoding,
|
|
29135
|
-
);
|
|
29136
|
-
}
|
|
29137
29125
|
}
|
|
29138
29126
|
${serviceParts.map((item) => item.content).join("\n")}
|
|
29139
29127
|
${modelParts.join("\n")}
|
package/package.json
CHANGED
|
@@ -17,13 +17,15 @@
|
|
|
17
17
|
"scule": "^1.0.0",
|
|
18
18
|
"citty": "^0.1.3",
|
|
19
19
|
"ofetch": "^1.3.3",
|
|
20
|
-
"pathe": "^1.1.1",
|
|
21
|
-
"globby": "^13.2.2",
|
|
22
20
|
"c12": "^1.4.2",
|
|
23
21
|
"chokidar": "^3.5.3",
|
|
24
|
-
"
|
|
22
|
+
"consola": "^3.2.3",
|
|
23
|
+
"esbuild": "^0.19.2",
|
|
24
|
+
"globby": "^13.2.2",
|
|
25
|
+
"listhen": "^1.4.3",
|
|
26
|
+
"pathe": "^1.1.1"
|
|
25
27
|
},
|
|
26
|
-
"version": "0.0.
|
|
28
|
+
"version": "0.0.15",
|
|
27
29
|
"repository": {
|
|
28
30
|
"url": "https://github.com/modiimedia/arri"
|
|
29
31
|
}
|