@krizaka/org 0.4.0 → 0.6.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/README.md +4 -0
- package/dist/index.d.ts +72 -3
- package/dist/index.js +537 -70
- package/dist/index.js.map +1 -1
- package/dist/org.json +110 -9
- package/dist/org.schema.json +63 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -19,6 +19,10 @@ Without a build step, read it from the CDN: [krizaka-assets.b-cdn.net/org/v1/org
|
|
|
19
19
|
(`defaults/v1/<kind>/<id>-<size>.<ext>`, written by krizaka-ui `tools/export-defaults.mjs`). An app never hard-codes or bundles one:
|
|
20
20
|
`listDefaults(kind)` lists them, `defaultFor(kind, seed)` picks one deterministically (FNV-1a of the seed, modulo the list), `defaultUrl(item, size)` gives the URL,
|
|
21
21
|
`fetchDefaults(ORG_URL)` reads the section from the published JSON. A folder is never given a person.
|
|
22
|
+
- **One name per entry of the family.** `org.family` (and `familyName(id)`) is the only place a name is written: the company
|
|
23
|
+
is « Krizaka », a product goes by its own name (Orazaka, Yomizaka, Akinaza — never « Krizaka Yomizaka »), a library or a tool
|
|
24
|
+
is « Krizaka <X> » (Krizaka UI, Krizaka Java, Krizaka TypeScript, Krizaka Lab, Krizaka Skills; the short name only under a
|
|
25
|
+
heading « Open source »). The bar, the switcher and every footer read it; a test holds the rule.
|
|
22
26
|
- **Public facts only.** Never an address, a phone number, figures, a secret, an IP address or an internal host: the test
|
|
23
27
|
scans for them and the schema refuses any field it does not list.
|
|
24
28
|
- **Validated.** `orgSchema` (JSON Schema 2020-12) and the types `Org`, `AppConfig`…; a test validates the data and requests every
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,28 @@ interface OrgSite {
|
|
|
18
18
|
name: string;
|
|
19
19
|
url: string;
|
|
20
20
|
}
|
|
21
|
+
/** Where an entry of the family sits: the company's own pages, the products, the open-source libraries and tools, GitHub. */
|
|
22
|
+
type FamilyGroup = "krizaka" | "products" | "open-source" | "github";
|
|
23
|
+
/** `released`: open to use. `development`: built in the open, said « In development ». */
|
|
24
|
+
type FamilyStatus = "released" | "development";
|
|
25
|
+
/**
|
|
26
|
+
* One name of the family, the only place it is written. The naming rule (founder, 2026-10-30): the company is
|
|
27
|
+
* « Krizaka »; a product goes by its own name (« Yomizaka », never « Krizaka Yomizaka »); a library or a tool is always
|
|
28
|
+
* « Krizaka <X> » (« Krizaka UI », never « UI » alone outside a group headed « Open source »).
|
|
29
|
+
*/
|
|
30
|
+
interface FamilyEntry {
|
|
31
|
+
id: string;
|
|
32
|
+
/** The display name, never translated (« Krizaka TypeScript »). */
|
|
33
|
+
name: string;
|
|
34
|
+
/** The short name, only inside its group's heading (« TypeScript » under « Open source »). */
|
|
35
|
+
short: string;
|
|
36
|
+
group: FamilyGroup;
|
|
37
|
+
status: FamilyStatus;
|
|
38
|
+
/** Its home: the site, or the repository while it has no site. */
|
|
39
|
+
url: string;
|
|
40
|
+
/** Its public source repository (`null` for GitHub itself). */
|
|
41
|
+
repo: string | null;
|
|
42
|
+
}
|
|
21
43
|
interface OrgAvatar {
|
|
22
44
|
id: string;
|
|
23
45
|
/** `person` is a silhouette, `plain` a plain disc. */
|
|
@@ -112,6 +134,8 @@ interface Org {
|
|
|
112
134
|
/** Only the products that are live. */
|
|
113
135
|
products: OrgProduct[];
|
|
114
136
|
sites: OrgSite[];
|
|
137
|
+
/** Every name of the family, in reading order (group, then order inside it): the bar, the switcher and every footer read it. */
|
|
138
|
+
family: FamilyEntry[];
|
|
115
139
|
contact: {
|
|
116
140
|
page: Localized;
|
|
117
141
|
/** The public support address; `null` while none is public. */
|
|
@@ -207,7 +231,6 @@ declare function fetchDefaults(url: string, fetchImpl?: typeof fetch): Promise<O
|
|
|
207
231
|
declare const CDN = "https://krizaka-assets.b-cdn.net";
|
|
208
232
|
declare const ORG_URL = "https://krizaka-assets.b-cdn.net/org/v1/org.json";
|
|
209
233
|
declare const ORG_SCHEMA_URL = "https://krizaka-assets.b-cdn.net/org/v1/org.schema.json";
|
|
210
|
-
/** The public facts about Krizaka. Reviewed by pull request; changing a fact is one PR here and a release. */
|
|
211
234
|
declare const org: Org;
|
|
212
235
|
|
|
213
236
|
/** The JSON Schema of `org/v1/org.json`. Nothing outside it is allowed (`additionalProperties: false` everywhere): a new fact is a new line here first. */
|
|
@@ -217,7 +240,7 @@ declare const orgSchema: {
|
|
|
217
240
|
readonly title: "Krizaka organisation — public facts";
|
|
218
241
|
readonly type: "object";
|
|
219
242
|
readonly additionalProperties: false;
|
|
220
|
-
readonly required: readonly ["$schema", "schemaVersion", "version", "updatedAt", "company", "brand", "people", "defaults", "products", "sites", "contact", "footer"];
|
|
243
|
+
readonly required: readonly ["$schema", "schemaVersion", "version", "updatedAt", "company", "brand", "people", "defaults", "products", "sites", "family", "contact", "footer"];
|
|
221
244
|
readonly properties: {
|
|
222
245
|
readonly $schema: {
|
|
223
246
|
readonly type: "string";
|
|
@@ -695,6 +718,49 @@ declare const orgSchema: {
|
|
|
695
718
|
};
|
|
696
719
|
};
|
|
697
720
|
};
|
|
721
|
+
readonly family: {
|
|
722
|
+
readonly type: "array";
|
|
723
|
+
readonly minItems: 1;
|
|
724
|
+
readonly items: {
|
|
725
|
+
readonly type: "object";
|
|
726
|
+
readonly additionalProperties: false;
|
|
727
|
+
readonly required: readonly ["id", "name", "short", "group", "status", "url", "repo"];
|
|
728
|
+
readonly properties: {
|
|
729
|
+
readonly id: {
|
|
730
|
+
readonly type: "string";
|
|
731
|
+
readonly pattern: "^[a-z0-9]+(-[a-z0-9]+)*$";
|
|
732
|
+
};
|
|
733
|
+
readonly name: {
|
|
734
|
+
readonly type: "string";
|
|
735
|
+
readonly minLength: 1;
|
|
736
|
+
};
|
|
737
|
+
readonly short: {
|
|
738
|
+
readonly type: "string";
|
|
739
|
+
readonly minLength: 1;
|
|
740
|
+
};
|
|
741
|
+
readonly group: {
|
|
742
|
+
readonly enum: readonly ["krizaka", "products", "open-source", "github"];
|
|
743
|
+
};
|
|
744
|
+
readonly status: {
|
|
745
|
+
readonly enum: readonly ["released", "development"];
|
|
746
|
+
};
|
|
747
|
+
readonly url: {
|
|
748
|
+
readonly type: "string";
|
|
749
|
+
readonly format: "uri";
|
|
750
|
+
readonly pattern: "^https://";
|
|
751
|
+
};
|
|
752
|
+
readonly repo: {
|
|
753
|
+
readonly anyOf: readonly [{
|
|
754
|
+
readonly type: "string";
|
|
755
|
+
readonly format: "uri";
|
|
756
|
+
readonly pattern: "^https://";
|
|
757
|
+
}, {
|
|
758
|
+
readonly type: "null";
|
|
759
|
+
}];
|
|
760
|
+
};
|
|
761
|
+
};
|
|
762
|
+
};
|
|
763
|
+
};
|
|
698
764
|
readonly contact: {
|
|
699
765
|
readonly type: "object";
|
|
700
766
|
readonly additionalProperties: false;
|
|
@@ -858,5 +924,8 @@ declare const appSchema: {
|
|
|
858
924
|
declare const localized: (text: Localized, locale: string) => string;
|
|
859
925
|
/** The footer line of the family, « Une entreprise de Technologies Krizaka · Fait à Montréal ». */
|
|
860
926
|
declare const footerLine: (locale: string) => string;
|
|
927
|
+
/** A name of the family by id (`familyName("ts")` → « Krizaka TypeScript »): the only way a site writes one. */
|
|
928
|
+
declare const familyEntry: (id: string) => FamilyEntry;
|
|
929
|
+
declare const familyName: (id: string) => string;
|
|
861
930
|
|
|
862
|
-
export { APP_SCHEMA_URL, type AppConfig, type AppEnvironment, CAST, CAST_VERSION, CDN, type CastPersona, type CastProduct, type CastRole, DEFAULT_KINDS, type Localized, ORG_SCHEMA_URL, ORG_URL, type Org, type OrgAvatar, type OrgBanner, type OrgDefaultItem, type OrgDefaultKind, type OrgDefaults, type OrgMark, type OrgProduct, type OrgSite, type ProductStatus, appSchema, apps, castMedia, castOf, defaultFor, defaultUrl, defaults, fetchDefaults, footerLine, listDefaults, localized, org, orgSchema, persona, personaByRole, seedFingerprint, seedHash };
|
|
931
|
+
export { APP_SCHEMA_URL, type AppConfig, type AppEnvironment, CAST, CAST_VERSION, CDN, type CastPersona, type CastProduct, type CastRole, DEFAULT_KINDS, type FamilyEntry, type FamilyGroup, type FamilyStatus, type Localized, ORG_SCHEMA_URL, ORG_URL, type Org, type OrgAvatar, type OrgBanner, type OrgDefaultItem, type OrgDefaultKind, type OrgDefaults, type OrgMark, type OrgProduct, type OrgSite, type ProductStatus, appSchema, apps, castMedia, castOf, defaultFor, defaultUrl, defaults, familyEntry, familyName, fetchDefaults, footerLine, listDefaults, localized, org, orgSchema, persona, personaByRole, seedFingerprint, seedHash };
|