particle-api-js 10.0.0 → 10.2.0

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.
Files changed (46) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/EventStream-e2e-browser.html +0 -1
  3. package/EventStream-e2e-node.js +2 -3
  4. package/README.md +2 -2
  5. package/dist/particle.min.js +1 -434
  6. package/dist/particle.min.js.map +1 -1
  7. package/docs/api.md +4916 -266
  8. package/karma.conf.js +18 -6
  9. package/package.json +18 -22
  10. package/src/Agent.js +407 -0
  11. package/src/Client.js +170 -0
  12. package/src/Defaults.js +7 -0
  13. package/src/EventStream.js +263 -0
  14. package/src/Library.js +33 -0
  15. package/src/Particle.js +2644 -0
  16. package/test/Agent.integration.js +2 -3
  17. package/test/Agent.spec.js +2 -2
  18. package/test/Client.spec.js +7 -7
  19. package/test/Defaults.spec.js +2 -2
  20. package/test/EventStream.spec.js +6 -4
  21. package/test/FakeAgent.js +2 -2
  22. package/test/Library.spec.js +2 -2
  23. package/test/Particle.integration.js +2 -3
  24. package/test/Particle.spec.js +54 -54
  25. package/test/fixtures/index.js +4 -18
  26. package/test/support/FixtureHttpServer.js +5 -3
  27. package/test/test-setup.js +5 -5
  28. package/tsconfig.json +14 -0
  29. package/webpack.config.js +45 -0
  30. package/.babelrc +0 -4
  31. package/lib/Agent.js +0 -615
  32. package/lib/Agent.js.map +0 -1
  33. package/lib/Client.js +0 -312
  34. package/lib/Client.js.map +0 -1
  35. package/lib/Defaults.js +0 -14
  36. package/lib/Defaults.js.map +0 -1
  37. package/lib/EventStream.js +0 -335
  38. package/lib/EventStream.js.map +0 -1
  39. package/lib/Library.js +0 -67
  40. package/lib/Library.js.map +0 -1
  41. package/lib/Particle.js +0 -3831
  42. package/lib/Particle.js.map +0 -1
  43. package/test/Client.integration.js +0 -69
  44. package/test/fixtures/tarball.tar.gz +0 -0
  45. package/test/fixtures/test-library-publish-0.0.1.tar.gz +0 -0
  46. package/test/fixtures/test-library-publish-0.0.2.tar.gz +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # changelog
2
2
 
3
+ ## 10.2.0 - 6 October 2023
4
+
5
+ * Migrate LogicBlocks methods to LogicFunctions, LogicTriggers, and LogicRuns
6
+
7
+ ## 10.1.0 - 8 Sept 2023
8
+
9
+ * Use wepback to bundle for browser use
10
+ * Remove babel, browserify and their related dependencies
11
+ * Adds support for checkJS loose type/docs validations
12
+
3
13
  ## 10.0.0 - 8 Sept 2023
4
14
 
5
15
  * Change library to handle requests from `superagent` to `fetch`/`node-fetch`
@@ -2,7 +2,6 @@
2
2
  End-to-end test program for the event stream in the browser
3
3
 
4
4
  Steps:
5
- - npm run compile
6
5
  - npm run build
7
6
  - Replace the path to particle.min.js
8
7
  - Replace your access token in `auth`
@@ -3,13 +3,12 @@
3
3
  End-to-end test program for the event stream with Node
4
4
 
5
5
  Steps:
6
- - npm run compile
7
- - PARTICLE_API_TOKEN=<my-token> node test/EventStream-e2e-node.js
6
+ - PARTICLE_API_TOKEN=<my-token> node EventStream-e2e-node.js
8
7
  - Follow the scenarios in EventStream.feature
9
8
 
10
9
  */
11
10
 
12
- const Particle = require('../lib/Particle');
11
+ const Particle = require('./src/Particle');
13
12
  const baseUrl = process.env.PARTICLE_API_BASE_URL || 'http://localhost:9090';
14
13
  const auth = process.env.PARTICLE_API_TOKEN;
15
14
  const particle = new Particle({ baseUrl });
package/README.md CHANGED
@@ -51,7 +51,7 @@ The `Agent` integration tests ([source](./test/Agent.integration.js)) depend on
51
51
  <summary><b>How to write scripts that execute against local code changes?</b></summary>
52
52
  <p>
53
53
 
54
- Source code lives in the `./src` directory and is built for release via the `npm run compile` command. To create a simple script file to test your changes, follow these steps:
54
+ Source code lives in the `./src` directory and is built for release via the `npm run build` command. To create a simple script file to test your changes, follow these steps:
55
55
 
56
56
  1. create a `js` file on your local machine: `touch my-api-test.js` (somewhere outside of the root of this repo)
57
57
  2. within your test `js` file, init the api client like so:
@@ -123,7 +123,7 @@ There [are many snippets of using Particle API JS on the Documentation website][
123
123
  Make your changes to the files in the `src` directory, then from the project directory run:
124
124
 
125
125
  ```
126
- $ npm run compile && npm run build
126
+ $ npm run build
127
127
  ```
128
128
 
129
129
  The `dist` directory will contain the compiled and minified files that can be included in your project.