@powerlines/plugin-content-collections 0.1.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.
@@ -0,0 +1,7 @@
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkFBBMZ4NC_cjs=require('../chunk-FBBMZ4NC.cjs'),core=require('@content-collections/core'),exists=require('@stryke/fs/exists'),join=require('@stryke/path/join'),c=require('defu'),node_crypto=require('node:crypto'),createEmitter=require('./helpers/create-emitter'),createWriter=require('./helpers/create-writer'),helpers=require('./helpers'),types=require('./types');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var c__default=/*#__PURE__*/_interopDefault(c);/*****************************************
2
+ *
3
+ * ⚡ Built by Storm Software
4
+ *
5
+ *****************************************/
6
+
7
+ const u=chunkFBBMZ4NC_cjs.a(r=>({name:"content-collections",config(){return {contentCollections:c__default.default(r,{configFile:"{projectRoot}/content-collections.ts",collections:[]})}},async configResolved(){this.config.contentCollections.configFile||=this.config.contentCollections.configFile?.replace("{projectRoot}",join.joinPaths(this.workspaceConfig.workspaceRoot,this.config.projectRoot)),this.config.contentCollections.generatedPath||=this.config.contentCollections.generatedPath?.replace("{projectRoot}",join.joinPaths(this.workspaceConfig.workspaceRoot,this.config.projectRoot))?.replace("{builtinPath}",this.builtinsPath);const i=createEmitter.createEmitter(),s=core.createConfigurationReader();let t={};try{exists.existsSync(this.config.contentCollections.configFile)&&(t=await s(this.config.contentCollections.configFile,{configName:"config.mjs",cacheDir:join.joinPaths(this.cachePath,"content-collections")}));}catch{}t=c__default.default(t??{},this.config.contentCollections),t.checksum=node_crypto.createHash("sha256").update(JSON.stringify(t)).digest("hex");const n=await core.createBuildContext({emitter:i,baseDirectory:join.joinPaths(this.workspaceConfig.workspaceRoot,this.config.projectRoot),outputDirectory:this.config.contentCollections.generatedPath||join.joinPaths(this.builtinsPath,"content"),configuration:t});n.writer=createWriter.createWriter(this),this.contentCollections={context:n,build:chunkFBBMZ4NC_cjs.a(async()=>core.build(n),"build"),on:i.on};},async prepare(){return this.contentCollections.build()}}),"plugin");var S=u;exports.default=S;exports.plugin=u;Object.keys(helpers).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return helpers[k]}})});Object.keys(types).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return types[k]}})});
@@ -0,0 +1,35 @@
1
+ import { C as ContentCollectionsPluginContext, a as ContentCollectionsPluginOptions, P as Plugin } from '../index-3C9UezFx.cjs';
2
+ export { b as ContentCollectionsContext, d as ContentCollectionsPluginResolvedConfig, c as ContentCollectionsPluginUserConfig } from '../index-3C9UezFx.cjs';
3
+ export { createEmitter } from '../helpers/create-emitter.cjs';
4
+ export { createWriter } from '../helpers/create-writer.cjs';
5
+ import '@content-collections/core';
6
+ import '@storm-software/build-tools/types';
7
+ import '@storm-software/config-tools/types';
8
+ import '@storm-software/config/types';
9
+ import '@stryke/types/base';
10
+ import '@stryke/types/configuration';
11
+ import '@stryke/types/file';
12
+ import 'vite';
13
+ import '@stryke/env/get-env-paths';
14
+ import '@stryke/types/package-json';
15
+ import 'jiti';
16
+ import 'oxc-parser';
17
+ import 'semver';
18
+ import 'unplugin';
19
+ import '@stryke/types/tsconfig';
20
+ import 'typescript';
21
+ import '@stryke/json/types';
22
+ import 'memfs';
23
+ import 'node:fs';
24
+ import 'unionfs';
25
+ import '@stryke/types/array';
26
+
27
+ /**
28
+ * A Powerlines plugin to integrate Content Collections for code generation.
29
+ *
30
+ * @param options - The plugin options.
31
+ * @returns A Powerlines plugin instance.
32
+ */
33
+ declare const plugin: <TContext extends ContentCollectionsPluginContext = ContentCollectionsPluginContext>(options: ContentCollectionsPluginOptions) => Plugin<TContext>;
34
+
35
+ export { ContentCollectionsPluginContext, ContentCollectionsPluginOptions, plugin as default, plugin };
@@ -0,0 +1,35 @@
1
+ import { C as ContentCollectionsPluginContext, a as ContentCollectionsPluginOptions, P as Plugin } from '../index-3C9UezFx.js';
2
+ export { b as ContentCollectionsContext, d as ContentCollectionsPluginResolvedConfig, c as ContentCollectionsPluginUserConfig } from '../index-3C9UezFx.js';
3
+ export { createEmitter } from '../helpers/create-emitter.js';
4
+ export { createWriter } from '../helpers/create-writer.js';
5
+ import '@content-collections/core';
6
+ import '@storm-software/build-tools/types';
7
+ import '@storm-software/config-tools/types';
8
+ import '@storm-software/config/types';
9
+ import '@stryke/types/base';
10
+ import '@stryke/types/configuration';
11
+ import '@stryke/types/file';
12
+ import 'vite';
13
+ import '@stryke/env/get-env-paths';
14
+ import '@stryke/types/package-json';
15
+ import 'jiti';
16
+ import 'oxc-parser';
17
+ import 'semver';
18
+ import 'unplugin';
19
+ import '@stryke/types/tsconfig';
20
+ import 'typescript';
21
+ import '@stryke/json/types';
22
+ import 'memfs';
23
+ import 'node:fs';
24
+ import 'unionfs';
25
+ import '@stryke/types/array';
26
+
27
+ /**
28
+ * A Powerlines plugin to integrate Content Collections for code generation.
29
+ *
30
+ * @param options - The plugin options.
31
+ * @returns A Powerlines plugin instance.
32
+ */
33
+ declare const plugin: <TContext extends ContentCollectionsPluginContext = ContentCollectionsPluginContext>(options: ContentCollectionsPluginOptions) => Plugin<TContext>;
34
+
35
+ export { ContentCollectionsPluginContext, ContentCollectionsPluginOptions, plugin as default, plugin };
@@ -0,0 +1,7 @@
1
+ import {a}from'../chunk-UCUR73HG.js';import {createConfigurationReader,createBuildContext,build}from'@content-collections/core';import {existsSync}from'@stryke/fs/exists';import {joinPaths}from'@stryke/path/join';import c from'defu';import {createHash}from'node:crypto';import {createEmitter}from'./helpers/create-emitter';import {createWriter}from'./helpers/create-writer';export*from'./helpers';export*from'./types';/*****************************************
2
+ *
3
+ * ⚡ Built by Storm Software
4
+ *
5
+ *****************************************/
6
+
7
+ const u=a(r=>({name:"content-collections",config(){return {contentCollections:c(r,{configFile:"{projectRoot}/content-collections.ts",collections:[]})}},async configResolved(){this.config.contentCollections.configFile||=this.config.contentCollections.configFile?.replace("{projectRoot}",joinPaths(this.workspaceConfig.workspaceRoot,this.config.projectRoot)),this.config.contentCollections.generatedPath||=this.config.contentCollections.generatedPath?.replace("{projectRoot}",joinPaths(this.workspaceConfig.workspaceRoot,this.config.projectRoot))?.replace("{builtinPath}",this.builtinsPath);const i=createEmitter(),s=createConfigurationReader();let t={};try{existsSync(this.config.contentCollections.configFile)&&(t=await s(this.config.contentCollections.configFile,{configName:"config.mjs",cacheDir:joinPaths(this.cachePath,"content-collections")}));}catch{}t=c(t??{},this.config.contentCollections),t.checksum=createHash("sha256").update(JSON.stringify(t)).digest("hex");const n=await createBuildContext({emitter:i,baseDirectory:joinPaths(this.workspaceConfig.workspaceRoot,this.config.projectRoot),outputDirectory:this.config.contentCollections.generatedPath||joinPaths(this.builtinsPath,"content"),configuration:t});n.writer=createWriter(this),this.contentCollections={context:n,build:a(async()=>build(n),"build"),on:i.on};},async prepare(){return this.contentCollections.build()}}),"plugin");var T=u;export{T as default,u as plugin};
@@ -0,0 +1 @@
1
+ 'use strict';var plugin=require('./plugin');Object.keys(plugin).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return plugin[k]}})});
@@ -0,0 +1,22 @@
1
+ export { b as ContentCollectionsContext, C as ContentCollectionsPluginContext, a as ContentCollectionsPluginOptions, d as ContentCollectionsPluginResolvedConfig, c as ContentCollectionsPluginUserConfig } from '../index-3C9UezFx.cjs';
2
+ import '@content-collections/core';
3
+ import '@storm-software/build-tools/types';
4
+ import '@storm-software/config-tools/types';
5
+ import '@storm-software/config/types';
6
+ import '@stryke/types/base';
7
+ import '@stryke/types/configuration';
8
+ import '@stryke/types/file';
9
+ import 'vite';
10
+ import '@stryke/env/get-env-paths';
11
+ import '@stryke/types/package-json';
12
+ import 'jiti';
13
+ import 'oxc-parser';
14
+ import 'semver';
15
+ import 'unplugin';
16
+ import '@stryke/types/tsconfig';
17
+ import 'typescript';
18
+ import '@stryke/json/types';
19
+ import 'memfs';
20
+ import 'node:fs';
21
+ import 'unionfs';
22
+ import '@stryke/types/array';
@@ -0,0 +1,22 @@
1
+ export { b as ContentCollectionsContext, C as ContentCollectionsPluginContext, a as ContentCollectionsPluginOptions, d as ContentCollectionsPluginResolvedConfig, c as ContentCollectionsPluginUserConfig } from '../index-3C9UezFx.js';
2
+ import '@content-collections/core';
3
+ import '@storm-software/build-tools/types';
4
+ import '@storm-software/config-tools/types';
5
+ import '@storm-software/config/types';
6
+ import '@stryke/types/base';
7
+ import '@stryke/types/configuration';
8
+ import '@stryke/types/file';
9
+ import 'vite';
10
+ import '@stryke/env/get-env-paths';
11
+ import '@stryke/types/package-json';
12
+ import 'jiti';
13
+ import 'oxc-parser';
14
+ import 'semver';
15
+ import 'unplugin';
16
+ import '@stryke/types/tsconfig';
17
+ import 'typescript';
18
+ import '@stryke/json/types';
19
+ import 'memfs';
20
+ import 'node:fs';
21
+ import 'unionfs';
22
+ import '@stryke/types/array';
@@ -0,0 +1 @@
1
+ export*from'./plugin';
@@ -0,0 +1 @@
1
+ 'use strict';
@@ -0,0 +1,22 @@
1
+ import '@content-collections/core';
2
+ export { b as ContentCollectionsContext, C as ContentCollectionsPluginContext, a as ContentCollectionsPluginOptions, d as ContentCollectionsPluginResolvedConfig, c as ContentCollectionsPluginUserConfig } from '../index-3C9UezFx.cjs';
3
+ import '@storm-software/build-tools/types';
4
+ import '@storm-software/config-tools/types';
5
+ import '@storm-software/config/types';
6
+ import '@stryke/types/base';
7
+ import '@stryke/types/configuration';
8
+ import '@stryke/types/file';
9
+ import 'vite';
10
+ import '@stryke/env/get-env-paths';
11
+ import '@stryke/types/package-json';
12
+ import 'jiti';
13
+ import 'oxc-parser';
14
+ import 'semver';
15
+ import 'unplugin';
16
+ import '@stryke/types/tsconfig';
17
+ import 'typescript';
18
+ import '@stryke/json/types';
19
+ import 'memfs';
20
+ import 'node:fs';
21
+ import 'unionfs';
22
+ import '@stryke/types/array';
@@ -0,0 +1,22 @@
1
+ import '@content-collections/core';
2
+ export { b as ContentCollectionsContext, C as ContentCollectionsPluginContext, a as ContentCollectionsPluginOptions, d as ContentCollectionsPluginResolvedConfig, c as ContentCollectionsPluginUserConfig } from '../index-3C9UezFx.js';
3
+ import '@storm-software/build-tools/types';
4
+ import '@storm-software/config-tools/types';
5
+ import '@storm-software/config/types';
6
+ import '@stryke/types/base';
7
+ import '@stryke/types/configuration';
8
+ import '@stryke/types/file';
9
+ import 'vite';
10
+ import '@stryke/env/get-env-paths';
11
+ import '@stryke/types/package-json';
12
+ import 'jiti';
13
+ import 'oxc-parser';
14
+ import 'semver';
15
+ import 'unplugin';
16
+ import '@stryke/types/tsconfig';
17
+ import 'typescript';
18
+ import '@stryke/json/types';
19
+ import 'memfs';
20
+ import 'node:fs';
21
+ import 'unionfs';
22
+ import '@stryke/types/array';
File without changes
package/package.json ADDED
@@ -0,0 +1,126 @@
1
+ {
2
+ "name": "@powerlines/plugin-content-collections",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "A Powerlines plugin to generate project code using Content Collections.",
6
+ "repository": {
7
+ "type": "github",
8
+ "url": "https://github.com/storm-software/powerlines.git",
9
+ "directory": "packages/plugin-content-collections"
10
+ },
11
+ "homepage": "https://stormsoftware.com",
12
+ "bugs": {
13
+ "url": "https://stormsoftware.com/support",
14
+ "email": "support@stormsoftware.com"
15
+ },
16
+ "author": {
17
+ "name": "Storm Software",
18
+ "email": "contact@stormsoftware.com",
19
+ "url": "https://stormsoftware.com"
20
+ },
21
+ "maintainers": [
22
+ {
23
+ "name": "Storm Software",
24
+ "email": "contact@stormsoftware.com",
25
+ "url": "https://stormsoftware.com"
26
+ }
27
+ ],
28
+ "contributors": [
29
+ {
30
+ "name": "Storm Software",
31
+ "email": "contact@stormsoftware.com",
32
+ "url": "https://stormsoftware.com"
33
+ }
34
+ ],
35
+ "funding": {
36
+ "type": "github",
37
+ "url": "https://github.com/sponsors/storm-software"
38
+ },
39
+ "license": "Apache-2.0",
40
+ "private": false,
41
+ "main": "dist/index.cjs",
42
+ "module": "dist/index.js",
43
+ "exports": {
44
+ "./package.json": "./package.json",
45
+ ".": {
46
+ "import": { "types": "./dist/index.d.ts", "default": "./dist/index.js" },
47
+ "require": {
48
+ "types": "./dist/index.d.cts",
49
+ "default": "./dist/index.cjs"
50
+ },
51
+ "default": { "types": "./dist/index.d.ts", "default": "./dist/index.js" }
52
+ },
53
+ "./index": {
54
+ "import": { "types": "./dist/index.d.ts", "default": "./dist/index.js" },
55
+ "require": {
56
+ "types": "./dist/index.d.cts",
57
+ "default": "./dist/index.cjs"
58
+ },
59
+ "default": { "types": "./dist/index.d.ts", "default": "./dist/index.js" }
60
+ },
61
+ "./plugin": {
62
+ "import": { "types": "./dist/index.d.ts", "default": "./dist/index.js" },
63
+ "require": {
64
+ "types": "./dist/index.d.cts",
65
+ "default": "./dist/index.cjs"
66
+ },
67
+ "default": { "types": "./dist/index.d.ts", "default": "./dist/index.js" }
68
+ },
69
+ "./types": {
70
+ "import": {
71
+ "types": "./dist/types/index.d.ts",
72
+ "default": "./dist/types/index.js"
73
+ },
74
+ "require": {
75
+ "types": "./dist/types/index.d.cts",
76
+ "default": "./dist/types/index.cjs"
77
+ },
78
+ "default": {
79
+ "types": "./dist/types/index.d.ts",
80
+ "default": "./dist/types/index.js"
81
+ }
82
+ },
83
+ "./types/*": {
84
+ "import": {
85
+ "types": "./dist/types/*.d.ts",
86
+ "default": "./dist/types/*.js"
87
+ },
88
+ "require": {
89
+ "types": "./dist/types/*.d.cts",
90
+ "default": "./dist/types/*.cjs"
91
+ },
92
+ "default": {
93
+ "types": "./dist/types/*.d.ts",
94
+ "default": "./dist/types/*.js"
95
+ }
96
+ }
97
+ },
98
+ "typings": "dist/index.d.ts",
99
+ "files": ["dist/**/*"],
100
+ "keywords": [
101
+ "content-collections",
102
+ "powerlines",
103
+ "storm-software",
104
+ "powerlines-plugin"
105
+ ],
106
+ "dependencies": {
107
+ "@content-collections/core": "^0.12.0",
108
+ "@stryke/fs": "^0.32.10",
109
+ "@stryke/string-format": "^0.12.0",
110
+ "@stryke/path": "^0.18.5",
111
+ "@stryke/type-checks": "^0.3.10",
112
+ "@stryke/types": "^0.10.0",
113
+ "defu": "^6.1.4",
114
+ "pluralize": "^8.0.0",
115
+ "powerlines": "^0.15.0"
116
+ },
117
+ "devDependencies": {
118
+ "@powerlines/nx": "^0.10.0",
119
+ "@powerlines/plugin-plugin": "^0.11.8",
120
+ "@standard-schema/spec": "^1.0.0",
121
+ "@types/node": "^22.19.0",
122
+ "@types/pluralize": "^0.0.33"
123
+ },
124
+ "publishConfig": { "access": "public" },
125
+ "gitHead": "b64f9a9d53b6eb8054c361da347f6623a7ba9e45"
126
+ }