From 7b2ab58e0121e0c3e88f94c1fbbee659547a5968 Mon Sep 17 00:00:00 2001 From: Akshay Madhukar <46531236+akshay-madhukar@users.noreply.github.com> Date: Fri, 22 Jul 2022 16:03:05 -0400 Subject: [PATCH] Fixes bug with API loader by defaulting to changed state (#38) --- cli/package-lock.json | 2 +- cli/package.json | 2 +- core/package-lock.json | 2 +- core/package.json | 2 +- core/src/Node.ts | 3 +++ 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cli/package-lock.json b/cli/package-lock.json index a9cb458..87057f4 100644 --- a/cli/package-lock.json +++ b/cli/package-lock.json @@ -1,6 +1,6 @@ { "name": "@itwin/pcf-cli", - "version": "0.3.0-2", + "version": "0.3.0-3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/cli/package.json b/cli/package.json index fbcf018..d974f54 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@itwin/pcf-cli", - "version": "0.3.0-2", + "version": "0.3.0-3", "description": "iTwin PCF command line", "license": "MIT", "keywords": [ diff --git a/core/package-lock.json b/core/package-lock.json index e1f65a0..7fce8a7 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -1,6 +1,6 @@ { "name": "@itwin/pcf", - "version": "0.3.0-2", + "version": "0.3.0-3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/core/package.json b/core/package.json index f51c471..e67e1ec 100644 --- a/core/package.json +++ b/core/package.json @@ -1,6 +1,6 @@ { "name": "@itwin/pcf", - "version": "0.3.0-2", + "version": "0.3.0-3", "description": "Define your digital twin as code with iTwin PCF (Parametric Connector Framework).", "main": "lib/pcf.js", "typings": "lib/pcf", diff --git a/core/src/Node.ts b/core/src/Node.ts index e2c518a..e6ea2b2 100644 --- a/core/src/Node.ts +++ b/core/src/Node.ts @@ -399,6 +399,9 @@ export class LoaderNode extends Node implements LoaderNodeProps { kind: instance.entityKey, identifier: code.value, }); + + if (con.kind === "pcf_api_connection") + result.state = ItemState.Changed; this.pc.onSyncElement(result, instance); return result;