zinkee 0.1.28 → 0.1.29

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.
@@ -52,7 +52,18 @@
52
52
  "Bash(zinkee --json profiles list)",
53
53
  "Bash(zinkee displays *)",
54
54
  "Bash(chmod +x /tmp/audit_search.sh)",
55
- "Bash(/tmp/audit_search.sh)"
55
+ "Bash(/tmp/audit_search.sh)",
56
+ "Bash(head -60 CLAUDE.md)",
57
+ "Bash(head -40 AGENTS.md)",
58
+ "Bash(xargs cat)",
59
+ "Bash(./gradlew :api:test --tests \"com.zinkee.api.service.v2.data.DataV2TranslatorTest\" --tests \"com.zinkee.api.service.v2.data.DataV2ServiceTest\" --tests \"com.zinkee.api.domain.model.v2.data.DataV2PatchRecordRequestTest\")",
60
+ "Bash(./gradlew :api:test --tests \"com.zinkee.api.service.v2.data.DataV2ServiceTest\" --tests \"com.zinkee.api.domain.model.v2.data.DataV2PatchRecordRequestTest\")",
61
+ "Bash(./gradlew :api:spotlessApply)",
62
+ "Bash(./gradlew :api:test :api:spotbugsMain spotlessCheck)",
63
+ "Bash(./gradlew :api:spotbugsMain)",
64
+ "Bash(./gradlew spotlessCheck)",
65
+ "Bash(git --no-pager diff --stat)",
66
+ "Bash(git --no-pager diff -- src/commands/records.ts src/api/records.ts)"
56
67
  ]
57
68
  }
58
69
  }
package/dist/index.js CHANGED
@@ -10984,40 +10984,14 @@ function buildRecordCreateInput(options) {
10984
10984
  }
10985
10985
  return { values };
10986
10986
  }
10987
- function readRawSetPayload2(raw) {
10988
- const setValue = raw.set;
10989
- if (setValue === void 0) {
10990
- return {};
10991
- }
10992
- if (!isJsonObject6(setValue)) {
10993
- throw new CliError(
10994
- "invalid_cli_usage",
10995
- 'Expected raw update payload field "set" to be a JSON object.'
10996
- );
10997
- }
10998
- return { ...setValue };
10999
- }
11000
- function readRawUnsetPayload2(raw) {
11001
- const unsetValue = raw.unset;
11002
- if (unsetValue === void 0) {
11003
- return [];
11004
- }
11005
- if (!Array.isArray(unsetValue) || !unsetValue.every((value) => typeof value === "string")) {
11006
- throw new CliError(
11007
- "invalid_cli_usage",
11008
- 'Expected raw update payload field "unset" to be an array of strings.'
11009
- );
11010
- }
11011
- return [...unsetValue];
11012
- }
11013
10987
  function buildRecordUpdateInput(options) {
11014
10988
  const raw = readRawObject3(options.raw, options.rawFile);
11015
- const input = { ...raw };
10989
+ const input = {};
11016
10990
  const setPayload = {
11017
- ...readRawSetPayload2(raw),
10991
+ ...raw,
11018
10992
  ...buildAssignmentObject(options.set, options.setJson)
11019
10993
  };
11020
- const unsetPayload = [...readRawUnsetPayload2(raw), ...options.unset ?? []];
10994
+ const unsetPayload = [...options.unset ?? []];
11021
10995
  for (const key of Object.keys(setPayload)) {
11022
10996
  const unsetIndex = unsetPayload.indexOf(key);
11023
10997
  if (unsetIndex !== -1) {
@@ -11145,7 +11119,7 @@ function registerRecordsCommands(program, options = {}) {
11145
11119
  }
11146
11120
  writeLine10(stdout, `Created record "${getRecordIdentifier(data)}".`);
11147
11121
  });
11148
- records.command("update").description("Update a record").argument("<schema>", "schema uuid or slug", parseUuidOrSlugSelector8).argument("<record>", "record uuid or slug", parseUuidOrSlugSelector8).option("--set <field=value>", "set a string field", collectKeyValueAssignments, []).option("--set-json <field=json>", "set a structured field", collectJsonAssignments, []).option("--unset <field>", "unset a field", collectStringValues, []).option("--raw <json>", "raw JSON object payload").option("--raw-file <path>", "path to a raw JSON object payload").action(async function action(schema, record, commandOptions) {
11122
+ records.command("update").description("Update a record").argument("<schema>", "schema uuid or slug", parseUuidOrSlugSelector8).argument("<record>", "record uuid or slug", parseUuidOrSlugSelector8).option("--set <field=value>", "set a string field", collectKeyValueAssignments, []).option("--set-json <field=json>", "set a structured field", collectJsonAssignments, []).option("--unset <field>", "unset a field", collectStringValues, []).option("--raw <json>", "raw JSON object of fields to set").option("--raw-file <path>", "path to a JSON object of fields to set").action(async function action(schema, record, commandOptions) {
11149
11123
  const { api, schemasApi, json, readOnly } = createRecordsApi(this, filePath);
11150
11124
  ensureWritable7("records update", readOnly, "write");
11151
11125
  const resolvedSchema = await resolveSchemaSelector(schemasApi, schema);