@stackable-labs/cli-app-extension 1.96.0 → 1.97.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.js +37 -30
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -105,7 +105,7 @@ var Banner = ({ userId, orgId, appName, appId } = {}) => {
|
|
|
105
105
|
/* @__PURE__ */ jsx(Text, { dimColor: true, children: "\u2500".repeat(termWidth) }),
|
|
106
106
|
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", paddingX: 1, paddingY: 1, children: [
|
|
107
107
|
WORDMARK.map((line, row) => /* @__PURE__ */ jsx(Box, { children: line.split("").map((ch, col) => /* @__PURE__ */ jsx(Text, { bold: true, color: ch === " " ? void 0 : gradientColor(row, col, WORDMARK.length, maxLen), children: ch }, col)) }, row)),
|
|
108
|
-
userId && orgId && /* @__PURE__ */ jsxs(Box, {
|
|
108
|
+
userId && orgId && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginTop: 1, children: [
|
|
109
109
|
/* @__PURE__ */ jsxs(Box, { gap: 1, children: [
|
|
110
110
|
/* @__PURE__ */ jsx(Text, { dimColor: true, children: "User:" }),
|
|
111
111
|
/* @__PURE__ */ jsx(Text, { color: "cyan", children: userId })
|
|
@@ -114,12 +114,12 @@ var Banner = ({ userId, orgId, appName, appId } = {}) => {
|
|
|
114
114
|
/* @__PURE__ */ jsx(Text, { dimColor: true, children: "Org:" }),
|
|
115
115
|
/* @__PURE__ */ jsx(Text, { color: "cyan", children: orgId })
|
|
116
116
|
] }),
|
|
117
|
-
|
|
117
|
+
appId && /* @__PURE__ */ jsxs(Box, { gap: 1, children: [
|
|
118
118
|
/* @__PURE__ */ jsx(Text, { dimColor: true, children: "App:" }),
|
|
119
|
-
/* @__PURE__ */ jsx(Text, { color: "cyan", children:
|
|
120
|
-
|
|
119
|
+
/* @__PURE__ */ jsx(Text, { color: "cyan", children: appId }),
|
|
120
|
+
appName && /* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
|
|
121
121
|
"(",
|
|
122
|
-
|
|
122
|
+
appName,
|
|
123
123
|
")"
|
|
124
124
|
] })
|
|
125
125
|
] })
|
|
@@ -618,21 +618,25 @@ var SettingsPrompt = ({ defaultDir, onSubmit, onBack }) => {
|
|
|
618
618
|
var asClerkUserId = (value) => value;
|
|
619
619
|
var asClerkOrgId = (value) => value;
|
|
620
620
|
|
|
621
|
-
// ../../lib/contracts/src/
|
|
622
|
-
var
|
|
623
|
-
|
|
621
|
+
// ../../lib/contracts/src/custom.ts
|
|
622
|
+
var CUSTOM_ROLE = {
|
|
623
|
+
SUPER_ADMIN: "super_admin"
|
|
624
624
|
};
|
|
625
|
+
new Set(Object.values(CUSTOM_ROLE));
|
|
626
|
+
|
|
627
|
+
// ../../lib/contracts/src/permissions.ts
|
|
625
628
|
var ORG_ROLE = {
|
|
626
629
|
ADMIN: "org:admin",
|
|
627
|
-
OWNER: "org:owner"
|
|
630
|
+
OWNER: "org:owner",
|
|
631
|
+
MEMBER: "org:member"
|
|
632
|
+
};
|
|
628
633
|
var EDITOR_ROLES = [
|
|
629
|
-
SUPER_ROLE.ADMIN,
|
|
630
634
|
ORG_ROLE.ADMIN,
|
|
631
635
|
ORG_ROLE.OWNER
|
|
632
636
|
];
|
|
633
637
|
[
|
|
634
|
-
...Object.values(
|
|
635
|
-
|
|
638
|
+
...Object.values(EDITOR_ROLES),
|
|
639
|
+
ORG_ROLE.MEMBER
|
|
636
640
|
];
|
|
637
641
|
|
|
638
642
|
// ../../lib/contracts/src/fields.ts
|
|
@@ -1454,23 +1458,6 @@ var AppSelect = ({ token, userId, orgId, onSubmit }) => {
|
|
|
1454
1458
|
if (apps.length === 0) {
|
|
1455
1459
|
return /* @__PURE__ */ jsx(Text, { color: "yellow", children: "No Apps available. Contact your administrator." });
|
|
1456
1460
|
}
|
|
1457
|
-
if (defaultApp) {
|
|
1458
|
-
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", gap: 1, children: [
|
|
1459
|
-
/* @__PURE__ */ jsxs(Box, { gap: 1, children: [
|
|
1460
|
-
/* @__PURE__ */ jsx(Text, { color: "green", children: "\u2713" }),
|
|
1461
|
-
/* @__PURE__ */ jsxs(Text, { children: [
|
|
1462
|
-
"Using ",
|
|
1463
|
-
/* @__PURE__ */ jsx(Text, { bold: true, color: "cyan", children: defaultApp.name })
|
|
1464
|
-
] }),
|
|
1465
|
-
/* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
|
|
1466
|
-
"(",
|
|
1467
|
-
defaultApp.id,
|
|
1468
|
-
")"
|
|
1469
|
-
] })
|
|
1470
|
-
] }),
|
|
1471
|
-
/* @__PURE__ */ jsx(Text, { dimColor: true, children: "Auto-selected \u2014 only one App available." })
|
|
1472
|
-
] });
|
|
1473
|
-
}
|
|
1474
1461
|
return /* @__PURE__ */ jsx(Box, { flexDirection: "column", children: apps.map((app, i) => {
|
|
1475
1462
|
const isCursor = i === cursor;
|
|
1476
1463
|
return /* @__PURE__ */ jsxs(Box, { gap: 1, children: [
|
|
@@ -1484,8 +1471,28 @@ var AppSelect = ({ token, userId, orgId, onSubmit }) => {
|
|
|
1484
1471
|
] }, app.id);
|
|
1485
1472
|
}) });
|
|
1486
1473
|
};
|
|
1474
|
+
if (defaultApp) {
|
|
1475
|
+
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
|
|
1476
|
+
/* @__PURE__ */ jsx(Banner, { userId, orgId, appName: defaultApp.name, appId: defaultApp.id }),
|
|
1477
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", paddingX: 2, paddingY: 1, gap: 1, children: [
|
|
1478
|
+
/* @__PURE__ */ jsxs(Box, { gap: 1, children: [
|
|
1479
|
+
/* @__PURE__ */ jsx(Text, { color: "green", children: "\u2713" }),
|
|
1480
|
+
/* @__PURE__ */ jsxs(Text, { children: [
|
|
1481
|
+
"Using ",
|
|
1482
|
+
/* @__PURE__ */ jsx(Text, { bold: true, color: "cyan", children: defaultApp.name })
|
|
1483
|
+
] }),
|
|
1484
|
+
/* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
|
|
1485
|
+
"(",
|
|
1486
|
+
defaultApp.id,
|
|
1487
|
+
")"
|
|
1488
|
+
] })
|
|
1489
|
+
] }),
|
|
1490
|
+
/* @__PURE__ */ jsx(Text, { dimColor: true, children: "Auto-selected \u2014 only one App available." })
|
|
1491
|
+
] })
|
|
1492
|
+
] });
|
|
1493
|
+
}
|
|
1487
1494
|
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
|
|
1488
|
-
/* @__PURE__ */ jsx(Banner, { userId, orgId
|
|
1495
|
+
/* @__PURE__ */ jsx(Banner, { userId, orgId }),
|
|
1489
1496
|
/* @__PURE__ */ jsx(StepShell, { title: "Select the App you are building an Extension for:", children: renderContent() })
|
|
1490
1497
|
] });
|
|
1491
1498
|
};
|