rahman-resources 1.13.0 → 1.13.1
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/lib/alias-resolution.test.mjs +48 -0
- package/lib/manifest.json +6 -6
- package/package.json +1 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Alias fall-through e2e — `rr info <old-slug>` must resolve through
|
|
2
|
+
// manifest.aliases with a "superseded by" warning (UX wave U3 contract).
|
|
3
|
+
// Spawns the real CLI against the real bundled manifest, fully offline.
|
|
4
|
+
import { describe, expect, it } from "vitest";
|
|
5
|
+
import { spawnSync } from "node:child_process";
|
|
6
|
+
import { readFileSync } from "node:fs";
|
|
7
|
+
import path from "node:path";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
|
|
10
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
11
|
+
const CLI = path.resolve(__dirname, "../bin/cli.js");
|
|
12
|
+
const manifest = JSON.parse(
|
|
13
|
+
readFileSync(path.resolve(__dirname, "manifest.json"), "utf8"),
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
const run = (...args) =>
|
|
17
|
+
spawnSync("node", [CLI, ...args], { encoding: "utf8" });
|
|
18
|
+
|
|
19
|
+
describe("manifest aliases", () => {
|
|
20
|
+
it("manifest carries the U3 alias map", () => {
|
|
21
|
+
expect(manifest.aliases).toBeTruthy();
|
|
22
|
+
expect(manifest.aliases["blog-section"]).toBe("landing-sections");
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it("aliased slugs are NOT listed as their own entries", () => {
|
|
26
|
+
const slugs = new Set(
|
|
27
|
+
[...(manifest.slices ?? []), ...(manifest.features ?? [])].map(
|
|
28
|
+
(s) => s.slug,
|
|
29
|
+
),
|
|
30
|
+
);
|
|
31
|
+
for (const old of Object.keys(manifest.aliases)) {
|
|
32
|
+
expect(slugs.has(old)).toBe(false);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it("info <old-slug> falls through with a superseded warning", () => {
|
|
37
|
+
const r = run("info", "blog-section");
|
|
38
|
+
expect(r.status).toBe(0);
|
|
39
|
+
const all = r.stdout + r.stderr;
|
|
40
|
+
expect(all).toContain("superseded by");
|
|
41
|
+
expect(all).toContain("landing-sections");
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it("info <unknown> still fails", () => {
|
|
45
|
+
const r = run("info", "definitely-not-a-slice");
|
|
46
|
+
expect(r.status).not.toBe(0);
|
|
47
|
+
});
|
|
48
|
+
});
|
package/lib/manifest.json
CHANGED
|
@@ -1987,7 +1987,7 @@
|
|
|
1987
1987
|
"install": "npx rahman-resources add user-management",
|
|
1988
1988
|
"npmPackages": [],
|
|
1989
1989
|
"exampleCode": "",
|
|
1990
|
-
"agentRecipe": "Run `npx rr add user-management` (pulls rbac-roles + convex-auth). Frontend: <MembersPanel members={useQuery(api[\"features/
|
|
1990
|
+
"agentRecipe": "Run `npx rr add user-management` (pulls rbac-roles + convex-auth). Frontend: <MembersPanel members={useQuery(api[\"features/user_management/query\"].listMembers,{tenantId})} roles={ROLE_PRESETS.map(r=>({slug:r.slug,name:r.name,color:r.color}))} currentPerms={actorPerms} onUpdateRole={useMutation(...updateMemberRole)} onRemove={useMutation(...removeMember)} onInvite={openInvite} />. Wire roles + currentPerms from rbac-roles at the app level — the slice itself imports no other slice. Convex: spread userManagementTables; listMembers/mutations gate via rbac-roles requirePermission.",
|
|
1991
1991
|
"tags": [
|
|
1992
1992
|
"user-management",
|
|
1993
1993
|
"members",
|
|
@@ -3915,7 +3915,7 @@
|
|
|
3915
3915
|
"source": "superspace",
|
|
3916
3916
|
"slicePath": "frontend/slices/rbac-roles",
|
|
3917
3917
|
"convexPaths": [
|
|
3918
|
-
"convex/features/
|
|
3918
|
+
"convex/features/rbac_roles"
|
|
3919
3919
|
],
|
|
3920
3920
|
"npm": [],
|
|
3921
3921
|
"shadcn": [
|
|
@@ -3959,7 +3959,7 @@
|
|
|
3959
3959
|
"source": "superspace",
|
|
3960
3960
|
"slicePath": "frontend/slices/user-management",
|
|
3961
3961
|
"convexPaths": [
|
|
3962
|
-
"convex/features/
|
|
3962
|
+
"convex/features/user_management"
|
|
3963
3963
|
],
|
|
3964
3964
|
"npm": [],
|
|
3965
3965
|
"shadcn": [
|
|
@@ -4001,7 +4001,7 @@
|
|
|
4001
4001
|
"convex",
|
|
4002
4002
|
"no-clerk"
|
|
4003
4003
|
],
|
|
4004
|
-
"agentRecipe": "Run `npx rr add user-management` (pulls rbac-roles + convex-auth). Frontend: <MembersPanel members={useQuery(api[\"features/
|
|
4004
|
+
"agentRecipe": "Run `npx rr add user-management` (pulls rbac-roles + convex-auth). Frontend: <MembersPanel members={useQuery(api[\"features/user_management/query\"].listMembers,{tenantId})} roles={ROLE_PRESETS.map(r=>({slug:r.slug,name:r.name,color:r.color}))} currentPerms={actorPerms} onUpdateRole={useMutation(...updateMemberRole)} onRemove={useMutation(...removeMember)} onInvite={openInvite} />. Wire roles + currentPerms from rbac-roles at the app level — the slice itself imports no other slice. Convex: spread userManagementTables; listMembers/mutations gate via rbac-roles requirePermission."
|
|
4005
4005
|
},
|
|
4006
4006
|
{
|
|
4007
4007
|
"slug": "admin-panel",
|
|
@@ -4160,7 +4160,7 @@
|
|
|
4160
4160
|
"source": "rahmanef.com",
|
|
4161
4161
|
"slicePath": "frontend/slices/rate-limit",
|
|
4162
4162
|
"convexPaths": [
|
|
4163
|
-
"convex/features/
|
|
4163
|
+
"convex/features/rate_limit"
|
|
4164
4164
|
],
|
|
4165
4165
|
"npm": [],
|
|
4166
4166
|
"shadcn": [],
|
|
@@ -4263,7 +4263,7 @@
|
|
|
4263
4263
|
"source": "rahmanef.com",
|
|
4264
4264
|
"slicePath": "frontend/slices/create-your-mcp",
|
|
4265
4265
|
"convexPaths": [
|
|
4266
|
-
"convex/features/
|
|
4266
|
+
"convex/features/create_your_mcp"
|
|
4267
4267
|
],
|
|
4268
4268
|
"npm": [],
|
|
4269
4269
|
"shadcn": [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rahman-resources",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.1",
|
|
4
4
|
"description": "Rahman Resources (rr) — shadcn-style installer for vertical slices. `npx resources add <slug>` copies slice into your project's `slices/<slug>/`. You own the files.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|