@grafana/k6-test-builder 0.5.1-alpha.0 → 0.5.2-alpha.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/dist/index.d.ts +4 -2
- package/dist/index.js +29 -11
- package/dist/module.js +29 -12
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -317,10 +317,12 @@ interface TestBuilderInternalContextProviderProps {
|
|
|
317
317
|
children?: ReactNode;
|
|
318
318
|
}
|
|
319
319
|
export function TestBuilderInternalContextProvider({ children, }: TestBuilderInternalContextProviderProps): JSX.Element;
|
|
320
|
-
|
|
320
|
+
export function getTestBuilderTest(): Promise<[TestBuilderTest & {
|
|
321
321
|
script: string;
|
|
322
322
|
}, Error | InvalidArchiveError | undefined]>;
|
|
323
|
-
export function useGetTestBuilderTest():
|
|
323
|
+
export function useGetTestBuilderTest(): [(TestBuilderTest & {
|
|
324
|
+
script: string;
|
|
325
|
+
}) | undefined, Error | InvalidArchiveError | undefined];
|
|
324
326
|
export function TestBuilderStoreProvider({ children }: {
|
|
325
327
|
children: ReactNode;
|
|
326
328
|
}): JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -31,6 +31,7 @@ function $parcel$interopDefault(a) {
|
|
|
31
31
|
$parcel$export(module.exports, "IMPORT_ITEMS", () => $3ef986fd3a19481b$export$68bd654274082695);
|
|
32
32
|
$parcel$export(module.exports, "useScriptImports", () => $4b278a39cee151d3$export$5a5fec7b51bf1c65);
|
|
33
33
|
$parcel$export(module.exports, "useTestBuilderName", () => $eba778ac240d30da$export$f69e5ec4b4b9cd7f);
|
|
34
|
+
$parcel$export(module.exports, "getTestBuilderTest", () => $f8968e326a13ec7f$export$e332dc600b88d679);
|
|
34
35
|
$parcel$export(module.exports, "useGetTestBuilderTest", () => $f8968e326a13ec7f$export$a87b1e8d480e0b86);
|
|
35
36
|
$parcel$export(module.exports, "StatusMessage", () => $c641bba5d19f2b73$export$a8f6042260b6c9c2);
|
|
36
37
|
$parcel$export(module.exports, "StatusBar", () => $dc0343c0cfa7c3ac$export$3ae18a2a755cc9c8);
|
|
@@ -1748,8 +1749,8 @@ const $4016baaeec60d4ee$export$83c693298dde2c4f = (0, $gkIgo$reduxjstoolkit.crea
|
|
|
1748
1749
|
name: "ui",
|
|
1749
1750
|
initialState: $5dd5dedd6ce134dc$export$d4c72bab9d6cc13a,
|
|
1750
1751
|
reducers: {
|
|
1751
|
-
init (state) {
|
|
1752
|
-
state.initialized =
|
|
1752
|
+
init (state, action) {
|
|
1753
|
+
state.initialized = action.payload;
|
|
1753
1754
|
},
|
|
1754
1755
|
setView (state, action) {
|
|
1755
1756
|
state.view = action.payload;
|
|
@@ -13304,6 +13305,8 @@ function $c5d89fa8e23336bc$export$99a3d50be81271a8() {
|
|
|
13304
13305
|
|
|
13305
13306
|
|
|
13306
13307
|
|
|
13308
|
+
|
|
13309
|
+
|
|
13307
13310
|
const $789f7ad5d92ee697$export$1992b10a91137ec8 = (0, $gkIgo$reduxjstoolkit.createListenerMiddleware)();
|
|
13308
13311
|
const $789f7ad5d92ee697$export$2d95587c8feb6498 = $789f7ad5d92ee697$export$1992b10a91137ec8.startListening;
|
|
13309
13312
|
|
|
@@ -13509,7 +13512,8 @@ const $b43d889bd29985ad$export$6f57813fe9f31bf9 = (0, $gkIgo$reduxjstoolkit.conf
|
|
|
13509
13512
|
|
|
13510
13513
|
|
|
13511
13514
|
|
|
13512
|
-
|
|
13515
|
+
|
|
13516
|
+
function $f8968e326a13ec7f$export$e332dc600b88d679() {
|
|
13513
13517
|
return new Promise((resolve, reject)=>{
|
|
13514
13518
|
const { getScript: getScript , ...testBuilderTest } = (0, $6ade7e533fb1ac59$export$f81464b06e147a9a)((0, $b43d889bd29985ad$export$6f57813fe9f31bf9).getState());
|
|
13515
13519
|
getScript().then(([script, error])=>{
|
|
@@ -13524,23 +13528,34 @@ function $f8968e326a13ec7f$var$getTestBuilderTest() {
|
|
|
13524
13528
|
});
|
|
13525
13529
|
}
|
|
13526
13530
|
function $f8968e326a13ec7f$export$a87b1e8d480e0b86() {
|
|
13527
|
-
|
|
13531
|
+
const id = (0, $gkIgo$reactredux.useSelector)((0, $b05a0fd638cf1454$export$7b42c5a06637ed68));
|
|
13532
|
+
const [result, setResult] = (0, $gkIgo$react.useState)([
|
|
13533
|
+
undefined,
|
|
13534
|
+
undefined
|
|
13535
|
+
]);
|
|
13536
|
+
(0, $gkIgo$react.useEffect)(()=>{
|
|
13537
|
+
$f8968e326a13ec7f$export$e332dc600b88d679().then((res)=>{
|
|
13538
|
+
setResult(res);
|
|
13539
|
+
});
|
|
13540
|
+
}, [
|
|
13541
|
+
id
|
|
13542
|
+
]);
|
|
13543
|
+
return result;
|
|
13528
13544
|
}
|
|
13529
13545
|
|
|
13530
13546
|
|
|
13531
13547
|
|
|
13532
13548
|
function $fc44f623ed4abf47$export$9debbb9998750ca4() {
|
|
13533
13549
|
const { ScriptEditorComponent: ScriptEditorComponent } = (0, $b0053bc75d27f892$export$8bcb3cb1ba0d67a7)();
|
|
13534
|
-
const
|
|
13550
|
+
const [test, error] = (0, $f8968e326a13ec7f$export$a87b1e8d480e0b86)();
|
|
13535
13551
|
const [script, setScript] = (0, $gkIgo$react.useState)("");
|
|
13536
13552
|
const [scriptError, setScriptError] = (0, $gkIgo$react.useState)();
|
|
13537
13553
|
(0, $gkIgo$react.useEffect)(()=>{
|
|
13538
|
-
|
|
13539
|
-
|
|
13540
|
-
setScriptError(error);
|
|
13541
|
-
});
|
|
13554
|
+
if (test) setScript(test.script);
|
|
13555
|
+
if (error) setScriptError(error);
|
|
13542
13556
|
}, [
|
|
13543
|
-
|
|
13557
|
+
test,
|
|
13558
|
+
error
|
|
13544
13559
|
]);
|
|
13545
13560
|
if (!ScriptEditorComponent) {
|
|
13546
13561
|
(0, $1c4cc247633c6592$export$af88d00dbe7f521).error("ScriptEditor was not defined in TestBuilderContext");
|
|
@@ -14345,7 +14360,10 @@ function $51462fa9d6a79d0b$export$daf800c33be5eb7e({ loading: loading , saving:
|
|
|
14345
14360
|
(0, $cdee3562a1fa264f$export$e3a1a4f1e85dc208)(); // keeps store in sync with context (when needed)
|
|
14346
14361
|
const dispatch = (0, $cdee3562a1fa264f$export$371624ce4da5e319)();
|
|
14347
14362
|
(0, $gkIgo$react.useEffect)(()=>{
|
|
14348
|
-
dispatch((0, $eeeed770fbbe0766$export$2cd8252107eb640b)());
|
|
14363
|
+
dispatch((0, $eeeed770fbbe0766$export$2cd8252107eb640b)(true));
|
|
14364
|
+
return ()=>{
|
|
14365
|
+
dispatch((0, $eeeed770fbbe0766$export$2cd8252107eb640b)(false));
|
|
14366
|
+
};
|
|
14349
14367
|
}, [
|
|
14350
14368
|
dispatch
|
|
14351
14369
|
]);
|
package/dist/module.js
CHANGED
|
@@ -1727,8 +1727,8 @@ const $7761e2aa524882e4$export$83c693298dde2c4f = (0, $b7VBt$createSlice)({
|
|
|
1727
1727
|
name: "ui",
|
|
1728
1728
|
initialState: $7ef4afb8c4d4abe0$export$d4c72bab9d6cc13a,
|
|
1729
1729
|
reducers: {
|
|
1730
|
-
init (state) {
|
|
1731
|
-
state.initialized =
|
|
1730
|
+
init (state, action) {
|
|
1731
|
+
state.initialized = action.payload;
|
|
1732
1732
|
},
|
|
1733
1733
|
setView (state, action) {
|
|
1734
1734
|
state.view = action.payload;
|
|
@@ -13283,6 +13283,8 @@ function $c08ddcd594fb8dad$export$99a3d50be81271a8() {
|
|
|
13283
13283
|
|
|
13284
13284
|
|
|
13285
13285
|
|
|
13286
|
+
|
|
13287
|
+
|
|
13286
13288
|
const $e933b66bcea2049b$export$1992b10a91137ec8 = (0, $b7VBt$createListenerMiddleware)();
|
|
13287
13289
|
const $e933b66bcea2049b$export$2d95587c8feb6498 = $e933b66bcea2049b$export$1992b10a91137ec8.startListening;
|
|
13288
13290
|
|
|
@@ -13488,7 +13490,8 @@ const $039f9a2f446605a8$export$6f57813fe9f31bf9 = (0, $b7VBt$configureStore)({
|
|
|
13488
13490
|
|
|
13489
13491
|
|
|
13490
13492
|
|
|
13491
|
-
|
|
13493
|
+
|
|
13494
|
+
function $1a84ef478f6c7a2c$export$e332dc600b88d679() {
|
|
13492
13495
|
return new Promise((resolve, reject)=>{
|
|
13493
13496
|
const { getScript: getScript , ...testBuilderTest } = (0, $5f3812b9bebb18ce$export$f81464b06e147a9a)((0, $039f9a2f446605a8$export$6f57813fe9f31bf9).getState());
|
|
13494
13497
|
getScript().then(([script, error])=>{
|
|
@@ -13503,23 +13506,34 @@ function $1a84ef478f6c7a2c$var$getTestBuilderTest() {
|
|
|
13503
13506
|
});
|
|
13504
13507
|
}
|
|
13505
13508
|
function $1a84ef478f6c7a2c$export$a87b1e8d480e0b86() {
|
|
13506
|
-
|
|
13509
|
+
const id = (0, $b7VBt$useSelector)((0, $37cc8f14e31244db$export$7b42c5a06637ed68));
|
|
13510
|
+
const [result, setResult] = (0, $b7VBt$useState)([
|
|
13511
|
+
undefined,
|
|
13512
|
+
undefined
|
|
13513
|
+
]);
|
|
13514
|
+
(0, $b7VBt$useEffect)(()=>{
|
|
13515
|
+
$1a84ef478f6c7a2c$export$e332dc600b88d679().then((res)=>{
|
|
13516
|
+
setResult(res);
|
|
13517
|
+
});
|
|
13518
|
+
}, [
|
|
13519
|
+
id
|
|
13520
|
+
]);
|
|
13521
|
+
return result;
|
|
13507
13522
|
}
|
|
13508
13523
|
|
|
13509
13524
|
|
|
13510
13525
|
|
|
13511
13526
|
function $02c83340f381657e$export$9debbb9998750ca4() {
|
|
13512
13527
|
const { ScriptEditorComponent: ScriptEditorComponent } = (0, $4cf6d05a57acd1d1$export$8bcb3cb1ba0d67a7)();
|
|
13513
|
-
const
|
|
13528
|
+
const [test, error] = (0, $1a84ef478f6c7a2c$export$a87b1e8d480e0b86)();
|
|
13514
13529
|
const [script, setScript] = (0, $b7VBt$useState)("");
|
|
13515
13530
|
const [scriptError, setScriptError] = (0, $b7VBt$useState)();
|
|
13516
13531
|
(0, $b7VBt$useEffect)(()=>{
|
|
13517
|
-
|
|
13518
|
-
|
|
13519
|
-
setScriptError(error);
|
|
13520
|
-
});
|
|
13532
|
+
if (test) setScript(test.script);
|
|
13533
|
+
if (error) setScriptError(error);
|
|
13521
13534
|
}, [
|
|
13522
|
-
|
|
13535
|
+
test,
|
|
13536
|
+
error
|
|
13523
13537
|
]);
|
|
13524
13538
|
if (!ScriptEditorComponent) {
|
|
13525
13539
|
(0, $77857f570335d7ae$export$af88d00dbe7f521).error("ScriptEditor was not defined in TestBuilderContext");
|
|
@@ -14324,7 +14338,10 @@ function $dfa81ce2249b0d37$export$daf800c33be5eb7e({ loading: loading , saving:
|
|
|
14324
14338
|
(0, $f33bf9327a1ab3ee$export$e3a1a4f1e85dc208)(); // keeps store in sync with context (when needed)
|
|
14325
14339
|
const dispatch = (0, $f33bf9327a1ab3ee$export$371624ce4da5e319)();
|
|
14326
14340
|
(0, $b7VBt$useEffect)(()=>{
|
|
14327
|
-
dispatch((0, $8592aa8dcb3902ac$export$2cd8252107eb640b)());
|
|
14341
|
+
dispatch((0, $8592aa8dcb3902ac$export$2cd8252107eb640b)(true));
|
|
14342
|
+
return ()=>{
|
|
14343
|
+
dispatch((0, $8592aa8dcb3902ac$export$2cd8252107eb640b)(false));
|
|
14344
|
+
};
|
|
14328
14345
|
}, [
|
|
14329
14346
|
dispatch
|
|
14330
14347
|
]);
|
|
@@ -15679,4 +15696,4 @@ function $c0917619c23bad14$export$1d11f73118c5c05d() {
|
|
|
15679
15696
|
|
|
15680
15697
|
|
|
15681
15698
|
|
|
15682
|
-
export {$a180d875ebbc7977$export$68bd654274082695 as IMPORT_ITEMS, $6d29da0c23d05a91$export$5a5fec7b51bf1c65 as useScriptImports, $599049cde64ff282$export$f69e5ec4b4b9cd7f as useTestBuilderName, $1a84ef478f6c7a2c$export$a87b1e8d480e0b86 as useGetTestBuilderTest, $9fefb3802c1a6632$export$a8f6042260b6c9c2 as StatusMessage, $1c5dbcfbf6773beb$export$3ae18a2a755cc9c8 as StatusBar, $045b658c7184976c$export$f290710bbb710efa as TestBuilder, $600e66eeb9e75faf$export$93f0f0dfc0a5be37 as TestMetaInformation, $59eb99f127c45ea7$export$9bb8a8c9de09825e as TestBuilderStoreProvider, $4cf6d05a57acd1d1$export$10961d9597c38760 as TestBuilderInternalContextProvider, $211a5ec4efef370d$export$35d89f711450937a as convertDurationToSeconds, $211a5ec4efef370d$export$4bba44c8fcc0fa as isDurationValid, $211a5ec4efef370d$export$9427da4570bcea21 as isStageTargetValid, $71c26ded81aa0285$export$e271b69afb17d5a0 as TestBuilderThemeProvider, $1eed075243b73743$export$44518b3b0aec31d as grafanaThemeToMuiTheme, $c0917619c23bad14$export$1d11f73118c5c05d as useGetUnsavedChanges, $977f5f8f585fbb2c$export$9ffca73f9b15ba64 as DOCS_ARTICLE_LINKS};
|
|
15699
|
+
export {$a180d875ebbc7977$export$68bd654274082695 as IMPORT_ITEMS, $6d29da0c23d05a91$export$5a5fec7b51bf1c65 as useScriptImports, $599049cde64ff282$export$f69e5ec4b4b9cd7f as useTestBuilderName, $1a84ef478f6c7a2c$export$e332dc600b88d679 as getTestBuilderTest, $1a84ef478f6c7a2c$export$a87b1e8d480e0b86 as useGetTestBuilderTest, $9fefb3802c1a6632$export$a8f6042260b6c9c2 as StatusMessage, $1c5dbcfbf6773beb$export$3ae18a2a755cc9c8 as StatusBar, $045b658c7184976c$export$f290710bbb710efa as TestBuilder, $600e66eeb9e75faf$export$93f0f0dfc0a5be37 as TestMetaInformation, $59eb99f127c45ea7$export$9bb8a8c9de09825e as TestBuilderStoreProvider, $4cf6d05a57acd1d1$export$10961d9597c38760 as TestBuilderInternalContextProvider, $211a5ec4efef370d$export$35d89f711450937a as convertDurationToSeconds, $211a5ec4efef370d$export$4bba44c8fcc0fa as isDurationValid, $211a5ec4efef370d$export$9427da4570bcea21 as isStageTargetValid, $71c26ded81aa0285$export$e271b69afb17d5a0 as TestBuilderThemeProvider, $1eed075243b73743$export$44518b3b0aec31d as grafanaThemeToMuiTheme, $c0917619c23bad14$export$1d11f73118c5c05d as useGetUnsavedChanges, $977f5f8f585fbb2c$export$9ffca73f9b15ba64 as DOCS_ARTICLE_LINKS};
|