@_linked/cli 1.4.4 → 1.4.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.4.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#32](https://github.com/linked-cm/cli/pull/32) [`2f0b4d3`](https://github.com/linked-cm/cli/commit/2f0b4d349b98eea9271fad9028a2ddae824bcd29) Thanks [@flyon](https://github.com/flyon)! - Template's `@_linked/auth` dep range bumped from `~1.0` (which pinned to the broken 1.0.x empty-tarball releases) to `^1.1.0` (which has the actual `lib/`). Same for `@_linked/server-utils` (`^1.0.5` → `^1.0.6`) and `@_linked/schema` (`^1.0` → `^1.0.6` — both versions were empty before 1.0.6).
8
+
9
+ Also fixes `PersonPreview.tsx` template: `Person.update(...).for(source)` and `Person.delete(source)` now pass `{ id: source.id }` with an early-return guard, since `source.id` is optional on the shape type.
10
+
3
11
  ## 1.4.4
4
12
 
5
13
  ### Patch Changes
@@ -37,10 +37,10 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@_linked/core": "^2.6",
40
- "@_linked/auth": "~1.0",
40
+ "@_linked/auth": "^1.1.0",
41
41
  "@_linked/server": "^2.0",
42
- "@_linked/server-utils": "^1.0.5",
43
- "@_linked/schema": "^1.0",
42
+ "@_linked/server-utils": "^1.0.6",
43
+ "@_linked/schema": "^1.0.6",
44
44
  "@_linked/fuseki": "^2.0",
45
45
  "@_linked/react": "^1.3",
46
46
  "react": "^18.2",
@@ -19,12 +19,13 @@ export const PersonPreview = linkedComponent(
19
19
  const [busy, setBusy] = useState(false);
20
20
 
21
21
  async function save() {
22
+ if (!source.id) return;
22
23
  setBusy(true);
23
24
  try {
24
25
  await Person.update({
25
26
  givenName: draftGiven,
26
27
  familyName: draftFamily,
27
- }).for(source);
28
+ }).for({ id: source.id });
28
29
  // Optimistic patch — no extra network round-trip needed.
29
30
  _refresh({ givenName: draftGiven, familyName: draftFamily });
30
31
  setEditing(false);
@@ -34,9 +35,10 @@ export const PersonPreview = linkedComponent(
34
35
  }
35
36
 
36
37
  async function remove() {
38
+ if (!source.id) return;
37
39
  setBusy(true);
38
40
  try {
39
- await Person.delete(source);
41
+ await Person.delete({ id: source.id });
40
42
  refreshList();
41
43
  } finally {
42
44
  setBusy(false);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@_linked/cli",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "description": "Command line tools for the @_linked/* packages and apps",
5
5
  "typesVersions": {
6
6
  "*": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@_linked/cli",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "description": "Command line tools for the @_linked/* packages and apps",
5
5
  "typesVersions": {
6
6
  "*": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@_linked/cli",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "description": "Command line tools for the @_linked/* packages and apps",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/esm/index.js",