tienjs-chartbrew-plugin-strapi 0.1.2 → 0.1.3
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/_chunks/{App-BCYezLLX.mjs → App-CZYH4Lv3.mjs} +3 -2
- package/dist/_chunks/{App-Dqp66kas.js → App-m-xvbLqv.js} +3 -2
- package/dist/_chunks/{Setup-D_mIow3G.js → Setup-B-KYP8ql.js} +2 -2
- package/dist/_chunks/{Setup-CFHScO45.mjs → Setup-BDc8qCYW.mjs} +2 -2
- package/dist/_chunks/{index-D2poyYLZ.js → index-99tSyF1-.js} +2 -2
- package/dist/_chunks/{index-Cjgwr2aI.mjs → index-BAu-oge7.mjs} +2 -2
- package/dist/_chunks/{store-CDGc86NS.mjs → store-CG_sYhrl.mjs} +6 -1
- package/dist/_chunks/{store-DrVugT1Q.js → store-CRky1w-V.js} +6 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -4,8 +4,9 @@ import { Link, Routes, Route } from "react-router-dom";
|
|
|
4
4
|
import { Layouts, Page } from "@strapi/strapi/admin";
|
|
5
5
|
import { LinkButton, Loader, Box, Flex, Typography, SingleSelect, SingleSelectOption, EmptyStateLayout, Alert, Link as Link$1, Checkbox, Grid, Button, Divider, Combobox, ComboboxOption } from "@strapi/design-system";
|
|
6
6
|
import { ChartCircle, Plus, ExternalLink, ArrowLeft } from "@strapi/icons";
|
|
7
|
-
import { P as PLUGIN_ID } from "./index-
|
|
8
|
-
import { g as getSettings, s as setSettings, i as instance } from "./store-
|
|
7
|
+
import { P as PLUGIN_ID } from "./index-BAu-oge7.mjs";
|
|
8
|
+
import { g as getSettings, s as setSettings, i as instance } from "./store-CG_sYhrl.mjs";
|
|
9
|
+
import "js-cookie";
|
|
9
10
|
async function login() {
|
|
10
11
|
const { host, token } = await getSettings();
|
|
11
12
|
return fetch(`${host}/user/relog`, {
|
|
@@ -6,8 +6,9 @@ const reactRouterDom = require("react-router-dom");
|
|
|
6
6
|
const admin = require("@strapi/strapi/admin");
|
|
7
7
|
const designSystem = require("@strapi/design-system");
|
|
8
8
|
const icons = require("@strapi/icons");
|
|
9
|
-
const index = require("./index-
|
|
10
|
-
const store = require("./store-
|
|
9
|
+
const index = require("./index-99tSyF1-.js");
|
|
10
|
+
const store = require("./store-CRky1w-V.js");
|
|
11
|
+
require("js-cookie");
|
|
11
12
|
async function login() {
|
|
12
13
|
const { host, token } = await store.getSettings();
|
|
13
14
|
return fetch(`${host}/user/relog`, {
|
|
@@ -6,8 +6,8 @@ const designSystem = require("@strapi/design-system");
|
|
|
6
6
|
const admin = require("@strapi/strapi/admin");
|
|
7
7
|
const icons = require("@strapi/icons");
|
|
8
8
|
const reactRouterDom = require("react-router-dom");
|
|
9
|
-
const index = require("./index-
|
|
10
|
-
const store = require("./store-
|
|
9
|
+
const index = require("./index-99tSyF1-.js");
|
|
10
|
+
const store = require("./store-CRky1w-V.js");
|
|
11
11
|
const defaultHost = "https://api.chartbrew.com";
|
|
12
12
|
const defaultClientHost = "https://app.chartbrew.com";
|
|
13
13
|
const strapiHostEnv = process.env.STRAPI_ADMIN_BACKEND_URL;
|
|
@@ -4,8 +4,8 @@ import { LinkButton, Box, Typography, Tabs, Field, Button, Link, Flex, Alert } f
|
|
|
4
4
|
import { useNotification, Layouts } from "@strapi/strapi/admin";
|
|
5
5
|
import { ExternalLink, Magic, Check, Cross, ChevronRight } from "@strapi/icons";
|
|
6
6
|
import { Link as Link$1 } from "react-router-dom";
|
|
7
|
-
import { P as PLUGIN_ID } from "./index-
|
|
8
|
-
import { g as getSettings, s as setSettings } from "./store-
|
|
7
|
+
import { P as PLUGIN_ID } from "./index-BAu-oge7.mjs";
|
|
8
|
+
import { g as getSettings, s as setSettings } from "./store-CG_sYhrl.mjs";
|
|
9
9
|
const defaultHost = "https://api.chartbrew.com";
|
|
10
10
|
const defaultClientHost = "https://app.chartbrew.com";
|
|
11
11
|
const strapiHostEnv = process.env.STRAPI_ADMIN_BACKEND_URL;
|
|
@@ -38,7 +38,7 @@ const index = {
|
|
|
38
38
|
defaultMessage: "Chartbrew"
|
|
39
39
|
},
|
|
40
40
|
Component: async () => {
|
|
41
|
-
const { App } = await Promise.resolve().then(() => require("./App-
|
|
41
|
+
const { App } = await Promise.resolve().then(() => require("./App-m-xvbLqv.js"));
|
|
42
42
|
return App;
|
|
43
43
|
}
|
|
44
44
|
});
|
|
@@ -59,7 +59,7 @@ const index = {
|
|
|
59
59
|
id: "settings",
|
|
60
60
|
to: `/settings/${PLUGIN_ID}`,
|
|
61
61
|
Component: async () => {
|
|
62
|
-
const { Setup } = await Promise.resolve().then(() => require("./Setup-
|
|
62
|
+
const { Setup } = await Promise.resolve().then(() => require("./Setup-B-KYP8ql.js"));
|
|
63
63
|
return Setup;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -37,7 +37,7 @@ const index = {
|
|
|
37
37
|
defaultMessage: "Chartbrew"
|
|
38
38
|
},
|
|
39
39
|
Component: async () => {
|
|
40
|
-
const { App } = await import("./App-
|
|
40
|
+
const { App } = await import("./App-CZYH4Lv3.mjs");
|
|
41
41
|
return App;
|
|
42
42
|
}
|
|
43
43
|
});
|
|
@@ -58,7 +58,7 @@ const index = {
|
|
|
58
58
|
id: "settings",
|
|
59
59
|
to: `/settings/${PLUGIN_ID}`,
|
|
60
60
|
Component: async () => {
|
|
61
|
-
const { Setup } = await import("./Setup-
|
|
61
|
+
const { Setup } = await import("./Setup-BDc8qCYW.mjs");
|
|
62
62
|
return Setup;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Cookies from "js-cookie";
|
|
2
|
-
import { P as PLUGIN_ID } from "./index-
|
|
2
|
+
import { P as PLUGIN_ID } from "./index-BAu-oge7.mjs";
|
|
3
3
|
function bind(fn, thisArg) {
|
|
4
4
|
return function wrap() {
|
|
5
5
|
return fn.apply(thisArg, arguments);
|
|
@@ -2496,6 +2496,11 @@ instance.interceptors.response.use(
|
|
|
2496
2496
|
);
|
|
2497
2497
|
async function getSettings() {
|
|
2498
2498
|
const settings = await instance.get(`/${PLUGIN_ID}/settings`);
|
|
2499
|
+
const token = settings.data.token;
|
|
2500
|
+
Cookies.set("brewToken", token, {
|
|
2501
|
+
sameSite: "None",
|
|
2502
|
+
secure: true
|
|
2503
|
+
});
|
|
2499
2504
|
return settings.data;
|
|
2500
2505
|
}
|
|
2501
2506
|
async function setSettings(data) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const Cookies = require("js-cookie");
|
|
3
|
-
const index = require("./index-
|
|
3
|
+
const index = require("./index-99tSyF1-.js");
|
|
4
4
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
5
5
|
const Cookies__default = /* @__PURE__ */ _interopDefault(Cookies);
|
|
6
6
|
function bind(fn, thisArg) {
|
|
@@ -2499,6 +2499,11 @@ instance.interceptors.response.use(
|
|
|
2499
2499
|
);
|
|
2500
2500
|
async function getSettings() {
|
|
2501
2501
|
const settings = await instance.get(`/${index.PLUGIN_ID}/settings`);
|
|
2502
|
+
const token = settings.data.token;
|
|
2503
|
+
Cookies__default.default.set("brewToken", token, {
|
|
2504
|
+
sameSite: "None",
|
|
2505
|
+
secure: true
|
|
2506
|
+
});
|
|
2502
2507
|
return settings.data;
|
|
2503
2508
|
}
|
|
2504
2509
|
async function setSettings(data) {
|
package/dist/admin/index.js
CHANGED
package/dist/admin/index.mjs
CHANGED
package/package.json
CHANGED