zero-swift 0.4.0 → 0.4.2
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/bin.js +6 -16
- package/package.json +3 -3
package/dist/bin.js
CHANGED
|
@@ -9,7 +9,7 @@ import { Cli, z } from "incur";
|
|
|
9
9
|
// package.json
|
|
10
10
|
var package_default = {
|
|
11
11
|
name: "zero-swift",
|
|
12
|
-
version: "0.4.
|
|
12
|
+
version: "0.4.2",
|
|
13
13
|
description: "Generates the Swift row types and schema of a Zero app for the Zero Swift client.",
|
|
14
14
|
license: "Apache-2.0",
|
|
15
15
|
repository: {
|
|
@@ -928,7 +928,7 @@ var cli = Cli.create("zero-swift", {
|
|
|
928
928
|
version: package_default.version,
|
|
929
929
|
description: "Generates what the Zero Swift client needs from a Zero app's TypeScript schema, queries, and mutators."
|
|
930
930
|
}).command("codegen", {
|
|
931
|
-
description: "Generate the Swift row types, schema, and query builder from the app's TypeScript schema. Options override zero-swift.json, which is read when present.",
|
|
931
|
+
description: "Generate the Swift row types, schema, and query builder from the app's TypeScript schema. Options override zero-swift.json, which is read when present. See swift/Sources/Zero/Zero.docc/GettingStarted.md in github.com/wevm/zero.",
|
|
932
932
|
options: z.object({
|
|
933
933
|
config: z.string().optional().describe("Config file (default zero-swift.json, when present)"),
|
|
934
934
|
schemaFile: z.string().optional().describe("TS schema module (default schema.ts)"),
|
|
@@ -940,20 +940,10 @@ var cli = Cli.create("zero-swift", {
|
|
|
940
940
|
access: z.enum(["public", "internal"]).optional().describe("Access level of the generated code (default public)"),
|
|
941
941
|
check
|
|
942
942
|
}),
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
schemaFile: "shared/schema.ts",
|
|
948
|
-
out: "Sources/App/Schema.swift"
|
|
949
|
-
},
|
|
950
|
-
description: "Generate without a config file"
|
|
951
|
-
},
|
|
952
|
-
{
|
|
953
|
-
options: { check: true },
|
|
954
|
-
description: "Fail in CI when the output is stale"
|
|
955
|
-
}
|
|
956
|
-
],
|
|
943
|
+
// incur 0.7.1 prints example options as `--camelKey value`, so the hint
|
|
944
|
+
// shows `--schema-file` and a bare `--check` instead.
|
|
945
|
+
examples: [{ description: "Generate from zero-swift.json" }],
|
|
946
|
+
hint: "Without a config file: zero-swift codegen --schema-file shared/schema.ts --out Sources/App/Schema.swift. In CI, zero-swift codegen --check fails when the output is stale.",
|
|
957
947
|
run: (c) => reporting(c.error, async () => {
|
|
958
948
|
const cwd = process.cwd();
|
|
959
949
|
const {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zero-swift",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Generates the Swift row types and schema of a Zero app for the Zero Swift client.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"vitest": "^5.0.0",
|
|
27
27
|
"@rocicorp/zero": "1.12.0",
|
|
28
28
|
"zero-schema": "0.0.0",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
29
|
+
"zql": "0.0.0",
|
|
30
|
+
"zero-types": "0.0.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@rocicorp/zero": ">=1.11.0"
|