feat(01-foundation-01): scaffold branding package with VOCAB constant and tests
- Create packages/branding/ workspace package (@paperclipai/branding) - Add VOCAB constant with 8 Nexus display strings (company, companies, ceo, board, hire, fire, appName, tagline) - Export VocabKey type for type-safe string lookups - Add vitest config and 9 passing unit tests covering all VOCAB values - Update pnpm-lock.yaml to link new workspace package
This commit is contained in:
parent
3a76d5f972
commit
3e7848ede3
7 changed files with 106 additions and 0 deletions
34
packages/branding/package.json
Normal file
34
packages/branding/package.json
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
"name": "@paperclipai/branding",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"license": "MIT",
|
||||||
|
"type": "module",
|
||||||
|
"exports": {
|
||||||
|
".": "./src/index.ts",
|
||||||
|
"./*": "./src/*.ts"
|
||||||
|
},
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public",
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"import": "./dist/index.js"
|
||||||
|
},
|
||||||
|
"./*": {
|
||||||
|
"types": "./dist/*.d.ts",
|
||||||
|
"import": "./dist/*.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"main": "./dist/index.js",
|
||||||
|
"types": "./dist/index.d.ts"
|
||||||
|
},
|
||||||
|
"files": ["dist"],
|
||||||
|
"scripts": {
|
||||||
|
"build": "tsc",
|
||||||
|
"clean": "rm -rf dist",
|
||||||
|
"typecheck": "tsc --noEmit"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"typescript": "^5.7.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
1
packages/branding/src/index.ts
Normal file
1
packages/branding/src/index.ts
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
export { VOCAB, type VocabKey } from "./vocab.js";
|
||||||
35
packages/branding/src/vocab.test.ts
Normal file
35
packages/branding/src/vocab.test.ts
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
import { describe, it, expect } from "vitest";
|
||||||
|
import { VOCAB } from "./vocab.js";
|
||||||
|
|
||||||
|
describe("VOCAB", () => {
|
||||||
|
it("maps company to Workspace", () => {
|
||||||
|
expect(VOCAB.company).toBe("Workspace");
|
||||||
|
});
|
||||||
|
it("maps companies to Workspaces", () => {
|
||||||
|
expect(VOCAB.companies).toBe("Workspaces");
|
||||||
|
});
|
||||||
|
it("maps ceo to Project Manager", () => {
|
||||||
|
expect(VOCAB.ceo).toBe("Project Manager");
|
||||||
|
});
|
||||||
|
it("maps board to Owner", () => {
|
||||||
|
expect(VOCAB.board).toBe("Owner");
|
||||||
|
});
|
||||||
|
it("maps hire to Add", () => {
|
||||||
|
expect(VOCAB.hire).toBe("Add");
|
||||||
|
});
|
||||||
|
it("maps fire to Remove", () => {
|
||||||
|
expect(VOCAB.fire).toBe("Remove");
|
||||||
|
});
|
||||||
|
it("has appName as Nexus", () => {
|
||||||
|
expect(VOCAB.appName).toBe("Nexus");
|
||||||
|
});
|
||||||
|
it("has a non-empty tagline", () => {
|
||||||
|
expect(VOCAB.tagline).toBe("Open-source orchestration for your agents");
|
||||||
|
});
|
||||||
|
it("all values are non-empty strings", () => {
|
||||||
|
for (const [key, value] of Object.entries(VOCAB)) {
|
||||||
|
expect(typeof value, `key "${key}" should be a string`).toBe("string");
|
||||||
|
expect(value.length, `key "${key}" should be non-empty`).toBeGreaterThan(0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
15
packages/branding/src/vocab.ts
Normal file
15
packages/branding/src/vocab.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
export const VOCAB = {
|
||||||
|
// Entity renames (display only — code identifiers unchanged)
|
||||||
|
company: "Workspace",
|
||||||
|
companies: "Workspaces",
|
||||||
|
ceo: "Project Manager",
|
||||||
|
board: "Owner",
|
||||||
|
hire: "Add",
|
||||||
|
fire: "Remove",
|
||||||
|
|
||||||
|
// Brand name
|
||||||
|
appName: "Nexus",
|
||||||
|
tagline: "Open-source orchestration for your agents",
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
export type VocabKey = keyof typeof VOCAB;
|
||||||
8
packages/branding/tsconfig.json
Normal file
8
packages/branding/tsconfig.json
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tsconfig.base.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "dist",
|
||||||
|
"rootDir": "src"
|
||||||
|
},
|
||||||
|
"include": ["src"]
|
||||||
|
}
|
||||||
7
packages/branding/vitest.config.ts
Normal file
7
packages/branding/vitest.config.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
import { defineConfig } from "vitest/config";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
test: {
|
||||||
|
include: ["src/**/*.test.ts"],
|
||||||
|
},
|
||||||
|
});
|
||||||
6
pnpm-lock.yaml
generated
6
pnpm-lock.yaml
generated
|
|
@ -220,6 +220,12 @@ importers:
|
||||||
specifier: ^5.7.3
|
specifier: ^5.7.3
|
||||||
version: 5.9.3
|
version: 5.9.3
|
||||||
|
|
||||||
|
packages/branding:
|
||||||
|
devDependencies:
|
||||||
|
typescript:
|
||||||
|
specifier: ^5.7.3
|
||||||
|
version: 5.9.3
|
||||||
|
|
||||||
packages/db:
|
packages/db:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@paperclipai/shared':
|
'@paperclipai/shared':
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue