create-bluecopa-react-app 1.0.12 → 1.0.13
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/package.json +1 -1
- package/templates/latest/Agent.md +545 -501
- package/templates/latest/app/routes/websocket.tsx +5 -4
- package/templates/latest/app/routes.tsx +5 -8
- package/templates/latest/dist/assets/{__federation_expose_App-B2IoFaIA.js → __federation_expose_App-BIH7hwj_.js} +3 -4
- package/templates/latest/dist/assets/{home-BBY02MnI.js → client-CsvW46cT.js} +18448 -929
- package/templates/latest/dist/assets/{index-CNNS7Foy.js → index-CFECuPSy.js} +3 -4
- package/templates/latest/dist/assets/remoteEntry.css +151 -19
- package/templates/latest/dist/assets/remoteEntry.js +1 -1
- package/templates/latest/dist/favicon.ico +0 -0
- package/templates/latest/dist/index.html +2 -3
- package/templates/latest/package-lock.json +203 -203
- package/templates/latest/package.json +1 -1
- package/templates/latest/dist/assets/client-LFBsfOjG.js +0 -2775
- package/templates/latest/dist/assets/index-D5og7-RT-BA7DwZw1.js +0 -9917
- package/templates/latest/dist/avatars/shadcn.svg +0 -6
- /package/templates/latest/app/routes/{home.tsx → dashboard.tsx} +0 -0
|
@@ -8,7 +8,7 @@ import { Label } from "~/components/ui/label";
|
|
|
8
8
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "~/components/ui/card";
|
|
9
9
|
import { Separator } from "~/components/ui/separator";
|
|
10
10
|
import { Badge } from "~/components/ui/badge";
|
|
11
|
-
import { copaUtils,
|
|
11
|
+
import { copaUtils, copaGetConfig } from "@bluecopa/react";
|
|
12
12
|
|
|
13
13
|
interface WebSocketEvent {
|
|
14
14
|
id: string;
|
|
@@ -40,7 +40,6 @@ export default function WebsocketTestPage() {
|
|
|
40
40
|
try {
|
|
41
41
|
// Get current config to use access token and userId
|
|
42
42
|
const config = copaGetConfig();
|
|
43
|
-
console.log("config", config);
|
|
44
43
|
|
|
45
44
|
if (!config.accessToken || !config.userId) {
|
|
46
45
|
addEvent("system", "error", {
|
|
@@ -53,7 +52,9 @@ export default function WebsocketTestPage() {
|
|
|
53
52
|
wsProviderRef.current = copaUtils.websocketUtils.WebsocketContextFactory.create(
|
|
54
53
|
"centrifugo",
|
|
55
54
|
{
|
|
56
|
-
connectionUrl: connectionUrl
|
|
55
|
+
connectionUrl: connectionUrl,
|
|
56
|
+
token: config.accessToken,
|
|
57
|
+
userId: config.userId
|
|
57
58
|
}
|
|
58
59
|
);
|
|
59
60
|
|
|
@@ -406,7 +407,7 @@ export default function WebsocketTestPage() {
|
|
|
406
407
|
<div className="space-y-2">
|
|
407
408
|
<h4 className="font-semibold">Before Using:</h4>
|
|
408
409
|
<pre className="text-xs bg-muted p-3 rounded overflow-x-auto">
|
|
409
|
-
{`import { copaSetConfig } from "@bluecopa/
|
|
410
|
+
{`import { copaSetConfig } from "@bluecopa/react";
|
|
410
411
|
|
|
411
412
|
// Set configuration before connecting
|
|
412
413
|
copaSetConfig({
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import { Routes, Route, Navigate } from "react-router-dom";
|
|
2
|
-
import { lazy } from "react";
|
|
3
2
|
import "./app.css";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const Payments = lazy(() => import('~/routes/payments'))
|
|
9
|
-
|
|
3
|
+
import Dashboard from "./routes/dashboard";
|
|
4
|
+
import Comments from "./routes/comments";
|
|
5
|
+
import Websocket from "./routes/websocket";
|
|
6
|
+
import Payments from "./routes/payments";
|
|
10
7
|
|
|
11
8
|
export default function RouteConfig() {
|
|
12
9
|
return (
|
|
13
10
|
<Routes>
|
|
14
|
-
<Route path="/" element={<
|
|
11
|
+
<Route path="/" element={<Dashboard />} />
|
|
15
12
|
<Route path="/comments" element={<Comments />} />
|
|
16
13
|
<Route path="/websocket" element={<Websocket />} />
|
|
17
14
|
<Route path="/payments" element={<Payments />} />
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
System.register(['./__federation_fn_import-CzfA7kmP.js', './
|
|
1
|
+
System.register(['./__federation_fn_import-CzfA7kmP.js', './client-CsvW46cT.js'], (function (exports, module) {
|
|
2
2
|
'use strict';
|
|
3
|
-
var importShared,
|
|
3
|
+
var importShared, clientExports, jsxRuntimeExports, MemoryRouter, BrowserRouter, App;
|
|
4
4
|
return {
|
|
5
5
|
setters: [module => {
|
|
6
6
|
importShared = module.importShared;
|
|
7
|
-
}, module => {
|
|
8
|
-
jsxRuntimeExports = module.j;
|
|
9
7
|
}, module => {
|
|
10
8
|
clientExports = module.c;
|
|
9
|
+
jsxRuntimeExports = module.j;
|
|
11
10
|
MemoryRouter = module.M;
|
|
12
11
|
BrowserRouter = module.B;
|
|
13
12
|
App = module.A;
|