Skip to content

Commit d997657

Browse files
committed
chore: v1.0
1 parent 858e3ed commit d997657

File tree

15 files changed

+1063
-193
lines changed

15 files changed

+1063
-193
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
steps:
1414
- name: Checkout repo
1515
uses: actions/checkout@v3
16+
with:
1617
fetch-depth: 0
1718
ref: ${{github.event.pull_request.head.ref}}
1819
repository: ${{github.event.pull_request.head.repo.full_name}}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
node_modules
44
.cache
55
dist
6+
esbuild-why*.html
7+
.npmrc

app/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"license": "MIT",
66
"scripts": {
77
"start": "parcel index.html --open --port 3000",
8+
"start:prod": "serve dist -S",
89
"build": "parcel build index.html"
910
},
1011
"dependencies": {
@@ -22,6 +23,7 @@
2223
"@types/react-dom": "^18.0.11",
2324
"parcel": "^2.8.3",
2425
"parcel-bundler": "1.12.5",
26+
"serve": "^14.2.0",
2527
"typescript": "4.9.5"
2628
}
2729
}

app/yarn.lock

Lines changed: 466 additions & 11 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@
5757
"size-limit": [
5858
{
5959
"path": "dist/react-mqtt-workflow-manager.cjs.production.min.js",
60-
"limit": "25 KB"
60+
"limit": "100 kB"
6161
},
6262
{
6363
"path": "dist/react-mqtt-workflow-manager.esm.js",
64-
"limit": "25 KB"
64+
"limit": "100 kB"
6565
}
6666
],
6767
"devDependencies": {

src/WorkflowManager.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { FC, useCallback, useEffect, useMemo, useState } from 'react';
22

3-
import { connect, MqttClient } from 'mqtt';
3+
import { MqttClient, connect } from 'precompiled-mqtt';
44
import invariant from 'tiny-warning';
55

66
import { MqttProvider, IMqttContext } from './contexts';

src/WorkflowManagerConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Store } from '@reduxjs/toolkit';
2-
import { MqttClient, IClientSubscribeOptions } from 'mqtt';
32
import { matches, exec } from 'mqtt-pattern';
3+
import { MqttClient, IClientSubscribeOptions } from 'precompiled-mqtt';
44
import invariant from 'tiny-warning';
55

66
import { createWorkflowAction } from './ducks/utils';

src/contexts/mqtt.context.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ import { createContext } from 'react';
33
import { IMqttContext } from './types';
44

55
export const MqttContext = createContext<IMqttContext | undefined>(undefined);
6-
76
export const MqttProvider = MqttContext.Provider;

src/contexts/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { MqttClient } from 'mqtt';
1+
import { MqttClient } from 'precompiled-mqtt';
22

33
export interface IMqttContext {
44
client: MqttClient | null;

src/types.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import { PropsWithChildren } from 'react';
22

33
import { Store } from '@reduxjs/toolkit';
4-
import { IClientOptions, IClientSubscribeOptions, MqttClient } from 'mqtt';
4+
import {
5+
IClientOptions,
6+
IClientSubscribeOptions,
7+
MqttClient,
8+
} from 'precompiled-mqtt';
59

610
type Topic = string | string[];
711

0 commit comments

Comments
 (0)