@shell-shock/core 0.1.1 → 0.2.1

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.
Files changed (62) hide show
  1. package/README.md +221 -0
  2. package/dist/_virtual/rolldown_runtime.cjs +29 -1
  3. package/dist/api.cjs +45 -1
  4. package/dist/api.d.cts +7 -0
  5. package/dist/api.d.mts +7 -0
  6. package/dist/api.mjs +44 -1
  7. package/dist/components/index.cjs +7 -0
  8. package/dist/components/index.d.cts +2 -0
  9. package/dist/components/index.d.mts +2 -0
  10. package/dist/components/index.mjs +3 -0
  11. package/dist/components/utils-builtin.cjs +453 -0
  12. package/dist/components/utils-builtin.d.cts +27 -0
  13. package/dist/components/utils-builtin.d.mts +27 -0
  14. package/dist/components/utils-builtin.mjs +447 -0
  15. package/dist/config.cjs +17 -1
  16. package/dist/config.mjs +16 -1
  17. package/dist/helpers/persistence.cjs +49 -0
  18. package/dist/helpers/persistence.mjs +46 -0
  19. package/dist/helpers/resolve-command.cjs +92 -1
  20. package/dist/helpers/resolve-command.mjs +88 -1
  21. package/dist/helpers/update-package-json.cjs +28 -1
  22. package/dist/helpers/update-package-json.mjs +27 -1
  23. package/dist/helpers/utilities.cjs +41 -0
  24. package/dist/helpers/utilities.mjs +38 -0
  25. package/dist/index.cjs +24 -1
  26. package/dist/index.d.cts +16 -2
  27. package/dist/index.d.mts +15 -2
  28. package/dist/index.mjs +19 -1
  29. package/dist/plugin-utils/get-command-tree.cjs +22 -0
  30. package/dist/plugin-utils/get-command-tree.d.cts +15 -0
  31. package/dist/plugin-utils/get-command-tree.d.mts +15 -0
  32. package/dist/plugin-utils/get-command-tree.mjs +21 -0
  33. package/dist/plugin-utils/index.cjs +3 -0
  34. package/dist/plugin-utils/index.d.cts +2 -0
  35. package/dist/plugin-utils/index.d.mts +2 -0
  36. package/dist/plugin-utils/index.mjs +3 -0
  37. package/dist/powerlines.cjs +172 -2
  38. package/dist/powerlines.d.cts +2 -2
  39. package/dist/powerlines.d.mts +2 -2
  40. package/dist/powerlines.mjs +168 -2
  41. package/dist/types/command.d.cts +63 -0
  42. package/dist/types/command.d.mts +63 -0
  43. package/dist/types/command.mjs +1 -0
  44. package/dist/types/config.d.cts +9 -26
  45. package/dist/types/config.d.mts +9 -26
  46. package/dist/types/config.mjs +1 -1
  47. package/dist/types/context.cjs +0 -0
  48. package/dist/types/context.d.cts +26 -0
  49. package/dist/types/context.d.mts +26 -0
  50. package/dist/types/context.mjs +1 -0
  51. package/dist/types/index.d.cts +4 -2
  52. package/dist/types/index.d.mts +4 -2
  53. package/dist/types/index.mjs +1 -1
  54. package/dist/types/options.cjs +0 -0
  55. package/dist/types/options.d.cts +7 -0
  56. package/dist/types/options.d.mts +7 -0
  57. package/dist/types/options.mjs +1 -0
  58. package/package.json +76 -13
  59. package/dist/types/build.d.cts +0 -66
  60. package/dist/types/build.d.mts +0 -66
  61. package/dist/types/build.mjs +0 -1
  62. /package/dist/types/{build.cjs → command.cjs} +0 -0
