@allejo/decap-extras 0.0.0 → 0.0.2
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/.github/workflows/publish.yml +26 -0
- package/README.md +67 -0
- package/dist/index.d.mts +3 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/server.d.mts +27 -0
- package/dist/server.d.mts.map +1 -0
- package/dist/server.mjs +45 -0
- package/dist/server.mjs.map +1 -0
- package/package.json +11 -3
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: Publish Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
id-token: write # Required for OIDC
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v6
|
|
17
|
+
|
|
18
|
+
- uses: actions/setup-node@v6
|
|
19
|
+
with:
|
|
20
|
+
node-version: '24'
|
|
21
|
+
registry-url: 'https://registry.npmjs.org'
|
|
22
|
+
package-manager-cache: false
|
|
23
|
+
- run: npm ci
|
|
24
|
+
- run: npm run build --if-present
|
|
25
|
+
- run: npm test
|
|
26
|
+
- run: npm publish
|
package/README.md
CHANGED
|
@@ -229,6 +229,66 @@ type SeoWidget = WidgetTypeFromFactory<typeof seoWidget>;
|
|
|
229
229
|
// { metaTitle: string; metaDescription?: string }
|
|
230
230
|
```
|
|
231
231
|
|
|
232
|
+
#### Constraining to valid file names
|
|
233
|
+
|
|
234
|
+
Use `CollectionItemNames` to get a union of all file name literals for a collection. This is useful for constraining generic components or functions that accept a page name.
|
|
235
|
+
|
|
236
|
+
```ts
|
|
237
|
+
import type { CollectionItemNames } from '@allejo/decap-extras';
|
|
238
|
+
|
|
239
|
+
import type { config } from '@/cms/config';
|
|
240
|
+
|
|
241
|
+
type PageName = CollectionItemNames<typeof config, 'pages'>;
|
|
242
|
+
// "home" | "about" | ...
|
|
243
|
+
|
|
244
|
+
function getPageProps<F extends PageName>(
|
|
245
|
+
page: F,
|
|
246
|
+
): PropsByCollectionAndFile<typeof config, 'pages', F> {
|
|
247
|
+
// ...
|
|
248
|
+
}
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## Server utilities
|
|
254
|
+
|
|
255
|
+
A server-side utility for getting CSS from Next.js build manifests. This is useful for registering CSS stylesheets into Decap's CMS preview system.
|
|
256
|
+
|
|
257
|
+
```ts
|
|
258
|
+
import { getCssFilesFromManifest } from '@allejo/decap-extras/server';
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Use `getCssFilesFromManifest` in `getStaticProps` to collect the CSS paths needed by your page and pass them as props:
|
|
262
|
+
|
|
263
|
+
```ts
|
|
264
|
+
export async function getStaticProps() {
|
|
265
|
+
const cssFiles = getCssFilesFromManifest(process.env.NODE_ENV, [
|
|
266
|
+
'/',
|
|
267
|
+
'/_app',
|
|
268
|
+
]);
|
|
269
|
+
|
|
270
|
+
return {
|
|
271
|
+
props: {
|
|
272
|
+
cssFiles: cssFiles['flattenedCssFiles'],
|
|
273
|
+
},
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Then register each path as a preview stylesheet in your Decap CMS admin component:
|
|
279
|
+
|
|
280
|
+
```ts
|
|
281
|
+
export default function Admin({ cssFiles }: Props) {
|
|
282
|
+
// ...
|
|
283
|
+
|
|
284
|
+
cssFiles.forEach((css) => {
|
|
285
|
+
cms.registerPreviewStyle(css);
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
> **Note:** This utility reads `.next/build-manifest.json` (or `.next/dev/build-manifest.json` in development) and is intended for Next.js projects only.
|
|
291
|
+
|
|
232
292
|
---
|
|
233
293
|
|
|
234
294
|
## API reference
|
|
@@ -261,10 +321,17 @@ type SeoWidget = WidgetTypeFromFactory<typeof seoWidget>;
|
|
|
261
321
|
| Type | Description |
|
|
262
322
|
| ----------------------------------------- | ------------------------------------------------------------------------------------ |
|
|
263
323
|
| `PropsByCollectionAndFile<TConfig, C, F>` | Derives a typed content object from a CMS config for collection `C` and file `F`. |
|
|
324
|
+
| `CollectionItemNames<TConfig, C>` | Union of all file name literals defined in collection `C`. |
|
|
264
325
|
| `WidgetTypeFromFactory<F>` | Returns the TypeScript content type produced by a widget factory function `F`. |
|
|
265
326
|
| `OptionalWidget<T>` | Brands a `CmsField` as optional (added by `optional()`). |
|
|
266
327
|
| `WidgetOpts<T>` | The options type for a given widget field type, with `widget` and `fields` stripped. |
|
|
267
328
|
|
|
329
|
+
### Server utilities
|
|
330
|
+
|
|
331
|
+
| Function | Description |
|
|
332
|
+
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
333
|
+
| `getCssFilesFromManifest(env, pages)` | Reads the Next.js build manifest and returns CSS paths for the given page routes, grouped by page (`allCssFiles`) and as a deduplicated flat list (`flattenedCssFiles`). |
|
|
334
|
+
|
|
268
335
|
## License
|
|
269
336
|
|
|
270
337
|
MIT
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as _$decap_cms_core0 from "decap-cms-core";
|
|
1
2
|
import { CmsField, CmsFieldBoolean, CmsFieldFileOrImage, CmsFieldList, CmsFieldMarkdown, CmsFieldNumber, CmsFieldObject, CmsFieldSelect, CmsFieldStringOrText } from "decap-cms-core";
|
|
2
3
|
|
|
3
4
|
//#region src/api.d.ts
|
|
@@ -257,7 +258,7 @@ declare function listWidget<T extends string, F extends CmsField[]>(label: strin
|
|
|
257
258
|
declare function markdownWidget<T extends string>(label: string, name: T, options?: WidgetOpts<CmsFieldMarkdown>): {
|
|
258
259
|
readonly default?: string;
|
|
259
260
|
readonly minimal?: boolean;
|
|
260
|
-
readonly buttons?:
|
|
261
|
+
readonly buttons?: _$decap_cms_core0.CmsMarkdownWidgetButton[];
|
|
261
262
|
readonly editor_components?: string[];
|
|
262
263
|
readonly modes?: ("raw" | "rich_text")[];
|
|
263
264
|
readonly editorComponents?: string[];
|
|
@@ -341,5 +342,5 @@ declare const BARE_MARKDOWN: WidgetOpts<CmsFieldMarkdown>;
|
|
|
341
342
|
*/
|
|
342
343
|
declare const INLINE_MARKDOWN: WidgetOpts<CmsFieldMarkdown>;
|
|
343
344
|
//#endregion
|
|
344
|
-
export { BARE_MARKDOWN, INLINE_MARKDOWN,
|
|
345
|
+
export { BARE_MARKDOWN, CollectionItemNames, INLINE_MARKDOWN, OptionalWidget, PropsByCollectionAndFile, WidgetOpts, WidgetTypeFromFactory, boolWidget, imageWidget, listWidget, markdownWidget, numberWidget, objectWidget, optional, selectWidget, stringWidget, textWidget };
|
|
345
346
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/api.ts","../src/widgets.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/api.ts","../src/widgets.ts"],"mappings":";;;;;;;AAMA;KAAY,UAAA;EAAuB,MAAA;EAAiB,MAAA;AAAA,KACnD,IAAI,CAAC,CAAA;EACJ,QAAA;EACA,IAAA;EACA,OAAA;AAAA;AAAA,KAGU,cAAA,WAAyB,QAAA,IAAY,CAAC;EACjD,QAAA;EACA,UAAA;AAAA;AALQ;AAGT;;;;;;;;;;AAEW;AACT;;;;;;;AANO,KA2BJ,4BAAA,MAAkC,CAAA,iCAExB,CAAA,GAAI,CAAA,CAAE,CAAA,mBACf,4BAAA,CAA6B,CAAA,CAAE,CAAA,KAC/B,CAAA,CAAE,CAAA;;;;;;;;;;;;;;;;;;AAAC;KAsBJ,MAAA,+EAID,KAAA,iDACD,KAAA,SAAc,MAAA,CAAO,GA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,CAAA,EACN,MAAA,EAAQ,CAAA,EACR,OAAA,GAAU,UAAA,CAAW,YAAA;EACjB,KAAA;EAAe,IAAA,EAAM,CAAA;EAAG,MAAA;EAAgB,MAAA,EAAQ,CAAA;AAAA;AAAA,iBAgBrC,cAAA,kBAAA,CACf,KAAA,UACA,IAAA,EAAM,CAAA,EACN,OAAA,GAAU,UAAA,CAAW,gBAAA;EAAA;;qBAAD,iBAAA,CAAA,uBAAA;EAAA;;;;;;;;;;iBAUL,YAAA,6BAAyC,QAAA,GAAA,CACxD,KAAA,UACA,IAAA,EAAM,CAAA,EACN,MAAA,EAAQ,CAAA,EACR,OAAA,GAAU,UAAA,CAAW,cAAA;EAAA;;;;;;;;;;;iBAWN,YAAA,kBAAA,CACf,KAAA,UACA,IAAA,EAAM,CAAA,EACN,OAAA,GAAU,UAAA,CAAW,cAAA;EAAA;;;;;;;;;;;;;iBAUN,YAAA,sCAAA,CACf,KAAA,UACA,IAAA,EAAM,CAAA,EACN,OAAA,EAAS,CAAA,EACT,OAAA,GAAU,UAAA,CAAW,cAAA;EAAA;;;;;;;;;;;;iBAWN,YAAA,kBAAA,CACf,KAAA,UACA,IAAA,EAAM,CAAA,EACN,OAAA,GAAU,UAAA,CAAW,oBAAA;EAAA;;;;;;;;;iBAUN,UAAA,kBAAA,CACf,KAAA,UACA,IAAA,EAAM,CAAA,EACN,OAAA,GAAU,UAAA,CAAW,oBAAA;EAAA;;;;;;;;;;;;;;;;cAmBT,aAAA,EAAe,UAAU,CAAC,gBAAA;;;;;cAiB1B,eAAA,EAAiB,UAAU,CAAC,gBAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/server.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Reads the Next.js build manifest and extracts CSS file paths for the given
|
|
4
|
+
* pages, resolving the manifest location based on the current environment.
|
|
5
|
+
*
|
|
6
|
+
* In development, reads from `.next/dev/build-manifest.json`; in all other
|
|
7
|
+
* environments, reads from `.next/build-manifest.json`.
|
|
8
|
+
*
|
|
9
|
+
* CSS paths are rewritten from the `static/` prefix used internally by Next.js
|
|
10
|
+
* to the `/_next/static/` public URL path.
|
|
11
|
+
*
|
|
12
|
+
* @param env - The current environment (e.g. `"development"` or `"production"`).
|
|
13
|
+
* @param pages - List of Next.js page routes to extract CSS files for
|
|
14
|
+
* (e.g. `["/", "/_app"]`).
|
|
15
|
+
*
|
|
16
|
+
* @returns An object with two properties:
|
|
17
|
+
* - `allCssFiles` — a map of page route to its CSS file paths.
|
|
18
|
+
* - `flattenedCssFiles` — a deduplicated flat list of all CSS file paths
|
|
19
|
+
* across every requested page.
|
|
20
|
+
*/
|
|
21
|
+
declare function getCssFilesFromManifest(env: string, pages: string[]): {
|
|
22
|
+
flattenedCssFiles: string[];
|
|
23
|
+
allCssFiles: Record<string, string[]>;
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { getCssFilesFromManifest };
|
|
27
|
+
//# sourceMappingURL=server.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.mts","names":[],"sources":["../src/server.ts"],"mappings":";;AAsBA;;;;;;;;;;;;;;;;;;iBAAgB,uBAAA,CAAwB,GAAA,UAAa,KAAA;;eAAd,MAAA;AAAA"}
|
package/dist/server.mjs
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
|
|
4
|
+
//#region src/server.ts
|
|
5
|
+
/**
|
|
6
|
+
* Reads the Next.js build manifest and extracts CSS file paths for the given
|
|
7
|
+
* pages, resolving the manifest location based on the current environment.
|
|
8
|
+
*
|
|
9
|
+
* In development, reads from `.next/dev/build-manifest.json`; in all other
|
|
10
|
+
* environments, reads from `.next/build-manifest.json`.
|
|
11
|
+
*
|
|
12
|
+
* CSS paths are rewritten from the `static/` prefix used internally by Next.js
|
|
13
|
+
* to the `/_next/static/` public URL path.
|
|
14
|
+
*
|
|
15
|
+
* @param env - The current environment (e.g. `"development"` or `"production"`).
|
|
16
|
+
* @param pages - List of Next.js page routes to extract CSS files for
|
|
17
|
+
* (e.g. `["/", "/_app"]`).
|
|
18
|
+
*
|
|
19
|
+
* @returns An object with two properties:
|
|
20
|
+
* - `allCssFiles` — a map of page route to its CSS file paths.
|
|
21
|
+
* - `flattenedCssFiles` — a deduplicated flat list of all CSS file paths
|
|
22
|
+
* across every requested page.
|
|
23
|
+
*/
|
|
24
|
+
function getCssFilesFromManifest(env, pages) {
|
|
25
|
+
const manifestPath = env === "development" ? path.join(process.cwd(), ".next", "dev", "build-manifest.json") : path.join(process.cwd(), ".next", "build-manifest.json");
|
|
26
|
+
const buildManifest = JSON.parse(fs.readFileSync(manifestPath, "utf8"));
|
|
27
|
+
const allCssFiles = {};
|
|
28
|
+
const flattenedCssFilesSet = /* @__PURE__ */ new Set();
|
|
29
|
+
pages.forEach((page) => {
|
|
30
|
+
buildManifest?.pages[page].filter((file) => file.endsWith(".css")).forEach((file) => {
|
|
31
|
+
if (!allCssFiles[page]) allCssFiles[page] = [];
|
|
32
|
+
const fullPath = file.replace("static/", "/_next/static/");
|
|
33
|
+
allCssFiles[page].push(fullPath);
|
|
34
|
+
flattenedCssFilesSet.add(fullPath);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
return {
|
|
38
|
+
flattenedCssFiles: [...flattenedCssFilesSet],
|
|
39
|
+
allCssFiles
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
//#endregion
|
|
44
|
+
export { getCssFilesFromManifest };
|
|
45
|
+
//# sourceMappingURL=server.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.mjs","names":[],"sources":["../src/server.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\n\n/**\n * Reads the Next.js build manifest and extracts CSS file paths for the given\n * pages, resolving the manifest location based on the current environment.\n *\n * In development, reads from `.next/dev/build-manifest.json`; in all other\n * environments, reads from `.next/build-manifest.json`.\n *\n * CSS paths are rewritten from the `static/` prefix used internally by Next.js\n * to the `/_next/static/` public URL path.\n *\n * @param env - The current environment (e.g. `\"development\"` or `\"production\"`).\n * @param pages - List of Next.js page routes to extract CSS files for\n * (e.g. `[\"/\", \"/_app\"]`).\n *\n * @returns An object with two properties:\n * - `allCssFiles` — a map of page route to its CSS file paths.\n * - `flattenedCssFiles` — a deduplicated flat list of all CSS file paths\n * across every requested page.\n */\nexport function getCssFilesFromManifest(env: string, pages: string[]) {\n\tconst manifestPath =\n\t\tenv === 'development'\n\t\t\t? path.join(process.cwd(), '.next', 'dev', 'build-manifest.json')\n\t\t\t: path.join(process.cwd(), '.next', 'build-manifest.json');\n\tconst buildManifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));\n\n\tconst allCssFiles: Record<string, string[]> = {};\n\tconst flattenedCssFilesSet = new Set<string>();\n\n\tpages.forEach((page) => {\n\t\tbuildManifest?.pages[page]\n\t\t\t.filter((file: string) => file.endsWith('.css'))\n\t\t\t.forEach((file: string) => {\n\t\t\t\tif (!allCssFiles[page]) {\n\t\t\t\t\tallCssFiles[page] = [];\n\t\t\t\t}\n\n\t\t\t\tconst fullPath = file.replace('static/', '/_next/static/');\n\n\t\t\t\tallCssFiles[page].push(fullPath);\n\t\t\t\tflattenedCssFilesSet.add(fullPath);\n\t\t\t});\n\t});\n\n\treturn {\n\t\tflattenedCssFiles: [...flattenedCssFilesSet],\n\t\tallCssFiles,\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAsBA,SAAgB,wBAAwB,KAAa,OAAiB;CACrE,MAAM,eACL,QAAQ,gBACL,KAAK,KAAK,QAAQ,IAAI,GAAG,SAAS,OAAO,qBAAqB,IAC9D,KAAK,KAAK,QAAQ,IAAI,GAAG,SAAS,qBAAqB;CAC3D,MAAM,gBAAgB,KAAK,MAAM,GAAG,aAAa,cAAc,MAAM,CAAC;CAEtE,MAAM,cAAwC,CAAC;CAC/C,MAAM,uCAAuB,IAAI,IAAY;CAE7C,MAAM,SAAS,SAAS;EACvB,eAAe,MAAM,MACnB,QAAQ,SAAiB,KAAK,SAAS,MAAM,CAAC,EAC9C,SAAS,SAAiB;GAC1B,IAAI,CAAC,YAAY,OAChB,YAAY,QAAQ,CAAC;GAGtB,MAAM,WAAW,KAAK,QAAQ,WAAW,gBAAgB;GAEzD,YAAY,MAAM,KAAK,QAAQ;GAC/B,qBAAqB,IAAI,QAAQ;EAClC,CAAC;CACH,CAAC;CAED,OAAO;EACN,mBAAmB,CAAC,GAAG,oBAAoB;EAC3C;CACD;AACD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allejo/decap-extras",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "A TypeScript utility library for Decap CMS with utility types to derive types from Decap CMS configuration files.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"decapcms"
|
|
@@ -12,8 +12,16 @@
|
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"author": "Vladimir \"allejo\" Jimenez",
|
|
14
14
|
"type": "module",
|
|
15
|
-
"
|
|
16
|
-
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.mts",
|
|
18
|
+
"import": "./dist/index.mjs"
|
|
19
|
+
},
|
|
20
|
+
"./server": {
|
|
21
|
+
"types": "./dist/server.d.mts",
|
|
22
|
+
"import": "./dist/server.mjs"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
17
25
|
"scripts": {
|
|
18
26
|
"build": "tsdown",
|
|
19
27
|
"format": "prettier --write .",
|