gomtm 0.0.237 → 0.0.238
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/dist/esm/gomtmpb/mtm/sppb/sp-SpService_connectquery.d.ts +6 -6
- package/dist/esm/gomtmpb/mtm/sppb/sp-SpService_connectquery.js +7 -7
- package/dist/esm/gomtmpb/mtm/sppb/sp_connect.d.ts +5 -5
- package/dist/esm/gomtmpb/mtm/sppb/sp_connect.js +8 -6
- package/dist/esm/gomtmpb/mtm/sppb/sp_pb.d.ts +15 -15
- package/dist/esm/gomtmpb/mtm/sppb/sp_pb.js +23 -23
- package/dist/esm/providers/GomtmProvider.d.ts +0 -1
- package/dist/esm/providers/GomtmProvider.js +11 -11
- package/dist/tsconfig.type.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MethodKind } from "@bufbuild/protobuf";
|
|
2
|
-
import { SpContentmodi, SpContentmodiCreateReq, SpContentmodiGetReq, SpContentmodiListReply, SpContentmodiListReq, SpContentmodiUpdateReq,
|
|
2
|
+
import { Sp2FetchReq, Sp2FetchRes, SpContentmodi, SpContentmodiCreateReq, SpContentmodiGetReq, SpContentmodiListReply, SpContentmodiListReq, SpContentmodiUpdateReq, SpiderProjectRunReq, SpiderProjectVisitReq, SpOption, SpOptionGetReq, SpProject, SpProjectCreateReq, SpProjectGetReq, SpProjectListReply, SpProjectListReq, SpProjectReloadReq, SpProjectUpdateReq, SpRoute, SpRouteCreateReq, SpRouteGetReq, SpRouteListReply, SpRouteListReq, SpRouteUpdateReq } from "./sp_pb";
|
|
3
3
|
import { ResDeleteReq, Result } from "./mtm_pb";
|
|
4
4
|
export declare const spProjectList: {
|
|
5
5
|
readonly localName: "spProjectList";
|
|
@@ -201,12 +201,12 @@ export declare const spOptionSave: {
|
|
|
201
201
|
readonly typeName: "sppb.SpService";
|
|
202
202
|
};
|
|
203
203
|
};
|
|
204
|
-
export declare const
|
|
205
|
-
readonly localName: "
|
|
206
|
-
readonly name: "
|
|
204
|
+
export declare const sp2Fetch: {
|
|
205
|
+
readonly localName: "sp2Fetch";
|
|
206
|
+
readonly name: "Sp2Fetch";
|
|
207
207
|
readonly kind: MethodKind.Unary;
|
|
208
|
-
readonly I: typeof
|
|
209
|
-
readonly O: typeof
|
|
208
|
+
readonly I: typeof Sp2FetchReq;
|
|
209
|
+
readonly O: typeof Sp2FetchRes;
|
|
210
210
|
readonly service: {
|
|
211
211
|
readonly typeName: "sppb.SpService";
|
|
212
212
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MethodKind } from "@bufbuild/protobuf";
|
|
2
|
-
import { SpContentmodi, SpContentmodiCreateReq, SpContentmodiGetReq, SpContentmodiListReply, SpContentmodiListReq, SpContentmodiUpdateReq,
|
|
2
|
+
import { Sp2FetchReq, Sp2FetchRes, SpContentmodi, SpContentmodiCreateReq, SpContentmodiGetReq, SpContentmodiListReply, SpContentmodiListReq, SpContentmodiUpdateReq, SpiderProjectRunReq, SpiderProjectVisitReq, SpOption, SpOptionGetReq, SpProject, SpProjectCreateReq, SpProjectGetReq, SpProjectListReply, SpProjectListReq, SpProjectReloadReq, SpProjectUpdateReq, SpRoute, SpRouteCreateReq, SpRouteGetReq, SpRouteListReply, SpRouteListReq, SpRouteUpdateReq } from "./sp_pb";
|
|
3
3
|
import { ResDeleteReq, Result } from "./mtm_pb";
|
|
4
4
|
const spProjectList = {
|
|
5
5
|
localName: "spProjectList",
|
|
@@ -201,23 +201,23 @@ const spOptionSave = {
|
|
|
201
201
|
typeName: "sppb.SpService"
|
|
202
202
|
}
|
|
203
203
|
};
|
|
204
|
-
const
|
|
205
|
-
localName: "
|
|
206
|
-
name: "
|
|
204
|
+
const sp2Fetch = {
|
|
205
|
+
localName: "sp2Fetch",
|
|
206
|
+
name: "Sp2Fetch",
|
|
207
207
|
kind: MethodKind.Unary,
|
|
208
|
-
I:
|
|
209
|
-
O:
|
|
208
|
+
I: Sp2FetchReq,
|
|
209
|
+
O: Sp2FetchRes,
|
|
210
210
|
service: {
|
|
211
211
|
typeName: "sppb.SpService"
|
|
212
212
|
}
|
|
213
213
|
};
|
|
214
214
|
export {
|
|
215
|
+
sp2Fetch,
|
|
215
216
|
spContentmodiCreate,
|
|
216
217
|
spContentmodiDelete,
|
|
217
218
|
spContentmodiGet,
|
|
218
219
|
spContentmodiList,
|
|
219
220
|
spContentmodiUpdate,
|
|
220
|
-
spFetchProxy,
|
|
221
221
|
spOptionGet,
|
|
222
222
|
spOptionSave,
|
|
223
223
|
spProjectCreate,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SpContentmodi, SpContentmodiCreateReq, SpContentmodiGetReq, SpContentmodiListReply, SpContentmodiListReq, SpContentmodiUpdateReq,
|
|
1
|
+
import { Sp2FetchReq, Sp2FetchRes, SpContentmodi, SpContentmodiCreateReq, SpContentmodiGetReq, SpContentmodiListReply, SpContentmodiListReq, SpContentmodiUpdateReq, SpiderProjectRunReq, SpiderProjectVisitReq, SpOption, SpOptionGetReq, SpProject, SpProjectCreateReq, SpProjectGetReq, SpProjectListReply, SpProjectListReq, SpProjectReloadReq, SpProjectUpdateReq, SpRoute, SpRouteCreateReq, SpRouteGetReq, SpRouteListReply, SpRouteListReq, SpRouteUpdateReq } from "./sp_pb";
|
|
2
2
|
import { MethodKind } from "@bufbuild/protobuf";
|
|
3
3
|
import { ResDeleteReq, Result } from "./mtm_pb";
|
|
4
4
|
export declare const SpService: {
|
|
@@ -124,10 +124,10 @@ export declare const SpService: {
|
|
|
124
124
|
readonly O: typeof Result;
|
|
125
125
|
readonly kind: MethodKind.Unary;
|
|
126
126
|
};
|
|
127
|
-
readonly
|
|
128
|
-
readonly name: "
|
|
129
|
-
readonly I: typeof
|
|
130
|
-
readonly O: typeof
|
|
127
|
+
readonly sp2Fetch: {
|
|
128
|
+
readonly name: "Sp2Fetch";
|
|
129
|
+
readonly I: typeof Sp2FetchReq;
|
|
130
|
+
readonly O: typeof Sp2FetchRes;
|
|
131
131
|
readonly kind: MethodKind.Unary;
|
|
132
132
|
};
|
|
133
133
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SpContentmodi, SpContentmodiCreateReq, SpContentmodiGetReq, SpContentmodiListReply, SpContentmodiListReq, SpContentmodiUpdateReq,
|
|
1
|
+
import { Sp2FetchReq, Sp2FetchRes, SpContentmodi, SpContentmodiCreateReq, SpContentmodiGetReq, SpContentmodiListReply, SpContentmodiListReq, SpContentmodiUpdateReq, SpiderProjectRunReq, SpiderProjectVisitReq, SpOption, SpOptionGetReq, SpProject, SpProjectCreateReq, SpProjectGetReq, SpProjectListReply, SpProjectListReq, SpProjectReloadReq, SpProjectUpdateReq, SpRoute, SpRouteCreateReq, SpRouteGetReq, SpRouteListReply, SpRouteListReq, SpRouteUpdateReq } from "./sp_pb";
|
|
2
2
|
import { MethodKind } from "@bufbuild/protobuf";
|
|
3
3
|
import { ResDeleteReq, Result } from "./mtm_pb";
|
|
4
4
|
const SpService = {
|
|
@@ -193,12 +193,14 @@ const SpService = {
|
|
|
193
193
|
kind: MethodKind.Unary
|
|
194
194
|
},
|
|
195
195
|
/**
|
|
196
|
-
*
|
|
196
|
+
* 新的设计方式开始(sp2Case)
|
|
197
|
+
*
|
|
198
|
+
* @generated from rpc sppb.SpService.Sp2Fetch
|
|
197
199
|
*/
|
|
198
|
-
|
|
199
|
-
name: "
|
|
200
|
-
I:
|
|
201
|
-
O:
|
|
200
|
+
sp2Fetch: {
|
|
201
|
+
name: "Sp2Fetch",
|
|
202
|
+
I: Sp2FetchReq,
|
|
203
|
+
O: Sp2FetchRes,
|
|
202
204
|
kind: MethodKind.Unary
|
|
203
205
|
}
|
|
204
206
|
}
|
|
@@ -660,25 +660,25 @@ export declare class SpConfig extends Message<SpConfig> {
|
|
|
660
660
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SpConfig;
|
|
661
661
|
static equals(a: SpConfig | PlainMessage<SpConfig> | undefined, b: SpConfig | PlainMessage<SpConfig> | undefined): boolean;
|
|
662
662
|
}
|
|
663
|
-
export declare class
|
|
663
|
+
export declare class Sp2FetchReq extends Message<Sp2FetchReq> {
|
|
664
664
|
url: string;
|
|
665
|
-
constructor(data?: PartialMessage<
|
|
665
|
+
constructor(data?: PartialMessage<Sp2FetchReq>);
|
|
666
666
|
static readonly runtime: typeof proto3;
|
|
667
|
-
static readonly typeName = "sppb.
|
|
667
|
+
static readonly typeName = "sppb.Sp2FetchReq";
|
|
668
668
|
static readonly fields: FieldList;
|
|
669
|
-
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>):
|
|
670
|
-
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>):
|
|
671
|
-
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>):
|
|
672
|
-
static equals(a:
|
|
669
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Sp2FetchReq;
|
|
670
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Sp2FetchReq;
|
|
671
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Sp2FetchReq;
|
|
672
|
+
static equals(a: Sp2FetchReq | PlainMessage<Sp2FetchReq> | undefined, b: Sp2FetchReq | PlainMessage<Sp2FetchReq> | undefined): boolean;
|
|
673
673
|
}
|
|
674
|
-
export declare class
|
|
675
|
-
|
|
676
|
-
constructor(data?: PartialMessage<
|
|
674
|
+
export declare class Sp2FetchRes extends Message<Sp2FetchRes> {
|
|
675
|
+
body: string;
|
|
676
|
+
constructor(data?: PartialMessage<Sp2FetchRes>);
|
|
677
677
|
static readonly runtime: typeof proto3;
|
|
678
|
-
static readonly typeName = "sppb.
|
|
678
|
+
static readonly typeName = "sppb.Sp2FetchRes";
|
|
679
679
|
static readonly fields: FieldList;
|
|
680
|
-
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>):
|
|
681
|
-
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>):
|
|
682
|
-
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>):
|
|
683
|
-
static equals(a:
|
|
680
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Sp2FetchRes;
|
|
681
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Sp2FetchRes;
|
|
682
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Sp2FetchRes;
|
|
683
|
+
static equals(a: Sp2FetchRes | PlainMessage<Sp2FetchRes> | undefined, b: Sp2FetchRes | PlainMessage<Sp2FetchRes> | undefined): boolean;
|
|
684
684
|
}
|
|
@@ -2781,7 +2781,7 @@ __publicField(_SpConfig, "fields", proto3.util.newFieldList(() => [
|
|
|
2781
2781
|
}
|
|
2782
2782
|
]));
|
|
2783
2783
|
let SpConfig = _SpConfig;
|
|
2784
|
-
const
|
|
2784
|
+
const _Sp2FetchReq = class _Sp2FetchReq extends Message {
|
|
2785
2785
|
constructor(data) {
|
|
2786
2786
|
super();
|
|
2787
2787
|
/**
|
|
@@ -2791,21 +2791,21 @@ const _SpFetchProxyReq = class _SpFetchProxyReq extends Message {
|
|
|
2791
2791
|
proto3.util.initPartial(data, this);
|
|
2792
2792
|
}
|
|
2793
2793
|
static fromBinary(bytes, options) {
|
|
2794
|
-
return new
|
|
2794
|
+
return new _Sp2FetchReq().fromBinary(bytes, options);
|
|
2795
2795
|
}
|
|
2796
2796
|
static fromJson(jsonValue, options) {
|
|
2797
|
-
return new
|
|
2797
|
+
return new _Sp2FetchReq().fromJson(jsonValue, options);
|
|
2798
2798
|
}
|
|
2799
2799
|
static fromJsonString(jsonString, options) {
|
|
2800
|
-
return new
|
|
2800
|
+
return new _Sp2FetchReq().fromJsonString(jsonString, options);
|
|
2801
2801
|
}
|
|
2802
2802
|
static equals(a, b) {
|
|
2803
|
-
return proto3.util.equals(
|
|
2803
|
+
return proto3.util.equals(_Sp2FetchReq, a, b);
|
|
2804
2804
|
}
|
|
2805
2805
|
};
|
|
2806
|
-
__publicField(
|
|
2807
|
-
__publicField(
|
|
2808
|
-
__publicField(
|
|
2806
|
+
__publicField(_Sp2FetchReq, "runtime", proto3);
|
|
2807
|
+
__publicField(_Sp2FetchReq, "typeName", "sppb.Sp2FetchReq");
|
|
2808
|
+
__publicField(_Sp2FetchReq, "fields", proto3.util.newFieldList(() => [
|
|
2809
2809
|
{
|
|
2810
2810
|
no: 1,
|
|
2811
2811
|
name: "url",
|
|
@@ -2814,42 +2814,44 @@ __publicField(_SpFetchProxyReq, "fields", proto3.util.newFieldList(() => [
|
|
|
2814
2814
|
/* ScalarType.STRING */
|
|
2815
2815
|
}
|
|
2816
2816
|
]));
|
|
2817
|
-
let
|
|
2818
|
-
const
|
|
2817
|
+
let Sp2FetchReq = _Sp2FetchReq;
|
|
2818
|
+
const _Sp2FetchRes = class _Sp2FetchRes extends Message {
|
|
2819
2819
|
constructor(data) {
|
|
2820
2820
|
super();
|
|
2821
2821
|
/**
|
|
2822
|
-
* @generated from field: string
|
|
2822
|
+
* @generated from field: string body = 1;
|
|
2823
2823
|
*/
|
|
2824
|
-
__publicField(this, "
|
|
2824
|
+
__publicField(this, "body", "");
|
|
2825
2825
|
proto3.util.initPartial(data, this);
|
|
2826
2826
|
}
|
|
2827
2827
|
static fromBinary(bytes, options) {
|
|
2828
|
-
return new
|
|
2828
|
+
return new _Sp2FetchRes().fromBinary(bytes, options);
|
|
2829
2829
|
}
|
|
2830
2830
|
static fromJson(jsonValue, options) {
|
|
2831
|
-
return new
|
|
2831
|
+
return new _Sp2FetchRes().fromJson(jsonValue, options);
|
|
2832
2832
|
}
|
|
2833
2833
|
static fromJsonString(jsonString, options) {
|
|
2834
|
-
return new
|
|
2834
|
+
return new _Sp2FetchRes().fromJsonString(jsonString, options);
|
|
2835
2835
|
}
|
|
2836
2836
|
static equals(a, b) {
|
|
2837
|
-
return proto3.util.equals(
|
|
2837
|
+
return proto3.util.equals(_Sp2FetchRes, a, b);
|
|
2838
2838
|
}
|
|
2839
2839
|
};
|
|
2840
|
-
__publicField(
|
|
2841
|
-
__publicField(
|
|
2842
|
-
__publicField(
|
|
2840
|
+
__publicField(_Sp2FetchRes, "runtime", proto3);
|
|
2841
|
+
__publicField(_Sp2FetchRes, "typeName", "sppb.Sp2FetchRes");
|
|
2842
|
+
__publicField(_Sp2FetchRes, "fields", proto3.util.newFieldList(() => [
|
|
2843
2843
|
{
|
|
2844
2844
|
no: 1,
|
|
2845
|
-
name: "
|
|
2845
|
+
name: "body",
|
|
2846
2846
|
kind: "scalar",
|
|
2847
2847
|
T: 9
|
|
2848
2848
|
/* ScalarType.STRING */
|
|
2849
2849
|
}
|
|
2850
2850
|
]));
|
|
2851
|
-
let
|
|
2851
|
+
let Sp2FetchRes = _Sp2FetchRes;
|
|
2852
2852
|
export {
|
|
2853
|
+
Sp2FetchReq,
|
|
2854
|
+
Sp2FetchRes,
|
|
2853
2855
|
SpConfig,
|
|
2854
2856
|
SpContentmodi,
|
|
2855
2857
|
SpContentmodiCreateReq,
|
|
@@ -2863,8 +2865,6 @@ export {
|
|
|
2863
2865
|
SpCrawlerListReply,
|
|
2864
2866
|
SpCrawlerListReq,
|
|
2865
2867
|
SpCrawlerUpdateReq,
|
|
2866
|
-
SpFetchProxyReq,
|
|
2867
|
-
SpFetchProxyRes,
|
|
2868
2868
|
SpField,
|
|
2869
2869
|
SpOption,
|
|
2870
2870
|
SpOptionGetReq,
|
|
@@ -60,7 +60,6 @@ interface IAppContext {
|
|
|
60
60
|
}
|
|
61
61
|
export declare function GomtmProvider(props: {} & GomtmAppProps & PropsWithChildren): import("react").JSX.Element;
|
|
62
62
|
export declare function useMtmApp(): IAppContext & GomtmAppProps;
|
|
63
|
-
export declare const useMtmBackendUrl: () => string | null | undefined;
|
|
64
63
|
export declare const useHostname: () => string;
|
|
65
64
|
export declare const MtConnectProvider: (props: PropsWithChildren) => import("react").JSX.Element;
|
|
66
65
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { createContext, useContext } from "react";
|
|
4
4
|
import { createConnectTransport } from "@connectrpc/connect-web";
|
|
5
5
|
import { atom, createStore, useAtom } from "jotai";
|
|
@@ -13,6 +13,7 @@ const mtmAppStore = createStore();
|
|
|
13
13
|
const gomtmBaseUrlAtom = atom("");
|
|
14
14
|
const curd3BackendUrlAtom = atom((get) => {
|
|
15
15
|
const value1 = get(gomtmBaseUrlAtom);
|
|
16
|
+
console.log("curd3BackendUrlAtom", value1);
|
|
16
17
|
if (value1) {
|
|
17
18
|
return value1;
|
|
18
19
|
}
|
|
@@ -50,14 +51,18 @@ const transportAtom = atom((get) => {
|
|
|
50
51
|
});
|
|
51
52
|
const AppContext = createContext(void 0);
|
|
52
53
|
function GomtmProvider(props) {
|
|
53
|
-
const { children } = props;
|
|
54
|
+
const { backendUrl, children } = props;
|
|
54
55
|
const [isDebug, setDebug] = useAtom(isDebugAtom);
|
|
55
56
|
useHotkeys("alt+j", () => {
|
|
56
57
|
setDebug(!isDebug);
|
|
57
58
|
}, [isDebug, setDebug]);
|
|
58
|
-
return /* @__PURE__ */
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
60
|
+
"backendUrl: ",
|
|
61
|
+
backendUrl,
|
|
62
|
+
/* @__PURE__ */ jsx(AtomsHydrator, { atomValues: [
|
|
63
|
+
[gomtmBaseUrlAtom, props.backendUrl]
|
|
64
|
+
], children: /* @__PURE__ */ jsx(MtConnectProvider, { children: /* @__PURE__ */ jsx(MtReactQueryProvider, { children }) }) })
|
|
65
|
+
] });
|
|
61
66
|
}
|
|
62
67
|
function useMtmApp() {
|
|
63
68
|
const mtappContext = useContext(AppContext);
|
|
@@ -66,10 +71,6 @@ function useMtmApp() {
|
|
|
66
71
|
}
|
|
67
72
|
return mtappContext;
|
|
68
73
|
}
|
|
69
|
-
const useMtmBackendUrl = () => {
|
|
70
|
-
const { backendUrl } = useMtmApp();
|
|
71
|
-
return backendUrl;
|
|
72
|
-
};
|
|
73
74
|
const useHostname = () => {
|
|
74
75
|
const { hostname } = useMtmApp();
|
|
75
76
|
if (hostname)
|
|
@@ -94,6 +95,5 @@ export {
|
|
|
94
95
|
mtmAppStore,
|
|
95
96
|
transportAtom,
|
|
96
97
|
useHostname,
|
|
97
|
-
useMtmApp
|
|
98
|
-
useMtmBackendUrl
|
|
98
|
+
useMtmApp
|
|
99
99
|
};
|