@@ -1,66 +0,0 @@
1
- import { ResolvedConfig } from "./config.cjs";
2
- import { TsdownPluginContext } from "@powerlines/plugin-tsdown";
3
- import { ResolvedEntryTypeDefinition } from "powerlines/types/resolved";
4
-
5
- //#region src/types/build.d.ts
6
- type CommandArg = {
7
- name: string;
8
- title: string;
9
- description?: string;
10
- alias: string[];
11
- optional: boolean;
12
- } & (({
13
- type: "string";
14
- format?: "path" | "url" | "date" | "time" | "datetime" | "json" | "regex" | string;
15
- } & ({
16
- variadic: false;
17
- default?: string;
18
- } | {
19
- variadic: true;
20
- default?: string[];
21
- })) | ({
22
- type: "number";
23
- } & ({
24
- variadic: false;
25
- default?: number;
26
- } | {
27
- variadic: true;
28
- default?: number[];
29
- })) | {
30
- type: "boolean";
31
- default?: boolean;
32
- isNegativeOf?: string;
33
- });
34
- interface CommandEntry {
35
- path: string[];
36
- name: string;
37
- title: string;
38
- description?: string;
39
- isVirtual: boolean;
40
- entry: ResolvedEntryTypeDefinition;
41
- }
42
- type CommandTree = CommandEntry & {
43
- args: CommandArg[];
44
- parent: null | CommandTree;
45
- children: Record<string, CommandTree>;
46
- };
47
- interface CommandRelations {
48
- parent: string | null;
49
- children: string[];
50
- }
51
- type BuildContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = TsdownPluginContext<TResolvedConfig> & {
52
- /**
53
- * The root path where commands are located.
54
- */
55
- commandsRoot: string;
56
- /**
57
- * The list of commands discovered in the project.
58
- */
59
- commands: CommandEntry[];
60
- /**
61
- * The command hierarchy tree.
62
- */
63
- tree: CommandTree;
64
- };
65
- //#endregion
66
- export { BuildContext, CommandArg, CommandEntry, CommandRelations, CommandTree };
@@ -1,66 +0,0 @@
1
- import { ResolvedConfig } from "./config.mjs";
2
- import { TsdownPluginContext } from "@powerlines/plugin-tsdown";
3
- import { ResolvedEntryTypeDefinition } from "powerlines/types/resolved";
4
-
5
- //#region src/types/build.d.ts
6
- type CommandArg = {
7
- name: string;
8
- title: string;
9
- description?: string;
10
- alias: string[];
11
- optional: boolean;
12
- } & (({
13
- type: "string";
14
- format?: "path" | "url" | "date" | "time" | "datetime" | "json" | "regex" | string;
15
- } & ({
16
- variadic: false;
17
- default?: string;
18
- } | {
19
- variadic: true;
20
- default?: string[];
21
- })) | ({
22
- type: "number";
23
- } & ({
24
- variadic: false;
25
- default?: number;
26
- } | {
27
- variadic: true;
28
- default?: number[];
29
- })) | {
30
- type: "boolean";
31
- default?: boolean;
32
- isNegativeOf?: string;
33
- });
34
- interface CommandEntry {
35
- path: string[];
36
- name: string;
37
- title: string;
38
- description?: string;
39
- isVirtual: boolean;
40
- entry: ResolvedEntryTypeDefinition;
41
- }
42
- type CommandTree = CommandEntry & {
43
- args: CommandArg[];
44
- parent: null | CommandTree;
45
- children: Record<string, CommandTree>;
46
- };
47
- interface CommandRelations {
48
- parent: string | null;
49
- children: string[];
50
- }
51
- type BuildContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = TsdownPluginContext<TResolvedConfig> & {
52
- /**
53
- * The root path where commands are located.
54
- */
55
- commandsRoot: string;
56
- /**
57
- * The list of commands discovered in the project.
58
- */
59
- commands: CommandEntry[];
60
- /**
61
- * The command hierarchy tree.
62
- */
63
- tree: CommandTree;
64
- };
65
- //#endregion
66
- export { BuildContext, CommandArg, CommandEntry, CommandRelations, CommandTree };
@@ -1 +0,0 @@
1
- export{};
File without changes