@powerlines/plugin-content-collections 0.1.669 → 0.1.670
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/dist/create-emitter-CE9g0zIu.d.cts +30 -0
- package/dist/create-emitter-CE9g0zIu.d.cts.map +1 -0
- package/dist/create-emitter-CE9g0zIu.d.mts +30 -0
- package/dist/create-emitter-CE9g0zIu.d.mts.map +1 -0
- package/dist/create-writer-Bs74Pu1R.d.mts +13 -0
- package/dist/create-writer-Bs74Pu1R.d.mts.map +1 -0
- package/dist/create-writer-DLRmxPwG.d.cts +13 -0
- package/dist/create-writer-DLRmxPwG.d.cts.map +1 -0
- package/dist/helpers/create-emitter.d.cts +2 -30
- package/dist/helpers/create-emitter.d.mts +2 -30
- package/dist/helpers/create-writer.cjs +2 -2
- package/dist/helpers/create-writer.d.cts +2 -13
- package/dist/helpers/create-writer.d.mts +2 -13
- package/dist/helpers/index.d.cts +2 -2
- package/dist/helpers/index.d.mts +2 -2
- package/dist/index.cjs +3 -2
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +1 -0
- package/dist/plugin-BOfMmWO0.d.cts +42 -0
- package/dist/plugin-BOfMmWO0.d.cts.map +1 -0
- package/dist/plugin-BOfMmWO0.d.mts +42 -0
- package/dist/plugin-BOfMmWO0.d.mts.map +1 -0
- package/dist/{_virtual/_rolldown/runtime.cjs → rolldown-runtime-C24Yb2bl.cjs} +6 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/plugin.d.cts +2 -42
- package/dist/types/plugin.d.mts +2 -42
- package/package.json +3 -3
- package/dist/helpers/create-emitter.d.cts.map +0 -1
- package/dist/helpers/create-emitter.d.mts.map +0 -1
- package/dist/helpers/create-writer.d.cts.map +0 -1
- package/dist/helpers/create-writer.d.mts.map +0 -1
- package/dist/types/plugin.d.cts.map +0 -1
- package/dist/types/plugin.d.mts.map +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region src/helpers/create-emitter.d.ts
|
|
2
|
+
type EventMap = Record<string, object>;
|
|
3
|
+
interface EventWithError {
|
|
4
|
+
error: Error;
|
|
5
|
+
}
|
|
6
|
+
interface SystemEvent {
|
|
7
|
+
_event: string;
|
|
8
|
+
}
|
|
9
|
+
type ErrorEvent = EventWithError & SystemEvent;
|
|
10
|
+
interface SystemEvents extends EventMap {
|
|
11
|
+
_error: ErrorEvent;
|
|
12
|
+
_all: SystemEvent;
|
|
13
|
+
}
|
|
14
|
+
type Keys<TEvents extends EventMap> = keyof TEvents & string;
|
|
15
|
+
type Listener<TEvent> = (event: TEvent) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Create an event emitter with typed events.
|
|
18
|
+
*
|
|
19
|
+
* @returns An event emitter instance with typed event handling.
|
|
20
|
+
*/
|
|
21
|
+
declare function createEmitter<TEvents extends EventMap>(): {
|
|
22
|
+
on: {
|
|
23
|
+
<TKey extends Keys<TEvents>>(key: TKey, listener: Listener<TEvents[TKey]>): void;
|
|
24
|
+
<TKey extends Keys<SystemEvents>>(key: TKey, listener: Listener<SystemEvents[TKey]>): void;
|
|
25
|
+
};
|
|
26
|
+
emit: <TKey extends Keys<TEvents>>(key: TKey, event: TEvents[TKey]) => void;
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { createEmitter as t };
|
|
30
|
+
//# sourceMappingURL=create-emitter-CE9g0zIu.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-emitter-CE9g0zIu.d.cts","names":[],"sources":["../src/helpers/create-emitter.ts"],"mappings":";KAoBK,WAAW;UAEN;EACR,OAAO;;UAGC;EACR;;KAGG,aAAa,iBAAiB;UAEzB,qBAAqB;EAC7B,QAAQ;EACR,MAAM;;KAGH,KAAK,gBAAgB,kBAAkB;KACvC,SAAS,WAAW,OAAO;;;;;;iBAOhB,cAAc,gBAAgB;;KAGhC,aAAa,KAAK,UAAQ,KAC/B,MAAI,UACC,SAAS,QAAQ;KAGjB,aAAa,KAAK,eAAa,KACpC,MAAI,UACC,SAAS,aAAa;;EAOpB,OAAA,aAAa,KAAK,UAAQ,KAAO,MAAI,OAAS,QAAQ"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region src/helpers/create-emitter.d.ts
|
|
2
|
+
type EventMap = Record<string, object>;
|
|
3
|
+
interface EventWithError {
|
|
4
|
+
error: Error;
|
|
5
|
+
}
|
|
6
|
+
interface SystemEvent {
|
|
7
|
+
_event: string;
|
|
8
|
+
}
|
|
9
|
+
type ErrorEvent = EventWithError & SystemEvent;
|
|
10
|
+
interface SystemEvents extends EventMap {
|
|
11
|
+
_error: ErrorEvent;
|
|
12
|
+
_all: SystemEvent;
|
|
13
|
+
}
|
|
14
|
+
type Keys<TEvents extends EventMap> = keyof TEvents & string;
|
|
15
|
+
type Listener<TEvent> = (event: TEvent) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Create an event emitter with typed events.
|
|
18
|
+
*
|
|
19
|
+
* @returns An event emitter instance with typed event handling.
|
|
20
|
+
*/
|
|
21
|
+
declare function createEmitter<TEvents extends EventMap>(): {
|
|
22
|
+
on: {
|
|
23
|
+
<TKey extends Keys<TEvents>>(key: TKey, listener: Listener<TEvents[TKey]>): void;
|
|
24
|
+
<TKey extends Keys<SystemEvents>>(key: TKey, listener: Listener<SystemEvents[TKey]>): void;
|
|
25
|
+
};
|
|
26
|
+
emit: <TKey extends Keys<TEvents>>(key: TKey, event: TEvents[TKey]) => void;
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { createEmitter as t };
|
|
30
|
+
//# sourceMappingURL=create-emitter-CE9g0zIu.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-emitter-CE9g0zIu.d.mts","names":[],"sources":["../src/helpers/create-emitter.ts"],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { n as ContentCollectionsPluginContext } from "./plugin-BOfMmWO0.mjs";
|
|
2
|
+
import { Writer } from "@content-collections/core";
|
|
3
|
+
//#region src/helpers/create-writer.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Creates a Writer instance for emitting files related to content collections.
|
|
6
|
+
*
|
|
7
|
+
* @param context - The Powerlines build plugin
|
|
8
|
+
* @returns A Writer instance for emitting files related to content collections
|
|
9
|
+
*/
|
|
10
|
+
declare const createWriter: (context: ContentCollectionsPluginContext) => Writer;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { createWriter as t };
|
|
13
|
+
//# sourceMappingURL=create-writer-Bs74Pu1R.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-writer-Bs74Pu1R.d.mts","names":[],"sources":["../src/helpers/create-writer.ts"],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { n as ContentCollectionsPluginContext } from "./plugin-BOfMmWO0.cjs";
|
|
2
|
+
import { Writer } from "@content-collections/core";
|
|
3
|
+
//#region src/helpers/create-writer.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Creates a Writer instance for emitting files related to content collections.
|
|
6
|
+
*
|
|
7
|
+
* @param context - The Powerlines build plugin
|
|
8
|
+
* @returns A Writer instance for emitting files related to content collections
|
|
9
|
+
*/
|
|
10
|
+
declare const createWriter: (context: ContentCollectionsPluginContext) => Writer;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { createWriter as t };
|
|
13
|
+
//# sourceMappingURL=create-writer-DLRmxPwG.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-writer-DLRmxPwG.d.cts","names":[],"sources":["../src/helpers/create-writer.ts"],"mappings":";;;;;;;;;cA8Ca,eACX,SAAS,oCACR"}
|
|
@@ -1,30 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
interface EventWithError {
|
|
4
|
-
error: Error;
|
|
5
|
-
}
|
|
6
|
-
interface SystemEvent {
|
|
7
|
-
_event: string;
|
|
8
|
-
}
|
|
9
|
-
type ErrorEvent = EventWithError & SystemEvent;
|
|
10
|
-
interface SystemEvents extends EventMap {
|
|
11
|
-
_error: ErrorEvent;
|
|
12
|
-
_all: SystemEvent;
|
|
13
|
-
}
|
|
14
|
-
type Keys<TEvents extends EventMap> = keyof TEvents & string;
|
|
15
|
-
type Listener<TEvent> = (event: TEvent) => void;
|
|
16
|
-
/**
|
|
17
|
-
* Create an event emitter with typed events.
|
|
18
|
-
*
|
|
19
|
-
* @returns An event emitter instance with typed event handling.
|
|
20
|
-
*/
|
|
21
|
-
declare function createEmitter<TEvents extends EventMap>(): {
|
|
22
|
-
on: {
|
|
23
|
-
<TKey extends Keys<TEvents>>(key: TKey, listener: Listener<TEvents[TKey]>): void;
|
|
24
|
-
<TKey extends Keys<SystemEvents>>(key: TKey, listener: Listener<SystemEvents[TKey]>): void;
|
|
25
|
-
};
|
|
26
|
-
emit: <TKey extends Keys<TEvents>>(key: TKey, event: TEvents[TKey]) => void;
|
|
27
|
-
};
|
|
28
|
-
//#endregion
|
|
29
|
-
export { createEmitter };
|
|
30
|
-
//# sourceMappingURL=create-emitter.d.cts.map
|
|
1
|
+
import { t as createEmitter } from "../create-emitter-CE9g0zIu.cjs";
|
|
2
|
+
export { createEmitter };
|
|
@@ -1,30 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
interface EventWithError {
|
|
4
|
-
error: Error;
|
|
5
|
-
}
|
|
6
|
-
interface SystemEvent {
|
|
7
|
-
_event: string;
|
|
8
|
-
}
|
|
9
|
-
type ErrorEvent = EventWithError & SystemEvent;
|
|
10
|
-
interface SystemEvents extends EventMap {
|
|
11
|
-
_error: ErrorEvent;
|
|
12
|
-
_all: SystemEvent;
|
|
13
|
-
}
|
|
14
|
-
type Keys<TEvents extends EventMap> = keyof TEvents & string;
|
|
15
|
-
type Listener<TEvent> = (event: TEvent) => void;
|
|
16
|
-
/**
|
|
17
|
-
* Create an event emitter with typed events.
|
|
18
|
-
*
|
|
19
|
-
* @returns An event emitter instance with typed event handling.
|
|
20
|
-
*/
|
|
21
|
-
declare function createEmitter<TEvents extends EventMap>(): {
|
|
22
|
-
on: {
|
|
23
|
-
<TKey extends Keys<TEvents>>(key: TKey, listener: Listener<TEvents[TKey]>): void;
|
|
24
|
-
<TKey extends Keys<SystemEvents>>(key: TKey, listener: Listener<SystemEvents[TKey]>): void;
|
|
25
|
-
};
|
|
26
|
-
emit: <TKey extends Keys<TEvents>>(key: TKey, event: TEvents[TKey]) => void;
|
|
27
|
-
};
|
|
28
|
-
//#endregion
|
|
29
|
-
export { createEmitter };
|
|
30
|
-
//# sourceMappingURL=create-emitter.d.mts.map
|
|
1
|
+
import { t as createEmitter } from "../create-emitter-CE9g0zIu.mjs";
|
|
2
|
+
export { createEmitter };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const
|
|
2
|
+
const require_rolldown_runtime = require('../rolldown-runtime-C24Yb2bl.cjs');
|
|
3
3
|
let _content_collections_core = require("@content-collections/core");
|
|
4
4
|
let _stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
5
5
|
let _stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
|
|
6
6
|
let pluralize = require("pluralize");
|
|
7
|
-
pluralize =
|
|
7
|
+
pluralize = require_rolldown_runtime.__toESM(pluralize, 1);
|
|
8
8
|
let powerlines_utils = require("powerlines/utils");
|
|
9
9
|
|
|
10
10
|
//#region src/helpers/create-writer.ts
|
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/create-writer.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Creates a Writer instance for emitting files related to content collections.
|
|
6
|
-
*
|
|
7
|
-
* @param context - The Powerlines build plugin
|
|
8
|
-
* @returns A Writer instance for emitting files related to content collections
|
|
9
|
-
*/
|
|
10
|
-
declare const createWriter: (context: ContentCollectionsPluginContext) => Writer;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { createWriter };
|
|
13
|
-
//# sourceMappingURL=create-writer.d.cts.map
|
|
1
|
+
import { t as createWriter } from "../create-writer-DLRmxPwG.cjs";
|
|
2
|
+
export { createWriter };
|
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/create-writer.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Creates a Writer instance for emitting files related to content collections.
|
|
6
|
-
*
|
|
7
|
-
* @param context - The Powerlines build plugin
|
|
8
|
-
* @returns A Writer instance for emitting files related to content collections
|
|
9
|
-
*/
|
|
10
|
-
declare const createWriter: (context: ContentCollectionsPluginContext) => Writer;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { createWriter };
|
|
13
|
-
//# sourceMappingURL=create-writer.d.mts.map
|
|
1
|
+
import { t as createWriter } from "../create-writer-Bs74Pu1R.mjs";
|
|
2
|
+
export { createWriter };
|
package/dist/helpers/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { createEmitter } from "
|
|
2
|
-
import { createWriter } from "
|
|
1
|
+
import { t as createEmitter } from "../create-emitter-CE9g0zIu.cjs";
|
|
2
|
+
import { t as createWriter } from "../create-writer-DLRmxPwG.cjs";
|
|
3
3
|
export { createEmitter, createWriter };
|
package/dist/helpers/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { createEmitter } from "
|
|
2
|
-
import { createWriter } from "
|
|
1
|
+
import { t as createEmitter } from "../create-emitter-CE9g0zIu.mjs";
|
|
2
|
+
import { t as createWriter } from "../create-writer-Bs74Pu1R.mjs";
|
|
3
3
|
export { createEmitter, createWriter };
|
package/dist/index.cjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
-
const
|
|
2
|
+
const require_rolldown_runtime = require('./rolldown-runtime-C24Yb2bl.cjs');
|
|
3
3
|
const require_helpers_create_emitter = require('./helpers/create-emitter.cjs');
|
|
4
4
|
const require_helpers_create_writer = require('./helpers/create-writer.cjs');
|
|
5
5
|
require('./helpers/index.cjs');
|
|
6
|
+
require('./types/index.cjs');
|
|
6
7
|
let _content_collections_core = require("@content-collections/core");
|
|
7
8
|
let _stryke_fs_exists = require("@stryke/fs/exists");
|
|
8
9
|
let _stryke_path_join = require("@stryke/path/join");
|
|
9
10
|
let defu = require("defu");
|
|
10
|
-
defu =
|
|
11
|
+
defu = require_rolldown_runtime.__toESM(defu, 1);
|
|
11
12
|
let node_crypto = require("node:crypto");
|
|
12
13
|
let powerlines_plugin_utils = require("powerlines/plugin-utils");
|
|
13
14
|
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createEmitter } from "./
|
|
2
|
-
import {
|
|
3
|
-
import { createWriter } from "./
|
|
1
|
+
import { t as createEmitter } from "./create-emitter-CE9g0zIu.cjs";
|
|
2
|
+
import { a as ContentCollectionsPluginUserConfig, i as ContentCollectionsPluginResolvedConfig, n as ContentCollectionsPluginContext, r as ContentCollectionsPluginOptions, t as ContentCollectionsContext } from "./plugin-BOfMmWO0.cjs";
|
|
3
|
+
import { t as createWriter } from "./create-writer-DLRmxPwG.cjs";
|
|
4
4
|
import "./helpers/index.cjs";
|
|
5
5
|
import "./types/index.cjs";
|
|
6
6
|
import { Plugin } from "powerlines";
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createEmitter } from "./
|
|
2
|
-
import {
|
|
3
|
-
import { createWriter } from "./
|
|
1
|
+
import { t as createEmitter } from "./create-emitter-CE9g0zIu.mjs";
|
|
2
|
+
import { a as ContentCollectionsPluginUserConfig, i as ContentCollectionsPluginResolvedConfig, n as ContentCollectionsPluginContext, r as ContentCollectionsPluginOptions, t as ContentCollectionsContext } from "./plugin-BOfMmWO0.mjs";
|
|
3
|
+
import { t as createWriter } from "./create-writer-Bs74Pu1R.mjs";
|
|
4
4
|
import "./helpers/index.mjs";
|
|
5
5
|
import "./types/index.mjs";
|
|
6
6
|
import { Plugin } from "powerlines";
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createEmitter } from "./helpers/create-emitter.mjs";
|
|
2
2
|
import { createWriter } from "./helpers/create-writer.mjs";
|
|
3
3
|
import "./helpers/index.mjs";
|
|
4
|
+
import "./types/index.mjs";
|
|
4
5
|
import { build, createBuildContext, createConfigurationReader } from "@content-collections/core";
|
|
5
6
|
import { existsSync } from "@stryke/fs/exists";
|
|
6
7
|
import { joinPaths } from "@stryke/path/join";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { AnyCollection, BuildContext, createInternalBuilder } from "@content-collections/core";
|
|
2
|
+
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
3
|
+
//#region src/types/plugin.d.ts
|
|
4
|
+
type ContentCollectionsContext = Pick<Awaited<ReturnType<typeof createInternalBuilder>>, "build" | "on"> & {
|
|
5
|
+
context: BuildContext;
|
|
6
|
+
};
|
|
7
|
+
interface ContentCollectionsPluginOptions {
|
|
8
|
+
/**
|
|
9
|
+
* The path to a custom Prisma configuration file.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* This field allows the use of the "\{root\}" token to refer to the project's root directory - the value will be replaced with the correct file path by the plugin.
|
|
13
|
+
*
|
|
14
|
+
* @defaultValue "\{root\}/content-collections.ts"
|
|
15
|
+
*/
|
|
16
|
+
configFile?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The list of content collections to include.
|
|
19
|
+
*/
|
|
20
|
+
collections?: AnyCollection[];
|
|
21
|
+
/**
|
|
22
|
+
* The path to the content collection output files generated by the plugin.
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* If using the default value, the file can be imported from "powerlines:content/collection-name". This field allows the use of the "\{builtinsPath\}" token to refer to the built-in Powerlines plugins directory - the value will be replaced with the correct file path by the plugin.
|
|
26
|
+
*
|
|
27
|
+
* @defaultValue "\{builtinsPath\}/content"
|
|
28
|
+
*/
|
|
29
|
+
outputPath?: string;
|
|
30
|
+
}
|
|
31
|
+
type ContentCollectionsPluginUserConfig = UserConfig & {
|
|
32
|
+
contentCollections?: ContentCollectionsPluginOptions;
|
|
33
|
+
};
|
|
34
|
+
type ContentCollectionsPluginResolvedConfig = ResolvedConfig & {
|
|
35
|
+
contentCollections: Required<Omit<ContentCollectionsPluginOptions, "outputPath">> & Pick<ContentCollectionsPluginOptions, "outputPath">;
|
|
36
|
+
};
|
|
37
|
+
type ContentCollectionsPluginContext<TResolvedConfig extends ContentCollectionsPluginResolvedConfig = ContentCollectionsPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
38
|
+
contentCollections: ContentCollectionsContext;
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
export { ContentCollectionsPluginUserConfig as a, ContentCollectionsPluginResolvedConfig as i, ContentCollectionsPluginContext as n, ContentCollectionsPluginOptions as r, ContentCollectionsContext as t };
|
|
42
|
+
//# sourceMappingURL=plugin-BOfMmWO0.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-BOfMmWO0.d.cts","names":[],"sources":["../src/types/plugin.ts"],"mappings":";;;KAyBY,4BAA4B,KACtC,QAAQ,kBAAkB;EAEtB,SAAS;;UAEE;;;;;;;;;EASf;;;;EAKA,cAAc;;;;;;;;;EAUd;;KAGU,qCAAqC;EAC/C,qBAAqB;;KAGX,yCAAyC;EACnD,oBAAoB,SAClB,KAAK,kDAEL,KAAK;;KAGG,gCACV,wBAAwB,yCACtB,0CACA,cAAc;EAChB,oBAAoB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { AnyCollection, BuildContext, createInternalBuilder } from "@content-collections/core";
|
|
2
|
+
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
3
|
+
//#region src/types/plugin.d.ts
|
|
4
|
+
type ContentCollectionsContext = Pick<Awaited<ReturnType<typeof createInternalBuilder>>, "build" | "on"> & {
|
|
5
|
+
context: BuildContext;
|
|
6
|
+
};
|
|
7
|
+
interface ContentCollectionsPluginOptions {
|
|
8
|
+
/**
|
|
9
|
+
* The path to a custom Prisma configuration file.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* This field allows the use of the "\{root\}" token to refer to the project's root directory - the value will be replaced with the correct file path by the plugin.
|
|
13
|
+
*
|
|
14
|
+
* @defaultValue "\{root\}/content-collections.ts"
|
|
15
|
+
*/
|
|
16
|
+
configFile?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The list of content collections to include.
|
|
19
|
+
*/
|
|
20
|
+
collections?: AnyCollection[];
|
|
21
|
+
/**
|
|
22
|
+
* The path to the content collection output files generated by the plugin.
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* If using the default value, the file can be imported from "powerlines:content/collection-name". This field allows the use of the "\{builtinsPath\}" token to refer to the built-in Powerlines plugins directory - the value will be replaced with the correct file path by the plugin.
|
|
26
|
+
*
|
|
27
|
+
* @defaultValue "\{builtinsPath\}/content"
|
|
28
|
+
*/
|
|
29
|
+
outputPath?: string;
|
|
30
|
+
}
|
|
31
|
+
type ContentCollectionsPluginUserConfig = UserConfig & {
|
|
32
|
+
contentCollections?: ContentCollectionsPluginOptions;
|
|
33
|
+
};
|
|
34
|
+
type ContentCollectionsPluginResolvedConfig = ResolvedConfig & {
|
|
35
|
+
contentCollections: Required<Omit<ContentCollectionsPluginOptions, "outputPath">> & Pick<ContentCollectionsPluginOptions, "outputPath">;
|
|
36
|
+
};
|
|
37
|
+
type ContentCollectionsPluginContext<TResolvedConfig extends ContentCollectionsPluginResolvedConfig = ContentCollectionsPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
38
|
+
contentCollections: ContentCollectionsContext;
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
export { ContentCollectionsPluginUserConfig as a, ContentCollectionsPluginResolvedConfig as i, ContentCollectionsPluginContext as n, ContentCollectionsPluginOptions as r, ContentCollectionsContext as t };
|
|
42
|
+
//# sourceMappingURL=plugin-BOfMmWO0.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-BOfMmWO0.d.mts","names":[],"sources":["../src/types/plugin.ts"],"mappings":""}
|
|
@@ -25,4 +25,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
25
|
}) : target, mod));
|
|
26
26
|
|
|
27
27
|
//#endregion
|
|
28
|
-
exports
|
|
28
|
+
Object.defineProperty(exports, '__toESM', {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () {
|
|
31
|
+
return __toESM;
|
|
32
|
+
}
|
|
33
|
+
});
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as ContentCollectionsPluginUserConfig, i as ContentCollectionsPluginResolvedConfig, n as ContentCollectionsPluginContext, r as ContentCollectionsPluginOptions, t as ContentCollectionsContext } from "../plugin-BOfMmWO0.cjs";
|
|
2
2
|
export { ContentCollectionsContext, ContentCollectionsPluginContext, ContentCollectionsPluginOptions, ContentCollectionsPluginResolvedConfig, ContentCollectionsPluginUserConfig };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as ContentCollectionsPluginUserConfig, i as ContentCollectionsPluginResolvedConfig, n as ContentCollectionsPluginContext, r as ContentCollectionsPluginOptions, t as ContentCollectionsContext } from "../plugin-BOfMmWO0.mjs";
|
|
2
2
|
export { ContentCollectionsContext, ContentCollectionsPluginContext, ContentCollectionsPluginOptions, ContentCollectionsPluginResolvedConfig, ContentCollectionsPluginUserConfig };
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,42 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
//#region src/types/plugin.d.ts
|
|
4
|
-
type ContentCollectionsContext = Pick<Awaited<ReturnType<typeof createInternalBuilder>>, "build" | "on"> & {
|
|
5
|
-
context: BuildContext;
|
|
6
|
-
};
|
|
7
|
-
interface ContentCollectionsPluginOptions {
|
|
8
|
-
/**
|
|
9
|
-
* The path to a custom Prisma configuration file.
|
|
10
|
-
*
|
|
11
|
-
* @remarks
|
|
12
|
-
* This field allows the use of the "\{root\}" token to refer to the project's root directory - the value will be replaced with the correct file path by the plugin.
|
|
13
|
-
*
|
|
14
|
-
* @defaultValue "\{root\}/content-collections.ts"
|
|
15
|
-
*/
|
|
16
|
-
configFile?: string;
|
|
17
|
-
/**
|
|
18
|
-
* The list of content collections to include.
|
|
19
|
-
*/
|
|
20
|
-
collections?: AnyCollection[];
|
|
21
|
-
/**
|
|
22
|
-
* The path to the content collection output files generated by the plugin.
|
|
23
|
-
*
|
|
24
|
-
* @remarks
|
|
25
|
-
* If using the default value, the file can be imported from "powerlines:content/collection-name". This field allows the use of the "\{builtinsPath\}" token to refer to the built-in Powerlines plugins directory - the value will be replaced with the correct file path by the plugin.
|
|
26
|
-
*
|
|
27
|
-
* @defaultValue "\{builtinsPath\}/content"
|
|
28
|
-
*/
|
|
29
|
-
outputPath?: string;
|
|
30
|
-
}
|
|
31
|
-
type ContentCollectionsPluginUserConfig = UserConfig & {
|
|
32
|
-
contentCollections?: ContentCollectionsPluginOptions;
|
|
33
|
-
};
|
|
34
|
-
type ContentCollectionsPluginResolvedConfig = ResolvedConfig & {
|
|
35
|
-
contentCollections: Required<Omit<ContentCollectionsPluginOptions, "outputPath">> & Pick<ContentCollectionsPluginOptions, "outputPath">;
|
|
36
|
-
};
|
|
37
|
-
type ContentCollectionsPluginContext<TResolvedConfig extends ContentCollectionsPluginResolvedConfig = ContentCollectionsPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
38
|
-
contentCollections: ContentCollectionsContext;
|
|
39
|
-
};
|
|
40
|
-
//#endregion
|
|
41
|
-
export { ContentCollectionsContext, ContentCollectionsPluginContext, ContentCollectionsPluginOptions, ContentCollectionsPluginResolvedConfig, ContentCollectionsPluginUserConfig };
|
|
42
|
-
//# sourceMappingURL=plugin.d.cts.map
|
|
1
|
+
import { a as ContentCollectionsPluginUserConfig, i as ContentCollectionsPluginResolvedConfig, n as ContentCollectionsPluginContext, r as ContentCollectionsPluginOptions, t as ContentCollectionsContext } from "../plugin-BOfMmWO0.cjs";
|
|
2
|
+
export { ContentCollectionsContext, ContentCollectionsPluginContext, ContentCollectionsPluginOptions, ContentCollectionsPluginResolvedConfig, ContentCollectionsPluginUserConfig };
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,42 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
//#region src/types/plugin.d.ts
|
|
4
|
-
type ContentCollectionsContext = Pick<Awaited<ReturnType<typeof createInternalBuilder>>, "build" | "on"> & {
|
|
5
|
-
context: BuildContext;
|
|
6
|
-
};
|
|
7
|
-
interface ContentCollectionsPluginOptions {
|
|
8
|
-
/**
|
|
9
|
-
* The path to a custom Prisma configuration file.
|
|
10
|
-
*
|
|
11
|
-
* @remarks
|
|
12
|
-
* This field allows the use of the "\{root\}" token to refer to the project's root directory - the value will be replaced with the correct file path by the plugin.
|
|
13
|
-
*
|
|
14
|
-
* @defaultValue "\{root\}/content-collections.ts"
|
|
15
|
-
*/
|
|
16
|
-
configFile?: string;
|
|
17
|
-
/**
|
|
18
|
-
* The list of content collections to include.
|
|
19
|
-
*/
|
|
20
|
-
collections?: AnyCollection[];
|
|
21
|
-
/**
|
|
22
|
-
* The path to the content collection output files generated by the plugin.
|
|
23
|
-
*
|
|
24
|
-
* @remarks
|
|
25
|
-
* If using the default value, the file can be imported from "powerlines:content/collection-name". This field allows the use of the "\{builtinsPath\}" token to refer to the built-in Powerlines plugins directory - the value will be replaced with the correct file path by the plugin.
|
|
26
|
-
*
|
|
27
|
-
* @defaultValue "\{builtinsPath\}/content"
|
|
28
|
-
*/
|
|
29
|
-
outputPath?: string;
|
|
30
|
-
}
|
|
31
|
-
type ContentCollectionsPluginUserConfig = UserConfig & {
|
|
32
|
-
contentCollections?: ContentCollectionsPluginOptions;
|
|
33
|
-
};
|
|
34
|
-
type ContentCollectionsPluginResolvedConfig = ResolvedConfig & {
|
|
35
|
-
contentCollections: Required<Omit<ContentCollectionsPluginOptions, "outputPath">> & Pick<ContentCollectionsPluginOptions, "outputPath">;
|
|
36
|
-
};
|
|
37
|
-
type ContentCollectionsPluginContext<TResolvedConfig extends ContentCollectionsPluginResolvedConfig = ContentCollectionsPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
38
|
-
contentCollections: ContentCollectionsContext;
|
|
39
|
-
};
|
|
40
|
-
//#endregion
|
|
41
|
-
export { ContentCollectionsContext, ContentCollectionsPluginContext, ContentCollectionsPluginOptions, ContentCollectionsPluginResolvedConfig, ContentCollectionsPluginUserConfig };
|
|
42
|
-
//# sourceMappingURL=plugin.d.mts.map
|
|
1
|
+
import { a as ContentCollectionsPluginUserConfig, i as ContentCollectionsPluginResolvedConfig, n as ContentCollectionsPluginContext, r as ContentCollectionsPluginOptions, t as ContentCollectionsContext } from "../plugin-BOfMmWO0.mjs";
|
|
2
|
+
export { ContentCollectionsContext, ContentCollectionsPluginContext, ContentCollectionsPluginOptions, ContentCollectionsPluginResolvedConfig, ContentCollectionsPluginUserConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-content-collections",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.670",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Powerlines plugin to generate project code using Content Collections.",
|
|
6
6
|
"keywords": [
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
},
|
|
150
150
|
"devDependencies": {
|
|
151
151
|
"@content-collections/core": "^0.12.0",
|
|
152
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
152
|
+
"@powerlines/plugin-plugin": "^0.12.621",
|
|
153
153
|
"@types/node": "^25.9.5",
|
|
154
154
|
"@types/pluralize": "^0.0.33"
|
|
155
155
|
},
|
|
@@ -158,5 +158,5 @@
|
|
|
158
158
|
"@content-collections/core": { "optional": false }
|
|
159
159
|
},
|
|
160
160
|
"publishConfig": { "access": "public" },
|
|
161
|
-
"gitHead": "
|
|
161
|
+
"gitHead": "a060bb776b719e7628c30f82d4fb4305fbcd1581"
|
|
162
162
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-emitter.d.cts","names":[],"sources":["../../src/helpers/create-emitter.ts"],"mappings":";KAoBK,WAAW;UAEN;EACR,OAAO;;UAGC;EACR;;KAGG,aAAa,iBAAiB;UAEzB,qBAAqB;EAC7B,QAAQ;EACR,MAAM;;KAGH,KAAK,gBAAgB,kBAAkB;KACvC,SAAS,WAAW,OAAO;;;;;;iBAOhB,cAAc,gBAAgB;;KAGhC,aAAa,KAAK,UAAQ,KAC/B,MAAI,UACC,SAAS,QAAQ;KAGjB,aAAa,KAAK,eAAa,KACpC,MAAI,UACC,SAAS,aAAa;;EAOpB,OAAA,aAAa,KAAK,UAAQ,KAAO,MAAI,OAAS,QAAQ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-emitter.d.mts","names":[],"sources":["../../src/helpers/create-emitter.ts"],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-writer.d.cts","names":[],"sources":["../../src/helpers/create-writer.ts"],"mappings":";;;;;;;;;cA8Ca,eACX,SAAS,oCACR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-writer.d.mts","names":[],"sources":["../../src/helpers/create-writer.ts"],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;KAyBY,4BAA4B,KACtC,QAAQ,kBAAkB;EAEtB,SAAS;;UAEE;;;;;;;;;EASf;;;;EAKA,cAAc;;;;;;;;;EAUd;;KAGU,qCAAqC;EAC/C,qBAAqB;;KAGX,yCAAyC;EACnD,oBAAoB,SAClB,KAAK,kDAEL,KAAK;;KAGG,gCACV,wBAAwB,yCACtB,0CACA,cAAc;EAChB,oBAAoB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":""}
|