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.
- package/CHANGELOG.md +10 -0
- package/EventStream-e2e-browser.html +0 -1
- package/EventStream-e2e-node.js +2 -3
- package/README.md +2 -2
- package/dist/particle.min.js +1 -434
- package/dist/particle.min.js.map +1 -1
- package/docs/api.md +4916 -266
- package/karma.conf.js +18 -6
- package/package.json +18 -22
- package/src/Agent.js +407 -0
- package/src/Client.js +170 -0
- package/src/Defaults.js +7 -0
- package/src/EventStream.js +263 -0
- package/src/Library.js +33 -0
- package/src/Particle.js +2644 -0
- package/test/Agent.integration.js +2 -3
- package/test/Agent.spec.js +2 -2
- package/test/Client.spec.js +7 -7
- package/test/Defaults.spec.js +2 -2
- package/test/EventStream.spec.js +6 -4
- package/test/FakeAgent.js +2 -2
- package/test/Library.spec.js +2 -2
- package/test/Particle.integration.js +2 -3
- package/test/Particle.spec.js +54 -54
- package/test/fixtures/index.js +4 -18
- package/test/support/FixtureHttpServer.js +5 -3
- package/test/test-setup.js +5 -5
- package/tsconfig.json +14 -0
- package/webpack.config.js +45 -0
- package/.babelrc +0 -4
- package/lib/Agent.js +0 -615
- package/lib/Agent.js.map +0 -1
- package/lib/Client.js +0 -312
- package/lib/Client.js.map +0 -1
- package/lib/Defaults.js +0 -14
- package/lib/Defaults.js.map +0 -1
- package/lib/EventStream.js +0 -335
- package/lib/EventStream.js.map +0 -1
- package/lib/Library.js +0 -67
- package/lib/Library.js.map +0 -1
- package/lib/Particle.js +0 -3831
- package/lib/Particle.js.map +0 -1
- package/test/Client.integration.js +0 -69
- package/test/fixtures/tarball.tar.gz +0 -0
- package/test/fixtures/test-library-publish-0.0.1.tar.gz +0 -0
- package/test/fixtures/test-library-publish-0.0.2.tar.gz +0 -0
|
@@ -21,9 +21,8 @@
|
|
|
21
21
|
* Tests for real the Agent class using an external service.
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
const { expect } = require('./test-setup');
|
|
25
|
+
const Agent = require('../src/Agent');
|
|
27
26
|
|
|
28
27
|
describe('Agent', () => {
|
|
29
28
|
if (!process.env.SKIP_AGENT_TEST){
|
package/test/Agent.spec.js
CHANGED
package/test/Client.spec.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
const { expect, sinon } = require('./test-setup');
|
|
2
|
+
const Client = require('../src/Client');
|
|
3
|
+
const fixtures = require('./fixtures');
|
|
4
|
+
const Library = require('../src/Library');
|
|
5
5
|
|
|
6
6
|
let api;
|
|
7
7
|
const token = 'tok';
|
|
@@ -25,7 +25,7 @@ describe('Client', () => {
|
|
|
25
25
|
|
|
26
26
|
describe('libraries', () => {
|
|
27
27
|
it('resolves to a list of Library objects', () => {
|
|
28
|
-
api.listLibraries = () => Promise.resolve({ body: fixtures.
|
|
28
|
+
api.listLibraries = () => Promise.resolve({ body: fixtures.read('libraries.json') });
|
|
29
29
|
return client.libraries().then(libraries => {
|
|
30
30
|
expect(libraries.length).to.equal(1);
|
|
31
31
|
expect(libraries[0].name).to.equal('neopixel');
|
|
@@ -35,7 +35,7 @@ describe('Client', () => {
|
|
|
35
35
|
|
|
36
36
|
describe('library', () => {
|
|
37
37
|
it('resolves to a Library objects', () => {
|
|
38
|
-
api.getLibrary = () => Promise.resolve({ body: fixtures.
|
|
38
|
+
api.getLibrary = () => Promise.resolve({ body: fixtures.read('library.json') });
|
|
39
39
|
return client.library('neopixel').then(library => {
|
|
40
40
|
expect(library.name).to.equal('neopixel');
|
|
41
41
|
});
|
|
@@ -44,7 +44,7 @@ describe('Client', () => {
|
|
|
44
44
|
|
|
45
45
|
describe('libraryVersions', () => {
|
|
46
46
|
it('resolves to a Library objects', () => {
|
|
47
|
-
api.getLibraryVersions = () => Promise.resolve({ body: fixtures.
|
|
47
|
+
api.getLibraryVersions = () => Promise.resolve({ body: fixtures.read('libraryVersions.json') });
|
|
48
48
|
return client.libraryVersions().then(libraries => {
|
|
49
49
|
expect(libraries.length).to.equal(9);
|
|
50
50
|
expect(libraries[0].name).to.equal('neopixel');
|
package/test/Defaults.spec.js
CHANGED
package/test/EventStream.spec.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const { sinon, expect } = require('./test-setup');
|
|
2
|
+
const http = require('http');
|
|
3
|
+
const { EventEmitter } = require('events');
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const EventStream = require('../src/EventStream');
|
|
6
6
|
|
|
7
7
|
describe('EventStream', () => {
|
|
8
8
|
afterEach(() => {
|
|
@@ -32,6 +32,7 @@ describe('EventStream', () => {
|
|
|
32
32
|
|
|
33
33
|
describe('connect', () => {
|
|
34
34
|
it('successfully connects to http', () => {
|
|
35
|
+
sinon.useFakeTimers({ shouldAdvanceTime: true });
|
|
35
36
|
const fakeRequest = makeRequest();
|
|
36
37
|
sinon.stub(http, 'request').callsFake(() => {
|
|
37
38
|
setImmediate(() => {
|
|
@@ -57,6 +58,7 @@ describe('EventStream', () => {
|
|
|
57
58
|
});
|
|
58
59
|
|
|
59
60
|
it('returns http errors on connect', () => {
|
|
61
|
+
sinon.useFakeTimers({ shouldAdvanceTime: true });
|
|
60
62
|
const fakeRequest = makeRequest();
|
|
61
63
|
sinon.stub(http, 'request').callsFake(() => {
|
|
62
64
|
setImmediate(() => {
|
package/test/FakeAgent.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
class FakeAgent {
|
|
2
2
|
get({ uri, auth, headers, query, context }){
|
|
3
3
|
return this.request({ uri, method: 'get', auth, headers, query, context });
|
|
4
4
|
}
|
|
@@ -23,4 +23,4 @@ export default class FakeAgent {
|
|
|
23
23
|
return new Promise((resolve) => resolve(opts));
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
module.exports = FakeAgent;
|
package/test/Library.spec.js
CHANGED
package/test/Particle.spec.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
const should = require('should'); // monkeypatch the world~!1
|
|
2
|
+
const Particle = require('../src/Particle');
|
|
3
|
+
const Defaults = require('../src/Defaults');
|
|
4
|
+
const Client = require('../src/Client');
|
|
5
|
+
const EventStream = require('../src/EventStream');
|
|
6
|
+
const FakeAgent = require('./FakeAgent');
|
|
7
|
+
const { sinon, expect } = require('./test-setup');
|
|
8
8
|
|
|
9
9
|
let api;
|
|
10
10
|
|
|
@@ -96,25 +96,25 @@ const props = {
|
|
|
96
96
|
dateRange: '2020-05-15T18:29:45.000Z,2020-05-19T18:29:45.000Z',
|
|
97
97
|
rectBl: '56.185412,-4.049868',
|
|
98
98
|
rectTr: '56.571537,-5.385920',
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
logicFunctionId: 1,
|
|
100
|
+
logicRunId: 1,
|
|
101
|
+
logicFunction: {
|
|
102
102
|
enabled: true,
|
|
103
|
-
name: '
|
|
103
|
+
name: 'function-1',
|
|
104
104
|
description: 'hello world',
|
|
105
|
-
|
|
105
|
+
source: {
|
|
106
106
|
type: 'JavaScript',
|
|
107
|
-
code: 'console.log("hello from
|
|
107
|
+
code: 'console.log("hello from function-1");'
|
|
108
108
|
},
|
|
109
|
-
|
|
109
|
+
logic_triggers: [
|
|
110
110
|
{
|
|
111
|
-
type: '
|
|
111
|
+
type: 'Event',
|
|
112
112
|
enabled: true,
|
|
113
113
|
product_id: 9001,
|
|
114
114
|
event_name: 'main',
|
|
115
115
|
},
|
|
116
116
|
{
|
|
117
|
-
type: '
|
|
117
|
+
type: 'Scheduled',
|
|
118
118
|
enabled: true,
|
|
119
119
|
cron: '0 0 1 * *',
|
|
120
120
|
start_at: '2021-05-15T18:29:45.000Z',
|
|
@@ -2574,31 +2574,31 @@ describe('ParticleAPI', () => {
|
|
|
2574
2574
|
});
|
|
2575
2575
|
});
|
|
2576
2576
|
|
|
2577
|
-
describe('.
|
|
2577
|
+
describe('.createLogicFunction', () => {
|
|
2578
2578
|
it('generates request', () => {
|
|
2579
|
-
return api.
|
|
2579
|
+
return api.createLogicFunction(propsWithOrg).then((results) => {
|
|
2580
2580
|
results.should.match({
|
|
2581
2581
|
method: 'post',
|
|
2582
|
-
uri: `/v1/orgs/${org}/
|
|
2582
|
+
uri: `/v1/orgs/${org}/logic/functions`,
|
|
2583
2583
|
auth: props.auth,
|
|
2584
2584
|
data: {
|
|
2585
|
-
|
|
2585
|
+
logic_function: {
|
|
2586
2586
|
enabled: true,
|
|
2587
|
-
name: '
|
|
2587
|
+
name: 'function-1',
|
|
2588
2588
|
description: 'hello world',
|
|
2589
|
-
|
|
2589
|
+
source: {
|
|
2590
2590
|
type: 'JavaScript',
|
|
2591
|
-
code: 'console.log("hello from
|
|
2591
|
+
code: 'console.log("hello from function-1");'
|
|
2592
2592
|
},
|
|
2593
|
-
|
|
2593
|
+
logic_triggers: [
|
|
2594
2594
|
{
|
|
2595
|
-
type: '
|
|
2595
|
+
type: 'Event',
|
|
2596
2596
|
enabled: true,
|
|
2597
2597
|
product_id: parseInt(props.productId),
|
|
2598
2598
|
event_name: props.event,
|
|
2599
2599
|
},
|
|
2600
2600
|
{
|
|
2601
|
-
type: '
|
|
2601
|
+
type: 'Scheduled',
|
|
2602
2602
|
enabled: true,
|
|
2603
2603
|
cron: '0 0 1 * *',
|
|
2604
2604
|
start_at: '2021-05-15T18:29:45.000Z',
|
|
@@ -2612,43 +2612,43 @@ describe('ParticleAPI', () => {
|
|
|
2612
2612
|
});
|
|
2613
2613
|
});
|
|
2614
2614
|
|
|
2615
|
-
describe('.
|
|
2615
|
+
describe('.getLogicFunction', () => {
|
|
2616
2616
|
it('generates request', () => {
|
|
2617
|
-
return api.
|
|
2617
|
+
return api.getLogicFunction(propsWithOrg).then((results) => {
|
|
2618
2618
|
results.should.match({
|
|
2619
2619
|
method: 'get',
|
|
2620
|
-
uri: `/v1/orgs/${org}/
|
|
2620
|
+
uri: `/v1/orgs/${org}/logic/functions/${props.logicFunctionId}`,
|
|
2621
2621
|
auth: props.auth
|
|
2622
2622
|
});
|
|
2623
2623
|
});
|
|
2624
2624
|
});
|
|
2625
2625
|
});
|
|
2626
2626
|
|
|
2627
|
-
describe('.
|
|
2627
|
+
describe('.updateLogicFunction', () => {
|
|
2628
2628
|
it('generates request', () => {
|
|
2629
|
-
return api.
|
|
2629
|
+
return api.updateLogicFunction(propsWithOrg).then((results) => {
|
|
2630
2630
|
results.should.match({
|
|
2631
2631
|
method: 'put',
|
|
2632
|
-
uri: `/v1/orgs/${org}/
|
|
2632
|
+
uri: `/v1/orgs/${org}/logic/functions/${props.logicFunctionId}`,
|
|
2633
2633
|
auth: props.auth,
|
|
2634
2634
|
data: {
|
|
2635
|
-
|
|
2635
|
+
logic_function: {
|
|
2636
2636
|
enabled: true,
|
|
2637
|
-
name: '
|
|
2637
|
+
name: 'function-1',
|
|
2638
2638
|
description: 'hello world',
|
|
2639
|
-
|
|
2639
|
+
source: {
|
|
2640
2640
|
type: 'JavaScript',
|
|
2641
|
-
code: 'console.log("hello from
|
|
2641
|
+
code: 'console.log("hello from function-1");'
|
|
2642
2642
|
},
|
|
2643
|
-
|
|
2643
|
+
logic_triggers: [
|
|
2644
2644
|
{
|
|
2645
|
-
type: '
|
|
2645
|
+
type: 'Event',
|
|
2646
2646
|
enabled: true,
|
|
2647
2647
|
product_id: parseInt(props.productId),
|
|
2648
2648
|
event_name: props.event,
|
|
2649
2649
|
},
|
|
2650
2650
|
{
|
|
2651
|
-
type: '
|
|
2651
|
+
type: 'Scheduled',
|
|
2652
2652
|
enabled: true,
|
|
2653
2653
|
cron: '0 0 1 * *',
|
|
2654
2654
|
start_at: '2021-05-15T18:29:45.000Z',
|
|
@@ -2662,60 +2662,60 @@ describe('ParticleAPI', () => {
|
|
|
2662
2662
|
});
|
|
2663
2663
|
});
|
|
2664
2664
|
|
|
2665
|
-
describe('.
|
|
2665
|
+
describe('.deleteLogicFunction', () => {
|
|
2666
2666
|
it('generates request', () => {
|
|
2667
|
-
return api.
|
|
2667
|
+
return api.deleteLogicFunction(propsWithOrg).then((results) => {
|
|
2668
2668
|
results.should.match({
|
|
2669
2669
|
method: 'delete',
|
|
2670
|
-
uri: `/v1/orgs/${org}/
|
|
2670
|
+
uri: `/v1/orgs/${org}/logic/functions/${props.logicFunctionId}`,
|
|
2671
2671
|
auth: props.auth
|
|
2672
2672
|
});
|
|
2673
2673
|
});
|
|
2674
2674
|
});
|
|
2675
2675
|
});
|
|
2676
2676
|
|
|
2677
|
-
describe('.
|
|
2677
|
+
describe('.listLogicFunctions', () => {
|
|
2678
2678
|
it('generates request', () => {
|
|
2679
|
-
return api.
|
|
2679
|
+
return api.listLogicFunctions(propsWithOrg).then((results) => {
|
|
2680
2680
|
results.should.match({
|
|
2681
2681
|
method: 'get',
|
|
2682
|
-
uri: `/v1/orgs/${org}/
|
|
2682
|
+
uri: `/v1/orgs/${org}/logic/functions`,
|
|
2683
2683
|
auth: props.auth
|
|
2684
2684
|
});
|
|
2685
2685
|
});
|
|
2686
2686
|
});
|
|
2687
2687
|
});
|
|
2688
2688
|
|
|
2689
|
-
describe('.
|
|
2689
|
+
describe('.listLogicRuns', () => {
|
|
2690
2690
|
it('generates request', () => {
|
|
2691
|
-
return api.
|
|
2691
|
+
return api.listLogicRuns(propsWithOrg).then((results) => {
|
|
2692
2692
|
results.should.match({
|
|
2693
2693
|
method: 'get',
|
|
2694
|
-
uri: `/v1/orgs/${org}/
|
|
2694
|
+
uri: `/v1/orgs/${org}/logic/functions/${props.logicFunctionId}/runs`,
|
|
2695
2695
|
auth: props.auth,
|
|
2696
2696
|
});
|
|
2697
2697
|
});
|
|
2698
2698
|
});
|
|
2699
2699
|
});
|
|
2700
2700
|
|
|
2701
|
-
describe('.
|
|
2701
|
+
describe('.getLogicRun', () => {
|
|
2702
2702
|
it('generates request', () => {
|
|
2703
|
-
return api.
|
|
2703
|
+
return api.getLogicRun(propsWithOrg).then((results) => {
|
|
2704
2704
|
results.should.match({
|
|
2705
2705
|
method: 'get',
|
|
2706
|
-
uri: `/v1/orgs/${org}/
|
|
2706
|
+
uri: `/v1/orgs/${org}/logic/functions/${props.logicFunctionId}/runs/${props.logicRunId}`,
|
|
2707
2707
|
auth: props.auth,
|
|
2708
2708
|
});
|
|
2709
2709
|
});
|
|
2710
2710
|
});
|
|
2711
2711
|
});
|
|
2712
2712
|
|
|
2713
|
-
describe('.
|
|
2713
|
+
describe('.getLogicRunLogs', () => {
|
|
2714
2714
|
it('generates request', () => {
|
|
2715
|
-
return api.
|
|
2715
|
+
return api.getLogicRunLogs(propsWithOrg).then((results) => {
|
|
2716
2716
|
results.should.match({
|
|
2717
2717
|
method: 'get',
|
|
2718
|
-
uri: `/v1/orgs/${org}/
|
|
2718
|
+
uri: `/v1/orgs/${org}/logic/functions/${props.logicFunctionId}/runs/${props.logicRunId}/logs`,
|
|
2719
2719
|
auth: props.auth,
|
|
2720
2720
|
});
|
|
2721
2721
|
});
|
package/test/fixtures/index.js
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
/* In order for the tests to run in the browser the fixture files must
|
|
2
|
-
* be loaded statically into an object. The 'brfs' module will replace
|
|
3
|
-
* the fs.readFileSync('static_path') call by the contents of the file.
|
|
4
|
-
*/
|
|
5
|
-
const fs = require('fs'); // import syntax doesn't work inside karma
|
|
6
|
-
|
|
7
1
|
|
|
8
2
|
const fixtures = {
|
|
9
|
-
'libraries.json':
|
|
10
|
-
'library.json':
|
|
11
|
-
'libraryVersions.json':
|
|
12
|
-
'test-library-publish-0.0.1.tar.gz': fs.readFileSync(__dirname + '/test-library-publish-0.0.1.tar.gz'),
|
|
13
|
-
'test-library-publish-0.0.2.tar.gz': fs.readFileSync(__dirname + '/test-library-publish-0.0.2.tar.gz'),
|
|
3
|
+
'libraries.json': require('./libraries.json'),
|
|
4
|
+
'library.json': require('./library.json'),
|
|
5
|
+
'libraryVersions.json': require('./libraryVersions.json')
|
|
14
6
|
};
|
|
15
7
|
|
|
16
8
|
function read(filename) {
|
|
@@ -20,10 +12,4 @@ function read(filename) {
|
|
|
20
12
|
return fixtures[filename];
|
|
21
13
|
}
|
|
22
14
|
|
|
23
|
-
|
|
24
|
-
return JSON.parse(read(filename));
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export {
|
|
28
|
-
read, readJSON
|
|
29
|
-
};
|
|
15
|
+
module.exports = { read };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// Serve files from the fixture folder
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
const express = require('express');
|
|
3
|
+
const fixtures = require('../fixtures');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
class FixtureHttpServer {
|
|
7
7
|
constructor(){
|
|
8
8
|
this.app = express();
|
|
9
9
|
this.app.get('/:filename', (req, res) => {
|
|
@@ -23,3 +23,5 @@ export default class FixtureHttpServer {
|
|
|
23
23
|
return `http://localhost:${this.server.address().port}`;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
+
|
|
27
|
+
module.exports = FixtureHttpServer;
|
package/test/test-setup.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// Set up the Mocha test framework with the Chai assertion library and
|
|
2
2
|
// the Sinon mock library
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
const chai = require('chai');
|
|
5
|
+
const sinon = require('sinon');
|
|
6
|
+
const sinonChai = require('sinon-chai');
|
|
7
|
+
const chaiAsPromised = require('chai-as-promised');
|
|
8
8
|
|
|
9
9
|
chai.use(sinonChai);
|
|
10
10
|
chai.use(chaiAsPromised);
|
|
11
11
|
const expect = chai.expect;
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
module.exports = {
|
|
14
14
|
chai,
|
|
15
15
|
sinon,
|
|
16
16
|
expect
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "commonjs",
|
|
4
|
+
"target": "es6",
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"checkJs": true,
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"resolveJsonModule": true
|
|
10
|
+
},
|
|
11
|
+
"types": ["node"],
|
|
12
|
+
"include": [ "src" ],
|
|
13
|
+
"exclude": ["node_modules"]
|
|
14
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const webpack = require('webpack');
|
|
3
|
+
const TerserPlugin = require('terser-webpack-plugin');
|
|
4
|
+
|
|
5
|
+
module.exports = (env) => {
|
|
6
|
+
return {
|
|
7
|
+
mode: env.mode,
|
|
8
|
+
target: 'web',
|
|
9
|
+
entry: './src/Particle.js',
|
|
10
|
+
devtool: 'source-map',
|
|
11
|
+
output: {
|
|
12
|
+
filename: `particle${env.mode === 'production' ? '.min' : ''}.js`,
|
|
13
|
+
path: path.resolve(__dirname, 'dist'),
|
|
14
|
+
clean: true,
|
|
15
|
+
library: {
|
|
16
|
+
name: 'Particle',
|
|
17
|
+
type: 'var'
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
optimization: {
|
|
21
|
+
minimize: env.mode === 'production',
|
|
22
|
+
minimizer: [new TerserPlugin({
|
|
23
|
+
extractComments: false,
|
|
24
|
+
terserOptions: {
|
|
25
|
+
format: {
|
|
26
|
+
comments: false
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
})]
|
|
30
|
+
},
|
|
31
|
+
resolve: {
|
|
32
|
+
fallback: {
|
|
33
|
+
buffer: require.resolve('buffer'),
|
|
34
|
+
events: require.resolve('events'),
|
|
35
|
+
url: require.resolve('url')
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
plugins: [
|
|
39
|
+
new webpack.ProvidePlugin({
|
|
40
|
+
Buffer: ['buffer', 'Buffer'],
|
|
41
|
+
process: 'process/browser',
|
|
42
|
+
})
|
|
43
|
+
]
|
|
44
|
+
};
|
|
45
|
+
};
|
package/.babelrc
DELETED