@powerlines/plugin-power-plant 0.1.7 → 0.1.9

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,22 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_helpers_storage_adapter = require('./storage-adapter.cjs');
3
+ let _power_plant_schema = require("@power-plant/schema");
4
+
5
+ //#region src/helpers/extract.ts
6
+ /**
7
+ * Extracts the schema using the provided context.
8
+ *
9
+ * @param context - The context to use.
10
+ * @param schema - The schema to extract.
11
+ * @returns The extracted schema.
12
+ */
13
+ async function extract(context, schema) {
14
+ return (0, _power_plant_schema.extract)(schema, {
15
+ cwd: context.cwd,
16
+ tsconfig: context.tsconfig.tsconfigFilePath,
17
+ storage: require_helpers_storage_adapter.createStorageAdapter(context.fs)
18
+ });
19
+ }
20
+
21
+ //#endregion
22
+ exports.extract = extract;
@@ -0,0 +1,14 @@
1
+ import { SchemaConfig } from "@power-plant/schema";
2
+ import { Context } from "@powerlines/core";
3
+ //#region src/helpers/extract.d.ts
4
+ /**
5
+ * Extracts the schema using the provided context.
6
+ *
7
+ * @param context - The context to use.
8
+ * @param schema - The schema to extract.
9
+ * @returns The extracted schema.
10
+ */
11
+ declare function extract<TSchema extends SchemaConfig>(context: Context, schema: SchemaConfig<TSchema>): Promise<import("@power-plant/schema").SchemaEnvelopeOf<TSchema>>;
12
+ //#endregion
13
+ export { extract };
14
+ //# sourceMappingURL=extract.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract.d.cts","names":[],"sources":["../../src/helpers/extract.ts"],"mappings":";;;;;;;;;;iBA6BsB,QAAQ,gBAAgB,cAC5C,SAAS,SACT,QAAQ,aAAa,WAAQ,sCAAA,iBAAA"}
@@ -0,0 +1,14 @@
1
+ import { SchemaConfig } from "@power-plant/schema";
2
+ import { Context } from "@powerlines/core";
3
+ //#region src/helpers/extract.d.ts
4
+ /**
5
+ * Extracts the schema using the provided context.
6
+ *
7
+ * @param context - The context to use.
8
+ * @param schema - The schema to extract.
9
+ * @returns The extracted schema.
10
+ */
11
+ declare function extract<TSchema extends SchemaConfig>(context: Context, schema: SchemaConfig<TSchema>): Promise<import("@power-plant/schema").SchemaEnvelopeOf<TSchema>>;
12
+ //#endregion
13
+ export { extract };
14
+ //# sourceMappingURL=extract.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract.d.mts","names":[],"sources":["../../src/helpers/extract.ts"],"mappings":""}
@@ -0,0 +1,22 @@
1
+ import { createStorageAdapter } from "./storage-adapter.mjs";
2
+ import { extract as extract$1 } from "@power-plant/schema";
3
+
4
+ //#region src/helpers/extract.ts
5
+ /**
6
+ * Extracts the schema using the provided context.
7
+ *
8
+ * @param context - The context to use.
9
+ * @param schema - The schema to extract.
10
+ * @returns The extracted schema.
11
+ */
12
+ async function extract(context, schema) {
13
+ return extract$1(schema, {
14
+ cwd: context.cwd,
15
+ tsconfig: context.tsconfig.tsconfigFilePath,
16
+ storage: createStorageAdapter(context.fs)
17
+ });
18
+ }
19
+
20
+ //#endregion
21
+ export { extract };
22
+ //# sourceMappingURL=extract.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract.mjs","names":[],"sources":[],"mappings":""}
@@ -1,4 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_helpers_storage_adapter = require('./storage-adapter.cjs');
3
+ const require_helpers_extract = require('./extract.cjs');
3
4
 
4
- exports.createStorageAdapter = require_helpers_storage_adapter.createStorageAdapter;
5
+ exports.createStorageAdapter = require_helpers_storage_adapter.createStorageAdapter;
6
+ exports.extract = require_helpers_extract.extract;
@@ -1,2 +1,3 @@
1
+ import { extract } from "./extract.cjs";
1
2
  import { createStorageAdapter } from "./storage-adapter.cjs";
2
- export { createStorageAdapter };
3
+ export { createStorageAdapter, extract };
@@ -1,2 +1,3 @@
1
+ import { extract } from "./extract.mjs";
1
2
  import { createStorageAdapter } from "./storage-adapter.mjs";
2
- export { createStorageAdapter };
3
+ export { createStorageAdapter, extract };
@@ -1,3 +1,4 @@
1
1
  import { createStorageAdapter } from "./storage-adapter.mjs";
2
+ import { extract } from "./extract.mjs";
2
3
 
3
- export { createStorageAdapter };
4
+ export { createStorageAdapter, extract };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-power-plant",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin to generate project code using Power Plant.",
6
6
  "repository": {
@@ -69,6 +69,20 @@
69
69
  "default": "./dist/helpers/index.mjs"
70
70
  }
71
71
  },
72
+ "./helpers/extract": {
73
+ "require": {
74
+ "types": "./dist/helpers/extract.d.cts",
75
+ "default": "./dist/helpers/extract.cjs"
76
+ },
77
+ "import": {
78
+ "types": "./dist/helpers/extract.d.mts",
79
+ "default": "./dist/helpers/extract.mjs"
80
+ },
81
+ "default": {
82
+ "types": "./dist/helpers/extract.d.mts",
83
+ "default": "./dist/helpers/extract.mjs"
84
+ }
85
+ },
72
86
  "./helpers/storage-adapter": {
73
87
  "require": {
74
88
  "types": "./dist/helpers/storage-adapter.d.cts",
@@ -122,17 +136,18 @@
122
136
  "powerlines-plugin"
123
137
  ],
124
138
  "dependencies": {
125
- "@power-plant/core": "^0.0.26",
139
+ "@power-plant/core": "^0.0.29",
140
+ "@power-plant/schema": "^0.0.28",
126
141
  "@stryke/string-format": "^0.17.38",
127
142
  "@stryke/type-checks": "^0.6.29",
128
- "powerlines": "^0.47.151",
143
+ "powerlines": "^0.47.153",
129
144
  "unstorage": "^1.17.5"
130
145
  },
131
146
  "devDependencies": {
132
- "@powerlines/plugin-plugin": "^0.12.563",
147
+ "@powerlines/plugin-plugin": "^0.12.565",
133
148
  "@types/node": "^25.9.5"
134
149
  },
135
150
  "publishConfig": { "access": "public" },
136
151
  "types": "./dist/index.d.cts",
137
- "gitHead": "6060a007470f2b07ed9c6fcb5249d5c2a3c68477"
152
+ "gitHead": "97f013c6a63821a328bd622c0227bde9baa9e2ee"
138
153
  }