@shell-shock/plugin-completions 0.0.18 → 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.
- package/README.md +1 -1
- package/dist/components/bash.cjs +197 -0
- package/dist/components/bash.d.cts +10 -0
- package/dist/components/bash.d.cts.map +1 -0
- package/dist/components/bash.d.mts +10 -0
- package/dist/components/bash.d.mts.map +1 -0
- package/dist/components/bash.mjs +198 -0
- package/dist/components/bash.mjs.map +1 -0
- package/dist/components/index.cjs +5 -1
- package/dist/components/index.d.cts +3 -1
- package/dist/components/index.d.mts +3 -1
- package/dist/components/index.mjs +3 -2
- package/dist/components/zsh.cjs +197 -0
- package/dist/components/zsh.d.cts +10 -0
- package/dist/components/zsh.d.cts.map +1 -0
- package/dist/components/zsh.d.mts +10 -0
- package/dist/components/zsh.d.mts.map +1 -0
- package/dist/components/zsh.mjs +198 -0
- package/dist/components/zsh.mjs.map +1 -0
- package/dist/index.cjs +13 -3
- package/dist/index.d.cts +5 -4
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +5 -4
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +11 -3
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.cjs +3 -0
- package/dist/types/index.d.cts +2 -1
- package/dist/types/index.d.mts +2 -1
- package/dist/types/index.mjs +3 -1
- package/dist/types/shell-type.cjs +6 -0
- package/dist/types/shell-type.d.cts +6 -0
- package/dist/types/shell-type.d.cts.map +1 -0
- package/dist/types/shell-type.d.mts +6 -0
- package/dist/types/shell-type.d.mts.map +1 -0
- package/dist/types/shell-type.mjs +6 -0
- package/dist/types/shell-type.mjs.map +1 -0
- package/package.json +68 -7
- package/dist/components/command.cjs +0 -59
- package/dist/components/command.d.cts +0 -10
- package/dist/components/command.d.cts.map +0 -1
- package/dist/components/command.d.mts +0 -10
- package/dist/components/command.d.mts.map +0 -1
- package/dist/components/command.mjs +0 -60
- package/dist/components/command.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-type.d.cts","names":[],"sources":["../../src/types/shell-type.ts"],"sourcesContent":[],"mappings":";KAkBY,SAAA;AAAA,cAEC,WAFQ,EAAA,SAEc,SAFd,EAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-type.d.mts","names":[],"sources":["../../src/types/shell-type.ts"],"sourcesContent":[],"mappings":";KAkBY,SAAA;AAAA,cAEC,WAFQ,EAAA,SAEc,SAFd,EAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-type.mjs","names":["SHELL_TYPES"],"sources":["../../src/types/shell-type.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport type ShellType = \"bash\" | \"zsh\";\n\nexport const SHELL_TYPES: readonly ShellType[] = [\"bash\", \"zsh\"] as const;\n"],"mappings":";AAoBA,MAAaA,cAAoC,CAAC,QAAQ,MAAe"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shell-shock/plugin-completions",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Shell Shock plugin to generate source code given a list design tokens.",
|
|
6
6
|
"repository": {
|
|
@@ -55,6 +55,48 @@
|
|
|
55
55
|
"default": "./dist/index.mjs"
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
+
"./components": {
|
|
59
|
+
"require": {
|
|
60
|
+
"types": "./dist/components/index.d.cts",
|
|
61
|
+
"default": "./dist/components/index.cjs"
|
|
62
|
+
},
|
|
63
|
+
"import": {
|
|
64
|
+
"types": "./dist/components/index.d.mts",
|
|
65
|
+
"default": "./dist/components/index.mjs"
|
|
66
|
+
},
|
|
67
|
+
"default": {
|
|
68
|
+
"types": "./dist/components/index.d.mts",
|
|
69
|
+
"default": "./dist/components/index.mjs"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"./components/bash": {
|
|
73
|
+
"require": {
|
|
74
|
+
"types": "./dist/components/bash.d.cts",
|
|
75
|
+
"default": "./dist/components/bash.cjs"
|
|
76
|
+
},
|
|
77
|
+
"import": {
|
|
78
|
+
"types": "./dist/components/bash.d.mts",
|
|
79
|
+
"default": "./dist/components/bash.mjs"
|
|
80
|
+
},
|
|
81
|
+
"default": {
|
|
82
|
+
"types": "./dist/components/bash.d.mts",
|
|
83
|
+
"default": "./dist/components/bash.mjs"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"./components/zsh": {
|
|
87
|
+
"require": {
|
|
88
|
+
"types": "./dist/components/zsh.d.cts",
|
|
89
|
+
"default": "./dist/components/zsh.cjs"
|
|
90
|
+
},
|
|
91
|
+
"import": {
|
|
92
|
+
"types": "./dist/components/zsh.d.mts",
|
|
93
|
+
"default": "./dist/components/zsh.mjs"
|
|
94
|
+
},
|
|
95
|
+
"default": {
|
|
96
|
+
"types": "./dist/components/zsh.d.mts",
|
|
97
|
+
"default": "./dist/components/zsh.mjs"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
58
100
|
"./package.json": "./package.json",
|
|
59
101
|
"./types": {
|
|
60
102
|
"require": {
|
|
@@ -83,6 +125,20 @@
|
|
|
83
125
|
"types": "./dist/types/plugin.d.mts",
|
|
84
126
|
"default": "./dist/types/plugin.mjs"
|
|
85
127
|
}
|
|
128
|
+
},
|
|
129
|
+
"./types/shell-type": {
|
|
130
|
+
"require": {
|
|
131
|
+
"types": "./dist/types/shell-type.d.cts",
|
|
132
|
+
"default": "./dist/types/shell-type.cjs"
|
|
133
|
+
},
|
|
134
|
+
"import": {
|
|
135
|
+
"types": "./dist/types/shell-type.d.mts",
|
|
136
|
+
"default": "./dist/types/shell-type.mjs"
|
|
137
|
+
},
|
|
138
|
+
"default": {
|
|
139
|
+
"types": "./dist/types/shell-type.d.mts",
|
|
140
|
+
"default": "./dist/types/shell-type.mjs"
|
|
141
|
+
}
|
|
86
142
|
}
|
|
87
143
|
},
|
|
88
144
|
"types": "./dist/index.d.cts",
|
|
@@ -95,17 +151,22 @@
|
|
|
95
151
|
"powerlines",
|
|
96
152
|
"storm-software"
|
|
97
153
|
],
|
|
154
|
+
"peerDependencies": { "@shell-shock/preset-script": "*" },
|
|
155
|
+
"peerDependenciesMeta": {
|
|
156
|
+
"@shell-shock/preset-script": { "optional": true }
|
|
157
|
+
},
|
|
98
158
|
"dependencies": {
|
|
99
159
|
"@alloy-js/core": "0.23.0-dev.8",
|
|
100
160
|
"@alloy-js/typescript": "0.23.0-dev.4",
|
|
101
|
-
"@powerlines/
|
|
102
|
-
"@powerlines/plugin-
|
|
103
|
-
"@
|
|
161
|
+
"@powerlines/deepkit": "^0.6.62",
|
|
162
|
+
"@powerlines/plugin-alloy": "^0.23.12",
|
|
163
|
+
"@powerlines/plugin-plugin": "^0.12.233",
|
|
164
|
+
"@shell-shock/core": "^0.8.6",
|
|
104
165
|
"@stryke/path": "0.26.6",
|
|
105
|
-
"powerlines": "^0.38.
|
|
166
|
+
"powerlines": "^0.38.49"
|
|
106
167
|
},
|
|
107
168
|
"devDependencies": {
|
|
108
|
-
"@powerlines/plugin-deepkit": "^0.11.
|
|
169
|
+
"@powerlines/plugin-deepkit": "^0.11.161",
|
|
109
170
|
"@types/node": "^22.19.11"
|
|
110
171
|
},
|
|
111
172
|
"publishConfig": {
|
|
@@ -123,5 +184,5 @@
|
|
|
123
184
|
"./package.json": "./package.json"
|
|
124
185
|
}
|
|
125
186
|
},
|
|
126
|
-
"gitHead": "
|
|
187
|
+
"gitHead": "1c331a2b0ce55d9ba0ebbe5aa99c523a065bc847"
|
|
127
188
|
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
2
|
-
let __alloy_js_core = require("@alloy-js/core");
|
|
3
|
-
let __alloy_js_typescript = require("@alloy-js/typescript");
|
|
4
|
-
let __powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
|
|
5
|
-
let __powerlines_plugin_alloy_typescript_components_entry_file = require("@powerlines/plugin-alloy/typescript/components/entry-file");
|
|
6
|
-
let __powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
|
|
7
|
-
|
|
8
|
-
//#region src/components/command.tsx
|
|
9
|
-
/**
|
|
10
|
-
* The Completion commands' handler wrapper for the Shell Shock project.
|
|
11
|
-
*/
|
|
12
|
-
function CommandHandlerWrapper() {
|
|
13
|
-
const context = (0, __powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
|
|
14
|
-
return (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_entry_file.EntryFile, {
|
|
15
|
-
path: "bin.ts",
|
|
16
|
-
hashbang: true,
|
|
17
|
-
imports: { "shell-shock:console": ["error"] },
|
|
18
|
-
get children() {
|
|
19
|
-
return [
|
|
20
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, { get heading() {
|
|
21
|
-
return `Binary entry point for the ${context?.config.title ? `${context?.config.title} ` : ""}CLI application.`;
|
|
22
|
-
} }),
|
|
23
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.FunctionDeclaration, {
|
|
24
|
-
async: true,
|
|
25
|
-
name: "main",
|
|
26
|
-
get children() {
|
|
27
|
-
return [
|
|
28
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
|
|
29
|
-
"const": true,
|
|
30
|
-
name: "args",
|
|
31
|
-
type: "string[]",
|
|
32
|
-
initializer: __alloy_js_core.code`process.argv`
|
|
33
|
-
}),
|
|
34
|
-
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
35
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.IfStatement, {
|
|
36
|
-
condition: __alloy_js_core.code`args.includes("--version") || args.includes("-v")`,
|
|
37
|
-
get children() {
|
|
38
|
-
return __alloy_js_core.code`console.log(${context?.packageJson.version ? `"${context?.packageJson.version}"` : "0.0.1"});`;
|
|
39
|
-
}
|
|
40
|
-
})
|
|
41
|
-
];
|
|
42
|
-
}
|
|
43
|
-
}),
|
|
44
|
-
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
45
|
-
__alloy_js_core.code`
|
|
46
|
-
try {
|
|
47
|
-
await main();
|
|
48
|
-
} catch (error) {
|
|
49
|
-
console.error(error);
|
|
50
|
-
process.exit(1);
|
|
51
|
-
}
|
|
52
|
-
`
|
|
53
|
-
];
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
//#endregion
|
|
59
|
-
exports.CommandHandlerWrapper = CommandHandlerWrapper;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
2
|
-
|
|
3
|
-
//#region src/components/command.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* The Completion commands' handler wrapper for the Shell Shock project.
|
|
6
|
-
*/
|
|
7
|
-
declare function CommandHandlerWrapper(): _alloy_js_core0.Children;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { CommandHandlerWrapper };
|
|
10
|
-
//# sourceMappingURL=command.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.cts","names":[],"sources":["../../src/components/command.tsx"],"sourcesContent":[],"mappings":";;;;;;AAiCgB,iBAAA,qBAAA,CAAA,CAAqB,EAAA,eAAA,CAAA,QAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
2
|
-
|
|
3
|
-
//#region src/components/command.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* The Completion commands' handler wrapper for the Shell Shock project.
|
|
6
|
-
*/
|
|
7
|
-
declare function CommandHandlerWrapper(): _alloy_js_core0.Children;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { CommandHandlerWrapper };
|
|
10
|
-
//# sourceMappingURL=command.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.mts","names":[],"sources":["../../src/components/command.tsx"],"sourcesContent":[],"mappings":";;;;;;AAiCgB,iBAAA,qBAAA,CAAA,CAAqB,EAAA,eAAA,CAAA,QAAA"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { createComponent, createIntrinsic } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { code } from "@alloy-js/core";
|
|
3
|
-
import { FunctionDeclaration, IfStatement, VarDeclaration } from "@alloy-js/typescript";
|
|
4
|
-
import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
|
|
5
|
-
import { EntryFile } from "@powerlines/plugin-alloy/typescript/components/entry-file";
|
|
6
|
-
import { TSDoc } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
|
|
7
|
-
|
|
8
|
-
//#region src/components/command.tsx
|
|
9
|
-
/**
|
|
10
|
-
* The Completion commands' handler wrapper for the Shell Shock project.
|
|
11
|
-
*/
|
|
12
|
-
function CommandHandlerWrapper() {
|
|
13
|
-
const context = usePowerlines();
|
|
14
|
-
return createComponent(EntryFile, {
|
|
15
|
-
path: "bin.ts",
|
|
16
|
-
hashbang: true,
|
|
17
|
-
imports: { "shell-shock:console": ["error"] },
|
|
18
|
-
get children() {
|
|
19
|
-
return [
|
|
20
|
-
createComponent(TSDoc, { get heading() {
|
|
21
|
-
return `Binary entry point for the ${context?.config.title ? `${context?.config.title} ` : ""}CLI application.`;
|
|
22
|
-
} }),
|
|
23
|
-
createComponent(FunctionDeclaration, {
|
|
24
|
-
async: true,
|
|
25
|
-
name: "main",
|
|
26
|
-
get children() {
|
|
27
|
-
return [
|
|
28
|
-
createComponent(VarDeclaration, {
|
|
29
|
-
"const": true,
|
|
30
|
-
name: "args",
|
|
31
|
-
type: "string[]",
|
|
32
|
-
initializer: code`process.argv`
|
|
33
|
-
}),
|
|
34
|
-
createIntrinsic("hbr", {}),
|
|
35
|
-
createComponent(IfStatement, {
|
|
36
|
-
condition: code`args.includes("--version") || args.includes("-v")`,
|
|
37
|
-
get children() {
|
|
38
|
-
return code`console.log(${context?.packageJson.version ? `"${context?.packageJson.version}"` : "0.0.1"});`;
|
|
39
|
-
}
|
|
40
|
-
})
|
|
41
|
-
];
|
|
42
|
-
}
|
|
43
|
-
}),
|
|
44
|
-
createIntrinsic("hbr", {}),
|
|
45
|
-
code`
|
|
46
|
-
try {
|
|
47
|
-
await main();
|
|
48
|
-
} catch (error) {
|
|
49
|
-
console.error(error);
|
|
50
|
-
process.exit(1);
|
|
51
|
-
}
|
|
52
|
-
`
|
|
53
|
-
];
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
//#endregion
|
|
59
|
-
export { CommandHandlerWrapper };
|
|
60
|
-
//# sourceMappingURL=command.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command.mjs","names":["code","FunctionDeclaration","IfStatement","VarDeclaration","usePowerlines","EntryFile","TSDoc","CommandHandlerWrapper","context","_$createComponent","path","hashbang","imports","children","heading","config","title","async","name","type","initializer","_$createIntrinsic","condition","packageJson","version"],"sources":["../../src/components/command.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code } from \"@alloy-js/core\";\nimport {\n FunctionDeclaration,\n IfStatement,\n VarDeclaration\n} from \"@alloy-js/typescript\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { EntryFile } from \"@powerlines/plugin-alloy/typescript/components/entry-file\";\nimport { TSDoc } from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport type { CompletionsPluginContext } from \"../types/plugin\";\n\n/**\n * The Completion commands' handler wrapper for the Shell Shock project.\n */\n\nexport function CommandHandlerWrapper() {\n const context = usePowerlines<CompletionsPluginContext>();\n\n return (\n <EntryFile\n path=\"bin.ts\"\n hashbang\n imports={{\n \"shell-shock:console\": [\"error\"]\n }}>\n <TSDoc\n heading={`Binary entry point for the ${context?.config.title ? `${context?.config.title} ` : \"\"}CLI application.`}></TSDoc>\n <FunctionDeclaration async name=\"main\">\n <VarDeclaration\n const\n name=\"args\"\n type=\"string[]\"\n initializer={code`process.argv`}\n />\n <hbr />\n <IfStatement\n condition={code`args.includes(\"--version\") || args.includes(\"-v\")`}>\n {code`console.log(${context?.packageJson.version ? `\"${context?.packageJson.version}\"` : \"0.0.1\"});`}\n </IfStatement>\n </FunctionDeclaration>\n <hbr />\n {code`\ntry {\n await main();\n} catch (error) {\n console.error(error);\n process.exit(1);\n}\n `}\n </EntryFile>\n );\n}\n"],"mappings":";;;;;;;;;;;AAiCA,SAAgBO,wBAAwB;CACtC,MAAMC,UAAUJ,eAAyC;AAEzD,QAAAK,gBACGJ,WAAS;EACRK,MAAI;EACJC,UAAQ;EACRC,SAAS,EACP,uBAAuB,CAAC,QAAO,EAChC;EAAA,IAAAC,WAAA;AAAA,UAAA;IAAAJ,gBACAH,OAAK,EAAA,IACJQ,UAAO;AAAA,YAAE,8BAA8BN,SAASO,OAAOC,QAAQ,GAAGR,SAASO,OAAOC,MAAK,KAAM,GAAE;OAAkB,CAAA;IAAAP,gBAClHR,qBAAmB;KAACgB,OAAK;KAACC,MAAI;KAAA,IAAAL,WAAA;AAAA,aAAA;OAAAJ,gBAC5BN,gBAAc;QAAA,SAAA;QAEbe,MAAI;QACJC,MAAI;QACJC,aAAapB,IAAI;QAAc,CAAA;OAAAqB,gBAAA,OAAA,EAAA,CAAA;OAAAZ,gBAGhCP,aAAW;QACVoB,WAAWtB,IAAI;QAAmD,IAAAa,WAAA;AAAA,gBACjEb,IAAI,eAAeQ,SAASe,YAAYC,UAAU,IAAIhB,SAASe,YAAYC,QAAO,KAAM,QAAO;;QAAI,CAAA;OAAA;;KAAA,CAAA;IAAAH,gBAAA,OAAA,EAAA,CAAA;IAIvGrB,IAAI;;;;;;;;IAOJ;;EAAA,CAAA"}
|