@se-studio/project-build 1.3.4 → 1.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @se-studio/project-build
2
2
 
3
+ ## 1.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 79757c2: Add the `add-cms-type` bin: append component, collection or external component type names to the `componentType` / `collectionType` / `externalComponentType` enum in Contentful. Append-only, idempotent, with `--dry-run`. Documented in the `contentful-cms-content-model` skill.
8
+
3
9
  ## 1.3.4
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -141,6 +141,17 @@ Sets up color field validation in Contentful.
141
141
  setup-colours
142
142
  ```
143
143
 
144
+ #### `add-cms-type`
145
+ Adds a component, collection or external component type to Contentful. These are enum values (`componentType`, `collectionType`, `externalComponentType`), not content types, so this appends to the enum and publishes the content type. Append-only and idempotent.
146
+
147
+ **Usage:**
148
+ ```bash
149
+ add-cms-type component "Logo Wall" "Pricing Table"
150
+ add-cms-type collection "Logo Grid" --dry-run
151
+ add-cms-type externalComponent "Calendly"
152
+ ```
153
+ Needs `CONTENTFUL_SPACE_ID`, `CONTENTFUL_ENVIRONMENT_NAME` and `CONTENTFUL_MANAGEMENT_TOKEN` (read from `.env.local`). Afterwards register the type in `src/lib/registrations.ts` and run `pnpm codegen`.
154
+
144
155
  #### `seskills sync [target-dir]`
145
156
  Deprecated. Depend on `@se-studio/skills` and link it with `skills-npm` (see above). See `packages/skills/` for the canonical skill sources.
146
157
 
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=addCmsType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addCmsType.d.ts","sourceRoot":"","sources":["../../src/management/addCmsType.ts"],"names":[],"mappings":""}
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env node
2
+ /** biome-ignore-all lint/suspicious/noConsole: Console is ok */
3
+ import * as path from 'node:path';
4
+ import { parseArgs } from 'node:util';
5
+ import dotenv from 'dotenv';
6
+ import { addCmsTypes, CMS_TYPE_TARGETS } from './cmsTypes.js';
7
+ import { getManagementClient } from './shared.js';
8
+ dotenv.config({ path: path.join(process.cwd(), '.env.local') });
9
+ const USAGE = `Usage: add-cms-type <component|collection|externalComponent> <name> [name...] [--dry-run]
10
+
11
+ Appends type names to the componentType, collectionType or externalComponentType
12
+ enum in Contentful. Append-only and idempotent: existing names are kept and
13
+ re-running is a no-op. Needs CONTENTFUL_SPACE_ID, CONTENTFUL_ENVIRONMENT_NAME
14
+ and CONTENTFUL_MANAGEMENT_TOKEN.
15
+
16
+ Afterwards: register the type in src/lib/registrations.ts, run pnpm codegen, and
17
+ re-export the golden schema if you changed a core space.`;
18
+ function isKind(value) {
19
+ return value !== undefined && Object.hasOwn(CMS_TYPE_TARGETS, value);
20
+ }
21
+ async function run() {
22
+ const { values, positionals } = parseArgs({
23
+ allowPositionals: true,
24
+ options: { 'dry-run': { type: 'boolean' }, help: { type: 'boolean', short: 'h' } },
25
+ });
26
+ const [kind, ...names] = positionals;
27
+ if (values.help || !isKind(kind) || names.length === 0) {
28
+ console.log(USAGE);
29
+ process.exitCode = values.help ? 0 : 1;
30
+ return;
31
+ }
32
+ console.log(`Target: space ${process.env.CONTENTFUL_SPACE_ID} / environment ${process.env.CONTENTFUL_ENVIRONMENT_NAME}`);
33
+ const result = await addCmsTypes(getManagementClient(), kind, names, {
34
+ dryRun: values['dry-run'],
35
+ });
36
+ const target = `${result.contentTypeId}.${result.fieldId}`;
37
+ if (result.alreadyPresent.length > 0) {
38
+ console.log(`Already in ${target}: ${result.alreadyPresent.join(', ')}`);
39
+ }
40
+ if (result.added.length === 0) {
41
+ console.log('Nothing to add.');
42
+ }
43
+ else if (result.written) {
44
+ console.log(`Added to ${target}: ${result.added.join(', ')}`);
45
+ }
46
+ else {
47
+ console.log(`Dry run. Would add to ${target}: ${result.added.join(', ')}`);
48
+ }
49
+ }
50
+ run().catch((error) => {
51
+ console.error(error instanceof Error ? error.message : error);
52
+ process.exitCode = 1;
53
+ });
54
+ //# sourceMappingURL=addCmsType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addCmsType.js","sourceRoot":"","sources":["../../src/management/addCmsType.ts"],"names":[],"mappings":";AACA,gEAAgE;AAChE,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAoB,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,YAAY,CAAC,EAAE,CAAC,CAAC;AAEhE,MAAM,KAAK,GAAG;;;;;;;;yDAQ2C,CAAC;AAE1D,SAAS,MAAM,CAAC,KAAyB;IACvC,OAAO,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;AACvE,CAAC;AAED,KAAK,UAAU,GAAG;IAChB,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC;QACxC,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;KACnF,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,GAAG,WAAW,CAAC;IACrC,IAAI,MAAM,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvD,O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C7B,OAAO,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC9D,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,35 @@
1
+ import type { PlainClientAPI } from 'contentful-management';
2
+ /** The three kinds of CMS-driven type. Each is an enum on one content type, not a content type of its own. */
3
+ export type CmsTypeKind = 'component' | 'collection' | 'externalComponent';
4
+ export declare const CMS_TYPE_TARGETS: Record<CmsTypeKind, {
5
+ contentTypeId: string;
6
+ fieldId: string;
7
+ }>;
8
+ export interface AddTypesPlan {
9
+ /** The full list to write. Existing values are never removed. */
10
+ next: string[];
11
+ added: string[];
12
+ alreadyPresent: string[];
13
+ }
14
+ /**
15
+ * Append-only and idempotent. A name that matches an existing value ignoring
16
+ * case counts as already present (the enum can never shrink, so a case typo
17
+ * would be permanent). Existing values keep their order: new names are placed
18
+ * alphabetically when the list is already alphabetical, otherwise appended.
19
+ */
20
+ export declare function planAddTypes(current: readonly string[], requested: readonly string[]): AddTypesPlan;
21
+ export interface AddTypesResult extends AddTypesPlan {
22
+ kind: CmsTypeKind;
23
+ contentTypeId: string;
24
+ fieldId: string;
25
+ written: boolean;
26
+ }
27
+ /**
28
+ * Adds type names to the enum for `kind` on the target content type, then publishes it.
29
+ * With `dryRun` nothing is written. Does nothing when every name is already present.
30
+ * Refuses when the content type has unpublished changes, because publishing would ship them too.
31
+ */
32
+ export declare function addCmsTypes(client: PlainClientAPI, kind: CmsTypeKind, names: readonly string[], options?: {
33
+ dryRun?: boolean;
34
+ }): Promise<AddTypesResult>;
35
+ //# sourceMappingURL=cmsTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cmsTypes.d.ts","sourceRoot":"","sources":["../../src/management/cmsTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,8GAA8G;AAC9G,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,YAAY,GAAG,mBAAmB,CAAC;AAE3E,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,WAAW,EAAE;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAI5F,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,iEAAiE;IACjE,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAcD;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,SAAS,EAAE,SAAS,MAAM,EAAE,GAC3B,YAAY,CAuBd;AAED,MAAM,WAAW,cAAe,SAAQ,YAAY;IAClD,IAAI,EAAE,WAAW,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;CAClB;AA0BD;;;;GAIG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACjC,OAAO,CAAC,cAAc,CAAC,CAuBzB"}
@@ -0,0 +1,93 @@
1
+ export const CMS_TYPE_TARGETS = {
2
+ component: { contentTypeId: 'component', fieldId: 'componentType' },
3
+ collection: { contentTypeId: 'collection', fieldId: 'collectionType' },
4
+ externalComponent: { contentTypeId: 'externalComponent', fieldId: 'externalComponentType' },
5
+ };
6
+ function compareNames(a, b) {
7
+ return a.localeCompare(b, 'en', { sensitivity: 'base' });
8
+ }
9
+ function isSorted(values) {
10
+ return values.every((value, index) => index === 0 || compareNames(values[index - 1] ?? '', value) <= 0);
11
+ }
12
+ const UNSAFE_NAME = /[\r\n\t]/;
13
+ /**
14
+ * Append-only and idempotent. A name that matches an existing value ignoring
15
+ * case counts as already present (the enum can never shrink, so a case typo
16
+ * would be permanent). Existing values keep their order: new names are placed
17
+ * alphabetically when the list is already alphabetical, otherwise appended.
18
+ */
19
+ export function planAddTypes(current, requested) {
20
+ const names = requested.map((name) => name.trim()).filter((name) => name.length > 0);
21
+ if (names.length === 0)
22
+ throw new Error('Name at least one type to add.');
23
+ for (const name of names) {
24
+ if (UNSAFE_NAME.test(name)) {
25
+ throw new Error(`"${name}" contains a newline or tab. Use a plain single-line name.`);
26
+ }
27
+ }
28
+ const existingByKey = new Map(current.map((value) => [value.toLowerCase(), value]));
29
+ const added = [];
30
+ const alreadyPresent = [];
31
+ for (const name of names) {
32
+ const match = existingByKey.get(name.toLowerCase());
33
+ if (match !== undefined) {
34
+ if (!alreadyPresent.includes(match))
35
+ alreadyPresent.push(match);
36
+ }
37
+ else if (!added.some((value) => value.toLowerCase() === name.toLowerCase())) {
38
+ added.push(name);
39
+ }
40
+ }
41
+ const next = isSorted(current)
42
+ ? [...current, ...added].sort(compareNames)
43
+ : [...current, ...[...added].sort(compareNames)];
44
+ return { next, added, alreadyPresent };
45
+ }
46
+ /** The validations array holding the enum: on the field, or on its items for an Array field. */
47
+ function enumHolder(field) {
48
+ const direct = field.validations ?? [];
49
+ const directIndex = direct.findIndex((validation) => Array.isArray(validation.in));
50
+ if (directIndex >= 0)
51
+ return { validations: direct, index: directIndex, viaItems: false };
52
+ const viaItems = field.items?.validations ?? [];
53
+ const itemsIndex = viaItems.findIndex((validation) => Array.isArray(validation.in));
54
+ if (itemsIndex >= 0)
55
+ return { validations: viaItems, index: itemsIndex, viaItems: true };
56
+ return null;
57
+ }
58
+ /**
59
+ * Publishing a content type publishes its whole draft. Contentful keeps a
60
+ * published, unchanged content type at version = publishedVersion + 1.
61
+ */
62
+ function hasUnpublishedChanges(sys) {
63
+ return sys.publishedVersion == null || sys.version > sys.publishedVersion + 1;
64
+ }
65
+ /**
66
+ * Adds type names to the enum for `kind` on the target content type, then publishes it.
67
+ * With `dryRun` nothing is written. Does nothing when every name is already present.
68
+ * Refuses when the content type has unpublished changes, because publishing would ship them too.
69
+ */
70
+ export async function addCmsTypes(client, kind, names, options = {}) {
71
+ const { contentTypeId, fieldId } = CMS_TYPE_TARGETS[kind];
72
+ const contentType = await client.contentType.get({ contentTypeId });
73
+ const field = contentType.fields.find((candidate) => candidate.id === fieldId);
74
+ if (!field)
75
+ throw new Error(`Content type ${contentTypeId} has no field ${fieldId}.`);
76
+ const holder = enumHolder(field);
77
+ if (!holder) {
78
+ throw new Error(`${contentTypeId}.${fieldId} has no "in" validation to extend.`);
79
+ }
80
+ const current = (holder.validations[holder.index]?.in ?? []);
81
+ const plan = planAddTypes(current, names);
82
+ const base = { ...plan, kind, contentTypeId, fieldId };
83
+ if (plan.added.length === 0 || options.dryRun)
84
+ return { ...base, written: false };
85
+ if (hasUnpublishedChanges(contentType.sys)) {
86
+ throw new Error(`${contentTypeId} has unpublished changes. Publishing would ship them with the new type. Publish or discard them in Contentful first.`);
87
+ }
88
+ holder.validations[holder.index] = { ...holder.validations[holder.index], in: plan.next };
89
+ const updated = await client.contentType.update({ contentTypeId }, contentType);
90
+ await client.contentType.publish({ contentTypeId }, updated);
91
+ return { ...base, written: true };
92
+ }
93
+ //# sourceMappingURL=cmsTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cmsTypes.js","sourceRoot":"","sources":["../../src/management/cmsTypes.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,gBAAgB,GAAoE;IAC/F,SAAS,EAAE,EAAE,aAAa,EAAE,WAAW,EAAE,OAAO,EAAE,eAAe,EAAE;IACnE,UAAU,EAAE,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAE;IACtE,iBAAiB,EAAE,EAAE,aAAa,EAAE,mBAAmB,EAAE,OAAO,EAAE,uBAAuB,EAAE;CA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,CAAC;IACD,MAAM,OAAO,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,CAAa,CAAC;IACzE,MAAM,IAAI,GAAG,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC1C,MAAM,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC;IACvD,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,MAAM;QAAE,OAAO,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAClF,IAAI,qBAAqB,CAAC,WAAW,CAAC,GAAqD,CAAC,EAAE,CAAC;QAC7F,MAAM,IAAI,KAAK,CACb,GAAG,aAAa,sHAAsH,CACvI,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;IAC1F,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,aAAa,EAAE,EAAE,WAAW,CAAC,CAAC;IAChF,MAAM,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,aAAa,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,OAAO,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACpC,CAAC"}
@@ -1,2 +1,3 @@
1
+ export * from './cmsTypes.js';
1
2
  export * from './shared.js';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/management/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/management/index.ts"],"names":[],"mappings":"AAEA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
@@ -1,3 +1,4 @@
1
1
  // Management scripts exports
2
+ export * from './cmsTypes.js';
2
3
  export * from './shared.js';
3
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/management/index.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/management/index.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAE7B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-studio/project-build",
3
- "version": "1.3.4",
3
+ "version": "1.4.0",
4
4
  "description": "Build tools and management scripts for SE Studio projects",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,6 +34,7 @@
34
34
  "bin": {
35
35
  "setailwind": "./dist/setailwind.js",
36
36
  "setup-colours": "./dist/management/setupColours.js",
37
+ "add-cms-type": "./dist/management/addCmsType.js",
37
38
  "generate-showcase-data": "./dist/generate-showcase-data.js",
38
39
  "generate-showcase-mocks": "./dist/generate-showcase-mocks.js",
39
40
  "cms-generate-field-list": "./dist/cms-generate-field-list.js",