@powerlines/plugin-alloy 0.26.262 → 0.26.263
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/render.cjs +3 -2
- package/dist/render.d.cts +2 -1
- package/dist/render.d.cts.map +1 -1
- package/dist/render.d.mts +2 -1
- package/dist/render.mjs +3 -2
- package/package.json +23 -24
package/dist/render.cjs
CHANGED
|
@@ -31,13 +31,14 @@ function getDocumentContents(document) {
|
|
|
31
31
|
*
|
|
32
32
|
* @param context - The Powerlines plugin context.
|
|
33
33
|
* @param template - The children components to render.
|
|
34
|
+
* @param spec - The spec to use for the render.
|
|
34
35
|
* @returns A promise that resolves when rendering is complete.
|
|
35
36
|
*/
|
|
36
|
-
async function render(context, template) {
|
|
37
|
+
async function render(context, template, spec) {
|
|
37
38
|
const documents = await (0, _power_plant_alloy_js_generate.generate)((0, _alloy_js_core_jsx_runtime.createComponent)(require_core_contexts_context.PowerlinesContext.Provider, {
|
|
38
39
|
value: context,
|
|
39
40
|
children: template
|
|
40
|
-
}), {}, {
|
|
41
|
+
}), { input: spec ?? {} }, {
|
|
41
42
|
cwd: context.config.cwd,
|
|
42
43
|
logger: {
|
|
43
44
|
debug: (message) => context.debug(message),
|
package/dist/render.d.cts
CHANGED
|
@@ -42,9 +42,10 @@ interface MetaItem extends MetaConfig {
|
|
|
42
42
|
*
|
|
43
43
|
* @param context - The Powerlines plugin context.
|
|
44
44
|
* @param template - The children components to render.
|
|
45
|
+
* @param spec - The spec to use for the render.
|
|
45
46
|
* @returns A promise that resolves when rendering is complete.
|
|
46
47
|
*/
|
|
47
|
-
declare function render<TContext extends PluginContext>(context: TContext, template: Children): Promise<void>;
|
|
48
|
+
declare function render<TContext extends PluginContext, TSpec = any>(context: TContext, template: Children, spec: TSpec): Promise<void>;
|
|
48
49
|
/**
|
|
49
50
|
* A function to render children components within the [Alloy](https://alloy-framework.github.io) context and return the rendered output as a string.
|
|
50
51
|
*
|
package/dist/render.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.cts","names":[],"sources":["../src/render.tsx"],"mappings":";;;;UA4BiB,iBAAiB;;;;EAIhC;;;;EAKA;;;;EAKA,UAAU;;;;EAKV;;;;EAKA,iBAAiB;GAEhB
|
|
1
|
+
{"version":3,"file":"render.d.cts","names":[],"sources":["../src/render.tsx"],"mappings":";;;;UA4BiB,iBAAiB;;;;EAIhC;;;;EAKA;;;;EAKA,UAAU;;;;EAKV;;;;EAKA,iBAAiB;GAEhB;;;;;;;;;;;;;;;;;;;;;;iBA+BmB,OAAO,iBAAiB,eAAe,aAC3D,SAAS,UACT,UAAU,UACV,MAAM,QAAK;;;;;;;;;;;;;;;;iBAmGG,aAAa,iBAAiB,eAC5C,SAAS,UACT,UAAU,UACV,UAAU"}
|
package/dist/render.d.mts
CHANGED
|
@@ -42,9 +42,10 @@ interface MetaItem extends MetaConfig {
|
|
|
42
42
|
*
|
|
43
43
|
* @param context - The Powerlines plugin context.
|
|
44
44
|
* @param template - The children components to render.
|
|
45
|
+
* @param spec - The spec to use for the render.
|
|
45
46
|
* @returns A promise that resolves when rendering is complete.
|
|
46
47
|
*/
|
|
47
|
-
declare function render<TContext extends PluginContext>(context: TContext, template: Children): Promise<void>;
|
|
48
|
+
declare function render<TContext extends PluginContext, TSpec = any>(context: TContext, template: Children, spec: TSpec): Promise<void>;
|
|
48
49
|
/**
|
|
49
50
|
* A function to render children components within the [Alloy](https://alloy-framework.github.io) context and return the rendered output as a string.
|
|
50
51
|
*
|
package/dist/render.mjs
CHANGED
|
@@ -30,13 +30,14 @@ function getDocumentContents(document) {
|
|
|
30
30
|
*
|
|
31
31
|
* @param context - The Powerlines plugin context.
|
|
32
32
|
* @param template - The children components to render.
|
|
33
|
+
* @param spec - The spec to use for the render.
|
|
33
34
|
* @returns A promise that resolves when rendering is complete.
|
|
34
35
|
*/
|
|
35
|
-
async function render(context, template) {
|
|
36
|
+
async function render(context, template, spec) {
|
|
36
37
|
const documents = await generate(createComponent(PowerlinesContext.Provider, {
|
|
37
38
|
value: context,
|
|
38
39
|
children: template
|
|
39
|
-
}), {}, {
|
|
40
|
+
}), { input: spec ?? {} }, {
|
|
40
41
|
cwd: context.config.cwd,
|
|
41
42
|
logger: {
|
|
42
43
|
debug: (message) => context.debug(message),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-alloy",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.263",
|
|
4
4
|
"description": "A Powerlines plugin to generate project code using Alloy JS via Power Plant.",
|
|
5
5
|
"keywords": ["alloy-js", "powerlines", "powerlines-plugin"],
|
|
6
6
|
"homepage": "https://stormsoftware.com",
|
|
@@ -285,32 +285,31 @@
|
|
|
285
285
|
"typings": "./dist/index.d.mts",
|
|
286
286
|
"files": ["dist"],
|
|
287
287
|
"dependencies": {
|
|
288
|
-
"@alloy-js/core": "
|
|
289
|
-
"@alloy-js/typescript": "
|
|
290
|
-
"@babel/preset-typescript": "
|
|
291
|
-
"@power-plant/alloy-js": "
|
|
292
|
-
"@power-plant/core": "
|
|
293
|
-
"@power-plant/schema": "
|
|
294
|
-
"@powerlines/plugin-babel": "
|
|
295
|
-
"@powerlines/plugin-power-plant": "
|
|
296
|
-
"@storm-software/config-tools": "
|
|
297
|
-
"@stryke/capnp": "
|
|
298
|
-
"@stryke/convert": "
|
|
299
|
-
"@stryke/helpers": "
|
|
300
|
-
"@stryke/json": "
|
|
301
|
-
"@stryke/path": "
|
|
302
|
-
"@stryke/string-format": "
|
|
303
|
-
"@stryke/type-checks": "
|
|
304
|
-
"defu": "
|
|
305
|
-
"powerlines": "
|
|
288
|
+
"@alloy-js/core": "catalog:",
|
|
289
|
+
"@alloy-js/typescript": "catalog:",
|
|
290
|
+
"@babel/preset-typescript": "catalog:",
|
|
291
|
+
"@power-plant/alloy-js": "catalog:",
|
|
292
|
+
"@power-plant/core": "catalog:",
|
|
293
|
+
"@power-plant/schema": "catalog:",
|
|
294
|
+
"@powerlines/plugin-babel": "workspace:*",
|
|
295
|
+
"@powerlines/plugin-power-plant": "workspace:*",
|
|
296
|
+
"@storm-software/config-tools": "catalog:",
|
|
297
|
+
"@stryke/capnp": "catalog:",
|
|
298
|
+
"@stryke/convert": "catalog:",
|
|
299
|
+
"@stryke/helpers": "catalog:",
|
|
300
|
+
"@stryke/json": "catalog:",
|
|
301
|
+
"@stryke/path": "catalog:",
|
|
302
|
+
"@stryke/string-format": "catalog:",
|
|
303
|
+
"@stryke/type-checks": "catalog:",
|
|
304
|
+
"defu": "catalog:",
|
|
305
|
+
"powerlines": "workspace:*"
|
|
306
306
|
},
|
|
307
307
|
"devDependencies": {
|
|
308
|
-
"@alloy-js/babel-preset": "
|
|
309
|
-
"@powerlines/plugin-plugin": "
|
|
310
|
-
"@types/node": "
|
|
308
|
+
"@alloy-js/babel-preset": "catalog:",
|
|
309
|
+
"@powerlines/plugin-plugin": "workspace:*",
|
|
310
|
+
"@types/node": "catalog:"
|
|
311
311
|
},
|
|
312
312
|
"peerDependencies": { "@alloy-js/babel-preset": ">=0.3.0" },
|
|
313
313
|
"peerDependenciesMeta": { "@alloy-js/babel-preset": { "optional": false } },
|
|
314
|
-
"publishConfig": { "access": "public" }
|
|
315
|
-
"gitHead": "9c3409b80ff2907b0e7d966b5bb8ad1188531f54"
|
|
314
|
+
"publishConfig": { "access": "public" }
|
|
316
315
|
}
|