@powerlines/plugin-alloy 0.26.271 → 0.26.272
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.
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_core_contexts_context = require('../../core/contexts/context.cjs');
|
|
3
|
+
const require_helpers_prefix = require('../../helpers/prefix.cjs');
|
|
3
4
|
let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
4
5
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
5
6
|
let _alloy_js_core = require("@alloy-js/core");
|
|
6
7
|
let _stryke_path_replace = require("@stryke/path/replace");
|
|
7
|
-
let _stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
|
|
8
8
|
let _power_plant_alloy_js_typescript_components_tsdoc = require("@power-plant/alloy-js/typescript/components/tsdoc");
|
|
9
9
|
let _power_plant_alloy_js_typescript_components_typescript_file = require("@power-plant/alloy-js/typescript/components/typescript-file");
|
|
10
10
|
let _stryke_type_checks_is_set = require("@stryke/type-checks/is-set");
|
|
@@ -28,22 +28,25 @@ function BuiltinFile(props) {
|
|
|
28
28
|
]);
|
|
29
29
|
const context = require_core_contexts_context.usePowerlinesSafe();
|
|
30
30
|
const path = (0, _alloy_js_core.computed)(() => (0, _stryke_path_replace.replacePath)(`${!(0, _stryke_type_checks_is_set.isSet)(tsx) ? id : (0, _stryke_path_replace.replaceExtension)(id)}${(0, _stryke_path_file_path_fns.hasFileExtension)(id) && !(0, _stryke_type_checks_is_set.isSet)(tsx) ? "" : tsx ? ".tsx" : ".ts"}`, context?.builtinsPath));
|
|
31
|
+
const prefix = (0, _alloy_js_core.computed)(() => require_helpers_prefix.getPrefix(context));
|
|
31
32
|
return (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_typescript_file.TypescriptFile, (0, _alloy_js_core_jsx_runtime.mergeProps)({
|
|
32
33
|
get prefix() {
|
|
33
|
-
return
|
|
34
|
+
return prefix.value;
|
|
34
35
|
},
|
|
35
36
|
get header() {
|
|
36
37
|
return (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_typescript_file.TypescriptFileHeader, {
|
|
37
38
|
get header() {
|
|
38
39
|
return (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocModule, {
|
|
39
|
-
name
|
|
40
|
+
get name() {
|
|
41
|
+
return `${prefix.value}:${id}`;
|
|
42
|
+
},
|
|
40
43
|
children: description
|
|
41
44
|
});
|
|
42
45
|
},
|
|
43
46
|
get children() {
|
|
44
47
|
return (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_typescript_file.TypescriptFileHeaderImports, {
|
|
45
48
|
get prefix() {
|
|
46
|
-
return
|
|
49
|
+
return prefix.value;
|
|
47
50
|
},
|
|
48
51
|
imports,
|
|
49
52
|
builtinImports
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { usePowerlinesSafe } from "../../core/contexts/context.mjs";
|
|
2
|
+
import { getPrefix } from "../../helpers/prefix.mjs";
|
|
2
3
|
import { hasFileExtension } from "@stryke/path/file-path-fns";
|
|
3
4
|
import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
4
5
|
import { computed, splitProps } from "@alloy-js/core";
|
|
5
6
|
import { replaceExtension, replacePath } from "@stryke/path/replace";
|
|
6
|
-
import { kebabCase } from "@stryke/string-format/kebab-case";
|
|
7
7
|
import { TSDocModule } from "@power-plant/alloy-js/typescript/components/tsdoc";
|
|
8
8
|
import { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports } from "@power-plant/alloy-js/typescript/components/typescript-file";
|
|
9
9
|
import { isSet } from "@stryke/type-checks/is-set";
|
|
@@ -27,22 +27,25 @@ function BuiltinFile(props) {
|
|
|
27
27
|
]);
|
|
28
28
|
const context = usePowerlinesSafe();
|
|
29
29
|
const path = computed(() => replacePath(`${!isSet(tsx) ? id : replaceExtension(id)}${hasFileExtension(id) && !isSet(tsx) ? "" : tsx ? ".tsx" : ".ts"}`, context?.builtinsPath));
|
|
30
|
+
const prefix = computed(() => getPrefix(context));
|
|
30
31
|
return createComponent(TypescriptFile, mergeProps({
|
|
31
32
|
get prefix() {
|
|
32
|
-
return
|
|
33
|
+
return prefix.value;
|
|
33
34
|
},
|
|
34
35
|
get header() {
|
|
35
36
|
return createComponent(TypescriptFileHeader, {
|
|
36
37
|
get header() {
|
|
37
38
|
return createComponent(TSDocModule, {
|
|
38
|
-
name
|
|
39
|
+
get name() {
|
|
40
|
+
return `${prefix.value}:${id}`;
|
|
41
|
+
},
|
|
39
42
|
children: description
|
|
40
43
|
});
|
|
41
44
|
},
|
|
42
45
|
get children() {
|
|
43
46
|
return createComponent(TypescriptFileHeaderImports, {
|
|
44
47
|
get prefix() {
|
|
45
|
-
return
|
|
48
|
+
return prefix.value;
|
|
46
49
|
},
|
|
47
50
|
imports,
|
|
48
51
|
builtinImports
|
|
@@ -29,9 +29,11 @@ function EntryFile(props) {
|
|
|
29
29
|
]);
|
|
30
30
|
const context = require_core_contexts_context.usePowerlinesSafe();
|
|
31
31
|
const fullPath = (0, _alloy_js_core.computed)(() => context ? (0, _stryke_path_append.appendPath)(`${!(0, _stryke_type_checks_is_set.isSet)(tsx) ? path : (0, _stryke_path_replace.replaceExtension)(path)}${tsx ? ".tsx" : (0, _stryke_path_file_path_fns.hasFileExtension)(path) ? "" : ".ts"}`, (0, _stryke_path_replace.replacePath)(context.entryPath, context.config.cwd)) : path);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
const prefix = (0, _alloy_js_core.computed)(() => require_helpers_prefix.getPrefix(context));
|
|
33
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_typescript_file.TypescriptFile, (0, _alloy_js_core_jsx_runtime.mergeProps)(rest, {
|
|
34
|
+
get prefix() {
|
|
35
|
+
return prefix.value;
|
|
36
|
+
},
|
|
35
37
|
get path() {
|
|
36
38
|
return fullPath.value;
|
|
37
39
|
},
|
|
@@ -26,9 +26,11 @@ function EntryFile(props) {
|
|
|
26
26
|
]);
|
|
27
27
|
const context = usePowerlinesSafe();
|
|
28
28
|
const fullPath = computed(() => context ? appendPath(`${!isSet(tsx) ? path : replaceExtension(path)}${tsx ? ".tsx" : hasFileExtension(path) ? "" : ".ts"}`, replacePath(context.entryPath, context.config.cwd)) : path);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
const prefix = computed(() => getPrefix(context));
|
|
30
|
+
return createComponent(TypescriptFile, mergeProps(rest, {
|
|
31
|
+
get prefix() {
|
|
32
|
+
return prefix.value;
|
|
33
|
+
},
|
|
32
34
|
get path() {
|
|
33
35
|
return fullPath.value;
|
|
34
36
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-alloy",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.272",
|
|
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",
|
|
@@ -302,11 +302,11 @@
|
|
|
302
302
|
"@alloy-js/core": "^0.24.1",
|
|
303
303
|
"@alloy-js/typescript": "^0.24.0",
|
|
304
304
|
"@babel/preset-typescript": "^8.0.1",
|
|
305
|
-
"@power-plant/alloy-js": "^0.0.
|
|
306
|
-
"@power-plant/core": "^0.0.
|
|
307
|
-
"@power-plant/schema": "^0.0.
|
|
308
|
-
"@powerlines/plugin-babel": "^0.13.
|
|
309
|
-
"@powerlines/plugin-power-plant": "^0.1.
|
|
305
|
+
"@power-plant/alloy-js": "^0.0.52",
|
|
306
|
+
"@power-plant/core": "^0.0.55",
|
|
307
|
+
"@power-plant/schema": "^0.0.53",
|
|
308
|
+
"@powerlines/plugin-babel": "^0.13.173",
|
|
309
|
+
"@powerlines/plugin-power-plant": "^0.1.32",
|
|
310
310
|
"@storm-software/config-tools": "^1.190.109",
|
|
311
311
|
"@stryke/capnp": "^0.12.125",
|
|
312
312
|
"@stryke/convert": "^0.7.29",
|
|
@@ -316,15 +316,15 @@
|
|
|
316
316
|
"@stryke/string-format": "^0.17.40",
|
|
317
317
|
"@stryke/type-checks": "^0.6.31",
|
|
318
318
|
"defu": "^6.1.7",
|
|
319
|
-
"powerlines": "^0.47.
|
|
319
|
+
"powerlines": "^0.47.176"
|
|
320
320
|
},
|
|
321
321
|
"devDependencies": {
|
|
322
322
|
"@alloy-js/babel-preset": "^0.3.0",
|
|
323
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
323
|
+
"@powerlines/plugin-plugin": "^0.12.588",
|
|
324
324
|
"@types/node": "^25.9.5"
|
|
325
325
|
},
|
|
326
326
|
"peerDependencies": { "@alloy-js/babel-preset": ">=0.3.0" },
|
|
327
327
|
"peerDependenciesMeta": { "@alloy-js/babel-preset": { "optional": false } },
|
|
328
328
|
"publishConfig": { "access": "public" },
|
|
329
|
-
"gitHead": "
|
|
329
|
+
"gitHead": "11becb36e5cd7b6a738310d5950f59f1db7c396d"
|
|
330
330
|
}
|