10.2.0 • Published 28 days ago

@iot-app-kit/scene-composer v10.2.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
28 days ago

Note

This package includes some code from other libraries listed in THIRD-PARTY-LICENSES.

@iot-app-kit/scene-composer

Build command

Run the following command to build the package. The library will be built and copied to the dist folder.

npm run build

UI Tests

Pre-requisites: You need to have Docker installed locally to run UI Tests, we rely on it to provide the necessary browsers to generate consistent screenshots.

Commands:

# Run all tests once
npm run test:ui

# Check for flaky tests
npm run test:ui:reliability

# Update snapshots
npm run test:ui:update

If you want to run the tests locally for whatever reason, as opposed to the docker image, you can run the same commands with the --production flag, which will run them without docker:

# Run all tests once
npm run test:ui --production

# Check for flaky tests
npm run test:ui:reliability --production

Analyze command

You can use the following tool to analyze the releasing bundle content:

npm install -g source-map-explorer # run this only once

source-map-explorer dist/index.js

Storybook

To make the storybook site run:

npm run bootstrap # only needed first time and run at repo root level
npm run build-storybook # run at this package
npm run start -w packages/scene-composer

Optionally, if you want to pre-load AWS credentials from a local profile, you can set the AWS_PROFILE argument on the command line:

AWS_PROFILE=AppKit npm run start -w packages/scene-composer

If you want to have an AWS Scene pull live data from your TwinMaker workspace you can add a queryJson to the storybook arguments. Because it's a JSON and not kept as part of the URL parameters the query will have to be reset if you refresh the page. Below is an example query for a single TwinMaker property value.

[
  {
    "entityId": "f913470a-d011-45ca-ac84-3265f6327105",
    "componentName": "MetabolicCageOne",
    "properties": [{ "propertyName": "Temperature" }]
  }
]
'''

When using an query for live data the default data range is the last 5 minutes.  You can change this by setting the viewportDurationSecs fields to a custom value.  The field expects a number in seconds.  It does not currently support setting a fixed start and end date range for a viewport so  it work best when you have a way to regularly inject live sample date.

- [Storybook Intro](https://storybook.js.org/docs/react/get-started/introduction)

## Debugging
Scene composer is embedded with a custom logging system based on [debugjs](https://www.npmjs.com/package/debug). With this being a complex component with lots of potential things going on, this system allows you to filter logs based on more specific attributes, and ultimately reduces noise.

What you will notice is by default, there are very few messages in the browser console, this is because they are hidden by default from the end user, so you need to enable them in local storage. To do this, run this command in your browser console:

```javascript
localStorage.debug = '*'; // by default gives you all logging output
localStorage.debug = '*,-verbose:*'; // don't show verbose logging
localStorage.debug = 'ruleEvaluator*'; // only show messages related to the ruleEvaluator component
10.2.0

28 days ago

10.1.0

1 month ago

10.0.0

2 months ago

9.15.0

3 months ago

9.14.0

3 months ago

9.13.0

4 months ago

9.12.0

4 months ago

9.11.0

5 months ago

9.10.0

5 months ago

9.9.0

5 months ago

9.9.1

5 months ago

9.8.0

5 months ago

9.6.0

5 months ago

9.4.0

6 months ago

7.3.1

8 months ago

7.3.0

8 months ago

7.1.0

9 months ago

3.4.0

9 months ago

8.1.0

7 months ago

8.1.1

7 months ago

9.1.0

7 months ago

9.7.0

5 months ago

9.5.0

6 months ago

9.3.0

6 months ago

7.0.0

9 months ago

7.4.0

7 months ago

7.2.1

8 months ago

7.2.0

8 months ago

7.5.0

7 months ago

8.0.1

7 months ago

8.0.0

7 months ago

8.0.2

7 months ago

9.2.0

6 months ago

9.0.0

7 months ago

6.3.0

10 months ago

6.3.1

10 months ago

6.1.0

11 months ago

6.0.0

11 months ago

6.2.0

11 months ago

3.3.0

11 months ago

6.2.1-beta.0

10 months ago

5.9.0

11 months ago

5.8.1

11 months ago

5.8.0

12 months ago

5.7.0

12 months ago

5.6.0

1 year ago

5.5.1

1 year ago

5.5.0

1 year ago

5.4.0

1 year ago

5.3.0

1 year ago

5.2.0

1 year ago

5.1.1

1 year ago

5.1.0

1 year ago

5.0.0

1 year ago

2.7.0

1 year ago

2.7.1

1 year ago

3.2.0

1 year ago

3.1.0

1 year ago

3.0.0

1 year ago

4.0.1

1 year ago

4.0.0

1 year ago

4.0.3

1 year ago

4.0.2

1 year ago

5.5.2

1 year ago

2.6.5

1 year ago

2.6.4

1 year ago

2.5.0

1 year ago

2.4.1

1 year ago

2.6.1

1 year ago

2.6.0

1 year ago

2.5.1

1 year ago

2.4.2

1 year ago

2.6.3

1 year ago

2.6.2

1 year ago

2.4.0

1 year ago

2.3.0

1 year ago

2.2.0

2 years ago

2.1.0

2 years ago